]> git.leopard-lacewing.eu Git - cgue_weave.git/commitdiff
INIT Weave
authorPeter Schaefer <schaeferpm@gmail.com>
Mon, 9 Mar 2015 20:11:47 +0000 (21:11 +0100)
committerPeter Schaefer <schaeferpm@gmail.com>
Mon, 9 Mar 2015 20:11:47 +0000 (21:11 +0100)
init gitIgnore
init Directories
init VS Project
preconfig VS Project
added Assimp,Glew,GLM,zLib,freetype2,freeimage,SDL2

434 files changed:
.gitignore [new file with mode: 0644]
CGUE2015_Weave.sln [new file with mode: 0644]
Weave/Weave.vcxproj [new file with mode: 0644]
Weave/Weave.vcxproj.filters [new file with mode: 0644]
include/FreeImage.h [new file with mode: 0644]
include/GL/glew.h [new file with mode: 0644]
include/GL/glxew.h [new file with mode: 0644]
include/GL/wglew.h [new file with mode: 0644]
include/SDL2/SDL.h [new file with mode: 0644]
include/SDL2/SDL_assert.h [new file with mode: 0644]
include/SDL2/SDL_atomic.h [new file with mode: 0644]
include/SDL2/SDL_audio.h [new file with mode: 0644]
include/SDL2/SDL_bits.h [new file with mode: 0644]
include/SDL2/SDL_blendmode.h [new file with mode: 0644]
include/SDL2/SDL_clipboard.h [new file with mode: 0644]
include/SDL2/SDL_config.h [new file with mode: 0644]
include/SDL2/SDL_cpuinfo.h [new file with mode: 0644]
include/SDL2/SDL_endian.h [new file with mode: 0644]
include/SDL2/SDL_error.h [new file with mode: 0644]
include/SDL2/SDL_events.h [new file with mode: 0644]
include/SDL2/SDL_filesystem.h [new file with mode: 0644]
include/SDL2/SDL_gamecontroller.h [new file with mode: 0644]
include/SDL2/SDL_gesture.h [new file with mode: 0644]
include/SDL2/SDL_haptic.h [new file with mode: 0644]
include/SDL2/SDL_hints.h [new file with mode: 0644]
include/SDL2/SDL_joystick.h [new file with mode: 0644]
include/SDL2/SDL_keyboard.h [new file with mode: 0644]
include/SDL2/SDL_keycode.h [new file with mode: 0644]
include/SDL2/SDL_loadso.h [new file with mode: 0644]
include/SDL2/SDL_log.h [new file with mode: 0644]
include/SDL2/SDL_main.h [new file with mode: 0644]
include/SDL2/SDL_messagebox.h [new file with mode: 0644]
include/SDL2/SDL_mouse.h [new file with mode: 0644]
include/SDL2/SDL_mutex.h [new file with mode: 0644]
include/SDL2/SDL_name.h [new file with mode: 0644]
include/SDL2/SDL_opengl.h [new file with mode: 0644]
include/SDL2/SDL_opengles.h [new file with mode: 0644]
include/SDL2/SDL_opengles2.h [new file with mode: 0644]
include/SDL2/SDL_pixels.h [new file with mode: 0644]
include/SDL2/SDL_platform.h [new file with mode: 0644]
include/SDL2/SDL_power.h [new file with mode: 0644]
include/SDL2/SDL_quit.h [new file with mode: 0644]
include/SDL2/SDL_rect.h [new file with mode: 0644]
include/SDL2/SDL_render.h [new file with mode: 0644]
include/SDL2/SDL_revision.h [new file with mode: 0644]
include/SDL2/SDL_rwops.h [new file with mode: 0644]
include/SDL2/SDL_scancode.h [new file with mode: 0644]
include/SDL2/SDL_shape.h [new file with mode: 0644]
include/SDL2/SDL_stdinc.h [new file with mode: 0644]
include/SDL2/SDL_surface.h [new file with mode: 0644]
include/SDL2/SDL_system.h [new file with mode: 0644]
include/SDL2/SDL_syswm.h [new file with mode: 0644]
include/SDL2/SDL_test.h [new file with mode: 0644]
include/SDL2/SDL_test_assert.h [new file with mode: 0644]
include/SDL2/SDL_test_common.h [new file with mode: 0644]
include/SDL2/SDL_test_compare.h [new file with mode: 0644]
include/SDL2/SDL_test_crc32.h [new file with mode: 0644]
include/SDL2/SDL_test_font.h [new file with mode: 0644]
include/SDL2/SDL_test_fuzzer.h [new file with mode: 0644]
include/SDL2/SDL_test_harness.h [new file with mode: 0644]
include/SDL2/SDL_test_images.h [new file with mode: 0644]
include/SDL2/SDL_test_log.h [new file with mode: 0644]
include/SDL2/SDL_test_md5.h [new file with mode: 0644]
include/SDL2/SDL_test_random.h [new file with mode: 0644]
include/SDL2/SDL_thread.h [new file with mode: 0644]
include/SDL2/SDL_timer.h [new file with mode: 0644]
include/SDL2/SDL_touch.h [new file with mode: 0644]
include/SDL2/SDL_types.h [new file with mode: 0644]
include/SDL2/SDL_version.h [new file with mode: 0644]
include/SDL2/SDL_video.h [new file with mode: 0644]
include/SDL2/begin_code.h [new file with mode: 0644]
include/SDL2/close_code.h [new file with mode: 0644]
include/assimp/Compiler/poppack1.h [new file with mode: 0644]
include/assimp/Compiler/pstdint.h [new file with mode: 0644]
include/assimp/Compiler/pushpack1.h [new file with mode: 0644]
include/assimp/DefaultLogger.hpp [new file with mode: 0644]
include/assimp/Exporter.hpp [new file with mode: 0644]
include/assimp/IOStream.hpp [new file with mode: 0644]
include/assimp/IOSystem.hpp [new file with mode: 0644]
include/assimp/Importer.hpp [new file with mode: 0644]
include/assimp/LogStream.hpp [new file with mode: 0644]
include/assimp/Logger.hpp [new file with mode: 0644]
include/assimp/NullLogger.hpp [new file with mode: 0644]
include/assimp/ProgressHandler.hpp [new file with mode: 0644]
include/assimp/ai_assert.h [new file with mode: 0644]
include/assimp/anim.h [new file with mode: 0644]
include/assimp/camera.h [new file with mode: 0644]
include/assimp/cexport.h [new file with mode: 0644]
include/assimp/cfileio.h [new file with mode: 0644]
include/assimp/cimport.h [new file with mode: 0644]
include/assimp/color4.h [new file with mode: 0644]
include/assimp/color4.inl [new file with mode: 0644]
include/assimp/config.h [new file with mode: 0644]
include/assimp/defs.h [new file with mode: 0644]
include/assimp/importerdesc.h [new file with mode: 0644]
include/assimp/light.h [new file with mode: 0644]
include/assimp/material.h [new file with mode: 0644]
include/assimp/material.inl [new file with mode: 0644]
include/assimp/matrix3x3.h [new file with mode: 0644]
include/assimp/matrix3x3.inl [new file with mode: 0644]
include/assimp/matrix4x4.h [new file with mode: 0644]
include/assimp/matrix4x4.inl [new file with mode: 0644]
include/assimp/mesh.h [new file with mode: 0644]
include/assimp/metadata.h [new file with mode: 0644]
include/assimp/postprocess.h [new file with mode: 0644]
include/assimp/quaternion.h [new file with mode: 0644]
include/assimp/quaternion.inl [new file with mode: 0644]
include/assimp/scene.h [new file with mode: 0644]
include/assimp/texture.h [new file with mode: 0644]
include/assimp/types.h [new file with mode: 0644]
include/assimp/vector2.h [new file with mode: 0644]
include/assimp/vector2.inl [new file with mode: 0644]
include/assimp/vector3.h [new file with mode: 0644]
include/assimp/vector3.inl [new file with mode: 0644]
include/assimp/version.h [new file with mode: 0644]
include/freetype2/freetype/config/ftconfig.h [new file with mode: 0644]
include/freetype2/freetype/config/ftheader.h [new file with mode: 0644]
include/freetype2/freetype/config/ftmodule.h [new file with mode: 0644]
include/freetype2/freetype/config/ftoption.h [new file with mode: 0644]
include/freetype2/freetype/config/ftstdlib.h [new file with mode: 0644]
include/freetype2/freetype/freetype.h [new file with mode: 0644]
include/freetype2/freetype/ftbbox.h [new file with mode: 0644]
include/freetype2/freetype/ftbdf.h [new file with mode: 0644]
include/freetype2/freetype/ftbitmap.h [new file with mode: 0644]
include/freetype2/freetype/ftcache.h [new file with mode: 0644]
include/freetype2/freetype/ftchapters.h [new file with mode: 0644]
include/freetype2/freetype/fterrdef.h [new file with mode: 0644]
include/freetype2/freetype/fterrors.h [new file with mode: 0644]
include/freetype2/freetype/ftgasp.h [new file with mode: 0644]
include/freetype2/freetype/ftglyph.h [new file with mode: 0644]
include/freetype2/freetype/ftgxval.h [new file with mode: 0644]
include/freetype2/freetype/ftgzip.h [new file with mode: 0644]
include/freetype2/freetype/ftimage.h [new file with mode: 0644]
include/freetype2/freetype/ftincrem.h [new file with mode: 0644]
include/freetype2/freetype/ftlcdfil.h [new file with mode: 0644]
include/freetype2/freetype/ftlist.h [new file with mode: 0644]
include/freetype2/freetype/ftlzw.h [new file with mode: 0644]
include/freetype2/freetype/ftmac.h [new file with mode: 0644]
include/freetype2/freetype/ftmm.h [new file with mode: 0644]
include/freetype2/freetype/ftmodapi.h [new file with mode: 0644]
include/freetype2/freetype/ftmoderr.h [new file with mode: 0644]
include/freetype2/freetype/ftotval.h [new file with mode: 0644]
include/freetype2/freetype/ftoutln.h [new file with mode: 0644]
include/freetype2/freetype/ftpfr.h [new file with mode: 0644]
include/freetype2/freetype/ftrender.h [new file with mode: 0644]
include/freetype2/freetype/ftsizes.h [new file with mode: 0644]
include/freetype2/freetype/ftsnames.h [new file with mode: 0644]
include/freetype2/freetype/ftstroke.h [new file with mode: 0644]
include/freetype2/freetype/ftsynth.h [new file with mode: 0644]
include/freetype2/freetype/ftsystem.h [new file with mode: 0644]
include/freetype2/freetype/fttrigon.h [new file with mode: 0644]
include/freetype2/freetype/fttypes.h [new file with mode: 0644]
include/freetype2/freetype/ftwinfnt.h [new file with mode: 0644]
include/freetype2/freetype/ftxf86.h [new file with mode: 0644]
include/freetype2/freetype/t1tables.h [new file with mode: 0644]
include/freetype2/freetype/ttnameid.h [new file with mode: 0644]
include/freetype2/freetype/tttables.h [new file with mode: 0644]
include/freetype2/freetype/tttags.h [new file with mode: 0644]
include/freetype2/freetype/ttunpat.h [new file with mode: 0644]
include/ft2build.h [new file with mode: 0644]
include/glm/CMakeLists.txt [new file with mode: 0644]
include/glm/common.hpp [new file with mode: 0644]
include/glm/detail/_features.hpp [new file with mode: 0644]
include/glm/detail/_fixes.hpp [new file with mode: 0644]
include/glm/detail/_noise.hpp [new file with mode: 0644]
include/glm/detail/_swizzle.hpp [new file with mode: 0644]
include/glm/detail/_swizzle_func.hpp [new file with mode: 0644]
include/glm/detail/_vectorize.hpp [new file with mode: 0644]
include/glm/detail/dummy.cpp [new file with mode: 0644]
include/glm/detail/func_common.hpp [new file with mode: 0644]
include/glm/detail/func_common.inl [new file with mode: 0644]
include/glm/detail/func_exponential.hpp [new file with mode: 0644]
include/glm/detail/func_exponential.inl [new file with mode: 0644]
include/glm/detail/func_geometric.hpp [new file with mode: 0644]
include/glm/detail/func_geometric.inl [new file with mode: 0644]
include/glm/detail/func_integer.hpp [new file with mode: 0644]
include/glm/detail/func_integer.inl [new file with mode: 0644]
include/glm/detail/func_matrix.hpp [new file with mode: 0644]
include/glm/detail/func_matrix.inl [new file with mode: 0644]
include/glm/detail/func_noise.hpp [new file with mode: 0644]
include/glm/detail/func_noise.inl [new file with mode: 0644]
include/glm/detail/func_packing.hpp [new file with mode: 0644]
include/glm/detail/func_packing.inl [new file with mode: 0644]
include/glm/detail/func_trigonometric.hpp [new file with mode: 0644]
include/glm/detail/func_trigonometric.inl [new file with mode: 0644]
include/glm/detail/func_vector_relational.hpp [new file with mode: 0644]
include/glm/detail/func_vector_relational.inl [new file with mode: 0644]
include/glm/detail/glm.cpp [new file with mode: 0644]
include/glm/detail/intrinsic_common.hpp [new file with mode: 0644]
include/glm/detail/intrinsic_common.inl [new file with mode: 0644]
include/glm/detail/intrinsic_exponential.hpp [new file with mode: 0644]
include/glm/detail/intrinsic_exponential.inl [new file with mode: 0644]
include/glm/detail/intrinsic_geometric.hpp [new file with mode: 0644]
include/glm/detail/intrinsic_geometric.inl [new file with mode: 0644]
include/glm/detail/intrinsic_integer.hpp [new file with mode: 0644]
include/glm/detail/intrinsic_integer.inl [new file with mode: 0644]
include/glm/detail/intrinsic_matrix.hpp [new file with mode: 0644]
include/glm/detail/intrinsic_matrix.inl [new file with mode: 0644]
include/glm/detail/intrinsic_trigonometric.hpp [new file with mode: 0644]
include/glm/detail/intrinsic_trigonometric.inl [new file with mode: 0644]
include/glm/detail/intrinsic_vector_relational.hpp [new file with mode: 0644]
include/glm/detail/intrinsic_vector_relational.inl [new file with mode: 0644]
include/glm/detail/precision.hpp [new file with mode: 0644]
include/glm/detail/setup.hpp [new file with mode: 0644]
include/glm/detail/type_float.hpp [new file with mode: 0644]
include/glm/detail/type_gentype.hpp [new file with mode: 0644]
include/glm/detail/type_gentype.inl [new file with mode: 0644]
include/glm/detail/type_half.hpp [new file with mode: 0644]
include/glm/detail/type_half.inl [new file with mode: 0644]
include/glm/detail/type_int.hpp [new file with mode: 0644]
include/glm/detail/type_mat.hpp [new file with mode: 0644]
include/glm/detail/type_mat.inl [new file with mode: 0644]
include/glm/detail/type_mat2x2.hpp [new file with mode: 0644]
include/glm/detail/type_mat2x2.inl [new file with mode: 0644]
include/glm/detail/type_mat2x3.hpp [new file with mode: 0644]
include/glm/detail/type_mat2x3.inl [new file with mode: 0644]
include/glm/detail/type_mat2x4.hpp [new file with mode: 0644]
include/glm/detail/type_mat2x4.inl [new file with mode: 0644]
include/glm/detail/type_mat3x2.hpp [new file with mode: 0644]
include/glm/detail/type_mat3x2.inl [new file with mode: 0644]
include/glm/detail/type_mat3x3.hpp [new file with mode: 0644]
include/glm/detail/type_mat3x3.inl [new file with mode: 0644]
include/glm/detail/type_mat3x4.hpp [new file with mode: 0644]
include/glm/detail/type_mat3x4.inl [new file with mode: 0644]
include/glm/detail/type_mat4x2.hpp [new file with mode: 0644]
include/glm/detail/type_mat4x2.inl [new file with mode: 0644]
include/glm/detail/type_mat4x3.hpp [new file with mode: 0644]
include/glm/detail/type_mat4x3.inl [new file with mode: 0644]
include/glm/detail/type_mat4x4.hpp [new file with mode: 0644]
include/glm/detail/type_mat4x4.inl [new file with mode: 0644]
include/glm/detail/type_vec.hpp [new file with mode: 0644]
include/glm/detail/type_vec.inl [new file with mode: 0644]
include/glm/detail/type_vec1.hpp [new file with mode: 0644]
include/glm/detail/type_vec1.inl [new file with mode: 0644]
include/glm/detail/type_vec2.hpp [new file with mode: 0644]
include/glm/detail/type_vec2.inl [new file with mode: 0644]
include/glm/detail/type_vec3.hpp [new file with mode: 0644]
include/glm/detail/type_vec3.inl [new file with mode: 0644]
include/glm/detail/type_vec4.hpp [new file with mode: 0644]
include/glm/detail/type_vec4.inl [new file with mode: 0644]
include/glm/detail/type_vec4_avx.inl [new file with mode: 0644]
include/glm/detail/type_vec4_avx2.inl [new file with mode: 0644]
include/glm/detail/type_vec4_sse2.inl [new file with mode: 0644]
include/glm/exponential.hpp [new file with mode: 0644]
include/glm/ext.hpp [new file with mode: 0644]
include/glm/fwd.hpp [new file with mode: 0644]
include/glm/geometric.hpp [new file with mode: 0644]
include/glm/glm.hpp [new file with mode: 0644]
include/glm/gtc/bitfield.hpp [new file with mode: 0644]
include/glm/gtc/bitfield.inl [new file with mode: 0644]
include/glm/gtc/constants.hpp [new file with mode: 0644]
include/glm/gtc/constants.inl [new file with mode: 0644]
include/glm/gtc/epsilon.hpp [new file with mode: 0644]
include/glm/gtc/epsilon.inl [new file with mode: 0644]
include/glm/gtc/integer.hpp [new file with mode: 0644]
include/glm/gtc/integer.inl [new file with mode: 0644]
include/glm/gtc/matrix_access.hpp [new file with mode: 0644]
include/glm/gtc/matrix_access.inl [new file with mode: 0644]
include/glm/gtc/matrix_integer.hpp [new file with mode: 0644]
include/glm/gtc/matrix_inverse.hpp [new file with mode: 0644]
include/glm/gtc/matrix_inverse.inl [new file with mode: 0644]
include/glm/gtc/matrix_transform.hpp [new file with mode: 0644]
include/glm/gtc/matrix_transform.inl [new file with mode: 0644]
include/glm/gtc/noise.hpp [new file with mode: 0644]
include/glm/gtc/noise.inl [new file with mode: 0644]
include/glm/gtc/packing.hpp [new file with mode: 0644]
include/glm/gtc/packing.inl [new file with mode: 0644]
include/glm/gtc/quaternion.hpp [new file with mode: 0644]
include/glm/gtc/quaternion.inl [new file with mode: 0644]
include/glm/gtc/random.hpp [new file with mode: 0644]
include/glm/gtc/random.inl [new file with mode: 0644]
include/glm/gtc/reciprocal.hpp [new file with mode: 0644]
include/glm/gtc/reciprocal.inl [new file with mode: 0644]
include/glm/gtc/round.hpp [new file with mode: 0644]
include/glm/gtc/round.inl [new file with mode: 0644]
include/glm/gtc/type_precision.hpp [new file with mode: 0644]
include/glm/gtc/type_precision.inl [new file with mode: 0644]
include/glm/gtc/type_ptr.hpp [new file with mode: 0644]
include/glm/gtc/type_ptr.inl [new file with mode: 0644]
include/glm/gtc/ulp.hpp [new file with mode: 0644]
include/glm/gtc/ulp.inl [new file with mode: 0644]
include/glm/gtc/vec1.hpp [new file with mode: 0644]
include/glm/gtc/vec1.inl [new file with mode: 0644]
include/glm/gtx/associated_min_max.hpp [new file with mode: 0644]
include/glm/gtx/associated_min_max.inl [new file with mode: 0644]
include/glm/gtx/bit.hpp [new file with mode: 0644]
include/glm/gtx/bit.inl [new file with mode: 0644]
include/glm/gtx/closest_point.hpp [new file with mode: 0644]
include/glm/gtx/closest_point.inl [new file with mode: 0644]
include/glm/gtx/color_space.hpp [new file with mode: 0644]
include/glm/gtx/color_space.inl [new file with mode: 0644]
include/glm/gtx/color_space_YCoCg.hpp [new file with mode: 0644]
include/glm/gtx/color_space_YCoCg.inl [new file with mode: 0644]
include/glm/gtx/common.hpp [new file with mode: 0644]
include/glm/gtx/common.inl [new file with mode: 0644]
include/glm/gtx/compatibility.hpp [new file with mode: 0644]
include/glm/gtx/compatibility.inl [new file with mode: 0644]
include/glm/gtx/component_wise.hpp [new file with mode: 0644]
include/glm/gtx/component_wise.inl [new file with mode: 0644]
include/glm/gtx/dual_quaternion.hpp [new file with mode: 0644]
include/glm/gtx/dual_quaternion.inl [new file with mode: 0644]
include/glm/gtx/euler_angles.hpp [new file with mode: 0644]
include/glm/gtx/euler_angles.inl [new file with mode: 0644]
include/glm/gtx/extend.hpp [new file with mode: 0644]
include/glm/gtx/extend.inl [new file with mode: 0644]
include/glm/gtx/extented_min_max.hpp [new file with mode: 0644]
include/glm/gtx/extented_min_max.inl [new file with mode: 0644]
include/glm/gtx/fast_exponential.hpp [new file with mode: 0644]
include/glm/gtx/fast_exponential.inl [new file with mode: 0644]
include/glm/gtx/fast_square_root.hpp [new file with mode: 0644]
include/glm/gtx/fast_square_root.inl [new file with mode: 0644]
include/glm/gtx/fast_trigonometry.hpp [new file with mode: 0644]
include/glm/gtx/fast_trigonometry.inl [new file with mode: 0644]
include/glm/gtx/gradient_paint.hpp [new file with mode: 0644]
include/glm/gtx/gradient_paint.inl [new file with mode: 0644]
include/glm/gtx/handed_coordinate_space.hpp [new file with mode: 0644]
include/glm/gtx/handed_coordinate_space.inl [new file with mode: 0644]
include/glm/gtx/integer.hpp [new file with mode: 0644]
include/glm/gtx/integer.inl [new file with mode: 0644]
include/glm/gtx/intersect.hpp [new file with mode: 0644]
include/glm/gtx/intersect.inl [new file with mode: 0644]
include/glm/gtx/io.hpp [new file with mode: 0644]
include/glm/gtx/io.inl [new file with mode: 0644]
include/glm/gtx/log_base.hpp [new file with mode: 0644]
include/glm/gtx/log_base.inl [new file with mode: 0644]
include/glm/gtx/matrix_cross_product.hpp [new file with mode: 0644]
include/glm/gtx/matrix_cross_product.inl [new file with mode: 0644]
include/glm/gtx/matrix_decompose.hpp [new file with mode: 0644]
include/glm/gtx/matrix_decompose.inl [new file with mode: 0644]
include/glm/gtx/matrix_interpolation.hpp [new file with mode: 0644]
include/glm/gtx/matrix_interpolation.inl [new file with mode: 0644]
include/glm/gtx/matrix_major_storage.hpp [new file with mode: 0644]
include/glm/gtx/matrix_major_storage.inl [new file with mode: 0644]
include/glm/gtx/matrix_operation.hpp [new file with mode: 0644]
include/glm/gtx/matrix_operation.inl [new file with mode: 0644]
include/glm/gtx/matrix_query.hpp [new file with mode: 0644]
include/glm/gtx/matrix_query.inl [new file with mode: 0644]
include/glm/gtx/matrix_transform_2d.hpp [new file with mode: 0644]
include/glm/gtx/matrix_transform_2d.inl [new file with mode: 0644]
include/glm/gtx/mixed_product.hpp [new file with mode: 0644]
include/glm/gtx/mixed_product.inl [new file with mode: 0644]
include/glm/gtx/multiple.hpp [new file with mode: 0644]
include/glm/gtx/multiple.inl [new file with mode: 0644]
include/glm/gtx/norm.hpp [new file with mode: 0644]
include/glm/gtx/norm.inl [new file with mode: 0644]
include/glm/gtx/normal.hpp [new file with mode: 0644]
include/glm/gtx/normal.inl [new file with mode: 0644]
include/glm/gtx/normalize_dot.hpp [new file with mode: 0644]
include/glm/gtx/normalize_dot.inl [new file with mode: 0644]
include/glm/gtx/number_precision.hpp [new file with mode: 0644]
include/glm/gtx/number_precision.inl [new file with mode: 0644]
include/glm/gtx/optimum_pow.hpp [new file with mode: 0644]
include/glm/gtx/optimum_pow.inl [new file with mode: 0644]
include/glm/gtx/orthonormalize.hpp [new file with mode: 0644]
include/glm/gtx/orthonormalize.inl [new file with mode: 0644]
include/glm/gtx/perpendicular.hpp [new file with mode: 0644]
include/glm/gtx/perpendicular.inl [new file with mode: 0644]
include/glm/gtx/polar_coordinates.hpp [new file with mode: 0644]
include/glm/gtx/polar_coordinates.inl [new file with mode: 0644]
include/glm/gtx/projection.hpp [new file with mode: 0644]
include/glm/gtx/projection.inl [new file with mode: 0644]
include/glm/gtx/quaternion.hpp [new file with mode: 0644]
include/glm/gtx/quaternion.inl [new file with mode: 0644]
include/glm/gtx/range.hpp [new file with mode: 0644]
include/glm/gtx/raw_data.hpp [new file with mode: 0644]
include/glm/gtx/raw_data.inl [new file with mode: 0644]
include/glm/gtx/rotate_normalized_axis.hpp [new file with mode: 0644]
include/glm/gtx/rotate_normalized_axis.inl [new file with mode: 0644]
include/glm/gtx/rotate_vector.hpp [new file with mode: 0644]
include/glm/gtx/rotate_vector.inl [new file with mode: 0644]
include/glm/gtx/scalar_multiplication.hpp [new file with mode: 0644]
include/glm/gtx/scalar_relational.hpp [new file with mode: 0644]
include/glm/gtx/scalar_relational.inl [new file with mode: 0644]
include/glm/gtx/simd_mat4.hpp [new file with mode: 0644]
include/glm/gtx/simd_mat4.inl [new file with mode: 0644]
include/glm/gtx/simd_quat.hpp [new file with mode: 0644]
include/glm/gtx/simd_quat.inl [new file with mode: 0644]
include/glm/gtx/simd_vec4.hpp [new file with mode: 0644]
include/glm/gtx/simd_vec4.inl [new file with mode: 0644]
include/glm/gtx/spline.hpp [new file with mode: 0644]
include/glm/gtx/spline.inl [new file with mode: 0644]
include/glm/gtx/std_based_type.hpp [new file with mode: 0644]
include/glm/gtx/std_based_type.inl [new file with mode: 0644]
include/glm/gtx/string_cast.hpp [new file with mode: 0644]
include/glm/gtx/string_cast.inl [new file with mode: 0644]
include/glm/gtx/transform.hpp [new file with mode: 0644]
include/glm/gtx/transform.inl [new file with mode: 0644]
include/glm/gtx/transform2.hpp [new file with mode: 0644]
include/glm/gtx/transform2.inl [new file with mode: 0644]
include/glm/gtx/type_aligned.hpp [new file with mode: 0644]
include/glm/gtx/type_aligned.inl [new file with mode: 0644]
include/glm/gtx/vector_angle.hpp [new file with mode: 0644]
include/glm/gtx/vector_angle.inl [new file with mode: 0644]
include/glm/gtx/vector_query.hpp [new file with mode: 0644]
include/glm/gtx/vector_query.inl [new file with mode: 0644]
include/glm/gtx/wrap.hpp [new file with mode: 0644]
include/glm/gtx/wrap.inl [new file with mode: 0644]
include/glm/integer.hpp [new file with mode: 0644]
include/glm/mat2x2.hpp [new file with mode: 0644]
include/glm/mat2x3.hpp [new file with mode: 0644]
include/glm/mat2x4.hpp [new file with mode: 0644]
include/glm/mat3x2.hpp [new file with mode: 0644]
include/glm/mat3x3.hpp [new file with mode: 0644]
include/glm/mat3x4.hpp [new file with mode: 0644]
include/glm/mat4x2.hpp [new file with mode: 0644]
include/glm/mat4x3.hpp [new file with mode: 0644]
include/glm/mat4x4.hpp [new file with mode: 0644]
include/glm/matrix.hpp [new file with mode: 0644]
include/glm/packing.hpp [new file with mode: 0644]
include/glm/trigonometric.hpp [new file with mode: 0644]
include/glm/vec2.hpp [new file with mode: 0644]
include/glm/vec3.hpp [new file with mode: 0644]
include/glm/vec4.hpp [new file with mode: 0644]
include/glm/vector_relational.hpp [new file with mode: 0644]
include/zconf.h [new file with mode: 0644]
include/zlib.h [new file with mode: 0644]
lib/FreeImage.lib [new file with mode: 0644]
lib/freetype-bcc.lib [new file with mode: 0644]
lib/freetype.lib [new file with mode: 0644]
lib/x64/SDL2.dll [new file with mode: 0644]
lib/x64/SDL2.lib [new file with mode: 0644]
lib/x64/SDL2main.lib [new file with mode: 0644]
lib/x64/SDL2test.lib [new file with mode: 0644]
lib/x64/assimp.lib [new file with mode: 0644]
lib/x64/glew32.lib [new file with mode: 0644]
lib/x64/glew32s.lib [new file with mode: 0644]
lib/x86/SDL2.dll [new file with mode: 0644]
lib/x86/SDL2.lib [new file with mode: 0644]
lib/x86/SDL2main.lib [new file with mode: 0644]
lib/x86/SDL2test.lib [new file with mode: 0644]
lib/x86/assimp.lib [new file with mode: 0644]
lib/x86/glew32.lib [new file with mode: 0644]
lib/x86/glew32s.lib [new file with mode: 0644]
lib/zdll.lib [new file with mode: 0644]

diff --git a/.gitignore b/.gitignore
new file mode 100644 (file)
index 0000000..c25df7c
--- /dev/null
@@ -0,0 +1,14 @@
+
+# Visual Studio Exclusions
+*.sdf
+*.suo
+*.user
+*.opensdf
+build-*
+
+bin
+Submission*
+
+Debug
+RES
+*.[Cc]ache
\ No newline at end of file
diff --git a/CGUE2015_Weave.sln b/CGUE2015_Weave.sln
new file mode 100644 (file)
index 0000000..7475201
--- /dev/null
@@ -0,0 +1,22 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 2013
+VisualStudioVersion = 12.0.31101.0
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Weave", "Weave\Weave.vcxproj", "{A2F0B06D-880C-4B90-9D4B-8B174418E1BE}"
+EndProject
+Global
+       GlobalSection(SolutionConfigurationPlatforms) = preSolution
+               Debug|Win32 = Debug|Win32
+               Release|Win32 = Release|Win32
+       EndGlobalSection
+       GlobalSection(ProjectConfigurationPlatforms) = postSolution
+               {A2F0B06D-880C-4B90-9D4B-8B174418E1BE}.Debug|Win32.ActiveCfg = Debug|Win32
+               {A2F0B06D-880C-4B90-9D4B-8B174418E1BE}.Debug|Win32.Build.0 = Debug|Win32
+               {A2F0B06D-880C-4B90-9D4B-8B174418E1BE}.Release|Win32.ActiveCfg = bin|Win32
+               {A2F0B06D-880C-4B90-9D4B-8B174418E1BE}.Release|Win32.Build.0 = bin|Win32
+       EndGlobalSection
+       GlobalSection(SolutionProperties) = preSolution
+               HideSolutionNode = FALSE
+       EndGlobalSection
+EndGlobal
diff --git a/Weave/Weave.vcxproj b/Weave/Weave.vcxproj
new file mode 100644 (file)
index 0000000..ea1e2f1
--- /dev/null
@@ -0,0 +1,91 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="bin|Win32">
+      <Configuration>bin</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{A2F0B06D-880C-4B90-9D4B-8B174418E1BE}</ProjectGuid>
+    <Keyword>Win32Proj</Keyword>
+    <RootNamespace>Weave</RootNamespace>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <UseDebugLibraries>true</UseDebugLibraries>
+    <PlatformToolset>v120</PlatformToolset>
+    <CharacterSet>Unicode</CharacterSet>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='bin|Win32'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <UseDebugLibraries>false</UseDebugLibraries>
+    <PlatformToolset>v120</PlatformToolset>
+    <WholeProgramOptimization>true</WholeProgramOptimization>
+    <CharacterSet>Unicode</CharacterSet>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <ImportGroup Label="ExtensionSettings">
+  </ImportGroup>
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='bin|Win32'">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+    <LinkIncremental>true</LinkIncremental>
+    <IntDir>$(SolutionDir)build-$(Configuration)-$(ProjectName)\</IntDir>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='bin|Win32'">
+    <LinkIncremental>false</LinkIncremental>
+    <IntDir>$(SolutionDir)build-$(Configuration)-$(ProjectName)\</IntDir>
+  </PropertyGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+    <ClCompile>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <WarningLevel>Level3</WarningLevel>
+      <Optimization>Disabled</Optimization>
+      <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories>$(SolutionDir)include;$(SolutionDir)include/freetype2</AdditionalIncludeDirectories>
+    </ClCompile>
+    <Link>
+      <SubSystem>Console</SubSystem>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <AdditionalLibraryDirectories>$(SolutionDir)lib\$(PlatformTarget);$(SolutionDir)lib</AdditionalLibraryDirectories>
+      <AdditionalDependencies>OpenGL32.lib;SDL2.lib;SDL2main.lib;freetype.lib;zdll.lib;glew32.lib;FreeImage.lib;assimp.lib</AdditionalDependencies>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='bin|Win32'">
+    <ClCompile>
+      <WarningLevel>Level3</WarningLevel>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <Optimization>MaxSpeed</Optimization>
+      <FunctionLevelLinking>true</FunctionLevelLinking>
+      <IntrinsicFunctions>true</IntrinsicFunctions>
+      <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories>$(SolutionDir)include;$(SolutionDir)include/freetype2</AdditionalIncludeDirectories>
+    </ClCompile>
+    <Link>
+      <SubSystem>Console</SubSystem>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <EnableCOMDATFolding>true</EnableCOMDATFolding>
+      <OptimizeReferences>true</OptimizeReferences>
+      <AdditionalLibraryDirectories>$(SolutionDir)lib\$(PlatformTarget);$(SolutionDir)lib</AdditionalLibraryDirectories>
+      <AdditionalDependencies>OpenGL32.lib;SDL2.lib;SDL2main.lib;freetype.lib;zdll.lib;glew32.lib;FreeImage.lib;assimp.lib</AdditionalDependencies>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
+</Project>
\ No newline at end of file
diff --git a/Weave/Weave.vcxproj.filters b/Weave/Weave.vcxproj.filters
new file mode 100644 (file)
index 0000000..6a1782f
--- /dev/null
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup>
+    <Filter Include="Source Files">
+      <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+      <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+    </Filter>
+    <Filter Include="Header Files">
+      <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
+      <Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
+    </Filter>
+    <Filter Include="Resource Files">
+      <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
+      <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
+    </Filter>
+  </ItemGroup>
+</Project>
\ No newline at end of file
diff --git a/include/FreeImage.h b/include/FreeImage.h
new file mode 100644 (file)
index 0000000..2755160
--- /dev/null
@@ -0,0 +1,1122 @@
+// ==========================================================
+// FreeImage 3
+//
+// Design and implementation by
+// - Floris van den Berg (flvdberg@wxs.nl)
+// - Hervé Drolon (drolon@infonie.fr)
+//
+// Contributors:
+// - see changes log named 'Whatsnew.txt', see header of each .h and .cpp file
+//
+// This file is part of FreeImage 3
+//
+// COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY
+// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES
+// THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE
+// OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED
+// CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT
+// THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY
+// SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL
+// PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER
+// THIS DISCLAIMER.
+//
+// Use at your own risk!
+// ==========================================================
+
+#ifndef FREEIMAGE_H
+#define FREEIMAGE_H
+
+// Version information ------------------------------------------------------
+
+#define FREEIMAGE_MAJOR_VERSION   3
+#define FREEIMAGE_MINOR_VERSION   16
+#define FREEIMAGE_RELEASE_SERIAL  0
+
+// Compiler options ---------------------------------------------------------
+
+#include <wchar.h>     // needed for UNICODE functions
+
+#if defined(FREEIMAGE_LIB)
+       #define DLL_API
+       #define DLL_CALLCONV
+#else
+       #if defined(_WIN32) || defined(__WIN32__)
+               #define DLL_CALLCONV __stdcall
+               // The following ifdef block is the standard way of creating macros which make exporting 
+               // from a DLL simpler. All files within this DLL are compiled with the FREEIMAGE_EXPORTS
+               // symbol defined on the command line. this symbol should not be defined on any project
+               // that uses this DLL. This way any other project whose source files include this file see 
+               // DLL_API functions as being imported from a DLL, wheras this DLL sees symbols
+               // defined with this macro as being exported.
+               #ifdef FREEIMAGE_EXPORTS
+                       #define DLL_API __declspec(dllexport)
+               #else
+                       #define DLL_API __declspec(dllimport)
+               #endif // FREEIMAGE_EXPORTS
+       #else 
+               // try the gcc visibility support (see http://gcc.gnu.org/wiki/Visibility)
+               #if defined(__GNUC__) && ((__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
+                       #ifndef GCC_HASCLASSVISIBILITY
+                               #define GCC_HASCLASSVISIBILITY
+                       #endif
+               #endif // __GNUC__
+               #define DLL_CALLCONV
+               #if defined(GCC_HASCLASSVISIBILITY)
+                       #define DLL_API __attribute__ ((visibility("default")))
+               #else
+                       #define DLL_API
+               #endif          
+       #endif // WIN32 / !WIN32
+#endif // FREEIMAGE_LIB
+
+// Some versions of gcc may have BYTE_ORDER or __BYTE_ORDER defined
+// If your big endian system isn't being detected, add an OS specific check
+#if (defined(BYTE_ORDER) && BYTE_ORDER==BIG_ENDIAN) || \
+       (defined(__BYTE_ORDER) && __BYTE_ORDER==__BIG_ENDIAN) || \
+       defined(__BIG_ENDIAN__)
+#define FREEIMAGE_BIGENDIAN
+#endif // BYTE_ORDER
+
+// This really only affects 24 and 32 bit formats, the rest are always RGB order.
+#define FREEIMAGE_COLORORDER_BGR       0
+#define FREEIMAGE_COLORORDER_RGB       1
+#if defined(FREEIMAGE_BIGENDIAN)
+#define FREEIMAGE_COLORORDER FREEIMAGE_COLORORDER_RGB
+#else
+#define FREEIMAGE_COLORORDER FREEIMAGE_COLORORDER_BGR
+#endif
+
+// Ensure 4-byte enums if we're using Borland C++ compilers
+#if defined(__BORLANDC__)
+#pragma option push -b
+#endif
+
+// For C compatibility --------------------------------------------------------
+
+#ifdef __cplusplus
+#define FI_DEFAULT(x)  = x
+#define FI_ENUM(x)      enum x
+#define FI_STRUCT(x)   struct x
+#else
+#define FI_DEFAULT(x)
+#define FI_ENUM(x)      typedef int x; enum x
+#define FI_STRUCT(x)   typedef struct x x; struct x
+#endif
+
+// Bitmap types -------------------------------------------------------------
+
+FI_STRUCT (FIBITMAP) { void *data; };
+FI_STRUCT (FIMULTIBITMAP) { void *data; };
+
+// Types used in the library (directly copied from Windows) -----------------
+
+#if defined(__MINGW32__) && defined(_WINDOWS_H)
+#define _WINDOWS_      // prevent a bug in MinGW32
+#endif // __MINGW32__
+
+#ifndef _WINDOWS_
+#define _WINDOWS_
+
+#ifndef FALSE
+#define FALSE 0
+#endif
+#ifndef TRUE
+#define TRUE 1
+#endif
+#ifndef NULL
+#define NULL 0
+#endif
+
+#ifndef SEEK_SET
+#define SEEK_SET  0
+#define SEEK_CUR  1
+#define SEEK_END  2
+#endif
+
+#ifndef _MSC_VER
+// define portable types for 32-bit / 64-bit OS
+#include <inttypes.h>
+typedef int32_t BOOL;
+typedef uint8_t BYTE;
+typedef uint16_t WORD;
+typedef uint32_t DWORD;
+typedef int32_t LONG;
+typedef int64_t INT64;
+typedef uint64_t UINT64;
+#else
+// MS is not C99 ISO compliant
+typedef long BOOL;
+typedef unsigned char BYTE;
+typedef unsigned short WORD;
+typedef unsigned long DWORD;
+typedef long LONG;
+typedef signed __int64 INT64;
+typedef unsigned __int64 UINT64;
+#endif // _MSC_VER
+
+#if (defined(_WIN32) || defined(__WIN32__))
+#pragma pack(push, 1)
+#else
+#pragma pack(1)
+#endif // WIN32
+
+typedef struct tagRGBQUAD {
+#if FREEIMAGE_COLORORDER == FREEIMAGE_COLORORDER_BGR
+  BYTE rgbBlue;
+  BYTE rgbGreen;
+  BYTE rgbRed;
+#else
+  BYTE rgbRed;
+  BYTE rgbGreen;
+  BYTE rgbBlue;
+#endif // FREEIMAGE_COLORORDER
+  BYTE rgbReserved;
+} RGBQUAD;
+
+typedef struct tagRGBTRIPLE {
+#if FREEIMAGE_COLORORDER == FREEIMAGE_COLORORDER_BGR
+  BYTE rgbtBlue;
+  BYTE rgbtGreen;
+  BYTE rgbtRed;
+#else
+  BYTE rgbtRed;
+  BYTE rgbtGreen;
+  BYTE rgbtBlue;
+#endif // FREEIMAGE_COLORORDER
+} RGBTRIPLE;
+
+#if (defined(_WIN32) || defined(__WIN32__))
+#pragma pack(pop)
+#else
+#pragma pack()
+#endif // WIN32
+
+typedef struct tagBITMAPINFOHEADER{
+  DWORD biSize;
+  LONG  biWidth; 
+  LONG  biHeight; 
+  WORD  biPlanes; 
+  WORD  biBitCount;
+  DWORD biCompression; 
+  DWORD biSizeImage; 
+  LONG  biXPelsPerMeter; 
+  LONG  biYPelsPerMeter; 
+  DWORD biClrUsed; 
+  DWORD biClrImportant;
+} BITMAPINFOHEADER, *PBITMAPINFOHEADER; 
+
+typedef struct tagBITMAPINFO { 
+  BITMAPINFOHEADER bmiHeader; 
+  RGBQUAD          bmiColors[1];
+} BITMAPINFO, *PBITMAPINFO;
+
+#endif // _WINDOWS_
+
+// Types used in the library (specific to FreeImage) ------------------------
+
+#if (defined(_WIN32) || defined(__WIN32__))
+#pragma pack(push, 1)
+#else
+#pragma pack(1)
+#endif // WIN32
+
+/** 48-bit RGB 
+*/
+typedef struct tagFIRGB16 {
+       WORD red;
+       WORD green;
+       WORD blue;
+} FIRGB16;
+
+/** 64-bit RGBA
+*/
+typedef struct tagFIRGBA16 {
+       WORD red;
+       WORD green;
+       WORD blue;
+       WORD alpha;
+} FIRGBA16;
+
+/** 96-bit RGB Float
+*/
+typedef struct tagFIRGBF {
+       float red;
+       float green;
+       float blue;
+} FIRGBF;
+
+/** 128-bit RGBA Float
+*/
+typedef struct tagFIRGBAF {
+       float red;
+       float green;
+       float blue;
+       float alpha;
+} FIRGBAF;
+
+/** Data structure for COMPLEX type (complex number)
+*/
+typedef struct tagFICOMPLEX {
+    /// real part
+       double r;
+       /// imaginary part
+    double i;
+} FICOMPLEX;
+
+#if (defined(_WIN32) || defined(__WIN32__))
+#pragma pack(pop)
+#else
+#pragma pack()
+#endif // WIN32
+
+// Indexes for byte arrays, masks and shifts for treating pixels as words ---
+// These coincide with the order of RGBQUAD and RGBTRIPLE -------------------
+
+#ifndef FREEIMAGE_BIGENDIAN
+#if FREEIMAGE_COLORORDER == FREEIMAGE_COLORORDER_BGR
+// Little Endian (x86 / MS Windows, Linux) : BGR(A) order
+#define FI_RGBA_RED                            2
+#define FI_RGBA_GREEN                  1
+#define FI_RGBA_BLUE                   0
+#define FI_RGBA_ALPHA                  3
+#define FI_RGBA_RED_MASK               0x00FF0000
+#define FI_RGBA_GREEN_MASK             0x0000FF00
+#define FI_RGBA_BLUE_MASK              0x000000FF
+#define FI_RGBA_ALPHA_MASK             0xFF000000
+#define FI_RGBA_RED_SHIFT              16
+#define FI_RGBA_GREEN_SHIFT            8
+#define FI_RGBA_BLUE_SHIFT             0
+#define FI_RGBA_ALPHA_SHIFT            24
+#else
+// Little Endian (x86 / MaxOSX) : RGB(A) order
+#define FI_RGBA_RED                            0
+#define FI_RGBA_GREEN                  1
+#define FI_RGBA_BLUE                   2
+#define FI_RGBA_ALPHA                  3
+#define FI_RGBA_RED_MASK               0x000000FF
+#define FI_RGBA_GREEN_MASK             0x0000FF00
+#define FI_RGBA_BLUE_MASK              0x00FF0000
+#define FI_RGBA_ALPHA_MASK             0xFF000000
+#define FI_RGBA_RED_SHIFT              0
+#define FI_RGBA_GREEN_SHIFT            8
+#define FI_RGBA_BLUE_SHIFT             16
+#define FI_RGBA_ALPHA_SHIFT            24
+#endif // FREEIMAGE_COLORORDER
+#else
+#if FREEIMAGE_COLORORDER == FREEIMAGE_COLORORDER_BGR
+// Big Endian (PPC / none) : BGR(A) order
+#define FI_RGBA_RED                            2
+#define FI_RGBA_GREEN                  1
+#define FI_RGBA_BLUE                   0
+#define FI_RGBA_ALPHA                  3
+#define FI_RGBA_RED_MASK               0x0000FF00
+#define FI_RGBA_GREEN_MASK             0x00FF0000
+#define FI_RGBA_BLUE_MASK              0xFF000000
+#define FI_RGBA_ALPHA_MASK             0x000000FF
+#define FI_RGBA_RED_SHIFT              8
+#define FI_RGBA_GREEN_SHIFT            16
+#define FI_RGBA_BLUE_SHIFT             24
+#define FI_RGBA_ALPHA_SHIFT            0
+#else
+// Big Endian (PPC / Linux, MaxOSX) : RGB(A) order
+#define FI_RGBA_RED                            0
+#define FI_RGBA_GREEN                  1
+#define FI_RGBA_BLUE                   2
+#define FI_RGBA_ALPHA                  3
+#define FI_RGBA_RED_MASK               0xFF000000
+#define FI_RGBA_GREEN_MASK             0x00FF0000
+#define FI_RGBA_BLUE_MASK              0x0000FF00
+#define FI_RGBA_ALPHA_MASK             0x000000FF
+#define FI_RGBA_RED_SHIFT              24
+#define FI_RGBA_GREEN_SHIFT            16
+#define FI_RGBA_BLUE_SHIFT             8
+#define FI_RGBA_ALPHA_SHIFT            0
+#endif // FREEIMAGE_COLORORDER
+#endif // FREEIMAGE_BIGENDIAN
+
+#define FI_RGBA_RGB_MASK               (FI_RGBA_RED_MASK|FI_RGBA_GREEN_MASK|FI_RGBA_BLUE_MASK)
+
+// The 16bit macros only include masks and shifts, since each color element is not byte aligned
+
+#define FI16_555_RED_MASK              0x7C00
+#define FI16_555_GREEN_MASK            0x03E0
+#define FI16_555_BLUE_MASK             0x001F
+#define FI16_555_RED_SHIFT             10
+#define FI16_555_GREEN_SHIFT   5
+#define FI16_555_BLUE_SHIFT            0
+#define FI16_565_RED_MASK              0xF800
+#define FI16_565_GREEN_MASK            0x07E0
+#define FI16_565_BLUE_MASK             0x001F
+#define FI16_565_RED_SHIFT             11
+#define FI16_565_GREEN_SHIFT   5
+#define FI16_565_BLUE_SHIFT            0
+
+// ICC profile support ------------------------------------------------------
+
+#define FIICC_DEFAULT                  0x00
+#define FIICC_COLOR_IS_CMYK            0x01
+
+FI_STRUCT (FIICCPROFILE) { 
+       WORD    flags;  // info flag
+       DWORD   size;   // profile's size measured in bytes
+       void   *data;   // points to a block of contiguous memory containing the profile
+};
+
+// Important enums ----------------------------------------------------------
+
+/** I/O image format identifiers.
+*/
+FI_ENUM(FREE_IMAGE_FORMAT) {
+       FIF_UNKNOWN = -1,
+       FIF_BMP         = 0,
+       FIF_ICO         = 1,
+       FIF_JPEG        = 2,
+       FIF_JNG         = 3,
+       FIF_KOALA       = 4,
+       FIF_LBM         = 5,
+       FIF_IFF = FIF_LBM,
+       FIF_MNG         = 6,
+       FIF_PBM         = 7,
+       FIF_PBMRAW      = 8,
+       FIF_PCD         = 9,
+       FIF_PCX         = 10,
+       FIF_PGM         = 11,
+       FIF_PGMRAW      = 12,
+       FIF_PNG         = 13,
+       FIF_PPM         = 14,
+       FIF_PPMRAW      = 15,
+       FIF_RAS         = 16,
+       FIF_TARGA       = 17,
+       FIF_TIFF        = 18,
+       FIF_WBMP        = 19,
+       FIF_PSD         = 20,
+       FIF_CUT         = 21,
+       FIF_XBM         = 22,
+       FIF_XPM         = 23,
+       FIF_DDS         = 24,
+       FIF_GIF     = 25,
+       FIF_HDR         = 26,
+       FIF_FAXG3       = 27,
+       FIF_SGI         = 28,
+       FIF_EXR         = 29,
+       FIF_J2K         = 30,
+       FIF_JP2         = 31,
+       FIF_PFM         = 32,
+       FIF_PICT        = 33,
+       FIF_RAW         = 34,
+       FIF_WEBP        = 35,
+       FIF_JXR         = 36
+};
+
+/** Image type used in FreeImage.
+*/
+FI_ENUM(FREE_IMAGE_TYPE) {
+       FIT_UNKNOWN = 0,        // unknown type
+       FIT_BITMAP  = 1,        // standard image                       : 1-, 4-, 8-, 16-, 24-, 32-bit
+       FIT_UINT16      = 2,    // array of unsigned short      : unsigned 16-bit
+       FIT_INT16       = 3,    // array of short                       : signed 16-bit
+       FIT_UINT32      = 4,    // array of unsigned long       : unsigned 32-bit
+       FIT_INT32       = 5,    // array of long                        : signed 32-bit
+       FIT_FLOAT       = 6,    // array of float                       : 32-bit IEEE floating point
+       FIT_DOUBLE      = 7,    // array of double                      : 64-bit IEEE floating point
+       FIT_COMPLEX     = 8,    // array of FICOMPLEX           : 2 x 64-bit IEEE floating point
+       FIT_RGB16       = 9,    // 48-bit RGB image                     : 3 x 16-bit
+       FIT_RGBA16      = 10,   // 64-bit RGBA image            : 4 x 16-bit
+       FIT_RGBF        = 11,   // 96-bit RGB float image       : 3 x 32-bit IEEE floating point
+       FIT_RGBAF       = 12    // 128-bit RGBA float image     : 4 x 32-bit IEEE floating point
+};
+
+/** Image color type used in FreeImage.
+*/
+FI_ENUM(FREE_IMAGE_COLOR_TYPE) {
+       FIC_MINISWHITE = 0,             // min value is white
+    FIC_MINISBLACK = 1,                // min value is black
+    FIC_RGB        = 2,                // RGB color model
+    FIC_PALETTE    = 3,                // color map indexed
+       FIC_RGBALPHA   = 4,             // RGB color model with alpha channel
+       FIC_CMYK       = 5              // CMYK color model
+};
+
+/** Color quantization algorithms.
+Constants used in FreeImage_ColorQuantize.
+*/
+FI_ENUM(FREE_IMAGE_QUANTIZE) {
+    FIQ_WUQUANT = 0,           // Xiaolin Wu color quantization algorithm
+    FIQ_NNQUANT = 1                    // NeuQuant neural-net quantization algorithm by Anthony Dekker
+};
+
+/** Dithering algorithms.
+Constants used in FreeImage_Dither.
+*/
+FI_ENUM(FREE_IMAGE_DITHER) {
+    FID_FS                     = 0,    // Floyd & Steinberg error diffusion
+       FID_BAYER4x4    = 1,    // Bayer ordered dispersed dot dithering (order 2 dithering matrix)
+       FID_BAYER8x8    = 2,    // Bayer ordered dispersed dot dithering (order 3 dithering matrix)
+       FID_CLUSTER6x6  = 3,    // Ordered clustered dot dithering (order 3 - 6x6 matrix)
+       FID_CLUSTER8x8  = 4,    // Ordered clustered dot dithering (order 4 - 8x8 matrix)
+       FID_CLUSTER16x16= 5,    // Ordered clustered dot dithering (order 8 - 16x16 matrix)
+       FID_BAYER16x16  = 6             // Bayer ordered dispersed dot dithering (order 4 dithering matrix)
+};
+
+/** Lossless JPEG transformations
+Constants used in FreeImage_JPEGTransform
+*/
+FI_ENUM(FREE_IMAGE_JPEG_OPERATION) {
+       FIJPEG_OP_NONE                  = 0,    // no transformation
+       FIJPEG_OP_FLIP_H                = 1,    // horizontal flip
+       FIJPEG_OP_FLIP_V                = 2,    // vertical flip
+       FIJPEG_OP_TRANSPOSE             = 3,    // transpose across UL-to-LR axis
+       FIJPEG_OP_TRANSVERSE    = 4,    // transpose across UR-to-LL axis
+       FIJPEG_OP_ROTATE_90             = 5,    // 90-degree clockwise rotation
+       FIJPEG_OP_ROTATE_180    = 6,    // 180-degree rotation
+       FIJPEG_OP_ROTATE_270    = 7             // 270-degree clockwise (or 90 ccw)
+};
+
+/** Tone mapping operators.
+Constants used in FreeImage_ToneMapping.
+*/
+FI_ENUM(FREE_IMAGE_TMO) {
+    FITMO_DRAGO03       = 0,   // Adaptive logarithmic mapping (F. Drago, 2003)
+       FITMO_REINHARD05 = 1,   // Dynamic range reduction inspired by photoreceptor physiology (E. Reinhard, 2005)
+       FITMO_FATTAL02   = 2    // Gradient domain high dynamic range compression (R. Fattal, 2002)
+};
+
+/** Upsampling / downsampling filters. 
+Constants used in FreeImage_Rescale.
+*/
+FI_ENUM(FREE_IMAGE_FILTER) {
+       FILTER_BOX                = 0,  // Box, pulse, Fourier window, 1st order (constant) b-spline
+       FILTER_BICUBIC    = 1,  // Mitchell & Netravali's two-param cubic filter
+       FILTER_BILINEAR   = 2,  // Bilinear filter
+       FILTER_BSPLINE    = 3,  // 4th order (cubic) b-spline
+       FILTER_CATMULLROM = 4,  // Catmull-Rom spline, Overhauser spline
+       FILTER_LANCZOS3   = 5   // Lanczos3 filter
+};
+
+/** Color channels.
+Constants used in color manipulation routines.
+*/
+FI_ENUM(FREE_IMAGE_COLOR_CHANNEL) {
+       FICC_RGB        = 0,    // Use red, green and blue channels
+       FICC_RED        = 1,    // Use red channel
+       FICC_GREEN      = 2,    // Use green channel
+       FICC_BLUE       = 3,    // Use blue channel
+       FICC_ALPHA      = 4,    // Use alpha channel
+       FICC_BLACK      = 5,    // Use black channel
+       FICC_REAL       = 6,    // Complex images: use real part
+       FICC_IMAG       = 7,    // Complex images: use imaginary part
+       FICC_MAG        = 8,    // Complex images: use magnitude
+       FICC_PHASE      = 9             // Complex images: use phase
+};
+
+// Metadata support ---------------------------------------------------------
+
+/**
+  Tag data type information (based on TIFF specifications)
+
+  Note: RATIONALs are the ratio of two 32-bit integer values.
+*/
+FI_ENUM(FREE_IMAGE_MDTYPE) {
+       FIDT_NOTYPE             = 0,    // placeholder 
+       FIDT_BYTE               = 1,    // 8-bit unsigned integer 
+       FIDT_ASCII              = 2,    // 8-bit bytes w/ last byte null 
+       FIDT_SHORT              = 3,    // 16-bit unsigned integer 
+       FIDT_LONG               = 4,    // 32-bit unsigned integer 
+       FIDT_RATIONAL   = 5,    // 64-bit unsigned fraction 
+       FIDT_SBYTE              = 6,    // 8-bit signed integer 
+       FIDT_UNDEFINED  = 7,    // 8-bit untyped data 
+       FIDT_SSHORT             = 8,    // 16-bit signed integer 
+       FIDT_SLONG              = 9,    // 32-bit signed integer 
+       FIDT_SRATIONAL  = 10,   // 64-bit signed fraction 
+       FIDT_FLOAT              = 11,   // 32-bit IEEE floating point 
+       FIDT_DOUBLE             = 12,   // 64-bit IEEE floating point 
+       FIDT_IFD                = 13,   // 32-bit unsigned integer (offset) 
+       FIDT_PALETTE    = 14,   // 32-bit RGBQUAD 
+       FIDT_LONG8              = 16,   // 64-bit unsigned integer 
+       FIDT_SLONG8             = 17,   // 64-bit signed integer
+       FIDT_IFD8               = 18    // 64-bit unsigned integer (offset)
+};
+
+/**
+  Metadata models supported by FreeImage
+*/
+FI_ENUM(FREE_IMAGE_MDMODEL) {
+       FIMD_NODATA                     = -1,
+       FIMD_COMMENTS           = 0,    // single comment or keywords
+       FIMD_EXIF_MAIN          = 1,    // Exif-TIFF metadata
+       FIMD_EXIF_EXIF          = 2,    // Exif-specific metadata
+       FIMD_EXIF_GPS           = 3,    // Exif GPS metadata
+       FIMD_EXIF_MAKERNOTE = 4,        // Exif maker note metadata
+       FIMD_EXIF_INTEROP       = 5,    // Exif interoperability metadata
+       FIMD_IPTC                       = 6,    // IPTC/NAA metadata
+       FIMD_XMP                        = 7,    // Abobe XMP metadata
+       FIMD_GEOTIFF            = 8,    // GeoTIFF metadata
+       FIMD_ANIMATION          = 9,    // Animation metadata
+       FIMD_CUSTOM                     = 10,   // Used to attach other metadata types to a dib
+       FIMD_EXIF_RAW           = 11    // Exif metadata as a raw buffer
+};
+
+/**
+  Handle to a metadata model
+*/
+FI_STRUCT (FIMETADATA) { void *data; };
+
+/**
+  Handle to a FreeImage tag
+*/
+FI_STRUCT (FITAG) { void *data; };
+
+// File IO routines ---------------------------------------------------------
+
+#ifndef FREEIMAGE_IO
+#define FREEIMAGE_IO
+
+typedef void* fi_handle;
+typedef unsigned (DLL_CALLCONV *FI_ReadProc) (void *buffer, unsigned size, unsigned count, fi_handle handle);
+typedef unsigned (DLL_CALLCONV *FI_WriteProc) (void *buffer, unsigned size, unsigned count, fi_handle handle);
+typedef int (DLL_CALLCONV *FI_SeekProc) (fi_handle handle, long offset, int origin);
+typedef long (DLL_CALLCONV *FI_TellProc) (fi_handle handle);
+
+#if (defined(_WIN32) || defined(__WIN32__))
+#pragma pack(push, 1)
+#else
+#pragma pack(1)
+#endif // WIN32
+
+FI_STRUCT(FreeImageIO) {
+       FI_ReadProc  read_proc;     // pointer to the function used to read data
+    FI_WriteProc write_proc;    // pointer to the function used to write data
+    FI_SeekProc  seek_proc;     // pointer to the function used to seek
+    FI_TellProc  tell_proc;     // pointer to the function used to aquire the current position
+};
+
+#if (defined(_WIN32) || defined(__WIN32__))
+#pragma pack(pop)
+#else
+#pragma pack()
+#endif // WIN32
+
+/**
+Handle to a memory I/O stream
+*/
+FI_STRUCT (FIMEMORY) { void *data; };
+
+#endif // FREEIMAGE_IO
+
+// Plugin routines ----------------------------------------------------------
+
+#ifndef PLUGINS
+#define PLUGINS
+
+typedef const char *(DLL_CALLCONV *FI_FormatProc)(void);
+typedef const char *(DLL_CALLCONV *FI_DescriptionProc)(void);
+typedef const char *(DLL_CALLCONV *FI_ExtensionListProc)(void);
+typedef const char *(DLL_CALLCONV *FI_RegExprProc)(void);
+typedef void *(DLL_CALLCONV *FI_OpenProc)(FreeImageIO *io, fi_handle handle, BOOL read);
+typedef void (DLL_CALLCONV *FI_CloseProc)(FreeImageIO *io, fi_handle handle, void *data);
+typedef int (DLL_CALLCONV *FI_PageCountProc)(FreeImageIO *io, fi_handle handle, void *data);
+typedef int (DLL_CALLCONV *FI_PageCapabilityProc)(FreeImageIO *io, fi_handle handle, void *data);
+typedef FIBITMAP *(DLL_CALLCONV *FI_LoadProc)(FreeImageIO *io, fi_handle handle, int page, int flags, void *data);
+typedef BOOL (DLL_CALLCONV *FI_SaveProc)(FreeImageIO *io, FIBITMAP *dib, fi_handle handle, int page, int flags, void *data);
+typedef BOOL (DLL_CALLCONV *FI_ValidateProc)(FreeImageIO *io, fi_handle handle);
+typedef const char *(DLL_CALLCONV *FI_MimeProc)(void);
+typedef BOOL (DLL_CALLCONV *FI_SupportsExportBPPProc)(int bpp);
+typedef BOOL (DLL_CALLCONV *FI_SupportsExportTypeProc)(FREE_IMAGE_TYPE type);
+typedef BOOL (DLL_CALLCONV *FI_SupportsICCProfilesProc)(void);
+typedef BOOL (DLL_CALLCONV *FI_SupportsNoPixelsProc)(void);
+
+FI_STRUCT (Plugin) {
+       FI_FormatProc format_proc;
+       FI_DescriptionProc description_proc;
+       FI_ExtensionListProc extension_proc;
+       FI_RegExprProc regexpr_proc;
+       FI_OpenProc open_proc;
+       FI_CloseProc close_proc;
+       FI_PageCountProc pagecount_proc;
+       FI_PageCapabilityProc pagecapability_proc;
+       FI_LoadProc load_proc;
+       FI_SaveProc save_proc;
+       FI_ValidateProc validate_proc;
+       FI_MimeProc mime_proc;
+       FI_SupportsExportBPPProc supports_export_bpp_proc;
+       FI_SupportsExportTypeProc supports_export_type_proc;
+       FI_SupportsICCProfilesProc supports_icc_profiles_proc;
+       FI_SupportsNoPixelsProc supports_no_pixels_proc;
+};
+
+typedef void (DLL_CALLCONV *FI_InitProc)(Plugin *plugin, int format_id);
+
+#endif // PLUGINS
+
+
+// Load / Save flag constants -----------------------------------------------
+
+#define FIF_LOAD_NOPIXELS 0x8000       //! loading: load the image header only (not supported by all plugins, default to full loading)
+
+#define BMP_DEFAULT         0
+#define BMP_SAVE_RLE        1
+#define CUT_DEFAULT         0
+#define DDS_DEFAULT                    0
+#define EXR_DEFAULT                    0               //! save data as half with piz-based wavelet compression
+#define EXR_FLOAT                      0x0001  //! save data as float instead of as half (not recommended)
+#define EXR_NONE                       0x0002  //! save with no compression
+#define EXR_ZIP                                0x0004  //! save with zlib compression, in blocks of 16 scan lines
+#define EXR_PIZ                                0x0008  //! save with piz-based wavelet compression
+#define EXR_PXR24                      0x0010  //! save with lossy 24-bit float compression
+#define EXR_B44                                0x0020  //! save with lossy 44% float compression - goes to 22% when combined with EXR_LC
+#define EXR_LC                         0x0040  //! save images with one luminance and two chroma channels, rather than as RGB (lossy compression)
+#define FAXG3_DEFAULT          0
+#define GIF_DEFAULT                    0
+#define GIF_LOAD256                    1               //! load the image as a 256 color image with ununsed palette entries, if it's 16 or 2 color
+#define GIF_PLAYBACK           2               //! 'Play' the GIF to generate each frame (as 32bpp) instead of returning raw frame data when loading
+#define HDR_DEFAULT                    0
+#define ICO_DEFAULT         0
+#define ICO_MAKEALPHA          1               //! convert to 32bpp and create an alpha channel from the AND-mask when loading
+#define IFF_DEFAULT         0
+#define J2K_DEFAULT                    0               //! save with a 16:1 rate
+#define JP2_DEFAULT                    0               //! save with a 16:1 rate
+#define JPEG_DEFAULT        0          //! loading (see JPEG_FAST); saving (see JPEG_QUALITYGOOD|JPEG_SUBSAMPLING_420)
+#define JPEG_FAST           0x0001     //! load the file as fast as possible, sacrificing some quality
+#define JPEG_ACCURATE       0x0002     //! load the file with the best quality, sacrificing some speed
+#define JPEG_CMYK                      0x0004  //! load separated CMYK "as is" (use | to combine with other load flags)
+#define JPEG_EXIFROTATE                0x0008  //! load and rotate according to Exif 'Orientation' tag if available
+#define JPEG_GREYSCALE         0x0010  //! load and convert to a 8-bit greyscale image
+#define JPEG_QUALITYSUPERB  0x80       //! save with superb quality (100:1)
+#define JPEG_QUALITYGOOD    0x0100     //! save with good quality (75:1)
+#define JPEG_QUALITYNORMAL  0x0200     //! save with normal quality (50:1)
+#define JPEG_QUALITYAVERAGE 0x0400     //! save with average quality (25:1)
+#define JPEG_QUALITYBAD     0x0800     //! save with bad quality (10:1)
+#define JPEG_PROGRESSIVE       0x2000  //! save as a progressive-JPEG (use | to combine with other save flags)
+#define JPEG_SUBSAMPLING_411 0x1000            //! save with high 4x1 chroma subsampling (4:1:1) 
+#define JPEG_SUBSAMPLING_420 0x4000            //! save with medium 2x2 medium chroma subsampling (4:2:0) - default value
+#define JPEG_SUBSAMPLING_422 0x8000            //! save with low 2x1 chroma subsampling (4:2:2) 
+#define JPEG_SUBSAMPLING_444 0x10000   //! save with no chroma subsampling (4:4:4)
+#define JPEG_OPTIMIZE          0x20000         //! on saving, compute optimal Huffman coding tables (can reduce a few percent of file size)
+#define JPEG_BASELINE          0x40000         //! save basic JPEG, without metadata or any markers
+#define KOALA_DEFAULT       0
+#define LBM_DEFAULT         0
+#define MNG_DEFAULT         0
+#define PCD_DEFAULT         0
+#define PCD_BASE            1          //! load the bitmap sized 768 x 512
+#define PCD_BASEDIV4        2          //! load the bitmap sized 384 x 256
+#define PCD_BASEDIV16       3          //! load the bitmap sized 192 x 128
+#define PCX_DEFAULT         0
+#define PFM_DEFAULT         0
+#define PICT_DEFAULT        0
+#define PNG_DEFAULT         0
+#define PNG_IGNOREGAMMA                1               //! loading: avoid gamma correction
+#define PNG_Z_BEST_SPEED                       0x0001  //! save using ZLib level 1 compression flag (default value is 6)
+#define PNG_Z_DEFAULT_COMPRESSION      0x0006  //! save using ZLib level 6 compression flag (default recommended value)
+#define PNG_Z_BEST_COMPRESSION         0x0009  //! save using ZLib level 9 compression flag (default value is 6)
+#define PNG_Z_NO_COMPRESSION           0x0100  //! save without ZLib compression
+#define PNG_INTERLACED                         0x0200  //! save using Adam7 interlacing (use | to combine with other save flags)
+#define PNM_DEFAULT         0
+#define PNM_SAVE_RAW        0       //! if set the writer saves in RAW format (i.e. P4, P5 or P6)
+#define PNM_SAVE_ASCII      1       //! if set the writer saves in ASCII format (i.e. P1, P2 or P3)
+#define PSD_DEFAULT         0
+#define PSD_CMYK                       1               //! reads tags for separated CMYK (default is conversion to RGB)
+#define PSD_LAB                                2               //! reads tags for CIELab (default is conversion to RGB)
+#define RAS_DEFAULT         0
+#define RAW_DEFAULT         0          //! load the file as linear RGB 48-bit
+#define RAW_PREVIEW                    1               //! try to load the embedded JPEG preview with included Exif Data or default to RGB 24-bit
+#define RAW_DISPLAY                    2               //! load the file as RGB 24-bit
+#define RAW_HALFSIZE           4               //! output a half-size color image
+#define SGI_DEFAULT                    0
+#define TARGA_DEFAULT       0
+#define TARGA_LOAD_RGB888   1       //! if set the loader converts RGB555 and ARGB8888 -> RGB888.
+#define TARGA_SAVE_RLE         2               //! if set, the writer saves with RLE compression
+#define TIFF_DEFAULT        0
+#define TIFF_CMYK                      0x0001  //! reads/stores tags for separated CMYK (use | to combine with compression flags)
+#define TIFF_PACKBITS       0x0100  //! save using PACKBITS compression
+#define TIFF_DEFLATE        0x0200  //! save using DEFLATE compression (a.k.a. ZLIB compression)
+#define TIFF_ADOBE_DEFLATE  0x0400  //! save using ADOBE DEFLATE compression
+#define TIFF_NONE           0x0800  //! save without any compression
+#define TIFF_CCITTFAX3         0x1000  //! save using CCITT Group 3 fax encoding
+#define TIFF_CCITTFAX4         0x2000  //! save using CCITT Group 4 fax encoding
+#define TIFF_LZW                       0x4000  //! save using LZW compression
+#define TIFF_JPEG                      0x8000  //! save using JPEG compression
+#define TIFF_LOGLUV                    0x10000 //! save using LogLuv compression
+#define WBMP_DEFAULT        0
+#define XBM_DEFAULT                    0
+#define XPM_DEFAULT                    0
+#define WEBP_DEFAULT           0               //! save with good quality (75:1)
+#define WEBP_LOSSLESS          0x100   //! save in lossless mode
+#define JXR_DEFAULT                    0               //! save with quality 80 and no chroma subsampling (4:4:4)
+#define JXR_LOSSLESS           0x0064  //! save lossless
+#define JXR_PROGRESSIVE                0x2000  //! save as a progressive-JXR (use | to combine with other save flags)
+
+// Background filling options ---------------------------------------------------------
+// Constants used in FreeImage_FillBackground and FreeImage_EnlargeCanvas
+
+#define FI_COLOR_IS_RGB_COLOR                  0x00    // RGBQUAD color is a RGB color (contains no valid alpha channel)
+#define FI_COLOR_IS_RGBA_COLOR                 0x01    // RGBQUAD color is a RGBA color (contains a valid alpha channel)
+#define FI_COLOR_FIND_EQUAL_COLOR              0x02    // For palettized images: lookup equal RGB color from palette
+#define FI_COLOR_ALPHA_IS_INDEX                        0x04    // The color's rgbReserved member (alpha) contains the palette index to be used
+#define FI_COLOR_PALETTE_SEARCH_MASK   (FI_COLOR_FIND_EQUAL_COLOR | FI_COLOR_ALPHA_IS_INDEX)   // No color lookup is performed
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+// Init / Error routines ----------------------------------------------------
+
+DLL_API void DLL_CALLCONV FreeImage_Initialise(BOOL load_local_plugins_only FI_DEFAULT(FALSE));
+DLL_API void DLL_CALLCONV FreeImage_DeInitialise(void);
+
+// Version routines ---------------------------------------------------------
+
+DLL_API const char *DLL_CALLCONV FreeImage_GetVersion(void);
+DLL_API const char *DLL_CALLCONV FreeImage_GetCopyrightMessage(void);
+
+// Message output functions -------------------------------------------------
+
+typedef void (*FreeImage_OutputMessageFunction)(FREE_IMAGE_FORMAT fif, const char *msg);
+typedef void (DLL_CALLCONV *FreeImage_OutputMessageFunctionStdCall)(FREE_IMAGE_FORMAT fif, const char *msg); 
+
+DLL_API void DLL_CALLCONV FreeImage_SetOutputMessageStdCall(FreeImage_OutputMessageFunctionStdCall omf); 
+DLL_API void DLL_CALLCONV FreeImage_SetOutputMessage(FreeImage_OutputMessageFunction omf);
+DLL_API void DLL_CALLCONV FreeImage_OutputMessageProc(int fif, const char *fmt, ...);
+
+// Allocate / Clone / Unload routines ---------------------------------------
+
+DLL_API FIBITMAP *DLL_CALLCONV FreeImage_Allocate(int width, int height, int bpp, unsigned red_mask FI_DEFAULT(0), unsigned green_mask FI_DEFAULT(0), unsigned blue_mask FI_DEFAULT(0));
+DLL_API FIBITMAP *DLL_CALLCONV FreeImage_AllocateT(FREE_IMAGE_TYPE type, int width, int height, int bpp FI_DEFAULT(8), unsigned red_mask FI_DEFAULT(0), unsigned green_mask FI_DEFAULT(0), unsigned blue_mask FI_DEFAULT(0));
+DLL_API FIBITMAP * DLL_CALLCONV FreeImage_Clone(FIBITMAP *dib);
+DLL_API void DLL_CALLCONV FreeImage_Unload(FIBITMAP *dib);
+
+// Header loading routines
+DLL_API BOOL DLL_CALLCONV FreeImage_HasPixels(FIBITMAP *dib);
+
+// Load / Save routines -----------------------------------------------------
+
+DLL_API FIBITMAP *DLL_CALLCONV FreeImage_Load(FREE_IMAGE_FORMAT fif, const char *filename, int flags FI_DEFAULT(0));
+DLL_API FIBITMAP *DLL_CALLCONV FreeImage_LoadU(FREE_IMAGE_FORMAT fif, const wchar_t *filename, int flags FI_DEFAULT(0));
+DLL_API FIBITMAP *DLL_CALLCONV FreeImage_LoadFromHandle(FREE_IMAGE_FORMAT fif, FreeImageIO *io, fi_handle handle, int flags FI_DEFAULT(0));
+DLL_API BOOL DLL_CALLCONV FreeImage_Save(FREE_IMAGE_FORMAT fif, FIBITMAP *dib, const char *filename, int flags FI_DEFAULT(0));
+DLL_API BOOL DLL_CALLCONV FreeImage_SaveU(FREE_IMAGE_FORMAT fif, FIBITMAP *dib, const wchar_t *filename, int flags FI_DEFAULT(0));
+DLL_API BOOL DLL_CALLCONV FreeImage_SaveToHandle(FREE_IMAGE_FORMAT fif, FIBITMAP *dib, FreeImageIO *io, fi_handle handle, int flags FI_DEFAULT(0));
+
+// Memory I/O stream routines -----------------------------------------------
+
+DLL_API FIMEMORY *DLL_CALLCONV FreeImage_OpenMemory(BYTE *data FI_DEFAULT(0), DWORD size_in_bytes FI_DEFAULT(0));
+DLL_API void DLL_CALLCONV FreeImage_CloseMemory(FIMEMORY *stream);
+DLL_API FIBITMAP *DLL_CALLCONV FreeImage_LoadFromMemory(FREE_IMAGE_FORMAT fif, FIMEMORY *stream, int flags FI_DEFAULT(0));
+DLL_API BOOL DLL_CALLCONV FreeImage_SaveToMemory(FREE_IMAGE_FORMAT fif, FIBITMAP *dib, FIMEMORY *stream, int flags FI_DEFAULT(0));
+DLL_API long DLL_CALLCONV FreeImage_TellMemory(FIMEMORY *stream);
+DLL_API BOOL DLL_CALLCONV FreeImage_SeekMemory(FIMEMORY *stream, long offset, int origin);
+DLL_API BOOL DLL_CALLCONV FreeImage_AcquireMemory(FIMEMORY *stream, BYTE **data, DWORD *size_in_bytes);
+DLL_API unsigned DLL_CALLCONV FreeImage_ReadMemory(void *buffer, unsigned size, unsigned count, FIMEMORY *stream);
+DLL_API unsigned DLL_CALLCONV FreeImage_WriteMemory(const void *buffer, unsigned size, unsigned count, FIMEMORY *stream);
+
+DLL_API FIMULTIBITMAP *DLL_CALLCONV FreeImage_LoadMultiBitmapFromMemory(FREE_IMAGE_FORMAT fif, FIMEMORY *stream, int flags FI_DEFAULT(0));
+DLL_API BOOL DLL_CALLCONV FreeImage_SaveMultiBitmapToMemory(FREE_IMAGE_FORMAT fif, FIMULTIBITMAP *bitmap, FIMEMORY *stream, int flags);
+
+// Plugin Interface ---------------------------------------------------------
+
+DLL_API FREE_IMAGE_FORMAT DLL_CALLCONV FreeImage_RegisterLocalPlugin(FI_InitProc proc_address, const char *format FI_DEFAULT(0), const char *description FI_DEFAULT(0), const char *extension FI_DEFAULT(0), const char *regexpr FI_DEFAULT(0));
+DLL_API FREE_IMAGE_FORMAT DLL_CALLCONV FreeImage_RegisterExternalPlugin(const char *path, const char *format FI_DEFAULT(0), const char *description FI_DEFAULT(0), const char *extension FI_DEFAULT(0), const char *regexpr FI_DEFAULT(0));
+DLL_API int DLL_CALLCONV FreeImage_GetFIFCount(void);
+DLL_API int DLL_CALLCONV FreeImage_SetPluginEnabled(FREE_IMAGE_FORMAT fif, BOOL enable);
+DLL_API int DLL_CALLCONV FreeImage_IsPluginEnabled(FREE_IMAGE_FORMAT fif);
+DLL_API FREE_IMAGE_FORMAT DLL_CALLCONV FreeImage_GetFIFFromFormat(const char *format);
+DLL_API FREE_IMAGE_FORMAT DLL_CALLCONV FreeImage_GetFIFFromMime(const char *mime);
+DLL_API const char *DLL_CALLCONV FreeImage_GetFormatFromFIF(FREE_IMAGE_FORMAT fif);
+DLL_API const char *DLL_CALLCONV FreeImage_GetFIFExtensionList(FREE_IMAGE_FORMAT fif);
+DLL_API const char *DLL_CALLCONV FreeImage_GetFIFDescription(FREE_IMAGE_FORMAT fif);
+DLL_API const char *DLL_CALLCONV FreeImage_GetFIFRegExpr(FREE_IMAGE_FORMAT fif);
+DLL_API const char *DLL_CALLCONV FreeImage_GetFIFMimeType(FREE_IMAGE_FORMAT fif);
+DLL_API FREE_IMAGE_FORMAT DLL_CALLCONV FreeImage_GetFIFFromFilename(const char *filename);
+DLL_API FREE_IMAGE_FORMAT DLL_CALLCONV FreeImage_GetFIFFromFilenameU(const wchar_t *filename);
+DLL_API BOOL DLL_CALLCONV FreeImage_FIFSupportsReading(FREE_IMAGE_FORMAT fif);
+DLL_API BOOL DLL_CALLCONV FreeImage_FIFSupportsWriting(FREE_IMAGE_FORMAT fif);
+DLL_API BOOL DLL_CALLCONV FreeImage_FIFSupportsExportBPP(FREE_IMAGE_FORMAT fif, int bpp);
+DLL_API BOOL DLL_CALLCONV FreeImage_FIFSupportsExportType(FREE_IMAGE_FORMAT fif, FREE_IMAGE_TYPE type);
+DLL_API BOOL DLL_CALLCONV FreeImage_FIFSupportsICCProfiles(FREE_IMAGE_FORMAT fif);
+DLL_API BOOL DLL_CALLCONV FreeImage_FIFSupportsNoPixels(FREE_IMAGE_FORMAT fif);
+
+// Multipaging interface ----------------------------------------------------
+
+DLL_API FIMULTIBITMAP * DLL_CALLCONV FreeImage_OpenMultiBitmap(FREE_IMAGE_FORMAT fif, const char *filename, BOOL create_new, BOOL read_only, BOOL keep_cache_in_memory FI_DEFAULT(FALSE), int flags FI_DEFAULT(0));
+DLL_API FIMULTIBITMAP * DLL_CALLCONV FreeImage_OpenMultiBitmapFromHandle(FREE_IMAGE_FORMAT fif, FreeImageIO *io, fi_handle handle, int flags FI_DEFAULT(0));
+DLL_API BOOL DLL_CALLCONV FreeImage_SaveMultiBitmapToHandle(FREE_IMAGE_FORMAT fif, FIMULTIBITMAP *bitmap, FreeImageIO *io, fi_handle handle, int flags FI_DEFAULT(0));
+DLL_API BOOL DLL_CALLCONV FreeImage_CloseMultiBitmap(FIMULTIBITMAP *bitmap, int flags FI_DEFAULT(0));
+DLL_API int DLL_CALLCONV FreeImage_GetPageCount(FIMULTIBITMAP *bitmap);
+DLL_API void DLL_CALLCONV FreeImage_AppendPage(FIMULTIBITMAP *bitmap, FIBITMAP *data);
+DLL_API void DLL_CALLCONV FreeImage_InsertPage(FIMULTIBITMAP *bitmap, int page, FIBITMAP *data);
+DLL_API void DLL_CALLCONV FreeImage_DeletePage(FIMULTIBITMAP *bitmap, int page);
+DLL_API FIBITMAP * DLL_CALLCONV FreeImage_LockPage(FIMULTIBITMAP *bitmap, int page);
+DLL_API void DLL_CALLCONV FreeImage_UnlockPage(FIMULTIBITMAP *bitmap, FIBITMAP *data, BOOL changed);
+DLL_API BOOL DLL_CALLCONV FreeImage_MovePage(FIMULTIBITMAP *bitmap, int target, int source);
+DLL_API BOOL DLL_CALLCONV FreeImage_GetLockedPageNumbers(FIMULTIBITMAP *bitmap, int *pages, int *count);
+
+// Filetype request routines ------------------------------------------------
+
+DLL_API FREE_IMAGE_FORMAT DLL_CALLCONV FreeImage_GetFileType(const char *filename, int size FI_DEFAULT(0));
+DLL_API FREE_IMAGE_FORMAT DLL_CALLCONV FreeImage_GetFileTypeU(const wchar_t *filename, int size FI_DEFAULT(0));
+DLL_API FREE_IMAGE_FORMAT DLL_CALLCONV FreeImage_GetFileTypeFromHandle(FreeImageIO *io, fi_handle handle, int size FI_DEFAULT(0));
+DLL_API FREE_IMAGE_FORMAT DLL_CALLCONV FreeImage_GetFileTypeFromMemory(FIMEMORY *stream, int size FI_DEFAULT(0));
+
+// Image type request routine -----------------------------------------------
+
+DLL_API FREE_IMAGE_TYPE DLL_CALLCONV FreeImage_GetImageType(FIBITMAP *dib);
+
+// FreeImage helper routines ------------------------------------------------
+
+DLL_API BOOL DLL_CALLCONV FreeImage_IsLittleEndian(void);
+DLL_API BOOL DLL_CALLCONV FreeImage_LookupX11Color(const char *szColor, BYTE *nRed, BYTE *nGreen, BYTE *nBlue);
+DLL_API BOOL DLL_CALLCONV FreeImage_LookupSVGColor(const char *szColor, BYTE *nRed, BYTE *nGreen, BYTE *nBlue);
+
+// Pixel access routines ----------------------------------------------------
+
+DLL_API BYTE *DLL_CALLCONV FreeImage_GetBits(FIBITMAP *dib);
+DLL_API BYTE *DLL_CALLCONV FreeImage_GetScanLine(FIBITMAP *dib, int scanline);
+
+DLL_API BOOL DLL_CALLCONV FreeImage_GetPixelIndex(FIBITMAP *dib, unsigned x, unsigned y, BYTE *value);
+DLL_API BOOL DLL_CALLCONV FreeImage_GetPixelColor(FIBITMAP *dib, unsigned x, unsigned y, RGBQUAD *value);
+DLL_API BOOL DLL_CALLCONV FreeImage_SetPixelIndex(FIBITMAP *dib, unsigned x, unsigned y, BYTE *value);
+DLL_API BOOL DLL_CALLCONV FreeImage_SetPixelColor(FIBITMAP *dib, unsigned x, unsigned y, RGBQUAD *value);
+
+// DIB info routines --------------------------------------------------------
+
+DLL_API unsigned DLL_CALLCONV FreeImage_GetColorsUsed(FIBITMAP *dib);
+DLL_API unsigned DLL_CALLCONV FreeImage_GetBPP(FIBITMAP *dib);
+DLL_API unsigned DLL_CALLCONV FreeImage_GetWidth(FIBITMAP *dib);
+DLL_API unsigned DLL_CALLCONV FreeImage_GetHeight(FIBITMAP *dib);
+DLL_API unsigned DLL_CALLCONV FreeImage_GetLine(FIBITMAP *dib);
+DLL_API unsigned DLL_CALLCONV FreeImage_GetPitch(FIBITMAP *dib);
+DLL_API unsigned DLL_CALLCONV FreeImage_GetDIBSize(FIBITMAP *dib);
+DLL_API RGBQUAD *DLL_CALLCONV FreeImage_GetPalette(FIBITMAP *dib);
+
+DLL_API unsigned DLL_CALLCONV FreeImage_GetDotsPerMeterX(FIBITMAP *dib);
+DLL_API unsigned DLL_CALLCONV FreeImage_GetDotsPerMeterY(FIBITMAP *dib);
+DLL_API void DLL_CALLCONV FreeImage_SetDotsPerMeterX(FIBITMAP *dib, unsigned res);
+DLL_API void DLL_CALLCONV FreeImage_SetDotsPerMeterY(FIBITMAP *dib, unsigned res);
+
+DLL_API BITMAPINFOHEADER *DLL_CALLCONV FreeImage_GetInfoHeader(FIBITMAP *dib);
+DLL_API BITMAPINFO *DLL_CALLCONV FreeImage_GetInfo(FIBITMAP *dib);
+DLL_API FREE_IMAGE_COLOR_TYPE DLL_CALLCONV FreeImage_GetColorType(FIBITMAP *dib);
+
+DLL_API unsigned DLL_CALLCONV FreeImage_GetRedMask(FIBITMAP *dib);
+DLL_API unsigned DLL_CALLCONV FreeImage_GetGreenMask(FIBITMAP *dib);
+DLL_API unsigned DLL_CALLCONV FreeImage_GetBlueMask(FIBITMAP *dib);
+
+DLL_API unsigned DLL_CALLCONV FreeImage_GetTransparencyCount(FIBITMAP *dib);
+DLL_API BYTE * DLL_CALLCONV FreeImage_GetTransparencyTable(FIBITMAP *dib);
+DLL_API void DLL_CALLCONV FreeImage_SetTransparent(FIBITMAP *dib, BOOL enabled);
+DLL_API void DLL_CALLCONV FreeImage_SetTransparencyTable(FIBITMAP *dib, BYTE *table, int count);
+DLL_API BOOL DLL_CALLCONV FreeImage_IsTransparent(FIBITMAP *dib);
+DLL_API void DLL_CALLCONV FreeImage_SetTransparentIndex(FIBITMAP *dib, int index);
+DLL_API int DLL_CALLCONV FreeImage_GetTransparentIndex(FIBITMAP *dib);
+
+DLL_API BOOL DLL_CALLCONV FreeImage_HasBackgroundColor(FIBITMAP *dib);
+DLL_API BOOL DLL_CALLCONV FreeImage_GetBackgroundColor(FIBITMAP *dib, RGBQUAD *bkcolor);
+DLL_API BOOL DLL_CALLCONV FreeImage_SetBackgroundColor(FIBITMAP *dib, RGBQUAD *bkcolor);
+
+DLL_API FIBITMAP *DLL_CALLCONV FreeImage_GetThumbnail(FIBITMAP *dib);
+DLL_API BOOL DLL_CALLCONV FreeImage_SetThumbnail(FIBITMAP *dib, FIBITMAP *thumbnail);
+
+// ICC profile routines -----------------------------------------------------
+
+DLL_API FIICCPROFILE *DLL_CALLCONV FreeImage_GetICCProfile(FIBITMAP *dib);
+DLL_API FIICCPROFILE *DLL_CALLCONV FreeImage_CreateICCProfile(FIBITMAP *dib, void *data, long size);
+DLL_API void DLL_CALLCONV FreeImage_DestroyICCProfile(FIBITMAP *dib);
+
+// Line conversion routines -------------------------------------------------
+
+DLL_API void DLL_CALLCONV FreeImage_ConvertLine1To4(BYTE *target, BYTE *source, int width_in_pixels);
+DLL_API void DLL_CALLCONV FreeImage_ConvertLine8To4(BYTE *target, BYTE *source, int width_in_pixels, RGBQUAD *palette);
+DLL_API void DLL_CALLCONV FreeImage_ConvertLine16To4_555(BYTE *target, BYTE *source, int width_in_pixels);
+DLL_API void DLL_CALLCONV FreeImage_ConvertLine16To4_565(BYTE *target, BYTE *source, int width_in_pixels);
+DLL_API void DLL_CALLCONV FreeImage_ConvertLine24To4(BYTE *target, BYTE *source, int width_in_pixels);
+DLL_API void DLL_CALLCONV FreeImage_ConvertLine32To4(BYTE *target, BYTE *source, int width_in_pixels);
+DLL_API void DLL_CALLCONV FreeImage_ConvertLine1To8(BYTE *target, BYTE *source, int width_in_pixels);
+DLL_API void DLL_CALLCONV FreeImage_ConvertLine4To8(BYTE *target, BYTE *source, int width_in_pixels);
+DLL_API void DLL_CALLCONV FreeImage_ConvertLine16To8_555(BYTE *target, BYTE *source, int width_in_pixels);
+DLL_API void DLL_CALLCONV FreeImage_ConvertLine16To8_565(BYTE *target, BYTE *source, int width_in_pixels);
+DLL_API void DLL_CALLCONV FreeImage_ConvertLine24To8(BYTE *target, BYTE *source, int width_in_pixels);
+DLL_API void DLL_CALLCONV FreeImage_ConvertLine32To8(BYTE *target, BYTE *source, int width_in_pixels);
+DLL_API void DLL_CALLCONV FreeImage_ConvertLine1To16_555(BYTE *target, BYTE *source, int width_in_pixels, RGBQUAD *palette);
+DLL_API void DLL_CALLCONV FreeImage_ConvertLine4To16_555(BYTE *target, BYTE *source, int width_in_pixels, RGBQUAD *palette);
+DLL_API void DLL_CALLCONV FreeImage_ConvertLine8To16_555(BYTE *target, BYTE *source, int width_in_pixels, RGBQUAD *palette);
+DLL_API void DLL_CALLCONV FreeImage_ConvertLine16_565_To16_555(BYTE *target, BYTE *source, int width_in_pixels);
+DLL_API void DLL_CALLCONV FreeImage_ConvertLine24To16_555(BYTE *target, BYTE *source, int width_in_pixels);
+DLL_API void DLL_CALLCONV FreeImage_ConvertLine32To16_555(BYTE *target, BYTE *source, int width_in_pixels);
+DLL_API void DLL_CALLCONV FreeImage_ConvertLine1To16_565(BYTE *target, BYTE *source, int width_in_pixels, RGBQUAD *palette);
+DLL_API void DLL_CALLCONV FreeImage_ConvertLine4To16_565(BYTE *target, BYTE *source, int width_in_pixels, RGBQUAD *palette);
+DLL_API void DLL_CALLCONV FreeImage_ConvertLine8To16_565(BYTE *target, BYTE *source, int width_in_pixels, RGBQUAD *palette);
+DLL_API void DLL_CALLCONV FreeImage_ConvertLine16_555_To16_565(BYTE *target, BYTE *source, int width_in_pixels);
+DLL_API void DLL_CALLCONV FreeImage_ConvertLine24To16_565(BYTE *target, BYTE *source, int width_in_pixels);
+DLL_API void DLL_CALLCONV FreeImage_ConvertLine32To16_565(BYTE *target, BYTE *source, int width_in_pixels);
+DLL_API void DLL_CALLCONV FreeImage_ConvertLine1To24(BYTE *target, BYTE *source, int width_in_pixels, RGBQUAD *palette);
+DLL_API void DLL_CALLCONV FreeImage_ConvertLine4To24(BYTE *target, BYTE *source, int width_in_pixels, RGBQUAD *palette);
+DLL_API void DLL_CALLCONV FreeImage_ConvertLine8To24(BYTE *target, BYTE *source, int width_in_pixels, RGBQUAD *palette);
+DLL_API void DLL_CALLCONV FreeImage_ConvertLine16To24_555(BYTE *target, BYTE *source, int width_in_pixels);
+DLL_API void DLL_CALLCONV FreeImage_ConvertLine16To24_565(BYTE *target, BYTE *source, int width_in_pixels);
+DLL_API void DLL_CALLCONV FreeImage_ConvertLine32To24(BYTE *target, BYTE *source, int width_in_pixels);
+DLL_API void DLL_CALLCONV FreeImage_ConvertLine1To32(BYTE *target, BYTE *source, int width_in_pixels, RGBQUAD *palette);
+DLL_API void DLL_CALLCONV FreeImage_ConvertLine4To32(BYTE *target, BYTE *source, int width_in_pixels, RGBQUAD *palette);
+DLL_API void DLL_CALLCONV FreeImage_ConvertLine8To32(BYTE *target, BYTE *source, int width_in_pixels, RGBQUAD *palette);
+DLL_API void DLL_CALLCONV FreeImage_ConvertLine16To32_555(BYTE *target, BYTE *source, int width_in_pixels);
+DLL_API void DLL_CALLCONV FreeImage_ConvertLine16To32_565(BYTE *target, BYTE *source, int width_in_pixels);
+DLL_API void DLL_CALLCONV FreeImage_ConvertLine24To32(BYTE *target, BYTE *source, int width_in_pixels);
+
+// Smart conversion routines ------------------------------------------------
+
+DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ConvertTo4Bits(FIBITMAP *dib);
+DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ConvertTo8Bits(FIBITMAP *dib);
+DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ConvertToGreyscale(FIBITMAP *dib);
+DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ConvertTo16Bits555(FIBITMAP *dib);
+DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ConvertTo16Bits565(FIBITMAP *dib);
+DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ConvertTo24Bits(FIBITMAP *dib);
+DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ConvertTo32Bits(FIBITMAP *dib);
+DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ColorQuantize(FIBITMAP *dib, FREE_IMAGE_QUANTIZE quantize);
+DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ColorQuantizeEx(FIBITMAP *dib, FREE_IMAGE_QUANTIZE quantize FI_DEFAULT(FIQ_WUQUANT), int PaletteSize FI_DEFAULT(256), int ReserveSize FI_DEFAULT(0), RGBQUAD *ReservePalette FI_DEFAULT(NULL));
+DLL_API FIBITMAP *DLL_CALLCONV FreeImage_Threshold(FIBITMAP *dib, BYTE T);
+DLL_API FIBITMAP *DLL_CALLCONV FreeImage_Dither(FIBITMAP *dib, FREE_IMAGE_DITHER algorithm);
+
+DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ConvertFromRawBits(BYTE *bits, int width, int height, int pitch, unsigned bpp, unsigned red_mask, unsigned green_mask, unsigned blue_mask, BOOL topdown FI_DEFAULT(FALSE));
+DLL_API void DLL_CALLCONV FreeImage_ConvertToRawBits(BYTE *bits, FIBITMAP *dib, int pitch, unsigned bpp, unsigned red_mask, unsigned green_mask, unsigned blue_mask, BOOL topdown FI_DEFAULT(FALSE));
+
+DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ConvertToFloat(FIBITMAP *dib);
+DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ConvertToRGBF(FIBITMAP *dib);
+DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ConvertToUINT16(FIBITMAP *dib);
+DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ConvertToRGB16(FIBITMAP *dib);
+
+DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ConvertToStandardType(FIBITMAP *src, BOOL scale_linear FI_DEFAULT(TRUE));
+DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ConvertToType(FIBITMAP *src, FREE_IMAGE_TYPE dst_type, BOOL scale_linear FI_DEFAULT(TRUE));
+
+// Tone mapping operators ---------------------------------------------------
+
+DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ToneMapping(FIBITMAP *dib, FREE_IMAGE_TMO tmo, double first_param FI_DEFAULT(0), double second_param FI_DEFAULT(0));
+DLL_API FIBITMAP *DLL_CALLCONV FreeImage_TmoDrago03(FIBITMAP *src, double gamma FI_DEFAULT(2.2), double exposure FI_DEFAULT(0));
+DLL_API FIBITMAP *DLL_CALLCONV FreeImage_TmoReinhard05(FIBITMAP *src, double intensity FI_DEFAULT(0), double contrast FI_DEFAULT(0));
+DLL_API FIBITMAP *DLL_CALLCONV FreeImage_TmoReinhard05Ex(FIBITMAP *src, double intensity FI_DEFAULT(0), double contrast FI_DEFAULT(0), double adaptation FI_DEFAULT(1), double color_correction FI_DEFAULT(0));
+
+DLL_API FIBITMAP *DLL_CALLCONV FreeImage_TmoFattal02(FIBITMAP *src, double color_saturation FI_DEFAULT(0.5), double attenuation FI_DEFAULT(0.85));
+
+// ZLib interface -----------------------------------------------------------
+
+DLL_API DWORD DLL_CALLCONV FreeImage_ZLibCompress(BYTE *target, DWORD target_size, BYTE *source, DWORD source_size);
+DLL_API DWORD DLL_CALLCONV FreeImage_ZLibUncompress(BYTE *target, DWORD target_size, BYTE *source, DWORD source_size);
+DLL_API DWORD DLL_CALLCONV FreeImage_ZLibGZip(BYTE *target, DWORD target_size, BYTE *source, DWORD source_size);
+DLL_API DWORD DLL_CALLCONV FreeImage_ZLibGUnzip(BYTE *target, DWORD target_size, BYTE *source, DWORD source_size);
+DLL_API DWORD DLL_CALLCONV FreeImage_ZLibCRC32(DWORD crc, BYTE *source, DWORD source_size);
+
+// --------------------------------------------------------------------------
+// Metadata routines
+// --------------------------------------------------------------------------
+
+// tag creation / destruction
+DLL_API FITAG *DLL_CALLCONV FreeImage_CreateTag(void);
+DLL_API void DLL_CALLCONV FreeImage_DeleteTag(FITAG *tag);
+DLL_API FITAG *DLL_CALLCONV FreeImage_CloneTag(FITAG *tag);
+
+// tag getters and setters
+DLL_API const char *DLL_CALLCONV FreeImage_GetTagKey(FITAG *tag);
+DLL_API const char *DLL_CALLCONV FreeImage_GetTagDescription(FITAG *tag);
+DLL_API WORD DLL_CALLCONV FreeImage_GetTagID(FITAG *tag);
+DLL_API FREE_IMAGE_MDTYPE DLL_CALLCONV FreeImage_GetTagType(FITAG *tag);
+DLL_API DWORD DLL_CALLCONV FreeImage_GetTagCount(FITAG *tag);
+DLL_API DWORD DLL_CALLCONV FreeImage_GetTagLength(FITAG *tag);
+DLL_API const void *DLL_CALLCONV FreeImage_GetTagValue(FITAG *tag);
+
+DLL_API BOOL DLL_CALLCONV FreeImage_SetTagKey(FITAG *tag, const char *key);
+DLL_API BOOL DLL_CALLCONV FreeImage_SetTagDescription(FITAG *tag, const char *description);
+DLL_API BOOL DLL_CALLCONV FreeImage_SetTagID(FITAG *tag, WORD id);
+DLL_API BOOL DLL_CALLCONV FreeImage_SetTagType(FITAG *tag, FREE_IMAGE_MDTYPE type);
+DLL_API BOOL DLL_CALLCONV FreeImage_SetTagCount(FITAG *tag, DWORD count);
+DLL_API BOOL DLL_CALLCONV FreeImage_SetTagLength(FITAG *tag, DWORD length);
+DLL_API BOOL DLL_CALLCONV FreeImage_SetTagValue(FITAG *tag, const void *value);
+
+// iterator
+DLL_API FIMETADATA *DLL_CALLCONV FreeImage_FindFirstMetadata(FREE_IMAGE_MDMODEL model, FIBITMAP *dib, FITAG **tag);
+DLL_API BOOL DLL_CALLCONV FreeImage_FindNextMetadata(FIMETADATA *mdhandle, FITAG **tag);
+DLL_API void DLL_CALLCONV FreeImage_FindCloseMetadata(FIMETADATA *mdhandle);
+
+// metadata setter and getter
+DLL_API BOOL DLL_CALLCONV FreeImage_SetMetadata(FREE_IMAGE_MDMODEL model, FIBITMAP *dib, const char *key, FITAG *tag);
+DLL_API BOOL DLL_CALLCONV FreeImage_GetMetadata(FREE_IMAGE_MDMODEL model, FIBITMAP *dib, const char *key, FITAG **tag);
+
+// helpers
+DLL_API unsigned DLL_CALLCONV FreeImage_GetMetadataCount(FREE_IMAGE_MDMODEL model, FIBITMAP *dib);
+DLL_API BOOL DLL_CALLCONV FreeImage_CloneMetadata(FIBITMAP *dst, FIBITMAP *src);
+
+// tag to C string conversion
+DLL_API const char* DLL_CALLCONV FreeImage_TagToString(FREE_IMAGE_MDMODEL model, FITAG *tag, char *Make FI_DEFAULT(NULL));
+
+// --------------------------------------------------------------------------
+// JPEG lossless transformation routines
+// --------------------------------------------------------------------------
+
+DLL_API BOOL DLL_CALLCONV FreeImage_JPEGTransform(const char *src_file, const char *dst_file, FREE_IMAGE_JPEG_OPERATION operation, BOOL perfect FI_DEFAULT(TRUE));
+DLL_API BOOL DLL_CALLCONV FreeImage_JPEGTransformU(const wchar_t *src_file, const wchar_t *dst_file, FREE_IMAGE_JPEG_OPERATION operation, BOOL perfect FI_DEFAULT(TRUE));
+DLL_API BOOL DLL_CALLCONV FreeImage_JPEGCrop(const char *src_file, const char *dst_file, int left, int top, int right, int bottom);
+DLL_API BOOL DLL_CALLCONV FreeImage_JPEGCropU(const wchar_t *src_file, const wchar_t *dst_file, int left, int top, int right, int bottom);
+DLL_API BOOL DLL_CALLCONV FreeImage_JPEGTransformFromHandle(FreeImageIO* src_io, fi_handle src_handle, FreeImageIO* dst_io, fi_handle dst_handle, FREE_IMAGE_JPEG_OPERATION operation, int* left, int* top, int* right, int* bottom, BOOL perfect FI_DEFAULT(TRUE));
+DLL_API BOOL DLL_CALLCONV FreeImage_JPEGTransformCombined(const char *src_file, const char *dst_file, FREE_IMAGE_JPEG_OPERATION operation, int* left, int* top, int* right, int* bottom, BOOL perfect FI_DEFAULT(TRUE));
+DLL_API BOOL DLL_CALLCONV FreeImage_JPEGTransformCombinedU(const wchar_t *src_file, const wchar_t *dst_file, FREE_IMAGE_JPEG_OPERATION operation, int* left, int* top, int* right, int* bottom, BOOL perfect FI_DEFAULT(TRUE));
+DLL_API BOOL DLL_CALLCONV FreeImage_JPEGTransformCombinedFromMemory(FIMEMORY* src_stream, FIMEMORY* dst_stream, FREE_IMAGE_JPEG_OPERATION operation, int* left, int* top, int* right, int* bottom, BOOL perfect FI_DEFAULT(TRUE));
+
+
+// --------------------------------------------------------------------------
+// Image manipulation toolkit
+// --------------------------------------------------------------------------
+
+// rotation and flipping
+/// @deprecated see FreeImage_Rotate
+DLL_API FIBITMAP *DLL_CALLCONV FreeImage_RotateClassic(FIBITMAP *dib, double angle);
+DLL_API FIBITMAP *DLL_CALLCONV FreeImage_Rotate(FIBITMAP *dib, double angle, const void *bkcolor FI_DEFAULT(NULL));
+DLL_API FIBITMAP *DLL_CALLCONV FreeImage_RotateEx(FIBITMAP *dib, double angle, double x_shift, double y_shift, double x_origin, double y_origin, BOOL use_mask);
+DLL_API BOOL DLL_CALLCONV FreeImage_FlipHorizontal(FIBITMAP *dib);
+DLL_API BOOL DLL_CALLCONV FreeImage_FlipVertical(FIBITMAP *dib);
+
+// upsampling / downsampling
+DLL_API FIBITMAP *DLL_CALLCONV FreeImage_Rescale(FIBITMAP *dib, int dst_width, int dst_height, FREE_IMAGE_FILTER filter FI_DEFAULT(FILTER_CATMULLROM));
+DLL_API FIBITMAP *DLL_CALLCONV FreeImage_MakeThumbnail(FIBITMAP *dib, int max_pixel_size, BOOL convert FI_DEFAULT(TRUE));
+
+// color manipulation routines (point operations)
+DLL_API BOOL DLL_CALLCONV FreeImage_AdjustCurve(FIBITMAP *dib, BYTE *LUT, FREE_IMAGE_COLOR_CHANNEL channel);
+DLL_API BOOL DLL_CALLCONV FreeImage_AdjustGamma(FIBITMAP *dib, double gamma);
+DLL_API BOOL DLL_CALLCONV FreeImage_AdjustBrightness(FIBITMAP *dib, double percentage);
+DLL_API BOOL DLL_CALLCONV FreeImage_AdjustContrast(FIBITMAP *dib, double percentage);
+DLL_API BOOL DLL_CALLCONV FreeImage_Invert(FIBITMAP *dib);
+DLL_API BOOL DLL_CALLCONV FreeImage_GetHistogram(FIBITMAP *dib, DWORD *histo, FREE_IMAGE_COLOR_CHANNEL channel FI_DEFAULT(FICC_BLACK));
+DLL_API int DLL_CALLCONV FreeImage_GetAdjustColorsLookupTable(BYTE *LUT, double brightness, double contrast, double gamma, BOOL invert);
+DLL_API BOOL DLL_CALLCONV FreeImage_AdjustColors(FIBITMAP *dib, double brightness, double contrast, double gamma, BOOL invert FI_DEFAULT(FALSE));
+DLL_API unsigned DLL_CALLCONV FreeImage_ApplyColorMapping(FIBITMAP *dib, RGBQUAD *srccolors, RGBQUAD *dstcolors, unsigned count, BOOL ignore_alpha, BOOL swap);
+DLL_API unsigned DLL_CALLCONV FreeImage_SwapColors(FIBITMAP *dib, RGBQUAD *color_a, RGBQUAD *color_b, BOOL ignore_alpha);
+DLL_API unsigned DLL_CALLCONV FreeImage_ApplyPaletteIndexMapping(FIBITMAP *dib, BYTE *srcindices,      BYTE *dstindices, unsigned count, BOOL swap);
+DLL_API unsigned DLL_CALLCONV FreeImage_SwapPaletteIndices(FIBITMAP *dib, BYTE *index_a, BYTE *index_b);
+
+// channel processing routines
+DLL_API FIBITMAP *DLL_CALLCONV FreeImage_GetChannel(FIBITMAP *dib, FREE_IMAGE_COLOR_CHANNEL channel);
+DLL_API BOOL DLL_CALLCONV FreeImage_SetChannel(FIBITMAP *dst, FIBITMAP *src, FREE_IMAGE_COLOR_CHANNEL channel);
+DLL_API FIBITMAP *DLL_CALLCONV FreeImage_GetComplexChannel(FIBITMAP *src, FREE_IMAGE_COLOR_CHANNEL channel);
+DLL_API BOOL DLL_CALLCONV FreeImage_SetComplexChannel(FIBITMAP *dst, FIBITMAP *src, FREE_IMAGE_COLOR_CHANNEL channel);
+
+// copy / paste / composite routines
+DLL_API FIBITMAP *DLL_CALLCONV FreeImage_Copy(FIBITMAP *dib, int left, int top, int right, int bottom);
+DLL_API BOOL DLL_CALLCONV FreeImage_Paste(FIBITMAP *dst, FIBITMAP *src, int left, int top, int alpha);
+DLL_API FIBITMAP *DLL_CALLCONV FreeImage_Composite(FIBITMAP *fg, BOOL useFileBkg FI_DEFAULT(FALSE), RGBQUAD *appBkColor FI_DEFAULT(NULL), FIBITMAP *bg FI_DEFAULT(NULL));
+DLL_API BOOL DLL_CALLCONV FreeImage_PreMultiplyWithAlpha(FIBITMAP *dib);
+
+// background filling routines
+DLL_API BOOL DLL_CALLCONV FreeImage_FillBackground(FIBITMAP *dib, const void *color, int options FI_DEFAULT(0));
+DLL_API FIBITMAP *DLL_CALLCONV FreeImage_EnlargeCanvas(FIBITMAP *src, int left, int top, int right, int bottom, const void *color, int options FI_DEFAULT(0));
+DLL_API FIBITMAP *DLL_CALLCONV FreeImage_AllocateEx(int width, int height, int bpp, const RGBQUAD *color, int options FI_DEFAULT(0), const RGBQUAD *palette FI_DEFAULT(NULL), unsigned red_mask FI_DEFAULT(0), unsigned green_mask FI_DEFAULT(0), unsigned blue_mask FI_DEFAULT(0));
+DLL_API FIBITMAP *DLL_CALLCONV FreeImage_AllocateExT(FREE_IMAGE_TYPE type, int width, int height, int bpp, const void *color, int options FI_DEFAULT(0), const RGBQUAD *palette FI_DEFAULT(NULL), unsigned red_mask FI_DEFAULT(0), unsigned green_mask FI_DEFAULT(0), unsigned blue_mask FI_DEFAULT(0));
+
+// miscellaneous algorithms
+DLL_API FIBITMAP *DLL_CALLCONV FreeImage_MultigridPoissonSolver(FIBITMAP *Laplacian, int ncycle FI_DEFAULT(3));
+
+// restore the borland-specific enum size option
+#if defined(__BORLANDC__)
+#pragma option pop
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // FREEIMAGE_H
diff --git a/include/GL/glew.h b/include/GL/glew.h
new file mode 100644 (file)
index 0000000..9afa5c6
--- /dev/null
@@ -0,0 +1,19367 @@
+/*
+** The OpenGL Extension Wrangler Library
+** Copyright (C) 2008-2015, Nigel Stewart <nigels[]users sourceforge net>
+** 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.
+*/
+
+/*
+ * 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.
+*/
+
+#ifndef __glew_h__
+#define __glew_h__
+#define __GLEW_H__
+
+#if defined(__gl_h_) || defined(__GL_H__) || defined(_GL_H) || defined(__X_GL_H)
+#error gl.h included before glew.h
+#endif
+#if defined(__gl2_h_)
+#error gl2.h included before glew.h
+#endif
+#if defined(__gltypes_h_)
+#error gltypes.h included before glew.h
+#endif
+#if defined(__REGAL_H__)
+#error Regal.h included before glew.h
+#endif
+#if defined(__glext_h_) || defined(__GLEXT_H_)
+#error glext.h included before glew.h
+#endif
+#if defined(__gl_ATI_h_)
+#error glATI.h included before glew.h
+#endif
+
+#define __gl_h_
+#define __gl2_h_
+#define __GL_H__
+#define _GL_H
+#define __gltypes_h_
+#define __REGAL_H__
+#define __X_GL_H
+#define __glext_h_
+#define __GLEXT_H_
+#define __gl_ATI_h_
+
+#if defined(_WIN32)
+
+/*
+ * GLEW does not include <windows.h> to avoid name space pollution.
+ * GL needs GLAPI and GLAPIENTRY, GLU needs APIENTRY, CALLBACK, and wchar_t
+ * defined properly.
+ */
+/* <windef.h> and <gl.h>*/
+#ifdef APIENTRY
+#  ifndef GLAPIENTRY
+#    define GLAPIENTRY APIENTRY
+#  endif
+#  ifndef GLEWAPIENTRY
+#    define GLEWAPIENTRY APIENTRY
+#  endif
+#else
+#define GLEW_APIENTRY_DEFINED
+#  if defined(__MINGW32__) || defined(__CYGWIN__) || (_MSC_VER >= 800) || defined(_STDCALL_SUPPORTED) || defined(__BORLANDC__)
+#    define APIENTRY __stdcall
+#    ifndef GLAPIENTRY
+#      define GLAPIENTRY __stdcall
+#    endif
+#    ifndef GLEWAPIENTRY
+#      define GLEWAPIENTRY __stdcall
+#    endif
+#  else
+#    define APIENTRY
+#  endif
+#endif
+#ifndef GLAPI
+#  if defined(__MINGW32__) || defined(__CYGWIN__)
+#    define GLAPI extern
+#  endif
+#endif
+/* <winnt.h> */
+#ifndef CALLBACK
+#define GLEW_CALLBACK_DEFINED
+#  if defined(__MINGW32__) || defined(__CYGWIN__)
+#    define CALLBACK __attribute__ ((__stdcall__))
+#  elif (defined(_M_MRX000) || defined(_M_IX86) || defined(_M_ALPHA) || defined(_M_PPC)) && !defined(MIDL_PASS)
+#    define CALLBACK __stdcall
+#  else
+#    define CALLBACK
+#  endif
+#endif
+/* <wingdi.h> and <winnt.h> */
+#ifndef WINGDIAPI
+#define GLEW_WINGDIAPI_DEFINED
+#define WINGDIAPI __declspec(dllimport)
+#endif
+/* <ctype.h> */
+#if (defined(_MSC_VER) || defined(__BORLANDC__)) && !defined(_WCHAR_T_DEFINED)
+typedef unsigned short wchar_t;
+#  define _WCHAR_T_DEFINED
+#endif
+/* <stddef.h> */
+#if !defined(_W64)
+#  if !defined(__midl) && (defined(_X86_) || defined(_M_IX86)) && defined(_MSC_VER) && _MSC_VER >= 1300
+#    define _W64 __w64
+#  else
+#    define _W64
+#  endif
+#endif
+#if !defined(_PTRDIFF_T_DEFINED) && !defined(_PTRDIFF_T_) && !defined(__MINGW64__)
+#  ifdef _WIN64
+typedef __int64 ptrdiff_t;
+#  else
+typedef _W64 int ptrdiff_t;
+#  endif
+#  define _PTRDIFF_T_DEFINED
+#  define _PTRDIFF_T_
+#endif
+
+#ifndef GLAPI
+#  if defined(__MINGW32__) || defined(__CYGWIN__)
+#    define GLAPI extern
+#  else
+#    define GLAPI WINGDIAPI
+#  endif
+#endif
+
+/*
+ * GLEW_STATIC is defined for static library.
+ * GLEW_BUILD  is defined for building the DLL library.
+ */
+
+#ifdef GLEW_STATIC
+#  define GLEWAPI extern
+#else
+#  ifdef GLEW_BUILD
+#    define GLEWAPI extern __declspec(dllexport)
+#  else
+#    define GLEWAPI extern __declspec(dllimport)
+#  endif
+#endif
+
+#else /* _UNIX */
+
+/*
+ * Needed for ptrdiff_t in turn needed by VBO.  This is defined by ISO
+ * C.  On my system, this amounts to _3 lines_ of included code, all of
+ * them pretty much harmless.  If you know of a way of detecting 32 vs
+ * 64 _targets_ at compile time you are free to replace this with
+ * something that's portable.  For now, _this_ is the portable solution.
+ * (mem, 2004-01-04)
+ */
+
+#include <stddef.h>
+
+/* SGI MIPSPro doesn't like stdint.h in C++ mode          */
+/* ID: 3376260 Solaris 9 has inttypes.h, but not stdint.h */
+
+#if (defined(__sgi) || defined(__sun)) && !defined(__GNUC__)
+#include <inttypes.h>
+#else
+#include <stdint.h>
+#endif
+
+#define GLEW_APIENTRY_DEFINED
+#define APIENTRY
+
+/*
+ * GLEW_STATIC is defined for static library.
+ */
+
+#ifdef GLEW_STATIC
+#  define GLEWAPI extern
+#else
+#  if defined(__GNUC__) && __GNUC__>=4
+#   define GLEWAPI extern __attribute__ ((visibility("default")))
+#  elif defined(__SUNPRO_C) || defined(__SUNPRO_CC)
+#   define GLEWAPI extern __global
+#  else
+#   define GLEWAPI extern
+#  endif
+#endif
+
+/* <glu.h> */
+#ifndef GLAPI
+#define GLAPI extern
+#endif
+
+#endif /* _WIN32 */
+
+#ifndef GLAPIENTRY
+#define GLAPIENTRY
+#endif
+
+#ifndef GLEWAPIENTRY
+#define GLEWAPIENTRY
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* ----------------------------- GL_VERSION_1_1 ---------------------------- */
+
+#ifndef GL_VERSION_1_1
+#define GL_VERSION_1_1 1
+
+typedef unsigned int GLenum;
+typedef unsigned int GLbitfield;
+typedef unsigned int GLuint;
+typedef int GLint;
+typedef int GLsizei;
+typedef unsigned char GLboolean;
+typedef signed char GLbyte;
+typedef short GLshort;
+typedef unsigned char GLubyte;
+typedef unsigned short GLushort;
+typedef unsigned long GLulong;
+typedef float GLfloat;
+typedef float GLclampf;
+typedef double GLdouble;
+typedef double GLclampd;
+typedef void GLvoid;
+#if defined(_MSC_VER) && _MSC_VER < 1400
+typedef __int64 GLint64EXT;
+typedef unsigned __int64 GLuint64EXT;
+#elif defined(_MSC_VER) || defined(__BORLANDC__)
+typedef signed long long GLint64EXT;
+typedef unsigned long long GLuint64EXT;
+#else
+#  if defined(__MINGW32__) || defined(__CYGWIN__)
+#include <inttypes.h>
+#  endif
+typedef int64_t GLint64EXT;
+typedef uint64_t GLuint64EXT;
+#endif
+typedef GLint64EXT  GLint64;
+typedef GLuint64EXT GLuint64;
+typedef struct __GLsync *GLsync;
+
+typedef char GLchar;
+
+#define GL_ZERO 0
+#define GL_FALSE 0
+#define GL_LOGIC_OP 0x0BF1
+#define GL_NONE 0
+#define GL_TEXTURE_COMPONENTS 0x1003
+#define GL_NO_ERROR 0
+#define GL_POINTS 0x0000
+#define GL_CURRENT_BIT 0x00000001
+#define GL_TRUE 1
+#define GL_ONE 1
+#define GL_CLIENT_PIXEL_STORE_BIT 0x00000001
+#define GL_LINES 0x0001
+#define GL_LINE_LOOP 0x0002
+#define GL_POINT_BIT 0x00000002
+#define GL_CLIENT_VERTEX_ARRAY_BIT 0x00000002
+#define GL_LINE_STRIP 0x0003
+#define GL_LINE_BIT 0x00000004
+#define GL_TRIANGLES 0x0004
+#define GL_TRIANGLE_STRIP 0x0005
+#define GL_TRIANGLE_FAN 0x0006
+#define GL_QUADS 0x0007
+#define GL_QUAD_STRIP 0x0008
+#define GL_POLYGON_BIT 0x00000008
+#define GL_POLYGON 0x0009
+#define GL_POLYGON_STIPPLE_BIT 0x00000010
+#define GL_PIXEL_MODE_BIT 0x00000020
+#define GL_LIGHTING_BIT 0x00000040
+#define GL_FOG_BIT 0x00000080
+#define GL_DEPTH_BUFFER_BIT 0x00000100
+#define GL_ACCUM 0x0100
+#define GL_LOAD 0x0101
+#define GL_RETURN 0x0102
+#define GL_MULT 0x0103
+#define GL_ADD 0x0104
+#define GL_NEVER 0x0200
+#define GL_ACCUM_BUFFER_BIT 0x00000200
+#define GL_LESS 0x0201
+#define GL_EQUAL 0x0202
+#define GL_LEQUAL 0x0203
+#define GL_GREATER 0x0204
+#define GL_NOTEQUAL 0x0205
+#define GL_GEQUAL 0x0206
+#define GL_ALWAYS 0x0207
+#define GL_SRC_COLOR 0x0300
+#define GL_ONE_MINUS_SRC_COLOR 0x0301
+#define GL_SRC_ALPHA 0x0302
+#define GL_ONE_MINUS_SRC_ALPHA 0x0303
+#define GL_DST_ALPHA 0x0304
+#define GL_ONE_MINUS_DST_ALPHA 0x0305
+#define GL_DST_COLOR 0x0306
+#define GL_ONE_MINUS_DST_COLOR 0x0307
+#define GL_SRC_ALPHA_SATURATE 0x0308
+#define GL_STENCIL_BUFFER_BIT 0x00000400
+#define GL_FRONT_LEFT 0x0400
+#define GL_FRONT_RIGHT 0x0401
+#define GL_BACK_LEFT 0x0402
+#define GL_BACK_RIGHT 0x0403
+#define GL_FRONT 0x0404
+#define GL_BACK 0x0405
+#define GL_LEFT 0x0406
+#define GL_RIGHT 0x0407
+#define GL_FRONT_AND_BACK 0x0408
+#define GL_AUX0 0x0409
+#define GL_AUX1 0x040A
+#define GL_AUX2 0x040B
+#define GL_AUX3 0x040C
+#define GL_INVALID_ENUM 0x0500
+#define GL_INVALID_VALUE 0x0501
+#define GL_INVALID_OPERATION 0x0502
+#define GL_STACK_OVERFLOW 0x0503
+#define GL_STACK_UNDERFLOW 0x0504
+#define GL_OUT_OF_MEMORY 0x0505
+#define GL_2D 0x0600
+#define GL_3D 0x0601
+#define GL_3D_COLOR 0x0602
+#define GL_3D_COLOR_TEXTURE 0x0603
+#define GL_4D_COLOR_TEXTURE 0x0604
+#define GL_PASS_THROUGH_TOKEN 0x0700
+#define GL_POINT_TOKEN 0x0701
+#define GL_LINE_TOKEN 0x0702
+#define GL_POLYGON_TOKEN 0x0703
+#define GL_BITMAP_TOKEN 0x0704
+#define GL_DRAW_PIXEL_TOKEN 0x0705
+#define GL_COPY_PIXEL_TOKEN 0x0706
+#define GL_LINE_RESET_TOKEN 0x0707
+#define GL_EXP 0x0800
+#define GL_VIEWPORT_BIT 0x00000800
+#define GL_EXP2 0x0801
+#define GL_CW 0x0900
+#define GL_CCW 0x0901
+#define GL_COEFF 0x0A00
+#define GL_ORDER 0x0A01
+#define GL_DOMAIN 0x0A02
+#define GL_CURRENT_COLOR 0x0B00
+#define GL_CURRENT_INDEX 0x0B01
+#define GL_CURRENT_NORMAL 0x0B02
+#define GL_CURRENT_TEXTURE_COORDS 0x0B03
+#define GL_CURRENT_RASTER_COLOR 0x0B04
+#define GL_CURRENT_RASTER_INDEX 0x0B05
+#define GL_CURRENT_RASTER_TEXTURE_COORDS 0x0B06
+#define GL_CURRENT_RASTER_POSITION 0x0B07
+#define GL_CURRENT_RASTER_POSITION_VALID 0x0B08
+#define GL_CURRENT_RASTER_DISTANCE 0x0B09
+#define GL_POINT_SMOOTH 0x0B10
+#define GL_POINT_SIZE 0x0B11
+#define GL_POINT_SIZE_RANGE 0x0B12
+#define GL_POINT_SIZE_GRANULARITY 0x0B13
+#define GL_LINE_SMOOTH 0x0B20
+#define GL_LINE_WIDTH 0x0B21
+#define GL_LINE_WIDTH_RANGE 0x0B22
+#define GL_LINE_WIDTH_GRANULARITY 0x0B23
+#define GL_LINE_STIPPLE 0x0B24
+#define GL_LINE_STIPPLE_PATTERN 0x0B25
+#define GL_LINE_STIPPLE_REPEAT 0x0B26
+#define GL_LIST_MODE 0x0B30
+#define GL_MAX_LIST_NESTING 0x0B31
+#define GL_LIST_BASE 0x0B32
+#define GL_LIST_INDEX 0x0B33
+#define GL_POLYGON_MODE 0x0B40
+#define GL_POLYGON_SMOOTH 0x0B41
+#define GL_POLYGON_STIPPLE 0x0B42
+#define GL_EDGE_FLAG 0x0B43
+#define GL_CULL_FACE 0x0B44
+#define GL_CULL_FACE_MODE 0x0B45
+#define GL_FRONT_FACE 0x0B46
+#define GL_LIGHTING 0x0B50
+#define GL_LIGHT_MODEL_LOCAL_VIEWER 0x0B51
+#define GL_LIGHT_MODEL_TWO_SIDE 0x0B52
+#define GL_LIGHT_MODEL_AMBIENT 0x0B53
+#define GL_SHADE_MODEL 0x0B54
+#define GL_COLOR_MATERIAL_FACE 0x0B55
+#define GL_COLOR_MATERIAL_PARAMETER 0x0B56
+#define GL_COLOR_MATERIAL 0x0B57
+#define GL_FOG 0x0B60
+#define GL_FOG_INDEX 0x0B61
+#define GL_FOG_DENSITY 0x0B62
+#define GL_FOG_START 0x0B63
+#define GL_FOG_END 0x0B64
+#define GL_FOG_MODE 0x0B65
+#define GL_FOG_COLOR 0x0B66
+#define GL_DEPTH_RANGE 0x0B70
+#define GL_DEPTH_TEST 0x0B71
+#define GL_DEPTH_WRITEMASK 0x0B72
+#define GL_DEPTH_CLEAR_VALUE 0x0B73
+#define GL_DEPTH_FUNC 0x0B74
+#define GL_ACCUM_CLEAR_VALUE 0x0B80
+#define GL_STENCIL_TEST 0x0B90
+#define GL_STENCIL_CLEAR_VALUE 0x0B91
+#define GL_STENCIL_FUNC 0x0B92
+#define GL_STENCIL_VALUE_MASK 0x0B93
+#define GL_STENCIL_FAIL 0x0B94
+#define GL_STENCIL_PASS_DEPTH_FAIL 0x0B95
+#define GL_STENCIL_PASS_DEPTH_PASS 0x0B96
+#define GL_STENCIL_REF 0x0B97
+#define GL_STENCIL_WRITEMASK 0x0B98
+#define GL_MATRIX_MODE 0x0BA0
+#define GL_NORMALIZE 0x0BA1
+#define GL_VIEWPORT 0x0BA2
+#define GL_MODELVIEW_STACK_DEPTH 0x0BA3
+#define GL_PROJECTION_STACK_DEPTH 0x0BA4
+#define GL_TEXTURE_STACK_DEPTH 0x0BA5
+#define GL_MODELVIEW_MATRIX 0x0BA6
+#define GL_PROJECTION_MATRIX 0x0BA7
+#define GL_TEXTURE_MATRIX 0x0BA8
+#define GL_ATTRIB_STACK_DEPTH 0x0BB0
+#define GL_CLIENT_ATTRIB_STACK_DEPTH 0x0BB1
+#define GL_ALPHA_TEST 0x0BC0
+#define GL_ALPHA_TEST_FUNC 0x0BC1
+#define GL_ALPHA_TEST_REF 0x0BC2
+#define GL_DITHER 0x0BD0
+#define GL_BLEND_DST 0x0BE0
+#define GL_BLEND_SRC 0x0BE1
+#define GL_BLEND 0x0BE2
+#define GL_LOGIC_OP_MODE 0x0BF0
+#define GL_INDEX_LOGIC_OP 0x0BF1
+#define GL_COLOR_LOGIC_OP 0x0BF2
+#define GL_AUX_BUFFERS 0x0C00
+#define GL_DRAW_BUFFER 0x0C01
+#define GL_READ_BUFFER 0x0C02
+#define GL_SCISSOR_BOX 0x0C10
+#define GL_SCISSOR_TEST 0x0C11
+#define GL_INDEX_CLEAR_VALUE 0x0C20
+#define GL_INDEX_WRITEMASK 0x0C21
+#define GL_COLOR_CLEAR_VALUE 0x0C22
+#define GL_COLOR_WRITEMASK 0x0C23
+#define GL_INDEX_MODE 0x0C30
+#define GL_RGBA_MODE 0x0C31
+#define GL_DOUBLEBUFFER 0x0C32
+#define GL_STEREO 0x0C33
+#define GL_RENDER_MODE 0x0C40
+#define GL_PERSPECTIVE_CORRECTION_HINT 0x0C50
+#define GL_POINT_SMOOTH_HINT 0x0C51
+#define GL_LINE_SMOOTH_HINT 0x0C52
+#define GL_POLYGON_SMOOTH_HINT 0x0C53
+#define GL_FOG_HINT 0x0C54
+#define GL_TEXTURE_GEN_S 0x0C60
+#define GL_TEXTURE_GEN_T 0x0C61
+#define GL_TEXTURE_GEN_R 0x0C62
+#define GL_TEXTURE_GEN_Q 0x0C63
+#define GL_PIXEL_MAP_I_TO_I 0x0C70
+#define GL_PIXEL_MAP_S_TO_S 0x0C71
+#define GL_PIXEL_MAP_I_TO_R 0x0C72
+#define GL_PIXEL_MAP_I_TO_G 0x0C73
+#define GL_PIXEL_MAP_I_TO_B 0x0C74
+#define GL_PIXEL_MAP_I_TO_A 0x0C75
+#define GL_PIXEL_MAP_R_TO_R 0x0C76
+#define GL_PIXEL_MAP_G_TO_G 0x0C77
+#define GL_PIXEL_MAP_B_TO_B 0x0C78
+#define GL_PIXEL_MAP_A_TO_A 0x0C79
+#define GL_PIXEL_MAP_I_TO_I_SIZE 0x0CB0
+#define GL_PIXEL_MAP_S_TO_S_SIZE 0x0CB1
+#define GL_PIXEL_MAP_I_TO_R_SIZE 0x0CB2
+#define GL_PIXEL_MAP_I_TO_G_SIZE 0x0CB3
+#define GL_PIXEL_MAP_I_TO_B_SIZE 0x0CB4
+#define GL_PIXEL_MAP_I_TO_A_SIZE 0x0CB5
+#define GL_PIXEL_MAP_R_TO_R_SIZE 0x0CB6
+#define GL_PIXEL_MAP_G_TO_G_SIZE 0x0CB7
+#define GL_PIXEL_MAP_B_TO_B_SIZE 0x0CB8
+#define GL_PIXEL_MAP_A_TO_A_SIZE 0x0CB9
+#define GL_UNPACK_SWAP_BYTES 0x0CF0
+#define GL_UNPACK_LSB_FIRST 0x0CF1
+#define GL_UNPACK_ROW_LENGTH 0x0CF2
+#define GL_UNPACK_SKIP_ROWS 0x0CF3
+#define GL_UNPACK_SKIP_PIXELS 0x0CF4
+#define GL_UNPACK_ALIGNMENT 0x0CF5
+#define GL_PACK_SWAP_BYTES 0x0D00
+#define GL_PACK_LSB_FIRST 0x0D01
+#define GL_PACK_ROW_LENGTH 0x0D02
+#define GL_PACK_SKIP_ROWS 0x0D03
+#define GL_PACK_SKIP_PIXELS 0x0D04
+#define GL_PACK_ALIGNMENT 0x0D05
+#define GL_MAP_COLOR 0x0D10
+#define GL_MAP_STENCIL 0x0D11
+#define GL_INDEX_SHIFT 0x0D12
+#define GL_INDEX_OFFSET 0x0D13
+#define GL_RED_SCALE 0x0D14
+#define GL_RED_BIAS 0x0D15
+#define GL_ZOOM_X 0x0D16
+#define GL_ZOOM_Y 0x0D17
+#define GL_GREEN_SCALE 0x0D18
+#define GL_GREEN_BIAS 0x0D19
+#define GL_BLUE_SCALE 0x0D1A
+#define GL_BLUE_BIAS 0x0D1B
+#define GL_ALPHA_SCALE 0x0D1C
+#define GL_ALPHA_BIAS 0x0D1D
+#define GL_DEPTH_SCALE 0x0D1E
+#define GL_DEPTH_BIAS 0x0D1F
+#define GL_MAX_EVAL_ORDER 0x0D30
+#define GL_MAX_LIGHTS 0x0D31
+#define GL_MAX_CLIP_PLANES 0x0D32
+#define GL_MAX_TEXTURE_SIZE 0x0D33
+#define GL_MAX_PIXEL_MAP_TABLE 0x0D34
+#define GL_MAX_ATTRIB_STACK_DEPTH 0x0D35
+#define GL_MAX_MODELVIEW_STACK_DEPTH 0x0D36
+#define GL_MAX_NAME_STACK_DEPTH 0x0D37
+#define GL_MAX_PROJECTION_STACK_DEPTH 0x0D38
+#define GL_MAX_TEXTURE_STACK_DEPTH 0x0D39
+#define GL_MAX_VIEWPORT_DIMS 0x0D3A
+#define GL_MAX_CLIENT_ATTRIB_STACK_DEPTH 0x0D3B
+#define GL_SUBPIXEL_BITS 0x0D50
+#define GL_INDEX_BITS 0x0D51
+#define GL_RED_BITS 0x0D52
+#define GL_GREEN_BITS 0x0D53
+#define GL_BLUE_BITS 0x0D54
+#define GL_ALPHA_BITS 0x0D55
+#define GL_DEPTH_BITS 0x0D56
+#define GL_STENCIL_BITS 0x0D57
+#define GL_ACCUM_RED_BITS 0x0D58
+#define GL_ACCUM_GREEN_BITS 0x0D59
+#define GL_ACCUM_BLUE_BITS 0x0D5A
+#define GL_ACCUM_ALPHA_BITS 0x0D5B
+#define GL_NAME_STACK_DEPTH 0x0D70
+#define GL_AUTO_NORMAL 0x0D80
+#define GL_MAP1_COLOR_4 0x0D90
+#define GL_MAP1_INDEX 0x0D91
+#define GL_MAP1_NORMAL 0x0D92
+#define GL_MAP1_TEXTURE_COORD_1 0x0D93
+#define GL_MAP1_TEXTURE_COORD_2 0x0D94
+#define GL_MAP1_TEXTURE_COORD_3 0x0D95
+#define GL_MAP1_TEXTURE_COORD_4 0x0D96
+#define GL_MAP1_VERTEX_3 0x0D97
+#define GL_MAP1_VERTEX_4 0x0D98
+#define GL_MAP2_COLOR_4 0x0DB0
+#define GL_MAP2_INDEX 0x0DB1
+#define GL_MAP2_NORMAL 0x0DB2
+#define GL_MAP2_TEXTURE_COORD_1 0x0DB3
+#define GL_MAP2_TEXTURE_COORD_2 0x0DB4
+#define GL_MAP2_TEXTURE_COORD_3 0x0DB5
+#define GL_MAP2_TEXTURE_COORD_4 0x0DB6
+#define GL_MAP2_VERTEX_3 0x0DB7
+#define GL_MAP2_VERTEX_4 0x0DB8
+#define GL_MAP1_GRID_DOMAIN 0x0DD0
+#define GL_MAP1_GRID_SEGMENTS 0x0DD1
+#define GL_MAP2_GRID_DOMAIN 0x0DD2
+#define GL_MAP2_GRID_SEGMENTS 0x0DD3
+#define GL_TEXTURE_1D 0x0DE0
+#define GL_TEXTURE_2D 0x0DE1
+#define GL_FEEDBACK_BUFFER_POINTER 0x0DF0
+#define GL_FEEDBACK_BUFFER_SIZE 0x0DF1
+#define GL_FEEDBACK_BUFFER_TYPE 0x0DF2
+#define GL_SELECTION_BUFFER_POINTER 0x0DF3
+#define GL_SELECTION_BUFFER_SIZE 0x0DF4
+#define GL_TEXTURE_WIDTH 0x1000
+#define GL_TRANSFORM_BIT 0x00001000
+#define GL_TEXTURE_HEIGHT 0x1001
+#define GL_TEXTURE_INTERNAL_FORMAT 0x1003
+#define GL_TEXTURE_BORDER_COLOR 0x1004
+#define GL_TEXTURE_BORDER 0x1005
+#define GL_DONT_CARE 0x1100
+#define GL_FASTEST 0x1101
+#define GL_NICEST 0x1102
+#define GL_AMBIENT 0x1200
+#define GL_DIFFUSE 0x1201
+#define GL_SPECULAR 0x1202
+#define GL_POSITION 0x1203
+#define GL_SPOT_DIRECTION 0x1204
+#define GL_SPOT_EXPONENT 0x1205
+#define GL_SPOT_CUTOFF 0x1206
+#define GL_CONSTANT_ATTENUATION 0x1207
+#define GL_LINEAR_ATTENUATION 0x1208
+#define GL_QUADRATIC_ATTENUATION 0x1209
+#define GL_COMPILE 0x1300
+#define GL_COMPILE_AND_EXECUTE 0x1301
+#define GL_BYTE 0x1400
+#define GL_UNSIGNED_BYTE 0x1401
+#define GL_SHORT 0x1402
+#define GL_UNSIGNED_SHORT 0x1403
+#define GL_INT 0x1404
+#define GL_UNSIGNED_INT 0x1405
+#define GL_FLOAT 0x1406
+#define GL_2_BYTES 0x1407
+#define GL_3_BYTES 0x1408
+#define GL_4_BYTES 0x1409
+#define GL_DOUBLE 0x140A
+#define GL_CLEAR 0x1500
+#define GL_AND 0x1501
+#define GL_AND_REVERSE 0x1502
+#define GL_COPY 0x1503
+#define GL_AND_INVERTED 0x1504
+#define GL_NOOP 0x1505
+#define GL_XOR 0x1506
+#define GL_OR 0x1507
+#define GL_NOR 0x1508
+#define GL_EQUIV 0x1509
+#define GL_INVERT 0x150A
+#define GL_OR_REVERSE 0x150B
+#define GL_COPY_INVERTED 0x150C
+#define GL_OR_INVERTED 0x150D
+#define GL_NAND 0x150E
+#define GL_SET 0x150F
+#define GL_EMISSION 0x1600
+#define GL_SHININESS 0x1601
+#define GL_AMBIENT_AND_DIFFUSE 0x1602
+#define GL_COLOR_INDEXES 0x1603
+#define GL_MODELVIEW 0x1700
+#define GL_PROJECTION 0x1701
+#define GL_TEXTURE 0x1702
+#define GL_COLOR 0x1800
+#define GL_DEPTH 0x1801
+#define GL_STENCIL 0x1802
+#define GL_COLOR_INDEX 0x1900
+#define GL_STENCIL_INDEX 0x1901
+#define GL_DEPTH_COMPONENT 0x1902
+#define GL_RED 0x1903
+#define GL_GREEN 0x1904
+#define GL_BLUE 0x1905
+#define GL_ALPHA 0x1906
+#define GL_RGB 0x1907
+#define GL_RGBA 0x1908
+#define GL_LUMINANCE 0x1909
+#define GL_LUMINANCE_ALPHA 0x190A
+#define GL_BITMAP 0x1A00
+#define GL_POINT 0x1B00
+#define GL_LINE 0x1B01
+#define GL_FILL 0x1B02
+#define GL_RENDER 0x1C00
+#define GL_FEEDBACK 0x1C01
+#define GL_SELECT 0x1C02
+#define GL_FLAT 0x1D00
+#define GL_SMOOTH 0x1D01
+#define GL_KEEP 0x1E00
+#define GL_REPLACE 0x1E01
+#define GL_INCR 0x1E02
+#define GL_DECR 0x1E03
+#define GL_VENDOR 0x1F00
+#define GL_RENDERER 0x1F01
+#define GL_VERSION 0x1F02
+#define GL_EXTENSIONS 0x1F03
+#define GL_S 0x2000
+#define GL_ENABLE_BIT 0x00002000
+#define GL_T 0x2001
+#define GL_R 0x2002
+#define GL_Q 0x2003
+#define GL_MODULATE 0x2100
+#define GL_DECAL 0x2101
+#define GL_TEXTURE_ENV_MODE 0x2200
+#define GL_TEXTURE_ENV_COLOR 0x2201
+#define GL_TEXTURE_ENV 0x2300
+#define GL_EYE_LINEAR 0x2400
+#define GL_OBJECT_LINEAR 0x2401
+#define GL_SPHERE_MAP 0x2402
+#define GL_TEXTURE_GEN_MODE 0x2500
+#define GL_OBJECT_PLANE 0x2501
+#define GL_EYE_PLANE 0x2502
+#define GL_NEAREST 0x2600
+#define GL_LINEAR 0x2601
+#define GL_NEAREST_MIPMAP_NEAREST 0x2700
+#define GL_LINEAR_MIPMAP_NEAREST 0x2701
+#define GL_NEAREST_MIPMAP_LINEAR 0x2702
+#define GL_LINEAR_MIPMAP_LINEAR 0x2703
+#define GL_TEXTURE_MAG_FILTER 0x2800
+#define GL_TEXTURE_MIN_FILTER 0x2801
+#define GL_TEXTURE_WRAP_S 0x2802
+#define GL_TEXTURE_WRAP_T 0x2803
+#define GL_CLAMP 0x2900
+#define GL_REPEAT 0x2901
+#define GL_POLYGON_OFFSET_UNITS 0x2A00
+#define GL_POLYGON_OFFSET_POINT 0x2A01
+#define GL_POLYGON_OFFSET_LINE 0x2A02
+#define GL_R3_G3_B2 0x2A10
+#define GL_V2F 0x2A20
+#define GL_V3F 0x2A21
+#define GL_C4UB_V2F 0x2A22
+#define GL_C4UB_V3F 0x2A23
+#define GL_C3F_V3F 0x2A24
+#define GL_N3F_V3F 0x2A25
+#define GL_C4F_N3F_V3F 0x2A26
+#define GL_T2F_V3F 0x2A27
+#define GL_T4F_V4F 0x2A28
+#define GL_T2F_C4UB_V3F 0x2A29
+#define GL_T2F_C3F_V3F 0x2A2A
+#define GL_T2F_N3F_V3F 0x2A2B
+#define GL_T2F_C4F_N3F_V3F 0x2A2C
+#define GL_T4F_C4F_N3F_V4F 0x2A2D
+#define GL_CLIP_PLANE0 0x3000
+#define GL_CLIP_PLANE1 0x3001
+#define GL_CLIP_PLANE2 0x3002
+#define GL_CLIP_PLANE3 0x3003
+#define GL_CLIP_PLANE4 0x3004
+#define GL_CLIP_PLANE5 0x3005
+#define GL_LIGHT0 0x4000
+#define GL_COLOR_BUFFER_BIT 0x00004000
+#define GL_LIGHT1 0x4001
+#define GL_LIGHT2 0x4002
+#define GL_LIGHT3 0x4003
+#define GL_LIGHT4 0x4004
+#define GL_LIGHT5 0x4005
+#define GL_LIGHT6 0x4006
+#define GL_LIGHT7 0x4007
+#define GL_HINT_BIT 0x00008000
+#define GL_POLYGON_OFFSET_FILL 0x8037
+#define GL_POLYGON_OFFSET_FACTOR 0x8038
+#define GL_ALPHA4 0x803B
+#define GL_ALPHA8 0x803C
+#define GL_ALPHA12 0x803D
+#define GL_ALPHA16 0x803E
+#define GL_LUMINANCE4 0x803F
+#define GL_LUMINANCE8 0x8040
+#define GL_LUMINANCE12 0x8041
+#define GL_LUMINANCE16 0x8042
+#define GL_LUMINANCE4_ALPHA4 0x8043
+#define GL_LUMINANCE6_ALPHA2 0x8044
+#define GL_LUMINANCE8_ALPHA8 0x8045
+#define GL_LUMINANCE12_ALPHA4 0x8046
+#define GL_LUMINANCE12_ALPHA12 0x8047
+#define GL_LUMINANCE16_ALPHA16 0x8048
+#define GL_INTENSITY 0x8049
+#define GL_INTENSITY4 0x804A
+#define GL_INTENSITY8 0x804B
+#define GL_INTENSITY12 0x804C
+#define GL_INTENSITY16 0x804D
+#define GL_RGB4 0x804F
+#define GL_RGB5 0x8050
+#define GL_RGB8 0x8051
+#define GL_RGB10 0x8052
+#define GL_RGB12 0x8053
+#define GL_RGB16 0x8054
+#define GL_RGBA2 0x8055
+#define GL_RGBA4 0x8056
+#define GL_RGB5_A1 0x8057
+#define GL_RGBA8 0x8058
+#define GL_RGB10_A2 0x8059
+#define GL_RGBA12 0x805A
+#define GL_RGBA16 0x805B
+#define GL_TEXTURE_RED_SIZE 0x805C
+#define GL_TEXTURE_GREEN_SIZE 0x805D
+#define GL_TEXTURE_BLUE_SIZE 0x805E
+#define GL_TEXTURE_ALPHA_SIZE 0x805F
+#define GL_TEXTURE_LUMINANCE_SIZE 0x8060
+#define GL_TEXTURE_INTENSITY_SIZE 0x8061
+#define GL_PROXY_TEXTURE_1D 0x8063
+#define GL_PROXY_TEXTURE_2D 0x8064
+#define GL_TEXTURE_PRIORITY 0x8066
+#define GL_TEXTURE_RESIDENT 0x8067
+#define GL_TEXTURE_BINDING_1D 0x8068
+#define GL_TEXTURE_BINDING_2D 0x8069
+#define GL_VERTEX_ARRAY 0x8074
+#define GL_NORMAL_ARRAY 0x8075
+#define GL_COLOR_ARRAY 0x8076
+#define GL_INDEX_ARRAY 0x8077
+#define GL_TEXTURE_COORD_ARRAY 0x8078
+#define GL_EDGE_FLAG_ARRAY 0x8079
+#define GL_VERTEX_ARRAY_SIZE 0x807A
+#define GL_VERTEX_ARRAY_TYPE 0x807B
+#define GL_VERTEX_ARRAY_STRIDE 0x807C
+#define GL_NORMAL_ARRAY_TYPE 0x807E
+#define GL_NORMAL_ARRAY_STRIDE 0x807F
+#define GL_COLOR_ARRAY_SIZE 0x8081
+#define GL_COLOR_ARRAY_TYPE 0x8082
+#define GL_COLOR_ARRAY_STRIDE 0x8083
+#define GL_INDEX_ARRAY_TYPE 0x8085
+#define GL_INDEX_ARRAY_STRIDE 0x8086
+#define GL_TEXTURE_COORD_ARRAY_SIZE 0x8088
+#define GL_TEXTURE_COORD_ARRAY_TYPE 0x8089
+#define GL_TEXTURE_COORD_ARRAY_STRIDE 0x808A
+#define GL_EDGE_FLAG_ARRAY_STRIDE 0x808C
+#define GL_VERTEX_ARRAY_POINTER 0x808E
+#define GL_NORMAL_ARRAY_POINTER 0x808F
+#define GL_COLOR_ARRAY_POINTER 0x8090
+#define GL_INDEX_ARRAY_POINTER 0x8091
+#define GL_TEXTURE_COORD_ARRAY_POINTER 0x8092
+#define GL_EDGE_FLAG_ARRAY_POINTER 0x8093
+#define GL_COLOR_INDEX1_EXT 0x80E2
+#define GL_COLOR_INDEX2_EXT 0x80E3
+#define GL_COLOR_INDEX4_EXT 0x80E4
+#define GL_COLOR_INDEX8_EXT 0x80E5
+#define GL_COLOR_INDEX12_EXT 0x80E6
+#define GL_COLOR_INDEX16_EXT 0x80E7
+#define GL_EVAL_BIT 0x00010000
+#define GL_LIST_BIT 0x00020000
+#define GL_TEXTURE_BIT 0x00040000
+#define GL_SCISSOR_BIT 0x00080000
+#define GL_ALL_ATTRIB_BITS 0x000fffff
+#define GL_CLIENT_ALL_ATTRIB_BITS 0xffffffff
+
+GLAPI void GLAPIENTRY glAccum (GLenum op, GLfloat value);
+GLAPI void GLAPIENTRY glAlphaFunc (GLenum func, GLclampf ref);
+GLAPI GLboolean GLAPIENTRY glAreTexturesResident (GLsizei n, const GLuint *textures, GLboolean *residences);
+GLAPI void GLAPIENTRY glArrayElement (GLint i);
+GLAPI void GLAPIENTRY glBegin (GLenum mode);
+GLAPI void GLAPIENTRY glBindTexture (GLenum target, GLuint texture);
+GLAPI void GLAPIENTRY glBitmap (GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, const GLubyte *bitmap);
+GLAPI void GLAPIENTRY glBlendFunc (GLenum sfactor, GLenum dfactor);
+GLAPI void GLAPIENTRY glCallList (GLuint list);
+GLAPI void GLAPIENTRY glCallLists (GLsizei n, GLenum type, const void *lists);
+GLAPI void GLAPIENTRY glClear (GLbitfield mask);
+GLAPI void GLAPIENTRY glClearAccum (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
+GLAPI void GLAPIENTRY glClearColor (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
+GLAPI void GLAPIENTRY glClearDepth (GLclampd depth);
+GLAPI void GLAPIENTRY glClearIndex (GLfloat c);
+GLAPI void GLAPIENTRY glClearStencil (GLint s);
+GLAPI void GLAPIENTRY glClipPlane (GLenum plane, const GLdouble *equation);
+GLAPI void GLAPIENTRY glColor3b (GLbyte red, GLbyte green, GLbyte blue);
+GLAPI void GLAPIENTRY glColor3bv (const GLbyte *v);
+GLAPI void GLAPIENTRY glColor3d (GLdouble red, GLdouble green, GLdouble blue);
+GLAPI void GLAPIENTRY glColor3dv (const GLdouble *v);
+GLAPI void GLAPIENTRY glColor3f (GLfloat red, GLfloat green, GLfloat blue);
+GLAPI void GLAPIENTRY glColor3fv (const GLfloat *v);
+GLAPI void GLAPIENTRY glColor3i (GLint red, GLint green, GLint blue);
+GLAPI void GLAPIENTRY glColor3iv (const GLint *v);
+GLAPI void GLAPIENTRY glColor3s (GLshort red, GLshort green, GLshort blue);
+GLAPI void GLAPIENTRY glColor3sv (const GLshort *v);
+GLAPI void GLAPIENTRY glColor3ub (GLubyte red, GLubyte green, GLubyte blue);
+GLAPI void GLAPIENTRY glColor3ubv (const GLubyte *v);
+GLAPI void GLAPIENTRY glColor3ui (GLuint red, GLuint green, GLuint blue);
+GLAPI void GLAPIENTRY glColor3uiv (const GLuint *v);
+GLAPI void GLAPIENTRY glColor3us (GLushort red, GLushort green, GLushort blue);
+GLAPI void GLAPIENTRY glColor3usv (const GLushort *v);
+GLAPI void GLAPIENTRY glColor4b (GLbyte red, GLbyte green, GLbyte blue, GLbyte alpha);
+GLAPI void GLAPIENTRY glColor4bv (const GLbyte *v);
+GLAPI void GLAPIENTRY glColor4d (GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha);
+GLAPI void GLAPIENTRY glColor4dv (const GLdouble *v);
+GLAPI void GLAPIENTRY glColor4f (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
+GLAPI void GLAPIENTRY glColor4fv (const GLfloat *v);
+GLAPI void GLAPIENTRY glColor4i (GLint red, GLint green, GLint blue, GLint alpha);
+GLAPI void GLAPIENTRY glColor4iv (const GLint *v);
+GLAPI void GLAPIENTRY glColor4s (GLshort red, GLshort green, GLshort blue, GLshort alpha);
+GLAPI void GLAPIENTRY glColor4sv (const GLshort *v);
+GLAPI void GLAPIENTRY glColor4ub (GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha);
+GLAPI void GLAPIENTRY glColor4ubv (const GLubyte *v);
+GLAPI void GLAPIENTRY glColor4ui (GLuint red, GLuint green, GLuint blue, GLuint alpha);
+GLAPI void GLAPIENTRY glColor4uiv (const GLuint *v);
+GLAPI void GLAPIENTRY glColor4us (GLushort red, GLushort green, GLushort blue, GLushort alpha);
+GLAPI void GLAPIENTRY glColor4usv (const GLushort *v);
+GLAPI void GLAPIENTRY glColorMask (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
+GLAPI void GLAPIENTRY glColorMaterial (GLenum face, GLenum mode);
+GLAPI void GLAPIENTRY glColorPointer (GLint size, GLenum type, GLsizei stride, const void *pointer);
+GLAPI void GLAPIENTRY glCopyPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum type);
+GLAPI void GLAPIENTRY glCopyTexImage1D (GLenum target, GLint level, GLenum internalFormat, GLint x, GLint y, GLsizei width, GLint border);
+GLAPI void GLAPIENTRY glCopyTexImage2D (GLenum target, GLint level, GLenum internalFormat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
+GLAPI void GLAPIENTRY glCopyTexSubImage1D (GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);
+GLAPI void GLAPIENTRY glCopyTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
+GLAPI void GLAPIENTRY glCullFace (GLenum mode);
+GLAPI void GLAPIENTRY glDeleteLists (GLuint list, GLsizei range);
+GLAPI void GLAPIENTRY glDeleteTextures (GLsizei n, const GLuint *textures);
+GLAPI void GLAPIENTRY glDepthFunc (GLenum func);
+GLAPI void GLAPIENTRY glDepthMask (GLboolean flag);
+GLAPI void GLAPIENTRY glDepthRange (GLclampd zNear, GLclampd zFar);
+GLAPI void GLAPIENTRY glDisable (GLenum cap);
+GLAPI void GLAPIENTRY glDisableClientState (GLenum array);
+GLAPI void GLAPIENTRY glDrawArrays (GLenum mode, GLint first, GLsizei count);
+GLAPI void GLAPIENTRY glDrawBuffer (GLenum mode);
+GLAPI void GLAPIENTRY glDrawElements (GLenum mode, GLsizei count, GLenum type, const void *indices);
+GLAPI void GLAPIENTRY glDrawPixels (GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels);
+GLAPI void GLAPIENTRY glEdgeFlag (GLboolean flag);
+GLAPI void GLAPIENTRY glEdgeFlagPointer (GLsizei stride, const void *pointer);
+GLAPI void GLAPIENTRY glEdgeFlagv (const GLboolean *flag);
+GLAPI void GLAPIENTRY glEnable (GLenum cap);
+GLAPI void GLAPIENTRY glEnableClientState (GLenum array);
+GLAPI void GLAPIENTRY glEnd (void);
+GLAPI void GLAPIENTRY glEndList (void);
+GLAPI void GLAPIENTRY glEvalCoord1d (GLdouble u);
+GLAPI void GLAPIENTRY glEvalCoord1dv (const GLdouble *u);
+GLAPI void GLAPIENTRY glEvalCoord1f (GLfloat u);
+GLAPI void GLAPIENTRY glEvalCoord1fv (const GLfloat *u);
+GLAPI void GLAPIENTRY glEvalCoord2d (GLdouble u, GLdouble v);
+GLAPI void GLAPIENTRY glEvalCoord2dv (const GLdouble *u);
+GLAPI void GLAPIENTRY glEvalCoord2f (GLfloat u, GLfloat v);
+GLAPI void GLAPIENTRY glEvalCoord2fv (const GLfloat *u);
+GLAPI void GLAPIENTRY glEvalMesh1 (GLenum mode, GLint i1, GLint i2);
+GLAPI void GLAPIENTRY glEvalMesh2 (GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2);
+GLAPI void GLAPIENTRY glEvalPoint1 (GLint i);
+GLAPI void GLAPIENTRY glEvalPoint2 (GLint i, GLint j);
+GLAPI void GLAPIENTRY glFeedbackBuffer (GLsizei size, GLenum type, GLfloat *buffer);
+GLAPI void GLAPIENTRY glFinish (void);
+GLAPI void GLAPIENTRY glFlush (void);
+GLAPI void GLAPIENTRY glFogf (GLenum pname, GLfloat param);
+GLAPI void GLAPIENTRY glFogfv (GLenum pname, const GLfloat *params);
+GLAPI void GLAPIENTRY glFogi (GLenum pname, GLint param);
+GLAPI void GLAPIENTRY glFogiv (GLenum pname, const GLint *params);
+GLAPI void GLAPIENTRY glFrontFace (GLenum mode);
+GLAPI void GLAPIENTRY glFrustum (GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar);
+GLAPI GLuint GLAPIENTRY glGenLists (GLsizei range);
+GLAPI void GLAPIENTRY glGenTextures (GLsizei n, GLuint *textures);
+GLAPI void GLAPIENTRY glGetBooleanv (GLenum pname, GLboolean *params);
+GLAPI void GLAPIENTRY glGetClipPlane (GLenum plane, GLdouble *equation);
+GLAPI void GLAPIENTRY glGetDoublev (GLenum pname, GLdouble *params);
+GLAPI GLenum GLAPIENTRY glGetError (void);
+GLAPI void GLAPIENTRY glGetFloatv (GLenum pname, GLfloat *params);
+GLAPI void GLAPIENTRY glGetIntegerv (GLenum pname, GLint *params);
+GLAPI void GLAPIENTRY glGetLightfv (GLenum light, GLenum pname, GLfloat *params);
+GLAPI void GLAPIENTRY glGetLightiv (GLenum light, GLenum pname, GLint *params);
+GLAPI void GLAPIENTRY glGetMapdv (GLenum target, GLenum query, GLdouble *v);
+GLAPI void GLAPIENTRY glGetMapfv (GLenum target, GLenum query, GLfloat *v);
+GLAPI void GLAPIENTRY glGetMapiv (GLenum target, GLenum query, GLint *v);
+GLAPI void GLAPIENTRY glGetMaterialfv (GLenum face, GLenum pname, GLfloat *params);
+GLAPI void GLAPIENTRY glGetMaterialiv (GLenum face, GLenum pname, GLint *params);
+GLAPI void GLAPIENTRY glGetPixelMapfv (GLenum map, GLfloat *values);
+GLAPI void GLAPIENTRY glGetPixelMapuiv (GLenum map, GLuint *values);
+GLAPI void GLAPIENTRY glGetPixelMapusv (GLenum map, GLushort *values);
+GLAPI void GLAPIENTRY glGetPointerv (GLenum pname, void* *params);
+GLAPI void GLAPIENTRY glGetPolygonStipple (GLubyte *mask);
+GLAPI const GLubyte * GLAPIENTRY glGetString (GLenum name);
+GLAPI void GLAPIENTRY glGetTexEnvfv (GLenum target, GLenum pname, GLfloat *params);
+GLAPI void GLAPIENTRY glGetTexEnviv (GLenum target, GLenum pname, GLint *params);
+GLAPI void GLAPIENTRY glGetTexGendv (GLenum coord, GLenum pname, GLdouble *params);
+GLAPI void GLAPIENTRY glGetTexGenfv (GLenum coord, GLenum pname, GLfloat *params);
+GLAPI void GLAPIENTRY glGetTexGeniv (GLenum coord, GLenum pname, GLint *params);
+GLAPI void GLAPIENTRY glGetTexImage (GLenum target, GLint level, GLenum format, GLenum type, void *pixels);
+GLAPI void GLAPIENTRY glGetTexLevelParameterfv (GLenum target, GLint level, GLenum pname, GLfloat *params);
+GLAPI void GLAPIENTRY glGetTexLevelParameteriv (GLenum target, GLint level, GLenum pname, GLint *params);
+GLAPI void GLAPIENTRY glGetTexParameterfv (GLenum target, GLenum pname, GLfloat *params);
+GLAPI void GLAPIENTRY glGetTexParameteriv (GLenum target, GLenum pname, GLint *params);
+GLAPI void GLAPIENTRY glHint (GLenum target, GLenum mode);
+GLAPI void GLAPIENTRY glIndexMask (GLuint mask);
+GLAPI void GLAPIENTRY glIndexPointer (GLenum type, GLsizei stride, const void *pointer);
+GLAPI void GLAPIENTRY glIndexd (GLdouble c);
+GLAPI void GLAPIENTRY glIndexdv (const GLdouble *c);
+GLAPI void GLAPIENTRY glIndexf (GLfloat c);
+GLAPI void GLAPIENTRY glIndexfv (const GLfloat *c);
+GLAPI void GLAPIENTRY glIndexi (GLint c);
+GLAPI void GLAPIENTRY glIndexiv (const GLint *c);
+GLAPI void GLAPIENTRY glIndexs (GLshort c);
+GLAPI void GLAPIENTRY glIndexsv (const GLshort *c);
+GLAPI void GLAPIENTRY glIndexub (GLubyte c);
+GLAPI void GLAPIENTRY glIndexubv (const GLubyte *c);
+GLAPI void GLAPIENTRY glInitNames (void);
+GLAPI void GLAPIENTRY glInterleavedArrays (GLenum format, GLsizei stride, const void *pointer);
+GLAPI GLboolean GLAPIENTRY glIsEnabled (GLenum cap);
+GLAPI GLboolean GLAPIENTRY glIsList (GLuint list);
+GLAPI GLboolean GLAPIENTRY glIsTexture (GLuint texture);
+GLAPI void GLAPIENTRY glLightModelf (GLenum pname, GLfloat param);
+GLAPI void GLAPIENTRY glLightModelfv (GLenum pname, const GLfloat *params);
+GLAPI void GLAPIENTRY glLightModeli (GLenum pname, GLint param);
+GLAPI void GLAPIENTRY glLightModeliv (GLenum pname, const GLint *params);
+GLAPI void GLAPIENTRY glLightf (GLenum light, GLenum pname, GLfloat param);
+GLAPI void GLAPIENTRY glLightfv (GLenum light, GLenum pname, const GLfloat *params);
+GLAPI void GLAPIENTRY glLighti (GLenum light, GLenum pname, GLint param);
+GLAPI void GLAPIENTRY glLightiv (GLenum light, GLenum pname, const GLint *params);
+GLAPI void GLAPIENTRY glLineStipple (GLint factor, GLushort pattern);
+GLAPI void GLAPIENTRY glLineWidth (GLfloat width);
+GLAPI void GLAPIENTRY glListBase (GLuint base);
+GLAPI void GLAPIENTRY glLoadIdentity (void);
+GLAPI void GLAPIENTRY glLoadMatrixd (const GLdouble *m);
+GLAPI void GLAPIENTRY glLoadMatrixf (const GLfloat *m);
+GLAPI void GLAPIENTRY glLoadName (GLuint name);
+GLAPI void GLAPIENTRY glLogicOp (GLenum opcode);
+GLAPI void GLAPIENTRY glMap1d (GLenum target, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble *points);
+GLAPI void GLAPIENTRY glMap1f (GLenum target, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat *points);
+GLAPI void GLAPIENTRY glMap2d (GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble *points);
+GLAPI void GLAPIENTRY glMap2f (GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat *points);
+GLAPI void GLAPIENTRY glMapGrid1d (GLint un, GLdouble u1, GLdouble u2);
+GLAPI void GLAPIENTRY glMapGrid1f (GLint un, GLfloat u1, GLfloat u2);
+GLAPI void GLAPIENTRY glMapGrid2d (GLint un, GLdouble u1, GLdouble u2, GLint vn, GLdouble v1, GLdouble v2);
+GLAPI void GLAPIENTRY glMapGrid2f (GLint un, GLfloat u1, GLfloat u2, GLint vn, GLfloat v1, GLfloat v2);
+GLAPI void GLAPIENTRY glMaterialf (GLenum face, GLenum pname, GLfloat param);
+GLAPI void GLAPIENTRY glMaterialfv (GLenum face, GLenum pname, const GLfloat *params);
+GLAPI void GLAPIENTRY glMateriali (GLenum face, GLenum pname, GLint param);
+GLAPI void GLAPIENTRY glMaterialiv (GLenum face, GLenum pname, const GLint *params);
+GLAPI void GLAPIENTRY glMatrixMode (GLenum mode);
+GLAPI void GLAPIENTRY glMultMatrixd (const GLdouble *m);
+GLAPI void GLAPIENTRY glMultMatrixf (const GLfloat *m);
+GLAPI void GLAPIENTRY glNewList (GLuint list, GLenum mode);
+GLAPI void GLAPIENTRY glNormal3b (GLbyte nx, GLbyte ny, GLbyte nz);
+GLAPI void GLAPIENTRY glNormal3bv (const GLbyte *v);
+GLAPI void GLAPIENTRY glNormal3d (GLdouble nx, GLdouble ny, GLdouble nz);
+GLAPI void GLAPIENTRY glNormal3dv (const GLdouble *v);
+GLAPI void GLAPIENTRY glNormal3f (GLfloat nx, GLfloat ny, GLfloat nz);
+GLAPI void GLAPIENTRY glNormal3fv (const GLfloat *v);
+GLAPI void GLAPIENTRY glNormal3i (GLint nx, GLint ny, GLint nz);
+GLAPI void GLAPIENTRY glNormal3iv (const GLint *v);
+GLAPI void GLAPIENTRY glNormal3s (GLshort nx, GLshort ny, GLshort nz);
+GLAPI void GLAPIENTRY glNormal3sv (const GLshort *v);
+GLAPI void GLAPIENTRY glNormalPointer (GLenum type, GLsizei stride, const void *pointer);
+GLAPI void GLAPIENTRY glOrtho (GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar);
+GLAPI void GLAPIENTRY glPassThrough (GLfloat token);
+GLAPI void GLAPIENTRY glPixelMapfv (GLenum map, GLsizei mapsize, const GLfloat *values);
+GLAPI void GLAPIENTRY glPixelMapuiv (GLenum map, GLsizei mapsize, const GLuint *values);
+GLAPI void GLAPIENTRY glPixelMapusv (GLenum map, GLsizei mapsize, const GLushort *values);
+GLAPI void GLAPIENTRY glPixelStoref (GLenum pname, GLfloat param);
+GLAPI void GLAPIENTRY glPixelStorei (GLenum pname, GLint param);
+GLAPI void GLAPIENTRY glPixelTransferf (GLenum pname, GLfloat param);
+GLAPI void GLAPIENTRY glPixelTransferi (GLenum pname, GLint param);
+GLAPI void GLAPIENTRY glPixelZoom (GLfloat xfactor, GLfloat yfactor);
+GLAPI void GLAPIENTRY glPointSize (GLfloat size);
+GLAPI void GLAPIENTRY glPolygonMode (GLenum face, GLenum mode);
+GLAPI void GLAPIENTRY glPolygonOffset (GLfloat factor, GLfloat units);
+GLAPI void GLAPIENTRY glPolygonStipple (const GLubyte *mask);
+GLAPI void GLAPIENTRY glPopAttrib (void);
+GLAPI void GLAPIENTRY glPopClientAttrib (void);
+GLAPI void GLAPIENTRY glPopMatrix (void);
+GLAPI void GLAPIENTRY glPopName (void);
+GLAPI void GLAPIENTRY glPrioritizeTextures (GLsizei n, const GLuint *textures, const GLclampf *priorities);
+GLAPI void GLAPIENTRY glPushAttrib (GLbitfield mask);
+GLAPI void GLAPIENTRY glPushClientAttrib (GLbitfield mask);
+GLAPI void GLAPIENTRY glPushMatrix (void);
+GLAPI void GLAPIENTRY glPushName (GLuint name);
+GLAPI void GLAPIENTRY glRasterPos2d (GLdouble x, GLdouble y);
+GLAPI void GLAPIENTRY glRasterPos2dv (const GLdouble *v);
+GLAPI void GLAPIENTRY glRasterPos2f (GLfloat x, GLfloat y);
+GLAPI void GLAPIENTRY glRasterPos2fv (const GLfloat *v);
+GLAPI void GLAPIENTRY glRasterPos2i (GLint x, GLint y);
+GLAPI void GLAPIENTRY glRasterPos2iv (const GLint *v);
+GLAPI void GLAPIENTRY glRasterPos2s (GLshort x, GLshort y);
+GLAPI void GLAPIENTRY glRasterPos2sv (const GLshort *v);
+GLAPI void GLAPIENTRY glRasterPos3d (GLdouble x, GLdouble y, GLdouble z);
+GLAPI void GLAPIENTRY glRasterPos3dv (const GLdouble *v);
+GLAPI void GLAPIENTRY glRasterPos3f (GLfloat x, GLfloat y, GLfloat z);
+GLAPI void GLAPIENTRY glRasterPos3fv (const GLfloat *v);
+GLAPI void GLAPIENTRY glRasterPos3i (GLint x, GLint y, GLint z);
+GLAPI void GLAPIENTRY glRasterPos3iv (const GLint *v);
+GLAPI void GLAPIENTRY glRasterPos3s (GLshort x, GLshort y, GLshort z);
+GLAPI void GLAPIENTRY glRasterPos3sv (const GLshort *v);
+GLAPI void GLAPIENTRY glRasterPos4d (GLdouble x, GLdouble y, GLdouble z, GLdouble w);
+GLAPI void GLAPIENTRY glRasterPos4dv (const GLdouble *v);
+GLAPI void GLAPIENTRY glRasterPos4f (GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+GLAPI void GLAPIENTRY glRasterPos4fv (const GLfloat *v);
+GLAPI void GLAPIENTRY glRasterPos4i (GLint x, GLint y, GLint z, GLint w);
+GLAPI void GLAPIENTRY glRasterPos4iv (const GLint *v);
+GLAPI void GLAPIENTRY glRasterPos4s (GLshort x, GLshort y, GLshort z, GLshort w);
+GLAPI void GLAPIENTRY glRasterPos4sv (const GLshort *v);
+GLAPI void GLAPIENTRY glReadBuffer (GLenum mode);
+GLAPI void GLAPIENTRY glReadPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void *pixels);
+GLAPI void GLAPIENTRY glRectd (GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2);
+GLAPI void GLAPIENTRY glRectdv (const GLdouble *v1, const GLdouble *v2);
+GLAPI void GLAPIENTRY glRectf (GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2);
+GLAPI void GLAPIENTRY glRectfv (const GLfloat *v1, const GLfloat *v2);
+GLAPI void GLAPIENTRY glRecti (GLint x1, GLint y1, GLint x2, GLint y2);
+GLAPI void GLAPIENTRY glRectiv (const GLint *v1, const GLint *v2);
+GLAPI void GLAPIENTRY glRects (GLshort x1, GLshort y1, GLshort x2, GLshort y2);
+GLAPI void GLAPIENTRY glRectsv (const GLshort *v1, const GLshort *v2);
+GLAPI GLint GLAPIENTRY glRenderMode (GLenum mode);
+GLAPI void GLAPIENTRY glRotated (GLdouble angle, GLdouble x, GLdouble y, GLdouble z);
+GLAPI void GLAPIENTRY glRotatef (GLfloat angle, GLfloat x, GLfloat y, GLfloat z);
+GLAPI void GLAPIENTRY glScaled (GLdouble x, GLdouble y, GLdouble z);
+GLAPI void GLAPIENTRY glScalef (GLfloat x, GLfloat y, GLfloat z);
+GLAPI void GLAPIENTRY glScissor (GLint x, GLint y, GLsizei width, GLsizei height);
+GLAPI void GLAPIENTRY glSelectBuffer (GLsizei size, GLuint *buffer);
+GLAPI void GLAPIENTRY glShadeModel (GLenum mode);
+GLAPI void GLAPIENTRY glStencilFunc (GLenum func, GLint ref, GLuint mask);
+GLAPI void GLAPIENTRY glStencilMask (GLuint mask);
+GLAPI void GLAPIENTRY glStencilOp (GLenum fail, GLenum zfail, GLenum zpass);
+GLAPI void GLAPIENTRY glTexCoord1d (GLdouble s);
+GLAPI void GLAPIENTRY glTexCoord1dv (const GLdouble *v);
+GLAPI void GLAPIENTRY glTexCoord1f (GLfloat s);
+GLAPI void GLAPIENTRY glTexCoord1fv (const GLfloat *v);
+GLAPI void GLAPIENTRY glTexCoord1i (GLint s);
+GLAPI void GLAPIENTRY glTexCoord1iv (const GLint *v);
+GLAPI void GLAPIENTRY glTexCoord1s (GLshort s);
+GLAPI void GLAPIENTRY glTexCoord1sv (const GLshort *v);
+GLAPI void GLAPIENTRY glTexCoord2d (GLdouble s, GLdouble t);
+GLAPI void GLAPIENTRY glTexCoord2dv (const GLdouble *v);
+GLAPI void GLAPIENTRY glTexCoord2f (GLfloat s, GLfloat t);
+GLAPI void GLAPIENTRY glTexCoord2fv (const GLfloat *v);
+GLAPI void GLAPIENTRY glTexCoord2i (GLint s, GLint t);
+GLAPI void GLAPIENTRY glTexCoord2iv (const GLint *v);
+GLAPI void GLAPIENTRY glTexCoord2s (GLshort s, GLshort t);
+GLAPI void GLAPIENTRY glTexCoord2sv (const GLshort *v);
+GLAPI void GLAPIENTRY glTexCoord3d (GLdouble s, GLdouble t, GLdouble r);
+GLAPI void GLAPIENTRY glTexCoord3dv (const GLdouble *v);
+GLAPI void GLAPIENTRY glTexCoord3f (GLfloat s, GLfloat t, GLfloat r);
+GLAPI void GLAPIENTRY glTexCoord3fv (const GLfloat *v);
+GLAPI void GLAPIENTRY glTexCoord3i (GLint s, GLint t, GLint r);
+GLAPI void GLAPIENTRY glTexCoord3iv (const GLint *v);
+GLAPI void GLAPIENTRY glTexCoord3s (GLshort s, GLshort t, GLshort r);
+GLAPI void GLAPIENTRY glTexCoord3sv (const GLshort *v);
+GLAPI void GLAPIENTRY glTexCoord4d (GLdouble s, GLdouble t, GLdouble r, GLdouble q);
+GLAPI void GLAPIENTRY glTexCoord4dv (const GLdouble *v);
+GLAPI void GLAPIENTRY glTexCoord4f (GLfloat s, GLfloat t, GLfloat r, GLfloat q);
+GLAPI void GLAPIENTRY glTexCoord4fv (const GLfloat *v);
+GLAPI void GLAPIENTRY glTexCoord4i (GLint s, GLint t, GLint r, GLint q);
+GLAPI void GLAPIENTRY glTexCoord4iv (const GLint *v);
+GLAPI void GLAPIENTRY glTexCoord4s (GLshort s, GLshort t, GLshort r, GLshort q);
+GLAPI void GLAPIENTRY glTexCoord4sv (const GLshort *v);
+GLAPI void GLAPIENTRY glTexCoordPointer (GLint size, GLenum type, GLsizei stride, const void *pointer);
+GLAPI void GLAPIENTRY glTexEnvf (GLenum target, GLenum pname, GLfloat param);
+GLAPI void GLAPIENTRY glTexEnvfv (GLenum target, GLenum pname, const GLfloat *params);
+GLAPI void GLAPIENTRY glTexEnvi (GLenum target, GLenum pname, GLint param);
+GLAPI void GLAPIENTRY glTexEnviv (GLenum target, GLenum pname, const GLint *params);
+GLAPI void GLAPIENTRY glTexGend (GLenum coord, GLenum pname, GLdouble param);
+GLAPI void GLAPIENTRY glTexGendv (GLenum coord, GLenum pname, const GLdouble *params);
+GLAPI void GLAPIENTRY glTexGenf (GLenum coord, GLenum pname, GLfloat param);
+GLAPI void GLAPIENTRY glTexGenfv (GLenum coord, GLenum pname, const GLfloat *params);
+GLAPI void GLAPIENTRY glTexGeni (GLenum coord, GLenum pname, GLint param);
+GLAPI void GLAPIENTRY glTexGeniv (GLenum coord, GLenum pname, const GLint *params);
+GLAPI void GLAPIENTRY glTexImage1D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const void *pixels);
+GLAPI void GLAPIENTRY glTexImage2D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels);
+GLAPI void GLAPIENTRY glTexParameterf (GLenum target, GLenum pname, GLfloat param);
+GLAPI void GLAPIENTRY glTexParameterfv (GLenum target, GLenum pname, const GLfloat *params);
+GLAPI void GLAPIENTRY glTexParameteri (GLenum target, GLenum pname, GLint param);
+GLAPI void GLAPIENTRY glTexParameteriv (GLenum target, GLenum pname, const GLint *params);
+GLAPI void GLAPIENTRY glTexSubImage1D (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void *pixels);
+GLAPI void GLAPIENTRY glTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels);
+GLAPI void GLAPIENTRY glTranslated (GLdouble x, GLdouble y, GLdouble z);
+GLAPI void GLAPIENTRY glTranslatef (GLfloat x, GLfloat y, GLfloat z);
+GLAPI void GLAPIENTRY glVertex2d (GLdouble x, GLdouble y);
+GLAPI void GLAPIENTRY glVertex2dv (const GLdouble *v);
+GLAPI void GLAPIENTRY glVertex2f (GLfloat x, GLfloat y);
+GLAPI void GLAPIENTRY glVertex2fv (const GLfloat *v);
+GLAPI void GLAPIENTRY glVertex2i (GLint x, GLint y);
+GLAPI void GLAPIENTRY glVertex2iv (const GLint *v);
+GLAPI void GLAPIENTRY glVertex2s (GLshort x, GLshort y);
+GLAPI void GLAPIENTRY glVertex2sv (const GLshort *v);
+GLAPI void GLAPIENTRY glVertex3d (GLdouble x, GLdouble y, GLdouble z);
+GLAPI void GLAPIENTRY glVertex3dv (const GLdouble *v);
+GLAPI void GLAPIENTRY glVertex3f (GLfloat x, GLfloat y, GLfloat z);
+GLAPI void GLAPIENTRY glVertex3fv (const GLfloat *v);
+GLAPI void GLAPIENTRY glVertex3i (GLint x, GLint y, GLint z);
+GLAPI void GLAPIENTRY glVertex3iv (const GLint *v);
+GLAPI void GLAPIENTRY glVertex3s (GLshort x, GLshort y, GLshort z);
+GLAPI void GLAPIENTRY glVertex3sv (const GLshort *v);
+GLAPI void GLAPIENTRY glVertex4d (GLdouble x, GLdouble y, GLdouble z, GLdouble w);
+GLAPI void GLAPIENTRY glVertex4dv (const GLdouble *v);
+GLAPI void GLAPIENTRY glVertex4f (GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+GLAPI void GLAPIENTRY glVertex4fv (const GLfloat *v);
+GLAPI void GLAPIENTRY glVertex4i (GLint x, GLint y, GLint z, GLint w);
+GLAPI void GLAPIENTRY glVertex4iv (const GLint *v);
+GLAPI void GLAPIENTRY glVertex4s (GLshort x, GLshort y, GLshort z, GLshort w);
+GLAPI void GLAPIENTRY glVertex4sv (const GLshort *v);
+GLAPI void GLAPIENTRY glVertexPointer (GLint size, GLenum type, GLsizei stride, const void *pointer);
+GLAPI void GLAPIENTRY glViewport (GLint x, GLint y, GLsizei width, GLsizei height);
+
+#define GLEW_VERSION_1_1 GLEW_GET_VAR(__GLEW_VERSION_1_1)
+
+#endif /* GL_VERSION_1_1 */
+
+/* ---------------------------------- GLU ---------------------------------- */
+
+#ifndef GLEW_NO_GLU
+#  ifdef __APPLE__
+#    include <Availability.h>
+#    if defined(__IPHONE_OS_VERSION_MIN_REQUIRED)
+#      define GLEW_NO_GLU
+#    endif
+#  endif
+#endif
+
+#ifndef GLEW_NO_GLU
+/* this is where we can safely include GLU */
+#  if defined(__APPLE__) && defined(__MACH__)
+#    include <OpenGL/glu.h>
+#  else
+#    include <GL/glu.h>
+#  endif
+#endif
+
+/* ----------------------------- GL_VERSION_1_2 ---------------------------- */
+
+#ifndef GL_VERSION_1_2
+#define GL_VERSION_1_2 1
+
+#define GL_SMOOTH_POINT_SIZE_RANGE 0x0B12
+#define GL_SMOOTH_POINT_SIZE_GRANULARITY 0x0B13
+#define GL_SMOOTH_LINE_WIDTH_RANGE 0x0B22
+#define GL_SMOOTH_LINE_WIDTH_GRANULARITY 0x0B23
+#define GL_UNSIGNED_BYTE_3_3_2 0x8032
+#define GL_UNSIGNED_SHORT_4_4_4_4 0x8033
+#define GL_UNSIGNED_SHORT_5_5_5_1 0x8034
+#define GL_UNSIGNED_INT_8_8_8_8 0x8035
+#define GL_UNSIGNED_INT_10_10_10_2 0x8036
+#define GL_RESCALE_NORMAL 0x803A
+#define GL_TEXTURE_BINDING_3D 0x806A
+#define GL_PACK_SKIP_IMAGES 0x806B
+#define GL_PACK_IMAGE_HEIGHT 0x806C
+#define GL_UNPACK_SKIP_IMAGES 0x806D
+#define GL_UNPACK_IMAGE_HEIGHT 0x806E
+#define GL_TEXTURE_3D 0x806F
+#define GL_PROXY_TEXTURE_3D 0x8070
+#define GL_TEXTURE_DEPTH 0x8071
+#define GL_TEXTURE_WRAP_R 0x8072
+#define GL_MAX_3D_TEXTURE_SIZE 0x8073
+#define GL_BGR 0x80E0
+#define GL_BGRA 0x80E1
+#define GL_MAX_ELEMENTS_VERTICES 0x80E8
+#define GL_MAX_ELEMENTS_INDICES 0x80E9
+#define GL_CLAMP_TO_EDGE 0x812F
+#define GL_TEXTURE_MIN_LOD 0x813A
+#define GL_TEXTURE_MAX_LOD 0x813B
+#define GL_TEXTURE_BASE_LEVEL 0x813C
+#define GL_TEXTURE_MAX_LEVEL 0x813D
+#define GL_LIGHT_MODEL_COLOR_CONTROL 0x81F8
+#define GL_SINGLE_COLOR 0x81F9
+#define GL_SEPARATE_SPECULAR_COLOR 0x81FA
+#define GL_UNSIGNED_BYTE_2_3_3_REV 0x8362
+#define GL_UNSIGNED_SHORT_5_6_5 0x8363
+#define GL_UNSIGNED_SHORT_5_6_5_REV 0x8364
+#define GL_UNSIGNED_SHORT_4_4_4_4_REV 0x8365
+#define GL_UNSIGNED_SHORT_1_5_5_5_REV 0x8366
+#define GL_UNSIGNED_INT_8_8_8_8_REV 0x8367
+#define GL_ALIASED_POINT_SIZE_RANGE 0x846D
+#define GL_ALIASED_LINE_WIDTH_RANGE 0x846E
+
+typedef void (GLAPIENTRY * PFNGLCOPYTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
+typedef void (GLAPIENTRY * PFNGLDRAWRANGEELEMENTSPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices);
+typedef void (GLAPIENTRY * PFNGLTEXIMAGE3DPROC) (GLenum target, GLint level, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels);
+typedef void (GLAPIENTRY * PFNGLTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels);
+
+#define glCopyTexSubImage3D GLEW_GET_FUN(__glewCopyTexSubImage3D)
+#define glDrawRangeElements GLEW_GET_FUN(__glewDrawRangeElements)
+#define glTexImage3D GLEW_GET_FUN(__glewTexImage3D)
+#define glTexSubImage3D GLEW_GET_FUN(__glewTexSubImage3D)
+
+#define GLEW_VERSION_1_2 GLEW_GET_VAR(__GLEW_VERSION_1_2)
+
+#endif /* GL_VERSION_1_2 */
+
+/* ---------------------------- GL_VERSION_1_2_1 --------------------------- */
+
+#ifndef GL_VERSION_1_2_1
+#define GL_VERSION_1_2_1 1
+
+#define GLEW_VERSION_1_2_1 GLEW_GET_VAR(__GLEW_VERSION_1_2_1)
+
+#endif /* GL_VERSION_1_2_1 */
+
+/* ----------------------------- GL_VERSION_1_3 ---------------------------- */
+
+#ifndef GL_VERSION_1_3
+#define GL_VERSION_1_3 1
+
+#define GL_MULTISAMPLE 0x809D
+#define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E
+#define GL_SAMPLE_ALPHA_TO_ONE 0x809F
+#define GL_SAMPLE_COVERAGE 0x80A0
+#define GL_SAMPLE_BUFFERS 0x80A8
+#define GL_SAMPLES 0x80A9
+#define GL_SAMPLE_COVERAGE_VALUE 0x80AA
+#define GL_SAMPLE_COVERAGE_INVERT 0x80AB
+#define GL_CLAMP_TO_BORDER 0x812D
+#define GL_TEXTURE0 0x84C0
+#define GL_TEXTURE1 0x84C1
+#define GL_TEXTURE2 0x84C2
+#define GL_TEXTURE3 0x84C3
+#define GL_TEXTURE4 0x84C4
+#define GL_TEXTURE5 0x84C5
+#define GL_TEXTURE6 0x84C6
+#define GL_TEXTURE7 0x84C7
+#define GL_TEXTURE8 0x84C8
+#define GL_TEXTURE9 0x84C9
+#define GL_TEXTURE10 0x84CA
+#define GL_TEXTURE11 0x84CB
+#define GL_TEXTURE12 0x84CC
+#define GL_TEXTURE13 0x84CD
+#define GL_TEXTURE14 0x84CE
+#define GL_TEXTURE15 0x84CF
+#define GL_TEXTURE16 0x84D0
+#define GL_TEXTURE17 0x84D1
+#define GL_TEXTURE18 0x84D2
+#define GL_TEXTURE19 0x84D3
+#define GL_TEXTURE20 0x84D4
+#define GL_TEXTURE21 0x84D5
+#define GL_TEXTURE22 0x84D6
+#define GL_TEXTURE23 0x84D7
+#define GL_TEXTURE24 0x84D8
+#define GL_TEXTURE25 0x84D9
+#define GL_TEXTURE26 0x84DA
+#define GL_TEXTURE27 0x84DB
+#define GL_TEXTURE28 0x84DC
+#define GL_TEXTURE29 0x84DD
+#define GL_TEXTURE30 0x84DE
+#define GL_TEXTURE31 0x84DF
+#define GL_ACTIVE_TEXTURE 0x84E0
+#define GL_CLIENT_ACTIVE_TEXTURE 0x84E1
+#define GL_MAX_TEXTURE_UNITS 0x84E2
+#define GL_TRANSPOSE_MODELVIEW_MATRIX 0x84E3
+#define GL_TRANSPOSE_PROJECTION_MATRIX 0x84E4
+#define GL_TRANSPOSE_TEXTURE_MATRIX 0x84E5
+#define GL_TRANSPOSE_COLOR_MATRIX 0x84E6
+#define GL_SUBTRACT 0x84E7
+#define GL_COMPRESSED_ALPHA 0x84E9
+#define GL_COMPRESSED_LUMINANCE 0x84EA
+#define GL_COMPRESSED_LUMINANCE_ALPHA 0x84EB
+#define GL_COMPRESSED_INTENSITY 0x84EC
+#define GL_COMPRESSED_RGB 0x84ED
+#define GL_COMPRESSED_RGBA 0x84EE
+#define GL_TEXTURE_COMPRESSION_HINT 0x84EF
+#define GL_NORMAL_MAP 0x8511
+#define GL_REFLECTION_MAP 0x8512
+#define GL_TEXTURE_CUBE_MAP 0x8513
+#define GL_TEXTURE_BINDING_CUBE_MAP 0x8514
+#define GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x8515
+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x8516
+#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x8517
+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x8518
+#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x8519
+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x851A
+#define GL_PROXY_TEXTURE_CUBE_MAP 0x851B
+#define GL_MAX_CUBE_MAP_TEXTURE_SIZE 0x851C
+#define GL_COMBINE 0x8570
+#define GL_COMBINE_RGB 0x8571
+#define GL_COMBINE_ALPHA 0x8572
+#define GL_RGB_SCALE 0x8573
+#define GL_ADD_SIGNED 0x8574
+#define GL_INTERPOLATE 0x8575
+#define GL_CONSTANT 0x8576
+#define GL_PRIMARY_COLOR 0x8577
+#define GL_PREVIOUS 0x8578
+#define GL_SOURCE0_RGB 0x8580
+#define GL_SOURCE1_RGB 0x8581
+#define GL_SOURCE2_RGB 0x8582
+#define GL_SOURCE0_ALPHA 0x8588
+#define GL_SOURCE1_ALPHA 0x8589
+#define GL_SOURCE2_ALPHA 0x858A
+#define GL_OPERAND0_RGB 0x8590
+#define GL_OPERAND1_RGB 0x8591
+#define GL_OPERAND2_RGB 0x8592
+#define GL_OPERAND0_ALPHA 0x8598
+#define GL_OPERAND1_ALPHA 0x8599
+#define GL_OPERAND2_ALPHA 0x859A
+#define GL_TEXTURE_COMPRESSED_IMAGE_SIZE 0x86A0
+#define GL_TEXTURE_COMPRESSED 0x86A1
+#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2
+#define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3
+#define GL_DOT3_RGB 0x86AE
+#define GL_DOT3_RGBA 0x86AF
+#define GL_MULTISAMPLE_BIT 0x20000000
+
+typedef void (GLAPIENTRY * PFNGLACTIVETEXTUREPROC) (GLenum texture);
+typedef void (GLAPIENTRY * PFNGLCLIENTACTIVETEXTUREPROC) (GLenum texture);
+typedef void (GLAPIENTRY * PFNGLCOMPRESSEDTEXIMAGE1DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void *data);
+typedef void (GLAPIENTRY * PFNGLCOMPRESSEDTEXIMAGE2DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *data);
+typedef void (GLAPIENTRY * PFNGLCOMPRESSEDTEXIMAGE3DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *data);
+typedef void (GLAPIENTRY * PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *data);
+typedef void (GLAPIENTRY * PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data);
+typedef void (GLAPIENTRY * PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data);
+typedef void (GLAPIENTRY * PFNGLGETCOMPRESSEDTEXIMAGEPROC) (GLenum target, GLint lod, void *img);
+typedef void (GLAPIENTRY * PFNGLLOADTRANSPOSEMATRIXDPROC) (const GLdouble m[16]);
+typedef void (GLAPIENTRY * PFNGLLOADTRANSPOSEMATRIXFPROC) (const GLfloat m[16]);
+typedef void (GLAPIENTRY * PFNGLMULTTRANSPOSEMATRIXDPROC) (const GLdouble m[16]);
+typedef void (GLAPIENTRY * PFNGLMULTTRANSPOSEMATRIXFPROC) (const GLfloat m[16]);
+typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD1DPROC) (GLenum target, GLdouble s);
+typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD1DVPROC) (GLenum target, const GLdouble *v);
+typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD1FPROC) (GLenum target, GLfloat s);
+typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD1FVPROC) (GLenum target, const GLfloat *v);
+typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD1IPROC) (GLenum target, GLint s);
+typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD1IVPROC) (GLenum target, const GLint *v);
+typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD1SPROC) (GLenum target, GLshort s);
+typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD1SVPROC) (GLenum target, const GLshort *v);
+typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD2DPROC) (GLenum target, GLdouble s, GLdouble t);
+typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD2DVPROC) (GLenum target, const GLdouble *v);
+typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD2FPROC) (GLenum target, GLfloat s, GLfloat t);
+typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD2FVPROC) (GLenum target, const GLfloat *v);
+typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD2IPROC) (GLenum target, GLint s, GLint t);
+typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD2IVPROC) (GLenum target, const GLint *v);
+typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD2SPROC) (GLenum target, GLshort s, GLshort t);
+typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD2SVPROC) (GLenum target, const GLshort *v);
+typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD3DPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r);
+typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD3DVPROC) (GLenum target, const GLdouble *v);
+typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD3FPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r);
+typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD3FVPROC) (GLenum target, const GLfloat *v);
+typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD3IPROC) (GLenum target, GLint s, GLint t, GLint r);
+typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD3IVPROC) (GLenum target, const GLint *v);
+typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD3SPROC) (GLenum target, GLshort s, GLshort t, GLshort r);
+typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD3SVPROC) (GLenum target, const GLshort *v);
+typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD4DPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);
+typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD4DVPROC) (GLenum target, const GLdouble *v);
+typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD4FPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
+typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD4FVPROC) (GLenum target, const GLfloat *v);
+typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD4IPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q);
+typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD4IVPROC) (GLenum target, const GLint *v);
+typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD4SPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);
+typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD4SVPROC) (GLenum target, const GLshort *v);
+typedef void (GLAPIENTRY * PFNGLSAMPLECOVERAGEPROC) (GLclampf value, GLboolean invert);
+
+#define glActiveTexture GLEW_GET_FUN(__glewActiveTexture)
+#define glClientActiveTexture GLEW_GET_FUN(__glewClientActiveTexture)
+#define glCompressedTexImage1D GLEW_GET_FUN(__glewCompressedTexImage1D)
+#define glCompressedTexImage2D GLEW_GET_FUN(__glewCompressedTexImage2D)
+#define glCompressedTexImage3D GLEW_GET_FUN(__glewCompressedTexImage3D)
+#define glCompressedTexSubImage1D GLEW_GET_FUN(__glewCompressedTexSubImage1D)
+#define glCompressedTexSubImage2D GLEW_GET_FUN(__glewCompressedTexSubImage2D)
+#define glCompressedTexSubImage3D GLEW_GET_FUN(__glewCompressedTexSubImage3D)
+#define glGetCompressedTexImage GLEW_GET_FUN(__glewGetCompressedTexImage)
+#define glLoadTransposeMatrixd GLEW_GET_FUN(__glewLoadTransposeMatrixd)
+#define glLoadTransposeMatrixf GLEW_GET_FUN(__glewLoadTransposeMatrixf)
+#define glMultTransposeMatrixd GLEW_GET_FUN(__glewMultTransposeMatrixd)
+#define glMultTransposeMatrixf GLEW_GET_FUN(__glewMultTransposeMatrixf)
+#define glMultiTexCoord1d GLEW_GET_FUN(__glewMultiTexCoord1d)
+#define glMultiTexCoord1dv GLEW_GET_FUN(__glewMultiTexCoord1dv)
+#define glMultiTexCoord1f GLEW_GET_FUN(__glewMultiTexCoord1f)
+#define glMultiTexCoord1fv GLEW_GET_FUN(__glewMultiTexCoord1fv)
+#define glMultiTexCoord1i GLEW_GET_FUN(__glewMultiTexCoord1i)
+#define glMultiTexCoord1iv GLEW_GET_FUN(__glewMultiTexCoord1iv)
+#define glMultiTexCoord1s GLEW_GET_FUN(__glewMultiTexCoord1s)
+#define glMultiTexCoord1sv GLEW_GET_FUN(__glewMultiTexCoord1sv)
+#define glMultiTexCoord2d GLEW_GET_FUN(__glewMultiTexCoord2d)
+#define glMultiTexCoord2dv GLEW_GET_FUN(__glewMultiTexCoord2dv)
+#define glMultiTexCoord2f GLEW_GET_FUN(__glewMultiTexCoord2f)
+#define glMultiTexCoord2fv GLEW_GET_FUN(__glewMultiTexCoord2fv)
+#define glMultiTexCoord2i GLEW_GET_FUN(__glewMultiTexCoord2i)
+#define glMultiTexCoord2iv GLEW_GET_FUN(__glewMultiTexCoord2iv)
+#define glMultiTexCoord2s GLEW_GET_FUN(__glewMultiTexCoord2s)
+#define glMultiTexCoord2sv GLEW_GET_FUN(__glewMultiTexCoord2sv)
+#define glMultiTexCoord3d GLEW_GET_FUN(__glewMultiTexCoord3d)
+#define glMultiTexCoord3dv GLEW_GET_FUN(__glewMultiTexCoord3dv)
+#define glMultiTexCoord3f GLEW_GET_FUN(__glewMultiTexCoord3f)
+#define glMultiTexCoord3fv GLEW_GET_FUN(__glewMultiTexCoord3fv)
+#define glMultiTexCoord3i GLEW_GET_FUN(__glewMultiTexCoord3i)
+#define glMultiTexCoord3iv GLEW_GET_FUN(__glewMultiTexCoord3iv)
+#define glMultiTexCoord3s GLEW_GET_FUN(__glewMultiTexCoord3s)
+#define glMultiTexCoord3sv GLEW_GET_FUN(__glewMultiTexCoord3sv)
+#define glMultiTexCoord4d GLEW_GET_FUN(__glewMultiTexCoord4d)
+#define glMultiTexCoord4dv GLEW_GET_FUN(__glewMultiTexCoord4dv)
+#define glMultiTexCoord4f GLEW_GET_FUN(__glewMultiTexCoord4f)
+#define glMultiTexCoord4fv GLEW_GET_FUN(__glewMultiTexCoord4fv)
+#define glMultiTexCoord4i GLEW_GET_FUN(__glewMultiTexCoord4i)
+#define glMultiTexCoord4iv GLEW_GET_FUN(__glewMultiTexCoord4iv)
+#define glMultiTexCoord4s GLEW_GET_FUN(__glewMultiTexCoord4s)
+#define glMultiTexCoord4sv GLEW_GET_FUN(__glewMultiTexCoord4sv)
+#define glSampleCoverage GLEW_GET_FUN(__glewSampleCoverage)
+
+#define GLEW_VERSION_1_3 GLEW_GET_VAR(__GLEW_VERSION_1_3)
+
+#endif /* GL_VERSION_1_3 */
+
+/* ----------------------------- GL_VERSION_1_4 ---------------------------- */
+
+#ifndef GL_VERSION_1_4
+#define GL_VERSION_1_4 1
+
+#define GL_BLEND_DST_RGB 0x80C8
+#define GL_BLEND_SRC_RGB 0x80C9
+#define GL_BLEND_DST_ALPHA 0x80CA
+#define GL_BLEND_SRC_ALPHA 0x80CB
+#define GL_POINT_SIZE_MIN 0x8126
+#define GL_POINT_SIZE_MAX 0x8127
+#define GL_POINT_FADE_THRESHOLD_SIZE 0x8128
+#define GL_POINT_DISTANCE_ATTENUATION 0x8129
+#define GL_GENERATE_MIPMAP 0x8191
+#define GL_GENERATE_MIPMAP_HINT 0x8192
+#define GL_DEPTH_COMPONENT16 0x81A5
+#define GL_DEPTH_COMPONENT24 0x81A6
+#define GL_DEPTH_COMPONENT32 0x81A7
+#define GL_MIRRORED_REPEAT 0x8370
+#define GL_FOG_COORDINATE_SOURCE 0x8450
+#define GL_FOG_COORDINATE 0x8451
+#define GL_FRAGMENT_DEPTH 0x8452
+#define GL_CURRENT_FOG_COORDINATE 0x8453
+#define GL_FOG_COORDINATE_ARRAY_TYPE 0x8454
+#define GL_FOG_COORDINATE_ARRAY_STRIDE 0x8455
+#define GL_FOG_COORDINATE_ARRAY_POINTER 0x8456
+#define GL_FOG_COORDINATE_ARRAY 0x8457
+#define GL_COLOR_SUM 0x8458
+#define GL_CURRENT_SECONDARY_COLOR 0x8459
+#define GL_SECONDARY_COLOR_ARRAY_SIZE 0x845A
+#define GL_SECONDARY_COLOR_ARRAY_TYPE 0x845B
+#define GL_SECONDARY_COLOR_ARRAY_STRIDE 0x845C
+#define GL_SECONDARY_COLOR_ARRAY_POINTER 0x845D
+#define GL_SECONDARY_COLOR_ARRAY 0x845E
+#define GL_MAX_TEXTURE_LOD_BIAS 0x84FD
+#define GL_TEXTURE_FILTER_CONTROL 0x8500
+#define GL_TEXTURE_LOD_BIAS 0x8501
+#define GL_INCR_WRAP 0x8507
+#define GL_DECR_WRAP 0x8508
+#define GL_TEXTURE_DEPTH_SIZE 0x884A
+#define GL_DEPTH_TEXTURE_MODE 0x884B
+#define GL_TEXTURE_COMPARE_MODE 0x884C
+#define GL_TEXTURE_COMPARE_FUNC 0x884D
+#define GL_COMPARE_R_TO_TEXTURE 0x884E
+
+typedef void (GLAPIENTRY * PFNGLBLENDCOLORPROC) (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
+typedef void (GLAPIENTRY * PFNGLBLENDEQUATIONPROC) (GLenum mode);
+typedef void (GLAPIENTRY * PFNGLBLENDFUNCSEPARATEPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
+typedef void (GLAPIENTRY * PFNGLFOGCOORDPOINTERPROC) (GLenum type, GLsizei stride, const void *pointer);
+typedef void (GLAPIENTRY * PFNGLFOGCOORDDPROC) (GLdouble coord);
+typedef void (GLAPIENTRY * PFNGLFOGCOORDDVPROC) (const GLdouble *coord);
+typedef void (GLAPIENTRY * PFNGLFOGCOORDFPROC) (GLfloat coord);
+typedef void (GLAPIENTRY * PFNGLFOGCOORDFVPROC) (const GLfloat *coord);
+typedef void (GLAPIENTRY * PFNGLMULTIDRAWARRAYSPROC) (GLenum mode, const GLint *first, const GLsizei *count, GLsizei drawcount);
+typedef void (GLAPIENTRY * PFNGLMULTIDRAWELEMENTSPROC) (GLenum mode, const GLsizei *count, GLenum type, const void *const* indices, GLsizei drawcount);
+typedef void (GLAPIENTRY * PFNGLPOINTPARAMETERFPROC) (GLenum pname, GLfloat param);
+typedef void (GLAPIENTRY * PFNGLPOINTPARAMETERFVPROC) (GLenum pname, const GLfloat *params);
+typedef void (GLAPIENTRY * PFNGLPOINTPARAMETERIPROC) (GLenum pname, GLint param);
+typedef void (GLAPIENTRY * PFNGLPOINTPARAMETERIVPROC) (GLenum pname, const GLint *params);
+typedef void (GLAPIENTRY * PFNGLSECONDARYCOLOR3BPROC) (GLbyte red, GLbyte green, GLbyte blue);
+typedef void (GLAPIENTRY * PFNGLSECONDARYCOLOR3BVPROC) (const GLbyte *v);
+typedef void (GLAPIENTRY * PFNGLSECONDARYCOLOR3DPROC) (GLdouble red, GLdouble green, GLdouble blue);
+typedef void (GLAPIENTRY * PFNGLSECONDARYCOLOR3DVPROC) (const GLdouble *v);
+typedef void (GLAPIENTRY * PFNGLSECONDARYCOLOR3FPROC) (GLfloat red, GLfloat green, GLfloat blue);
+typedef void (GLAPIENTRY * PFNGLSECONDARYCOLOR3FVPROC) (const GLfloat *v);
+typedef void (GLAPIENTRY * PFNGLSECONDARYCOLOR3IPROC) (GLint red, GLint green, GLint blue);
+typedef void (GLAPIENTRY * PFNGLSECONDARYCOLOR3IVPROC) (const GLint *v);
+typedef void (GLAPIENTRY * PFNGLSECONDARYCOLOR3SPROC) (GLshort red, GLshort green, GLshort blue);
+typedef void (GLAPIENTRY * PFNGLSECONDARYCOLOR3SVPROC) (const GLshort *v);
+typedef void (GLAPIENTRY * PFNGLSECONDARYCOLOR3UBPROC) (GLubyte red, GLubyte green, GLubyte blue);
+typedef void (GLAPIENTRY * PFNGLSECONDARYCOLOR3UBVPROC) (const GLubyte *v);
+typedef void (GLAPIENTRY * PFNGLSECONDARYCOLOR3UIPROC) (GLuint red, GLuint green, GLuint blue);
+typedef void (GLAPIENTRY * PFNGLSECONDARYCOLOR3UIVPROC) (const GLuint *v);
+typedef void (GLAPIENTRY * PFNGLSECONDARYCOLOR3USPROC) (GLushort red, GLushort green, GLushort blue);
+typedef void (GLAPIENTRY * PFNGLSECONDARYCOLOR3USVPROC) (const GLushort *v);
+typedef void (GLAPIENTRY * PFNGLSECONDARYCOLORPOINTERPROC) (GLint size, GLenum type, GLsizei stride, const void *pointer);
+typedef void (GLAPIENTRY * PFNGLWINDOWPOS2DPROC) (GLdouble x, GLdouble y);
+typedef void (GLAPIENTRY * PFNGLWINDOWPOS2DVPROC) (const GLdouble *p);
+typedef void (GLAPIENTRY * PFNGLWINDOWPOS2FPROC) (GLfloat x, GLfloat y);
+typedef void (GLAPIENTRY * PFNGLWINDOWPOS2FVPROC) (const GLfloat *p);
+typedef void (GLAPIENTRY * PFNGLWINDOWPOS2IPROC) (GLint x, GLint y);
+typedef void (GLAPIENTRY * PFNGLWINDOWPOS2IVPROC) (const GLint *p);
+typedef void (GLAPIENTRY * PFNGLWINDOWPOS2SPROC) (GLshort x, GLshort y);
+typedef void (GLAPIENTRY * PFNGLWINDOWPOS2SVPROC) (const GLshort *p);
+typedef void (GLAPIENTRY * PFNGLWINDOWPOS3DPROC) (GLdouble x, GLdouble y, GLdouble z);
+typedef void (GLAPIENTRY * PFNGLWINDOWPOS3DVPROC) (const GLdouble *p);
+typedef void (GLAPIENTRY * PFNGLWINDOWPOS3FPROC) (GLfloat x, GLfloat y, GLfloat z);
+typedef void (GLAPIENTRY * PFNGLWINDOWPOS3FVPROC) (const GLfloat *p);
+typedef void (GLAPIENTRY * PFNGLWINDOWPOS3IPROC) (GLint x, GLint y, GLint z);
+typedef void (GLAPIENTRY * PFNGLWINDOWPOS3IVPROC) (const GLint *p);
+typedef void (GLAPIENTRY * PFNGLWINDOWPOS3SPROC) (GLshort x, GLshort y, GLshort z);
+typedef void (GLAPIENTRY * PFNGLWINDOWPOS3SVPROC) (const GLshort *p);
+
+#define glBlendColor GLEW_GET_FUN(__glewBlendColor)
+#define glBlendEquation GLEW_GET_FUN(__glewBlendEquation)
+#define glBlendFuncSeparate GLEW_GET_FUN(__glewBlendFuncSeparate)
+#define glFogCoordPointer GLEW_GET_FUN(__glewFogCoordPointer)
+#define glFogCoordd GLEW_GET_FUN(__glewFogCoordd)
+#define glFogCoorddv GLEW_GET_FUN(__glewFogCoorddv)
+#define glFogCoordf GLEW_GET_FUN(__glewFogCoordf)
+#define glFogCoordfv GLEW_GET_FUN(__glewFogCoordfv)
+#define glMultiDrawArrays GLEW_GET_FUN(__glewMultiDrawArrays)
+#define glMultiDrawElements GLEW_GET_FUN(__glewMultiDrawElements)
+#define glPointParameterf GLEW_GET_FUN(__glewPointParameterf)
+#define glPointParameterfv GLEW_GET_FUN(__glewPointParameterfv)
+#define glPointParameteri GLEW_GET_FUN(__glewPointParameteri)
+#define glPointParameteriv GLEW_GET_FUN(__glewPointParameteriv)
+#define glSecondaryColor3b GLEW_GET_FUN(__glewSecondaryColor3b)
+#define glSecondaryColor3bv GLEW_GET_FUN(__glewSecondaryColor3bv)
+#define glSecondaryColor3d GLEW_GET_FUN(__glewSecondaryColor3d)
+#define glSecondaryColor3dv GLEW_GET_FUN(__glewSecondaryColor3dv)
+#define glSecondaryColor3f GLEW_GET_FUN(__glewSecondaryColor3f)
+#define glSecondaryColor3fv GLEW_GET_FUN(__glewSecondaryColor3fv)
+#define glSecondaryColor3i GLEW_GET_FUN(__glewSecondaryColor3i)
+#define glSecondaryColor3iv GLEW_GET_FUN(__glewSecondaryColor3iv)
+#define glSecondaryColor3s GLEW_GET_FUN(__glewSecondaryColor3s)
+#define glSecondaryColor3sv GLEW_GET_FUN(__glewSecondaryColor3sv)
+#define glSecondaryColor3ub GLEW_GET_FUN(__glewSecondaryColor3ub)
+#define glSecondaryColor3ubv GLEW_GET_FUN(__glewSecondaryColor3ubv)
+#define glSecondaryColor3ui GLEW_GET_FUN(__glewSecondaryColor3ui)
+#define glSecondaryColor3uiv GLEW_GET_FUN(__glewSecondaryColor3uiv)
+#define glSecondaryColor3us GLEW_GET_FUN(__glewSecondaryColor3us)
+#define glSecondaryColor3usv GLEW_GET_FUN(__glewSecondaryColor3usv)
+#define glSecondaryColorPointer GLEW_GET_FUN(__glewSecondaryColorPointer)
+#define glWindowPos2d GLEW_GET_FUN(__glewWindowPos2d)
+#define glWindowPos2dv GLEW_GET_FUN(__glewWindowPos2dv)
+#define glWindowPos2f GLEW_GET_FUN(__glewWindowPos2f)
+#define glWindowPos2fv GLEW_GET_FUN(__glewWindowPos2fv)
+#define glWindowPos2i GLEW_GET_FUN(__glewWindowPos2i)
+#define glWindowPos2iv GLEW_GET_FUN(__glewWindowPos2iv)
+#define glWindowPos2s GLEW_GET_FUN(__glewWindowPos2s)
+#define glWindowPos2sv GLEW_GET_FUN(__glewWindowPos2sv)
+#define glWindowPos3d GLEW_GET_FUN(__glewWindowPos3d)
+#define glWindowPos3dv GLEW_GET_FUN(__glewWindowPos3dv)
+#define glWindowPos3f GLEW_GET_FUN(__glewWindowPos3f)
+#define glWindowPos3fv GLEW_GET_FUN(__glewWindowPos3fv)
+#define glWindowPos3i GLEW_GET_FUN(__glewWindowPos3i)
+#define glWindowPos3iv GLEW_GET_FUN(__glewWindowPos3iv)
+#define glWindowPos3s GLEW_GET_FUN(__glewWindowPos3s)
+#define glWindowPos3sv GLEW_GET_FUN(__glewWindowPos3sv)
+
+#define GLEW_VERSION_1_4 GLEW_GET_VAR(__GLEW_VERSION_1_4)
+
+#endif /* GL_VERSION_1_4 */
+
+/* ----------------------------- GL_VERSION_1_5 ---------------------------- */
+
+#ifndef GL_VERSION_1_5
+#define GL_VERSION_1_5 1
+
+#define GL_CURRENT_FOG_COORD GL_CURRENT_FOG_COORDINATE
+#define GL_FOG_COORD GL_FOG_COORDINATE
+#define GL_FOG_COORD_ARRAY GL_FOG_COORDINATE_ARRAY
+#define GL_FOG_COORD_ARRAY_BUFFER_BINDING GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING
+#define GL_FOG_COORD_ARRAY_POINTER GL_FOG_COORDINATE_ARRAY_POINTER
+#define GL_FOG_COORD_ARRAY_STRIDE GL_FOG_COORDINATE_ARRAY_STRIDE
+#define GL_FOG_COORD_ARRAY_TYPE GL_FOG_COORDINATE_ARRAY_TYPE
+#define GL_FOG_COORD_SRC GL_FOG_COORDINATE_SOURCE
+#define GL_SRC0_ALPHA GL_SOURCE0_ALPHA
+#define GL_SRC0_RGB GL_SOURCE0_RGB
+#define GL_SRC1_ALPHA GL_SOURCE1_ALPHA
+#define GL_SRC1_RGB GL_SOURCE1_RGB
+#define GL_SRC2_ALPHA GL_SOURCE2_ALPHA
+#define GL_SRC2_RGB GL_SOURCE2_RGB
+#define GL_BUFFER_SIZE 0x8764
+#define GL_BUFFER_USAGE 0x8765
+#define GL_QUERY_COUNTER_BITS 0x8864
+#define GL_CURRENT_QUERY 0x8865
+#define GL_QUERY_RESULT 0x8866
+#define GL_QUERY_RESULT_AVAILABLE 0x8867
+#define GL_ARRAY_BUFFER 0x8892
+#define GL_ELEMENT_ARRAY_BUFFER 0x8893
+#define GL_ARRAY_BUFFER_BINDING 0x8894
+#define GL_ELEMENT_ARRAY_BUFFER_BINDING 0x8895
+#define GL_VERTEX_ARRAY_BUFFER_BINDING 0x8896
+#define GL_NORMAL_ARRAY_BUFFER_BINDING 0x8897
+#define GL_COLOR_ARRAY_BUFFER_BINDING 0x8898
+#define GL_INDEX_ARRAY_BUFFER_BINDING 0x8899
+#define GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING 0x889A
+#define GL_EDGE_FLAG_ARRAY_BUFFER_BINDING 0x889B
+#define GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING 0x889C
+#define GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING 0x889D
+#define GL_WEIGHT_ARRAY_BUFFER_BINDING 0x889E
+#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING 0x889F
+#define GL_READ_ONLY 0x88B8
+#define GL_WRITE_ONLY 0x88B9
+#define GL_READ_WRITE 0x88BA
+#define GL_BUFFER_ACCESS 0x88BB
+#define GL_BUFFER_MAPPED 0x88BC
+#define GL_BUFFER_MAP_POINTER 0x88BD
+#define GL_STREAM_DRAW 0x88E0
+#define GL_STREAM_READ 0x88E1
+#define GL_STREAM_COPY 0x88E2
+#define GL_STATIC_DRAW 0x88E4
+#define GL_STATIC_READ 0x88E5
+#define GL_STATIC_COPY 0x88E6
+#define GL_DYNAMIC_DRAW 0x88E8
+#define GL_DYNAMIC_READ 0x88E9
+#define GL_DYNAMIC_COPY 0x88EA
+#define GL_SAMPLES_PASSED 0x8914
+
+typedef ptrdiff_t GLintptr;
+typedef ptrdiff_t GLsizeiptr;
+
+typedef void (GLAPIENTRY * PFNGLBEGINQUERYPROC) (GLenum target, GLuint id);
+typedef void (GLAPIENTRY * PFNGLBINDBUFFERPROC) (GLenum target, GLuint buffer);
+typedef void (GLAPIENTRY * PFNGLBUFFERDATAPROC) (GLenum target, GLsizeiptr size, const void* data, GLenum usage);
+typedef void (GLAPIENTRY * PFNGLBUFFERSUBDATAPROC) (GLenum target, GLintptr offset, GLsizeiptr size, const void* data);
+typedef void (GLAPIENTRY * PFNGLDELETEBUFFERSPROC) (GLsizei n, const GLuint* buffers);
+typedef void (GLAPIENTRY * PFNGLDELETEQUERIESPROC) (GLsizei n, const GLuint* ids);
+typedef void (GLAPIENTRY * PFNGLENDQUERYPROC) (GLenum target);
+typedef void (GLAPIENTRY * PFNGLGENBUFFERSPROC) (GLsizei n, GLuint* buffers);
+typedef void (GLAPIENTRY * PFNGLGENQUERIESPROC) (GLsizei n, GLuint* ids);
+typedef void (GLAPIENTRY * PFNGLGETBUFFERPARAMETERIVPROC) (GLenum target, GLenum pname, GLint* params);
+typedef void (GLAPIENTRY * PFNGLGETBUFFERPOINTERVPROC) (GLenum target, GLenum pname, void** params);
+typedef void (GLAPIENTRY * PFNGLGETBUFFERSUBDATAPROC) (GLenum target, GLintptr offset, GLsizeiptr size, void* data);
+typedef void (GLAPIENTRY * PFNGLGETQUERYOBJECTIVPROC) (GLuint id, GLenum pname, GLint* params);
+typedef void (GLAPIENTRY * PFNGLGETQUERYOBJECTUIVPROC) (GLuint id, GLenum pname, GLuint* params);
+typedef void (GLAPIENTRY * PFNGLGETQUERYIVPROC) (GLenum target, GLenum pname, GLint* params);
+typedef GLboolean (GLAPIENTRY * PFNGLISBUFFERPROC) (GLuint buffer);
+typedef GLboolean (GLAPIENTRY * PFNGLISQUERYPROC) (GLuint id);
+typedef void* (GLAPIENTRY * PFNGLMAPBUFFERPROC) (GLenum target, GLenum access);
+typedef GLboolean (GLAPIENTRY * PFNGLUNMAPBUFFERPROC) (GLenum target);
+
+#define glBeginQuery GLEW_GET_FUN(__glewBeginQuery)
+#define glBindBuffer GLEW_GET_FUN(__glewBindBuffer)
+#define glBufferData GLEW_GET_FUN(__glewBufferData)
+#define glBufferSubData GLEW_GET_FUN(__glewBufferSubData)
+#define glDeleteBuffers GLEW_GET_FUN(__glewDeleteBuffers)
+#define glDeleteQueries GLEW_GET_FUN(__glewDeleteQueries)
+#define glEndQuery GLEW_GET_FUN(__glewEndQuery)
+#define glGenBuffers GLEW_GET_FUN(__glewGenBuffers)
+#define glGenQueries GLEW_GET_FUN(__glewGenQueries)
+#define glGetBufferParameteriv GLEW_GET_FUN(__glewGetBufferParameteriv)
+#define glGetBufferPointerv GLEW_GET_FUN(__glewGetBufferPointerv)
+#define glGetBufferSubData GLEW_GET_FUN(__glewGetBufferSubData)
+#define glGetQueryObjectiv GLEW_GET_FUN(__glewGetQueryObjectiv)
+#define glGetQueryObjectuiv GLEW_GET_FUN(__glewGetQueryObjectuiv)
+#define glGetQueryiv GLEW_GET_FUN(__glewGetQueryiv)
+#define glIsBuffer GLEW_GET_FUN(__glewIsBuffer)
+#define glIsQuery GLEW_GET_FUN(__glewIsQuery)
+#define glMapBuffer GLEW_GET_FUN(__glewMapBuffer)
+#define glUnmapBuffer GLEW_GET_FUN(__glewUnmapBuffer)
+
+#define GLEW_VERSION_1_5 GLEW_GET_VAR(__GLEW_VERSION_1_5)
+
+#endif /* GL_VERSION_1_5 */
+
+/* ----------------------------- GL_VERSION_2_0 ---------------------------- */
+
+#ifndef GL_VERSION_2_0
+#define GL_VERSION_2_0 1
+
+#define GL_BLEND_EQUATION_RGB GL_BLEND_EQUATION
+#define GL_VERTEX_ATTRIB_ARRAY_ENABLED 0x8622
+#define GL_VERTEX_ATTRIB_ARRAY_SIZE 0x8623
+#define GL_VERTEX_ATTRIB_ARRAY_STRIDE 0x8624
+#define GL_VERTEX_ATTRIB_ARRAY_TYPE 0x8625
+#define GL_CURRENT_VERTEX_ATTRIB 0x8626
+#define GL_VERTEX_PROGRAM_POINT_SIZE 0x8642
+#define GL_VERTEX_PROGRAM_TWO_SIDE 0x8643
+#define GL_VERTEX_ATTRIB_ARRAY_POINTER 0x8645
+#define GL_STENCIL_BACK_FUNC 0x8800
+#define GL_STENCIL_BACK_FAIL 0x8801
+#define GL_STENCIL_BACK_PASS_DEPTH_FAIL 0x8802
+#define GL_STENCIL_BACK_PASS_DEPTH_PASS 0x8803
+#define GL_MAX_DRAW_BUFFERS 0x8824
+#define GL_DRAW_BUFFER0 0x8825
+#define GL_DRAW_BUFFER1 0x8826
+#define GL_DRAW_BUFFER2 0x8827
+#define GL_DRAW_BUFFER3 0x8828
+#define GL_DRAW_BUFFER4 0x8829
+#define GL_DRAW_BUFFER5 0x882A
+#define GL_DRAW_BUFFER6 0x882B
+#define GL_DRAW_BUFFER7 0x882C
+#define GL_DRAW_BUFFER8 0x882D
+#define GL_DRAW_BUFFER9 0x882E
+#define GL_DRAW_BUFFER10 0x882F
+#define GL_DRAW_BUFFER11 0x8830
+#define GL_DRAW_BUFFER12 0x8831
+#define GL_DRAW_BUFFER13 0x8832
+#define GL_DRAW_BUFFER14 0x8833
+#define GL_DRAW_BUFFER15 0x8834
+#define GL_BLEND_EQUATION_ALPHA 0x883D
+#define GL_POINT_SPRITE 0x8861
+#define GL_COORD_REPLACE 0x8862
+#define GL_MAX_VERTEX_ATTRIBS 0x8869
+#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED 0x886A
+#define GL_MAX_TEXTURE_COORDS 0x8871
+#define GL_MAX_TEXTURE_IMAGE_UNITS 0x8872
+#define GL_FRAGMENT_SHADER 0x8B30
+#define GL_VERTEX_SHADER 0x8B31
+#define GL_MAX_FRAGMENT_UNIFORM_COMPONENTS 0x8B49
+#define GL_MAX_VERTEX_UNIFORM_COMPONENTS 0x8B4A
+#define GL_MAX_VARYING_FLOATS 0x8B4B
+#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS 0x8B4C
+#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 0x8B4D
+#define GL_SHADER_TYPE 0x8B4F
+#define GL_FLOAT_VEC2 0x8B50
+#define GL_FLOAT_VEC3 0x8B51
+#define GL_FLOAT_VEC4 0x8B52
+#define GL_INT_VEC2 0x8B53
+#define GL_INT_VEC3 0x8B54
+#define GL_INT_VEC4 0x8B55
+#define GL_BOOL 0x8B56
+#define GL_BOOL_VEC2 0x8B57
+#define GL_BOOL_VEC3 0x8B58
+#define GL_BOOL_VEC4 0x8B59
+#define GL_FLOAT_MAT2 0x8B5A
+#define GL_FLOAT_MAT3 0x8B5B
+#define GL_FLOAT_MAT4 0x8B5C
+#define GL_SAMPLER_1D 0x8B5D
+#define GL_SAMPLER_2D 0x8B5E
+#define GL_SAMPLER_3D 0x8B5F
+#define GL_SAMPLER_CUBE 0x8B60
+#define GL_SAMPLER_1D_SHADOW 0x8B61
+#define GL_SAMPLER_2D_SHADOW 0x8B62
+#define GL_DELETE_STATUS 0x8B80
+#define GL_COMPILE_STATUS 0x8B81
+#define GL_LINK_STATUS 0x8B82
+#define GL_VALIDATE_STATUS 0x8B83
+#define GL_INFO_LOG_LENGTH 0x8B84
+#define GL_ATTACHED_SHADERS 0x8B85
+#define GL_ACTIVE_UNIFORMS 0x8B86
+#define GL_ACTIVE_UNIFORM_MAX_LENGTH 0x8B87
+#define GL_SHADER_SOURCE_LENGTH 0x8B88
+#define GL_ACTIVE_ATTRIBUTES 0x8B89
+#define GL_ACTIVE_ATTRIBUTE_MAX_LENGTH 0x8B8A
+#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT 0x8B8B
+#define GL_SHADING_LANGUAGE_VERSION 0x8B8C
+#define GL_CURRENT_PROGRAM 0x8B8D
+#define GL_POINT_SPRITE_COORD_ORIGIN 0x8CA0
+#define GL_LOWER_LEFT 0x8CA1
+#define GL_UPPER_LEFT 0x8CA2
+#define GL_STENCIL_BACK_REF 0x8CA3
+#define GL_STENCIL_BACK_VALUE_MASK 0x8CA4
+#define GL_STENCIL_BACK_WRITEMASK 0x8CA5
+
+typedef void (GLAPIENTRY * PFNGLATTACHSHADERPROC) (GLuint program, GLuint shader);
+typedef void (GLAPIENTRY * PFNGLBINDATTRIBLOCATIONPROC) (GLuint program, GLuint index, const GLchar* name);
+typedef void (GLAPIENTRY * PFNGLBLENDEQUATIONSEPARATEPROC) (GLenum modeRGB, GLenum modeAlpha);
+typedef void (GLAPIENTRY * PFNGLCOMPILESHADERPROC) (GLuint shader);
+typedef GLuint (GLAPIENTRY * PFNGLCREATEPROGRAMPROC) (void);
+typedef GLuint (GLAPIENTRY * PFNGLCREATESHADERPROC) (GLenum type);
+typedef void (GLAPIENTRY * PFNGLDELETEPROGRAMPROC) (GLuint program);
+typedef void (GLAPIENTRY * PFNGLDELETESHADERPROC) (GLuint shader);
+typedef void (GLAPIENTRY * PFNGLDETACHSHADERPROC) (GLuint program, GLuint shader);
+typedef void (GLAPIENTRY * PFNGLDISABLEVERTEXATTRIBARRAYPROC) (GLuint index);
+typedef void (GLAPIENTRY * PFNGLDRAWBUFFERSPROC) (GLsizei n, const GLenum* bufs);
+typedef void (GLAPIENTRY * PFNGLENABLEVERTEXATTRIBARRAYPROC) (GLuint index);
+typedef void (GLAPIENTRY * PFNGLGETACTIVEATTRIBPROC) (GLuint program, GLuint index, GLsizei maxLength, GLsizei* length, GLint* size, GLenum* type, GLchar* name);
+typedef void (GLAPIENTRY * PFNGLGETACTIVEUNIFORMPROC) (GLuint program, GLuint index, GLsizei maxLength, GLsizei* length, GLint* size, GLenum* type, GLchar* name);
+typedef void (GLAPIENTRY * PFNGLGETATTACHEDSHADERSPROC) (GLuint program, GLsizei maxCount, GLsizei* count, GLuint* shaders);
+typedef GLint (GLAPIENTRY * PFNGLGETATTRIBLOCATIONPROC) (GLuint program, const GLchar* name);
+typedef void (GLAPIENTRY * PFNGLGETPROGRAMINFOLOGPROC) (GLuint program, GLsizei bufSize, GLsizei* length, GLchar* infoLog);
+typedef void (GLAPIENTRY * PFNGLGETPROGRAMIVPROC) (GLuint program, GLenum pname, GLint* param);
+typedef void (GLAPIENTRY * PFNGLGETSHADERINFOLOGPROC) (GLuint shader, GLsizei bufSize, GLsizei* length, GLchar* infoLog);
+typedef void (GLAPIENTRY * PFNGLGETSHADERSOURCEPROC) (GLuint obj, GLsizei maxLength, GLsizei* length, GLchar* source);
+typedef void (GLAPIENTRY * PFNGLGETSHADERIVPROC) (GLuint shader, GLenum pname, GLint* param);
+typedef GLint (GLAPIENTRY * PFNGLGETUNIFORMLOCATIONPROC) (GLuint program, const GLchar* name);
+typedef void (GLAPIENTRY * PFNGLGETUNIFORMFVPROC) (GLuint program, GLint location, GLfloat* params);
+typedef void (GLAPIENTRY * PFNGLGETUNIFORMIVPROC) (GLuint program, GLint location, GLint* params);
+typedef void (GLAPIENTRY * PFNGLGETVERTEXATTRIBPOINTERVPROC) (GLuint index, GLenum pname, void** pointer);
+typedef void (GLAPIENTRY * PFNGLGETVERTEXATTRIBDVPROC) (GLuint index, GLenum pname, GLdouble* params);
+typedef void (GLAPIENTRY * PFNGLGETVERTEXATTRIBFVPROC) (GLuint index, GLenum pname, GLfloat* params);
+typedef void (GLAPIENTRY * PFNGLGETVERTEXATTRIBIVPROC) (GLuint index, GLenum pname, GLint* params);
+typedef GLboolean (GLAPIENTRY * PFNGLISPROGRAMPROC) (GLuint program);
+typedef GLboolean (GLAPIENTRY * PFNGLISSHADERPROC) (GLuint shader);
+typedef void (GLAPIENTRY * PFNGLLINKPROGRAMPROC) (GLuint program);
+typedef void (GLAPIENTRY * PFNGLSHADERSOURCEPROC) (GLuint shader, GLsizei count, const GLchar *const* string, const GLint* length);
+typedef void (GLAPIENTRY * PFNGLSTENCILFUNCSEPARATEPROC) (GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask);
+typedef void (GLAPIENTRY * PFNGLSTENCILMASKSEPARATEPROC) (GLenum face, GLuint mask);
+typedef void (GLAPIENTRY * PFNGLSTENCILOPSEPARATEPROC) (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass);
+typedef void (GLAPIENTRY * PFNGLUNIFORM1FPROC) (GLint location, GLfloat v0);
+typedef void (GLAPIENTRY * PFNGLUNIFORM1FVPROC) (GLint location, GLsizei count, const GLfloat* value);
+typedef void (GLAPIENTRY * PFNGLUNIFORM1IPROC) (GLint location, GLint v0);
+typedef void (GLAPIENTRY * PFNGLUNIFORM1IVPROC) (GLint location, GLsizei count, const GLint* value);
+typedef void (GLAPIENTRY * PFNGLUNIFORM2FPROC) (GLint location, GLfloat v0, GLfloat v1);
+typedef void (GLAPIENTRY * PFNGLUNIFORM2FVPROC) (GLint location, GLsizei count, const GLfloat* value);
+typedef void (GLAPIENTRY * PFNGLUNIFORM2IPROC) (GLint location, GLint v0, GLint v1);
+typedef void (GLAPIENTRY * PFNGLUNIFORM2IVPROC) (GLint location, GLsizei count, const GLint* value);
+typedef void (GLAPIENTRY * PFNGLUNIFORM3FPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
+typedef void (GLAPIENTRY * PFNGLUNIFORM3FVPROC) (GLint location, GLsizei count, const GLfloat* value);
+typedef void (GLAPIENTRY * PFNGLUNIFORM3IPROC) (GLint location, GLint v0, GLint v1, GLint v2);
+typedef void (GLAPIENTRY * PFNGLUNIFORM3IVPROC) (GLint location, GLsizei count, const GLint* value);
+typedef void (GLAPIENTRY * PFNGLUNIFORM4FPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
+typedef void (GLAPIENTRY * PFNGLUNIFORM4FVPROC) (GLint location, GLsizei count, const GLfloat* value);
+typedef void (GLAPIENTRY * PFNGLUNIFORM4IPROC) (GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
+typedef void (GLAPIENTRY * PFNGLUNIFORM4IVPROC) (GLint location, GLsizei count, const GLint* value);
+typedef void (GLAPIENTRY * PFNGLUNIFORMMATRIX2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
+typedef void (GLAPIENTRY * PFNGLUNIFORMMATRIX3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
+typedef void (GLAPIENTRY * PFNGLUNIFORMMATRIX4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
+typedef void (GLAPIENTRY * PFNGLUSEPROGRAMPROC) (GLuint program);
+typedef void (GLAPIENTRY * PFNGLVALIDATEPROGRAMPROC) (GLuint program);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB1DPROC) (GLuint index, GLdouble x);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB1DVPROC) (GLuint index, const GLdouble* v);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB1FPROC) (GLuint index, GLfloat x);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB1FVPROC) (GLuint index, const GLfloat* v);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB1SPROC) (GLuint index, GLshort x);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB1SVPROC) (GLuint index, const GLshort* v);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB2DPROC) (GLuint index, GLdouble x, GLdouble y);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB2DVPROC) (GLuint index, const GLdouble* v);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB2FPROC) (GLuint index, GLfloat x, GLfloat y);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB2FVPROC) (GLuint index, const GLfloat* v);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB2SPROC) (GLuint index, GLshort x, GLshort y);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB2SVPROC) (GLuint index, const GLshort* v);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB3DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB3DVPROC) (GLuint index, const GLdouble* v);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB3FPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB3FVPROC) (GLuint index, const GLfloat* v);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB3SPROC) (GLuint index, GLshort x, GLshort y, GLshort z);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB3SVPROC) (GLuint index, const GLshort* v);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB4NBVPROC) (GLuint index, const GLbyte* v);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB4NIVPROC) (GLuint index, const GLint* v);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB4NSVPROC) (GLuint index, const GLshort* v);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB4NUBPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB4NUBVPROC) (GLuint index, const GLubyte* v);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB4NUIVPROC) (GLuint index, const GLuint* v);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB4NUSVPROC) (GLuint index, const GLushort* v);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB4BVPROC) (GLuint index, const GLbyte* v);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB4DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB4DVPROC) (GLuint index, const GLdouble* v);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB4FPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB4FVPROC) (GLuint index, const GLfloat* v);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB4IVPROC) (GLuint index, const GLint* v);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB4SPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB4SVPROC) (GLuint index, const GLshort* v);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB4UBVPROC) (GLuint index, const GLubyte* v);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB4UIVPROC) (GLuint index, const GLuint* v);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB4USVPROC) (GLuint index, const GLushort* v);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBPOINTERPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void* pointer);
+
+#define glAttachShader GLEW_GET_FUN(__glewAttachShader)
+#define glBindAttribLocation GLEW_GET_FUN(__glewBindAttribLocation)
+#define glBlendEquationSeparate GLEW_GET_FUN(__glewBlendEquationSeparate)
+#define glCompileShader GLEW_GET_FUN(__glewCompileShader)
+#define glCreateProgram GLEW_GET_FUN(__glewCreateProgram)
+#define glCreateShader GLEW_GET_FUN(__glewCreateShader)
+#define glDeleteProgram GLEW_GET_FUN(__glewDeleteProgram)
+#define glDeleteShader GLEW_GET_FUN(__glewDeleteShader)
+#define glDetachShader GLEW_GET_FUN(__glewDetachShader)
+#define glDisableVertexAttribArray GLEW_GET_FUN(__glewDisableVertexAttribArray)
+#define glDrawBuffers GLEW_GET_FUN(__glewDrawBuffers)
+#define glEnableVertexAttribArray GLEW_GET_FUN(__glewEnableVertexAttribArray)
+#define glGetActiveAttrib GLEW_GET_FUN(__glewGetActiveAttrib)
+#define glGetActiveUniform GLEW_GET_FUN(__glewGetActiveUniform)
+#define glGetAttachedShaders GLEW_GET_FUN(__glewGetAttachedShaders)
+#define glGetAttribLocation GLEW_GET_FUN(__glewGetAttribLocation)
+#define glGetProgramInfoLog GLEW_GET_FUN(__glewGetProgramInfoLog)
+#define glGetProgramiv GLEW_GET_FUN(__glewGetProgramiv)
+#define glGetShaderInfoLog GLEW_GET_FUN(__glewGetShaderInfoLog)
+#define glGetShaderSource GLEW_GET_FUN(__glewGetShaderSource)
+#define glGetShaderiv GLEW_GET_FUN(__glewGetShaderiv)
+#define glGetUniformLocation GLEW_GET_FUN(__glewGetUniformLocation)
+#define glGetUniformfv GLEW_GET_FUN(__glewGetUniformfv)
+#define glGetUniformiv GLEW_GET_FUN(__glewGetUniformiv)
+#define glGetVertexAttribPointerv GLEW_GET_FUN(__glewGetVertexAttribPointerv)
+#define glGetVertexAttribdv GLEW_GET_FUN(__glewGetVertexAttribdv)
+#define glGetVertexAttribfv GLEW_GET_FUN(__glewGetVertexAttribfv)
+#define glGetVertexAttribiv GLEW_GET_FUN(__glewGetVertexAttribiv)
+#define glIsProgram GLEW_GET_FUN(__glewIsProgram)
+#define glIsShader GLEW_GET_FUN(__glewIsShader)
+#define glLinkProgram GLEW_GET_FUN(__glewLinkProgram)
+#define glShaderSource GLEW_GET_FUN(__glewShaderSource)
+#define glStencilFuncSeparate GLEW_GET_FUN(__glewStencilFuncSeparate)
+#define glStencilMaskSeparate GLEW_GET_FUN(__glewStencilMaskSeparate)
+#define glStencilOpSeparate GLEW_GET_FUN(__glewStencilOpSeparate)
+#define glUniform1f GLEW_GET_FUN(__glewUniform1f)
+#define glUniform1fv GLEW_GET_FUN(__glewUniform1fv)
+#define glUniform1i GLEW_GET_FUN(__glewUniform1i)
+#define glUniform1iv GLEW_GET_FUN(__glewUniform1iv)
+#define glUniform2f GLEW_GET_FUN(__glewUniform2f)
+#define glUniform2fv GLEW_GET_FUN(__glewUniform2fv)
+#define glUniform2i GLEW_GET_FUN(__glewUniform2i)
+#define glUniform2iv GLEW_GET_FUN(__glewUniform2iv)
+#define glUniform3f GLEW_GET_FUN(__glewUniform3f)
+#define glUniform3fv GLEW_GET_FUN(__glewUniform3fv)
+#define glUniform3i GLEW_GET_FUN(__glewUniform3i)
+#define glUniform3iv GLEW_GET_FUN(__glewUniform3iv)
+#define glUniform4f GLEW_GET_FUN(__glewUniform4f)
+#define glUniform4fv GLEW_GET_FUN(__glewUniform4fv)
+#define glUniform4i GLEW_GET_FUN(__glewUniform4i)
+#define glUniform4iv GLEW_GET_FUN(__glewUniform4iv)
+#define glUniformMatrix2fv GLEW_GET_FUN(__glewUniformMatrix2fv)
+#define glUniformMatrix3fv GLEW_GET_FUN(__glewUniformMatrix3fv)
+#define glUniformMatrix4fv GLEW_GET_FUN(__glewUniformMatrix4fv)
+#define glUseProgram GLEW_GET_FUN(__glewUseProgram)
+#define glValidateProgram GLEW_GET_FUN(__glewValidateProgram)
+#define glVertexAttrib1d GLEW_GET_FUN(__glewVertexAttrib1d)
+#define glVertexAttrib1dv GLEW_GET_FUN(__glewVertexAttrib1dv)
+#define glVertexAttrib1f GLEW_GET_FUN(__glewVertexAttrib1f)
+#define glVertexAttrib1fv GLEW_GET_FUN(__glewVertexAttrib1fv)
+#define glVertexAttrib1s GLEW_GET_FUN(__glewVertexAttrib1s)
+#define glVertexAttrib1sv GLEW_GET_FUN(__glewVertexAttrib1sv)
+#define glVertexAttrib2d GLEW_GET_FUN(__glewVertexAttrib2d)
+#define glVertexAttrib2dv GLEW_GET_FUN(__glewVertexAttrib2dv)
+#define glVertexAttrib2f GLEW_GET_FUN(__glewVertexAttrib2f)
+#define glVertexAttrib2fv GLEW_GET_FUN(__glewVertexAttrib2fv)
+#define glVertexAttrib2s GLEW_GET_FUN(__glewVertexAttrib2s)
+#define glVertexAttrib2sv GLEW_GET_FUN(__glewVertexAttrib2sv)
+#define glVertexAttrib3d GLEW_GET_FUN(__glewVertexAttrib3d)
+#define glVertexAttrib3dv GLEW_GET_FUN(__glewVertexAttrib3dv)
+#define glVertexAttrib3f GLEW_GET_FUN(__glewVertexAttrib3f)
+#define glVertexAttrib3fv GLEW_GET_FUN(__glewVertexAttrib3fv)
+#define glVertexAttrib3s GLEW_GET_FUN(__glewVertexAttrib3s)
+#define glVertexAttrib3sv GLEW_GET_FUN(__glewVertexAttrib3sv)
+#define glVertexAttrib4Nbv GLEW_GET_FUN(__glewVertexAttrib4Nbv)
+#define glVertexAttrib4Niv GLEW_GET_FUN(__glewVertexAttrib4Niv)
+#define glVertexAttrib4Nsv GLEW_GET_FUN(__glewVertexAttrib4Nsv)
+#define glVertexAttrib4Nub GLEW_GET_FUN(__glewVertexAttrib4Nub)
+#define glVertexAttrib4Nubv GLEW_GET_FUN(__glewVertexAttrib4Nubv)
+#define glVertexAttrib4Nuiv GLEW_GET_FUN(__glewVertexAttrib4Nuiv)
+#define glVertexAttrib4Nusv GLEW_GET_FUN(__glewVertexAttrib4Nusv)
+#define glVertexAttrib4bv GLEW_GET_FUN(__glewVertexAttrib4bv)
+#define glVertexAttrib4d GLEW_GET_FUN(__glewVertexAttrib4d)
+#define glVertexAttrib4dv GLEW_GET_FUN(__glewVertexAttrib4dv)
+#define glVertexAttrib4f GLEW_GET_FUN(__glewVertexAttrib4f)
+#define glVertexAttrib4fv GLEW_GET_FUN(__glewVertexAttrib4fv)
+#define glVertexAttrib4iv GLEW_GET_FUN(__glewVertexAttrib4iv)
+#define glVertexAttrib4s GLEW_GET_FUN(__glewVertexAttrib4s)
+#define glVertexAttrib4sv GLEW_GET_FUN(__glewVertexAttrib4sv)
+#define glVertexAttrib4ubv GLEW_GET_FUN(__glewVertexAttrib4ubv)
+#define glVertexAttrib4uiv GLEW_GET_FUN(__glewVertexAttrib4uiv)
+#define glVertexAttrib4usv GLEW_GET_FUN(__glewVertexAttrib4usv)
+#define glVertexAttribPointer GLEW_GET_FUN(__glewVertexAttribPointer)
+
+#define GLEW_VERSION_2_0 GLEW_GET_VAR(__GLEW_VERSION_2_0)
+
+#endif /* GL_VERSION_2_0 */
+
+/* ----------------------------- GL_VERSION_2_1 ---------------------------- */
+
+#ifndef GL_VERSION_2_1
+#define GL_VERSION_2_1 1
+
+#define GL_CURRENT_RASTER_SECONDARY_COLOR 0x845F
+#define GL_PIXEL_PACK_BUFFER 0x88EB
+#define GL_PIXEL_UNPACK_BUFFER 0x88EC
+#define GL_PIXEL_PACK_BUFFER_BINDING 0x88ED
+#define GL_PIXEL_UNPACK_BUFFER_BINDING 0x88EF
+#define GL_FLOAT_MAT2x3 0x8B65
+#define GL_FLOAT_MAT2x4 0x8B66
+#define GL_FLOAT_MAT3x2 0x8B67
+#define GL_FLOAT_MAT3x4 0x8B68
+#define GL_FLOAT_MAT4x2 0x8B69
+#define GL_FLOAT_MAT4x3 0x8B6A
+#define GL_SRGB 0x8C40
+#define GL_SRGB8 0x8C41
+#define GL_SRGB_ALPHA 0x8C42
+#define GL_SRGB8_ALPHA8 0x8C43
+#define GL_SLUMINANCE_ALPHA 0x8C44
+#define GL_SLUMINANCE8_ALPHA8 0x8C45
+#define GL_SLUMINANCE 0x8C46
+#define GL_SLUMINANCE8 0x8C47
+#define GL_COMPRESSED_SRGB 0x8C48
+#define GL_COMPRESSED_SRGB_ALPHA 0x8C49
+#define GL_COMPRESSED_SLUMINANCE 0x8C4A
+#define GL_COMPRESSED_SLUMINANCE_ALPHA 0x8C4B
+
+typedef void (GLAPIENTRY * PFNGLUNIFORMMATRIX2X3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+typedef void (GLAPIENTRY * PFNGLUNIFORMMATRIX2X4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+typedef void (GLAPIENTRY * PFNGLUNIFORMMATRIX3X2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+typedef void (GLAPIENTRY * PFNGLUNIFORMMATRIX3X4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+typedef void (GLAPIENTRY * PFNGLUNIFORMMATRIX4X2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+typedef void (GLAPIENTRY * PFNGLUNIFORMMATRIX4X3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+
+#define glUniformMatrix2x3fv GLEW_GET_FUN(__glewUniformMatrix2x3fv)
+#define glUniformMatrix2x4fv GLEW_GET_FUN(__glewUniformMatrix2x4fv)
+#define glUniformMatrix3x2fv GLEW_GET_FUN(__glewUniformMatrix3x2fv)
+#define glUniformMatrix3x4fv GLEW_GET_FUN(__glewUniformMatrix3x4fv)
+#define glUniformMatrix4x2fv GLEW_GET_FUN(__glewUniformMatrix4x2fv)
+#define glUniformMatrix4x3fv GLEW_GET_FUN(__glewUniformMatrix4x3fv)
+
+#define GLEW_VERSION_2_1 GLEW_GET_VAR(__GLEW_VERSION_2_1)
+
+#endif /* GL_VERSION_2_1 */
+
+/* ----------------------------- GL_VERSION_3_0 ---------------------------- */
+
+#ifndef GL_VERSION_3_0
+#define GL_VERSION_3_0 1
+
+#define GL_CLIP_DISTANCE0 GL_CLIP_PLANE0
+#define GL_CLIP_DISTANCE1 GL_CLIP_PLANE1
+#define GL_CLIP_DISTANCE2 GL_CLIP_PLANE2
+#define GL_CLIP_DISTANCE3 GL_CLIP_PLANE3
+#define GL_CLIP_DISTANCE4 GL_CLIP_PLANE4
+#define GL_CLIP_DISTANCE5 GL_CLIP_PLANE5
+#define GL_COMPARE_REF_TO_TEXTURE GL_COMPARE_R_TO_TEXTURE_ARB
+#define GL_MAX_CLIP_DISTANCES GL_MAX_CLIP_PLANES
+#define GL_MAX_VARYING_COMPONENTS GL_MAX_VARYING_FLOATS
+#define GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT 0x0001
+#define GL_MAJOR_VERSION 0x821B
+#define GL_MINOR_VERSION 0x821C
+#define GL_NUM_EXTENSIONS 0x821D
+#define GL_CONTEXT_FLAGS 0x821E
+#define GL_DEPTH_BUFFER 0x8223
+#define GL_STENCIL_BUFFER 0x8224
+#define GL_RGBA32F 0x8814
+#define GL_RGB32F 0x8815
+#define GL_RGBA16F 0x881A
+#define GL_RGB16F 0x881B
+#define GL_VERTEX_ATTRIB_ARRAY_INTEGER 0x88FD
+#define GL_MAX_ARRAY_TEXTURE_LAYERS 0x88FF
+#define GL_MIN_PROGRAM_TEXEL_OFFSET 0x8904
+#define GL_MAX_PROGRAM_TEXEL_OFFSET 0x8905
+#define GL_CLAMP_VERTEX_COLOR 0x891A
+#define GL_CLAMP_FRAGMENT_COLOR 0x891B
+#define GL_CLAMP_READ_COLOR 0x891C
+#define GL_FIXED_ONLY 0x891D
+#define GL_TEXTURE_RED_TYPE 0x8C10
+#define GL_TEXTURE_GREEN_TYPE 0x8C11
+#define GL_TEXTURE_BLUE_TYPE 0x8C12
+#define GL_TEXTURE_ALPHA_TYPE 0x8C13
+#define GL_TEXTURE_LUMINANCE_TYPE 0x8C14
+#define GL_TEXTURE_INTENSITY_TYPE 0x8C15
+#define GL_TEXTURE_DEPTH_TYPE 0x8C16
+#define GL_TEXTURE_1D_ARRAY 0x8C18
+#define GL_PROXY_TEXTURE_1D_ARRAY 0x8C19
+#define GL_TEXTURE_2D_ARRAY 0x8C1A
+#define GL_PROXY_TEXTURE_2D_ARRAY 0x8C1B
+#define GL_TEXTURE_BINDING_1D_ARRAY 0x8C1C
+#define GL_TEXTURE_BINDING_2D_ARRAY 0x8C1D
+#define GL_R11F_G11F_B10F 0x8C3A
+#define GL_UNSIGNED_INT_10F_11F_11F_REV 0x8C3B
+#define GL_RGB9_E5 0x8C3D
+#define GL_UNSIGNED_INT_5_9_9_9_REV 0x8C3E
+#define GL_TEXTURE_SHARED_SIZE 0x8C3F
+#define GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH 0x8C76
+#define GL_TRANSFORM_FEEDBACK_BUFFER_MODE 0x8C7F
+#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS 0x8C80
+#define GL_TRANSFORM_FEEDBACK_VARYINGS 0x8C83
+#define GL_TRANSFORM_FEEDBACK_BUFFER_START 0x8C84
+#define GL_TRANSFORM_FEEDBACK_BUFFER_SIZE 0x8C85
+#define GL_PRIMITIVES_GENERATED 0x8C87
+#define GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN 0x8C88
+#define GL_RASTERIZER_DISCARD 0x8C89
+#define GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS 0x8C8A
+#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS 0x8C8B
+#define GL_INTERLEAVED_ATTRIBS 0x8C8C
+#define GL_SEPARATE_ATTRIBS 0x8C8D
+#define GL_TRANSFORM_FEEDBACK_BUFFER 0x8C8E
+#define GL_TRANSFORM_FEEDBACK_BUFFER_BINDING 0x8C8F
+#define GL_RGBA32UI 0x8D70
+#define GL_RGB32UI 0x8D71
+#define GL_RGBA16UI 0x8D76
+#define GL_RGB16UI 0x8D77
+#define GL_RGBA8UI 0x8D7C
+#define GL_RGB8UI 0x8D7D
+#define GL_RGBA32I 0x8D82
+#define GL_RGB32I 0x8D83
+#define GL_RGBA16I 0x8D88
+#define GL_RGB16I 0x8D89
+#define GL_RGBA8I 0x8D8E
+#define GL_RGB8I 0x8D8F
+#define GL_RED_INTEGER 0x8D94
+#define GL_GREEN_INTEGER 0x8D95
+#define GL_BLUE_INTEGER 0x8D96
+#define GL_ALPHA_INTEGER 0x8D97
+#define GL_RGB_INTEGER 0x8D98
+#define GL_RGBA_INTEGER 0x8D99
+#define GL_BGR_INTEGER 0x8D9A
+#define GL_BGRA_INTEGER 0x8D9B
+#define GL_SAMPLER_1D_ARRAY 0x8DC0
+#define GL_SAMPLER_2D_ARRAY 0x8DC1
+#define GL_SAMPLER_1D_ARRAY_SHADOW 0x8DC3
+#define GL_SAMPLER_2D_ARRAY_SHADOW 0x8DC4
+#define GL_SAMPLER_CUBE_SHADOW 0x8DC5
+#define GL_UNSIGNED_INT_VEC2 0x8DC6
+#define GL_UNSIGNED_INT_VEC3 0x8DC7
+#define GL_UNSIGNED_INT_VEC4 0x8DC8
+#define GL_INT_SAMPLER_1D 0x8DC9
+#define GL_INT_SAMPLER_2D 0x8DCA
+#define GL_INT_SAMPLER_3D 0x8DCB
+#define GL_INT_SAMPLER_CUBE 0x8DCC
+#define GL_INT_SAMPLER_1D_ARRAY 0x8DCE
+#define GL_INT_SAMPLER_2D_ARRAY 0x8DCF
+#define GL_UNSIGNED_INT_SAMPLER_1D 0x8DD1
+#define GL_UNSIGNED_INT_SAMPLER_2D 0x8DD2
+#define GL_UNSIGNED_INT_SAMPLER_3D 0x8DD3
+#define GL_UNSIGNED_INT_SAMPLER_CUBE 0x8DD4
+#define GL_UNSIGNED_INT_SAMPLER_1D_ARRAY 0x8DD6
+#define GL_UNSIGNED_INT_SAMPLER_2D_ARRAY 0x8DD7
+#define GL_QUERY_WAIT 0x8E13
+#define GL_QUERY_NO_WAIT 0x8E14
+#define GL_QUERY_BY_REGION_WAIT 0x8E15
+#define GL_QUERY_BY_REGION_NO_WAIT 0x8E16
+
+typedef void (GLAPIENTRY * PFNGLBEGINCONDITIONALRENDERPROC) (GLuint id, GLenum mode);
+typedef void (GLAPIENTRY * PFNGLBEGINTRANSFORMFEEDBACKPROC) (GLenum primitiveMode);
+typedef void (GLAPIENTRY * PFNGLBINDFRAGDATALOCATIONPROC) (GLuint program, GLuint colorNumber, const GLchar* name);
+typedef void (GLAPIENTRY * PFNGLCLAMPCOLORPROC) (GLenum target, GLenum clamp);
+typedef void (GLAPIENTRY * PFNGLCLEARBUFFERFIPROC) (GLenum buffer, GLint drawBuffer, GLfloat depth, GLint stencil);
+typedef void (GLAPIENTRY * PFNGLCLEARBUFFERFVPROC) (GLenum buffer, GLint drawBuffer, const GLfloat* value);
+typedef void (GLAPIENTRY * PFNGLCLEARBUFFERIVPROC) (GLenum buffer, GLint drawBuffer, const GLint* value);
+typedef void (GLAPIENTRY * PFNGLCLEARBUFFERUIVPROC) (GLenum buffer, GLint drawBuffer, const GLuint* value);
+typedef void (GLAPIENTRY * PFNGLCOLORMASKIPROC) (GLuint buf, GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
+typedef void (GLAPIENTRY * PFNGLDISABLEIPROC) (GLenum cap, GLuint index);
+typedef void (GLAPIENTRY * PFNGLENABLEIPROC) (GLenum cap, GLuint index);
+typedef void (GLAPIENTRY * PFNGLENDCONDITIONALRENDERPROC) (void);
+typedef void (GLAPIENTRY * PFNGLENDTRANSFORMFEEDBACKPROC) (void);
+typedef void (GLAPIENTRY * PFNGLGETBOOLEANI_VPROC) (GLenum pname, GLuint index, GLboolean* data);
+typedef GLint (GLAPIENTRY * PFNGLGETFRAGDATALOCATIONPROC) (GLuint program, const GLchar* name);
+typedef const GLubyte* (GLAPIENTRY * PFNGLGETSTRINGIPROC) (GLenum name, GLuint index);
+typedef void (GLAPIENTRY * PFNGLGETTEXPARAMETERIIVPROC) (GLenum target, GLenum pname, GLint* params);
+typedef void (GLAPIENTRY * PFNGLGETTEXPARAMETERIUIVPROC) (GLenum target, GLenum pname, GLuint* params);
+typedef void (GLAPIENTRY * PFNGLGETTRANSFORMFEEDBACKVARYINGPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei * length, GLsizei * size, GLenum * type, GLchar * name);
+typedef void (GLAPIENTRY * PFNGLGETUNIFORMUIVPROC) (GLuint program, GLint location, GLuint* params);
+typedef void (GLAPIENTRY * PFNGLGETVERTEXATTRIBIIVPROC) (GLuint index, GLenum pname, GLint* params);
+typedef void (GLAPIENTRY * PFNGLGETVERTEXATTRIBIUIVPROC) (GLuint index, GLenum pname, GLuint* params);
+typedef GLboolean (GLAPIENTRY * PFNGLISENABLEDIPROC) (GLenum cap, GLuint index);
+typedef void (GLAPIENTRY * PFNGLTEXPARAMETERIIVPROC) (GLenum target, GLenum pname, const GLint* params);
+typedef void (GLAPIENTRY * PFNGLTEXPARAMETERIUIVPROC) (GLenum target, GLenum pname, const GLuint* params);
+typedef void (GLAPIENTRY * PFNGLTRANSFORMFEEDBACKVARYINGSPROC) (GLuint program, GLsizei count, const GLchar *const* varyings, GLenum bufferMode);
+typedef void (GLAPIENTRY * PFNGLUNIFORM1UIPROC) (GLint location, GLuint v0);
+typedef void (GLAPIENTRY * PFNGLUNIFORM1UIVPROC) (GLint location, GLsizei count, const GLuint* value);
+typedef void (GLAPIENTRY * PFNGLUNIFORM2UIPROC) (GLint location, GLuint v0, GLuint v1);
+typedef void (GLAPIENTRY * PFNGLUNIFORM2UIVPROC) (GLint location, GLsizei count, const GLuint* value);
+typedef void (GLAPIENTRY * PFNGLUNIFORM3UIPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2);
+typedef void (GLAPIENTRY * PFNGLUNIFORM3UIVPROC) (GLint location, GLsizei count, const GLuint* value);
+typedef void (GLAPIENTRY * PFNGLUNIFORM4UIPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
+typedef void (GLAPIENTRY * PFNGLUNIFORM4UIVPROC) (GLint location, GLsizei count, const GLuint* value);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBI1IPROC) (GLuint index, GLint v0);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBI1IVPROC) (GLuint index, const GLint* v0);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBI1UIPROC) (GLuint index, GLuint v0);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBI1UIVPROC) (GLuint index, const GLuint* v0);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBI2IPROC) (GLuint index, GLint v0, GLint v1);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBI2IVPROC) (GLuint index, const GLint* v0);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBI2UIPROC) (GLuint index, GLuint v0, GLuint v1);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBI2UIVPROC) (GLuint index, const GLuint* v0);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBI3IPROC) (GLuint index, GLint v0, GLint v1, GLint v2);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBI3IVPROC) (GLuint index, const GLint* v0);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBI3UIPROC) (GLuint index, GLuint v0, GLuint v1, GLuint v2);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBI3UIVPROC) (GLuint index, const GLuint* v0);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBI4BVPROC) (GLuint index, const GLbyte* v0);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBI4IPROC) (GLuint index, GLint v0, GLint v1, GLint v2, GLint v3);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBI4IVPROC) (GLuint index, const GLint* v0);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBI4SVPROC) (GLuint index, const GLshort* v0);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBI4UBVPROC) (GLuint index, const GLubyte* v0);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBI4UIPROC) (GLuint index, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBI4UIVPROC) (GLuint index, const GLuint* v0);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBI4USVPROC) (GLuint index, const GLushort* v0);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBIPOINTERPROC) (GLuint index, GLint size, GLenum type, GLsizei stride, const void*pointer);
+
+#define glBeginConditionalRender GLEW_GET_FUN(__glewBeginConditionalRender)
+#define glBeginTransformFeedback GLEW_GET_FUN(__glewBeginTransformFeedback)
+#define glBindFragDataLocation GLEW_GET_FUN(__glewBindFragDataLocation)
+#define glClampColor GLEW_GET_FUN(__glewClampColor)
+#define glClearBufferfi GLEW_GET_FUN(__glewClearBufferfi)
+#define glClearBufferfv GLEW_GET_FUN(__glewClearBufferfv)
+#define glClearBufferiv GLEW_GET_FUN(__glewClearBufferiv)
+#define glClearBufferuiv GLEW_GET_FUN(__glewClearBufferuiv)
+#define glColorMaski GLEW_GET_FUN(__glewColorMaski)
+#define glDisablei GLEW_GET_FUN(__glewDisablei)
+#define glEnablei GLEW_GET_FUN(__glewEnablei)
+#define glEndConditionalRender GLEW_GET_FUN(__glewEndConditionalRender)
+#define glEndTransformFeedback GLEW_GET_FUN(__glewEndTransformFeedback)
+#define glGetBooleani_v GLEW_GET_FUN(__glewGetBooleani_v)
+#define glGetFragDataLocation GLEW_GET_FUN(__glewGetFragDataLocation)
+#define glGetStringi GLEW_GET_FUN(__glewGetStringi)
+#define glGetTexParameterIiv GLEW_GET_FUN(__glewGetTexParameterIiv)
+#define glGetTexParameterIuiv GLEW_GET_FUN(__glewGetTexParameterIuiv)
+#define glGetTransformFeedbackVarying GLEW_GET_FUN(__glewGetTransformFeedbackVarying)
+#define glGetUniformuiv GLEW_GET_FUN(__glewGetUniformuiv)
+#define glGetVertexAttribIiv GLEW_GET_FUN(__glewGetVertexAttribIiv)
+#define glGetVertexAttribIuiv GLEW_GET_FUN(__glewGetVertexAttribIuiv)
+#define glIsEnabledi GLEW_GET_FUN(__glewIsEnabledi)
+#define glTexParameterIiv GLEW_GET_FUN(__glewTexParameterIiv)
+#define glTexParameterIuiv GLEW_GET_FUN(__glewTexParameterIuiv)
+#define glTransformFeedbackVaryings GLEW_GET_FUN(__glewTransformFeedbackVaryings)
+#define glUniform1ui GLEW_GET_FUN(__glewUniform1ui)
+#define glUniform1uiv GLEW_GET_FUN(__glewUniform1uiv)
+#define glUniform2ui GLEW_GET_FUN(__glewUniform2ui)
+#define glUniform2uiv GLEW_GET_FUN(__glewUniform2uiv)
+#define glUniform3ui GLEW_GET_FUN(__glewUniform3ui)
+#define glUniform3uiv GLEW_GET_FUN(__glewUniform3uiv)
+#define glUniform4ui GLEW_GET_FUN(__glewUniform4ui)
+#define glUniform4uiv GLEW_GET_FUN(__glewUniform4uiv)
+#define glVertexAttribI1i GLEW_GET_FUN(__glewVertexAttribI1i)
+#define glVertexAttribI1iv GLEW_GET_FUN(__glewVertexAttribI1iv)
+#define glVertexAttribI1ui GLEW_GET_FUN(__glewVertexAttribI1ui)
+#define glVertexAttribI1uiv GLEW_GET_FUN(__glewVertexAttribI1uiv)
+#define glVertexAttribI2i GLEW_GET_FUN(__glewVertexAttribI2i)
+#define glVertexAttribI2iv GLEW_GET_FUN(__glewVertexAttribI2iv)
+#define glVertexAttribI2ui GLEW_GET_FUN(__glewVertexAttribI2ui)
+#define glVertexAttribI2uiv GLEW_GET_FUN(__glewVertexAttribI2uiv)
+#define glVertexAttribI3i GLEW_GET_FUN(__glewVertexAttribI3i)
+#define glVertexAttribI3iv GLEW_GET_FUN(__glewVertexAttribI3iv)
+#define glVertexAttribI3ui GLEW_GET_FUN(__glewVertexAttribI3ui)
+#define glVertexAttribI3uiv GLEW_GET_FUN(__glewVertexAttribI3uiv)
+#define glVertexAttribI4bv GLEW_GET_FUN(__glewVertexAttribI4bv)
+#define glVertexAttribI4i GLEW_GET_FUN(__glewVertexAttribI4i)
+#define glVertexAttribI4iv GLEW_GET_FUN(__glewVertexAttribI4iv)
+#define glVertexAttribI4sv GLEW_GET_FUN(__glewVertexAttribI4sv)
+#define glVertexAttribI4ubv GLEW_GET_FUN(__glewVertexAttribI4ubv)
+#define glVertexAttribI4ui GLEW_GET_FUN(__glewVertexAttribI4ui)
+#define glVertexAttribI4uiv GLEW_GET_FUN(__glewVertexAttribI4uiv)
+#define glVertexAttribI4usv GLEW_GET_FUN(__glewVertexAttribI4usv)
+#define glVertexAttribIPointer GLEW_GET_FUN(__glewVertexAttribIPointer)
+
+#define GLEW_VERSION_3_0 GLEW_GET_VAR(__GLEW_VERSION_3_0)
+
+#endif /* GL_VERSION_3_0 */
+
+/* ----------------------------- GL_VERSION_3_1 ---------------------------- */
+
+#ifndef GL_VERSION_3_1
+#define GL_VERSION_3_1 1
+
+#define GL_TEXTURE_RECTANGLE 0x84F5
+#define GL_TEXTURE_BINDING_RECTANGLE 0x84F6
+#define GL_PROXY_TEXTURE_RECTANGLE 0x84F7
+#define GL_MAX_RECTANGLE_TEXTURE_SIZE 0x84F8
+#define GL_SAMPLER_2D_RECT 0x8B63
+#define GL_SAMPLER_2D_RECT_SHADOW 0x8B64
+#define GL_TEXTURE_BUFFER 0x8C2A
+#define GL_MAX_TEXTURE_BUFFER_SIZE 0x8C2B
+#define GL_TEXTURE_BINDING_BUFFER 0x8C2C
+#define GL_TEXTURE_BUFFER_DATA_STORE_BINDING 0x8C2D
+#define GL_TEXTURE_BUFFER_FORMAT 0x8C2E
+#define GL_SAMPLER_BUFFER 0x8DC2
+#define GL_INT_SAMPLER_2D_RECT 0x8DCD
+#define GL_INT_SAMPLER_BUFFER 0x8DD0
+#define GL_UNSIGNED_INT_SAMPLER_2D_RECT 0x8DD5
+#define GL_UNSIGNED_INT_SAMPLER_BUFFER 0x8DD8
+#define GL_RED_SNORM 0x8F90
+#define GL_RG_SNORM 0x8F91
+#define GL_RGB_SNORM 0x8F92
+#define GL_RGBA_SNORM 0x8F93
+#define GL_R8_SNORM 0x8F94
+#define GL_RG8_SNORM 0x8F95
+#define GL_RGB8_SNORM 0x8F96
+#define GL_RGBA8_SNORM 0x8F97
+#define GL_R16_SNORM 0x8F98
+#define GL_RG16_SNORM 0x8F99
+#define GL_RGB16_SNORM 0x8F9A
+#define GL_RGBA16_SNORM 0x8F9B
+#define GL_SIGNED_NORMALIZED 0x8F9C
+#define GL_PRIMITIVE_RESTART 0x8F9D
+#define GL_PRIMITIVE_RESTART_INDEX 0x8F9E
+#define GL_BUFFER_ACCESS_FLAGS 0x911F
+#define GL_BUFFER_MAP_LENGTH 0x9120
+#define GL_BUFFER_MAP_OFFSET 0x9121
+
+typedef void (GLAPIENTRY * PFNGLDRAWARRAYSINSTANCEDPROC) (GLenum mode, GLint first, GLsizei count, GLsizei primcount);
+typedef void (GLAPIENTRY * PFNGLDRAWELEMENTSINSTANCEDPROC) (GLenum mode, GLsizei count, GLenum type, const void* indices, GLsizei primcount);
+typedef void (GLAPIENTRY * PFNGLPRIMITIVERESTARTINDEXPROC) (GLuint buffer);
+typedef void (GLAPIENTRY * PFNGLTEXBUFFERPROC) (GLenum target, GLenum internalFormat, GLuint buffer);
+
+#define glDrawArraysInstanced GLEW_GET_FUN(__glewDrawArraysInstanced)
+#define glDrawElementsInstanced GLEW_GET_FUN(__glewDrawElementsInstanced)
+#define glPrimitiveRestartIndex GLEW_GET_FUN(__glewPrimitiveRestartIndex)
+#define glTexBuffer GLEW_GET_FUN(__glewTexBuffer)
+
+#define GLEW_VERSION_3_1 GLEW_GET_VAR(__GLEW_VERSION_3_1)
+
+#endif /* GL_VERSION_3_1 */
+
+/* ----------------------------- GL_VERSION_3_2 ---------------------------- */
+
+#ifndef GL_VERSION_3_2
+#define GL_VERSION_3_2 1
+
+#define GL_CONTEXT_CORE_PROFILE_BIT 0x00000001
+#define GL_CONTEXT_COMPATIBILITY_PROFILE_BIT 0x00000002
+#define GL_LINES_ADJACENCY 0x000A
+#define GL_LINE_STRIP_ADJACENCY 0x000B
+#define GL_TRIANGLES_ADJACENCY 0x000C
+#define GL_TRIANGLE_STRIP_ADJACENCY 0x000D
+#define GL_PROGRAM_POINT_SIZE 0x8642
+#define GL_GEOMETRY_VERTICES_OUT 0x8916
+#define GL_GEOMETRY_INPUT_TYPE 0x8917
+#define GL_GEOMETRY_OUTPUT_TYPE 0x8918
+#define GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS 0x8C29
+#define GL_FRAMEBUFFER_ATTACHMENT_LAYERED 0x8DA7
+#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS 0x8DA8
+#define GL_GEOMETRY_SHADER 0x8DD9
+#define GL_MAX_GEOMETRY_UNIFORM_COMPONENTS 0x8DDF
+#define GL_MAX_GEOMETRY_OUTPUT_VERTICES 0x8DE0
+#define GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS 0x8DE1
+#define GL_MAX_VERTEX_OUTPUT_COMPONENTS 0x9122
+#define GL_MAX_GEOMETRY_INPUT_COMPONENTS 0x9123
+#define GL_MAX_GEOMETRY_OUTPUT_COMPONENTS 0x9124
+#define GL_MAX_FRAGMENT_INPUT_COMPONENTS 0x9125
+#define GL_CONTEXT_PROFILE_MASK 0x9126
+
+typedef void (GLAPIENTRY * PFNGLFRAMEBUFFERTEXTUREPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level);
+typedef void (GLAPIENTRY * PFNGLGETBUFFERPARAMETERI64VPROC) (GLenum target, GLenum value, GLint64 * data);
+typedef void (GLAPIENTRY * PFNGLGETINTEGER64I_VPROC) (GLenum pname, GLuint index, GLint64 * data);
+
+#define glFramebufferTexture GLEW_GET_FUN(__glewFramebufferTexture)
+#define glGetBufferParameteri64v GLEW_GET_FUN(__glewGetBufferParameteri64v)
+#define glGetInteger64i_v GLEW_GET_FUN(__glewGetInteger64i_v)
+
+#define GLEW_VERSION_3_2 GLEW_GET_VAR(__GLEW_VERSION_3_2)
+
+#endif /* GL_VERSION_3_2 */
+
+/* ----------------------------- GL_VERSION_3_3 ---------------------------- */
+
+#ifndef GL_VERSION_3_3
+#define GL_VERSION_3_3 1
+
+#define GL_VERTEX_ATTRIB_ARRAY_DIVISOR 0x88FE
+#define GL_RGB10_A2UI 0x906F
+
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBDIVISORPROC) (GLuint index, GLuint divisor);
+
+#define glVertexAttribDivisor GLEW_GET_FUN(__glewVertexAttribDivisor)
+
+#define GLEW_VERSION_3_3 GLEW_GET_VAR(__GLEW_VERSION_3_3)
+
+#endif /* GL_VERSION_3_3 */
+
+/* ----------------------------- GL_VERSION_4_0 ---------------------------- */
+
+#ifndef GL_VERSION_4_0
+#define GL_VERSION_4_0 1
+
+#define GL_SAMPLE_SHADING 0x8C36
+#define GL_MIN_SAMPLE_SHADING_VALUE 0x8C37
+#define GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET 0x8E5E
+#define GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET 0x8E5F
+#define GL_MAX_PROGRAM_TEXTURE_GATHER_COMPONENTS 0x8F9F
+#define GL_TEXTURE_CUBE_MAP_ARRAY 0x9009
+#define GL_TEXTURE_BINDING_CUBE_MAP_ARRAY 0x900A
+#define GL_PROXY_TEXTURE_CUBE_MAP_ARRAY 0x900B
+#define GL_SAMPLER_CUBE_MAP_ARRAY 0x900C
+#define GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW 0x900D
+#define GL_INT_SAMPLER_CUBE_MAP_ARRAY 0x900E
+#define GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY 0x900F
+
+typedef void (GLAPIENTRY * PFNGLBLENDEQUATIONSEPARATEIPROC) (GLuint buf, GLenum modeRGB, GLenum modeAlpha);
+typedef void (GLAPIENTRY * PFNGLBLENDEQUATIONIPROC) (GLuint buf, GLenum mode);
+typedef void (GLAPIENTRY * PFNGLBLENDFUNCSEPARATEIPROC) (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
+typedef void (GLAPIENTRY * PFNGLBLENDFUNCIPROC) (GLuint buf, GLenum src, GLenum dst);
+typedef void (GLAPIENTRY * PFNGLMINSAMPLESHADINGPROC) (GLclampf value);
+
+#define glBlendEquationSeparatei GLEW_GET_FUN(__glewBlendEquationSeparatei)
+#define glBlendEquationi GLEW_GET_FUN(__glewBlendEquationi)
+#define glBlendFuncSeparatei GLEW_GET_FUN(__glewBlendFuncSeparatei)
+#define glBlendFunci GLEW_GET_FUN(__glewBlendFunci)
+#define glMinSampleShading GLEW_GET_FUN(__glewMinSampleShading)
+
+#define GLEW_VERSION_4_0 GLEW_GET_VAR(__GLEW_VERSION_4_0)
+
+#endif /* GL_VERSION_4_0 */
+
+/* ----------------------------- GL_VERSION_4_1 ---------------------------- */
+
+#ifndef GL_VERSION_4_1
+#define GL_VERSION_4_1 1
+
+#define GLEW_VERSION_4_1 GLEW_GET_VAR(__GLEW_VERSION_4_1)
+
+#endif /* GL_VERSION_4_1 */
+
+/* ----------------------------- GL_VERSION_4_2 ---------------------------- */
+
+#ifndef GL_VERSION_4_2
+#define GL_VERSION_4_2 1
+
+#define GL_COMPRESSED_RGBA_BPTC_UNORM 0x8E8C
+#define GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM 0x8E8D
+#define GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT 0x8E8E
+#define GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT 0x8E8F
+#define GL_COPY_READ_BUFFER_BINDING 0x8F36
+#define GL_COPY_WRITE_BUFFER_BINDING 0x8F37
+
+#define GLEW_VERSION_4_2 GLEW_GET_VAR(__GLEW_VERSION_4_2)
+
+#endif /* GL_VERSION_4_2 */
+
+/* ----------------------------- GL_VERSION_4_3 ---------------------------- */
+
+#ifndef GL_VERSION_4_3
+#define GL_VERSION_4_3 1
+
+#define GL_NUM_SHADING_LANGUAGE_VERSIONS 0x82E9
+#define GL_VERTEX_ATTRIB_ARRAY_LONG 0x874E
+
+#define GLEW_VERSION_4_3 GLEW_GET_VAR(__GLEW_VERSION_4_3)
+
+#endif /* GL_VERSION_4_3 */
+
+/* ----------------------------- GL_VERSION_4_4 ---------------------------- */
+
+#ifndef GL_VERSION_4_4
+#define GL_VERSION_4_4 1
+
+#define GL_PRIMITIVE_RESTART_FOR_PATCHES_SUPPORTED 0x8221
+#define GL_MAX_VERTEX_ATTRIB_STRIDE 0x82E5
+#define GL_TEXTURE_BUFFER_BINDING 0x8C2A
+
+#define GLEW_VERSION_4_4 GLEW_GET_VAR(__GLEW_VERSION_4_4)
+
+#endif /* GL_VERSION_4_4 */
+
+/* ----------------------------- GL_VERSION_4_5 ---------------------------- */
+
+#ifndef GL_VERSION_4_5
+#define GL_VERSION_4_5 1
+
+typedef GLenum (GLAPIENTRY * PFNGLGETGRAPHICSRESETSTATUSPROC) (void);
+
+#define glGetGraphicsResetStatus GLEW_GET_FUN(__glewGetGraphicsResetStatus)
+
+#define GLEW_VERSION_4_5 GLEW_GET_VAR(__GLEW_VERSION_4_5)
+
+#endif /* GL_VERSION_4_5 */
+
+/* -------------------------- GL_3DFX_multisample -------------------------- */
+
+#ifndef GL_3DFX_multisample
+#define GL_3DFX_multisample 1
+
+#define GL_MULTISAMPLE_3DFX 0x86B2
+#define GL_SAMPLE_BUFFERS_3DFX 0x86B3
+#define GL_SAMPLES_3DFX 0x86B4
+#define GL_MULTISAMPLE_BIT_3DFX 0x20000000
+
+#define GLEW_3DFX_multisample GLEW_GET_VAR(__GLEW_3DFX_multisample)
+
+#endif /* GL_3DFX_multisample */
+
+/* ---------------------------- GL_3DFX_tbuffer ---------------------------- */
+
+#ifndef GL_3DFX_tbuffer
+#define GL_3DFX_tbuffer 1
+
+typedef void (GLAPIENTRY * PFNGLTBUFFERMASK3DFXPROC) (GLuint mask);
+
+#define glTbufferMask3DFX GLEW_GET_FUN(__glewTbufferMask3DFX)
+
+#define GLEW_3DFX_tbuffer GLEW_GET_VAR(__GLEW_3DFX_tbuffer)
+
+#endif /* GL_3DFX_tbuffer */
+
+/* -------------------- GL_3DFX_texture_compression_FXT1 ------------------- */
+
+#ifndef GL_3DFX_texture_compression_FXT1
+#define GL_3DFX_texture_compression_FXT1 1
+
+#define GL_COMPRESSED_RGB_FXT1_3DFX 0x86B0
+#define GL_COMPRESSED_RGBA_FXT1_3DFX 0x86B1
+
+#define GLEW_3DFX_texture_compression_FXT1 GLEW_GET_VAR(__GLEW_3DFX_texture_compression_FXT1)
+
+#endif /* GL_3DFX_texture_compression_FXT1 */
+
+/* ----------------------- GL_AMD_blend_minmax_factor ---------------------- */
+
+#ifndef GL_AMD_blend_minmax_factor
+#define GL_AMD_blend_minmax_factor 1
+
+#define GL_FACTOR_MIN_AMD 0x901C
+#define GL_FACTOR_MAX_AMD 0x901D
+
+#define GLEW_AMD_blend_minmax_factor GLEW_GET_VAR(__GLEW_AMD_blend_minmax_factor)
+
+#endif /* GL_AMD_blend_minmax_factor */
+
+/* ----------------------- GL_AMD_conservative_depth ----------------------- */
+
+#ifndef GL_AMD_conservative_depth
+#define GL_AMD_conservative_depth 1
+
+#define GLEW_AMD_conservative_depth GLEW_GET_VAR(__GLEW_AMD_conservative_depth)
+
+#endif /* GL_AMD_conservative_depth */
+
+/* -------------------------- GL_AMD_debug_output -------------------------- */
+
+#ifndef GL_AMD_debug_output
+#define GL_AMD_debug_output 1
+
+#define GL_MAX_DEBUG_MESSAGE_LENGTH_AMD 0x9143
+#define GL_MAX_DEBUG_LOGGED_MESSAGES_AMD 0x9144
+#define GL_DEBUG_LOGGED_MESSAGES_AMD 0x9145
+#define GL_DEBUG_SEVERITY_HIGH_AMD 0x9146
+#define GL_DEBUG_SEVERITY_MEDIUM_AMD 0x9147
+#define GL_DEBUG_SEVERITY_LOW_AMD 0x9148
+#define GL_DEBUG_CATEGORY_API_ERROR_AMD 0x9149
+#define GL_DEBUG_CATEGORY_WINDOW_SYSTEM_AMD 0x914A
+#define GL_DEBUG_CATEGORY_DEPRECATION_AMD 0x914B
+#define GL_DEBUG_CATEGORY_UNDEFINED_BEHAVIOR_AMD 0x914C
+#define GL_DEBUG_CATEGORY_PERFORMANCE_AMD 0x914D
+#define GL_DEBUG_CATEGORY_SHADER_COMPILER_AMD 0x914E
+#define GL_DEBUG_CATEGORY_APPLICATION_AMD 0x914F
+#define GL_DEBUG_CATEGORY_OTHER_AMD 0x9150
+
+typedef void (GLAPIENTRY *GLDEBUGPROCAMD)(GLuint id, GLenum category, GLenum severity, GLsizei length, const GLchar* message, void* userParam);
+
+typedef void (GLAPIENTRY * PFNGLDEBUGMESSAGECALLBACKAMDPROC) (GLDEBUGPROCAMD callback, void *userParam);
+typedef void (GLAPIENTRY * PFNGLDEBUGMESSAGEENABLEAMDPROC) (GLenum category, GLenum severity, GLsizei count, const GLuint* ids, GLboolean enabled);
+typedef void (GLAPIENTRY * PFNGLDEBUGMESSAGEINSERTAMDPROC) (GLenum category, GLenum severity, GLuint id, GLsizei length, const GLchar* buf);
+typedef GLuint (GLAPIENTRY * PFNGLGETDEBUGMESSAGELOGAMDPROC) (GLuint count, GLsizei bufsize, GLenum* categories, GLuint* severities, GLuint* ids, GLsizei* lengths, GLchar* message);
+
+#define glDebugMessageCallbackAMD GLEW_GET_FUN(__glewDebugMessageCallbackAMD)
+#define glDebugMessageEnableAMD GLEW_GET_FUN(__glewDebugMessageEnableAMD)
+#define glDebugMessageInsertAMD GLEW_GET_FUN(__glewDebugMessageInsertAMD)
+#define glGetDebugMessageLogAMD GLEW_GET_FUN(__glewGetDebugMessageLogAMD)
+
+#define GLEW_AMD_debug_output GLEW_GET_VAR(__GLEW_AMD_debug_output)
+
+#endif /* GL_AMD_debug_output */
+
+/* ---------------------- GL_AMD_depth_clamp_separate ---------------------- */
+
+#ifndef GL_AMD_depth_clamp_separate
+#define GL_AMD_depth_clamp_separate 1
+
+#define GL_DEPTH_CLAMP_NEAR_AMD 0x901E
+#define GL_DEPTH_CLAMP_FAR_AMD 0x901F
+
+#define GLEW_AMD_depth_clamp_separate GLEW_GET_VAR(__GLEW_AMD_depth_clamp_separate)
+
+#endif /* GL_AMD_depth_clamp_separate */
+
+/* ----------------------- GL_AMD_draw_buffers_blend ----------------------- */
+
+#ifndef GL_AMD_draw_buffers_blend
+#define GL_AMD_draw_buffers_blend 1
+
+typedef void (GLAPIENTRY * PFNGLBLENDEQUATIONINDEXEDAMDPROC) (GLuint buf, GLenum mode);
+typedef void (GLAPIENTRY * PFNGLBLENDEQUATIONSEPARATEINDEXEDAMDPROC) (GLuint buf, GLenum modeRGB, GLenum modeAlpha);
+typedef void (GLAPIENTRY * PFNGLBLENDFUNCINDEXEDAMDPROC) (GLuint buf, GLenum src, GLenum dst);
+typedef void (GLAPIENTRY * PFNGLBLENDFUNCSEPARATEINDEXEDAMDPROC) (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
+
+#define glBlendEquationIndexedAMD GLEW_GET_FUN(__glewBlendEquationIndexedAMD)
+#define glBlendEquationSeparateIndexedAMD GLEW_GET_FUN(__glewBlendEquationSeparateIndexedAMD)
+#define glBlendFuncIndexedAMD GLEW_GET_FUN(__glewBlendFuncIndexedAMD)
+#define glBlendFuncSeparateIndexedAMD GLEW_GET_FUN(__glewBlendFuncSeparateIndexedAMD)
+
+#define GLEW_AMD_draw_buffers_blend GLEW_GET_VAR(__GLEW_AMD_draw_buffers_blend)
+
+#endif /* GL_AMD_draw_buffers_blend */
+
+/* --------------------------- GL_AMD_gcn_shader --------------------------- */
+
+#ifndef GL_AMD_gcn_shader
+#define GL_AMD_gcn_shader 1
+
+#define GLEW_AMD_gcn_shader GLEW_GET_VAR(__GLEW_AMD_gcn_shader)
+
+#endif /* GL_AMD_gcn_shader */
+
+/* ------------------------ GL_AMD_gpu_shader_int64 ------------------------ */
+
+#ifndef GL_AMD_gpu_shader_int64
+#define GL_AMD_gpu_shader_int64 1
+
+#define GLEW_AMD_gpu_shader_int64 GLEW_GET_VAR(__GLEW_AMD_gpu_shader_int64)
+
+#endif /* GL_AMD_gpu_shader_int64 */
+
+/* ---------------------- GL_AMD_interleaved_elements ---------------------- */
+
+#ifndef GL_AMD_interleaved_elements
+#define GL_AMD_interleaved_elements 1
+
+#define GL_RED 0x1903
+#define GL_GREEN 0x1904
+#define GL_BLUE 0x1905
+#define GL_ALPHA 0x1906
+#define GL_RG8UI 0x8238
+#define GL_RG16UI 0x823A
+#define GL_RGBA8UI 0x8D7C
+#define GL_VERTEX_ELEMENT_SWIZZLE_AMD 0x91A4
+#define GL_VERTEX_ID_SWIZZLE_AMD 0x91A5
+
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBPARAMETERIAMDPROC) (GLuint index, GLenum pname, GLint param);
+
+#define glVertexAttribParameteriAMD GLEW_GET_FUN(__glewVertexAttribParameteriAMD)
+
+#define GLEW_AMD_interleaved_elements GLEW_GET_VAR(__GLEW_AMD_interleaved_elements)
+
+#endif /* GL_AMD_interleaved_elements */
+
+/* ----------------------- GL_AMD_multi_draw_indirect ---------------------- */
+
+#ifndef GL_AMD_multi_draw_indirect
+#define GL_AMD_multi_draw_indirect 1
+
+typedef void (GLAPIENTRY * PFNGLMULTIDRAWARRAYSINDIRECTAMDPROC) (GLenum mode, const void *indirect, GLsizei primcount, GLsizei stride);
+typedef void (GLAPIENTRY * PFNGLMULTIDRAWELEMENTSINDIRECTAMDPROC) (GLenum mode, GLenum type, const void *indirect, GLsizei primcount, GLsizei stride);
+
+#define glMultiDrawArraysIndirectAMD GLEW_GET_FUN(__glewMultiDrawArraysIndirectAMD)
+#define glMultiDrawElementsIndirectAMD GLEW_GET_FUN(__glewMultiDrawElementsIndirectAMD)
+
+#define GLEW_AMD_multi_draw_indirect GLEW_GET_VAR(__GLEW_AMD_multi_draw_indirect)
+
+#endif /* GL_AMD_multi_draw_indirect */
+
+/* ------------------------- GL_AMD_name_gen_delete ------------------------ */
+
+#ifndef GL_AMD_name_gen_delete
+#define GL_AMD_name_gen_delete 1
+
+#define GL_DATA_BUFFER_AMD 0x9151
+#define GL_PERFORMANCE_MONITOR_AMD 0x9152
+#define GL_QUERY_OBJECT_AMD 0x9153
+#define GL_VERTEX_ARRAY_OBJECT_AMD 0x9154
+#define GL_SAMPLER_OBJECT_AMD 0x9155
+
+typedef void (GLAPIENTRY * PFNGLDELETENAMESAMDPROC) (GLenum identifier, GLuint num, const GLuint* names);
+typedef void (GLAPIENTRY * PFNGLGENNAMESAMDPROC) (GLenum identifier, GLuint num, GLuint* names);
+typedef GLboolean (GLAPIENTRY * PFNGLISNAMEAMDPROC) (GLenum identifier, GLuint name);
+
+#define glDeleteNamesAMD GLEW_GET_FUN(__glewDeleteNamesAMD)
+#define glGenNamesAMD GLEW_GET_FUN(__glewGenNamesAMD)
+#define glIsNameAMD GLEW_GET_FUN(__glewIsNameAMD)
+
+#define GLEW_AMD_name_gen_delete GLEW_GET_VAR(__GLEW_AMD_name_gen_delete)
+
+#endif /* GL_AMD_name_gen_delete */
+
+/* ---------------------- GL_AMD_occlusion_query_event --------------------- */
+
+#ifndef GL_AMD_occlusion_query_event
+#define GL_AMD_occlusion_query_event 1
+
+#define GL_QUERY_DEPTH_PASS_EVENT_BIT_AMD 0x00000001
+#define GL_QUERY_DEPTH_FAIL_EVENT_BIT_AMD 0x00000002
+#define GL_QUERY_STENCIL_FAIL_EVENT_BIT_AMD 0x00000004
+#define GL_QUERY_DEPTH_BOUNDS_FAIL_EVENT_BIT_AMD 0x00000008
+#define GL_OCCLUSION_QUERY_EVENT_MASK_AMD 0x874F
+#define GL_QUERY_ALL_EVENT_BITS_AMD 0xFFFFFFFF
+
+typedef void (GLAPIENTRY * PFNGLQUERYOBJECTPARAMETERUIAMDPROC) (GLenum target, GLuint id, GLenum pname, GLuint param);
+
+#define glQueryObjectParameteruiAMD GLEW_GET_FUN(__glewQueryObjectParameteruiAMD)
+
+#define GLEW_AMD_occlusion_query_event GLEW_GET_VAR(__GLEW_AMD_occlusion_query_event)
+
+#endif /* GL_AMD_occlusion_query_event */
+
+/* ----------------------- GL_AMD_performance_monitor ---------------------- */
+
+#ifndef GL_AMD_performance_monitor
+#define GL_AMD_performance_monitor 1
+
+#define GL_COUNTER_TYPE_AMD 0x8BC0
+#define GL_COUNTER_RANGE_AMD 0x8BC1
+#define GL_UNSIGNED_INT64_AMD 0x8BC2
+#define GL_PERCENTAGE_AMD 0x8BC3
+#define GL_PERFMON_RESULT_AVAILABLE_AMD 0x8BC4
+#define GL_PERFMON_RESULT_SIZE_AMD 0x8BC5
+#define GL_PERFMON_RESULT_AMD 0x8BC6
+
+typedef void (GLAPIENTRY * PFNGLBEGINPERFMONITORAMDPROC) (GLuint monitor);
+typedef void (GLAPIENTRY * PFNGLDELETEPERFMONITORSAMDPROC) (GLsizei n, GLuint* monitors);
+typedef void (GLAPIENTRY * PFNGLENDPERFMONITORAMDPROC) (GLuint monitor);
+typedef void (GLAPIENTRY * PFNGLGENPERFMONITORSAMDPROC) (GLsizei n, GLuint* monitors);
+typedef void (GLAPIENTRY * PFNGLGETPERFMONITORCOUNTERDATAAMDPROC) (GLuint monitor, GLenum pname, GLsizei dataSize, GLuint* data, GLint *bytesWritten);
+typedef void (GLAPIENTRY * PFNGLGETPERFMONITORCOUNTERINFOAMDPROC) (GLuint group, GLuint counter, GLenum pname, void *data);
+typedef void (GLAPIENTRY * PFNGLGETPERFMONITORCOUNTERSTRINGAMDPROC) (GLuint group, GLuint counter, GLsizei bufSize, GLsizei* length, GLchar *counterString);
+typedef void (GLAPIENTRY * PFNGLGETPERFMONITORCOUNTERSAMDPROC) (GLuint group, GLint* numCounters, GLint *maxActiveCounters, GLsizei countersSize, GLuint *counters);
+typedef void (GLAPIENTRY * PFNGLGETPERFMONITORGROUPSTRINGAMDPROC) (GLuint group, GLsizei bufSize, GLsizei* length, GLchar *groupString);
+typedef void (GLAPIENTRY * PFNGLGETPERFMONITORGROUPSAMDPROC) (GLint* numGroups, GLsizei groupsSize, GLuint *groups);
+typedef void (GLAPIENTRY * PFNGLSELECTPERFMONITORCOUNTERSAMDPROC) (GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint* counterList);
+
+#define glBeginPerfMonitorAMD GLEW_GET_FUN(__glewBeginPerfMonitorAMD)
+#define glDeletePerfMonitorsAMD GLEW_GET_FUN(__glewDeletePerfMonitorsAMD)
+#define glEndPerfMonitorAMD GLEW_GET_FUN(__glewEndPerfMonitorAMD)
+#define glGenPerfMonitorsAMD GLEW_GET_FUN(__glewGenPerfMonitorsAMD)
+#define glGetPerfMonitorCounterDataAMD GLEW_GET_FUN(__glewGetPerfMonitorCounterDataAMD)
+#define glGetPerfMonitorCounterInfoAMD GLEW_GET_FUN(__glewGetPerfMonitorCounterInfoAMD)
+#define glGetPerfMonitorCounterStringAMD GLEW_GET_FUN(__glewGetPerfMonitorCounterStringAMD)
+#define glGetPerfMonitorCountersAMD GLEW_GET_FUN(__glewGetPerfMonitorCountersAMD)
+#define glGetPerfMonitorGroupStringAMD GLEW_GET_FUN(__glewGetPerfMonitorGroupStringAMD)
+#define glGetPerfMonitorGroupsAMD GLEW_GET_FUN(__glewGetPerfMonitorGroupsAMD)
+#define glSelectPerfMonitorCountersAMD GLEW_GET_FUN(__glewSelectPerfMonitorCountersAMD)
+
+#define GLEW_AMD_performance_monitor GLEW_GET_VAR(__GLEW_AMD_performance_monitor)
+
+#endif /* GL_AMD_performance_monitor */
+
+/* -------------------------- GL_AMD_pinned_memory ------------------------- */
+
+#ifndef GL_AMD_pinned_memory
+#define GL_AMD_pinned_memory 1
+
+#define GL_EXTERNAL_VIRTUAL_MEMORY_BUFFER_AMD 0x9160
+
+#define GLEW_AMD_pinned_memory GLEW_GET_VAR(__GLEW_AMD_pinned_memory)
+
+#endif /* GL_AMD_pinned_memory */
+
+/* ----------------------- GL_AMD_query_buffer_object ---------------------- */
+
+#ifndef GL_AMD_query_buffer_object
+#define GL_AMD_query_buffer_object 1
+
+#define GL_QUERY_BUFFER_AMD 0x9192
+#define GL_QUERY_BUFFER_BINDING_AMD 0x9193
+#define GL_QUERY_RESULT_NO_WAIT_AMD 0x9194
+
+#define GLEW_AMD_query_buffer_object GLEW_GET_VAR(__GLEW_AMD_query_buffer_object)
+
+#endif /* GL_AMD_query_buffer_object */
+
+/* ------------------------ GL_AMD_sample_positions ------------------------ */
+
+#ifndef GL_AMD_sample_positions
+#define GL_AMD_sample_positions 1
+
+#define GL_SUBSAMPLE_DISTANCE_AMD 0x883F
+
+typedef void (GLAPIENTRY * PFNGLSETMULTISAMPLEFVAMDPROC) (GLenum pname, GLuint index, const GLfloat* val);
+
+#define glSetMultisamplefvAMD GLEW_GET_FUN(__glewSetMultisamplefvAMD)
+
+#define GLEW_AMD_sample_positions GLEW_GET_VAR(__GLEW_AMD_sample_positions)
+
+#endif /* GL_AMD_sample_positions */
+
+/* ------------------ GL_AMD_seamless_cubemap_per_texture ------------------ */
+
+#ifndef GL_AMD_seamless_cubemap_per_texture
+#define GL_AMD_seamless_cubemap_per_texture 1
+
+#define GL_TEXTURE_CUBE_MAP_SEAMLESS_ARB 0x884F
+
+#define GLEW_AMD_seamless_cubemap_per_texture GLEW_GET_VAR(__GLEW_AMD_seamless_cubemap_per_texture)
+
+#endif /* GL_AMD_seamless_cubemap_per_texture */
+
+/* -------------------- GL_AMD_shader_atomic_counter_ops ------------------- */
+
+#ifndef GL_AMD_shader_atomic_counter_ops
+#define GL_AMD_shader_atomic_counter_ops 1
+
+#define GLEW_AMD_shader_atomic_counter_ops GLEW_GET_VAR(__GLEW_AMD_shader_atomic_counter_ops)
+
+#endif /* GL_AMD_shader_atomic_counter_ops */
+
+/* ---------------------- GL_AMD_shader_stencil_export --------------------- */
+
+#ifndef GL_AMD_shader_stencil_export
+#define GL_AMD_shader_stencil_export 1
+
+#define GLEW_AMD_shader_stencil_export GLEW_GET_VAR(__GLEW_AMD_shader_stencil_export)
+
+#endif /* GL_AMD_shader_stencil_export */
+
+/* ------------------- GL_AMD_shader_stencil_value_export ------------------ */
+
+#ifndef GL_AMD_shader_stencil_value_export
+#define GL_AMD_shader_stencil_value_export 1
+
+#define GLEW_AMD_shader_stencil_value_export GLEW_GET_VAR(__GLEW_AMD_shader_stencil_value_export)
+
+#endif /* GL_AMD_shader_stencil_value_export */
+
+/* ---------------------- GL_AMD_shader_trinary_minmax --------------------- */
+
+#ifndef GL_AMD_shader_trinary_minmax
+#define GL_AMD_shader_trinary_minmax 1
+
+#define GLEW_AMD_shader_trinary_minmax GLEW_GET_VAR(__GLEW_AMD_shader_trinary_minmax)
+
+#endif /* GL_AMD_shader_trinary_minmax */
+
+/* ------------------------- GL_AMD_sparse_texture ------------------------- */
+
+#ifndef GL_AMD_sparse_texture
+#define GL_AMD_sparse_texture 1
+
+#define GL_TEXTURE_STORAGE_SPARSE_BIT_AMD 0x00000001
+#define GL_VIRTUAL_PAGE_SIZE_X_AMD 0x9195
+#define GL_VIRTUAL_PAGE_SIZE_Y_AMD 0x9196
+#define GL_VIRTUAL_PAGE_SIZE_Z_AMD 0x9197
+#define GL_MAX_SPARSE_TEXTURE_SIZE_AMD 0x9198
+#define GL_MAX_SPARSE_3D_TEXTURE_SIZE_AMD 0x9199
+#define GL_MAX_SPARSE_ARRAY_TEXTURE_LAYERS 0x919A
+#define GL_MIN_SPARSE_LEVEL_AMD 0x919B
+#define GL_MIN_LOD_WARNING_AMD 0x919C
+
+typedef void (GLAPIENTRY * PFNGLTEXSTORAGESPARSEAMDPROC) (GLenum target, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLsizei layers, GLbitfield flags);
+typedef void (GLAPIENTRY * PFNGLTEXTURESTORAGESPARSEAMDPROC) (GLuint texture, GLenum target, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLsizei layers, GLbitfield flags);
+
+#define glTexStorageSparseAMD GLEW_GET_FUN(__glewTexStorageSparseAMD)
+#define glTextureStorageSparseAMD GLEW_GET_FUN(__glewTextureStorageSparseAMD)
+
+#define GLEW_AMD_sparse_texture GLEW_GET_VAR(__GLEW_AMD_sparse_texture)
+
+#endif /* GL_AMD_sparse_texture */
+
+/* ------------------- GL_AMD_stencil_operation_extended ------------------- */
+
+#ifndef GL_AMD_stencil_operation_extended
+#define GL_AMD_stencil_operation_extended 1
+
+#define GL_SET_AMD 0x874A
+#define GL_REPLACE_VALUE_AMD 0x874B
+#define GL_STENCIL_OP_VALUE_AMD 0x874C
+#define GL_STENCIL_BACK_OP_VALUE_AMD 0x874D
+
+typedef void (GLAPIENTRY * PFNGLSTENCILOPVALUEAMDPROC) (GLenum face, GLuint value);
+
+#define glStencilOpValueAMD GLEW_GET_FUN(__glewStencilOpValueAMD)
+
+#define GLEW_AMD_stencil_operation_extended GLEW_GET_VAR(__GLEW_AMD_stencil_operation_extended)
+
+#endif /* GL_AMD_stencil_operation_extended */
+
+/* ------------------------ GL_AMD_texture_texture4 ------------------------ */
+
+#ifndef GL_AMD_texture_texture4
+#define GL_AMD_texture_texture4 1
+
+#define GLEW_AMD_texture_texture4 GLEW_GET_VAR(__GLEW_AMD_texture_texture4)
+
+#endif /* GL_AMD_texture_texture4 */
+
+/* --------------- GL_AMD_transform_feedback3_lines_triangles -------------- */
+
+#ifndef GL_AMD_transform_feedback3_lines_triangles
+#define GL_AMD_transform_feedback3_lines_triangles 1
+
+#define GLEW_AMD_transform_feedback3_lines_triangles GLEW_GET_VAR(__GLEW_AMD_transform_feedback3_lines_triangles)
+
+#endif /* GL_AMD_transform_feedback3_lines_triangles */
+
+/* ----------------------- GL_AMD_transform_feedback4 ---------------------- */
+
+#ifndef GL_AMD_transform_feedback4
+#define GL_AMD_transform_feedback4 1
+
+#define GL_STREAM_RASTERIZATION_AMD 0x91A0
+
+#define GLEW_AMD_transform_feedback4 GLEW_GET_VAR(__GLEW_AMD_transform_feedback4)
+
+#endif /* GL_AMD_transform_feedback4 */
+
+/* ----------------------- GL_AMD_vertex_shader_layer ---------------------- */
+
+#ifndef GL_AMD_vertex_shader_layer
+#define GL_AMD_vertex_shader_layer 1
+
+#define GLEW_AMD_vertex_shader_layer GLEW_GET_VAR(__GLEW_AMD_vertex_shader_layer)
+
+#endif /* GL_AMD_vertex_shader_layer */
+
+/* -------------------- GL_AMD_vertex_shader_tessellator ------------------- */
+
+#ifndef GL_AMD_vertex_shader_tessellator
+#define GL_AMD_vertex_shader_tessellator 1
+
+#define GL_SAMPLER_BUFFER_AMD 0x9001
+#define GL_INT_SAMPLER_BUFFER_AMD 0x9002
+#define GL_UNSIGNED_INT_SAMPLER_BUFFER_AMD 0x9003
+#define GL_TESSELLATION_MODE_AMD 0x9004
+#define GL_TESSELLATION_FACTOR_AMD 0x9005
+#define GL_DISCRETE_AMD 0x9006
+#define GL_CONTINUOUS_AMD 0x9007
+
+typedef void (GLAPIENTRY * PFNGLTESSELLATIONFACTORAMDPROC) (GLfloat factor);
+typedef void (GLAPIENTRY * PFNGLTESSELLATIONMODEAMDPROC) (GLenum mode);
+
+#define glTessellationFactorAMD GLEW_GET_FUN(__glewTessellationFactorAMD)
+#define glTessellationModeAMD GLEW_GET_FUN(__glewTessellationModeAMD)
+
+#define GLEW_AMD_vertex_shader_tessellator GLEW_GET_VAR(__GLEW_AMD_vertex_shader_tessellator)
+
+#endif /* GL_AMD_vertex_shader_tessellator */
+
+/* ------------------ GL_AMD_vertex_shader_viewport_index ------------------ */
+
+#ifndef GL_AMD_vertex_shader_viewport_index
+#define GL_AMD_vertex_shader_viewport_index 1
+
+#define GLEW_AMD_vertex_shader_viewport_index GLEW_GET_VAR(__GLEW_AMD_vertex_shader_viewport_index)
+
+#endif /* GL_AMD_vertex_shader_viewport_index */
+
+/* ------------------------- GL_ANGLE_depth_texture ------------------------ */
+
+#ifndef GL_ANGLE_depth_texture
+#define GL_ANGLE_depth_texture 1
+
+#define GLEW_ANGLE_depth_texture GLEW_GET_VAR(__GLEW_ANGLE_depth_texture)
+
+#endif /* GL_ANGLE_depth_texture */
+
+/* ----------------------- GL_ANGLE_framebuffer_blit ----------------------- */
+
+#ifndef GL_ANGLE_framebuffer_blit
+#define GL_ANGLE_framebuffer_blit 1
+
+#define GL_DRAW_FRAMEBUFFER_BINDING_ANGLE 0x8CA6
+#define GL_READ_FRAMEBUFFER_ANGLE 0x8CA8
+#define GL_DRAW_FRAMEBUFFER_ANGLE 0x8CA9
+#define GL_READ_FRAMEBUFFER_BINDING_ANGLE 0x8CAA
+
+typedef void (GLAPIENTRY * PFNGLBLITFRAMEBUFFERANGLEPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
+
+#define glBlitFramebufferANGLE GLEW_GET_FUN(__glewBlitFramebufferANGLE)
+
+#define GLEW_ANGLE_framebuffer_blit GLEW_GET_VAR(__GLEW_ANGLE_framebuffer_blit)
+
+#endif /* GL_ANGLE_framebuffer_blit */
+
+/* -------------------- GL_ANGLE_framebuffer_multisample ------------------- */
+
+#ifndef GL_ANGLE_framebuffer_multisample
+#define GL_ANGLE_framebuffer_multisample 1
+
+#define GL_RENDERBUFFER_SAMPLES_ANGLE 0x8CAB
+#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_ANGLE 0x8D56
+#define GL_MAX_SAMPLES_ANGLE 0x8D57
+
+typedef void (GLAPIENTRY * PFNGLRENDERBUFFERSTORAGEMULTISAMPLEANGLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
+
+#define glRenderbufferStorageMultisampleANGLE GLEW_GET_FUN(__glewRenderbufferStorageMultisampleANGLE)
+
+#define GLEW_ANGLE_framebuffer_multisample GLEW_GET_VAR(__GLEW_ANGLE_framebuffer_multisample)
+
+#endif /* GL_ANGLE_framebuffer_multisample */
+
+/* ----------------------- GL_ANGLE_instanced_arrays ----------------------- */
+
+#ifndef GL_ANGLE_instanced_arrays
+#define GL_ANGLE_instanced_arrays 1
+
+#define GL_VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE 0x88FE
+
+typedef void (GLAPIENTRY * PFNGLDRAWARRAYSINSTANCEDANGLEPROC) (GLenum mode, GLint first, GLsizei count, GLsizei primcount);
+typedef void (GLAPIENTRY * PFNGLDRAWELEMENTSINSTANCEDANGLEPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBDIVISORANGLEPROC) (GLuint index, GLuint divisor);
+
+#define glDrawArraysInstancedANGLE GLEW_GET_FUN(__glewDrawArraysInstancedANGLE)
+#define glDrawElementsInstancedANGLE GLEW_GET_FUN(__glewDrawElementsInstancedANGLE)
+#define glVertexAttribDivisorANGLE GLEW_GET_FUN(__glewVertexAttribDivisorANGLE)
+
+#define GLEW_ANGLE_instanced_arrays GLEW_GET_VAR(__GLEW_ANGLE_instanced_arrays)
+
+#endif /* GL_ANGLE_instanced_arrays */
+
+/* -------------------- GL_ANGLE_pack_reverse_row_order -------------------- */
+
+#ifndef GL_ANGLE_pack_reverse_row_order
+#define GL_ANGLE_pack_reverse_row_order 1
+
+#define GL_PACK_REVERSE_ROW_ORDER_ANGLE 0x93A4
+
+#define GLEW_ANGLE_pack_reverse_row_order GLEW_GET_VAR(__GLEW_ANGLE_pack_reverse_row_order)
+
+#endif /* GL_ANGLE_pack_reverse_row_order */
+
+/* ------------------------ GL_ANGLE_program_binary ------------------------ */
+
+#ifndef GL_ANGLE_program_binary
+#define GL_ANGLE_program_binary 1
+
+#define GL_PROGRAM_BINARY_ANGLE 0x93A6
+
+#define GLEW_ANGLE_program_binary GLEW_GET_VAR(__GLEW_ANGLE_program_binary)
+
+#endif /* GL_ANGLE_program_binary */
+
+/* ------------------- GL_ANGLE_texture_compression_dxt1 ------------------- */
+
+#ifndef GL_ANGLE_texture_compression_dxt1
+#define GL_ANGLE_texture_compression_dxt1 1
+
+#define GL_COMPRESSED_RGB_S3TC_DXT1_ANGLE 0x83F0
+#define GL_COMPRESSED_RGBA_S3TC_DXT1_ANGLE 0x83F1
+#define GL_COMPRESSED_RGBA_S3TC_DXT3_ANGLE 0x83F2
+#define GL_COMPRESSED_RGBA_S3TC_DXT5_ANGLE 0x83F3
+
+#define GLEW_ANGLE_texture_compression_dxt1 GLEW_GET_VAR(__GLEW_ANGLE_texture_compression_dxt1)
+
+#endif /* GL_ANGLE_texture_compression_dxt1 */
+
+/* ------------------- GL_ANGLE_texture_compression_dxt3 ------------------- */
+
+#ifndef GL_ANGLE_texture_compression_dxt3
+#define GL_ANGLE_texture_compression_dxt3 1
+
+#define GL_COMPRESSED_RGB_S3TC_DXT1_ANGLE 0x83F0
+#define GL_COMPRESSED_RGBA_S3TC_DXT1_ANGLE 0x83F1
+#define GL_COMPRESSED_RGBA_S3TC_DXT3_ANGLE 0x83F2
+#define GL_COMPRESSED_RGBA_S3TC_DXT5_ANGLE 0x83F3
+
+#define GLEW_ANGLE_texture_compression_dxt3 GLEW_GET_VAR(__GLEW_ANGLE_texture_compression_dxt3)
+
+#endif /* GL_ANGLE_texture_compression_dxt3 */
+
+/* ------------------- GL_ANGLE_texture_compression_dxt5 ------------------- */
+
+#ifndef GL_ANGLE_texture_compression_dxt5
+#define GL_ANGLE_texture_compression_dxt5 1
+
+#define GL_COMPRESSED_RGB_S3TC_DXT1_ANGLE 0x83F0
+#define GL_COMPRESSED_RGBA_S3TC_DXT1_ANGLE 0x83F1
+#define GL_COMPRESSED_RGBA_S3TC_DXT3_ANGLE 0x83F2
+#define GL_COMPRESSED_RGBA_S3TC_DXT5_ANGLE 0x83F3
+
+#define GLEW_ANGLE_texture_compression_dxt5 GLEW_GET_VAR(__GLEW_ANGLE_texture_compression_dxt5)
+
+#endif /* GL_ANGLE_texture_compression_dxt5 */
+
+/* ------------------------- GL_ANGLE_texture_usage ------------------------ */
+
+#ifndef GL_ANGLE_texture_usage
+#define GL_ANGLE_texture_usage 1
+
+#define GL_TEXTURE_USAGE_ANGLE 0x93A2
+#define GL_FRAMEBUFFER_ATTACHMENT_ANGLE 0x93A3
+
+#define GLEW_ANGLE_texture_usage GLEW_GET_VAR(__GLEW_ANGLE_texture_usage)
+
+#endif /* GL_ANGLE_texture_usage */
+
+/* -------------------------- GL_ANGLE_timer_query ------------------------- */
+
+#ifndef GL_ANGLE_timer_query
+#define GL_ANGLE_timer_query 1
+
+#define GL_QUERY_COUNTER_BITS_ANGLE 0x8864
+#define GL_CURRENT_QUERY_ANGLE 0x8865
+#define GL_QUERY_RESULT_ANGLE 0x8866
+#define GL_QUERY_RESULT_AVAILABLE_ANGLE 0x8867
+#define GL_TIME_ELAPSED_ANGLE 0x88BF
+#define GL_TIMESTAMP_ANGLE 0x8E28
+
+typedef void (GLAPIENTRY * PFNGLBEGINQUERYANGLEPROC) (GLenum target, GLuint id);
+typedef void (GLAPIENTRY * PFNGLDELETEQUERIESANGLEPROC) (GLsizei n, const GLuint* ids);
+typedef void (GLAPIENTRY * PFNGLENDQUERYANGLEPROC) (GLenum target);
+typedef void (GLAPIENTRY * PFNGLGENQUERIESANGLEPROC) (GLsizei n, GLuint* ids);
+typedef void (GLAPIENTRY * PFNGLGETQUERYOBJECTI64VANGLEPROC) (GLuint id, GLenum pname, GLint64* params);
+typedef void (GLAPIENTRY * PFNGLGETQUERYOBJECTIVANGLEPROC) (GLuint id, GLenum pname, GLint* params);
+typedef void (GLAPIENTRY * PFNGLGETQUERYOBJECTUI64VANGLEPROC) (GLuint id, GLenum pname, GLuint64* params);
+typedef void (GLAPIENTRY * PFNGLGETQUERYOBJECTUIVANGLEPROC) (GLuint id, GLenum pname, GLuint* params);
+typedef void (GLAPIENTRY * PFNGLGETQUERYIVANGLEPROC) (GLenum target, GLenum pname, GLint* params);
+typedef GLboolean (GLAPIENTRY * PFNGLISQUERYANGLEPROC) (GLuint id);
+typedef void (GLAPIENTRY * PFNGLQUERYCOUNTERANGLEPROC) (GLuint id, GLenum target);
+
+#define glBeginQueryANGLE GLEW_GET_FUN(__glewBeginQueryANGLE)
+#define glDeleteQueriesANGLE GLEW_GET_FUN(__glewDeleteQueriesANGLE)
+#define glEndQueryANGLE GLEW_GET_FUN(__glewEndQueryANGLE)
+#define glGenQueriesANGLE GLEW_GET_FUN(__glewGenQueriesANGLE)
+#define glGetQueryObjecti64vANGLE GLEW_GET_FUN(__glewGetQueryObjecti64vANGLE)
+#define glGetQueryObjectivANGLE GLEW_GET_FUN(__glewGetQueryObjectivANGLE)
+#define glGetQueryObjectui64vANGLE GLEW_GET_FUN(__glewGetQueryObjectui64vANGLE)
+#define glGetQueryObjectuivANGLE GLEW_GET_FUN(__glewGetQueryObjectuivANGLE)
+#define glGetQueryivANGLE GLEW_GET_FUN(__glewGetQueryivANGLE)
+#define glIsQueryANGLE GLEW_GET_FUN(__glewIsQueryANGLE)
+#define glQueryCounterANGLE GLEW_GET_FUN(__glewQueryCounterANGLE)
+
+#define GLEW_ANGLE_timer_query GLEW_GET_VAR(__GLEW_ANGLE_timer_query)
+
+#endif /* GL_ANGLE_timer_query */
+
+/* ------------------- GL_ANGLE_translated_shader_source ------------------- */
+
+#ifndef GL_ANGLE_translated_shader_source
+#define GL_ANGLE_translated_shader_source 1
+
+#define GL_TRANSLATED_SHADER_SOURCE_LENGTH_ANGLE 0x93A0
+
+typedef void (GLAPIENTRY * PFNGLGETTRANSLATEDSHADERSOURCEANGLEPROC) (GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* source);
+
+#define glGetTranslatedShaderSourceANGLE GLEW_GET_FUN(__glewGetTranslatedShaderSourceANGLE)
+
+#define GLEW_ANGLE_translated_shader_source GLEW_GET_VAR(__GLEW_ANGLE_translated_shader_source)
+
+#endif /* GL_ANGLE_translated_shader_source */
+
+/* ----------------------- GL_APPLE_aux_depth_stencil ---------------------- */
+
+#ifndef GL_APPLE_aux_depth_stencil
+#define GL_APPLE_aux_depth_stencil 1
+
+#define GL_AUX_DEPTH_STENCIL_APPLE 0x8A14
+
+#define GLEW_APPLE_aux_depth_stencil GLEW_GET_VAR(__GLEW_APPLE_aux_depth_stencil)
+
+#endif /* GL_APPLE_aux_depth_stencil */
+
+/* ------------------------ GL_APPLE_client_storage ------------------------ */
+
+#ifndef GL_APPLE_client_storage
+#define GL_APPLE_client_storage 1
+
+#define GL_UNPACK_CLIENT_STORAGE_APPLE 0x85B2
+
+#define GLEW_APPLE_client_storage GLEW_GET_VAR(__GLEW_APPLE_client_storage)
+
+#endif /* GL_APPLE_client_storage */
+
+/* ------------------------- GL_APPLE_element_array ------------------------ */
+
+#ifndef GL_APPLE_element_array
+#define GL_APPLE_element_array 1
+
+#define GL_ELEMENT_ARRAY_APPLE 0x8A0C
+#define GL_ELEMENT_ARRAY_TYPE_APPLE 0x8A0D
+#define GL_ELEMENT_ARRAY_POINTER_APPLE 0x8A0E
+
+typedef void (GLAPIENTRY * PFNGLDRAWELEMENTARRAYAPPLEPROC) (GLenum mode, GLint first, GLsizei count);
+typedef void (GLAPIENTRY * PFNGLDRAWRANGEELEMENTARRAYAPPLEPROC) (GLenum mode, GLuint start, GLuint end, GLint first, GLsizei count);
+typedef void (GLAPIENTRY * PFNGLELEMENTPOINTERAPPLEPROC) (GLenum type, const void *pointer);
+typedef void (GLAPIENTRY * PFNGLMULTIDRAWELEMENTARRAYAPPLEPROC) (GLenum mode, const GLint* first, const GLsizei *count, GLsizei primcount);
+typedef void (GLAPIENTRY * PFNGLMULTIDRAWRANGEELEMENTARRAYAPPLEPROC) (GLenum mode, GLuint start, GLuint end, const GLint* first, const GLsizei *count, GLsizei primcount);
+
+#define glDrawElementArrayAPPLE GLEW_GET_FUN(__glewDrawElementArrayAPPLE)
+#define glDrawRangeElementArrayAPPLE GLEW_GET_FUN(__glewDrawRangeElementArrayAPPLE)
+#define glElementPointerAPPLE GLEW_GET_FUN(__glewElementPointerAPPLE)
+#define glMultiDrawElementArrayAPPLE GLEW_GET_FUN(__glewMultiDrawElementArrayAPPLE)
+#define glMultiDrawRangeElementArrayAPPLE GLEW_GET_FUN(__glewMultiDrawRangeElementArrayAPPLE)
+
+#define GLEW_APPLE_element_array GLEW_GET_VAR(__GLEW_APPLE_element_array)
+
+#endif /* GL_APPLE_element_array */
+
+/* ----------------------------- GL_APPLE_fence ---------------------------- */
+
+#ifndef GL_APPLE_fence
+#define GL_APPLE_fence 1
+
+#define GL_DRAW_PIXELS_APPLE 0x8A0A
+#define GL_FENCE_APPLE 0x8A0B
+
+typedef void (GLAPIENTRY * PFNGLDELETEFENCESAPPLEPROC) (GLsizei n, const GLuint* fences);
+typedef void (GLAPIENTRY * PFNGLFINISHFENCEAPPLEPROC) (GLuint fence);
+typedef void (GLAPIENTRY * PFNGLFINISHOBJECTAPPLEPROC) (GLenum object, GLint name);
+typedef void (GLAPIENTRY * PFNGLGENFENCESAPPLEPROC) (GLsizei n, GLuint* fences);
+typedef GLboolean (GLAPIENTRY * PFNGLISFENCEAPPLEPROC) (GLuint fence);
+typedef void (GLAPIENTRY * PFNGLSETFENCEAPPLEPROC) (GLuint fence);
+typedef GLboolean (GLAPIENTRY * PFNGLTESTFENCEAPPLEPROC) (GLuint fence);
+typedef GLboolean (GLAPIENTRY * PFNGLTESTOBJECTAPPLEPROC) (GLenum object, GLuint name);
+
+#define glDeleteFencesAPPLE GLEW_GET_FUN(__glewDeleteFencesAPPLE)
+#define glFinishFenceAPPLE GLEW_GET_FUN(__glewFinishFenceAPPLE)
+#define glFinishObjectAPPLE GLEW_GET_FUN(__glewFinishObjectAPPLE)
+#define glGenFencesAPPLE GLEW_GET_FUN(__glewGenFencesAPPLE)
+#define glIsFenceAPPLE GLEW_GET_FUN(__glewIsFenceAPPLE)
+#define glSetFenceAPPLE GLEW_GET_FUN(__glewSetFenceAPPLE)
+#define glTestFenceAPPLE GLEW_GET_FUN(__glewTestFenceAPPLE)
+#define glTestObjectAPPLE GLEW_GET_FUN(__glewTestObjectAPPLE)
+
+#define GLEW_APPLE_fence GLEW_GET_VAR(__GLEW_APPLE_fence)
+
+#endif /* GL_APPLE_fence */
+
+/* ------------------------- GL_APPLE_float_pixels ------------------------- */
+
+#ifndef GL_APPLE_float_pixels
+#define GL_APPLE_float_pixels 1
+
+#define GL_HALF_APPLE 0x140B
+#define GL_RGBA_FLOAT32_APPLE 0x8814
+#define GL_RGB_FLOAT32_APPLE 0x8815
+#define GL_ALPHA_FLOAT32_APPLE 0x8816
+#define GL_INTENSITY_FLOAT32_APPLE 0x8817
+#define GL_LUMINANCE_FLOAT32_APPLE 0x8818
+#define GL_LUMINANCE_ALPHA_FLOAT32_APPLE 0x8819
+#define GL_RGBA_FLOAT16_APPLE 0x881A
+#define GL_RGB_FLOAT16_APPLE 0x881B
+#define GL_ALPHA_FLOAT16_APPLE 0x881C
+#define GL_INTENSITY_FLOAT16_APPLE 0x881D
+#define GL_LUMINANCE_FLOAT16_APPLE 0x881E
+#define GL_LUMINANCE_ALPHA_FLOAT16_APPLE 0x881F
+#define GL_COLOR_FLOAT_APPLE 0x8A0F
+
+#define GLEW_APPLE_float_pixels GLEW_GET_VAR(__GLEW_APPLE_float_pixels)
+
+#endif /* GL_APPLE_float_pixels */
+
+/* ---------------------- GL_APPLE_flush_buffer_range ---------------------- */
+
+#ifndef GL_APPLE_flush_buffer_range
+#define GL_APPLE_flush_buffer_range 1
+
+#define GL_BUFFER_SERIALIZED_MODIFY_APPLE 0x8A12
+#define GL_BUFFER_FLUSHING_UNMAP_APPLE 0x8A13
+
+typedef void (GLAPIENTRY * PFNGLBUFFERPARAMETERIAPPLEPROC) (GLenum target, GLenum pname, GLint param);
+typedef void (GLAPIENTRY * PFNGLFLUSHMAPPEDBUFFERRANGEAPPLEPROC) (GLenum target, GLintptr offset, GLsizeiptr size);
+
+#define glBufferParameteriAPPLE GLEW_GET_FUN(__glewBufferParameteriAPPLE)
+#define glFlushMappedBufferRangeAPPLE GLEW_GET_FUN(__glewFlushMappedBufferRangeAPPLE)
+
+#define GLEW_APPLE_flush_buffer_range GLEW_GET_VAR(__GLEW_APPLE_flush_buffer_range)
+
+#endif /* GL_APPLE_flush_buffer_range */
+
+/* ----------------------- GL_APPLE_object_purgeable ----------------------- */
+
+#ifndef GL_APPLE_object_purgeable
+#define GL_APPLE_object_purgeable 1
+
+#define GL_BUFFER_OBJECT_APPLE 0x85B3
+#define GL_RELEASED_APPLE 0x8A19
+#define GL_VOLATILE_APPLE 0x8A1A
+#define GL_RETAINED_APPLE 0x8A1B
+#define GL_UNDEFINED_APPLE 0x8A1C
+#define GL_PURGEABLE_APPLE 0x8A1D
+
+typedef void (GLAPIENTRY * PFNGLGETOBJECTPARAMETERIVAPPLEPROC) (GLenum objectType, GLuint name, GLenum pname, GLint* params);
+typedef GLenum (GLAPIENTRY * PFNGLOBJECTPURGEABLEAPPLEPROC) (GLenum objectType, GLuint name, GLenum option);
+typedef GLenum (GLAPIENTRY * PFNGLOBJECTUNPURGEABLEAPPLEPROC) (GLenum objectType, GLuint name, GLenum option);
+
+#define glGetObjectParameterivAPPLE GLEW_GET_FUN(__glewGetObjectParameterivAPPLE)
+#define glObjectPurgeableAPPLE GLEW_GET_FUN(__glewObjectPurgeableAPPLE)
+#define glObjectUnpurgeableAPPLE GLEW_GET_FUN(__glewObjectUnpurgeableAPPLE)
+
+#define GLEW_APPLE_object_purgeable GLEW_GET_VAR(__GLEW_APPLE_object_purgeable)
+
+#endif /* GL_APPLE_object_purgeable */
+
+/* ------------------------- GL_APPLE_pixel_buffer ------------------------- */
+
+#ifndef GL_APPLE_pixel_buffer
+#define GL_APPLE_pixel_buffer 1
+
+#define GL_MIN_PBUFFER_VIEWPORT_DIMS_APPLE 0x8A10
+
+#define GLEW_APPLE_pixel_buffer GLEW_GET_VAR(__GLEW_APPLE_pixel_buffer)
+
+#endif /* GL_APPLE_pixel_buffer */
+
+/* ---------------------------- GL_APPLE_rgb_422 --------------------------- */
+
+#ifndef GL_APPLE_rgb_422
+#define GL_APPLE_rgb_422 1
+
+#define GL_UNSIGNED_SHORT_8_8_APPLE 0x85BA
+#define GL_UNSIGNED_SHORT_8_8_REV_APPLE 0x85BB
+#define GL_RGB_422_APPLE 0x8A1F
+#define GL_RGB_RAW_422_APPLE 0x8A51
+
+#define GLEW_APPLE_rgb_422 GLEW_GET_VAR(__GLEW_APPLE_rgb_422)
+
+#endif /* GL_APPLE_rgb_422 */
+
+/* --------------------------- GL_APPLE_row_bytes -------------------------- */
+
+#ifndef GL_APPLE_row_bytes
+#define GL_APPLE_row_bytes 1
+
+#define GL_PACK_ROW_BYTES_APPLE 0x8A15
+#define GL_UNPACK_ROW_BYTES_APPLE 0x8A16
+
+#define GLEW_APPLE_row_bytes GLEW_GET_VAR(__GLEW_APPLE_row_bytes)
+
+#endif /* GL_APPLE_row_bytes */
+
+/* ------------------------ GL_APPLE_specular_vector ----------------------- */
+
+#ifndef GL_APPLE_specular_vector
+#define GL_APPLE_specular_vector 1
+
+#define GL_LIGHT_MODEL_SPECULAR_VECTOR_APPLE 0x85B0
+
+#define GLEW_APPLE_specular_vector GLEW_GET_VAR(__GLEW_APPLE_specular_vector)
+
+#endif /* GL_APPLE_specular_vector */
+
+/* ------------------------- GL_APPLE_texture_range ------------------------ */
+
+#ifndef GL_APPLE_texture_range
+#define GL_APPLE_texture_range 1
+
+#define GL_TEXTURE_RANGE_LENGTH_APPLE 0x85B7
+#define GL_TEXTURE_RANGE_POINTER_APPLE 0x85B8
+#define GL_TEXTURE_STORAGE_HINT_APPLE 0x85BC
+#define GL_STORAGE_PRIVATE_APPLE 0x85BD
+#define GL_STORAGE_CACHED_APPLE 0x85BE
+#define GL_STORAGE_SHARED_APPLE 0x85BF
+
+typedef void (GLAPIENTRY * PFNGLGETTEXPARAMETERPOINTERVAPPLEPROC) (GLenum target, GLenum pname, void **params);
+typedef void (GLAPIENTRY * PFNGLTEXTURERANGEAPPLEPROC) (GLenum target, GLsizei length, void *pointer);
+
+#define glGetTexParameterPointervAPPLE GLEW_GET_FUN(__glewGetTexParameterPointervAPPLE)
+#define glTextureRangeAPPLE GLEW_GET_FUN(__glewTextureRangeAPPLE)
+
+#define GLEW_APPLE_texture_range GLEW_GET_VAR(__GLEW_APPLE_texture_range)
+
+#endif /* GL_APPLE_texture_range */
+
+/* ------------------------ GL_APPLE_transform_hint ------------------------ */
+
+#ifndef GL_APPLE_transform_hint
+#define GL_APPLE_transform_hint 1
+
+#define GL_TRANSFORM_HINT_APPLE 0x85B1
+
+#define GLEW_APPLE_transform_hint GLEW_GET_VAR(__GLEW_APPLE_transform_hint)
+
+#endif /* GL_APPLE_transform_hint */
+
+/* ---------------------- GL_APPLE_vertex_array_object --------------------- */
+
+#ifndef GL_APPLE_vertex_array_object
+#define GL_APPLE_vertex_array_object 1
+
+#define GL_VERTEX_ARRAY_BINDING_APPLE 0x85B5
+
+typedef void (GLAPIENTRY * PFNGLBINDVERTEXARRAYAPPLEPROC) (GLuint array);
+typedef void (GLAPIENTRY * PFNGLDELETEVERTEXARRAYSAPPLEPROC) (GLsizei n, const GLuint* arrays);
+typedef void (GLAPIENTRY * PFNGLGENVERTEXARRAYSAPPLEPROC) (GLsizei n, const GLuint* arrays);
+typedef GLboolean (GLAPIENTRY * PFNGLISVERTEXARRAYAPPLEPROC) (GLuint array);
+
+#define glBindVertexArrayAPPLE GLEW_GET_FUN(__glewBindVertexArrayAPPLE)
+#define glDeleteVertexArraysAPPLE GLEW_GET_FUN(__glewDeleteVertexArraysAPPLE)
+#define glGenVertexArraysAPPLE GLEW_GET_FUN(__glewGenVertexArraysAPPLE)
+#define glIsVertexArrayAPPLE GLEW_GET_FUN(__glewIsVertexArrayAPPLE)
+
+#define GLEW_APPLE_vertex_array_object GLEW_GET_VAR(__GLEW_APPLE_vertex_array_object)
+
+#endif /* GL_APPLE_vertex_array_object */
+
+/* ---------------------- GL_APPLE_vertex_array_range ---------------------- */
+
+#ifndef GL_APPLE_vertex_array_range
+#define GL_APPLE_vertex_array_range 1
+
+#define GL_VERTEX_ARRAY_RANGE_APPLE 0x851D
+#define GL_VERTEX_ARRAY_RANGE_LENGTH_APPLE 0x851E
+#define GL_VERTEX_ARRAY_STORAGE_HINT_APPLE 0x851F
+#define GL_MAX_VERTEX_ARRAY_RANGE_ELEMENT_APPLE 0x8520
+#define GL_VERTEX_ARRAY_RANGE_POINTER_APPLE 0x8521
+#define GL_STORAGE_CLIENT_APPLE 0x85B4
+#define GL_STORAGE_CACHED_APPLE 0x85BE
+#define GL_STORAGE_SHARED_APPLE 0x85BF
+
+typedef void (GLAPIENTRY * PFNGLFLUSHVERTEXARRAYRANGEAPPLEPROC) (GLsizei length, void *pointer);
+typedef void (GLAPIENTRY * PFNGLVERTEXARRAYPARAMETERIAPPLEPROC) (GLenum pname, GLint param);
+typedef void (GLAPIENTRY * PFNGLVERTEXARRAYRANGEAPPLEPROC) (GLsizei length, void *pointer);
+
+#define glFlushVertexArrayRangeAPPLE GLEW_GET_FUN(__glewFlushVertexArrayRangeAPPLE)
+#define glVertexArrayParameteriAPPLE GLEW_GET_FUN(__glewVertexArrayParameteriAPPLE)
+#define glVertexArrayRangeAPPLE GLEW_GET_FUN(__glewVertexArrayRangeAPPLE)
+
+#define GLEW_APPLE_vertex_array_range GLEW_GET_VAR(__GLEW_APPLE_vertex_array_range)
+
+#endif /* GL_APPLE_vertex_array_range */
+
+/* ------------------- GL_APPLE_vertex_program_evaluators ------------------ */
+
+#ifndef GL_APPLE_vertex_program_evaluators
+#define GL_APPLE_vertex_program_evaluators 1
+
+#define GL_VERTEX_ATTRIB_MAP1_APPLE 0x8A00
+#define GL_VERTEX_ATTRIB_MAP2_APPLE 0x8A01
+#define GL_VERTEX_ATTRIB_MAP1_SIZE_APPLE 0x8A02
+#define GL_VERTEX_ATTRIB_MAP1_COEFF_APPLE 0x8A03
+#define GL_VERTEX_ATTRIB_MAP1_ORDER_APPLE 0x8A04
+#define GL_VERTEX_ATTRIB_MAP1_DOMAIN_APPLE 0x8A05
+#define GL_VERTEX_ATTRIB_MAP2_SIZE_APPLE 0x8A06
+#define GL_VERTEX_ATTRIB_MAP2_COEFF_APPLE 0x8A07
+#define GL_VERTEX_ATTRIB_MAP2_ORDER_APPLE 0x8A08
+#define GL_VERTEX_ATTRIB_MAP2_DOMAIN_APPLE 0x8A09
+
+typedef void (GLAPIENTRY * PFNGLDISABLEVERTEXATTRIBAPPLEPROC) (GLuint index, GLenum pname);
+typedef void (GLAPIENTRY * PFNGLENABLEVERTEXATTRIBAPPLEPROC) (GLuint index, GLenum pname);
+typedef GLboolean (GLAPIENTRY * PFNGLISVERTEXATTRIBENABLEDAPPLEPROC) (GLuint index, GLenum pname);
+typedef void (GLAPIENTRY * PFNGLMAPVERTEXATTRIB1DAPPLEPROC) (GLuint index, GLuint size, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble* points);
+typedef void (GLAPIENTRY * PFNGLMAPVERTEXATTRIB1FAPPLEPROC) (GLuint index, GLuint size, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat* points);
+typedef void (GLAPIENTRY * PFNGLMAPVERTEXATTRIB2DAPPLEPROC) (GLuint index, GLuint size, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble* points);
+typedef void (GLAPIENTRY * PFNGLMAPVERTEXATTRIB2FAPPLEPROC) (GLuint index, GLuint size, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat* points);
+
+#define glDisableVertexAttribAPPLE GLEW_GET_FUN(__glewDisableVertexAttribAPPLE)
+#define glEnableVertexAttribAPPLE GLEW_GET_FUN(__glewEnableVertexAttribAPPLE)
+#define glIsVertexAttribEnabledAPPLE GLEW_GET_FUN(__glewIsVertexAttribEnabledAPPLE)
+#define glMapVertexAttrib1dAPPLE GLEW_GET_FUN(__glewMapVertexAttrib1dAPPLE)
+#define glMapVertexAttrib1fAPPLE GLEW_GET_FUN(__glewMapVertexAttrib1fAPPLE)
+#define glMapVertexAttrib2dAPPLE GLEW_GET_FUN(__glewMapVertexAttrib2dAPPLE)
+#define glMapVertexAttrib2fAPPLE GLEW_GET_FUN(__glewMapVertexAttrib2fAPPLE)
+
+#define GLEW_APPLE_vertex_program_evaluators GLEW_GET_VAR(__GLEW_APPLE_vertex_program_evaluators)
+
+#endif /* GL_APPLE_vertex_program_evaluators */
+
+/* --------------------------- GL_APPLE_ycbcr_422 -------------------------- */
+
+#ifndef GL_APPLE_ycbcr_422
+#define GL_APPLE_ycbcr_422 1
+
+#define GL_YCBCR_422_APPLE 0x85B9
+
+#define GLEW_APPLE_ycbcr_422 GLEW_GET_VAR(__GLEW_APPLE_ycbcr_422)
+
+#endif /* GL_APPLE_ycbcr_422 */
+
+/* ------------------------ GL_ARB_ES2_compatibility ----------------------- */
+
+#ifndef GL_ARB_ES2_compatibility
+#define GL_ARB_ES2_compatibility 1
+
+#define GL_FIXED 0x140C
+#define GL_IMPLEMENTATION_COLOR_READ_TYPE 0x8B9A
+#define GL_IMPLEMENTATION_COLOR_READ_FORMAT 0x8B9B
+#define GL_RGB565 0x8D62
+#define GL_LOW_FLOAT 0x8DF0
+#define GL_MEDIUM_FLOAT 0x8DF1
+#define GL_HIGH_FLOAT 0x8DF2
+#define GL_LOW_INT 0x8DF3
+#define GL_MEDIUM_INT 0x8DF4
+#define GL_HIGH_INT 0x8DF5
+#define GL_SHADER_BINARY_FORMATS 0x8DF8
+#define GL_NUM_SHADER_BINARY_FORMATS 0x8DF9
+#define GL_SHADER_COMPILER 0x8DFA
+#define GL_MAX_VERTEX_UNIFORM_VECTORS 0x8DFB
+#define GL_MAX_VARYING_VECTORS 0x8DFC
+#define GL_MAX_FRAGMENT_UNIFORM_VECTORS 0x8DFD
+
+typedef int GLfixed;
+
+typedef void (GLAPIENTRY * PFNGLCLEARDEPTHFPROC) (GLclampf d);
+typedef void (GLAPIENTRY * PFNGLDEPTHRANGEFPROC) (GLclampf n, GLclampf f);
+typedef void (GLAPIENTRY * PFNGLGETSHADERPRECISIONFORMATPROC) (GLenum shadertype, GLenum precisiontype, GLint* range, GLint *precision);
+typedef void (GLAPIENTRY * PFNGLRELEASESHADERCOMPILERPROC) (void);
+typedef void (GLAPIENTRY * PFNGLSHADERBINARYPROC) (GLsizei count, const GLuint* shaders, GLenum binaryformat, const void*binary, GLsizei length);
+
+#define glClearDepthf GLEW_GET_FUN(__glewClearDepthf)
+#define glDepthRangef GLEW_GET_FUN(__glewDepthRangef)
+#define glGetShaderPrecisionFormat GLEW_GET_FUN(__glewGetShaderPrecisionFormat)
+#define glReleaseShaderCompiler GLEW_GET_FUN(__glewReleaseShaderCompiler)
+#define glShaderBinary GLEW_GET_FUN(__glewShaderBinary)
+
+#define GLEW_ARB_ES2_compatibility GLEW_GET_VAR(__GLEW_ARB_ES2_compatibility)
+
+#endif /* GL_ARB_ES2_compatibility */
+
+/* ----------------------- GL_ARB_ES3_1_compatibility ---------------------- */
+
+#ifndef GL_ARB_ES3_1_compatibility
+#define GL_ARB_ES3_1_compatibility 1
+
+typedef void (GLAPIENTRY * PFNGLMEMORYBARRIERBYREGIONPROC) (GLbitfield barriers);
+
+#define glMemoryBarrierByRegion GLEW_GET_FUN(__glewMemoryBarrierByRegion)
+
+#define GLEW_ARB_ES3_1_compatibility GLEW_GET_VAR(__GLEW_ARB_ES3_1_compatibility)
+
+#endif /* GL_ARB_ES3_1_compatibility */
+
+/* ------------------------ GL_ARB_ES3_compatibility ----------------------- */
+
+#ifndef GL_ARB_ES3_compatibility
+#define GL_ARB_ES3_compatibility 1
+
+#define GL_TEXTURE_IMMUTABLE_LEVELS 0x82DF
+#define GL_PRIMITIVE_RESTART_FIXED_INDEX 0x8D69
+#define GL_ANY_SAMPLES_PASSED_CONSERVATIVE 0x8D6A
+#define GL_MAX_ELEMENT_INDEX 0x8D6B
+#define GL_COMPRESSED_R11_EAC 0x9270
+#define GL_COMPRESSED_SIGNED_R11_EAC 0x9271
+#define GL_COMPRESSED_RG11_EAC 0x9272
+#define GL_COMPRESSED_SIGNED_RG11_EAC 0x9273
+#define GL_COMPRESSED_RGB8_ETC2 0x9274
+#define GL_COMPRESSED_SRGB8_ETC2 0x9275
+#define GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 0x9276
+#define GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 0x9277
+#define GL_COMPRESSED_RGBA8_ETC2_EAC 0x9278
+#define GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC 0x9279
+
+#define GLEW_ARB_ES3_compatibility GLEW_GET_VAR(__GLEW_ARB_ES3_compatibility)
+
+#endif /* GL_ARB_ES3_compatibility */
+
+/* ------------------------ GL_ARB_arrays_of_arrays ------------------------ */
+
+#ifndef GL_ARB_arrays_of_arrays
+#define GL_ARB_arrays_of_arrays 1
+
+#define GLEW_ARB_arrays_of_arrays GLEW_GET_VAR(__GLEW_ARB_arrays_of_arrays)
+
+#endif /* GL_ARB_arrays_of_arrays */
+
+/* -------------------------- GL_ARB_base_instance ------------------------- */
+
+#ifndef GL_ARB_base_instance
+#define GL_ARB_base_instance 1
+
+typedef void (GLAPIENTRY * PFNGLDRAWARRAYSINSTANCEDBASEINSTANCEPROC) (GLenum mode, GLint first, GLsizei count, GLsizei primcount, GLuint baseinstance);
+typedef void (GLAPIENTRY * PFNGLDRAWELEMENTSINSTANCEDBASEINSTANCEPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount, GLuint baseinstance);
+typedef void (GLAPIENTRY * PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXBASEINSTANCEPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount, GLint basevertex, GLuint baseinstance);
+
+#define glDrawArraysInstancedBaseInstance GLEW_GET_FUN(__glewDrawArraysInstancedBaseInstance)
+#define glDrawElementsInstancedBaseInstance GLEW_GET_FUN(__glewDrawElementsInstancedBaseInstance)
+#define glDrawElementsInstancedBaseVertexBaseInstance GLEW_GET_FUN(__glewDrawElementsInstancedBaseVertexBaseInstance)
+
+#define GLEW_ARB_base_instance GLEW_GET_VAR(__GLEW_ARB_base_instance)
+
+#endif /* GL_ARB_base_instance */
+
+/* ------------------------ GL_ARB_bindless_texture ------------------------ */
+
+#ifndef GL_ARB_bindless_texture
+#define GL_ARB_bindless_texture 1
+
+#define GL_UNSIGNED_INT64_ARB 0x140F
+
+typedef GLuint64 (GLAPIENTRY * PFNGLGETIMAGEHANDLEARBPROC) (GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum format);
+typedef GLuint64 (GLAPIENTRY * PFNGLGETTEXTUREHANDLEARBPROC) (GLuint texture);
+typedef GLuint64 (GLAPIENTRY * PFNGLGETTEXTURESAMPLERHANDLEARBPROC) (GLuint texture, GLuint sampler);
+typedef void (GLAPIENTRY * PFNGLGETVERTEXATTRIBLUI64VARBPROC) (GLuint index, GLenum pname, GLuint64EXT* params);
+typedef GLboolean (GLAPIENTRY * PFNGLISIMAGEHANDLERESIDENTARBPROC) (GLuint64 handle);
+typedef GLboolean (GLAPIENTRY * PFNGLISTEXTUREHANDLERESIDENTARBPROC) (GLuint64 handle);
+typedef void (GLAPIENTRY * PFNGLMAKEIMAGEHANDLENONRESIDENTARBPROC) (GLuint64 handle);
+typedef void (GLAPIENTRY * PFNGLMAKEIMAGEHANDLERESIDENTARBPROC) (GLuint64 handle, GLenum access);
+typedef void (GLAPIENTRY * PFNGLMAKETEXTUREHANDLENONRESIDENTARBPROC) (GLuint64 handle);
+typedef void (GLAPIENTRY * PFNGLMAKETEXTUREHANDLERESIDENTARBPROC) (GLuint64 handle);
+typedef void (GLAPIENTRY * PFNGLPROGRAMUNIFORMHANDLEUI64ARBPROC) (GLuint program, GLint location, GLuint64 value);
+typedef void (GLAPIENTRY * PFNGLPROGRAMUNIFORMHANDLEUI64VARBPROC) (GLuint program, GLint location, GLsizei count, const GLuint64* values);
+typedef void (GLAPIENTRY * PFNGLUNIFORMHANDLEUI64ARBPROC) (GLint location, GLuint64 value);
+typedef void (GLAPIENTRY * PFNGLUNIFORMHANDLEUI64VARBPROC) (GLint location, GLsizei count, const GLuint64* value);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBL1UI64ARBPROC) (GLuint index, GLuint64EXT x);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBL1UI64VARBPROC) (GLuint index, const GLuint64EXT* v);
+
+#define glGetImageHandleARB GLEW_GET_FUN(__glewGetImageHandleARB)
+#define glGetTextureHandleARB GLEW_GET_FUN(__glewGetTextureHandleARB)
+#define glGetTextureSamplerHandleARB GLEW_GET_FUN(__glewGetTextureSamplerHandleARB)
+#define glGetVertexAttribLui64vARB GLEW_GET_FUN(__glewGetVertexAttribLui64vARB)
+#define glIsImageHandleResidentARB GLEW_GET_FUN(__glewIsImageHandleResidentARB)
+#define glIsTextureHandleResidentARB GLEW_GET_FUN(__glewIsTextureHandleResidentARB)
+#define glMakeImageHandleNonResidentARB GLEW_GET_FUN(__glewMakeImageHandleNonResidentARB)
+#define glMakeImageHandleResidentARB GLEW_GET_FUN(__glewMakeImageHandleResidentARB)
+#define glMakeTextureHandleNonResidentARB GLEW_GET_FUN(__glewMakeTextureHandleNonResidentARB)
+#define glMakeTextureHandleResidentARB GLEW_GET_FUN(__glewMakeTextureHandleResidentARB)
+#define glProgramUniformHandleui64ARB GLEW_GET_FUN(__glewProgramUniformHandleui64ARB)
+#define glProgramUniformHandleui64vARB GLEW_GET_FUN(__glewProgramUniformHandleui64vARB)
+#define glUniformHandleui64ARB GLEW_GET_FUN(__glewUniformHandleui64ARB)
+#define glUniformHandleui64vARB GLEW_GET_FUN(__glewUniformHandleui64vARB)
+#define glVertexAttribL1ui64ARB GLEW_GET_FUN(__glewVertexAttribL1ui64ARB)
+#define glVertexAttribL1ui64vARB GLEW_GET_FUN(__glewVertexAttribL1ui64vARB)
+
+#define GLEW_ARB_bindless_texture GLEW_GET_VAR(__GLEW_ARB_bindless_texture)
+
+#endif /* GL_ARB_bindless_texture */
+
+/* ----------------------- GL_ARB_blend_func_extended ---------------------- */
+
+#ifndef GL_ARB_blend_func_extended
+#define GL_ARB_blend_func_extended 1
+
+#define GL_SRC1_COLOR 0x88F9
+#define GL_ONE_MINUS_SRC1_COLOR 0x88FA
+#define GL_ONE_MINUS_SRC1_ALPHA 0x88FB
+#define GL_MAX_DUAL_SOURCE_DRAW_BUFFERS 0x88FC
+
+typedef void (GLAPIENTRY * PFNGLBINDFRAGDATALOCATIONINDEXEDPROC) (GLuint program, GLuint colorNumber, GLuint index, const GLchar * name);
+typedef GLint (GLAPIENTRY * PFNGLGETFRAGDATAINDEXPROC) (GLuint program, const GLchar * name);
+
+#define glBindFragDataLocationIndexed GLEW_GET_FUN(__glewBindFragDataLocationIndexed)
+#define glGetFragDataIndex GLEW_GET_FUN(__glewGetFragDataIndex)
+
+#define GLEW_ARB_blend_func_extended GLEW_GET_VAR(__GLEW_ARB_blend_func_extended)
+
+#endif /* GL_ARB_blend_func_extended */
+
+/* ------------------------- GL_ARB_buffer_storage ------------------------- */
+
+#ifndef GL_ARB_buffer_storage
+#define GL_ARB_buffer_storage 1
+
+#define GL_MAP_READ_BIT 0x0001
+#define GL_MAP_WRITE_BIT 0x0002
+#define GL_MAP_PERSISTENT_BIT 0x00000040
+#define GL_MAP_COHERENT_BIT 0x00000080
+#define GL_DYNAMIC_STORAGE_BIT 0x0100
+#define GL_CLIENT_STORAGE_BIT 0x0200
+#define GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT 0x00004000
+#define GL_BUFFER_IMMUTABLE_STORAGE 0x821F
+#define GL_BUFFER_STORAGE_FLAGS 0x8220
+
+typedef void (GLAPIENTRY * PFNGLBUFFERSTORAGEPROC) (GLenum target, GLsizeiptr size, const void *data, GLbitfield flags);
+typedef void (GLAPIENTRY * PFNGLNAMEDBUFFERSTORAGEEXTPROC) (GLuint buffer, GLsizeiptr size, const void *data, GLbitfield flags);
+
+#define glBufferStorage GLEW_GET_FUN(__glewBufferStorage)
+#define glNamedBufferStorageEXT GLEW_GET_FUN(__glewNamedBufferStorageEXT)
+
+#define GLEW_ARB_buffer_storage GLEW_GET_VAR(__GLEW_ARB_buffer_storage)
+
+#endif /* GL_ARB_buffer_storage */
+
+/* ---------------------------- GL_ARB_cl_event ---------------------------- */
+
+#ifndef GL_ARB_cl_event
+#define GL_ARB_cl_event 1
+
+#define GL_SYNC_CL_EVENT_ARB 0x8240
+#define GL_SYNC_CL_EVENT_COMPLETE_ARB 0x8241
+
+typedef struct _cl_context *cl_context;
+typedef struct _cl_event *cl_event;
+
+typedef GLsync (GLAPIENTRY * PFNGLCREATESYNCFROMCLEVENTARBPROC) (cl_context context, cl_event event, GLbitfield flags);
+
+#define glCreateSyncFromCLeventARB GLEW_GET_FUN(__glewCreateSyncFromCLeventARB)
+
+#define GLEW_ARB_cl_event GLEW_GET_VAR(__GLEW_ARB_cl_event)
+
+#endif /* GL_ARB_cl_event */
+
+/* ----------------------- GL_ARB_clear_buffer_object ---------------------- */
+
+#ifndef GL_ARB_clear_buffer_object
+#define GL_ARB_clear_buffer_object 1
+
+typedef void (GLAPIENTRY * PFNGLCLEARBUFFERDATAPROC) (GLenum target, GLenum internalformat, GLenum format, GLenum type, const void *data);
+typedef void (GLAPIENTRY * PFNGLCLEARBUFFERSUBDATAPROC) (GLenum target, GLenum internalformat, GLintptr offset, GLsizeiptr size, GLenum format, GLenum type, const void *data);
+typedef void (GLAPIENTRY * PFNGLCLEARNAMEDBUFFERDATAEXTPROC) (GLuint buffer, GLenum internalformat, GLenum format, GLenum type, const void *data);
+typedef void (GLAPIENTRY * PFNGLCLEARNAMEDBUFFERSUBDATAEXTPROC) (GLuint buffer, GLenum internalformat, GLintptr offset, GLsizeiptr size, GLenum format, GLenum type, const void *data);
+
+#define glClearBufferData GLEW_GET_FUN(__glewClearBufferData)
+#define glClearBufferSubData GLEW_GET_FUN(__glewClearBufferSubData)
+#define glClearNamedBufferDataEXT GLEW_GET_FUN(__glewClearNamedBufferDataEXT)
+#define glClearNamedBufferSubDataEXT GLEW_GET_FUN(__glewClearNamedBufferSubDataEXT)
+
+#define GLEW_ARB_clear_buffer_object GLEW_GET_VAR(__GLEW_ARB_clear_buffer_object)
+
+#endif /* GL_ARB_clear_buffer_object */
+
+/* -------------------------- GL_ARB_clear_texture ------------------------- */
+
+#ifndef GL_ARB_clear_texture
+#define GL_ARB_clear_texture 1
+
+#define GL_CLEAR_TEXTURE 0x9365
+
+typedef void (GLAPIENTRY * PFNGLCLEARTEXIMAGEPROC) (GLuint texture, GLint level, GLenum format, GLenum type, const void *data);
+typedef void (GLAPIENTRY * PFNGLCLEARTEXSUBIMAGEPROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *data);
+
+#define glClearTexImage GLEW_GET_FUN(__glewClearTexImage)
+#define glClearTexSubImage GLEW_GET_FUN(__glewClearTexSubImage)
+
+#define GLEW_ARB_clear_texture GLEW_GET_VAR(__GLEW_ARB_clear_texture)
+
+#endif /* GL_ARB_clear_texture */
+
+/* -------------------------- GL_ARB_clip_control -------------------------- */
+
+#ifndef GL_ARB_clip_control
+#define GL_ARB_clip_control 1
+
+#define GL_LOWER_LEFT 0x8CA1
+#define GL_UPPER_LEFT 0x8CA2
+#define GL_CLIP_ORIGIN 0x935C
+#define GL_CLIP_DEPTH_MODE 0x935D
+#define GL_NEGATIVE_ONE_TO_ONE 0x935E
+#define GL_ZERO_TO_ONE 0x935F
+
+typedef void (GLAPIENTRY * PFNGLCLIPCONTROLPROC) (GLenum origin, GLenum depth);
+
+#define glClipControl GLEW_GET_FUN(__glewClipControl)
+
+#define GLEW_ARB_clip_control GLEW_GET_VAR(__GLEW_ARB_clip_control)
+
+#endif /* GL_ARB_clip_control */
+
+/* ----------------------- GL_ARB_color_buffer_float ----------------------- */
+
+#ifndef GL_ARB_color_buffer_float
+#define GL_ARB_color_buffer_float 1
+
+#define GL_RGBA_FLOAT_MODE_ARB 0x8820
+#define GL_CLAMP_VERTEX_COLOR_ARB 0x891A
+#define GL_CLAMP_FRAGMENT_COLOR_ARB 0x891B
+#define GL_CLAMP_READ_COLOR_ARB 0x891C
+#define GL_FIXED_ONLY_ARB 0x891D
+
+typedef void (GLAPIENTRY * PFNGLCLAMPCOLORARBPROC) (GLenum target, GLenum clamp);
+
+#define glClampColorARB GLEW_GET_FUN(__glewClampColorARB)
+
+#define GLEW_ARB_color_buffer_float GLEW_GET_VAR(__GLEW_ARB_color_buffer_float)
+
+#endif /* GL_ARB_color_buffer_float */
+
+/* -------------------------- GL_ARB_compatibility ------------------------- */
+
+#ifndef GL_ARB_compatibility
+#define GL_ARB_compatibility 1
+
+#define GLEW_ARB_compatibility GLEW_GET_VAR(__GLEW_ARB_compatibility)
+
+#endif /* GL_ARB_compatibility */
+
+/* ---------------- GL_ARB_compressed_texture_pixel_storage ---------------- */
+
+#ifndef GL_ARB_compressed_texture_pixel_storage
+#define GL_ARB_compressed_texture_pixel_storage 1
+
+#define GL_UNPACK_COMPRESSED_BLOCK_WIDTH 0x9127
+#define GL_UNPACK_COMPRESSED_BLOCK_HEIGHT 0x9128
+#define GL_UNPACK_COMPRESSED_BLOCK_DEPTH 0x9129
+#define GL_UNPACK_COMPRESSED_BLOCK_SIZE 0x912A
+#define GL_PACK_COMPRESSED_BLOCK_WIDTH 0x912B
+#define GL_PACK_COMPRESSED_BLOCK_HEIGHT 0x912C
+#define GL_PACK_COMPRESSED_BLOCK_DEPTH 0x912D
+#define GL_PACK_COMPRESSED_BLOCK_SIZE 0x912E
+
+#define GLEW_ARB_compressed_texture_pixel_storage GLEW_GET_VAR(__GLEW_ARB_compressed_texture_pixel_storage)
+
+#endif /* GL_ARB_compressed_texture_pixel_storage */
+
+/* ------------------------- GL_ARB_compute_shader ------------------------- */
+
+#ifndef GL_ARB_compute_shader
+#define GL_ARB_compute_shader 1
+
+#define GL_COMPUTE_SHADER_BIT 0x00000020
+#define GL_MAX_COMPUTE_SHARED_MEMORY_SIZE 0x8262
+#define GL_MAX_COMPUTE_UNIFORM_COMPONENTS 0x8263
+#define GL_MAX_COMPUTE_ATOMIC_COUNTER_BUFFERS 0x8264
+#define GL_MAX_COMPUTE_ATOMIC_COUNTERS 0x8265
+#define GL_MAX_COMBINED_COMPUTE_UNIFORM_COMPONENTS 0x8266
+#define GL_COMPUTE_WORK_GROUP_SIZE 0x8267
+#define GL_MAX_COMPUTE_WORK_GROUP_INVOCATIONS 0x90EB
+#define GL_UNIFORM_BLOCK_REFERENCED_BY_COMPUTE_SHADER 0x90EC
+#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_COMPUTE_SHADER 0x90ED
+#define GL_DISPATCH_INDIRECT_BUFFER 0x90EE
+#define GL_DISPATCH_INDIRECT_BUFFER_BINDING 0x90EF
+#define GL_COMPUTE_SHADER 0x91B9
+#define GL_MAX_COMPUTE_UNIFORM_BLOCKS 0x91BB
+#define GL_MAX_COMPUTE_TEXTURE_IMAGE_UNITS 0x91BC
+#define GL_MAX_COMPUTE_IMAGE_UNIFORMS 0x91BD
+#define GL_MAX_COMPUTE_WORK_GROUP_COUNT 0x91BE
+#define GL_MAX_COMPUTE_WORK_GROUP_SIZE 0x91BF
+
+typedef void (GLAPIENTRY * PFNGLDISPATCHCOMPUTEPROC) (GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z);
+typedef void (GLAPIENTRY * PFNGLDISPATCHCOMPUTEINDIRECTPROC) (GLintptr indirect);
+
+#define glDispatchCompute GLEW_GET_FUN(__glewDispatchCompute)
+#define glDispatchComputeIndirect GLEW_GET_FUN(__glewDispatchComputeIndirect)
+
+#define GLEW_ARB_compute_shader GLEW_GET_VAR(__GLEW_ARB_compute_shader)
+
+#endif /* GL_ARB_compute_shader */
+
+/* ------------------- GL_ARB_compute_variable_group_size ------------------ */
+
+#ifndef GL_ARB_compute_variable_group_size
+#define GL_ARB_compute_variable_group_size 1
+
+#define GL_MAX_COMPUTE_FIXED_GROUP_INVOCATIONS_ARB 0x90EB
+#define GL_MAX_COMPUTE_FIXED_GROUP_SIZE_ARB 0x91BF
+#define GL_MAX_COMPUTE_VARIABLE_GROUP_INVOCATIONS_ARB 0x9344
+#define GL_MAX_COMPUTE_VARIABLE_GROUP_SIZE_ARB 0x9345
+
+typedef void (GLAPIENTRY * PFNGLDISPATCHCOMPUTEGROUPSIZEARBPROC) (GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z, GLuint group_size_x, GLuint group_size_y, GLuint group_size_z);
+
+#define glDispatchComputeGroupSizeARB GLEW_GET_FUN(__glewDispatchComputeGroupSizeARB)
+
+#define GLEW_ARB_compute_variable_group_size GLEW_GET_VAR(__GLEW_ARB_compute_variable_group_size)
+
+#endif /* GL_ARB_compute_variable_group_size */
+
+/* ------------------- GL_ARB_conditional_render_inverted ------------------ */
+
+#ifndef GL_ARB_conditional_render_inverted
+#define GL_ARB_conditional_render_inverted 1
+
+#define GL_QUERY_WAIT_INVERTED 0x8E17
+#define GL_QUERY_NO_WAIT_INVERTED 0x8E18
+#define GL_QUERY_BY_REGION_WAIT_INVERTED 0x8E19
+#define GL_QUERY_BY_REGION_NO_WAIT_INVERTED 0x8E1A
+
+#define GLEW_ARB_conditional_render_inverted GLEW_GET_VAR(__GLEW_ARB_conditional_render_inverted)
+
+#endif /* GL_ARB_conditional_render_inverted */
+
+/* ----------------------- GL_ARB_conservative_depth ----------------------- */
+
+#ifndef GL_ARB_conservative_depth
+#define GL_ARB_conservative_depth 1
+
+#define GLEW_ARB_conservative_depth GLEW_GET_VAR(__GLEW_ARB_conservative_depth)
+
+#endif /* GL_ARB_conservative_depth */
+
+/* --------------------------- GL_ARB_copy_buffer -------------------------- */
+
+#ifndef GL_ARB_copy_buffer
+#define GL_ARB_copy_buffer 1
+
+#define GL_COPY_READ_BUFFER 0x8F36
+#define GL_COPY_WRITE_BUFFER 0x8F37
+
+typedef void (GLAPIENTRY * PFNGLCOPYBUFFERSUBDATAPROC) (GLenum readtarget, GLenum writetarget, GLintptr readoffset, GLintptr writeoffset, GLsizeiptr size);
+
+#define glCopyBufferSubData GLEW_GET_FUN(__glewCopyBufferSubData)
+
+#define GLEW_ARB_copy_buffer GLEW_GET_VAR(__GLEW_ARB_copy_buffer)
+
+#endif /* GL_ARB_copy_buffer */
+
+/* --------------------------- GL_ARB_copy_image --------------------------- */
+
+#ifndef GL_ARB_copy_image
+#define GL_ARB_copy_image 1
+
+typedef void (GLAPIENTRY * PFNGLCOPYIMAGESUBDATAPROC) (GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei srcWidth, GLsizei srcHeight, GLsizei srcDepth);
+
+#define glCopyImageSubData GLEW_GET_FUN(__glewCopyImageSubData)
+
+#define GLEW_ARB_copy_image GLEW_GET_VAR(__GLEW_ARB_copy_image)
+
+#endif /* GL_ARB_copy_image */
+
+/* -------------------------- GL_ARB_cull_distance ------------------------- */
+
+#ifndef GL_ARB_cull_distance
+#define GL_ARB_cull_distance 1
+
+#define GL_MAX_CULL_DISTANCES 0x82F9
+#define GL_MAX_COMBINED_CLIP_AND_CULL_DISTANCES 0x82FA
+
+#define GLEW_ARB_cull_distance GLEW_GET_VAR(__GLEW_ARB_cull_distance)
+
+#endif /* GL_ARB_cull_distance */
+
+/* -------------------------- GL_ARB_debug_output -------------------------- */
+
+#ifndef GL_ARB_debug_output
+#define GL_ARB_debug_output 1
+
+#define GL_DEBUG_OUTPUT_SYNCHRONOUS_ARB 0x8242
+#define GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH_ARB 0x8243
+#define GL_DEBUG_CALLBACK_FUNCTION_ARB 0x8244
+#define GL_DEBUG_CALLBACK_USER_PARAM_ARB 0x8245
+#define GL_DEBUG_SOURCE_API_ARB 0x8246
+#define GL_DEBUG_SOURCE_WINDOW_SYSTEM_ARB 0x8247
+#define GL_DEBUG_SOURCE_SHADER_COMPILER_ARB 0x8248
+#define GL_DEBUG_SOURCE_THIRD_PARTY_ARB 0x8249
+#define GL_DEBUG_SOURCE_APPLICATION_ARB 0x824A
+#define GL_DEBUG_SOURCE_OTHER_ARB 0x824B
+#define GL_DEBUG_TYPE_ERROR_ARB 0x824C
+#define GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR_ARB 0x824D
+#define GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR_ARB 0x824E
+#define GL_DEBUG_TYPE_PORTABILITY_ARB 0x824F
+#define GL_DEBUG_TYPE_PERFORMANCE_ARB 0x8250
+#define GL_DEBUG_TYPE_OTHER_ARB 0x8251
+#define GL_MAX_DEBUG_MESSAGE_LENGTH_ARB 0x9143
+#define GL_MAX_DEBUG_LOGGED_MESSAGES_ARB 0x9144
+#define GL_DEBUG_LOGGED_MESSAGES_ARB 0x9145
+#define GL_DEBUG_SEVERITY_HIGH_ARB 0x9146
+#define GL_DEBUG_SEVERITY_MEDIUM_ARB 0x9147
+#define GL_DEBUG_SEVERITY_LOW_ARB 0x9148
+
+typedef void (GLAPIENTRY *GLDEBUGPROCARB)(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar* message, const void* userParam);
+
+typedef void (GLAPIENTRY * PFNGLDEBUGMESSAGECALLBACKARBPROC) (GLDEBUGPROCARB callback, const void *userParam);
+typedef void (GLAPIENTRY * PFNGLDEBUGMESSAGECONTROLARBPROC) (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint* ids, GLboolean enabled);
+typedef void (GLAPIENTRY * PFNGLDEBUGMESSAGEINSERTARBPROC) (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar* buf);
+typedef GLuint (GLAPIENTRY * PFNGLGETDEBUGMESSAGELOGARBPROC) (GLuint count, GLsizei bufSize, GLenum* sources, GLenum* types, GLuint* ids, GLenum* severities, GLsizei* lengths, GLchar* messageLog);
+
+#define glDebugMessageCallbackARB GLEW_GET_FUN(__glewDebugMessageCallbackARB)
+#define glDebugMessageControlARB GLEW_GET_FUN(__glewDebugMessageControlARB)
+#define glDebugMessageInsertARB GLEW_GET_FUN(__glewDebugMessageInsertARB)
+#define glGetDebugMessageLogARB GLEW_GET_FUN(__glewGetDebugMessageLogARB)
+
+#define GLEW_ARB_debug_output GLEW_GET_VAR(__GLEW_ARB_debug_output)
+
+#endif /* GL_ARB_debug_output */
+
+/* ----------------------- GL_ARB_depth_buffer_float ----------------------- */
+
+#ifndef GL_ARB_depth_buffer_float
+#define GL_ARB_depth_buffer_float 1
+
+#define GL_DEPTH_COMPONENT32F 0x8CAC
+#define GL_DEPTH32F_STENCIL8 0x8CAD
+#define GL_FLOAT_32_UNSIGNED_INT_24_8_REV 0x8DAD
+
+#define GLEW_ARB_depth_buffer_float GLEW_GET_VAR(__GLEW_ARB_depth_buffer_float)
+
+#endif /* GL_ARB_depth_buffer_float */
+
+/* --------------------------- GL_ARB_depth_clamp -------------------------- */
+
+#ifndef GL_ARB_depth_clamp
+#define GL_ARB_depth_clamp 1
+
+#define GL_DEPTH_CLAMP 0x864F
+
+#define GLEW_ARB_depth_clamp GLEW_GET_VAR(__GLEW_ARB_depth_clamp)
+
+#endif /* GL_ARB_depth_clamp */
+
+/* -------------------------- GL_ARB_depth_texture ------------------------- */
+
+#ifndef GL_ARB_depth_texture
+#define GL_ARB_depth_texture 1
+
+#define GL_DEPTH_COMPONENT16_ARB 0x81A5
+#define GL_DEPTH_COMPONENT24_ARB 0x81A6
+#define GL_DEPTH_COMPONENT32_ARB 0x81A7
+#define GL_TEXTURE_DEPTH_SIZE_ARB 0x884A
+#define GL_DEPTH_TEXTURE_MODE_ARB 0x884B
+
+#define GLEW_ARB_depth_texture GLEW_GET_VAR(__GLEW_ARB_depth_texture)
+
+#endif /* GL_ARB_depth_texture */
+
+/* ----------------------- GL_ARB_derivative_control ----------------------- */
+
+#ifndef GL_ARB_derivative_control
+#define GL_ARB_derivative_control 1
+
+#define GLEW_ARB_derivative_control GLEW_GET_VAR(__GLEW_ARB_derivative_control)
+
+#endif /* GL_ARB_derivative_control */
+
+/* ----------------------- GL_ARB_direct_state_access ---------------------- */
+
+#ifndef GL_ARB_direct_state_access
+#define GL_ARB_direct_state_access 1
+
+#define GL_TEXTURE_TARGET 0x1006
+#define GL_QUERY_TARGET 0x82EA
+#define GL_TEXTURE_BINDING 0x82EB
+
+typedef void (GLAPIENTRY * PFNGLBINDTEXTUREUNITPROC) (GLuint unit, GLuint texture);
+typedef void (GLAPIENTRY * PFNGLBLITNAMEDFRAMEBUFFERPROC) (GLuint readFramebuffer, GLuint drawFramebuffer, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
+typedef GLenum (GLAPIENTRY * PFNGLCHECKNAMEDFRAMEBUFFERSTATUSPROC) (GLuint framebuffer, GLenum target);
+typedef void (GLAPIENTRY * PFNGLCLEARNAMEDBUFFERDATAPROC) (GLuint buffer, GLenum internalformat, GLenum format, GLenum type, const void *data);
+typedef void (GLAPIENTRY * PFNGLCLEARNAMEDBUFFERSUBDATAPROC) (GLuint buffer, GLenum internalformat, GLintptr offset, GLsizeiptr size, GLenum format, GLenum type, const void *data);
+typedef void (GLAPIENTRY * PFNGLCLEARNAMEDFRAMEBUFFERFIPROC) (GLuint framebuffer, GLenum buffer, GLfloat depth, GLint stencil);
+typedef void (GLAPIENTRY * PFNGLCLEARNAMEDFRAMEBUFFERFVPROC) (GLuint framebuffer, GLenum buffer, GLint drawbuffer, const GLfloat* value);
+typedef void (GLAPIENTRY * PFNGLCLEARNAMEDFRAMEBUFFERIVPROC) (GLuint framebuffer, GLenum buffer, GLint drawbuffer, const GLint* value);
+typedef void (GLAPIENTRY * PFNGLCLEARNAMEDFRAMEBUFFERUIVPROC) (GLuint framebuffer, GLenum buffer, GLint drawbuffer, const GLuint* value);
+typedef void (GLAPIENTRY * PFNGLCOMPRESSEDTEXTURESUBIMAGE1DPROC) (GLuint texture, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *data);
+typedef void (GLAPIENTRY * PFNGLCOMPRESSEDTEXTURESUBIMAGE2DPROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data);
+typedef void (GLAPIENTRY * PFNGLCOMPRESSEDTEXTURESUBIMAGE3DPROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data);
+typedef void (GLAPIENTRY * PFNGLCOPYNAMEDBUFFERSUBDATAPROC) (GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size);
+typedef void (GLAPIENTRY * PFNGLCOPYTEXTURESUBIMAGE1DPROC) (GLuint texture, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);
+typedef void (GLAPIENTRY * PFNGLCOPYTEXTURESUBIMAGE2DPROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
+typedef void (GLAPIENTRY * PFNGLCOPYTEXTURESUBIMAGE3DPROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
+typedef void (GLAPIENTRY * PFNGLCREATEBUFFERSPROC) (GLsizei n, GLuint* buffers);
+typedef void (GLAPIENTRY * PFNGLCREATEFRAMEBUFFERSPROC) (GLsizei n, GLuint* framebuffers);
+typedef void (GLAPIENTRY * PFNGLCREATEPROGRAMPIPELINESPROC) (GLsizei n, GLuint* pipelines);
+typedef void (GLAPIENTRY * PFNGLCREATEQUERIESPROC) (GLenum target, GLsizei n, GLuint* ids);
+typedef void (GLAPIENTRY * PFNGLCREATERENDERBUFFERSPROC) (GLsizei n, GLuint* renderbuffers);
+typedef void (GLAPIENTRY * PFNGLCREATESAMPLERSPROC) (GLsizei n, GLuint* samplers);
+typedef void (GLAPIENTRY * PFNGLCREATETEXTURESPROC) (GLenum target, GLsizei n, GLuint* textures);
+typedef void (GLAPIENTRY * PFNGLCREATETRANSFORMFEEDBACKSPROC) (GLsizei n, GLuint* ids);
+typedef void (GLAPIENTRY * PFNGLCREATEVERTEXARRAYSPROC) (GLsizei n, GLuint* arrays);
+typedef void (GLAPIENTRY * PFNGLDISABLEVERTEXARRAYATTRIBPROC) (GLuint vaobj, GLuint index);
+typedef void (GLAPIENTRY * PFNGLENABLEVERTEXARRAYATTRIBPROC) (GLuint vaobj, GLuint index);
+typedef void (GLAPIENTRY * PFNGLFLUSHMAPPEDNAMEDBUFFERRANGEPROC) (GLuint buffer, GLintptr offset, GLsizeiptr length);
+typedef void (GLAPIENTRY * PFNGLGENERATETEXTUREMIPMAPPROC) (GLuint texture);
+typedef void (GLAPIENTRY * PFNGLGETCOMPRESSEDTEXTUREIMAGEPROC) (GLuint texture, GLint level, GLsizei bufSize, void *pixels);
+typedef void (GLAPIENTRY * PFNGLGETNAMEDBUFFERPARAMETERI64VPROC) (GLuint buffer, GLenum pname, GLint64* params);
+typedef void (GLAPIENTRY * PFNGLGETNAMEDBUFFERPARAMETERIVPROC) (GLuint buffer, GLenum pname, GLint* params);
+typedef void (GLAPIENTRY * PFNGLGETNAMEDBUFFERPOINTERVPROC) (GLuint buffer, GLenum pname, void** params);
+typedef void (GLAPIENTRY * PFNGLGETNAMEDBUFFERSUBDATAPROC) (GLuint buffer, GLintptr offset, GLsizeiptr size, void *data);
+typedef void (GLAPIENTRY * PFNGLGETNAMEDFRAMEBUFFERATTACHMENTPARAMETERIVPROC) (GLuint framebuffer, GLenum attachment, GLenum pname, GLint* params);
+typedef void (GLAPIENTRY * PFNGLGETNAMEDFRAMEBUFFERPARAMETERIVPROC) (GLuint framebuffer, GLenum pname, GLint* param);
+typedef void (GLAPIENTRY * PFNGLGETNAMEDRENDERBUFFERPARAMETERIVPROC) (GLuint renderbuffer, GLenum pname, GLint* params);
+typedef void (GLAPIENTRY * PFNGLGETQUERYBUFFEROBJECTI64VPROC) (GLuint id,GLuint buffer,GLenum pname,GLintptr offset);
+typedef void (GLAPIENTRY * PFNGLGETQUERYBUFFEROBJECTIVPROC) (GLuint id,GLuint buffer,GLenum pname,GLintptr offset);
+typedef void (GLAPIENTRY * PFNGLGETQUERYBUFFEROBJECTUI64VPROC) (GLuint id,GLuint buffer,GLenum pname,GLintptr offset);
+typedef void (GLAPIENTRY * PFNGLGETQUERYBUFFEROBJECTUIVPROC) (GLuint id,GLuint buffer,GLenum pname,GLintptr offset);
+typedef void (GLAPIENTRY * PFNGLGETTEXTUREIMAGEPROC) (GLuint texture, GLint level, GLenum format, GLenum type, GLsizei bufSize, void *pixels);
+typedef void (GLAPIENTRY * PFNGLGETTEXTURELEVELPARAMETERFVPROC) (GLuint texture, GLint level, GLenum pname, GLfloat* params);
+typedef void (GLAPIENTRY * PFNGLGETTEXTURELEVELPARAMETERIVPROC) (GLuint texture, GLint level, GLenum pname, GLint* params);
+typedef void (GLAPIENTRY * PFNGLGETTEXTUREPARAMETERIIVPROC) (GLuint texture, GLenum pname, GLint* params);
+typedef void (GLAPIENTRY * PFNGLGETTEXTUREPARAMETERIUIVPROC) (GLuint texture, GLenum pname, GLuint* params);
+typedef void (GLAPIENTRY * PFNGLGETTEXTUREPARAMETERFVPROC) (GLuint texture, GLenum pname, GLfloat* params);
+typedef void (GLAPIENTRY * PFNGLGETTEXTUREPARAMETERIVPROC) (GLuint texture, GLenum pname, GLint* params);
+typedef void (GLAPIENTRY * PFNGLGETTRANSFORMFEEDBACKI64_VPROC) (GLuint xfb, GLenum pname, GLuint index, GLint64* param);
+typedef void (GLAPIENTRY * PFNGLGETTRANSFORMFEEDBACKI_VPROC) (GLuint xfb, GLenum pname, GLuint index, GLint* param);
+typedef void (GLAPIENTRY * PFNGLGETTRANSFORMFEEDBACKIVPROC) (GLuint xfb, GLenum pname, GLint* param);
+typedef void (GLAPIENTRY * PFNGLGETVERTEXARRAYINDEXED64IVPROC) (GLuint vaobj, GLuint index, GLenum pname, GLint64* param);
+typedef void (GLAPIENTRY * PFNGLGETVERTEXARRAYINDEXEDIVPROC) (GLuint vaobj, GLuint index, GLenum pname, GLint* param);
+typedef void (GLAPIENTRY * PFNGLGETVERTEXARRAYIVPROC) (GLuint vaobj, GLenum pname, GLint* param);
+typedef void (GLAPIENTRY * PFNGLINVALIDATENAMEDFRAMEBUFFERDATAPROC) (GLuint framebuffer, GLsizei numAttachments, const GLenum* attachments);
+typedef void (GLAPIENTRY * PFNGLINVALIDATENAMEDFRAMEBUFFERSUBDATAPROC) (GLuint framebuffer, GLsizei numAttachments, const GLenum* attachments, GLint x, GLint y, GLsizei width, GLsizei height);
+typedef void * (GLAPIENTRY * PFNGLMAPNAMEDBUFFERPROC) (GLuint buffer, GLenum access);
+typedef void * (GLAPIENTRY * PFNGLMAPNAMEDBUFFERRANGEPROC) (GLuint buffer, GLintptr offset, GLsizeiptr length, GLbitfield access);
+typedef void (GLAPIENTRY * PFNGLNAMEDBUFFERDATAPROC) (GLuint buffer, GLsizeiptr size, const void *data, GLenum usage);
+typedef void (GLAPIENTRY * PFNGLNAMEDBUFFERSTORAGEPROC) (GLuint buffer, GLsizeiptr size, const void *data, GLbitfield flags);
+typedef void (GLAPIENTRY * PFNGLNAMEDBUFFERSUBDATAPROC) (GLuint buffer, GLintptr offset, GLsizeiptr size, const void *data);
+typedef void (GLAPIENTRY * PFNGLNAMEDFRAMEBUFFERDRAWBUFFERPROC) (GLuint framebuffer, GLenum mode);
+typedef void (GLAPIENTRY * PFNGLNAMEDFRAMEBUFFERDRAWBUFFERSPROC) (GLuint framebuffer, GLsizei n, const GLenum* bufs);
+typedef void (GLAPIENTRY * PFNGLNAMEDFRAMEBUFFERPARAMETERIPROC) (GLuint framebuffer, GLenum pname, GLint param);
+typedef void (GLAPIENTRY * PFNGLNAMEDFRAMEBUFFERREADBUFFERPROC) (GLuint framebuffer, GLenum mode);
+typedef void (GLAPIENTRY * PFNGLNAMEDFRAMEBUFFERRENDERBUFFERPROC) (GLuint framebuffer, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
+typedef void (GLAPIENTRY * PFNGLNAMEDFRAMEBUFFERTEXTUREPROC) (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level);
+typedef void (GLAPIENTRY * PFNGLNAMEDFRAMEBUFFERTEXTURELAYERPROC) (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLint layer);
+typedef void (GLAPIENTRY * PFNGLNAMEDRENDERBUFFERSTORAGEPROC) (GLuint renderbuffer, GLenum internalformat, GLsizei width, GLsizei height);
+typedef void (GLAPIENTRY * PFNGLNAMEDRENDERBUFFERSTORAGEMULTISAMPLEPROC) (GLuint renderbuffer, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
+typedef void (GLAPIENTRY * PFNGLTEXTUREBUFFERPROC) (GLuint texture, GLenum internalformat, GLuint buffer);
+typedef void (GLAPIENTRY * PFNGLTEXTUREBUFFERRANGEPROC) (GLuint texture, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size);
+typedef void (GLAPIENTRY * PFNGLTEXTUREPARAMETERIIVPROC) (GLuint texture, GLenum pname, const GLint* params);
+typedef void (GLAPIENTRY * PFNGLTEXTUREPARAMETERIUIVPROC) (GLuint texture, GLenum pname, const GLuint* params);
+typedef void (GLAPIENTRY * PFNGLTEXTUREPARAMETERFPROC) (GLuint texture, GLenum pname, GLfloat param);
+typedef void (GLAPIENTRY * PFNGLTEXTUREPARAMETERFVPROC) (GLuint texture, GLenum pname, const GLfloat* param);
+typedef void (GLAPIENTRY * PFNGLTEXTUREPARAMETERIPROC) (GLuint texture, GLenum pname, GLint param);
+typedef void (GLAPIENTRY * PFNGLTEXTUREPARAMETERIVPROC) (GLuint texture, GLenum pname, const GLint* param);
+typedef void (GLAPIENTRY * PFNGLTEXTURESTORAGE1DPROC) (GLuint texture, GLsizei levels, GLenum internalformat, GLsizei width);
+typedef void (GLAPIENTRY * PFNGLTEXTURESTORAGE2DPROC) (GLuint texture, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
+typedef void (GLAPIENTRY * PFNGLTEXTURESTORAGE2DMULTISAMPLEPROC) (GLuint texture, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations);
+typedef void (GLAPIENTRY * PFNGLTEXTURESTORAGE3DPROC) (GLuint texture, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
+typedef void (GLAPIENTRY * PFNGLTEXTURESTORAGE3DMULTISAMPLEPROC) (GLuint texture, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations);
+typedef void (GLAPIENTRY * PFNGLTEXTURESUBIMAGE1DPROC) (GLuint texture, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void *pixels);
+typedef void (GLAPIENTRY * PFNGLTEXTURESUBIMAGE2DPROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels);
+typedef void (GLAPIENTRY * PFNGLTEXTURESUBIMAGE3DPROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels);
+typedef void (GLAPIENTRY * PFNGLTRANSFORMFEEDBACKBUFFERBASEPROC) (GLuint xfb, GLuint index, GLuint buffer);
+typedef void (GLAPIENTRY * PFNGLTRANSFORMFEEDBACKBUFFERRANGEPROC) (GLuint xfb, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size);
+typedef GLboolean (GLAPIENTRY * PFNGLUNMAPNAMEDBUFFERPROC) (GLuint buffer);
+typedef void (GLAPIENTRY * PFNGLVERTEXARRAYATTRIBBINDINGPROC) (GLuint vaobj, GLuint attribindex, GLuint bindingindex);
+typedef void (GLAPIENTRY * PFNGLVERTEXARRAYATTRIBFORMATPROC) (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset);
+typedef void (GLAPIENTRY * PFNGLVERTEXARRAYATTRIBIFORMATPROC) (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);
+typedef void (GLAPIENTRY * PFNGLVERTEXARRAYATTRIBLFORMATPROC) (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);
+typedef void (GLAPIENTRY * PFNGLVERTEXARRAYBINDINGDIVISORPROC) (GLuint vaobj, GLuint bindingindex, GLuint divisor);
+typedef void (GLAPIENTRY * PFNGLVERTEXARRAYELEMENTBUFFERPROC) (GLuint vaobj, GLuint buffer);
+typedef void (GLAPIENTRY * PFNGLVERTEXARRAYVERTEXBUFFERPROC) (GLuint vaobj, GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride);
+typedef void (GLAPIENTRY * PFNGLVERTEXARRAYVERTEXBUFFERSPROC) (GLuint vaobj, GLuint first, GLsizei count, const GLuint* buffers, const GLintptr *offsets, const GLsizei *strides);
+
+#define glBindTextureUnit GLEW_GET_FUN(__glewBindTextureUnit)
+#define glBlitNamedFramebuffer GLEW_GET_FUN(__glewBlitNamedFramebuffer)
+#define glCheckNamedFramebufferStatus GLEW_GET_FUN(__glewCheckNamedFramebufferStatus)
+#define glClearNamedBufferData GLEW_GET_FUN(__glewClearNamedBufferData)
+#define glClearNamedBufferSubData GLEW_GET_FUN(__glewClearNamedBufferSubData)
+#define glClearNamedFramebufferfi GLEW_GET_FUN(__glewClearNamedFramebufferfi)
+#define glClearNamedFramebufferfv GLEW_GET_FUN(__glewClearNamedFramebufferfv)
+#define glClearNamedFramebufferiv GLEW_GET_FUN(__glewClearNamedFramebufferiv)
+#define glClearNamedFramebufferuiv GLEW_GET_FUN(__glewClearNamedFramebufferuiv)
+#define glCompressedTextureSubImage1D GLEW_GET_FUN(__glewCompressedTextureSubImage1D)
+#define glCompressedTextureSubImage2D GLEW_GET_FUN(__glewCompressedTextureSubImage2D)
+#define glCompressedTextureSubImage3D GLEW_GET_FUN(__glewCompressedTextureSubImage3D)
+#define glCopyNamedBufferSubData GLEW_GET_FUN(__glewCopyNamedBufferSubData)
+#define glCopyTextureSubImage1D GLEW_GET_FUN(__glewCopyTextureSubImage1D)
+#define glCopyTextureSubImage2D GLEW_GET_FUN(__glewCopyTextureSubImage2D)
+#define glCopyTextureSubImage3D GLEW_GET_FUN(__glewCopyTextureSubImage3D)
+#define glCreateBuffers GLEW_GET_FUN(__glewCreateBuffers)
+#define glCreateFramebuffers GLEW_GET_FUN(__glewCreateFramebuffers)
+#define glCreateProgramPipelines GLEW_GET_FUN(__glewCreateProgramPipelines)
+#define glCreateQueries GLEW_GET_FUN(__glewCreateQueries)
+#define glCreateRenderbuffers GLEW_GET_FUN(__glewCreateRenderbuffers)
+#define glCreateSamplers GLEW_GET_FUN(__glewCreateSamplers)
+#define glCreateTextures GLEW_GET_FUN(__glewCreateTextures)
+#define glCreateTransformFeedbacks GLEW_GET_FUN(__glewCreateTransformFeedbacks)
+#define glCreateVertexArrays GLEW_GET_FUN(__glewCreateVertexArrays)
+#define glDisableVertexArrayAttrib GLEW_GET_FUN(__glewDisableVertexArrayAttrib)
+#define glEnableVertexArrayAttrib GLEW_GET_FUN(__glewEnableVertexArrayAttrib)
+#define glFlushMappedNamedBufferRange GLEW_GET_FUN(__glewFlushMappedNamedBufferRange)
+#define glGenerateTextureMipmap GLEW_GET_FUN(__glewGenerateTextureMipmap)
+#define glGetCompressedTextureImage GLEW_GET_FUN(__glewGetCompressedTextureImage)
+#define glGetNamedBufferParameteri64v GLEW_GET_FUN(__glewGetNamedBufferParameteri64v)
+#define glGetNamedBufferParameteriv GLEW_GET_FUN(__glewGetNamedBufferParameteriv)
+#define glGetNamedBufferPointerv GLEW_GET_FUN(__glewGetNamedBufferPointerv)
+#define glGetNamedBufferSubData GLEW_GET_FUN(__glewGetNamedBufferSubData)
+#define glGetNamedFramebufferAttachmentParameteriv GLEW_GET_FUN(__glewGetNamedFramebufferAttachmentParameteriv)
+#define glGetNamedFramebufferParameteriv GLEW_GET_FUN(__glewGetNamedFramebufferParameteriv)
+#define glGetNamedRenderbufferParameteriv GLEW_GET_FUN(__glewGetNamedRenderbufferParameteriv)
+#define glGetQueryBufferObjecti64v GLEW_GET_FUN(__glewGetQueryBufferObjecti64v)
+#define glGetQueryBufferObjectiv GLEW_GET_FUN(__glewGetQueryBufferObjectiv)
+#define glGetQueryBufferObjectui64v GLEW_GET_FUN(__glewGetQueryBufferObjectui64v)
+#define glGetQueryBufferObjectuiv GLEW_GET_FUN(__glewGetQueryBufferObjectuiv)
+#define glGetTextureImage GLEW_GET_FUN(__glewGetTextureImage)
+#define glGetTextureLevelParameterfv GLEW_GET_FUN(__glewGetTextureLevelParameterfv)
+#define glGetTextureLevelParameteriv GLEW_GET_FUN(__glewGetTextureLevelParameteriv)
+#define glGetTextureParameterIiv GLEW_GET_FUN(__glewGetTextureParameterIiv)
+#define glGetTextureParameterIuiv GLEW_GET_FUN(__glewGetTextureParameterIuiv)
+#define glGetTextureParameterfv GLEW_GET_FUN(__glewGetTextureParameterfv)
+#define glGetTextureParameteriv GLEW_GET_FUN(__glewGetTextureParameteriv)
+#define glGetTransformFeedbacki64_v GLEW_GET_FUN(__glewGetTransformFeedbacki64_v)
+#define glGetTransformFeedbacki_v GLEW_GET_FUN(__glewGetTransformFeedbacki_v)
+#define glGetTransformFeedbackiv GLEW_GET_FUN(__glewGetTransformFeedbackiv)
+#define glGetVertexArrayIndexed64iv GLEW_GET_FUN(__glewGetVertexArrayIndexed64iv)
+#define glGetVertexArrayIndexediv GLEW_GET_FUN(__glewGetVertexArrayIndexediv)
+#define glGetVertexArrayiv GLEW_GET_FUN(__glewGetVertexArrayiv)
+#define glInvalidateNamedFramebufferData GLEW_GET_FUN(__glewInvalidateNamedFramebufferData)
+#define glInvalidateNamedFramebufferSubData GLEW_GET_FUN(__glewInvalidateNamedFramebufferSubData)
+#define glMapNamedBuffer GLEW_GET_FUN(__glewMapNamedBuffer)
+#define glMapNamedBufferRange GLEW_GET_FUN(__glewMapNamedBufferRange)
+#define glNamedBufferData GLEW_GET_FUN(__glewNamedBufferData)
+#define glNamedBufferStorage GLEW_GET_FUN(__glewNamedBufferStorage)
+#define glNamedBufferSubData GLEW_GET_FUN(__glewNamedBufferSubData)
+#define glNamedFramebufferDrawBuffer GLEW_GET_FUN(__glewNamedFramebufferDrawBuffer)
+#define glNamedFramebufferDrawBuffers GLEW_GET_FUN(__glewNamedFramebufferDrawBuffers)
+#define glNamedFramebufferParameteri GLEW_GET_FUN(__glewNamedFramebufferParameteri)
+#define glNamedFramebufferReadBuffer GLEW_GET_FUN(__glewNamedFramebufferReadBuffer)
+#define glNamedFramebufferRenderbuffer GLEW_GET_FUN(__glewNamedFramebufferRenderbuffer)
+#define glNamedFramebufferTexture GLEW_GET_FUN(__glewNamedFramebufferTexture)
+#define glNamedFramebufferTextureLayer GLEW_GET_FUN(__glewNamedFramebufferTextureLayer)
+#define glNamedRenderbufferStorage GLEW_GET_FUN(__glewNamedRenderbufferStorage)
+#define glNamedRenderbufferStorageMultisample GLEW_GET_FUN(__glewNamedRenderbufferStorageMultisample)
+#define glTextureBuffer GLEW_GET_FUN(__glewTextureBuffer)
+#define glTextureBufferRange GLEW_GET_FUN(__glewTextureBufferRange)
+#define glTextureParameterIiv GLEW_GET_FUN(__glewTextureParameterIiv)
+#define glTextureParameterIuiv GLEW_GET_FUN(__glewTextureParameterIuiv)
+#define glTextureParameterf GLEW_GET_FUN(__glewTextureParameterf)
+#define glTextureParameterfv GLEW_GET_FUN(__glewTextureParameterfv)
+#define glTextureParameteri GLEW_GET_FUN(__glewTextureParameteri)
+#define glTextureParameteriv GLEW_GET_FUN(__glewTextureParameteriv)
+#define glTextureStorage1D GLEW_GET_FUN(__glewTextureStorage1D)
+#define glTextureStorage2D GLEW_GET_FUN(__glewTextureStorage2D)
+#define glTextureStorage2DMultisample GLEW_GET_FUN(__glewTextureStorage2DMultisample)
+#define glTextureStorage3D GLEW_GET_FUN(__glewTextureStorage3D)
+#define glTextureStorage3DMultisample GLEW_GET_FUN(__glewTextureStorage3DMultisample)
+#define glTextureSubImage1D GLEW_GET_FUN(__glewTextureSubImage1D)
+#define glTextureSubImage2D GLEW_GET_FUN(__glewTextureSubImage2D)
+#define glTextureSubImage3D GLEW_GET_FUN(__glewTextureSubImage3D)
+#define glTransformFeedbackBufferBase GLEW_GET_FUN(__glewTransformFeedbackBufferBase)
+#define glTransformFeedbackBufferRange GLEW_GET_FUN(__glewTransformFeedbackBufferRange)
+#define glUnmapNamedBuffer GLEW_GET_FUN(__glewUnmapNamedBuffer)
+#define glVertexArrayAttribBinding GLEW_GET_FUN(__glewVertexArrayAttribBinding)
+#define glVertexArrayAttribFormat GLEW_GET_FUN(__glewVertexArrayAttribFormat)
+#define glVertexArrayAttribIFormat GLEW_GET_FUN(__glewVertexArrayAttribIFormat)
+#define glVertexArrayAttribLFormat GLEW_GET_FUN(__glewVertexArrayAttribLFormat)
+#define glVertexArrayBindingDivisor GLEW_GET_FUN(__glewVertexArrayBindingDivisor)
+#define glVertexArrayElementBuffer GLEW_GET_FUN(__glewVertexArrayElementBuffer)
+#define glVertexArrayVertexBuffer GLEW_GET_FUN(__glewVertexArrayVertexBuffer)
+#define glVertexArrayVertexBuffers GLEW_GET_FUN(__glewVertexArrayVertexBuffers)
+
+#define GLEW_ARB_direct_state_access GLEW_GET_VAR(__GLEW_ARB_direct_state_access)
+
+#endif /* GL_ARB_direct_state_access */
+
+/* -------------------------- GL_ARB_draw_buffers -------------------------- */
+
+#ifndef GL_ARB_draw_buffers
+#define GL_ARB_draw_buffers 1
+
+#define GL_MAX_DRAW_BUFFERS_ARB 0x8824
+#define GL_DRAW_BUFFER0_ARB 0x8825
+#define GL_DRAW_BUFFER1_ARB 0x8826
+#define GL_DRAW_BUFFER2_ARB 0x8827
+#define GL_DRAW_BUFFER3_ARB 0x8828
+#define GL_DRAW_BUFFER4_ARB 0x8829
+#define GL_DRAW_BUFFER5_ARB 0x882A
+#define GL_DRAW_BUFFER6_ARB 0x882B
+#define GL_DRAW_BUFFER7_ARB 0x882C
+#define GL_DRAW_BUFFER8_ARB 0x882D
+#define GL_DRAW_BUFFER9_ARB 0x882E
+#define GL_DRAW_BUFFER10_ARB 0x882F
+#define GL_DRAW_BUFFER11_ARB 0x8830
+#define GL_DRAW_BUFFER12_ARB 0x8831
+#define GL_DRAW_BUFFER13_ARB 0x8832
+#define GL_DRAW_BUFFER14_ARB 0x8833
+#define GL_DRAW_BUFFER15_ARB 0x8834
+
+typedef void (GLAPIENTRY * PFNGLDRAWBUFFERSARBPROC) (GLsizei n, const GLenum* bufs);
+
+#define glDrawBuffersARB GLEW_GET_FUN(__glewDrawBuffersARB)
+
+#define GLEW_ARB_draw_buffers GLEW_GET_VAR(__GLEW_ARB_draw_buffers)
+
+#endif /* GL_ARB_draw_buffers */
+
+/* ----------------------- GL_ARB_draw_buffers_blend ----------------------- */
+
+#ifndef GL_ARB_draw_buffers_blend
+#define GL_ARB_draw_buffers_blend 1
+
+typedef void (GLAPIENTRY * PFNGLBLENDEQUATIONSEPARATEIARBPROC) (GLuint buf, GLenum modeRGB, GLenum modeAlpha);
+typedef void (GLAPIENTRY * PFNGLBLENDEQUATIONIARBPROC) (GLuint buf, GLenum mode);
+typedef void (GLAPIENTRY * PFNGLBLENDFUNCSEPARATEIARBPROC) (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
+typedef void (GLAPIENTRY * PFNGLBLENDFUNCIARBPROC) (GLuint buf, GLenum src, GLenum dst);
+
+#define glBlendEquationSeparateiARB GLEW_GET_FUN(__glewBlendEquationSeparateiARB)
+#define glBlendEquationiARB GLEW_GET_FUN(__glewBlendEquationiARB)
+#define glBlendFuncSeparateiARB GLEW_GET_FUN(__glewBlendFuncSeparateiARB)
+#define glBlendFunciARB GLEW_GET_FUN(__glewBlendFunciARB)
+
+#define GLEW_ARB_draw_buffers_blend GLEW_GET_VAR(__GLEW_ARB_draw_buffers_blend)
+
+#endif /* GL_ARB_draw_buffers_blend */
+
+/* -------------------- GL_ARB_draw_elements_base_vertex ------------------- */
+
+#ifndef GL_ARB_draw_elements_base_vertex
+#define GL_ARB_draw_elements_base_vertex 1
+
+typedef void (GLAPIENTRY * PFNGLDRAWELEMENTSBASEVERTEXPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLint basevertex);
+typedef void (GLAPIENTRY * PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount, GLint basevertex);
+typedef void (GLAPIENTRY * PFNGLDRAWRANGEELEMENTSBASEVERTEXPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices, GLint basevertex);
+typedef void (GLAPIENTRY * PFNGLMULTIDRAWELEMENTSBASEVERTEXPROC) (GLenum mode, const GLsizei* count, GLenum type, const void *const *indices, GLsizei primcount, const GLint *basevertex);
+
+#define glDrawElementsBaseVertex GLEW_GET_FUN(__glewDrawElementsBaseVertex)
+#define glDrawElementsInstancedBaseVertex GLEW_GET_FUN(__glewDrawElementsInstancedBaseVertex)
+#define glDrawRangeElementsBaseVertex GLEW_GET_FUN(__glewDrawRangeElementsBaseVertex)
+#define glMultiDrawElementsBaseVertex GLEW_GET_FUN(__glewMultiDrawElementsBaseVertex)
+
+#define GLEW_ARB_draw_elements_base_vertex GLEW_GET_VAR(__GLEW_ARB_draw_elements_base_vertex)
+
+#endif /* GL_ARB_draw_elements_base_vertex */
+
+/* -------------------------- GL_ARB_draw_indirect ------------------------- */
+
+#ifndef GL_ARB_draw_indirect
+#define GL_ARB_draw_indirect 1
+
+#define GL_DRAW_INDIRECT_BUFFER 0x8F3F
+#define GL_DRAW_INDIRECT_BUFFER_BINDING 0x8F43
+
+typedef void (GLAPIENTRY * PFNGLDRAWARRAYSINDIRECTPROC) (GLenum mode, const void *indirect);
+typedef void (GLAPIENTRY * PFNGLDRAWELEMENTSINDIRECTPROC) (GLenum mode, GLenum type, const void *indirect);
+
+#define glDrawArraysIndirect GLEW_GET_FUN(__glewDrawArraysIndirect)
+#define glDrawElementsIndirect GLEW_GET_FUN(__glewDrawElementsIndirect)
+
+#define GLEW_ARB_draw_indirect GLEW_GET_VAR(__GLEW_ARB_draw_indirect)
+
+#endif /* GL_ARB_draw_indirect */
+
+/* ------------------------- GL_ARB_draw_instanced ------------------------- */
+
+#ifndef GL_ARB_draw_instanced
+#define GL_ARB_draw_instanced 1
+
+#define GLEW_ARB_draw_instanced GLEW_GET_VAR(__GLEW_ARB_draw_instanced)
+
+#endif /* GL_ARB_draw_instanced */
+
+/* ------------------------ GL_ARB_enhanced_layouts ------------------------ */
+
+#ifndef GL_ARB_enhanced_layouts
+#define GL_ARB_enhanced_layouts 1
+
+#define GL_LOCATION_COMPONENT 0x934A
+#define GL_TRANSFORM_FEEDBACK_BUFFER_INDEX 0x934B
+#define GL_TRANSFORM_FEEDBACK_BUFFER_STRIDE 0x934C
+
+#define GLEW_ARB_enhanced_layouts GLEW_GET_VAR(__GLEW_ARB_enhanced_layouts)
+
+#endif /* GL_ARB_enhanced_layouts */
+
+/* -------------------- GL_ARB_explicit_attrib_location -------------------- */
+
+#ifndef GL_ARB_explicit_attrib_location
+#define GL_ARB_explicit_attrib_location 1
+
+#define GLEW_ARB_explicit_attrib_location GLEW_GET_VAR(__GLEW_ARB_explicit_attrib_location)
+
+#endif /* GL_ARB_explicit_attrib_location */
+
+/* -------------------- GL_ARB_explicit_uniform_location ------------------- */
+
+#ifndef GL_ARB_explicit_uniform_location
+#define GL_ARB_explicit_uniform_location 1
+
+#define GL_MAX_UNIFORM_LOCATIONS 0x826E
+
+#define GLEW_ARB_explicit_uniform_location GLEW_GET_VAR(__GLEW_ARB_explicit_uniform_location)
+
+#endif /* GL_ARB_explicit_uniform_location */
+
+/* ------------------- GL_ARB_fragment_coord_conventions ------------------- */
+
+#ifndef GL_ARB_fragment_coord_conventions
+#define GL_ARB_fragment_coord_conventions 1
+
+#define GLEW_ARB_fragment_coord_conventions GLEW_GET_VAR(__GLEW_ARB_fragment_coord_conventions)
+
+#endif /* GL_ARB_fragment_coord_conventions */
+
+/* --------------------- GL_ARB_fragment_layer_viewport -------------------- */
+
+#ifndef GL_ARB_fragment_layer_viewport
+#define GL_ARB_fragment_layer_viewport 1
+
+#define GLEW_ARB_fragment_layer_viewport GLEW_GET_VAR(__GLEW_ARB_fragment_layer_viewport)
+
+#endif /* GL_ARB_fragment_layer_viewport */
+
+/* ------------------------ GL_ARB_fragment_program ------------------------ */
+
+#ifndef GL_ARB_fragment_program
+#define GL_ARB_fragment_program 1
+
+#define GL_FRAGMENT_PROGRAM_ARB 0x8804
+#define GL_PROGRAM_ALU_INSTRUCTIONS_ARB 0x8805
+#define GL_PROGRAM_TEX_INSTRUCTIONS_ARB 0x8806
+#define GL_PROGRAM_TEX_INDIRECTIONS_ARB 0x8807
+#define GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB 0x8808
+#define GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB 0x8809
+#define GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB 0x880A
+#define GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB 0x880B
+#define GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB 0x880C
+#define GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB 0x880D
+#define GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB 0x880E
+#define GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB 0x880F
+#define GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB 0x8810
+#define GL_MAX_TEXTURE_COORDS_ARB 0x8871
+#define GL_MAX_TEXTURE_IMAGE_UNITS_ARB 0x8872
+
+#define GLEW_ARB_fragment_program GLEW_GET_VAR(__GLEW_ARB_fragment_program)
+
+#endif /* GL_ARB_fragment_program */
+
+/* --------------------- GL_ARB_fragment_program_shadow -------------------- */
+
+#ifndef GL_ARB_fragment_program_shadow
+#define GL_ARB_fragment_program_shadow 1
+
+#define GLEW_ARB_fragment_program_shadow GLEW_GET_VAR(__GLEW_ARB_fragment_program_shadow)
+
+#endif /* GL_ARB_fragment_program_shadow */
+
+/* ------------------------- GL_ARB_fragment_shader ------------------------ */
+
+#ifndef GL_ARB_fragment_shader
+#define GL_ARB_fragment_shader 1
+
+#define GL_FRAGMENT_SHADER_ARB 0x8B30
+#define GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB 0x8B49
+#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT_ARB 0x8B8B
+
+#define GLEW_ARB_fragment_shader GLEW_GET_VAR(__GLEW_ARB_fragment_shader)
+
+#endif /* GL_ARB_fragment_shader */
+
+/* ------------------- GL_ARB_framebuffer_no_attachments ------------------- */
+
+#ifndef GL_ARB_framebuffer_no_attachments
+#define GL_ARB_framebuffer_no_attachments 1
+
+#define GL_FRAMEBUFFER_DEFAULT_WIDTH 0x9310
+#define GL_FRAMEBUFFER_DEFAULT_HEIGHT 0x9311
+#define GL_FRAMEBUFFER_DEFAULT_LAYERS 0x9312
+#define GL_FRAMEBUFFER_DEFAULT_SAMPLES 0x9313
+#define GL_FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONS 0x9314
+#define GL_MAX_FRAMEBUFFER_WIDTH 0x9315
+#define GL_MAX_FRAMEBUFFER_HEIGHT 0x9316
+#define GL_MAX_FRAMEBUFFER_LAYERS 0x9317
+#define GL_MAX_FRAMEBUFFER_SAMPLES 0x9318
+
+typedef void (GLAPIENTRY * PFNGLFRAMEBUFFERPARAMETERIPROC) (GLenum target, GLenum pname, GLint param);
+typedef void (GLAPIENTRY * PFNGLGETFRAMEBUFFERPARAMETERIVPROC) (GLenum target, GLenum pname, GLint* params);
+typedef void (GLAPIENTRY * PFNGLGETNAMEDFRAMEBUFFERPARAMETERIVEXTPROC) (GLuint framebuffer, GLenum pname, GLint* params);
+typedef void (GLAPIENTRY * PFNGLNAMEDFRAMEBUFFERPARAMETERIEXTPROC) (GLuint framebuffer, GLenum pname, GLint param);
+
+#define glFramebufferParameteri GLEW_GET_FUN(__glewFramebufferParameteri)
+#define glGetFramebufferParameteriv GLEW_GET_FUN(__glewGetFramebufferParameteriv)
+#define glGetNamedFramebufferParameterivEXT GLEW_GET_FUN(__glewGetNamedFramebufferParameterivEXT)
+#define glNamedFramebufferParameteriEXT GLEW_GET_FUN(__glewNamedFramebufferParameteriEXT)
+
+#define GLEW_ARB_framebuffer_no_attachments GLEW_GET_VAR(__GLEW_ARB_framebuffer_no_attachments)
+
+#endif /* GL_ARB_framebuffer_no_attachments */
+
+/* ----------------------- GL_ARB_framebuffer_object ----------------------- */
+
+#ifndef GL_ARB_framebuffer_object
+#define GL_ARB_framebuffer_object 1
+
+#define GL_INVALID_FRAMEBUFFER_OPERATION 0x0506
+#define GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING 0x8210
+#define GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE 0x8211
+#define GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE 0x8212
+#define GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE 0x8213
+#define GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE 0x8214
+#define GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE 0x8215
+#define GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE 0x8216
+#define GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE 0x8217
+#define GL_FRAMEBUFFER_DEFAULT 0x8218
+#define GL_FRAMEBUFFER_UNDEFINED 0x8219
+#define GL_DEPTH_STENCIL_ATTACHMENT 0x821A
+#define GL_INDEX 0x8222
+#define GL_MAX_RENDERBUFFER_SIZE 0x84E8
+#define GL_DEPTH_STENCIL 0x84F9
+#define GL_UNSIGNED_INT_24_8 0x84FA
+#define GL_DEPTH24_STENCIL8 0x88F0
+#define GL_TEXTURE_STENCIL_SIZE 0x88F1
+#define GL_UNSIGNED_NORMALIZED 0x8C17
+#define GL_SRGB 0x8C40
+#define GL_DRAW_FRAMEBUFFER_BINDING 0x8CA6
+#define GL_FRAMEBUFFER_BINDING 0x8CA6
+#define GL_RENDERBUFFER_BINDING 0x8CA7
+#define GL_READ_FRAMEBUFFER 0x8CA8
+#define GL_DRAW_FRAMEBUFFER 0x8CA9
+#define GL_READ_FRAMEBUFFER_BINDING 0x8CAA
+#define GL_RENDERBUFFER_SAMPLES 0x8CAB
+#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE 0x8CD0
+#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME 0x8CD1
+#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL 0x8CD2
+#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE 0x8CD3
+#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER 0x8CD4
+#define GL_FRAMEBUFFER_COMPLETE 0x8CD5
+#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT 0x8CD6
+#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT 0x8CD7
+#define GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER 0x8CDB
+#define GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER 0x8CDC
+#define GL_FRAMEBUFFER_UNSUPPORTED 0x8CDD
+#define GL_MAX_COLOR_ATTACHMENTS 0x8CDF
+#define GL_COLOR_ATTACHMENT0 0x8CE0
+#define GL_COLOR_ATTACHMENT1 0x8CE1
+#define GL_COLOR_ATTACHMENT2 0x8CE2
+#define GL_COLOR_ATTACHMENT3 0x8CE3
+#define GL_COLOR_ATTACHMENT4 0x8CE4
+#define GL_COLOR_ATTACHMENT5 0x8CE5
+#define GL_COLOR_ATTACHMENT6 0x8CE6
+#define GL_COLOR_ATTACHMENT7 0x8CE7
+#define GL_COLOR_ATTACHMENT8 0x8CE8
+#define GL_COLOR_ATTACHMENT9 0x8CE9
+#define GL_COLOR_ATTACHMENT10 0x8CEA
+#define GL_COLOR_ATTACHMENT11 0x8CEB
+#define GL_COLOR_ATTACHMENT12 0x8CEC
+#define GL_COLOR_ATTACHMENT13 0x8CED
+#define GL_COLOR_ATTACHMENT14 0x8CEE
+#define GL_COLOR_ATTACHMENT15 0x8CEF
+#define GL_DEPTH_ATTACHMENT 0x8D00
+#define GL_STENCIL_ATTACHMENT 0x8D20
+#define GL_FRAMEBUFFER 0x8D40
+#define GL_RENDERBUFFER 0x8D41
+#define GL_RENDERBUFFER_WIDTH 0x8D42
+#define GL_RENDERBUFFER_HEIGHT 0x8D43
+#define GL_RENDERBUFFER_INTERNAL_FORMAT 0x8D44
+#define GL_STENCIL_INDEX1 0x8D46
+#define GL_STENCIL_INDEX4 0x8D47
+#define GL_STENCIL_INDEX8 0x8D48
+#define GL_STENCIL_INDEX16 0x8D49
+#define GL_RENDERBUFFER_RED_SIZE 0x8D50
+#define GL_RENDERBUFFER_GREEN_SIZE 0x8D51
+#define GL_RENDERBUFFER_BLUE_SIZE 0x8D52
+#define GL_RENDERBUFFER_ALPHA_SIZE 0x8D53
+#define GL_RENDERBUFFER_DEPTH_SIZE 0x8D54
+#define GL_RENDERBUFFER_STENCIL_SIZE 0x8D55
+#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE 0x8D56
+#define GL_MAX_SAMPLES 0x8D57
+
+typedef void (GLAPIENTRY * PFNGLBINDFRAMEBUFFERPROC) (GLenum target, GLuint framebuffer);
+typedef void (GLAPIENTRY * PFNGLBINDRENDERBUFFERPROC) (GLenum target, GLuint renderbuffer);
+typedef void (GLAPIENTRY * PFNGLBLITFRAMEBUFFERPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
+typedef GLenum (GLAPIENTRY * PFNGLCHECKFRAMEBUFFERSTATUSPROC) (GLenum target);
+typedef void (GLAPIENTRY * PFNGLDELETEFRAMEBUFFERSPROC) (GLsizei n, const GLuint* framebuffers);
+typedef void (GLAPIENTRY * PFNGLDELETERENDERBUFFERSPROC) (GLsizei n, const GLuint* renderbuffers);
+typedef void (GLAPIENTRY * PFNGLFRAMEBUFFERRENDERBUFFERPROC) (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
+typedef void (GLAPIENTRY * PFNGLFRAMEBUFFERTEXTURE1DPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
+typedef void (GLAPIENTRY * PFNGLFRAMEBUFFERTEXTURE2DPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
+typedef void (GLAPIENTRY * PFNGLFRAMEBUFFERTEXTURE3DPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint layer);
+typedef void (GLAPIENTRY * PFNGLFRAMEBUFFERTEXTURELAYERPROC) (GLenum target,GLenum attachment, GLuint texture,GLint level,GLint layer);
+typedef void (GLAPIENTRY * PFNGLGENFRAMEBUFFERSPROC) (GLsizei n, GLuint* framebuffers);
+typedef void (GLAPIENTRY * PFNGLGENRENDERBUFFERSPROC) (GLsizei n, GLuint* renderbuffers);
+typedef void (GLAPIENTRY * PFNGLGENERATEMIPMAPPROC) (GLenum target);
+typedef void (GLAPIENTRY * PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC) (GLenum target, GLenum attachment, GLenum pname, GLint* params);
+typedef void (GLAPIENTRY * PFNGLGETRENDERBUFFERPARAMETERIVPROC) (GLenum target, GLenum pname, GLint* params);
+typedef GLboolean (GLAPIENTRY * PFNGLISFRAMEBUFFERPROC) (GLuint framebuffer);
+typedef GLboolean (GLAPIENTRY * PFNGLISRENDERBUFFERPROC) (GLuint renderbuffer);
+typedef void (GLAPIENTRY * PFNGLRENDERBUFFERSTORAGEPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
+typedef void (GLAPIENTRY * PFNGLRENDERBUFFERSTORAGEMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
+
+#define glBindFramebuffer GLEW_GET_FUN(__glewBindFramebuffer)
+#define glBindRenderbuffer GLEW_GET_FUN(__glewBindRenderbuffer)
+#define glBlitFramebuffer GLEW_GET_FUN(__glewBlitFramebuffer)
+#define glCheckFramebufferStatus GLEW_GET_FUN(__glewCheckFramebufferStatus)
+#define glDeleteFramebuffers GLEW_GET_FUN(__glewDeleteFramebuffers)
+#define glDeleteRenderbuffers GLEW_GET_FUN(__glewDeleteRenderbuffers)
+#define glFramebufferRenderbuffer GLEW_GET_FUN(__glewFramebufferRenderbuffer)
+#define glFramebufferTexture1D GLEW_GET_FUN(__glewFramebufferTexture1D)
+#define glFramebufferTexture2D GLEW_GET_FUN(__glewFramebufferTexture2D)
+#define glFramebufferTexture3D GLEW_GET_FUN(__glewFramebufferTexture3D)
+#define glFramebufferTextureLayer GLEW_GET_FUN(__glewFramebufferTextureLayer)
+#define glGenFramebuffers GLEW_GET_FUN(__glewGenFramebuffers)
+#define glGenRenderbuffers GLEW_GET_FUN(__glewGenRenderbuffers)
+#define glGenerateMipmap GLEW_GET_FUN(__glewGenerateMipmap)
+#define glGetFramebufferAttachmentParameteriv GLEW_GET_FUN(__glewGetFramebufferAttachmentParameteriv)
+#define glGetRenderbufferParameteriv GLEW_GET_FUN(__glewGetRenderbufferParameteriv)
+#define glIsFramebuffer GLEW_GET_FUN(__glewIsFramebuffer)
+#define glIsRenderbuffer GLEW_GET_FUN(__glewIsRenderbuffer)
+#define glRenderbufferStorage GLEW_GET_FUN(__glewRenderbufferStorage)
+#define glRenderbufferStorageMultisample GLEW_GET_FUN(__glewRenderbufferStorageMultisample)
+
+#define GLEW_ARB_framebuffer_object GLEW_GET_VAR(__GLEW_ARB_framebuffer_object)
+
+#endif /* GL_ARB_framebuffer_object */
+
+/* ------------------------ GL_ARB_framebuffer_sRGB ------------------------ */
+
+#ifndef GL_ARB_framebuffer_sRGB
+#define GL_ARB_framebuffer_sRGB 1
+
+#define GL_FRAMEBUFFER_SRGB 0x8DB9
+
+#define GLEW_ARB_framebuffer_sRGB GLEW_GET_VAR(__GLEW_ARB_framebuffer_sRGB)
+
+#endif /* GL_ARB_framebuffer_sRGB */
+
+/* ------------------------ GL_ARB_geometry_shader4 ------------------------ */
+
+#ifndef GL_ARB_geometry_shader4
+#define GL_ARB_geometry_shader4 1
+
+#define GL_LINES_ADJACENCY_ARB 0xA
+#define GL_LINE_STRIP_ADJACENCY_ARB 0xB
+#define GL_TRIANGLES_ADJACENCY_ARB 0xC
+#define GL_TRIANGLE_STRIP_ADJACENCY_ARB 0xD
+#define GL_PROGRAM_POINT_SIZE_ARB 0x8642
+#define GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_ARB 0x8C29
+#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER 0x8CD4
+#define GL_FRAMEBUFFER_ATTACHMENT_LAYERED_ARB 0x8DA7
+#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_ARB 0x8DA8
+#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_ARB 0x8DA9
+#define GL_GEOMETRY_SHADER_ARB 0x8DD9
+#define GL_GEOMETRY_VERTICES_OUT_ARB 0x8DDA
+#define GL_GEOMETRY_INPUT_TYPE_ARB 0x8DDB
+#define GL_GEOMETRY_OUTPUT_TYPE_ARB 0x8DDC
+#define GL_MAX_GEOMETRY_VARYING_COMPONENTS_ARB 0x8DDD
+#define GL_MAX_VERTEX_VARYING_COMPONENTS_ARB 0x8DDE
+#define GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_ARB 0x8DDF
+#define GL_MAX_GEOMETRY_OUTPUT_VERTICES_ARB 0x8DE0
+#define GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_ARB 0x8DE1
+
+typedef void (GLAPIENTRY * PFNGLFRAMEBUFFERTEXTUREARBPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level);
+typedef void (GLAPIENTRY * PFNGLFRAMEBUFFERTEXTUREFACEARBPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face);
+typedef void (GLAPIENTRY * PFNGLFRAMEBUFFERTEXTURELAYERARBPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer);
+typedef void (GLAPIENTRY * PFNGLPROGRAMPARAMETERIARBPROC) (GLuint program, GLenum pname, GLint value);
+
+#define glFramebufferTextureARB GLEW_GET_FUN(__glewFramebufferTextureARB)
+#define glFramebufferTextureFaceARB GLEW_GET_FUN(__glewFramebufferTextureFaceARB)
+#define glFramebufferTextureLayerARB GLEW_GET_FUN(__glewFramebufferTextureLayerARB)
+#define glProgramParameteriARB GLEW_GET_FUN(__glewProgramParameteriARB)
+
+#define GLEW_ARB_geometry_shader4 GLEW_GET_VAR(__GLEW_ARB_geometry_shader4)
+
+#endif /* GL_ARB_geometry_shader4 */
+
+/* ----------------------- GL_ARB_get_program_binary ----------------------- */
+
+#ifndef GL_ARB_get_program_binary
+#define GL_ARB_get_program_binary 1
+
+#define GL_PROGRAM_BINARY_RETRIEVABLE_HINT 0x8257
+#define GL_PROGRAM_BINARY_LENGTH 0x8741
+#define GL_NUM_PROGRAM_BINARY_FORMATS 0x87FE
+#define GL_PROGRAM_BINARY_FORMATS 0x87FF
+
+typedef void (GLAPIENTRY * PFNGLGETPROGRAMBINARYPROC) (GLuint program, GLsizei bufSize, GLsizei* length, GLenum *binaryFormat, void*binary);
+typedef void (GLAPIENTRY * PFNGLPROGRAMBINARYPROC) (GLuint program, GLenum binaryFormat, const void *binary, GLsizei length);
+typedef void (GLAPIENTRY * PFNGLPROGRAMPARAMETERIPROC) (GLuint program, GLenum pname, GLint value);
+
+#define glGetProgramBinary GLEW_GET_FUN(__glewGetProgramBinary)
+#define glProgramBinary GLEW_GET_FUN(__glewProgramBinary)
+#define glProgramParameteri GLEW_GET_FUN(__glewProgramParameteri)
+
+#define GLEW_ARB_get_program_binary GLEW_GET_VAR(__GLEW_ARB_get_program_binary)
+
+#endif /* GL_ARB_get_program_binary */
+
+/* ---------------------- GL_ARB_get_texture_sub_image --------------------- */
+
+#ifndef GL_ARB_get_texture_sub_image
+#define GL_ARB_get_texture_sub_image 1
+
+typedef void (GLAPIENTRY * PFNGLGETCOMPRESSEDTEXTURESUBIMAGEPROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLsizei bufSize, void *pixels);
+typedef void (GLAPIENTRY * PFNGLGETTEXTURESUBIMAGEPROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLsizei bufSize, void *pixels);
+
+#define glGetCompressedTextureSubImage GLEW_GET_FUN(__glewGetCompressedTextureSubImage)
+#define glGetTextureSubImage GLEW_GET_FUN(__glewGetTextureSubImage)
+
+#define GLEW_ARB_get_texture_sub_image GLEW_GET_VAR(__GLEW_ARB_get_texture_sub_image)
+
+#endif /* GL_ARB_get_texture_sub_image */
+
+/* --------------------------- GL_ARB_gpu_shader5 -------------------------- */
+
+#ifndef GL_ARB_gpu_shader5
+#define GL_ARB_gpu_shader5 1
+
+#define GL_GEOMETRY_SHADER_INVOCATIONS 0x887F
+#define GL_MAX_GEOMETRY_SHADER_INVOCATIONS 0x8E5A
+#define GL_MIN_FRAGMENT_INTERPOLATION_OFFSET 0x8E5B
+#define GL_MAX_FRAGMENT_INTERPOLATION_OFFSET 0x8E5C
+#define GL_FRAGMENT_INTERPOLATION_OFFSET_BITS 0x8E5D
+#define GL_MAX_VERTEX_STREAMS 0x8E71
+
+#define GLEW_ARB_gpu_shader5 GLEW_GET_VAR(__GLEW_ARB_gpu_shader5)
+
+#endif /* GL_ARB_gpu_shader5 */
+
+/* ------------------------- GL_ARB_gpu_shader_fp64 ------------------------ */
+
+#ifndef GL_ARB_gpu_shader_fp64
+#define GL_ARB_gpu_shader_fp64 1
+
+#define GL_DOUBLE_MAT2 0x8F46
+#define GL_DOUBLE_MAT3 0x8F47
+#define GL_DOUBLE_MAT4 0x8F48
+#define GL_DOUBLE_MAT2x3 0x8F49
+#define GL_DOUBLE_MAT2x4 0x8F4A
+#define GL_DOUBLE_MAT3x2 0x8F4B
+#define GL_DOUBLE_MAT3x4 0x8F4C
+#define GL_DOUBLE_MAT4x2 0x8F4D
+#define GL_DOUBLE_MAT4x3 0x8F4E
+#define GL_DOUBLE_VEC2 0x8FFC
+#define GL_DOUBLE_VEC3 0x8FFD
+#define GL_DOUBLE_VEC4 0x8FFE
+
+typedef void (GLAPIENTRY * PFNGLGETUNIFORMDVPROC) (GLuint program, GLint location, GLdouble* params);
+typedef void (GLAPIENTRY * PFNGLUNIFORM1DPROC) (GLint location, GLdouble x);
+typedef void (GLAPIENTRY * PFNGLUNIFORM1DVPROC) (GLint location, GLsizei count, const GLdouble* value);
+typedef void (GLAPIENTRY * PFNGLUNIFORM2DPROC) (GLint location, GLdouble x, GLdouble y);
+typedef void (GLAPIENTRY * PFNGLUNIFORM2DVPROC) (GLint location, GLsizei count, const GLdouble* value);
+typedef void (GLAPIENTRY * PFNGLUNIFORM3DPROC) (GLint location, GLdouble x, GLdouble y, GLdouble z);
+typedef void (GLAPIENTRY * PFNGLUNIFORM3DVPROC) (GLint location, GLsizei count, const GLdouble* value);
+typedef void (GLAPIENTRY * PFNGLUNIFORM4DPROC) (GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
+typedef void (GLAPIENTRY * PFNGLUNIFORM4DVPROC) (GLint location, GLsizei count, const GLdouble* value);
+typedef void (GLAPIENTRY * PFNGLUNIFORMMATRIX2DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble* value);
+typedef void (GLAPIENTRY * PFNGLUNIFORMMATRIX2X3DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble* value);
+typedef void (GLAPIENTRY * PFNGLUNIFORMMATRIX2X4DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble* value);
+typedef void (GLAPIENTRY * PFNGLUNIFORMMATRIX3DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble* value);
+typedef void (GLAPIENTRY * PFNGLUNIFORMMATRIX3X2DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble* value);
+typedef void (GLAPIENTRY * PFNGLUNIFORMMATRIX3X4DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble* value);
+typedef void (GLAPIENTRY * PFNGLUNIFORMMATRIX4DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble* value);
+typedef void (GLAPIENTRY * PFNGLUNIFORMMATRIX4X2DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble* value);
+typedef void (GLAPIENTRY * PFNGLUNIFORMMATRIX4X3DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble* value);
+
+#define glGetUniformdv GLEW_GET_FUN(__glewGetUniformdv)
+#define glUniform1d GLEW_GET_FUN(__glewUniform1d)
+#define glUniform1dv GLEW_GET_FUN(__glewUniform1dv)
+#define glUniform2d GLEW_GET_FUN(__glewUniform2d)
+#define glUniform2dv GLEW_GET_FUN(__glewUniform2dv)
+#define glUniform3d GLEW_GET_FUN(__glewUniform3d)
+#define glUniform3dv GLEW_GET_FUN(__glewUniform3dv)
+#define glUniform4d GLEW_GET_FUN(__glewUniform4d)
+#define glUniform4dv GLEW_GET_FUN(__glewUniform4dv)
+#define glUniformMatrix2dv GLEW_GET_FUN(__glewUniformMatrix2dv)
+#define glUniformMatrix2x3dv GLEW_GET_FUN(__glewUniformMatrix2x3dv)
+#define glUniformMatrix2x4dv GLEW_GET_FUN(__glewUniformMatrix2x4dv)
+#define glUniformMatrix3dv GLEW_GET_FUN(__glewUniformMatrix3dv)
+#define glUniformMatrix3x2dv GLEW_GET_FUN(__glewUniformMatrix3x2dv)
+#define glUniformMatrix3x4dv GLEW_GET_FUN(__glewUniformMatrix3x4dv)
+#define glUniformMatrix4dv GLEW_GET_FUN(__glewUniformMatrix4dv)
+#define glUniformMatrix4x2dv GLEW_GET_FUN(__glewUniformMatrix4x2dv)
+#define glUniformMatrix4x3dv GLEW_GET_FUN(__glewUniformMatrix4x3dv)
+
+#define GLEW_ARB_gpu_shader_fp64 GLEW_GET_VAR(__GLEW_ARB_gpu_shader_fp64)
+
+#endif /* GL_ARB_gpu_shader_fp64 */
+
+/* ------------------------ GL_ARB_half_float_pixel ------------------------ */
+
+#ifndef GL_ARB_half_float_pixel
+#define GL_ARB_half_float_pixel 1
+
+#define GL_HALF_FLOAT_ARB 0x140B
+
+#define GLEW_ARB_half_float_pixel GLEW_GET_VAR(__GLEW_ARB_half_float_pixel)
+
+#endif /* GL_ARB_half_float_pixel */
+
+/* ------------------------ GL_ARB_half_float_vertex ----------------------- */
+
+#ifndef GL_ARB_half_float_vertex
+#define GL_ARB_half_float_vertex 1
+
+#define GL_HALF_FLOAT 0x140B
+
+#define GLEW_ARB_half_float_vertex GLEW_GET_VAR(__GLEW_ARB_half_float_vertex)
+
+#endif /* GL_ARB_half_float_vertex */
+
+/* ----------------------------- GL_ARB_imaging ---------------------------- */
+
+#ifndef GL_ARB_imaging
+#define GL_ARB_imaging 1
+
+#define GL_CONSTANT_COLOR 0x8001
+#define GL_ONE_MINUS_CONSTANT_COLOR 0x8002
+#define GL_CONSTANT_ALPHA 0x8003
+#define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004
+#define GL_BLEND_COLOR 0x8005
+#define GL_FUNC_ADD 0x8006
+#define GL_MIN 0x8007
+#define GL_MAX 0x8008
+#define GL_BLEND_EQUATION 0x8009
+#define GL_FUNC_SUBTRACT 0x800A
+#define GL_FUNC_REVERSE_SUBTRACT 0x800B
+#define GL_CONVOLUTION_1D 0x8010
+#define GL_CONVOLUTION_2D 0x8011
+#define GL_SEPARABLE_2D 0x8012
+#define GL_CONVOLUTION_BORDER_MODE 0x8013
+#define GL_CONVOLUTION_FILTER_SCALE 0x8014
+#define GL_CONVOLUTION_FILTER_BIAS 0x8015
+#define GL_REDUCE 0x8016
+#define GL_CONVOLUTION_FORMAT 0x8017
+#define GL_CONVOLUTION_WIDTH 0x8018
+#define GL_CONVOLUTION_HEIGHT 0x8019
+#define GL_MAX_CONVOLUTION_WIDTH 0x801A
+#define GL_MAX_CONVOLUTION_HEIGHT 0x801B
+#define GL_POST_CONVOLUTION_RED_SCALE 0x801C
+#define GL_POST_CONVOLUTION_GREEN_SCALE 0x801D
+#define GL_POST_CONVOLUTION_BLUE_SCALE 0x801E
+#define GL_POST_CONVOLUTION_ALPHA_SCALE 0x801F
+#define GL_POST_CONVOLUTION_RED_BIAS 0x8020
+#define GL_POST_CONVOLUTION_GREEN_BIAS 0x8021
+#define GL_POST_CONVOLUTION_BLUE_BIAS 0x8022
+#define GL_POST_CONVOLUTION_ALPHA_BIAS 0x8023
+#define GL_HISTOGRAM 0x8024
+#define GL_PROXY_HISTOGRAM 0x8025
+#define GL_HISTOGRAM_WIDTH 0x8026
+#define GL_HISTOGRAM_FORMAT 0x8027
+#define GL_HISTOGRAM_RED_SIZE 0x8028
+#define GL_HISTOGRAM_GREEN_SIZE 0x8029
+#define GL_HISTOGRAM_BLUE_SIZE 0x802A
+#define GL_HISTOGRAM_ALPHA_SIZE 0x802B
+#define GL_HISTOGRAM_LUMINANCE_SIZE 0x802C
+#define GL_HISTOGRAM_SINK 0x802D
+#define GL_MINMAX 0x802E
+#define GL_MINMAX_FORMAT 0x802F
+#define GL_MINMAX_SINK 0x8030
+#define GL_TABLE_TOO_LARGE 0x8031
+#define GL_COLOR_MATRIX 0x80B1
+#define GL_COLOR_MATRIX_STACK_DEPTH 0x80B2
+#define GL_MAX_COLOR_MATRIX_STACK_DEPTH 0x80B3
+#define GL_POST_COLOR_MATRIX_RED_SCALE 0x80B4
+#define GL_POST_COLOR_MATRIX_GREEN_SCALE 0x80B5
+#define GL_POST_COLOR_MATRIX_BLUE_SCALE 0x80B6
+#define GL_POST_COLOR_MATRIX_ALPHA_SCALE 0x80B7
+#define GL_POST_COLOR_MATRIX_RED_BIAS 0x80B8
+#define GL_POST_COLOR_MATRIX_GREEN_BIAS 0x80B9
+#define GL_POST_COLOR_MATRIX_BLUE_BIAS 0x80BA
+#define GL_POST_COLOR_MATRIX_ALPHA_BIAS 0x80BB
+#define GL_COLOR_TABLE 0x80D0
+#define GL_POST_CONVOLUTION_COLOR_TABLE 0x80D1
+#define GL_POST_COLOR_MATRIX_COLOR_TABLE 0x80D2
+#define GL_PROXY_COLOR_TABLE 0x80D3
+#define GL_PROXY_POST_CONVOLUTION_COLOR_TABLE 0x80D4
+#define GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE 0x80D5
+#define GL_COLOR_TABLE_SCALE 0x80D6
+#define GL_COLOR_TABLE_BIAS 0x80D7
+#define GL_COLOR_TABLE_FORMAT 0x80D8
+#define GL_COLOR_TABLE_WIDTH 0x80D9
+#define GL_COLOR_TABLE_RED_SIZE 0x80DA
+#define GL_COLOR_TABLE_GREEN_SIZE 0x80DB
+#define GL_COLOR_TABLE_BLUE_SIZE 0x80DC
+#define GL_COLOR_TABLE_ALPHA_SIZE 0x80DD
+#define GL_COLOR_TABLE_LUMINANCE_SIZE 0x80DE
+#define GL_COLOR_TABLE_INTENSITY_SIZE 0x80DF
+#define GL_IGNORE_BORDER 0x8150
+#define GL_CONSTANT_BORDER 0x8151
+#define GL_WRAP_BORDER 0x8152
+#define GL_REPLICATE_BORDER 0x8153
+#define GL_CONVOLUTION_BORDER_COLOR 0x8154
+
+typedef void (GLAPIENTRY * PFNGLCOLORSUBTABLEPROC) (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const void *data);
+typedef void (GLAPIENTRY * PFNGLCOLORTABLEPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const void *table);
+typedef void (GLAPIENTRY * PFNGLCOLORTABLEPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params);
+typedef void (GLAPIENTRY * PFNGLCOLORTABLEPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params);
+typedef void (GLAPIENTRY * PFNGLCONVOLUTIONFILTER1DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const void *image);
+typedef void (GLAPIENTRY * PFNGLCONVOLUTIONFILTER2DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *image);
+typedef void (GLAPIENTRY * PFNGLCONVOLUTIONPARAMETERFPROC) (GLenum target, GLenum pname, GLfloat params);
+typedef void (GLAPIENTRY * PFNGLCONVOLUTIONPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params);
+typedef void (GLAPIENTRY * PFNGLCONVOLUTIONPARAMETERIPROC) (GLenum target, GLenum pname, GLint params);
+typedef void (GLAPIENTRY * PFNGLCONVOLUTIONPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params);
+typedef void (GLAPIENTRY * PFNGLCOPYCOLORSUBTABLEPROC) (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width);
+typedef void (GLAPIENTRY * PFNGLCOPYCOLORTABLEPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
+typedef void (GLAPIENTRY * PFNGLCOPYCONVOLUTIONFILTER1DPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
+typedef void (GLAPIENTRY * PFNGLCOPYCONVOLUTIONFILTER2DPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height);
+typedef void (GLAPIENTRY * PFNGLGETCOLORTABLEPROC) (GLenum target, GLenum format, GLenum type, void *table);
+typedef void (GLAPIENTRY * PFNGLGETCOLORTABLEPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
+typedef void (GLAPIENTRY * PFNGLGETCOLORTABLEPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
+typedef void (GLAPIENTRY * PFNGLGETCONVOLUTIONFILTERPROC) (GLenum target, GLenum format, GLenum type, void *image);
+typedef void (GLAPIENTRY * PFNGLGETCONVOLUTIONPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
+typedef void (GLAPIENTRY * PFNGLGETCONVOLUTIONPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
+typedef void (GLAPIENTRY * PFNGLGETHISTOGRAMPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, void *values);
+typedef void (GLAPIENTRY * PFNGLGETHISTOGRAMPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
+typedef void (GLAPIENTRY * PFNGLGETHISTOGRAMPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
+typedef void (GLAPIENTRY * PFNGLGETMINMAXPROC) (GLenum target, GLboolean reset, GLenum format, GLenum types, void *values);
+typedef void (GLAPIENTRY * PFNGLGETMINMAXPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
+typedef void (GLAPIENTRY * PFNGLGETMINMAXPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
+typedef void (GLAPIENTRY * PFNGLGETSEPARABLEFILTERPROC) (GLenum target, GLenum format, GLenum type, void *row, void *column, void *span);
+typedef void (GLAPIENTRY * PFNGLHISTOGRAMPROC) (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink);
+typedef void (GLAPIENTRY * PFNGLMINMAXPROC) (GLenum target, GLenum internalformat, GLboolean sink);
+typedef void (GLAPIENTRY * PFNGLRESETHISTOGRAMPROC) (GLenum target);
+typedef void (GLAPIENTRY * PFNGLRESETMINMAXPROC) (GLenum target);
+typedef void (GLAPIENTRY * PFNGLSEPARABLEFILTER2DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *row, const void *column);
+
+#define glColorSubTable GLEW_GET_FUN(__glewColorSubTable)
+#define glColorTable GLEW_GET_FUN(__glewColorTable)
+#define glColorTableParameterfv GLEW_GET_FUN(__glewColorTableParameterfv)
+#define glColorTableParameteriv GLEW_GET_FUN(__glewColorTableParameteriv)
+#define glConvolutionFilter1D GLEW_GET_FUN(__glewConvolutionFilter1D)
+#define glConvolutionFilter2D GLEW_GET_FUN(__glewConvolutionFilter2D)
+#define glConvolutionParameterf GLEW_GET_FUN(__glewConvolutionParameterf)
+#define glConvolutionParameterfv GLEW_GET_FUN(__glewConvolutionParameterfv)
+#define glConvolutionParameteri GLEW_GET_FUN(__glewConvolutionParameteri)
+#define glConvolutionParameteriv GLEW_GET_FUN(__glewConvolutionParameteriv)
+#define glCopyColorSubTable GLEW_GET_FUN(__glewCopyColorSubTable)
+#define glCopyColorTable GLEW_GET_FUN(__glewCopyColorTable)
+#define glCopyConvolutionFilter1D GLEW_GET_FUN(__glewCopyConvolutionFilter1D)
+#define glCopyConvolutionFilter2D GLEW_GET_FUN(__glewCopyConvolutionFilter2D)
+#define glGetColorTable GLEW_GET_FUN(__glewGetColorTable)
+#define glGetColorTableParameterfv GLEW_GET_FUN(__glewGetColorTableParameterfv)
+#define glGetColorTableParameteriv GLEW_GET_FUN(__glewGetColorTableParameteriv)
+#define glGetConvolutionFilter GLEW_GET_FUN(__glewGetConvolutionFilter)
+#define glGetConvolutionParameterfv GLEW_GET_FUN(__glewGetConvolutionParameterfv)
+#define glGetConvolutionParameteriv GLEW_GET_FUN(__glewGetConvolutionParameteriv)
+#define glGetHistogram GLEW_GET_FUN(__glewGetHistogram)
+#define glGetHistogramParameterfv GLEW_GET_FUN(__glewGetHistogramParameterfv)
+#define glGetHistogramParameteriv GLEW_GET_FUN(__glewGetHistogramParameteriv)
+#define glGetMinmax GLEW_GET_FUN(__glewGetMinmax)
+#define glGetMinmaxParameterfv GLEW_GET_FUN(__glewGetMinmaxParameterfv)
+#define glGetMinmaxParameteriv GLEW_GET_FUN(__glewGetMinmaxParameteriv)
+#define glGetSeparableFilter GLEW_GET_FUN(__glewGetSeparableFilter)
+#define glHistogram GLEW_GET_FUN(__glewHistogram)
+#define glMinmax GLEW_GET_FUN(__glewMinmax)
+#define glResetHistogram GLEW_GET_FUN(__glewResetHistogram)
+#define glResetMinmax GLEW_GET_FUN(__glewResetMinmax)
+#define glSeparableFilter2D GLEW_GET_FUN(__glewSeparableFilter2D)
+
+#define GLEW_ARB_imaging GLEW_GET_VAR(__GLEW_ARB_imaging)
+
+#endif /* GL_ARB_imaging */
+
+/* ----------------------- GL_ARB_indirect_parameters ---------------------- */
+
+#ifndef GL_ARB_indirect_parameters
+#define GL_ARB_indirect_parameters 1
+
+#define GL_PARAMETER_BUFFER_ARB 0x80EE
+#define GL_PARAMETER_BUFFER_BINDING_ARB 0x80EF
+
+typedef void (GLAPIENTRY * PFNGLMULTIDRAWARRAYSINDIRECTCOUNTARBPROC) (GLenum mode, const void *indirect, GLintptr drawcount, GLsizei maxdrawcount, GLsizei stride);
+typedef void (GLAPIENTRY * PFNGLMULTIDRAWELEMENTSINDIRECTCOUNTARBPROC) (GLenum mode, GLenum type, const void *indirect, GLintptr drawcount, GLsizei maxdrawcount, GLsizei stride);
+
+#define glMultiDrawArraysIndirectCountARB GLEW_GET_FUN(__glewMultiDrawArraysIndirectCountARB)
+#define glMultiDrawElementsIndirectCountARB GLEW_GET_FUN(__glewMultiDrawElementsIndirectCountARB)
+
+#define GLEW_ARB_indirect_parameters GLEW_GET_VAR(__GLEW_ARB_indirect_parameters)
+
+#endif /* GL_ARB_indirect_parameters */
+
+/* ------------------------ GL_ARB_instanced_arrays ------------------------ */
+
+#ifndef GL_ARB_instanced_arrays
+#define GL_ARB_instanced_arrays 1
+
+#define GL_VERTEX_ATTRIB_ARRAY_DIVISOR_ARB 0x88FE
+
+typedef void (GLAPIENTRY * PFNGLDRAWARRAYSINSTANCEDARBPROC) (GLenum mode, GLint first, GLsizei count, GLsizei primcount);
+typedef void (GLAPIENTRY * PFNGLDRAWELEMENTSINSTANCEDARBPROC) (GLenum mode, GLsizei count, GLenum type, const void* indices, GLsizei primcount);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBDIVISORARBPROC) (GLuint index, GLuint divisor);
+
+#define glDrawArraysInstancedARB GLEW_GET_FUN(__glewDrawArraysInstancedARB)
+#define glDrawElementsInstancedARB GLEW_GET_FUN(__glewDrawElementsInstancedARB)
+#define glVertexAttribDivisorARB GLEW_GET_FUN(__glewVertexAttribDivisorARB)
+
+#define GLEW_ARB_instanced_arrays GLEW_GET_VAR(__GLEW_ARB_instanced_arrays)
+
+#endif /* GL_ARB_instanced_arrays */
+
+/* ---------------------- GL_ARB_internalformat_query ---------------------- */
+
+#ifndef GL_ARB_internalformat_query
+#define GL_ARB_internalformat_query 1
+
+#define GL_NUM_SAMPLE_COUNTS 0x9380
+
+typedef void (GLAPIENTRY * PFNGLGETINTERNALFORMATIVPROC) (GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint* params);
+
+#define glGetInternalformativ GLEW_GET_FUN(__glewGetInternalformativ)
+
+#define GLEW_ARB_internalformat_query GLEW_GET_VAR(__GLEW_ARB_internalformat_query)
+
+#endif /* GL_ARB_internalformat_query */
+
+/* ---------------------- GL_ARB_internalformat_query2 --------------------- */
+
+#ifndef GL_ARB_internalformat_query2
+#define GL_ARB_internalformat_query2 1
+
+#define GL_INTERNALFORMAT_SUPPORTED 0x826F
+#define GL_INTERNALFORMAT_PREFERRED 0x8270
+#define GL_INTERNALFORMAT_RED_SIZE 0x8271
+#define GL_INTERNALFORMAT_GREEN_SIZE 0x8272
+#define GL_INTERNALFORMAT_BLUE_SIZE 0x8273
+#define GL_INTERNALFORMAT_ALPHA_SIZE 0x8274
+#define GL_INTERNALFORMAT_DEPTH_SIZE 0x8275
+#define GL_INTERNALFORMAT_STENCIL_SIZE 0x8276
+#define GL_INTERNALFORMAT_SHARED_SIZE 0x8277
+#define GL_INTERNALFORMAT_RED_TYPE 0x8278
+#define GL_INTERNALFORMAT_GREEN_TYPE 0x8279
+#define GL_INTERNALFORMAT_BLUE_TYPE 0x827A
+#define GL_INTERNALFORMAT_ALPHA_TYPE 0x827B
+#define GL_INTERNALFORMAT_DEPTH_TYPE 0x827C
+#define GL_INTERNALFORMAT_STENCIL_TYPE 0x827D
+#define GL_MAX_WIDTH 0x827E
+#define GL_MAX_HEIGHT 0x827F
+#define GL_MAX_DEPTH 0x8280
+#define GL_MAX_LAYERS 0x8281
+#define GL_MAX_COMBINED_DIMENSIONS 0x8282
+#define GL_COLOR_COMPONENTS 0x8283
+#define GL_DEPTH_COMPONENTS 0x8284
+#define GL_STENCIL_COMPONENTS 0x8285
+#define GL_COLOR_RENDERABLE 0x8286
+#define GL_DEPTH_RENDERABLE 0x8287
+#define GL_STENCIL_RENDERABLE 0x8288
+#define GL_FRAMEBUFFER_RENDERABLE 0x8289
+#define GL_FRAMEBUFFER_RENDERABLE_LAYERED 0x828A
+#define GL_FRAMEBUFFER_BLEND 0x828B
+#define GL_READ_PIXELS 0x828C
+#define GL_READ_PIXELS_FORMAT 0x828D
+#define GL_READ_PIXELS_TYPE 0x828E
+#define GL_TEXTURE_IMAGE_FORMAT 0x828F
+#define GL_TEXTURE_IMAGE_TYPE 0x8290
+#define GL_GET_TEXTURE_IMAGE_FORMAT 0x8291
+#define GL_GET_TEXTURE_IMAGE_TYPE 0x8292
+#define GL_MIPMAP 0x8293
+#define GL_MANUAL_GENERATE_MIPMAP 0x8294
+#define GL_AUTO_GENERATE_MIPMAP 0x8295
+#define GL_COLOR_ENCODING 0x8296
+#define GL_SRGB_READ 0x8297
+#define GL_SRGB_WRITE 0x8298
+#define GL_SRGB_DECODE_ARB 0x8299
+#define GL_FILTER 0x829A
+#define GL_VERTEX_TEXTURE 0x829B
+#define GL_TESS_CONTROL_TEXTURE 0x829C
+#define GL_TESS_EVALUATION_TEXTURE 0x829D
+#define GL_GEOMETRY_TEXTURE 0x829E
+#define GL_FRAGMENT_TEXTURE 0x829F
+#define GL_COMPUTE_TEXTURE 0x82A0
+#define GL_TEXTURE_SHADOW 0x82A1
+#define GL_TEXTURE_GATHER 0x82A2
+#define GL_TEXTURE_GATHER_SHADOW 0x82A3
+#define GL_SHADER_IMAGE_LOAD 0x82A4
+#define GL_SHADER_IMAGE_STORE 0x82A5
+#define GL_SHADER_IMAGE_ATOMIC 0x82A6
+#define GL_IMAGE_TEXEL_SIZE 0x82A7
+#define GL_IMAGE_COMPATIBILITY_CLASS 0x82A8
+#define GL_IMAGE_PIXEL_FORMAT 0x82A9
+#define GL_IMAGE_PIXEL_TYPE 0x82AA
+#define GL_SIMULTANEOUS_TEXTURE_AND_DEPTH_TEST 0x82AC
+#define GL_SIMULTANEOUS_TEXTURE_AND_STENCIL_TEST 0x82AD
+#define GL_SIMULTANEOUS_TEXTURE_AND_DEPTH_WRITE 0x82AE
+#define GL_SIMULTANEOUS_TEXTURE_AND_STENCIL_WRITE 0x82AF
+#define GL_TEXTURE_COMPRESSED_BLOCK_WIDTH 0x82B1
+#define GL_TEXTURE_COMPRESSED_BLOCK_HEIGHT 0x82B2
+#define GL_TEXTURE_COMPRESSED_BLOCK_SIZE 0x82B3
+#define GL_CLEAR_BUFFER 0x82B4
+#define GL_TEXTURE_VIEW 0x82B5
+#define GL_VIEW_COMPATIBILITY_CLASS 0x82B6
+#define GL_FULL_SUPPORT 0x82B7
+#define GL_CAVEAT_SUPPORT 0x82B8
+#define GL_IMAGE_CLASS_4_X_32 0x82B9
+#define GL_IMAGE_CLASS_2_X_32 0x82BA
+#define GL_IMAGE_CLASS_1_X_32 0x82BB
+#define GL_IMAGE_CLASS_4_X_16 0x82BC
+#define GL_IMAGE_CLASS_2_X_16 0x82BD
+#define GL_IMAGE_CLASS_1_X_16 0x82BE
+#define GL_IMAGE_CLASS_4_X_8 0x82BF
+#define GL_IMAGE_CLASS_2_X_8 0x82C0
+#define GL_IMAGE_CLASS_1_X_8 0x82C1
+#define GL_IMAGE_CLASS_11_11_10 0x82C2
+#define GL_IMAGE_CLASS_10_10_10_2 0x82C3
+#define GL_VIEW_CLASS_128_BITS 0x82C4
+#define GL_VIEW_CLASS_96_BITS 0x82C5
+#define GL_VIEW_CLASS_64_BITS 0x82C6
+#define GL_VIEW_CLASS_48_BITS 0x82C7
+#define GL_VIEW_CLASS_32_BITS 0x82C8
+#define GL_VIEW_CLASS_24_BITS 0x82C9
+#define GL_VIEW_CLASS_16_BITS 0x82CA
+#define GL_VIEW_CLASS_8_BITS 0x82CB
+#define GL_VIEW_CLASS_S3TC_DXT1_RGB 0x82CC
+#define GL_VIEW_CLASS_S3TC_DXT1_RGBA 0x82CD
+#define GL_VIEW_CLASS_S3TC_DXT3_RGBA 0x82CE
+#define GL_VIEW_CLASS_S3TC_DXT5_RGBA 0x82CF
+#define GL_VIEW_CLASS_RGTC1_RED 0x82D0
+#define GL_VIEW_CLASS_RGTC2_RG 0x82D1
+#define GL_VIEW_CLASS_BPTC_UNORM 0x82D2
+#define GL_VIEW_CLASS_BPTC_FLOAT 0x82D3
+
+typedef void (GLAPIENTRY * PFNGLGETINTERNALFORMATI64VPROC) (GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint64* params);
+
+#define glGetInternalformati64v GLEW_GET_FUN(__glewGetInternalformati64v)
+
+#define GLEW_ARB_internalformat_query2 GLEW_GET_VAR(__GLEW_ARB_internalformat_query2)
+
+#endif /* GL_ARB_internalformat_query2 */
+
+/* ----------------------- GL_ARB_invalidate_subdata ----------------------- */
+
+#ifndef GL_ARB_invalidate_subdata
+#define GL_ARB_invalidate_subdata 1
+
+typedef void (GLAPIENTRY * PFNGLINVALIDATEBUFFERDATAPROC) (GLuint buffer);
+typedef void (GLAPIENTRY * PFNGLINVALIDATEBUFFERSUBDATAPROC) (GLuint buffer, GLintptr offset, GLsizeiptr length);
+typedef void (GLAPIENTRY * PFNGLINVALIDATEFRAMEBUFFERPROC) (GLenum target, GLsizei numAttachments, const GLenum* attachments);
+typedef void (GLAPIENTRY * PFNGLINVALIDATESUBFRAMEBUFFERPROC) (GLenum target, GLsizei numAttachments, const GLenum* attachments, GLint x, GLint y, GLsizei width, GLsizei height);
+typedef void (GLAPIENTRY * PFNGLINVALIDATETEXIMAGEPROC) (GLuint texture, GLint level);
+typedef void (GLAPIENTRY * PFNGLINVALIDATETEXSUBIMAGEPROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth);
+
+#define glInvalidateBufferData GLEW_GET_FUN(__glewInvalidateBufferData)
+#define glInvalidateBufferSubData GLEW_GET_FUN(__glewInvalidateBufferSubData)
+#define glInvalidateFramebuffer GLEW_GET_FUN(__glewInvalidateFramebuffer)
+#define glInvalidateSubFramebuffer GLEW_GET_FUN(__glewInvalidateSubFramebuffer)
+#define glInvalidateTexImage GLEW_GET_FUN(__glewInvalidateTexImage)
+#define glInvalidateTexSubImage GLEW_GET_FUN(__glewInvalidateTexSubImage)
+
+#define GLEW_ARB_invalidate_subdata GLEW_GET_VAR(__GLEW_ARB_invalidate_subdata)
+
+#endif /* GL_ARB_invalidate_subdata */
+
+/* ---------------------- GL_ARB_map_buffer_alignment ---------------------- */
+
+#ifndef GL_ARB_map_buffer_alignment
+#define GL_ARB_map_buffer_alignment 1
+
+#define GL_MIN_MAP_BUFFER_ALIGNMENT 0x90BC
+
+#define GLEW_ARB_map_buffer_alignment GLEW_GET_VAR(__GLEW_ARB_map_buffer_alignment)
+
+#endif /* GL_ARB_map_buffer_alignment */
+
+/* ------------------------ GL_ARB_map_buffer_range ------------------------ */
+
+#ifndef GL_ARB_map_buffer_range
+#define GL_ARB_map_buffer_range 1
+
+#define GL_MAP_READ_BIT 0x0001
+#define GL_MAP_WRITE_BIT 0x0002
+#define GL_MAP_INVALIDATE_RANGE_BIT 0x0004
+#define GL_MAP_INVALIDATE_BUFFER_BIT 0x0008
+#define GL_MAP_FLUSH_EXPLICIT_BIT 0x0010
+#define GL_MAP_UNSYNCHRONIZED_BIT 0x0020
+
+typedef void (GLAPIENTRY * PFNGLFLUSHMAPPEDBUFFERRANGEPROC) (GLenum target, GLintptr offset, GLsizeiptr length);
+typedef void * (GLAPIENTRY * PFNGLMAPBUFFERRANGEPROC) (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access);
+
+#define glFlushMappedBufferRange GLEW_GET_FUN(__glewFlushMappedBufferRange)
+#define glMapBufferRange GLEW_GET_FUN(__glewMapBufferRange)
+
+#define GLEW_ARB_map_buffer_range GLEW_GET_VAR(__GLEW_ARB_map_buffer_range)
+
+#endif /* GL_ARB_map_buffer_range */
+
+/* ------------------------- GL_ARB_matrix_palette ------------------------- */
+
+#ifndef GL_ARB_matrix_palette
+#define GL_ARB_matrix_palette 1
+
+#define GL_MATRIX_PALETTE_ARB 0x8840
+#define GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB 0x8841
+#define GL_MAX_PALETTE_MATRICES_ARB 0x8842
+#define GL_CURRENT_PALETTE_MATRIX_ARB 0x8843
+#define GL_MATRIX_INDEX_ARRAY_ARB 0x8844
+#define GL_CURRENT_MATRIX_INDEX_ARB 0x8845
+#define GL_MATRIX_INDEX_ARRAY_SIZE_ARB 0x8846
+#define GL_MATRIX_INDEX_ARRAY_TYPE_ARB 0x8847
+#define GL_MATRIX_INDEX_ARRAY_STRIDE_ARB 0x8848
+#define GL_MATRIX_INDEX_ARRAY_POINTER_ARB 0x8849
+
+typedef void (GLAPIENTRY * PFNGLCURRENTPALETTEMATRIXARBPROC) (GLint index);
+typedef void (GLAPIENTRY * PFNGLMATRIXINDEXPOINTERARBPROC) (GLint size, GLenum type, GLsizei stride, void *pointer);
+typedef void (GLAPIENTRY * PFNGLMATRIXINDEXUBVARBPROC) (GLint size, GLubyte *indices);
+typedef void (GLAPIENTRY * PFNGLMATRIXINDEXUIVARBPROC) (GLint size, GLuint *indices);
+typedef void (GLAPIENTRY * PFNGLMATRIXINDEXUSVARBPROC) (GLint size, GLushort *indices);
+
+#define glCurrentPaletteMatrixARB GLEW_GET_FUN(__glewCurrentPaletteMatrixARB)
+#define glMatrixIndexPointerARB GLEW_GET_FUN(__glewMatrixIndexPointerARB)
+#define glMatrixIndexubvARB GLEW_GET_FUN(__glewMatrixIndexubvARB)
+#define glMatrixIndexuivARB GLEW_GET_FUN(__glewMatrixIndexuivARB)
+#define glMatrixIndexusvARB GLEW_GET_FUN(__glewMatrixIndexusvARB)
+
+#define GLEW_ARB_matrix_palette GLEW_GET_VAR(__GLEW_ARB_matrix_palette)
+
+#endif /* GL_ARB_matrix_palette */
+
+/* --------------------------- GL_ARB_multi_bind --------------------------- */
+
+#ifndef GL_ARB_multi_bind
+#define GL_ARB_multi_bind 1
+
+typedef void (GLAPIENTRY * PFNGLBINDBUFFERSBASEPROC) (GLenum target, GLuint first, GLsizei count, const GLuint* buffers);
+typedef void (GLAPIENTRY * PFNGLBINDBUFFERSRANGEPROC) (GLenum target, GLuint first, GLsizei count, const GLuint* buffers, const GLintptr *offsets, const GLsizeiptr *sizes);
+typedef void (GLAPIENTRY * PFNGLBINDIMAGETEXTURESPROC) (GLuint first, GLsizei count, const GLuint* textures);
+typedef void (GLAPIENTRY * PFNGLBINDSAMPLERSPROC) (GLuint first, GLsizei count, const GLuint* samplers);
+typedef void (GLAPIENTRY * PFNGLBINDTEXTURESPROC) (GLuint first, GLsizei count, const GLuint* textures);
+typedef void (GLAPIENTRY * PFNGLBINDVERTEXBUFFERSPROC) (GLuint first, GLsizei count, const GLuint* buffers, const GLintptr *offsets, const GLsizei *strides);
+
+#define glBindBuffersBase GLEW_GET_FUN(__glewBindBuffersBase)
+#define glBindBuffersRange GLEW_GET_FUN(__glewBindBuffersRange)
+#define glBindImageTextures GLEW_GET_FUN(__glewBindImageTextures)
+#define glBindSamplers GLEW_GET_FUN(__glewBindSamplers)
+#define glBindTextures GLEW_GET_FUN(__glewBindTextures)
+#define glBindVertexBuffers GLEW_GET_FUN(__glewBindVertexBuffers)
+
+#define GLEW_ARB_multi_bind GLEW_GET_VAR(__GLEW_ARB_multi_bind)
+
+#endif /* GL_ARB_multi_bind */
+
+/* ----------------------- GL_ARB_multi_draw_indirect ---------------------- */
+
+#ifndef GL_ARB_multi_draw_indirect
+#define GL_ARB_multi_draw_indirect 1
+
+typedef void (GLAPIENTRY * PFNGLMULTIDRAWARRAYSINDIRECTPROC) (GLenum mode, const void *indirect, GLsizei primcount, GLsizei stride);
+typedef void (GLAPIENTRY * PFNGLMULTIDRAWELEMENTSINDIRECTPROC) (GLenum mode, GLenum type, const void *indirect, GLsizei primcount, GLsizei stride);
+
+#define glMultiDrawArraysIndirect GLEW_GET_FUN(__glewMultiDrawArraysIndirect)
+#define glMultiDrawElementsIndirect GLEW_GET_FUN(__glewMultiDrawElementsIndirect)
+
+#define GLEW_ARB_multi_draw_indirect GLEW_GET_VAR(__GLEW_ARB_multi_draw_indirect)
+
+#endif /* GL_ARB_multi_draw_indirect */
+
+/* --------------------------- GL_ARB_multisample -------------------------- */
+
+#ifndef GL_ARB_multisample
+#define GL_ARB_multisample 1
+
+#define GL_MULTISAMPLE_ARB 0x809D
+#define GL_SAMPLE_ALPHA_TO_COVERAGE_ARB 0x809E
+#define GL_SAMPLE_ALPHA_TO_ONE_ARB 0x809F
+#define GL_SAMPLE_COVERAGE_ARB 0x80A0
+#define GL_SAMPLE_BUFFERS_ARB 0x80A8
+#define GL_SAMPLES_ARB 0x80A9
+#define GL_SAMPLE_COVERAGE_VALUE_ARB 0x80AA
+#define GL_SAMPLE_COVERAGE_INVERT_ARB 0x80AB
+#define GL_MULTISAMPLE_BIT_ARB 0x20000000
+
+typedef void (GLAPIENTRY * PFNGLSAMPLECOVERAGEARBPROC) (GLclampf value, GLboolean invert);
+
+#define glSampleCoverageARB GLEW_GET_FUN(__glewSampleCoverageARB)
+
+#define GLEW_ARB_multisample GLEW_GET_VAR(__GLEW_ARB_multisample)
+
+#endif /* GL_ARB_multisample */
+
+/* -------------------------- GL_ARB_multitexture -------------------------- */
+
+#ifndef GL_ARB_multitexture
+#define GL_ARB_multitexture 1
+
+#define GL_TEXTURE0_ARB 0x84C0
+#define GL_TEXTURE1_ARB 0x84C1
+#define GL_TEXTURE2_ARB 0x84C2
+#define GL_TEXTURE3_ARB 0x84C3
+#define GL_TEXTURE4_ARB 0x84C4
+#define GL_TEXTURE5_ARB 0x84C5
+#define GL_TEXTURE6_ARB 0x84C6
+#define GL_TEXTURE7_ARB 0x84C7
+#define GL_TEXTURE8_ARB 0x84C8
+#define GL_TEXTURE9_ARB 0x84C9
+#define GL_TEXTURE10_ARB 0x84CA
+#define GL_TEXTURE11_ARB 0x84CB
+#define GL_TEXTURE12_ARB 0x84CC
+#define GL_TEXTURE13_ARB 0x84CD
+#define GL_TEXTURE14_ARB 0x84CE
+#define GL_TEXTURE15_ARB 0x84CF
+#define GL_TEXTURE16_ARB 0x84D0
+#define GL_TEXTURE17_ARB 0x84D1
+#define GL_TEXTURE18_ARB 0x84D2
+#define GL_TEXTURE19_ARB 0x84D3
+#define GL_TEXTURE20_ARB 0x84D4
+#define GL_TEXTURE21_ARB 0x84D5
+#define GL_TEXTURE22_ARB 0x84D6
+#define GL_TEXTURE23_ARB 0x84D7
+#define GL_TEXTURE24_ARB 0x84D8
+#define GL_TEXTURE25_ARB 0x84D9
+#define GL_TEXTURE26_ARB 0x84DA
+#define GL_TEXTURE27_ARB 0x84DB
+#define GL_TEXTURE28_ARB 0x84DC
+#define GL_TEXTURE29_ARB 0x84DD
+#define GL_TEXTURE30_ARB 0x84DE
+#define GL_TEXTURE31_ARB 0x84DF
+#define GL_ACTIVE_TEXTURE_ARB 0x84E0
+#define GL_CLIENT_ACTIVE_TEXTURE_ARB 0x84E1
+#define GL_MAX_TEXTURE_UNITS_ARB 0x84E2
+
+typedef void (GLAPIENTRY * PFNGLACTIVETEXTUREARBPROC) (GLenum texture);
+typedef void (GLAPIENTRY * PFNGLCLIENTACTIVETEXTUREARBPROC) (GLenum texture);
+typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD1DARBPROC) (GLenum target, GLdouble s);
+typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD1DVARBPROC) (GLenum target, const GLdouble *v);
+typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD1FARBPROC) (GLenum target, GLfloat s);
+typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD1FVARBPROC) (GLenum target, const GLfloat *v);
+typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD1IARBPROC) (GLenum target, GLint s);
+typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD1IVARBPROC) (GLenum target, const GLint *v);
+typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD1SARBPROC) (GLenum target, GLshort s);
+typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD1SVARBPROC) (GLenum target, const GLshort *v);
+typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD2DARBPROC) (GLenum target, GLdouble s, GLdouble t);
+typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD2DVARBPROC) (GLenum target, const GLdouble *v);
+typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD2FARBPROC) (GLenum target, GLfloat s, GLfloat t);
+typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD2FVARBPROC) (GLenum target, const GLfloat *v);
+typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD2IARBPROC) (GLenum target, GLint s, GLint t);
+typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD2IVARBPROC) (GLenum target, const GLint *v);
+typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD2SARBPROC) (GLenum target, GLshort s, GLshort t);
+typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD2SVARBPROC) (GLenum target, const GLshort *v);
+typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD3DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r);
+typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD3DVARBPROC) (GLenum target, const GLdouble *v);
+typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD3FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r);
+typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD3FVARBPROC) (GLenum target, const GLfloat *v);
+typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD3IARBPROC) (GLenum target, GLint s, GLint t, GLint r);
+typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD3IVARBPROC) (GLenum target, const GLint *v);
+typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD3SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r);
+typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD3SVARBPROC) (GLenum target, const GLshort *v);
+typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD4DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);
+typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD4DVARBPROC) (GLenum target, const GLdouble *v);
+typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD4FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
+typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD4FVARBPROC) (GLenum target, const GLfloat *v);
+typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD4IARBPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q);
+typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD4IVARBPROC) (GLenum target, const GLint *v);
+typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD4SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);
+typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD4SVARBPROC) (GLenum target, const GLshort *v);
+
+#define glActiveTextureARB GLEW_GET_FUN(__glewActiveTextureARB)
+#define glClientActiveTextureARB GLEW_GET_FUN(__glewClientActiveTextureARB)
+#define glMultiTexCoord1dARB GLEW_GET_FUN(__glewMultiTexCoord1dARB)
+#define glMultiTexCoord1dvARB GLEW_GET_FUN(__glewMultiTexCoord1dvARB)
+#define glMultiTexCoord1fARB GLEW_GET_FUN(__glewMultiTexCoord1fARB)
+#define glMultiTexCoord1fvARB GLEW_GET_FUN(__glewMultiTexCoord1fvARB)
+#define glMultiTexCoord1iARB GLEW_GET_FUN(__glewMultiTexCoord1iARB)
+#define glMultiTexCoord1ivARB GLEW_GET_FUN(__glewMultiTexCoord1ivARB)
+#define glMultiTexCoord1sARB GLEW_GET_FUN(__glewMultiTexCoord1sARB)
+#define glMultiTexCoord1svARB GLEW_GET_FUN(__glewMultiTexCoord1svARB)
+#define glMultiTexCoord2dARB GLEW_GET_FUN(__glewMultiTexCoord2dARB)
+#define glMultiTexCoord2dvARB GLEW_GET_FUN(__glewMultiTexCoord2dvARB)
+#define glMultiTexCoord2fARB GLEW_GET_FUN(__glewMultiTexCoord2fARB)
+#define glMultiTexCoord2fvARB GLEW_GET_FUN(__glewMultiTexCoord2fvARB)
+#define glMultiTexCoord2iARB GLEW_GET_FUN(__glewMultiTexCoord2iARB)
+#define glMultiTexCoord2ivARB GLEW_GET_FUN(__glewMultiTexCoord2ivARB)
+#define glMultiTexCoord2sARB GLEW_GET_FUN(__glewMultiTexCoord2sARB)
+#define glMultiTexCoord2svARB GLEW_GET_FUN(__glewMultiTexCoord2svARB)
+#define glMultiTexCoord3dARB GLEW_GET_FUN(__glewMultiTexCoord3dARB)
+#define glMultiTexCoord3dvARB GLEW_GET_FUN(__glewMultiTexCoord3dvARB)
+#define glMultiTexCoord3fARB GLEW_GET_FUN(__glewMultiTexCoord3fARB)
+#define glMultiTexCoord3fvARB GLEW_GET_FUN(__glewMultiTexCoord3fvARB)
+#define glMultiTexCoord3iARB GLEW_GET_FUN(__glewMultiTexCoord3iARB)
+#define glMultiTexCoord3ivARB GLEW_GET_FUN(__glewMultiTexCoord3ivARB)
+#define glMultiTexCoord3sARB GLEW_GET_FUN(__glewMultiTexCoord3sARB)
+#define glMultiTexCoord3svARB GLEW_GET_FUN(__glewMultiTexCoord3svARB)
+#define glMultiTexCoord4dARB GLEW_GET_FUN(__glewMultiTexCoord4dARB)
+#define glMultiTexCoord4dvARB GLEW_GET_FUN(__glewMultiTexCoord4dvARB)
+#define glMultiTexCoord4fARB GLEW_GET_FUN(__glewMultiTexCoord4fARB)
+#define glMultiTexCoord4fvARB GLEW_GET_FUN(__glewMultiTexCoord4fvARB)
+#define glMultiTexCoord4iARB GLEW_GET_FUN(__glewMultiTexCoord4iARB)
+#define glMultiTexCoord4ivARB GLEW_GET_FUN(__glewMultiTexCoord4ivARB)
+#define glMultiTexCoord4sARB GLEW_GET_FUN(__glewMultiTexCoord4sARB)
+#define glMultiTexCoord4svARB GLEW_GET_FUN(__glewMultiTexCoord4svARB)
+
+#define GLEW_ARB_multitexture GLEW_GET_VAR(__GLEW_ARB_multitexture)
+
+#endif /* GL_ARB_multitexture */
+
+/* ------------------------- GL_ARB_occlusion_query ------------------------ */
+
+#ifndef GL_ARB_occlusion_query
+#define GL_ARB_occlusion_query 1
+
+#define GL_QUERY_COUNTER_BITS_ARB 0x8864
+#define GL_CURRENT_QUERY_ARB 0x8865
+#define GL_QUERY_RESULT_ARB 0x8866
+#define GL_QUERY_RESULT_AVAILABLE_ARB 0x8867
+#define GL_SAMPLES_PASSED_ARB 0x8914
+
+typedef void (GLAPIENTRY * PFNGLBEGINQUERYARBPROC) (GLenum target, GLuint id);
+typedef void (GLAPIENTRY * PFNGLDELETEQUERIESARBPROC) (GLsizei n, const GLuint* ids);
+typedef void (GLAPIENTRY * PFNGLENDQUERYARBPROC) (GLenum target);
+typedef void (GLAPIENTRY * PFNGLGENQUERIESARBPROC) (GLsizei n, GLuint* ids);
+typedef void (GLAPIENTRY * PFNGLGETQUERYOBJECTIVARBPROC) (GLuint id, GLenum pname, GLint* params);
+typedef void (GLAPIENTRY * PFNGLGETQUERYOBJECTUIVARBPROC) (GLuint id, GLenum pname, GLuint* params);
+typedef void (GLAPIENTRY * PFNGLGETQUERYIVARBPROC) (GLenum target, GLenum pname, GLint* params);
+typedef GLboolean (GLAPIENTRY * PFNGLISQUERYARBPROC) (GLuint id);
+
+#define glBeginQueryARB GLEW_GET_FUN(__glewBeginQueryARB)
+#define glDeleteQueriesARB GLEW_GET_FUN(__glewDeleteQueriesARB)
+#define glEndQueryARB GLEW_GET_FUN(__glewEndQueryARB)
+#define glGenQueriesARB GLEW_GET_FUN(__glewGenQueriesARB)
+#define glGetQueryObjectivARB GLEW_GET_FUN(__glewGetQueryObjectivARB)
+#define glGetQueryObjectuivARB GLEW_GET_FUN(__glewGetQueryObjectuivARB)
+#define glGetQueryivARB GLEW_GET_FUN(__glewGetQueryivARB)
+#define glIsQueryARB GLEW_GET_FUN(__glewIsQueryARB)
+
+#define GLEW_ARB_occlusion_query GLEW_GET_VAR(__GLEW_ARB_occlusion_query)
+
+#endif /* GL_ARB_occlusion_query */
+
+/* ------------------------ GL_ARB_occlusion_query2 ------------------------ */
+
+#ifndef GL_ARB_occlusion_query2
+#define GL_ARB_occlusion_query2 1
+
+#define GL_ANY_SAMPLES_PASSED 0x8C2F
+
+#define GLEW_ARB_occlusion_query2 GLEW_GET_VAR(__GLEW_ARB_occlusion_query2)
+
+#endif /* GL_ARB_occlusion_query2 */
+
+/* -------------------- GL_ARB_pipeline_statistics_query ------------------- */
+
+#ifndef GL_ARB_pipeline_statistics_query
+#define GL_ARB_pipeline_statistics_query 1
+
+#define GL_VERTICES_SUBMITTED_ARB 0x82EE
+#define GL_PRIMITIVES_SUBMITTED_ARB 0x82EF
+#define GL_VERTEX_SHADER_INVOCATIONS_ARB 0x82F0
+#define GL_TESS_CONTROL_SHADER_PATCHES_ARB 0x82F1
+#define GL_TESS_EVALUATION_SHADER_INVOCATIONS_ARB 0x82F2
+#define GL_GEOMETRY_SHADER_PRIMITIVES_EMITTED_ARB 0x82F3
+#define GL_FRAGMENT_SHADER_INVOCATIONS_ARB 0x82F4
+#define GL_COMPUTE_SHADER_INVOCATIONS_ARB 0x82F5
+#define GL_CLIPPING_INPUT_PRIMITIVES_ARB 0x82F6
+#define GL_CLIPPING_OUTPUT_PRIMITIVES_ARB 0x82F7
+#define GL_GEOMETRY_SHADER_INVOCATIONS 0x887F
+
+#define GLEW_ARB_pipeline_statistics_query GLEW_GET_VAR(__GLEW_ARB_pipeline_statistics_query)
+
+#endif /* GL_ARB_pipeline_statistics_query */
+
+/* ----------------------- GL_ARB_pixel_buffer_object ---------------------- */
+
+#ifndef GL_ARB_pixel_buffer_object
+#define GL_ARB_pixel_buffer_object 1
+
+#define GL_PIXEL_PACK_BUFFER_ARB 0x88EB
+#define GL_PIXEL_UNPACK_BUFFER_ARB 0x88EC
+#define GL_PIXEL_PACK_BUFFER_BINDING_ARB 0x88ED
+#define GL_PIXEL_UNPACK_BUFFER_BINDING_ARB 0x88EF
+
+#define GLEW_ARB_pixel_buffer_object GLEW_GET_VAR(__GLEW_ARB_pixel_buffer_object)
+
+#endif /* GL_ARB_pixel_buffer_object */
+
+/* ------------------------ GL_ARB_point_parameters ------------------------ */
+
+#ifndef GL_ARB_point_parameters
+#define GL_ARB_point_parameters 1
+
+#define GL_POINT_SIZE_MIN_ARB 0x8126
+#define GL_POINT_SIZE_MAX_ARB 0x8127
+#define GL_POINT_FADE_THRESHOLD_SIZE_ARB 0x8128
+#define GL_POINT_DISTANCE_ATTENUATION_ARB 0x8129
+
+typedef void (GLAPIENTRY * PFNGLPOINTPARAMETERFARBPROC) (GLenum pname, GLfloat param);
+typedef void (GLAPIENTRY * PFNGLPOINTPARAMETERFVARBPROC) (GLenum pname, const GLfloat* params);
+
+#define glPointParameterfARB GLEW_GET_FUN(__glewPointParameterfARB)
+#define glPointParameterfvARB GLEW_GET_FUN(__glewPointParameterfvARB)
+
+#define GLEW_ARB_point_parameters GLEW_GET_VAR(__GLEW_ARB_point_parameters)
+
+#endif /* GL_ARB_point_parameters */
+
+/* -------------------------- GL_ARB_point_sprite -------------------------- */
+
+#ifndef GL_ARB_point_sprite
+#define GL_ARB_point_sprite 1
+
+#define GL_POINT_SPRITE_ARB 0x8861
+#define GL_COORD_REPLACE_ARB 0x8862
+
+#define GLEW_ARB_point_sprite GLEW_GET_VAR(__GLEW_ARB_point_sprite)
+
+#endif /* GL_ARB_point_sprite */
+
+/* --------------------- GL_ARB_program_interface_query -------------------- */
+
+#ifndef GL_ARB_program_interface_query
+#define GL_ARB_program_interface_query 1
+
+#define GL_UNIFORM 0x92E1
+#define GL_UNIFORM_BLOCK 0x92E2
+#define GL_PROGRAM_INPUT 0x92E3
+#define GL_PROGRAM_OUTPUT 0x92E4
+#define GL_BUFFER_VARIABLE 0x92E5
+#define GL_SHADER_STORAGE_BLOCK 0x92E6
+#define GL_IS_PER_PATCH 0x92E7
+#define GL_VERTEX_SUBROUTINE 0x92E8
+#define GL_TESS_CONTROL_SUBROUTINE 0x92E9
+#define GL_TESS_EVALUATION_SUBROUTINE 0x92EA
+#define GL_GEOMETRY_SUBROUTINE 0x92EB
+#define GL_FRAGMENT_SUBROUTINE 0x92EC
+#define GL_COMPUTE_SUBROUTINE 0x92ED
+#define GL_VERTEX_SUBROUTINE_UNIFORM 0x92EE
+#define GL_TESS_CONTROL_SUBROUTINE_UNIFORM 0x92EF
+#define GL_TESS_EVALUATION_SUBROUTINE_UNIFORM 0x92F0
+#define GL_GEOMETRY_SUBROUTINE_UNIFORM 0x92F1
+#define GL_FRAGMENT_SUBROUTINE_UNIFORM 0x92F2
+#define GL_COMPUTE_SUBROUTINE_UNIFORM 0x92F3
+#define GL_TRANSFORM_FEEDBACK_VARYING 0x92F4
+#define GL_ACTIVE_RESOURCES 0x92F5
+#define GL_MAX_NAME_LENGTH 0x92F6
+#define GL_MAX_NUM_ACTIVE_VARIABLES 0x92F7
+#define GL_MAX_NUM_COMPATIBLE_SUBROUTINES 0x92F8
+#define GL_NAME_LENGTH 0x92F9
+#define GL_TYPE 0x92FA
+#define GL_ARRAY_SIZE 0x92FB
+#define GL_OFFSET 0x92FC
+#define GL_BLOCK_INDEX 0x92FD
+#define GL_ARRAY_STRIDE 0x92FE
+#define GL_MATRIX_STRIDE 0x92FF
+#define GL_IS_ROW_MAJOR 0x9300
+#define GL_ATOMIC_COUNTER_BUFFER_INDEX 0x9301
+#define GL_BUFFER_BINDING 0x9302
+#define GL_BUFFER_DATA_SIZE 0x9303
+#define GL_NUM_ACTIVE_VARIABLES 0x9304
+#define GL_ACTIVE_VARIABLES 0x9305
+#define GL_REFERENCED_BY_VERTEX_SHADER 0x9306
+#define GL_REFERENCED_BY_TESS_CONTROL_SHADER 0x9307
+#define GL_REFERENCED_BY_TESS_EVALUATION_SHADER 0x9308
+#define GL_REFERENCED_BY_GEOMETRY_SHADER 0x9309
+#define GL_REFERENCED_BY_FRAGMENT_SHADER 0x930A
+#define GL_REFERENCED_BY_COMPUTE_SHADER 0x930B
+#define GL_TOP_LEVEL_ARRAY_SIZE 0x930C
+#define GL_TOP_LEVEL_ARRAY_STRIDE 0x930D
+#define GL_LOCATION 0x930E
+#define GL_LOCATION_INDEX 0x930F
+
+typedef void (GLAPIENTRY * PFNGLGETPROGRAMINTERFACEIVPROC) (GLuint program, GLenum programInterface, GLenum pname, GLint* params);
+typedef GLuint (GLAPIENTRY * PFNGLGETPROGRAMRESOURCEINDEXPROC) (GLuint program, GLenum programInterface, const GLchar* name);
+typedef GLint (GLAPIENTRY * PFNGLGETPROGRAMRESOURCELOCATIONPROC) (GLuint program, GLenum programInterface, const GLchar* name);
+typedef GLint (GLAPIENTRY * PFNGLGETPROGRAMRESOURCELOCATIONINDEXPROC) (GLuint program, GLenum programInterface, const GLchar* name);
+typedef void (GLAPIENTRY * PFNGLGETPROGRAMRESOURCENAMEPROC) (GLuint program, GLenum programInterface, GLuint index, GLsizei bufSize, GLsizei* length, GLchar *name);
+typedef void (GLAPIENTRY * PFNGLGETPROGRAMRESOURCEIVPROC) (GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum* props, GLsizei bufSize, GLsizei *length, GLint *params);
+
+#define glGetProgramInterfaceiv GLEW_GET_FUN(__glewGetProgramInterfaceiv)
+#define glGetProgramResourceIndex GLEW_GET_FUN(__glewGetProgramResourceIndex)
+#define glGetProgramResourceLocation GLEW_GET_FUN(__glewGetProgramResourceLocation)
+#define glGetProgramResourceLocationIndex GLEW_GET_FUN(__glewGetProgramResourceLocationIndex)
+#define glGetProgramResourceName GLEW_GET_FUN(__glewGetProgramResourceName)
+#define glGetProgramResourceiv GLEW_GET_FUN(__glewGetProgramResourceiv)
+
+#define GLEW_ARB_program_interface_query GLEW_GET_VAR(__GLEW_ARB_program_interface_query)
+
+#endif /* GL_ARB_program_interface_query */
+
+/* ------------------------ GL_ARB_provoking_vertex ------------------------ */
+
+#ifndef GL_ARB_provoking_vertex
+#define GL_ARB_provoking_vertex 1
+
+#define GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION 0x8E4C
+#define GL_FIRST_VERTEX_CONVENTION 0x8E4D
+#define GL_LAST_VERTEX_CONVENTION 0x8E4E
+#define GL_PROVOKING_VERTEX 0x8E4F
+
+typedef void (GLAPIENTRY * PFNGLPROVOKINGVERTEXPROC) (GLenum mode);
+
+#define glProvokingVertex GLEW_GET_FUN(__glewProvokingVertex)
+
+#define GLEW_ARB_provoking_vertex GLEW_GET_VAR(__GLEW_ARB_provoking_vertex)
+
+#endif /* GL_ARB_provoking_vertex */
+
+/* ----------------------- GL_ARB_query_buffer_object ---------------------- */
+
+#ifndef GL_ARB_query_buffer_object
+#define GL_ARB_query_buffer_object 1
+
+#define GL_QUERY_BUFFER_BARRIER_BIT 0x00008000
+#define GL_QUERY_BUFFER 0x9192
+#define GL_QUERY_BUFFER_BINDING 0x9193
+#define GL_QUERY_RESULT_NO_WAIT 0x9194
+
+#define GLEW_ARB_query_buffer_object GLEW_GET_VAR(__GLEW_ARB_query_buffer_object)
+
+#endif /* GL_ARB_query_buffer_object */
+
+/* ------------------ GL_ARB_robust_buffer_access_behavior ----------------- */
+
+#ifndef GL_ARB_robust_buffer_access_behavior
+#define GL_ARB_robust_buffer_access_behavior 1
+
+#define GLEW_ARB_robust_buffer_access_behavior GLEW_GET_VAR(__GLEW_ARB_robust_buffer_access_behavior)
+
+#endif /* GL_ARB_robust_buffer_access_behavior */
+
+/* --------------------------- GL_ARB_robustness --------------------------- */
+
+#ifndef GL_ARB_robustness
+#define GL_ARB_robustness 1
+
+#define GL_CONTEXT_FLAG_ROBUST_ACCESS_BIT_ARB 0x00000004
+#define GL_LOSE_CONTEXT_ON_RESET_ARB 0x8252
+#define GL_GUILTY_CONTEXT_RESET_ARB 0x8253
+#define GL_INNOCENT_CONTEXT_RESET_ARB 0x8254
+#define GL_UNKNOWN_CONTEXT_RESET_ARB 0x8255
+#define GL_RESET_NOTIFICATION_STRATEGY_ARB 0x8256
+#define GL_NO_RESET_NOTIFICATION_ARB 0x8261
+
+typedef GLenum (GLAPIENTRY * PFNGLGETGRAPHICSRESETSTATUSARBPROC) (void);
+typedef void (GLAPIENTRY * PFNGLGETNCOLORTABLEARBPROC) (GLenum target, GLenum format, GLenum type, GLsizei bufSize, void* table);
+typedef void (GLAPIENTRY * PFNGLGETNCOMPRESSEDTEXIMAGEARBPROC) (GLenum target, GLint lod, GLsizei bufSize, void* img);
+typedef void (GLAPIENTRY * PFNGLGETNCONVOLUTIONFILTERARBPROC) (GLenum target, GLenum format, GLenum type, GLsizei bufSize, void* image);
+typedef void (GLAPIENTRY * PFNGLGETNHISTOGRAMARBPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, void* values);
+typedef void (GLAPIENTRY * PFNGLGETNMAPDVARBPROC) (GLenum target, GLenum query, GLsizei bufSize, GLdouble* v);
+typedef void (GLAPIENTRY * PFNGLGETNMAPFVARBPROC) (GLenum target, GLenum query, GLsizei bufSize, GLfloat* v);
+typedef void (GLAPIENTRY * PFNGLGETNMAPIVARBPROC) (GLenum target, GLenum query, GLsizei bufSize, GLint* v);
+typedef void (GLAPIENTRY * PFNGLGETNMINMAXARBPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, void* values);
+typedef void (GLAPIENTRY * PFNGLGETNPIXELMAPFVARBPROC) (GLenum map, GLsizei bufSize, GLfloat* values);
+typedef void (GLAPIENTRY * PFNGLGETNPIXELMAPUIVARBPROC) (GLenum map, GLsizei bufSize, GLuint* values);
+typedef void (GLAPIENTRY * PFNGLGETNPIXELMAPUSVARBPROC) (GLenum map, GLsizei bufSize, GLushort* values);
+typedef void (GLAPIENTRY * PFNGLGETNPOLYGONSTIPPLEARBPROC) (GLsizei bufSize, GLubyte* pattern);
+typedef void (GLAPIENTRY * PFNGLGETNSEPARABLEFILTERARBPROC) (GLenum target, GLenum format, GLenum type, GLsizei rowBufSize, void* row, GLsizei columnBufSize, void*column, void*span);
+typedef void (GLAPIENTRY * PFNGLGETNTEXIMAGEARBPROC) (GLenum target, GLint level, GLenum format, GLenum type, GLsizei bufSize, void* img);
+typedef void (GLAPIENTRY * PFNGLGETNUNIFORMDVARBPROC) (GLuint program, GLint location, GLsizei bufSize, GLdouble* params);
+typedef void (GLAPIENTRY * PFNGLGETNUNIFORMFVARBPROC) (GLuint program, GLint location, GLsizei bufSize, GLfloat* params);
+typedef void (GLAPIENTRY * PFNGLGETNUNIFORMIVARBPROC) (GLuint program, GLint location, GLsizei bufSize, GLint* params);
+typedef void (GLAPIENTRY * PFNGLGETNUNIFORMUIVARBPROC) (GLuint program, GLint location, GLsizei bufSize, GLuint* params);
+typedef void (GLAPIENTRY * PFNGLREADNPIXELSARBPROC) (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void* data);
+
+#define glGetGraphicsResetStatusARB GLEW_GET_FUN(__glewGetGraphicsResetStatusARB)
+#define glGetnColorTableARB GLEW_GET_FUN(__glewGetnColorTableARB)
+#define glGetnCompressedTexImageARB GLEW_GET_FUN(__glewGetnCompressedTexImageARB)
+#define glGetnConvolutionFilterARB GLEW_GET_FUN(__glewGetnConvolutionFilterARB)
+#define glGetnHistogramARB GLEW_GET_FUN(__glewGetnHistogramARB)
+#define glGetnMapdvARB GLEW_GET_FUN(__glewGetnMapdvARB)
+#define glGetnMapfvARB GLEW_GET_FUN(__glewGetnMapfvARB)
+#define glGetnMapivARB GLEW_GET_FUN(__glewGetnMapivARB)
+#define glGetnMinmaxARB GLEW_GET_FUN(__glewGetnMinmaxARB)
+#define glGetnPixelMapfvARB GLEW_GET_FUN(__glewGetnPixelMapfvARB)
+#define glGetnPixelMapuivARB GLEW_GET_FUN(__glewGetnPixelMapuivARB)
+#define glGetnPixelMapusvARB GLEW_GET_FUN(__glewGetnPixelMapusvARB)
+#define glGetnPolygonStippleARB GLEW_GET_FUN(__glewGetnPolygonStippleARB)
+#define glGetnSeparableFilterARB GLEW_GET_FUN(__glewGetnSeparableFilterARB)
+#define glGetnTexImageARB GLEW_GET_FUN(__glewGetnTexImageARB)
+#define glGetnUniformdvARB GLEW_GET_FUN(__glewGetnUniformdvARB)
+#define glGetnUniformfvARB GLEW_GET_FUN(__glewGetnUniformfvARB)
+#define glGetnUniformivARB GLEW_GET_FUN(__glewGetnUniformivARB)
+#define glGetnUniformuivARB GLEW_GET_FUN(__glewGetnUniformuivARB)
+#define glReadnPixelsARB GLEW_GET_FUN(__glewReadnPixelsARB)
+
+#define GLEW_ARB_robustness GLEW_GET_VAR(__GLEW_ARB_robustness)
+
+#endif /* GL_ARB_robustness */
+
+/* ---------------- GL_ARB_robustness_application_isolation ---------------- */
+
+#ifndef GL_ARB_robustness_application_isolation
+#define GL_ARB_robustness_application_isolation 1
+
+#define GLEW_ARB_robustness_application_isolation GLEW_GET_VAR(__GLEW_ARB_robustness_application_isolation)
+
+#endif /* GL_ARB_robustness_application_isolation */
+
+/* ---------------- GL_ARB_robustness_share_group_isolation ---------------- */
+
+#ifndef GL_ARB_robustness_share_group_isolation
+#define GL_ARB_robustness_share_group_isolation 1
+
+#define GLEW_ARB_robustness_share_group_isolation GLEW_GET_VAR(__GLEW_ARB_robustness_share_group_isolation)
+
+#endif /* GL_ARB_robustness_share_group_isolation */
+
+/* ------------------------- GL_ARB_sample_shading ------------------------- */
+
+#ifndef GL_ARB_sample_shading
+#define GL_ARB_sample_shading 1
+
+#define GL_SAMPLE_SHADING_ARB 0x8C36
+#define GL_MIN_SAMPLE_SHADING_VALUE_ARB 0x8C37
+
+typedef void (GLAPIENTRY * PFNGLMINSAMPLESHADINGARBPROC) (GLclampf value);
+
+#define glMinSampleShadingARB GLEW_GET_FUN(__glewMinSampleShadingARB)
+
+#define GLEW_ARB_sample_shading GLEW_GET_VAR(__GLEW_ARB_sample_shading)
+
+#endif /* GL_ARB_sample_shading */
+
+/* ------------------------- GL_ARB_sampler_objects ------------------------ */
+
+#ifndef GL_ARB_sampler_objects
+#define GL_ARB_sampler_objects 1
+
+#define GL_SAMPLER_BINDING 0x8919
+
+typedef void (GLAPIENTRY * PFNGLBINDSAMPLERPROC) (GLuint unit, GLuint sampler);
+typedef void (GLAPIENTRY * PFNGLDELETESAMPLERSPROC) (GLsizei count, const GLuint * samplers);
+typedef void (GLAPIENTRY * PFNGLGENSAMPLERSPROC) (GLsizei count, GLuint* samplers);
+typedef void (GLAPIENTRY * PFNGLGETSAMPLERPARAMETERIIVPROC) (GLuint sampler, GLenum pname, GLint* params);
+typedef void (GLAPIENTRY * PFNGLGETSAMPLERPARAMETERIUIVPROC) (GLuint sampler, GLenum pname, GLuint* params);
+typedef void (GLAPIENTRY * PFNGLGETSAMPLERPARAMETERFVPROC) (GLuint sampler, GLenum pname, GLfloat* params);
+typedef void (GLAPIENTRY * PFNGLGETSAMPLERPARAMETERIVPROC) (GLuint sampler, GLenum pname, GLint* params);
+typedef GLboolean (GLAPIENTRY * PFNGLISSAMPLERPROC) (GLuint sampler);
+typedef void (GLAPIENTRY * PFNGLSAMPLERPARAMETERIIVPROC) (GLuint sampler, GLenum pname, const GLint* params);
+typedef void (GLAPIENTRY * PFNGLSAMPLERPARAMETERIUIVPROC) (GLuint sampler, GLenum pname, const GLuint* params);
+typedef void (GLAPIENTRY * PFNGLSAMPLERPARAMETERFPROC) (GLuint sampler, GLenum pname, GLfloat param);
+typedef void (GLAPIENTRY * PFNGLSAMPLERPARAMETERFVPROC) (GLuint sampler, GLenum pname, const GLfloat* params);
+typedef void (GLAPIENTRY * PFNGLSAMPLERPARAMETERIPROC) (GLuint sampler, GLenum pname, GLint param);
+typedef void (GLAPIENTRY * PFNGLSAMPLERPARAMETERIVPROC) (GLuint sampler, GLenum pname, const GLint* params);
+
+#define glBindSampler GLEW_GET_FUN(__glewBindSampler)
+#define glDeleteSamplers GLEW_GET_FUN(__glewDeleteSamplers)
+#define glGenSamplers GLEW_GET_FUN(__glewGenSamplers)
+#define glGetSamplerParameterIiv GLEW_GET_FUN(__glewGetSamplerParameterIiv)
+#define glGetSamplerParameterIuiv GLEW_GET_FUN(__glewGetSamplerParameterIuiv)
+#define glGetSamplerParameterfv GLEW_GET_FUN(__glewGetSamplerParameterfv)
+#define glGetSamplerParameteriv GLEW_GET_FUN(__glewGetSamplerParameteriv)
+#define glIsSampler GLEW_GET_FUN(__glewIsSampler)
+#define glSamplerParameterIiv GLEW_GET_FUN(__glewSamplerParameterIiv)
+#define glSamplerParameterIuiv GLEW_GET_FUN(__glewSamplerParameterIuiv)
+#define glSamplerParameterf GLEW_GET_FUN(__glewSamplerParameterf)
+#define glSamplerParameterfv GLEW_GET_FUN(__glewSamplerParameterfv)
+#define glSamplerParameteri GLEW_GET_FUN(__glewSamplerParameteri)
+#define glSamplerParameteriv GLEW_GET_FUN(__glewSamplerParameteriv)
+
+#define GLEW_ARB_sampler_objects GLEW_GET_VAR(__GLEW_ARB_sampler_objects)
+
+#endif /* GL_ARB_sampler_objects */
+
+/* ------------------------ GL_ARB_seamless_cube_map ----------------------- */
+
+#ifndef GL_ARB_seamless_cube_map
+#define GL_ARB_seamless_cube_map 1
+
+#define GL_TEXTURE_CUBE_MAP_SEAMLESS 0x884F
+
+#define GLEW_ARB_seamless_cube_map GLEW_GET_VAR(__GLEW_ARB_seamless_cube_map)
+
+#endif /* GL_ARB_seamless_cube_map */
+
+/* ------------------ GL_ARB_seamless_cubemap_per_texture ------------------ */
+
+#ifndef GL_ARB_seamless_cubemap_per_texture
+#define GL_ARB_seamless_cubemap_per_texture 1
+
+#define GL_TEXTURE_CUBE_MAP_SEAMLESS 0x884F
+
+#define GLEW_ARB_seamless_cubemap_per_texture GLEW_GET_VAR(__GLEW_ARB_seamless_cubemap_per_texture)
+
+#endif /* GL_ARB_seamless_cubemap_per_texture */
+
+/* --------------------- GL_ARB_separate_shader_objects -------------------- */
+
+#ifndef GL_ARB_separate_shader_objects
+#define GL_ARB_separate_shader_objects 1
+
+#define GL_VERTEX_SHADER_BIT 0x00000001
+#define GL_FRAGMENT_SHADER_BIT 0x00000002
+#define GL_GEOMETRY_SHADER_BIT 0x00000004
+#define GL_TESS_CONTROL_SHADER_BIT 0x00000008
+#define GL_TESS_EVALUATION_SHADER_BIT 0x00000010
+#define GL_PROGRAM_SEPARABLE 0x8258
+#define GL_ACTIVE_PROGRAM 0x8259
+#define GL_PROGRAM_PIPELINE_BINDING 0x825A
+#define GL_ALL_SHADER_BITS 0xFFFFFFFF
+
+typedef void (GLAPIENTRY * PFNGLACTIVESHADERPROGRAMPROC) (GLuint pipeline, GLuint program);
+typedef void (GLAPIENTRY * PFNGLBINDPROGRAMPIPELINEPROC) (GLuint pipeline);
+typedef GLuint (GLAPIENTRY * PFNGLCREATESHADERPROGRAMVPROC) (GLenum type, GLsizei count, const GLchar * const * strings);
+typedef void (GLAPIENTRY * PFNGLDELETEPROGRAMPIPELINESPROC) (GLsizei n, const GLuint* pipelines);
+typedef void (GLAPIENTRY * PFNGLGENPROGRAMPIPELINESPROC) (GLsizei n, GLuint* pipelines);
+typedef void (GLAPIENTRY * PFNGLGETPROGRAMPIPELINEINFOLOGPROC) (GLuint pipeline, GLsizei bufSize, GLsizei* length, GLchar *infoLog);
+typedef void (GLAPIENTRY * PFNGLGETPROGRAMPIPELINEIVPROC) (GLuint pipeline, GLenum pname, GLint* params);
+typedef GLboolean (GLAPIENTRY * PFNGLISPROGRAMPIPELINEPROC) (GLuint pipeline);
+typedef void (GLAPIENTRY * PFNGLPROGRAMUNIFORM1DPROC) (GLuint program, GLint location, GLdouble x);
+typedef void (GLAPIENTRY * PFNGLPROGRAMUNIFORM1DVPROC) (GLuint program, GLint location, GLsizei count, const GLdouble* value);
+typedef void (GLAPIENTRY * PFNGLPROGRAMUNIFORM1FPROC) (GLuint program, GLint location, GLfloat x);
+typedef void (GLAPIENTRY * PFNGLPROGRAMUNIFORM1FVPROC) (GLuint program, GLint location, GLsizei count, const GLfloat* value);
+typedef void (GLAPIENTRY * PFNGLPROGRAMUNIFORM1IPROC) (GLuint program, GLint location, GLint x);
+typedef void (GLAPIENTRY * PFNGLPROGRAMUNIFORM1IVPROC) (GLuint program, GLint location, GLsizei count, const GLint* value);
+typedef void (GLAPIENTRY * PFNGLPROGRAMUNIFORM1UIPROC) (GLuint program, GLint location, GLuint x);
+typedef void (GLAPIENTRY * PFNGLPROGRAMUNIFORM1UIVPROC) (GLuint program, GLint location, GLsizei count, const GLuint* value);
+typedef void (GLAPIENTRY * PFNGLPROGRAMUNIFORM2DPROC) (GLuint program, GLint location, GLdouble x, GLdouble y);
+typedef void (GLAPIENTRY * PFNGLPROGRAMUNIFORM2DVPROC) (GLuint program, GLint location, GLsizei count, const GLdouble* value);
+typedef void (GLAPIENTRY * PFNGLPROGRAMUNIFORM2FPROC) (GLuint program, GLint location, GLfloat x, GLfloat y);
+typedef void (GLAPIENTRY * PFNGLPROGRAMUNIFORM2FVPROC) (GLuint program, GLint location, GLsizei count, const GLfloat* value);
+typedef void (GLAPIENTRY * PFNGLPROGRAMUNIFORM2IPROC) (GLuint program, GLint location, GLint x, GLint y);
+typedef void (GLAPIENTRY * PFNGLPROGRAMUNIFORM2IVPROC) (GLuint program, GLint location, GLsizei count, const GLint* value);
+typedef void (GLAPIENTRY * PFNGLPROGRAMUNIFORM2UIPROC) (GLuint program, GLint location, GLuint x, GLuint y);
+typedef void (GLAPIENTRY * PFNGLPROGRAMUNIFORM2UIVPROC) (GLuint program, GLint location, GLsizei count, const GLuint* value);
+typedef void (GLAPIENTRY * PFNGLPROGRAMUNIFORM3DPROC) (GLuint program, GLint location, GLdouble x, GLdouble y, GLdouble z);
+typedef void (GLAPIENTRY * PFNGLPROGRAMUNIFORM3DVPROC) (GLuint program, GLint location, GLsizei count, const GLdouble* value);
+typedef void (GLAPIENTRY * PFNGLPROGRAMUNIFORM3FPROC) (GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z);
+typedef void (GLAPIENTRY * PFNGLPROGRAMUNIFORM3FVPROC) (GLuint program, GLint location, GLsizei count, const GLfloat* value);
+typedef void (GLAPIENTRY * PFNGLPROGRAMUNIFORM3IPROC) (GLuint program, GLint location, GLint x, GLint y, GLint z);
+typedef void (GLAPIENTRY * PFNGLPROGRAMUNIFORM3IVPROC) (GLuint program, GLint location, GLsizei count, const GLint* value);
+typedef void (GLAPIENTRY * PFNGLPROGRAMUNIFORM3UIPROC) (GLuint program, GLint location, GLuint x, GLuint y, GLuint z);
+typedef void (GLAPIENTRY * PFNGLPROGRAMUNIFORM3UIVPROC) (GLuint program, GLint location, GLsizei count, const GLuint* value);
+typedef void (GLAPIENTRY * PFNGLPROGRAMUNIFORM4DPROC) (GLuint program, GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
+typedef void (GLAPIENTRY * PFNGLPROGRAMUNIFORM4DVPROC) (GLuint program, GLint location, GLsizei count, const GLdouble* value);
+typedef void (GLAPIENTRY * PFNGLPROGRAMUNIFORM4FPROC) (GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+typedef void (GLAPIENTRY * PFNGLPROGRAMUNIFORM4FVPROC) (GLuint program, GLint location, GLsizei count, const GLfloat* value);
+typedef void (GLAPIENTRY * PFNGLPROGRAMUNIFORM4IPROC) (GLuint program, GLint location, GLint x, GLint y, GLint z, GLint w);
+typedef void (GLAPIENTRY * PFNGLPROGRAMUNIFORM4IVPROC) (GLuint program, GLint location, GLsizei count, const GLint* value);
+typedef void (GLAPIENTRY * PFNGLPROGRAMUNIFORM4UIPROC) (GLuint program, GLint location, GLuint x, GLuint y, GLuint z, GLuint w);
+typedef void (GLAPIENTRY * PFNGLPROGRAMUNIFORM4UIVPROC) (GLuint program, GLint location, GLsizei count, const GLuint* value);
+typedef void (GLAPIENTRY * PFNGLPROGRAMUNIFORMMATRIX2DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble* value);
+typedef void (GLAPIENTRY * PFNGLPROGRAMUNIFORMMATRIX2FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
+typedef void (GLAPIENTRY * PFNGLPROGRAMUNIFORMMATRIX2X3DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble* value);
+typedef void (GLAPIENTRY * PFNGLPROGRAMUNIFORMMATRIX2X3FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
+typedef void (GLAPIENTRY * PFNGLPROGRAMUNIFORMMATRIX2X4DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble* value);
+typedef void (GLAPIENTRY * PFNGLPROGRAMUNIFORMMATRIX2X4FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
+typedef void (GLAPIENTRY * PFNGLPROGRAMUNIFORMMATRIX3DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble* value);
+typedef void (GLAPIENTRY * PFNGLPROGRAMUNIFORMMATRIX3FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
+typedef void (GLAPIENTRY * PFNGLPROGRAMUNIFORMMATRIX3X2DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble* value);
+typedef void (GLAPIENTRY * PFNGLPROGRAMUNIFORMMATRIX3X2FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
+typedef void (GLAPIENTRY * PFNGLPROGRAMUNIFORMMATRIX3X4DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble* value);
+typedef void (GLAPIENTRY * PFNGLPROGRAMUNIFORMMATRIX3X4FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
+typedef void (GLAPIENTRY * PFNGLPROGRAMUNIFORMMATRIX4DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble* value);
+typedef void (GLAPIENTRY * PFNGLPROGRAMUNIFORMMATRIX4FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
+typedef void (GLAPIENTRY * PFNGLPROGRAMUNIFORMMATRIX4X2DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble* value);
+typedef void (GLAPIENTRY * PFNGLPROGRAMUNIFORMMATRIX4X2FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
+typedef void (GLAPIENTRY * PFNGLPROGRAMUNIFORMMATRIX4X3DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble* value);
+typedef void (GLAPIENTRY * PFNGLPROGRAMUNIFORMMATRIX4X3FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
+typedef void (GLAPIENTRY * PFNGLUSEPROGRAMSTAGESPROC) (GLuint pipeline, GLbitfield stages, GLuint program);
+typedef void (GLAPIENTRY * PFNGLVALIDATEPROGRAMPIPELINEPROC) (GLuint pipeline);
+
+#define glActiveShaderProgram GLEW_GET_FUN(__glewActiveShaderProgram)
+#define glBindProgramPipeline GLEW_GET_FUN(__glewBindProgramPipeline)
+#define glCreateShaderProgramv GLEW_GET_FUN(__glewCreateShaderProgramv)
+#define glDeleteProgramPipelines GLEW_GET_FUN(__glewDeleteProgramPipelines)
+#define glGenProgramPipelines GLEW_GET_FUN(__glewGenProgramPipelines)
+#define glGetProgramPipelineInfoLog GLEW_GET_FUN(__glewGetProgramPipelineInfoLog)
+#define glGetProgramPipelineiv GLEW_GET_FUN(__glewGetProgramPipelineiv)
+#define glIsProgramPipeline GLEW_GET_FUN(__glewIsProgramPipeline)
+#define glProgramUniform1d GLEW_GET_FUN(__glewProgramUniform1d)
+#define glProgramUniform1dv GLEW_GET_FUN(__glewProgramUniform1dv)
+#define glProgramUniform1f GLEW_GET_FUN(__glewProgramUniform1f)
+#define glProgramUniform1fv GLEW_GET_FUN(__glewProgramUniform1fv)
+#define glProgramUniform1i GLEW_GET_FUN(__glewProgramUniform1i)
+#define glProgramUniform1iv GLEW_GET_FUN(__glewProgramUniform1iv)
+#define glProgramUniform1ui GLEW_GET_FUN(__glewProgramUniform1ui)
+#define glProgramUniform1uiv GLEW_GET_FUN(__glewProgramUniform1uiv)
+#define glProgramUniform2d GLEW_GET_FUN(__glewProgramUniform2d)
+#define glProgramUniform2dv GLEW_GET_FUN(__glewProgramUniform2dv)
+#define glProgramUniform2f GLEW_GET_FUN(__glewProgramUniform2f)
+#define glProgramUniform2fv GLEW_GET_FUN(__glewProgramUniform2fv)
+#define glProgramUniform2i GLEW_GET_FUN(__glewProgramUniform2i)
+#define glProgramUniform2iv GLEW_GET_FUN(__glewProgramUniform2iv)
+#define glProgramUniform2ui GLEW_GET_FUN(__glewProgramUniform2ui)
+#define glProgramUniform2uiv GLEW_GET_FUN(__glewProgramUniform2uiv)
+#define glProgramUniform3d GLEW_GET_FUN(__glewProgramUniform3d)
+#define glProgramUniform3dv GLEW_GET_FUN(__glewProgramUniform3dv)
+#define glProgramUniform3f GLEW_GET_FUN(__glewProgramUniform3f)
+#define glProgramUniform3fv GLEW_GET_FUN(__glewProgramUniform3fv)
+#define glProgramUniform3i GLEW_GET_FUN(__glewProgramUniform3i)
+#define glProgramUniform3iv GLEW_GET_FUN(__glewProgramUniform3iv)
+#define glProgramUniform3ui GLEW_GET_FUN(__glewProgramUniform3ui)
+#define glProgramUniform3uiv GLEW_GET_FUN(__glewProgramUniform3uiv)
+#define glProgramUniform4d GLEW_GET_FUN(__glewProgramUniform4d)
+#define glProgramUniform4dv GLEW_GET_FUN(__glewProgramUniform4dv)
+#define glProgramUniform4f GLEW_GET_FUN(__glewProgramUniform4f)
+#define glProgramUniform4fv GLEW_GET_FUN(__glewProgramUniform4fv)
+#define glProgramUniform4i GLEW_GET_FUN(__glewProgramUniform4i)
+#define glProgramUniform4iv GLEW_GET_FUN(__glewProgramUniform4iv)
+#define glProgramUniform4ui GLEW_GET_FUN(__glewProgramUniform4ui)
+#define glProgramUniform4uiv GLEW_GET_FUN(__glewProgramUniform4uiv)
+#define glProgramUniformMatrix2dv GLEW_GET_FUN(__glewProgramUniformMatrix2dv)
+#define glProgramUniformMatrix2fv GLEW_GET_FUN(__glewProgramUniformMatrix2fv)
+#define glProgramUniformMatrix2x3dv GLEW_GET_FUN(__glewProgramUniformMatrix2x3dv)
+#define glProgramUniformMatrix2x3fv GLEW_GET_FUN(__glewProgramUniformMatrix2x3fv)
+#define glProgramUniformMatrix2x4dv GLEW_GET_FUN(__glewProgramUniformMatrix2x4dv)
+#define glProgramUniformMatrix2x4fv GLEW_GET_FUN(__glewProgramUniformMatrix2x4fv)
+#define glProgramUniformMatrix3dv GLEW_GET_FUN(__glewProgramUniformMatrix3dv)
+#define glProgramUniformMatrix3fv GLEW_GET_FUN(__glewProgramUniformMatrix3fv)
+#define glProgramUniformMatrix3x2dv GLEW_GET_FUN(__glewProgramUniformMatrix3x2dv)
+#define glProgramUniformMatrix3x2fv GLEW_GET_FUN(__glewProgramUniformMatrix3x2fv)
+#define glProgramUniformMatrix3x4dv GLEW_GET_FUN(__glewProgramUniformMatrix3x4dv)
+#define glProgramUniformMatrix3x4fv GLEW_GET_FUN(__glewProgramUniformMatrix3x4fv)
+#define glProgramUniformMatrix4dv GLEW_GET_FUN(__glewProgramUniformMatrix4dv)
+#define glProgramUniformMatrix4fv GLEW_GET_FUN(__glewProgramUniformMatrix4fv)
+#define glProgramUniformMatrix4x2dv GLEW_GET_FUN(__glewProgramUniformMatrix4x2dv)
+#define glProgramUniformMatrix4x2fv GLEW_GET_FUN(__glewProgramUniformMatrix4x2fv)
+#define glProgramUniformMatrix4x3dv GLEW_GET_FUN(__glewProgramUniformMatrix4x3dv)
+#define glProgramUniformMatrix4x3fv GLEW_GET_FUN(__glewProgramUniformMatrix4x3fv)
+#define glUseProgramStages GLEW_GET_FUN(__glewUseProgramStages)
+#define glValidateProgramPipeline GLEW_GET_FUN(__glewValidateProgramPipeline)
+
+#define GLEW_ARB_separate_shader_objects GLEW_GET_VAR(__GLEW_ARB_separate_shader_objects)
+
+#endif /* GL_ARB_separate_shader_objects */
+
+/* --------------------- GL_ARB_shader_atomic_counters --------------------- */
+
+#ifndef GL_ARB_shader_atomic_counters
+#define GL_ARB_shader_atomic_counters 1
+
+#define GL_ATOMIC_COUNTER_BUFFER 0x92C0
+#define GL_ATOMIC_COUNTER_BUFFER_BINDING 0x92C1
+#define GL_ATOMIC_COUNTER_BUFFER_START 0x92C2
+#define GL_ATOMIC_COUNTER_BUFFER_SIZE 0x92C3
+#define GL_ATOMIC_COUNTER_BUFFER_DATA_SIZE 0x92C4
+#define GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTERS 0x92C5
+#define GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTER_INDICES 0x92C6
+#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_VERTEX_SHADER 0x92C7
+#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_CONTROL_SHADER 0x92C8
+#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_EVALUATION_SHADER 0x92C9
+#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_GEOMETRY_SHADER 0x92CA
+#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_FRAGMENT_SHADER 0x92CB
+#define GL_MAX_VERTEX_ATOMIC_COUNTER_BUFFERS 0x92CC
+#define GL_MAX_TESS_CONTROL_ATOMIC_COUNTER_BUFFERS 0x92CD
+#define GL_MAX_TESS_EVALUATION_ATOMIC_COUNTER_BUFFERS 0x92CE
+#define GL_MAX_GEOMETRY_ATOMIC_COUNTER_BUFFERS 0x92CF
+#define GL_MAX_FRAGMENT_ATOMIC_COUNTER_BUFFERS 0x92D0
+#define GL_MAX_COMBINED_ATOMIC_COUNTER_BUFFERS 0x92D1
+#define GL_MAX_VERTEX_ATOMIC_COUNTERS 0x92D2
+#define GL_MAX_TESS_CONTROL_ATOMIC_COUNTERS 0x92D3
+#define GL_MAX_TESS_EVALUATION_ATOMIC_COUNTERS 0x92D4
+#define GL_MAX_GEOMETRY_ATOMIC_COUNTERS 0x92D5
+#define GL_MAX_FRAGMENT_ATOMIC_COUNTERS 0x92D6
+#define GL_MAX_COMBINED_ATOMIC_COUNTERS 0x92D7
+#define GL_MAX_ATOMIC_COUNTER_BUFFER_SIZE 0x92D8
+#define GL_ACTIVE_ATOMIC_COUNTER_BUFFERS 0x92D9
+#define GL_UNIFORM_ATOMIC_COUNTER_BUFFER_INDEX 0x92DA
+#define GL_UNSIGNED_INT_ATOMIC_COUNTER 0x92DB
+#define GL_MAX_ATOMIC_COUNTER_BUFFER_BINDINGS 0x92DC
+
+typedef void (GLAPIENTRY * PFNGLGETACTIVEATOMICCOUNTERBUFFERIVPROC) (GLuint program, GLuint bufferIndex, GLenum pname, GLint* params);
+
+#define glGetActiveAtomicCounterBufferiv GLEW_GET_FUN(__glewGetActiveAtomicCounterBufferiv)
+
+#define GLEW_ARB_shader_atomic_counters GLEW_GET_VAR(__GLEW_ARB_shader_atomic_counters)
+
+#endif /* GL_ARB_shader_atomic_counters */
+
+/* ----------------------- GL_ARB_shader_bit_encoding ---------------------- */
+
+#ifndef GL_ARB_shader_bit_encoding
+#define GL_ARB_shader_bit_encoding 1
+
+#define GLEW_ARB_shader_bit_encoding GLEW_GET_VAR(__GLEW_ARB_shader_bit_encoding)
+
+#endif /* GL_ARB_shader_bit_encoding */
+
+/* --------------------- GL_ARB_shader_draw_parameters --------------------- */
+
+#ifndef GL_ARB_shader_draw_parameters
+#define GL_ARB_shader_draw_parameters 1
+
+#define GLEW_ARB_shader_draw_parameters GLEW_GET_VAR(__GLEW_ARB_shader_draw_parameters)
+
+#endif /* GL_ARB_shader_draw_parameters */
+
+/* ------------------------ GL_ARB_shader_group_vote ----------------------- */
+
+#ifndef GL_ARB_shader_group_vote
+#define GL_ARB_shader_group_vote 1
+
+#define GLEW_ARB_shader_group_vote GLEW_GET_VAR(__GLEW_ARB_shader_group_vote)
+
+#endif /* GL_ARB_shader_group_vote */
+
+/* --------------------- GL_ARB_shader_image_load_store -------------------- */
+
+#ifndef GL_ARB_shader_image_load_store
+#define GL_ARB_shader_image_load_store 1
+
+#define GL_VERTEX_ATTRIB_ARRAY_BARRIER_BIT 0x00000001
+#define GL_ELEMENT_ARRAY_BARRIER_BIT 0x00000002
+#define GL_UNIFORM_BARRIER_BIT 0x00000004
+#define GL_TEXTURE_FETCH_BARRIER_BIT 0x00000008
+#define GL_SHADER_IMAGE_ACCESS_BARRIER_BIT 0x00000020
+#define GL_COMMAND_BARRIER_BIT 0x00000040
+#define GL_PIXEL_BUFFER_BARRIER_BIT 0x00000080
+#define GL_TEXTURE_UPDATE_BARRIER_BIT 0x00000100
+#define GL_BUFFER_UPDATE_BARRIER_BIT 0x00000200
+#define GL_FRAMEBUFFER_BARRIER_BIT 0x00000400
+#define GL_TRANSFORM_FEEDBACK_BARRIER_BIT 0x00000800
+#define GL_ATOMIC_COUNTER_BARRIER_BIT 0x00001000
+#define GL_MAX_IMAGE_UNITS 0x8F38
+#define GL_MAX_COMBINED_IMAGE_UNITS_AND_FRAGMENT_OUTPUTS 0x8F39
+#define GL_IMAGE_BINDING_NAME 0x8F3A
+#define GL_IMAGE_BINDING_LEVEL 0x8F3B
+#define GL_IMAGE_BINDING_LAYERED 0x8F3C
+#define GL_IMAGE_BINDING_LAYER 0x8F3D
+#define GL_IMAGE_BINDING_ACCESS 0x8F3E
+#define GL_IMAGE_1D 0x904C
+#define GL_IMAGE_2D 0x904D
+#define GL_IMAGE_3D 0x904E
+#define GL_IMAGE_2D_RECT 0x904F
+#define GL_IMAGE_CUBE 0x9050
+#define GL_IMAGE_BUFFER 0x9051
+#define GL_IMAGE_1D_ARRAY 0x9052
+#define GL_IMAGE_2D_ARRAY 0x9053
+#define GL_IMAGE_CUBE_MAP_ARRAY 0x9054
+#define GL_IMAGE_2D_MULTISAMPLE 0x9055
+#define GL_IMAGE_2D_MULTISAMPLE_ARRAY 0x9056
+#define GL_INT_IMAGE_1D 0x9057
+#define GL_INT_IMAGE_2D 0x9058
+#define GL_INT_IMAGE_3D 0x9059
+#define GL_INT_IMAGE_2D_RECT 0x905A
+#define GL_INT_IMAGE_CUBE 0x905B
+#define GL_INT_IMAGE_BUFFER 0x905C
+#define GL_INT_IMAGE_1D_ARRAY 0x905D
+#define GL_INT_IMAGE_2D_ARRAY 0x905E
+#define GL_INT_IMAGE_CUBE_MAP_ARRAY 0x905F
+#define GL_INT_IMAGE_2D_MULTISAMPLE 0x9060
+#define GL_INT_IMAGE_2D_MULTISAMPLE_ARRAY 0x9061
+#define GL_UNSIGNED_INT_IMAGE_1D 0x9062
+#define GL_UNSIGNED_INT_IMAGE_2D 0x9063
+#define GL_UNSIGNED_INT_IMAGE_3D 0x9064
+#define GL_UNSIGNED_INT_IMAGE_2D_RECT 0x9065
+#define GL_UNSIGNED_INT_IMAGE_CUBE 0x9066
+#define GL_UNSIGNED_INT_IMAGE_BUFFER 0x9067
+#define GL_UNSIGNED_INT_IMAGE_1D_ARRAY 0x9068
+#define GL_UNSIGNED_INT_IMAGE_2D_ARRAY 0x9069
+#define GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY 0x906A
+#define GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE 0x906B
+#define GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_ARRAY 0x906C
+#define GL_MAX_IMAGE_SAMPLES 0x906D
+#define GL_IMAGE_BINDING_FORMAT 0x906E
+#define GL_IMAGE_FORMAT_COMPATIBILITY_TYPE 0x90C7
+#define GL_IMAGE_FORMAT_COMPATIBILITY_BY_SIZE 0x90C8
+#define GL_IMAGE_FORMAT_COMPATIBILITY_BY_CLASS 0x90C9
+#define GL_MAX_VERTEX_IMAGE_UNIFORMS 0x90CA
+#define GL_MAX_TESS_CONTROL_IMAGE_UNIFORMS 0x90CB
+#define GL_MAX_TESS_EVALUATION_IMAGE_UNIFORMS 0x90CC
+#define GL_MAX_GEOMETRY_IMAGE_UNIFORMS 0x90CD
+#define GL_MAX_FRAGMENT_IMAGE_UNIFORMS 0x90CE
+#define GL_MAX_COMBINED_IMAGE_UNIFORMS 0x90CF
+#define GL_ALL_BARRIER_BITS 0xFFFFFFFF
+
+typedef void (GLAPIENTRY * PFNGLBINDIMAGETEXTUREPROC) (GLuint unit, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLenum format);
+typedef void (GLAPIENTRY * PFNGLMEMORYBARRIERPROC) (GLbitfield barriers);
+
+#define glBindImageTexture GLEW_GET_FUN(__glewBindImageTexture)
+#define glMemoryBarrier GLEW_GET_FUN(__glewMemoryBarrier)
+
+#define GLEW_ARB_shader_image_load_store GLEW_GET_VAR(__GLEW_ARB_shader_image_load_store)
+
+#endif /* GL_ARB_shader_image_load_store */
+
+/* ------------------------ GL_ARB_shader_image_size ----------------------- */
+
+#ifndef GL_ARB_shader_image_size
+#define GL_ARB_shader_image_size 1
+
+#define GLEW_ARB_shader_image_size GLEW_GET_VAR(__GLEW_ARB_shader_image_size)
+
+#endif /* GL_ARB_shader_image_size */
+
+/* ------------------------- GL_ARB_shader_objects ------------------------- */
+
+#ifndef GL_ARB_shader_objects
+#define GL_ARB_shader_objects 1
+
+#define GL_PROGRAM_OBJECT_ARB 0x8B40
+#define GL_SHADER_OBJECT_ARB 0x8B48
+#define GL_OBJECT_TYPE_ARB 0x8B4E
+#define GL_OBJECT_SUBTYPE_ARB 0x8B4F
+#define GL_FLOAT_VEC2_ARB 0x8B50
+#define GL_FLOAT_VEC3_ARB 0x8B51
+#define GL_FLOAT_VEC4_ARB 0x8B52
+#define GL_INT_VEC2_ARB 0x8B53
+#define GL_INT_VEC3_ARB 0x8B54
+#define GL_INT_VEC4_ARB 0x8B55
+#define GL_BOOL_ARB 0x8B56
+#define GL_BOOL_VEC2_ARB 0x8B57
+#define GL_BOOL_VEC3_ARB 0x8B58
+#define GL_BOOL_VEC4_ARB 0x8B59
+#define GL_FLOAT_MAT2_ARB 0x8B5A
+#define GL_FLOAT_MAT3_ARB 0x8B5B
+#define GL_FLOAT_MAT4_ARB 0x8B5C
+#define GL_SAMPLER_1D_ARB 0x8B5D
+#define GL_SAMPLER_2D_ARB 0x8B5E
+#define GL_SAMPLER_3D_ARB 0x8B5F
+#define GL_SAMPLER_CUBE_ARB 0x8B60
+#define GL_SAMPLER_1D_SHADOW_ARB 0x8B61
+#define GL_SAMPLER_2D_SHADOW_ARB 0x8B62
+#define GL_SAMPLER_2D_RECT_ARB 0x8B63
+#define GL_SAMPLER_2D_RECT_SHADOW_ARB 0x8B64
+#define GL_OBJECT_DELETE_STATUS_ARB 0x8B80
+#define GL_OBJECT_COMPILE_STATUS_ARB 0x8B81
+#define GL_OBJECT_LINK_STATUS_ARB 0x8B82
+#define GL_OBJECT_VALIDATE_STATUS_ARB 0x8B83
+#define GL_OBJECT_INFO_LOG_LENGTH_ARB 0x8B84
+#define GL_OBJECT_ATTACHED_OBJECTS_ARB 0x8B85
+#define GL_OBJECT_ACTIVE_UNIFORMS_ARB 0x8B86
+#define GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB 0x8B87
+#define GL_OBJECT_SHADER_SOURCE_LENGTH_ARB 0x8B88
+
+typedef char GLcharARB;
+typedef unsigned int GLhandleARB;
+
+typedef void (GLAPIENTRY * PFNGLATTACHOBJECTARBPROC) (GLhandleARB containerObj, GLhandleARB obj);
+typedef void (GLAPIENTRY * PFNGLCOMPILESHADERARBPROC) (GLhandleARB shaderObj);
+typedef GLhandleARB (GLAPIENTRY * PFNGLCREATEPROGRAMOBJECTARBPROC) (void);
+typedef GLhandleARB (GLAPIENTRY * PFNGLCREATESHADEROBJECTARBPROC) (GLenum shaderType);
+typedef void (GLAPIENTRY * PFNGLDELETEOBJECTARBPROC) (GLhandleARB obj);
+typedef void (GLAPIENTRY * PFNGLDETACHOBJECTARBPROC) (GLhandleARB containerObj, GLhandleARB attachedObj);
+typedef void (GLAPIENTRY * PFNGLGETACTIVEUNIFORMARBPROC) (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei* length, GLint *size, GLenum *type, GLcharARB *name);
+typedef void (GLAPIENTRY * PFNGLGETATTACHEDOBJECTSARBPROC) (GLhandleARB containerObj, GLsizei maxCount, GLsizei* count, GLhandleARB *obj);
+typedef GLhandleARB (GLAPIENTRY * PFNGLGETHANDLEARBPROC) (GLenum pname);
+typedef void (GLAPIENTRY * PFNGLGETINFOLOGARBPROC) (GLhandleARB obj, GLsizei maxLength, GLsizei* length, GLcharARB *infoLog);
+typedef void (GLAPIENTRY * PFNGLGETOBJECTPARAMETERFVARBPROC) (GLhandleARB obj, GLenum pname, GLfloat* params);
+typedef void (GLAPIENTRY * PFNGLGETOBJECTPARAMETERIVARBPROC) (GLhandleARB obj, GLenum pname, GLint* params);
+typedef void (GLAPIENTRY * PFNGLGETSHADERSOURCEARBPROC) (GLhandleARB obj, GLsizei maxLength, GLsizei* length, GLcharARB *source);
+typedef GLint (GLAPIENTRY * PFNGLGETUNIFORMLOCATIONARBPROC) (GLhandleARB programObj, const GLcharARB* name);
+typedef void (GLAPIENTRY * PFNGLGETUNIFORMFVARBPROC) (GLhandleARB programObj, GLint location, GLfloat* params);
+typedef void (GLAPIENTRY * PFNGLGETUNIFORMIVARBPROC) (GLhandleARB programObj, GLint location, GLint* params);
+typedef void (GLAPIENTRY * PFNGLLINKPROGRAMARBPROC) (GLhandleARB programObj);
+typedef void (GLAPIENTRY * PFNGLSHADERSOURCEARBPROC) (GLhandleARB shaderObj, GLsizei count, const GLcharARB ** string, const GLint *length);
+typedef void (GLAPIENTRY * PFNGLUNIFORM1FARBPROC) (GLint location, GLfloat v0);
+typedef void (GLAPIENTRY * PFNGLUNIFORM1FVARBPROC) (GLint location, GLsizei count, const GLfloat* value);
+typedef void (GLAPIENTRY * PFNGLUNIFORM1IARBPROC) (GLint location, GLint v0);
+typedef void (GLAPIENTRY * PFNGLUNIFORM1IVARBPROC) (GLint location, GLsizei count, const GLint* value);
+typedef void (GLAPIENTRY * PFNGLUNIFORM2FARBPROC) (GLint location, GLfloat v0, GLfloat v1);
+typedef void (GLAPIENTRY * PFNGLUNIFORM2FVARBPROC) (GLint location, GLsizei count, const GLfloat* value);
+typedef void (GLAPIENTRY * PFNGLUNIFORM2IARBPROC) (GLint location, GLint v0, GLint v1);
+typedef void (GLAPIENTRY * PFNGLUNIFORM2IVARBPROC) (GLint location, GLsizei count, const GLint* value);
+typedef void (GLAPIENTRY * PFNGLUNIFORM3FARBPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
+typedef void (GLAPIENTRY * PFNGLUNIFORM3FVARBPROC) (GLint location, GLsizei count, const GLfloat* value);
+typedef void (GLAPIENTRY * PFNGLUNIFORM3IARBPROC) (GLint location, GLint v0, GLint v1, GLint v2);
+typedef void (GLAPIENTRY * PFNGLUNIFORM3IVARBPROC) (GLint location, GLsizei count, const GLint* value);
+typedef void (GLAPIENTRY * PFNGLUNIFORM4FARBPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
+typedef void (GLAPIENTRY * PFNGLUNIFORM4FVARBPROC) (GLint location, GLsizei count, const GLfloat* value);
+typedef void (GLAPIENTRY * PFNGLUNIFORM4IARBPROC) (GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
+typedef void (GLAPIENTRY * PFNGLUNIFORM4IVARBPROC) (GLint location, GLsizei count, const GLint* value);
+typedef void (GLAPIENTRY * PFNGLUNIFORMMATRIX2FVARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
+typedef void (GLAPIENTRY * PFNGLUNIFORMMATRIX3FVARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
+typedef void (GLAPIENTRY * PFNGLUNIFORMMATRIX4FVARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
+typedef void (GLAPIENTRY * PFNGLUSEPROGRAMOBJECTARBPROC) (GLhandleARB programObj);
+typedef void (GLAPIENTRY * PFNGLVALIDATEPROGRAMARBPROC) (GLhandleARB programObj);
+
+#define glAttachObjectARB GLEW_GET_FUN(__glewAttachObjectARB)
+#define glCompileShaderARB GLEW_GET_FUN(__glewCompileShaderARB)
+#define glCreateProgramObjectARB GLEW_GET_FUN(__glewCreateProgramObjectARB)
+#define glCreateShaderObjectARB GLEW_GET_FUN(__glewCreateShaderObjectARB)
+#define glDeleteObjectARB GLEW_GET_FUN(__glewDeleteObjectARB)
+#define glDetachObjectARB GLEW_GET_FUN(__glewDetachObjectARB)
+#define glGetActiveUniformARB GLEW_GET_FUN(__glewGetActiveUniformARB)
+#define glGetAttachedObjectsARB GLEW_GET_FUN(__glewGetAttachedObjectsARB)
+#define glGetHandleARB GLEW_GET_FUN(__glewGetHandleARB)
+#define glGetInfoLogARB GLEW_GET_FUN(__glewGetInfoLogARB)
+#define glGetObjectParameterfvARB GLEW_GET_FUN(__glewGetObjectParameterfvARB)
+#define glGetObjectParameterivARB GLEW_GET_FUN(__glewGetObjectParameterivARB)
+#define glGetShaderSourceARB GLEW_GET_FUN(__glewGetShaderSourceARB)
+#define glGetUniformLocationARB GLEW_GET_FUN(__glewGetUniformLocationARB)
+#define glGetUniformfvARB GLEW_GET_FUN(__glewGetUniformfvARB)
+#define glGetUniformivARB GLEW_GET_FUN(__glewGetUniformivARB)
+#define glLinkProgramARB GLEW_GET_FUN(__glewLinkProgramARB)
+#define glShaderSourceARB GLEW_GET_FUN(__glewShaderSourceARB)
+#define glUniform1fARB GLEW_GET_FUN(__glewUniform1fARB)
+#define glUniform1fvARB GLEW_GET_FUN(__glewUniform1fvARB)
+#define glUniform1iARB GLEW_GET_FUN(__glewUniform1iARB)
+#define glUniform1ivARB GLEW_GET_FUN(__glewUniform1ivARB)
+#define glUniform2fARB GLEW_GET_FUN(__glewUniform2fARB)
+#define glUniform2fvARB GLEW_GET_FUN(__glewUniform2fvARB)
+#define glUniform2iARB GLEW_GET_FUN(__glewUniform2iARB)
+#define glUniform2ivARB GLEW_GET_FUN(__glewUniform2ivARB)
+#define glUniform3fARB GLEW_GET_FUN(__glewUniform3fARB)
+#define glUniform3fvARB GLEW_GET_FUN(__glewUniform3fvARB)
+#define glUniform3iARB GLEW_GET_FUN(__glewUniform3iARB)
+#define glUniform3ivARB GLEW_GET_FUN(__glewUniform3ivARB)
+#define glUniform4fARB GLEW_GET_FUN(__glewUniform4fARB)
+#define glUniform4fvARB GLEW_GET_FUN(__glewUniform4fvARB)
+#define glUniform4iARB GLEW_GET_FUN(__glewUniform4iARB)
+#define glUniform4ivARB GLEW_GET_FUN(__glewUniform4ivARB)
+#define glUniformMatrix2fvARB GLEW_GET_FUN(__glewUniformMatrix2fvARB)
+#define glUniformMatrix3fvARB GLEW_GET_FUN(__glewUniformMatrix3fvARB)
+#define glUniformMatrix4fvARB GLEW_GET_FUN(__glewUniformMatrix4fvARB)
+#define glUseProgramObjectARB GLEW_GET_FUN(__glewUseProgramObjectARB)
+#define glValidateProgramARB GLEW_GET_FUN(__glewValidateProgramARB)
+
+#define GLEW_ARB_shader_objects GLEW_GET_VAR(__GLEW_ARB_shader_objects)
+
+#endif /* GL_ARB_shader_objects */
+
+/* ------------------------ GL_ARB_shader_precision ------------------------ */
+
+#ifndef GL_ARB_shader_precision
+#define GL_ARB_shader_precision 1
+
+#define GLEW_ARB_shader_precision GLEW_GET_VAR(__GLEW_ARB_shader_precision)
+
+#endif /* GL_ARB_shader_precision */
+
+/* ---------------------- GL_ARB_shader_stencil_export --------------------- */
+
+#ifndef GL_ARB_shader_stencil_export
+#define GL_ARB_shader_stencil_export 1
+
+#define GLEW_ARB_shader_stencil_export GLEW_GET_VAR(__GLEW_ARB_shader_stencil_export)
+
+#endif /* GL_ARB_shader_stencil_export */
+
+/* ------------------ GL_ARB_shader_storage_buffer_object ------------------ */
+
+#ifndef GL_ARB_shader_storage_buffer_object
+#define GL_ARB_shader_storage_buffer_object 1
+
+#define GL_SHADER_STORAGE_BARRIER_BIT 0x2000
+#define GL_MAX_COMBINED_SHADER_OUTPUT_RESOURCES 0x8F39
+#define GL_SHADER_STORAGE_BUFFER 0x90D2
+#define GL_SHADER_STORAGE_BUFFER_BINDING 0x90D3
+#define GL_SHADER_STORAGE_BUFFER_START 0x90D4
+#define GL_SHADER_STORAGE_BUFFER_SIZE 0x90D5
+#define GL_MAX_VERTEX_SHADER_STORAGE_BLOCKS 0x90D6
+#define GL_MAX_GEOMETRY_SHADER_STORAGE_BLOCKS 0x90D7
+#define GL_MAX_TESS_CONTROL_SHADER_STORAGE_BLOCKS 0x90D8
+#define GL_MAX_TESS_EVALUATION_SHADER_STORAGE_BLOCKS 0x90D9
+#define GL_MAX_FRAGMENT_SHADER_STORAGE_BLOCKS 0x90DA
+#define GL_MAX_COMPUTE_SHADER_STORAGE_BLOCKS 0x90DB
+#define GL_MAX_COMBINED_SHADER_STORAGE_BLOCKS 0x90DC
+#define GL_MAX_SHADER_STORAGE_BUFFER_BINDINGS 0x90DD
+#define GL_MAX_SHADER_STORAGE_BLOCK_SIZE 0x90DE
+#define GL_SHADER_STORAGE_BUFFER_OFFSET_ALIGNMENT 0x90DF
+
+typedef void (GLAPIENTRY * PFNGLSHADERSTORAGEBLOCKBINDINGPROC) (GLuint program, GLuint storageBlockIndex, GLuint storageBlockBinding);
+
+#define glShaderStorageBlockBinding GLEW_GET_FUN(__glewShaderStorageBlockBinding)
+
+#define GLEW_ARB_shader_storage_buffer_object GLEW_GET_VAR(__GLEW_ARB_shader_storage_buffer_object)
+
+#endif /* GL_ARB_shader_storage_buffer_object */
+
+/* ------------------------ GL_ARB_shader_subroutine ----------------------- */
+
+#ifndef GL_ARB_shader_subroutine
+#define GL_ARB_shader_subroutine 1
+
+#define GL_ACTIVE_SUBROUTINES 0x8DE5
+#define GL_ACTIVE_SUBROUTINE_UNIFORMS 0x8DE6
+#define GL_MAX_SUBROUTINES 0x8DE7
+#define GL_MAX_SUBROUTINE_UNIFORM_LOCATIONS 0x8DE8
+#define GL_ACTIVE_SUBROUTINE_UNIFORM_LOCATIONS 0x8E47
+#define GL_ACTIVE_SUBROUTINE_MAX_LENGTH 0x8E48
+#define GL_ACTIVE_SUBROUTINE_UNIFORM_MAX_LENGTH 0x8E49
+#define GL_NUM_COMPATIBLE_SUBROUTINES 0x8E4A
+#define GL_COMPATIBLE_SUBROUTINES 0x8E4B
+
+typedef void (GLAPIENTRY * PFNGLGETACTIVESUBROUTINENAMEPROC) (GLuint program, GLenum shadertype, GLuint index, GLsizei bufsize, GLsizei* length, GLchar *name);
+typedef void (GLAPIENTRY * PFNGLGETACTIVESUBROUTINEUNIFORMNAMEPROC) (GLuint program, GLenum shadertype, GLuint index, GLsizei bufsize, GLsizei* length, GLchar *name);
+typedef void (GLAPIENTRY * PFNGLGETACTIVESUBROUTINEUNIFORMIVPROC) (GLuint program, GLenum shadertype, GLuint index, GLenum pname, GLint* values);
+typedef void (GLAPIENTRY * PFNGLGETPROGRAMSTAGEIVPROC) (GLuint program, GLenum shadertype, GLenum pname, GLint* values);
+typedef GLuint (GLAPIENTRY * PFNGLGETSUBROUTINEINDEXPROC) (GLuint program, GLenum shadertype, const GLchar* name);
+typedef GLint (GLAPIENTRY * PFNGLGETSUBROUTINEUNIFORMLOCATIONPROC) (GLuint program, GLenum shadertype, const GLchar* name);
+typedef void (GLAPIENTRY * PFNGLGETUNIFORMSUBROUTINEUIVPROC) (GLenum shadertype, GLint location, GLuint* params);
+typedef void (GLAPIENTRY * PFNGLUNIFORMSUBROUTINESUIVPROC) (GLenum shadertype, GLsizei count, const GLuint* indices);
+
+#define glGetActiveSubroutineName GLEW_GET_FUN(__glewGetActiveSubroutineName)
+#define glGetActiveSubroutineUniformName GLEW_GET_FUN(__glewGetActiveSubroutineUniformName)
+#define glGetActiveSubroutineUniformiv GLEW_GET_FUN(__glewGetActiveSubroutineUniformiv)
+#define glGetProgramStageiv GLEW_GET_FUN(__glewGetProgramStageiv)
+#define glGetSubroutineIndex GLEW_GET_FUN(__glewGetSubroutineIndex)
+#define glGetSubroutineUniformLocation GLEW_GET_FUN(__glewGetSubroutineUniformLocation)
+#define glGetUniformSubroutineuiv GLEW_GET_FUN(__glewGetUniformSubroutineuiv)
+#define glUniformSubroutinesuiv GLEW_GET_FUN(__glewUniformSubroutinesuiv)
+
+#define GLEW_ARB_shader_subroutine GLEW_GET_VAR(__GLEW_ARB_shader_subroutine)
+
+#endif /* GL_ARB_shader_subroutine */
+
+/* ------------------ GL_ARB_shader_texture_image_samples ------------------ */
+
+#ifndef GL_ARB_shader_texture_image_samples
+#define GL_ARB_shader_texture_image_samples 1
+
+#define GLEW_ARB_shader_texture_image_samples GLEW_GET_VAR(__GLEW_ARB_shader_texture_image_samples)
+
+#endif /* GL_ARB_shader_texture_image_samples */
+
+/* ----------------------- GL_ARB_shader_texture_lod ----------------------- */
+
+#ifndef GL_ARB_shader_texture_lod
+#define GL_ARB_shader_texture_lod 1
+
+#define GLEW_ARB_shader_texture_lod GLEW_GET_VAR(__GLEW_ARB_shader_texture_lod)
+
+#endif /* GL_ARB_shader_texture_lod */
+
+/* ---------------------- GL_ARB_shading_language_100 ---------------------- */
+
+#ifndef GL_ARB_shading_language_100
+#define GL_ARB_shading_language_100 1
+
+#define GL_SHADING_LANGUAGE_VERSION_ARB 0x8B8C
+
+#define GLEW_ARB_shading_language_100 GLEW_GET_VAR(__GLEW_ARB_shading_language_100)
+
+#endif /* GL_ARB_shading_language_100 */
+
+/* -------------------- GL_ARB_shading_language_420pack -------------------- */
+
+#ifndef GL_ARB_shading_language_420pack
+#define GL_ARB_shading_language_420pack 1
+
+#define GLEW_ARB_shading_language_420pack GLEW_GET_VAR(__GLEW_ARB_shading_language_420pack)
+
+#endif /* GL_ARB_shading_language_420pack */
+
+/* -------------------- GL_ARB_shading_language_include -------------------- */
+
+#ifndef GL_ARB_shading_language_include
+#define GL_ARB_shading_language_include 1
+
+#define GL_SHADER_INCLUDE_ARB 0x8DAE
+#define GL_NAMED_STRING_LENGTH_ARB 0x8DE9
+#define GL_NAMED_STRING_TYPE_ARB 0x8DEA
+
+typedef void (GLAPIENTRY * PFNGLCOMPILESHADERINCLUDEARBPROC) (GLuint shader, GLsizei count, const GLchar* const *path, const GLint *length);
+typedef void (GLAPIENTRY * PFNGLDELETENAMEDSTRINGARBPROC) (GLint namelen, const GLchar* name);
+typedef void (GLAPIENTRY * PFNGLGETNAMEDSTRINGARBPROC) (GLint namelen, const GLchar* name, GLsizei bufSize, GLint *stringlen, GLchar *string);
+typedef void (GLAPIENTRY * PFNGLGETNAMEDSTRINGIVARBPROC) (GLint namelen, const GLchar* name, GLenum pname, GLint *params);
+typedef GLboolean (GLAPIENTRY * PFNGLISNAMEDSTRINGARBPROC) (GLint namelen, const GLchar* name);
+typedef void (GLAPIENTRY * PFNGLNAMEDSTRINGARBPROC) (GLenum type, GLint namelen, const GLchar* name, GLint stringlen, const GLchar *string);
+
+#define glCompileShaderIncludeARB GLEW_GET_FUN(__glewCompileShaderIncludeARB)
+#define glDeleteNamedStringARB GLEW_GET_FUN(__glewDeleteNamedStringARB)
+#define glGetNamedStringARB GLEW_GET_FUN(__glewGetNamedStringARB)
+#define glGetNamedStringivARB GLEW_GET_FUN(__glewGetNamedStringivARB)
+#define glIsNamedStringARB GLEW_GET_FUN(__glewIsNamedStringARB)
+#define glNamedStringARB GLEW_GET_FUN(__glewNamedStringARB)
+
+#define GLEW_ARB_shading_language_include GLEW_GET_VAR(__GLEW_ARB_shading_language_include)
+
+#endif /* GL_ARB_shading_language_include */
+
+/* -------------------- GL_ARB_shading_language_packing -------------------- */
+
+#ifndef GL_ARB_shading_language_packing
+#define GL_ARB_shading_language_packing 1
+
+#define GLEW_ARB_shading_language_packing GLEW_GET_VAR(__GLEW_ARB_shading_language_packing)
+
+#endif /* GL_ARB_shading_language_packing */
+
+/* ----------------------------- GL_ARB_shadow ----------------------------- */
+
+#ifndef GL_ARB_shadow
+#define GL_ARB_shadow 1
+
+#define GL_TEXTURE_COMPARE_MODE_ARB 0x884C
+#define GL_TEXTURE_COMPARE_FUNC_ARB 0x884D
+#define GL_COMPARE_R_TO_TEXTURE_ARB 0x884E
+
+#define GLEW_ARB_shadow GLEW_GET_VAR(__GLEW_ARB_shadow)
+
+#endif /* GL_ARB_shadow */
+
+/* ------------------------- GL_ARB_shadow_ambient ------------------------- */
+
+#ifndef GL_ARB_shadow_ambient
+#define GL_ARB_shadow_ambient 1
+
+#define GL_TEXTURE_COMPARE_FAIL_VALUE_ARB 0x80BF
+
+#define GLEW_ARB_shadow_ambient GLEW_GET_VAR(__GLEW_ARB_shadow_ambient)
+
+#endif /* GL_ARB_shadow_ambient */
+
+/* -------------------------- GL_ARB_sparse_buffer ------------------------- */
+
+#ifndef GL_ARB_sparse_buffer
+#define GL_ARB_sparse_buffer 1
+
+#define GL_SPARSE_STORAGE_BIT_ARB 0x0400
+#define GL_SPARSE_BUFFER_PAGE_SIZE_ARB 0x82F8
+
+typedef void (GLAPIENTRY * PFNGLBUFFERPAGECOMMITMENTARBPROC) (GLenum target, GLintptr offset, GLsizeiptr size, GLboolean commit);
+
+#define glBufferPageCommitmentARB GLEW_GET_FUN(__glewBufferPageCommitmentARB)
+
+#define GLEW_ARB_sparse_buffer GLEW_GET_VAR(__GLEW_ARB_sparse_buffer)
+
+#endif /* GL_ARB_sparse_buffer */
+
+/* ------------------------- GL_ARB_sparse_texture ------------------------- */
+
+#ifndef GL_ARB_sparse_texture
+#define GL_ARB_sparse_texture 1
+
+#define GL_VIRTUAL_PAGE_SIZE_X_ARB 0x9195
+#define GL_VIRTUAL_PAGE_SIZE_Y_ARB 0x9196
+#define GL_VIRTUAL_PAGE_SIZE_Z_ARB 0x9197
+#define GL_MAX_SPARSE_TEXTURE_SIZE_ARB 0x9198
+#define GL_MAX_SPARSE_3D_TEXTURE_SIZE_ARB 0x9199
+#define GL_MAX_SPARSE_ARRAY_TEXTURE_LAYERS_ARB 0x919A
+#define GL_TEXTURE_SPARSE_ARB 0x91A6
+#define GL_VIRTUAL_PAGE_SIZE_INDEX_ARB 0x91A7
+#define GL_NUM_VIRTUAL_PAGE_SIZES_ARB 0x91A8
+#define GL_SPARSE_TEXTURE_FULL_ARRAY_CUBE_MIPMAPS_ARB 0x91A9
+#define GL_NUM_SPARSE_LEVELS_ARB 0x91AA
+
+typedef void (GLAPIENTRY * PFNGLTEXPAGECOMMITMENTARBPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLboolean commit);
+typedef void (GLAPIENTRY * PFNGLTEXTUREPAGECOMMITMENTEXTPROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLboolean commit);
+
+#define glTexPageCommitmentARB GLEW_GET_FUN(__glewTexPageCommitmentARB)
+#define glTexturePageCommitmentEXT GLEW_GET_FUN(__glewTexturePageCommitmentEXT)
+
+#define GLEW_ARB_sparse_texture GLEW_GET_VAR(__GLEW_ARB_sparse_texture)
+
+#endif /* GL_ARB_sparse_texture */
+
+/* ------------------------ GL_ARB_stencil_texturing ----------------------- */
+
+#ifndef GL_ARB_stencil_texturing
+#define GL_ARB_stencil_texturing 1
+
+#define GL_DEPTH_STENCIL_TEXTURE_MODE 0x90EA
+
+#define GLEW_ARB_stencil_texturing GLEW_GET_VAR(__GLEW_ARB_stencil_texturing)
+
+#endif /* GL_ARB_stencil_texturing */
+
+/* ------------------------------ GL_ARB_sync ------------------------------ */
+
+#ifndef GL_ARB_sync
+#define GL_ARB_sync 1
+
+#define GL_SYNC_FLUSH_COMMANDS_BIT 0x00000001
+#define GL_MAX_SERVER_WAIT_TIMEOUT 0x9111
+#define GL_OBJECT_TYPE 0x9112
+#define GL_SYNC_CONDITION 0x9113
+#define GL_SYNC_STATUS 0x9114
+#define GL_SYNC_FLAGS 0x9115
+#define GL_SYNC_FENCE 0x9116
+#define GL_SYNC_GPU_COMMANDS_COMPLETE 0x9117
+#define GL_UNSIGNALED 0x9118
+#define GL_SIGNALED 0x9119
+#define GL_ALREADY_SIGNALED 0x911A
+#define GL_TIMEOUT_EXPIRED 0x911B
+#define GL_CONDITION_SATISFIED 0x911C
+#define GL_WAIT_FAILED 0x911D
+#define GL_TIMEOUT_IGNORED 0xFFFFFFFFFFFFFFFF
+
+typedef GLenum (GLAPIENTRY * PFNGLCLIENTWAITSYNCPROC) (GLsync GLsync,GLbitfield flags,GLuint64 timeout);
+typedef void (GLAPIENTRY * PFNGLDELETESYNCPROC) (GLsync GLsync);
+typedef GLsync (GLAPIENTRY * PFNGLFENCESYNCPROC) (GLenum condition,GLbitfield flags);
+typedef void (GLAPIENTRY * PFNGLGETINTEGER64VPROC) (GLenum pname, GLint64* params);
+typedef void (GLAPIENTRY * PFNGLGETSYNCIVPROC) (GLsync GLsync,GLenum pname,GLsizei bufSize,GLsizei* length, GLint *values);
+typedef GLboolean (GLAPIENTRY * PFNGLISSYNCPROC) (GLsync GLsync);
+typedef void (GLAPIENTRY * PFNGLWAITSYNCPROC) (GLsync GLsync,GLbitfield flags,GLuint64 timeout);
+
+#define glClientWaitSync GLEW_GET_FUN(__glewClientWaitSync)
+#define glDeleteSync GLEW_GET_FUN(__glewDeleteSync)
+#define glFenceSync GLEW_GET_FUN(__glewFenceSync)
+#define glGetInteger64v GLEW_GET_FUN(__glewGetInteger64v)
+#define glGetSynciv GLEW_GET_FUN(__glewGetSynciv)
+#define glIsSync GLEW_GET_FUN(__glewIsSync)
+#define glWaitSync GLEW_GET_FUN(__glewWaitSync)
+
+#define GLEW_ARB_sync GLEW_GET_VAR(__GLEW_ARB_sync)
+
+#endif /* GL_ARB_sync */
+
+/* ----------------------- GL_ARB_tessellation_shader ---------------------- */
+
+#ifndef GL_ARB_tessellation_shader
+#define GL_ARB_tessellation_shader 1
+
+#define GL_PATCHES 0xE
+#define GL_UNIFORM_BLOCK_REFERENCED_BY_TESS_CONTROL_SHADER 0x84F0
+#define GL_UNIFORM_BLOCK_REFERENCED_BY_TESS_EVALUATION_SHADER 0x84F1
+#define GL_MAX_TESS_CONTROL_INPUT_COMPONENTS 0x886C
+#define GL_MAX_TESS_EVALUATION_INPUT_COMPONENTS 0x886D
+#define GL_MAX_COMBINED_TESS_CONTROL_UNIFORM_COMPONENTS 0x8E1E
+#define GL_MAX_COMBINED_TESS_EVALUATION_UNIFORM_COMPONENTS 0x8E1F
+#define GL_PATCH_VERTICES 0x8E72
+#define GL_PATCH_DEFAULT_INNER_LEVEL 0x8E73
+#define GL_PATCH_DEFAULT_OUTER_LEVEL 0x8E74
+#define GL_TESS_CONTROL_OUTPUT_VERTICES 0x8E75
+#define GL_TESS_GEN_MODE 0x8E76
+#define GL_TESS_GEN_SPACING 0x8E77
+#define GL_TESS_GEN_VERTEX_ORDER 0x8E78
+#define GL_TESS_GEN_POINT_MODE 0x8E79
+#define GL_ISOLINES 0x8E7A
+#define GL_FRACTIONAL_ODD 0x8E7B
+#define GL_FRACTIONAL_EVEN 0x8E7C
+#define GL_MAX_PATCH_VERTICES 0x8E7D
+#define GL_MAX_TESS_GEN_LEVEL 0x8E7E
+#define GL_MAX_TESS_CONTROL_UNIFORM_COMPONENTS 0x8E7F
+#define GL_MAX_TESS_EVALUATION_UNIFORM_COMPONENTS 0x8E80
+#define GL_MAX_TESS_CONTROL_TEXTURE_IMAGE_UNITS 0x8E81
+#define GL_MAX_TESS_EVALUATION_TEXTURE_IMAGE_UNITS 0x8E82
+#define GL_MAX_TESS_CONTROL_OUTPUT_COMPONENTS 0x8E83
+#define GL_MAX_TESS_PATCH_COMPONENTS 0x8E84
+#define GL_MAX_TESS_CONTROL_TOTAL_OUTPUT_COMPONENTS 0x8E85
+#define GL_MAX_TESS_EVALUATION_OUTPUT_COMPONENTS 0x8E86
+#define GL_TESS_EVALUATION_SHADER 0x8E87
+#define GL_TESS_CONTROL_SHADER 0x8E88
+#define GL_MAX_TESS_CONTROL_UNIFORM_BLOCKS 0x8E89
+#define GL_MAX_TESS_EVALUATION_UNIFORM_BLOCKS 0x8E8A
+
+typedef void (GLAPIENTRY * PFNGLPATCHPARAMETERFVPROC) (GLenum pname, const GLfloat* values);
+typedef void (GLAPIENTRY * PFNGLPATCHPARAMETERIPROC) (GLenum pname, GLint value);
+
+#define glPatchParameterfv GLEW_GET_FUN(__glewPatchParameterfv)
+#define glPatchParameteri GLEW_GET_FUN(__glewPatchParameteri)
+
+#define GLEW_ARB_tessellation_shader GLEW_GET_VAR(__GLEW_ARB_tessellation_shader)
+
+#endif /* GL_ARB_tessellation_shader */
+
+/* ------------------------- GL_ARB_texture_barrier ------------------------ */
+
+#ifndef GL_ARB_texture_barrier
+#define GL_ARB_texture_barrier 1
+
+typedef void (GLAPIENTRY * PFNGLTEXTUREBARRIERPROC) (void);
+
+#define glTextureBarrier GLEW_GET_FUN(__glewTextureBarrier)
+
+#define GLEW_ARB_texture_barrier GLEW_GET_VAR(__GLEW_ARB_texture_barrier)
+
+#endif /* GL_ARB_texture_barrier */
+
+/* ---------------------- GL_ARB_texture_border_clamp ---------------------- */
+
+#ifndef GL_ARB_texture_border_clamp
+#define GL_ARB_texture_border_clamp 1
+
+#define GL_CLAMP_TO_BORDER_ARB 0x812D
+
+#define GLEW_ARB_texture_border_clamp GLEW_GET_VAR(__GLEW_ARB_texture_border_clamp)
+
+#endif /* GL_ARB_texture_border_clamp */
+
+/* ---------------------- GL_ARB_texture_buffer_object --------------------- */
+
+#ifndef GL_ARB_texture_buffer_object
+#define GL_ARB_texture_buffer_object 1
+
+#define GL_TEXTURE_BUFFER_ARB 0x8C2A
+#define GL_MAX_TEXTURE_BUFFER_SIZE_ARB 0x8C2B
+#define GL_TEXTURE_BINDING_BUFFER_ARB 0x8C2C
+#define GL_TEXTURE_BUFFER_DATA_STORE_BINDING_ARB 0x8C2D
+#define GL_TEXTURE_BUFFER_FORMAT_ARB 0x8C2E
+
+typedef void (GLAPIENTRY * PFNGLTEXBUFFERARBPROC) (GLenum target, GLenum internalformat, GLuint buffer);
+
+#define glTexBufferARB GLEW_GET_FUN(__glewTexBufferARB)
+
+#define GLEW_ARB_texture_buffer_object GLEW_GET_VAR(__GLEW_ARB_texture_buffer_object)
+
+#endif /* GL_ARB_texture_buffer_object */
+
+/* ------------------- GL_ARB_texture_buffer_object_rgb32 ------------------ */
+
+#ifndef GL_ARB_texture_buffer_object_rgb32
+#define GL_ARB_texture_buffer_object_rgb32 1
+
+#define GLEW_ARB_texture_buffer_object_rgb32 GLEW_GET_VAR(__GLEW_ARB_texture_buffer_object_rgb32)
+
+#endif /* GL_ARB_texture_buffer_object_rgb32 */
+
+/* ---------------------- GL_ARB_texture_buffer_range ---------------------- */
+
+#ifndef GL_ARB_texture_buffer_range
+#define GL_ARB_texture_buffer_range 1
+
+#define GL_TEXTURE_BUFFER_OFFSET 0x919D
+#define GL_TEXTURE_BUFFER_SIZE 0x919E
+#define GL_TEXTURE_BUFFER_OFFSET_ALIGNMENT 0x919F
+
+typedef void (GLAPIENTRY * PFNGLTEXBUFFERRANGEPROC) (GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size);
+typedef void (GLAPIENTRY * PFNGLTEXTUREBUFFERRANGEEXTPROC) (GLuint texture, GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size);
+
+#define glTexBufferRange GLEW_GET_FUN(__glewTexBufferRange)
+#define glTextureBufferRangeEXT GLEW_GET_FUN(__glewTextureBufferRangeEXT)
+
+#define GLEW_ARB_texture_buffer_range GLEW_GET_VAR(__GLEW_ARB_texture_buffer_range)
+
+#endif /* GL_ARB_texture_buffer_range */
+
+/* ----------------------- GL_ARB_texture_compression ---------------------- */
+
+#ifndef GL_ARB_texture_compression
+#define GL_ARB_texture_compression 1
+
+#define GL_COMPRESSED_ALPHA_ARB 0x84E9
+#define GL_COMPRESSED_LUMINANCE_ARB 0x84EA
+#define GL_COMPRESSED_LUMINANCE_ALPHA_ARB 0x84EB
+#define GL_COMPRESSED_INTENSITY_ARB 0x84EC
+#define GL_COMPRESSED_RGB_ARB 0x84ED
+#define GL_COMPRESSED_RGBA_ARB 0x84EE
+#define GL_TEXTURE_COMPRESSION_HINT_ARB 0x84EF
+#define GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB 0x86A0
+#define GL_TEXTURE_COMPRESSED_ARB 0x86A1
+#define GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB 0x86A2
+#define GL_COMPRESSED_TEXTURE_FORMATS_ARB 0x86A3
+
+typedef void (GLAPIENTRY * PFNGLCOMPRESSEDTEXIMAGE1DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void *data);
+typedef void (GLAPIENTRY * PFNGLCOMPRESSEDTEXIMAGE2DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *data);
+typedef void (GLAPIENTRY * PFNGLCOMPRESSEDTEXIMAGE3DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *data);
+typedef void (GLAPIENTRY * PFNGLCOMPRESSEDTEXSUBIMAGE1DARBPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *data);
+typedef void (GLAPIENTRY * PFNGLCOMPRESSEDTEXSUBIMAGE2DARBPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data);
+typedef void (GLAPIENTRY * PFNGLCOMPRESSEDTEXSUBIMAGE3DARBPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data);
+typedef void (GLAPIENTRY * PFNGLGETCOMPRESSEDTEXIMAGEARBPROC) (GLenum target, GLint lod, void *img);
+
+#define glCompressedTexImage1DARB GLEW_GET_FUN(__glewCompressedTexImage1DARB)
+#define glCompressedTexImage2DARB GLEW_GET_FUN(__glewCompressedTexImage2DARB)
+#define glCompressedTexImage3DARB GLEW_GET_FUN(__glewCompressedTexImage3DARB)
+#define glCompressedTexSubImage1DARB GLEW_GET_FUN(__glewCompressedTexSubImage1DARB)
+#define glCompressedTexSubImage2DARB GLEW_GET_FUN(__glewCompressedTexSubImage2DARB)
+#define glCompressedTexSubImage3DARB GLEW_GET_FUN(__glewCompressedTexSubImage3DARB)
+#define glGetCompressedTexImageARB GLEW_GET_FUN(__glewGetCompressedTexImageARB)
+
+#define GLEW_ARB_texture_compression GLEW_GET_VAR(__GLEW_ARB_texture_compression)
+
+#endif /* GL_ARB_texture_compression */
+
+/* -------------------- GL_ARB_texture_compression_bptc -------------------- */
+
+#ifndef GL_ARB_texture_compression_bptc
+#define GL_ARB_texture_compression_bptc 1
+
+#define GL_COMPRESSED_RGBA_BPTC_UNORM_ARB 0x8E8C
+#define GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM_ARB 0x8E8D
+#define GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT_ARB 0x8E8E
+#define GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_ARB 0x8E8F
+
+#define GLEW_ARB_texture_compression_bptc GLEW_GET_VAR(__GLEW_ARB_texture_compression_bptc)
+
+#endif /* GL_ARB_texture_compression_bptc */
+
+/* -------------------- GL_ARB_texture_compression_rgtc -------------------- */
+
+#ifndef GL_ARB_texture_compression_rgtc
+#define GL_ARB_texture_compression_rgtc 1
+
+#define GL_COMPRESSED_RED_RGTC1 0x8DBB
+#define GL_COMPRESSED_SIGNED_RED_RGTC1 0x8DBC
+#define GL_COMPRESSED_RG_RGTC2 0x8DBD
+#define GL_COMPRESSED_SIGNED_RG_RGTC2 0x8DBE
+
+#define GLEW_ARB_texture_compression_rgtc GLEW_GET_VAR(__GLEW_ARB_texture_compression_rgtc)
+
+#endif /* GL_ARB_texture_compression_rgtc */
+
+/* ------------------------ GL_ARB_texture_cube_map ------------------------ */
+
+#ifndef GL_ARB_texture_cube_map
+#define GL_ARB_texture_cube_map 1
+
+#define GL_NORMAL_MAP_ARB 0x8511
+#define GL_REFLECTION_MAP_ARB 0x8512
+#define GL_TEXTURE_CUBE_MAP_ARB 0x8513
+#define GL_TEXTURE_BINDING_CUBE_MAP_ARB 0x8514
+#define GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB 0x8515
+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB 0x8516
+#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB 0x8517
+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB 0x8518
+#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB 0x8519
+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB 0x851A
+#define GL_PROXY_TEXTURE_CUBE_MAP_ARB 0x851B
+#define GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB 0x851C
+
+#define GLEW_ARB_texture_cube_map GLEW_GET_VAR(__GLEW_ARB_texture_cube_map)
+
+#endif /* GL_ARB_texture_cube_map */
+
+/* --------------------- GL_ARB_texture_cube_map_array --------------------- */
+
+#ifndef GL_ARB_texture_cube_map_array
+#define GL_ARB_texture_cube_map_array 1
+
+#define GL_TEXTURE_CUBE_MAP_ARRAY_ARB 0x9009
+#define GL_TEXTURE_BINDING_CUBE_MAP_ARRAY_ARB 0x900A
+#define GL_PROXY_TEXTURE_CUBE_MAP_ARRAY_ARB 0x900B
+#define GL_SAMPLER_CUBE_MAP_ARRAY_ARB 0x900C
+#define GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW_ARB 0x900D
+#define GL_INT_SAMPLER_CUBE_MAP_ARRAY_ARB 0x900E
+#define GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY_ARB 0x900F
+
+#define GLEW_ARB_texture_cube_map_array GLEW_GET_VAR(__GLEW_ARB_texture_cube_map_array)
+
+#endif /* GL_ARB_texture_cube_map_array */
+
+/* ------------------------- GL_ARB_texture_env_add ------------------------ */
+
+#ifndef GL_ARB_texture_env_add
+#define GL_ARB_texture_env_add 1
+
+#define GLEW_ARB_texture_env_add GLEW_GET_VAR(__GLEW_ARB_texture_env_add)
+
+#endif /* GL_ARB_texture_env_add */
+
+/* ----------------------- GL_ARB_texture_env_combine ---------------------- */
+
+#ifndef GL_ARB_texture_env_combine
+#define GL_ARB_texture_env_combine 1
+
+#define GL_SUBTRACT_ARB 0x84E7
+#define GL_COMBINE_ARB 0x8570
+#define GL_COMBINE_RGB_ARB 0x8571
+#define GL_COMBINE_ALPHA_ARB 0x8572
+#define GL_RGB_SCALE_ARB 0x8573
+#define GL_ADD_SIGNED_ARB 0x8574
+#define GL_INTERPOLATE_ARB 0x8575
+#define GL_CONSTANT_ARB 0x8576
+#define GL_PRIMARY_COLOR_ARB 0x8577
+#define GL_PREVIOUS_ARB 0x8578
+#define GL_SOURCE0_RGB_ARB 0x8580
+#define GL_SOURCE1_RGB_ARB 0x8581
+#define GL_SOURCE2_RGB_ARB 0x8582
+#define GL_SOURCE0_ALPHA_ARB 0x8588
+#define GL_SOURCE1_ALPHA_ARB 0x8589
+#define GL_SOURCE2_ALPHA_ARB 0x858A
+#define GL_OPERAND0_RGB_ARB 0x8590
+#define GL_OPERAND1_RGB_ARB 0x8591
+#define GL_OPERAND2_RGB_ARB 0x8592
+#define GL_OPERAND0_ALPHA_ARB 0x8598
+#define GL_OPERAND1_ALPHA_ARB 0x8599
+#define GL_OPERAND2_ALPHA_ARB 0x859A
+
+#define GLEW_ARB_texture_env_combine GLEW_GET_VAR(__GLEW_ARB_texture_env_combine)
+
+#endif /* GL_ARB_texture_env_combine */
+
+/* ---------------------- GL_ARB_texture_env_crossbar ---------------------- */
+
+#ifndef GL_ARB_texture_env_crossbar
+#define GL_ARB_texture_env_crossbar 1
+
+#define GLEW_ARB_texture_env_crossbar GLEW_GET_VAR(__GLEW_ARB_texture_env_crossbar)
+
+#endif /* GL_ARB_texture_env_crossbar */
+
+/* ------------------------ GL_ARB_texture_env_dot3 ------------------------ */
+
+#ifndef GL_ARB_texture_env_dot3
+#define GL_ARB_texture_env_dot3 1
+
+#define GL_DOT3_RGB_ARB 0x86AE
+#define GL_DOT3_RGBA_ARB 0x86AF
+
+#define GLEW_ARB_texture_env_dot3 GLEW_GET_VAR(__GLEW_ARB_texture_env_dot3)
+
+#endif /* GL_ARB_texture_env_dot3 */
+
+/* -------------------------- GL_ARB_texture_float ------------------------- */
+
+#ifndef GL_ARB_texture_float
+#define GL_ARB_texture_float 1
+
+#define GL_RGBA32F_ARB 0x8814
+#define GL_RGB32F_ARB 0x8815
+#define GL_ALPHA32F_ARB 0x8816
+#define GL_INTENSITY32F_ARB 0x8817
+#define GL_LUMINANCE32F_ARB 0x8818
+#define GL_LUMINANCE_ALPHA32F_ARB 0x8819
+#define GL_RGBA16F_ARB 0x881A
+#define GL_RGB16F_ARB 0x881B
+#define GL_ALPHA16F_ARB 0x881C
+#define GL_INTENSITY16F_ARB 0x881D
+#define GL_LUMINANCE16F_ARB 0x881E
+#define GL_LUMINANCE_ALPHA16F_ARB 0x881F
+#define GL_TEXTURE_RED_TYPE_ARB 0x8C10
+#define GL_TEXTURE_GREEN_TYPE_ARB 0x8C11
+#define GL_TEXTURE_BLUE_TYPE_ARB 0x8C12
+#define GL_TEXTURE_ALPHA_TYPE_ARB 0x8C13
+#define GL_TEXTURE_LUMINANCE_TYPE_ARB 0x8C14
+#define GL_TEXTURE_INTENSITY_TYPE_ARB 0x8C15
+#define GL_TEXTURE_DEPTH_TYPE_ARB 0x8C16
+#define GL_UNSIGNED_NORMALIZED_ARB 0x8C17
+
+#define GLEW_ARB_texture_float GLEW_GET_VAR(__GLEW_ARB_texture_float)
+
+#endif /* GL_ARB_texture_float */
+
+/* ------------------------- GL_ARB_texture_gather ------------------------- */
+
+#ifndef GL_ARB_texture_gather
+#define GL_ARB_texture_gather 1
+
+#define GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET_ARB 0x8E5E
+#define GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET_ARB 0x8E5F
+#define GL_MAX_PROGRAM_TEXTURE_GATHER_COMPONENTS_ARB 0x8F9F
+
+#define GLEW_ARB_texture_gather GLEW_GET_VAR(__GLEW_ARB_texture_gather)
+
+#endif /* GL_ARB_texture_gather */
+
+/* ------------------ GL_ARB_texture_mirror_clamp_to_edge ------------------ */
+
+#ifndef GL_ARB_texture_mirror_clamp_to_edge
+#define GL_ARB_texture_mirror_clamp_to_edge 1
+
+#define GL_MIRROR_CLAMP_TO_EDGE 0x8743
+
+#define GLEW_ARB_texture_mirror_clamp_to_edge GLEW_GET_VAR(__GLEW_ARB_texture_mirror_clamp_to_edge)
+
+#endif /* GL_ARB_texture_mirror_clamp_to_edge */
+
+/* --------------------- GL_ARB_texture_mirrored_repeat -------------------- */
+
+#ifndef GL_ARB_texture_mirrored_repeat
+#define GL_ARB_texture_mirrored_repeat 1
+
+#define GL_MIRRORED_REPEAT_ARB 0x8370
+
+#define GLEW_ARB_texture_mirrored_repeat GLEW_GET_VAR(__GLEW_ARB_texture_mirrored_repeat)
+
+#endif /* GL_ARB_texture_mirrored_repeat */
+
+/* ----------------------- GL_ARB_texture_multisample ---------------------- */
+
+#ifndef GL_ARB_texture_multisample
+#define GL_ARB_texture_multisample 1
+
+#define GL_SAMPLE_POSITION 0x8E50
+#define GL_SAMPLE_MASK 0x8E51
+#define GL_SAMPLE_MASK_VALUE 0x8E52
+#define GL_MAX_SAMPLE_MASK_WORDS 0x8E59
+#define GL_TEXTURE_2D_MULTISAMPLE 0x9100
+#define GL_PROXY_TEXTURE_2D_MULTISAMPLE 0x9101
+#define GL_TEXTURE_2D_MULTISAMPLE_ARRAY 0x9102
+#define GL_PROXY_TEXTURE_2D_MULTISAMPLE_ARRAY 0x9103
+#define GL_TEXTURE_BINDING_2D_MULTISAMPLE 0x9104
+#define GL_TEXTURE_BINDING_2D_MULTISAMPLE_ARRAY 0x9105
+#define GL_TEXTURE_SAMPLES 0x9106
+#define GL_TEXTURE_FIXED_SAMPLE_LOCATIONS 0x9107
+#define GL_SAMPLER_2D_MULTISAMPLE 0x9108
+#define GL_INT_SAMPLER_2D_MULTISAMPLE 0x9109
+#define GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE 0x910A
+#define GL_SAMPLER_2D_MULTISAMPLE_ARRAY 0x910B
+#define GL_INT_SAMPLER_2D_MULTISAMPLE_ARRAY 0x910C
+#define GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY 0x910D
+#define GL_MAX_COLOR_TEXTURE_SAMPLES 0x910E
+#define GL_MAX_DEPTH_TEXTURE_SAMPLES 0x910F
+#define GL_MAX_INTEGER_SAMPLES 0x9110
+
+typedef void (GLAPIENTRY * PFNGLGETMULTISAMPLEFVPROC) (GLenum pname, GLuint index, GLfloat* val);
+typedef void (GLAPIENTRY * PFNGLSAMPLEMASKIPROC) (GLuint index, GLbitfield mask);
+typedef void (GLAPIENTRY * PFNGLTEXIMAGE2DMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations);
+typedef void (GLAPIENTRY * PFNGLTEXIMAGE3DMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations);
+
+#define glGetMultisamplefv GLEW_GET_FUN(__glewGetMultisamplefv)
+#define glSampleMaski GLEW_GET_FUN(__glewSampleMaski)
+#define glTexImage2DMultisample GLEW_GET_FUN(__glewTexImage2DMultisample)
+#define glTexImage3DMultisample GLEW_GET_FUN(__glewTexImage3DMultisample)
+
+#define GLEW_ARB_texture_multisample GLEW_GET_VAR(__GLEW_ARB_texture_multisample)
+
+#endif /* GL_ARB_texture_multisample */
+
+/* -------------------- GL_ARB_texture_non_power_of_two -------------------- */
+
+#ifndef GL_ARB_texture_non_power_of_two
+#define GL_ARB_texture_non_power_of_two 1
+
+#define GLEW_ARB_texture_non_power_of_two GLEW_GET_VAR(__GLEW_ARB_texture_non_power_of_two)
+
+#endif /* GL_ARB_texture_non_power_of_two */
+
+/* ---------------------- GL_ARB_texture_query_levels ---------------------- */
+
+#ifndef GL_ARB_texture_query_levels
+#define GL_ARB_texture_query_levels 1
+
+#define GLEW_ARB_texture_query_levels GLEW_GET_VAR(__GLEW_ARB_texture_query_levels)
+
+#endif /* GL_ARB_texture_query_levels */
+
+/* ------------------------ GL_ARB_texture_query_lod ----------------------- */
+
+#ifndef GL_ARB_texture_query_lod
+#define GL_ARB_texture_query_lod 1
+
+#define GLEW_ARB_texture_query_lod GLEW_GET_VAR(__GLEW_ARB_texture_query_lod)
+
+#endif /* GL_ARB_texture_query_lod */
+
+/* ------------------------ GL_ARB_texture_rectangle ----------------------- */
+
+#ifndef GL_ARB_texture_rectangle
+#define GL_ARB_texture_rectangle 1
+
+#define GL_TEXTURE_RECTANGLE_ARB 0x84F5
+#define GL_TEXTURE_BINDING_RECTANGLE_ARB 0x84F6
+#define GL_PROXY_TEXTURE_RECTANGLE_ARB 0x84F7
+#define GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB 0x84F8
+#define GL_SAMPLER_2D_RECT_ARB 0x8B63
+#define GL_SAMPLER_2D_RECT_SHADOW_ARB 0x8B64
+
+#define GLEW_ARB_texture_rectangle GLEW_GET_VAR(__GLEW_ARB_texture_rectangle)
+
+#endif /* GL_ARB_texture_rectangle */
+
+/* --------------------------- GL_ARB_texture_rg --------------------------- */
+
+#ifndef GL_ARB_texture_rg
+#define GL_ARB_texture_rg 1
+
+#define GL_COMPRESSED_RED 0x8225
+#define GL_COMPRESSED_RG 0x8226
+#define GL_RG 0x8227
+#define GL_RG_INTEGER 0x8228
+#define GL_R8 0x8229
+#define GL_R16 0x822A
+#define GL_RG8 0x822B
+#define GL_RG16 0x822C
+#define GL_R16F 0x822D
+#define GL_R32F 0x822E
+#define GL_RG16F 0x822F
+#define GL_RG32F 0x8230
+#define GL_R8I 0x8231
+#define GL_R8UI 0x8232
+#define GL_R16I 0x8233
+#define GL_R16UI 0x8234
+#define GL_R32I 0x8235
+#define GL_R32UI 0x8236
+#define GL_RG8I 0x8237
+#define GL_RG8UI 0x8238
+#define GL_RG16I 0x8239
+#define GL_RG16UI 0x823A
+#define GL_RG32I 0x823B
+#define GL_RG32UI 0x823C
+
+#define GLEW_ARB_texture_rg GLEW_GET_VAR(__GLEW_ARB_texture_rg)
+
+#endif /* GL_ARB_texture_rg */
+
+/* ----------------------- GL_ARB_texture_rgb10_a2ui ----------------------- */
+
+#ifndef GL_ARB_texture_rgb10_a2ui
+#define GL_ARB_texture_rgb10_a2ui 1
+
+#define GL_RGB10_A2UI 0x906F
+
+#define GLEW_ARB_texture_rgb10_a2ui GLEW_GET_VAR(__GLEW_ARB_texture_rgb10_a2ui)
+
+#endif /* GL_ARB_texture_rgb10_a2ui */
+
+/* ------------------------ GL_ARB_texture_stencil8 ------------------------ */
+
+#ifndef GL_ARB_texture_stencil8
+#define GL_ARB_texture_stencil8 1
+
+#define GL_STENCIL_INDEX 0x1901
+#define GL_STENCIL_INDEX8 0x8D48
+
+#define GLEW_ARB_texture_stencil8 GLEW_GET_VAR(__GLEW_ARB_texture_stencil8)
+
+#endif /* GL_ARB_texture_stencil8 */
+
+/* ------------------------- GL_ARB_texture_storage ------------------------ */
+
+#ifndef GL_ARB_texture_storage
+#define GL_ARB_texture_storage 1
+
+#define GL_TEXTURE_IMMUTABLE_FORMAT 0x912F
+
+typedef void (GLAPIENTRY * PFNGLTEXSTORAGE1DPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
+typedef void (GLAPIENTRY * PFNGLTEXSTORAGE2DPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
+typedef void (GLAPIENTRY * PFNGLTEXSTORAGE3DPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
+typedef void (GLAPIENTRY * PFNGLTEXTURESTORAGE1DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
+typedef void (GLAPIENTRY * PFNGLTEXTURESTORAGE2DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
+typedef void (GLAPIENTRY * PFNGLTEXTURESTORAGE3DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
+
+#define glTexStorage1D GLEW_GET_FUN(__glewTexStorage1D)
+#define glTexStorage2D GLEW_GET_FUN(__glewTexStorage2D)
+#define glTexStorage3D GLEW_GET_FUN(__glewTexStorage3D)
+#define glTextureStorage1DEXT GLEW_GET_FUN(__glewTextureStorage1DEXT)
+#define glTextureStorage2DEXT GLEW_GET_FUN(__glewTextureStorage2DEXT)
+#define glTextureStorage3DEXT GLEW_GET_FUN(__glewTextureStorage3DEXT)
+
+#define GLEW_ARB_texture_storage GLEW_GET_VAR(__GLEW_ARB_texture_storage)
+
+#endif /* GL_ARB_texture_storage */
+
+/* ------------------- GL_ARB_texture_storage_multisample ------------------ */
+
+#ifndef GL_ARB_texture_storage_multisample
+#define GL_ARB_texture_storage_multisample 1
+
+typedef void (GLAPIENTRY * PFNGLTEXSTORAGE2DMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations);
+typedef void (GLAPIENTRY * PFNGLTEXSTORAGE3DMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations);
+typedef void (GLAPIENTRY * PFNGLTEXTURESTORAGE2DMULTISAMPLEEXTPROC) (GLuint texture, GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations);
+typedef void (GLAPIENTRY * PFNGLTEXTURESTORAGE3DMULTISAMPLEEXTPROC) (GLuint texture, GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations);
+
+#define glTexStorage2DMultisample GLEW_GET_FUN(__glewTexStorage2DMultisample)
+#define glTexStorage3DMultisample GLEW_GET_FUN(__glewTexStorage3DMultisample)
+#define glTextureStorage2DMultisampleEXT GLEW_GET_FUN(__glewTextureStorage2DMultisampleEXT)
+#define glTextureStorage3DMultisampleEXT GLEW_GET_FUN(__glewTextureStorage3DMultisampleEXT)
+
+#define GLEW_ARB_texture_storage_multisample GLEW_GET_VAR(__GLEW_ARB_texture_storage_multisample)
+
+#endif /* GL_ARB_texture_storage_multisample */
+
+/* ------------------------- GL_ARB_texture_swizzle ------------------------ */
+
+#ifndef GL_ARB_texture_swizzle
+#define GL_ARB_texture_swizzle 1
+
+#define GL_TEXTURE_SWIZZLE_R 0x8E42
+#define GL_TEXTURE_SWIZZLE_G 0x8E43
+#define GL_TEXTURE_SWIZZLE_B 0x8E44
+#define GL_TEXTURE_SWIZZLE_A 0x8E45
+#define GL_TEXTURE_SWIZZLE_RGBA 0x8E46
+
+#define GLEW_ARB_texture_swizzle GLEW_GET_VAR(__GLEW_ARB_texture_swizzle)
+
+#endif /* GL_ARB_texture_swizzle */
+
+/* -------------------------- GL_ARB_texture_view -------------------------- */
+
+#ifndef GL_ARB_texture_view
+#define GL_ARB_texture_view 1
+
+#define GL_TEXTURE_VIEW_MIN_LEVEL 0x82DB
+#define GL_TEXTURE_VIEW_NUM_LEVELS 0x82DC
+#define GL_TEXTURE_VIEW_MIN_LAYER 0x82DD
+#define GL_TEXTURE_VIEW_NUM_LAYERS 0x82DE
+#define GL_TEXTURE_IMMUTABLE_LEVELS 0x82DF
+
+typedef void (GLAPIENTRY * PFNGLTEXTUREVIEWPROC) (GLuint texture, GLenum target, GLuint origtexture, GLenum internalformat, GLuint minlevel, GLuint numlevels, GLuint minlayer, GLuint numlayers);
+
+#define glTextureView GLEW_GET_FUN(__glewTextureView)
+
+#define GLEW_ARB_texture_view GLEW_GET_VAR(__GLEW_ARB_texture_view)
+
+#endif /* GL_ARB_texture_view */
+
+/* --------------------------- GL_ARB_timer_query -------------------------- */
+
+#ifndef GL_ARB_timer_query
+#define GL_ARB_timer_query 1
+
+#define GL_TIME_ELAPSED 0x88BF
+#define GL_TIMESTAMP 0x8E28
+
+typedef void (GLAPIENTRY * PFNGLGETQUERYOBJECTI64VPROC) (GLuint id, GLenum pname, GLint64* params);
+typedef void (GLAPIENTRY * PFNGLGETQUERYOBJECTUI64VPROC) (GLuint id, GLenum pname, GLuint64* params);
+typedef void (GLAPIENTRY * PFNGLQUERYCOUNTERPROC) (GLuint id, GLenum target);
+
+#define glGetQueryObjecti64v GLEW_GET_FUN(__glewGetQueryObjecti64v)
+#define glGetQueryObjectui64v GLEW_GET_FUN(__glewGetQueryObjectui64v)
+#define glQueryCounter GLEW_GET_FUN(__glewQueryCounter)
+
+#define GLEW_ARB_timer_query GLEW_GET_VAR(__GLEW_ARB_timer_query)
+
+#endif /* GL_ARB_timer_query */
+
+/* ----------------------- GL_ARB_transform_feedback2 ---------------------- */
+
+#ifndef GL_ARB_transform_feedback2
+#define GL_ARB_transform_feedback2 1
+
+#define GL_TRANSFORM_FEEDBACK 0x8E22
+#define GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED 0x8E23
+#define GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE 0x8E24
+#define GL_TRANSFORM_FEEDBACK_BINDING 0x8E25
+
+typedef void (GLAPIENTRY * PFNGLBINDTRANSFORMFEEDBACKPROC) (GLenum target, GLuint id);
+typedef void (GLAPIENTRY * PFNGLDELETETRANSFORMFEEDBACKSPROC) (GLsizei n, const GLuint* ids);
+typedef void (GLAPIENTRY * PFNGLDRAWTRANSFORMFEEDBACKPROC) (GLenum mode, GLuint id);
+typedef void (GLAPIENTRY * PFNGLGENTRANSFORMFEEDBACKSPROC) (GLsizei n, GLuint* ids);
+typedef GLboolean (GLAPIENTRY * PFNGLISTRANSFORMFEEDBACKPROC) (GLuint id);
+typedef void (GLAPIENTRY * PFNGLPAUSETRANSFORMFEEDBACKPROC) (void);
+typedef void (GLAPIENTRY * PFNGLRESUMETRANSFORMFEEDBACKPROC) (void);
+
+#define glBindTransformFeedback GLEW_GET_FUN(__glewBindTransformFeedback)
+#define glDeleteTransformFeedbacks GLEW_GET_FUN(__glewDeleteTransformFeedbacks)
+#define glDrawTransformFeedback GLEW_GET_FUN(__glewDrawTransformFeedback)
+#define glGenTransformFeedbacks GLEW_GET_FUN(__glewGenTransformFeedbacks)
+#define glIsTransformFeedback GLEW_GET_FUN(__glewIsTransformFeedback)
+#define glPauseTransformFeedback GLEW_GET_FUN(__glewPauseTransformFeedback)
+#define glResumeTransformFeedback GLEW_GET_FUN(__glewResumeTransformFeedback)
+
+#define GLEW_ARB_transform_feedback2 GLEW_GET_VAR(__GLEW_ARB_transform_feedback2)
+
+#endif /* GL_ARB_transform_feedback2 */
+
+/* ----------------------- GL_ARB_transform_feedback3 ---------------------- */
+
+#ifndef GL_ARB_transform_feedback3
+#define GL_ARB_transform_feedback3 1
+
+#define GL_MAX_TRANSFORM_FEEDBACK_BUFFERS 0x8E70
+#define GL_MAX_VERTEX_STREAMS 0x8E71
+
+typedef void (GLAPIENTRY * PFNGLBEGINQUERYINDEXEDPROC) (GLenum target, GLuint index, GLuint id);
+typedef void (GLAPIENTRY * PFNGLDRAWTRANSFORMFEEDBACKSTREAMPROC) (GLenum mode, GLuint id, GLuint stream);
+typedef void (GLAPIENTRY * PFNGLENDQUERYINDEXEDPROC) (GLenum target, GLuint index);
+typedef void (GLAPIENTRY * PFNGLGETQUERYINDEXEDIVPROC) (GLenum target, GLuint index, GLenum pname, GLint* params);
+
+#define glBeginQueryIndexed GLEW_GET_FUN(__glewBeginQueryIndexed)
+#define glDrawTransformFeedbackStream GLEW_GET_FUN(__glewDrawTransformFeedbackStream)
+#define glEndQueryIndexed GLEW_GET_FUN(__glewEndQueryIndexed)
+#define glGetQueryIndexediv GLEW_GET_FUN(__glewGetQueryIndexediv)
+
+#define GLEW_ARB_transform_feedback3 GLEW_GET_VAR(__GLEW_ARB_transform_feedback3)
+
+#endif /* GL_ARB_transform_feedback3 */
+
+/* ------------------ GL_ARB_transform_feedback_instanced ------------------ */
+
+#ifndef GL_ARB_transform_feedback_instanced
+#define GL_ARB_transform_feedback_instanced 1
+
+typedef void (GLAPIENTRY * PFNGLDRAWTRANSFORMFEEDBACKINSTANCEDPROC) (GLenum mode, GLuint id, GLsizei primcount);
+typedef void (GLAPIENTRY * PFNGLDRAWTRANSFORMFEEDBACKSTREAMINSTANCEDPROC) (GLenum mode, GLuint id, GLuint stream, GLsizei primcount);
+
+#define glDrawTransformFeedbackInstanced GLEW_GET_FUN(__glewDrawTransformFeedbackInstanced)
+#define glDrawTransformFeedbackStreamInstanced GLEW_GET_FUN(__glewDrawTransformFeedbackStreamInstanced)
+
+#define GLEW_ARB_transform_feedback_instanced GLEW_GET_VAR(__GLEW_ARB_transform_feedback_instanced)
+
+#endif /* GL_ARB_transform_feedback_instanced */
+
+/* ---------------- GL_ARB_transform_feedback_overflow_query --------------- */
+
+#ifndef GL_ARB_transform_feedback_overflow_query
+#define GL_ARB_transform_feedback_overflow_query 1
+
+#define GL_TRANSFORM_FEEDBACK_OVERFLOW_ARB 0x82EC
+#define GL_TRANSFORM_FEEDBACK_STREAM_OVERFLOW_ARB 0x82ED
+
+#define GLEW_ARB_transform_feedback_overflow_query GLEW_GET_VAR(__GLEW_ARB_transform_feedback_overflow_query)
+
+#endif /* GL_ARB_transform_feedback_overflow_query */
+
+/* ------------------------ GL_ARB_transpose_matrix ------------------------ */
+
+#ifndef GL_ARB_transpose_matrix
+#define GL_ARB_transpose_matrix 1
+
+#define GL_TRANSPOSE_MODELVIEW_MATRIX_ARB 0x84E3
+#define GL_TRANSPOSE_PROJECTION_MATRIX_ARB 0x84E4
+#define GL_TRANSPOSE_TEXTURE_MATRIX_ARB 0x84E5
+#define GL_TRANSPOSE_COLOR_MATRIX_ARB 0x84E6
+
+typedef void (GLAPIENTRY * PFNGLLOADTRANSPOSEMATRIXDARBPROC) (GLdouble m[16]);
+typedef void (GLAPIENTRY * PFNGLLOADTRANSPOSEMATRIXFARBPROC) (GLfloat m[16]);
+typedef void (GLAPIENTRY * PFNGLMULTTRANSPOSEMATRIXDARBPROC) (GLdouble m[16]);
+typedef void (GLAPIENTRY * PFNGLMULTTRANSPOSEMATRIXFARBPROC) (GLfloat m[16]);
+
+#define glLoadTransposeMatrixdARB GLEW_GET_FUN(__glewLoadTransposeMatrixdARB)
+#define glLoadTransposeMatrixfARB GLEW_GET_FUN(__glewLoadTransposeMatrixfARB)
+#define glMultTransposeMatrixdARB GLEW_GET_FUN(__glewMultTransposeMatrixdARB)
+#define glMultTransposeMatrixfARB GLEW_GET_FUN(__glewMultTransposeMatrixfARB)
+
+#define GLEW_ARB_transpose_matrix GLEW_GET_VAR(__GLEW_ARB_transpose_matrix)
+
+#endif /* GL_ARB_transpose_matrix */
+
+/* ---------------------- GL_ARB_uniform_buffer_object --------------------- */
+
+#ifndef GL_ARB_uniform_buffer_object
+#define GL_ARB_uniform_buffer_object 1
+
+#define GL_UNIFORM_BUFFER 0x8A11
+#define GL_UNIFORM_BUFFER_BINDING 0x8A28
+#define GL_UNIFORM_BUFFER_START 0x8A29
+#define GL_UNIFORM_BUFFER_SIZE 0x8A2A
+#define GL_MAX_VERTEX_UNIFORM_BLOCKS 0x8A2B
+#define GL_MAX_GEOMETRY_UNIFORM_BLOCKS 0x8A2C
+#define GL_MAX_FRAGMENT_UNIFORM_BLOCKS 0x8A2D
+#define GL_MAX_COMBINED_UNIFORM_BLOCKS 0x8A2E
+#define GL_MAX_UNIFORM_BUFFER_BINDINGS 0x8A2F
+#define GL_MAX_UNIFORM_BLOCK_SIZE 0x8A30
+#define GL_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS 0x8A31
+#define GL_MAX_COMBINED_GEOMETRY_UNIFORM_COMPONENTS 0x8A32
+#define GL_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS 0x8A33
+#define GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT 0x8A34
+#define GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH 0x8A35
+#define GL_ACTIVE_UNIFORM_BLOCKS 0x8A36
+#define GL_UNIFORM_TYPE 0x8A37
+#define GL_UNIFORM_SIZE 0x8A38
+#define GL_UNIFORM_NAME_LENGTH 0x8A39
+#define GL_UNIFORM_BLOCK_INDEX 0x8A3A
+#define GL_UNIFORM_OFFSET 0x8A3B
+#define GL_UNIFORM_ARRAY_STRIDE 0x8A3C
+#define GL_UNIFORM_MATRIX_STRIDE 0x8A3D
+#define GL_UNIFORM_IS_ROW_MAJOR 0x8A3E
+#define GL_UNIFORM_BLOCK_BINDING 0x8A3F
+#define GL_UNIFORM_BLOCK_DATA_SIZE 0x8A40
+#define GL_UNIFORM_BLOCK_NAME_LENGTH 0x8A41
+#define GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS 0x8A42
+#define GL_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES 0x8A43
+#define GL_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER 0x8A44
+#define GL_UNIFORM_BLOCK_REFERENCED_BY_GEOMETRY_SHADER 0x8A45
+#define GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER 0x8A46
+#define GL_INVALID_INDEX 0xFFFFFFFF
+
+typedef void (GLAPIENTRY * PFNGLBINDBUFFERBASEPROC) (GLenum target, GLuint index, GLuint buffer);
+typedef void (GLAPIENTRY * PFNGLBINDBUFFERRANGEPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size);
+typedef void (GLAPIENTRY * PFNGLGETACTIVEUNIFORMBLOCKNAMEPROC) (GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei* length, GLchar* uniformBlockName);
+typedef void (GLAPIENTRY * PFNGLGETACTIVEUNIFORMBLOCKIVPROC) (GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint* params);
+typedef void (GLAPIENTRY * PFNGLGETACTIVEUNIFORMNAMEPROC) (GLuint program, GLuint uniformIndex, GLsizei bufSize, GLsizei* length, GLchar* uniformName);
+typedef void (GLAPIENTRY * PFNGLGETACTIVEUNIFORMSIVPROC) (GLuint program, GLsizei uniformCount, const GLuint* uniformIndices, GLenum pname, GLint* params);
+typedef void (GLAPIENTRY * PFNGLGETINTEGERI_VPROC) (GLenum target, GLuint index, GLint* data);
+typedef GLuint (GLAPIENTRY * PFNGLGETUNIFORMBLOCKINDEXPROC) (GLuint program, const GLchar* uniformBlockName);
+typedef void (GLAPIENTRY * PFNGLGETUNIFORMINDICESPROC) (GLuint program, GLsizei uniformCount, const GLchar* const * uniformNames, GLuint* uniformIndices);
+typedef void (GLAPIENTRY * PFNGLUNIFORMBLOCKBINDINGPROC) (GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding);
+
+#define glBindBufferBase GLEW_GET_FUN(__glewBindBufferBase)
+#define glBindBufferRange GLEW_GET_FUN(__glewBindBufferRange)
+#define glGetActiveUniformBlockName GLEW_GET_FUN(__glewGetActiveUniformBlockName)
+#define glGetActiveUniformBlockiv GLEW_GET_FUN(__glewGetActiveUniformBlockiv)
+#define glGetActiveUniformName GLEW_GET_FUN(__glewGetActiveUniformName)
+#define glGetActiveUniformsiv GLEW_GET_FUN(__glewGetActiveUniformsiv)
+#define glGetIntegeri_v GLEW_GET_FUN(__glewGetIntegeri_v)
+#define glGetUniformBlockIndex GLEW_GET_FUN(__glewGetUniformBlockIndex)
+#define glGetUniformIndices GLEW_GET_FUN(__glewGetUniformIndices)
+#define glUniformBlockBinding GLEW_GET_FUN(__glewUniformBlockBinding)
+
+#define GLEW_ARB_uniform_buffer_object GLEW_GET_VAR(__GLEW_ARB_uniform_buffer_object)
+
+#endif /* GL_ARB_uniform_buffer_object */
+
+/* ------------------------ GL_ARB_vertex_array_bgra ----------------------- */
+
+#ifndef GL_ARB_vertex_array_bgra
+#define GL_ARB_vertex_array_bgra 1
+
+#define GL_BGRA 0x80E1
+
+#define GLEW_ARB_vertex_array_bgra GLEW_GET_VAR(__GLEW_ARB_vertex_array_bgra)
+
+#endif /* GL_ARB_vertex_array_bgra */
+
+/* ----------------------- GL_ARB_vertex_array_object ---------------------- */
+
+#ifndef GL_ARB_vertex_array_object
+#define GL_ARB_vertex_array_object 1
+
+#define GL_VERTEX_ARRAY_BINDING 0x85B5
+
+typedef void (GLAPIENTRY * PFNGLBINDVERTEXARRAYPROC) (GLuint array);
+typedef void (GLAPIENTRY * PFNGLDELETEVERTEXARRAYSPROC) (GLsizei n, const GLuint* arrays);
+typedef void (GLAPIENTRY * PFNGLGENVERTEXARRAYSPROC) (GLsizei n, GLuint* arrays);
+typedef GLboolean (GLAPIENTRY * PFNGLISVERTEXARRAYPROC) (GLuint array);
+
+#define glBindVertexArray GLEW_GET_FUN(__glewBindVertexArray)
+#define glDeleteVertexArrays GLEW_GET_FUN(__glewDeleteVertexArrays)
+#define glGenVertexArrays GLEW_GET_FUN(__glewGenVertexArrays)
+#define glIsVertexArray GLEW_GET_FUN(__glewIsVertexArray)
+
+#define GLEW_ARB_vertex_array_object GLEW_GET_VAR(__GLEW_ARB_vertex_array_object)
+
+#endif /* GL_ARB_vertex_array_object */
+
+/* ----------------------- GL_ARB_vertex_attrib_64bit ---------------------- */
+
+#ifndef GL_ARB_vertex_attrib_64bit
+#define GL_ARB_vertex_attrib_64bit 1
+
+typedef void (GLAPIENTRY * PFNGLGETVERTEXATTRIBLDVPROC) (GLuint index, GLenum pname, GLdouble* params);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBL1DPROC) (GLuint index, GLdouble x);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBL1DVPROC) (GLuint index, const GLdouble* v);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBL2DPROC) (GLuint index, GLdouble x, GLdouble y);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBL2DVPROC) (GLuint index, const GLdouble* v);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBL3DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBL3DVPROC) (GLuint index, const GLdouble* v);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBL4DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBL4DVPROC) (GLuint index, const GLdouble* v);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBLPOINTERPROC) (GLuint index, GLint size, GLenum type, GLsizei stride, const void* pointer);
+
+#define glGetVertexAttribLdv GLEW_GET_FUN(__glewGetVertexAttribLdv)
+#define glVertexAttribL1d GLEW_GET_FUN(__glewVertexAttribL1d)
+#define glVertexAttribL1dv GLEW_GET_FUN(__glewVertexAttribL1dv)
+#define glVertexAttribL2d GLEW_GET_FUN(__glewVertexAttribL2d)
+#define glVertexAttribL2dv GLEW_GET_FUN(__glewVertexAttribL2dv)
+#define glVertexAttribL3d GLEW_GET_FUN(__glewVertexAttribL3d)
+#define glVertexAttribL3dv GLEW_GET_FUN(__glewVertexAttribL3dv)
+#define glVertexAttribL4d GLEW_GET_FUN(__glewVertexAttribL4d)
+#define glVertexAttribL4dv GLEW_GET_FUN(__glewVertexAttribL4dv)
+#define glVertexAttribLPointer GLEW_GET_FUN(__glewVertexAttribLPointer)
+
+#define GLEW_ARB_vertex_attrib_64bit GLEW_GET_VAR(__GLEW_ARB_vertex_attrib_64bit)
+
+#endif /* GL_ARB_vertex_attrib_64bit */
+
+/* ---------------------- GL_ARB_vertex_attrib_binding --------------------- */
+
+#ifndef GL_ARB_vertex_attrib_binding
+#define GL_ARB_vertex_attrib_binding 1
+
+#define GL_VERTEX_ATTRIB_BINDING 0x82D4
+#define GL_VERTEX_ATTRIB_RELATIVE_OFFSET 0x82D5
+#define GL_VERTEX_BINDING_DIVISOR 0x82D6
+#define GL_VERTEX_BINDING_OFFSET 0x82D7
+#define GL_VERTEX_BINDING_STRIDE 0x82D8
+#define GL_MAX_VERTEX_ATTRIB_RELATIVE_OFFSET 0x82D9
+#define GL_MAX_VERTEX_ATTRIB_BINDINGS 0x82DA
+#define GL_VERTEX_BINDING_BUFFER 0x8F4F
+
+typedef void (GLAPIENTRY * PFNGLBINDVERTEXBUFFERPROC) (GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride);
+typedef void (GLAPIENTRY * PFNGLVERTEXARRAYBINDVERTEXBUFFEREXTPROC) (GLuint vaobj, GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride);
+typedef void (GLAPIENTRY * PFNGLVERTEXARRAYVERTEXATTRIBBINDINGEXTPROC) (GLuint vaobj, GLuint attribindex, GLuint bindingindex);
+typedef void (GLAPIENTRY * PFNGLVERTEXARRAYVERTEXATTRIBFORMATEXTPROC) (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset);
+typedef void (GLAPIENTRY * PFNGLVERTEXARRAYVERTEXATTRIBIFORMATEXTPROC) (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);
+typedef void (GLAPIENTRY * PFNGLVERTEXARRAYVERTEXATTRIBLFORMATEXTPROC) (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);
+typedef void (GLAPIENTRY * PFNGLVERTEXARRAYVERTEXBINDINGDIVISOREXTPROC) (GLuint vaobj, GLuint bindingindex, GLuint divisor);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBBINDINGPROC) (GLuint attribindex, GLuint bindingindex);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBFORMATPROC) (GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBIFORMATPROC) (GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBLFORMATPROC) (GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);
+typedef void (GLAPIENTRY * PFNGLVERTEXBINDINGDIVISORPROC) (GLuint bindingindex, GLuint divisor);
+
+#define glBindVertexBuffer GLEW_GET_FUN(__glewBindVertexBuffer)
+#define glVertexArrayBindVertexBufferEXT GLEW_GET_FUN(__glewVertexArrayBindVertexBufferEXT)
+#define glVertexArrayVertexAttribBindingEXT GLEW_GET_FUN(__glewVertexArrayVertexAttribBindingEXT)
+#define glVertexArrayVertexAttribFormatEXT GLEW_GET_FUN(__glewVertexArrayVertexAttribFormatEXT)
+#define glVertexArrayVertexAttribIFormatEXT GLEW_GET_FUN(__glewVertexArrayVertexAttribIFormatEXT)
+#define glVertexArrayVertexAttribLFormatEXT GLEW_GET_FUN(__glewVertexArrayVertexAttribLFormatEXT)
+#define glVertexArrayVertexBindingDivisorEXT GLEW_GET_FUN(__glewVertexArrayVertexBindingDivisorEXT)
+#define glVertexAttribBinding GLEW_GET_FUN(__glewVertexAttribBinding)
+#define glVertexAttribFormat GLEW_GET_FUN(__glewVertexAttribFormat)
+#define glVertexAttribIFormat GLEW_GET_FUN(__glewVertexAttribIFormat)
+#define glVertexAttribLFormat GLEW_GET_FUN(__glewVertexAttribLFormat)
+#define glVertexBindingDivisor GLEW_GET_FUN(__glewVertexBindingDivisor)
+
+#define GLEW_ARB_vertex_attrib_binding GLEW_GET_VAR(__GLEW_ARB_vertex_attrib_binding)
+
+#endif /* GL_ARB_vertex_attrib_binding */
+
+/* -------------------------- GL_ARB_vertex_blend -------------------------- */
+
+#ifndef GL_ARB_vertex_blend
+#define GL_ARB_vertex_blend 1
+
+#define GL_MODELVIEW0_ARB 0x1700
+#define GL_MODELVIEW1_ARB 0x850A
+#define GL_MAX_VERTEX_UNITS_ARB 0x86A4
+#define GL_ACTIVE_VERTEX_UNITS_ARB 0x86A5
+#define GL_WEIGHT_SUM_UNITY_ARB 0x86A6
+#define GL_VERTEX_BLEND_ARB 0x86A7
+#define GL_CURRENT_WEIGHT_ARB 0x86A8
+#define GL_WEIGHT_ARRAY_TYPE_ARB 0x86A9
+#define GL_WEIGHT_ARRAY_STRIDE_ARB 0x86AA
+#define GL_WEIGHT_ARRAY_SIZE_ARB 0x86AB
+#define GL_WEIGHT_ARRAY_POINTER_ARB 0x86AC
+#define GL_WEIGHT_ARRAY_ARB 0x86AD
+#define GL_MODELVIEW2_ARB 0x8722
+#define GL_MODELVIEW3_ARB 0x8723
+#define GL_MODELVIEW4_ARB 0x8724
+#define GL_MODELVIEW5_ARB 0x8725
+#define GL_MODELVIEW6_ARB 0x8726
+#define GL_MODELVIEW7_ARB 0x8727
+#define GL_MODELVIEW8_ARB 0x8728
+#define GL_MODELVIEW9_ARB 0x8729
+#define GL_MODELVIEW10_ARB 0x872A
+#define GL_MODELVIEW11_ARB 0x872B
+#define GL_MODELVIEW12_ARB 0x872C
+#define GL_MODELVIEW13_ARB 0x872D
+#define GL_MODELVIEW14_ARB 0x872E
+#define GL_MODELVIEW15_ARB 0x872F
+#define GL_MODELVIEW16_ARB 0x8730
+#define GL_MODELVIEW17_ARB 0x8731
+#define GL_MODELVIEW18_ARB 0x8732
+#define GL_MODELVIEW19_ARB 0x8733
+#define GL_MODELVIEW20_ARB 0x8734
+#define GL_MODELVIEW21_ARB 0x8735
+#define GL_MODELVIEW22_ARB 0x8736
+#define GL_MODELVIEW23_ARB 0x8737
+#define GL_MODELVIEW24_ARB 0x8738
+#define GL_MODELVIEW25_ARB 0x8739
+#define GL_MODELVIEW26_ARB 0x873A
+#define GL_MODELVIEW27_ARB 0x873B
+#define GL_MODELVIEW28_ARB 0x873C
+#define GL_MODELVIEW29_ARB 0x873D
+#define GL_MODELVIEW30_ARB 0x873E
+#define GL_MODELVIEW31_ARB 0x873F
+
+typedef void (GLAPIENTRY * PFNGLVERTEXBLENDARBPROC) (GLint count);
+typedef void (GLAPIENTRY * PFNGLWEIGHTPOINTERARBPROC) (GLint size, GLenum type, GLsizei stride, void *pointer);
+typedef void (GLAPIENTRY * PFNGLWEIGHTBVARBPROC) (GLint size, GLbyte *weights);
+typedef void (GLAPIENTRY * PFNGLWEIGHTDVARBPROC) (GLint size, GLdouble *weights);
+typedef void (GLAPIENTRY * PFNGLWEIGHTFVARBPROC) (GLint size, GLfloat *weights);
+typedef void (GLAPIENTRY * PFNGLWEIGHTIVARBPROC) (GLint size, GLint *weights);
+typedef void (GLAPIENTRY * PFNGLWEIGHTSVARBPROC) (GLint size, GLshort *weights);
+typedef void (GLAPIENTRY * PFNGLWEIGHTUBVARBPROC) (GLint size, GLubyte *weights);
+typedef void (GLAPIENTRY * PFNGLWEIGHTUIVARBPROC) (GLint size, GLuint *weights);
+typedef void (GLAPIENTRY * PFNGLWEIGHTUSVARBPROC) (GLint size, GLushort *weights);
+
+#define glVertexBlendARB GLEW_GET_FUN(__glewVertexBlendARB)
+#define glWeightPointerARB GLEW_GET_FUN(__glewWeightPointerARB)
+#define glWeightbvARB GLEW_GET_FUN(__glewWeightbvARB)
+#define glWeightdvARB GLEW_GET_FUN(__glewWeightdvARB)
+#define glWeightfvARB GLEW_GET_FUN(__glewWeightfvARB)
+#define glWeightivARB GLEW_GET_FUN(__glewWeightivARB)
+#define glWeightsvARB GLEW_GET_FUN(__glewWeightsvARB)
+#define glWeightubvARB GLEW_GET_FUN(__glewWeightubvARB)
+#define glWeightuivARB GLEW_GET_FUN(__glewWeightuivARB)
+#define glWeightusvARB GLEW_GET_FUN(__glewWeightusvARB)
+
+#define GLEW_ARB_vertex_blend GLEW_GET_VAR(__GLEW_ARB_vertex_blend)
+
+#endif /* GL_ARB_vertex_blend */
+
+/* ---------------------- GL_ARB_vertex_buffer_object ---------------------- */
+
+#ifndef GL_ARB_vertex_buffer_object
+#define GL_ARB_vertex_buffer_object 1
+
+#define GL_BUFFER_SIZE_ARB 0x8764
+#define GL_BUFFER_USAGE_ARB 0x8765
+#define GL_ARRAY_BUFFER_ARB 0x8892
+#define GL_ELEMENT_ARRAY_BUFFER_ARB 0x8893
+#define GL_ARRAY_BUFFER_BINDING_ARB 0x8894
+#define GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB 0x8895
+#define GL_VERTEX_ARRAY_BUFFER_BINDING_ARB 0x8896
+#define GL_NORMAL_ARRAY_BUFFER_BINDING_ARB 0x8897
+#define GL_COLOR_ARRAY_BUFFER_BINDING_ARB 0x8898
+#define GL_INDEX_ARRAY_BUFFER_BINDING_ARB 0x8899
+#define GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB 0x889A
+#define GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB 0x889B
+#define GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB 0x889C
+#define GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB 0x889D
+#define GL_WEIGHT_ARRAY_BUFFER_BINDING_ARB 0x889E
+#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB 0x889F
+#define GL_READ_ONLY_ARB 0x88B8
+#define GL_WRITE_ONLY_ARB 0x88B9
+#define GL_READ_WRITE_ARB 0x88BA
+#define GL_BUFFER_ACCESS_ARB 0x88BB
+#define GL_BUFFER_MAPPED_ARB 0x88BC
+#define GL_BUFFER_MAP_POINTER_ARB 0x88BD
+#define GL_STREAM_DRAW_ARB 0x88E0
+#define GL_STREAM_READ_ARB 0x88E1
+#define GL_STREAM_COPY_ARB 0x88E2
+#define GL_STATIC_DRAW_ARB 0x88E4
+#define GL_STATIC_READ_ARB 0x88E5
+#define GL_STATIC_COPY_ARB 0x88E6
+#define GL_DYNAMIC_DRAW_ARB 0x88E8
+#define GL_DYNAMIC_READ_ARB 0x88E9
+#define GL_DYNAMIC_COPY_ARB 0x88EA
+
+typedef ptrdiff_t GLintptrARB;
+typedef ptrdiff_t GLsizeiptrARB;
+
+typedef void (GLAPIENTRY * PFNGLBINDBUFFERARBPROC) (GLenum target, GLuint buffer);
+typedef void (GLAPIENTRY * PFNGLBUFFERDATAARBPROC) (GLenum target, GLsizeiptrARB size, const void *data, GLenum usage);
+typedef void (GLAPIENTRY * PFNGLBUFFERSUBDATAARBPROC) (GLenum target, GLintptrARB offset, GLsizeiptrARB size, const void *data);
+typedef void (GLAPIENTRY * PFNGLDELETEBUFFERSARBPROC) (GLsizei n, const GLuint* buffers);
+typedef void (GLAPIENTRY * PFNGLGENBUFFERSARBPROC) (GLsizei n, GLuint* buffers);
+typedef void (GLAPIENTRY * PFNGLGETBUFFERPARAMETERIVARBPROC) (GLenum target, GLenum pname, GLint* params);
+typedef void (GLAPIENTRY * PFNGLGETBUFFERPOINTERVARBPROC) (GLenum target, GLenum pname, void** params);
+typedef void (GLAPIENTRY * PFNGLGETBUFFERSUBDATAARBPROC) (GLenum target, GLintptrARB offset, GLsizeiptrARB size, void *data);
+typedef GLboolean (GLAPIENTRY * PFNGLISBUFFERARBPROC) (GLuint buffer);
+typedef void * (GLAPIENTRY * PFNGLMAPBUFFERARBPROC) (GLenum target, GLenum access);
+typedef GLboolean (GLAPIENTRY * PFNGLUNMAPBUFFERARBPROC) (GLenum target);
+
+#define glBindBufferARB GLEW_GET_FUN(__glewBindBufferARB)
+#define glBufferDataARB GLEW_GET_FUN(__glewBufferDataARB)
+#define glBufferSubDataARB GLEW_GET_FUN(__glewBufferSubDataARB)
+#define glDeleteBuffersARB GLEW_GET_FUN(__glewDeleteBuffersARB)
+#define glGenBuffersARB GLEW_GET_FUN(__glewGenBuffersARB)
+#define glGetBufferParameterivARB GLEW_GET_FUN(__glewGetBufferParameterivARB)
+#define glGetBufferPointervARB GLEW_GET_FUN(__glewGetBufferPointervARB)
+#define glGetBufferSubDataARB GLEW_GET_FUN(__glewGetBufferSubDataARB)
+#define glIsBufferARB GLEW_GET_FUN(__glewIsBufferARB)
+#define glMapBufferARB GLEW_GET_FUN(__glewMapBufferARB)
+#define glUnmapBufferARB GLEW_GET_FUN(__glewUnmapBufferARB)
+
+#define GLEW_ARB_vertex_buffer_object GLEW_GET_VAR(__GLEW_ARB_vertex_buffer_object)
+
+#endif /* GL_ARB_vertex_buffer_object */
+
+/* ------------------------- GL_ARB_vertex_program ------------------------- */
+
+#ifndef GL_ARB_vertex_program
+#define GL_ARB_vertex_program 1
+
+#define GL_COLOR_SUM_ARB 0x8458
+#define GL_VERTEX_PROGRAM_ARB 0x8620
+#define GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB 0x8622
+#define GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB 0x8623
+#define GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB 0x8624
+#define GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB 0x8625
+#define GL_CURRENT_VERTEX_ATTRIB_ARB 0x8626
+#define GL_PROGRAM_LENGTH_ARB 0x8627
+#define GL_PROGRAM_STRING_ARB 0x8628
+#define GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB 0x862E
+#define GL_MAX_PROGRAM_MATRICES_ARB 0x862F
+#define GL_CURRENT_MATRIX_STACK_DEPTH_ARB 0x8640
+#define GL_CURRENT_MATRIX_ARB 0x8641
+#define GL_VERTEX_PROGRAM_POINT_SIZE_ARB 0x8642
+#define GL_VERTEX_PROGRAM_TWO_SIDE_ARB 0x8643
+#define GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB 0x8645
+#define GL_PROGRAM_ERROR_POSITION_ARB 0x864B
+#define GL_PROGRAM_BINDING_ARB 0x8677
+#define GL_MAX_VERTEX_ATTRIBS_ARB 0x8869
+#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB 0x886A
+#define GL_PROGRAM_ERROR_STRING_ARB 0x8874
+#define GL_PROGRAM_FORMAT_ASCII_ARB 0x8875
+#define GL_PROGRAM_FORMAT_ARB 0x8876
+#define GL_PROGRAM_INSTRUCTIONS_ARB 0x88A0
+#define GL_MAX_PROGRAM_INSTRUCTIONS_ARB 0x88A1
+#define GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB 0x88A2
+#define GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB 0x88A3
+#define GL_PROGRAM_TEMPORARIES_ARB 0x88A4
+#define GL_MAX_PROGRAM_TEMPORARIES_ARB 0x88A5
+#define GL_PROGRAM_NATIVE_TEMPORARIES_ARB 0x88A6
+#define GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB 0x88A7
+#define GL_PROGRAM_PARAMETERS_ARB 0x88A8
+#define GL_MAX_PROGRAM_PARAMETERS_ARB 0x88A9
+#define GL_PROGRAM_NATIVE_PARAMETERS_ARB 0x88AA
+#define GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB 0x88AB
+#define GL_PROGRAM_ATTRIBS_ARB 0x88AC
+#define GL_MAX_PROGRAM_ATTRIBS_ARB 0x88AD
+#define GL_PROGRAM_NATIVE_ATTRIBS_ARB 0x88AE
+#define GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB 0x88AF
+#define GL_PROGRAM_ADDRESS_REGISTERS_ARB 0x88B0
+#define GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB 0x88B1
+#define GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB 0x88B2
+#define GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB 0x88B3
+#define GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB 0x88B4
+#define GL_MAX_PROGRAM_ENV_PARAMETERS_ARB 0x88B5
+#define GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB 0x88B6
+#define GL_TRANSPOSE_CURRENT_MATRIX_ARB 0x88B7
+#define GL_MATRIX0_ARB 0x88C0
+#define GL_MATRIX1_ARB 0x88C1
+#define GL_MATRIX2_ARB 0x88C2
+#define GL_MATRIX3_ARB 0x88C3
+#define GL_MATRIX4_ARB 0x88C4
+#define GL_MATRIX5_ARB 0x88C5
+#define GL_MATRIX6_ARB 0x88C6
+#define GL_MATRIX7_ARB 0x88C7
+#define GL_MATRIX8_ARB 0x88C8
+#define GL_MATRIX9_ARB 0x88C9
+#define GL_MATRIX10_ARB 0x88CA
+#define GL_MATRIX11_ARB 0x88CB
+#define GL_MATRIX12_ARB 0x88CC
+#define GL_MATRIX13_ARB 0x88CD
+#define GL_MATRIX14_ARB 0x88CE
+#define GL_MATRIX15_ARB 0x88CF
+#define GL_MATRIX16_ARB 0x88D0
+#define GL_MATRIX17_ARB 0x88D1
+#define GL_MATRIX18_ARB 0x88D2
+#define GL_MATRIX19_ARB 0x88D3
+#define GL_MATRIX20_ARB 0x88D4
+#define GL_MATRIX21_ARB 0x88D5
+#define GL_MATRIX22_ARB 0x88D6
+#define GL_MATRIX23_ARB 0x88D7
+#define GL_MATRIX24_ARB 0x88D8
+#define GL_MATRIX25_ARB 0x88D9
+#define GL_MATRIX26_ARB 0x88DA
+#define GL_MATRIX27_ARB 0x88DB
+#define GL_MATRIX28_ARB 0x88DC
+#define GL_MATRIX29_ARB 0x88DD
+#define GL_MATRIX30_ARB 0x88DE
+#define GL_MATRIX31_ARB 0x88DF
+
+typedef void (GLAPIENTRY * PFNGLBINDPROGRAMARBPROC) (GLenum target, GLuint program);
+typedef void (GLAPIENTRY * PFNGLDELETEPROGRAMSARBPROC) (GLsizei n, const GLuint* programs);
+typedef void (GLAPIENTRY * PFNGLDISABLEVERTEXATTRIBARRAYARBPROC) (GLuint index);
+typedef void (GLAPIENTRY * PFNGLENABLEVERTEXATTRIBARRAYARBPROC) (GLuint index);
+typedef void (GLAPIENTRY * PFNGLGENPROGRAMSARBPROC) (GLsizei n, GLuint* programs);
+typedef void (GLAPIENTRY * PFNGLGETPROGRAMENVPARAMETERDVARBPROC) (GLenum target, GLuint index, GLdouble* params);
+typedef void (GLAPIENTRY * PFNGLGETPROGRAMENVPARAMETERFVARBPROC) (GLenum target, GLuint index, GLfloat* params);
+typedef void (GLAPIENTRY * PFNGLGETPROGRAMLOCALPARAMETERDVARBPROC) (GLenum target, GLuint index, GLdouble* params);
+typedef void (GLAPIENTRY * PFNGLGETPROGRAMLOCALPARAMETERFVARBPROC) (GLenum target, GLuint index, GLfloat* params);
+typedef void (GLAPIENTRY * PFNGLGETPROGRAMSTRINGARBPROC) (GLenum target, GLenum pname, void *string);
+typedef void (GLAPIENTRY * PFNGLGETPROGRAMIVARBPROC) (GLenum target, GLenum pname, GLint* params);
+typedef void (GLAPIENTRY * PFNGLGETVERTEXATTRIBPOINTERVARBPROC) (GLuint index, GLenum pname, void** pointer);
+typedef void (GLAPIENTRY * PFNGLGETVERTEXATTRIBDVARBPROC) (GLuint index, GLenum pname, GLdouble* params);
+typedef void (GLAPIENTRY * PFNGLGETVERTEXATTRIBFVARBPROC) (GLuint index, GLenum pname, GLfloat* params);
+typedef void (GLAPIENTRY * PFNGLGETVERTEXATTRIBIVARBPROC) (GLuint index, GLenum pname, GLint* params);
+typedef GLboolean (GLAPIENTRY * PFNGLISPROGRAMARBPROC) (GLuint program);
+typedef void (GLAPIENTRY * PFNGLPROGRAMENVPARAMETER4DARBPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
+typedef void (GLAPIENTRY * PFNGLPROGRAMENVPARAMETER4DVARBPROC) (GLenum target, GLuint index, const GLdouble* params);
+typedef void (GLAPIENTRY * PFNGLPROGRAMENVPARAMETER4FARBPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+typedef void (GLAPIENTRY * PFNGLPROGRAMENVPARAMETER4FVARBPROC) (GLenum target, GLuint index, const GLfloat* params);
+typedef void (GLAPIENTRY * PFNGLPROGRAMLOCALPARAMETER4DARBPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
+typedef void (GLAPIENTRY * PFNGLPROGRAMLOCALPARAMETER4DVARBPROC) (GLenum target, GLuint index, const GLdouble* params);
+typedef void (GLAPIENTRY * PFNGLPROGRAMLOCALPARAMETER4FARBPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+typedef void (GLAPIENTRY * PFNGLPROGRAMLOCALPARAMETER4FVARBPROC) (GLenum target, GLuint index, const GLfloat* params);
+typedef void (GLAPIENTRY * PFNGLPROGRAMSTRINGARBPROC) (GLenum target, GLenum format, GLsizei len, const void *string);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB1DARBPROC) (GLuint index, GLdouble x);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB1DVARBPROC) (GLuint index, const GLdouble* v);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB1FARBPROC) (GLuint index, GLfloat x);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB1FVARBPROC) (GLuint index, const GLfloat* v);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB1SARBPROC) (GLuint index, GLshort x);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB1SVARBPROC) (GLuint index, const GLshort* v);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB2DARBPROC) (GLuint index, GLdouble x, GLdouble y);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB2DVARBPROC) (GLuint index, const GLdouble* v);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB2FARBPROC) (GLuint index, GLfloat x, GLfloat y);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB2FVARBPROC) (GLuint index, const GLfloat* v);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB2SARBPROC) (GLuint index, GLshort x, GLshort y);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB2SVARBPROC) (GLuint index, const GLshort* v);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB3DARBPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB3DVARBPROC) (GLuint index, const GLdouble* v);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB3FARBPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB3FVARBPROC) (GLuint index, const GLfloat* v);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB3SARBPROC) (GLuint index, GLshort x, GLshort y, GLshort z);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB3SVARBPROC) (GLuint index, const GLshort* v);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB4NBVARBPROC) (GLuint index, const GLbyte* v);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB4NIVARBPROC) (GLuint index, const GLint* v);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB4NSVARBPROC) (GLuint index, const GLshort* v);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB4NUBARBPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB4NUBVARBPROC) (GLuint index, const GLubyte* v);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB4NUIVARBPROC) (GLuint index, const GLuint* v);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB4NUSVARBPROC) (GLuint index, const GLushort* v);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB4BVARBPROC) (GLuint index, const GLbyte* v);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB4DARBPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB4DVARBPROC) (GLuint index, const GLdouble* v);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB4FARBPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB4FVARBPROC) (GLuint index, const GLfloat* v);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB4IVARBPROC) (GLuint index, const GLint* v);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB4SARBPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB4SVARBPROC) (GLuint index, const GLshort* v);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB4UBVARBPROC) (GLuint index, const GLubyte* v);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB4UIVARBPROC) (GLuint index, const GLuint* v);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB4USVARBPROC) (GLuint index, const GLushort* v);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBPOINTERARBPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer);
+
+#define glBindProgramARB GLEW_GET_FUN(__glewBindProgramARB)
+#define glDeleteProgramsARB GLEW_GET_FUN(__glewDeleteProgramsARB)
+#define glDisableVertexAttribArrayARB GLEW_GET_FUN(__glewDisableVertexAttribArrayARB)
+#define glEnableVertexAttribArrayARB GLEW_GET_FUN(__glewEnableVertexAttribArrayARB)
+#define glGenProgramsARB GLEW_GET_FUN(__glewGenProgramsARB)
+#define glGetProgramEnvParameterdvARB GLEW_GET_FUN(__glewGetProgramEnvParameterdvARB)
+#define glGetProgramEnvParameterfvARB GLEW_GET_FUN(__glewGetProgramEnvParameterfvARB)
+#define glGetProgramLocalParameterdvARB GLEW_GET_FUN(__glewGetProgramLocalParameterdvARB)
+#define glGetProgramLocalParameterfvARB GLEW_GET_FUN(__glewGetProgramLocalParameterfvARB)
+#define glGetProgramStringARB GLEW_GET_FUN(__glewGetProgramStringARB)
+#define glGetProgramivARB GLEW_GET_FUN(__glewGetProgramivARB)
+#define glGetVertexAttribPointervARB GLEW_GET_FUN(__glewGetVertexAttribPointervARB)
+#define glGetVertexAttribdvARB GLEW_GET_FUN(__glewGetVertexAttribdvARB)
+#define glGetVertexAttribfvARB GLEW_GET_FUN(__glewGetVertexAttribfvARB)
+#define glGetVertexAttribivARB GLEW_GET_FUN(__glewGetVertexAttribivARB)
+#define glIsProgramARB GLEW_GET_FUN(__glewIsProgramARB)
+#define glProgramEnvParameter4dARB GLEW_GET_FUN(__glewProgramEnvParameter4dARB)
+#define glProgramEnvParameter4dvARB GLEW_GET_FUN(__glewProgramEnvParameter4dvARB)
+#define glProgramEnvParameter4fARB GLEW_GET_FUN(__glewProgramEnvParameter4fARB)
+#define glProgramEnvParameter4fvARB GLEW_GET_FUN(__glewProgramEnvParameter4fvARB)
+#define glProgramLocalParameter4dARB GLEW_GET_FUN(__glewProgramLocalParameter4dARB)
+#define glProgramLocalParameter4dvARB GLEW_GET_FUN(__glewProgramLocalParameter4dvARB)
+#define glProgramLocalParameter4fARB GLEW_GET_FUN(__glewProgramLocalParameter4fARB)
+#define glProgramLocalParameter4fvARB GLEW_GET_FUN(__glewProgramLocalParameter4fvARB)
+#define glProgramStringARB GLEW_GET_FUN(__glewProgramStringARB)
+#define glVertexAttrib1dARB GLEW_GET_FUN(__glewVertexAttrib1dARB)
+#define glVertexAttrib1dvARB GLEW_GET_FUN(__glewVertexAttrib1dvARB)
+#define glVertexAttrib1fARB GLEW_GET_FUN(__glewVertexAttrib1fARB)
+#define glVertexAttrib1fvARB GLEW_GET_FUN(__glewVertexAttrib1fvARB)
+#define glVertexAttrib1sARB GLEW_GET_FUN(__glewVertexAttrib1sARB)
+#define glVertexAttrib1svARB GLEW_GET_FUN(__glewVertexAttrib1svARB)
+#define glVertexAttrib2dARB GLEW_GET_FUN(__glewVertexAttrib2dARB)
+#define glVertexAttrib2dvARB GLEW_GET_FUN(__glewVertexAttrib2dvARB)
+#define glVertexAttrib2fARB GLEW_GET_FUN(__glewVertexAttrib2fARB)
+#define glVertexAttrib2fvARB GLEW_GET_FUN(__glewVertexAttrib2fvARB)
+#define glVertexAttrib2sARB GLEW_GET_FUN(__glewVertexAttrib2sARB)
+#define glVertexAttrib2svARB GLEW_GET_FUN(__glewVertexAttrib2svARB)
+#define glVertexAttrib3dARB GLEW_GET_FUN(__glewVertexAttrib3dARB)
+#define glVertexAttrib3dvARB GLEW_GET_FUN(__glewVertexAttrib3dvARB)
+#define glVertexAttrib3fARB GLEW_GET_FUN(__glewVertexAttrib3fARB)
+#define glVertexAttrib3fvARB GLEW_GET_FUN(__glewVertexAttrib3fvARB)
+#define glVertexAttrib3sARB GLEW_GET_FUN(__glewVertexAttrib3sARB)
+#define glVertexAttrib3svARB GLEW_GET_FUN(__glewVertexAttrib3svARB)
+#define glVertexAttrib4NbvARB GLEW_GET_FUN(__glewVertexAttrib4NbvARB)
+#define glVertexAttrib4NivARB GLEW_GET_FUN(__glewVertexAttrib4NivARB)
+#define glVertexAttrib4NsvARB GLEW_GET_FUN(__glewVertexAttrib4NsvARB)
+#define glVertexAttrib4NubARB GLEW_GET_FUN(__glewVertexAttrib4NubARB)
+#define glVertexAttrib4NubvARB GLEW_GET_FUN(__glewVertexAttrib4NubvARB)
+#define glVertexAttrib4NuivARB GLEW_GET_FUN(__glewVertexAttrib4NuivARB)
+#define glVertexAttrib4NusvARB GLEW_GET_FUN(__glewVertexAttrib4NusvARB)
+#define glVertexAttrib4bvARB GLEW_GET_FUN(__glewVertexAttrib4bvARB)
+#define glVertexAttrib4dARB GLEW_GET_FUN(__glewVertexAttrib4dARB)
+#define glVertexAttrib4dvARB GLEW_GET_FUN(__glewVertexAttrib4dvARB)
+#define glVertexAttrib4fARB GLEW_GET_FUN(__glewVertexAttrib4fARB)
+#define glVertexAttrib4fvARB GLEW_GET_FUN(__glewVertexAttrib4fvARB)
+#define glVertexAttrib4ivARB GLEW_GET_FUN(__glewVertexAttrib4ivARB)
+#define glVertexAttrib4sARB GLEW_GET_FUN(__glewVertexAttrib4sARB)
+#define glVertexAttrib4svARB GLEW_GET_FUN(__glewVertexAttrib4svARB)
+#define glVertexAttrib4ubvARB GLEW_GET_FUN(__glewVertexAttrib4ubvARB)
+#define glVertexAttrib4uivARB GLEW_GET_FUN(__glewVertexAttrib4uivARB)
+#define glVertexAttrib4usvARB GLEW_GET_FUN(__glewVertexAttrib4usvARB)
+#define glVertexAttribPointerARB GLEW_GET_FUN(__glewVertexAttribPointerARB)
+
+#define GLEW_ARB_vertex_program GLEW_GET_VAR(__GLEW_ARB_vertex_program)
+
+#endif /* GL_ARB_vertex_program */
+
+/* -------------------------- GL_ARB_vertex_shader ------------------------- */
+
+#ifndef GL_ARB_vertex_shader
+#define GL_ARB_vertex_shader 1
+
+#define GL_VERTEX_SHADER_ARB 0x8B31
+#define GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB 0x8B4A
+#define GL_MAX_VARYING_FLOATS_ARB 0x8B4B
+#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB 0x8B4C
+#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB 0x8B4D
+#define GL_OBJECT_ACTIVE_ATTRIBUTES_ARB 0x8B89
+#define GL_OBJECT_ACTIVE_ATTRIBUTE_MAX_LENGTH_ARB 0x8B8A
+
+typedef void (GLAPIENTRY * PFNGLBINDATTRIBLOCATIONARBPROC) (GLhandleARB programObj, GLuint index, const GLcharARB* name);
+typedef void (GLAPIENTRY * PFNGLGETACTIVEATTRIBARBPROC) (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei* length, GLint *size, GLenum *type, GLcharARB *name);
+typedef GLint (GLAPIENTRY * PFNGLGETATTRIBLOCATIONARBPROC) (GLhandleARB programObj, const GLcharARB* name);
+
+#define glBindAttribLocationARB GLEW_GET_FUN(__glewBindAttribLocationARB)
+#define glGetActiveAttribARB GLEW_GET_FUN(__glewGetActiveAttribARB)
+#define glGetAttribLocationARB GLEW_GET_FUN(__glewGetAttribLocationARB)
+
+#define GLEW_ARB_vertex_shader GLEW_GET_VAR(__GLEW_ARB_vertex_shader)
+
+#endif /* GL_ARB_vertex_shader */
+
+/* ------------------- GL_ARB_vertex_type_10f_11f_11f_rev ------------------ */
+
+#ifndef GL_ARB_vertex_type_10f_11f_11f_rev
+#define GL_ARB_vertex_type_10f_11f_11f_rev 1
+
+#define GL_UNSIGNED_INT_10F_11F_11F_REV 0x8C3B
+
+#define GLEW_ARB_vertex_type_10f_11f_11f_rev GLEW_GET_VAR(__GLEW_ARB_vertex_type_10f_11f_11f_rev)
+
+#endif /* GL_ARB_vertex_type_10f_11f_11f_rev */
+
+/* ------------------- GL_ARB_vertex_type_2_10_10_10_rev ------------------- */
+
+#ifndef GL_ARB_vertex_type_2_10_10_10_rev
+#define GL_ARB_vertex_type_2_10_10_10_rev 1
+
+#define GL_UNSIGNED_INT_2_10_10_10_REV 0x8368
+#define GL_INT_2_10_10_10_REV 0x8D9F
+
+typedef void (GLAPIENTRY * PFNGLCOLORP3UIPROC) (GLenum type, GLuint color);
+typedef void (GLAPIENTRY * PFNGLCOLORP3UIVPROC) (GLenum type, const GLuint* color);
+typedef void (GLAPIENTRY * PFNGLCOLORP4UIPROC) (GLenum type, GLuint color);
+typedef void (GLAPIENTRY * PFNGLCOLORP4UIVPROC) (GLenum type, const GLuint* color);
+typedef void (GLAPIENTRY * PFNGLMULTITEXCOORDP1UIPROC) (GLenum texture, GLenum type, GLuint coords);
+typedef void (GLAPIENTRY * PFNGLMULTITEXCOORDP1UIVPROC) (GLenum texture, GLenum type, const GLuint* coords);
+typedef void (GLAPIENTRY * PFNGLMULTITEXCOORDP2UIPROC) (GLenum texture, GLenum type, GLuint coords);
+typedef void (GLAPIENTRY * PFNGLMULTITEXCOORDP2UIVPROC) (GLenum texture, GLenum type, const GLuint* coords);
+typedef void (GLAPIENTRY * PFNGLMULTITEXCOORDP3UIPROC) (GLenum texture, GLenum type, GLuint coords);
+typedef void (GLAPIENTRY * PFNGLMULTITEXCOORDP3UIVPROC) (GLenum texture, GLenum type, const GLuint* coords);
+typedef void (GLAPIENTRY * PFNGLMULTITEXCOORDP4UIPROC) (GLenum texture, GLenum type, GLuint coords);
+typedef void (GLAPIENTRY * PFNGLMULTITEXCOORDP4UIVPROC) (GLenum texture, GLenum type, const GLuint* coords);
+typedef void (GLAPIENTRY * PFNGLNORMALP3UIPROC) (GLenum type, GLuint coords);
+typedef void (GLAPIENTRY * PFNGLNORMALP3UIVPROC) (GLenum type, const GLuint* coords);
+typedef void (GLAPIENTRY * PFNGLSECONDARYCOLORP3UIPROC) (GLenum type, GLuint color);
+typedef void (GLAPIENTRY * PFNGLSECONDARYCOLORP3UIVPROC) (GLenum type, const GLuint* color);
+typedef void (GLAPIENTRY * PFNGLTEXCOORDP1UIPROC) (GLenum type, GLuint coords);
+typedef void (GLAPIENTRY * PFNGLTEXCOORDP1UIVPROC) (GLenum type, const GLuint* coords);
+typedef void (GLAPIENTRY * PFNGLTEXCOORDP2UIPROC) (GLenum type, GLuint coords);
+typedef void (GLAPIENTRY * PFNGLTEXCOORDP2UIVPROC) (GLenum type, const GLuint* coords);
+typedef void (GLAPIENTRY * PFNGLTEXCOORDP3UIPROC) (GLenum type, GLuint coords);
+typedef void (GLAPIENTRY * PFNGLTEXCOORDP3UIVPROC) (GLenum type, const GLuint* coords);
+typedef void (GLAPIENTRY * PFNGLTEXCOORDP4UIPROC) (GLenum type, GLuint coords);
+typedef void (GLAPIENTRY * PFNGLTEXCOORDP4UIVPROC) (GLenum type, const GLuint* coords);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBP1UIPROC) (GLuint index, GLenum type, GLboolean normalized, GLuint value);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBP1UIVPROC) (GLuint index, GLenum type, GLboolean normalized, const GLuint* value);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBP2UIPROC) (GLuint index, GLenum type, GLboolean normalized, GLuint value);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBP2UIVPROC) (GLuint index, GLenum type, GLboolean normalized, const GLuint* value);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBP3UIPROC) (GLuint index, GLenum type, GLboolean normalized, GLuint value);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBP3UIVPROC) (GLuint index, GLenum type, GLboolean normalized, const GLuint* value);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBP4UIPROC) (GLuint index, GLenum type, GLboolean normalized, GLuint value);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBP4UIVPROC) (GLuint index, GLenum type, GLboolean normalized, const GLuint* value);
+typedef void (GLAPIENTRY * PFNGLVERTEXP2UIPROC) (GLenum type, GLuint value);
+typedef void (GLAPIENTRY * PFNGLVERTEXP2UIVPROC) (GLenum type, const GLuint* value);
+typedef void (GLAPIENTRY * PFNGLVERTEXP3UIPROC) (GLenum type, GLuint value);
+typedef void (GLAPIENTRY * PFNGLVERTEXP3UIVPROC) (GLenum type, const GLuint* value);
+typedef void (GLAPIENTRY * PFNGLVERTEXP4UIPROC) (GLenum type, GLuint value);
+typedef void (GLAPIENTRY * PFNGLVERTEXP4UIVPROC) (GLenum type, const GLuint* value);
+
+#define glColorP3ui GLEW_GET_FUN(__glewColorP3ui)
+#define glColorP3uiv GLEW_GET_FUN(__glewColorP3uiv)
+#define glColorP4ui GLEW_GET_FUN(__glewColorP4ui)
+#define glColorP4uiv GLEW_GET_FUN(__glewColorP4uiv)
+#define glMultiTexCoordP1ui GLEW_GET_FUN(__glewMultiTexCoordP1ui)
+#define glMultiTexCoordP1uiv GLEW_GET_FUN(__glewMultiTexCoordP1uiv)
+#define glMultiTexCoordP2ui GLEW_GET_FUN(__glewMultiTexCoordP2ui)
+#define glMultiTexCoordP2uiv GLEW_GET_FUN(__glewMultiTexCoordP2uiv)
+#define glMultiTexCoordP3ui GLEW_GET_FUN(__glewMultiTexCoordP3ui)
+#define glMultiTexCoordP3uiv GLEW_GET_FUN(__glewMultiTexCoordP3uiv)
+#define glMultiTexCoordP4ui GLEW_GET_FUN(__glewMultiTexCoordP4ui)
+#define glMultiTexCoordP4uiv GLEW_GET_FUN(__glewMultiTexCoordP4uiv)
+#define glNormalP3ui GLEW_GET_FUN(__glewNormalP3ui)
+#define glNormalP3uiv GLEW_GET_FUN(__glewNormalP3uiv)
+#define glSecondaryColorP3ui GLEW_GET_FUN(__glewSecondaryColorP3ui)
+#define glSecondaryColorP3uiv GLEW_GET_FUN(__glewSecondaryColorP3uiv)
+#define glTexCoordP1ui GLEW_GET_FUN(__glewTexCoordP1ui)
+#define glTexCoordP1uiv GLEW_GET_FUN(__glewTexCoordP1uiv)
+#define glTexCoordP2ui GLEW_GET_FUN(__glewTexCoordP2ui)
+#define glTexCoordP2uiv GLEW_GET_FUN(__glewTexCoordP2uiv)
+#define glTexCoordP3ui GLEW_GET_FUN(__glewTexCoordP3ui)
+#define glTexCoordP3uiv GLEW_GET_FUN(__glewTexCoordP3uiv)
+#define glTexCoordP4ui GLEW_GET_FUN(__glewTexCoordP4ui)
+#define glTexCoordP4uiv GLEW_GET_FUN(__glewTexCoordP4uiv)
+#define glVertexAttribP1ui GLEW_GET_FUN(__glewVertexAttribP1ui)
+#define glVertexAttribP1uiv GLEW_GET_FUN(__glewVertexAttribP1uiv)
+#define glVertexAttribP2ui GLEW_GET_FUN(__glewVertexAttribP2ui)
+#define glVertexAttribP2uiv GLEW_GET_FUN(__glewVertexAttribP2uiv)
+#define glVertexAttribP3ui GLEW_GET_FUN(__glewVertexAttribP3ui)
+#define glVertexAttribP3uiv GLEW_GET_FUN(__glewVertexAttribP3uiv)
+#define glVertexAttribP4ui GLEW_GET_FUN(__glewVertexAttribP4ui)
+#define glVertexAttribP4uiv GLEW_GET_FUN(__glewVertexAttribP4uiv)
+#define glVertexP2ui GLEW_GET_FUN(__glewVertexP2ui)
+#define glVertexP2uiv GLEW_GET_FUN(__glewVertexP2uiv)
+#define glVertexP3ui GLEW_GET_FUN(__glewVertexP3ui)
+#define glVertexP3uiv GLEW_GET_FUN(__glewVertexP3uiv)
+#define glVertexP4ui GLEW_GET_FUN(__glewVertexP4ui)
+#define glVertexP4uiv GLEW_GET_FUN(__glewVertexP4uiv)
+
+#define GLEW_ARB_vertex_type_2_10_10_10_rev GLEW_GET_VAR(__GLEW_ARB_vertex_type_2_10_10_10_rev)
+
+#endif /* GL_ARB_vertex_type_2_10_10_10_rev */
+
+/* ------------------------- GL_ARB_viewport_array ------------------------- */
+
+#ifndef GL_ARB_viewport_array
+#define GL_ARB_viewport_array 1
+
+#define GL_DEPTH_RANGE 0x0B70
+#define GL_VIEWPORT 0x0BA2
+#define GL_SCISSOR_BOX 0x0C10
+#define GL_SCISSOR_TEST 0x0C11
+#define GL_MAX_VIEWPORTS 0x825B
+#define GL_VIEWPORT_SUBPIXEL_BITS 0x825C
+#define GL_VIEWPORT_BOUNDS_RANGE 0x825D
+#define GL_LAYER_PROVOKING_VERTEX 0x825E
+#define GL_VIEWPORT_INDEX_PROVOKING_VERTEX 0x825F
+#define GL_UNDEFINED_VERTEX 0x8260
+#define GL_FIRST_VERTEX_CONVENTION 0x8E4D
+#define GL_LAST_VERTEX_CONVENTION 0x8E4E
+#define GL_PROVOKING_VERTEX 0x8E4F
+
+typedef void (GLAPIENTRY * PFNGLDEPTHRANGEARRAYVPROC) (GLuint first, GLsizei count, const GLclampd * v);
+typedef void (GLAPIENTRY * PFNGLDEPTHRANGEINDEXEDPROC) (GLuint index, GLclampd n, GLclampd f);
+typedef void (GLAPIENTRY * PFNGLGETDOUBLEI_VPROC) (GLenum target, GLuint index, GLdouble* data);
+typedef void (GLAPIENTRY * PFNGLGETFLOATI_VPROC) (GLenum target, GLuint index, GLfloat* data);
+typedef void (GLAPIENTRY * PFNGLSCISSORARRAYVPROC) (GLuint first, GLsizei count, const GLint * v);
+typedef void (GLAPIENTRY * PFNGLSCISSORINDEXEDPROC) (GLuint index, GLint left, GLint bottom, GLsizei width, GLsizei height);
+typedef void (GLAPIENTRY * PFNGLSCISSORINDEXEDVPROC) (GLuint index, const GLint * v);
+typedef void (GLAPIENTRY * PFNGLVIEWPORTARRAYVPROC) (GLuint first, GLsizei count, const GLfloat * v);
+typedef void (GLAPIENTRY * PFNGLVIEWPORTINDEXEDFPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat w, GLfloat h);
+typedef void (GLAPIENTRY * PFNGLVIEWPORTINDEXEDFVPROC) (GLuint index, const GLfloat * v);
+
+#define glDepthRangeArrayv GLEW_GET_FUN(__glewDepthRangeArrayv)
+#define glDepthRangeIndexed GLEW_GET_FUN(__glewDepthRangeIndexed)
+#define glGetDoublei_v GLEW_GET_FUN(__glewGetDoublei_v)
+#define glGetFloati_v GLEW_GET_FUN(__glewGetFloati_v)
+#define glScissorArrayv GLEW_GET_FUN(__glewScissorArrayv)
+#define glScissorIndexed GLEW_GET_FUN(__glewScissorIndexed)
+#define glScissorIndexedv GLEW_GET_FUN(__glewScissorIndexedv)
+#define glViewportArrayv GLEW_GET_FUN(__glewViewportArrayv)
+#define glViewportIndexedf GLEW_GET_FUN(__glewViewportIndexedf)
+#define glViewportIndexedfv GLEW_GET_FUN(__glewViewportIndexedfv)
+
+#define GLEW_ARB_viewport_array GLEW_GET_VAR(__GLEW_ARB_viewport_array)
+
+#endif /* GL_ARB_viewport_array */
+
+/* --------------------------- GL_ARB_window_pos --------------------------- */
+
+#ifndef GL_ARB_window_pos
+#define GL_ARB_window_pos 1
+
+typedef void (GLAPIENTRY * PFNGLWINDOWPOS2DARBPROC) (GLdouble x, GLdouble y);
+typedef void (GLAPIENTRY * PFNGLWINDOWPOS2DVARBPROC) (const GLdouble* p);
+typedef void (GLAPIENTRY * PFNGLWINDOWPOS2FARBPROC) (GLfloat x, GLfloat y);
+typedef void (GLAPIENTRY * PFNGLWINDOWPOS2FVARBPROC) (const GLfloat* p);
+typedef void (GLAPIENTRY * PFNGLWINDOWPOS2IARBPROC) (GLint x, GLint y);
+typedef void (GLAPIENTRY * PFNGLWINDOWPOS2IVARBPROC) (const GLint* p);
+typedef void (GLAPIENTRY * PFNGLWINDOWPOS2SARBPROC) (GLshort x, GLshort y);
+typedef void (GLAPIENTRY * PFNGLWINDOWPOS2SVARBPROC) (const GLshort* p);
+typedef void (GLAPIENTRY * PFNGLWINDOWPOS3DARBPROC) (GLdouble x, GLdouble y, GLdouble z);
+typedef void (GLAPIENTRY * PFNGLWINDOWPOS3DVARBPROC) (const GLdouble* p);
+typedef void (GLAPIENTRY * PFNGLWINDOWPOS3FARBPROC) (GLfloat x, GLfloat y, GLfloat z);
+typedef void (GLAPIENTRY * PFNGLWINDOWPOS3FVARBPROC) (const GLfloat* p);
+typedef void (GLAPIENTRY * PFNGLWINDOWPOS3IARBPROC) (GLint x, GLint y, GLint z);
+typedef void (GLAPIENTRY * PFNGLWINDOWPOS3IVARBPROC) (const GLint* p);
+typedef void (GLAPIENTRY * PFNGLWINDOWPOS3SARBPROC) (GLshort x, GLshort y, GLshort z);
+typedef void (GLAPIENTRY * PFNGLWINDOWPOS3SVARBPROC) (const GLshort* p);
+
+#define glWindowPos2dARB GLEW_GET_FUN(__glewWindowPos2dARB)
+#define glWindowPos2dvARB GLEW_GET_FUN(__glewWindowPos2dvARB)
+#define glWindowPos2fARB GLEW_GET_FUN(__glewWindowPos2fARB)
+#define glWindowPos2fvARB GLEW_GET_FUN(__glewWindowPos2fvARB)
+#define glWindowPos2iARB GLEW_GET_FUN(__glewWindowPos2iARB)
+#define glWindowPos2ivARB GLEW_GET_FUN(__glewWindowPos2ivARB)
+#define glWindowPos2sARB GLEW_GET_FUN(__glewWindowPos2sARB)
+#define glWindowPos2svARB GLEW_GET_FUN(__glewWindowPos2svARB)
+#define glWindowPos3dARB GLEW_GET_FUN(__glewWindowPos3dARB)
+#define glWindowPos3dvARB GLEW_GET_FUN(__glewWindowPos3dvARB)
+#define glWindowPos3fARB GLEW_GET_FUN(__glewWindowPos3fARB)
+#define glWindowPos3fvARB GLEW_GET_FUN(__glewWindowPos3fvARB)
+#define glWindowPos3iARB GLEW_GET_FUN(__glewWindowPos3iARB)
+#define glWindowPos3ivARB GLEW_GET_FUN(__glewWindowPos3ivARB)
+#define glWindowPos3sARB GLEW_GET_FUN(__glewWindowPos3sARB)
+#define glWindowPos3svARB GLEW_GET_FUN(__glewWindowPos3svARB)
+
+#define GLEW_ARB_window_pos GLEW_GET_VAR(__GLEW_ARB_window_pos)
+
+#endif /* GL_ARB_window_pos */
+
+/* ------------------------- GL_ATIX_point_sprites ------------------------- */
+
+#ifndef GL_ATIX_point_sprites
+#define GL_ATIX_point_sprites 1
+
+#define GL_TEXTURE_POINT_MODE_ATIX 0x60B0
+#define GL_TEXTURE_POINT_ONE_COORD_ATIX 0x60B1
+#define GL_TEXTURE_POINT_SPRITE_ATIX 0x60B2
+#define GL_POINT_SPRITE_CULL_MODE_ATIX 0x60B3
+#define GL_POINT_SPRITE_CULL_CENTER_ATIX 0x60B4
+#define GL_POINT_SPRITE_CULL_CLIP_ATIX 0x60B5
+
+#define GLEW_ATIX_point_sprites GLEW_GET_VAR(__GLEW_ATIX_point_sprites)
+
+#endif /* GL_ATIX_point_sprites */
+
+/* ---------------------- GL_ATIX_texture_env_combine3 --------------------- */
+
+#ifndef GL_ATIX_texture_env_combine3
+#define GL_ATIX_texture_env_combine3 1
+
+#define GL_MODULATE_ADD_ATIX 0x8744
+#define GL_MODULATE_SIGNED_ADD_ATIX 0x8745
+#define GL_MODULATE_SUBTRACT_ATIX 0x8746
+
+#define GLEW_ATIX_texture_env_combine3 GLEW_GET_VAR(__GLEW_ATIX_texture_env_combine3)
+
+#endif /* GL_ATIX_texture_env_combine3 */
+
+/* ----------------------- GL_ATIX_texture_env_route ----------------------- */
+
+#ifndef GL_ATIX_texture_env_route
+#define GL_ATIX_texture_env_route 1
+
+#define GL_SECONDARY_COLOR_ATIX 0x8747
+#define GL_TEXTURE_OUTPUT_RGB_ATIX 0x8748
+#define GL_TEXTURE_OUTPUT_ALPHA_ATIX 0x8749
+
+#define GLEW_ATIX_texture_env_route GLEW_GET_VAR(__GLEW_ATIX_texture_env_route)
+
+#endif /* GL_ATIX_texture_env_route */
+
+/* ---------------- GL_ATIX_vertex_shader_output_point_size ---------------- */
+
+#ifndef GL_ATIX_vertex_shader_output_point_size
+#define GL_ATIX_vertex_shader_output_point_size 1
+
+#define GL_OUTPUT_POINT_SIZE_ATIX 0x610E
+
+#define GLEW_ATIX_vertex_shader_output_point_size GLEW_GET_VAR(__GLEW_ATIX_vertex_shader_output_point_size)
+
+#endif /* GL_ATIX_vertex_shader_output_point_size */
+
+/* -------------------------- GL_ATI_draw_buffers -------------------------- */
+
+#ifndef GL_ATI_draw_buffers
+#define GL_ATI_draw_buffers 1
+
+#define GL_MAX_DRAW_BUFFERS_ATI 0x8824
+#define GL_DRAW_BUFFER0_ATI 0x8825
+#define GL_DRAW_BUFFER1_ATI 0x8826
+#define GL_DRAW_BUFFER2_ATI 0x8827
+#define GL_DRAW_BUFFER3_ATI 0x8828
+#define GL_DRAW_BUFFER4_ATI 0x8829
+#define GL_DRAW_BUFFER5_ATI 0x882A
+#define GL_DRAW_BUFFER6_ATI 0x882B
+#define GL_DRAW_BUFFER7_ATI 0x882C
+#define GL_DRAW_BUFFER8_ATI 0x882D
+#define GL_DRAW_BUFFER9_ATI 0x882E
+#define GL_DRAW_BUFFER10_ATI 0x882F
+#define GL_DRAW_BUFFER11_ATI 0x8830
+#define GL_DRAW_BUFFER12_ATI 0x8831
+#define GL_DRAW_BUFFER13_ATI 0x8832
+#define GL_DRAW_BUFFER14_ATI 0x8833
+#define GL_DRAW_BUFFER15_ATI 0x8834
+
+typedef void (GLAPIENTRY * PFNGLDRAWBUFFERSATIPROC) (GLsizei n, const GLenum* bufs);
+
+#define glDrawBuffersATI GLEW_GET_FUN(__glewDrawBuffersATI)
+
+#define GLEW_ATI_draw_buffers GLEW_GET_VAR(__GLEW_ATI_draw_buffers)
+
+#endif /* GL_ATI_draw_buffers */
+
+/* -------------------------- GL_ATI_element_array ------------------------- */
+
+#ifndef GL_ATI_element_array
+#define GL_ATI_element_array 1
+
+#define GL_ELEMENT_ARRAY_ATI 0x8768
+#define GL_ELEMENT_ARRAY_TYPE_ATI 0x8769
+#define GL_ELEMENT_ARRAY_POINTER_ATI 0x876A
+
+typedef void (GLAPIENTRY * PFNGLDRAWELEMENTARRAYATIPROC) (GLenum mode, GLsizei count);
+typedef void (GLAPIENTRY * PFNGLDRAWRANGEELEMENTARRAYATIPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count);
+typedef void (GLAPIENTRY * PFNGLELEMENTPOINTERATIPROC) (GLenum type, const void *pointer);
+
+#define glDrawElementArrayATI GLEW_GET_FUN(__glewDrawElementArrayATI)
+#define glDrawRangeElementArrayATI GLEW_GET_FUN(__glewDrawRangeElementArrayATI)
+#define glElementPointerATI GLEW_GET_FUN(__glewElementPointerATI)
+
+#define GLEW_ATI_element_array GLEW_GET_VAR(__GLEW_ATI_element_array)
+
+#endif /* GL_ATI_element_array */
+
+/* ------------------------- GL_ATI_envmap_bumpmap ------------------------- */
+
+#ifndef GL_ATI_envmap_bumpmap
+#define GL_ATI_envmap_bumpmap 1
+
+#define GL_BUMP_ROT_MATRIX_ATI 0x8775
+#define GL_BUMP_ROT_MATRIX_SIZE_ATI 0x8776
+#define GL_BUMP_NUM_TEX_UNITS_ATI 0x8777
+#define GL_BUMP_TEX_UNITS_ATI 0x8778
+#define GL_DUDV_ATI 0x8779
+#define GL_DU8DV8_ATI 0x877A
+#define GL_BUMP_ENVMAP_ATI 0x877B
+#define GL_BUMP_TARGET_ATI 0x877C
+
+typedef void (GLAPIENTRY * PFNGLGETTEXBUMPPARAMETERFVATIPROC) (GLenum pname, GLfloat *param);
+typedef void (GLAPIENTRY * PFNGLGETTEXBUMPPARAMETERIVATIPROC) (GLenum pname, GLint *param);
+typedef void (GLAPIENTRY * PFNGLTEXBUMPPARAMETERFVATIPROC) (GLenum pname, GLfloat *param);
+typedef void (GLAPIENTRY * PFNGLTEXBUMPPARAMETERIVATIPROC) (GLenum pname, GLint *param);
+
+#define glGetTexBumpParameterfvATI GLEW_GET_FUN(__glewGetTexBumpParameterfvATI)
+#define glGetTexBumpParameterivATI GLEW_GET_FUN(__glewGetTexBumpParameterivATI)
+#define glTexBumpParameterfvATI GLEW_GET_FUN(__glewTexBumpParameterfvATI)
+#define glTexBumpParameterivATI GLEW_GET_FUN(__glewTexBumpParameterivATI)
+
+#define GLEW_ATI_envmap_bumpmap GLEW_GET_VAR(__GLEW_ATI_envmap_bumpmap)
+
+#endif /* GL_ATI_envmap_bumpmap */
+
+/* ------------------------- GL_ATI_fragment_shader ------------------------ */
+
+#ifndef GL_ATI_fragment_shader
+#define GL_ATI_fragment_shader 1
+
+#define GL_2X_BIT_ATI 0x00000001
+#define GL_RED_BIT_ATI 0x00000001
+#define GL_4X_BIT_ATI 0x00000002
+#define GL_COMP_BIT_ATI 0x00000002
+#define GL_GREEN_BIT_ATI 0x00000002
+#define GL_8X_BIT_ATI 0x00000004
+#define GL_BLUE_BIT_ATI 0x00000004
+#define GL_NEGATE_BIT_ATI 0x00000004
+#define GL_BIAS_BIT_ATI 0x00000008
+#define GL_HALF_BIT_ATI 0x00000008
+#define GL_QUARTER_BIT_ATI 0x00000010
+#define GL_EIGHTH_BIT_ATI 0x00000020
+#define GL_SATURATE_BIT_ATI 0x00000040
+#define GL_FRAGMENT_SHADER_ATI 0x8920
+#define GL_REG_0_ATI 0x8921
+#define GL_REG_1_ATI 0x8922
+#define GL_REG_2_ATI 0x8923
+#define GL_REG_3_ATI 0x8924
+#define GL_REG_4_ATI 0x8925
+#define GL_REG_5_ATI 0x8926
+#define GL_CON_0_ATI 0x8941
+#define GL_CON_1_ATI 0x8942
+#define GL_CON_2_ATI 0x8943
+#define GL_CON_3_ATI 0x8944
+#define GL_CON_4_ATI 0x8945
+#define GL_CON_5_ATI 0x8946
+#define GL_CON_6_ATI 0x8947
+#define GL_CON_7_ATI 0x8948
+#define GL_MOV_ATI 0x8961
+#define GL_ADD_ATI 0x8963
+#define GL_MUL_ATI 0x8964
+#define GL_SUB_ATI 0x8965
+#define GL_DOT3_ATI 0x8966
+#define GL_DOT4_ATI 0x8967
+#define GL_MAD_ATI 0x8968
+#define GL_LERP_ATI 0x8969
+#define GL_CND_ATI 0x896A
+#define GL_CND0_ATI 0x896B
+#define GL_DOT2_ADD_ATI 0x896C
+#define GL_SECONDARY_INTERPOLATOR_ATI 0x896D
+#define GL_NUM_FRAGMENT_REGISTERS_ATI 0x896E
+#define GL_NUM_FRAGMENT_CONSTANTS_ATI 0x896F
+#define GL_NUM_PASSES_ATI 0x8970
+#define GL_NUM_INSTRUCTIONS_PER_PASS_ATI 0x8971
+#define GL_NUM_INSTRUCTIONS_TOTAL_ATI 0x8972
+#define GL_NUM_INPUT_INTERPOLATOR_COMPONENTS_ATI 0x8973
+#define GL_NUM_LOOPBACK_COMPONENTS_ATI 0x8974
+#define GL_COLOR_ALPHA_PAIRING_ATI 0x8975
+#define GL_SWIZZLE_STR_ATI 0x8976
+#define GL_SWIZZLE_STQ_ATI 0x8977
+#define GL_SWIZZLE_STR_DR_ATI 0x8978
+#define GL_SWIZZLE_STQ_DQ_ATI 0x8979
+#define GL_SWIZZLE_STRQ_ATI 0x897A
+#define GL_SWIZZLE_STRQ_DQ_ATI 0x897B
+
+typedef void (GLAPIENTRY * PFNGLALPHAFRAGMENTOP1ATIPROC) (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod);
+typedef void (GLAPIENTRY * PFNGLALPHAFRAGMENTOP2ATIPROC) (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod);
+typedef void (GLAPIENTRY * PFNGLALPHAFRAGMENTOP3ATIPROC) (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod);
+typedef void (GLAPIENTRY * PFNGLBEGINFRAGMENTSHADERATIPROC) (void);
+typedef void (GLAPIENTRY * PFNGLBINDFRAGMENTSHADERATIPROC) (GLuint id);
+typedef void (GLAPIENTRY * PFNGLCOLORFRAGMENTOP1ATIPROC) (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod);
+typedef void (GLAPIENTRY * PFNGLCOLORFRAGMENTOP2ATIPROC) (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod);
+typedef void (GLAPIENTRY * PFNGLCOLORFRAGMENTOP3ATIPROC) (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod);
+typedef void (GLAPIENTRY * PFNGLDELETEFRAGMENTSHADERATIPROC) (GLuint id);
+typedef void (GLAPIENTRY * PFNGLENDFRAGMENTSHADERATIPROC) (void);
+typedef GLuint (GLAPIENTRY * PFNGLGENFRAGMENTSHADERSATIPROC) (GLuint range);
+typedef void (GLAPIENTRY * PFNGLPASSTEXCOORDATIPROC) (GLuint dst, GLuint coord, GLenum swizzle);
+typedef void (GLAPIENTRY * PFNGLSAMPLEMAPATIPROC) (GLuint dst, GLuint interp, GLenum swizzle);
+typedef void (GLAPIENTRY * PFNGLSETFRAGMENTSHADERCONSTANTATIPROC) (GLuint dst, const GLfloat* value);
+
+#define glAlphaFragmentOp1ATI GLEW_GET_FUN(__glewAlphaFragmentOp1ATI)
+#define glAlphaFragmentOp2ATI GLEW_GET_FUN(__glewAlphaFragmentOp2ATI)
+#define glAlphaFragmentOp3ATI GLEW_GET_FUN(__glewAlphaFragmentOp3ATI)
+#define glBeginFragmentShaderATI GLEW_GET_FUN(__glewBeginFragmentShaderATI)
+#define glBindFragmentShaderATI GLEW_GET_FUN(__glewBindFragmentShaderATI)
+#define glColorFragmentOp1ATI GLEW_GET_FUN(__glewColorFragmentOp1ATI)
+#define glColorFragmentOp2ATI GLEW_GET_FUN(__glewColorFragmentOp2ATI)
+#define glColorFragmentOp3ATI GLEW_GET_FUN(__glewColorFragmentOp3ATI)
+#define glDeleteFragmentShaderATI GLEW_GET_FUN(__glewDeleteFragmentShaderATI)
+#define glEndFragmentShaderATI GLEW_GET_FUN(__glewEndFragmentShaderATI)
+#define glGenFragmentShadersATI GLEW_GET_FUN(__glewGenFragmentShadersATI)
+#define glPassTexCoordATI GLEW_GET_FUN(__glewPassTexCoordATI)
+#define glSampleMapATI GLEW_GET_FUN(__glewSampleMapATI)
+#define glSetFragmentShaderConstantATI GLEW_GET_FUN(__glewSetFragmentShaderConstantATI)
+
+#define GLEW_ATI_fragment_shader GLEW_GET_VAR(__GLEW_ATI_fragment_shader)
+
+#endif /* GL_ATI_fragment_shader */
+
+/* ------------------------ GL_ATI_map_object_buffer ----------------------- */
+
+#ifndef GL_ATI_map_object_buffer
+#define GL_ATI_map_object_buffer 1
+
+typedef void * (GLAPIENTRY * PFNGLMAPOBJECTBUFFERATIPROC) (GLuint buffer);
+typedef void (GLAPIENTRY * PFNGLUNMAPOBJECTBUFFERATIPROC) (GLuint buffer);
+
+#define glMapObjectBufferATI GLEW_GET_FUN(__glewMapObjectBufferATI)
+#define glUnmapObjectBufferATI GLEW_GET_FUN(__glewUnmapObjectBufferATI)
+
+#define GLEW_ATI_map_object_buffer GLEW_GET_VAR(__GLEW_ATI_map_object_buffer)
+
+#endif /* GL_ATI_map_object_buffer */
+
+/* ----------------------------- GL_ATI_meminfo ---------------------------- */
+
+#ifndef GL_ATI_meminfo
+#define GL_ATI_meminfo 1
+
+#define GL_VBO_FREE_MEMORY_ATI 0x87FB
+#define GL_TEXTURE_FREE_MEMORY_ATI 0x87FC
+#define GL_RENDERBUFFER_FREE_MEMORY_ATI 0x87FD
+
+#define GLEW_ATI_meminfo GLEW_GET_VAR(__GLEW_ATI_meminfo)
+
+#endif /* GL_ATI_meminfo */
+
+/* -------------------------- GL_ATI_pn_triangles -------------------------- */
+
+#ifndef GL_ATI_pn_triangles
+#define GL_ATI_pn_triangles 1
+
+#define GL_PN_TRIANGLES_ATI 0x87F0
+#define GL_MAX_PN_TRIANGLES_TESSELATION_LEVEL_ATI 0x87F1
+#define GL_PN_TRIANGLES_POINT_MODE_ATI 0x87F2
+#define GL_PN_TRIANGLES_NORMAL_MODE_ATI 0x87F3
+#define GL_PN_TRIANGLES_TESSELATION_LEVEL_ATI 0x87F4
+#define GL_PN_TRIANGLES_POINT_MODE_LINEAR_ATI 0x87F5
+#define GL_PN_TRIANGLES_POINT_MODE_CUBIC_ATI 0x87F6
+#define GL_PN_TRIANGLES_NORMAL_MODE_LINEAR_ATI 0x87F7
+#define GL_PN_TRIANGLES_NORMAL_MODE_QUADRATIC_ATI 0x87F8
+
+typedef void (GLAPIENTRY * PFNGLPNTRIANGLESFATIPROC) (GLenum pname, GLfloat param);
+typedef void (GLAPIENTRY * PFNGLPNTRIANGLESIATIPROC) (GLenum pname, GLint param);
+
+#define glPNTrianglesfATI GLEW_GET_FUN(__glewPNTrianglesfATI)
+#define glPNTrianglesiATI GLEW_GET_FUN(__glewPNTrianglesiATI)
+
+#define GLEW_ATI_pn_triangles GLEW_GET_VAR(__GLEW_ATI_pn_triangles)
+
+#endif /* GL_ATI_pn_triangles */
+
+/* ------------------------ GL_ATI_separate_stencil ------------------------ */
+
+#ifndef GL_ATI_separate_stencil
+#define GL_ATI_separate_stencil 1
+
+#define GL_STENCIL_BACK_FUNC_ATI 0x8800
+#define GL_STENCIL_BACK_FAIL_ATI 0x8801
+#define GL_STENCIL_BACK_PASS_DEPTH_FAIL_ATI 0x8802
+#define GL_STENCIL_BACK_PASS_DEPTH_PASS_ATI 0x8803
+
+typedef void (GLAPIENTRY * PFNGLSTENCILFUNCSEPARATEATIPROC) (GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask);
+typedef void (GLAPIENTRY * PFNGLSTENCILOPSEPARATEATIPROC) (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass);
+
+#define glStencilFuncSeparateATI GLEW_GET_FUN(__glewStencilFuncSeparateATI)
+#define glStencilOpSeparateATI GLEW_GET_FUN(__glewStencilOpSeparateATI)
+
+#define GLEW_ATI_separate_stencil GLEW_GET_VAR(__GLEW_ATI_separate_stencil)
+
+#endif /* GL_ATI_separate_stencil */
+
+/* ----------------------- GL_ATI_shader_texture_lod ----------------------- */
+
+#ifndef GL_ATI_shader_texture_lod
+#define GL_ATI_shader_texture_lod 1
+
+#define GLEW_ATI_shader_texture_lod GLEW_GET_VAR(__GLEW_ATI_shader_texture_lod)
+
+#endif /* GL_ATI_shader_texture_lod */
+
+/* ---------------------- GL_ATI_text_fragment_shader ---------------------- */
+
+#ifndef GL_ATI_text_fragment_shader
+#define GL_ATI_text_fragment_shader 1
+
+#define GL_TEXT_FRAGMENT_SHADER_ATI 0x8200
+
+#define GLEW_ATI_text_fragment_shader GLEW_GET_VAR(__GLEW_ATI_text_fragment_shader)
+
+#endif /* GL_ATI_text_fragment_shader */
+
+/* --------------------- GL_ATI_texture_compression_3dc -------------------- */
+
+#ifndef GL_ATI_texture_compression_3dc
+#define GL_ATI_texture_compression_3dc 1
+
+#define GL_COMPRESSED_LUMINANCE_ALPHA_3DC_ATI 0x8837
+
+#define GLEW_ATI_texture_compression_3dc GLEW_GET_VAR(__GLEW_ATI_texture_compression_3dc)
+
+#endif /* GL_ATI_texture_compression_3dc */
+
+/* ---------------------- GL_ATI_texture_env_combine3 ---------------------- */
+
+#ifndef GL_ATI_texture_env_combine3
+#define GL_ATI_texture_env_combine3 1
+
+#define GL_MODULATE_ADD_ATI 0x8744
+#define GL_MODULATE_SIGNED_ADD_ATI 0x8745
+#define GL_MODULATE_SUBTRACT_ATI 0x8746
+
+#define GLEW_ATI_texture_env_combine3 GLEW_GET_VAR(__GLEW_ATI_texture_env_combine3)
+
+#endif /* GL_ATI_texture_env_combine3 */
+
+/* -------------------------- GL_ATI_texture_float ------------------------- */
+
+#ifndef GL_ATI_texture_float
+#define GL_ATI_texture_float 1
+
+#define GL_RGBA_FLOAT32_ATI 0x8814
+#define GL_RGB_FLOAT32_ATI 0x8815
+#define GL_ALPHA_FLOAT32_ATI 0x8816
+#define GL_INTENSITY_FLOAT32_ATI 0x8817
+#define GL_LUMINANCE_FLOAT32_ATI 0x8818
+#define GL_LUMINANCE_ALPHA_FLOAT32_ATI 0x8819
+#define GL_RGBA_FLOAT16_ATI 0x881A
+#define GL_RGB_FLOAT16_ATI 0x881B
+#define GL_ALPHA_FLOAT16_ATI 0x881C
+#define GL_INTENSITY_FLOAT16_ATI 0x881D
+#define GL_LUMINANCE_FLOAT16_ATI 0x881E
+#define GL_LUMINANCE_ALPHA_FLOAT16_ATI 0x881F
+
+#define GLEW_ATI_texture_float GLEW_GET_VAR(__GLEW_ATI_texture_float)
+
+#endif /* GL_ATI_texture_float */
+
+/* ----------------------- GL_ATI_texture_mirror_once ---------------------- */
+
+#ifndef GL_ATI_texture_mirror_once
+#define GL_ATI_texture_mirror_once 1
+
+#define GL_MIRROR_CLAMP_ATI 0x8742
+#define GL_MIRROR_CLAMP_TO_EDGE_ATI 0x8743
+
+#define GLEW_ATI_texture_mirror_once GLEW_GET_VAR(__GLEW_ATI_texture_mirror_once)
+
+#endif /* GL_ATI_texture_mirror_once */
+
+/* ----------------------- GL_ATI_vertex_array_object ---------------------- */
+
+#ifndef GL_ATI_vertex_array_object
+#define GL_ATI_vertex_array_object 1
+
+#define GL_STATIC_ATI 0x8760
+#define GL_DYNAMIC_ATI 0x8761
+#define GL_PRESERVE_ATI 0x8762
+#define GL_DISCARD_ATI 0x8763
+#define GL_OBJECT_BUFFER_SIZE_ATI 0x8764
+#define GL_OBJECT_BUFFER_USAGE_ATI 0x8765
+#define GL_ARRAY_OBJECT_BUFFER_ATI 0x8766
+#define GL_ARRAY_OBJECT_OFFSET_ATI 0x8767
+
+typedef void (GLAPIENTRY * PFNGLARRAYOBJECTATIPROC) (GLenum array, GLint size, GLenum type, GLsizei stride, GLuint buffer, GLuint offset);
+typedef void (GLAPIENTRY * PFNGLFREEOBJECTBUFFERATIPROC) (GLuint buffer);
+typedef void (GLAPIENTRY * PFNGLGETARRAYOBJECTFVATIPROC) (GLenum array, GLenum pname, GLfloat* params);
+typedef void (GLAPIENTRY * PFNGLGETARRAYOBJECTIVATIPROC) (GLenum array, GLenum pname, GLint* params);
+typedef void (GLAPIENTRY * PFNGLGETOBJECTBUFFERFVATIPROC) (GLuint buffer, GLenum pname, GLfloat* params);
+typedef void (GLAPIENTRY * PFNGLGETOBJECTBUFFERIVATIPROC) (GLuint buffer, GLenum pname, GLint* params);
+typedef void (GLAPIENTRY * PFNGLGETVARIANTARRAYOBJECTFVATIPROC) (GLuint id, GLenum pname, GLfloat* params);
+typedef void (GLAPIENTRY * PFNGLGETVARIANTARRAYOBJECTIVATIPROC) (GLuint id, GLenum pname, GLint* params);
+typedef GLboolean (GLAPIENTRY * PFNGLISOBJECTBUFFERATIPROC) (GLuint buffer);
+typedef GLuint (GLAPIENTRY * PFNGLNEWOBJECTBUFFERATIPROC) (GLsizei size, const void *pointer, GLenum usage);
+typedef void (GLAPIENTRY * PFNGLUPDATEOBJECTBUFFERATIPROC) (GLuint buffer, GLuint offset, GLsizei size, const void *pointer, GLenum preserve);
+typedef void (GLAPIENTRY * PFNGLVARIANTARRAYOBJECTATIPROC) (GLuint id, GLenum type, GLsizei stride, GLuint buffer, GLuint offset);
+
+#define glArrayObjectATI GLEW_GET_FUN(__glewArrayObjectATI)
+#define glFreeObjectBufferATI GLEW_GET_FUN(__glewFreeObjectBufferATI)
+#define glGetArrayObjectfvATI GLEW_GET_FUN(__glewGetArrayObjectfvATI)
+#define glGetArrayObjectivATI GLEW_GET_FUN(__glewGetArrayObjectivATI)
+#define glGetObjectBufferfvATI GLEW_GET_FUN(__glewGetObjectBufferfvATI)
+#define glGetObjectBufferivATI GLEW_GET_FUN(__glewGetObjectBufferivATI)
+#define glGetVariantArrayObjectfvATI GLEW_GET_FUN(__glewGetVariantArrayObjectfvATI)
+#define glGetVariantArrayObjectivATI GLEW_GET_FUN(__glewGetVariantArrayObjectivATI)
+#define glIsObjectBufferATI GLEW_GET_FUN(__glewIsObjectBufferATI)
+#define glNewObjectBufferATI GLEW_GET_FUN(__glewNewObjectBufferATI)
+#define glUpdateObjectBufferATI GLEW_GET_FUN(__glewUpdateObjectBufferATI)
+#define glVariantArrayObjectATI GLEW_GET_FUN(__glewVariantArrayObjectATI)
+
+#define GLEW_ATI_vertex_array_object GLEW_GET_VAR(__GLEW_ATI_vertex_array_object)
+
+#endif /* GL_ATI_vertex_array_object */
+
+/* ------------------- GL_ATI_vertex_attrib_array_object ------------------- */
+
+#ifndef GL_ATI_vertex_attrib_array_object
+#define GL_ATI_vertex_attrib_array_object 1
+
+typedef void (GLAPIENTRY * PFNGLGETVERTEXATTRIBARRAYOBJECTFVATIPROC) (GLuint index, GLenum pname, GLfloat* params);
+typedef void (GLAPIENTRY * PFNGLGETVERTEXATTRIBARRAYOBJECTIVATIPROC) (GLuint index, GLenum pname, GLint* params);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBARRAYOBJECTATIPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLuint buffer, GLuint offset);
+
+#define glGetVertexAttribArrayObjectfvATI GLEW_GET_FUN(__glewGetVertexAttribArrayObjectfvATI)
+#define glGetVertexAttribArrayObjectivATI GLEW_GET_FUN(__glewGetVertexAttribArrayObjectivATI)
+#define glVertexAttribArrayObjectATI GLEW_GET_FUN(__glewVertexAttribArrayObjectATI)
+
+#define GLEW_ATI_vertex_attrib_array_object GLEW_GET_VAR(__GLEW_ATI_vertex_attrib_array_object)
+
+#endif /* GL_ATI_vertex_attrib_array_object */
+
+/* ------------------------- GL_ATI_vertex_streams ------------------------- */
+
+#ifndef GL_ATI_vertex_streams
+#define GL_ATI_vertex_streams 1
+
+#define GL_MAX_VERTEX_STREAMS_ATI 0x876B
+#define GL_VERTEX_SOURCE_ATI 0x876C
+#define GL_VERTEX_STREAM0_ATI 0x876D
+#define GL_VERTEX_STREAM1_ATI 0x876E
+#define GL_VERTEX_STREAM2_ATI 0x876F
+#define GL_VERTEX_STREAM3_ATI 0x8770
+#define GL_VERTEX_STREAM4_ATI 0x8771
+#define GL_VERTEX_STREAM5_ATI 0x8772
+#define GL_VERTEX_STREAM6_ATI 0x8773
+#define GL_VERTEX_STREAM7_ATI 0x8774
+
+typedef void (GLAPIENTRY * PFNGLCLIENTACTIVEVERTEXSTREAMATIPROC) (GLenum stream);
+typedef void (GLAPIENTRY * PFNGLNORMALSTREAM3BATIPROC) (GLenum stream, GLbyte x, GLbyte y, GLbyte z);
+typedef void (GLAPIENTRY * PFNGLNORMALSTREAM3BVATIPROC) (GLenum stream, const GLbyte *coords);
+typedef void (GLAPIENTRY * PFNGLNORMALSTREAM3DATIPROC) (GLenum stream, GLdouble x, GLdouble y, GLdouble z);
+typedef void (GLAPIENTRY * PFNGLNORMALSTREAM3DVATIPROC) (GLenum stream, const GLdouble *coords);
+typedef void (GLAPIENTRY * PFNGLNORMALSTREAM3FATIPROC) (GLenum stream, GLfloat x, GLfloat y, GLfloat z);
+typedef void (GLAPIENTRY * PFNGLNORMALSTREAM3FVATIPROC) (GLenum stream, const GLfloat *coords);
+typedef void (GLAPIENTRY * PFNGLNORMALSTREAM3IATIPROC) (GLenum stream, GLint x, GLint y, GLint z);
+typedef void (GLAPIENTRY * PFNGLNORMALSTREAM3IVATIPROC) (GLenum stream, const GLint *coords);
+typedef void (GLAPIENTRY * PFNGLNORMALSTREAM3SATIPROC) (GLenum stream, GLshort x, GLshort y, GLshort z);
+typedef void (GLAPIENTRY * PFNGLNORMALSTREAM3SVATIPROC) (GLenum stream, const GLshort *coords);
+typedef void (GLAPIENTRY * PFNGLVERTEXBLENDENVFATIPROC) (GLenum pname, GLfloat param);
+typedef void (GLAPIENTRY * PFNGLVERTEXBLENDENVIATIPROC) (GLenum pname, GLint param);
+typedef void (GLAPIENTRY * PFNGLVERTEXSTREAM1DATIPROC) (GLenum stream, GLdouble x);
+typedef void (GLAPIENTRY * PFNGLVERTEXSTREAM1DVATIPROC) (GLenum stream, const GLdouble *coords);
+typedef void (GLAPIENTRY * PFNGLVERTEXSTREAM1FATIPROC) (GLenum stream, GLfloat x);
+typedef void (GLAPIENTRY * PFNGLVERTEXSTREAM1FVATIPROC) (GLenum stream, const GLfloat *coords);
+typedef void (GLAPIENTRY * PFNGLVERTEXSTREAM1IATIPROC) (GLenum stream, GLint x);
+typedef void (GLAPIENTRY * PFNGLVERTEXSTREAM1IVATIPROC) (GLenum stream, const GLint *coords);
+typedef void (GLAPIENTRY * PFNGLVERTEXSTREAM1SATIPROC) (GLenum stream, GLshort x);
+typedef void (GLAPIENTRY * PFNGLVERTEXSTREAM1SVATIPROC) (GLenum stream, const GLshort *coords);
+typedef void (GLAPIENTRY * PFNGLVERTEXSTREAM2DATIPROC) (GLenum stream, GLdouble x, GLdouble y);
+typedef void (GLAPIENTRY * PFNGLVERTEXSTREAM2DVATIPROC) (GLenum stream, const GLdouble *coords);
+typedef void (GLAPIENTRY * PFNGLVERTEXSTREAM2FATIPROC) (GLenum stream, GLfloat x, GLfloat y);
+typedef void (GLAPIENTRY * PFNGLVERTEXSTREAM2FVATIPROC) (GLenum stream, const GLfloat *coords);
+typedef void (GLAPIENTRY * PFNGLVERTEXSTREAM2IATIPROC) (GLenum stream, GLint x, GLint y);
+typedef void (GLAPIENTRY * PFNGLVERTEXSTREAM2IVATIPROC) (GLenum stream, const GLint *coords);
+typedef void (GLAPIENTRY * PFNGLVERTEXSTREAM2SATIPROC) (GLenum stream, GLshort x, GLshort y);
+typedef void (GLAPIENTRY * PFNGLVERTEXSTREAM2SVATIPROC) (GLenum stream, const GLshort *coords);
+typedef void (GLAPIENTRY * PFNGLVERTEXSTREAM3DATIPROC) (GLenum stream, GLdouble x, GLdouble y, GLdouble z);
+typedef void (GLAPIENTRY * PFNGLVERTEXSTREAM3DVATIPROC) (GLenum stream, const GLdouble *coords);
+typedef void (GLAPIENTRY * PFNGLVERTEXSTREAM3FATIPROC) (GLenum stream, GLfloat x, GLfloat y, GLfloat z);
+typedef void (GLAPIENTRY * PFNGLVERTEXSTREAM3FVATIPROC) (GLenum stream, const GLfloat *coords);
+typedef void (GLAPIENTRY * PFNGLVERTEXSTREAM3IATIPROC) (GLenum stream, GLint x, GLint y, GLint z);
+typedef void (GLAPIENTRY * PFNGLVERTEXSTREAM3IVATIPROC) (GLenum stream, const GLint *coords);
+typedef void (GLAPIENTRY * PFNGLVERTEXSTREAM3SATIPROC) (GLenum stream, GLshort x, GLshort y, GLshort z);
+typedef void (GLAPIENTRY * PFNGLVERTEXSTREAM3SVATIPROC) (GLenum stream, const GLshort *coords);
+typedef void (GLAPIENTRY * PFNGLVERTEXSTREAM4DATIPROC) (GLenum stream, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
+typedef void (GLAPIENTRY * PFNGLVERTEXSTREAM4DVATIPROC) (GLenum stream, const GLdouble *coords);
+typedef void (GLAPIENTRY * PFNGLVERTEXSTREAM4FATIPROC) (GLenum stream, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+typedef void (GLAPIENTRY * PFNGLVERTEXSTREAM4FVATIPROC) (GLenum stream, const GLfloat *coords);
+typedef void (GLAPIENTRY * PFNGLVERTEXSTREAM4IATIPROC) (GLenum stream, GLint x, GLint y, GLint z, GLint w);
+typedef void (GLAPIENTRY * PFNGLVERTEXSTREAM4IVATIPROC) (GLenum stream, const GLint *coords);
+typedef void (GLAPIENTRY * PFNGLVERTEXSTREAM4SATIPROC) (GLenum stream, GLshort x, GLshort y, GLshort z, GLshort w);
+typedef void (GLAPIENTRY * PFNGLVERTEXSTREAM4SVATIPROC) (GLenum stream, const GLshort *coords);
+
+#define glClientActiveVertexStreamATI GLEW_GET_FUN(__glewClientActiveVertexStreamATI)
+#define glNormalStream3bATI GLEW_GET_FUN(__glewNormalStream3bATI)
+#define glNormalStream3bvATI GLEW_GET_FUN(__glewNormalStream3bvATI)
+#define glNormalStream3dATI GLEW_GET_FUN(__glewNormalStream3dATI)
+#define glNormalStream3dvATI GLEW_GET_FUN(__glewNormalStream3dvATI)
+#define glNormalStream3fATI GLEW_GET_FUN(__glewNormalStream3fATI)
+#define glNormalStream3fvATI GLEW_GET_FUN(__glewNormalStream3fvATI)
+#define glNormalStream3iATI GLEW_GET_FUN(__glewNormalStream3iATI)
+#define glNormalStream3ivATI GLEW_GET_FUN(__glewNormalStream3ivATI)
+#define glNormalStream3sATI GLEW_GET_FUN(__glewNormalStream3sATI)
+#define glNormalStream3svATI GLEW_GET_FUN(__glewNormalStream3svATI)
+#define glVertexBlendEnvfATI GLEW_GET_FUN(__glewVertexBlendEnvfATI)
+#define glVertexBlendEnviATI GLEW_GET_FUN(__glewVertexBlendEnviATI)
+#define glVertexStream1dATI GLEW_GET_FUN(__glewVertexStream1dATI)
+#define glVertexStream1dvATI GLEW_GET_FUN(__glewVertexStream1dvATI)
+#define glVertexStream1fATI GLEW_GET_FUN(__glewVertexStream1fATI)
+#define glVertexStream1fvATI GLEW_GET_FUN(__glewVertexStream1fvATI)
+#define glVertexStream1iATI GLEW_GET_FUN(__glewVertexStream1iATI)
+#define glVertexStream1ivATI GLEW_GET_FUN(__glewVertexStream1ivATI)
+#define glVertexStream1sATI GLEW_GET_FUN(__glewVertexStream1sATI)
+#define glVertexStream1svATI GLEW_GET_FUN(__glewVertexStream1svATI)
+#define glVertexStream2dATI GLEW_GET_FUN(__glewVertexStream2dATI)
+#define glVertexStream2dvATI GLEW_GET_FUN(__glewVertexStream2dvATI)
+#define glVertexStream2fATI GLEW_GET_FUN(__glewVertexStream2fATI)
+#define glVertexStream2fvATI GLEW_GET_FUN(__glewVertexStream2fvATI)
+#define glVertexStream2iATI GLEW_GET_FUN(__glewVertexStream2iATI)
+#define glVertexStream2ivATI GLEW_GET_FUN(__glewVertexStream2ivATI)
+#define glVertexStream2sATI GLEW_GET_FUN(__glewVertexStream2sATI)
+#define glVertexStream2svATI GLEW_GET_FUN(__glewVertexStream2svATI)
+#define glVertexStream3dATI GLEW_GET_FUN(__glewVertexStream3dATI)
+#define glVertexStream3dvATI GLEW_GET_FUN(__glewVertexStream3dvATI)
+#define glVertexStream3fATI GLEW_GET_FUN(__glewVertexStream3fATI)
+#define glVertexStream3fvATI GLEW_GET_FUN(__glewVertexStream3fvATI)
+#define glVertexStream3iATI GLEW_GET_FUN(__glewVertexStream3iATI)
+#define glVertexStream3ivATI GLEW_GET_FUN(__glewVertexStream3ivATI)
+#define glVertexStream3sATI GLEW_GET_FUN(__glewVertexStream3sATI)
+#define glVertexStream3svATI GLEW_GET_FUN(__glewVertexStream3svATI)
+#define glVertexStream4dATI GLEW_GET_FUN(__glewVertexStream4dATI)
+#define glVertexStream4dvATI GLEW_GET_FUN(__glewVertexStream4dvATI)
+#define glVertexStream4fATI GLEW_GET_FUN(__glewVertexStream4fATI)
+#define glVertexStream4fvATI GLEW_GET_FUN(__glewVertexStream4fvATI)
+#define glVertexStream4iATI GLEW_GET_FUN(__glewVertexStream4iATI)
+#define glVertexStream4ivATI GLEW_GET_FUN(__glewVertexStream4ivATI)
+#define glVertexStream4sATI GLEW_GET_FUN(__glewVertexStream4sATI)
+#define glVertexStream4svATI GLEW_GET_FUN(__glewVertexStream4svATI)
+
+#define GLEW_ATI_vertex_streams GLEW_GET_VAR(__GLEW_ATI_vertex_streams)
+
+#endif /* GL_ATI_vertex_streams */
+
+/* --------------------------- GL_EXT_422_pixels --------------------------- */
+
+#ifndef GL_EXT_422_pixels
+#define GL_EXT_422_pixels 1
+
+#define GL_422_EXT 0x80CC
+#define GL_422_REV_EXT 0x80CD
+#define GL_422_AVERAGE_EXT 0x80CE
+#define GL_422_REV_AVERAGE_EXT 0x80CF
+
+#define GLEW_EXT_422_pixels GLEW_GET_VAR(__GLEW_EXT_422_pixels)
+
+#endif /* GL_EXT_422_pixels */
+
+/* ---------------------------- GL_EXT_Cg_shader --------------------------- */
+
+#ifndef GL_EXT_Cg_shader
+#define GL_EXT_Cg_shader 1
+
+#define GL_CG_VERTEX_SHADER_EXT 0x890E
+#define GL_CG_FRAGMENT_SHADER_EXT 0x890F
+
+#define GLEW_EXT_Cg_shader GLEW_GET_VAR(__GLEW_EXT_Cg_shader)
+
+#endif /* GL_EXT_Cg_shader */
+
+/* ------------------------------ GL_EXT_abgr ------------------------------ */
+
+#ifndef GL_EXT_abgr
+#define GL_EXT_abgr 1
+
+#define GL_ABGR_EXT 0x8000
+
+#define GLEW_EXT_abgr GLEW_GET_VAR(__GLEW_EXT_abgr)
+
+#endif /* GL_EXT_abgr */
+
+/* ------------------------------ GL_EXT_bgra ------------------------------ */
+
+#ifndef GL_EXT_bgra
+#define GL_EXT_bgra 1
+
+#define GL_BGR_EXT 0x80E0
+#define GL_BGRA_EXT 0x80E1
+
+#define GLEW_EXT_bgra GLEW_GET_VAR(__GLEW_EXT_bgra)
+
+#endif /* GL_EXT_bgra */
+
+/* ------------------------ GL_EXT_bindable_uniform ------------------------ */
+
+#ifndef GL_EXT_bindable_uniform
+#define GL_EXT_bindable_uniform 1
+
+#define GL_MAX_VERTEX_BINDABLE_UNIFORMS_EXT 0x8DE2
+#define GL_MAX_FRAGMENT_BINDABLE_UNIFORMS_EXT 0x8DE3
+#define GL_MAX_GEOMETRY_BINDABLE_UNIFORMS_EXT 0x8DE4
+#define GL_MAX_BINDABLE_UNIFORM_SIZE_EXT 0x8DED
+#define GL_UNIFORM_BUFFER_EXT 0x8DEE
+#define GL_UNIFORM_BUFFER_BINDING_EXT 0x8DEF
+
+typedef GLint (GLAPIENTRY * PFNGLGETUNIFORMBUFFERSIZEEXTPROC) (GLuint program, GLint location);
+typedef GLintptr (GLAPIENTRY * PFNGLGETUNIFORMOFFSETEXTPROC) (GLuint program, GLint location);
+typedef void (GLAPIENTRY * PFNGLUNIFORMBUFFEREXTPROC) (GLuint program, GLint location, GLuint buffer);
+
+#define glGetUniformBufferSizeEXT GLEW_GET_FUN(__glewGetUniformBufferSizeEXT)
+#define glGetUniformOffsetEXT GLEW_GET_FUN(__glewGetUniformOffsetEXT)
+#define glUniformBufferEXT GLEW_GET_FUN(__glewUniformBufferEXT)
+
+#define GLEW_EXT_bindable_uniform GLEW_GET_VAR(__GLEW_EXT_bindable_uniform)
+
+#endif /* GL_EXT_bindable_uniform */
+
+/* --------------------------- GL_EXT_blend_color -------------------------- */
+
+#ifndef GL_EXT_blend_color
+#define GL_EXT_blend_color 1
+
+#define GL_CONSTANT_COLOR_EXT 0x8001
+#define GL_ONE_MINUS_CONSTANT_COLOR_EXT 0x8002
+#define GL_CONSTANT_ALPHA_EXT 0x8003
+#define GL_ONE_MINUS_CONSTANT_ALPHA_EXT 0x8004
+#define GL_BLEND_COLOR_EXT 0x8005
+
+typedef void (GLAPIENTRY * PFNGLBLENDCOLOREXTPROC) (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
+
+#define glBlendColorEXT GLEW_GET_FUN(__glewBlendColorEXT)
+
+#define GLEW_EXT_blend_color GLEW_GET_VAR(__GLEW_EXT_blend_color)
+
+#endif /* GL_EXT_blend_color */
+
+/* --------------------- GL_EXT_blend_equation_separate -------------------- */
+
+#ifndef GL_EXT_blend_equation_separate
+#define GL_EXT_blend_equation_separate 1
+
+#define GL_BLEND_EQUATION_RGB_EXT 0x8009
+#define GL_BLEND_EQUATION_ALPHA_EXT 0x883D
+
+typedef void (GLAPIENTRY * PFNGLBLENDEQUATIONSEPARATEEXTPROC) (GLenum modeRGB, GLenum modeAlpha);
+
+#define glBlendEquationSeparateEXT GLEW_GET_FUN(__glewBlendEquationSeparateEXT)
+
+#define GLEW_EXT_blend_equation_separate GLEW_GET_VAR(__GLEW_EXT_blend_equation_separate)
+
+#endif /* GL_EXT_blend_equation_separate */
+
+/* ----------------------- GL_EXT_blend_func_separate ---------------------- */
+
+#ifndef GL_EXT_blend_func_separate
+#define GL_EXT_blend_func_separate 1
+
+#define GL_BLEND_DST_RGB_EXT 0x80C8
+#define GL_BLEND_SRC_RGB_EXT 0x80C9
+#define GL_BLEND_DST_ALPHA_EXT 0x80CA
+#define GL_BLEND_SRC_ALPHA_EXT 0x80CB
+
+typedef void (GLAPIENTRY * PFNGLBLENDFUNCSEPARATEEXTPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
+
+#define glBlendFuncSeparateEXT GLEW_GET_FUN(__glewBlendFuncSeparateEXT)
+
+#define GLEW_EXT_blend_func_separate GLEW_GET_VAR(__GLEW_EXT_blend_func_separate)
+
+#endif /* GL_EXT_blend_func_separate */
+
+/* ------------------------- GL_EXT_blend_logic_op ------------------------- */
+
+#ifndef GL_EXT_blend_logic_op
+#define GL_EXT_blend_logic_op 1
+
+#define GLEW_EXT_blend_logic_op GLEW_GET_VAR(__GLEW_EXT_blend_logic_op)
+
+#endif /* GL_EXT_blend_logic_op */
+
+/* -------------------------- GL_EXT_blend_minmax -------------------------- */
+
+#ifndef GL_EXT_blend_minmax
+#define GL_EXT_blend_minmax 1
+
+#define GL_FUNC_ADD_EXT 0x8006
+#define GL_MIN_EXT 0x8007
+#define GL_MAX_EXT 0x8008
+#define GL_BLEND_EQUATION_EXT 0x8009
+
+typedef void (GLAPIENTRY * PFNGLBLENDEQUATIONEXTPROC) (GLenum mode);
+
+#define glBlendEquationEXT GLEW_GET_FUN(__glewBlendEquationEXT)
+
+#define GLEW_EXT_blend_minmax GLEW_GET_VAR(__GLEW_EXT_blend_minmax)
+
+#endif /* GL_EXT_blend_minmax */
+
+/* ------------------------- GL_EXT_blend_subtract ------------------------- */
+
+#ifndef GL_EXT_blend_subtract
+#define GL_EXT_blend_subtract 1
+
+#define GL_FUNC_SUBTRACT_EXT 0x800A
+#define GL_FUNC_REVERSE_SUBTRACT_EXT 0x800B
+
+#define GLEW_EXT_blend_subtract GLEW_GET_VAR(__GLEW_EXT_blend_subtract)
+
+#endif /* GL_EXT_blend_subtract */
+
+/* ------------------------ GL_EXT_clip_volume_hint ------------------------ */
+
+#ifndef GL_EXT_clip_volume_hint
+#define GL_EXT_clip_volume_hint 1
+
+#define GL_CLIP_VOLUME_CLIPPING_HINT_EXT 0x80F0
+
+#define GLEW_EXT_clip_volume_hint GLEW_GET_VAR(__GLEW_EXT_clip_volume_hint)
+
+#endif /* GL_EXT_clip_volume_hint */
+
+/* ------------------------------ GL_EXT_cmyka ----------------------------- */
+
+#ifndef GL_EXT_cmyka
+#define GL_EXT_cmyka 1
+
+#define GL_CMYK_EXT 0x800C
+#define GL_CMYKA_EXT 0x800D
+#define GL_PACK_CMYK_HINT_EXT 0x800E
+#define GL_UNPACK_CMYK_HINT_EXT 0x800F
+
+#define GLEW_EXT_cmyka GLEW_GET_VAR(__GLEW_EXT_cmyka)
+
+#endif /* GL_EXT_cmyka */
+
+/* ------------------------- GL_EXT_color_subtable ------------------------- */
+
+#ifndef GL_EXT_color_subtable
+#define GL_EXT_color_subtable 1
+
+typedef void (GLAPIENTRY * PFNGLCOLORSUBTABLEEXTPROC) (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const void *data);
+typedef void (GLAPIENTRY * PFNGLCOPYCOLORSUBTABLEEXTPROC) (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width);
+
+#define glColorSubTableEXT GLEW_GET_FUN(__glewColorSubTableEXT)
+#define glCopyColorSubTableEXT GLEW_GET_FUN(__glewCopyColorSubTableEXT)
+
+#define GLEW_EXT_color_subtable GLEW_GET_VAR(__GLEW_EXT_color_subtable)
+
+#endif /* GL_EXT_color_subtable */
+
+/* ---------------------- GL_EXT_compiled_vertex_array --------------------- */
+
+#ifndef GL_EXT_compiled_vertex_array
+#define GL_EXT_compiled_vertex_array 1
+
+#define GL_ARRAY_ELEMENT_LOCK_FIRST_EXT 0x81A8
+#define GL_ARRAY_ELEMENT_LOCK_COUNT_EXT 0x81A9
+
+typedef void (GLAPIENTRY * PFNGLLOCKARRAYSEXTPROC) (GLint first, GLsizei count);
+typedef void (GLAPIENTRY * PFNGLUNLOCKARRAYSEXTPROC) (void);
+
+#define glLockArraysEXT GLEW_GET_FUN(__glewLockArraysEXT)
+#define glUnlockArraysEXT GLEW_GET_FUN(__glewUnlockArraysEXT)
+
+#define GLEW_EXT_compiled_vertex_array GLEW_GET_VAR(__GLEW_EXT_compiled_vertex_array)
+
+#endif /* GL_EXT_compiled_vertex_array */
+
+/* --------------------------- GL_EXT_convolution -------------------------- */
+
+#ifndef GL_EXT_convolution
+#define GL_EXT_convolution 1
+
+#define GL_CONVOLUTION_1D_EXT 0x8010
+#define GL_CONVOLUTION_2D_EXT 0x8011
+#define GL_SEPARABLE_2D_EXT 0x8012
+#define GL_CONVOLUTION_BORDER_MODE_EXT 0x8013
+#define GL_CONVOLUTION_FILTER_SCALE_EXT 0x8014
+#define GL_CONVOLUTION_FILTER_BIAS_EXT 0x8015
+#define GL_REDUCE_EXT 0x8016
+#define GL_CONVOLUTION_FORMAT_EXT 0x8017
+#define GL_CONVOLUTION_WIDTH_EXT 0x8018
+#define GL_CONVOLUTION_HEIGHT_EXT 0x8019
+#define GL_MAX_CONVOLUTION_WIDTH_EXT 0x801A
+#define GL_MAX_CONVOLUTION_HEIGHT_EXT 0x801B
+#define GL_POST_CONVOLUTION_RED_SCALE_EXT 0x801C
+#define GL_POST_CONVOLUTION_GREEN_SCALE_EXT 0x801D
+#define GL_POST_CONVOLUTION_BLUE_SCALE_EXT 0x801E
+#define GL_POST_CONVOLUTION_ALPHA_SCALE_EXT 0x801F
+#define GL_POST_CONVOLUTION_RED_BIAS_EXT 0x8020
+#define GL_POST_CONVOLUTION_GREEN_BIAS_EXT 0x8021
+#define GL_POST_CONVOLUTION_BLUE_BIAS_EXT 0x8022
+#define GL_POST_CONVOLUTION_ALPHA_BIAS_EXT 0x8023
+
+typedef void (GLAPIENTRY * PFNGLCONVOLUTIONFILTER1DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const void *image);
+typedef void (GLAPIENTRY * PFNGLCONVOLUTIONFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *image);
+typedef void (GLAPIENTRY * PFNGLCONVOLUTIONPARAMETERFEXTPROC) (GLenum target, GLenum pname, GLfloat param);
+typedef void (GLAPIENTRY * PFNGLCONVOLUTIONPARAMETERFVEXTPROC) (GLenum target, GLenum pname, const GLfloat* params);
+typedef void (GLAPIENTRY * PFNGLCONVOLUTIONPARAMETERIEXTPROC) (GLenum target, GLenum pname, GLint param);
+typedef void (GLAPIENTRY * PFNGLCONVOLUTIONPARAMETERIVEXTPROC) (GLenum target, GLenum pname, const GLint* params);
+typedef void (GLAPIENTRY * PFNGLCOPYCONVOLUTIONFILTER1DEXTPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
+typedef void (GLAPIENTRY * PFNGLCOPYCONVOLUTIONFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height);
+typedef void (GLAPIENTRY * PFNGLGETCONVOLUTIONFILTEREXTPROC) (GLenum target, GLenum format, GLenum type, void *image);
+typedef void (GLAPIENTRY * PFNGLGETCONVOLUTIONPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat* params);
+typedef void (GLAPIENTRY * PFNGLGETCONVOLUTIONPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint* params);
+typedef void (GLAPIENTRY * PFNGLGETSEPARABLEFILTEREXTPROC) (GLenum target, GLenum format, GLenum type, void *row, void *column, void *span);
+typedef void (GLAPIENTRY * PFNGLSEPARABLEFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *row, const void *column);
+
+#define glConvolutionFilter1DEXT GLEW_GET_FUN(__glewConvolutionFilter1DEXT)
+#define glConvolutionFilter2DEXT GLEW_GET_FUN(__glewConvolutionFilter2DEXT)
+#define glConvolutionParameterfEXT GLEW_GET_FUN(__glewConvolutionParameterfEXT)
+#define glConvolutionParameterfvEXT GLEW_GET_FUN(__glewConvolutionParameterfvEXT)
+#define glConvolutionParameteriEXT GLEW_GET_FUN(__glewConvolutionParameteriEXT)
+#define glConvolutionParameterivEXT GLEW_GET_FUN(__glewConvolutionParameterivEXT)
+#define glCopyConvolutionFilter1DEXT GLEW_GET_FUN(__glewCopyConvolutionFilter1DEXT)
+#define glCopyConvolutionFilter2DEXT GLEW_GET_FUN(__glewCopyConvolutionFilter2DEXT)
+#define glGetConvolutionFilterEXT GLEW_GET_FUN(__glewGetConvolutionFilterEXT)
+#define glGetConvolutionParameterfvEXT GLEW_GET_FUN(__glewGetConvolutionParameterfvEXT)
+#define glGetConvolutionParameterivEXT GLEW_GET_FUN(__glewGetConvolutionParameterivEXT)
+#define glGetSeparableFilterEXT GLEW_GET_FUN(__glewGetSeparableFilterEXT)
+#define glSeparableFilter2DEXT GLEW_GET_FUN(__glewSeparableFilter2DEXT)
+
+#define GLEW_EXT_convolution GLEW_GET_VAR(__GLEW_EXT_convolution)
+
+#endif /* GL_EXT_convolution */
+
+/* ------------------------ GL_EXT_coordinate_frame ------------------------ */
+
+#ifndef GL_EXT_coordinate_frame
+#define GL_EXT_coordinate_frame 1
+
+#define GL_TANGENT_ARRAY_EXT 0x8439
+#define GL_BINORMAL_ARRAY_EXT 0x843A
+#define GL_CURRENT_TANGENT_EXT 0x843B
+#define GL_CURRENT_BINORMAL_EXT 0x843C
+#define GL_TANGENT_ARRAY_TYPE_EXT 0x843E
+#define GL_TANGENT_ARRAY_STRIDE_EXT 0x843F
+#define GL_BINORMAL_ARRAY_TYPE_EXT 0x8440
+#define GL_BINORMAL_ARRAY_STRIDE_EXT 0x8441
+#define GL_TANGENT_ARRAY_POINTER_EXT 0x8442
+#define GL_BINORMAL_ARRAY_POINTER_EXT 0x8443
+#define GL_MAP1_TANGENT_EXT 0x8444
+#define GL_MAP2_TANGENT_EXT 0x8445
+#define GL_MAP1_BINORMAL_EXT 0x8446
+#define GL_MAP2_BINORMAL_EXT 0x8447
+
+typedef void (GLAPIENTRY * PFNGLBINORMALPOINTEREXTPROC) (GLenum type, GLsizei stride, void *pointer);
+typedef void (GLAPIENTRY * PFNGLTANGENTPOINTEREXTPROC) (GLenum type, GLsizei stride, void *pointer);
+
+#define glBinormalPointerEXT GLEW_GET_FUN(__glewBinormalPointerEXT)
+#define glTangentPointerEXT GLEW_GET_FUN(__glewTangentPointerEXT)
+
+#define GLEW_EXT_coordinate_frame GLEW_GET_VAR(__GLEW_EXT_coordinate_frame)
+
+#endif /* GL_EXT_coordinate_frame */
+
+/* -------------------------- GL_EXT_copy_texture -------------------------- */
+
+#ifndef GL_EXT_copy_texture
+#define GL_EXT_copy_texture 1
+
+typedef void (GLAPIENTRY * PFNGLCOPYTEXIMAGE1DEXTPROC) (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border);
+typedef void (GLAPIENTRY * PFNGLCOPYTEXIMAGE2DEXTPROC) (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
+typedef void (GLAPIENTRY * PFNGLCOPYTEXSUBIMAGE1DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);
+typedef void (GLAPIENTRY * PFNGLCOPYTEXSUBIMAGE2DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
+typedef void (GLAPIENTRY * PFNGLCOPYTEXSUBIMAGE3DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
+
+#define glCopyTexImage1DEXT GLEW_GET_FUN(__glewCopyTexImage1DEXT)
+#define glCopyTexImage2DEXT GLEW_GET_FUN(__glewCopyTexImage2DEXT)
+#define glCopyTexSubImage1DEXT GLEW_GET_FUN(__glewCopyTexSubImage1DEXT)
+#define glCopyTexSubImage2DEXT GLEW_GET_FUN(__glewCopyTexSubImage2DEXT)
+#define glCopyTexSubImage3DEXT GLEW_GET_FUN(__glewCopyTexSubImage3DEXT)
+
+#define GLEW_EXT_copy_texture GLEW_GET_VAR(__GLEW_EXT_copy_texture)
+
+#endif /* GL_EXT_copy_texture */
+
+/* --------------------------- GL_EXT_cull_vertex -------------------------- */
+
+#ifndef GL_EXT_cull_vertex
+#define GL_EXT_cull_vertex 1
+
+#define GL_CULL_VERTEX_EXT 0x81AA
+#define GL_CULL_VERTEX_EYE_POSITION_EXT 0x81AB
+#define GL_CULL_VERTEX_OBJECT_POSITION_EXT 0x81AC
+
+typedef void (GLAPIENTRY * PFNGLCULLPARAMETERDVEXTPROC) (GLenum pname, GLdouble* params);
+typedef void (GLAPIENTRY * PFNGLCULLPARAMETERFVEXTPROC) (GLenum pname, GLfloat* params);
+
+#define glCullParameterdvEXT GLEW_GET_FUN(__glewCullParameterdvEXT)
+#define glCullParameterfvEXT GLEW_GET_FUN(__glewCullParameterfvEXT)
+
+#define GLEW_EXT_cull_vertex GLEW_GET_VAR(__GLEW_EXT_cull_vertex)
+
+#endif /* GL_EXT_cull_vertex */
+
+/* --------------------------- GL_EXT_debug_label -------------------------- */
+
+#ifndef GL_EXT_debug_label
+#define GL_EXT_debug_label 1
+
+#define GL_PROGRAM_PIPELINE_OBJECT_EXT 0x8A4F
+#define GL_PROGRAM_OBJECT_EXT 0x8B40
+#define GL_SHADER_OBJECT_EXT 0x8B48
+#define GL_BUFFER_OBJECT_EXT 0x9151
+#define GL_QUERY_OBJECT_EXT 0x9153
+#define GL_VERTEX_ARRAY_OBJECT_EXT 0x9154
+
+typedef void (GLAPIENTRY * PFNGLGETOBJECTLABELEXTPROC) (GLenum type, GLuint object, GLsizei bufSize, GLsizei* length, GLchar *label);
+typedef void (GLAPIENTRY * PFNGLLABELOBJECTEXTPROC) (GLenum type, GLuint object, GLsizei length, const GLchar* label);
+
+#define glGetObjectLabelEXT GLEW_GET_FUN(__glewGetObjectLabelEXT)
+#define glLabelObjectEXT GLEW_GET_FUN(__glewLabelObjectEXT)
+
+#define GLEW_EXT_debug_label GLEW_GET_VAR(__GLEW_EXT_debug_label)
+
+#endif /* GL_EXT_debug_label */
+
+/* -------------------------- GL_EXT_debug_marker -------------------------- */
+
+#ifndef GL_EXT_debug_marker
+#define GL_EXT_debug_marker 1
+
+typedef void (GLAPIENTRY * PFNGLINSERTEVENTMARKEREXTPROC) (GLsizei length, const GLchar* marker);
+typedef void (GLAPIENTRY * PFNGLPOPGROUPMARKEREXTPROC) (void);
+typedef void (GLAPIENTRY * PFNGLPUSHGROUPMARKEREXTPROC) (GLsizei length, const GLchar* marker);
+
+#define glInsertEventMarkerEXT GLEW_GET_FUN(__glewInsertEventMarkerEXT)
+#define glPopGroupMarkerEXT GLEW_GET_FUN(__glewPopGroupMarkerEXT)
+#define glPushGroupMarkerEXT GLEW_GET_FUN(__glewPushGroupMarkerEXT)
+
+#define GLEW_EXT_debug_marker GLEW_GET_VAR(__GLEW_EXT_debug_marker)
+
+#endif /* GL_EXT_debug_marker */
+
+/* ------------------------ GL_EXT_depth_bounds_test ----------------------- */
+
+#ifndef GL_EXT_depth_bounds_test
+#define GL_EXT_depth_bounds_test 1
+
+#define GL_DEPTH_BOUNDS_TEST_EXT 0x8890
+#define GL_DEPTH_BOUNDS_EXT 0x8891
+
+typedef void (GLAPIENTRY * PFNGLDEPTHBOUNDSEXTPROC) (GLclampd zmin, GLclampd zmax);
+
+#define glDepthBoundsEXT GLEW_GET_FUN(__glewDepthBoundsEXT)
+
+#define GLEW_EXT_depth_bounds_test GLEW_GET_VAR(__GLEW_EXT_depth_bounds_test)
+
+#endif /* GL_EXT_depth_bounds_test */
+
+/* ----------------------- GL_EXT_direct_state_access ---------------------- */
+
+#ifndef GL_EXT_direct_state_access
+#define GL_EXT_direct_state_access 1
+
+#define GL_PROGRAM_MATRIX_EXT 0x8E2D
+#define GL_TRANSPOSE_PROGRAM_MATRIX_EXT 0x8E2E
+#define GL_PROGRAM_MATRIX_STACK_DEPTH_EXT 0x8E2F
+
+typedef void (GLAPIENTRY * PFNGLBINDMULTITEXTUREEXTPROC) (GLenum texunit, GLenum target, GLuint texture);
+typedef GLenum (GLAPIENTRY * PFNGLCHECKNAMEDFRAMEBUFFERSTATUSEXTPROC) (GLuint framebuffer, GLenum target);
+typedef void (GLAPIENTRY * PFNGLCLIENTATTRIBDEFAULTEXTPROC) (GLbitfield mask);
+typedef void (GLAPIENTRY * PFNGLCOMPRESSEDMULTITEXIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void *data);
+typedef void (GLAPIENTRY * PFNGLCOMPRESSEDMULTITEXIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *data);
+typedef void (GLAPIENTRY * PFNGLCOMPRESSEDMULTITEXIMAGE3DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *data);
+typedef void (GLAPIENTRY * PFNGLCOMPRESSEDMULTITEXSUBIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *data);
+typedef void (GLAPIENTRY * PFNGLCOMPRESSEDMULTITEXSUBIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data);
+typedef void (GLAPIENTRY * PFNGLCOMPRESSEDMULTITEXSUBIMAGE3DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data);
+typedef void (GLAPIENTRY * PFNGLCOMPRESSEDTEXTUREIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void *data);
+typedef void (GLAPIENTRY * PFNGLCOMPRESSEDTEXTUREIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *data);
+typedef void (GLAPIENTRY * PFNGLCOMPRESSEDTEXTUREIMAGE3DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *data);
+typedef void (GLAPIENTRY * PFNGLCOMPRESSEDTEXTURESUBIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *data);
+typedef void (GLAPIENTRY * PFNGLCOMPRESSEDTEXTURESUBIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data);
+typedef void (GLAPIENTRY * PFNGLCOMPRESSEDTEXTURESUBIMAGE3DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data);
+typedef void (GLAPIENTRY * PFNGLCOPYMULTITEXIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border);
+typedef void (GLAPIENTRY * PFNGLCOPYMULTITEXIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
+typedef void (GLAPIENTRY * PFNGLCOPYMULTITEXSUBIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);
+typedef void (GLAPIENTRY * PFNGLCOPYMULTITEXSUBIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
+typedef void (GLAPIENTRY * PFNGLCOPYMULTITEXSUBIMAGE3DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
+typedef void (GLAPIENTRY * PFNGLCOPYTEXTUREIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border);
+typedef void (GLAPIENTRY * PFNGLCOPYTEXTUREIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
+typedef void (GLAPIENTRY * PFNGLCOPYTEXTURESUBIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);
+typedef void (GLAPIENTRY * PFNGLCOPYTEXTURESUBIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
+typedef void (GLAPIENTRY * PFNGLCOPYTEXTURESUBIMAGE3DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
+typedef void (GLAPIENTRY * PFNGLDISABLECLIENTSTATEINDEXEDEXTPROC) (GLenum array, GLuint index);
+typedef void (GLAPIENTRY * PFNGLDISABLECLIENTSTATEIEXTPROC) (GLenum array, GLuint index);
+typedef void (GLAPIENTRY * PFNGLDISABLEVERTEXARRAYATTRIBEXTPROC) (GLuint vaobj, GLuint index);
+typedef void (GLAPIENTRY * PFNGLDISABLEVERTEXARRAYEXTPROC) (GLuint vaobj, GLenum array);
+typedef void (GLAPIENTRY * PFNGLENABLECLIENTSTATEINDEXEDEXTPROC) (GLenum array, GLuint index);
+typedef void (GLAPIENTRY * PFNGLENABLECLIENTSTATEIEXTPROC) (GLenum array, GLuint index);
+typedef void (GLAPIENTRY * PFNGLENABLEVERTEXARRAYATTRIBEXTPROC) (GLuint vaobj, GLuint index);
+typedef void (GLAPIENTRY * PFNGLENABLEVERTEXARRAYEXTPROC) (GLuint vaobj, GLenum array);
+typedef void (GLAPIENTRY * PFNGLFLUSHMAPPEDNAMEDBUFFERRANGEEXTPROC) (GLuint buffer, GLintptr offset, GLsizeiptr length);
+typedef void (GLAPIENTRY * PFNGLFRAMEBUFFERDRAWBUFFEREXTPROC) (GLuint framebuffer, GLenum mode);
+typedef void (GLAPIENTRY * PFNGLFRAMEBUFFERDRAWBUFFERSEXTPROC) (GLuint framebuffer, GLsizei n, const GLenum* bufs);
+typedef void (GLAPIENTRY * PFNGLFRAMEBUFFERREADBUFFEREXTPROC) (GLuint framebuffer, GLenum mode);
+typedef void (GLAPIENTRY * PFNGLGENERATEMULTITEXMIPMAPEXTPROC) (GLenum texunit, GLenum target);
+typedef void (GLAPIENTRY * PFNGLGENERATETEXTUREMIPMAPEXTPROC) (GLuint texture, GLenum target);
+typedef void (GLAPIENTRY * PFNGLGETCOMPRESSEDMULTITEXIMAGEEXTPROC) (GLenum texunit, GLenum target, GLint level, void *img);
+typedef void (GLAPIENTRY * PFNGLGETCOMPRESSEDTEXTUREIMAGEEXTPROC) (GLuint texture, GLenum target, GLint level, void *img);
+typedef void (GLAPIENTRY * PFNGLGETDOUBLEINDEXEDVEXTPROC) (GLenum target, GLuint index, GLdouble* params);
+typedef void (GLAPIENTRY * PFNGLGETDOUBLEI_VEXTPROC) (GLenum pname, GLuint index, GLdouble* params);
+typedef void (GLAPIENTRY * PFNGLGETFLOATINDEXEDVEXTPROC) (GLenum target, GLuint index, GLfloat* params);
+typedef void (GLAPIENTRY * PFNGLGETFLOATI_VEXTPROC) (GLenum pname, GLuint index, GLfloat* params);
+typedef void (GLAPIENTRY * PFNGLGETFRAMEBUFFERPARAMETERIVEXTPROC) (GLuint framebuffer, GLenum pname, GLint* param);
+typedef void (GLAPIENTRY * PFNGLGETMULTITEXENVFVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLfloat* params);
+typedef void (GLAPIENTRY * PFNGLGETMULTITEXENVIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLint* params);
+typedef void (GLAPIENTRY * PFNGLGETMULTITEXGENDVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLdouble* params);
+typedef void (GLAPIENTRY * PFNGLGETMULTITEXGENFVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLfloat* params);
+typedef void (GLAPIENTRY * PFNGLGETMULTITEXGENIVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLint* params);
+typedef void (GLAPIENTRY * PFNGLGETMULTITEXIMAGEEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum format, GLenum type, void *pixels);
+typedef void (GLAPIENTRY * PFNGLGETMULTITEXLEVELPARAMETERFVEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum pname, GLfloat* params);
+typedef void (GLAPIENTRY * PFNGLGETMULTITEXLEVELPARAMETERIVEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum pname, GLint* params);
+typedef void (GLAPIENTRY * PFNGLGETMULTITEXPARAMETERIIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLint* params);
+typedef void (GLAPIENTRY * PFNGLGETMULTITEXPARAMETERIUIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLuint* params);
+typedef void (GLAPIENTRY * PFNGLGETMULTITEXPARAMETERFVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLfloat* params);
+typedef void (GLAPIENTRY * PFNGLGETMULTITEXPARAMETERIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLint* params);
+typedef void (GLAPIENTRY * PFNGLGETNAMEDBUFFERPARAMETERIVEXTPROC) (GLuint buffer, GLenum pname, GLint* params);
+typedef void (GLAPIENTRY * PFNGLGETNAMEDBUFFERPOINTERVEXTPROC) (GLuint buffer, GLenum pname, void** params);
+typedef void (GLAPIENTRY * PFNGLGETNAMEDBUFFERSUBDATAEXTPROC) (GLuint buffer, GLintptr offset, GLsizeiptr size, void *data);
+typedef void (GLAPIENTRY * PFNGLGETNAMEDFRAMEBUFFERATTACHMENTPARAMETERIVEXTPROC) (GLuint framebuffer, GLenum attachment, GLenum pname, GLint* params);
+typedef void (GLAPIENTRY * PFNGLGETNAMEDPROGRAMLOCALPARAMETERIIVEXTPROC) (GLuint program, GLenum target, GLuint index, GLint* params);
+typedef void (GLAPIENTRY * PFNGLGETNAMEDPROGRAMLOCALPARAMETERIUIVEXTPROC) (GLuint program, GLenum target, GLuint index, GLuint* params);
+typedef void (GLAPIENTRY * PFNGLGETNAMEDPROGRAMLOCALPARAMETERDVEXTPROC) (GLuint program, GLenum target, GLuint index, GLdouble* params);
+typedef void (GLAPIENTRY * PFNGLGETNAMEDPROGRAMLOCALPARAMETERFVEXTPROC) (GLuint program, GLenum target, GLuint index, GLfloat* params);
+typedef void (GLAPIENTRY * PFNGLGETNAMEDPROGRAMSTRINGEXTPROC) (GLuint program, GLenum target, GLenum pname, void *string);
+typedef void (GLAPIENTRY * PFNGLGETNAMEDPROGRAMIVEXTPROC) (GLuint program, GLenum target, GLenum pname, GLint* params);
+typedef void (GLAPIENTRY * PFNGLGETNAMEDRENDERBUFFERPARAMETERIVEXTPROC) (GLuint renderbuffer, GLenum pname, GLint* params);
+typedef void (GLAPIENTRY * PFNGLGETPOINTERINDEXEDVEXTPROC) (GLenum target, GLuint index, void** params);
+typedef void (GLAPIENTRY * PFNGLGETPOINTERI_VEXTPROC) (GLenum pname, GLuint index, void** params);
+typedef void (GLAPIENTRY * PFNGLGETTEXTUREIMAGEEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum format, GLenum type, void *pixels);
+typedef void (GLAPIENTRY * PFNGLGETTEXTURELEVELPARAMETERFVEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum pname, GLfloat* params);
+typedef void (GLAPIENTRY * PFNGLGETTEXTURELEVELPARAMETERIVEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum pname, GLint* params);
+typedef void (GLAPIENTRY * PFNGLGETTEXTUREPARAMETERIIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLint* params);
+typedef void (GLAPIENTRY * PFNGLGETTEXTUREPARAMETERIUIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLuint* params);
+typedef void (GLAPIENTRY * PFNGLGETTEXTUREPARAMETERFVEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLfloat* params);
+typedef void (GLAPIENTRY * PFNGLGETTEXTUREPARAMETERIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLint* params);
+typedef void (GLAPIENTRY * PFNGLGETVERTEXARRAYINTEGERI_VEXTPROC) (GLuint vaobj, GLuint index, GLenum pname, GLint* param);
+typedef void (GLAPIENTRY * PFNGLGETVERTEXARRAYINTEGERVEXTPROC) (GLuint vaobj, GLenum pname, GLint* param);
+typedef void (GLAPIENTRY * PFNGLGETVERTEXARRAYPOINTERI_VEXTPROC) (GLuint vaobj, GLuint index, GLenum pname, void** param);
+typedef void (GLAPIENTRY * PFNGLGETVERTEXARRAYPOINTERVEXTPROC) (GLuint vaobj, GLenum pname, void** param);
+typedef void * (GLAPIENTRY * PFNGLMAPNAMEDBUFFEREXTPROC) (GLuint buffer, GLenum access);
+typedef void * (GLAPIENTRY * PFNGLMAPNAMEDBUFFERRANGEEXTPROC) (GLuint buffer, GLintptr offset, GLsizeiptr length, GLbitfield access);
+typedef void (GLAPIENTRY * PFNGLMATRIXFRUSTUMEXTPROC) (GLenum matrixMode, GLdouble l, GLdouble r, GLdouble b, GLdouble t, GLdouble n, GLdouble f);
+typedef void (GLAPIENTRY * PFNGLMATRIXLOADIDENTITYEXTPROC) (GLenum matrixMode);
+typedef void (GLAPIENTRY * PFNGLMATRIXLOADTRANSPOSEDEXTPROC) (GLenum matrixMode, const GLdouble* m);
+typedef void (GLAPIENTRY * PFNGLMATRIXLOADTRANSPOSEFEXTPROC) (GLenum matrixMode, const GLfloat* m);
+typedef void (GLAPIENTRY * PFNGLMATRIXLOADDEXTPROC) (GLenum matrixMode, const GLdouble* m);
+typedef void (GLAPIENTRY * PFNGLMATRIXLOADFEXTPROC) (GLenum matrixMode, const GLfloat* m);
+typedef void (GLAPIENTRY * PFNGLMATRIXMULTTRANSPOSEDEXTPROC) (GLenum matrixMode, const GLdouble* m);
+typedef void (GLAPIENTRY * PFNGLMATRIXMULTTRANSPOSEFEXTPROC) (GLenum matrixMode, const GLfloat* m);
+typedef void (GLAPIENTRY * PFNGLMATRIXMULTDEXTPROC) (GLenum matrixMode, const GLdouble* m);
+typedef void (GLAPIENTRY * PFNGLMATRIXMULTFEXTPROC) (GLenum matrixMode, const GLfloat* m);
+typedef void (GLAPIENTRY * PFNGLMATRIXORTHOEXTPROC) (GLenum matrixMode, GLdouble l, GLdouble r, GLdouble b, GLdouble t, GLdouble n, GLdouble f);
+typedef void (GLAPIENTRY * PFNGLMATRIXPOPEXTPROC) (GLenum matrixMode);
+typedef void (GLAPIENTRY * PFNGLMATRIXPUSHEXTPROC) (GLenum matrixMode);
+typedef void (GLAPIENTRY * PFNGLMATRIXROTATEDEXTPROC) (GLenum matrixMode, GLdouble angle, GLdouble x, GLdouble y, GLdouble z);
+typedef void (GLAPIENTRY * PFNGLMATRIXROTATEFEXTPROC) (GLenum matrixMode, GLfloat angle, GLfloat x, GLfloat y, GLfloat z);
+typedef void (GLAPIENTRY * PFNGLMATRIXSCALEDEXTPROC) (GLenum matrixMode, GLdouble x, GLdouble y, GLdouble z);
+typedef void (GLAPIENTRY * PFNGLMATRIXSCALEFEXTPROC) (GLenum matrixMode, GLfloat x, GLfloat y, GLfloat z);
+typedef void (GLAPIENTRY * PFNGLMATRIXTRANSLATEDEXTPROC) (GLenum matrixMode, GLdouble x, GLdouble y, GLdouble z);
+typedef void (GLAPIENTRY * PFNGLMATRIXTRANSLATEFEXTPROC) (GLenum matrixMode, GLfloat x, GLfloat y, GLfloat z);
+typedef void (GLAPIENTRY * PFNGLMULTITEXBUFFEREXTPROC) (GLenum texunit, GLenum target, GLenum internalformat, GLuint buffer);
+typedef void (GLAPIENTRY * PFNGLMULTITEXCOORDPOINTEREXTPROC) (GLenum texunit, GLint size, GLenum type, GLsizei stride, const void *pointer);
+typedef void (GLAPIENTRY * PFNGLMULTITEXENVFEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLfloat param);
+typedef void (GLAPIENTRY * PFNGLMULTITEXENVFVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLfloat* params);
+typedef void (GLAPIENTRY * PFNGLMULTITEXENVIEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLint param);
+typedef void (GLAPIENTRY * PFNGLMULTITEXENVIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLint* params);
+typedef void (GLAPIENTRY * PFNGLMULTITEXGENDEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLdouble param);
+typedef void (GLAPIENTRY * PFNGLMULTITEXGENDVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, const GLdouble* params);
+typedef void (GLAPIENTRY * PFNGLMULTITEXGENFEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLfloat param);
+typedef void (GLAPIENTRY * PFNGLMULTITEXGENFVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, const GLfloat* params);
+typedef void (GLAPIENTRY * PFNGLMULTITEXGENIEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLint param);
+typedef void (GLAPIENTRY * PFNGLMULTITEXGENIVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, const GLint* params);
+typedef void (GLAPIENTRY * PFNGLMULTITEXIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const void *pixels);
+typedef void (GLAPIENTRY * PFNGLMULTITEXIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels);
+typedef void (GLAPIENTRY * PFNGLMULTITEXIMAGE3DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels);
+typedef void (GLAPIENTRY * PFNGLMULTITEXPARAMETERIIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLint* params);
+typedef void (GLAPIENTRY * PFNGLMULTITEXPARAMETERIUIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLuint* params);
+typedef void (GLAPIENTRY * PFNGLMULTITEXPARAMETERFEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLfloat param);
+typedef void (GLAPIENTRY * PFNGLMULTITEXPARAMETERFVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLfloat* param);
+typedef void (GLAPIENTRY * PFNGLMULTITEXPARAMETERIEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLint param);
+typedef void (GLAPIENTRY * PFNGLMULTITEXPARAMETERIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLint* param);
+typedef void (GLAPIENTRY * PFNGLMULTITEXRENDERBUFFEREXTPROC) (GLenum texunit, GLenum target, GLuint renderbuffer);
+typedef void (GLAPIENTRY * PFNGLMULTITEXSUBIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void *pixels);
+typedef void (GLAPIENTRY * PFNGLMULTITEXSUBIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels);
+typedef void (GLAPIENTRY * PFNGLMULTITEXSUBIMAGE3DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels);
+typedef void (GLAPIENTRY * PFNGLNAMEDBUFFERDATAEXTPROC) (GLuint buffer, GLsizeiptr size, const void *data, GLenum usage);
+typedef void (GLAPIENTRY * PFNGLNAMEDBUFFERSUBDATAEXTPROC) (GLuint buffer, GLintptr offset, GLsizeiptr size, const void *data);
+typedef void (GLAPIENTRY * PFNGLNAMEDCOPYBUFFERSUBDATAEXTPROC) (GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size);
+typedef void (GLAPIENTRY * PFNGLNAMEDFRAMEBUFFERRENDERBUFFEREXTPROC) (GLuint framebuffer, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
+typedef void (GLAPIENTRY * PFNGLNAMEDFRAMEBUFFERTEXTURE1DEXTPROC) (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
+typedef void (GLAPIENTRY * PFNGLNAMEDFRAMEBUFFERTEXTURE2DEXTPROC) (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
+typedef void (GLAPIENTRY * PFNGLNAMEDFRAMEBUFFERTEXTURE3DEXTPROC) (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
+typedef void (GLAPIENTRY * PFNGLNAMEDFRAMEBUFFERTEXTUREEXTPROC) (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level);
+typedef void (GLAPIENTRY * PFNGLNAMEDFRAMEBUFFERTEXTUREFACEEXTPROC) (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLenum face);
+typedef void (GLAPIENTRY * PFNGLNAMEDFRAMEBUFFERTEXTURELAYEREXTPROC) (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLint layer);
+typedef void (GLAPIENTRY * PFNGLNAMEDPROGRAMLOCALPARAMETER4DEXTPROC) (GLuint program, GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
+typedef void (GLAPIENTRY * PFNGLNAMEDPROGRAMLOCALPARAMETER4DVEXTPROC) (GLuint program, GLenum target, GLuint index, const GLdouble* params);
+typedef void (GLAPIENTRY * PFNGLNAMEDPROGRAMLOCALPARAMETER4FEXTPROC) (GLuint program, GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+typedef void (GLAPIENTRY * PFNGLNAMEDPROGRAMLOCALPARAMETER4FVEXTPROC) (GLuint program, GLenum target, GLuint index, const GLfloat* params);
+typedef void (GLAPIENTRY * PFNGLNAMEDPROGRAMLOCALPARAMETERI4IEXTPROC) (GLuint program, GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w);
+typedef void (GLAPIENTRY * PFNGLNAMEDPROGRAMLOCALPARAMETERI4IVEXTPROC) (GLuint program, GLenum target, GLuint index, const GLint* params);
+typedef void (GLAPIENTRY * PFNGLNAMEDPROGRAMLOCALPARAMETERI4UIEXTPROC) (GLuint program, GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
+typedef void (GLAPIENTRY * PFNGLNAMEDPROGRAMLOCALPARAMETERI4UIVEXTPROC) (GLuint program, GLenum target, GLuint index, const GLuint* params);
+typedef void (GLAPIENTRY * PFNGLNAMEDPROGRAMLOCALPARAMETERS4FVEXTPROC) (GLuint program, GLenum target, GLuint index, GLsizei count, const GLfloat* params);
+typedef void (GLAPIENTRY * PFNGLNAMEDPROGRAMLOCALPARAMETERSI4IVEXTPROC) (GLuint program, GLenum target, GLuint index, GLsizei count, const GLint* params);
+typedef void (GLAPIENTRY * PFNGLNAMEDPROGRAMLOCALPARAMETERSI4UIVEXTPROC) (GLuint program, GLenum target, GLuint index, GLsizei count, const GLuint* params);
+typedef void (GLAPIENTRY * PFNGLNAMEDPROGRAMSTRINGEXTPROC) (GLuint program, GLenum target, GLenum format, GLsizei len, const void *string);
+typedef void (GLAPIENTRY * PFNGLNAMEDRENDERBUFFERSTORAGEEXTPROC) (GLuint renderbuffer, GLenum internalformat, GLsizei width, GLsizei height);
+typedef void (GLAPIENTRY * PFNGLNAMEDRENDERBUFFERSTORAGEMULTISAMPLECOVERAGEEXTPROC) (GLuint renderbuffer, GLsizei coverageSamples, GLsizei colorSamples, GLenum internalformat, GLsizei width, GLsizei height);
+typedef void (GLAPIENTRY * PFNGLNAMEDRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC) (GLuint renderbuffer, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
+typedef void (GLAPIENTRY * PFNGLPROGRAMUNIFORM1FEXTPROC) (GLuint program, GLint location, GLfloat v0);
+typedef void (GLAPIENTRY * PFNGLPROGRAMUNIFORM1FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat* value);
+typedef void (GLAPIENTRY * PFNGLPROGRAMUNIFORM1IEXTPROC) (GLuint program, GLint location, GLint v0);
+typedef void (GLAPIENTRY * PFNGLPROGRAMUNIFORM1IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint* value);
+typedef void (GLAPIENTRY * PFNGLPROGRAMUNIFORM1UIEXTPROC) (GLuint program, GLint location, GLuint v0);
+typedef void (GLAPIENTRY * PFNGLPROGRAMUNIFORM1UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint* value);
+typedef void (GLAPIENTRY * PFNGLPROGRAMUNIFORM2FEXTPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1);
+typedef void (GLAPIENTRY * PFNGLPROGRAMUNIFORM2FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat* value);
+typedef void (GLAPIENTRY * PFNGLPROGRAMUNIFORM2IEXTPROC) (GLuint program, GLint location, GLint v0, GLint v1);
+typedef void (GLAPIENTRY * PFNGLPROGRAMUNIFORM2IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint* value);
+typedef void (GLAPIENTRY * PFNGLPROGRAMUNIFORM2UIEXTPROC) (GLuint program, GLint location, GLuint v0, GLuint v1);
+typedef void (GLAPIENTRY * PFNGLPROGRAMUNIFORM2UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint* value);
+typedef void (GLAPIENTRY * PFNGLPROGRAMUNIFORM3FEXTPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
+typedef void (GLAPIENTRY * PFNGLPROGRAMUNIFORM3FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat* value);
+typedef void (GLAPIENTRY * PFNGLPROGRAMUNIFORM3IEXTPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2);
+typedef void (GLAPIENTRY * PFNGLPROGRAMUNIFORM3IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint* value);
+typedef void (GLAPIENTRY * PFNGLPROGRAMUNIFORM3UIEXTPROC) (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2);
+typedef void (GLAPIENTRY * PFNGLPROGRAMUNIFORM3UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint* value);
+typedef void (GLAPIENTRY * PFNGLPROGRAMUNIFORM4FEXTPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
+typedef void (GLAPIENTRY * PFNGLPROGRAMUNIFORM4FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat* value);
+typedef void (GLAPIENTRY * PFNGLPROGRAMUNIFORM4IEXTPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
+typedef void (GLAPIENTRY * PFNGLPROGRAMUNIFORM4IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint* value);
+typedef void (GLAPIENTRY * PFNGLPROGRAMUNIFORM4UIEXTPROC) (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
+typedef void (GLAPIENTRY * PFNGLPROGRAMUNIFORM4UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint* value);
+typedef void (GLAPIENTRY * PFNGLPROGRAMUNIFORMMATRIX2FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
+typedef void (GLAPIENTRY * PFNGLPROGRAMUNIFORMMATRIX2X3FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
+typedef void (GLAPIENTRY * PFNGLPROGRAMUNIFORMMATRIX2X4FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
+typedef void (GLAPIENTRY * PFNGLPROGRAMUNIFORMMATRIX3FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
+typedef void (GLAPIENTRY * PFNGLPROGRAMUNIFORMMATRIX3X2FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
+typedef void (GLAPIENTRY * PFNGLPROGRAMUNIFORMMATRIX3X4FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
+typedef void (GLAPIENTRY * PFNGLPROGRAMUNIFORMMATRIX4FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
+typedef void (GLAPIENTRY * PFNGLPROGRAMUNIFORMMATRIX4X2FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
+typedef void (GLAPIENTRY * PFNGLPROGRAMUNIFORMMATRIX4X3FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
+typedef void (GLAPIENTRY * PFNGLPUSHCLIENTATTRIBDEFAULTEXTPROC) (GLbitfield mask);
+typedef void (GLAPIENTRY * PFNGLTEXTUREBUFFEREXTPROC) (GLuint texture, GLenum target, GLenum internalformat, GLuint buffer);
+typedef void (GLAPIENTRY * PFNGLTEXTUREIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const void *pixels);
+typedef void (GLAPIENTRY * PFNGLTEXTUREIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels);
+typedef void (GLAPIENTRY * PFNGLTEXTUREIMAGE3DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels);
+typedef void (GLAPIENTRY * PFNGLTEXTUREPARAMETERIIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, const GLint* params);
+typedef void (GLAPIENTRY * PFNGLTEXTUREPARAMETERIUIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, const GLuint* params);
+typedef void (GLAPIENTRY * PFNGLTEXTUREPARAMETERFEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLfloat param);
+typedef void (GLAPIENTRY * PFNGLTEXTUREPARAMETERFVEXTPROC) (GLuint texture, GLenum target, GLenum pname, const GLfloat* param);
+typedef void (GLAPIENTRY * PFNGLTEXTUREPARAMETERIEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLint param);
+typedef void (GLAPIENTRY * PFNGLTEXTUREPARAMETERIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, const GLint* param);
+typedef void (GLAPIENTRY * PFNGLTEXTURERENDERBUFFEREXTPROC) (GLuint texture, GLenum target, GLuint renderbuffer);
+typedef void (GLAPIENTRY * PFNGLTEXTURESUBIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void *pixels);
+typedef void (GLAPIENTRY * PFNGLTEXTURESUBIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels);
+typedef void (GLAPIENTRY * PFNGLTEXTURESUBIMAGE3DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels);
+typedef GLboolean (GLAPIENTRY * PFNGLUNMAPNAMEDBUFFEREXTPROC) (GLuint buffer);
+typedef void (GLAPIENTRY * PFNGLVERTEXARRAYCOLOROFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLint size, GLenum type, GLsizei stride, GLintptr offset);
+typedef void (GLAPIENTRY * PFNGLVERTEXARRAYEDGEFLAGOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLsizei stride, GLintptr offset);
+typedef void (GLAPIENTRY * PFNGLVERTEXARRAYFOGCOORDOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLenum type, GLsizei stride, GLintptr offset);
+typedef void (GLAPIENTRY * PFNGLVERTEXARRAYINDEXOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLenum type, GLsizei stride, GLintptr offset);
+typedef void (GLAPIENTRY * PFNGLVERTEXARRAYMULTITEXCOORDOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLenum texunit, GLint size, GLenum type, GLsizei stride, GLintptr offset);
+typedef void (GLAPIENTRY * PFNGLVERTEXARRAYNORMALOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLenum type, GLsizei stride, GLintptr offset);
+typedef void (GLAPIENTRY * PFNGLVERTEXARRAYSECONDARYCOLOROFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLint size, GLenum type, GLsizei stride, GLintptr offset);
+typedef void (GLAPIENTRY * PFNGLVERTEXARRAYTEXCOORDOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLint size, GLenum type, GLsizei stride, GLintptr offset);
+typedef void (GLAPIENTRY * PFNGLVERTEXARRAYVERTEXATTRIBDIVISOREXTPROC) (GLuint vaobj, GLuint index, GLuint divisor);
+typedef void (GLAPIENTRY * PFNGLVERTEXARRAYVERTEXATTRIBIOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLuint index, GLint size, GLenum type, GLsizei stride, GLintptr offset);
+typedef void (GLAPIENTRY * PFNGLVERTEXARRAYVERTEXATTRIBOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLintptr offset);
+typedef void (GLAPIENTRY * PFNGLVERTEXARRAYVERTEXOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLint size, GLenum type, GLsizei stride, GLintptr offset);
+
+#define glBindMultiTextureEXT GLEW_GET_FUN(__glewBindMultiTextureEXT)
+#define glCheckNamedFramebufferStatusEXT GLEW_GET_FUN(__glewCheckNamedFramebufferStatusEXT)
+#define glClientAttribDefaultEXT GLEW_GET_FUN(__glewClientAttribDefaultEXT)
+#define glCompressedMultiTexImage1DEXT GLEW_GET_FUN(__glewCompressedMultiTexImage1DEXT)
+#define glCompressedMultiTexImage2DEXT GLEW_GET_FUN(__glewCompressedMultiTexImage2DEXT)
+#define glCompressedMultiTexImage3DEXT GLEW_GET_FUN(__glewCompressedMultiTexImage3DEXT)
+#define glCompressedMultiTexSubImage1DEXT GLEW_GET_FUN(__glewCompressedMultiTexSubImage1DEXT)
+#define glCompressedMultiTexSubImage2DEXT GLEW_GET_FUN(__glewCompressedMultiTexSubImage2DEXT)
+#define glCompressedMultiTexSubImage3DEXT GLEW_GET_FUN(__glewCompressedMultiTexSubImage3DEXT)
+#define glCompressedTextureImage1DEXT GLEW_GET_FUN(__glewCompressedTextureImage1DEXT)
+#define glCompressedTextureImage2DEXT GLEW_GET_FUN(__glewCompressedTextureImage2DEXT)
+#define glCompressedTextureImage3DEXT GLEW_GET_FUN(__glewCompressedTextureImage3DEXT)
+#define glCompressedTextureSubImage1DEXT GLEW_GET_FUN(__glewCompressedTextureSubImage1DEXT)
+#define glCompressedTextureSubImage2DEXT GLEW_GET_FUN(__glewCompressedTextureSubImage2DEXT)
+#define glCompressedTextureSubImage3DEXT GLEW_GET_FUN(__glewCompressedTextureSubImage3DEXT)
+#define glCopyMultiTexImage1DEXT GLEW_GET_FUN(__glewCopyMultiTexImage1DEXT)
+#define glCopyMultiTexImage2DEXT GLEW_GET_FUN(__glewCopyMultiTexImage2DEXT)
+#define glCopyMultiTexSubImage1DEXT GLEW_GET_FUN(__glewCopyMultiTexSubImage1DEXT)
+#define glCopyMultiTexSubImage2DEXT GLEW_GET_FUN(__glewCopyMultiTexSubImage2DEXT)
+#define glCopyMultiTexSubImage3DEXT GLEW_GET_FUN(__glewCopyMultiTexSubImage3DEXT)
+#define glCopyTextureImage1DEXT GLEW_GET_FUN(__glewCopyTextureImage1DEXT)
+#define glCopyTextureImage2DEXT GLEW_GET_FUN(__glewCopyTextureImage2DEXT)
+#define glCopyTextureSubImage1DEXT GLEW_GET_FUN(__glewCopyTextureSubImage1DEXT)
+#define glCopyTextureSubImage2DEXT GLEW_GET_FUN(__glewCopyTextureSubImage2DEXT)
+#define glCopyTextureSubImage3DEXT GLEW_GET_FUN(__glewCopyTextureSubImage3DEXT)
+#define glDisableClientStateIndexedEXT GLEW_GET_FUN(__glewDisableClientStateIndexedEXT)
+#define glDisableClientStateiEXT GLEW_GET_FUN(__glewDisableClientStateiEXT)
+#define glDisableVertexArrayAttribEXT GLEW_GET_FUN(__glewDisableVertexArrayAttribEXT)
+#define glDisableVertexArrayEXT GLEW_GET_FUN(__glewDisableVertexArrayEXT)
+#define glEnableClientStateIndexedEXT GLEW_GET_FUN(__glewEnableClientStateIndexedEXT)
+#define glEnableClientStateiEXT GLEW_GET_FUN(__glewEnableClientStateiEXT)
+#define glEnableVertexArrayAttribEXT GLEW_GET_FUN(__glewEnableVertexArrayAttribEXT)
+#define glEnableVertexArrayEXT GLEW_GET_FUN(__glewEnableVertexArrayEXT)
+#define glFlushMappedNamedBufferRangeEXT GLEW_GET_FUN(__glewFlushMappedNamedBufferRangeEXT)
+#define glFramebufferDrawBufferEXT GLEW_GET_FUN(__glewFramebufferDrawBufferEXT)
+#define glFramebufferDrawBuffersEXT GLEW_GET_FUN(__glewFramebufferDrawBuffersEXT)
+#define glFramebufferReadBufferEXT GLEW_GET_FUN(__glewFramebufferReadBufferEXT)
+#define glGenerateMultiTexMipmapEXT GLEW_GET_FUN(__glewGenerateMultiTexMipmapEXT)
+#define glGenerateTextureMipmapEXT GLEW_GET_FUN(__glewGenerateTextureMipmapEXT)
+#define glGetCompressedMultiTexImageEXT GLEW_GET_FUN(__glewGetCompressedMultiTexImageEXT)
+#define glGetCompressedTextureImageEXT GLEW_GET_FUN(__glewGetCompressedTextureImageEXT)
+#define glGetDoubleIndexedvEXT GLEW_GET_FUN(__glewGetDoubleIndexedvEXT)
+#define glGetDoublei_vEXT GLEW_GET_FUN(__glewGetDoublei_vEXT)
+#define glGetFloatIndexedvEXT GLEW_GET_FUN(__glewGetFloatIndexedvEXT)
+#define glGetFloati_vEXT GLEW_GET_FUN(__glewGetFloati_vEXT)
+#define glGetFramebufferParameterivEXT GLEW_GET_FUN(__glewGetFramebufferParameterivEXT)
+#define glGetMultiTexEnvfvEXT GLEW_GET_FUN(__glewGetMultiTexEnvfvEXT)
+#define glGetMultiTexEnvivEXT GLEW_GET_FUN(__glewGetMultiTexEnvivEXT)
+#define glGetMultiTexGendvEXT GLEW_GET_FUN(__glewGetMultiTexGendvEXT)
+#define glGetMultiTexGenfvEXT GLEW_GET_FUN(__glewGetMultiTexGenfvEXT)
+#define glGetMultiTexGenivEXT GLEW_GET_FUN(__glewGetMultiTexGenivEXT)
+#define glGetMultiTexImageEXT GLEW_GET_FUN(__glewGetMultiTexImageEXT)
+#define glGetMultiTexLevelParameterfvEXT GLEW_GET_FUN(__glewGetMultiTexLevelParameterfvEXT)
+#define glGetMultiTexLevelParameterivEXT GLEW_GET_FUN(__glewGetMultiTexLevelParameterivEXT)
+#define glGetMultiTexParameterIivEXT GLEW_GET_FUN(__glewGetMultiTexParameterIivEXT)
+#define glGetMultiTexParameterIuivEXT GLEW_GET_FUN(__glewGetMultiTexParameterIuivEXT)
+#define glGetMultiTexParameterfvEXT GLEW_GET_FUN(__glewGetMultiTexParameterfvEXT)
+#define glGetMultiTexParameterivEXT GLEW_GET_FUN(__glewGetMultiTexParameterivEXT)
+#define glGetNamedBufferParameterivEXT GLEW_GET_FUN(__glewGetNamedBufferParameterivEXT)
+#define glGetNamedBufferPointervEXT GLEW_GET_FUN(__glewGetNamedBufferPointervEXT)
+#define glGetNamedBufferSubDataEXT GLEW_GET_FUN(__glewGetNamedBufferSubDataEXT)
+#define glGetNamedFramebufferAttachmentParameterivEXT GLEW_GET_FUN(__glewGetNamedFramebufferAttachmentParameterivEXT)
+#define glGetNamedProgramLocalParameterIivEXT GLEW_GET_FUN(__glewGetNamedProgramLocalParameterIivEXT)
+#define glGetNamedProgramLocalParameterIuivEXT GLEW_GET_FUN(__glewGetNamedProgramLocalParameterIuivEXT)
+#define glGetNamedProgramLocalParameterdvEXT GLEW_GET_FUN(__glewGetNamedProgramLocalParameterdvEXT)
+#define glGetNamedProgramLocalParameterfvEXT GLEW_GET_FUN(__glewGetNamedProgramLocalParameterfvEXT)
+#define glGetNamedProgramStringEXT GLEW_GET_FUN(__glewGetNamedProgramStringEXT)
+#define glGetNamedProgramivEXT GLEW_GET_FUN(__glewGetNamedProgramivEXT)
+#define glGetNamedRenderbufferParameterivEXT GLEW_GET_FUN(__glewGetNamedRenderbufferParameterivEXT)
+#define glGetPointerIndexedvEXT GLEW_GET_FUN(__glewGetPointerIndexedvEXT)
+#define glGetPointeri_vEXT GLEW_GET_FUN(__glewGetPointeri_vEXT)
+#define glGetTextureImageEXT GLEW_GET_FUN(__glewGetTextureImageEXT)
+#define glGetTextureLevelParameterfvEXT GLEW_GET_FUN(__glewGetTextureLevelParameterfvEXT)
+#define glGetTextureLevelParameterivEXT GLEW_GET_FUN(__glewGetTextureLevelParameterivEXT)
+#define glGetTextureParameterIivEXT GLEW_GET_FUN(__glewGetTextureParameterIivEXT)
+#define glGetTextureParameterIuivEXT GLEW_GET_FUN(__glewGetTextureParameterIuivEXT)
+#define glGetTextureParameterfvEXT GLEW_GET_FUN(__glewGetTextureParameterfvEXT)
+#define glGetTextureParameterivEXT GLEW_GET_FUN(__glewGetTextureParameterivEXT)
+#define glGetVertexArrayIntegeri_vEXT GLEW_GET_FUN(__glewGetVertexArrayIntegeri_vEXT)
+#define glGetVertexArrayIntegervEXT GLEW_GET_FUN(__glewGetVertexArrayIntegervEXT)
+#define glGetVertexArrayPointeri_vEXT GLEW_GET_FUN(__glewGetVertexArrayPointeri_vEXT)
+#define glGetVertexArrayPointervEXT GLEW_GET_FUN(__glewGetVertexArrayPointervEXT)
+#define glMapNamedBufferEXT GLEW_GET_FUN(__glewMapNamedBufferEXT)
+#define glMapNamedBufferRangeEXT GLEW_GET_FUN(__glewMapNamedBufferRangeEXT)
+#define glMatrixFrustumEXT GLEW_GET_FUN(__glewMatrixFrustumEXT)
+#define glMatrixLoadIdentityEXT GLEW_GET_FUN(__glewMatrixLoadIdentityEXT)
+#define glMatrixLoadTransposedEXT GLEW_GET_FUN(__glewMatrixLoadTransposedEXT)
+#define glMatrixLoadTransposefEXT GLEW_GET_FUN(__glewMatrixLoadTransposefEXT)
+#define glMatrixLoaddEXT GLEW_GET_FUN(__glewMatrixLoaddEXT)
+#define glMatrixLoadfEXT GLEW_GET_FUN(__glewMatrixLoadfEXT)
+#define glMatrixMultTransposedEXT GLEW_GET_FUN(__glewMatrixMultTransposedEXT)
+#define glMatrixMultTransposefEXT GLEW_GET_FUN(__glewMatrixMultTransposefEXT)
+#define glMatrixMultdEXT GLEW_GET_FUN(__glewMatrixMultdEXT)
+#define glMatrixMultfEXT GLEW_GET_FUN(__glewMatrixMultfEXT)
+#define glMatrixOrthoEXT GLEW_GET_FUN(__glewMatrixOrthoEXT)
+#define glMatrixPopEXT GLEW_GET_FUN(__glewMatrixPopEXT)
+#define glMatrixPushEXT GLEW_GET_FUN(__glewMatrixPushEXT)
+#define glMatrixRotatedEXT GLEW_GET_FUN(__glewMatrixRotatedEXT)
+#define glMatrixRotatefEXT GLEW_GET_FUN(__glewMatrixRotatefEXT)
+#define glMatrixScaledEXT GLEW_GET_FUN(__glewMatrixScaledEXT)
+#define glMatrixScalefEXT GLEW_GET_FUN(__glewMatrixScalefEXT)
+#define glMatrixTranslatedEXT GLEW_GET_FUN(__glewMatrixTranslatedEXT)
+#define glMatrixTranslatefEXT GLEW_GET_FUN(__glewMatrixTranslatefEXT)
+#define glMultiTexBufferEXT GLEW_GET_FUN(__glewMultiTexBufferEXT)
+#define glMultiTexCoordPointerEXT GLEW_GET_FUN(__glewMultiTexCoordPointerEXT)
+#define glMultiTexEnvfEXT GLEW_GET_FUN(__glewMultiTexEnvfEXT)
+#define glMultiTexEnvfvEXT GLEW_GET_FUN(__glewMultiTexEnvfvEXT)
+#define glMultiTexEnviEXT GLEW_GET_FUN(__glewMultiTexEnviEXT)
+#define glMultiTexEnvivEXT GLEW_GET_FUN(__glewMultiTexEnvivEXT)
+#define glMultiTexGendEXT GLEW_GET_FUN(__glewMultiTexGendEXT)
+#define glMultiTexGendvEXT GLEW_GET_FUN(__glewMultiTexGendvEXT)
+#define glMultiTexGenfEXT GLEW_GET_FUN(__glewMultiTexGenfEXT)
+#define glMultiTexGenfvEXT GLEW_GET_FUN(__glewMultiTexGenfvEXT)
+#define glMultiTexGeniEXT GLEW_GET_FUN(__glewMultiTexGeniEXT)
+#define glMultiTexGenivEXT GLEW_GET_FUN(__glewMultiTexGenivEXT)
+#define glMultiTexImage1DEXT GLEW_GET_FUN(__glewMultiTexImage1DEXT)
+#define glMultiTexImage2DEXT GLEW_GET_FUN(__glewMultiTexImage2DEXT)
+#define glMultiTexImage3DEXT GLEW_GET_FUN(__glewMultiTexImage3DEXT)
+#define glMultiTexParameterIivEXT GLEW_GET_FUN(__glewMultiTexParameterIivEXT)
+#define glMultiTexParameterIuivEXT GLEW_GET_FUN(__glewMultiTexParameterIuivEXT)
+#define glMultiTexParameterfEXT GLEW_GET_FUN(__glewMultiTexParameterfEXT)
+#define glMultiTexParameterfvEXT GLEW_GET_FUN(__glewMultiTexParameterfvEXT)
+#define glMultiTexParameteriEXT GLEW_GET_FUN(__glewMultiTexParameteriEXT)
+#define glMultiTexParameterivEXT GLEW_GET_FUN(__glewMultiTexParameterivEXT)
+#define glMultiTexRenderbufferEXT GLEW_GET_FUN(__glewMultiTexRenderbufferEXT)
+#define glMultiTexSubImage1DEXT GLEW_GET_FUN(__glewMultiTexSubImage1DEXT)
+#define glMultiTexSubImage2DEXT GLEW_GET_FUN(__glewMultiTexSubImage2DEXT)
+#define glMultiTexSubImage3DEXT GLEW_GET_FUN(__glewMultiTexSubImage3DEXT)
+#define glNamedBufferDataEXT GLEW_GET_FUN(__glewNamedBufferDataEXT)
+#define glNamedBufferSubDataEXT GLEW_GET_FUN(__glewNamedBufferSubDataEXT)
+#define glNamedCopyBufferSubDataEXT GLEW_GET_FUN(__glewNamedCopyBufferSubDataEXT)
+#define glNamedFramebufferRenderbufferEXT GLEW_GET_FUN(__glewNamedFramebufferRenderbufferEXT)
+#define glNamedFramebufferTexture1DEXT GLEW_GET_FUN(__glewNamedFramebufferTexture1DEXT)
+#define glNamedFramebufferTexture2DEXT GLEW_GET_FUN(__glewNamedFramebufferTexture2DEXT)
+#define glNamedFramebufferTexture3DEXT GLEW_GET_FUN(__glewNamedFramebufferTexture3DEXT)
+#define glNamedFramebufferTextureEXT GLEW_GET_FUN(__glewNamedFramebufferTextureEXT)
+#define glNamedFramebufferTextureFaceEXT GLEW_GET_FUN(__glewNamedFramebufferTextureFaceEXT)
+#define glNamedFramebufferTextureLayerEXT GLEW_GET_FUN(__glewNamedFramebufferTextureLayerEXT)
+#define glNamedProgramLocalParameter4dEXT GLEW_GET_FUN(__glewNamedProgramLocalParameter4dEXT)
+#define glNamedProgramLocalParameter4dvEXT GLEW_GET_FUN(__glewNamedProgramLocalParameter4dvEXT)
+#define glNamedProgramLocalParameter4fEXT GLEW_GET_FUN(__glewNamedProgramLocalParameter4fEXT)
+#define glNamedProgramLocalParameter4fvEXT GLEW_GET_FUN(__glewNamedProgramLocalParameter4fvEXT)
+#define glNamedProgramLocalParameterI4iEXT GLEW_GET_FUN(__glewNamedProgramLocalParameterI4iEXT)
+#define glNamedProgramLocalParameterI4ivEXT GLEW_GET_FUN(__glewNamedProgramLocalParameterI4ivEXT)
+#define glNamedProgramLocalParameterI4uiEXT GLEW_GET_FUN(__glewNamedProgramLocalParameterI4uiEXT)
+#define glNamedProgramLocalParameterI4uivEXT GLEW_GET_FUN(__glewNamedProgramLocalParameterI4uivEXT)
+#define glNamedProgramLocalParameters4fvEXT GLEW_GET_FUN(__glewNamedProgramLocalParameters4fvEXT)
+#define glNamedProgramLocalParametersI4ivEXT GLEW_GET_FUN(__glewNamedProgramLocalParametersI4ivEXT)
+#define glNamedProgramLocalParametersI4uivEXT GLEW_GET_FUN(__glewNamedProgramLocalParametersI4uivEXT)
+#define glNamedProgramStringEXT GLEW_GET_FUN(__glewNamedProgramStringEXT)
+#define glNamedRenderbufferStorageEXT GLEW_GET_FUN(__glewNamedRenderbufferStorageEXT)
+#define glNamedRenderbufferStorageMultisampleCoverageEXT GLEW_GET_FUN(__glewNamedRenderbufferStorageMultisampleCoverageEXT)
+#define glNamedRenderbufferStorageMultisampleEXT GLEW_GET_FUN(__glewNamedRenderbufferStorageMultisampleEXT)
+#define glProgramUniform1fEXT GLEW_GET_FUN(__glewProgramUniform1fEXT)
+#define glProgramUniform1fvEXT GLEW_GET_FUN(__glewProgramUniform1fvEXT)
+#define glProgramUniform1iEXT GLEW_GET_FUN(__glewProgramUniform1iEXT)
+#define glProgramUniform1ivEXT GLEW_GET_FUN(__glewProgramUniform1ivEXT)
+#define glProgramUniform1uiEXT GLEW_GET_FUN(__glewProgramUniform1uiEXT)
+#define glProgramUniform1uivEXT GLEW_GET_FUN(__glewProgramUniform1uivEXT)
+#define glProgramUniform2fEXT GLEW_GET_FUN(__glewProgramUniform2fEXT)
+#define glProgramUniform2fvEXT GLEW_GET_FUN(__glewProgramUniform2fvEXT)
+#define glProgramUniform2iEXT GLEW_GET_FUN(__glewProgramUniform2iEXT)
+#define glProgramUniform2ivEXT GLEW_GET_FUN(__glewProgramUniform2ivEXT)
+#define glProgramUniform2uiEXT GLEW_GET_FUN(__glewProgramUniform2uiEXT)
+#define glProgramUniform2uivEXT GLEW_GET_FUN(__glewProgramUniform2uivEXT)
+#define glProgramUniform3fEXT GLEW_GET_FUN(__glewProgramUniform3fEXT)
+#define glProgramUniform3fvEXT GLEW_GET_FUN(__glewProgramUniform3fvEXT)
+#define glProgramUniform3iEXT GLEW_GET_FUN(__glewProgramUniform3iEXT)
+#define glProgramUniform3ivEXT GLEW_GET_FUN(__glewProgramUniform3ivEXT)
+#define glProgramUniform3uiEXT GLEW_GET_FUN(__glewProgramUniform3uiEXT)
+#define glProgramUniform3uivEXT GLEW_GET_FUN(__glewProgramUniform3uivEXT)
+#define glProgramUniform4fEXT GLEW_GET_FUN(__glewProgramUniform4fEXT)
+#define glProgramUniform4fvEXT GLEW_GET_FUN(__glewProgramUniform4fvEXT)
+#define glProgramUniform4iEXT GLEW_GET_FUN(__glewProgramUniform4iEXT)
+#define glProgramUniform4ivEXT GLEW_GET_FUN(__glewProgramUniform4ivEXT)
+#define glProgramUniform4uiEXT GLEW_GET_FUN(__glewProgramUniform4uiEXT)
+#define glProgramUniform4uivEXT GLEW_GET_FUN(__glewProgramUniform4uivEXT)
+#define glProgramUniformMatrix2fvEXT GLEW_GET_FUN(__glewProgramUniformMatrix2fvEXT)
+#define glProgramUniformMatrix2x3fvEXT GLEW_GET_FUN(__glewProgramUniformMatrix2x3fvEXT)
+#define glProgramUniformMatrix2x4fvEXT GLEW_GET_FUN(__glewProgramUniformMatrix2x4fvEXT)
+#define glProgramUniformMatrix3fvEXT GLEW_GET_FUN(__glewProgramUniformMatrix3fvEXT)
+#define glProgramUniformMatrix3x2fvEXT GLEW_GET_FUN(__glewProgramUniformMatrix3x2fvEXT)
+#define glProgramUniformMatrix3x4fvEXT GLEW_GET_FUN(__glewProgramUniformMatrix3x4fvEXT)
+#define glProgramUniformMatrix4fvEXT GLEW_GET_FUN(__glewProgramUniformMatrix4fvEXT)
+#define glProgramUniformMatrix4x2fvEXT GLEW_GET_FUN(__glewProgramUniformMatrix4x2fvEXT)
+#define glProgramUniformMatrix4x3fvEXT GLEW_GET_FUN(__glewProgramUniformMatrix4x3fvEXT)
+#define glPushClientAttribDefaultEXT GLEW_GET_FUN(__glewPushClientAttribDefaultEXT)
+#define glTextureBufferEXT GLEW_GET_FUN(__glewTextureBufferEXT)
+#define glTextureImage1DEXT GLEW_GET_FUN(__glewTextureImage1DEXT)
+#define glTextureImage2DEXT GLEW_GET_FUN(__glewTextureImage2DEXT)
+#define glTextureImage3DEXT GLEW_GET_FUN(__glewTextureImage3DEXT)
+#define glTextureParameterIivEXT GLEW_GET_FUN(__glewTextureParameterIivEXT)
+#define glTextureParameterIuivEXT GLEW_GET_FUN(__glewTextureParameterIuivEXT)
+#define glTextureParameterfEXT GLEW_GET_FUN(__glewTextureParameterfEXT)
+#define glTextureParameterfvEXT GLEW_GET_FUN(__glewTextureParameterfvEXT)
+#define glTextureParameteriEXT GLEW_GET_FUN(__glewTextureParameteriEXT)
+#define glTextureParameterivEXT GLEW_GET_FUN(__glewTextureParameterivEXT)
+#define glTextureRenderbufferEXT GLEW_GET_FUN(__glewTextureRenderbufferEXT)
+#define glTextureSubImage1DEXT GLEW_GET_FUN(__glewTextureSubImage1DEXT)
+#define glTextureSubImage2DEXT GLEW_GET_FUN(__glewTextureSubImage2DEXT)
+#define glTextureSubImage3DEXT GLEW_GET_FUN(__glewTextureSubImage3DEXT)
+#define glUnmapNamedBufferEXT GLEW_GET_FUN(__glewUnmapNamedBufferEXT)
+#define glVertexArrayColorOffsetEXT GLEW_GET_FUN(__glewVertexArrayColorOffsetEXT)
+#define glVertexArrayEdgeFlagOffsetEXT GLEW_GET_FUN(__glewVertexArrayEdgeFlagOffsetEXT)
+#define glVertexArrayFogCoordOffsetEXT GLEW_GET_FUN(__glewVertexArrayFogCoordOffsetEXT)
+#define glVertexArrayIndexOffsetEXT GLEW_GET_FUN(__glewVertexArrayIndexOffsetEXT)
+#define glVertexArrayMultiTexCoordOffsetEXT GLEW_GET_FUN(__glewVertexArrayMultiTexCoordOffsetEXT)
+#define glVertexArrayNormalOffsetEXT GLEW_GET_FUN(__glewVertexArrayNormalOffsetEXT)
+#define glVertexArraySecondaryColorOffsetEXT GLEW_GET_FUN(__glewVertexArraySecondaryColorOffsetEXT)
+#define glVertexArrayTexCoordOffsetEXT GLEW_GET_FUN(__glewVertexArrayTexCoordOffsetEXT)
+#define glVertexArrayVertexAttribDivisorEXT GLEW_GET_FUN(__glewVertexArrayVertexAttribDivisorEXT)
+#define glVertexArrayVertexAttribIOffsetEXT GLEW_GET_FUN(__glewVertexArrayVertexAttribIOffsetEXT)
+#define glVertexArrayVertexAttribOffsetEXT GLEW_GET_FUN(__glewVertexArrayVertexAttribOffsetEXT)
+#define glVertexArrayVertexOffsetEXT GLEW_GET_FUN(__glewVertexArrayVertexOffsetEXT)
+
+#define GLEW_EXT_direct_state_access GLEW_GET_VAR(__GLEW_EXT_direct_state_access)
+
+#endif /* GL_EXT_direct_state_access */
+
+/* -------------------------- GL_EXT_draw_buffers2 ------------------------- */
+
+#ifndef GL_EXT_draw_buffers2
+#define GL_EXT_draw_buffers2 1
+
+typedef void (GLAPIENTRY * PFNGLCOLORMASKINDEXEDEXTPROC) (GLuint buf, GLboolean r, GLboolean g, GLboolean b, GLboolean a);
+typedef void (GLAPIENTRY * PFNGLDISABLEINDEXEDEXTPROC) (GLenum target, GLuint index);
+typedef void (GLAPIENTRY * PFNGLENABLEINDEXEDEXTPROC) (GLenum target, GLuint index);
+typedef void (GLAPIENTRY * PFNGLGETBOOLEANINDEXEDVEXTPROC) (GLenum value, GLuint index, GLboolean* data);
+typedef void (GLAPIENTRY * PFNGLGETINTEGERINDEXEDVEXTPROC) (GLenum value, GLuint index, GLint* data);
+typedef GLboolean (GLAPIENTRY * PFNGLISENABLEDINDEXEDEXTPROC) (GLenum target, GLuint index);
+
+#define glColorMaskIndexedEXT GLEW_GET_FUN(__glewColorMaskIndexedEXT)
+#define glDisableIndexedEXT GLEW_GET_FUN(__glewDisableIndexedEXT)
+#define glEnableIndexedEXT GLEW_GET_FUN(__glewEnableIndexedEXT)
+#define glGetBooleanIndexedvEXT GLEW_GET_FUN(__glewGetBooleanIndexedvEXT)
+#define glGetIntegerIndexedvEXT GLEW_GET_FUN(__glewGetIntegerIndexedvEXT)
+#define glIsEnabledIndexedEXT GLEW_GET_FUN(__glewIsEnabledIndexedEXT)
+
+#define GLEW_EXT_draw_buffers2 GLEW_GET_VAR(__GLEW_EXT_draw_buffers2)
+
+#endif /* GL_EXT_draw_buffers2 */
+
+/* ------------------------- GL_EXT_draw_instanced ------------------------- */
+
+#ifndef GL_EXT_draw_instanced
+#define GL_EXT_draw_instanced 1
+
+typedef void (GLAPIENTRY * PFNGLDRAWARRAYSINSTANCEDEXTPROC) (GLenum mode, GLint start, GLsizei count, GLsizei primcount);
+typedef void (GLAPIENTRY * PFNGLDRAWELEMENTSINSTANCEDEXTPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount);
+
+#define glDrawArraysInstancedEXT GLEW_GET_FUN(__glewDrawArraysInstancedEXT)
+#define glDrawElementsInstancedEXT GLEW_GET_FUN(__glewDrawElementsInstancedEXT)
+
+#define GLEW_EXT_draw_instanced GLEW_GET_VAR(__GLEW_EXT_draw_instanced)
+
+#endif /* GL_EXT_draw_instanced */
+
+/* ----------------------- GL_EXT_draw_range_elements ---------------------- */
+
+#ifndef GL_EXT_draw_range_elements
+#define GL_EXT_draw_range_elements 1
+
+#define GL_MAX_ELEMENTS_VERTICES_EXT 0x80E8
+#define GL_MAX_ELEMENTS_INDICES_EXT 0x80E9
+
+typedef void (GLAPIENTRY * PFNGLDRAWRANGEELEMENTSEXTPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices);
+
+#define glDrawRangeElementsEXT GLEW_GET_FUN(__glewDrawRangeElementsEXT)
+
+#define GLEW_EXT_draw_range_elements GLEW_GET_VAR(__GLEW_EXT_draw_range_elements)
+
+#endif /* GL_EXT_draw_range_elements */
+
+/* ---------------------------- GL_EXT_fog_coord --------------------------- */
+
+#ifndef GL_EXT_fog_coord
+#define GL_EXT_fog_coord 1
+
+#define GL_FOG_COORDINATE_SOURCE_EXT 0x8450
+#define GL_FOG_COORDINATE_EXT 0x8451
+#define GL_FRAGMENT_DEPTH_EXT 0x8452
+#define GL_CURRENT_FOG_COORDINATE_EXT 0x8453
+#define GL_FOG_COORDINATE_ARRAY_TYPE_EXT 0x8454
+#define GL_FOG_COORDINATE_ARRAY_STRIDE_EXT 0x8455
+#define GL_FOG_COORDINATE_ARRAY_POINTER_EXT 0x8456
+#define GL_FOG_COORDINATE_ARRAY_EXT 0x8457
+
+typedef void (GLAPIENTRY * PFNGLFOGCOORDPOINTEREXTPROC) (GLenum type, GLsizei stride, const void *pointer);
+typedef void (GLAPIENTRY * PFNGLFOGCOORDDEXTPROC) (GLdouble coord);
+typedef void (GLAPIENTRY * PFNGLFOGCOORDDVEXTPROC) (const GLdouble *coord);
+typedef void (GLAPIENTRY * PFNGLFOGCOORDFEXTPROC) (GLfloat coord);
+typedef void (GLAPIENTRY * PFNGLFOGCOORDFVEXTPROC) (const GLfloat *coord);
+
+#define glFogCoordPointerEXT GLEW_GET_FUN(__glewFogCoordPointerEXT)
+#define glFogCoorddEXT GLEW_GET_FUN(__glewFogCoorddEXT)
+#define glFogCoorddvEXT GLEW_GET_FUN(__glewFogCoorddvEXT)
+#define glFogCoordfEXT GLEW_GET_FUN(__glewFogCoordfEXT)
+#define glFogCoordfvEXT GLEW_GET_FUN(__glewFogCoordfvEXT)
+
+#define GLEW_EXT_fog_coord GLEW_GET_VAR(__GLEW_EXT_fog_coord)
+
+#endif /* GL_EXT_fog_coord */
+
+/* ------------------------ GL_EXT_fragment_lighting ----------------------- */
+
+#ifndef GL_EXT_fragment_lighting
+#define GL_EXT_fragment_lighting 1
+
+#define GL_FRAGMENT_LIGHTING_EXT 0x8400
+#define GL_FRAGMENT_COLOR_MATERIAL_EXT 0x8401
+#define GL_FRAGMENT_COLOR_MATERIAL_FACE_EXT 0x8402
+#define GL_FRAGMENT_COLOR_MATERIAL_PARAMETER_EXT 0x8403
+#define GL_MAX_FRAGMENT_LIGHTS_EXT 0x8404
+#define GL_MAX_ACTIVE_LIGHTS_EXT 0x8405
+#define GL_CURRENT_RASTER_NORMAL_EXT 0x8406
+#define GL_LIGHT_ENV_MODE_EXT 0x8407
+#define GL_FRAGMENT_LIGHT_MODEL_LOCAL_VIEWER_EXT 0x8408
+#define GL_FRAGMENT_LIGHT_MODEL_TWO_SIDE_EXT 0x8409
+#define GL_FRAGMENT_LIGHT_MODEL_AMBIENT_EXT 0x840A
+#define GL_FRAGMENT_LIGHT_MODEL_NORMAL_INTERPOLATION_EXT 0x840B
+#define GL_FRAGMENT_LIGHT0_EXT 0x840C
+#define GL_FRAGMENT_LIGHT7_EXT 0x8413
+
+typedef void (GLAPIENTRY * PFNGLFRAGMENTCOLORMATERIALEXTPROC) (GLenum face, GLenum mode);
+typedef void (GLAPIENTRY * PFNGLFRAGMENTLIGHTMODELFEXTPROC) (GLenum pname, GLfloat param);
+typedef void (GLAPIENTRY * PFNGLFRAGMENTLIGHTMODELFVEXTPROC) (GLenum pname, GLfloat* params);
+typedef void (GLAPIENTRY * PFNGLFRAGMENTLIGHTMODELIEXTPROC) (GLenum pname, GLint param);
+typedef void (GLAPIENTRY * PFNGLFRAGMENTLIGHTMODELIVEXTPROC) (GLenum pname, GLint* params);
+typedef void (GLAPIENTRY * PFNGLFRAGMENTLIGHTFEXTPROC) (GLenum light, GLenum pname, GLfloat param);
+typedef void (GLAPIENTRY * PFNGLFRAGMENTLIGHTFVEXTPROC) (GLenum light, GLenum pname, GLfloat* params);
+typedef void (GLAPIENTRY * PFNGLFRAGMENTLIGHTIEXTPROC) (GLenum light, GLenum pname, GLint param);
+typedef void (GLAPIENTRY * PFNGLFRAGMENTLIGHTIVEXTPROC) (GLenum light, GLenum pname, GLint* params);
+typedef void (GLAPIENTRY * PFNGLFRAGMENTMATERIALFEXTPROC) (GLenum face, GLenum pname, const GLfloat param);
+typedef void (GLAPIENTRY * PFNGLFRAGMENTMATERIALFVEXTPROC) (GLenum face, GLenum pname, const GLfloat* params);
+typedef void (GLAPIENTRY * PFNGLFRAGMENTMATERIALIEXTPROC) (GLenum face, GLenum pname, const GLint param);
+typedef void (GLAPIENTRY * PFNGLFRAGMENTMATERIALIVEXTPROC) (GLenum face, GLenum pname, const GLint* params);
+typedef void (GLAPIENTRY * PFNGLGETFRAGMENTLIGHTFVEXTPROC) (GLenum light, GLenum pname, GLfloat* params);
+typedef void (GLAPIENTRY * PFNGLGETFRAGMENTLIGHTIVEXTPROC) (GLenum light, GLenum pname, GLint* params);
+typedef void (GLAPIENTRY * PFNGLGETFRAGMENTMATERIALFVEXTPROC) (GLenum face, GLenum pname, const GLfloat* params);
+typedef void (GLAPIENTRY * PFNGLGETFRAGMENTMATERIALIVEXTPROC) (GLenum face, GLenum pname, const GLint* params);
+typedef void (GLAPIENTRY * PFNGLLIGHTENVIEXTPROC) (GLenum pname, GLint param);
+
+#define glFragmentColorMaterialEXT GLEW_GET_FUN(__glewFragmentColorMaterialEXT)
+#define glFragmentLightModelfEXT GLEW_GET_FUN(__glewFragmentLightModelfEXT)
+#define glFragmentLightModelfvEXT GLEW_GET_FUN(__glewFragmentLightModelfvEXT)
+#define glFragmentLightModeliEXT GLEW_GET_FUN(__glewFragmentLightModeliEXT)
+#define glFragmentLightModelivEXT GLEW_GET_FUN(__glewFragmentLightModelivEXT)
+#define glFragmentLightfEXT GLEW_GET_FUN(__glewFragmentLightfEXT)
+#define glFragmentLightfvEXT GLEW_GET_FUN(__glewFragmentLightfvEXT)
+#define glFragmentLightiEXT GLEW_GET_FUN(__glewFragmentLightiEXT)
+#define glFragmentLightivEXT GLEW_GET_FUN(__glewFragmentLightivEXT)
+#define glFragmentMaterialfEXT GLEW_GET_FUN(__glewFragmentMaterialfEXT)
+#define glFragmentMaterialfvEXT GLEW_GET_FUN(__glewFragmentMaterialfvEXT)
+#define glFragmentMaterialiEXT GLEW_GET_FUN(__glewFragmentMaterialiEXT)
+#define glFragmentMaterialivEXT GLEW_GET_FUN(__glewFragmentMaterialivEXT)
+#define glGetFragmentLightfvEXT GLEW_GET_FUN(__glewGetFragmentLightfvEXT)
+#define glGetFragmentLightivEXT GLEW_GET_FUN(__glewGetFragmentLightivEXT)
+#define glGetFragmentMaterialfvEXT GLEW_GET_FUN(__glewGetFragmentMaterialfvEXT)
+#define glGetFragmentMaterialivEXT GLEW_GET_FUN(__glewGetFragmentMaterialivEXT)
+#define glLightEnviEXT GLEW_GET_FUN(__glewLightEnviEXT)
+
+#define GLEW_EXT_fragment_lighting GLEW_GET_VAR(__GLEW_EXT_fragment_lighting)
+
+#endif /* GL_EXT_fragment_lighting */
+
+/* ------------------------ GL_EXT_framebuffer_blit ------------------------ */
+
+#ifndef GL_EXT_framebuffer_blit
+#define GL_EXT_framebuffer_blit 1
+
+#define GL_DRAW_FRAMEBUFFER_BINDING_EXT 0x8CA6
+#define GL_READ_FRAMEBUFFER_EXT 0x8CA8
+#define GL_DRAW_FRAMEBUFFER_EXT 0x8CA9
+#define GL_READ_FRAMEBUFFER_BINDING_EXT 0x8CAA
+
+typedef void (GLAPIENTRY * PFNGLBLITFRAMEBUFFEREXTPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
+
+#define glBlitFramebufferEXT GLEW_GET_FUN(__glewBlitFramebufferEXT)
+
+#define GLEW_EXT_framebuffer_blit GLEW_GET_VAR(__GLEW_EXT_framebuffer_blit)
+
+#endif /* GL_EXT_framebuffer_blit */
+
+/* --------------------- GL_EXT_framebuffer_multisample -------------------- */
+
+#ifndef GL_EXT_framebuffer_multisample
+#define GL_EXT_framebuffer_multisample 1
+
+#define GL_RENDERBUFFER_SAMPLES_EXT 0x8CAB
+#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT 0x8D56
+#define GL_MAX_SAMPLES_EXT 0x8D57
+
+typedef void (GLAPIENTRY * PFNGLRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
+
+#define glRenderbufferStorageMultisampleEXT GLEW_GET_FUN(__glewRenderbufferStorageMultisampleEXT)
+
+#define GLEW_EXT_framebuffer_multisample GLEW_GET_VAR(__GLEW_EXT_framebuffer_multisample)
+
+#endif /* GL_EXT_framebuffer_multisample */
+
+/* --------------- GL_EXT_framebuffer_multisample_blit_scaled -------------- */
+
+#ifndef GL_EXT_framebuffer_multisample_blit_scaled
+#define GL_EXT_framebuffer_multisample_blit_scaled 1
+
+#define GL_SCALED_RESOLVE_FASTEST_EXT 0x90BA
+#define GL_SCALED_RESOLVE_NICEST_EXT 0x90BB
+
+#define GLEW_EXT_framebuffer_multisample_blit_scaled GLEW_GET_VAR(__GLEW_EXT_framebuffer_multisample_blit_scaled)
+
+#endif /* GL_EXT_framebuffer_multisample_blit_scaled */
+
+/* ----------------------- GL_EXT_framebuffer_object ----------------------- */
+
+#ifndef GL_EXT_framebuffer_object
+#define GL_EXT_framebuffer_object 1
+
+#define GL_INVALID_FRAMEBUFFER_OPERATION_EXT 0x0506
+#define GL_MAX_RENDERBUFFER_SIZE_EXT 0x84E8
+#define GL_FRAMEBUFFER_BINDING_EXT 0x8CA6
+#define GL_RENDERBUFFER_BINDING_EXT 0x8CA7
+#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT 0x8CD0
+#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT 0x8CD1
+#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT 0x8CD2
+#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT 0x8CD3
+#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT 0x8CD4
+#define GL_FRAMEBUFFER_COMPLETE_EXT 0x8CD5
+#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT 0x8CD6
+#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT 0x8CD7
+#define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT 0x8CD9
+#define GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT 0x8CDA
+#define GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT 0x8CDB
+#define GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT 0x8CDC
+#define GL_FRAMEBUFFER_UNSUPPORTED_EXT 0x8CDD
+#define GL_MAX_COLOR_ATTACHMENTS_EXT 0x8CDF
+#define GL_COLOR_ATTACHMENT0_EXT 0x8CE0
+#define GL_COLOR_ATTACHMENT1_EXT 0x8CE1
+#define GL_COLOR_ATTACHMENT2_EXT 0x8CE2
+#define GL_COLOR_ATTACHMENT3_EXT 0x8CE3
+#define GL_COLOR_ATTACHMENT4_EXT 0x8CE4
+#define GL_COLOR_ATTACHMENT5_EXT 0x8CE5
+#define GL_COLOR_ATTACHMENT6_EXT 0x8CE6
+#define GL_COLOR_ATTACHMENT7_EXT 0x8CE7
+#define GL_COLOR_ATTACHMENT8_EXT 0x8CE8
+#define GL_COLOR_ATTACHMENT9_EXT 0x8CE9
+#define GL_COLOR_ATTACHMENT10_EXT 0x8CEA
+#define GL_COLOR_ATTACHMENT11_EXT 0x8CEB
+#define GL_COLOR_ATTACHMENT12_EXT 0x8CEC
+#define GL_COLOR_ATTACHMENT13_EXT 0x8CED
+#define GL_COLOR_ATTACHMENT14_EXT 0x8CEE
+#define GL_COLOR_ATTACHMENT15_EXT 0x8CEF
+#define GL_DEPTH_ATTACHMENT_EXT 0x8D00
+#define GL_STENCIL_ATTACHMENT_EXT 0x8D20
+#define GL_FRAMEBUFFER_EXT 0x8D40
+#define GL_RENDERBUFFER_EXT 0x8D41
+#define GL_RENDERBUFFER_WIDTH_EXT 0x8D42
+#define GL_RENDERBUFFER_HEIGHT_EXT 0x8D43
+#define GL_RENDERBUFFER_INTERNAL_FORMAT_EXT 0x8D44
+#define GL_STENCIL_INDEX1_EXT 0x8D46
+#define GL_STENCIL_INDEX4_EXT 0x8D47
+#define GL_STENCIL_INDEX8_EXT 0x8D48
+#define GL_STENCIL_INDEX16_EXT 0x8D49
+#define GL_RENDERBUFFER_RED_SIZE_EXT 0x8D50
+#define GL_RENDERBUFFER_GREEN_SIZE_EXT 0x8D51
+#define GL_RENDERBUFFER_BLUE_SIZE_EXT 0x8D52
+#define GL_RENDERBUFFER_ALPHA_SIZE_EXT 0x8D53
+#define GL_RENDERBUFFER_DEPTH_SIZE_EXT 0x8D54
+#define GL_RENDERBUFFER_STENCIL_SIZE_EXT 0x8D55
+
+typedef void (GLAPIENTRY * PFNGLBINDFRAMEBUFFEREXTPROC) (GLenum target, GLuint framebuffer);
+typedef void (GLAPIENTRY * PFNGLBINDRENDERBUFFEREXTPROC) (GLenum target, GLuint renderbuffer);
+typedef GLenum (GLAPIENTRY * PFNGLCHECKFRAMEBUFFERSTATUSEXTPROC) (GLenum target);
+typedef void (GLAPIENTRY * PFNGLDELETEFRAMEBUFFERSEXTPROC) (GLsizei n, const GLuint* framebuffers);
+typedef void (GLAPIENTRY * PFNGLDELETERENDERBUFFERSEXTPROC) (GLsizei n, const GLuint* renderbuffers);
+typedef void (GLAPIENTRY * PFNGLFRAMEBUFFERRENDERBUFFEREXTPROC) (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
+typedef void (GLAPIENTRY * PFNGLFRAMEBUFFERTEXTURE1DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
+typedef void (GLAPIENTRY * PFNGLFRAMEBUFFERTEXTURE2DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
+typedef void (GLAPIENTRY * PFNGLFRAMEBUFFERTEXTURE3DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
+typedef void (GLAPIENTRY * PFNGLGENFRAMEBUFFERSEXTPROC) (GLsizei n, GLuint* framebuffers);
+typedef void (GLAPIENTRY * PFNGLGENRENDERBUFFERSEXTPROC) (GLsizei n, GLuint* renderbuffers);
+typedef void (GLAPIENTRY * PFNGLGENERATEMIPMAPEXTPROC) (GLenum target);
+typedef void (GLAPIENTRY * PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVEXTPROC) (GLenum target, GLenum attachment, GLenum pname, GLint* params);
+typedef void (GLAPIENTRY * PFNGLGETRENDERBUFFERPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint* params);
+typedef GLboolean (GLAPIENTRY * PFNGLISFRAMEBUFFEREXTPROC) (GLuint framebuffer);
+typedef GLboolean (GLAPIENTRY * PFNGLISRENDERBUFFEREXTPROC) (GLuint renderbuffer);
+typedef void (GLAPIENTRY * PFNGLRENDERBUFFERSTORAGEEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
+
+#define glBindFramebufferEXT GLEW_GET_FUN(__glewBindFramebufferEXT)
+#define glBindRenderbufferEXT GLEW_GET_FUN(__glewBindRenderbufferEXT)
+#define glCheckFramebufferStatusEXT GLEW_GET_FUN(__glewCheckFramebufferStatusEXT)
+#define glDeleteFramebuffersEXT GLEW_GET_FUN(__glewDeleteFramebuffersEXT)
+#define glDeleteRenderbuffersEXT GLEW_GET_FUN(__glewDeleteRenderbuffersEXT)
+#define glFramebufferRenderbufferEXT GLEW_GET_FUN(__glewFramebufferRenderbufferEXT)
+#define glFramebufferTexture1DEXT GLEW_GET_FUN(__glewFramebufferTexture1DEXT)
+#define glFramebufferTexture2DEXT GLEW_GET_FUN(__glewFramebufferTexture2DEXT)
+#define glFramebufferTexture3DEXT GLEW_GET_FUN(__glewFramebufferTexture3DEXT)
+#define glGenFramebuffersEXT GLEW_GET_FUN(__glewGenFramebuffersEXT)
+#define glGenRenderbuffersEXT GLEW_GET_FUN(__glewGenRenderbuffersEXT)
+#define glGenerateMipmapEXT GLEW_GET_FUN(__glewGenerateMipmapEXT)
+#define glGetFramebufferAttachmentParameterivEXT GLEW_GET_FUN(__glewGetFramebufferAttachmentParameterivEXT)
+#define glGetRenderbufferParameterivEXT GLEW_GET_FUN(__glewGetRenderbufferParameterivEXT)
+#define glIsFramebufferEXT GLEW_GET_FUN(__glewIsFramebufferEXT)
+#define glIsRenderbufferEXT GLEW_GET_FUN(__glewIsRenderbufferEXT)
+#define glRenderbufferStorageEXT GLEW_GET_FUN(__glewRenderbufferStorageEXT)
+
+#define GLEW_EXT_framebuffer_object GLEW_GET_VAR(__GLEW_EXT_framebuffer_object)
+
+#endif /* GL_EXT_framebuffer_object */
+
+/* ------------------------ GL_EXT_framebuffer_sRGB ------------------------ */
+
+#ifndef GL_EXT_framebuffer_sRGB
+#define GL_EXT_framebuffer_sRGB 1
+
+#define GL_FRAMEBUFFER_SRGB_EXT 0x8DB9
+#define GL_FRAMEBUFFER_SRGB_CAPABLE_EXT 0x8DBA
+
+#define GLEW_EXT_framebuffer_sRGB GLEW_GET_VAR(__GLEW_EXT_framebuffer_sRGB)
+
+#endif /* GL_EXT_framebuffer_sRGB */
+
+/* ------------------------ GL_EXT_geometry_shader4 ------------------------ */
+
+#ifndef GL_EXT_geometry_shader4
+#define GL_EXT_geometry_shader4 1
+
+#define GL_LINES_ADJACENCY_EXT 0xA
+#define GL_LINE_STRIP_ADJACENCY_EXT 0xB
+#define GL_TRIANGLES_ADJACENCY_EXT 0xC
+#define GL_TRIANGLE_STRIP_ADJACENCY_EXT 0xD
+#define GL_PROGRAM_POINT_SIZE_EXT 0x8642
+#define GL_MAX_VARYING_COMPONENTS_EXT 0x8B4B
+#define GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_EXT 0x8C29
+#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT 0x8CD4
+#define GL_FRAMEBUFFER_ATTACHMENT_LAYERED_EXT 0x8DA7
+#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_EXT 0x8DA8
+#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_EXT 0x8DA9
+#define GL_GEOMETRY_SHADER_EXT 0x8DD9
+#define GL_GEOMETRY_VERTICES_OUT_EXT 0x8DDA
+#define GL_GEOMETRY_INPUT_TYPE_EXT 0x8DDB
+#define GL_GEOMETRY_OUTPUT_TYPE_EXT 0x8DDC
+#define GL_MAX_GEOMETRY_VARYING_COMPONENTS_EXT 0x8DDD
+#define GL_MAX_VERTEX_VARYING_COMPONENTS_EXT 0x8DDE
+#define GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_EXT 0x8DDF
+#define GL_MAX_GEOMETRY_OUTPUT_VERTICES_EXT 0x8DE0
+#define GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_EXT 0x8DE1
+
+typedef void (GLAPIENTRY * PFNGLFRAMEBUFFERTEXTUREEXTPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level);
+typedef void (GLAPIENTRY * PFNGLFRAMEBUFFERTEXTUREFACEEXTPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face);
+typedef void (GLAPIENTRY * PFNGLPROGRAMPARAMETERIEXTPROC) (GLuint program, GLenum pname, GLint value);
+
+#define glFramebufferTextureEXT GLEW_GET_FUN(__glewFramebufferTextureEXT)
+#define glFramebufferTextureFaceEXT GLEW_GET_FUN(__glewFramebufferTextureFaceEXT)
+#define glProgramParameteriEXT GLEW_GET_FUN(__glewProgramParameteriEXT)
+
+#define GLEW_EXT_geometry_shader4 GLEW_GET_VAR(__GLEW_EXT_geometry_shader4)
+
+#endif /* GL_EXT_geometry_shader4 */
+
+/* --------------------- GL_EXT_gpu_program_parameters --------------------- */
+
+#ifndef GL_EXT_gpu_program_parameters
+#define GL_EXT_gpu_program_parameters 1
+
+typedef void (GLAPIENTRY * PFNGLPROGRAMENVPARAMETERS4FVEXTPROC) (GLenum target, GLuint index, GLsizei count, const GLfloat* params);
+typedef void (GLAPIENTRY * PFNGLPROGRAMLOCALPARAMETERS4FVEXTPROC) (GLenum target, GLuint index, GLsizei count, const GLfloat* params);
+
+#define glProgramEnvParameters4fvEXT GLEW_GET_FUN(__glewProgramEnvParameters4fvEXT)
+#define glProgramLocalParameters4fvEXT GLEW_GET_FUN(__glewProgramLocalParameters4fvEXT)
+
+#define GLEW_EXT_gpu_program_parameters GLEW_GET_VAR(__GLEW_EXT_gpu_program_parameters)
+
+#endif /* GL_EXT_gpu_program_parameters */
+
+/* --------------------------- GL_EXT_gpu_shader4 -------------------------- */
+
+#ifndef GL_EXT_gpu_shader4
+#define GL_EXT_gpu_shader4 1
+
+#define GL_VERTEX_ATTRIB_ARRAY_INTEGER_EXT 0x88FD
+#define GL_SAMPLER_1D_ARRAY_EXT 0x8DC0
+#define GL_SAMPLER_2D_ARRAY_EXT 0x8DC1
+#define GL_SAMPLER_BUFFER_EXT 0x8DC2
+#define GL_SAMPLER_1D_ARRAY_SHADOW_EXT 0x8DC3
+#define GL_SAMPLER_2D_ARRAY_SHADOW_EXT 0x8DC4
+#define GL_SAMPLER_CUBE_SHADOW_EXT 0x8DC5
+#define GL_UNSIGNED_INT_VEC2_EXT 0x8DC6
+#define GL_UNSIGNED_INT_VEC3_EXT 0x8DC7
+#define GL_UNSIGNED_INT_VEC4_EXT 0x8DC8
+#define GL_INT_SAMPLER_1D_EXT 0x8DC9
+#define GL_INT_SAMPLER_2D_EXT 0x8DCA
+#define GL_INT_SAMPLER_3D_EXT 0x8DCB
+#define GL_INT_SAMPLER_CUBE_EXT 0x8DCC
+#define GL_INT_SAMPLER_2D_RECT_EXT 0x8DCD
+#define GL_INT_SAMPLER_1D_ARRAY_EXT 0x8DCE
+#define GL_INT_SAMPLER_2D_ARRAY_EXT 0x8DCF
+#define GL_INT_SAMPLER_BUFFER_EXT 0x8DD0
+#define GL_UNSIGNED_INT_SAMPLER_1D_EXT 0x8DD1
+#define GL_UNSIGNED_INT_SAMPLER_2D_EXT 0x8DD2
+#define GL_UNSIGNED_INT_SAMPLER_3D_EXT 0x8DD3
+#define GL_UNSIGNED_INT_SAMPLER_CUBE_EXT 0x8DD4
+#define GL_UNSIGNED_INT_SAMPLER_2D_RECT_EXT 0x8DD5
+#define GL_UNSIGNED_INT_SAMPLER_1D_ARRAY_EXT 0x8DD6
+#define GL_UNSIGNED_INT_SAMPLER_2D_ARRAY_EXT 0x8DD7
+#define GL_UNSIGNED_INT_SAMPLER_BUFFER_EXT 0x8DD8
+
+typedef void (GLAPIENTRY * PFNGLBINDFRAGDATALOCATIONEXTPROC) (GLuint program, GLuint color, const GLchar *name);
+typedef GLint (GLAPIENTRY * PFNGLGETFRAGDATALOCATIONEXTPROC) (GLuint program, const GLchar *name);
+typedef void (GLAPIENTRY * PFNGLGETUNIFORMUIVEXTPROC) (GLuint program, GLint location, GLuint *params);
+typedef void (GLAPIENTRY * PFNGLGETVERTEXATTRIBIIVEXTPROC) (GLuint index, GLenum pname, GLint *params);
+typedef void (GLAPIENTRY * PFNGLGETVERTEXATTRIBIUIVEXTPROC) (GLuint index, GLenum pname, GLuint *params);
+typedef void (GLAPIENTRY * PFNGLUNIFORM1UIEXTPROC) (GLint location, GLuint v0);
+typedef void (GLAPIENTRY * PFNGLUNIFORM1UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value);
+typedef void (GLAPIENTRY * PFNGLUNIFORM2UIEXTPROC) (GLint location, GLuint v0, GLuint v1);
+typedef void (GLAPIENTRY * PFNGLUNIFORM2UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value);
+typedef void (GLAPIENTRY * PFNGLUNIFORM3UIEXTPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2);
+typedef void (GLAPIENTRY * PFNGLUNIFORM3UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value);
+typedef void (GLAPIENTRY * PFNGLUNIFORM4UIEXTPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
+typedef void (GLAPIENTRY * PFNGLUNIFORM4UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBI1IEXTPROC) (GLuint index, GLint x);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBI1IVEXTPROC) (GLuint index, const GLint *v);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBI1UIEXTPROC) (GLuint index, GLuint x);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBI1UIVEXTPROC) (GLuint index, const GLuint *v);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBI2IEXTPROC) (GLuint index, GLint x, GLint y);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBI2IVEXTPROC) (GLuint index, const GLint *v);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBI2UIEXTPROC) (GLuint index, GLuint x, GLuint y);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBI2UIVEXTPROC) (GLuint index, const GLuint *v);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBI3IEXTPROC) (GLuint index, GLint x, GLint y, GLint z);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBI3IVEXTPROC) (GLuint index, const GLint *v);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBI3UIEXTPROC) (GLuint index, GLuint x, GLuint y, GLuint z);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBI3UIVEXTPROC) (GLuint index, const GLuint *v);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBI4BVEXTPROC) (GLuint index, const GLbyte *v);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBI4IEXTPROC) (GLuint index, GLint x, GLint y, GLint z, GLint w);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBI4IVEXTPROC) (GLuint index, const GLint *v);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBI4SVEXTPROC) (GLuint index, const GLshort *v);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBI4UBVEXTPROC) (GLuint index, const GLubyte *v);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBI4UIEXTPROC) (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBI4UIVEXTPROC) (GLuint index, const GLuint *v);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBI4USVEXTPROC) (GLuint index, const GLushort *v);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBIPOINTEREXTPROC) (GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer);
+
+#define glBindFragDataLocationEXT GLEW_GET_FUN(__glewBindFragDataLocationEXT)
+#define glGetFragDataLocationEXT GLEW_GET_FUN(__glewGetFragDataLocationEXT)
+#define glGetUniformuivEXT GLEW_GET_FUN(__glewGetUniformuivEXT)
+#define glGetVertexAttribIivEXT GLEW_GET_FUN(__glewGetVertexAttribIivEXT)
+#define glGetVertexAttribIuivEXT GLEW_GET_FUN(__glewGetVertexAttribIuivEXT)
+#define glUniform1uiEXT GLEW_GET_FUN(__glewUniform1uiEXT)
+#define glUniform1uivEXT GLEW_GET_FUN(__glewUniform1uivEXT)
+#define glUniform2uiEXT GLEW_GET_FUN(__glewUniform2uiEXT)
+#define glUniform2uivEXT GLEW_GET_FUN(__glewUniform2uivEXT)
+#define glUniform3uiEXT GLEW_GET_FUN(__glewUniform3uiEXT)
+#define glUniform3uivEXT GLEW_GET_FUN(__glewUniform3uivEXT)
+#define glUniform4uiEXT GLEW_GET_FUN(__glewUniform4uiEXT)
+#define glUniform4uivEXT GLEW_GET_FUN(__glewUniform4uivEXT)
+#define glVertexAttribI1iEXT GLEW_GET_FUN(__glewVertexAttribI1iEXT)
+#define glVertexAttribI1ivEXT GLEW_GET_FUN(__glewVertexAttribI1ivEXT)
+#define glVertexAttribI1uiEXT GLEW_GET_FUN(__glewVertexAttribI1uiEXT)
+#define glVertexAttribI1uivEXT GLEW_GET_FUN(__glewVertexAttribI1uivEXT)
+#define glVertexAttribI2iEXT GLEW_GET_FUN(__glewVertexAttribI2iEXT)
+#define glVertexAttribI2ivEXT GLEW_GET_FUN(__glewVertexAttribI2ivEXT)
+#define glVertexAttribI2uiEXT GLEW_GET_FUN(__glewVertexAttribI2uiEXT)
+#define glVertexAttribI2uivEXT GLEW_GET_FUN(__glewVertexAttribI2uivEXT)
+#define glVertexAttribI3iEXT GLEW_GET_FUN(__glewVertexAttribI3iEXT)
+#define glVertexAttribI3ivEXT GLEW_GET_FUN(__glewVertexAttribI3ivEXT)
+#define glVertexAttribI3uiEXT GLEW_GET_FUN(__glewVertexAttribI3uiEXT)
+#define glVertexAttribI3uivEXT GLEW_GET_FUN(__glewVertexAttribI3uivEXT)
+#define glVertexAttribI4bvEXT GLEW_GET_FUN(__glewVertexAttribI4bvEXT)
+#define glVertexAttribI4iEXT GLEW_GET_FUN(__glewVertexAttribI4iEXT)
+#define glVertexAttribI4ivEXT GLEW_GET_FUN(__glewVertexAttribI4ivEXT)
+#define glVertexAttribI4svEXT GLEW_GET_FUN(__glewVertexAttribI4svEXT)
+#define glVertexAttribI4ubvEXT GLEW_GET_FUN(__glewVertexAttribI4ubvEXT)
+#define glVertexAttribI4uiEXT GLEW_GET_FUN(__glewVertexAttribI4uiEXT)
+#define glVertexAttribI4uivEXT GLEW_GET_FUN(__glewVertexAttribI4uivEXT)
+#define glVertexAttribI4usvEXT GLEW_GET_FUN(__glewVertexAttribI4usvEXT)
+#define glVertexAttribIPointerEXT GLEW_GET_FUN(__glewVertexAttribIPointerEXT)
+
+#define GLEW_EXT_gpu_shader4 GLEW_GET_VAR(__GLEW_EXT_gpu_shader4)
+
+#endif /* GL_EXT_gpu_shader4 */
+
+/* ---------------------------- GL_EXT_histogram --------------------------- */
+
+#ifndef GL_EXT_histogram
+#define GL_EXT_histogram 1
+
+#define GL_HISTOGRAM_EXT 0x8024
+#define GL_PROXY_HISTOGRAM_EXT 0x8025
+#define GL_HISTOGRAM_WIDTH_EXT 0x8026
+#define GL_HISTOGRAM_FORMAT_EXT 0x8027
+#define GL_HISTOGRAM_RED_SIZE_EXT 0x8028
+#define GL_HISTOGRAM_GREEN_SIZE_EXT 0x8029
+#define GL_HISTOGRAM_BLUE_SIZE_EXT 0x802A
+#define GL_HISTOGRAM_ALPHA_SIZE_EXT 0x802B
+#define GL_HISTOGRAM_LUMINANCE_SIZE_EXT 0x802C
+#define GL_HISTOGRAM_SINK_EXT 0x802D
+#define GL_MINMAX_EXT 0x802E
+#define GL_MINMAX_FORMAT_EXT 0x802F
+#define GL_MINMAX_SINK_EXT 0x8030
+
+typedef void (GLAPIENTRY * PFNGLGETHISTOGRAMEXTPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, void *values);
+typedef void (GLAPIENTRY * PFNGLGETHISTOGRAMPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat* params);
+typedef void (GLAPIENTRY * PFNGLGETHISTOGRAMPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint* params);
+typedef void (GLAPIENTRY * PFNGLGETMINMAXEXTPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, void *values);
+typedef void (GLAPIENTRY * PFNGLGETMINMAXPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat* params);
+typedef void (GLAPIENTRY * PFNGLGETMINMAXPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint* params);
+typedef void (GLAPIENTRY * PFNGLHISTOGRAMEXTPROC) (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink);
+typedef void (GLAPIENTRY * PFNGLMINMAXEXTPROC) (GLenum target, GLenum internalformat, GLboolean sink);
+typedef void (GLAPIENTRY * PFNGLRESETHISTOGRAMEXTPROC) (GLenum target);
+typedef void (GLAPIENTRY * PFNGLRESETMINMAXEXTPROC) (GLenum target);
+
+#define glGetHistogramEXT GLEW_GET_FUN(__glewGetHistogramEXT)
+#define glGetHistogramParameterfvEXT GLEW_GET_FUN(__glewGetHistogramParameterfvEXT)
+#define glGetHistogramParameterivEXT GLEW_GET_FUN(__glewGetHistogramParameterivEXT)
+#define glGetMinmaxEXT GLEW_GET_FUN(__glewGetMinmaxEXT)
+#define glGetMinmaxParameterfvEXT GLEW_GET_FUN(__glewGetMinmaxParameterfvEXT)
+#define glGetMinmaxParameterivEXT GLEW_GET_FUN(__glewGetMinmaxParameterivEXT)
+#define glHistogramEXT GLEW_GET_FUN(__glewHistogramEXT)
+#define glMinmaxEXT GLEW_GET_FUN(__glewMinmaxEXT)
+#define glResetHistogramEXT GLEW_GET_FUN(__glewResetHistogramEXT)
+#define glResetMinmaxEXT GLEW_GET_FUN(__glewResetMinmaxEXT)
+
+#define GLEW_EXT_histogram GLEW_GET_VAR(__GLEW_EXT_histogram)
+
+#endif /* GL_EXT_histogram */
+
+/* ----------------------- GL_EXT_index_array_formats ---------------------- */
+
+#ifndef GL_EXT_index_array_formats
+#define GL_EXT_index_array_formats 1
+
+#define GLEW_EXT_index_array_formats GLEW_GET_VAR(__GLEW_EXT_index_array_formats)
+
+#endif /* GL_EXT_index_array_formats */
+
+/* --------------------------- GL_EXT_index_func --------------------------- */
+
+#ifndef GL_EXT_index_func
+#define GL_EXT_index_func 1
+
+typedef void (GLAPIENTRY * PFNGLINDEXFUNCEXTPROC) (GLenum func, GLfloat ref);
+
+#define glIndexFuncEXT GLEW_GET_FUN(__glewIndexFuncEXT)
+
+#define GLEW_EXT_index_func GLEW_GET_VAR(__GLEW_EXT_index_func)
+
+#endif /* GL_EXT_index_func */
+
+/* ------------------------- GL_EXT_index_material ------------------------- */
+
+#ifndef GL_EXT_index_material
+#define GL_EXT_index_material 1
+
+typedef void (GLAPIENTRY * PFNGLINDEXMATERIALEXTPROC) (GLenum face, GLenum mode);
+
+#define glIndexMaterialEXT GLEW_GET_FUN(__glewIndexMaterialEXT)
+
+#define GLEW_EXT_index_material GLEW_GET_VAR(__GLEW_EXT_index_material)
+
+#endif /* GL_EXT_index_material */
+
+/* -------------------------- GL_EXT_index_texture ------------------------- */
+
+#ifndef GL_EXT_index_texture
+#define GL_EXT_index_texture 1
+
+#define GLEW_EXT_index_texture GLEW_GET_VAR(__GLEW_EXT_index_texture)
+
+#endif /* GL_EXT_index_texture */
+
+/* -------------------------- GL_EXT_light_texture ------------------------- */
+
+#ifndef GL_EXT_light_texture
+#define GL_EXT_light_texture 1
+
+#define GL_FRAGMENT_MATERIAL_EXT 0x8349
+#define GL_FRAGMENT_NORMAL_EXT 0x834A
+#define GL_FRAGMENT_COLOR_EXT 0x834C
+#define GL_ATTENUATION_EXT 0x834D
+#define GL_SHADOW_ATTENUATION_EXT 0x834E
+#define GL_TEXTURE_APPLICATION_MODE_EXT 0x834F
+#define GL_TEXTURE_LIGHT_EXT 0x8350
+#define GL_TEXTURE_MATERIAL_FACE_EXT 0x8351
+#define GL_TEXTURE_MATERIAL_PARAMETER_EXT 0x8352
+
+typedef void (GLAPIENTRY * PFNGLAPPLYTEXTUREEXTPROC) (GLenum mode);
+typedef void (GLAPIENTRY * PFNGLTEXTURELIGHTEXTPROC) (GLenum pname);
+typedef void (GLAPIENTRY * PFNGLTEXTUREMATERIALEXTPROC) (GLenum face, GLenum mode);
+
+#define glApplyTextureEXT GLEW_GET_FUN(__glewApplyTextureEXT)
+#define glTextureLightEXT GLEW_GET_FUN(__glewTextureLightEXT)
+#define glTextureMaterialEXT GLEW_GET_FUN(__glewTextureMaterialEXT)
+
+#define GLEW_EXT_light_texture GLEW_GET_VAR(__GLEW_EXT_light_texture)
+
+#endif /* GL_EXT_light_texture */
+
+/* ------------------------- GL_EXT_misc_attribute ------------------------- */
+
+#ifndef GL_EXT_misc_attribute
+#define GL_EXT_misc_attribute 1
+
+#define GLEW_EXT_misc_attribute GLEW_GET_VAR(__GLEW_EXT_misc_attribute)
+
+#endif /* GL_EXT_misc_attribute */
+
+/* ------------------------ GL_EXT_multi_draw_arrays ----------------------- */
+
+#ifndef GL_EXT_multi_draw_arrays
+#define GL_EXT_multi_draw_arrays 1
+
+typedef void (GLAPIENTRY * PFNGLMULTIDRAWARRAYSEXTPROC) (GLenum mode, const GLint* first, const GLsizei *count, GLsizei primcount);
+typedef void (GLAPIENTRY * PFNGLMULTIDRAWELEMENTSEXTPROC) (GLenum mode, GLsizei* count, GLenum type, const void *const *indices, GLsizei primcount);
+
+#define glMultiDrawArraysEXT GLEW_GET_FUN(__glewMultiDrawArraysEXT)
+#define glMultiDrawElementsEXT GLEW_GET_FUN(__glewMultiDrawElementsEXT)
+
+#define GLEW_EXT_multi_draw_arrays GLEW_GET_VAR(__GLEW_EXT_multi_draw_arrays)
+
+#endif /* GL_EXT_multi_draw_arrays */
+
+/* --------------------------- GL_EXT_multisample -------------------------- */
+
+#ifndef GL_EXT_multisample
+#define GL_EXT_multisample 1
+
+#define GL_MULTISAMPLE_EXT 0x809D
+#define GL_SAMPLE_ALPHA_TO_MASK_EXT 0x809E
+#define GL_SAMPLE_ALPHA_TO_ONE_EXT 0x809F
+#define GL_SAMPLE_MASK_EXT 0x80A0
+#define GL_1PASS_EXT 0x80A1
+#define GL_2PASS_0_EXT 0x80A2
+#define GL_2PASS_1_EXT 0x80A3
+#define GL_4PASS_0_EXT 0x80A4
+#define GL_4PASS_1_EXT 0x80A5
+#define GL_4PASS_2_EXT 0x80A6
+#define GL_4PASS_3_EXT 0x80A7
+#define GL_SAMPLE_BUFFERS_EXT 0x80A8
+#define GL_SAMPLES_EXT 0x80A9
+#define GL_SAMPLE_MASK_VALUE_EXT 0x80AA
+#define GL_SAMPLE_MASK_INVERT_EXT 0x80AB
+#define GL_SAMPLE_PATTERN_EXT 0x80AC
+#define GL_MULTISAMPLE_BIT_EXT 0x20000000
+
+typedef void (GLAPIENTRY * PFNGLSAMPLEMASKEXTPROC) (GLclampf value, GLboolean invert);
+typedef void (GLAPIENTRY * PFNGLSAMPLEPATTERNEXTPROC) (GLenum pattern);
+
+#define glSampleMaskEXT GLEW_GET_FUN(__glewSampleMaskEXT)
+#define glSamplePatternEXT GLEW_GET_FUN(__glewSamplePatternEXT)
+
+#define GLEW_EXT_multisample GLEW_GET_VAR(__GLEW_EXT_multisample)
+
+#endif /* GL_EXT_multisample */
+
+/* ---------------------- GL_EXT_packed_depth_stencil ---------------------- */
+
+#ifndef GL_EXT_packed_depth_stencil
+#define GL_EXT_packed_depth_stencil 1
+
+#define GL_DEPTH_STENCIL_EXT 0x84F9
+#define GL_UNSIGNED_INT_24_8_EXT 0x84FA
+#define GL_DEPTH24_STENCIL8_EXT 0x88F0
+#define GL_TEXTURE_STENCIL_SIZE_EXT 0x88F1
+
+#define GLEW_EXT_packed_depth_stencil GLEW_GET_VAR(__GLEW_EXT_packed_depth_stencil)
+
+#endif /* GL_EXT_packed_depth_stencil */
+
+/* -------------------------- GL_EXT_packed_float -------------------------- */
+
+#ifndef GL_EXT_packed_float
+#define GL_EXT_packed_float 1
+
+#define GL_R11F_G11F_B10F_EXT 0x8C3A
+#define GL_UNSIGNED_INT_10F_11F_11F_REV_EXT 0x8C3B
+#define GL_RGBA_SIGNED_COMPONENTS_EXT 0x8C3C
+
+#define GLEW_EXT_packed_float GLEW_GET_VAR(__GLEW_EXT_packed_float)
+
+#endif /* GL_EXT_packed_float */
+
+/* -------------------------- GL_EXT_packed_pixels ------------------------- */
+
+#ifndef GL_EXT_packed_pixels
+#define GL_EXT_packed_pixels 1
+
+#define GL_UNSIGNED_BYTE_3_3_2_EXT 0x8032
+#define GL_UNSIGNED_SHORT_4_4_4_4_EXT 0x8033
+#define GL_UNSIGNED_SHORT_5_5_5_1_EXT 0x8034
+#define GL_UNSIGNED_INT_8_8_8_8_EXT 0x8035
+#define GL_UNSIGNED_INT_10_10_10_2_EXT 0x8036
+
+#define GLEW_EXT_packed_pixels GLEW_GET_VAR(__GLEW_EXT_packed_pixels)
+
+#endif /* GL_EXT_packed_pixels */
+
+/* ------------------------ GL_EXT_paletted_texture ------------------------ */
+
+#ifndef GL_EXT_paletted_texture
+#define GL_EXT_paletted_texture 1
+
+#define GL_TEXTURE_1D 0x0DE0
+#define GL_TEXTURE_2D 0x0DE1
+#define GL_PROXY_TEXTURE_1D 0x8063
+#define GL_PROXY_TEXTURE_2D 0x8064
+#define GL_COLOR_TABLE_FORMAT_EXT 0x80D8
+#define GL_COLOR_TABLE_WIDTH_EXT 0x80D9
+#define GL_COLOR_TABLE_RED_SIZE_EXT 0x80DA
+#define GL_COLOR_TABLE_GREEN_SIZE_EXT 0x80DB
+#define GL_COLOR_TABLE_BLUE_SIZE_EXT 0x80DC
+#define GL_COLOR_TABLE_ALPHA_SIZE_EXT 0x80DD
+#define GL_COLOR_TABLE_LUMINANCE_SIZE_EXT 0x80DE
+#define GL_COLOR_TABLE_INTENSITY_SIZE_EXT 0x80DF
+#define GL_COLOR_INDEX1_EXT 0x80E2
+#define GL_COLOR_INDEX2_EXT 0x80E3
+#define GL_COLOR_INDEX4_EXT 0x80E4
+#define GL_COLOR_INDEX8_EXT 0x80E5
+#define GL_COLOR_INDEX12_EXT 0x80E6
+#define GL_COLOR_INDEX16_EXT 0x80E7
+#define GL_TEXTURE_INDEX_SIZE_EXT 0x80ED
+#define GL_TEXTURE_CUBE_MAP_ARB 0x8513
+#define GL_PROXY_TEXTURE_CUBE_MAP_ARB 0x851B
+
+typedef void (GLAPIENTRY * PFNGLCOLORTABLEEXTPROC) (GLenum target, GLenum internalFormat, GLsizei width, GLenum format, GLenum type, const void *data);
+typedef void (GLAPIENTRY * PFNGLGETCOLORTABLEEXTPROC) (GLenum target, GLenum format, GLenum type, void *data);
+typedef void (GLAPIENTRY * PFNGLGETCOLORTABLEPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat* params);
+typedef void (GLAPIENTRY * PFNGLGETCOLORTABLEPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint* params);
+
+#define glColorTableEXT GLEW_GET_FUN(__glewColorTableEXT)
+#define glGetColorTableEXT GLEW_GET_FUN(__glewGetColorTableEXT)
+#define glGetColorTableParameterfvEXT GLEW_GET_FUN(__glewGetColorTableParameterfvEXT)
+#define glGetColorTableParameterivEXT GLEW_GET_FUN(__glewGetColorTableParameterivEXT)
+
+#define GLEW_EXT_paletted_texture GLEW_GET_VAR(__GLEW_EXT_paletted_texture)
+
+#endif /* GL_EXT_paletted_texture */
+
+/* ----------------------- GL_EXT_pixel_buffer_object ---------------------- */
+
+#ifndef GL_EXT_pixel_buffer_object
+#define GL_EXT_pixel_buffer_object 1
+
+#define GL_PIXEL_PACK_BUFFER_EXT 0x88EB
+#define GL_PIXEL_UNPACK_BUFFER_EXT 0x88EC
+#define GL_PIXEL_PACK_BUFFER_BINDING_EXT 0x88ED
+#define GL_PIXEL_UNPACK_BUFFER_BINDING_EXT 0x88EF
+
+#define GLEW_EXT_pixel_buffer_object GLEW_GET_VAR(__GLEW_EXT_pixel_buffer_object)
+
+#endif /* GL_EXT_pixel_buffer_object */
+
+/* ------------------------- GL_EXT_pixel_transform ------------------------ */
+
+#ifndef GL_EXT_pixel_transform
+#define GL_EXT_pixel_transform 1
+
+#define GL_PIXEL_TRANSFORM_2D_EXT 0x8330
+#define GL_PIXEL_MAG_FILTER_EXT 0x8331
+#define GL_PIXEL_MIN_FILTER_EXT 0x8332
+#define GL_PIXEL_CUBIC_WEIGHT_EXT 0x8333
+#define GL_CUBIC_EXT 0x8334
+#define GL_AVERAGE_EXT 0x8335
+#define GL_PIXEL_TRANSFORM_2D_STACK_DEPTH_EXT 0x8336
+#define GL_MAX_PIXEL_TRANSFORM_2D_STACK_DEPTH_EXT 0x8337
+#define GL_PIXEL_TRANSFORM_2D_MATRIX_EXT 0x8338
+
+typedef void (GLAPIENTRY * PFNGLGETPIXELTRANSFORMPARAMETERFVEXTPROC) (GLenum target, GLenum pname, const GLfloat* params);
+typedef void (GLAPIENTRY * PFNGLGETPIXELTRANSFORMPARAMETERIVEXTPROC) (GLenum target, GLenum pname, const GLint* params);
+typedef void (GLAPIENTRY * PFNGLPIXELTRANSFORMPARAMETERFEXTPROC) (GLenum target, GLenum pname, const GLfloat param);
+typedef void (GLAPIENTRY * PFNGLPIXELTRANSFORMPARAMETERFVEXTPROC) (GLenum target, GLenum pname, const GLfloat* params);
+typedef void (GLAPIENTRY * PFNGLPIXELTRANSFORMPARAMETERIEXTPROC) (GLenum target, GLenum pname, const GLint param);
+typedef void (GLAPIENTRY * PFNGLPIXELTRANSFORMPARAMETERIVEXTPROC) (GLenum target, GLenum pname, const GLint* params);
+
+#define glGetPixelTransformParameterfvEXT GLEW_GET_FUN(__glewGetPixelTransformParameterfvEXT)
+#define glGetPixelTransformParameterivEXT GLEW_GET_FUN(__glewGetPixelTransformParameterivEXT)
+#define glPixelTransformParameterfEXT GLEW_GET_FUN(__glewPixelTransformParameterfEXT)
+#define glPixelTransformParameterfvEXT GLEW_GET_FUN(__glewPixelTransformParameterfvEXT)
+#define glPixelTransformParameteriEXT GLEW_GET_FUN(__glewPixelTransformParameteriEXT)
+#define glPixelTransformParameterivEXT GLEW_GET_FUN(__glewPixelTransformParameterivEXT)
+
+#define GLEW_EXT_pixel_transform GLEW_GET_VAR(__GLEW_EXT_pixel_transform)
+
+#endif /* GL_EXT_pixel_transform */
+
+/* ------------------- GL_EXT_pixel_transform_color_table ------------------ */
+
+#ifndef GL_EXT_pixel_transform_color_table
+#define GL_EXT_pixel_transform_color_table 1
+
+#define GLEW_EXT_pixel_transform_color_table GLEW_GET_VAR(__GLEW_EXT_pixel_transform_color_table)
+
+#endif /* GL_EXT_pixel_transform_color_table */
+
+/* ------------------------ GL_EXT_point_parameters ------------------------ */
+
+#ifndef GL_EXT_point_parameters
+#define GL_EXT_point_parameters 1
+
+#define GL_POINT_SIZE_MIN_EXT 0x8126
+#define GL_POINT_SIZE_MAX_EXT 0x8127
+#define GL_POINT_FADE_THRESHOLD_SIZE_EXT 0x8128
+#define GL_DISTANCE_ATTENUATION_EXT 0x8129
+
+typedef void (GLAPIENTRY * PFNGLPOINTPARAMETERFEXTPROC) (GLenum pname, GLfloat param);
+typedef void (GLAPIENTRY * PFNGLPOINTPARAMETERFVEXTPROC) (GLenum pname, const GLfloat* params);
+
+#define glPointParameterfEXT GLEW_GET_FUN(__glewPointParameterfEXT)
+#define glPointParameterfvEXT GLEW_GET_FUN(__glewPointParameterfvEXT)
+
+#define GLEW_EXT_point_parameters GLEW_GET_VAR(__GLEW_EXT_point_parameters)
+
+#endif /* GL_EXT_point_parameters */
+
+/* ------------------------- GL_EXT_polygon_offset ------------------------- */
+
+#ifndef GL_EXT_polygon_offset
+#define GL_EXT_polygon_offset 1
+
+#define GL_POLYGON_OFFSET_EXT 0x8037
+#define GL_POLYGON_OFFSET_FACTOR_EXT 0x8038
+#define GL_POLYGON_OFFSET_BIAS_EXT 0x8039
+
+typedef void (GLAPIENTRY * PFNGLPOLYGONOFFSETEXTPROC) (GLfloat factor, GLfloat bias);
+
+#define glPolygonOffsetEXT GLEW_GET_FUN(__glewPolygonOffsetEXT)
+
+#define GLEW_EXT_polygon_offset GLEW_GET_VAR(__GLEW_EXT_polygon_offset)
+
+#endif /* GL_EXT_polygon_offset */
+
+/* ---------------------- GL_EXT_polygon_offset_clamp ---------------------- */
+
+#ifndef GL_EXT_polygon_offset_clamp
+#define GL_EXT_polygon_offset_clamp 1
+
+#define GL_POLYGON_OFFSET_CLAMP_EXT 0x8E1B
+
+typedef void (GLAPIENTRY * PFNGLPOLYGONOFFSETCLAMPEXTPROC) (GLfloat factor, GLfloat units, GLfloat clamp);
+
+#define glPolygonOffsetClampEXT GLEW_GET_FUN(__glewPolygonOffsetClampEXT)
+
+#define GLEW_EXT_polygon_offset_clamp GLEW_GET_VAR(__GLEW_EXT_polygon_offset_clamp)
+
+#endif /* GL_EXT_polygon_offset_clamp */
+
+/* ----------------------- GL_EXT_post_depth_coverage ---------------------- */
+
+#ifndef GL_EXT_post_depth_coverage
+#define GL_EXT_post_depth_coverage 1
+
+#define GLEW_EXT_post_depth_coverage GLEW_GET_VAR(__GLEW_EXT_post_depth_coverage)
+
+#endif /* GL_EXT_post_depth_coverage */
+
+/* ------------------------ GL_EXT_provoking_vertex ------------------------ */
+
+#ifndef GL_EXT_provoking_vertex
+#define GL_EXT_provoking_vertex 1
+
+#define GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION_EXT 0x8E4C
+#define GL_FIRST_VERTEX_CONVENTION_EXT 0x8E4D
+#define GL_LAST_VERTEX_CONVENTION_EXT 0x8E4E
+#define GL_PROVOKING_VERTEX_EXT 0x8E4F
+
+typedef void (GLAPIENTRY * PFNGLPROVOKINGVERTEXEXTPROC) (GLenum mode);
+
+#define glProvokingVertexEXT GLEW_GET_FUN(__glewProvokingVertexEXT)
+
+#define GLEW_EXT_provoking_vertex GLEW_GET_VAR(__GLEW_EXT_provoking_vertex)
+
+#endif /* GL_EXT_provoking_vertex */
+
+/* ----------------------- GL_EXT_raster_multisample ----------------------- */
+
+#ifndef GL_EXT_raster_multisample
+#define GL_EXT_raster_multisample 1
+
+#define GL_COLOR_SAMPLES_NV 0x8E20
+#define GL_RASTER_MULTISAMPLE_EXT 0x9327
+#define GL_RASTER_SAMPLES_EXT 0x9328
+#define GL_MAX_RASTER_SAMPLES_EXT 0x9329
+#define GL_RASTER_FIXED_SAMPLE_LOCATIONS_EXT 0x932A
+#define GL_MULTISAMPLE_RASTERIZATION_ALLOWED_EXT 0x932B
+#define GL_EFFECTIVE_RASTER_SAMPLES_EXT 0x932C
+#define GL_DEPTH_SAMPLES_NV 0x932D
+#define GL_STENCIL_SAMPLES_NV 0x932E
+#define GL_MIXED_DEPTH_SAMPLES_SUPPORTED_NV 0x932F
+#define GL_MIXED_STENCIL_SAMPLES_SUPPORTED_NV 0x9330
+#define GL_COVERAGE_MODULATION_TABLE_NV 0x9331
+#define GL_COVERAGE_MODULATION_NV 0x9332
+#define GL_COVERAGE_MODULATION_TABLE_SIZE_NV 0x9333
+
+typedef void (GLAPIENTRY * PFNGLCOVERAGEMODULATIONNVPROC) (GLenum components);
+typedef void (GLAPIENTRY * PFNGLCOVERAGEMODULATIONTABLENVPROC) (GLsizei n, const GLfloat* v);
+typedef void (GLAPIENTRY * PFNGLGETCOVERAGEMODULATIONTABLENVPROC) (GLsizei bufsize, GLfloat* v);
+typedef void (GLAPIENTRY * PFNGLRASTERSAMPLESEXTPROC) (GLuint samples, GLboolean fixedsamplelocations);
+
+#define glCoverageModulationNV GLEW_GET_FUN(__glewCoverageModulationNV)
+#define glCoverageModulationTableNV GLEW_GET_FUN(__glewCoverageModulationTableNV)
+#define glGetCoverageModulationTableNV GLEW_GET_FUN(__glewGetCoverageModulationTableNV)
+#define glRasterSamplesEXT GLEW_GET_FUN(__glewRasterSamplesEXT)
+
+#define GLEW_EXT_raster_multisample GLEW_GET_VAR(__GLEW_EXT_raster_multisample)
+
+#endif /* GL_EXT_raster_multisample */
+
+/* ------------------------- GL_EXT_rescale_normal ------------------------- */
+
+#ifndef GL_EXT_rescale_normal
+#define GL_EXT_rescale_normal 1
+
+#define GL_RESCALE_NORMAL_EXT 0x803A
+
+#define GLEW_EXT_rescale_normal GLEW_GET_VAR(__GLEW_EXT_rescale_normal)
+
+#endif /* GL_EXT_rescale_normal */
+
+/* -------------------------- GL_EXT_scene_marker -------------------------- */
+
+#ifndef GL_EXT_scene_marker
+#define GL_EXT_scene_marker 1
+
+typedef void (GLAPIENTRY * PFNGLBEGINSCENEEXTPROC) (void);
+typedef void (GLAPIENTRY * PFNGLENDSCENEEXTPROC) (void);
+
+#define glBeginSceneEXT GLEW_GET_FUN(__glewBeginSceneEXT)
+#define glEndSceneEXT GLEW_GET_FUN(__glewEndSceneEXT)
+
+#define GLEW_EXT_scene_marker GLEW_GET_VAR(__GLEW_EXT_scene_marker)
+
+#endif /* GL_EXT_scene_marker */
+
+/* ------------------------- GL_EXT_secondary_color ------------------------ */
+
+#ifndef GL_EXT_secondary_color
+#define GL_EXT_secondary_color 1
+
+#define GL_COLOR_SUM_EXT 0x8458
+#define GL_CURRENT_SECONDARY_COLOR_EXT 0x8459
+#define GL_SECONDARY_COLOR_ARRAY_SIZE_EXT 0x845A
+#define GL_SECONDARY_COLOR_ARRAY_TYPE_EXT 0x845B
+#define GL_SECONDARY_COLOR_ARRAY_STRIDE_EXT 0x845C
+#define GL_SECONDARY_COLOR_ARRAY_POINTER_EXT 0x845D
+#define GL_SECONDARY_COLOR_ARRAY_EXT 0x845E
+
+typedef void (GLAPIENTRY * PFNGLSECONDARYCOLOR3BEXTPROC) (GLbyte red, GLbyte green, GLbyte blue);
+typedef void (GLAPIENTRY * PFNGLSECONDARYCOLOR3BVEXTPROC) (const GLbyte *v);
+typedef void (GLAPIENTRY * PFNGLSECONDARYCOLOR3DEXTPROC) (GLdouble red, GLdouble green, GLdouble blue);
+typedef void (GLAPIENTRY * PFNGLSECONDARYCOLOR3DVEXTPROC) (const GLdouble *v);
+typedef void (GLAPIENTRY * PFNGLSECONDARYCOLOR3FEXTPROC) (GLfloat red, GLfloat green, GLfloat blue);
+typedef void (GLAPIENTRY * PFNGLSECONDARYCOLOR3FVEXTPROC) (const GLfloat *v);
+typedef void (GLAPIENTRY * PFNGLSECONDARYCOLOR3IEXTPROC) (GLint red, GLint green, GLint blue);
+typedef void (GLAPIENTRY * PFNGLSECONDARYCOLOR3IVEXTPROC) (const GLint *v);
+typedef void (GLAPIENTRY * PFNGLSECONDARYCOLOR3SEXTPROC) (GLshort red, GLshort green, GLshort blue);
+typedef void (GLAPIENTRY * PFNGLSECONDARYCOLOR3SVEXTPROC) (const GLshort *v);
+typedef void (GLAPIENTRY * PFNGLSECONDARYCOLOR3UBEXTPROC) (GLubyte red, GLubyte green, GLubyte blue);
+typedef void (GLAPIENTRY * PFNGLSECONDARYCOLOR3UBVEXTPROC) (const GLubyte *v);
+typedef void (GLAPIENTRY * PFNGLSECONDARYCOLOR3UIEXTPROC) (GLuint red, GLuint green, GLuint blue);
+typedef void (GLAPIENTRY * PFNGLSECONDARYCOLOR3UIVEXTPROC) (const GLuint *v);
+typedef void (GLAPIENTRY * PFNGLSECONDARYCOLOR3USEXTPROC) (GLushort red, GLushort green, GLushort blue);
+typedef void (GLAPIENTRY * PFNGLSECONDARYCOLOR3USVEXTPROC) (const GLushort *v);
+typedef void (GLAPIENTRY * PFNGLSECONDARYCOLORPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, const void *pointer);
+
+#define glSecondaryColor3bEXT GLEW_GET_FUN(__glewSecondaryColor3bEXT)
+#define glSecondaryColor3bvEXT GLEW_GET_FUN(__glewSecondaryColor3bvEXT)
+#define glSecondaryColor3dEXT GLEW_GET_FUN(__glewSecondaryColor3dEXT)
+#define glSecondaryColor3dvEXT GLEW_GET_FUN(__glewSecondaryColor3dvEXT)
+#define glSecondaryColor3fEXT GLEW_GET_FUN(__glewSecondaryColor3fEXT)
+#define glSecondaryColor3fvEXT GLEW_GET_FUN(__glewSecondaryColor3fvEXT)
+#define glSecondaryColor3iEXT GLEW_GET_FUN(__glewSecondaryColor3iEXT)
+#define glSecondaryColor3ivEXT GLEW_GET_FUN(__glewSecondaryColor3ivEXT)
+#define glSecondaryColor3sEXT GLEW_GET_FUN(__glewSecondaryColor3sEXT)
+#define glSecondaryColor3svEXT GLEW_GET_FUN(__glewSecondaryColor3svEXT)
+#define glSecondaryColor3ubEXT GLEW_GET_FUN(__glewSecondaryColor3ubEXT)
+#define glSecondaryColor3ubvEXT GLEW_GET_FUN(__glewSecondaryColor3ubvEXT)
+#define glSecondaryColor3uiEXT GLEW_GET_FUN(__glewSecondaryColor3uiEXT)
+#define glSecondaryColor3uivEXT GLEW_GET_FUN(__glewSecondaryColor3uivEXT)
+#define glSecondaryColor3usEXT GLEW_GET_FUN(__glewSecondaryColor3usEXT)
+#define glSecondaryColor3usvEXT GLEW_GET_FUN(__glewSecondaryColor3usvEXT)
+#define glSecondaryColorPointerEXT GLEW_GET_FUN(__glewSecondaryColorPointerEXT)
+
+#define GLEW_EXT_secondary_color GLEW_GET_VAR(__GLEW_EXT_secondary_color)
+
+#endif /* GL_EXT_secondary_color */
+
+/* --------------------- GL_EXT_separate_shader_objects -------------------- */
+
+#ifndef GL_EXT_separate_shader_objects
+#define GL_EXT_separate_shader_objects 1
+
+#define GL_ACTIVE_PROGRAM_EXT 0x8B8D
+
+typedef void (GLAPIENTRY * PFNGLACTIVEPROGRAMEXTPROC) (GLuint program);
+typedef GLuint (GLAPIENTRY * PFNGLCREATESHADERPROGRAMEXTPROC) (GLenum type, const GLchar* string);
+typedef void (GLAPIENTRY * PFNGLUSESHADERPROGRAMEXTPROC) (GLenum type, GLuint program);
+
+#define glActiveProgramEXT GLEW_GET_FUN(__glewActiveProgramEXT)
+#define glCreateShaderProgramEXT GLEW_GET_FUN(__glewCreateShaderProgramEXT)
+#define glUseShaderProgramEXT GLEW_GET_FUN(__glewUseShaderProgramEXT)
+
+#define GLEW_EXT_separate_shader_objects GLEW_GET_VAR(__GLEW_EXT_separate_shader_objects)
+
+#endif /* GL_EXT_separate_shader_objects */
+
+/* --------------------- GL_EXT_separate_specular_color -------------------- */
+
+#ifndef GL_EXT_separate_specular_color
+#define GL_EXT_separate_specular_color 1
+
+#define GL_LIGHT_MODEL_COLOR_CONTROL_EXT 0x81F8
+#define GL_SINGLE_COLOR_EXT 0x81F9
+#define GL_SEPARATE_SPECULAR_COLOR_EXT 0x81FA
+
+#define GLEW_EXT_separate_specular_color GLEW_GET_VAR(__GLEW_EXT_separate_specular_color)
+
+#endif /* GL_EXT_separate_specular_color */
+
+/* ------------------- GL_EXT_shader_image_load_formatted ------------------ */
+
+#ifndef GL_EXT_shader_image_load_formatted
+#define GL_EXT_shader_image_load_formatted 1
+
+#define GLEW_EXT_shader_image_load_formatted GLEW_GET_VAR(__GLEW_EXT_shader_image_load_formatted)
+
+#endif /* GL_EXT_shader_image_load_formatted */
+
+/* --------------------- GL_EXT_shader_image_load_store -------------------- */
+
+#ifndef GL_EXT_shader_image_load_store
+#define GL_EXT_shader_image_load_store 1
+
+#define GL_VERTEX_ATTRIB_ARRAY_BARRIER_BIT_EXT 0x00000001
+#define GL_ELEMENT_ARRAY_BARRIER_BIT_EXT 0x00000002
+#define GL_UNIFORM_BARRIER_BIT_EXT 0x00000004
+#define GL_TEXTURE_FETCH_BARRIER_BIT_EXT 0x00000008
+#define GL_SHADER_IMAGE_ACCESS_BARRIER_BIT_EXT 0x00000020
+#define GL_COMMAND_BARRIER_BIT_EXT 0x00000040
+#define GL_PIXEL_BUFFER_BARRIER_BIT_EXT 0x00000080
+#define GL_TEXTURE_UPDATE_BARRIER_BIT_EXT 0x00000100
+#define GL_BUFFER_UPDATE_BARRIER_BIT_EXT 0x00000200
+#define GL_FRAMEBUFFER_BARRIER_BIT_EXT 0x00000400
+#define GL_TRANSFORM_FEEDBACK_BARRIER_BIT_EXT 0x00000800
+#define GL_ATOMIC_COUNTER_BARRIER_BIT_EXT 0x00001000
+#define GL_MAX_IMAGE_UNITS_EXT 0x8F38
+#define GL_MAX_COMBINED_IMAGE_UNITS_AND_FRAGMENT_OUTPUTS_EXT 0x8F39
+#define GL_IMAGE_BINDING_NAME_EXT 0x8F3A
+#define GL_IMAGE_BINDING_LEVEL_EXT 0x8F3B
+#define GL_IMAGE_BINDING_LAYERED_EXT 0x8F3C
+#define GL_IMAGE_BINDING_LAYER_EXT 0x8F3D
+#define GL_IMAGE_BINDING_ACCESS_EXT 0x8F3E
+#define GL_IMAGE_1D_EXT 0x904C
+#define GL_IMAGE_2D_EXT 0x904D
+#define GL_IMAGE_3D_EXT 0x904E
+#define GL_IMAGE_2D_RECT_EXT 0x904F
+#define GL_IMAGE_CUBE_EXT 0x9050
+#define GL_IMAGE_BUFFER_EXT 0x9051
+#define GL_IMAGE_1D_ARRAY_EXT 0x9052
+#define GL_IMAGE_2D_ARRAY_EXT 0x9053
+#define GL_IMAGE_CUBE_MAP_ARRAY_EXT 0x9054
+#define GL_IMAGE_2D_MULTISAMPLE_EXT 0x9055
+#define GL_IMAGE_2D_MULTISAMPLE_ARRAY_EXT 0x9056
+#define GL_INT_IMAGE_1D_EXT 0x9057
+#define GL_INT_IMAGE_2D_EXT 0x9058
+#define GL_INT_IMAGE_3D_EXT 0x9059
+#define GL_INT_IMAGE_2D_RECT_EXT 0x905A
+#define GL_INT_IMAGE_CUBE_EXT 0x905B
+#define GL_INT_IMAGE_BUFFER_EXT 0x905C
+#define GL_INT_IMAGE_1D_ARRAY_EXT 0x905D
+#define GL_INT_IMAGE_2D_ARRAY_EXT 0x905E
+#define GL_INT_IMAGE_CUBE_MAP_ARRAY_EXT 0x905F
+#define GL_INT_IMAGE_2D_MULTISAMPLE_EXT 0x9060
+#define GL_INT_IMAGE_2D_MULTISAMPLE_ARRAY_EXT 0x9061
+#define GL_UNSIGNED_INT_IMAGE_1D_EXT 0x9062
+#define GL_UNSIGNED_INT_IMAGE_2D_EXT 0x9063
+#define GL_UNSIGNED_INT_IMAGE_3D_EXT 0x9064
+#define GL_UNSIGNED_INT_IMAGE_2D_RECT_EXT 0x9065
+#define GL_UNSIGNED_INT_IMAGE_CUBE_EXT 0x9066
+#define GL_UNSIGNED_INT_IMAGE_BUFFER_EXT 0x9067
+#define GL_UNSIGNED_INT_IMAGE_1D_ARRAY_EXT 0x9068
+#define GL_UNSIGNED_INT_IMAGE_2D_ARRAY_EXT 0x9069
+#define GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY_EXT 0x906A
+#define GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_EXT 0x906B
+#define GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_ARRAY_EXT 0x906C
+#define GL_MAX_IMAGE_SAMPLES_EXT 0x906D
+#define GL_IMAGE_BINDING_FORMAT_EXT 0x906E
+#define GL_ALL_BARRIER_BITS_EXT 0xFFFFFFFF
+
+typedef void (GLAPIENTRY * PFNGLBINDIMAGETEXTUREEXTPROC) (GLuint index, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLint format);
+typedef void (GLAPIENTRY * PFNGLMEMORYBARRIEREXTPROC) (GLbitfield barriers);
+
+#define glBindImageTextureEXT GLEW_GET_FUN(__glewBindImageTextureEXT)
+#define glMemoryBarrierEXT GLEW_GET_FUN(__glewMemoryBarrierEXT)
+
+#define GLEW_EXT_shader_image_load_store GLEW_GET_VAR(__GLEW_EXT_shader_image_load_store)
+
+#endif /* GL_EXT_shader_image_load_store */
+
+/* ----------------------- GL_EXT_shader_integer_mix ----------------------- */
+
+#ifndef GL_EXT_shader_integer_mix
+#define GL_EXT_shader_integer_mix 1
+
+#define GLEW_EXT_shader_integer_mix GLEW_GET_VAR(__GLEW_EXT_shader_integer_mix)
+
+#endif /* GL_EXT_shader_integer_mix */
+
+/* -------------------------- GL_EXT_shadow_funcs -------------------------- */
+
+#ifndef GL_EXT_shadow_funcs
+#define GL_EXT_shadow_funcs 1
+
+#define GLEW_EXT_shadow_funcs GLEW_GET_VAR(__GLEW_EXT_shadow_funcs)
+
+#endif /* GL_EXT_shadow_funcs */
+
+/* --------------------- GL_EXT_shared_texture_palette --------------------- */
+
+#ifndef GL_EXT_shared_texture_palette
+#define GL_EXT_shared_texture_palette 1
+
+#define GL_SHARED_TEXTURE_PALETTE_EXT 0x81FB
+
+#define GLEW_EXT_shared_texture_palette GLEW_GET_VAR(__GLEW_EXT_shared_texture_palette)
+
+#endif /* GL_EXT_shared_texture_palette */
+
+/* ------------------------- GL_EXT_sparse_texture2 ------------------------ */
+
+#ifndef GL_EXT_sparse_texture2
+#define GL_EXT_sparse_texture2 1
+
+#define GLEW_EXT_sparse_texture2 GLEW_GET_VAR(__GLEW_EXT_sparse_texture2)
+
+#endif /* GL_EXT_sparse_texture2 */
+
+/* ------------------------ GL_EXT_stencil_clear_tag ----------------------- */
+
+#ifndef GL_EXT_stencil_clear_tag
+#define GL_EXT_stencil_clear_tag 1
+
+#define GL_STENCIL_TAG_BITS_EXT 0x88F2
+#define GL_STENCIL_CLEAR_TAG_VALUE_EXT 0x88F3
+
+#define GLEW_EXT_stencil_clear_tag GLEW_GET_VAR(__GLEW_EXT_stencil_clear_tag)
+
+#endif /* GL_EXT_stencil_clear_tag */
+
+/* ------------------------ GL_EXT_stencil_two_side ------------------------ */
+
+#ifndef GL_EXT_stencil_two_side
+#define GL_EXT_stencil_two_side 1
+
+#define GL_STENCIL_TEST_TWO_SIDE_EXT 0x8910
+#define GL_ACTIVE_STENCIL_FACE_EXT 0x8911
+
+typedef void (GLAPIENTRY * PFNGLACTIVESTENCILFACEEXTPROC) (GLenum face);
+
+#define glActiveStencilFaceEXT GLEW_GET_FUN(__glewActiveStencilFaceEXT)
+
+#define GLEW_EXT_stencil_two_side GLEW_GET_VAR(__GLEW_EXT_stencil_two_side)
+
+#endif /* GL_EXT_stencil_two_side */
+
+/* -------------------------- GL_EXT_stencil_wrap -------------------------- */
+
+#ifndef GL_EXT_stencil_wrap
+#define GL_EXT_stencil_wrap 1
+
+#define GL_INCR_WRAP_EXT 0x8507
+#define GL_DECR_WRAP_EXT 0x8508
+
+#define GLEW_EXT_stencil_wrap GLEW_GET_VAR(__GLEW_EXT_stencil_wrap)
+
+#endif /* GL_EXT_stencil_wrap */
+
+/* --------------------------- GL_EXT_subtexture --------------------------- */
+
+#ifndef GL_EXT_subtexture
+#define GL_EXT_subtexture 1
+
+typedef void (GLAPIENTRY * PFNGLTEXSUBIMAGE1DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void *pixels);
+typedef void (GLAPIENTRY * PFNGLTEXSUBIMAGE2DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels);
+typedef void (GLAPIENTRY * PFNGLTEXSUBIMAGE3DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels);
+
+#define glTexSubImage1DEXT GLEW_GET_FUN(__glewTexSubImage1DEXT)
+#define glTexSubImage2DEXT GLEW_GET_FUN(__glewTexSubImage2DEXT)
+#define glTexSubImage3DEXT GLEW_GET_FUN(__glewTexSubImage3DEXT)
+
+#define GLEW_EXT_subtexture GLEW_GET_VAR(__GLEW_EXT_subtexture)
+
+#endif /* GL_EXT_subtexture */
+
+/* ----------------------------- GL_EXT_texture ---------------------------- */
+
+#ifndef GL_EXT_texture
+#define GL_EXT_texture 1
+
+#define GL_ALPHA4_EXT 0x803B
+#define GL_ALPHA8_EXT 0x803C
+#define GL_ALPHA12_EXT 0x803D
+#define GL_ALPHA16_EXT 0x803E
+#define GL_LUMINANCE4_EXT 0x803F
+#define GL_LUMINANCE8_EXT 0x8040
+#define GL_LUMINANCE12_EXT 0x8041
+#define GL_LUMINANCE16_EXT 0x8042
+#define GL_LUMINANCE4_ALPHA4_EXT 0x8043
+#define GL_LUMINANCE6_ALPHA2_EXT 0x8044
+#define GL_LUMINANCE8_ALPHA8_EXT 0x8045
+#define GL_LUMINANCE12_ALPHA4_EXT 0x8046
+#define GL_LUMINANCE12_ALPHA12_EXT 0x8047
+#define GL_LUMINANCE16_ALPHA16_EXT 0x8048
+#define GL_INTENSITY_EXT 0x8049
+#define GL_INTENSITY4_EXT 0x804A
+#define GL_INTENSITY8_EXT 0x804B
+#define GL_INTENSITY12_EXT 0x804C
+#define GL_INTENSITY16_EXT 0x804D
+#define GL_RGB2_EXT 0x804E
+#define GL_RGB4_EXT 0x804F
+#define GL_RGB5_EXT 0x8050
+#define GL_RGB8_EXT 0x8051
+#define GL_RGB10_EXT 0x8052
+#define GL_RGB12_EXT 0x8053
+#define GL_RGB16_EXT 0x8054
+#define GL_RGBA2_EXT 0x8055
+#define GL_RGBA4_EXT 0x8056
+#define GL_RGB5_A1_EXT 0x8057
+#define GL_RGBA8_EXT 0x8058
+#define GL_RGB10_A2_EXT 0x8059
+#define GL_RGBA12_EXT 0x805A
+#define GL_RGBA16_EXT 0x805B
+#define GL_TEXTURE_RED_SIZE_EXT 0x805C
+#define GL_TEXTURE_GREEN_SIZE_EXT 0x805D
+#define GL_TEXTURE_BLUE_SIZE_EXT 0x805E
+#define GL_TEXTURE_ALPHA_SIZE_EXT 0x805F
+#define GL_TEXTURE_LUMINANCE_SIZE_EXT 0x8060
+#define GL_TEXTURE_INTENSITY_SIZE_EXT 0x8061
+#define GL_REPLACE_EXT 0x8062
+#define GL_PROXY_TEXTURE_1D_EXT 0x8063
+#define GL_PROXY_TEXTURE_2D_EXT 0x8064
+
+#define GLEW_EXT_texture GLEW_GET_VAR(__GLEW_EXT_texture)
+
+#endif /* GL_EXT_texture */
+
+/* ---------------------------- GL_EXT_texture3D --------------------------- */
+
+#ifndef GL_EXT_texture3D
+#define GL_EXT_texture3D 1
+
+#define GL_PACK_SKIP_IMAGES_EXT 0x806B
+#define GL_PACK_IMAGE_HEIGHT_EXT 0x806C
+#define GL_UNPACK_SKIP_IMAGES_EXT 0x806D
+#define GL_UNPACK_IMAGE_HEIGHT_EXT 0x806E
+#define GL_TEXTURE_3D_EXT 0x806F
+#define GL_PROXY_TEXTURE_3D_EXT 0x8070
+#define GL_TEXTURE_DEPTH_EXT 0x8071
+#define GL_TEXTURE_WRAP_R_EXT 0x8072
+#define GL_MAX_3D_TEXTURE_SIZE_EXT 0x8073
+
+typedef void (GLAPIENTRY * PFNGLTEXIMAGE3DEXTPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels);
+
+#define glTexImage3DEXT GLEW_GET_FUN(__glewTexImage3DEXT)
+
+#define GLEW_EXT_texture3D GLEW_GET_VAR(__GLEW_EXT_texture3D)
+
+#endif /* GL_EXT_texture3D */
+
+/* -------------------------- GL_EXT_texture_array ------------------------- */
+
+#ifndef GL_EXT_texture_array
+#define GL_EXT_texture_array 1
+
+#define GL_COMPARE_REF_DEPTH_TO_TEXTURE_EXT 0x884E
+#define GL_MAX_ARRAY_TEXTURE_LAYERS_EXT 0x88FF
+#define GL_TEXTURE_1D_ARRAY_EXT 0x8C18
+#define GL_PROXY_TEXTURE_1D_ARRAY_EXT 0x8C19
+#define GL_TEXTURE_2D_ARRAY_EXT 0x8C1A
+#define GL_PROXY_TEXTURE_2D_ARRAY_EXT 0x8C1B
+#define GL_TEXTURE_BINDING_1D_ARRAY_EXT 0x8C1C
+#define GL_TEXTURE_BINDING_2D_ARRAY_EXT 0x8C1D
+
+typedef void (GLAPIENTRY * PFNGLFRAMEBUFFERTEXTURELAYEREXTPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer);
+
+#define glFramebufferTextureLayerEXT GLEW_GET_FUN(__glewFramebufferTextureLayerEXT)
+
+#define GLEW_EXT_texture_array GLEW_GET_VAR(__GLEW_EXT_texture_array)
+
+#endif /* GL_EXT_texture_array */
+
+/* ---------------------- GL_EXT_texture_buffer_object --------------------- */
+
+#ifndef GL_EXT_texture_buffer_object
+#define GL_EXT_texture_buffer_object 1
+
+#define GL_TEXTURE_BUFFER_EXT 0x8C2A
+#define GL_MAX_TEXTURE_BUFFER_SIZE_EXT 0x8C2B
+#define GL_TEXTURE_BINDING_BUFFER_EXT 0x8C2C
+#define GL_TEXTURE_BUFFER_DATA_STORE_BINDING_EXT 0x8C2D
+#define GL_TEXTURE_BUFFER_FORMAT_EXT 0x8C2E
+
+typedef void (GLAPIENTRY * PFNGLTEXBUFFEREXTPROC) (GLenum target, GLenum internalformat, GLuint buffer);
+
+#define glTexBufferEXT GLEW_GET_FUN(__glewTexBufferEXT)
+
+#define GLEW_EXT_texture_buffer_object GLEW_GET_VAR(__GLEW_EXT_texture_buffer_object)
+
+#endif /* GL_EXT_texture_buffer_object */
+
+/* -------------------- GL_EXT_texture_compression_dxt1 -------------------- */
+
+#ifndef GL_EXT_texture_compression_dxt1
+#define GL_EXT_texture_compression_dxt1 1
+
+#define GLEW_EXT_texture_compression_dxt1 GLEW_GET_VAR(__GLEW_EXT_texture_compression_dxt1)
+
+#endif /* GL_EXT_texture_compression_dxt1 */
+
+/* -------------------- GL_EXT_texture_compression_latc -------------------- */
+
+#ifndef GL_EXT_texture_compression_latc
+#define GL_EXT_texture_compression_latc 1
+
+#define GL_COMPRESSED_LUMINANCE_LATC1_EXT 0x8C70
+#define GL_COMPRESSED_SIGNED_LUMINANCE_LATC1_EXT 0x8C71
+#define GL_COMPRESSED_LUMINANCE_ALPHA_LATC2_EXT 0x8C72
+#define GL_COMPRESSED_SIGNED_LUMINANCE_ALPHA_LATC2_EXT 0x8C73
+
+#define GLEW_EXT_texture_compression_latc GLEW_GET_VAR(__GLEW_EXT_texture_compression_latc)
+
+#endif /* GL_EXT_texture_compression_latc */
+
+/* -------------------- GL_EXT_texture_compression_rgtc -------------------- */
+
+#ifndef GL_EXT_texture_compression_rgtc
+#define GL_EXT_texture_compression_rgtc 1
+
+#define GL_COMPRESSED_RED_RGTC1_EXT 0x8DBB
+#define GL_COMPRESSED_SIGNED_RED_RGTC1_EXT 0x8DBC
+#define GL_COMPRESSED_RED_GREEN_RGTC2_EXT 0x8DBD
+#define GL_COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT 0x8DBE
+
+#define GLEW_EXT_texture_compression_rgtc GLEW_GET_VAR(__GLEW_EXT_texture_compression_rgtc)
+
+#endif /* GL_EXT_texture_compression_rgtc */
+
+/* -------------------- GL_EXT_texture_compression_s3tc -------------------- */
+
+#ifndef GL_EXT_texture_compression_s3tc
+#define GL_EXT_texture_compression_s3tc 1
+
+#define GL_COMPRESSED_RGB_S3TC_DXT1_EXT 0x83F0
+#define GL_COMPRESSED_RGBA_S3TC_DXT1_EXT 0x83F1
+#define GL_COMPRESSED_RGBA_S3TC_DXT3_EXT 0x83F2
+#define GL_COMPRESSED_RGBA_S3TC_DXT5_EXT 0x83F3
+
+#define GLEW_EXT_texture_compression_s3tc GLEW_GET_VAR(__GLEW_EXT_texture_compression_s3tc)
+
+#endif /* GL_EXT_texture_compression_s3tc */
+
+/* ------------------------ GL_EXT_texture_cube_map ------------------------ */
+
+#ifndef GL_EXT_texture_cube_map
+#define GL_EXT_texture_cube_map 1
+
+#define GL_NORMAL_MAP_EXT 0x8511
+#define GL_REFLECTION_MAP_EXT 0x8512
+#define GL_TEXTURE_CUBE_MAP_EXT 0x8513
+#define GL_TEXTURE_BINDING_CUBE_MAP_EXT 0x8514
+#define GL_TEXTURE_CUBE_MAP_POSITIVE_X_EXT 0x8515
+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X_EXT 0x8516
+#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y_EXT 0x8517
+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_EXT 0x8518
+#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z_EXT 0x8519
+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_EXT 0x851A
+#define GL_PROXY_TEXTURE_CUBE_MAP_EXT 0x851B
+#define GL_MAX_CUBE_MAP_TEXTURE_SIZE_EXT 0x851C
+
+#define GLEW_EXT_texture_cube_map GLEW_GET_VAR(__GLEW_EXT_texture_cube_map)
+
+#endif /* GL_EXT_texture_cube_map */
+
+/* ----------------------- GL_EXT_texture_edge_clamp ----------------------- */
+
+#ifndef GL_EXT_texture_edge_clamp
+#define GL_EXT_texture_edge_clamp 1
+
+#define GL_CLAMP_TO_EDGE_EXT 0x812F
+
+#define GLEW_EXT_texture_edge_clamp GLEW_GET_VAR(__GLEW_EXT_texture_edge_clamp)
+
+#endif /* GL_EXT_texture_edge_clamp */
+
+/* --------------------------- GL_EXT_texture_env -------------------------- */
+
+#ifndef GL_EXT_texture_env
+#define GL_EXT_texture_env 1
+
+#define GLEW_EXT_texture_env GLEW_GET_VAR(__GLEW_EXT_texture_env)
+
+#endif /* GL_EXT_texture_env */
+
+/* ------------------------- GL_EXT_texture_env_add ------------------------ */
+
+#ifndef GL_EXT_texture_env_add
+#define GL_EXT_texture_env_add 1
+
+#define GLEW_EXT_texture_env_add GLEW_GET_VAR(__GLEW_EXT_texture_env_add)
+
+#endif /* GL_EXT_texture_env_add */
+
+/* ----------------------- GL_EXT_texture_env_combine ---------------------- */
+
+#ifndef GL_EXT_texture_env_combine
+#define GL_EXT_texture_env_combine 1
+
+#define GL_COMBINE_EXT 0x8570
+#define GL_COMBINE_RGB_EXT 0x8571
+#define GL_COMBINE_ALPHA_EXT 0x8572
+#define GL_RGB_SCALE_EXT 0x8573
+#define GL_ADD_SIGNED_EXT 0x8574
+#define GL_INTERPOLATE_EXT 0x8575
+#define GL_CONSTANT_EXT 0x8576
+#define GL_PRIMARY_COLOR_EXT 0x8577
+#define GL_PREVIOUS_EXT 0x8578
+#define GL_SOURCE0_RGB_EXT 0x8580
+#define GL_SOURCE1_RGB_EXT 0x8581
+#define GL_SOURCE2_RGB_EXT 0x8582
+#define GL_SOURCE0_ALPHA_EXT 0x8588
+#define GL_SOURCE1_ALPHA_EXT 0x8589
+#define GL_SOURCE2_ALPHA_EXT 0x858A
+#define GL_OPERAND0_RGB_EXT 0x8590
+#define GL_OPERAND1_RGB_EXT 0x8591
+#define GL_OPERAND2_RGB_EXT 0x8592
+#define GL_OPERAND0_ALPHA_EXT 0x8598
+#define GL_OPERAND1_ALPHA_EXT 0x8599
+#define GL_OPERAND2_ALPHA_EXT 0x859A
+
+#define GLEW_EXT_texture_env_combine GLEW_GET_VAR(__GLEW_EXT_texture_env_combine)
+
+#endif /* GL_EXT_texture_env_combine */
+
+/* ------------------------ GL_EXT_texture_env_dot3 ------------------------ */
+
+#ifndef GL_EXT_texture_env_dot3
+#define GL_EXT_texture_env_dot3 1
+
+#define GL_DOT3_RGB_EXT 0x8740
+#define GL_DOT3_RGBA_EXT 0x8741
+
+#define GLEW_EXT_texture_env_dot3 GLEW_GET_VAR(__GLEW_EXT_texture_env_dot3)
+
+#endif /* GL_EXT_texture_env_dot3 */
+
+/* ------------------- GL_EXT_texture_filter_anisotropic ------------------- */
+
+#ifndef GL_EXT_texture_filter_anisotropic
+#define GL_EXT_texture_filter_anisotropic 1
+
+#define GL_TEXTURE_MAX_ANISOTROPY_EXT 0x84FE
+#define GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT 0x84FF
+
+#define GLEW_EXT_texture_filter_anisotropic GLEW_GET_VAR(__GLEW_EXT_texture_filter_anisotropic)
+
+#endif /* GL_EXT_texture_filter_anisotropic */
+
+/* ---------------------- GL_EXT_texture_filter_minmax --------------------- */
+
+#ifndef GL_EXT_texture_filter_minmax
+#define GL_EXT_texture_filter_minmax 1
+
+#define GL_TEXTURE_REDUCTION_MODE_EXT 0x9366
+#define GL_WEIGHTED_AVERAGE_EXT 0x9367
+
+#define GLEW_EXT_texture_filter_minmax GLEW_GET_VAR(__GLEW_EXT_texture_filter_minmax)
+
+#endif /* GL_EXT_texture_filter_minmax */
+
+/* ------------------------- GL_EXT_texture_integer ------------------------ */
+
+#ifndef GL_EXT_texture_integer
+#define GL_EXT_texture_integer 1
+
+#define GL_RGBA32UI_EXT 0x8D70
+#define GL_RGB32UI_EXT 0x8D71
+#define GL_ALPHA32UI_EXT 0x8D72
+#define GL_INTENSITY32UI_EXT 0x8D73
+#define GL_LUMINANCE32UI_EXT 0x8D74
+#define GL_LUMINANCE_ALPHA32UI_EXT 0x8D75
+#define GL_RGBA16UI_EXT 0x8D76
+#define GL_RGB16UI_EXT 0x8D77
+#define GL_ALPHA16UI_EXT 0x8D78
+#define GL_INTENSITY16UI_EXT 0x8D79
+#define GL_LUMINANCE16UI_EXT 0x8D7A
+#define GL_LUMINANCE_ALPHA16UI_EXT 0x8D7B
+#define GL_RGBA8UI_EXT 0x8D7C
+#define GL_RGB8UI_EXT 0x8D7D
+#define GL_ALPHA8UI_EXT 0x8D7E
+#define GL_INTENSITY8UI_EXT 0x8D7F
+#define GL_LUMINANCE8UI_EXT 0x8D80
+#define GL_LUMINANCE_ALPHA8UI_EXT 0x8D81
+#define GL_RGBA32I_EXT 0x8D82
+#define GL_RGB32I_EXT 0x8D83
+#define GL_ALPHA32I_EXT 0x8D84
+#define GL_INTENSITY32I_EXT 0x8D85
+#define GL_LUMINANCE32I_EXT 0x8D86
+#define GL_LUMINANCE_ALPHA32I_EXT 0x8D87
+#define GL_RGBA16I_EXT 0x8D88
+#define GL_RGB16I_EXT 0x8D89
+#define GL_ALPHA16I_EXT 0x8D8A
+#define GL_INTENSITY16I_EXT 0x8D8B
+#define GL_LUMINANCE16I_EXT 0x8D8C
+#define GL_LUMINANCE_ALPHA16I_EXT 0x8D8D
+#define GL_RGBA8I_EXT 0x8D8E
+#define GL_RGB8I_EXT 0x8D8F
+#define GL_ALPHA8I_EXT 0x8D90
+#define GL_INTENSITY8I_EXT 0x8D91
+#define GL_LUMINANCE8I_EXT 0x8D92
+#define GL_LUMINANCE_ALPHA8I_EXT 0x8D93
+#define GL_RED_INTEGER_EXT 0x8D94
+#define GL_GREEN_INTEGER_EXT 0x8D95
+#define GL_BLUE_INTEGER_EXT 0x8D96
+#define GL_ALPHA_INTEGER_EXT 0x8D97
+#define GL_RGB_INTEGER_EXT 0x8D98
+#define GL_RGBA_INTEGER_EXT 0x8D99
+#define GL_BGR_INTEGER_EXT 0x8D9A
+#define GL_BGRA_INTEGER_EXT 0x8D9B
+#define GL_LUMINANCE_INTEGER_EXT 0x8D9C
+#define GL_LUMINANCE_ALPHA_INTEGER_EXT 0x8D9D
+#define GL_RGBA_INTEGER_MODE_EXT 0x8D9E
+
+typedef void (GLAPIENTRY * PFNGLCLEARCOLORIIEXTPROC) (GLint red, GLint green, GLint blue, GLint alpha);
+typedef void (GLAPIENTRY * PFNGLCLEARCOLORIUIEXTPROC) (GLuint red, GLuint green, GLuint blue, GLuint alpha);
+typedef void (GLAPIENTRY * PFNGLGETTEXPARAMETERIIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
+typedef void (GLAPIENTRY * PFNGLGETTEXPARAMETERIUIVEXTPROC) (GLenum target, GLenum pname, GLuint *params);
+typedef void (GLAPIENTRY * PFNGLTEXPARAMETERIIVEXTPROC) (GLenum target, GLenum pname, const GLint *params);
+typedef void (GLAPIENTRY * PFNGLTEXPARAMETERIUIVEXTPROC) (GLenum target, GLenum pname, const GLuint *params);
+
+#define glClearColorIiEXT GLEW_GET_FUN(__glewClearColorIiEXT)
+#define glClearColorIuiEXT GLEW_GET_FUN(__glewClearColorIuiEXT)
+#define glGetTexParameterIivEXT GLEW_GET_FUN(__glewGetTexParameterIivEXT)
+#define glGetTexParameterIuivEXT GLEW_GET_FUN(__glewGetTexParameterIuivEXT)
+#define glTexParameterIivEXT GLEW_GET_FUN(__glewTexParameterIivEXT)
+#define glTexParameterIuivEXT GLEW_GET_FUN(__glewTexParameterIuivEXT)
+
+#define GLEW_EXT_texture_integer GLEW_GET_VAR(__GLEW_EXT_texture_integer)
+
+#endif /* GL_EXT_texture_integer */
+
+/* ------------------------ GL_EXT_texture_lod_bias ------------------------ */
+
+#ifndef GL_EXT_texture_lod_bias
+#define GL_EXT_texture_lod_bias 1
+
+#define GL_MAX_TEXTURE_LOD_BIAS_EXT 0x84FD
+#define GL_TEXTURE_FILTER_CONTROL_EXT 0x8500
+#define GL_TEXTURE_LOD_BIAS_EXT 0x8501
+
+#define GLEW_EXT_texture_lod_bias GLEW_GET_VAR(__GLEW_EXT_texture_lod_bias)
+
+#endif /* GL_EXT_texture_lod_bias */
+
+/* ---------------------- GL_EXT_texture_mirror_clamp ---------------------- */
+
+#ifndef GL_EXT_texture_mirror_clamp
+#define GL_EXT_texture_mirror_clamp 1
+
+#define GL_MIRROR_CLAMP_EXT 0x8742
+#define GL_MIRROR_CLAMP_TO_EDGE_EXT 0x8743
+#define GL_MIRROR_CLAMP_TO_BORDER_EXT 0x8912
+
+#define GLEW_EXT_texture_mirror_clamp GLEW_GET_VAR(__GLEW_EXT_texture_mirror_clamp)
+
+#endif /* GL_EXT_texture_mirror_clamp */
+
+/* ------------------------- GL_EXT_texture_object ------------------------- */
+
+#ifndef GL_EXT_texture_object
+#define GL_EXT_texture_object 1
+
+#define GL_TEXTURE_PRIORITY_EXT 0x8066
+#define GL_TEXTURE_RESIDENT_EXT 0x8067
+#define GL_TEXTURE_1D_BINDING_EXT 0x8068
+#define GL_TEXTURE_2D_BINDING_EXT 0x8069
+#define GL_TEXTURE_3D_BINDING_EXT 0x806A
+
+typedef GLboolean (GLAPIENTRY * PFNGLARETEXTURESRESIDENTEXTPROC) (GLsizei n, const GLuint* textures, GLboolean* residences);
+typedef void (GLAPIENTRY * PFNGLBINDTEXTUREEXTPROC) (GLenum target, GLuint texture);
+typedef void (GLAPIENTRY * PFNGLDELETETEXTURESEXTPROC) (GLsizei n, const GLuint* textures);
+typedef void (GLAPIENTRY * PFNGLGENTEXTURESEXTPROC) (GLsizei n, GLuint* textures);
+typedef GLboolean (GLAPIENTRY * PFNGLISTEXTUREEXTPROC) (GLuint texture);
+typedef void (GLAPIENTRY * PFNGLPRIORITIZETEXTURESEXTPROC) (GLsizei n, const GLuint* textures, const GLclampf* priorities);
+
+#define glAreTexturesResidentEXT GLEW_GET_FUN(__glewAreTexturesResidentEXT)
+#define glBindTextureEXT GLEW_GET_FUN(__glewBindTextureEXT)
+#define glDeleteTexturesEXT GLEW_GET_FUN(__glewDeleteTexturesEXT)
+#define glGenTexturesEXT GLEW_GET_FUN(__glewGenTexturesEXT)
+#define glIsTextureEXT GLEW_GET_FUN(__glewIsTextureEXT)
+#define glPrioritizeTexturesEXT GLEW_GET_FUN(__glewPrioritizeTexturesEXT)
+
+#define GLEW_EXT_texture_object GLEW_GET_VAR(__GLEW_EXT_texture_object)
+
+#endif /* GL_EXT_texture_object */
+
+/* --------------------- GL_EXT_texture_perturb_normal --------------------- */
+
+#ifndef GL_EXT_texture_perturb_normal
+#define GL_EXT_texture_perturb_normal 1
+
+#define GL_PERTURB_EXT 0x85AE
+#define GL_TEXTURE_NORMAL_EXT 0x85AF
+
+typedef void (GLAPIENTRY * PFNGLTEXTURENORMALEXTPROC) (GLenum mode);
+
+#define glTextureNormalEXT GLEW_GET_FUN(__glewTextureNormalEXT)
+
+#define GLEW_EXT_texture_perturb_normal GLEW_GET_VAR(__GLEW_EXT_texture_perturb_normal)
+
+#endif /* GL_EXT_texture_perturb_normal */
+
+/* ------------------------ GL_EXT_texture_rectangle ----------------------- */
+
+#ifndef GL_EXT_texture_rectangle
+#define GL_EXT_texture_rectangle 1
+
+#define GL_TEXTURE_RECTANGLE_EXT 0x84F5
+#define GL_TEXTURE_BINDING_RECTANGLE_EXT 0x84F6
+#define GL_PROXY_TEXTURE_RECTANGLE_EXT 0x84F7
+#define GL_MAX_RECTANGLE_TEXTURE_SIZE_EXT 0x84F8
+
+#define GLEW_EXT_texture_rectangle GLEW_GET_VAR(__GLEW_EXT_texture_rectangle)
+
+#endif /* GL_EXT_texture_rectangle */
+
+/* -------------------------- GL_EXT_texture_sRGB -------------------------- */
+
+#ifndef GL_EXT_texture_sRGB
+#define GL_EXT_texture_sRGB 1
+
+#define GL_SRGB_EXT 0x8C40
+#define GL_SRGB8_EXT 0x8C41
+#define GL_SRGB_ALPHA_EXT 0x8C42
+#define GL_SRGB8_ALPHA8_EXT 0x8C43
+#define GL_SLUMINANCE_ALPHA_EXT 0x8C44
+#define GL_SLUMINANCE8_ALPHA8_EXT 0x8C45
+#define GL_SLUMINANCE_EXT 0x8C46
+#define GL_SLUMINANCE8_EXT 0x8C47
+#define GL_COMPRESSED_SRGB_EXT 0x8C48
+#define GL_COMPRESSED_SRGB_ALPHA_EXT 0x8C49
+#define GL_COMPRESSED_SLUMINANCE_EXT 0x8C4A
+#define GL_COMPRESSED_SLUMINANCE_ALPHA_EXT 0x8C4B
+#define GL_COMPRESSED_SRGB_S3TC_DXT1_EXT 0x8C4C
+#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT 0x8C4D
+#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT 0x8C4E
+#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT 0x8C4F
+
+#define GLEW_EXT_texture_sRGB GLEW_GET_VAR(__GLEW_EXT_texture_sRGB)
+
+#endif /* GL_EXT_texture_sRGB */
+
+/* ----------------------- GL_EXT_texture_sRGB_decode ---------------------- */
+
+#ifndef GL_EXT_texture_sRGB_decode
+#define GL_EXT_texture_sRGB_decode 1
+
+#define GL_TEXTURE_SRGB_DECODE_EXT 0x8A48
+#define GL_DECODE_EXT 0x8A49
+#define GL_SKIP_DECODE_EXT 0x8A4A
+
+#define GLEW_EXT_texture_sRGB_decode GLEW_GET_VAR(__GLEW_EXT_texture_sRGB_decode)
+
+#endif /* GL_EXT_texture_sRGB_decode */
+
+/* --------------------- GL_EXT_texture_shared_exponent -------------------- */
+
+#ifndef GL_EXT_texture_shared_exponent
+#define GL_EXT_texture_shared_exponent 1
+
+#define GL_RGB9_E5_EXT 0x8C3D
+#define GL_UNSIGNED_INT_5_9_9_9_REV_EXT 0x8C3E
+#define GL_TEXTURE_SHARED_SIZE_EXT 0x8C3F
+
+#define GLEW_EXT_texture_shared_exponent GLEW_GET_VAR(__GLEW_EXT_texture_shared_exponent)
+
+#endif /* GL_EXT_texture_shared_exponent */
+
+/* -------------------------- GL_EXT_texture_snorm ------------------------- */
+
+#ifndef GL_EXT_texture_snorm
+#define GL_EXT_texture_snorm 1
+
+#define GL_RED_SNORM 0x8F90
+#define GL_RG_SNORM 0x8F91
+#define GL_RGB_SNORM 0x8F92
+#define GL_RGBA_SNORM 0x8F93
+#define GL_R8_SNORM 0x8F94
+#define GL_RG8_SNORM 0x8F95
+#define GL_RGB8_SNORM 0x8F96
+#define GL_RGBA8_SNORM 0x8F97
+#define GL_R16_SNORM 0x8F98
+#define GL_RG16_SNORM 0x8F99
+#define GL_RGB16_SNORM 0x8F9A
+#define GL_RGBA16_SNORM 0x8F9B
+#define GL_SIGNED_NORMALIZED 0x8F9C
+#define GL_ALPHA_SNORM 0x9010
+#define GL_LUMINANCE_SNORM 0x9011
+#define GL_LUMINANCE_ALPHA_SNORM 0x9012
+#define GL_INTENSITY_SNORM 0x9013
+#define GL_ALPHA8_SNORM 0x9014
+#define GL_LUMINANCE8_SNORM 0x9015
+#define GL_LUMINANCE8_ALPHA8_SNORM 0x9016
+#define GL_INTENSITY8_SNORM 0x9017
+#define GL_ALPHA16_SNORM 0x9018
+#define GL_LUMINANCE16_SNORM 0x9019
+#define GL_LUMINANCE16_ALPHA16_SNORM 0x901A
+#define GL_INTENSITY16_SNORM 0x901B
+
+#define GLEW_EXT_texture_snorm GLEW_GET_VAR(__GLEW_EXT_texture_snorm)
+
+#endif /* GL_EXT_texture_snorm */
+
+/* ------------------------- GL_EXT_texture_swizzle ------------------------ */
+
+#ifndef GL_EXT_texture_swizzle
+#define GL_EXT_texture_swizzle 1
+
+#define GL_TEXTURE_SWIZZLE_R_EXT 0x8E42
+#define GL_TEXTURE_SWIZZLE_G_EXT 0x8E43
+#define GL_TEXTURE_SWIZZLE_B_EXT 0x8E44
+#define GL_TEXTURE_SWIZZLE_A_EXT 0x8E45
+#define GL_TEXTURE_SWIZZLE_RGBA_EXT 0x8E46
+
+#define GLEW_EXT_texture_swizzle GLEW_GET_VAR(__GLEW_EXT_texture_swizzle)
+
+#endif /* GL_EXT_texture_swizzle */
+
+/* --------------------------- GL_EXT_timer_query -------------------------- */
+
+#ifndef GL_EXT_timer_query
+#define GL_EXT_timer_query 1
+
+#define GL_TIME_ELAPSED_EXT 0x88BF
+
+typedef void (GLAPIENTRY * PFNGLGETQUERYOBJECTI64VEXTPROC) (GLuint id, GLenum pname, GLint64EXT *params);
+typedef void (GLAPIENTRY * PFNGLGETQUERYOBJECTUI64VEXTPROC) (GLuint id, GLenum pname, GLuint64EXT *params);
+
+#define glGetQueryObjecti64vEXT GLEW_GET_FUN(__glewGetQueryObjecti64vEXT)
+#define glGetQueryObjectui64vEXT GLEW_GET_FUN(__glewGetQueryObjectui64vEXT)
+
+#define GLEW_EXT_timer_query GLEW_GET_VAR(__GLEW_EXT_timer_query)
+
+#endif /* GL_EXT_timer_query */
+
+/* ----------------------- GL_EXT_transform_feedback ----------------------- */
+
+#ifndef GL_EXT_transform_feedback
+#define GL_EXT_transform_feedback 1
+
+#define GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH_EXT 0x8C76
+#define GL_TRANSFORM_FEEDBACK_BUFFER_MODE_EXT 0x8C7F
+#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS_EXT 0x8C80
+#define GL_TRANSFORM_FEEDBACK_VARYINGS_EXT 0x8C83
+#define GL_TRANSFORM_FEEDBACK_BUFFER_START_EXT 0x8C84
+#define GL_TRANSFORM_FEEDBACK_BUFFER_SIZE_EXT 0x8C85
+#define GL_PRIMITIVES_GENERATED_EXT 0x8C87
+#define GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN_EXT 0x8C88
+#define GL_RASTERIZER_DISCARD_EXT 0x8C89
+#define GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS_EXT 0x8C8A
+#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS_EXT 0x8C8B
+#define GL_INTERLEAVED_ATTRIBS_EXT 0x8C8C
+#define GL_SEPARATE_ATTRIBS_EXT 0x8C8D
+#define GL_TRANSFORM_FEEDBACK_BUFFER_EXT 0x8C8E
+#define GL_TRANSFORM_FEEDBACK_BUFFER_BINDING_EXT 0x8C8F
+
+typedef void (GLAPIENTRY * PFNGLBEGINTRANSFORMFEEDBACKEXTPROC) (GLenum primitiveMode);
+typedef void (GLAPIENTRY * PFNGLBINDBUFFERBASEEXTPROC) (GLenum target, GLuint index, GLuint buffer);
+typedef void (GLAPIENTRY * PFNGLBINDBUFFEROFFSETEXTPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset);
+typedef void (GLAPIENTRY * PFNGLBINDBUFFERRANGEEXTPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size);
+typedef void (GLAPIENTRY * PFNGLENDTRANSFORMFEEDBACKEXTPROC) (void);
+typedef void (GLAPIENTRY * PFNGLGETTRANSFORMFEEDBACKVARYINGEXTPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei* length, GLsizei *size, GLenum *type, GLchar *name);
+typedef void (GLAPIENTRY * PFNGLTRANSFORMFEEDBACKVARYINGSEXTPROC) (GLuint program, GLsizei count, const GLchar * const* varyings, GLenum bufferMode);
+
+#define glBeginTransformFeedbackEXT GLEW_GET_FUN(__glewBeginTransformFeedbackEXT)
+#define glBindBufferBaseEXT GLEW_GET_FUN(__glewBindBufferBaseEXT)
+#define glBindBufferOffsetEXT GLEW_GET_FUN(__glewBindBufferOffsetEXT)
+#define glBindBufferRangeEXT GLEW_GET_FUN(__glewBindBufferRangeEXT)
+#define glEndTransformFeedbackEXT GLEW_GET_FUN(__glewEndTransformFeedbackEXT)
+#define glGetTransformFeedbackVaryingEXT GLEW_GET_FUN(__glewGetTransformFeedbackVaryingEXT)
+#define glTransformFeedbackVaryingsEXT GLEW_GET_FUN(__glewTransformFeedbackVaryingsEXT)
+
+#define GLEW_EXT_transform_feedback GLEW_GET_VAR(__GLEW_EXT_transform_feedback)
+
+#endif /* GL_EXT_transform_feedback */
+
+/* -------------------------- GL_EXT_vertex_array -------------------------- */
+
+#ifndef GL_EXT_vertex_array
+#define GL_EXT_vertex_array 1
+
+#define GL_DOUBLE_EXT 0x140A
+#define GL_VERTEX_ARRAY_EXT 0x8074
+#define GL_NORMAL_ARRAY_EXT 0x8075
+#define GL_COLOR_ARRAY_EXT 0x8076
+#define GL_INDEX_ARRAY_EXT 0x8077
+#define GL_TEXTURE_COORD_ARRAY_EXT 0x8078
+#define GL_EDGE_FLAG_ARRAY_EXT 0x8079
+#define GL_VERTEX_ARRAY_SIZE_EXT 0x807A
+#define GL_VERTEX_ARRAY_TYPE_EXT 0x807B
+#define GL_VERTEX_ARRAY_STRIDE_EXT 0x807C
+#define GL_VERTEX_ARRAY_COUNT_EXT 0x807D
+#define GL_NORMAL_ARRAY_TYPE_EXT 0x807E
+#define GL_NORMAL_ARRAY_STRIDE_EXT 0x807F
+#define GL_NORMAL_ARRAY_COUNT_EXT 0x8080
+#define GL_COLOR_ARRAY_SIZE_EXT 0x8081
+#define GL_COLOR_ARRAY_TYPE_EXT 0x8082
+#define GL_COLOR_ARRAY_STRIDE_EXT 0x8083
+#define GL_COLOR_ARRAY_COUNT_EXT 0x8084
+#define GL_INDEX_ARRAY_TYPE_EXT 0x8085
+#define GL_INDEX_ARRAY_STRIDE_EXT 0x8086
+#define GL_INDEX_ARRAY_COUNT_EXT 0x8087
+#define GL_TEXTURE_COORD_ARRAY_SIZE_EXT 0x8088
+#define GL_TEXTURE_COORD_ARRAY_TYPE_EXT 0x8089
+#define GL_TEXTURE_COORD_ARRAY_STRIDE_EXT 0x808A
+#define GL_TEXTURE_COORD_ARRAY_COUNT_EXT 0x808B
+#define GL_EDGE_FLAG_ARRAY_STRIDE_EXT 0x808C
+#define GL_EDGE_FLAG_ARRAY_COUNT_EXT 0x808D
+#define GL_VERTEX_ARRAY_POINTER_EXT 0x808E
+#define GL_NORMAL_ARRAY_POINTER_EXT 0x808F
+#define GL_COLOR_ARRAY_POINTER_EXT 0x8090
+#define GL_INDEX_ARRAY_POINTER_EXT 0x8091
+#define GL_TEXTURE_COORD_ARRAY_POINTER_EXT 0x8092
+#define GL_EDGE_FLAG_ARRAY_POINTER_EXT 0x8093
+
+typedef void (GLAPIENTRY * PFNGLARRAYELEMENTEXTPROC) (GLint i);
+typedef void (GLAPIENTRY * PFNGLCOLORPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const void *pointer);
+typedef void (GLAPIENTRY * PFNGLDRAWARRAYSEXTPROC) (GLenum mode, GLint first, GLsizei count);
+typedef void (GLAPIENTRY * PFNGLEDGEFLAGPOINTEREXTPROC) (GLsizei stride, GLsizei count, const GLboolean* pointer);
+typedef void (GLAPIENTRY * PFNGLINDEXPOINTEREXTPROC) (GLenum type, GLsizei stride, GLsizei count, const void *pointer);
+typedef void (GLAPIENTRY * PFNGLNORMALPOINTEREXTPROC) (GLenum type, GLsizei stride, GLsizei count, const void *pointer);
+typedef void (GLAPIENTRY * PFNGLTEXCOORDPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const void *pointer);
+typedef void (GLAPIENTRY * PFNGLVERTEXPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const void *pointer);
+
+#define glArrayElementEXT GLEW_GET_FUN(__glewArrayElementEXT)
+#define glColorPointerEXT GLEW_GET_FUN(__glewColorPointerEXT)
+#define glDrawArraysEXT GLEW_GET_FUN(__glewDrawArraysEXT)
+#define glEdgeFlagPointerEXT GLEW_GET_FUN(__glewEdgeFlagPointerEXT)
+#define glIndexPointerEXT GLEW_GET_FUN(__glewIndexPointerEXT)
+#define glNormalPointerEXT GLEW_GET_FUN(__glewNormalPointerEXT)
+#define glTexCoordPointerEXT GLEW_GET_FUN(__glewTexCoordPointerEXT)
+#define glVertexPointerEXT GLEW_GET_FUN(__glewVertexPointerEXT)
+
+#define GLEW_EXT_vertex_array GLEW_GET_VAR(__GLEW_EXT_vertex_array)
+
+#endif /* GL_EXT_vertex_array */
+
+/* ------------------------ GL_EXT_vertex_array_bgra ----------------------- */
+
+#ifndef GL_EXT_vertex_array_bgra
+#define GL_EXT_vertex_array_bgra 1
+
+#define GL_BGRA 0x80E1
+
+#define GLEW_EXT_vertex_array_bgra GLEW_GET_VAR(__GLEW_EXT_vertex_array_bgra)
+
+#endif /* GL_EXT_vertex_array_bgra */
+
+/* ----------------------- GL_EXT_vertex_attrib_64bit ---------------------- */
+
+#ifndef GL_EXT_vertex_attrib_64bit
+#define GL_EXT_vertex_attrib_64bit 1
+
+#define GL_DOUBLE_MAT2_EXT 0x8F46
+#define GL_DOUBLE_MAT3_EXT 0x8F47
+#define GL_DOUBLE_MAT4_EXT 0x8F48
+#define GL_DOUBLE_MAT2x3_EXT 0x8F49
+#define GL_DOUBLE_MAT2x4_EXT 0x8F4A
+#define GL_DOUBLE_MAT3x2_EXT 0x8F4B
+#define GL_DOUBLE_MAT3x4_EXT 0x8F4C
+#define GL_DOUBLE_MAT4x2_EXT 0x8F4D
+#define GL_DOUBLE_MAT4x3_EXT 0x8F4E
+#define GL_DOUBLE_VEC2_EXT 0x8FFC
+#define GL_DOUBLE_VEC3_EXT 0x8FFD
+#define GL_DOUBLE_VEC4_EXT 0x8FFE
+
+typedef void (GLAPIENTRY * PFNGLGETVERTEXATTRIBLDVEXTPROC) (GLuint index, GLenum pname, GLdouble* params);
+typedef void (GLAPIENTRY * PFNGLVERTEXARRAYVERTEXATTRIBLOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLuint index, GLint size, GLenum type, GLsizei stride, GLintptr offset);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBL1DEXTPROC) (GLuint index, GLdouble x);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBL1DVEXTPROC) (GLuint index, const GLdouble* v);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBL2DEXTPROC) (GLuint index, GLdouble x, GLdouble y);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBL2DVEXTPROC) (GLuint index, const GLdouble* v);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBL3DEXTPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBL3DVEXTPROC) (GLuint index, const GLdouble* v);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBL4DEXTPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBL4DVEXTPROC) (GLuint index, const GLdouble* v);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBLPOINTEREXTPROC) (GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer);
+
+#define glGetVertexAttribLdvEXT GLEW_GET_FUN(__glewGetVertexAttribLdvEXT)
+#define glVertexArrayVertexAttribLOffsetEXT GLEW_GET_FUN(__glewVertexArrayVertexAttribLOffsetEXT)
+#define glVertexAttribL1dEXT GLEW_GET_FUN(__glewVertexAttribL1dEXT)
+#define glVertexAttribL1dvEXT GLEW_GET_FUN(__glewVertexAttribL1dvEXT)
+#define glVertexAttribL2dEXT GLEW_GET_FUN(__glewVertexAttribL2dEXT)
+#define glVertexAttribL2dvEXT GLEW_GET_FUN(__glewVertexAttribL2dvEXT)
+#define glVertexAttribL3dEXT GLEW_GET_FUN(__glewVertexAttribL3dEXT)
+#define glVertexAttribL3dvEXT GLEW_GET_FUN(__glewVertexAttribL3dvEXT)
+#define glVertexAttribL4dEXT GLEW_GET_FUN(__glewVertexAttribL4dEXT)
+#define glVertexAttribL4dvEXT GLEW_GET_FUN(__glewVertexAttribL4dvEXT)
+#define glVertexAttribLPointerEXT GLEW_GET_FUN(__glewVertexAttribLPointerEXT)
+
+#define GLEW_EXT_vertex_attrib_64bit GLEW_GET_VAR(__GLEW_EXT_vertex_attrib_64bit)
+
+#endif /* GL_EXT_vertex_attrib_64bit */
+
+/* -------------------------- GL_EXT_vertex_shader ------------------------- */
+
+#ifndef GL_EXT_vertex_shader
+#define GL_EXT_vertex_shader 1
+
+#define GL_VERTEX_SHADER_EXT 0x8780
+#define GL_VERTEX_SHADER_BINDING_EXT 0x8781
+#define GL_OP_INDEX_EXT 0x8782
+#define GL_OP_NEGATE_EXT 0x8783
+#define GL_OP_DOT3_EXT 0x8784
+#define GL_OP_DOT4_EXT 0x8785
+#define GL_OP_MUL_EXT 0x8786
+#define GL_OP_ADD_EXT 0x8787
+#define GL_OP_MADD_EXT 0x8788
+#define GL_OP_FRAC_EXT 0x8789
+#define GL_OP_MAX_EXT 0x878A
+#define GL_OP_MIN_EXT 0x878B
+#define GL_OP_SET_GE_EXT 0x878C
+#define GL_OP_SET_LT_EXT 0x878D
+#define GL_OP_CLAMP_EXT 0x878E
+#define GL_OP_FLOOR_EXT 0x878F
+#define GL_OP_ROUND_EXT 0x8790
+#define GL_OP_EXP_BASE_2_EXT 0x8791
+#define GL_OP_LOG_BASE_2_EXT 0x8792
+#define GL_OP_POWER_EXT 0x8793
+#define GL_OP_RECIP_EXT 0x8794
+#define GL_OP_RECIP_SQRT_EXT 0x8795
+#define GL_OP_SUB_EXT 0x8796
+#define GL_OP_CROSS_PRODUCT_EXT 0x8797
+#define GL_OP_MULTIPLY_MATRIX_EXT 0x8798
+#define GL_OP_MOV_EXT 0x8799
+#define GL_OUTPUT_VERTEX_EXT 0x879A
+#define GL_OUTPUT_COLOR0_EXT 0x879B
+#define GL_OUTPUT_COLOR1_EXT 0x879C
+#define GL_OUTPUT_TEXTURE_COORD0_EXT 0x879D
+#define GL_OUTPUT_TEXTURE_COORD1_EXT 0x879E
+#define GL_OUTPUT_TEXTURE_COORD2_EXT 0x879F
+#define GL_OUTPUT_TEXTURE_COORD3_EXT 0x87A0
+#define GL_OUTPUT_TEXTURE_COORD4_EXT 0x87A1
+#define GL_OUTPUT_TEXTURE_COORD5_EXT 0x87A2
+#define GL_OUTPUT_TEXTURE_COORD6_EXT 0x87A3
+#define GL_OUTPUT_TEXTURE_COORD7_EXT 0x87A4
+#define GL_OUTPUT_TEXTURE_COORD8_EXT 0x87A5
+#define GL_OUTPUT_TEXTURE_COORD9_EXT 0x87A6
+#define GL_OUTPUT_TEXTURE_COORD10_EXT 0x87A7
+#define GL_OUTPUT_TEXTURE_COORD11_EXT 0x87A8
+#define GL_OUTPUT_TEXTURE_COORD12_EXT 0x87A9
+#define GL_OUTPUT_TEXTURE_COORD13_EXT 0x87AA
+#define GL_OUTPUT_TEXTURE_COORD14_EXT 0x87AB
+#define GL_OUTPUT_TEXTURE_COORD15_EXT 0x87AC
+#define GL_OUTPUT_TEXTURE_COORD16_EXT 0x87AD
+#define GL_OUTPUT_TEXTURE_COORD17_EXT 0x87AE
+#define GL_OUTPUT_TEXTURE_COORD18_EXT 0x87AF
+#define GL_OUTPUT_TEXTURE_COORD19_EXT 0x87B0
+#define GL_OUTPUT_TEXTURE_COORD20_EXT 0x87B1
+#define GL_OUTPUT_TEXTURE_COORD21_EXT 0x87B2
+#define GL_OUTPUT_TEXTURE_COORD22_EXT 0x87B3
+#define GL_OUTPUT_TEXTURE_COORD23_EXT 0x87B4
+#define GL_OUTPUT_TEXTURE_COORD24_EXT 0x87B5
+#define GL_OUTPUT_TEXTURE_COORD25_EXT 0x87B6
+#define GL_OUTPUT_TEXTURE_COORD26_EXT 0x87B7
+#define GL_OUTPUT_TEXTURE_COORD27_EXT 0x87B8
+#define GL_OUTPUT_TEXTURE_COORD28_EXT 0x87B9
+#define GL_OUTPUT_TEXTURE_COORD29_EXT 0x87BA
+#define GL_OUTPUT_TEXTURE_COORD30_EXT 0x87BB
+#define GL_OUTPUT_TEXTURE_COORD31_EXT 0x87BC
+#define GL_OUTPUT_FOG_EXT 0x87BD
+#define GL_SCALAR_EXT 0x87BE
+#define GL_VECTOR_EXT 0x87BF
+#define GL_MATRIX_EXT 0x87C0
+#define GL_VARIANT_EXT 0x87C1
+#define GL_INVARIANT_EXT 0x87C2
+#define GL_LOCAL_CONSTANT_EXT 0x87C3
+#define GL_LOCAL_EXT 0x87C4
+#define GL_MAX_VERTEX_SHADER_INSTRUCTIONS_EXT 0x87C5
+#define GL_MAX_VERTEX_SHADER_VARIANTS_EXT 0x87C6
+#define GL_MAX_VERTEX_SHADER_INVARIANTS_EXT 0x87C7
+#define GL_MAX_VERTEX_SHADER_LOCAL_CONSTANTS_EXT 0x87C8
+#define GL_MAX_VERTEX_SHADER_LOCALS_EXT 0x87C9
+#define GL_MAX_OPTIMIZED_VERTEX_SHADER_INSTRUCTIONS_EXT 0x87CA
+#define GL_MAX_OPTIMIZED_VERTEX_SHADER_VARIANTS_EXT 0x87CB
+#define GL_MAX_OPTIMIZED_VERTEX_SHADER_INVARIANTS_EXT 0x87CC
+#define GL_MAX_OPTIMIZED_VERTEX_SHADER_LOCAL_CONSTANTS_EXT 0x87CD
+#define GL_MAX_OPTIMIZED_VERTEX_SHADER_LOCALS_EXT 0x87CE
+#define GL_VERTEX_SHADER_INSTRUCTIONS_EXT 0x87CF
+#define GL_VERTEX_SHADER_VARIANTS_EXT 0x87D0
+#define GL_VERTEX_SHADER_INVARIANTS_EXT 0x87D1
+#define GL_VERTEX_SHADER_LOCAL_CONSTANTS_EXT 0x87D2
+#define GL_VERTEX_SHADER_LOCALS_EXT 0x87D3
+#define GL_VERTEX_SHADER_OPTIMIZED_EXT 0x87D4
+#define GL_X_EXT 0x87D5
+#define GL_Y_EXT 0x87D6
+#define GL_Z_EXT 0x87D7
+#define GL_W_EXT 0x87D8
+#define GL_NEGATIVE_X_EXT 0x87D9
+#define GL_NEGATIVE_Y_EXT 0x87DA
+#define GL_NEGATIVE_Z_EXT 0x87DB
+#define GL_NEGATIVE_W_EXT 0x87DC
+#define GL_ZERO_EXT 0x87DD
+#define GL_ONE_EXT 0x87DE
+#define GL_NEGATIVE_ONE_EXT 0x87DF
+#define GL_NORMALIZED_RANGE_EXT 0x87E0
+#define GL_FULL_RANGE_EXT 0x87E1
+#define GL_CURRENT_VERTEX_EXT 0x87E2
+#define GL_MVP_MATRIX_EXT 0x87E3
+#define GL_VARIANT_VALUE_EXT 0x87E4
+#define GL_VARIANT_DATATYPE_EXT 0x87E5
+#define GL_VARIANT_ARRAY_STRIDE_EXT 0x87E6
+#define GL_VARIANT_ARRAY_TYPE_EXT 0x87E7
+#define GL_VARIANT_ARRAY_EXT 0x87E8
+#define GL_VARIANT_ARRAY_POINTER_EXT 0x87E9
+#define GL_INVARIANT_VALUE_EXT 0x87EA
+#define GL_INVARIANT_DATATYPE_EXT 0x87EB
+#define GL_LOCAL_CONSTANT_VALUE_EXT 0x87EC
+#define GL_LOCAL_CONSTANT_DATATYPE_EXT 0x87ED
+
+typedef void (GLAPIENTRY * PFNGLBEGINVERTEXSHADEREXTPROC) (void);
+typedef GLuint (GLAPIENTRY * PFNGLBINDLIGHTPARAMETEREXTPROC) (GLenum light, GLenum value);
+typedef GLuint (GLAPIENTRY * PFNGLBINDMATERIALPARAMETEREXTPROC) (GLenum face, GLenum value);
+typedef GLuint (GLAPIENTRY * PFNGLBINDPARAMETEREXTPROC) (GLenum value);
+typedef GLuint (GLAPIENTRY * PFNGLBINDTEXGENPARAMETEREXTPROC) (GLenum unit, GLenum coord, GLenum value);
+typedef GLuint (GLAPIENTRY * PFNGLBINDTEXTUREUNITPARAMETEREXTPROC) (GLenum unit, GLenum value);
+typedef void (GLAPIENTRY * PFNGLBINDVERTEXSHADEREXTPROC) (GLuint id);
+typedef void (GLAPIENTRY * PFNGLDELETEVERTEXSHADEREXTPROC) (GLuint id);
+typedef void (GLAPIENTRY * PFNGLDISABLEVARIANTCLIENTSTATEEXTPROC) (GLuint id);
+typedef void (GLAPIENTRY * PFNGLENABLEVARIANTCLIENTSTATEEXTPROC) (GLuint id);
+typedef void (GLAPIENTRY * PFNGLENDVERTEXSHADEREXTPROC) (void);
+typedef void (GLAPIENTRY * PFNGLEXTRACTCOMPONENTEXTPROC) (GLuint res, GLuint src, GLuint num);
+typedef GLuint (GLAPIENTRY * PFNGLGENSYMBOLSEXTPROC) (GLenum dataType, GLenum storageType, GLenum range, GLuint components);
+typedef GLuint (GLAPIENTRY * PFNGLGENVERTEXSHADERSEXTPROC) (GLuint range);
+typedef void (GLAPIENTRY * PFNGLGETINVARIANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean *data);
+typedef void (GLAPIENTRY * PFNGLGETINVARIANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat *data);
+typedef void (GLAPIENTRY * PFNGLGETINVARIANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint *data);
+typedef void (GLAPIENTRY * PFNGLGETLOCALCONSTANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean *data);
+typedef void (GLAPIENTRY * PFNGLGETLOCALCONSTANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat *data);
+typedef void (GLAPIENTRY * PFNGLGETLOCALCONSTANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint *data);
+typedef void (GLAPIENTRY * PFNGLGETVARIANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean *data);
+typedef void (GLAPIENTRY * PFNGLGETVARIANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat *data);
+typedef void (GLAPIENTRY * PFNGLGETVARIANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint *data);
+typedef void (GLAPIENTRY * PFNGLGETVARIANTPOINTERVEXTPROC) (GLuint id, GLenum value, void **data);
+typedef void (GLAPIENTRY * PFNGLINSERTCOMPONENTEXTPROC) (GLuint res, GLuint src, GLuint num);
+typedef GLboolean (GLAPIENTRY * PFNGLISVARIANTENABLEDEXTPROC) (GLuint id, GLenum cap);
+typedef void (GLAPIENTRY * PFNGLSETINVARIANTEXTPROC) (GLuint id, GLenum type, void *addr);
+typedef void (GLAPIENTRY * PFNGLSETLOCALCONSTANTEXTPROC) (GLuint id, GLenum type, void *addr);
+typedef void (GLAPIENTRY * PFNGLSHADEROP1EXTPROC) (GLenum op, GLuint res, GLuint arg1);
+typedef void (GLAPIENTRY * PFNGLSHADEROP2EXTPROC) (GLenum op, GLuint res, GLuint arg1, GLuint arg2);
+typedef void (GLAPIENTRY * PFNGLSHADEROP3EXTPROC) (GLenum op, GLuint res, GLuint arg1, GLuint arg2, GLuint arg3);
+typedef void (GLAPIENTRY * PFNGLSWIZZLEEXTPROC) (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW);
+typedef void (GLAPIENTRY * PFNGLVARIANTPOINTEREXTPROC) (GLuint id, GLenum type, GLuint stride, void *addr);
+typedef void (GLAPIENTRY * PFNGLVARIANTBVEXTPROC) (GLuint id, GLbyte *addr);
+typedef void (GLAPIENTRY * PFNGLVARIANTDVEXTPROC) (GLuint id, GLdouble *addr);
+typedef void (GLAPIENTRY * PFNGLVARIANTFVEXTPROC) (GLuint id, GLfloat *addr);
+typedef void (GLAPIENTRY * PFNGLVARIANTIVEXTPROC) (GLuint id, GLint *addr);
+typedef void (GLAPIENTRY * PFNGLVARIANTSVEXTPROC) (GLuint id, GLshort *addr);
+typedef void (GLAPIENTRY * PFNGLVARIANTUBVEXTPROC) (GLuint id, GLubyte *addr);
+typedef void (GLAPIENTRY * PFNGLVARIANTUIVEXTPROC) (GLuint id, GLuint *addr);
+typedef void (GLAPIENTRY * PFNGLVARIANTUSVEXTPROC) (GLuint id, GLushort *addr);
+typedef void (GLAPIENTRY * PFNGLWRITEMASKEXTPROC) (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW);
+
+#define glBeginVertexShaderEXT GLEW_GET_FUN(__glewBeginVertexShaderEXT)
+#define glBindLightParameterEXT GLEW_GET_FUN(__glewBindLightParameterEXT)
+#define glBindMaterialParameterEXT GLEW_GET_FUN(__glewBindMaterialParameterEXT)
+#define glBindParameterEXT GLEW_GET_FUN(__glewBindParameterEXT)
+#define glBindTexGenParameterEXT GLEW_GET_FUN(__glewBindTexGenParameterEXT)
+#define glBindTextureUnitParameterEXT GLEW_GET_FUN(__glewBindTextureUnitParameterEXT)
+#define glBindVertexShaderEXT GLEW_GET_FUN(__glewBindVertexShaderEXT)
+#define glDeleteVertexShaderEXT GLEW_GET_FUN(__glewDeleteVertexShaderEXT)
+#define glDisableVariantClientStateEXT GLEW_GET_FUN(__glewDisableVariantClientStateEXT)
+#define glEnableVariantClientStateEXT GLEW_GET_FUN(__glewEnableVariantClientStateEXT)
+#define glEndVertexShaderEXT GLEW_GET_FUN(__glewEndVertexShaderEXT)
+#define glExtractComponentEXT GLEW_GET_FUN(__glewExtractComponentEXT)
+#define glGenSymbolsEXT GLEW_GET_FUN(__glewGenSymbolsEXT)
+#define glGenVertexShadersEXT GLEW_GET_FUN(__glewGenVertexShadersEXT)
+#define glGetInvariantBooleanvEXT GLEW_GET_FUN(__glewGetInvariantBooleanvEXT)
+#define glGetInvariantFloatvEXT GLEW_GET_FUN(__glewGetInvariantFloatvEXT)
+#define glGetInvariantIntegervEXT GLEW_GET_FUN(__glewGetInvariantIntegervEXT)
+#define glGetLocalConstantBooleanvEXT GLEW_GET_FUN(__glewGetLocalConstantBooleanvEXT)
+#define glGetLocalConstantFloatvEXT GLEW_GET_FUN(__glewGetLocalConstantFloatvEXT)
+#define glGetLocalConstantIntegervEXT GLEW_GET_FUN(__glewGetLocalConstantIntegervEXT)
+#define glGetVariantBooleanvEXT GLEW_GET_FUN(__glewGetVariantBooleanvEXT)
+#define glGetVariantFloatvEXT GLEW_GET_FUN(__glewGetVariantFloatvEXT)
+#define glGetVariantIntegervEXT GLEW_GET_FUN(__glewGetVariantIntegervEXT)
+#define glGetVariantPointervEXT GLEW_GET_FUN(__glewGetVariantPointervEXT)
+#define glInsertComponentEXT GLEW_GET_FUN(__glewInsertComponentEXT)
+#define glIsVariantEnabledEXT GLEW_GET_FUN(__glewIsVariantEnabledEXT)
+#define glSetInvariantEXT GLEW_GET_FUN(__glewSetInvariantEXT)
+#define glSetLocalConstantEXT GLEW_GET_FUN(__glewSetLocalConstantEXT)
+#define glShaderOp1EXT GLEW_GET_FUN(__glewShaderOp1EXT)
+#define glShaderOp2EXT GLEW_GET_FUN(__glewShaderOp2EXT)
+#define glShaderOp3EXT GLEW_GET_FUN(__glewShaderOp3EXT)
+#define glSwizzleEXT GLEW_GET_FUN(__glewSwizzleEXT)
+#define glVariantPointerEXT GLEW_GET_FUN(__glewVariantPointerEXT)
+#define glVariantbvEXT GLEW_GET_FUN(__glewVariantbvEXT)
+#define glVariantdvEXT GLEW_GET_FUN(__glewVariantdvEXT)
+#define glVariantfvEXT GLEW_GET_FUN(__glewVariantfvEXT)
+#define glVariantivEXT GLEW_GET_FUN(__glewVariantivEXT)
+#define glVariantsvEXT GLEW_GET_FUN(__glewVariantsvEXT)
+#define glVariantubvEXT GLEW_GET_FUN(__glewVariantubvEXT)
+#define glVariantuivEXT GLEW_GET_FUN(__glewVariantuivEXT)
+#define glVariantusvEXT GLEW_GET_FUN(__glewVariantusvEXT)
+#define glWriteMaskEXT GLEW_GET_FUN(__glewWriteMaskEXT)
+
+#define GLEW_EXT_vertex_shader GLEW_GET_VAR(__GLEW_EXT_vertex_shader)
+
+#endif /* GL_EXT_vertex_shader */
+
+/* ------------------------ GL_EXT_vertex_weighting ------------------------ */
+
+#ifndef GL_EXT_vertex_weighting
+#define GL_EXT_vertex_weighting 1
+
+#define GL_MODELVIEW0_STACK_DEPTH_EXT 0x0BA3
+#define GL_MODELVIEW0_MATRIX_EXT 0x0BA6
+#define GL_MODELVIEW0_EXT 0x1700
+#define GL_MODELVIEW1_STACK_DEPTH_EXT 0x8502
+#define GL_MODELVIEW1_MATRIX_EXT 0x8506
+#define GL_VERTEX_WEIGHTING_EXT 0x8509
+#define GL_MODELVIEW1_EXT 0x850A
+#define GL_CURRENT_VERTEX_WEIGHT_EXT 0x850B
+#define GL_VERTEX_WEIGHT_ARRAY_EXT 0x850C
+#define GL_VERTEX_WEIGHT_ARRAY_SIZE_EXT 0x850D
+#define GL_VERTEX_WEIGHT_ARRAY_TYPE_EXT 0x850E
+#define GL_VERTEX_WEIGHT_ARRAY_STRIDE_EXT 0x850F
+#define GL_VERTEX_WEIGHT_ARRAY_POINTER_EXT 0x8510
+
+typedef void (GLAPIENTRY * PFNGLVERTEXWEIGHTPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, void *pointer);
+typedef void (GLAPIENTRY * PFNGLVERTEXWEIGHTFEXTPROC) (GLfloat weight);
+typedef void (GLAPIENTRY * PFNGLVERTEXWEIGHTFVEXTPROC) (GLfloat* weight);
+
+#define glVertexWeightPointerEXT GLEW_GET_FUN(__glewVertexWeightPointerEXT)
+#define glVertexWeightfEXT GLEW_GET_FUN(__glewVertexWeightfEXT)
+#define glVertexWeightfvEXT GLEW_GET_FUN(__glewVertexWeightfvEXT)
+
+#define GLEW_EXT_vertex_weighting GLEW_GET_VAR(__GLEW_EXT_vertex_weighting)
+
+#endif /* GL_EXT_vertex_weighting */
+
+/* ------------------------- GL_EXT_x11_sync_object ------------------------ */
+
+#ifndef GL_EXT_x11_sync_object
+#define GL_EXT_x11_sync_object 1
+
+#define GL_SYNC_X11_FENCE_EXT 0x90E1
+
+typedef GLsync (GLAPIENTRY * PFNGLIMPORTSYNCEXTPROC) (GLenum external_sync_type, GLintptr external_sync, GLbitfield flags);
+
+#define glImportSyncEXT GLEW_GET_FUN(__glewImportSyncEXT)
+
+#define GLEW_EXT_x11_sync_object GLEW_GET_VAR(__GLEW_EXT_x11_sync_object)
+
+#endif /* GL_EXT_x11_sync_object */
+
+/* ---------------------- GL_GREMEDY_frame_terminator ---------------------- */
+
+#ifndef GL_GREMEDY_frame_terminator
+#define GL_GREMEDY_frame_terminator 1
+
+typedef void (GLAPIENTRY * PFNGLFRAMETERMINATORGREMEDYPROC) (void);
+
+#define glFrameTerminatorGREMEDY GLEW_GET_FUN(__glewFrameTerminatorGREMEDY)
+
+#define GLEW_GREMEDY_frame_terminator GLEW_GET_VAR(__GLEW_GREMEDY_frame_terminator)
+
+#endif /* GL_GREMEDY_frame_terminator */
+
+/* ------------------------ GL_GREMEDY_string_marker ----------------------- */
+
+#ifndef GL_GREMEDY_string_marker
+#define GL_GREMEDY_string_marker 1
+
+typedef void (GLAPIENTRY * PFNGLSTRINGMARKERGREMEDYPROC) (GLsizei len, const void *string);
+
+#define glStringMarkerGREMEDY GLEW_GET_FUN(__glewStringMarkerGREMEDY)
+
+#define GLEW_GREMEDY_string_marker GLEW_GET_VAR(__GLEW_GREMEDY_string_marker)
+
+#endif /* GL_GREMEDY_string_marker */
+
+/* --------------------- GL_HP_convolution_border_modes -------------------- */
+
+#ifndef GL_HP_convolution_border_modes
+#define GL_HP_convolution_border_modes 1
+
+#define GLEW_HP_convolution_border_modes GLEW_GET_VAR(__GLEW_HP_convolution_border_modes)
+
+#endif /* GL_HP_convolution_border_modes */
+
+/* ------------------------- GL_HP_image_transform ------------------------- */
+
+#ifndef GL_HP_image_transform
+#define GL_HP_image_transform 1
+
+typedef void (GLAPIENTRY * PFNGLGETIMAGETRANSFORMPARAMETERFVHPPROC) (GLenum target, GLenum pname, const GLfloat* params);
+typedef void (GLAPIENTRY * PFNGLGETIMAGETRANSFORMPARAMETERIVHPPROC) (GLenum target, GLenum pname, const GLint* params);
+typedef void (GLAPIENTRY * PFNGLIMAGETRANSFORMPARAMETERFHPPROC) (GLenum target, GLenum pname, const GLfloat param);
+typedef void (GLAPIENTRY * PFNGLIMAGETRANSFORMPARAMETERFVHPPROC) (GLenum target, GLenum pname, const GLfloat* params);
+typedef void (GLAPIENTRY * PFNGLIMAGETRANSFORMPARAMETERIHPPROC) (GLenum target, GLenum pname, const GLint param);
+typedef void (GLAPIENTRY * PFNGLIMAGETRANSFORMPARAMETERIVHPPROC) (GLenum target, GLenum pname, const GLint* params);
+
+#define glGetImageTransformParameterfvHP GLEW_GET_FUN(__glewGetImageTransformParameterfvHP)
+#define glGetImageTransformParameterivHP GLEW_GET_FUN(__glewGetImageTransformParameterivHP)
+#define glImageTransformParameterfHP GLEW_GET_FUN(__glewImageTransformParameterfHP)
+#define glImageTransformParameterfvHP GLEW_GET_FUN(__glewImageTransformParameterfvHP)
+#define glImageTransformParameteriHP GLEW_GET_FUN(__glewImageTransformParameteriHP)
+#define glImageTransformParameterivHP GLEW_GET_FUN(__glewImageTransformParameterivHP)
+
+#define GLEW_HP_image_transform GLEW_GET_VAR(__GLEW_HP_image_transform)
+
+#endif /* GL_HP_image_transform */
+
+/* -------------------------- GL_HP_occlusion_test ------------------------- */
+
+#ifndef GL_HP_occlusion_test
+#define GL_HP_occlusion_test 1
+
+#define GLEW_HP_occlusion_test GLEW_GET_VAR(__GLEW_HP_occlusion_test)
+
+#endif /* GL_HP_occlusion_test */
+
+/* ------------------------- GL_HP_texture_lighting ------------------------ */
+
+#ifndef GL_HP_texture_lighting
+#define GL_HP_texture_lighting 1
+
+#define GLEW_HP_texture_lighting GLEW_GET_VAR(__GLEW_HP_texture_lighting)
+
+#endif /* GL_HP_texture_lighting */
+
+/* --------------------------- GL_IBM_cull_vertex -------------------------- */
+
+#ifndef GL_IBM_cull_vertex
+#define GL_IBM_cull_vertex 1
+
+#define GL_CULL_VERTEX_IBM 103050
+
+#define GLEW_IBM_cull_vertex GLEW_GET_VAR(__GLEW_IBM_cull_vertex)
+
+#endif /* GL_IBM_cull_vertex */
+
+/* ---------------------- GL_IBM_multimode_draw_arrays --------------------- */
+
+#ifndef GL_IBM_multimode_draw_arrays
+#define GL_IBM_multimode_draw_arrays 1
+
+typedef void (GLAPIENTRY * PFNGLMULTIMODEDRAWARRAYSIBMPROC) (const GLenum* mode, const GLint *first, const GLsizei *count, GLsizei primcount, GLint modestride);
+typedef void (GLAPIENTRY * PFNGLMULTIMODEDRAWELEMENTSIBMPROC) (const GLenum* mode, const GLsizei *count, GLenum type, const void *const *indices, GLsizei primcount, GLint modestride);
+
+#define glMultiModeDrawArraysIBM GLEW_GET_FUN(__glewMultiModeDrawArraysIBM)
+#define glMultiModeDrawElementsIBM GLEW_GET_FUN(__glewMultiModeDrawElementsIBM)
+
+#define GLEW_IBM_multimode_draw_arrays GLEW_GET_VAR(__GLEW_IBM_multimode_draw_arrays)
+
+#endif /* GL_IBM_multimode_draw_arrays */
+
+/* ------------------------- GL_IBM_rasterpos_clip ------------------------- */
+
+#ifndef GL_IBM_rasterpos_clip
+#define GL_IBM_rasterpos_clip 1
+
+#define GL_RASTER_POSITION_UNCLIPPED_IBM 103010
+
+#define GLEW_IBM_rasterpos_clip GLEW_GET_VAR(__GLEW_IBM_rasterpos_clip)
+
+#endif /* GL_IBM_rasterpos_clip */
+
+/* --------------------------- GL_IBM_static_data -------------------------- */
+
+#ifndef GL_IBM_static_data
+#define GL_IBM_static_data 1
+
+#define GL_ALL_STATIC_DATA_IBM 103060
+#define GL_STATIC_VERTEX_ARRAY_IBM 103061
+
+#define GLEW_IBM_static_data GLEW_GET_VAR(__GLEW_IBM_static_data)
+
+#endif /* GL_IBM_static_data */
+
+/* --------------------- GL_IBM_texture_mirrored_repeat -------------------- */
+
+#ifndef GL_IBM_texture_mirrored_repeat
+#define GL_IBM_texture_mirrored_repeat 1
+
+#define GL_MIRRORED_REPEAT_IBM 0x8370
+
+#define GLEW_IBM_texture_mirrored_repeat GLEW_GET_VAR(__GLEW_IBM_texture_mirrored_repeat)
+
+#endif /* GL_IBM_texture_mirrored_repeat */
+
+/* ----------------------- GL_IBM_vertex_array_lists ----------------------- */
+
+#ifndef GL_IBM_vertex_array_lists
+#define GL_IBM_vertex_array_lists 1
+
+#define GL_VERTEX_ARRAY_LIST_IBM 103070
+#define GL_NORMAL_ARRAY_LIST_IBM 103071
+#define GL_COLOR_ARRAY_LIST_IBM 103072
+#define GL_INDEX_ARRAY_LIST_IBM 103073
+#define GL_TEXTURE_COORD_ARRAY_LIST_IBM 103074
+#define GL_EDGE_FLAG_ARRAY_LIST_IBM 103075
+#define GL_FOG_COORDINATE_ARRAY_LIST_IBM 103076
+#define GL_SECONDARY_COLOR_ARRAY_LIST_IBM 103077
+#define GL_VERTEX_ARRAY_LIST_STRIDE_IBM 103080
+#define GL_NORMAL_ARRAY_LIST_STRIDE_IBM 103081
+#define GL_COLOR_ARRAY_LIST_STRIDE_IBM 103082
+#define GL_INDEX_ARRAY_LIST_STRIDE_IBM 103083
+#define GL_TEXTURE_COORD_ARRAY_LIST_STRIDE_IBM 103084
+#define GL_EDGE_FLAG_ARRAY_LIST_STRIDE_IBM 103085
+#define GL_FOG_COORDINATE_ARRAY_LIST_STRIDE_IBM 103086
+#define GL_SECONDARY_COLOR_ARRAY_LIST_STRIDE_IBM 103087
+
+typedef void (GLAPIENTRY * PFNGLCOLORPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const void** pointer, GLint ptrstride);
+typedef void (GLAPIENTRY * PFNGLEDGEFLAGPOINTERLISTIBMPROC) (GLint stride, const GLboolean ** pointer, GLint ptrstride);
+typedef void (GLAPIENTRY * PFNGLFOGCOORDPOINTERLISTIBMPROC) (GLenum type, GLint stride, const void** pointer, GLint ptrstride);
+typedef void (GLAPIENTRY * PFNGLINDEXPOINTERLISTIBMPROC) (GLenum type, GLint stride, const void** pointer, GLint ptrstride);
+typedef void (GLAPIENTRY * PFNGLNORMALPOINTERLISTIBMPROC) (GLenum type, GLint stride, const void** pointer, GLint ptrstride);
+typedef void (GLAPIENTRY * PFNGLSECONDARYCOLORPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const void** pointer, GLint ptrstride);
+typedef void (GLAPIENTRY * PFNGLTEXCOORDPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const void** pointer, GLint ptrstride);
+typedef void (GLAPIENTRY * PFNGLVERTEXPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const void** pointer, GLint ptrstride);
+
+#define glColorPointerListIBM GLEW_GET_FUN(__glewColorPointerListIBM)
+#define glEdgeFlagPointerListIBM GLEW_GET_FUN(__glewEdgeFlagPointerListIBM)
+#define glFogCoordPointerListIBM GLEW_GET_FUN(__glewFogCoordPointerListIBM)
+#define glIndexPointerListIBM GLEW_GET_FUN(__glewIndexPointerListIBM)
+#define glNormalPointerListIBM GLEW_GET_FUN(__glewNormalPointerListIBM)
+#define glSecondaryColorPointerListIBM GLEW_GET_FUN(__glewSecondaryColorPointerListIBM)
+#define glTexCoordPointerListIBM GLEW_GET_FUN(__glewTexCoordPointerListIBM)
+#define glVertexPointerListIBM GLEW_GET_FUN(__glewVertexPointerListIBM)
+
+#define GLEW_IBM_vertex_array_lists GLEW_GET_VAR(__GLEW_IBM_vertex_array_lists)
+
+#endif /* GL_IBM_vertex_array_lists */
+
+/* -------------------------- GL_INGR_color_clamp -------------------------- */
+
+#ifndef GL_INGR_color_clamp
+#define GL_INGR_color_clamp 1
+
+#define GL_RED_MIN_CLAMP_INGR 0x8560
+#define GL_GREEN_MIN_CLAMP_INGR 0x8561
+#define GL_BLUE_MIN_CLAMP_INGR 0x8562
+#define GL_ALPHA_MIN_CLAMP_INGR 0x8563
+#define GL_RED_MAX_CLAMP_INGR 0x8564
+#define GL_GREEN_MAX_CLAMP_INGR 0x8565
+#define GL_BLUE_MAX_CLAMP_INGR 0x8566
+#define GL_ALPHA_MAX_CLAMP_INGR 0x8567
+
+#define GLEW_INGR_color_clamp GLEW_GET_VAR(__GLEW_INGR_color_clamp)
+
+#endif /* GL_INGR_color_clamp */
+
+/* ------------------------- GL_INGR_interlace_read ------------------------ */
+
+#ifndef GL_INGR_interlace_read
+#define GL_INGR_interlace_read 1
+
+#define GL_INTERLACE_READ_INGR 0x8568
+
+#define GLEW_INGR_interlace_read GLEW_GET_VAR(__GLEW_INGR_interlace_read)
+
+#endif /* GL_INGR_interlace_read */
+
+/* ------------------- GL_INTEL_fragment_shader_ordering ------------------- */
+
+#ifndef GL_INTEL_fragment_shader_ordering
+#define GL_INTEL_fragment_shader_ordering 1
+
+#define GLEW_INTEL_fragment_shader_ordering GLEW_GET_VAR(__GLEW_INTEL_fragment_shader_ordering)
+
+#endif /* GL_INTEL_fragment_shader_ordering */
+
+/* -------------------------- GL_INTEL_map_texture ------------------------- */
+
+#ifndef GL_INTEL_map_texture
+#define GL_INTEL_map_texture 1
+
+#define GL_LAYOUT_DEFAULT_INTEL 0
+#define GL_LAYOUT_LINEAR_INTEL 1
+#define GL_LAYOUT_LINEAR_CPU_CACHED_INTEL 2
+#define GL_TEXTURE_MEMORY_LAYOUT_INTEL 0x83FF
+
+typedef void * (GLAPIENTRY * PFNGLMAPTEXTURE2DINTELPROC) (GLuint texture, GLint level, GLbitfield access, GLint* stride, GLenum *layout);
+typedef void (GLAPIENTRY * PFNGLSYNCTEXTUREINTELPROC) (GLuint texture);
+typedef void (GLAPIENTRY * PFNGLUNMAPTEXTURE2DINTELPROC) (GLuint texture, GLint level);
+
+#define glMapTexture2DINTEL GLEW_GET_FUN(__glewMapTexture2DINTEL)
+#define glSyncTextureINTEL GLEW_GET_FUN(__glewSyncTextureINTEL)
+#define glUnmapTexture2DINTEL GLEW_GET_FUN(__glewUnmapTexture2DINTEL)
+
+#define GLEW_INTEL_map_texture GLEW_GET_VAR(__GLEW_INTEL_map_texture)
+
+#endif /* GL_INTEL_map_texture */
+
+/* ------------------------ GL_INTEL_parallel_arrays ----------------------- */
+
+#ifndef GL_INTEL_parallel_arrays
+#define GL_INTEL_parallel_arrays 1
+
+#define GL_PARALLEL_ARRAYS_INTEL 0x83F4
+#define GL_VERTEX_ARRAY_PARALLEL_POINTERS_INTEL 0x83F5
+#define GL_NORMAL_ARRAY_PARALLEL_POINTERS_INTEL 0x83F6
+#define GL_COLOR_ARRAY_PARALLEL_POINTERS_INTEL 0x83F7
+#define GL_TEXTURE_COORD_ARRAY_PARALLEL_POINTERS_INTEL 0x83F8
+
+typedef void (GLAPIENTRY * PFNGLCOLORPOINTERVINTELPROC) (GLint size, GLenum type, const void** pointer);
+typedef void (GLAPIENTRY * PFNGLNORMALPOINTERVINTELPROC) (GLenum type, const void** pointer);
+typedef void (GLAPIENTRY * PFNGLTEXCOORDPOINTERVINTELPROC) (GLint size, GLenum type, const void** pointer);
+typedef void (GLAPIENTRY * PFNGLVERTEXPOINTERVINTELPROC) (GLint size, GLenum type, const void** pointer);
+
+#define glColorPointervINTEL GLEW_GET_FUN(__glewColorPointervINTEL)
+#define glNormalPointervINTEL GLEW_GET_FUN(__glewNormalPointervINTEL)
+#define glTexCoordPointervINTEL GLEW_GET_FUN(__glewTexCoordPointervINTEL)
+#define glVertexPointervINTEL GLEW_GET_FUN(__glewVertexPointervINTEL)
+
+#define GLEW_INTEL_parallel_arrays GLEW_GET_VAR(__GLEW_INTEL_parallel_arrays)
+
+#endif /* GL_INTEL_parallel_arrays */
+
+/* ----------------------- GL_INTEL_performance_query ---------------------- */
+
+#ifndef GL_INTEL_performance_query
+#define GL_INTEL_performance_query 1
+
+#define GL_PERFQUERY_SINGLE_CONTEXT_INTEL 0x0000
+#define GL_PERFQUERY_GLOBAL_CONTEXT_INTEL 0x0001
+#define GL_PERFQUERY_DONOT_FLUSH_INTEL 0x83F9
+#define GL_PERFQUERY_FLUSH_INTEL 0x83FA
+#define GL_PERFQUERY_WAIT_INTEL 0x83FB
+#define GL_PERFQUERY_COUNTER_EVENT_INTEL 0x94F0
+#define GL_PERFQUERY_COUNTER_DURATION_NORM_INTEL 0x94F1
+#define GL_PERFQUERY_COUNTER_DURATION_RAW_INTEL 0x94F2
+#define GL_PERFQUERY_COUNTER_THROUGHPUT_INTEL 0x94F3
+#define GL_PERFQUERY_COUNTER_RAW_INTEL 0x94F4
+#define GL_PERFQUERY_COUNTER_TIMESTAMP_INTEL 0x94F5
+#define GL_PERFQUERY_COUNTER_DATA_UINT32_INTEL 0x94F8
+#define GL_PERFQUERY_COUNTER_DATA_UINT64_INTEL 0x94F9
+#define GL_PERFQUERY_COUNTER_DATA_FLOAT_INTEL 0x94FA
+#define GL_PERFQUERY_COUNTER_DATA_DOUBLE_INTEL 0x94FB
+#define GL_PERFQUERY_COUNTER_DATA_BOOL32_INTEL 0x94FC
+#define GL_PERFQUERY_QUERY_NAME_LENGTH_MAX_INTEL 0x94FD
+#define GL_PERFQUERY_COUNTER_NAME_LENGTH_MAX_INTEL 0x94FE
+#define GL_PERFQUERY_COUNTER_DESC_LENGTH_MAX_INTEL 0x94FF
+#define GL_PERFQUERY_GPA_EXTENDED_COUNTERS_INTEL 0x9500
+
+typedef void (GLAPIENTRY * PFNGLBEGINPERFQUERYINTELPROC) (GLuint queryHandle);
+typedef void (GLAPIENTRY * PFNGLCREATEPERFQUERYINTELPROC) (GLuint queryId, GLuint* queryHandle);
+typedef void (GLAPIENTRY * PFNGLDELETEPERFQUERYINTELPROC) (GLuint queryHandle);
+typedef void (GLAPIENTRY * PFNGLENDPERFQUERYINTELPROC) (GLuint queryHandle);
+typedef void (GLAPIENTRY * PFNGLGETFIRSTPERFQUERYIDINTELPROC) (GLuint* queryId);
+typedef void (GLAPIENTRY * PFNGLGETNEXTPERFQUERYIDINTELPROC) (GLuint queryId, GLuint* nextQueryId);
+typedef void (GLAPIENTRY * PFNGLGETPERFCOUNTERINFOINTELPROC) (GLuint queryId, GLuint counterId, GLuint counterNameLength, GLchar* counterName, GLuint counterDescLength, GLchar *counterDesc, GLuint *counterOffset, GLuint *counterDataSize, GLuint *counterTypeEnum, GLuint *counterDataTypeEnum, GLuint64 *rawCounterMaxValue);
+typedef void (GLAPIENTRY * PFNGLGETPERFQUERYDATAINTELPROC) (GLuint queryHandle, GLuint flags, GLsizei dataSize, void *data, GLuint *bytesWritten);
+typedef void (GLAPIENTRY * PFNGLGETPERFQUERYIDBYNAMEINTELPROC) (GLchar* queryName, GLuint *queryId);
+typedef void (GLAPIENTRY * PFNGLGETPERFQUERYINFOINTELPROC) (GLuint queryId, GLuint queryNameLength, GLchar* queryName, GLuint *dataSize, GLuint *noCounters, GLuint *noInstances, GLuint *capsMask);
+
+#define glBeginPerfQueryINTEL GLEW_GET_FUN(__glewBeginPerfQueryINTEL)
+#define glCreatePerfQueryINTEL GLEW_GET_FUN(__glewCreatePerfQueryINTEL)
+#define glDeletePerfQueryINTEL GLEW_GET_FUN(__glewDeletePerfQueryINTEL)
+#define glEndPerfQueryINTEL GLEW_GET_FUN(__glewEndPerfQueryINTEL)
+#define glGetFirstPerfQueryIdINTEL GLEW_GET_FUN(__glewGetFirstPerfQueryIdINTEL)
+#define glGetNextPerfQueryIdINTEL GLEW_GET_FUN(__glewGetNextPerfQueryIdINTEL)
+#define glGetPerfCounterInfoINTEL GLEW_GET_FUN(__glewGetPerfCounterInfoINTEL)
+#define glGetPerfQueryDataINTEL GLEW_GET_FUN(__glewGetPerfQueryDataINTEL)
+#define glGetPerfQueryIdByNameINTEL GLEW_GET_FUN(__glewGetPerfQueryIdByNameINTEL)
+#define glGetPerfQueryInfoINTEL GLEW_GET_FUN(__glewGetPerfQueryInfoINTEL)
+
+#define GLEW_INTEL_performance_query GLEW_GET_VAR(__GLEW_INTEL_performance_query)
+
+#endif /* GL_INTEL_performance_query */
+
+/* ------------------------ GL_INTEL_texture_scissor ----------------------- */
+
+#ifndef GL_INTEL_texture_scissor
+#define GL_INTEL_texture_scissor 1
+
+typedef void (GLAPIENTRY * PFNGLTEXSCISSORFUNCINTELPROC) (GLenum target, GLenum lfunc, GLenum hfunc);
+typedef void (GLAPIENTRY * PFNGLTEXSCISSORINTELPROC) (GLenum target, GLclampf tlow, GLclampf thigh);
+
+#define glTexScissorFuncINTEL GLEW_GET_FUN(__glewTexScissorFuncINTEL)
+#define glTexScissorINTEL GLEW_GET_FUN(__glewTexScissorINTEL)
+
+#define GLEW_INTEL_texture_scissor GLEW_GET_VAR(__GLEW_INTEL_texture_scissor)
+
+#endif /* GL_INTEL_texture_scissor */
+
+/* --------------------- GL_KHR_blend_equation_advanced -------------------- */
+
+#ifndef GL_KHR_blend_equation_advanced
+#define GL_KHR_blend_equation_advanced 1
+
+#define GL_BLEND_ADVANCED_COHERENT_KHR 0x9285
+#define GL_MULTIPLY_KHR 0x9294
+#define GL_SCREEN_KHR 0x9295
+#define GL_OVERLAY_KHR 0x9296
+#define GL_DARKEN_KHR 0x9297
+#define GL_LIGHTEN_KHR 0x9298
+#define GL_COLORDODGE_KHR 0x9299
+#define GL_COLORBURN_KHR 0x929A
+#define GL_HARDLIGHT_KHR 0x929B
+#define GL_SOFTLIGHT_KHR 0x929C
+#define GL_DIFFERENCE_KHR 0x929E
+#define GL_EXCLUSION_KHR 0x92A0
+#define GL_HSL_HUE_KHR 0x92AD
+#define GL_HSL_SATURATION_KHR 0x92AE
+#define GL_HSL_COLOR_KHR 0x92AF
+#define GL_HSL_LUMINOSITY_KHR 0x92B0
+
+typedef void (GLAPIENTRY * PFNGLBLENDBARRIERKHRPROC) (void);
+
+#define glBlendBarrierKHR GLEW_GET_FUN(__glewBlendBarrierKHR)
+
+#define GLEW_KHR_blend_equation_advanced GLEW_GET_VAR(__GLEW_KHR_blend_equation_advanced)
+
+#endif /* GL_KHR_blend_equation_advanced */
+
+/* ---------------- GL_KHR_blend_equation_advanced_coherent ---------------- */
+
+#ifndef GL_KHR_blend_equation_advanced_coherent
+#define GL_KHR_blend_equation_advanced_coherent 1
+
+#define GLEW_KHR_blend_equation_advanced_coherent GLEW_GET_VAR(__GLEW_KHR_blend_equation_advanced_coherent)
+
+#endif /* GL_KHR_blend_equation_advanced_coherent */
+
+/* ---------------------- GL_KHR_context_flush_control --------------------- */
+
+#ifndef GL_KHR_context_flush_control
+#define GL_KHR_context_flush_control 1
+
+#define GL_CONTEXT_RELEASE_BEHAVIOR 0x82FB
+#define GL_CONTEXT_RELEASE_BEHAVIOR_FLUSH 0x82FC
+
+#define GLEW_KHR_context_flush_control GLEW_GET_VAR(__GLEW_KHR_context_flush_control)
+
+#endif /* GL_KHR_context_flush_control */
+
+/* ------------------------------ GL_KHR_debug ----------------------------- */
+
+#ifndef GL_KHR_debug
+#define GL_KHR_debug 1
+
+#define GL_CONTEXT_FLAG_DEBUG_BIT 0x00000002
+#define GL_STACK_OVERFLOW 0x0503
+#define GL_STACK_UNDERFLOW 0x0504
+#define GL_DEBUG_OUTPUT_SYNCHRONOUS 0x8242
+#define GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH 0x8243
+#define GL_DEBUG_CALLBACK_FUNCTION 0x8244
+#define GL_DEBUG_CALLBACK_USER_PARAM 0x8245
+#define GL_DEBUG_SOURCE_API 0x8246
+#define GL_DEBUG_SOURCE_WINDOW_SYSTEM 0x8247
+#define GL_DEBUG_SOURCE_SHADER_COMPILER 0x8248
+#define GL_DEBUG_SOURCE_THIRD_PARTY 0x8249
+#define GL_DEBUG_SOURCE_APPLICATION 0x824A
+#define GL_DEBUG_SOURCE_OTHER 0x824B
+#define GL_DEBUG_TYPE_ERROR 0x824C
+#define GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR 0x824D
+#define GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR 0x824E
+#define GL_DEBUG_TYPE_PORTABILITY 0x824F
+#define GL_DEBUG_TYPE_PERFORMANCE 0x8250
+#define GL_DEBUG_TYPE_OTHER 0x8251
+#define GL_DEBUG_TYPE_MARKER 0x8268
+#define GL_DEBUG_TYPE_PUSH_GROUP 0x8269
+#define GL_DEBUG_TYPE_POP_GROUP 0x826A
+#define GL_DEBUG_SEVERITY_NOTIFICATION 0x826B
+#define GL_MAX_DEBUG_GROUP_STACK_DEPTH 0x826C
+#define GL_DEBUG_GROUP_STACK_DEPTH 0x826D
+#define GL_BUFFER 0x82E0
+#define GL_SHADER 0x82E1
+#define GL_PROGRAM 0x82E2
+#define GL_QUERY 0x82E3
+#define GL_PROGRAM_PIPELINE 0x82E4
+#define GL_SAMPLER 0x82E6
+#define GL_DISPLAY_LIST 0x82E7
+#define GL_MAX_LABEL_LENGTH 0x82E8
+#define GL_MAX_DEBUG_MESSAGE_LENGTH 0x9143
+#define GL_MAX_DEBUG_LOGGED_MESSAGES 0x9144
+#define GL_DEBUG_LOGGED_MESSAGES 0x9145
+#define GL_DEBUG_SEVERITY_HIGH 0x9146
+#define GL_DEBUG_SEVERITY_MEDIUM 0x9147
+#define GL_DEBUG_SEVERITY_LOW 0x9148
+#define GL_DEBUG_OUTPUT 0x92E0
+
+typedef void (GLAPIENTRY *GLDEBUGPROC)(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar* message, const void* userParam);
+
+typedef void (GLAPIENTRY * PFNGLDEBUGMESSAGECALLBACKPROC) (GLDEBUGPROC callback, const void *userParam);
+typedef void (GLAPIENTRY * PFNGLDEBUGMESSAGECONTROLPROC) (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint* ids, GLboolean enabled);
+typedef void (GLAPIENTRY * PFNGLDEBUGMESSAGEINSERTPROC) (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar* buf);
+typedef GLuint (GLAPIENTRY * PFNGLGETDEBUGMESSAGELOGPROC) (GLuint count, GLsizei bufSize, GLenum* sources, GLenum* types, GLuint* ids, GLenum* severities, GLsizei* lengths, GLchar* messageLog);
+typedef void (GLAPIENTRY * PFNGLGETOBJECTLABELPROC) (GLenum identifier, GLuint name, GLsizei bufSize, GLsizei* length, GLchar *label);
+typedef void (GLAPIENTRY * PFNGLGETOBJECTPTRLABELPROC) (const void *ptr, GLsizei bufSize, GLsizei* length, GLchar *label);
+typedef void (GLAPIENTRY * PFNGLOBJECTLABELPROC) (GLenum identifier, GLuint name, GLsizei length, const GLchar* label);
+typedef void (GLAPIENTRY * PFNGLOBJECTPTRLABELPROC) (const void *ptr, GLsizei length, const GLchar* label);
+typedef void (GLAPIENTRY * PFNGLPOPDEBUGGROUPPROC) (void);
+typedef void (GLAPIENTRY * PFNGLPUSHDEBUGGROUPPROC) (GLenum source, GLuint id, GLsizei length, const GLchar * message);
+
+#define glDebugMessageCallback GLEW_GET_FUN(__glewDebugMessageCallback)
+#define glDebugMessageControl GLEW_GET_FUN(__glewDebugMessageControl)
+#define glDebugMessageInsert GLEW_GET_FUN(__glewDebugMessageInsert)
+#define glGetDebugMessageLog GLEW_GET_FUN(__glewGetDebugMessageLog)
+#define glGetObjectLabel GLEW_GET_FUN(__glewGetObjectLabel)
+#define glGetObjectPtrLabel GLEW_GET_FUN(__glewGetObjectPtrLabel)
+#define glObjectLabel GLEW_GET_FUN(__glewObjectLabel)
+#define glObjectPtrLabel GLEW_GET_FUN(__glewObjectPtrLabel)
+#define glPopDebugGroup GLEW_GET_FUN(__glewPopDebugGroup)
+#define glPushDebugGroup GLEW_GET_FUN(__glewPushDebugGroup)
+
+#define GLEW_KHR_debug GLEW_GET_VAR(__GLEW_KHR_debug)
+
+#endif /* GL_KHR_debug */
+
+/* ------------------ GL_KHR_robust_buffer_access_behavior ----------------- */
+
+#ifndef GL_KHR_robust_buffer_access_behavior
+#define GL_KHR_robust_buffer_access_behavior 1
+
+#define GLEW_KHR_robust_buffer_access_behavior GLEW_GET_VAR(__GLEW_KHR_robust_buffer_access_behavior)
+
+#endif /* GL_KHR_robust_buffer_access_behavior */
+
+/* --------------------------- GL_KHR_robustness --------------------------- */
+
+#ifndef GL_KHR_robustness
+#define GL_KHR_robustness 1
+
+#define GL_CONTEXT_LOST 0x0507
+#define GL_LOSE_CONTEXT_ON_RESET 0x8252
+#define GL_GUILTY_CONTEXT_RESET 0x8253
+#define GL_INNOCENT_CONTEXT_RESET 0x8254
+#define GL_UNKNOWN_CONTEXT_RESET 0x8255
+#define GL_RESET_NOTIFICATION_STRATEGY 0x8256
+#define GL_NO_RESET_NOTIFICATION 0x8261
+#define GL_CONTEXT_ROBUST_ACCESS 0x90F3
+
+typedef void (GLAPIENTRY * PFNGLGETNUNIFORMFVPROC) (GLuint program, GLint location, GLsizei bufSize, GLfloat* params);
+typedef void (GLAPIENTRY * PFNGLGETNUNIFORMIVPROC) (GLuint program, GLint location, GLsizei bufSize, GLint* params);
+typedef void (GLAPIENTRY * PFNGLGETNUNIFORMUIVPROC) (GLuint program, GLint location, GLsizei bufSize, GLuint* params);
+typedef void (GLAPIENTRY * PFNGLREADNPIXELSPROC) (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data);
+
+#define glGetnUniformfv GLEW_GET_FUN(__glewGetnUniformfv)
+#define glGetnUniformiv GLEW_GET_FUN(__glewGetnUniformiv)
+#define glGetnUniformuiv GLEW_GET_FUN(__glewGetnUniformuiv)
+#define glReadnPixels GLEW_GET_FUN(__glewReadnPixels)
+
+#define GLEW_KHR_robustness GLEW_GET_VAR(__GLEW_KHR_robustness)
+
+#endif /* GL_KHR_robustness */
+
+/* ------------------ GL_KHR_texture_compression_astc_hdr ------------------ */
+
+#ifndef GL_KHR_texture_compression_astc_hdr
+#define GL_KHR_texture_compression_astc_hdr 1
+
+#define GL_COMPRESSED_RGBA_ASTC_4x4_KHR 0x93B0
+#define GL_COMPRESSED_RGBA_ASTC_5x4_KHR 0x93B1
+#define GL_COMPRESSED_RGBA_ASTC_5x5_KHR 0x93B2
+#define GL_COMPRESSED_RGBA_ASTC_6x5_KHR 0x93B3
+#define GL_COMPRESSED_RGBA_ASTC_6x6_KHR 0x93B4
+#define GL_COMPRESSED_RGBA_ASTC_8x5_KHR 0x93B5
+#define GL_COMPRESSED_RGBA_ASTC_8x6_KHR 0x93B6
+#define GL_COMPRESSED_RGBA_ASTC_8x8_KHR 0x93B7
+#define GL_COMPRESSED_RGBA_ASTC_10x5_KHR 0x93B8
+#define GL_COMPRESSED_RGBA_ASTC_10x6_KHR 0x93B9
+#define GL_COMPRESSED_RGBA_ASTC_10x8_KHR 0x93BA
+#define GL_COMPRESSED_RGBA_ASTC_10x10_KHR 0x93BB
+#define GL_COMPRESSED_RGBA_ASTC_12x10_KHR 0x93BC
+#define GL_COMPRESSED_RGBA_ASTC_12x12_KHR 0x93BD
+#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR 0x93D0
+#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR 0x93D1
+#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR 0x93D2
+#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR 0x93D3
+#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR 0x93D4
+#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR 0x93D5
+#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR 0x93D6
+#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR 0x93D7
+#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR 0x93D8
+#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR 0x93D9
+#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR 0x93DA
+#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR 0x93DB
+#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR 0x93DC
+#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR 0x93DD
+
+#define GLEW_KHR_texture_compression_astc_hdr GLEW_GET_VAR(__GLEW_KHR_texture_compression_astc_hdr)
+
+#endif /* GL_KHR_texture_compression_astc_hdr */
+
+/* ------------------ GL_KHR_texture_compression_astc_ldr ------------------ */
+
+#ifndef GL_KHR_texture_compression_astc_ldr
+#define GL_KHR_texture_compression_astc_ldr 1
+
+#define GL_COMPRESSED_RGBA_ASTC_4x4_KHR 0x93B0
+#define GL_COMPRESSED_RGBA_ASTC_5x4_KHR 0x93B1
+#define GL_COMPRESSED_RGBA_ASTC_5x5_KHR 0x93B2
+#define GL_COMPRESSED_RGBA_ASTC_6x5_KHR 0x93B3
+#define GL_COMPRESSED_RGBA_ASTC_6x6_KHR 0x93B4
+#define GL_COMPRESSED_RGBA_ASTC_8x5_KHR 0x93B5
+#define GL_COMPRESSED_RGBA_ASTC_8x6_KHR 0x93B6
+#define GL_COMPRESSED_RGBA_ASTC_8x8_KHR 0x93B7
+#define GL_COMPRESSED_RGBA_ASTC_10x5_KHR 0x93B8
+#define GL_COMPRESSED_RGBA_ASTC_10x6_KHR 0x93B9
+#define GL_COMPRESSED_RGBA_ASTC_10x8_KHR 0x93BA
+#define GL_COMPRESSED_RGBA_ASTC_10x10_KHR 0x93BB
+#define GL_COMPRESSED_RGBA_ASTC_12x10_KHR 0x93BC
+#define GL_COMPRESSED_RGBA_ASTC_12x12_KHR 0x93BD
+#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR 0x93D0
+#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR 0x93D1
+#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR 0x93D2
+#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR 0x93D3
+#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR 0x93D4
+#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR 0x93D5
+#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR 0x93D6
+#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR 0x93D7
+#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR 0x93D8
+#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR 0x93D9
+#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR 0x93DA
+#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR 0x93DB
+#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR 0x93DC
+#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR 0x93DD
+
+#define GLEW_KHR_texture_compression_astc_ldr GLEW_GET_VAR(__GLEW_KHR_texture_compression_astc_ldr)
+
+#endif /* GL_KHR_texture_compression_astc_ldr */
+
+/* -------------------------- GL_KTX_buffer_region ------------------------- */
+
+#ifndef GL_KTX_buffer_region
+#define GL_KTX_buffer_region 1
+
+#define GL_KTX_FRONT_REGION 0x0
+#define GL_KTX_BACK_REGION 0x1
+#define GL_KTX_Z_REGION 0x2
+#define GL_KTX_STENCIL_REGION 0x3
+
+typedef GLuint (GLAPIENTRY * PFNGLBUFFERREGIONENABLEDPROC) (void);
+typedef void (GLAPIENTRY * PFNGLDELETEBUFFERREGIONPROC) (GLenum region);
+typedef void (GLAPIENTRY * PFNGLDRAWBUFFERREGIONPROC) (GLuint region, GLint x, GLint y, GLsizei width, GLsizei height, GLint xDest, GLint yDest);
+typedef GLuint (GLAPIENTRY * PFNGLNEWBUFFERREGIONPROC) (GLenum region);
+typedef void (GLAPIENTRY * PFNGLREADBUFFERREGIONPROC) (GLuint region, GLint x, GLint y, GLsizei width, GLsizei height);
+
+#define glBufferRegionEnabled GLEW_GET_FUN(__glewBufferRegionEnabled)
+#define glDeleteBufferRegion GLEW_GET_FUN(__glewDeleteBufferRegion)
+#define glDrawBufferRegion GLEW_GET_FUN(__glewDrawBufferRegion)
+#define glNewBufferRegion GLEW_GET_FUN(__glewNewBufferRegion)
+#define glReadBufferRegion GLEW_GET_FUN(__glewReadBufferRegion)
+
+#define GLEW_KTX_buffer_region GLEW_GET_VAR(__GLEW_KTX_buffer_region)
+
+#endif /* GL_KTX_buffer_region */
+
+/* ------------------------- GL_MESAX_texture_stack ------------------------ */
+
+#ifndef GL_MESAX_texture_stack
+#define GL_MESAX_texture_stack 1
+
+#define GL_TEXTURE_1D_STACK_MESAX 0x8759
+#define GL_TEXTURE_2D_STACK_MESAX 0x875A
+#define GL_PROXY_TEXTURE_1D_STACK_MESAX 0x875B
+#define GL_PROXY_TEXTURE_2D_STACK_MESAX 0x875C
+#define GL_TEXTURE_1D_STACK_BINDING_MESAX 0x875D
+#define GL_TEXTURE_2D_STACK_BINDING_MESAX 0x875E
+
+#define GLEW_MESAX_texture_stack GLEW_GET_VAR(__GLEW_MESAX_texture_stack)
+
+#endif /* GL_MESAX_texture_stack */
+
+/* -------------------------- GL_MESA_pack_invert -------------------------- */
+
+#ifndef GL_MESA_pack_invert
+#define GL_MESA_pack_invert 1
+
+#define GL_PACK_INVERT_MESA 0x8758
+
+#define GLEW_MESA_pack_invert GLEW_GET_VAR(__GLEW_MESA_pack_invert)
+
+#endif /* GL_MESA_pack_invert */
+
+/* ------------------------- GL_MESA_resize_buffers ------------------------ */
+
+#ifndef GL_MESA_resize_buffers
+#define GL_MESA_resize_buffers 1
+
+typedef void (GLAPIENTRY * PFNGLRESIZEBUFFERSMESAPROC) (void);
+
+#define glResizeBuffersMESA GLEW_GET_FUN(__glewResizeBuffersMESA)
+
+#define GLEW_MESA_resize_buffers GLEW_GET_VAR(__GLEW_MESA_resize_buffers)
+
+#endif /* GL_MESA_resize_buffers */
+
+/* --------------------------- GL_MESA_window_pos -------------------------- */
+
+#ifndef GL_MESA_window_pos
+#define GL_MESA_window_pos 1
+
+typedef void (GLAPIENTRY * PFNGLWINDOWPOS2DMESAPROC) (GLdouble x, GLdouble y);
+typedef void (GLAPIENTRY * PFNGLWINDOWPOS2DVMESAPROC) (const GLdouble* p);
+typedef void (GLAPIENTRY * PFNGLWINDOWPOS2FMESAPROC) (GLfloat x, GLfloat y);
+typedef void (GLAPIENTRY * PFNGLWINDOWPOS2FVMESAPROC) (const GLfloat* p);
+typedef void (GLAPIENTRY * PFNGLWINDOWPOS2IMESAPROC) (GLint x, GLint y);
+typedef void (GLAPIENTRY * PFNGLWINDOWPOS2IVMESAPROC) (const GLint* p);
+typedef void (GLAPIENTRY * PFNGLWINDOWPOS2SMESAPROC) (GLshort x, GLshort y);
+typedef void (GLAPIENTRY * PFNGLWINDOWPOS2SVMESAPROC) (const GLshort* p);
+typedef void (GLAPIENTRY * PFNGLWINDOWPOS3DMESAPROC) (GLdouble x, GLdouble y, GLdouble z);
+typedef void (GLAPIENTRY * PFNGLWINDOWPOS3DVMESAPROC) (const GLdouble* p);
+typedef void (GLAPIENTRY * PFNGLWINDOWPOS3FMESAPROC) (GLfloat x, GLfloat y, GLfloat z);
+typedef void (GLAPIENTRY * PFNGLWINDOWPOS3FVMESAPROC) (const GLfloat* p);
+typedef void (GLAPIENTRY * PFNGLWINDOWPOS3IMESAPROC) (GLint x, GLint y, GLint z);
+typedef void (GLAPIENTRY * PFNGLWINDOWPOS3IVMESAPROC) (const GLint* p);
+typedef void (GLAPIENTRY * PFNGLWINDOWPOS3SMESAPROC) (GLshort x, GLshort y, GLshort z);
+typedef void (GLAPIENTRY * PFNGLWINDOWPOS3SVMESAPROC) (const GLshort* p);
+typedef void (GLAPIENTRY * PFNGLWINDOWPOS4DMESAPROC) (GLdouble x, GLdouble y, GLdouble z, GLdouble);
+typedef void (GLAPIENTRY * PFNGLWINDOWPOS4DVMESAPROC) (const GLdouble* p);
+typedef void (GLAPIENTRY * PFNGLWINDOWPOS4FMESAPROC) (GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+typedef void (GLAPIENTRY * PFNGLWINDOWPOS4FVMESAPROC) (const GLfloat* p);
+typedef void (GLAPIENTRY * PFNGLWINDOWPOS4IMESAPROC) (GLint x, GLint y, GLint z, GLint w);
+typedef void (GLAPIENTRY * PFNGLWINDOWPOS4IVMESAPROC) (const GLint* p);
+typedef void (GLAPIENTRY * PFNGLWINDOWPOS4SMESAPROC) (GLshort x, GLshort y, GLshort z, GLshort w);
+typedef void (GLAPIENTRY * PFNGLWINDOWPOS4SVMESAPROC) (const GLshort* p);
+
+#define glWindowPos2dMESA GLEW_GET_FUN(__glewWindowPos2dMESA)
+#define glWindowPos2dvMESA GLEW_GET_FUN(__glewWindowPos2dvMESA)
+#define glWindowPos2fMESA GLEW_GET_FUN(__glewWindowPos2fMESA)
+#define glWindowPos2fvMESA GLEW_GET_FUN(__glewWindowPos2fvMESA)
+#define glWindowPos2iMESA GLEW_GET_FUN(__glewWindowPos2iMESA)
+#define glWindowPos2ivMESA GLEW_GET_FUN(__glewWindowPos2ivMESA)
+#define glWindowPos2sMESA GLEW_GET_FUN(__glewWindowPos2sMESA)
+#define glWindowPos2svMESA GLEW_GET_FUN(__glewWindowPos2svMESA)
+#define glWindowPos3dMESA GLEW_GET_FUN(__glewWindowPos3dMESA)
+#define glWindowPos3dvMESA GLEW_GET_FUN(__glewWindowPos3dvMESA)
+#define glWindowPos3fMESA GLEW_GET_FUN(__glewWindowPos3fMESA)
+#define glWindowPos3fvMESA GLEW_GET_FUN(__glewWindowPos3fvMESA)
+#define glWindowPos3iMESA GLEW_GET_FUN(__glewWindowPos3iMESA)
+#define glWindowPos3ivMESA GLEW_GET_FUN(__glewWindowPos3ivMESA)
+#define glWindowPos3sMESA GLEW_GET_FUN(__glewWindowPos3sMESA)
+#define glWindowPos3svMESA GLEW_GET_FUN(__glewWindowPos3svMESA)
+#define glWindowPos4dMESA GLEW_GET_FUN(__glewWindowPos4dMESA)
+#define glWindowPos4dvMESA GLEW_GET_FUN(__glewWindowPos4dvMESA)
+#define glWindowPos4fMESA GLEW_GET_FUN(__glewWindowPos4fMESA)
+#define glWindowPos4fvMESA GLEW_GET_FUN(__glewWindowPos4fvMESA)
+#define glWindowPos4iMESA GLEW_GET_FUN(__glewWindowPos4iMESA)
+#define glWindowPos4ivMESA GLEW_GET_FUN(__glewWindowPos4ivMESA)
+#define glWindowPos4sMESA GLEW_GET_FUN(__glewWindowPos4sMESA)
+#define glWindowPos4svMESA GLEW_GET_FUN(__glewWindowPos4svMESA)
+
+#define GLEW_MESA_window_pos GLEW_GET_VAR(__GLEW_MESA_window_pos)
+
+#endif /* GL_MESA_window_pos */
+
+/* ------------------------- GL_MESA_ycbcr_texture ------------------------- */
+
+#ifndef GL_MESA_ycbcr_texture
+#define GL_MESA_ycbcr_texture 1
+
+#define GL_UNSIGNED_SHORT_8_8_MESA 0x85BA
+#define GL_UNSIGNED_SHORT_8_8_REV_MESA 0x85BB
+#define GL_YCBCR_MESA 0x8757
+
+#define GLEW_MESA_ycbcr_texture GLEW_GET_VAR(__GLEW_MESA_ycbcr_texture)
+
+#endif /* GL_MESA_ycbcr_texture */
+
+/* ----------------------- GL_NVX_conditional_render ----------------------- */
+
+#ifndef GL_NVX_conditional_render
+#define GL_NVX_conditional_render 1
+
+typedef void (GLAPIENTRY * PFNGLBEGINCONDITIONALRENDERNVXPROC) (GLuint id);
+typedef void (GLAPIENTRY * PFNGLENDCONDITIONALRENDERNVXPROC) (void);
+
+#define glBeginConditionalRenderNVX GLEW_GET_FUN(__glewBeginConditionalRenderNVX)
+#define glEndConditionalRenderNVX GLEW_GET_FUN(__glewEndConditionalRenderNVX)
+
+#define GLEW_NVX_conditional_render GLEW_GET_VAR(__GLEW_NVX_conditional_render)
+
+#endif /* GL_NVX_conditional_render */
+
+/* ------------------------- GL_NVX_gpu_memory_info ------------------------ */
+
+#ifndef GL_NVX_gpu_memory_info
+#define GL_NVX_gpu_memory_info 1
+
+#define GL_GPU_MEMORY_INFO_DEDICATED_VIDMEM_NVX 0x9047
+#define GL_GPU_MEMORY_INFO_TOTAL_AVAILABLE_MEMORY_NVX 0x9048
+#define GL_GPU_MEMORY_INFO_CURRENT_AVAILABLE_VIDMEM_NVX 0x9049
+#define GL_GPU_MEMORY_INFO_EVICTION_COUNT_NVX 0x904A
+#define GL_GPU_MEMORY_INFO_EVICTED_MEMORY_NVX 0x904B
+
+#define GLEW_NVX_gpu_memory_info GLEW_GET_VAR(__GLEW_NVX_gpu_memory_info)
+
+#endif /* GL_NVX_gpu_memory_info */
+
+/* ------------------- GL_NV_bindless_multi_draw_indirect ------------------ */
+
+#ifndef GL_NV_bindless_multi_draw_indirect
+#define GL_NV_bindless_multi_draw_indirect 1
+
+typedef void (GLAPIENTRY * PFNGLMULTIDRAWARRAYSINDIRECTBINDLESSNVPROC) (GLenum mode, const void *indirect, GLsizei drawCount, GLsizei stride, GLint vertexBufferCount);
+typedef void (GLAPIENTRY * PFNGLMULTIDRAWELEMENTSINDIRECTBINDLESSNVPROC) (GLenum mode, GLenum type, const void *indirect, GLsizei drawCount, GLsizei stride, GLint vertexBufferCount);
+
+#define glMultiDrawArraysIndirectBindlessNV GLEW_GET_FUN(__glewMultiDrawArraysIndirectBindlessNV)
+#define glMultiDrawElementsIndirectBindlessNV GLEW_GET_FUN(__glewMultiDrawElementsIndirectBindlessNV)
+
+#define GLEW_NV_bindless_multi_draw_indirect GLEW_GET_VAR(__GLEW_NV_bindless_multi_draw_indirect)
+
+#endif /* GL_NV_bindless_multi_draw_indirect */
+
+/* ---------------- GL_NV_bindless_multi_draw_indirect_count --------------- */
+
+#ifndef GL_NV_bindless_multi_draw_indirect_count
+#define GL_NV_bindless_multi_draw_indirect_count 1
+
+typedef void (GLAPIENTRY * PFNGLMULTIDRAWARRAYSINDIRECTBINDLESSCOUNTNVPROC) (GLenum mode, const void *indirect, GLintptr drawCount, GLsizei maxDrawCount, GLsizei stride, GLint vertexBufferCount);
+typedef void (GLAPIENTRY * PFNGLMULTIDRAWELEMENTSINDIRECTBINDLESSCOUNTNVPROC) (GLenum mode, GLenum type, const void *indirect, GLintptr drawCount, GLsizei maxDrawCount, GLsizei stride, GLint vertexBufferCount);
+
+#define glMultiDrawArraysIndirectBindlessCountNV GLEW_GET_FUN(__glewMultiDrawArraysIndirectBindlessCountNV)
+#define glMultiDrawElementsIndirectBindlessCountNV GLEW_GET_FUN(__glewMultiDrawElementsIndirectBindlessCountNV)
+
+#define GLEW_NV_bindless_multi_draw_indirect_count GLEW_GET_VAR(__GLEW_NV_bindless_multi_draw_indirect_count)
+
+#endif /* GL_NV_bindless_multi_draw_indirect_count */
+
+/* ------------------------- GL_NV_bindless_texture ------------------------ */
+
+#ifndef GL_NV_bindless_texture
+#define GL_NV_bindless_texture 1
+
+typedef GLuint64 (GLAPIENTRY * PFNGLGETIMAGEHANDLENVPROC) (GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum format);
+typedef GLuint64 (GLAPIENTRY * PFNGLGETTEXTUREHANDLENVPROC) (GLuint texture);
+typedef GLuint64 (GLAPIENTRY * PFNGLGETTEXTURESAMPLERHANDLENVPROC) (GLuint texture, GLuint sampler);
+typedef GLboolean (GLAPIENTRY * PFNGLISIMAGEHANDLERESIDENTNVPROC) (GLuint64 handle);
+typedef GLboolean (GLAPIENTRY * PFNGLISTEXTUREHANDLERESIDENTNVPROC) (GLuint64 handle);
+typedef void (GLAPIENTRY * PFNGLMAKEIMAGEHANDLENONRESIDENTNVPROC) (GLuint64 handle);
+typedef void (GLAPIENTRY * PFNGLMAKEIMAGEHANDLERESIDENTNVPROC) (GLuint64 handle, GLenum access);
+typedef void (GLAPIENTRY * PFNGLMAKETEXTUREHANDLENONRESIDENTNVPROC) (GLuint64 handle);
+typedef void (GLAPIENTRY * PFNGLMAKETEXTUREHANDLERESIDENTNVPROC) (GLuint64 handle);
+typedef void (GLAPIENTRY * PFNGLPROGRAMUNIFORMHANDLEUI64NVPROC) (GLuint program, GLint location, GLuint64 value);
+typedef void (GLAPIENTRY * PFNGLPROGRAMUNIFORMHANDLEUI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64* values);
+typedef void (GLAPIENTRY * PFNGLUNIFORMHANDLEUI64NVPROC) (GLint location, GLuint64 value);
+typedef void (GLAPIENTRY * PFNGLUNIFORMHANDLEUI64VNVPROC) (GLint location, GLsizei count, const GLuint64* value);
+
+#define glGetImageHandleNV GLEW_GET_FUN(__glewGetImageHandleNV)
+#define glGetTextureHandleNV GLEW_GET_FUN(__glewGetTextureHandleNV)
+#define glGetTextureSamplerHandleNV GLEW_GET_FUN(__glewGetTextureSamplerHandleNV)
+#define glIsImageHandleResidentNV GLEW_GET_FUN(__glewIsImageHandleResidentNV)
+#define glIsTextureHandleResidentNV GLEW_GET_FUN(__glewIsTextureHandleResidentNV)
+#define glMakeImageHandleNonResidentNV GLEW_GET_FUN(__glewMakeImageHandleNonResidentNV)
+#define glMakeImageHandleResidentNV GLEW_GET_FUN(__glewMakeImageHandleResidentNV)
+#define glMakeTextureHandleNonResidentNV GLEW_GET_FUN(__glewMakeTextureHandleNonResidentNV)
+#define glMakeTextureHandleResidentNV GLEW_GET_FUN(__glewMakeTextureHandleResidentNV)
+#define glProgramUniformHandleui64NV GLEW_GET_FUN(__glewProgramUniformHandleui64NV)
+#define glProgramUniformHandleui64vNV GLEW_GET_FUN(__glewProgramUniformHandleui64vNV)
+#define glUniformHandleui64NV GLEW_GET_FUN(__glewUniformHandleui64NV)
+#define glUniformHandleui64vNV GLEW_GET_FUN(__glewUniformHandleui64vNV)
+
+#define GLEW_NV_bindless_texture GLEW_GET_VAR(__GLEW_NV_bindless_texture)
+
+#endif /* GL_NV_bindless_texture */
+
+/* --------------------- GL_NV_blend_equation_advanced --------------------- */
+
+#ifndef GL_NV_blend_equation_advanced
+#define GL_NV_blend_equation_advanced 1
+
+#define GL_XOR_NV 0x1506
+#define GL_RED_NV 0x1903
+#define GL_GREEN_NV 0x1904
+#define GL_BLUE_NV 0x1905
+#define GL_BLEND_PREMULTIPLIED_SRC_NV 0x9280
+#define GL_BLEND_OVERLAP_NV 0x9281
+#define GL_UNCORRELATED_NV 0x9282
+#define GL_DISJOINT_NV 0x9283
+#define GL_CONJOINT_NV 0x9284
+#define GL_BLEND_ADVANCED_COHERENT_NV 0x9285
+#define GL_SRC_NV 0x9286
+#define GL_DST_NV 0x9287
+#define GL_SRC_OVER_NV 0x9288
+#define GL_DST_OVER_NV 0x9289
+#define GL_SRC_IN_NV 0x928A
+#define GL_DST_IN_NV 0x928B
+#define GL_SRC_OUT_NV 0x928C
+#define GL_DST_OUT_NV 0x928D
+#define GL_SRC_ATOP_NV 0x928E
+#define GL_DST_ATOP_NV 0x928F
+#define GL_PLUS_NV 0x9291
+#define GL_PLUS_DARKER_NV 0x9292
+#define GL_MULTIPLY_NV 0x9294
+#define GL_SCREEN_NV 0x9295
+#define GL_OVERLAY_NV 0x9296
+#define GL_DARKEN_NV 0x9297
+#define GL_LIGHTEN_NV 0x9298
+#define GL_COLORDODGE_NV 0x9299
+#define GL_COLORBURN_NV 0x929A
+#define GL_HARDLIGHT_NV 0x929B
+#define GL_SOFTLIGHT_NV 0x929C
+#define GL_DIFFERENCE_NV 0x929E
+#define GL_MINUS_NV 0x929F
+#define GL_EXCLUSION_NV 0x92A0
+#define GL_CONTRAST_NV 0x92A1
+#define GL_INVERT_RGB_NV 0x92A3
+#define GL_LINEARDODGE_NV 0x92A4
+#define GL_LINEARBURN_NV 0x92A5
+#define GL_VIVIDLIGHT_NV 0x92A6
+#define GL_LINEARLIGHT_NV 0x92A7
+#define GL_PINLIGHT_NV 0x92A8
+#define GL_HARDMIX_NV 0x92A9
+#define GL_HSL_HUE_NV 0x92AD
+#define GL_HSL_SATURATION_NV 0x92AE
+#define GL_HSL_COLOR_NV 0x92AF
+#define GL_HSL_LUMINOSITY_NV 0x92B0
+#define GL_PLUS_CLAMPED_NV 0x92B1
+#define GL_PLUS_CLAMPED_ALPHA_NV 0x92B2
+#define GL_MINUS_CLAMPED_NV 0x92B3
+#define GL_INVERT_OVG_NV 0x92B4
+
+typedef void (GLAPIENTRY * PFNGLBLENDBARRIERNVPROC) (void);
+typedef void (GLAPIENTRY * PFNGLBLENDPARAMETERINVPROC) (GLenum pname, GLint value);
+
+#define glBlendBarrierNV GLEW_GET_FUN(__glewBlendBarrierNV)
+#define glBlendParameteriNV GLEW_GET_FUN(__glewBlendParameteriNV)
+
+#define GLEW_NV_blend_equation_advanced GLEW_GET_VAR(__GLEW_NV_blend_equation_advanced)
+
+#endif /* GL_NV_blend_equation_advanced */
+
+/* ----------------- GL_NV_blend_equation_advanced_coherent ---------------- */
+
+#ifndef GL_NV_blend_equation_advanced_coherent
+#define GL_NV_blend_equation_advanced_coherent 1
+
+#define GLEW_NV_blend_equation_advanced_coherent GLEW_GET_VAR(__GLEW_NV_blend_equation_advanced_coherent)
+
+#endif /* GL_NV_blend_equation_advanced_coherent */
+
+/* --------------------------- GL_NV_blend_square -------------------------- */
+
+#ifndef GL_NV_blend_square
+#define GL_NV_blend_square 1
+
+#define GLEW_NV_blend_square GLEW_GET_VAR(__GLEW_NV_blend_square)
+
+#endif /* GL_NV_blend_square */
+
+/* ------------------------- GL_NV_compute_program5 ------------------------ */
+
+#ifndef GL_NV_compute_program5
+#define GL_NV_compute_program5 1
+
+#define GL_COMPUTE_PROGRAM_NV 0x90FB
+#define GL_COMPUTE_PROGRAM_PARAMETER_BUFFER_NV 0x90FC
+
+#define GLEW_NV_compute_program5 GLEW_GET_VAR(__GLEW_NV_compute_program5)
+
+#endif /* GL_NV_compute_program5 */
+
+/* ------------------------ GL_NV_conditional_render ----------------------- */
+
+#ifndef GL_NV_conditional_render
+#define GL_NV_conditional_render 1
+
+#define GL_QUERY_WAIT_NV 0x8E13
+#define GL_QUERY_NO_WAIT_NV 0x8E14
+#define GL_QUERY_BY_REGION_WAIT_NV 0x8E15
+#define GL_QUERY_BY_REGION_NO_WAIT_NV 0x8E16
+
+typedef void (GLAPIENTRY * PFNGLBEGINCONDITIONALRENDERNVPROC) (GLuint id, GLenum mode);
+typedef void (GLAPIENTRY * PFNGLENDCONDITIONALRENDERNVPROC) (void);
+
+#define glBeginConditionalRenderNV GLEW_GET_FUN(__glewBeginConditionalRenderNV)
+#define glEndConditionalRenderNV GLEW_GET_FUN(__glewEndConditionalRenderNV)
+
+#define GLEW_NV_conditional_render GLEW_GET_VAR(__GLEW_NV_conditional_render)
+
+#endif /* GL_NV_conditional_render */
+
+/* ----------------------- GL_NV_conservative_raster ----------------------- */
+
+#ifndef GL_NV_conservative_raster
+#define GL_NV_conservative_raster 1
+
+#define GL_CONSERVATIVE_RASTERIZATION_NV 0x9346
+#define GL_SUBPIXEL_PRECISION_BIAS_X_BITS_NV 0x9347
+#define GL_SUBPIXEL_PRECISION_BIAS_Y_BITS_NV 0x9348
+#define GL_MAX_SUBPIXEL_PRECISION_BIAS_BITS_NV 0x9349
+
+typedef void (GLAPIENTRY * PFNGLSUBPIXELPRECISIONBIASNVPROC) (GLuint xbits, GLuint ybits);
+
+#define glSubpixelPrecisionBiasNV GLEW_GET_FUN(__glewSubpixelPrecisionBiasNV)
+
+#define GLEW_NV_conservative_raster GLEW_GET_VAR(__GLEW_NV_conservative_raster)
+
+#endif /* GL_NV_conservative_raster */
+
+/* ----------------------- GL_NV_copy_depth_to_color ----------------------- */
+
+#ifndef GL_NV_copy_depth_to_color
+#define GL_NV_copy_depth_to_color 1
+
+#define GL_DEPTH_STENCIL_TO_RGBA_NV 0x886E
+#define GL_DEPTH_STENCIL_TO_BGRA_NV 0x886F
+
+#define GLEW_NV_copy_depth_to_color GLEW_GET_VAR(__GLEW_NV_copy_depth_to_color)
+
+#endif /* GL_NV_copy_depth_to_color */
+
+/* ---------------------------- GL_NV_copy_image --------------------------- */
+
+#ifndef GL_NV_copy_image
+#define GL_NV_copy_image 1
+
+typedef void (GLAPIENTRY * PFNGLCOPYIMAGESUBDATANVPROC) (GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei width, GLsizei height, GLsizei depth);
+
+#define glCopyImageSubDataNV GLEW_GET_FUN(__glewCopyImageSubDataNV)
+
+#define GLEW_NV_copy_image GLEW_GET_VAR(__GLEW_NV_copy_image)
+
+#endif /* GL_NV_copy_image */
+
+/* -------------------------- GL_NV_deep_texture3D ------------------------- */
+
+#ifndef GL_NV_deep_texture3D
+#define GL_NV_deep_texture3D 1
+
+#define GL_MAX_DEEP_3D_TEXTURE_WIDTH_HEIGHT_NV 0x90D0
+#define GL_MAX_DEEP_3D_TEXTURE_DEPTH_NV 0x90D1
+
+#define GLEW_NV_deep_texture3D GLEW_GET_VAR(__GLEW_NV_deep_texture3D)
+
+#endif /* GL_NV_deep_texture3D */
+
+/* ------------------------ GL_NV_depth_buffer_float ----------------------- */
+
+#ifndef GL_NV_depth_buffer_float
+#define GL_NV_depth_buffer_float 1
+
+#define GL_DEPTH_COMPONENT32F_NV 0x8DAB
+#define GL_DEPTH32F_STENCIL8_NV 0x8DAC
+#define GL_FLOAT_32_UNSIGNED_INT_24_8_REV_NV 0x8DAD
+#define GL_DEPTH_BUFFER_FLOAT_MODE_NV 0x8DAF
+
+typedef void (GLAPIENTRY * PFNGLCLEARDEPTHDNVPROC) (GLdouble depth);
+typedef void (GLAPIENTRY * PFNGLDEPTHBOUNDSDNVPROC) (GLdouble zmin, GLdouble zmax);
+typedef void (GLAPIENTRY * PFNGLDEPTHRANGEDNVPROC) (GLdouble zNear, GLdouble zFar);
+
+#define glClearDepthdNV GLEW_GET_FUN(__glewClearDepthdNV)
+#define glDepthBoundsdNV GLEW_GET_FUN(__glewDepthBoundsdNV)
+#define glDepthRangedNV GLEW_GET_FUN(__glewDepthRangedNV)
+
+#define GLEW_NV_depth_buffer_float GLEW_GET_VAR(__GLEW_NV_depth_buffer_float)
+
+#endif /* GL_NV_depth_buffer_float */
+
+/* --------------------------- GL_NV_depth_clamp --------------------------- */
+
+#ifndef GL_NV_depth_clamp
+#define GL_NV_depth_clamp 1
+
+#define GL_DEPTH_CLAMP_NV 0x864F
+
+#define GLEW_NV_depth_clamp GLEW_GET_VAR(__GLEW_NV_depth_clamp)
+
+#endif /* GL_NV_depth_clamp */
+
+/* ---------------------- GL_NV_depth_range_unclamped ---------------------- */
+
+#ifndef GL_NV_depth_range_unclamped
+#define GL_NV_depth_range_unclamped 1
+
+#define GL_SAMPLE_COUNT_BITS_NV 0x8864
+#define GL_CURRENT_SAMPLE_COUNT_QUERY_NV 0x8865
+#define GL_QUERY_RESULT_NV 0x8866
+#define GL_QUERY_RESULT_AVAILABLE_NV 0x8867
+#define GL_SAMPLE_COUNT_NV 0x8914
+
+#define GLEW_NV_depth_range_unclamped GLEW_GET_VAR(__GLEW_NV_depth_range_unclamped)
+
+#endif /* GL_NV_depth_range_unclamped */
+
+/* --------------------------- GL_NV_draw_texture -------------------------- */
+
+#ifndef GL_NV_draw_texture
+#define GL_NV_draw_texture 1
+
+typedef void (GLAPIENTRY * PFNGLDRAWTEXTURENVPROC) (GLuint texture, GLuint sampler, GLfloat x0, GLfloat y0, GLfloat x1, GLfloat y1, GLfloat z, GLfloat s0, GLfloat t0, GLfloat s1, GLfloat t1);
+
+#define glDrawTextureNV GLEW_GET_FUN(__glewDrawTextureNV)
+
+#define GLEW_NV_draw_texture GLEW_GET_VAR(__GLEW_NV_draw_texture)
+
+#endif /* GL_NV_draw_texture */
+
+/* ---------------------------- GL_NV_evaluators --------------------------- */
+
+#ifndef GL_NV_evaluators
+#define GL_NV_evaluators 1
+
+#define GL_EVAL_2D_NV 0x86C0
+#define GL_EVAL_TRIANGULAR_2D_NV 0x86C1
+#define GL_MAP_TESSELLATION_NV 0x86C2
+#define GL_MAP_ATTRIB_U_ORDER_NV 0x86C3
+#define GL_MAP_ATTRIB_V_ORDER_NV 0x86C4
+#define GL_EVAL_FRACTIONAL_TESSELLATION_NV 0x86C5
+#define GL_EVAL_VERTEX_ATTRIB0_NV 0x86C6
+#define GL_EVAL_VERTEX_ATTRIB1_NV 0x86C7
+#define GL_EVAL_VERTEX_ATTRIB2_NV 0x86C8
+#define GL_EVAL_VERTEX_ATTRIB3_NV 0x86C9
+#define GL_EVAL_VERTEX_ATTRIB4_NV 0x86CA
+#define GL_EVAL_VERTEX_ATTRIB5_NV 0x86CB
+#define GL_EVAL_VERTEX_ATTRIB6_NV 0x86CC
+#define GL_EVAL_VERTEX_ATTRIB7_NV 0x86CD
+#define GL_EVAL_VERTEX_ATTRIB8_NV 0x86CE
+#define GL_EVAL_VERTEX_ATTRIB9_NV 0x86CF
+#define GL_EVAL_VERTEX_ATTRIB10_NV 0x86D0
+#define GL_EVAL_VERTEX_ATTRIB11_NV 0x86D1
+#define GL_EVAL_VERTEX_ATTRIB12_NV 0x86D2
+#define GL_EVAL_VERTEX_ATTRIB13_NV 0x86D3
+#define GL_EVAL_VERTEX_ATTRIB14_NV 0x86D4
+#define GL_EVAL_VERTEX_ATTRIB15_NV 0x86D5
+#define GL_MAX_MAP_TESSELLATION_NV 0x86D6
+#define GL_MAX_RATIONAL_EVAL_ORDER_NV 0x86D7
+
+typedef void (GLAPIENTRY * PFNGLEVALMAPSNVPROC) (GLenum target, GLenum mode);
+typedef void (GLAPIENTRY * PFNGLGETMAPATTRIBPARAMETERFVNVPROC) (GLenum target, GLuint index, GLenum pname, GLfloat* params);
+typedef void (GLAPIENTRY * PFNGLGETMAPATTRIBPARAMETERIVNVPROC) (GLenum target, GLuint index, GLenum pname, GLint* params);
+typedef void (GLAPIENTRY * PFNGLGETMAPCONTROLPOINTSNVPROC) (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLboolean packed, void *points);
+typedef void (GLAPIENTRY * PFNGLGETMAPPARAMETERFVNVPROC) (GLenum target, GLenum pname, GLfloat* params);
+typedef void (GLAPIENTRY * PFNGLGETMAPPARAMETERIVNVPROC) (GLenum target, GLenum pname, GLint* params);
+typedef void (GLAPIENTRY * PFNGLMAPCONTROLPOINTSNVPROC) (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLint uorder, GLint vorder, GLboolean packed, const void *points);
+typedef void (GLAPIENTRY * PFNGLMAPPARAMETERFVNVPROC) (GLenum target, GLenum pname, const GLfloat* params);
+typedef void (GLAPIENTRY * PFNGLMAPPARAMETERIVNVPROC) (GLenum target, GLenum pname, const GLint* params);
+
+#define glEvalMapsNV GLEW_GET_FUN(__glewEvalMapsNV)
+#define glGetMapAttribParameterfvNV GLEW_GET_FUN(__glewGetMapAttribParameterfvNV)
+#define glGetMapAttribParameterivNV GLEW_GET_FUN(__glewGetMapAttribParameterivNV)
+#define glGetMapControlPointsNV GLEW_GET_FUN(__glewGetMapControlPointsNV)
+#define glGetMapParameterfvNV GLEW_GET_FUN(__glewGetMapParameterfvNV)
+#define glGetMapParameterivNV GLEW_GET_FUN(__glewGetMapParameterivNV)
+#define glMapControlPointsNV GLEW_GET_FUN(__glewMapControlPointsNV)
+#define glMapParameterfvNV GLEW_GET_FUN(__glewMapParameterfvNV)
+#define glMapParameterivNV GLEW_GET_FUN(__glewMapParameterivNV)
+
+#define GLEW_NV_evaluators GLEW_GET_VAR(__GLEW_NV_evaluators)
+
+#endif /* GL_NV_evaluators */
+
+/* ----------------------- GL_NV_explicit_multisample ---------------------- */
+
+#ifndef GL_NV_explicit_multisample
+#define GL_NV_explicit_multisample 1
+
+#define GL_SAMPLE_POSITION_NV 0x8E50
+#define GL_SAMPLE_MASK_NV 0x8E51
+#define GL_SAMPLE_MASK_VALUE_NV 0x8E52
+#define GL_TEXTURE_BINDING_RENDERBUFFER_NV 0x8E53
+#define GL_TEXTURE_RENDERBUFFER_DATA_STORE_BINDING_NV 0x8E54
+#define GL_TEXTURE_RENDERBUFFER_NV 0x8E55
+#define GL_SAMPLER_RENDERBUFFER_NV 0x8E56
+#define GL_INT_SAMPLER_RENDERBUFFER_NV 0x8E57
+#define GL_UNSIGNED_INT_SAMPLER_RENDERBUFFER_NV 0x8E58
+#define GL_MAX_SAMPLE_MASK_WORDS_NV 0x8E59
+
+typedef void (GLAPIENTRY * PFNGLGETMULTISAMPLEFVNVPROC) (GLenum pname, GLuint index, GLfloat* val);
+typedef void (GLAPIENTRY * PFNGLSAMPLEMASKINDEXEDNVPROC) (GLuint index, GLbitfield mask);
+typedef void (GLAPIENTRY * PFNGLTEXRENDERBUFFERNVPROC) (GLenum target, GLuint renderbuffer);
+
+#define glGetMultisamplefvNV GLEW_GET_FUN(__glewGetMultisamplefvNV)
+#define glSampleMaskIndexedNV GLEW_GET_FUN(__glewSampleMaskIndexedNV)
+#define glTexRenderbufferNV GLEW_GET_FUN(__glewTexRenderbufferNV)
+
+#define GLEW_NV_explicit_multisample GLEW_GET_VAR(__GLEW_NV_explicit_multisample)
+
+#endif /* GL_NV_explicit_multisample */
+
+/* ------------------------------ GL_NV_fence ------------------------------ */
+
+#ifndef GL_NV_fence
+#define GL_NV_fence 1
+
+#define GL_ALL_COMPLETED_NV 0x84F2
+#define GL_FENCE_STATUS_NV 0x84F3
+#define GL_FENCE_CONDITION_NV 0x84F4
+
+typedef void (GLAPIENTRY * PFNGLDELETEFENCESNVPROC) (GLsizei n, const GLuint* fences);
+typedef void (GLAPIENTRY * PFNGLFINISHFENCENVPROC) (GLuint fence);
+typedef void (GLAPIENTRY * PFNGLGENFENCESNVPROC) (GLsizei n, GLuint* fences);
+typedef void (GLAPIENTRY * PFNGLGETFENCEIVNVPROC) (GLuint fence, GLenum pname, GLint* params);
+typedef GLboolean (GLAPIENTRY * PFNGLISFENCENVPROC) (GLuint fence);
+typedef void (GLAPIENTRY * PFNGLSETFENCENVPROC) (GLuint fence, GLenum condition);
+typedef GLboolean (GLAPIENTRY * PFNGLTESTFENCENVPROC) (GLuint fence);
+
+#define glDeleteFencesNV GLEW_GET_FUN(__glewDeleteFencesNV)
+#define glFinishFenceNV GLEW_GET_FUN(__glewFinishFenceNV)
+#define glGenFencesNV GLEW_GET_FUN(__glewGenFencesNV)
+#define glGetFenceivNV GLEW_GET_FUN(__glewGetFenceivNV)
+#define glIsFenceNV GLEW_GET_FUN(__glewIsFenceNV)
+#define glSetFenceNV GLEW_GET_FUN(__glewSetFenceNV)
+#define glTestFenceNV GLEW_GET_FUN(__glewTestFenceNV)
+
+#define GLEW_NV_fence GLEW_GET_VAR(__GLEW_NV_fence)
+
+#endif /* GL_NV_fence */
+
+/* -------------------------- GL_NV_fill_rectangle ------------------------- */
+
+#ifndef GL_NV_fill_rectangle
+#define GL_NV_fill_rectangle 1
+
+#define GL_FILL_RECTANGLE_NV 0x933C
+
+#define GLEW_NV_fill_rectangle GLEW_GET_VAR(__GLEW_NV_fill_rectangle)
+
+#endif /* GL_NV_fill_rectangle */
+
+/* --------------------------- GL_NV_float_buffer -------------------------- */
+
+#ifndef GL_NV_float_buffer
+#define GL_NV_float_buffer 1
+
+#define GL_FLOAT_R_NV 0x8880
+#define GL_FLOAT_RG_NV 0x8881
+#define GL_FLOAT_RGB_NV 0x8882
+#define GL_FLOAT_RGBA_NV 0x8883
+#define GL_FLOAT_R16_NV 0x8884
+#define GL_FLOAT_R32_NV 0x8885
+#define GL_FLOAT_RG16_NV 0x8886
+#define GL_FLOAT_RG32_NV 0x8887
+#define GL_FLOAT_RGB16_NV 0x8888
+#define GL_FLOAT_RGB32_NV 0x8889
+#define GL_FLOAT_RGBA16_NV 0x888A
+#define GL_FLOAT_RGBA32_NV 0x888B
+#define GL_TEXTURE_FLOAT_COMPONENTS_NV 0x888C
+#define GL_FLOAT_CLEAR_COLOR_VALUE_NV 0x888D
+#define GL_FLOAT_RGBA_MODE_NV 0x888E
+
+#define GLEW_NV_float_buffer GLEW_GET_VAR(__GLEW_NV_float_buffer)
+
+#endif /* GL_NV_float_buffer */
+
+/* --------------------------- GL_NV_fog_distance -------------------------- */
+
+#ifndef GL_NV_fog_distance
+#define GL_NV_fog_distance 1
+
+#define GL_FOG_DISTANCE_MODE_NV 0x855A
+#define GL_EYE_RADIAL_NV 0x855B
+#define GL_EYE_PLANE_ABSOLUTE_NV 0x855C
+
+#define GLEW_NV_fog_distance GLEW_GET_VAR(__GLEW_NV_fog_distance)
+
+#endif /* GL_NV_fog_distance */
+
+/* -------------------- GL_NV_fragment_coverage_to_color ------------------- */
+
+#ifndef GL_NV_fragment_coverage_to_color
+#define GL_NV_fragment_coverage_to_color 1
+
+#define GL_FRAGMENT_COVERAGE_TO_COLOR_NV 0x92DD
+#define GL_FRAGMENT_COVERAGE_COLOR_NV 0x92DE
+
+typedef void (GLAPIENTRY * PFNGLFRAGMENTCOVERAGECOLORNVPROC) (GLuint color);
+
+#define glFragmentCoverageColorNV GLEW_GET_FUN(__glewFragmentCoverageColorNV)
+
+#define GLEW_NV_fragment_coverage_to_color GLEW_GET_VAR(__GLEW_NV_fragment_coverage_to_color)
+
+#endif /* GL_NV_fragment_coverage_to_color */
+
+/* ------------------------- GL_NV_fragment_program ------------------------ */
+
+#ifndef GL_NV_fragment_program
+#define GL_NV_fragment_program 1
+
+#define GL_MAX_FRAGMENT_PROGRAM_LOCAL_PARAMETERS_NV 0x8868
+#define GL_FRAGMENT_PROGRAM_NV 0x8870
+#define GL_MAX_TEXTURE_COORDS_NV 0x8871
+#define GL_MAX_TEXTURE_IMAGE_UNITS_NV 0x8872
+#define GL_FRAGMENT_PROGRAM_BINDING_NV 0x8873
+#define GL_PROGRAM_ERROR_STRING_NV 0x8874
+
+typedef void (GLAPIENTRY * PFNGLGETPROGRAMNAMEDPARAMETERDVNVPROC) (GLuint id, GLsizei len, const GLubyte* name, GLdouble *params);
+typedef void (GLAPIENTRY * PFNGLGETPROGRAMNAMEDPARAMETERFVNVPROC) (GLuint id, GLsizei len, const GLubyte* name, GLfloat *params);
+typedef void (GLAPIENTRY * PFNGLPROGRAMNAMEDPARAMETER4DNVPROC) (GLuint id, GLsizei len, const GLubyte* name, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
+typedef void (GLAPIENTRY * PFNGLPROGRAMNAMEDPARAMETER4DVNVPROC) (GLuint id, GLsizei len, const GLubyte* name, const GLdouble v[]);
+typedef void (GLAPIENTRY * PFNGLPROGRAMNAMEDPARAMETER4FNVPROC) (GLuint id, GLsizei len, const GLubyte* name, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+typedef void (GLAPIENTRY * PFNGLPROGRAMNAMEDPARAMETER4FVNVPROC) (GLuint id, GLsizei len, const GLubyte* name, const GLfloat v[]);
+
+#define glGetProgramNamedParameterdvNV GLEW_GET_FUN(__glewGetProgramNamedParameterdvNV)
+#define glGetProgramNamedParameterfvNV GLEW_GET_FUN(__glewGetProgramNamedParameterfvNV)
+#define glProgramNamedParameter4dNV GLEW_GET_FUN(__glewProgramNamedParameter4dNV)
+#define glProgramNamedParameter4dvNV GLEW_GET_FUN(__glewProgramNamedParameter4dvNV)
+#define glProgramNamedParameter4fNV GLEW_GET_FUN(__glewProgramNamedParameter4fNV)
+#define glProgramNamedParameter4fvNV GLEW_GET_FUN(__glewProgramNamedParameter4fvNV)
+
+#define GLEW_NV_fragment_program GLEW_GET_VAR(__GLEW_NV_fragment_program)
+
+#endif /* GL_NV_fragment_program */
+
+/* ------------------------ GL_NV_fragment_program2 ------------------------ */
+
+#ifndef GL_NV_fragment_program2
+#define GL_NV_fragment_program2 1
+
+#define GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV 0x88F4
+#define GL_MAX_PROGRAM_CALL_DEPTH_NV 0x88F5
+#define GL_MAX_PROGRAM_IF_DEPTH_NV 0x88F6
+#define GL_MAX_PROGRAM_LOOP_DEPTH_NV 0x88F7
+#define GL_MAX_PROGRAM_LOOP_COUNT_NV 0x88F8
+
+#define GLEW_NV_fragment_program2 GLEW_GET_VAR(__GLEW_NV_fragment_program2)
+
+#endif /* GL_NV_fragment_program2 */
+
+/* ------------------------ GL_NV_fragment_program4 ------------------------ */
+
+#ifndef GL_NV_fragment_program4
+#define GL_NV_fragment_program4 1
+
+#define GLEW_NV_fragment_program4 GLEW_GET_VAR(__GLEW_NV_fragment_program4)
+
+#endif /* GL_NV_fragment_program4 */
+
+/* --------------------- GL_NV_fragment_program_option --------------------- */
+
+#ifndef GL_NV_fragment_program_option
+#define GL_NV_fragment_program_option 1
+
+#define GLEW_NV_fragment_program_option GLEW_GET_VAR(__GLEW_NV_fragment_program_option)
+
+#endif /* GL_NV_fragment_program_option */
+
+/* -------------------- GL_NV_fragment_shader_interlock -------------------- */
+
+#ifndef GL_NV_fragment_shader_interlock
+#define GL_NV_fragment_shader_interlock 1
+
+#define GLEW_NV_fragment_shader_interlock GLEW_GET_VAR(__GLEW_NV_fragment_shader_interlock)
+
+#endif /* GL_NV_fragment_shader_interlock */
+
+/* -------------------- GL_NV_framebuffer_mixed_samples -------------------- */
+
+#ifndef GL_NV_framebuffer_mixed_samples
+#define GL_NV_framebuffer_mixed_samples 1
+
+#define GL_COLOR_SAMPLES_NV 0x8E20
+#define GL_RASTER_MULTISAMPLE_EXT 0x9327
+#define GL_RASTER_SAMPLES_EXT 0x9328
+#define GL_MAX_RASTER_SAMPLES_EXT 0x9329
+#define GL_RASTER_FIXED_SAMPLE_LOCATIONS_EXT 0x932A
+#define GL_MULTISAMPLE_RASTERIZATION_ALLOWED_EXT 0x932B
+#define GL_EFFECTIVE_RASTER_SAMPLES_EXT 0x932C
+#define GL_DEPTH_SAMPLES_NV 0x932D
+#define GL_STENCIL_SAMPLES_NV 0x932E
+#define GL_MIXED_DEPTH_SAMPLES_SUPPORTED_NV 0x932F
+#define GL_MIXED_STENCIL_SAMPLES_SUPPORTED_NV 0x9330
+#define GL_COVERAGE_MODULATION_TABLE_NV 0x9331
+#define GL_COVERAGE_MODULATION_NV 0x9332
+#define GL_COVERAGE_MODULATION_TABLE_SIZE_NV 0x9333
+
+#define GLEW_NV_framebuffer_mixed_samples GLEW_GET_VAR(__GLEW_NV_framebuffer_mixed_samples)
+
+#endif /* GL_NV_framebuffer_mixed_samples */
+
+/* ----------------- GL_NV_framebuffer_multisample_coverage ---------------- */
+
+#ifndef GL_NV_framebuffer_multisample_coverage
+#define GL_NV_framebuffer_multisample_coverage 1
+
+#define GL_RENDERBUFFER_COVERAGE_SAMPLES_NV 0x8CAB
+#define GL_RENDERBUFFER_COLOR_SAMPLES_NV 0x8E10
+#define GL_MAX_MULTISAMPLE_COVERAGE_MODES_NV 0x8E11
+#define GL_MULTISAMPLE_COVERAGE_MODES_NV 0x8E12
+
+typedef void (GLAPIENTRY * PFNGLRENDERBUFFERSTORAGEMULTISAMPLECOVERAGENVPROC) (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLenum internalformat, GLsizei width, GLsizei height);
+
+#define glRenderbufferStorageMultisampleCoverageNV GLEW_GET_FUN(__glewRenderbufferStorageMultisampleCoverageNV)
+
+#define GLEW_NV_framebuffer_multisample_coverage GLEW_GET_VAR(__GLEW_NV_framebuffer_multisample_coverage)
+
+#endif /* GL_NV_framebuffer_multisample_coverage */
+
+/* ------------------------ GL_NV_geometry_program4 ------------------------ */
+
+#ifndef GL_NV_geometry_program4
+#define GL_NV_geometry_program4 1
+
+#define GL_GEOMETRY_PROGRAM_NV 0x8C26
+#define GL_MAX_PROGRAM_OUTPUT_VERTICES_NV 0x8C27
+#define GL_MAX_PROGRAM_TOTAL_OUTPUT_COMPONENTS_NV 0x8C28
+
+typedef void (GLAPIENTRY * PFNGLPROGRAMVERTEXLIMITNVPROC) (GLenum target, GLint limit);
+
+#define glProgramVertexLimitNV GLEW_GET_FUN(__glewProgramVertexLimitNV)
+
+#define GLEW_NV_geometry_program4 GLEW_GET_VAR(__GLEW_NV_geometry_program4)
+
+#endif /* GL_NV_geometry_program4 */
+
+/* ------------------------- GL_NV_geometry_shader4 ------------------------ */
+
+#ifndef GL_NV_geometry_shader4
+#define GL_NV_geometry_shader4 1
+
+#define GLEW_NV_geometry_shader4 GLEW_GET_VAR(__GLEW_NV_geometry_shader4)
+
+#endif /* GL_NV_geometry_shader4 */
+
+/* ------------------- GL_NV_geometry_shader_passthrough ------------------- */
+
+#ifndef GL_NV_geometry_shader_passthrough
+#define GL_NV_geometry_shader_passthrough 1
+
+#define GLEW_NV_geometry_shader_passthrough GLEW_GET_VAR(__GLEW_NV_geometry_shader_passthrough)
+
+#endif /* GL_NV_geometry_shader_passthrough */
+
+/* --------------------------- GL_NV_gpu_program4 -------------------------- */
+
+#ifndef GL_NV_gpu_program4
+#define GL_NV_gpu_program4 1
+
+#define GL_MIN_PROGRAM_TEXEL_OFFSET_NV 0x8904
+#define GL_MAX_PROGRAM_TEXEL_OFFSET_NV 0x8905
+#define GL_PROGRAM_ATTRIB_COMPONENTS_NV 0x8906
+#define GL_PROGRAM_RESULT_COMPONENTS_NV 0x8907
+#define GL_MAX_PROGRAM_ATTRIB_COMPONENTS_NV 0x8908
+#define GL_MAX_PROGRAM_RESULT_COMPONENTS_NV 0x8909
+#define GL_MAX_PROGRAM_GENERIC_ATTRIBS_NV 0x8DA5
+#define GL_MAX_PROGRAM_GENERIC_RESULTS_NV 0x8DA6
+
+typedef void (GLAPIENTRY * PFNGLPROGRAMENVPARAMETERI4INVPROC) (GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w);
+typedef void (GLAPIENTRY * PFNGLPROGRAMENVPARAMETERI4IVNVPROC) (GLenum target, GLuint index, const GLint *params);
+typedef void (GLAPIENTRY * PFNGLPROGRAMENVPARAMETERI4UINVPROC) (GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
+typedef void (GLAPIENTRY * PFNGLPROGRAMENVPARAMETERI4UIVNVPROC) (GLenum target, GLuint index, const GLuint *params);
+typedef void (GLAPIENTRY * PFNGLPROGRAMENVPARAMETERSI4IVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLint *params);
+typedef void (GLAPIENTRY * PFNGLPROGRAMENVPARAMETERSI4UIVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLuint *params);
+typedef void (GLAPIENTRY * PFNGLPROGRAMLOCALPARAMETERI4INVPROC) (GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w);
+typedef void (GLAPIENTRY * PFNGLPROGRAMLOCALPARAMETERI4IVNVPROC) (GLenum target, GLuint index, const GLint *params);
+typedef void (GLAPIENTRY * PFNGLPROGRAMLOCALPARAMETERI4UINVPROC) (GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
+typedef void (GLAPIENTRY * PFNGLPROGRAMLOCALPARAMETERI4UIVNVPROC) (GLenum target, GLuint index, const GLuint *params);
+typedef void (GLAPIENTRY * PFNGLPROGRAMLOCALPARAMETERSI4IVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLint *params);
+typedef void (GLAPIENTRY * PFNGLPROGRAMLOCALPARAMETERSI4UIVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLuint *params);
+
+#define glProgramEnvParameterI4iNV GLEW_GET_FUN(__glewProgramEnvParameterI4iNV)
+#define glProgramEnvParameterI4ivNV GLEW_GET_FUN(__glewProgramEnvParameterI4ivNV)
+#define glProgramEnvParameterI4uiNV GLEW_GET_FUN(__glewProgramEnvParameterI4uiNV)
+#define glProgramEnvParameterI4uivNV GLEW_GET_FUN(__glewProgramEnvParameterI4uivNV)
+#define glProgramEnvParametersI4ivNV GLEW_GET_FUN(__glewProgramEnvParametersI4ivNV)
+#define glProgramEnvParametersI4uivNV GLEW_GET_FUN(__glewProgramEnvParametersI4uivNV)
+#define glProgramLocalParameterI4iNV GLEW_GET_FUN(__glewProgramLocalParameterI4iNV)
+#define glProgramLocalParameterI4ivNV GLEW_GET_FUN(__glewProgramLocalParameterI4ivNV)
+#define glProgramLocalParameterI4uiNV GLEW_GET_FUN(__glewProgramLocalParameterI4uiNV)
+#define glProgramLocalParameterI4uivNV GLEW_GET_FUN(__glewProgramLocalParameterI4uivNV)
+#define glProgramLocalParametersI4ivNV GLEW_GET_FUN(__glewProgramLocalParametersI4ivNV)
+#define glProgramLocalParametersI4uivNV GLEW_GET_FUN(__glewProgramLocalParametersI4uivNV)
+
+#define GLEW_NV_gpu_program4 GLEW_GET_VAR(__GLEW_NV_gpu_program4)
+
+#endif /* GL_NV_gpu_program4 */
+
+/* --------------------------- GL_NV_gpu_program5 -------------------------- */
+
+#ifndef GL_NV_gpu_program5
+#define GL_NV_gpu_program5 1
+
+#define GL_MAX_GEOMETRY_PROGRAM_INVOCATIONS_NV 0x8E5A
+#define GL_MIN_FRAGMENT_INTERPOLATION_OFFSET_NV 0x8E5B
+#define GL_MAX_FRAGMENT_INTERPOLATION_OFFSET_NV 0x8E5C
+#define GL_FRAGMENT_PROGRAM_INTERPOLATION_OFFSET_BITS_NV 0x8E5D
+#define GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET_NV 0x8E5E
+#define GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET_NV 0x8E5F
+
+#define GLEW_NV_gpu_program5 GLEW_GET_VAR(__GLEW_NV_gpu_program5)
+
+#endif /* GL_NV_gpu_program5 */
+
+/* -------------------- GL_NV_gpu_program5_mem_extended -------------------- */
+
+#ifndef GL_NV_gpu_program5_mem_extended
+#define GL_NV_gpu_program5_mem_extended 1
+
+#define GLEW_NV_gpu_program5_mem_extended GLEW_GET_VAR(__GLEW_NV_gpu_program5_mem_extended)
+
+#endif /* GL_NV_gpu_program5_mem_extended */
+
+/* ------------------------- GL_NV_gpu_program_fp64 ------------------------ */
+
+#ifndef GL_NV_gpu_program_fp64
+#define GL_NV_gpu_program_fp64 1
+
+#define GLEW_NV_gpu_program_fp64 GLEW_GET_VAR(__GLEW_NV_gpu_program_fp64)
+
+#endif /* GL_NV_gpu_program_fp64 */
+
+/* --------------------------- GL_NV_gpu_shader5 --------------------------- */
+
+#ifndef GL_NV_gpu_shader5
+#define GL_NV_gpu_shader5 1
+
+#define GL_INT64_NV 0x140E
+#define GL_UNSIGNED_INT64_NV 0x140F
+#define GL_INT8_NV 0x8FE0
+#define GL_INT8_VEC2_NV 0x8FE1
+#define GL_INT8_VEC3_NV 0x8FE2
+#define GL_INT8_VEC4_NV 0x8FE3
+#define GL_INT16_NV 0x8FE4
+#define GL_INT16_VEC2_NV 0x8FE5
+#define GL_INT16_VEC3_NV 0x8FE6
+#define GL_INT16_VEC4_NV 0x8FE7
+#define GL_INT64_VEC2_NV 0x8FE9
+#define GL_INT64_VEC3_NV 0x8FEA
+#define GL_INT64_VEC4_NV 0x8FEB
+#define GL_UNSIGNED_INT8_NV 0x8FEC
+#define GL_UNSIGNED_INT8_VEC2_NV 0x8FED
+#define GL_UNSIGNED_INT8_VEC3_NV 0x8FEE
+#define GL_UNSIGNED_INT8_VEC4_NV 0x8FEF
+#define GL_UNSIGNED_INT16_NV 0x8FF0
+#define GL_UNSIGNED_INT16_VEC2_NV 0x8FF1
+#define GL_UNSIGNED_INT16_VEC3_NV 0x8FF2
+#define GL_UNSIGNED_INT16_VEC4_NV 0x8FF3
+#define GL_UNSIGNED_INT64_VEC2_NV 0x8FF5
+#define GL_UNSIGNED_INT64_VEC3_NV 0x8FF6
+#define GL_UNSIGNED_INT64_VEC4_NV 0x8FF7
+#define GL_FLOAT16_NV 0x8FF8
+#define GL_FLOAT16_VEC2_NV 0x8FF9
+#define GL_FLOAT16_VEC3_NV 0x8FFA
+#define GL_FLOAT16_VEC4_NV 0x8FFB
+
+typedef void (GLAPIENTRY * PFNGLGETUNIFORMI64VNVPROC) (GLuint program, GLint location, GLint64EXT* params);
+typedef void (GLAPIENTRY * PFNGLGETUNIFORMUI64VNVPROC) (GLuint program, GLint location, GLuint64EXT* params);
+typedef void (GLAPIENTRY * PFNGLPROGRAMUNIFORM1I64NVPROC) (GLuint program, GLint location, GLint64EXT x);
+typedef void (GLAPIENTRY * PFNGLPROGRAMUNIFORM1I64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLint64EXT* value);
+typedef void (GLAPIENTRY * PFNGLPROGRAMUNIFORM1UI64NVPROC) (GLuint program, GLint location, GLuint64EXT x);
+typedef void (GLAPIENTRY * PFNGLPROGRAMUNIFORM1UI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT* value);
+typedef void (GLAPIENTRY * PFNGLPROGRAMUNIFORM2I64NVPROC) (GLuint program, GLint location, GLint64EXT x, GLint64EXT y);
+typedef void (GLAPIENTRY * PFNGLPROGRAMUNIFORM2I64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLint64EXT* value);
+typedef void (GLAPIENTRY * PFNGLPROGRAMUNIFORM2UI64NVPROC) (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y);
+typedef void (GLAPIENTRY * PFNGLPROGRAMUNIFORM2UI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT* value);
+typedef void (GLAPIENTRY * PFNGLPROGRAMUNIFORM3I64NVPROC) (GLuint program, GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z);
+typedef void (GLAPIENTRY * PFNGLPROGRAMUNIFORM3I64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLint64EXT* value);
+typedef void (GLAPIENTRY * PFNGLPROGRAMUNIFORM3UI64NVPROC) (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z);
+typedef void (GLAPIENTRY * PFNGLPROGRAMUNIFORM3UI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT* value);
+typedef void (GLAPIENTRY * PFNGLPROGRAMUNIFORM4I64NVPROC) (GLuint program, GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w);
+typedef void (GLAPIENTRY * PFNGLPROGRAMUNIFORM4I64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLint64EXT* value);
+typedef void (GLAPIENTRY * PFNGLPROGRAMUNIFORM4UI64NVPROC) (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w);
+typedef void (GLAPIENTRY * PFNGLPROGRAMUNIFORM4UI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT* value);
+typedef void (GLAPIENTRY * PFNGLUNIFORM1I64NVPROC) (GLint location, GLint64EXT x);
+typedef void (GLAPIENTRY * PFNGLUNIFORM1I64VNVPROC) (GLint location, GLsizei count, const GLint64EXT* value);
+typedef void (GLAPIENTRY * PFNGLUNIFORM1UI64NVPROC) (GLint location, GLuint64EXT x);
+typedef void (GLAPIENTRY * PFNGLUNIFORM1UI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT* value);
+typedef void (GLAPIENTRY * PFNGLUNIFORM2I64NVPROC) (GLint location, GLint64EXT x, GLint64EXT y);
+typedef void (GLAPIENTRY * PFNGLUNIFORM2I64VNVPROC) (GLint location, GLsizei count, const GLint64EXT* value);
+typedef void (GLAPIENTRY * PFNGLUNIFORM2UI64NVPROC) (GLint location, GLuint64EXT x, GLuint64EXT y);
+typedef void (GLAPIENTRY * PFNGLUNIFORM2UI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT* value);
+typedef void (GLAPIENTRY * PFNGLUNIFORM3I64NVPROC) (GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z);
+typedef void (GLAPIENTRY * PFNGLUNIFORM3I64VNVPROC) (GLint location, GLsizei count, const GLint64EXT* value);
+typedef void (GLAPIENTRY * PFNGLUNIFORM3UI64NVPROC) (GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z);
+typedef void (GLAPIENTRY * PFNGLUNIFORM3UI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT* value);
+typedef void (GLAPIENTRY * PFNGLUNIFORM4I64NVPROC) (GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w);
+typedef void (GLAPIENTRY * PFNGLUNIFORM4I64VNVPROC) (GLint location, GLsizei count, const GLint64EXT* value);
+typedef void (GLAPIENTRY * PFNGLUNIFORM4UI64NVPROC) (GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w);
+typedef void (GLAPIENTRY * PFNGLUNIFORM4UI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT* value);
+
+#define glGetUniformi64vNV GLEW_GET_FUN(__glewGetUniformi64vNV)
+#define glGetUniformui64vNV GLEW_GET_FUN(__glewGetUniformui64vNV)
+#define glProgramUniform1i64NV GLEW_GET_FUN(__glewProgramUniform1i64NV)
+#define glProgramUniform1i64vNV GLEW_GET_FUN(__glewProgramUniform1i64vNV)
+#define glProgramUniform1ui64NV GLEW_GET_FUN(__glewProgramUniform1ui64NV)
+#define glProgramUniform1ui64vNV GLEW_GET_FUN(__glewProgramUniform1ui64vNV)
+#define glProgramUniform2i64NV GLEW_GET_FUN(__glewProgramUniform2i64NV)
+#define glProgramUniform2i64vNV GLEW_GET_FUN(__glewProgramUniform2i64vNV)
+#define glProgramUniform2ui64NV GLEW_GET_FUN(__glewProgramUniform2ui64NV)
+#define glProgramUniform2ui64vNV GLEW_GET_FUN(__glewProgramUniform2ui64vNV)
+#define glProgramUniform3i64NV GLEW_GET_FUN(__glewProgramUniform3i64NV)
+#define glProgramUniform3i64vNV GLEW_GET_FUN(__glewProgramUniform3i64vNV)
+#define glProgramUniform3ui64NV GLEW_GET_FUN(__glewProgramUniform3ui64NV)
+#define glProgramUniform3ui64vNV GLEW_GET_FUN(__glewProgramUniform3ui64vNV)
+#define glProgramUniform4i64NV GLEW_GET_FUN(__glewProgramUniform4i64NV)
+#define glProgramUniform4i64vNV GLEW_GET_FUN(__glewProgramUniform4i64vNV)
+#define glProgramUniform4ui64NV GLEW_GET_FUN(__glewProgramUniform4ui64NV)
+#define glProgramUniform4ui64vNV GLEW_GET_FUN(__glewProgramUniform4ui64vNV)
+#define glUniform1i64NV GLEW_GET_FUN(__glewUniform1i64NV)
+#define glUniform1i64vNV GLEW_GET_FUN(__glewUniform1i64vNV)
+#define glUniform1ui64NV GLEW_GET_FUN(__glewUniform1ui64NV)
+#define glUniform1ui64vNV GLEW_GET_FUN(__glewUniform1ui64vNV)
+#define glUniform2i64NV GLEW_GET_FUN(__glewUniform2i64NV)
+#define glUniform2i64vNV GLEW_GET_FUN(__glewUniform2i64vNV)
+#define glUniform2ui64NV GLEW_GET_FUN(__glewUniform2ui64NV)
+#define glUniform2ui64vNV GLEW_GET_FUN(__glewUniform2ui64vNV)
+#define glUniform3i64NV GLEW_GET_FUN(__glewUniform3i64NV)
+#define glUniform3i64vNV GLEW_GET_FUN(__glewUniform3i64vNV)
+#define glUniform3ui64NV GLEW_GET_FUN(__glewUniform3ui64NV)
+#define glUniform3ui64vNV GLEW_GET_FUN(__glewUniform3ui64vNV)
+#define glUniform4i64NV GLEW_GET_FUN(__glewUniform4i64NV)
+#define glUniform4i64vNV GLEW_GET_FUN(__glewUniform4i64vNV)
+#define glUniform4ui64NV GLEW_GET_FUN(__glewUniform4ui64NV)
+#define glUniform4ui64vNV GLEW_GET_FUN(__glewUniform4ui64vNV)
+
+#define GLEW_NV_gpu_shader5 GLEW_GET_VAR(__GLEW_NV_gpu_shader5)
+
+#endif /* GL_NV_gpu_shader5 */
+
+/* ---------------------------- GL_NV_half_float --------------------------- */
+
+#ifndef GL_NV_half_float
+#define GL_NV_half_float 1
+
+#define GL_HALF_FLOAT_NV 0x140B
+
+typedef unsigned short GLhalf;
+
+typedef void (GLAPIENTRY * PFNGLCOLOR3HNVPROC) (GLhalf red, GLhalf green, GLhalf blue);
+typedef void (GLAPIENTRY * PFNGLCOLOR3HVNVPROC) (const GLhalf* v);
+typedef void (GLAPIENTRY * PFNGLCOLOR4HNVPROC) (GLhalf red, GLhalf green, GLhalf blue, GLhalf alpha);
+typedef void (GLAPIENTRY * PFNGLCOLOR4HVNVPROC) (const GLhalf* v);
+typedef void (GLAPIENTRY * PFNGLFOGCOORDHNVPROC) (GLhalf fog);
+typedef void (GLAPIENTRY * PFNGLFOGCOORDHVNVPROC) (const GLhalf* fog);
+typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD1HNVPROC) (GLenum target, GLhalf s);
+typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD1HVNVPROC) (GLenum target, const GLhalf* v);
+typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD2HNVPROC) (GLenum target, GLhalf s, GLhalf t);
+typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD2HVNVPROC) (GLenum target, const GLhalf* v);
+typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD3HNVPROC) (GLenum target, GLhalf s, GLhalf t, GLhalf r);
+typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD3HVNVPROC) (GLenum target, const GLhalf* v);
+typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD4HNVPROC) (GLenum target, GLhalf s, GLhalf t, GLhalf r, GLhalf q);
+typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD4HVNVPROC) (GLenum target, const GLhalf* v);
+typedef void (GLAPIENTRY * PFNGLNORMAL3HNVPROC) (GLhalf nx, GLhalf ny, GLhalf nz);
+typedef void (GLAPIENTRY * PFNGLNORMAL3HVNVPROC) (const GLhalf* v);
+typedef void (GLAPIENTRY * PFNGLSECONDARYCOLOR3HNVPROC) (GLhalf red, GLhalf green, GLhalf blue);
+typedef void (GLAPIENTRY * PFNGLSECONDARYCOLOR3HVNVPROC) (const GLhalf* v);
+typedef void (GLAPIENTRY * PFNGLTEXCOORD1HNVPROC) (GLhalf s);
+typedef void (GLAPIENTRY * PFNGLTEXCOORD1HVNVPROC) (const GLhalf* v);
+typedef void (GLAPIENTRY * PFNGLTEXCOORD2HNVPROC) (GLhalf s, GLhalf t);
+typedef void (GLAPIENTRY * PFNGLTEXCOORD2HVNVPROC) (const GLhalf* v);
+typedef void (GLAPIENTRY * PFNGLTEXCOORD3HNVPROC) (GLhalf s, GLhalf t, GLhalf r);
+typedef void (GLAPIENTRY * PFNGLTEXCOORD3HVNVPROC) (const GLhalf* v);
+typedef void (GLAPIENTRY * PFNGLTEXCOORD4HNVPROC) (GLhalf s, GLhalf t, GLhalf r, GLhalf q);
+typedef void (GLAPIENTRY * PFNGLTEXCOORD4HVNVPROC) (const GLhalf* v);
+typedef void (GLAPIENTRY * PFNGLVERTEX2HNVPROC) (GLhalf x, GLhalf y);
+typedef void (GLAPIENTRY * PFNGLVERTEX2HVNVPROC) (const GLhalf* v);
+typedef void (GLAPIENTRY * PFNGLVERTEX3HNVPROC) (GLhalf x, GLhalf y, GLhalf z);
+typedef void (GLAPIENTRY * PFNGLVERTEX3HVNVPROC) (const GLhalf* v);
+typedef void (GLAPIENTRY * PFNGLVERTEX4HNVPROC) (GLhalf x, GLhalf y, GLhalf z, GLhalf w);
+typedef void (GLAPIENTRY * PFNGLVERTEX4HVNVPROC) (const GLhalf* v);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB1HNVPROC) (GLuint index, GLhalf x);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB1HVNVPROC) (GLuint index, const GLhalf* v);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB2HNVPROC) (GLuint index, GLhalf x, GLhalf y);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB2HVNVPROC) (GLuint index, const GLhalf* v);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB3HNVPROC) (GLuint index, GLhalf x, GLhalf y, GLhalf z);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB3HVNVPROC) (GLuint index, const GLhalf* v);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB4HNVPROC) (GLuint index, GLhalf x, GLhalf y, GLhalf z, GLhalf w);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB4HVNVPROC) (GLuint index, const GLhalf* v);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBS1HVNVPROC) (GLuint index, GLsizei n, const GLhalf* v);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBS2HVNVPROC) (GLuint index, GLsizei n, const GLhalf* v);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBS3HVNVPROC) (GLuint index, GLsizei n, const GLhalf* v);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBS4HVNVPROC) (GLuint index, GLsizei n, const GLhalf* v);
+typedef void (GLAPIENTRY * PFNGLVERTEXWEIGHTHNVPROC) (GLhalf weight);
+typedef void (GLAPIENTRY * PFNGLVERTEXWEIGHTHVNVPROC) (const GLhalf* weight);
+
+#define glColor3hNV GLEW_GET_FUN(__glewColor3hNV)
+#define glColor3hvNV GLEW_GET_FUN(__glewColor3hvNV)
+#define glColor4hNV GLEW_GET_FUN(__glewColor4hNV)
+#define glColor4hvNV GLEW_GET_FUN(__glewColor4hvNV)
+#define glFogCoordhNV GLEW_GET_FUN(__glewFogCoordhNV)
+#define glFogCoordhvNV GLEW_GET_FUN(__glewFogCoordhvNV)
+#define glMultiTexCoord1hNV GLEW_GET_FUN(__glewMultiTexCoord1hNV)
+#define glMultiTexCoord1hvNV GLEW_GET_FUN(__glewMultiTexCoord1hvNV)
+#define glMultiTexCoord2hNV GLEW_GET_FUN(__glewMultiTexCoord2hNV)
+#define glMultiTexCoord2hvNV GLEW_GET_FUN(__glewMultiTexCoord2hvNV)
+#define glMultiTexCoord3hNV GLEW_GET_FUN(__glewMultiTexCoord3hNV)
+#define glMultiTexCoord3hvNV GLEW_GET_FUN(__glewMultiTexCoord3hvNV)
+#define glMultiTexCoord4hNV GLEW_GET_FUN(__glewMultiTexCoord4hNV)
+#define glMultiTexCoord4hvNV GLEW_GET_FUN(__glewMultiTexCoord4hvNV)
+#define glNormal3hNV GLEW_GET_FUN(__glewNormal3hNV)
+#define glNormal3hvNV GLEW_GET_FUN(__glewNormal3hvNV)
+#define glSecondaryColor3hNV GLEW_GET_FUN(__glewSecondaryColor3hNV)
+#define glSecondaryColor3hvNV GLEW_GET_FUN(__glewSecondaryColor3hvNV)
+#define glTexCoord1hNV GLEW_GET_FUN(__glewTexCoord1hNV)
+#define glTexCoord1hvNV GLEW_GET_FUN(__glewTexCoord1hvNV)
+#define glTexCoord2hNV GLEW_GET_FUN(__glewTexCoord2hNV)
+#define glTexCoord2hvNV GLEW_GET_FUN(__glewTexCoord2hvNV)
+#define glTexCoord3hNV GLEW_GET_FUN(__glewTexCoord3hNV)
+#define glTexCoord3hvNV GLEW_GET_FUN(__glewTexCoord3hvNV)
+#define glTexCoord4hNV GLEW_GET_FUN(__glewTexCoord4hNV)
+#define glTexCoord4hvNV GLEW_GET_FUN(__glewTexCoord4hvNV)
+#define glVertex2hNV GLEW_GET_FUN(__glewVertex2hNV)
+#define glVertex2hvNV GLEW_GET_FUN(__glewVertex2hvNV)
+#define glVertex3hNV GLEW_GET_FUN(__glewVertex3hNV)
+#define glVertex3hvNV GLEW_GET_FUN(__glewVertex3hvNV)
+#define glVertex4hNV GLEW_GET_FUN(__glewVertex4hNV)
+#define glVertex4hvNV GLEW_GET_FUN(__glewVertex4hvNV)
+#define glVertexAttrib1hNV GLEW_GET_FUN(__glewVertexAttrib1hNV)
+#define glVertexAttrib1hvNV GLEW_GET_FUN(__glewVertexAttrib1hvNV)
+#define glVertexAttrib2hNV GLEW_GET_FUN(__glewVertexAttrib2hNV)
+#define glVertexAttrib2hvNV GLEW_GET_FUN(__glewVertexAttrib2hvNV)
+#define glVertexAttrib3hNV GLEW_GET_FUN(__glewVertexAttrib3hNV)
+#define glVertexAttrib3hvNV GLEW_GET_FUN(__glewVertexAttrib3hvNV)
+#define glVertexAttrib4hNV GLEW_GET_FUN(__glewVertexAttrib4hNV)
+#define glVertexAttrib4hvNV GLEW_GET_FUN(__glewVertexAttrib4hvNV)
+#define glVertexAttribs1hvNV GLEW_GET_FUN(__glewVertexAttribs1hvNV)
+#define glVertexAttribs2hvNV GLEW_GET_FUN(__glewVertexAttribs2hvNV)
+#define glVertexAttribs3hvNV GLEW_GET_FUN(__glewVertexAttribs3hvNV)
+#define glVertexAttribs4hvNV GLEW_GET_FUN(__glewVertexAttribs4hvNV)
+#define glVertexWeighthNV GLEW_GET_FUN(__glewVertexWeighthNV)
+#define glVertexWeighthvNV GLEW_GET_FUN(__glewVertexWeighthvNV)
+
+#define GLEW_NV_half_float GLEW_GET_VAR(__GLEW_NV_half_float)
+
+#endif /* GL_NV_half_float */
+
+/* ------------------- GL_NV_internalformat_sample_query ------------------- */
+
+#ifndef GL_NV_internalformat_sample_query
+#define GL_NV_internalformat_sample_query 1
+
+#define GL_MULTISAMPLES_NV 0x9371
+#define GL_SUPERSAMPLE_SCALE_X_NV 0x9372
+#define GL_SUPERSAMPLE_SCALE_Y_NV 0x9373
+#define GL_CONFORMANT_NV 0x9374
+
+typedef void (GLAPIENTRY * PFNGLGETINTERNALFORMATSAMPLEIVNVPROC) (GLenum target, GLenum internalformat, GLsizei samples, GLenum pname, GLsizei bufSize, GLint* params);
+
+#define glGetInternalformatSampleivNV GLEW_GET_FUN(__glewGetInternalformatSampleivNV)
+
+#define GLEW_NV_internalformat_sample_query GLEW_GET_VAR(__GLEW_NV_internalformat_sample_query)
+
+#endif /* GL_NV_internalformat_sample_query */
+
+/* ------------------------ GL_NV_light_max_exponent ----------------------- */
+
+#ifndef GL_NV_light_max_exponent
+#define GL_NV_light_max_exponent 1
+
+#define GL_MAX_SHININESS_NV 0x8504
+#define GL_MAX_SPOT_EXPONENT_NV 0x8505
+
+#define GLEW_NV_light_max_exponent GLEW_GET_VAR(__GLEW_NV_light_max_exponent)
+
+#endif /* GL_NV_light_max_exponent */
+
+/* ----------------------- GL_NV_multisample_coverage ---------------------- */
+
+#ifndef GL_NV_multisample_coverage
+#define GL_NV_multisample_coverage 1
+
+#define GL_COLOR_SAMPLES_NV 0x8E20
+
+#define GLEW_NV_multisample_coverage GLEW_GET_VAR(__GLEW_NV_multisample_coverage)
+
+#endif /* GL_NV_multisample_coverage */
+
+/* --------------------- GL_NV_multisample_filter_hint --------------------- */
+
+#ifndef GL_NV_multisample_filter_hint
+#define GL_NV_multisample_filter_hint 1
+
+#define GL_MULTISAMPLE_FILTER_HINT_NV 0x8534
+
+#define GLEW_NV_multisample_filter_hint GLEW_GET_VAR(__GLEW_NV_multisample_filter_hint)
+
+#endif /* GL_NV_multisample_filter_hint */
+
+/* ------------------------- GL_NV_occlusion_query ------------------------- */
+
+#ifndef GL_NV_occlusion_query
+#define GL_NV_occlusion_query 1
+
+#define GL_PIXEL_COUNTER_BITS_NV 0x8864
+#define GL_CURRENT_OCCLUSION_QUERY_ID_NV 0x8865
+#define GL_PIXEL_COUNT_NV 0x8866
+#define GL_PIXEL_COUNT_AVAILABLE_NV 0x8867
+
+typedef void (GLAPIENTRY * PFNGLBEGINOCCLUSIONQUERYNVPROC) (GLuint id);
+typedef void (GLAPIENTRY * PFNGLDELETEOCCLUSIONQUERIESNVPROC) (GLsizei n, const GLuint* ids);
+typedef void (GLAPIENTRY * PFNGLENDOCCLUSIONQUERYNVPROC) (void);
+typedef void (GLAPIENTRY * PFNGLGENOCCLUSIONQUERIESNVPROC) (GLsizei n, GLuint* ids);
+typedef void (GLAPIENTRY * PFNGLGETOCCLUSIONQUERYIVNVPROC) (GLuint id, GLenum pname, GLint* params);
+typedef void (GLAPIENTRY * PFNGLGETOCCLUSIONQUERYUIVNVPROC) (GLuint id, GLenum pname, GLuint* params);
+typedef GLboolean (GLAPIENTRY * PFNGLISOCCLUSIONQUERYNVPROC) (GLuint id);
+
+#define glBeginOcclusionQueryNV GLEW_GET_FUN(__glewBeginOcclusionQueryNV)
+#define glDeleteOcclusionQueriesNV GLEW_GET_FUN(__glewDeleteOcclusionQueriesNV)
+#define glEndOcclusionQueryNV GLEW_GET_FUN(__glewEndOcclusionQueryNV)
+#define glGenOcclusionQueriesNV GLEW_GET_FUN(__glewGenOcclusionQueriesNV)
+#define glGetOcclusionQueryivNV GLEW_GET_FUN(__glewGetOcclusionQueryivNV)
+#define glGetOcclusionQueryuivNV GLEW_GET_FUN(__glewGetOcclusionQueryuivNV)
+#define glIsOcclusionQueryNV GLEW_GET_FUN(__glewIsOcclusionQueryNV)
+
+#define GLEW_NV_occlusion_query GLEW_GET_VAR(__GLEW_NV_occlusion_query)
+
+#endif /* GL_NV_occlusion_query */
+
+/* ----------------------- GL_NV_packed_depth_stencil ---------------------- */
+
+#ifndef GL_NV_packed_depth_stencil
+#define GL_NV_packed_depth_stencil 1
+
+#define GL_DEPTH_STENCIL_NV 0x84F9
+#define GL_UNSIGNED_INT_24_8_NV 0x84FA
+
+#define GLEW_NV_packed_depth_stencil GLEW_GET_VAR(__GLEW_NV_packed_depth_stencil)
+
+#endif /* GL_NV_packed_depth_stencil */
+
+/* --------------------- GL_NV_parameter_buffer_object --------------------- */
+
+#ifndef GL_NV_parameter_buffer_object
+#define GL_NV_parameter_buffer_object 1
+
+#define GL_MAX_PROGRAM_PARAMETER_BUFFER_BINDINGS_NV 0x8DA0
+#define GL_MAX_PROGRAM_PARAMETER_BUFFER_SIZE_NV 0x8DA1
+#define GL_VERTEX_PROGRAM_PARAMETER_BUFFER_NV 0x8DA2
+#define GL_GEOMETRY_PROGRAM_PARAMETER_BUFFER_NV 0x8DA3
+#define GL_FRAGMENT_PROGRAM_PARAMETER_BUFFER_NV 0x8DA4
+
+typedef void (GLAPIENTRY * PFNGLPROGRAMBUFFERPARAMETERSIIVNVPROC) (GLenum target, GLuint buffer, GLuint index, GLsizei count, const GLint *params);
+typedef void (GLAPIENTRY * PFNGLPROGRAMBUFFERPARAMETERSIUIVNVPROC) (GLenum target, GLuint buffer, GLuint index, GLsizei count, const GLuint *params);
+typedef void (GLAPIENTRY * PFNGLPROGRAMBUFFERPARAMETERSFVNVPROC) (GLenum target, GLuint buffer, GLuint index, GLsizei count, const GLfloat *params);
+
+#define glProgramBufferParametersIivNV GLEW_GET_FUN(__glewProgramBufferParametersIivNV)
+#define glProgramBufferParametersIuivNV GLEW_GET_FUN(__glewProgramBufferParametersIuivNV)
+#define glProgramBufferParametersfvNV GLEW_GET_FUN(__glewProgramBufferParametersfvNV)
+
+#define GLEW_NV_parameter_buffer_object GLEW_GET_VAR(__GLEW_NV_parameter_buffer_object)
+
+#endif /* GL_NV_parameter_buffer_object */
+
+/* --------------------- GL_NV_parameter_buffer_object2 -------------------- */
+
+#ifndef GL_NV_parameter_buffer_object2
+#define GL_NV_parameter_buffer_object2 1
+
+#define GLEW_NV_parameter_buffer_object2 GLEW_GET_VAR(__GLEW_NV_parameter_buffer_object2)
+
+#endif /* GL_NV_parameter_buffer_object2 */
+
+/* -------------------------- GL_NV_path_rendering ------------------------- */
+
+#ifndef GL_NV_path_rendering
+#define GL_NV_path_rendering 1
+
+#define GL_CLOSE_PATH_NV 0x00
+#define GL_BOLD_BIT_NV 0x01
+#define GL_GLYPH_WIDTH_BIT_NV 0x01
+#define GL_GLYPH_HEIGHT_BIT_NV 0x02
+#define GL_ITALIC_BIT_NV 0x02
+#define GL_MOVE_TO_NV 0x02
+#define GL_RELATIVE_MOVE_TO_NV 0x03
+#define GL_GLYPH_HORIZONTAL_BEARING_X_BIT_NV 0x04
+#define GL_LINE_TO_NV 0x04
+#define GL_RELATIVE_LINE_TO_NV 0x05
+#define GL_HORIZONTAL_LINE_TO_NV 0x06
+#define GL_RELATIVE_HORIZONTAL_LINE_TO_NV 0x07
+#define GL_GLYPH_HORIZONTAL_BEARING_Y_BIT_NV 0x08
+#define GL_VERTICAL_LINE_TO_NV 0x08
+#define GL_RELATIVE_VERTICAL_LINE_TO_NV 0x09
+#define GL_QUADRATIC_CURVE_TO_NV 0x0A
+#define GL_RELATIVE_QUADRATIC_CURVE_TO_NV 0x0B
+#define GL_CUBIC_CURVE_TO_NV 0x0C
+#define GL_RELATIVE_CUBIC_CURVE_TO_NV 0x0D
+#define GL_SMOOTH_QUADRATIC_CURVE_TO_NV 0x0E
+#define GL_RELATIVE_SMOOTH_QUADRATIC_CURVE_TO_NV 0x0F
+#define GL_GLYPH_HORIZONTAL_BEARING_ADVANCE_BIT_NV 0x10
+#define GL_SMOOTH_CUBIC_CURVE_TO_NV 0x10
+#define GL_RELATIVE_SMOOTH_CUBIC_CURVE_TO_NV 0x11
+#define GL_SMALL_CCW_ARC_TO_NV 0x12
+#define GL_RELATIVE_SMALL_CCW_ARC_TO_NV 0x13
+#define GL_SMALL_CW_ARC_TO_NV 0x14
+#define GL_RELATIVE_SMALL_CW_ARC_TO_NV 0x15
+#define GL_LARGE_CCW_ARC_TO_NV 0x16
+#define GL_RELATIVE_LARGE_CCW_ARC_TO_NV 0x17
+#define GL_LARGE_CW_ARC_TO_NV 0x18
+#define GL_RELATIVE_LARGE_CW_ARC_TO_NV 0x19
+#define GL_CONIC_CURVE_TO_NV 0x1A
+#define GL_RELATIVE_CONIC_CURVE_TO_NV 0x1B
+#define GL_GLYPH_VERTICAL_BEARING_X_BIT_NV 0x20
+#define GL_GLYPH_VERTICAL_BEARING_Y_BIT_NV 0x40
+#define GL_GLYPH_VERTICAL_BEARING_ADVANCE_BIT_NV 0x80
+#define GL_ROUNDED_RECT_NV 0xE8
+#define GL_RELATIVE_ROUNDED_RECT_NV 0xE9
+#define GL_ROUNDED_RECT2_NV 0xEA
+#define GL_RELATIVE_ROUNDED_RECT2_NV 0xEB
+#define GL_ROUNDED_RECT4_NV 0xEC
+#define GL_RELATIVE_ROUNDED_RECT4_NV 0xED
+#define GL_ROUNDED_RECT8_NV 0xEE
+#define GL_RELATIVE_ROUNDED_RECT8_NV 0xEF
+#define GL_RESTART_PATH_NV 0xF0
+#define GL_DUP_FIRST_CUBIC_CURVE_TO_NV 0xF2
+#define GL_DUP_LAST_CUBIC_CURVE_TO_NV 0xF4
+#define GL_RECT_NV 0xF6
+#define GL_RELATIVE_RECT_NV 0xF7
+#define GL_CIRCULAR_CCW_ARC_TO_NV 0xF8
+#define GL_CIRCULAR_CW_ARC_TO_NV 0xFA
+#define GL_CIRCULAR_TANGENT_ARC_TO_NV 0xFC
+#define GL_ARC_TO_NV 0xFE
+#define GL_RELATIVE_ARC_TO_NV 0xFF
+#define GL_GLYPH_HAS_KERNING_BIT_NV 0x100
+#define GL_PRIMARY_COLOR_NV 0x852C
+#define GL_SECONDARY_COLOR_NV 0x852D
+#define GL_PRIMARY_COLOR 0x8577
+#define GL_PATH_FORMAT_SVG_NV 0x9070
+#define GL_PATH_FORMAT_PS_NV 0x9071
+#define GL_STANDARD_FONT_NAME_NV 0x9072
+#define GL_SYSTEM_FONT_NAME_NV 0x9073
+#define GL_FILE_NAME_NV 0x9074
+#define GL_PATH_STROKE_WIDTH_NV 0x9075
+#define GL_PATH_END_CAPS_NV 0x9076
+#define GL_PATH_INITIAL_END_CAP_NV 0x9077
+#define GL_PATH_TERMINAL_END_CAP_NV 0x9078
+#define GL_PATH_JOIN_STYLE_NV 0x9079
+#define GL_PATH_MITER_LIMIT_NV 0x907A
+#define GL_PATH_DASH_CAPS_NV 0x907B
+#define GL_PATH_INITIAL_DASH_CAP_NV 0x907C
+#define GL_PATH_TERMINAL_DASH_CAP_NV 0x907D
+#define GL_PATH_DASH_OFFSET_NV 0x907E
+#define GL_PATH_CLIENT_LENGTH_NV 0x907F
+#define GL_PATH_FILL_MODE_NV 0x9080
+#define GL_PATH_FILL_MASK_NV 0x9081
+#define GL_PATH_FILL_COVER_MODE_NV 0x9082
+#define GL_PATH_STROKE_COVER_MODE_NV 0x9083
+#define GL_PATH_STROKE_MASK_NV 0x9084
+#define GL_PATH_STROKE_BOUND_NV 0x9086
+#define GL_COUNT_UP_NV 0x9088
+#define GL_COUNT_DOWN_NV 0x9089
+#define GL_PATH_OBJECT_BOUNDING_BOX_NV 0x908A
+#define GL_CONVEX_HULL_NV 0x908B
+#define GL_BOUNDING_BOX_NV 0x908D
+#define GL_TRANSLATE_X_NV 0x908E
+#define GL_TRANSLATE_Y_NV 0x908F
+#define GL_TRANSLATE_2D_NV 0x9090
+#define GL_TRANSLATE_3D_NV 0x9091
+#define GL_AFFINE_2D_NV 0x9092
+#define GL_AFFINE_3D_NV 0x9094
+#define GL_TRANSPOSE_AFFINE_2D_NV 0x9096
+#define GL_TRANSPOSE_AFFINE_3D_NV 0x9098
+#define GL_UTF8_NV 0x909A
+#define GL_UTF16_NV 0x909B
+#define GL_BOUNDING_BOX_OF_BOUNDING_BOXES_NV 0x909C
+#define GL_PATH_COMMAND_COUNT_NV 0x909D
+#define GL_PATH_COORD_COUNT_NV 0x909E
+#define GL_PATH_DASH_ARRAY_COUNT_NV 0x909F
+#define GL_PATH_COMPUTED_LENGTH_NV 0x90A0
+#define GL_PATH_FILL_BOUNDING_BOX_NV 0x90A1
+#define GL_PATH_STROKE_BOUNDING_BOX_NV 0x90A2
+#define GL_SQUARE_NV 0x90A3
+#define GL_ROUND_NV 0x90A4
+#define GL_TRIANGULAR_NV 0x90A5
+#define GL_BEVEL_NV 0x90A6
+#define GL_MITER_REVERT_NV 0x90A7
+#define GL_MITER_TRUNCATE_NV 0x90A8
+#define GL_SKIP_MISSING_GLYPH_NV 0x90A9
+#define GL_USE_MISSING_GLYPH_NV 0x90AA
+#define GL_PATH_ERROR_POSITION_NV 0x90AB
+#define GL_PATH_FOG_GEN_MODE_NV 0x90AC
+#define GL_ACCUM_ADJACENT_PAIRS_NV 0x90AD
+#define GL_ADJACENT_PAIRS_NV 0x90AE
+#define GL_FIRST_TO_REST_NV 0x90AF
+#define GL_PATH_GEN_MODE_NV 0x90B0
+#define GL_PATH_GEN_COEFF_NV 0x90B1
+#define GL_PATH_GEN_COLOR_FORMAT_NV 0x90B2
+#define GL_PATH_GEN_COMPONENTS_NV 0x90B3
+#define GL_PATH_DASH_OFFSET_RESET_NV 0x90B4
+#define GL_MOVE_TO_RESETS_NV 0x90B5
+#define GL_MOVE_TO_CONTINUES_NV 0x90B6
+#define GL_PATH_STENCIL_FUNC_NV 0x90B7
+#define GL_PATH_STENCIL_REF_NV 0x90B8
+#define GL_PATH_STENCIL_VALUE_MASK_NV 0x90B9
+#define GL_PATH_STENCIL_DEPTH_OFFSET_FACTOR_NV 0x90BD
+#define GL_PATH_STENCIL_DEPTH_OFFSET_UNITS_NV 0x90BE
+#define GL_PATH_COVER_DEPTH_FUNC_NV 0x90BF
+#define GL_FONT_GLYPHS_AVAILABLE_NV 0x9368
+#define GL_FONT_TARGET_UNAVAILABLE_NV 0x9369
+#define GL_FONT_UNAVAILABLE_NV 0x936A
+#define GL_FONT_UNINTELLIGIBLE_NV 0x936B
+#define GL_STANDARD_FONT_FORMAT_NV 0x936C
+#define GL_FRAGMENT_INPUT_NV 0x936D
+#define GL_FONT_X_MIN_BOUNDS_BIT_NV 0x00010000
+#define GL_FONT_Y_MIN_BOUNDS_BIT_NV 0x00020000
+#define GL_FONT_X_MAX_BOUNDS_BIT_NV 0x00040000
+#define GL_FONT_Y_MAX_BOUNDS_BIT_NV 0x00080000
+#define GL_FONT_UNITS_PER_EM_BIT_NV 0x00100000
+#define GL_FONT_ASCENDER_BIT_NV 0x00200000
+#define GL_FONT_DESCENDER_BIT_NV 0x00400000
+#define GL_FONT_HEIGHT_BIT_NV 0x00800000
+#define GL_FONT_MAX_ADVANCE_WIDTH_BIT_NV 0x01000000
+#define GL_FONT_MAX_ADVANCE_HEIGHT_BIT_NV 0x02000000
+#define GL_FONT_UNDERLINE_POSITION_BIT_NV 0x04000000
+#define GL_FONT_UNDERLINE_THICKNESS_BIT_NV 0x08000000
+#define GL_FONT_HAS_KERNING_BIT_NV 0x10000000
+#define GL_FONT_NUM_GLYPH_INDICES_BIT_NV 0x20000000
+
+typedef void (GLAPIENTRY * PFNGLCOPYPATHNVPROC) (GLuint resultPath, GLuint srcPath);
+typedef void (GLAPIENTRY * PFNGLCOVERFILLPATHINSTANCEDNVPROC) (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum coverMode, GLenum transformType, const GLfloat *transformValues);
+typedef void (GLAPIENTRY * PFNGLCOVERFILLPATHNVPROC) (GLuint path, GLenum coverMode);
+typedef void (GLAPIENTRY * PFNGLCOVERSTROKEPATHINSTANCEDNVPROC) (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum coverMode, GLenum transformType, const GLfloat *transformValues);
+typedef void (GLAPIENTRY * PFNGLCOVERSTROKEPATHNVPROC) (GLuint path, GLenum coverMode);
+typedef void (GLAPIENTRY * PFNGLDELETEPATHSNVPROC) (GLuint path, GLsizei range);
+typedef GLuint (GLAPIENTRY * PFNGLGENPATHSNVPROC) (GLsizei range);
+typedef void (GLAPIENTRY * PFNGLGETPATHCOLORGENFVNVPROC) (GLenum color, GLenum pname, GLfloat* value);
+typedef void (GLAPIENTRY * PFNGLGETPATHCOLORGENIVNVPROC) (GLenum color, GLenum pname, GLint* value);
+typedef void (GLAPIENTRY * PFNGLGETPATHCOMMANDSNVPROC) (GLuint path, GLubyte* commands);
+typedef void (GLAPIENTRY * PFNGLGETPATHCOORDSNVPROC) (GLuint path, GLfloat* coords);
+typedef void (GLAPIENTRY * PFNGLGETPATHDASHARRAYNVPROC) (GLuint path, GLfloat* dashArray);
+typedef GLfloat (GLAPIENTRY * PFNGLGETPATHLENGTHNVPROC) (GLuint path, GLsizei startSegment, GLsizei numSegments);
+typedef void (GLAPIENTRY * PFNGLGETPATHMETRICRANGENVPROC) (GLbitfield metricQueryMask, GLuint firstPathName, GLsizei numPaths, GLsizei stride, GLfloat* metrics);
+typedef void (GLAPIENTRY * PFNGLGETPATHMETRICSNVPROC) (GLbitfield metricQueryMask, GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLsizei stride, GLfloat *metrics);
+typedef void (GLAPIENTRY * PFNGLGETPATHPARAMETERFVNVPROC) (GLuint path, GLenum pname, GLfloat* value);
+typedef void (GLAPIENTRY * PFNGLGETPATHPARAMETERIVNVPROC) (GLuint path, GLenum pname, GLint* value);
+typedef void (GLAPIENTRY * PFNGLGETPATHSPACINGNVPROC) (GLenum pathListMode, GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLfloat advanceScale, GLfloat kerningScale, GLenum transformType, GLfloat *returnedSpacing);
+typedef void (GLAPIENTRY * PFNGLGETPATHTEXGENFVNVPROC) (GLenum texCoordSet, GLenum pname, GLfloat* value);
+typedef void (GLAPIENTRY * PFNGLGETPATHTEXGENIVNVPROC) (GLenum texCoordSet, GLenum pname, GLint* value);
+typedef void (GLAPIENTRY * PFNGLGETPROGRAMRESOURCEFVNVPROC) (GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum* props, GLsizei bufSize, GLsizei *length, GLfloat *params);
+typedef void (GLAPIENTRY * PFNGLINTERPOLATEPATHSNVPROC) (GLuint resultPath, GLuint pathA, GLuint pathB, GLfloat weight);
+typedef GLboolean (GLAPIENTRY * PFNGLISPATHNVPROC) (GLuint path);
+typedef GLboolean (GLAPIENTRY * PFNGLISPOINTINFILLPATHNVPROC) (GLuint path, GLuint mask, GLfloat x, GLfloat y);
+typedef GLboolean (GLAPIENTRY * PFNGLISPOINTINSTROKEPATHNVPROC) (GLuint path, GLfloat x, GLfloat y);
+typedef void (GLAPIENTRY * PFNGLMATRIXLOAD3X2FNVPROC) (GLenum matrixMode, const GLfloat* m);
+typedef void (GLAPIENTRY * PFNGLMATRIXLOAD3X3FNVPROC) (GLenum matrixMode, const GLfloat* m);
+typedef void (GLAPIENTRY * PFNGLMATRIXLOADTRANSPOSE3X3FNVPROC) (GLenum matrixMode, const GLfloat* m);
+typedef void (GLAPIENTRY * PFNGLMATRIXMULT3X2FNVPROC) (GLenum matrixMode, const GLfloat* m);
+typedef void (GLAPIENTRY * PFNGLMATRIXMULT3X3FNVPROC) (GLenum matrixMode, const GLfloat* m);
+typedef void (GLAPIENTRY * PFNGLMATRIXMULTTRANSPOSE3X3FNVPROC) (GLenum matrixMode, const GLfloat* m);
+typedef void (GLAPIENTRY * PFNGLPATHCOLORGENNVPROC) (GLenum color, GLenum genMode, GLenum colorFormat, const GLfloat* coeffs);
+typedef void (GLAPIENTRY * PFNGLPATHCOMMANDSNVPROC) (GLuint path, GLsizei numCommands, const GLubyte* commands, GLsizei numCoords, GLenum coordType, const void*coords);
+typedef void (GLAPIENTRY * PFNGLPATHCOORDSNVPROC) (GLuint path, GLsizei numCoords, GLenum coordType, const void *coords);
+typedef void (GLAPIENTRY * PFNGLPATHCOVERDEPTHFUNCNVPROC) (GLenum zfunc);
+typedef void (GLAPIENTRY * PFNGLPATHDASHARRAYNVPROC) (GLuint path, GLsizei dashCount, const GLfloat* dashArray);
+typedef void (GLAPIENTRY * PFNGLPATHFOGGENNVPROC) (GLenum genMode);
+typedef GLenum (GLAPIENTRY * PFNGLPATHGLYPHINDEXARRAYNVPROC) (GLuint firstPathName, GLenum fontTarget, const void *fontName, GLbitfield fontStyle, GLuint firstGlyphIndex, GLsizei numGlyphs, GLuint pathParameterTemplate, GLfloat emScale);
+typedef GLenum (GLAPIENTRY * PFNGLPATHGLYPHINDEXRANGENVPROC) (GLenum fontTarget, const void *fontName, GLbitfield fontStyle, GLuint pathParameterTemplate, GLfloat emScale, GLuint baseAndCount[2]);
+typedef void (GLAPIENTRY * PFNGLPATHGLYPHRANGENVPROC) (GLuint firstPathName, GLenum fontTarget, const void *fontName, GLbitfield fontStyle, GLuint firstGlyph, GLsizei numGlyphs, GLenum handleMissingGlyphs, GLuint pathParameterTemplate, GLfloat emScale);
+typedef void (GLAPIENTRY * PFNGLPATHGLYPHSNVPROC) (GLuint firstPathName, GLenum fontTarget, const void *fontName, GLbitfield fontStyle, GLsizei numGlyphs, GLenum type, const void*charcodes, GLenum handleMissingGlyphs, GLuint pathParameterTemplate, GLfloat emScale);
+typedef GLenum (GLAPIENTRY * PFNGLPATHMEMORYGLYPHINDEXARRAYNVPROC) (GLuint firstPathName, GLenum fontTarget, GLsizeiptr fontSize, const void *fontData, GLsizei faceIndex, GLuint firstGlyphIndex, GLsizei numGlyphs, GLuint pathParameterTemplate, GLfloat emScale);
+typedef void (GLAPIENTRY * PFNGLPATHPARAMETERFNVPROC) (GLuint path, GLenum pname, GLfloat value);
+typedef void (GLAPIENTRY * PFNGLPATHPARAMETERFVNVPROC) (GLuint path, GLenum pname, const GLfloat* value);
+typedef void (GLAPIENTRY * PFNGLPATHPARAMETERINVPROC) (GLuint path, GLenum pname, GLint value);
+typedef void (GLAPIENTRY * PFNGLPATHPARAMETERIVNVPROC) (GLuint path, GLenum pname, const GLint* value);
+typedef void (GLAPIENTRY * PFNGLPATHSTENCILDEPTHOFFSETNVPROC) (GLfloat factor, GLfloat units);
+typedef void (GLAPIENTRY * PFNGLPATHSTENCILFUNCNVPROC) (GLenum func, GLint ref, GLuint mask);
+typedef void (GLAPIENTRY * PFNGLPATHSTRINGNVPROC) (GLuint path, GLenum format, GLsizei length, const void *pathString);
+typedef void (GLAPIENTRY * PFNGLPATHSUBCOMMANDSNVPROC) (GLuint path, GLsizei commandStart, GLsizei commandsToDelete, GLsizei numCommands, const GLubyte* commands, GLsizei numCoords, GLenum coordType, const void*coords);
+typedef void (GLAPIENTRY * PFNGLPATHSUBCOORDSNVPROC) (GLuint path, GLsizei coordStart, GLsizei numCoords, GLenum coordType, const void *coords);
+typedef void (GLAPIENTRY * PFNGLPATHTEXGENNVPROC) (GLenum texCoordSet, GLenum genMode, GLint components, const GLfloat* coeffs);
+typedef GLboolean (GLAPIENTRY * PFNGLPOINTALONGPATHNVPROC) (GLuint path, GLsizei startSegment, GLsizei numSegments, GLfloat distance, GLfloat* x, GLfloat *y, GLfloat *tangentX, GLfloat *tangentY);
+typedef void (GLAPIENTRY * PFNGLPROGRAMPATHFRAGMENTINPUTGENNVPROC) (GLuint program, GLint location, GLenum genMode, GLint components, const GLfloat* coeffs);
+typedef void (GLAPIENTRY * PFNGLSTENCILFILLPATHINSTANCEDNVPROC) (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum fillMode, GLuint mask, GLenum transformType, const GLfloat *transformValues);
+typedef void (GLAPIENTRY * PFNGLSTENCILFILLPATHNVPROC) (GLuint path, GLenum fillMode, GLuint mask);
+typedef void (GLAPIENTRY * PFNGLSTENCILSTROKEPATHINSTANCEDNVPROC) (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLint reference, GLuint mask, GLenum transformType, const GLfloat *transformValues);
+typedef void (GLAPIENTRY * PFNGLSTENCILSTROKEPATHNVPROC) (GLuint path, GLint reference, GLuint mask);
+typedef void (GLAPIENTRY * PFNGLSTENCILTHENCOVERFILLPATHINSTANCEDNVPROC) (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum fillMode, GLuint mask, GLenum coverMode, GLenum transformType, const GLfloat *transformValues);
+typedef void (GLAPIENTRY * PFNGLSTENCILTHENCOVERFILLPATHNVPROC) (GLuint path, GLenum fillMode, GLuint mask, GLenum coverMode);
+typedef void (GLAPIENTRY * PFNGLSTENCILTHENCOVERSTROKEPATHINSTANCEDNVPROC) (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLint reference, GLuint mask, GLenum coverMode, GLenum transformType, const GLfloat *transformValues);
+typedef void (GLAPIENTRY * PFNGLSTENCILTHENCOVERSTROKEPATHNVPROC) (GLuint path, GLint reference, GLuint mask, GLenum coverMode);
+typedef void (GLAPIENTRY * PFNGLTRANSFORMPATHNVPROC) (GLuint resultPath, GLuint srcPath, GLenum transformType, const GLfloat* transformValues);
+typedef void (GLAPIENTRY * PFNGLWEIGHTPATHSNVPROC) (GLuint resultPath, GLsizei numPaths, const GLuint paths[], const GLfloat weights[]);
+
+#define glCopyPathNV GLEW_GET_FUN(__glewCopyPathNV)
+#define glCoverFillPathInstancedNV GLEW_GET_FUN(__glewCoverFillPathInstancedNV)
+#define glCoverFillPathNV GLEW_GET_FUN(__glewCoverFillPathNV)
+#define glCoverStrokePathInstancedNV GLEW_GET_FUN(__glewCoverStrokePathInstancedNV)
+#define glCoverStrokePathNV GLEW_GET_FUN(__glewCoverStrokePathNV)
+#define glDeletePathsNV GLEW_GET_FUN(__glewDeletePathsNV)
+#define glGenPathsNV GLEW_GET_FUN(__glewGenPathsNV)
+#define glGetPathColorGenfvNV GLEW_GET_FUN(__glewGetPathColorGenfvNV)
+#define glGetPathColorGenivNV GLEW_GET_FUN(__glewGetPathColorGenivNV)
+#define glGetPathCommandsNV GLEW_GET_FUN(__glewGetPathCommandsNV)
+#define glGetPathCoordsNV GLEW_GET_FUN(__glewGetPathCoordsNV)
+#define glGetPathDashArrayNV GLEW_GET_FUN(__glewGetPathDashArrayNV)
+#define glGetPathLengthNV GLEW_GET_FUN(__glewGetPathLengthNV)
+#define glGetPathMetricRangeNV GLEW_GET_FUN(__glewGetPathMetricRangeNV)
+#define glGetPathMetricsNV GLEW_GET_FUN(__glewGetPathMetricsNV)
+#define glGetPathParameterfvNV GLEW_GET_FUN(__glewGetPathParameterfvNV)
+#define glGetPathParameterivNV GLEW_GET_FUN(__glewGetPathParameterivNV)
+#define glGetPathSpacingNV GLEW_GET_FUN(__glewGetPathSpacingNV)
+#define glGetPathTexGenfvNV GLEW_GET_FUN(__glewGetPathTexGenfvNV)
+#define glGetPathTexGenivNV GLEW_GET_FUN(__glewGetPathTexGenivNV)
+#define glGetProgramResourcefvNV GLEW_GET_FUN(__glewGetProgramResourcefvNV)
+#define glInterpolatePathsNV GLEW_GET_FUN(__glewInterpolatePathsNV)
+#define glIsPathNV GLEW_GET_FUN(__glewIsPathNV)
+#define glIsPointInFillPathNV GLEW_GET_FUN(__glewIsPointInFillPathNV)
+#define glIsPointInStrokePathNV GLEW_GET_FUN(__glewIsPointInStrokePathNV)
+#define glMatrixLoad3x2fNV GLEW_GET_FUN(__glewMatrixLoad3x2fNV)
+#define glMatrixLoad3x3fNV GLEW_GET_FUN(__glewMatrixLoad3x3fNV)
+#define glMatrixLoadTranspose3x3fNV GLEW_GET_FUN(__glewMatrixLoadTranspose3x3fNV)
+#define glMatrixMult3x2fNV GLEW_GET_FUN(__glewMatrixMult3x2fNV)
+#define glMatrixMult3x3fNV GLEW_GET_FUN(__glewMatrixMult3x3fNV)
+#define glMatrixMultTranspose3x3fNV GLEW_GET_FUN(__glewMatrixMultTranspose3x3fNV)
+#define glPathColorGenNV GLEW_GET_FUN(__glewPathColorGenNV)
+#define glPathCommandsNV GLEW_GET_FUN(__glewPathCommandsNV)
+#define glPathCoordsNV GLEW_GET_FUN(__glewPathCoordsNV)
+#define glPathCoverDepthFuncNV GLEW_GET_FUN(__glewPathCoverDepthFuncNV)
+#define glPathDashArrayNV GLEW_GET_FUN(__glewPathDashArrayNV)
+#define glPathFogGenNV GLEW_GET_FUN(__glewPathFogGenNV)
+#define glPathGlyphIndexArrayNV GLEW_GET_FUN(__glewPathGlyphIndexArrayNV)
+#define glPathGlyphIndexRangeNV GLEW_GET_FUN(__glewPathGlyphIndexRangeNV)
+#define glPathGlyphRangeNV GLEW_GET_FUN(__glewPathGlyphRangeNV)
+#define glPathGlyphsNV GLEW_GET_FUN(__glewPathGlyphsNV)
+#define glPathMemoryGlyphIndexArrayNV GLEW_GET_FUN(__glewPathMemoryGlyphIndexArrayNV)
+#define glPathParameterfNV GLEW_GET_FUN(__glewPathParameterfNV)
+#define glPathParameterfvNV GLEW_GET_FUN(__glewPathParameterfvNV)
+#define glPathParameteriNV GLEW_GET_FUN(__glewPathParameteriNV)
+#define glPathParameterivNV GLEW_GET_FUN(__glewPathParameterivNV)
+#define glPathStencilDepthOffsetNV GLEW_GET_FUN(__glewPathStencilDepthOffsetNV)
+#define glPathStencilFuncNV GLEW_GET_FUN(__glewPathStencilFuncNV)
+#define glPathStringNV GLEW_GET_FUN(__glewPathStringNV)
+#define glPathSubCommandsNV GLEW_GET_FUN(__glewPathSubCommandsNV)
+#define glPathSubCoordsNV GLEW_GET_FUN(__glewPathSubCoordsNV)
+#define glPathTexGenNV GLEW_GET_FUN(__glewPathTexGenNV)
+#define glPointAlongPathNV GLEW_GET_FUN(__glewPointAlongPathNV)
+#define glProgramPathFragmentInputGenNV GLEW_GET_FUN(__glewProgramPathFragmentInputGenNV)
+#define glStencilFillPathInstancedNV GLEW_GET_FUN(__glewStencilFillPathInstancedNV)
+#define glStencilFillPathNV GLEW_GET_FUN(__glewStencilFillPathNV)
+#define glStencilStrokePathInstancedNV GLEW_GET_FUN(__glewStencilStrokePathInstancedNV)
+#define glStencilStrokePathNV GLEW_GET_FUN(__glewStencilStrokePathNV)
+#define glStencilThenCoverFillPathInstancedNV GLEW_GET_FUN(__glewStencilThenCoverFillPathInstancedNV)
+#define glStencilThenCoverFillPathNV GLEW_GET_FUN(__glewStencilThenCoverFillPathNV)
+#define glStencilThenCoverStrokePathInstancedNV GLEW_GET_FUN(__glewStencilThenCoverStrokePathInstancedNV)
+#define glStencilThenCoverStrokePathNV GLEW_GET_FUN(__glewStencilThenCoverStrokePathNV)
+#define glTransformPathNV GLEW_GET_FUN(__glewTransformPathNV)
+#define glWeightPathsNV GLEW_GET_FUN(__glewWeightPathsNV)
+
+#define GLEW_NV_path_rendering GLEW_GET_VAR(__GLEW_NV_path_rendering)
+
+#endif /* GL_NV_path_rendering */
+
+/* -------------------- GL_NV_path_rendering_shared_edge ------------------- */
+
+#ifndef GL_NV_path_rendering_shared_edge
+#define GL_NV_path_rendering_shared_edge 1
+
+#define GL_SHARED_EDGE_NV 0xC0
+
+#define GLEW_NV_path_rendering_shared_edge GLEW_GET_VAR(__GLEW_NV_path_rendering_shared_edge)
+
+#endif /* GL_NV_path_rendering_shared_edge */
+
+/* ------------------------- GL_NV_pixel_data_range ------------------------ */
+
+#ifndef GL_NV_pixel_data_range
+#define GL_NV_pixel_data_range 1
+
+#define GL_WRITE_PIXEL_DATA_RANGE_NV 0x8878
+#define GL_READ_PIXEL_DATA_RANGE_NV 0x8879
+#define GL_WRITE_PIXEL_DATA_RANGE_LENGTH_NV 0x887A
+#define GL_READ_PIXEL_DATA_RANGE_LENGTH_NV 0x887B
+#define GL_WRITE_PIXEL_DATA_RANGE_POINTER_NV 0x887C
+#define GL_READ_PIXEL_DATA_RANGE_POINTER_NV 0x887D
+
+typedef void (GLAPIENTRY * PFNGLFLUSHPIXELDATARANGENVPROC) (GLenum target);
+typedef void (GLAPIENTRY * PFNGLPIXELDATARANGENVPROC) (GLenum target, GLsizei length, void *pointer);
+
+#define glFlushPixelDataRangeNV GLEW_GET_FUN(__glewFlushPixelDataRangeNV)
+#define glPixelDataRangeNV GLEW_GET_FUN(__glewPixelDataRangeNV)
+
+#define GLEW_NV_pixel_data_range GLEW_GET_VAR(__GLEW_NV_pixel_data_range)
+
+#endif /* GL_NV_pixel_data_range */
+
+/* --------------------------- GL_NV_point_sprite -------------------------- */
+
+#ifndef GL_NV_point_sprite
+#define GL_NV_point_sprite 1
+
+#define GL_POINT_SPRITE_NV 0x8861
+#define GL_COORD_REPLACE_NV 0x8862
+#define GL_POINT_SPRITE_R_MODE_NV 0x8863
+
+typedef void (GLAPIENTRY * PFNGLPOINTPARAMETERINVPROC) (GLenum pname, GLint param);
+typedef void (GLAPIENTRY * PFNGLPOINTPARAMETERIVNVPROC) (GLenum pname, const GLint* params);
+
+#define glPointParameteriNV GLEW_GET_FUN(__glewPointParameteriNV)
+#define glPointParameterivNV GLEW_GET_FUN(__glewPointParameterivNV)
+
+#define GLEW_NV_point_sprite GLEW_GET_VAR(__GLEW_NV_point_sprite)
+
+#endif /* GL_NV_point_sprite */
+
+/* -------------------------- GL_NV_present_video -------------------------- */
+
+#ifndef GL_NV_present_video
+#define GL_NV_present_video 1
+
+#define GL_FRAME_NV 0x8E26
+#define GL_FIELDS_NV 0x8E27
+#define GL_CURRENT_TIME_NV 0x8E28
+#define GL_NUM_FILL_STREAMS_NV 0x8E29
+#define GL_PRESENT_TIME_NV 0x8E2A
+#define GL_PRESENT_DURATION_NV 0x8E2B
+
+typedef void (GLAPIENTRY * PFNGLGETVIDEOI64VNVPROC) (GLuint video_slot, GLenum pname, GLint64EXT* params);
+typedef void (GLAPIENTRY * PFNGLGETVIDEOIVNVPROC) (GLuint video_slot, GLenum pname, GLint* params);
+typedef void (GLAPIENTRY * PFNGLGETVIDEOUI64VNVPROC) (GLuint video_slot, GLenum pname, GLuint64EXT* params);
+typedef void (GLAPIENTRY * PFNGLGETVIDEOUIVNVPROC) (GLuint video_slot, GLenum pname, GLuint* params);
+typedef void (GLAPIENTRY * PFNGLPRESENTFRAMEDUALFILLNVPROC) (GLuint video_slot, GLuint64EXT minPresentTime, GLuint beginPresentTimeId, GLuint presentDurationId, GLenum type, GLenum target0, GLuint fill0, GLenum target1, GLuint fill1, GLenum target2, GLuint fill2, GLenum target3, GLuint fill3);
+typedef void (GLAPIENTRY * PFNGLPRESENTFRAMEKEYEDNVPROC) (GLuint video_slot, GLuint64EXT minPresentTime, GLuint beginPresentTimeId, GLuint presentDurationId, GLenum type, GLenum target0, GLuint fill0, GLuint key0, GLenum target1, GLuint fill1, GLuint key1);
+
+#define glGetVideoi64vNV GLEW_GET_FUN(__glewGetVideoi64vNV)
+#define glGetVideoivNV GLEW_GET_FUN(__glewGetVideoivNV)
+#define glGetVideoui64vNV GLEW_GET_FUN(__glewGetVideoui64vNV)
+#define glGetVideouivNV GLEW_GET_FUN(__glewGetVideouivNV)
+#define glPresentFrameDualFillNV GLEW_GET_FUN(__glewPresentFrameDualFillNV)
+#define glPresentFrameKeyedNV GLEW_GET_FUN(__glewPresentFrameKeyedNV)
+
+#define GLEW_NV_present_video GLEW_GET_VAR(__GLEW_NV_present_video)
+
+#endif /* GL_NV_present_video */
+
+/* ------------------------ GL_NV_primitive_restart ------------------------ */
+
+#ifndef GL_NV_primitive_restart
+#define GL_NV_primitive_restart 1
+
+#define GL_PRIMITIVE_RESTART_NV 0x8558
+#define GL_PRIMITIVE_RESTART_INDEX_NV 0x8559
+
+typedef void (GLAPIENTRY * PFNGLPRIMITIVERESTARTINDEXNVPROC) (GLuint index);
+typedef void (GLAPIENTRY * PFNGLPRIMITIVERESTARTNVPROC) (void);
+
+#define glPrimitiveRestartIndexNV GLEW_GET_FUN(__glewPrimitiveRestartIndexNV)
+#define glPrimitiveRestartNV GLEW_GET_FUN(__glewPrimitiveRestartNV)
+
+#define GLEW_NV_primitive_restart GLEW_GET_VAR(__GLEW_NV_primitive_restart)
+
+#endif /* GL_NV_primitive_restart */
+
+/* ------------------------ GL_NV_register_combiners ----------------------- */
+
+#ifndef GL_NV_register_combiners
+#define GL_NV_register_combiners 1
+
+#define GL_REGISTER_COMBINERS_NV 0x8522
+#define GL_VARIABLE_A_NV 0x8523
+#define GL_VARIABLE_B_NV 0x8524
+#define GL_VARIABLE_C_NV 0x8525
+#define GL_VARIABLE_D_NV 0x8526
+#define GL_VARIABLE_E_NV 0x8527
+#define GL_VARIABLE_F_NV 0x8528
+#define GL_VARIABLE_G_NV 0x8529
+#define GL_CONSTANT_COLOR0_NV 0x852A
+#define GL_CONSTANT_COLOR1_NV 0x852B
+#define GL_PRIMARY_COLOR_NV 0x852C
+#define GL_SECONDARY_COLOR_NV 0x852D
+#define GL_SPARE0_NV 0x852E
+#define GL_SPARE1_NV 0x852F
+#define GL_DISCARD_NV 0x8530
+#define GL_E_TIMES_F_NV 0x8531
+#define GL_SPARE0_PLUS_SECONDARY_COLOR_NV 0x8532
+#define GL_UNSIGNED_IDENTITY_NV 0x8536
+#define GL_UNSIGNED_INVERT_NV 0x8537
+#define GL_EXPAND_NORMAL_NV 0x8538
+#define GL_EXPAND_NEGATE_NV 0x8539
+#define GL_HALF_BIAS_NORMAL_NV 0x853A
+#define GL_HALF_BIAS_NEGATE_NV 0x853B
+#define GL_SIGNED_IDENTITY_NV 0x853C
+#define GL_SIGNED_NEGATE_NV 0x853D
+#define GL_SCALE_BY_TWO_NV 0x853E
+#define GL_SCALE_BY_FOUR_NV 0x853F
+#define GL_SCALE_BY_ONE_HALF_NV 0x8540
+#define GL_BIAS_BY_NEGATIVE_ONE_HALF_NV 0x8541
+#define GL_COMBINER_INPUT_NV 0x8542
+#define GL_COMBINER_MAPPING_NV 0x8543
+#define GL_COMBINER_COMPONENT_USAGE_NV 0x8544
+#define GL_COMBINER_AB_DOT_PRODUCT_NV 0x8545
+#define GL_COMBINER_CD_DOT_PRODUCT_NV 0x8546
+#define GL_COMBINER_MUX_SUM_NV 0x8547
+#define GL_COMBINER_SCALE_NV 0x8548
+#define GL_COMBINER_BIAS_NV 0x8549
+#define GL_COMBINER_AB_OUTPUT_NV 0x854A
+#define GL_COMBINER_CD_OUTPUT_NV 0x854B
+#define GL_COMBINER_SUM_OUTPUT_NV 0x854C
+#define GL_MAX_GENERAL_COMBINERS_NV 0x854D
+#define GL_NUM_GENERAL_COMBINERS_NV 0x854E
+#define GL_COLOR_SUM_CLAMP_NV 0x854F
+#define GL_COMBINER0_NV 0x8550
+#define GL_COMBINER1_NV 0x8551
+#define GL_COMBINER2_NV 0x8552
+#define GL_COMBINER3_NV 0x8553
+#define GL_COMBINER4_NV 0x8554
+#define GL_COMBINER5_NV 0x8555
+#define GL_COMBINER6_NV 0x8556
+#define GL_COMBINER7_NV 0x8557
+
+typedef void (GLAPIENTRY * PFNGLCOMBINERINPUTNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage);
+typedef void (GLAPIENTRY * PFNGLCOMBINEROUTPUTNVPROC) (GLenum stage, GLenum portion, GLenum abOutput, GLenum cdOutput, GLenum sumOutput, GLenum scale, GLenum bias, GLboolean abDotProduct, GLboolean cdDotProduct, GLboolean muxSum);
+typedef void (GLAPIENTRY * PFNGLCOMBINERPARAMETERFNVPROC) (GLenum pname, GLfloat param);
+typedef void (GLAPIENTRY * PFNGLCOMBINERPARAMETERFVNVPROC) (GLenum pname, const GLfloat* params);
+typedef void (GLAPIENTRY * PFNGLCOMBINERPARAMETERINVPROC) (GLenum pname, GLint param);
+typedef void (GLAPIENTRY * PFNGLCOMBINERPARAMETERIVNVPROC) (GLenum pname, const GLint* params);
+typedef void (GLAPIENTRY * PFNGLFINALCOMBINERINPUTNVPROC) (GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage);
+typedef void (GLAPIENTRY * PFNGLGETCOMBINERINPUTPARAMETERFVNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLfloat* params);
+typedef void (GLAPIENTRY * PFNGLGETCOMBINERINPUTPARAMETERIVNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLint* params);
+typedef void (GLAPIENTRY * PFNGLGETCOMBINEROUTPUTPARAMETERFVNVPROC) (GLenum stage, GLenum portion, GLenum pname, GLfloat* params);
+typedef void (GLAPIENTRY * PFNGLGETCOMBINEROUTPUTPARAMETERIVNVPROC) (GLenum stage, GLenum portion, GLenum pname, GLint* params);
+typedef void (GLAPIENTRY * PFNGLGETFINALCOMBINERINPUTPARAMETERFVNVPROC) (GLenum variable, GLenum pname, GLfloat* params);
+typedef void (GLAPIENTRY * PFNGLGETFINALCOMBINERINPUTPARAMETERIVNVPROC) (GLenum variable, GLenum pname, GLint* params);
+
+#define glCombinerInputNV GLEW_GET_FUN(__glewCombinerInputNV)
+#define glCombinerOutputNV GLEW_GET_FUN(__glewCombinerOutputNV)
+#define glCombinerParameterfNV GLEW_GET_FUN(__glewCombinerParameterfNV)
+#define glCombinerParameterfvNV GLEW_GET_FUN(__glewCombinerParameterfvNV)
+#define glCombinerParameteriNV GLEW_GET_FUN(__glewCombinerParameteriNV)
+#define glCombinerParameterivNV GLEW_GET_FUN(__glewCombinerParameterivNV)
+#define glFinalCombinerInputNV GLEW_GET_FUN(__glewFinalCombinerInputNV)
+#define glGetCombinerInputParameterfvNV GLEW_GET_FUN(__glewGetCombinerInputParameterfvNV)
+#define glGetCombinerInputParameterivNV GLEW_GET_FUN(__glewGetCombinerInputParameterivNV)
+#define glGetCombinerOutputParameterfvNV GLEW_GET_FUN(__glewGetCombinerOutputParameterfvNV)
+#define glGetCombinerOutputParameterivNV GLEW_GET_FUN(__glewGetCombinerOutputParameterivNV)
+#define glGetFinalCombinerInputParameterfvNV GLEW_GET_FUN(__glewGetFinalCombinerInputParameterfvNV)
+#define glGetFinalCombinerInputParameterivNV GLEW_GET_FUN(__glewGetFinalCombinerInputParameterivNV)
+
+#define GLEW_NV_register_combiners GLEW_GET_VAR(__GLEW_NV_register_combiners)
+
+#endif /* GL_NV_register_combiners */
+
+/* ----------------------- GL_NV_register_combiners2 ----------------------- */
+
+#ifndef GL_NV_register_combiners2
+#define GL_NV_register_combiners2 1
+
+#define GL_PER_STAGE_CONSTANTS_NV 0x8535
+
+typedef void (GLAPIENTRY * PFNGLCOMBINERSTAGEPARAMETERFVNVPROC) (GLenum stage, GLenum pname, const GLfloat* params);
+typedef void (GLAPIENTRY * PFNGLGETCOMBINERSTAGEPARAMETERFVNVPROC) (GLenum stage, GLenum pname, GLfloat* params);
+
+#define glCombinerStageParameterfvNV GLEW_GET_FUN(__glewCombinerStageParameterfvNV)
+#define glGetCombinerStageParameterfvNV GLEW_GET_FUN(__glewGetCombinerStageParameterfvNV)
+
+#define GLEW_NV_register_combiners2 GLEW_GET_VAR(__GLEW_NV_register_combiners2)
+
+#endif /* GL_NV_register_combiners2 */
+
+/* ------------------------- GL_NV_sample_locations ------------------------ */
+
+#ifndef GL_NV_sample_locations
+#define GL_NV_sample_locations 1
+
+#define GL_SAMPLE_LOCATION_NV 0x8E50
+#define GL_SAMPLE_LOCATION_SUBPIXEL_BITS_NV 0x933D
+#define GL_SAMPLE_LOCATION_PIXEL_GRID_WIDTH_NV 0x933E
+#define GL_SAMPLE_LOCATION_PIXEL_GRID_HEIGHT_NV 0x933F
+#define GL_PROGRAMMABLE_SAMPLE_LOCATION_TABLE_SIZE_NV 0x9340
+#define GL_PROGRAMMABLE_SAMPLE_LOCATION_NV 0x9341
+#define GL_FRAMEBUFFER_PROGRAMMABLE_SAMPLE_LOCATIONS_NV 0x9342
+#define GL_FRAMEBUFFER_SAMPLE_LOCATION_PIXEL_GRID_NV 0x9343
+
+typedef void (GLAPIENTRY * PFNGLFRAMEBUFFERSAMPLELOCATIONSFVNVPROC) (GLenum target, GLuint start, GLsizei count, const GLfloat* v);
+typedef void (GLAPIENTRY * PFNGLNAMEDFRAMEBUFFERSAMPLELOCATIONSFVNVPROC) (GLuint framebuffer, GLuint start, GLsizei count, const GLfloat* v);
+
+#define glFramebufferSampleLocationsfvNV GLEW_GET_FUN(__glewFramebufferSampleLocationsfvNV)
+#define glNamedFramebufferSampleLocationsfvNV GLEW_GET_FUN(__glewNamedFramebufferSampleLocationsfvNV)
+
+#define GLEW_NV_sample_locations GLEW_GET_VAR(__GLEW_NV_sample_locations)
+
+#endif /* GL_NV_sample_locations */
+
+/* ------------------ GL_NV_sample_mask_override_coverage ------------------ */
+
+#ifndef GL_NV_sample_mask_override_coverage
+#define GL_NV_sample_mask_override_coverage 1
+
+#define GLEW_NV_sample_mask_override_coverage GLEW_GET_VAR(__GLEW_NV_sample_mask_override_coverage)
+
+#endif /* GL_NV_sample_mask_override_coverage */
+
+/* ---------------------- GL_NV_shader_atomic_counters --------------------- */
+
+#ifndef GL_NV_shader_atomic_counters
+#define GL_NV_shader_atomic_counters 1
+
+#define GLEW_NV_shader_atomic_counters GLEW_GET_VAR(__GLEW_NV_shader_atomic_counters)
+
+#endif /* GL_NV_shader_atomic_counters */
+
+/* ----------------------- GL_NV_shader_atomic_float ----------------------- */
+
+#ifndef GL_NV_shader_atomic_float
+#define GL_NV_shader_atomic_float 1
+
+#define GLEW_NV_shader_atomic_float GLEW_GET_VAR(__GLEW_NV_shader_atomic_float)
+
+#endif /* GL_NV_shader_atomic_float */
+
+/* -------------------- GL_NV_shader_atomic_fp16_vector -------------------- */
+
+#ifndef GL_NV_shader_atomic_fp16_vector
+#define GL_NV_shader_atomic_fp16_vector 1
+
+#define GLEW_NV_shader_atomic_fp16_vector GLEW_GET_VAR(__GLEW_NV_shader_atomic_fp16_vector)
+
+#endif /* GL_NV_shader_atomic_fp16_vector */
+
+/* ----------------------- GL_NV_shader_atomic_int64 ----------------------- */
+
+#ifndef GL_NV_shader_atomic_int64
+#define GL_NV_shader_atomic_int64 1
+
+#define GLEW_NV_shader_atomic_int64 GLEW_GET_VAR(__GLEW_NV_shader_atomic_int64)
+
+#endif /* GL_NV_shader_atomic_int64 */
+
+/* ------------------------ GL_NV_shader_buffer_load ----------------------- */
+
+#ifndef GL_NV_shader_buffer_load
+#define GL_NV_shader_buffer_load 1
+
+#define GL_BUFFER_GPU_ADDRESS_NV 0x8F1D
+#define GL_GPU_ADDRESS_NV 0x8F34
+#define GL_MAX_SHADER_BUFFER_ADDRESS_NV 0x8F35
+
+typedef void (GLAPIENTRY * PFNGLGETBUFFERPARAMETERUI64VNVPROC) (GLenum target, GLenum pname, GLuint64EXT* params);
+typedef void (GLAPIENTRY * PFNGLGETINTEGERUI64VNVPROC) (GLenum value, GLuint64EXT* result);
+typedef void (GLAPIENTRY * PFNGLGETNAMEDBUFFERPARAMETERUI64VNVPROC) (GLuint buffer, GLenum pname, GLuint64EXT* params);
+typedef GLboolean (GLAPIENTRY * PFNGLISBUFFERRESIDENTNVPROC) (GLenum target);
+typedef GLboolean (GLAPIENTRY * PFNGLISNAMEDBUFFERRESIDENTNVPROC) (GLuint buffer);
+typedef void (GLAPIENTRY * PFNGLMAKEBUFFERNONRESIDENTNVPROC) (GLenum target);
+typedef void (GLAPIENTRY * PFNGLMAKEBUFFERRESIDENTNVPROC) (GLenum target, GLenum access);
+typedef void (GLAPIENTRY * PFNGLMAKENAMEDBUFFERNONRESIDENTNVPROC) (GLuint buffer);
+typedef void (GLAPIENTRY * PFNGLMAKENAMEDBUFFERRESIDENTNVPROC) (GLuint buffer, GLenum access);
+typedef void (GLAPIENTRY * PFNGLPROGRAMUNIFORMUI64NVPROC) (GLuint program, GLint location, GLuint64EXT value);
+typedef void (GLAPIENTRY * PFNGLPROGRAMUNIFORMUI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT* value);
+typedef void (GLAPIENTRY * PFNGLUNIFORMUI64NVPROC) (GLint location, GLuint64EXT value);
+typedef void (GLAPIENTRY * PFNGLUNIFORMUI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT* value);
+
+#define glGetBufferParameterui64vNV GLEW_GET_FUN(__glewGetBufferParameterui64vNV)
+#define glGetIntegerui64vNV GLEW_GET_FUN(__glewGetIntegerui64vNV)
+#define glGetNamedBufferParameterui64vNV GLEW_GET_FUN(__glewGetNamedBufferParameterui64vNV)
+#define glIsBufferResidentNV GLEW_GET_FUN(__glewIsBufferResidentNV)
+#define glIsNamedBufferResidentNV GLEW_GET_FUN(__glewIsNamedBufferResidentNV)
+#define glMakeBufferNonResidentNV GLEW_GET_FUN(__glewMakeBufferNonResidentNV)
+#define glMakeBufferResidentNV GLEW_GET_FUN(__glewMakeBufferResidentNV)
+#define glMakeNamedBufferNonResidentNV GLEW_GET_FUN(__glewMakeNamedBufferNonResidentNV)
+#define glMakeNamedBufferResidentNV GLEW_GET_FUN(__glewMakeNamedBufferResidentNV)
+#define glProgramUniformui64NV GLEW_GET_FUN(__glewProgramUniformui64NV)
+#define glProgramUniformui64vNV GLEW_GET_FUN(__glewProgramUniformui64vNV)
+#define glUniformui64NV GLEW_GET_FUN(__glewUniformui64NV)
+#define glUniformui64vNV GLEW_GET_FUN(__glewUniformui64vNV)
+
+#define GLEW_NV_shader_buffer_load GLEW_GET_VAR(__GLEW_NV_shader_buffer_load)
+
+#endif /* GL_NV_shader_buffer_load */
+
+/* ------------------- GL_NV_shader_storage_buffer_object ------------------ */
+
+#ifndef GL_NV_shader_storage_buffer_object
+#define GL_NV_shader_storage_buffer_object 1
+
+#define GLEW_NV_shader_storage_buffer_object GLEW_GET_VAR(__GLEW_NV_shader_storage_buffer_object)
+
+#endif /* GL_NV_shader_storage_buffer_object */
+
+/* ----------------------- GL_NV_shader_thread_group ----------------------- */
+
+#ifndef GL_NV_shader_thread_group
+#define GL_NV_shader_thread_group 1
+
+#define GL_WARP_SIZE_NV 0x9339
+#define GL_WARPS_PER_SM_NV 0x933A
+#define GL_SM_COUNT_NV 0x933B
+
+#define GLEW_NV_shader_thread_group GLEW_GET_VAR(__GLEW_NV_shader_thread_group)
+
+#endif /* GL_NV_shader_thread_group */
+
+/* ---------------------- GL_NV_shader_thread_shuffle ---------------------- */
+
+#ifndef GL_NV_shader_thread_shuffle
+#define GL_NV_shader_thread_shuffle 1
+
+#define GLEW_NV_shader_thread_shuffle GLEW_GET_VAR(__GLEW_NV_shader_thread_shuffle)
+
+#endif /* GL_NV_shader_thread_shuffle */
+
+/* ---------------------- GL_NV_tessellation_program5 ---------------------- */
+
+#ifndef GL_NV_tessellation_program5
+#define GL_NV_tessellation_program5 1
+
+#define GL_MAX_PROGRAM_PATCH_ATTRIBS_NV 0x86D8
+#define GL_TESS_CONTROL_PROGRAM_NV 0x891E
+#define GL_TESS_EVALUATION_PROGRAM_NV 0x891F
+#define GL_TESS_CONTROL_PROGRAM_PARAMETER_BUFFER_NV 0x8C74
+#define GL_TESS_EVALUATION_PROGRAM_PARAMETER_BUFFER_NV 0x8C75
+
+#define GLEW_NV_tessellation_program5 GLEW_GET_VAR(__GLEW_NV_tessellation_program5)
+
+#endif /* GL_NV_tessellation_program5 */
+
+/* -------------------------- GL_NV_texgen_emboss -------------------------- */
+
+#ifndef GL_NV_texgen_emboss
+#define GL_NV_texgen_emboss 1
+
+#define GL_EMBOSS_LIGHT_NV 0x855D
+#define GL_EMBOSS_CONSTANT_NV 0x855E
+#define GL_EMBOSS_MAP_NV 0x855F
+
+#define GLEW_NV_texgen_emboss GLEW_GET_VAR(__GLEW_NV_texgen_emboss)
+
+#endif /* GL_NV_texgen_emboss */
+
+/* ------------------------ GL_NV_texgen_reflection ------------------------ */
+
+#ifndef GL_NV_texgen_reflection
+#define GL_NV_texgen_reflection 1
+
+#define GL_NORMAL_MAP_NV 0x8511
+#define GL_REFLECTION_MAP_NV 0x8512
+
+#define GLEW_NV_texgen_reflection GLEW_GET_VAR(__GLEW_NV_texgen_reflection)
+
+#endif /* GL_NV_texgen_reflection */
+
+/* ------------------------- GL_NV_texture_barrier ------------------------- */
+
+#ifndef GL_NV_texture_barrier
+#define GL_NV_texture_barrier 1
+
+typedef void (GLAPIENTRY * PFNGLTEXTUREBARRIERNVPROC) (void);
+
+#define glTextureBarrierNV GLEW_GET_FUN(__glewTextureBarrierNV)
+
+#define GLEW_NV_texture_barrier GLEW_GET_VAR(__GLEW_NV_texture_barrier)
+
+#endif /* GL_NV_texture_barrier */
+
+/* --------------------- GL_NV_texture_compression_vtc --------------------- */
+
+#ifndef GL_NV_texture_compression_vtc
+#define GL_NV_texture_compression_vtc 1
+
+#define GLEW_NV_texture_compression_vtc GLEW_GET_VAR(__GLEW_NV_texture_compression_vtc)
+
+#endif /* GL_NV_texture_compression_vtc */
+
+/* ----------------------- GL_NV_texture_env_combine4 ---------------------- */
+
+#ifndef GL_NV_texture_env_combine4
+#define GL_NV_texture_env_combine4 1
+
+#define GL_COMBINE4_NV 0x8503
+#define GL_SOURCE3_RGB_NV 0x8583
+#define GL_SOURCE3_ALPHA_NV 0x858B
+#define GL_OPERAND3_RGB_NV 0x8593
+#define GL_OPERAND3_ALPHA_NV 0x859B
+
+#define GLEW_NV_texture_env_combine4 GLEW_GET_VAR(__GLEW_NV_texture_env_combine4)
+
+#endif /* GL_NV_texture_env_combine4 */
+
+/* ---------------------- GL_NV_texture_expand_normal ---------------------- */
+
+#ifndef GL_NV_texture_expand_normal
+#define GL_NV_texture_expand_normal 1
+
+#define GL_TEXTURE_UNSIGNED_REMAP_MODE_NV 0x888F
+
+#define GLEW_NV_texture_expand_normal GLEW_GET_VAR(__GLEW_NV_texture_expand_normal)
+
+#endif /* GL_NV_texture_expand_normal */
+
+/* ----------------------- GL_NV_texture_multisample ----------------------- */
+
+#ifndef GL_NV_texture_multisample
+#define GL_NV_texture_multisample 1
+
+#define GL_TEXTURE_COVERAGE_SAMPLES_NV 0x9045
+#define GL_TEXTURE_COLOR_SAMPLES_NV 0x9046
+
+typedef void (GLAPIENTRY * PFNGLTEXIMAGE2DMULTISAMPLECOVERAGENVPROC) (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations);
+typedef void (GLAPIENTRY * PFNGLTEXIMAGE3DMULTISAMPLECOVERAGENVPROC) (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations);
+typedef void (GLAPIENTRY * PFNGLTEXTUREIMAGE2DMULTISAMPLECOVERAGENVPROC) (GLuint texture, GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations);
+typedef void (GLAPIENTRY * PFNGLTEXTUREIMAGE2DMULTISAMPLENVPROC) (GLuint texture, GLenum target, GLsizei samples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations);
+typedef void (GLAPIENTRY * PFNGLTEXTUREIMAGE3DMULTISAMPLECOVERAGENVPROC) (GLuint texture, GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations);
+typedef void (GLAPIENTRY * PFNGLTEXTUREIMAGE3DMULTISAMPLENVPROC) (GLuint texture, GLenum target, GLsizei samples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations);
+
+#define glTexImage2DMultisampleCoverageNV GLEW_GET_FUN(__glewTexImage2DMultisampleCoverageNV)
+#define glTexImage3DMultisampleCoverageNV GLEW_GET_FUN(__glewTexImage3DMultisampleCoverageNV)
+#define glTextureImage2DMultisampleCoverageNV GLEW_GET_FUN(__glewTextureImage2DMultisampleCoverageNV)
+#define glTextureImage2DMultisampleNV GLEW_GET_FUN(__glewTextureImage2DMultisampleNV)
+#define glTextureImage3DMultisampleCoverageNV GLEW_GET_FUN(__glewTextureImage3DMultisampleCoverageNV)
+#define glTextureImage3DMultisampleNV GLEW_GET_FUN(__glewTextureImage3DMultisampleNV)
+
+#define GLEW_NV_texture_multisample GLEW_GET_VAR(__GLEW_NV_texture_multisample)
+
+#endif /* GL_NV_texture_multisample */
+
+/* ------------------------ GL_NV_texture_rectangle ------------------------ */
+
+#ifndef GL_NV_texture_rectangle
+#define GL_NV_texture_rectangle 1
+
+#define GL_TEXTURE_RECTANGLE_NV 0x84F5
+#define GL_TEXTURE_BINDING_RECTANGLE_NV 0x84F6
+#define GL_PROXY_TEXTURE_RECTANGLE_NV 0x84F7
+#define GL_MAX_RECTANGLE_TEXTURE_SIZE_NV 0x84F8
+
+#define GLEW_NV_texture_rectangle GLEW_GET_VAR(__GLEW_NV_texture_rectangle)
+
+#endif /* GL_NV_texture_rectangle */
+
+/* -------------------------- GL_NV_texture_shader ------------------------- */
+
+#ifndef GL_NV_texture_shader
+#define GL_NV_texture_shader 1
+
+#define GL_OFFSET_TEXTURE_RECTANGLE_NV 0x864C
+#define GL_OFFSET_TEXTURE_RECTANGLE_SCALE_NV 0x864D
+#define GL_DOT_PRODUCT_TEXTURE_RECTANGLE_NV 0x864E
+#define GL_RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV 0x86D9
+#define GL_UNSIGNED_INT_S8_S8_8_8_NV 0x86DA
+#define GL_UNSIGNED_INT_8_8_S8_S8_REV_NV 0x86DB
+#define GL_DSDT_MAG_INTENSITY_NV 0x86DC
+#define GL_SHADER_CONSISTENT_NV 0x86DD
+#define GL_TEXTURE_SHADER_NV 0x86DE
+#define GL_SHADER_OPERATION_NV 0x86DF
+#define GL_CULL_MODES_NV 0x86E0
+#define GL_OFFSET_TEXTURE_2D_MATRIX_NV 0x86E1
+#define GL_OFFSET_TEXTURE_MATRIX_NV 0x86E1
+#define GL_OFFSET_TEXTURE_2D_SCALE_NV 0x86E2
+#define GL_OFFSET_TEXTURE_SCALE_NV 0x86E2
+#define GL_OFFSET_TEXTURE_2D_BIAS_NV 0x86E3
+#define GL_OFFSET_TEXTURE_BIAS_NV 0x86E3
+#define GL_PREVIOUS_TEXTURE_INPUT_NV 0x86E4
+#define GL_CONST_EYE_NV 0x86E5
+#define GL_PASS_THROUGH_NV 0x86E6
+#define GL_CULL_FRAGMENT_NV 0x86E7
+#define GL_OFFSET_TEXTURE_2D_NV 0x86E8
+#define GL_DEPENDENT_AR_TEXTURE_2D_NV 0x86E9
+#define GL_DEPENDENT_GB_TEXTURE_2D_NV 0x86EA
+#define GL_DOT_PRODUCT_NV 0x86EC
+#define GL_DOT_PRODUCT_DEPTH_REPLACE_NV 0x86ED
+#define GL_DOT_PRODUCT_TEXTURE_2D_NV 0x86EE
+#define GL_DOT_PRODUCT_TEXTURE_CUBE_MAP_NV 0x86F0
+#define GL_DOT_PRODUCT_DIFFUSE_CUBE_MAP_NV 0x86F1
+#define GL_DOT_PRODUCT_REFLECT_CUBE_MAP_NV 0x86F2
+#define GL_DOT_PRODUCT_CONST_EYE_REFLECT_CUBE_MAP_NV 0x86F3
+#define GL_HILO_NV 0x86F4
+#define GL_DSDT_NV 0x86F5
+#define GL_DSDT_MAG_NV 0x86F6
+#define GL_DSDT_MAG_VIB_NV 0x86F7
+#define GL_HILO16_NV 0x86F8
+#define GL_SIGNED_HILO_NV 0x86F9
+#define GL_SIGNED_HILO16_NV 0x86FA
+#define GL_SIGNED_RGBA_NV 0x86FB
+#define GL_SIGNED_RGBA8_NV 0x86FC
+#define GL_SIGNED_RGB_NV 0x86FE
+#define GL_SIGNED_RGB8_NV 0x86FF
+#define GL_SIGNED_LUMINANCE_NV 0x8701
+#define GL_SIGNED_LUMINANCE8_NV 0x8702
+#define GL_SIGNED_LUMINANCE_ALPHA_NV 0x8703
+#define GL_SIGNED_LUMINANCE8_ALPHA8_NV 0x8704
+#define GL_SIGNED_ALPHA_NV 0x8705
+#define GL_SIGNED_ALPHA8_NV 0x8706
+#define GL_SIGNED_INTENSITY_NV 0x8707
+#define GL_SIGNED_INTENSITY8_NV 0x8708
+#define GL_DSDT8_NV 0x8709
+#define GL_DSDT8_MAG8_NV 0x870A
+#define GL_DSDT8_MAG8_INTENSITY8_NV 0x870B
+#define GL_SIGNED_RGB_UNSIGNED_ALPHA_NV 0x870C
+#define GL_SIGNED_RGB8_UNSIGNED_ALPHA8_NV 0x870D
+#define GL_HI_SCALE_NV 0x870E
+#define GL_LO_SCALE_NV 0x870F
+#define GL_DS_SCALE_NV 0x8710
+#define GL_DT_SCALE_NV 0x8711
+#define GL_MAGNITUDE_SCALE_NV 0x8712
+#define GL_VIBRANCE_SCALE_NV 0x8713
+#define GL_HI_BIAS_NV 0x8714
+#define GL_LO_BIAS_NV 0x8715
+#define GL_DS_BIAS_NV 0x8716
+#define GL_DT_BIAS_NV 0x8717
+#define GL_MAGNITUDE_BIAS_NV 0x8718
+#define GL_VIBRANCE_BIAS_NV 0x8719
+#define GL_TEXTURE_BORDER_VALUES_NV 0x871A
+#define GL_TEXTURE_HI_SIZE_NV 0x871B
+#define GL_TEXTURE_LO_SIZE_NV 0x871C
+#define GL_TEXTURE_DS_SIZE_NV 0x871D
+#define GL_TEXTURE_DT_SIZE_NV 0x871E
+#define GL_TEXTURE_MAG_SIZE_NV 0x871F
+
+#define GLEW_NV_texture_shader GLEW_GET_VAR(__GLEW_NV_texture_shader)
+
+#endif /* GL_NV_texture_shader */
+
+/* ------------------------- GL_NV_texture_shader2 ------------------------- */
+
+#ifndef GL_NV_texture_shader2
+#define GL_NV_texture_shader2 1
+
+#define GL_UNSIGNED_INT_S8_S8_8_8_NV 0x86DA
+#define GL_UNSIGNED_INT_8_8_S8_S8_REV_NV 0x86DB
+#define GL_DSDT_MAG_INTENSITY_NV 0x86DC
+#define GL_DOT_PRODUCT_TEXTURE_3D_NV 0x86EF
+#define GL_HILO_NV 0x86F4
+#define GL_DSDT_NV 0x86F5
+#define GL_DSDT_MAG_NV 0x86F6
+#define GL_DSDT_MAG_VIB_NV 0x86F7
+#define GL_HILO16_NV 0x86F8
+#define GL_SIGNED_HILO_NV 0x86F9
+#define GL_SIGNED_HILO16_NV 0x86FA
+#define GL_SIGNED_RGBA_NV 0x86FB
+#define GL_SIGNED_RGBA8_NV 0x86FC
+#define GL_SIGNED_RGB_NV 0x86FE
+#define GL_SIGNED_RGB8_NV 0x86FF
+#define GL_SIGNED_LUMINANCE_NV 0x8701
+#define GL_SIGNED_LUMINANCE8_NV 0x8702
+#define GL_SIGNED_LUMINANCE_ALPHA_NV 0x8703
+#define GL_SIGNED_LUMINANCE8_ALPHA8_NV 0x8704
+#define GL_SIGNED_ALPHA_NV 0x8705
+#define GL_SIGNED_ALPHA8_NV 0x8706
+#define GL_SIGNED_INTENSITY_NV 0x8707
+#define GL_SIGNED_INTENSITY8_NV 0x8708
+#define GL_DSDT8_NV 0x8709
+#define GL_DSDT8_MAG8_NV 0x870A
+#define GL_DSDT8_MAG8_INTENSITY8_NV 0x870B
+#define GL_SIGNED_RGB_UNSIGNED_ALPHA_NV 0x870C
+#define GL_SIGNED_RGB8_UNSIGNED_ALPHA8_NV 0x870D
+
+#define GLEW_NV_texture_shader2 GLEW_GET_VAR(__GLEW_NV_texture_shader2)
+
+#endif /* GL_NV_texture_shader2 */
+
+/* ------------------------- GL_NV_texture_shader3 ------------------------- */
+
+#ifndef GL_NV_texture_shader3
+#define GL_NV_texture_shader3 1
+
+#define GL_OFFSET_PROJECTIVE_TEXTURE_2D_NV 0x8850
+#define GL_OFFSET_PROJECTIVE_TEXTURE_2D_SCALE_NV 0x8851
+#define GL_OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_NV 0x8852
+#define GL_OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_SCALE_NV 0x8853
+#define GL_OFFSET_HILO_TEXTURE_2D_NV 0x8854
+#define GL_OFFSET_HILO_TEXTURE_RECTANGLE_NV 0x8855
+#define GL_OFFSET_HILO_PROJECTIVE_TEXTURE_2D_NV 0x8856
+#define GL_OFFSET_HILO_PROJECTIVE_TEXTURE_RECTANGLE_NV 0x8857
+#define GL_DEPENDENT_HILO_TEXTURE_2D_NV 0x8858
+#define GL_DEPENDENT_RGB_TEXTURE_3D_NV 0x8859
+#define GL_DEPENDENT_RGB_TEXTURE_CUBE_MAP_NV 0x885A
+#define GL_DOT_PRODUCT_PASS_THROUGH_NV 0x885B
+#define GL_DOT_PRODUCT_TEXTURE_1D_NV 0x885C
+#define GL_DOT_PRODUCT_AFFINE_DEPTH_REPLACE_NV 0x885D
+#define GL_HILO8_NV 0x885E
+#define GL_SIGNED_HILO8_NV 0x885F
+#define GL_FORCE_BLUE_TO_ONE_NV 0x8860
+
+#define GLEW_NV_texture_shader3 GLEW_GET_VAR(__GLEW_NV_texture_shader3)
+
+#endif /* GL_NV_texture_shader3 */
+
+/* ------------------------ GL_NV_transform_feedback ----------------------- */
+
+#ifndef GL_NV_transform_feedback
+#define GL_NV_transform_feedback 1
+
+#define GL_BACK_PRIMARY_COLOR_NV 0x8C77
+#define GL_BACK_SECONDARY_COLOR_NV 0x8C78
+#define GL_TEXTURE_COORD_NV 0x8C79
+#define GL_CLIP_DISTANCE_NV 0x8C7A
+#define GL_VERTEX_ID_NV 0x8C7B
+#define GL_PRIMITIVE_ID_NV 0x8C7C
+#define GL_GENERIC_ATTRIB_NV 0x8C7D
+#define GL_TRANSFORM_FEEDBACK_ATTRIBS_NV 0x8C7E
+#define GL_TRANSFORM_FEEDBACK_BUFFER_MODE_NV 0x8C7F
+#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS_NV 0x8C80
+#define GL_ACTIVE_VARYINGS_NV 0x8C81
+#define GL_ACTIVE_VARYING_MAX_LENGTH_NV 0x8C82
+#define GL_TRANSFORM_FEEDBACK_VARYINGS_NV 0x8C83
+#define GL_TRANSFORM_FEEDBACK_BUFFER_START_NV 0x8C84
+#define GL_TRANSFORM_FEEDBACK_BUFFER_SIZE_NV 0x8C85
+#define GL_TRANSFORM_FEEDBACK_RECORD_NV 0x8C86
+#define GL_PRIMITIVES_GENERATED_NV 0x8C87
+#define GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN_NV 0x8C88
+#define GL_RASTERIZER_DISCARD_NV 0x8C89
+#define GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS_NV 0x8C8A
+#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS_NV 0x8C8B
+#define GL_INTERLEAVED_ATTRIBS_NV 0x8C8C
+#define GL_SEPARATE_ATTRIBS_NV 0x8C8D
+#define GL_TRANSFORM_FEEDBACK_BUFFER_NV 0x8C8E
+#define GL_TRANSFORM_FEEDBACK_BUFFER_BINDING_NV 0x8C8F
+
+typedef void (GLAPIENTRY * PFNGLACTIVEVARYINGNVPROC) (GLuint program, const GLchar *name);
+typedef void (GLAPIENTRY * PFNGLBEGINTRANSFORMFEEDBACKNVPROC) (GLenum primitiveMode);
+typedef void (GLAPIENTRY * PFNGLBINDBUFFERBASENVPROC) (GLenum target, GLuint index, GLuint buffer);
+typedef void (GLAPIENTRY * PFNGLBINDBUFFEROFFSETNVPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset);
+typedef void (GLAPIENTRY * PFNGLBINDBUFFERRANGENVPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size);
+typedef void (GLAPIENTRY * PFNGLENDTRANSFORMFEEDBACKNVPROC) (void);
+typedef void (GLAPIENTRY * PFNGLGETACTIVEVARYINGNVPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name);
+typedef void (GLAPIENTRY * PFNGLGETTRANSFORMFEEDBACKVARYINGNVPROC) (GLuint program, GLuint index, GLint *location);
+typedef GLint (GLAPIENTRY * PFNGLGETVARYINGLOCATIONNVPROC) (GLuint program, const GLchar *name);
+typedef void (GLAPIENTRY * PFNGLTRANSFORMFEEDBACKATTRIBSNVPROC) (GLuint count, const GLint *attribs, GLenum bufferMode);
+typedef void (GLAPIENTRY * PFNGLTRANSFORMFEEDBACKVARYINGSNVPROC) (GLuint program, GLsizei count, const GLint *locations, GLenum bufferMode);
+
+#define glActiveVaryingNV GLEW_GET_FUN(__glewActiveVaryingNV)
+#define glBeginTransformFeedbackNV GLEW_GET_FUN(__glewBeginTransformFeedbackNV)
+#define glBindBufferBaseNV GLEW_GET_FUN(__glewBindBufferBaseNV)
+#define glBindBufferOffsetNV GLEW_GET_FUN(__glewBindBufferOffsetNV)
+#define glBindBufferRangeNV GLEW_GET_FUN(__glewBindBufferRangeNV)
+#define glEndTransformFeedbackNV GLEW_GET_FUN(__glewEndTransformFeedbackNV)
+#define glGetActiveVaryingNV GLEW_GET_FUN(__glewGetActiveVaryingNV)
+#define glGetTransformFeedbackVaryingNV GLEW_GET_FUN(__glewGetTransformFeedbackVaryingNV)
+#define glGetVaryingLocationNV GLEW_GET_FUN(__glewGetVaryingLocationNV)
+#define glTransformFeedbackAttribsNV GLEW_GET_FUN(__glewTransformFeedbackAttribsNV)
+#define glTransformFeedbackVaryingsNV GLEW_GET_FUN(__glewTransformFeedbackVaryingsNV)
+
+#define GLEW_NV_transform_feedback GLEW_GET_VAR(__GLEW_NV_transform_feedback)
+
+#endif /* GL_NV_transform_feedback */
+
+/* ----------------------- GL_NV_transform_feedback2 ----------------------- */
+
+#ifndef GL_NV_transform_feedback2
+#define GL_NV_transform_feedback2 1
+
+#define GL_TRANSFORM_FEEDBACK_NV 0x8E22
+#define GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED_NV 0x8E23
+#define GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE_NV 0x8E24
+#define GL_TRANSFORM_FEEDBACK_BINDING_NV 0x8E25
+
+typedef void (GLAPIENTRY * PFNGLBINDTRANSFORMFEEDBACKNVPROC) (GLenum target, GLuint id);
+typedef void (GLAPIENTRY * PFNGLDELETETRANSFORMFEEDBACKSNVPROC) (GLsizei n, const GLuint* ids);
+typedef void (GLAPIENTRY * PFNGLDRAWTRANSFORMFEEDBACKNVPROC) (GLenum mode, GLuint id);
+typedef void (GLAPIENTRY * PFNGLGENTRANSFORMFEEDBACKSNVPROC) (GLsizei n, GLuint* ids);
+typedef GLboolean (GLAPIENTRY * PFNGLISTRANSFORMFEEDBACKNVPROC) (GLuint id);
+typedef void (GLAPIENTRY * PFNGLPAUSETRANSFORMFEEDBACKNVPROC) (void);
+typedef void (GLAPIENTRY * PFNGLRESUMETRANSFORMFEEDBACKNVPROC) (void);
+
+#define glBindTransformFeedbackNV GLEW_GET_FUN(__glewBindTransformFeedbackNV)
+#define glDeleteTransformFeedbacksNV GLEW_GET_FUN(__glewDeleteTransformFeedbacksNV)
+#define glDrawTransformFeedbackNV GLEW_GET_FUN(__glewDrawTransformFeedbackNV)
+#define glGenTransformFeedbacksNV GLEW_GET_FUN(__glewGenTransformFeedbacksNV)
+#define glIsTransformFeedbackNV GLEW_GET_FUN(__glewIsTransformFeedbackNV)
+#define glPauseTransformFeedbackNV GLEW_GET_FUN(__glewPauseTransformFeedbackNV)
+#define glResumeTransformFeedbackNV GLEW_GET_FUN(__glewResumeTransformFeedbackNV)
+
+#define GLEW_NV_transform_feedback2 GLEW_GET_VAR(__GLEW_NV_transform_feedback2)
+
+#endif /* GL_NV_transform_feedback2 */
+
+/* ------------------ GL_NV_uniform_buffer_unified_memory ------------------ */
+
+#ifndef GL_NV_uniform_buffer_unified_memory
+#define GL_NV_uniform_buffer_unified_memory 1
+
+#define GL_UNIFORM_BUFFER_UNIFIED_NV 0x936E
+#define GL_UNIFORM_BUFFER_ADDRESS_NV 0x936F
+#define GL_UNIFORM_BUFFER_LENGTH_NV 0x9370
+
+#define GLEW_NV_uniform_buffer_unified_memory GLEW_GET_VAR(__GLEW_NV_uniform_buffer_unified_memory)
+
+#endif /* GL_NV_uniform_buffer_unified_memory */
+
+/* -------------------------- GL_NV_vdpau_interop -------------------------- */
+
+#ifndef GL_NV_vdpau_interop
+#define GL_NV_vdpau_interop 1
+
+#define GL_SURFACE_STATE_NV 0x86EB
+#define GL_SURFACE_REGISTERED_NV 0x86FD
+#define GL_SURFACE_MAPPED_NV 0x8700
+#define GL_WRITE_DISCARD_NV 0x88BE
+
+typedef GLintptr GLvdpauSurfaceNV;
+
+typedef void (GLAPIENTRY * PFNGLVDPAUFININVPROC) (void);
+typedef void (GLAPIENTRY * PFNGLVDPAUGETSURFACEIVNVPROC) (GLvdpauSurfaceNV surface, GLenum pname, GLsizei bufSize, GLsizei* length, GLint *values);
+typedef void (GLAPIENTRY * PFNGLVDPAUINITNVPROC) (const void* vdpDevice, const void*getProcAddress);
+typedef void (GLAPIENTRY * PFNGLVDPAUISSURFACENVPROC) (GLvdpauSurfaceNV surface);
+typedef void (GLAPIENTRY * PFNGLVDPAUMAPSURFACESNVPROC) (GLsizei numSurfaces, const GLvdpauSurfaceNV* surfaces);
+typedef GLvdpauSurfaceNV (GLAPIENTRY * PFNGLVDPAUREGISTEROUTPUTSURFACENVPROC) (const void* vdpSurface, GLenum target, GLsizei numTextureNames, const GLuint *textureNames);
+typedef GLvdpauSurfaceNV (GLAPIENTRY * PFNGLVDPAUREGISTERVIDEOSURFACENVPROC) (const void* vdpSurface, GLenum target, GLsizei numTextureNames, const GLuint *textureNames);
+typedef void (GLAPIENTRY * PFNGLVDPAUSURFACEACCESSNVPROC) (GLvdpauSurfaceNV surface, GLenum access);
+typedef void (GLAPIENTRY * PFNGLVDPAUUNMAPSURFACESNVPROC) (GLsizei numSurface, const GLvdpauSurfaceNV* surfaces);
+typedef void (GLAPIENTRY * PFNGLVDPAUUNREGISTERSURFACENVPROC) (GLvdpauSurfaceNV surface);
+
+#define glVDPAUFiniNV GLEW_GET_FUN(__glewVDPAUFiniNV)
+#define glVDPAUGetSurfaceivNV GLEW_GET_FUN(__glewVDPAUGetSurfaceivNV)
+#define glVDPAUInitNV GLEW_GET_FUN(__glewVDPAUInitNV)
+#define glVDPAUIsSurfaceNV GLEW_GET_FUN(__glewVDPAUIsSurfaceNV)
+#define glVDPAUMapSurfacesNV GLEW_GET_FUN(__glewVDPAUMapSurfacesNV)
+#define glVDPAURegisterOutputSurfaceNV GLEW_GET_FUN(__glewVDPAURegisterOutputSurfaceNV)
+#define glVDPAURegisterVideoSurfaceNV GLEW_GET_FUN(__glewVDPAURegisterVideoSurfaceNV)
+#define glVDPAUSurfaceAccessNV GLEW_GET_FUN(__glewVDPAUSurfaceAccessNV)
+#define glVDPAUUnmapSurfacesNV GLEW_GET_FUN(__glewVDPAUUnmapSurfacesNV)
+#define glVDPAUUnregisterSurfaceNV GLEW_GET_FUN(__glewVDPAUUnregisterSurfaceNV)
+
+#define GLEW_NV_vdpau_interop GLEW_GET_VAR(__GLEW_NV_vdpau_interop)
+
+#endif /* GL_NV_vdpau_interop */
+
+/* ------------------------ GL_NV_vertex_array_range ----------------------- */
+
+#ifndef GL_NV_vertex_array_range
+#define GL_NV_vertex_array_range 1
+
+#define GL_VERTEX_ARRAY_RANGE_NV 0x851D
+#define GL_VERTEX_ARRAY_RANGE_LENGTH_NV 0x851E
+#define GL_VERTEX_ARRAY_RANGE_VALID_NV 0x851F
+#define GL_MAX_VERTEX_ARRAY_RANGE_ELEMENT_NV 0x8520
+#define GL_VERTEX_ARRAY_RANGE_POINTER_NV 0x8521
+
+typedef void (GLAPIENTRY * PFNGLFLUSHVERTEXARRAYRANGENVPROC) (void);
+typedef void (GLAPIENTRY * PFNGLVERTEXARRAYRANGENVPROC) (GLsizei length, void *pointer);
+
+#define glFlushVertexArrayRangeNV GLEW_GET_FUN(__glewFlushVertexArrayRangeNV)
+#define glVertexArrayRangeNV GLEW_GET_FUN(__glewVertexArrayRangeNV)
+
+#define GLEW_NV_vertex_array_range GLEW_GET_VAR(__GLEW_NV_vertex_array_range)
+
+#endif /* GL_NV_vertex_array_range */
+
+/* ----------------------- GL_NV_vertex_array_range2 ----------------------- */
+
+#ifndef GL_NV_vertex_array_range2
+#define GL_NV_vertex_array_range2 1
+
+#define GL_VERTEX_ARRAY_RANGE_WITHOUT_FLUSH_NV 0x8533
+
+#define GLEW_NV_vertex_array_range2 GLEW_GET_VAR(__GLEW_NV_vertex_array_range2)
+
+#endif /* GL_NV_vertex_array_range2 */
+
+/* ------------------- GL_NV_vertex_attrib_integer_64bit ------------------- */
+
+#ifndef GL_NV_vertex_attrib_integer_64bit
+#define GL_NV_vertex_attrib_integer_64bit 1
+
+#define GL_INT64_NV 0x140E
+#define GL_UNSIGNED_INT64_NV 0x140F
+
+typedef void (GLAPIENTRY * PFNGLGETVERTEXATTRIBLI64VNVPROC) (GLuint index, GLenum pname, GLint64EXT* params);
+typedef void (GLAPIENTRY * PFNGLGETVERTEXATTRIBLUI64VNVPROC) (GLuint index, GLenum pname, GLuint64EXT* params);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBL1I64NVPROC) (GLuint index, GLint64EXT x);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBL1I64VNVPROC) (GLuint index, const GLint64EXT* v);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBL1UI64NVPROC) (GLuint index, GLuint64EXT x);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBL1UI64VNVPROC) (GLuint index, const GLuint64EXT* v);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBL2I64NVPROC) (GLuint index, GLint64EXT x, GLint64EXT y);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBL2I64VNVPROC) (GLuint index, const GLint64EXT* v);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBL2UI64NVPROC) (GLuint index, GLuint64EXT x, GLuint64EXT y);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBL2UI64VNVPROC) (GLuint index, const GLuint64EXT* v);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBL3I64NVPROC) (GLuint index, GLint64EXT x, GLint64EXT y, GLint64EXT z);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBL3I64VNVPROC) (GLuint index, const GLint64EXT* v);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBL3UI64NVPROC) (GLuint index, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBL3UI64VNVPROC) (GLuint index, const GLuint64EXT* v);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBL4I64NVPROC) (GLuint index, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBL4I64VNVPROC) (GLuint index, const GLint64EXT* v);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBL4UI64NVPROC) (GLuint index, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBL4UI64VNVPROC) (GLuint index, const GLuint64EXT* v);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBLFORMATNVPROC) (GLuint index, GLint size, GLenum type, GLsizei stride);
+
+#define glGetVertexAttribLi64vNV GLEW_GET_FUN(__glewGetVertexAttribLi64vNV)
+#define glGetVertexAttribLui64vNV GLEW_GET_FUN(__glewGetVertexAttribLui64vNV)
+#define glVertexAttribL1i64NV GLEW_GET_FUN(__glewVertexAttribL1i64NV)
+#define glVertexAttribL1i64vNV GLEW_GET_FUN(__glewVertexAttribL1i64vNV)
+#define glVertexAttribL1ui64NV GLEW_GET_FUN(__glewVertexAttribL1ui64NV)
+#define glVertexAttribL1ui64vNV GLEW_GET_FUN(__glewVertexAttribL1ui64vNV)
+#define glVertexAttribL2i64NV GLEW_GET_FUN(__glewVertexAttribL2i64NV)
+#define glVertexAttribL2i64vNV GLEW_GET_FUN(__glewVertexAttribL2i64vNV)
+#define glVertexAttribL2ui64NV GLEW_GET_FUN(__glewVertexAttribL2ui64NV)
+#define glVertexAttribL2ui64vNV GLEW_GET_FUN(__glewVertexAttribL2ui64vNV)
+#define glVertexAttribL3i64NV GLEW_GET_FUN(__glewVertexAttribL3i64NV)
+#define glVertexAttribL3i64vNV GLEW_GET_FUN(__glewVertexAttribL3i64vNV)
+#define glVertexAttribL3ui64NV GLEW_GET_FUN(__glewVertexAttribL3ui64NV)
+#define glVertexAttribL3ui64vNV GLEW_GET_FUN(__glewVertexAttribL3ui64vNV)
+#define glVertexAttribL4i64NV GLEW_GET_FUN(__glewVertexAttribL4i64NV)
+#define glVertexAttribL4i64vNV GLEW_GET_FUN(__glewVertexAttribL4i64vNV)
+#define glVertexAttribL4ui64NV GLEW_GET_FUN(__glewVertexAttribL4ui64NV)
+#define glVertexAttribL4ui64vNV GLEW_GET_FUN(__glewVertexAttribL4ui64vNV)
+#define glVertexAttribLFormatNV GLEW_GET_FUN(__glewVertexAttribLFormatNV)
+
+#define GLEW_NV_vertex_attrib_integer_64bit GLEW_GET_VAR(__GLEW_NV_vertex_attrib_integer_64bit)
+
+#endif /* GL_NV_vertex_attrib_integer_64bit */
+
+/* ------------------- GL_NV_vertex_buffer_unified_memory ------------------ */
+
+#ifndef GL_NV_vertex_buffer_unified_memory
+#define GL_NV_vertex_buffer_unified_memory 1
+
+#define GL_VERTEX_ATTRIB_ARRAY_UNIFIED_NV 0x8F1E
+#define GL_ELEMENT_ARRAY_UNIFIED_NV 0x8F1F
+#define GL_VERTEX_ATTRIB_ARRAY_ADDRESS_NV 0x8F20
+#define GL_VERTEX_ARRAY_ADDRESS_NV 0x8F21
+#define GL_NORMAL_ARRAY_ADDRESS_NV 0x8F22
+#define GL_COLOR_ARRAY_ADDRESS_NV 0x8F23
+#define GL_INDEX_ARRAY_ADDRESS_NV 0x8F24
+#define GL_TEXTURE_COORD_ARRAY_ADDRESS_NV 0x8F25
+#define GL_EDGE_FLAG_ARRAY_ADDRESS_NV 0x8F26
+#define GL_SECONDARY_COLOR_ARRAY_ADDRESS_NV 0x8F27
+#define GL_FOG_COORD_ARRAY_ADDRESS_NV 0x8F28
+#define GL_ELEMENT_ARRAY_ADDRESS_NV 0x8F29
+#define GL_VERTEX_ATTRIB_ARRAY_LENGTH_NV 0x8F2A
+#define GL_VERTEX_ARRAY_LENGTH_NV 0x8F2B
+#define GL_NORMAL_ARRAY_LENGTH_NV 0x8F2C
+#define GL_COLOR_ARRAY_LENGTH_NV 0x8F2D
+#define GL_INDEX_ARRAY_LENGTH_NV 0x8F2E
+#define GL_TEXTURE_COORD_ARRAY_LENGTH_NV 0x8F2F
+#define GL_EDGE_FLAG_ARRAY_LENGTH_NV 0x8F30
+#define GL_SECONDARY_COLOR_ARRAY_LENGTH_NV 0x8F31
+#define GL_FOG_COORD_ARRAY_LENGTH_NV 0x8F32
+#define GL_ELEMENT_ARRAY_LENGTH_NV 0x8F33
+#define GL_DRAW_INDIRECT_UNIFIED_NV 0x8F40
+#define GL_DRAW_INDIRECT_ADDRESS_NV 0x8F41
+#define GL_DRAW_INDIRECT_LENGTH_NV 0x8F42
+
+typedef void (GLAPIENTRY * PFNGLBUFFERADDRESSRANGENVPROC) (GLenum pname, GLuint index, GLuint64EXT address, GLsizeiptr length);
+typedef void (GLAPIENTRY * PFNGLCOLORFORMATNVPROC) (GLint size, GLenum type, GLsizei stride);
+typedef void (GLAPIENTRY * PFNGLEDGEFLAGFORMATNVPROC) (GLsizei stride);
+typedef void (GLAPIENTRY * PFNGLFOGCOORDFORMATNVPROC) (GLenum type, GLsizei stride);
+typedef void (GLAPIENTRY * PFNGLGETINTEGERUI64I_VNVPROC) (GLenum value, GLuint index, GLuint64EXT result[]);
+typedef void (GLAPIENTRY * PFNGLINDEXFORMATNVPROC) (GLenum type, GLsizei stride);
+typedef void (GLAPIENTRY * PFNGLNORMALFORMATNVPROC) (GLenum type, GLsizei stride);
+typedef void (GLAPIENTRY * PFNGLSECONDARYCOLORFORMATNVPROC) (GLint size, GLenum type, GLsizei stride);
+typedef void (GLAPIENTRY * PFNGLTEXCOORDFORMATNVPROC) (GLint size, GLenum type, GLsizei stride);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBFORMATNVPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBIFORMATNVPROC) (GLuint index, GLint size, GLenum type, GLsizei stride);
+typedef void (GLAPIENTRY * PFNGLVERTEXFORMATNVPROC) (GLint size, GLenum type, GLsizei stride);
+
+#define glBufferAddressRangeNV GLEW_GET_FUN(__glewBufferAddressRangeNV)
+#define glColorFormatNV GLEW_GET_FUN(__glewColorFormatNV)
+#define glEdgeFlagFormatNV GLEW_GET_FUN(__glewEdgeFlagFormatNV)
+#define glFogCoordFormatNV GLEW_GET_FUN(__glewFogCoordFormatNV)
+#define glGetIntegerui64i_vNV GLEW_GET_FUN(__glewGetIntegerui64i_vNV)
+#define glIndexFormatNV GLEW_GET_FUN(__glewIndexFormatNV)
+#define glNormalFormatNV GLEW_GET_FUN(__glewNormalFormatNV)
+#define glSecondaryColorFormatNV GLEW_GET_FUN(__glewSecondaryColorFormatNV)
+#define glTexCoordFormatNV GLEW_GET_FUN(__glewTexCoordFormatNV)
+#define glVertexAttribFormatNV GLEW_GET_FUN(__glewVertexAttribFormatNV)
+#define glVertexAttribIFormatNV GLEW_GET_FUN(__glewVertexAttribIFormatNV)
+#define glVertexFormatNV GLEW_GET_FUN(__glewVertexFormatNV)
+
+#define GLEW_NV_vertex_buffer_unified_memory GLEW_GET_VAR(__GLEW_NV_vertex_buffer_unified_memory)
+
+#endif /* GL_NV_vertex_buffer_unified_memory */
+
+/* -------------------------- GL_NV_vertex_program ------------------------- */
+
+#ifndef GL_NV_vertex_program
+#define GL_NV_vertex_program 1
+
+#define GL_VERTEX_PROGRAM_NV 0x8620
+#define GL_VERTEX_STATE_PROGRAM_NV 0x8621
+#define GL_ATTRIB_ARRAY_SIZE_NV 0x8623
+#define GL_ATTRIB_ARRAY_STRIDE_NV 0x8624
+#define GL_ATTRIB_ARRAY_TYPE_NV 0x8625
+#define GL_CURRENT_ATTRIB_NV 0x8626
+#define GL_PROGRAM_LENGTH_NV 0x8627
+#define GL_PROGRAM_STRING_NV 0x8628
+#define GL_MODELVIEW_PROJECTION_NV 0x8629
+#define GL_IDENTITY_NV 0x862A
+#define GL_INVERSE_NV 0x862B
+#define GL_TRANSPOSE_NV 0x862C
+#define GL_INVERSE_TRANSPOSE_NV 0x862D
+#define GL_MAX_TRACK_MATRIX_STACK_DEPTH_NV 0x862E
+#define GL_MAX_TRACK_MATRICES_NV 0x862F
+#define GL_MATRIX0_NV 0x8630
+#define GL_MATRIX1_NV 0x8631
+#define GL_MATRIX2_NV 0x8632
+#define GL_MATRIX3_NV 0x8633
+#define GL_MATRIX4_NV 0x8634
+#define GL_MATRIX5_NV 0x8635
+#define GL_MATRIX6_NV 0x8636
+#define GL_MATRIX7_NV 0x8637
+#define GL_CURRENT_MATRIX_STACK_DEPTH_NV 0x8640
+#define GL_CURRENT_MATRIX_NV 0x8641
+#define GL_VERTEX_PROGRAM_POINT_SIZE_NV 0x8642
+#define GL_VERTEX_PROGRAM_TWO_SIDE_NV 0x8643
+#define GL_PROGRAM_PARAMETER_NV 0x8644
+#define GL_ATTRIB_ARRAY_POINTER_NV 0x8645
+#define GL_PROGRAM_TARGET_NV 0x8646
+#define GL_PROGRAM_RESIDENT_NV 0x8647
+#define GL_TRACK_MATRIX_NV 0x8648
+#define GL_TRACK_MATRIX_TRANSFORM_NV 0x8649
+#define GL_VERTEX_PROGRAM_BINDING_NV 0x864A
+#define GL_PROGRAM_ERROR_POSITION_NV 0x864B
+#define GL_VERTEX_ATTRIB_ARRAY0_NV 0x8650
+#define GL_VERTEX_ATTRIB_ARRAY1_NV 0x8651
+#define GL_VERTEX_ATTRIB_ARRAY2_NV 0x8652
+#define GL_VERTEX_ATTRIB_ARRAY3_NV 0x8653
+#define GL_VERTEX_ATTRIB_ARRAY4_NV 0x8654
+#define GL_VERTEX_ATTRIB_ARRAY5_NV 0x8655
+#define GL_VERTEX_ATTRIB_ARRAY6_NV 0x8656
+#define GL_VERTEX_ATTRIB_ARRAY7_NV 0x8657
+#define GL_VERTEX_ATTRIB_ARRAY8_NV 0x8658
+#define GL_VERTEX_ATTRIB_ARRAY9_NV 0x8659
+#define GL_VERTEX_ATTRIB_ARRAY10_NV 0x865A
+#define GL_VERTEX_ATTRIB_ARRAY11_NV 0x865B
+#define GL_VERTEX_ATTRIB_ARRAY12_NV 0x865C
+#define GL_VERTEX_ATTRIB_ARRAY13_NV 0x865D
+#define GL_VERTEX_ATTRIB_ARRAY14_NV 0x865E
+#define GL_VERTEX_ATTRIB_ARRAY15_NV 0x865F
+#define GL_MAP1_VERTEX_ATTRIB0_4_NV 0x8660
+#define GL_MAP1_VERTEX_ATTRIB1_4_NV 0x8661
+#define GL_MAP1_VERTEX_ATTRIB2_4_NV 0x8662
+#define GL_MAP1_VERTEX_ATTRIB3_4_NV 0x8663
+#define GL_MAP1_VERTEX_ATTRIB4_4_NV 0x8664
+#define GL_MAP1_VERTEX_ATTRIB5_4_NV 0x8665
+#define GL_MAP1_VERTEX_ATTRIB6_4_NV 0x8666
+#define GL_MAP1_VERTEX_ATTRIB7_4_NV 0x8667
+#define GL_MAP1_VERTEX_ATTRIB8_4_NV 0x8668
+#define GL_MAP1_VERTEX_ATTRIB9_4_NV 0x8669
+#define GL_MAP1_VERTEX_ATTRIB10_4_NV 0x866A
+#define GL_MAP1_VERTEX_ATTRIB11_4_NV 0x866B
+#define GL_MAP1_VERTEX_ATTRIB12_4_NV 0x866C
+#define GL_MAP1_VERTEX_ATTRIB13_4_NV 0x866D
+#define GL_MAP1_VERTEX_ATTRIB14_4_NV 0x866E
+#define GL_MAP1_VERTEX_ATTRIB15_4_NV 0x866F
+#define GL_MAP2_VERTEX_ATTRIB0_4_NV 0x8670
+#define GL_MAP2_VERTEX_ATTRIB1_4_NV 0x8671
+#define GL_MAP2_VERTEX_ATTRIB2_4_NV 0x8672
+#define GL_MAP2_VERTEX_ATTRIB3_4_NV 0x8673
+#define GL_MAP2_VERTEX_ATTRIB4_4_NV 0x8674
+#define GL_MAP2_VERTEX_ATTRIB5_4_NV 0x8675
+#define GL_MAP2_VERTEX_ATTRIB6_4_NV 0x8676
+#define GL_MAP2_VERTEX_ATTRIB7_4_NV 0x8677
+#define GL_MAP2_VERTEX_ATTRIB8_4_NV 0x8678
+#define GL_MAP2_VERTEX_ATTRIB9_4_NV 0x8679
+#define GL_MAP2_VERTEX_ATTRIB10_4_NV 0x867A
+#define GL_MAP2_VERTEX_ATTRIB11_4_NV 0x867B
+#define GL_MAP2_VERTEX_ATTRIB12_4_NV 0x867C
+#define GL_MAP2_VERTEX_ATTRIB13_4_NV 0x867D
+#define GL_MAP2_VERTEX_ATTRIB14_4_NV 0x867E
+#define GL_MAP2_VERTEX_ATTRIB15_4_NV 0x867F
+
+typedef GLboolean (GLAPIENTRY * PFNGLAREPROGRAMSRESIDENTNVPROC) (GLsizei n, const GLuint* ids, GLboolean *residences);
+typedef void (GLAPIENTRY * PFNGLBINDPROGRAMNVPROC) (GLenum target, GLuint id);
+typedef void (GLAPIENTRY * PFNGLDELETEPROGRAMSNVPROC) (GLsizei n, const GLuint* ids);
+typedef void (GLAPIENTRY * PFNGLEXECUTEPROGRAMNVPROC) (GLenum target, GLuint id, const GLfloat* params);
+typedef void (GLAPIENTRY * PFNGLGENPROGRAMSNVPROC) (GLsizei n, GLuint* ids);
+typedef void (GLAPIENTRY * PFNGLGETPROGRAMPARAMETERDVNVPROC) (GLenum target, GLuint index, GLenum pname, GLdouble* params);
+typedef void (GLAPIENTRY * PFNGLGETPROGRAMPARAMETERFVNVPROC) (GLenum target, GLuint index, GLenum pname, GLfloat* params);
+typedef void (GLAPIENTRY * PFNGLGETPROGRAMSTRINGNVPROC) (GLuint id, GLenum pname, GLubyte* program);
+typedef void (GLAPIENTRY * PFNGLGETPROGRAMIVNVPROC) (GLuint id, GLenum pname, GLint* params);
+typedef void (GLAPIENTRY * PFNGLGETTRACKMATRIXIVNVPROC) (GLenum target, GLuint address, GLenum pname, GLint* params);
+typedef void (GLAPIENTRY * PFNGLGETVERTEXATTRIBPOINTERVNVPROC) (GLuint index, GLenum pname, void** pointer);
+typedef void (GLAPIENTRY * PFNGLGETVERTEXATTRIBDVNVPROC) (GLuint index, GLenum pname, GLdouble* params);
+typedef void (GLAPIENTRY * PFNGLGETVERTEXATTRIBFVNVPROC) (GLuint index, GLenum pname, GLfloat* params);
+typedef void (GLAPIENTRY * PFNGLGETVERTEXATTRIBIVNVPROC) (GLuint index, GLenum pname, GLint* params);
+typedef GLboolean (GLAPIENTRY * PFNGLISPROGRAMNVPROC) (GLuint id);
+typedef void (GLAPIENTRY * PFNGLLOADPROGRAMNVPROC) (GLenum target, GLuint id, GLsizei len, const GLubyte* program);
+typedef void (GLAPIENTRY * PFNGLPROGRAMPARAMETER4DNVPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
+typedef void (GLAPIENTRY * PFNGLPROGRAMPARAMETER4DVNVPROC) (GLenum target, GLuint index, const GLdouble* params);
+typedef void (GLAPIENTRY * PFNGLPROGRAMPARAMETER4FNVPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+typedef void (GLAPIENTRY * PFNGLPROGRAMPARAMETER4FVNVPROC) (GLenum target, GLuint index, const GLfloat* params);
+typedef void (GLAPIENTRY * PFNGLPROGRAMPARAMETERS4DVNVPROC) (GLenum target, GLuint index, GLsizei num, const GLdouble* params);
+typedef void (GLAPIENTRY * PFNGLPROGRAMPARAMETERS4FVNVPROC) (GLenum target, GLuint index, GLsizei num, const GLfloat* params);
+typedef void (GLAPIENTRY * PFNGLREQUESTRESIDENTPROGRAMSNVPROC) (GLsizei n, GLuint* ids);
+typedef void (GLAPIENTRY * PFNGLTRACKMATRIXNVPROC) (GLenum target, GLuint address, GLenum matrix, GLenum transform);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB1DNVPROC) (GLuint index, GLdouble x);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB1DVNVPROC) (GLuint index, const GLdouble* v);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB1FNVPROC) (GLuint index, GLfloat x);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB1FVNVPROC) (GLuint index, const GLfloat* v);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB1SNVPROC) (GLuint index, GLshort x);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB1SVNVPROC) (GLuint index, const GLshort* v);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB2DNVPROC) (GLuint index, GLdouble x, GLdouble y);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB2DVNVPROC) (GLuint index, const GLdouble* v);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB2FNVPROC) (GLuint index, GLfloat x, GLfloat y);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB2FVNVPROC) (GLuint index, const GLfloat* v);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB2SNVPROC) (GLuint index, GLshort x, GLshort y);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB2SVNVPROC) (GLuint index, const GLshort* v);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB3DNVPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB3DVNVPROC) (GLuint index, const GLdouble* v);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB3FNVPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB3FVNVPROC) (GLuint index, const GLfloat* v);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB3SNVPROC) (GLuint index, GLshort x, GLshort y, GLshort z);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB3SVNVPROC) (GLuint index, const GLshort* v);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB4DNVPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB4DVNVPROC) (GLuint index, const GLdouble* v);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB4FNVPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB4FVNVPROC) (GLuint index, const GLfloat* v);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB4SNVPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB4SVNVPROC) (GLuint index, const GLshort* v);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB4UBNVPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB4UBVNVPROC) (GLuint index, const GLubyte* v);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBPOINTERNVPROC) (GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBS1DVNVPROC) (GLuint index, GLsizei n, const GLdouble* v);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBS1FVNVPROC) (GLuint index, GLsizei n, const GLfloat* v);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBS1SVNVPROC) (GLuint index, GLsizei n, const GLshort* v);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBS2DVNVPROC) (GLuint index, GLsizei n, const GLdouble* v);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBS2FVNVPROC) (GLuint index, GLsizei n, const GLfloat* v);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBS2SVNVPROC) (GLuint index, GLsizei n, const GLshort* v);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBS3DVNVPROC) (GLuint index, GLsizei n, const GLdouble* v);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBS3FVNVPROC) (GLuint index, GLsizei n, const GLfloat* v);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBS3SVNVPROC) (GLuint index, GLsizei n, const GLshort* v);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBS4DVNVPROC) (GLuint index, GLsizei n, const GLdouble* v);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBS4FVNVPROC) (GLuint index, GLsizei n, const GLfloat* v);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBS4SVNVPROC) (GLuint index, GLsizei n, const GLshort* v);
+typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBS4UBVNVPROC) (GLuint index, GLsizei n, const GLubyte* v);
+
+#define glAreProgramsResidentNV GLEW_GET_FUN(__glewAreProgramsResidentNV)
+#define glBindProgramNV GLEW_GET_FUN(__glewBindProgramNV)
+#define glDeleteProgramsNV GLEW_GET_FUN(__glewDeleteProgramsNV)
+#define glExecuteProgramNV GLEW_GET_FUN(__glewExecuteProgramNV)
+#define glGenProgramsNV GLEW_GET_FUN(__glewGenProgramsNV)
+#define glGetProgramParameterdvNV GLEW_GET_FUN(__glewGetProgramParameterdvNV)
+#define glGetProgramParameterfvNV GLEW_GET_FUN(__glewGetProgramParameterfvNV)
+#define glGetProgramStringNV GLEW_GET_FUN(__glewGetProgramStringNV)
+#define glGetProgramivNV GLEW_GET_FUN(__glewGetProgramivNV)
+#define glGetTrackMatrixivNV GLEW_GET_FUN(__glewGetTrackMatrixivNV)
+#define glGetVertexAttribPointervNV GLEW_GET_FUN(__glewGetVertexAttribPointervNV)
+#define glGetVertexAttribdvNV GLEW_GET_FUN(__glewGetVertexAttribdvNV)
+#define glGetVertexAttribfvNV GLEW_GET_FUN(__glewGetVertexAttribfvNV)
+#define glGetVertexAttribivNV GLEW_GET_FUN(__glewGetVertexAttribivNV)
+#define glIsProgramNV GLEW_GET_FUN(__glewIsProgramNV)
+#define glLoadProgramNV GLEW_GET_FUN(__glewLoadProgramNV)
+#define glProgramParameter4dNV GLEW_GET_FUN(__glewProgramParameter4dNV)
+#define glProgramParameter4dvNV GLEW_GET_FUN(__glewProgramParameter4dvNV)
+#define glProgramParameter4fNV GLEW_GET_FUN(__glewProgramParameter4fNV)
+#define glProgramParameter4fvNV GLEW_GET_FUN(__glewProgramParameter4fvNV)
+#define glProgramParameters4dvNV GLEW_GET_FUN(__glewProgramParameters4dvNV)
+#define glProgramParameters4fvNV GLEW_GET_FUN(__glewProgramParameters4fvNV)
+#define glRequestResidentProgramsNV GLEW_GET_FUN(__glewRequestResidentProgramsNV)
+#define glTrackMatrixNV GLEW_GET_FUN(__glewTrackMatrixNV)
+#define glVertexAttrib1dNV GLEW_GET_FUN(__glewVertexAttrib1dNV)
+#define glVertexAttrib1dvNV GLEW_GET_FUN(__glewVertexAttrib1dvNV)
+#define glVertexAttrib1fNV GLEW_GET_FUN(__glewVertexAttrib1fNV)
+#define glVertexAttrib1fvNV GLEW_GET_FUN(__glewVertexAttrib1fvNV)
+#define glVertexAttrib1sNV GLEW_GET_FUN(__glewVertexAttrib1sNV)
+#define glVertexAttrib1svNV GLEW_GET_FUN(__glewVertexAttrib1svNV)
+#define glVertexAttrib2dNV GLEW_GET_FUN(__glewVertexAttrib2dNV)
+#define glVertexAttrib2dvNV GLEW_GET_FUN(__glewVertexAttrib2dvNV)
+#define glVertexAttrib2fNV GLEW_GET_FUN(__glewVertexAttrib2fNV)
+#define glVertexAttrib2fvNV GLEW_GET_FUN(__glewVertexAttrib2fvNV)
+#define glVertexAttrib2sNV GLEW_GET_FUN(__glewVertexAttrib2sNV)
+#define glVertexAttrib2svNV GLEW_GET_FUN(__glewVertexAttrib2svNV)
+#define glVertexAttrib3dNV GLEW_GET_FUN(__glewVertexAttrib3dNV)
+#define glVertexAttrib3dvNV GLEW_GET_FUN(__glewVertexAttrib3dvNV)
+#define glVertexAttrib3fNV GLEW_GET_FUN(__glewVertexAttrib3fNV)
+#define glVertexAttrib3fvNV GLEW_GET_FUN(__glewVertexAttrib3fvNV)
+#define glVertexAttrib3sNV GLEW_GET_FUN(__glewVertexAttrib3sNV)
+#define glVertexAttrib3svNV GLEW_GET_FUN(__glewVertexAttrib3svNV)
+#define glVertexAttrib4dNV GLEW_GET_FUN(__glewVertexAttrib4dNV)
+#define glVertexAttrib4dvNV GLEW_GET_FUN(__glewVertexAttrib4dvNV)
+#define glVertexAttrib4fNV GLEW_GET_FUN(__glewVertexAttrib4fNV)
+#define glVertexAttrib4fvNV GLEW_GET_FUN(__glewVertexAttrib4fvNV)
+#define glVertexAttrib4sNV GLEW_GET_FUN(__glewVertexAttrib4sNV)
+#define glVertexAttrib4svNV GLEW_GET_FUN(__glewVertexAttrib4svNV)
+#define glVertexAttrib4ubNV GLEW_GET_FUN(__glewVertexAttrib4ubNV)
+#define glVertexAttrib4ubvNV GLEW_GET_FUN(__glewVertexAttrib4ubvNV)
+#define glVertexAttribPointerNV GLEW_GET_FUN(__glewVertexAttribPointerNV)
+#define glVertexAttribs1dvNV GLEW_GET_FUN(__glewVertexAttribs1dvNV)
+#define glVertexAttribs1fvNV GLEW_GET_FUN(__glewVertexAttribs1fvNV)
+#define glVertexAttribs1svNV GLEW_GET_FUN(__glewVertexAttribs1svNV)
+#define glVertexAttribs2dvNV GLEW_GET_FUN(__glewVertexAttribs2dvNV)
+#define glVertexAttribs2fvNV GLEW_GET_FUN(__glewVertexAttribs2fvNV)
+#define glVertexAttribs2svNV GLEW_GET_FUN(__glewVertexAttribs2svNV)
+#define glVertexAttribs3dvNV GLEW_GET_FUN(__glewVertexAttribs3dvNV)
+#define glVertexAttribs3fvNV GLEW_GET_FUN(__glewVertexAttribs3fvNV)
+#define glVertexAttribs3svNV GLEW_GET_FUN(__glewVertexAttribs3svNV)
+#define glVertexAttribs4dvNV GLEW_GET_FUN(__glewVertexAttribs4dvNV)
+#define glVertexAttribs4fvNV GLEW_GET_FUN(__glewVertexAttribs4fvNV)
+#define glVertexAttribs4svNV GLEW_GET_FUN(__glewVertexAttribs4svNV)
+#define glVertexAttribs4ubvNV GLEW_GET_FUN(__glewVertexAttribs4ubvNV)
+
+#define GLEW_NV_vertex_program GLEW_GET_VAR(__GLEW_NV_vertex_program)
+
+#endif /* GL_NV_vertex_program */
+
+/* ------------------------ GL_NV_vertex_program1_1 ------------------------ */
+
+#ifndef GL_NV_vertex_program1_1
+#define GL_NV_vertex_program1_1 1
+
+#define GLEW_NV_vertex_program1_1 GLEW_GET_VAR(__GLEW_NV_vertex_program1_1)
+
+#endif /* GL_NV_vertex_program1_1 */
+
+/* ------------------------- GL_NV_vertex_program2 ------------------------- */
+
+#ifndef GL_NV_vertex_program2
+#define GL_NV_vertex_program2 1
+
+#define GLEW_NV_vertex_program2 GLEW_GET_VAR(__GLEW_NV_vertex_program2)
+
+#endif /* GL_NV_vertex_program2 */
+
+/* ---------------------- GL_NV_vertex_program2_option --------------------- */
+
+#ifndef GL_NV_vertex_program2_option
+#define GL_NV_vertex_program2_option 1
+
+#define GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV 0x88F4
+#define GL_MAX_PROGRAM_CALL_DEPTH_NV 0x88F5
+
+#define GLEW_NV_vertex_program2_option GLEW_GET_VAR(__GLEW_NV_vertex_program2_option)
+
+#endif /* GL_NV_vertex_program2_option */
+
+/* ------------------------- GL_NV_vertex_program3 ------------------------- */
+
+#ifndef GL_NV_vertex_program3
+#define GL_NV_vertex_program3 1
+
+#define MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB 0x8B4C
+
+#define GLEW_NV_vertex_program3 GLEW_GET_VAR(__GLEW_NV_vertex_program3)
+
+#endif /* GL_NV_vertex_program3 */
+
+/* ------------------------- GL_NV_vertex_program4 ------------------------- */
+
+#ifndef GL_NV_vertex_program4
+#define GL_NV_vertex_program4 1
+
+#define GL_VERTEX_ATTRIB_ARRAY_INTEGER_NV 0x88FD
+
+#define GLEW_NV_vertex_program4 GLEW_GET_VAR(__GLEW_NV_vertex_program4)
+
+#endif /* GL_NV_vertex_program4 */
+
+/* -------------------------- GL_NV_video_capture -------------------------- */
+
+#ifndef GL_NV_video_capture
+#define GL_NV_video_capture 1
+
+#define GL_VIDEO_BUFFER_NV 0x9020
+#define GL_VIDEO_BUFFER_BINDING_NV 0x9021
+#define GL_FIELD_UPPER_NV 0x9022
+#define GL_FIELD_LOWER_NV 0x9023
+#define GL_NUM_VIDEO_CAPTURE_STREAMS_NV 0x9024
+#define GL_NEXT_VIDEO_CAPTURE_BUFFER_STATUS_NV 0x9025
+#define GL_VIDEO_CAPTURE_TO_422_SUPPORTED_NV 0x9026
+#define GL_LAST_VIDEO_CAPTURE_STATUS_NV 0x9027
+#define GL_VIDEO_BUFFER_PITCH_NV 0x9028
+#define GL_VIDEO_COLOR_CONVERSION_MATRIX_NV 0x9029
+#define GL_VIDEO_COLOR_CONVERSION_MAX_NV 0x902A
+#define GL_VIDEO_COLOR_CONVERSION_MIN_NV 0x902B
+#define GL_VIDEO_COLOR_CONVERSION_OFFSET_NV 0x902C
+#define GL_VIDEO_BUFFER_INTERNAL_FORMAT_NV 0x902D
+#define GL_PARTIAL_SUCCESS_NV 0x902E
+#define GL_SUCCESS_NV 0x902F
+#define GL_FAILURE_NV 0x9030
+#define GL_YCBYCR8_422_NV 0x9031
+#define GL_YCBAYCR8A_4224_NV 0x9032
+#define GL_Z6Y10Z6CB10Z6Y10Z6CR10_422_NV 0x9033
+#define GL_Z6Y10Z6CB10Z6A10Z6Y10Z6CR10Z6A10_4224_NV 0x9034
+#define GL_Z4Y12Z4CB12Z4Y12Z4CR12_422_NV 0x9035
+#define GL_Z4Y12Z4CB12Z4A12Z4Y12Z4CR12Z4A12_4224_NV 0x9036
+#define GL_Z4Y12Z4CB12Z4CR12_444_NV 0x9037
+#define GL_VIDEO_CAPTURE_FRAME_WIDTH_NV 0x9038
+#define GL_VIDEO_CAPTURE_FRAME_HEIGHT_NV 0x9039
+#define GL_VIDEO_CAPTURE_FIELD_UPPER_HEIGHT_NV 0x903A
+#define GL_VIDEO_CAPTURE_FIELD_LOWER_HEIGHT_NV 0x903B
+#define GL_VIDEO_CAPTURE_SURFACE_ORIGIN_NV 0x903C
+
+typedef void (GLAPIENTRY * PFNGLBEGINVIDEOCAPTURENVPROC) (GLuint video_capture_slot);
+typedef void (GLAPIENTRY * PFNGLBINDVIDEOCAPTURESTREAMBUFFERNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum frame_region, GLintptrARB offset);
+typedef void (GLAPIENTRY * PFNGLBINDVIDEOCAPTURESTREAMTEXTURENVPROC) (GLuint video_capture_slot, GLuint stream, GLenum frame_region, GLenum target, GLuint texture);
+typedef void (GLAPIENTRY * PFNGLENDVIDEOCAPTURENVPROC) (GLuint video_capture_slot);
+typedef void (GLAPIENTRY * PFNGLGETVIDEOCAPTURESTREAMDVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, GLdouble* params);
+typedef void (GLAPIENTRY * PFNGLGETVIDEOCAPTURESTREAMFVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, GLfloat* params);
+typedef void (GLAPIENTRY * PFNGLGETVIDEOCAPTURESTREAMIVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, GLint* params);
+typedef void (GLAPIENTRY * PFNGLGETVIDEOCAPTUREIVNVPROC) (GLuint video_capture_slot, GLenum pname, GLint* params);
+typedef GLenum (GLAPIENTRY * PFNGLVIDEOCAPTURENVPROC) (GLuint video_capture_slot, GLuint* sequence_num, GLuint64EXT *capture_time);
+typedef void (GLAPIENTRY * PFNGLVIDEOCAPTURESTREAMPARAMETERDVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLdouble* params);
+typedef void (GLAPIENTRY * PFNGLVIDEOCAPTURESTREAMPARAMETERFVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLfloat* params);
+typedef void (GLAPIENTRY * PFNGLVIDEOCAPTURESTREAMPARAMETERIVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLint* params);
+
+#define glBeginVideoCaptureNV GLEW_GET_FUN(__glewBeginVideoCaptureNV)
+#define glBindVideoCaptureStreamBufferNV GLEW_GET_FUN(__glewBindVideoCaptureStreamBufferNV)
+#define glBindVideoCaptureStreamTextureNV GLEW_GET_FUN(__glewBindVideoCaptureStreamTextureNV)
+#define glEndVideoCaptureNV GLEW_GET_FUN(__glewEndVideoCaptureNV)
+#define glGetVideoCaptureStreamdvNV GLEW_GET_FUN(__glewGetVideoCaptureStreamdvNV)
+#define glGetVideoCaptureStreamfvNV GLEW_GET_FUN(__glewGetVideoCaptureStreamfvNV)
+#define glGetVideoCaptureStreamivNV GLEW_GET_FUN(__glewGetVideoCaptureStreamivNV)
+#define glGetVideoCaptureivNV GLEW_GET_FUN(__glewGetVideoCaptureivNV)
+#define glVideoCaptureNV GLEW_GET_FUN(__glewVideoCaptureNV)
+#define glVideoCaptureStreamParameterdvNV GLEW_GET_FUN(__glewVideoCaptureStreamParameterdvNV)
+#define glVideoCaptureStreamParameterfvNV GLEW_GET_FUN(__glewVideoCaptureStreamParameterfvNV)
+#define glVideoCaptureStreamParameterivNV GLEW_GET_FUN(__glewVideoCaptureStreamParameterivNV)
+
+#define GLEW_NV_video_capture GLEW_GET_VAR(__GLEW_NV_video_capture)
+
+#endif /* GL_NV_video_capture */
+
+/* ------------------------- GL_NV_viewport_array2 ------------------------- */
+
+#ifndef GL_NV_viewport_array2
+#define GL_NV_viewport_array2 1
+
+#define GLEW_NV_viewport_array2 GLEW_GET_VAR(__GLEW_NV_viewport_array2)
+
+#endif /* GL_NV_viewport_array2 */
+
+/* ------------------------ GL_OES_byte_coordinates ------------------------ */
+
+#ifndef GL_OES_byte_coordinates
+#define GL_OES_byte_coordinates 1
+
+#define GLEW_OES_byte_coordinates GLEW_GET_VAR(__GLEW_OES_byte_coordinates)
+
+#endif /* GL_OES_byte_coordinates */
+
+/* ------------------- GL_OES_compressed_paletted_texture ------------------ */
+
+#ifndef GL_OES_compressed_paletted_texture
+#define GL_OES_compressed_paletted_texture 1
+
+#define GL_PALETTE4_RGB8_OES 0x8B90
+#define GL_PALETTE4_RGBA8_OES 0x8B91
+#define GL_PALETTE4_R5_G6_B5_OES 0x8B92
+#define GL_PALETTE4_RGBA4_OES 0x8B93
+#define GL_PALETTE4_RGB5_A1_OES 0x8B94
+#define GL_PALETTE8_RGB8_OES 0x8B95
+#define GL_PALETTE8_RGBA8_OES 0x8B96
+#define GL_PALETTE8_R5_G6_B5_OES 0x8B97
+#define GL_PALETTE8_RGBA4_OES 0x8B98
+#define GL_PALETTE8_RGB5_A1_OES 0x8B99
+
+#define GLEW_OES_compressed_paletted_texture GLEW_GET_VAR(__GLEW_OES_compressed_paletted_texture)
+
+#endif /* GL_OES_compressed_paletted_texture */
+
+/* --------------------------- GL_OES_read_format -------------------------- */
+
+#ifndef GL_OES_read_format
+#define GL_OES_read_format 1
+
+#define GL_IMPLEMENTATION_COLOR_READ_TYPE_OES 0x8B9A
+#define GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES 0x8B9B
+
+#define GLEW_OES_read_format GLEW_GET_VAR(__GLEW_OES_read_format)
+
+#endif /* GL_OES_read_format */
+
+/* ------------------------ GL_OES_single_precision ------------------------ */
+
+#ifndef GL_OES_single_precision
+#define GL_OES_single_precision 1
+
+typedef void (GLAPIENTRY * PFNGLCLEARDEPTHFOESPROC) (GLclampf depth);
+typedef void (GLAPIENTRY * PFNGLCLIPPLANEFOESPROC) (GLenum plane, const GLfloat* equation);
+typedef void (GLAPIENTRY * PFNGLDEPTHRANGEFOESPROC) (GLclampf n, GLclampf f);
+typedef void (GLAPIENTRY * PFNGLFRUSTUMFOESPROC) (GLfloat l, GLfloat r, GLfloat b, GLfloat t, GLfloat n, GLfloat f);
+typedef void (GLAPIENTRY * PFNGLGETCLIPPLANEFOESPROC) (GLenum plane, GLfloat* equation);
+typedef void (GLAPIENTRY * PFNGLORTHOFOESPROC) (GLfloat l, GLfloat r, GLfloat b, GLfloat t, GLfloat n, GLfloat f);
+
+#define glClearDepthfOES GLEW_GET_FUN(__glewClearDepthfOES)
+#define glClipPlanefOES GLEW_GET_FUN(__glewClipPlanefOES)
+#define glDepthRangefOES GLEW_GET_FUN(__glewDepthRangefOES)
+#define glFrustumfOES GLEW_GET_FUN(__glewFrustumfOES)
+#define glGetClipPlanefOES GLEW_GET_FUN(__glewGetClipPlanefOES)
+#define glOrthofOES GLEW_GET_FUN(__glewOrthofOES)
+
+#define GLEW_OES_single_precision GLEW_GET_VAR(__GLEW_OES_single_precision)
+
+#endif /* GL_OES_single_precision */
+
+/* ---------------------------- GL_OML_interlace --------------------------- */
+
+#ifndef GL_OML_interlace
+#define GL_OML_interlace 1
+
+#define GL_INTERLACE_OML 0x8980
+#define GL_INTERLACE_READ_OML 0x8981
+
+#define GLEW_OML_interlace GLEW_GET_VAR(__GLEW_OML_interlace)
+
+#endif /* GL_OML_interlace */
+
+/* ---------------------------- GL_OML_resample ---------------------------- */
+
+#ifndef GL_OML_resample
+#define GL_OML_resample 1
+
+#define GL_PACK_RESAMPLE_OML 0x8984
+#define GL_UNPACK_RESAMPLE_OML 0x8985
+#define GL_RESAMPLE_REPLICATE_OML 0x8986
+#define GL_RESAMPLE_ZERO_FILL_OML 0x8987
+#define GL_RESAMPLE_AVERAGE_OML 0x8988
+#define GL_RESAMPLE_DECIMATE_OML 0x8989
+
+#define GLEW_OML_resample GLEW_GET_VAR(__GLEW_OML_resample)
+
+#endif /* GL_OML_resample */
+
+/* ---------------------------- GL_OML_subsample --------------------------- */
+
+#ifndef GL_OML_subsample
+#define GL_OML_subsample 1
+
+#define GL_FORMAT_SUBSAMPLE_24_24_OML 0x8982
+#define GL_FORMAT_SUBSAMPLE_244_244_OML 0x8983
+
+#define GLEW_OML_subsample GLEW_GET_VAR(__GLEW_OML_subsample)
+
+#endif /* GL_OML_subsample */
+
+/* --------------------------- GL_PGI_misc_hints --------------------------- */
+
+#ifndef GL_PGI_misc_hints
+#define GL_PGI_misc_hints 1
+
+#define GL_PREFER_DOUBLEBUFFER_HINT_PGI 107000
+#define GL_CONSERVE_MEMORY_HINT_PGI 107005
+#define GL_RECLAIM_MEMORY_HINT_PGI 107006
+#define GL_NATIVE_GRAPHICS_HANDLE_PGI 107010
+#define GL_NATIVE_GRAPHICS_BEGIN_HINT_PGI 107011
+#define GL_NATIVE_GRAPHICS_END_HINT_PGI 107012
+#define GL_ALWAYS_FAST_HINT_PGI 107020
+#define GL_ALWAYS_SOFT_HINT_PGI 107021
+#define GL_ALLOW_DRAW_OBJ_HINT_PGI 107022
+#define GL_ALLOW_DRAW_WIN_HINT_PGI 107023
+#define GL_ALLOW_DRAW_FRG_HINT_PGI 107024
+#define GL_ALLOW_DRAW_MEM_HINT_PGI 107025
+#define GL_STRICT_DEPTHFUNC_HINT_PGI 107030
+#define GL_STRICT_LIGHTING_HINT_PGI 107031
+#define GL_STRICT_SCISSOR_HINT_PGI 107032
+#define GL_FULL_STIPPLE_HINT_PGI 107033
+#define GL_CLIP_NEAR_HINT_PGI 107040
+#define GL_CLIP_FAR_HINT_PGI 107041
+#define GL_WIDE_LINE_HINT_PGI 107042
+#define GL_BACK_NORMALS_HINT_PGI 107043
+
+#define GLEW_PGI_misc_hints GLEW_GET_VAR(__GLEW_PGI_misc_hints)
+
+#endif /* GL_PGI_misc_hints */
+
+/* -------------------------- GL_PGI_vertex_hints -------------------------- */
+
+#ifndef GL_PGI_vertex_hints
+#define GL_PGI_vertex_hints 1
+
+#define GL_VERTEX23_BIT_PGI 0x00000004
+#define GL_VERTEX4_BIT_PGI 0x00000008
+#define GL_COLOR3_BIT_PGI 0x00010000
+#define GL_COLOR4_BIT_PGI 0x00020000
+#define GL_EDGEFLAG_BIT_PGI 0x00040000
+#define GL_INDEX_BIT_PGI 0x00080000
+#define GL_MAT_AMBIENT_BIT_PGI 0x00100000
+#define GL_VERTEX_DATA_HINT_PGI 107050
+#define GL_VERTEX_CONSISTENT_HINT_PGI 107051
+#define GL_MATERIAL_SIDE_HINT_PGI 107052
+#define GL_MAX_VERTEX_HINT_PGI 107053
+#define GL_MAT_AMBIENT_AND_DIFFUSE_BIT_PGI 0x00200000
+#define GL_MAT_DIFFUSE_BIT_PGI 0x00400000
+#define GL_MAT_EMISSION_BIT_PGI 0x00800000
+#define GL_MAT_COLOR_INDEXES_BIT_PGI 0x01000000
+#define GL_MAT_SHININESS_BIT_PGI 0x02000000
+#define GL_MAT_SPECULAR_BIT_PGI 0x04000000
+#define GL_NORMAL_BIT_PGI 0x08000000
+#define GL_TEXCOORD1_BIT_PGI 0x10000000
+#define GL_TEXCOORD2_BIT_PGI 0x20000000
+#define GL_TEXCOORD3_BIT_PGI 0x40000000
+#define GL_TEXCOORD4_BIT_PGI 0x80000000
+
+#define GLEW_PGI_vertex_hints GLEW_GET_VAR(__GLEW_PGI_vertex_hints)
+
+#endif /* GL_PGI_vertex_hints */
+
+/* ---------------------- GL_REGAL_ES1_0_compatibility --------------------- */
+
+#ifndef GL_REGAL_ES1_0_compatibility
+#define GL_REGAL_ES1_0_compatibility 1
+
+typedef int GLclampx;
+
+typedef void (GLAPIENTRY * PFNGLALPHAFUNCXPROC) (GLenum func, GLclampx ref);
+typedef void (GLAPIENTRY * PFNGLCLEARCOLORXPROC) (GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha);
+typedef void (GLAPIENTRY * PFNGLCLEARDEPTHXPROC) (GLclampx depth);
+typedef void (GLAPIENTRY * PFNGLCOLOR4XPROC) (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha);
+typedef void (GLAPIENTRY * PFNGLDEPTHRANGEXPROC) (GLclampx zNear, GLclampx zFar);
+typedef void (GLAPIENTRY * PFNGLFOGXPROC) (GLenum pname, GLfixed param);
+typedef void (GLAPIENTRY * PFNGLFOGXVPROC) (GLenum pname, const GLfixed* params);
+typedef void (GLAPIENTRY * PFNGLFRUSTUMFPROC) (GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar);
+typedef void (GLAPIENTRY * PFNGLFRUSTUMXPROC) (GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar);
+typedef void (GLAPIENTRY * PFNGLLIGHTMODELXPROC) (GLenum pname, GLfixed param);
+typedef void (GLAPIENTRY * PFNGLLIGHTMODELXVPROC) (GLenum pname, const GLfixed* params);
+typedef void (GLAPIENTRY * PFNGLLIGHTXPROC) (GLenum light, GLenum pname, GLfixed param);
+typedef void (GLAPIENTRY * PFNGLLIGHTXVPROC) (GLenum light, GLenum pname, const GLfixed* params);
+typedef void (GLAPIENTRY * PFNGLLINEWIDTHXPROC) (GLfixed width);
+typedef void (GLAPIENTRY * PFNGLLOADMATRIXXPROC) (const GLfixed* m);
+typedef void (GLAPIENTRY * PFNGLMATERIALXPROC) (GLenum face, GLenum pname, GLfixed param);
+typedef void (GLAPIENTRY * PFNGLMATERIALXVPROC) (GLenum face, GLenum pname, const GLfixed* params);
+typedef void (GLAPIENTRY * PFNGLMULTMATRIXXPROC) (const GLfixed* m);
+typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD4XPROC) (GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q);
+typedef void (GLAPIENTRY * PFNGLNORMAL3XPROC) (GLfixed nx, GLfixed ny, GLfixed nz);
+typedef void (GLAPIENTRY * PFNGLORTHOFPROC) (GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar);
+typedef void (GLAPIENTRY * PFNGLORTHOXPROC) (GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar);
+typedef void (GLAPIENTRY * PFNGLPOINTSIZEXPROC) (GLfixed size);
+typedef void (GLAPIENTRY * PFNGLPOLYGONOFFSETXPROC) (GLfixed factor, GLfixed units);
+typedef void (GLAPIENTRY * PFNGLROTATEXPROC) (GLfixed angle, GLfixed x, GLfixed y, GLfixed z);
+typedef void (GLAPIENTRY * PFNGLSAMPLECOVERAGEXPROC) (GLclampx value, GLboolean invert);
+typedef void (GLAPIENTRY * PFNGLSCALEXPROC) (GLfixed x, GLfixed y, GLfixed z);
+typedef void (GLAPIENTRY * PFNGLTEXENVXPROC) (GLenum target, GLenum pname, GLfixed param);
+typedef void (GLAPIENTRY * PFNGLTEXENVXVPROC) (GLenum target, GLenum pname, const GLfixed* params);
+typedef void (GLAPIENTRY * PFNGLTEXPARAMETERXPROC) (GLenum target, GLenum pname, GLfixed param);
+typedef void (GLAPIENTRY * PFNGLTRANSLATEXPROC) (GLfixed x, GLfixed y, GLfixed z);
+
+#define glAlphaFuncx GLEW_GET_FUN(__glewAlphaFuncx)
+#define glClearColorx GLEW_GET_FUN(__glewClearColorx)
+#define glClearDepthx GLEW_GET_FUN(__glewClearDepthx)
+#define glColor4x GLEW_GET_FUN(__glewColor4x)
+#define glDepthRangex GLEW_GET_FUN(__glewDepthRangex)
+#define glFogx GLEW_GET_FUN(__glewFogx)
+#define glFogxv GLEW_GET_FUN(__glewFogxv)
+#define glFrustumf GLEW_GET_FUN(__glewFrustumf)
+#define glFrustumx GLEW_GET_FUN(__glewFrustumx)
+#define glLightModelx GLEW_GET_FUN(__glewLightModelx)
+#define glLightModelxv GLEW_GET_FUN(__glewLightModelxv)
+#define glLightx GLEW_GET_FUN(__glewLightx)
+#define glLightxv GLEW_GET_FUN(__glewLightxv)
+#define glLineWidthx GLEW_GET_FUN(__glewLineWidthx)
+#define glLoadMatrixx GLEW_GET_FUN(__glewLoadMatrixx)
+#define glMaterialx GLEW_GET_FUN(__glewMaterialx)
+#define glMaterialxv GLEW_GET_FUN(__glewMaterialxv)
+#define glMultMatrixx GLEW_GET_FUN(__glewMultMatrixx)
+#define glMultiTexCoord4x GLEW_GET_FUN(__glewMultiTexCoord4x)
+#define glNormal3x GLEW_GET_FUN(__glewNormal3x)
+#define glOrthof GLEW_GET_FUN(__glewOrthof)
+#define glOrthox GLEW_GET_FUN(__glewOrthox)
+#define glPointSizex GLEW_GET_FUN(__glewPointSizex)
+#define glPolygonOffsetx GLEW_GET_FUN(__glewPolygonOffsetx)
+#define glRotatex GLEW_GET_FUN(__glewRotatex)
+#define glSampleCoveragex GLEW_GET_FUN(__glewSampleCoveragex)
+#define glScalex GLEW_GET_FUN(__glewScalex)
+#define glTexEnvx GLEW_GET_FUN(__glewTexEnvx)
+#define glTexEnvxv GLEW_GET_FUN(__glewTexEnvxv)
+#define glTexParameterx GLEW_GET_FUN(__glewTexParameterx)
+#define glTranslatex GLEW_GET_FUN(__glewTranslatex)
+
+#define GLEW_REGAL_ES1_0_compatibility GLEW_GET_VAR(__GLEW_REGAL_ES1_0_compatibility)
+
+#endif /* GL_REGAL_ES1_0_compatibility */
+
+/* ---------------------- GL_REGAL_ES1_1_compatibility --------------------- */
+
+#ifndef GL_REGAL_ES1_1_compatibility
+#define GL_REGAL_ES1_1_compatibility 1
+
+typedef void (GLAPIENTRY * PFNGLCLIPPLANEFPROC) (GLenum plane, const GLfloat* equation);
+typedef void (GLAPIENTRY * PFNGLCLIPPLANEXPROC) (GLenum plane, const GLfixed* equation);
+typedef void (GLAPIENTRY * PFNGLGETCLIPPLANEFPROC) (GLenum pname, GLfloat eqn[4]);
+typedef void (GLAPIENTRY * PFNGLGETCLIPPLANEXPROC) (GLenum pname, GLfixed eqn[4]);
+typedef void (GLAPIENTRY * PFNGLGETFIXEDVPROC) (GLenum pname, GLfixed* params);
+typedef void (GLAPIENTRY * PFNGLGETLIGHTXVPROC) (GLenum light, GLenum pname, GLfixed* params);
+typedef void (GLAPIENTRY * PFNGLGETMATERIALXVPROC) (GLenum face, GLenum pname, GLfixed* params);
+typedef void (GLAPIENTRY * PFNGLGETTEXENVXVPROC) (GLenum env, GLenum pname, GLfixed* params);
+typedef void (GLAPIENTRY * PFNGLGETTEXPARAMETERXVPROC) (GLenum target, GLenum pname, GLfixed* params);
+typedef void (GLAPIENTRY * PFNGLPOINTPARAMETERXPROC) (GLenum pname, GLfixed param);
+typedef void (GLAPIENTRY * PFNGLPOINTPARAMETERXVPROC) (GLenum pname, const GLfixed* params);
+typedef void (GLAPIENTRY * PFNGLPOINTSIZEPOINTEROESPROC) (GLenum type, GLsizei stride, const void *pointer);
+typedef void (GLAPIENTRY * PFNGLTEXPARAMETERXVPROC) (GLenum target, GLenum pname, const GLfixed* params);
+
+#define glClipPlanef GLEW_GET_FUN(__glewClipPlanef)
+#define glClipPlanex GLEW_GET_FUN(__glewClipPlanex)
+#define glGetClipPlanef GLEW_GET_FUN(__glewGetClipPlanef)
+#define glGetClipPlanex GLEW_GET_FUN(__glewGetClipPlanex)
+#define glGetFixedv GLEW_GET_FUN(__glewGetFixedv)
+#define glGetLightxv GLEW_GET_FUN(__glewGetLightxv)
+#define glGetMaterialxv GLEW_GET_FUN(__glewGetMaterialxv)
+#define glGetTexEnvxv GLEW_GET_FUN(__glewGetTexEnvxv)
+#define glGetTexParameterxv GLEW_GET_FUN(__glewGetTexParameterxv)
+#define glPointParameterx GLEW_GET_FUN(__glewPointParameterx)
+#define glPointParameterxv GLEW_GET_FUN(__glewPointParameterxv)
+#define glPointSizePointerOES GLEW_GET_FUN(__glewPointSizePointerOES)
+#define glTexParameterxv GLEW_GET_FUN(__glewTexParameterxv)
+
+#define GLEW_REGAL_ES1_1_compatibility GLEW_GET_VAR(__GLEW_REGAL_ES1_1_compatibility)
+
+#endif /* GL_REGAL_ES1_1_compatibility */
+
+/* ---------------------------- GL_REGAL_enable ---------------------------- */
+
+#ifndef GL_REGAL_enable
+#define GL_REGAL_enable 1
+
+#define GL_ERROR_REGAL 0x9322
+#define GL_DEBUG_REGAL 0x9323
+#define GL_LOG_REGAL 0x9324
+#define GL_EMULATION_REGAL 0x9325
+#define GL_DRIVER_REGAL 0x9326
+#define GL_MISSING_REGAL 0x9360
+#define GL_TRACE_REGAL 0x9361
+#define GL_CACHE_REGAL 0x9362
+#define GL_CODE_REGAL 0x9363
+#define GL_STATISTICS_REGAL 0x9364
+
+#define GLEW_REGAL_enable GLEW_GET_VAR(__GLEW_REGAL_enable)
+
+#endif /* GL_REGAL_enable */
+
+/* ------------------------- GL_REGAL_error_string ------------------------- */
+
+#ifndef GL_REGAL_error_string
+#define GL_REGAL_error_string 1
+
+typedef const GLchar* (GLAPIENTRY * PFNGLERRORSTRINGREGALPROC) (GLenum error);
+
+#define glErrorStringREGAL GLEW_GET_FUN(__glewErrorStringREGAL)
+
+#define GLEW_REGAL_error_string GLEW_GET_VAR(__GLEW_REGAL_error_string)
+
+#endif /* GL_REGAL_error_string */
+
+/* ------------------------ GL_REGAL_extension_query ----------------------- */
+
+#ifndef GL_REGAL_extension_query
+#define GL_REGAL_extension_query 1
+
+typedef GLboolean (GLAPIENTRY * PFNGLGETEXTENSIONREGALPROC) (const GLchar* ext);
+typedef GLboolean (GLAPIENTRY * PFNGLISSUPPORTEDREGALPROC) (const GLchar* ext);
+
+#define glGetExtensionREGAL GLEW_GET_FUN(__glewGetExtensionREGAL)
+#define glIsSupportedREGAL GLEW_GET_FUN(__glewIsSupportedREGAL)
+
+#define GLEW_REGAL_extension_query GLEW_GET_VAR(__GLEW_REGAL_extension_query)
+
+#endif /* GL_REGAL_extension_query */
+
+/* ------------------------------ GL_REGAL_log ----------------------------- */
+
+#ifndef GL_REGAL_log
+#define GL_REGAL_log 1
+
+#define GL_LOG_ERROR_REGAL 0x9319
+#define GL_LOG_WARNING_REGAL 0x931A
+#define GL_LOG_INFO_REGAL 0x931B
+#define GL_LOG_APP_REGAL 0x931C
+#define GL_LOG_DRIVER_REGAL 0x931D
+#define GL_LOG_INTERNAL_REGAL 0x931E
+#define GL_LOG_DEBUG_REGAL 0x931F
+#define GL_LOG_STATUS_REGAL 0x9320
+#define GL_LOG_HTTP_REGAL 0x9321
+
+typedef void (APIENTRY *GLLOGPROCREGAL)(GLenum stream, GLsizei length, const GLchar *message, void *context);
+
+typedef void (GLAPIENTRY * PFNGLLOGMESSAGECALLBACKREGALPROC) (GLLOGPROCREGAL callback);
+
+#define glLogMessageCallbackREGAL GLEW_GET_FUN(__glewLogMessageCallbackREGAL)
+
+#define GLEW_REGAL_log GLEW_GET_VAR(__GLEW_REGAL_log)
+
+#endif /* GL_REGAL_log */
+
+/* ------------------------- GL_REGAL_proc_address ------------------------- */
+
+#ifndef GL_REGAL_proc_address
+#define GL_REGAL_proc_address 1
+
+typedef void * (GLAPIENTRY * PFNGLGETPROCADDRESSREGALPROC) (const GLchar *name);
+
+#define glGetProcAddressREGAL GLEW_GET_FUN(__glewGetProcAddressREGAL)
+
+#define GLEW_REGAL_proc_address GLEW_GET_VAR(__GLEW_REGAL_proc_address)
+
+#endif /* GL_REGAL_proc_address */
+
+/* ----------------------- GL_REND_screen_coordinates ---------------------- */
+
+#ifndef GL_REND_screen_coordinates
+#define GL_REND_screen_coordinates 1
+
+#define GL_SCREEN_COORDINATES_REND 0x8490
+#define GL_INVERTED_SCREEN_W_REND 0x8491
+
+#define GLEW_REND_screen_coordinates GLEW_GET_VAR(__GLEW_REND_screen_coordinates)
+
+#endif /* GL_REND_screen_coordinates */
+
+/* ------------------------------- GL_S3_s3tc ------------------------------ */
+
+#ifndef GL_S3_s3tc
+#define GL_S3_s3tc 1
+
+#define GL_RGB_S3TC 0x83A0
+#define GL_RGB4_S3TC 0x83A1
+#define GL_RGBA_S3TC 0x83A2
+#define GL_RGBA4_S3TC 0x83A3
+#define GL_RGBA_DXT5_S3TC 0x83A4
+#define GL_RGBA4_DXT5_S3TC 0x83A5
+
+#define GLEW_S3_s3tc GLEW_GET_VAR(__GLEW_S3_s3tc)
+
+#endif /* GL_S3_s3tc */
+
+/* -------------------------- GL_SGIS_color_range -------------------------- */
+
+#ifndef GL_SGIS_color_range
+#define GL_SGIS_color_range 1
+
+#define GL_EXTENDED_RANGE_SGIS 0x85A5
+#define GL_MIN_RED_SGIS 0x85A6
+#define GL_MAX_RED_SGIS 0x85A7
+#define GL_MIN_GREEN_SGIS 0x85A8
+#define GL_MAX_GREEN_SGIS 0x85A9
+#define GL_MIN_BLUE_SGIS 0x85AA
+#define GL_MAX_BLUE_SGIS 0x85AB
+#define GL_MIN_ALPHA_SGIS 0x85AC
+#define GL_MAX_ALPHA_SGIS 0x85AD
+
+#define GLEW_SGIS_color_range GLEW_GET_VAR(__GLEW_SGIS_color_range)
+
+#endif /* GL_SGIS_color_range */
+
+/* ------------------------- GL_SGIS_detail_texture ------------------------ */
+
+#ifndef GL_SGIS_detail_texture
+#define GL_SGIS_detail_texture 1
+
+typedef void (GLAPIENTRY * PFNGLDETAILTEXFUNCSGISPROC) (GLenum target, GLsizei n, const GLfloat* points);
+typedef void (GLAPIENTRY * PFNGLGETDETAILTEXFUNCSGISPROC) (GLenum target, GLfloat* points);
+
+#define glDetailTexFuncSGIS GLEW_GET_FUN(__glewDetailTexFuncSGIS)
+#define glGetDetailTexFuncSGIS GLEW_GET_FUN(__glewGetDetailTexFuncSGIS)
+
+#define GLEW_SGIS_detail_texture GLEW_GET_VAR(__GLEW_SGIS_detail_texture)
+
+#endif /* GL_SGIS_detail_texture */
+
+/* -------------------------- GL_SGIS_fog_function ------------------------- */
+
+#ifndef GL_SGIS_fog_function
+#define GL_SGIS_fog_function 1
+
+typedef void (GLAPIENTRY * PFNGLFOGFUNCSGISPROC) (GLsizei n, const GLfloat* points);
+typedef void (GLAPIENTRY * PFNGLGETFOGFUNCSGISPROC) (GLfloat* points);
+
+#define glFogFuncSGIS GLEW_GET_FUN(__glewFogFuncSGIS)
+#define glGetFogFuncSGIS GLEW_GET_FUN(__glewGetFogFuncSGIS)
+
+#define GLEW_SGIS_fog_function GLEW_GET_VAR(__GLEW_SGIS_fog_function)
+
+#endif /* GL_SGIS_fog_function */
+
+/* ------------------------ GL_SGIS_generate_mipmap ------------------------ */
+
+#ifndef GL_SGIS_generate_mipmap
+#define GL_SGIS_generate_mipmap 1
+
+#define GL_GENERATE_MIPMAP_SGIS 0x8191
+#define GL_GENERATE_MIPMAP_HINT_SGIS 0x8192
+
+#define GLEW_SGIS_generate_mipmap GLEW_GET_VAR(__GLEW_SGIS_generate_mipmap)
+
+#endif /* GL_SGIS_generate_mipmap */
+
+/* -------------------------- GL_SGIS_multisample -------------------------- */
+
+#ifndef GL_SGIS_multisample
+#define GL_SGIS_multisample 1
+
+#define GL_MULTISAMPLE_SGIS 0x809D
+#define GL_SAMPLE_ALPHA_TO_MASK_SGIS 0x809E
+#define GL_SAMPLE_ALPHA_TO_ONE_SGIS 0x809F
+#define GL_SAMPLE_MASK_SGIS 0x80A0
+#define GL_1PASS_SGIS 0x80A1
+#define GL_2PASS_0_SGIS 0x80A2
+#define GL_2PASS_1_SGIS 0x80A3
+#define GL_4PASS_0_SGIS 0x80A4
+#define GL_4PASS_1_SGIS 0x80A5
+#define GL_4PASS_2_SGIS 0x80A6
+#define GL_4PASS_3_SGIS 0x80A7
+#define GL_SAMPLE_BUFFERS_SGIS 0x80A8
+#define GL_SAMPLES_SGIS 0x80A9
+#define GL_SAMPLE_MASK_VALUE_SGIS 0x80AA
+#define GL_SAMPLE_MASK_INVERT_SGIS 0x80AB
+#define GL_SAMPLE_PATTERN_SGIS 0x80AC
+
+typedef void (GLAPIENTRY * PFNGLSAMPLEMASKSGISPROC) (GLclampf value, GLboolean invert);
+typedef void (GLAPIENTRY * PFNGLSAMPLEPATTERNSGISPROC) (GLenum pattern);
+
+#define glSampleMaskSGIS GLEW_GET_FUN(__glewSampleMaskSGIS)
+#define glSamplePatternSGIS GLEW_GET_FUN(__glewSamplePatternSGIS)
+
+#define GLEW_SGIS_multisample GLEW_GET_VAR(__GLEW_SGIS_multisample)
+
+#endif /* GL_SGIS_multisample */
+
+/* ------------------------- GL_SGIS_pixel_texture ------------------------- */
+
+#ifndef GL_SGIS_pixel_texture
+#define GL_SGIS_pixel_texture 1
+
+#define GLEW_SGIS_pixel_texture GLEW_GET_VAR(__GLEW_SGIS_pixel_texture)
+
+#endif /* GL_SGIS_pixel_texture */
+
+/* ----------------------- GL_SGIS_point_line_texgen ----------------------- */
+
+#ifndef GL_SGIS_point_line_texgen
+#define GL_SGIS_point_line_texgen 1
+
+#define GL_EYE_DISTANCE_TO_POINT_SGIS 0x81F0
+#define GL_OBJECT_DISTANCE_TO_POINT_SGIS 0x81F1
+#define GL_EYE_DISTANCE_TO_LINE_SGIS 0x81F2
+#define GL_OBJECT_DISTANCE_TO_LINE_SGIS 0x81F3
+#define GL_EYE_POINT_SGIS 0x81F4
+#define GL_OBJECT_POINT_SGIS 0x81F5
+#define GL_EYE_LINE_SGIS 0x81F6
+#define GL_OBJECT_LINE_SGIS 0x81F7
+
+#define GLEW_SGIS_point_line_texgen GLEW_GET_VAR(__GLEW_SGIS_point_line_texgen)
+
+#endif /* GL_SGIS_point_line_texgen */
+
+/* ------------------------ GL_SGIS_sharpen_texture ------------------------ */
+
+#ifndef GL_SGIS_sharpen_texture
+#define GL_SGIS_sharpen_texture 1
+
+typedef void (GLAPIENTRY * PFNGLGETSHARPENTEXFUNCSGISPROC) (GLenum target, GLfloat* points);
+typedef void (GLAPIENTRY * PFNGLSHARPENTEXFUNCSGISPROC) (GLenum target, GLsizei n, const GLfloat* points);
+
+#define glGetSharpenTexFuncSGIS GLEW_GET_FUN(__glewGetSharpenTexFuncSGIS)
+#define glSharpenTexFuncSGIS GLEW_GET_FUN(__glewSharpenTexFuncSGIS)
+
+#define GLEW_SGIS_sharpen_texture GLEW_GET_VAR(__GLEW_SGIS_sharpen_texture)
+
+#endif /* GL_SGIS_sharpen_texture */
+
+/* --------------------------- GL_SGIS_texture4D --------------------------- */
+
+#ifndef GL_SGIS_texture4D
+#define GL_SGIS_texture4D 1
+
+typedef void (GLAPIENTRY * PFNGLTEXIMAGE4DSGISPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLsizei extent, GLint border, GLenum format, GLenum type, const void *pixels);
+typedef void (GLAPIENTRY * PFNGLTEXSUBIMAGE4DSGISPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint woffset, GLsizei width, GLsizei height, GLsizei depth, GLsizei extent, GLenum format, GLenum type, const void *pixels);
+
+#define glTexImage4DSGIS GLEW_GET_FUN(__glewTexImage4DSGIS)
+#define glTexSubImage4DSGIS GLEW_GET_FUN(__glewTexSubImage4DSGIS)
+
+#define GLEW_SGIS_texture4D GLEW_GET_VAR(__GLEW_SGIS_texture4D)
+
+#endif /* GL_SGIS_texture4D */
+
+/* ---------------------- GL_SGIS_texture_border_clamp --------------------- */
+
+#ifndef GL_SGIS_texture_border_clamp
+#define GL_SGIS_texture_border_clamp 1
+
+#define GL_CLAMP_TO_BORDER_SGIS 0x812D
+
+#define GLEW_SGIS_texture_border_clamp GLEW_GET_VAR(__GLEW_SGIS_texture_border_clamp)
+
+#endif /* GL_SGIS_texture_border_clamp */
+
+/* ----------------------- GL_SGIS_texture_edge_clamp ---------------------- */
+
+#ifndef GL_SGIS_texture_edge_clamp
+#define GL_SGIS_texture_edge_clamp 1
+
+#define GL_CLAMP_TO_EDGE_SGIS 0x812F
+
+#define GLEW_SGIS_texture_edge_clamp GLEW_GET_VAR(__GLEW_SGIS_texture_edge_clamp)
+
+#endif /* GL_SGIS_texture_edge_clamp */
+
+/* ------------------------ GL_SGIS_texture_filter4 ------------------------ */
+
+#ifndef GL_SGIS_texture_filter4
+#define GL_SGIS_texture_filter4 1
+
+typedef void (GLAPIENTRY * PFNGLGETTEXFILTERFUNCSGISPROC) (GLenum target, GLenum filter, GLfloat* weights);
+typedef void (GLAPIENTRY * PFNGLTEXFILTERFUNCSGISPROC) (GLenum target, GLenum filter, GLsizei n, const GLfloat* weights);
+
+#define glGetTexFilterFuncSGIS GLEW_GET_FUN(__glewGetTexFilterFuncSGIS)
+#define glTexFilterFuncSGIS GLEW_GET_FUN(__glewTexFilterFuncSGIS)
+
+#define GLEW_SGIS_texture_filter4 GLEW_GET_VAR(__GLEW_SGIS_texture_filter4)
+
+#endif /* GL_SGIS_texture_filter4 */
+
+/* -------------------------- GL_SGIS_texture_lod -------------------------- */
+
+#ifndef GL_SGIS_texture_lod
+#define GL_SGIS_texture_lod 1
+
+#define GL_TEXTURE_MIN_LOD_SGIS 0x813A
+#define GL_TEXTURE_MAX_LOD_SGIS 0x813B
+#define GL_TEXTURE_BASE_LEVEL_SGIS 0x813C
+#define GL_TEXTURE_MAX_LEVEL_SGIS 0x813D
+
+#define GLEW_SGIS_texture_lod GLEW_GET_VAR(__GLEW_SGIS_texture_lod)
+
+#endif /* GL_SGIS_texture_lod */
+
+/* ------------------------- GL_SGIS_texture_select ------------------------ */
+
+#ifndef GL_SGIS_texture_select
+#define GL_SGIS_texture_select 1
+
+#define GLEW_SGIS_texture_select GLEW_GET_VAR(__GLEW_SGIS_texture_select)
+
+#endif /* GL_SGIS_texture_select */
+
+/* ----------------------------- GL_SGIX_async ----------------------------- */
+
+#ifndef GL_SGIX_async
+#define GL_SGIX_async 1
+
+#define GL_ASYNC_MARKER_SGIX 0x8329
+
+typedef void (GLAPIENTRY * PFNGLASYNCMARKERSGIXPROC) (GLuint marker);
+typedef void (GLAPIENTRY * PFNGLDELETEASYNCMARKERSSGIXPROC) (GLuint marker, GLsizei range);
+typedef GLint (GLAPIENTRY * PFNGLFINISHASYNCSGIXPROC) (GLuint* markerp);
+typedef GLuint (GLAPIENTRY * PFNGLGENASYNCMARKERSSGIXPROC) (GLsizei range);
+typedef GLboolean (GLAPIENTRY * PFNGLISASYNCMARKERSGIXPROC) (GLuint marker);
+typedef GLint (GLAPIENTRY * PFNGLPOLLASYNCSGIXPROC) (GLuint* markerp);
+
+#define glAsyncMarkerSGIX GLEW_GET_FUN(__glewAsyncMarkerSGIX)
+#define glDeleteAsyncMarkersSGIX GLEW_GET_FUN(__glewDeleteAsyncMarkersSGIX)
+#define glFinishAsyncSGIX GLEW_GET_FUN(__glewFinishAsyncSGIX)
+#define glGenAsyncMarkersSGIX GLEW_GET_FUN(__glewGenAsyncMarkersSGIX)
+#define glIsAsyncMarkerSGIX GLEW_GET_FUN(__glewIsAsyncMarkerSGIX)
+#define glPollAsyncSGIX GLEW_GET_FUN(__glewPollAsyncSGIX)
+
+#define GLEW_SGIX_async GLEW_GET_VAR(__GLEW_SGIX_async)
+
+#endif /* GL_SGIX_async */
+
+/* ------------------------ GL_SGIX_async_histogram ------------------------ */
+
+#ifndef GL_SGIX_async_histogram
+#define GL_SGIX_async_histogram 1
+
+#define GL_ASYNC_HISTOGRAM_SGIX 0x832C
+#define GL_MAX_ASYNC_HISTOGRAM_SGIX 0x832D
+
+#define GLEW_SGIX_async_histogram GLEW_GET_VAR(__GLEW_SGIX_async_histogram)
+
+#endif /* GL_SGIX_async_histogram */
+
+/* -------------------------- GL_SGIX_async_pixel -------------------------- */
+
+#ifndef GL_SGIX_async_pixel
+#define GL_SGIX_async_pixel 1
+
+#define GL_ASYNC_TEX_IMAGE_SGIX 0x835C
+#define GL_ASYNC_DRAW_PIXELS_SGIX 0x835D
+#define GL_ASYNC_READ_PIXELS_SGIX 0x835E
+#define GL_MAX_ASYNC_TEX_IMAGE_SGIX 0x835F
+#define GL_MAX_ASYNC_DRAW_PIXELS_SGIX 0x8360
+#define GL_MAX_ASYNC_READ_PIXELS_SGIX 0x8361
+
+#define GLEW_SGIX_async_pixel GLEW_GET_VAR(__GLEW_SGIX_async_pixel)
+
+#endif /* GL_SGIX_async_pixel */
+
+/* ----------------------- GL_SGIX_blend_alpha_minmax ---------------------- */
+
+#ifndef GL_SGIX_blend_alpha_minmax
+#define GL_SGIX_blend_alpha_minmax 1
+
+#define GL_ALPHA_MIN_SGIX 0x8320
+#define GL_ALPHA_MAX_SGIX 0x8321
+
+#define GLEW_SGIX_blend_alpha_minmax GLEW_GET_VAR(__GLEW_SGIX_blend_alpha_minmax)
+
+#endif /* GL_SGIX_blend_alpha_minmax */
+
+/* ---------------------------- GL_SGIX_clipmap ---------------------------- */
+
+#ifndef GL_SGIX_clipmap
+#define GL_SGIX_clipmap 1
+
+#define GLEW_SGIX_clipmap GLEW_GET_VAR(__GLEW_SGIX_clipmap)
+
+#endif /* GL_SGIX_clipmap */
+
+/* ---------------------- GL_SGIX_convolution_accuracy --------------------- */
+
+#ifndef GL_SGIX_convolution_accuracy
+#define GL_SGIX_convolution_accuracy 1
+
+#define GL_CONVOLUTION_HINT_SGIX 0x8316
+
+#define GLEW_SGIX_convolution_accuracy GLEW_GET_VAR(__GLEW_SGIX_convolution_accuracy)
+
+#endif /* GL_SGIX_convolution_accuracy */
+
+/* ------------------------- GL_SGIX_depth_texture ------------------------- */
+
+#ifndef GL_SGIX_depth_texture
+#define GL_SGIX_depth_texture 1
+
+#define GL_DEPTH_COMPONENT16_SGIX 0x81A5
+#define GL_DEPTH_COMPONENT24_SGIX 0x81A6
+#define GL_DEPTH_COMPONENT32_SGIX 0x81A7
+
+#define GLEW_SGIX_depth_texture GLEW_GET_VAR(__GLEW_SGIX_depth_texture)
+
+#endif /* GL_SGIX_depth_texture */
+
+/* -------------------------- GL_SGIX_flush_raster ------------------------- */
+
+#ifndef GL_SGIX_flush_raster
+#define GL_SGIX_flush_raster 1
+
+typedef void (GLAPIENTRY * PFNGLFLUSHRASTERSGIXPROC) (void);
+
+#define glFlushRasterSGIX GLEW_GET_FUN(__glewFlushRasterSGIX)
+
+#define GLEW_SGIX_flush_raster GLEW_GET_VAR(__GLEW_SGIX_flush_raster)
+
+#endif /* GL_SGIX_flush_raster */
+
+/* --------------------------- GL_SGIX_fog_offset -------------------------- */
+
+#ifndef GL_SGIX_fog_offset
+#define GL_SGIX_fog_offset 1
+
+#define GL_FOG_OFFSET_SGIX 0x8198
+#define GL_FOG_OFFSET_VALUE_SGIX 0x8199
+
+#define GLEW_SGIX_fog_offset GLEW_GET_VAR(__GLEW_SGIX_fog_offset)
+
+#endif /* GL_SGIX_fog_offset */
+
+/* -------------------------- GL_SGIX_fog_texture -------------------------- */
+
+#ifndef GL_SGIX_fog_texture
+#define GL_SGIX_fog_texture 1
+
+#define GL_FOG_PATCHY_FACTOR_SGIX 0
+#define GL_FRAGMENT_FOG_SGIX 0
+#define GL_TEXTURE_FOG_SGIX 0
+
+typedef void (GLAPIENTRY * PFNGLTEXTUREFOGSGIXPROC) (GLenum pname);
+
+#define glTextureFogSGIX GLEW_GET_FUN(__glewTextureFogSGIX)
+
+#define GLEW_SGIX_fog_texture GLEW_GET_VAR(__GLEW_SGIX_fog_texture)
+
+#endif /* GL_SGIX_fog_texture */
+
+/* ------------------- GL_SGIX_fragment_specular_lighting ------------------ */
+
+#ifndef GL_SGIX_fragment_specular_lighting
+#define GL_SGIX_fragment_specular_lighting 1
+
+typedef void (GLAPIENTRY * PFNGLFRAGMENTCOLORMATERIALSGIXPROC) (GLenum face, GLenum mode);
+typedef void (GLAPIENTRY * PFNGLFRAGMENTLIGHTMODELFSGIXPROC) (GLenum pname, GLfloat param);
+typedef void (GLAPIENTRY * PFNGLFRAGMENTLIGHTMODELFVSGIXPROC) (GLenum pname, GLfloat* params);
+typedef void (GLAPIENTRY * PFNGLFRAGMENTLIGHTMODELISGIXPROC) (GLenum pname, GLint param);
+typedef void (GLAPIENTRY * PFNGLFRAGMENTLIGHTMODELIVSGIXPROC) (GLenum pname, GLint* params);
+typedef void (GLAPIENTRY * PFNGLFRAGMENTLIGHTFSGIXPROC) (GLenum light, GLenum pname, GLfloat param);
+typedef void (GLAPIENTRY * PFNGLFRAGMENTLIGHTFVSGIXPROC) (GLenum light, GLenum pname, GLfloat* params);
+typedef void (GLAPIENTRY * PFNGLFRAGMENTLIGHTISGIXPROC) (GLenum light, GLenum pname, GLint param);
+typedef void (GLAPIENTRY * PFNGLFRAGMENTLIGHTIVSGIXPROC) (GLenum light, GLenum pname, GLint* params);
+typedef void (GLAPIENTRY * PFNGLFRAGMENTMATERIALFSGIXPROC) (GLenum face, GLenum pname, const GLfloat param);
+typedef void (GLAPIENTRY * PFNGLFRAGMENTMATERIALFVSGIXPROC) (GLenum face, GLenum pname, const GLfloat* params);
+typedef void (GLAPIENTRY * PFNGLFRAGMENTMATERIALISGIXPROC) (GLenum face, GLenum pname, const GLint param);
+typedef void (GLAPIENTRY * PFNGLFRAGMENTMATERIALIVSGIXPROC) (GLenum face, GLenum pname, const GLint* params);
+typedef void (GLAPIENTRY * PFNGLGETFRAGMENTLIGHTFVSGIXPROC) (GLenum light, GLenum value, GLfloat* data);
+typedef void (GLAPIENTRY * PFNGLGETFRAGMENTLIGHTIVSGIXPROC) (GLenum light, GLenum value, GLint* data);
+typedef void (GLAPIENTRY * PFNGLGETFRAGMENTMATERIALFVSGIXPROC) (GLenum face, GLenum pname, const GLfloat* data);
+typedef void (GLAPIENTRY * PFNGLGETFRAGMENTMATERIALIVSGIXPROC) (GLenum face, GLenum pname, const GLint* data);
+
+#define glFragmentColorMaterialSGIX GLEW_GET_FUN(__glewFragmentColorMaterialSGIX)
+#define glFragmentLightModelfSGIX GLEW_GET_FUN(__glewFragmentLightModelfSGIX)
+#define glFragmentLightModelfvSGIX GLEW_GET_FUN(__glewFragmentLightModelfvSGIX)
+#define glFragmentLightModeliSGIX GLEW_GET_FUN(__glewFragmentLightModeliSGIX)
+#define glFragmentLightModelivSGIX GLEW_GET_FUN(__glewFragmentLightModelivSGIX)
+#define glFragmentLightfSGIX GLEW_GET_FUN(__glewFragmentLightfSGIX)
+#define glFragmentLightfvSGIX GLEW_GET_FUN(__glewFragmentLightfvSGIX)
+#define glFragmentLightiSGIX GLEW_GET_FUN(__glewFragmentLightiSGIX)
+#define glFragmentLightivSGIX GLEW_GET_FUN(__glewFragmentLightivSGIX)
+#define glFragmentMaterialfSGIX GLEW_GET_FUN(__glewFragmentMaterialfSGIX)
+#define glFragmentMaterialfvSGIX GLEW_GET_FUN(__glewFragmentMaterialfvSGIX)
+#define glFragmentMaterialiSGIX GLEW_GET_FUN(__glewFragmentMaterialiSGIX)
+#define glFragmentMaterialivSGIX GLEW_GET_FUN(__glewFragmentMaterialivSGIX)
+#define glGetFragmentLightfvSGIX GLEW_GET_FUN(__glewGetFragmentLightfvSGIX)
+#define glGetFragmentLightivSGIX GLEW_GET_FUN(__glewGetFragmentLightivSGIX)
+#define glGetFragmentMaterialfvSGIX GLEW_GET_FUN(__glewGetFragmentMaterialfvSGIX)
+#define glGetFragmentMaterialivSGIX GLEW_GET_FUN(__glewGetFragmentMaterialivSGIX)
+
+#define GLEW_SGIX_fragment_specular_lighting GLEW_GET_VAR(__GLEW_SGIX_fragment_specular_lighting)
+
+#endif /* GL_SGIX_fragment_specular_lighting */
+
+/* --------------------------- GL_SGIX_framezoom --------------------------- */
+
+#ifndef GL_SGIX_framezoom
+#define GL_SGIX_framezoom 1
+
+typedef void (GLAPIENTRY * PFNGLFRAMEZOOMSGIXPROC) (GLint factor);
+
+#define glFrameZoomSGIX GLEW_GET_FUN(__glewFrameZoomSGIX)
+
+#define GLEW_SGIX_framezoom GLEW_GET_VAR(__GLEW_SGIX_framezoom)
+
+#endif /* GL_SGIX_framezoom */
+
+/* --------------------------- GL_SGIX_interlace --------------------------- */
+
+#ifndef GL_SGIX_interlace
+#define GL_SGIX_interlace 1
+
+#define GL_INTERLACE_SGIX 0x8094
+
+#define GLEW_SGIX_interlace GLEW_GET_VAR(__GLEW_SGIX_interlace)
+
+#endif /* GL_SGIX_interlace */
+
+/* ------------------------- GL_SGIX_ir_instrument1 ------------------------ */
+
+#ifndef GL_SGIX_ir_instrument1
+#define GL_SGIX_ir_instrument1 1
+
+#define GLEW_SGIX_ir_instrument1 GLEW_GET_VAR(__GLEW_SGIX_ir_instrument1)
+
+#endif /* GL_SGIX_ir_instrument1 */
+
+/* ------------------------- GL_SGIX_list_priority ------------------------- */
+
+#ifndef GL_SGIX_list_priority
+#define GL_SGIX_list_priority 1
+
+#define GLEW_SGIX_list_priority GLEW_GET_VAR(__GLEW_SGIX_list_priority)
+
+#endif /* GL_SGIX_list_priority */
+
+/* ------------------------- GL_SGIX_pixel_texture ------------------------- */
+
+#ifndef GL_SGIX_pixel_texture
+#define GL_SGIX_pixel_texture 1
+
+typedef void (GLAPIENTRY * PFNGLPIXELTEXGENSGIXPROC) (GLenum mode);
+
+#define glPixelTexGenSGIX GLEW_GET_FUN(__glewPixelTexGenSGIX)
+
+#define GLEW_SGIX_pixel_texture GLEW_GET_VAR(__GLEW_SGIX_pixel_texture)
+
+#endif /* GL_SGIX_pixel_texture */
+
+/* ----------------------- GL_SGIX_pixel_texture_bits ---------------------- */
+
+#ifndef GL_SGIX_pixel_texture_bits
+#define GL_SGIX_pixel_texture_bits 1
+
+#define GLEW_SGIX_pixel_texture_bits GLEW_GET_VAR(__GLEW_SGIX_pixel_texture_bits)
+
+#endif /* GL_SGIX_pixel_texture_bits */
+
+/* ------------------------ GL_SGIX_reference_plane ------------------------ */
+
+#ifndef GL_SGIX_reference_plane
+#define GL_SGIX_reference_plane 1
+
+typedef void (GLAPIENTRY * PFNGLREFERENCEPLANESGIXPROC) (const GLdouble* equation);
+
+#define glReferencePlaneSGIX GLEW_GET_FUN(__glewReferencePlaneSGIX)
+
+#define GLEW_SGIX_reference_plane GLEW_GET_VAR(__GLEW_SGIX_reference_plane)
+
+#endif /* GL_SGIX_reference_plane */
+
+/* ---------------------------- GL_SGIX_resample --------------------------- */
+
+#ifndef GL_SGIX_resample
+#define GL_SGIX_resample 1
+
+#define GL_PACK_RESAMPLE_SGIX 0x842E
+#define GL_UNPACK_RESAMPLE_SGIX 0x842F
+#define GL_RESAMPLE_DECIMATE_SGIX 0x8430
+#define GL_RESAMPLE_REPLICATE_SGIX 0x8433
+#define GL_RESAMPLE_ZERO_FILL_SGIX 0x8434
+
+#define GLEW_SGIX_resample GLEW_GET_VAR(__GLEW_SGIX_resample)
+
+#endif /* GL_SGIX_resample */
+
+/* ----------------------------- GL_SGIX_shadow ---------------------------- */
+
+#ifndef GL_SGIX_shadow
+#define GL_SGIX_shadow 1
+
+#define GL_TEXTURE_COMPARE_SGIX 0x819A
+#define GL_TEXTURE_COMPARE_OPERATOR_SGIX 0x819B
+#define GL_TEXTURE_LEQUAL_R_SGIX 0x819C
+#define GL_TEXTURE_GEQUAL_R_SGIX 0x819D
+
+#define GLEW_SGIX_shadow GLEW_GET_VAR(__GLEW_SGIX_shadow)
+
+#endif /* GL_SGIX_shadow */
+
+/* ------------------------- GL_SGIX_shadow_ambient ------------------------ */
+
+#ifndef GL_SGIX_shadow_ambient
+#define GL_SGIX_shadow_ambient 1
+
+#define GL_SHADOW_AMBIENT_SGIX 0x80BF
+
+#define GLEW_SGIX_shadow_ambient GLEW_GET_VAR(__GLEW_SGIX_shadow_ambient)
+
+#endif /* GL_SGIX_shadow_ambient */
+
+/* ----------------------------- GL_SGIX_sprite ---------------------------- */
+
+#ifndef GL_SGIX_sprite
+#define GL_SGIX_sprite 1
+
+typedef void (GLAPIENTRY * PFNGLSPRITEPARAMETERFSGIXPROC) (GLenum pname, GLfloat param);
+typedef void (GLAPIENTRY * PFNGLSPRITEPARAMETERFVSGIXPROC) (GLenum pname, GLfloat* params);
+typedef void (GLAPIENTRY * PFNGLSPRITEPARAMETERISGIXPROC) (GLenum pname, GLint param);
+typedef void (GLAPIENTRY * PFNGLSPRITEPARAMETERIVSGIXPROC) (GLenum pname, GLint* params);
+
+#define glSpriteParameterfSGIX GLEW_GET_FUN(__glewSpriteParameterfSGIX)
+#define glSpriteParameterfvSGIX GLEW_GET_FUN(__glewSpriteParameterfvSGIX)
+#define glSpriteParameteriSGIX GLEW_GET_FUN(__glewSpriteParameteriSGIX)
+#define glSpriteParameterivSGIX GLEW_GET_FUN(__glewSpriteParameterivSGIX)
+
+#define GLEW_SGIX_sprite GLEW_GET_VAR(__GLEW_SGIX_sprite)
+
+#endif /* GL_SGIX_sprite */
+
+/* ----------------------- GL_SGIX_tag_sample_buffer ----------------------- */
+
+#ifndef GL_SGIX_tag_sample_buffer
+#define GL_SGIX_tag_sample_buffer 1
+
+typedef void (GLAPIENTRY * PFNGLTAGSAMPLEBUFFERSGIXPROC) (void);
+
+#define glTagSampleBufferSGIX GLEW_GET_FUN(__glewTagSampleBufferSGIX)
+
+#define GLEW_SGIX_tag_sample_buffer GLEW_GET_VAR(__GLEW_SGIX_tag_sample_buffer)
+
+#endif /* GL_SGIX_tag_sample_buffer */
+
+/* ------------------------ GL_SGIX_texture_add_env ------------------------ */
+
+#ifndef GL_SGIX_texture_add_env
+#define GL_SGIX_texture_add_env 1
+
+#define GLEW_SGIX_texture_add_env GLEW_GET_VAR(__GLEW_SGIX_texture_add_env)
+
+#endif /* GL_SGIX_texture_add_env */
+
+/* -------------------- GL_SGIX_texture_coordinate_clamp ------------------- */
+
+#ifndef GL_SGIX_texture_coordinate_clamp
+#define GL_SGIX_texture_coordinate_clamp 1
+
+#define GL_TEXTURE_MAX_CLAMP_S_SGIX 0x8369
+#define GL_TEXTURE_MAX_CLAMP_T_SGIX 0x836A
+#define GL_TEXTURE_MAX_CLAMP_R_SGIX 0x836B
+
+#define GLEW_SGIX_texture_coordinate_clamp GLEW_GET_VAR(__GLEW_SGIX_texture_coordinate_clamp)
+
+#endif /* GL_SGIX_texture_coordinate_clamp */
+
+/* ------------------------ GL_SGIX_texture_lod_bias ----------------------- */
+
+#ifndef GL_SGIX_texture_lod_bias
+#define GL_SGIX_texture_lod_bias 1
+
+#define GLEW_SGIX_texture_lod_bias GLEW_GET_VAR(__GLEW_SGIX_texture_lod_bias)
+
+#endif /* GL_SGIX_texture_lod_bias */
+
+/* ---------------------- GL_SGIX_texture_multi_buffer --------------------- */
+
+#ifndef GL_SGIX_texture_multi_buffer
+#define GL_SGIX_texture_multi_buffer 1
+
+#define GL_TEXTURE_MULTI_BUFFER_HINT_SGIX 0x812E
+
+#define GLEW_SGIX_texture_multi_buffer GLEW_GET_VAR(__GLEW_SGIX_texture_multi_buffer)
+
+#endif /* GL_SGIX_texture_multi_buffer */
+
+/* ------------------------- GL_SGIX_texture_range ------------------------- */
+
+#ifndef GL_SGIX_texture_range
+#define GL_SGIX_texture_range 1
+
+#define GL_RGB_SIGNED_SGIX 0x85E0
+#define GL_RGBA_SIGNED_SGIX 0x85E1
+#define GL_ALPHA_SIGNED_SGIX 0x85E2
+#define GL_LUMINANCE_SIGNED_SGIX 0x85E3
+#define GL_INTENSITY_SIGNED_SGIX 0x85E4
+#define GL_LUMINANCE_ALPHA_SIGNED_SGIX 0x85E5
+#define GL_RGB16_SIGNED_SGIX 0x85E6
+#define GL_RGBA16_SIGNED_SGIX 0x85E7
+#define GL_ALPHA16_SIGNED_SGIX 0x85E8
+#define GL_LUMINANCE16_SIGNED_SGIX 0x85E9
+#define GL_INTENSITY16_SIGNED_SGIX 0x85EA
+#define GL_LUMINANCE16_ALPHA16_SIGNED_SGIX 0x85EB
+#define GL_RGB_EXTENDED_RANGE_SGIX 0x85EC
+#define GL_RGBA_EXTENDED_RANGE_SGIX 0x85ED
+#define GL_ALPHA_EXTENDED_RANGE_SGIX 0x85EE
+#define GL_LUMINANCE_EXTENDED_RANGE_SGIX 0x85EF
+#define GL_INTENSITY_EXTENDED_RANGE_SGIX 0x85F0
+#define GL_LUMINANCE_ALPHA_EXTENDED_RANGE_SGIX 0x85F1
+#define GL_RGB16_EXTENDED_RANGE_SGIX 0x85F2
+#define GL_RGBA16_EXTENDED_RANGE_SGIX 0x85F3
+#define GL_ALPHA16_EXTENDED_RANGE_SGIX 0x85F4
+#define GL_LUMINANCE16_EXTENDED_RANGE_SGIX 0x85F5
+#define GL_INTENSITY16_EXTENDED_RANGE_SGIX 0x85F6
+#define GL_LUMINANCE16_ALPHA16_EXTENDED_RANGE_SGIX 0x85F7
+#define GL_MIN_LUMINANCE_SGIS 0x85F8
+#define GL_MAX_LUMINANCE_SGIS 0x85F9
+#define GL_MIN_INTENSITY_SGIS 0x85FA
+#define GL_MAX_INTENSITY_SGIS 0x85FB
+
+#define GLEW_SGIX_texture_range GLEW_GET_VAR(__GLEW_SGIX_texture_range)
+
+#endif /* GL_SGIX_texture_range */
+
+/* ----------------------- GL_SGIX_texture_scale_bias ---------------------- */
+
+#ifndef GL_SGIX_texture_scale_bias
+#define GL_SGIX_texture_scale_bias 1
+
+#define GL_POST_TEXTURE_FILTER_BIAS_SGIX 0x8179
+#define GL_POST_TEXTURE_FILTER_SCALE_SGIX 0x817A
+#define GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX 0x817B
+#define GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX 0x817C
+
+#define GLEW_SGIX_texture_scale_bias GLEW_GET_VAR(__GLEW_SGIX_texture_scale_bias)
+
+#endif /* GL_SGIX_texture_scale_bias */
+
+/* ------------------------- GL_SGIX_vertex_preclip ------------------------ */
+
+#ifndef GL_SGIX_vertex_preclip
+#define GL_SGIX_vertex_preclip 1
+
+#define GL_VERTEX_PRECLIP_SGIX 0x83EE
+#define GL_VERTEX_PRECLIP_HINT_SGIX 0x83EF
+
+#define GLEW_SGIX_vertex_preclip GLEW_GET_VAR(__GLEW_SGIX_vertex_preclip)
+
+#endif /* GL_SGIX_vertex_preclip */
+
+/* ---------------------- GL_SGIX_vertex_preclip_hint ---------------------- */
+
+#ifndef GL_SGIX_vertex_preclip_hint
+#define GL_SGIX_vertex_preclip_hint 1
+
+#define GL_VERTEX_PRECLIP_SGIX 0x83EE
+#define GL_VERTEX_PRECLIP_HINT_SGIX 0x83EF
+
+#define GLEW_SGIX_vertex_preclip_hint GLEW_GET_VAR(__GLEW_SGIX_vertex_preclip_hint)
+
+#endif /* GL_SGIX_vertex_preclip_hint */
+
+/* ----------------------------- GL_SGIX_ycrcb ----------------------------- */
+
+#ifndef GL_SGIX_ycrcb
+#define GL_SGIX_ycrcb 1
+
+#define GLEW_SGIX_ycrcb GLEW_GET_VAR(__GLEW_SGIX_ycrcb)
+
+#endif /* GL_SGIX_ycrcb */
+
+/* -------------------------- GL_SGI_color_matrix -------------------------- */
+
+#ifndef GL_SGI_color_matrix
+#define GL_SGI_color_matrix 1
+
+#define GL_COLOR_MATRIX_SGI 0x80B1
+#define GL_COLOR_MATRIX_STACK_DEPTH_SGI 0x80B2
+#define GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI 0x80B3
+#define GL_POST_COLOR_MATRIX_RED_SCALE_SGI 0x80B4
+#define GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI 0x80B5
+#define GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI 0x80B6
+#define GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI 0x80B7
+#define GL_POST_COLOR_MATRIX_RED_BIAS_SGI 0x80B8
+#define GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI 0x80B9
+#define GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI 0x80BA
+#define GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI 0x80BB
+
+#define GLEW_SGI_color_matrix GLEW_GET_VAR(__GLEW_SGI_color_matrix)
+
+#endif /* GL_SGI_color_matrix */
+
+/* --------------------------- GL_SGI_color_table -------------------------- */
+
+#ifndef GL_SGI_color_table
+#define GL_SGI_color_table 1
+
+#define GL_COLOR_TABLE_SGI 0x80D0
+#define GL_POST_CONVOLUTION_COLOR_TABLE_SGI 0x80D1
+#define GL_POST_COLOR_MATRIX_COLOR_TABLE_SGI 0x80D2
+#define GL_PROXY_COLOR_TABLE_SGI 0x80D3
+#define GL_PROXY_POST_CONVOLUTION_COLOR_TABLE_SGI 0x80D4
+#define GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE_SGI 0x80D5
+#define GL_COLOR_TABLE_SCALE_SGI 0x80D6
+#define GL_COLOR_TABLE_BIAS_SGI 0x80D7
+#define GL_COLOR_TABLE_FORMAT_SGI 0x80D8
+#define GL_COLOR_TABLE_WIDTH_SGI 0x80D9
+#define GL_COLOR_TABLE_RED_SIZE_SGI 0x80DA
+#define GL_COLOR_TABLE_GREEN_SIZE_SGI 0x80DB
+#define GL_COLOR_TABLE_BLUE_SIZE_SGI 0x80DC
+#define GL_COLOR_TABLE_ALPHA_SIZE_SGI 0x80DD
+#define GL_COLOR_TABLE_LUMINANCE_SIZE_SGI 0x80DE
+#define GL_COLOR_TABLE_INTENSITY_SIZE_SGI 0x80DF
+
+typedef void (GLAPIENTRY * PFNGLCOLORTABLEPARAMETERFVSGIPROC) (GLenum target, GLenum pname, const GLfloat* params);
+typedef void (GLAPIENTRY * PFNGLCOLORTABLEPARAMETERIVSGIPROC) (GLenum target, GLenum pname, const GLint* params);
+typedef void (GLAPIENTRY * PFNGLCOLORTABLESGIPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const void *table);
+typedef void (GLAPIENTRY * PFNGLCOPYCOLORTABLESGIPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
+typedef void (GLAPIENTRY * PFNGLGETCOLORTABLEPARAMETERFVSGIPROC) (GLenum target, GLenum pname, GLfloat* params);
+typedef void (GLAPIENTRY * PFNGLGETCOLORTABLEPARAMETERIVSGIPROC) (GLenum target, GLenum pname, GLint* params);
+typedef void (GLAPIENTRY * PFNGLGETCOLORTABLESGIPROC) (GLenum target, GLenum format, GLenum type, void *table);
+
+#define glColorTableParameterfvSGI GLEW_GET_FUN(__glewColorTableParameterfvSGI)
+#define glColorTableParameterivSGI GLEW_GET_FUN(__glewColorTableParameterivSGI)
+#define glColorTableSGI GLEW_GET_FUN(__glewColorTableSGI)
+#define glCopyColorTableSGI GLEW_GET_FUN(__glewCopyColorTableSGI)
+#define glGetColorTableParameterfvSGI GLEW_GET_FUN(__glewGetColorTableParameterfvSGI)
+#define glGetColorTableParameterivSGI GLEW_GET_FUN(__glewGetColorTableParameterivSGI)
+#define glGetColorTableSGI GLEW_GET_FUN(__glewGetColorTableSGI)
+
+#define GLEW_SGI_color_table GLEW_GET_VAR(__GLEW_SGI_color_table)
+
+#endif /* GL_SGI_color_table */
+
+/* ----------------------- GL_SGI_texture_color_table ---------------------- */
+
+#ifndef GL_SGI_texture_color_table
+#define GL_SGI_texture_color_table 1
+
+#define GL_TEXTURE_COLOR_TABLE_SGI 0x80BC
+#define GL_PROXY_TEXTURE_COLOR_TABLE_SGI 0x80BD
+
+#define GLEW_SGI_texture_color_table GLEW_GET_VAR(__GLEW_SGI_texture_color_table)
+
+#endif /* GL_SGI_texture_color_table */
+
+/* ------------------------- GL_SUNX_constant_data ------------------------- */
+
+#ifndef GL_SUNX_constant_data
+#define GL_SUNX_constant_data 1
+
+#define GL_UNPACK_CONSTANT_DATA_SUNX 0x81D5
+#define GL_TEXTURE_CONSTANT_DATA_SUNX 0x81D6
+
+typedef void (GLAPIENTRY * PFNGLFINISHTEXTURESUNXPROC) (void);
+
+#define glFinishTextureSUNX GLEW_GET_FUN(__glewFinishTextureSUNX)
+
+#define GLEW_SUNX_constant_data GLEW_GET_VAR(__GLEW_SUNX_constant_data)
+
+#endif /* GL_SUNX_constant_data */
+
+/* -------------------- GL_SUN_convolution_border_modes -------------------- */
+
+#ifndef GL_SUN_convolution_border_modes
+#define GL_SUN_convolution_border_modes 1
+
+#define GL_WRAP_BORDER_SUN 0x81D4
+
+#define GLEW_SUN_convolution_border_modes GLEW_GET_VAR(__GLEW_SUN_convolution_border_modes)
+
+#endif /* GL_SUN_convolution_border_modes */
+
+/* -------------------------- GL_SUN_global_alpha -------------------------- */
+
+#ifndef GL_SUN_global_alpha
+#define GL_SUN_global_alpha 1
+
+#define GL_GLOBAL_ALPHA_SUN 0x81D9
+#define GL_GLOBAL_ALPHA_FACTOR_SUN 0x81DA
+
+typedef void (GLAPIENTRY * PFNGLGLOBALALPHAFACTORBSUNPROC) (GLbyte factor);
+typedef void (GLAPIENTRY * PFNGLGLOBALALPHAFACTORDSUNPROC) (GLdouble factor);
+typedef void (GLAPIENTRY * PFNGLGLOBALALPHAFACTORFSUNPROC) (GLfloat factor);
+typedef void (GLAPIENTRY * PFNGLGLOBALALPHAFACTORISUNPROC) (GLint factor);
+typedef void (GLAPIENTRY * PFNGLGLOBALALPHAFACTORSSUNPROC) (GLshort factor);
+typedef void (GLAPIENTRY * PFNGLGLOBALALPHAFACTORUBSUNPROC) (GLubyte factor);
+typedef void (GLAPIENTRY * PFNGLGLOBALALPHAFACTORUISUNPROC) (GLuint factor);
+typedef void (GLAPIENTRY * PFNGLGLOBALALPHAFACTORUSSUNPROC) (GLushort factor);
+
+#define glGlobalAlphaFactorbSUN GLEW_GET_FUN(__glewGlobalAlphaFactorbSUN)
+#define glGlobalAlphaFactordSUN GLEW_GET_FUN(__glewGlobalAlphaFactordSUN)
+#define glGlobalAlphaFactorfSUN GLEW_GET_FUN(__glewGlobalAlphaFactorfSUN)
+#define glGlobalAlphaFactoriSUN GLEW_GET_FUN(__glewGlobalAlphaFactoriSUN)
+#define glGlobalAlphaFactorsSUN GLEW_GET_FUN(__glewGlobalAlphaFactorsSUN)
+#define glGlobalAlphaFactorubSUN GLEW_GET_FUN(__glewGlobalAlphaFactorubSUN)
+#define glGlobalAlphaFactoruiSUN GLEW_GET_FUN(__glewGlobalAlphaFactoruiSUN)
+#define glGlobalAlphaFactorusSUN GLEW_GET_FUN(__glewGlobalAlphaFactorusSUN)
+
+#define GLEW_SUN_global_alpha GLEW_GET_VAR(__GLEW_SUN_global_alpha)
+
+#endif /* GL_SUN_global_alpha */
+
+/* --------------------------- GL_SUN_mesh_array --------------------------- */
+
+#ifndef GL_SUN_mesh_array
+#define GL_SUN_mesh_array 1
+
+#define GL_QUAD_MESH_SUN 0x8614
+#define GL_TRIANGLE_MESH_SUN 0x8615
+
+#define GLEW_SUN_mesh_array GLEW_GET_VAR(__GLEW_SUN_mesh_array)
+
+#endif /* GL_SUN_mesh_array */
+
+/* ------------------------ GL_SUN_read_video_pixels ----------------------- */
+
+#ifndef GL_SUN_read_video_pixels
+#define GL_SUN_read_video_pixels 1
+
+typedef void (GLAPIENTRY * PFNGLREADVIDEOPIXELSSUNPROC) (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void* pixels);
+
+#define glReadVideoPixelsSUN GLEW_GET_FUN(__glewReadVideoPixelsSUN)
+
+#define GLEW_SUN_read_video_pixels GLEW_GET_VAR(__GLEW_SUN_read_video_pixels)
+
+#endif /* GL_SUN_read_video_pixels */
+
+/* --------------------------- GL_SUN_slice_accum -------------------------- */
+
+#ifndef GL_SUN_slice_accum
+#define GL_SUN_slice_accum 1
+
+#define GL_SLICE_ACCUM_SUN 0x85CC
+
+#define GLEW_SUN_slice_accum GLEW_GET_VAR(__GLEW_SUN_slice_accum)
+
+#endif /* GL_SUN_slice_accum */
+
+/* -------------------------- GL_SUN_triangle_list ------------------------- */
+
+#ifndef GL_SUN_triangle_list
+#define GL_SUN_triangle_list 1
+
+#define GL_RESTART_SUN 0x01
+#define GL_REPLACE_MIDDLE_SUN 0x02
+#define GL_REPLACE_OLDEST_SUN 0x03
+#define GL_TRIANGLE_LIST_SUN 0x81D7
+#define GL_REPLACEMENT_CODE_SUN 0x81D8
+#define GL_REPLACEMENT_CODE_ARRAY_SUN 0x85C0
+#define GL_REPLACEMENT_CODE_ARRAY_TYPE_SUN 0x85C1
+#define GL_REPLACEMENT_CODE_ARRAY_STRIDE_SUN 0x85C2
+#define GL_REPLACEMENT_CODE_ARRAY_POINTER_SUN 0x85C3
+#define GL_R1UI_V3F_SUN 0x85C4
+#define GL_R1UI_C4UB_V3F_SUN 0x85C5
+#define GL_R1UI_C3F_V3F_SUN 0x85C6
+#define GL_R1UI_N3F_V3F_SUN 0x85C7
+#define GL_R1UI_C4F_N3F_V3F_SUN 0x85C8
+#define GL_R1UI_T2F_V3F_SUN 0x85C9
+#define GL_R1UI_T2F_N3F_V3F_SUN 0x85CA
+#define GL_R1UI_T2F_C4F_N3F_V3F_SUN 0x85CB
+
+typedef void (GLAPIENTRY * PFNGLREPLACEMENTCODEPOINTERSUNPROC) (GLenum type, GLsizei stride, const void *pointer);
+typedef void (GLAPIENTRY * PFNGLREPLACEMENTCODEUBSUNPROC) (GLubyte code);
+typedef void (GLAPIENTRY * PFNGLREPLACEMENTCODEUBVSUNPROC) (const GLubyte* code);
+typedef void (GLAPIENTRY * PFNGLREPLACEMENTCODEUISUNPROC) (GLuint code);
+typedef void (GLAPIENTRY * PFNGLREPLACEMENTCODEUIVSUNPROC) (const GLuint* code);
+typedef void (GLAPIENTRY * PFNGLREPLACEMENTCODEUSSUNPROC) (GLushort code);
+typedef void (GLAPIENTRY * PFNGLREPLACEMENTCODEUSVSUNPROC) (const GLushort* code);
+
+#define glReplacementCodePointerSUN GLEW_GET_FUN(__glewReplacementCodePointerSUN)
+#define glReplacementCodeubSUN GLEW_GET_FUN(__glewReplacementCodeubSUN)
+#define glReplacementCodeubvSUN GLEW_GET_FUN(__glewReplacementCodeubvSUN)
+#define glReplacementCodeuiSUN GLEW_GET_FUN(__glewReplacementCodeuiSUN)
+#define glReplacementCodeuivSUN GLEW_GET_FUN(__glewReplacementCodeuivSUN)
+#define glReplacementCodeusSUN GLEW_GET_FUN(__glewReplacementCodeusSUN)
+#define glReplacementCodeusvSUN GLEW_GET_FUN(__glewReplacementCodeusvSUN)
+
+#define GLEW_SUN_triangle_list GLEW_GET_VAR(__GLEW_SUN_triangle_list)
+
+#endif /* GL_SUN_triangle_list */
+
+/* ----------------------------- GL_SUN_vertex ----------------------------- */
+
+#ifndef GL_SUN_vertex
+#define GL_SUN_vertex 1
+
+typedef void (GLAPIENTRY * PFNGLCOLOR3FVERTEX3FSUNPROC) (GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z);
+typedef void (GLAPIENTRY * PFNGLCOLOR3FVERTEX3FVSUNPROC) (const GLfloat* c, const GLfloat *v);
+typedef void (GLAPIENTRY * PFNGLCOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
+typedef void (GLAPIENTRY * PFNGLCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLfloat* c, const GLfloat *n, const GLfloat *v);
+typedef void (GLAPIENTRY * PFNGLCOLOR4UBVERTEX2FSUNPROC) (GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y);
+typedef void (GLAPIENTRY * PFNGLCOLOR4UBVERTEX2FVSUNPROC) (const GLubyte* c, const GLfloat *v);
+typedef void (GLAPIENTRY * PFNGLCOLOR4UBVERTEX3FSUNPROC) (GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z);
+typedef void (GLAPIENTRY * PFNGLCOLOR4UBVERTEX3FVSUNPROC) (const GLubyte* c, const GLfloat *v);
+typedef void (GLAPIENTRY * PFNGLNORMAL3FVERTEX3FSUNPROC) (GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
+typedef void (GLAPIENTRY * PFNGLNORMAL3FVERTEX3FVSUNPROC) (const GLfloat* n, const GLfloat *v);
+typedef void (GLAPIENTRY * PFNGLREPLACEMENTCODEUICOLOR3FVERTEX3FSUNPROC) (GLuint rc, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z);
+typedef void (GLAPIENTRY * PFNGLREPLACEMENTCODEUICOLOR3FVERTEX3FVSUNPROC) (const GLuint* rc, const GLfloat *c, const GLfloat *v);
+typedef void (GLAPIENTRY * PFNGLREPLACEMENTCODEUICOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
+typedef void (GLAPIENTRY * PFNGLREPLACEMENTCODEUICOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLuint* rc, const GLfloat *c, const GLfloat *n, const GLfloat *v);
+typedef void (GLAPIENTRY * PFNGLREPLACEMENTCODEUICOLOR4UBVERTEX3FSUNPROC) (GLuint rc, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z);
+typedef void (GLAPIENTRY * PFNGLREPLACEMENTCODEUICOLOR4UBVERTEX3FVSUNPROC) (const GLuint* rc, const GLubyte *c, const GLfloat *v);
+typedef void (GLAPIENTRY * PFNGLREPLACEMENTCODEUINORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
+typedef void (GLAPIENTRY * PFNGLREPLACEMENTCODEUINORMAL3FVERTEX3FVSUNPROC) (const GLuint* rc, const GLfloat *n, const GLfloat *v);
+typedef void (GLAPIENTRY * PFNGLREPLACEMENTCODEUITEXCOORD2FCOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
+typedef void (GLAPIENTRY * PFNGLREPLACEMENTCODEUITEXCOORD2FCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLuint* rc, const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v);
+typedef void (GLAPIENTRY * PFNGLREPLACEMENTCODEUITEXCOORD2FNORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
+typedef void (GLAPIENTRY * PFNGLREPLACEMENTCODEUITEXCOORD2FNORMAL3FVERTEX3FVSUNPROC) (const GLuint* rc, const GLfloat *tc, const GLfloat *n, const GLfloat *v);
+typedef void (GLAPIENTRY * PFNGLREPLACEMENTCODEUITEXCOORD2FVERTEX3FSUNPROC) (GLuint rc, GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z);
+typedef void (GLAPIENTRY * PFNGLREPLACEMENTCODEUITEXCOORD2FVERTEX3FVSUNPROC) (const GLuint* rc, const GLfloat *tc, const GLfloat *v);
+typedef void (GLAPIENTRY * PFNGLREPLACEMENTCODEUIVERTEX3FSUNPROC) (GLuint rc, GLfloat x, GLfloat y, GLfloat z);
+typedef void (GLAPIENTRY * PFNGLREPLACEMENTCODEUIVERTEX3FVSUNPROC) (const GLuint* rc, const GLfloat *v);
+typedef void (GLAPIENTRY * PFNGLTEXCOORD2FCOLOR3FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z);
+typedef void (GLAPIENTRY * PFNGLTEXCOORD2FCOLOR3FVERTEX3FVSUNPROC) (const GLfloat* tc, const GLfloat *c, const GLfloat *v);
+typedef void (GLAPIENTRY * PFNGLTEXCOORD2FCOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
+typedef void (GLAPIENTRY * PFNGLTEXCOORD2FCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLfloat* tc, const GLfloat *c, const GLfloat *n, const GLfloat *v);
+typedef void (GLAPIENTRY * PFNGLTEXCOORD2FCOLOR4UBVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z);
+typedef void (GLAPIENTRY * PFNGLTEXCOORD2FCOLOR4UBVERTEX3FVSUNPROC) (const GLfloat* tc, const GLubyte *c, const GLfloat *v);
+typedef void (GLAPIENTRY * PFNGLTEXCOORD2FNORMAL3FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
+typedef void (GLAPIENTRY * PFNGLTEXCOORD2FNORMAL3FVERTEX3FVSUNPROC) (const GLfloat* tc, const GLfloat *n, const GLfloat *v);
+typedef void (GLAPIENTRY * PFNGLTEXCOORD2FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z);
+typedef void (GLAPIENTRY * PFNGLTEXCOORD2FVERTEX3FVSUNPROC) (const GLfloat* tc, const GLfloat *v);
+typedef void (GLAPIENTRY * PFNGLTEXCOORD4FCOLOR4FNORMAL3FVERTEX4FSUNPROC) (GLfloat s, GLfloat t, GLfloat p, GLfloat q, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+typedef void (GLAPIENTRY * PFNGLTEXCOORD4FCOLOR4FNORMAL3FVERTEX4FVSUNPROC) (const GLfloat* tc, const GLfloat *c, const GLfloat *n, const GLfloat *v);
+typedef void (GLAPIENTRY * PFNGLTEXCOORD4FVERTEX4FSUNPROC) (GLfloat s, GLfloat t, GLfloat p, GLfloat q, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+typedef void (GLAPIENTRY * PFNGLTEXCOORD4FVERTEX4FVSUNPROC) (const GLfloat* tc, const GLfloat *v);
+
+#define glColor3fVertex3fSUN GLEW_GET_FUN(__glewColor3fVertex3fSUN)
+#define glColor3fVertex3fvSUN GLEW_GET_FUN(__glewColor3fVertex3fvSUN)
+#define glColor4fNormal3fVertex3fSUN GLEW_GET_FUN(__glewColor4fNormal3fVertex3fSUN)
+#define glColor4fNormal3fVertex3fvSUN GLEW_GET_FUN(__glewColor4fNormal3fVertex3fvSUN)
+#define glColor4ubVertex2fSUN GLEW_GET_FUN(__glewColor4ubVertex2fSUN)
+#define glColor4ubVertex2fvSUN GLEW_GET_FUN(__glewColor4ubVertex2fvSUN)
+#define glColor4ubVertex3fSUN GLEW_GET_FUN(__glewColor4ubVertex3fSUN)
+#define glColor4ubVertex3fvSUN GLEW_GET_FUN(__glewColor4ubVertex3fvSUN)
+#define glNormal3fVertex3fSUN GLEW_GET_FUN(__glewNormal3fVertex3fSUN)
+#define glNormal3fVertex3fvSUN GLEW_GET_FUN(__glewNormal3fVertex3fvSUN)
+#define glReplacementCodeuiColor3fVertex3fSUN GLEW_GET_FUN(__glewReplacementCodeuiColor3fVertex3fSUN)
+#define glReplacementCodeuiColor3fVertex3fvSUN GLEW_GET_FUN(__glewReplacementCodeuiColor3fVertex3fvSUN)
+#define glReplacementCodeuiColor4fNormal3fVertex3fSUN GLEW_GET_FUN(__glewReplacementCodeuiColor4fNormal3fVertex3fSUN)
+#define glReplacementCodeuiColor4fNormal3fVertex3fvSUN GLEW_GET_FUN(__glewReplacementCodeuiColor4fNormal3fVertex3fvSUN)
+#define glReplacementCodeuiColor4ubVertex3fSUN GLEW_GET_FUN(__glewReplacementCodeuiColor4ubVertex3fSUN)
+#define glReplacementCodeuiColor4ubVertex3fvSUN GLEW_GET_FUN(__glewReplacementCodeuiColor4ubVertex3fvSUN)
+#define glReplacementCodeuiNormal3fVertex3fSUN GLEW_GET_FUN(__glewReplacementCodeuiNormal3fVertex3fSUN)
+#define glReplacementCodeuiNormal3fVertex3fvSUN GLEW_GET_FUN(__glewReplacementCodeuiNormal3fVertex3fvSUN)
+#define glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN GLEW_GET_FUN(__glewReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN)
+#define glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN GLEW_GET_FUN(__glewReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN)
+#define glReplacementCodeuiTexCoord2fNormal3fVertex3fSUN GLEW_GET_FUN(__glewReplacementCodeuiTexCoord2fNormal3fVertex3fSUN)
+#define glReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN GLEW_GET_FUN(__glewReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN)
+#define glReplacementCodeuiTexCoord2fVertex3fSUN GLEW_GET_FUN(__glewReplacementCodeuiTexCoord2fVertex3fSUN)
+#define glReplacementCodeuiTexCoord2fVertex3fvSUN GLEW_GET_FUN(__glewReplacementCodeuiTexCoord2fVertex3fvSUN)
+#define glReplacementCodeuiVertex3fSUN GLEW_GET_FUN(__glewReplacementCodeuiVertex3fSUN)
+#define glReplacementCodeuiVertex3fvSUN GLEW_GET_FUN(__glewReplacementCodeuiVertex3fvSUN)
+#define glTexCoord2fColor3fVertex3fSUN GLEW_GET_FUN(__glewTexCoord2fColor3fVertex3fSUN)
+#define glTexCoord2fColor3fVertex3fvSUN GLEW_GET_FUN(__glewTexCoord2fColor3fVertex3fvSUN)
+#define glTexCoord2fColor4fNormal3fVertex3fSUN GLEW_GET_FUN(__glewTexCoord2fColor4fNormal3fVertex3fSUN)
+#define glTexCoord2fColor4fNormal3fVertex3fvSUN GLEW_GET_FUN(__glewTexCoord2fColor4fNormal3fVertex3fvSUN)
+#define glTexCoord2fColor4ubVertex3fSUN GLEW_GET_FUN(__glewTexCoord2fColor4ubVertex3fSUN)
+#define glTexCoord2fColor4ubVertex3fvSUN GLEW_GET_FUN(__glewTexCoord2fColor4ubVertex3fvSUN)
+#define glTexCoord2fNormal3fVertex3fSUN GLEW_GET_FUN(__glewTexCoord2fNormal3fVertex3fSUN)
+#define glTexCoord2fNormal3fVertex3fvSUN GLEW_GET_FUN(__glewTexCoord2fNormal3fVertex3fvSUN)
+#define glTexCoord2fVertex3fSUN GLEW_GET_FUN(__glewTexCoord2fVertex3fSUN)
+#define glTexCoord2fVertex3fvSUN GLEW_GET_FUN(__glewTexCoord2fVertex3fvSUN)
+#define glTexCoord4fColor4fNormal3fVertex4fSUN GLEW_GET_FUN(__glewTexCoord4fColor4fNormal3fVertex4fSUN)
+#define glTexCoord4fColor4fNormal3fVertex4fvSUN GLEW_GET_FUN(__glewTexCoord4fColor4fNormal3fVertex4fvSUN)
+#define glTexCoord4fVertex4fSUN GLEW_GET_FUN(__glewTexCoord4fVertex4fSUN)
+#define glTexCoord4fVertex4fvSUN GLEW_GET_FUN(__glewTexCoord4fVertex4fvSUN)
+
+#define GLEW_SUN_vertex GLEW_GET_VAR(__GLEW_SUN_vertex)
+
+#endif /* GL_SUN_vertex */
+
+/* -------------------------- GL_WIN_phong_shading ------------------------- */
+
+#ifndef GL_WIN_phong_shading
+#define GL_WIN_phong_shading 1
+
+#define GL_PHONG_WIN 0x80EA
+#define GL_PHONG_HINT_WIN 0x80EB
+
+#define GLEW_WIN_phong_shading GLEW_GET_VAR(__GLEW_WIN_phong_shading)
+
+#endif /* GL_WIN_phong_shading */
+
+/* -------------------------- GL_WIN_specular_fog -------------------------- */
+
+#ifndef GL_WIN_specular_fog
+#define GL_WIN_specular_fog 1
+
+#define GL_FOG_SPECULAR_TEXTURE_WIN 0x80EC
+
+#define GLEW_WIN_specular_fog GLEW_GET_VAR(__GLEW_WIN_specular_fog)
+
+#endif /* GL_WIN_specular_fog */
+
+/* ---------------------------- GL_WIN_swap_hint --------------------------- */
+
+#ifndef GL_WIN_swap_hint
+#define GL_WIN_swap_hint 1
+
+typedef void (GLAPIENTRY * PFNGLADDSWAPHINTRECTWINPROC) (GLint x, GLint y, GLsizei width, GLsizei height);
+
+#define glAddSwapHintRectWIN GLEW_GET_FUN(__glewAddSwapHintRectWIN)
+
+#define GLEW_WIN_swap_hint GLEW_GET_VAR(__GLEW_WIN_swap_hint)
+
+#endif /* GL_WIN_swap_hint */
+
+/* ------------------------------------------------------------------------- */
+
+#if defined(GLEW_MX) && defined(_WIN32)
+#define GLEW_FUN_EXPORT
+#else
+#define GLEW_FUN_EXPORT GLEWAPI
+#endif /* GLEW_MX */
+
+#if defined(GLEW_MX)
+#define GLEW_VAR_EXPORT
+#else
+#define GLEW_VAR_EXPORT GLEWAPI
+#endif /* GLEW_MX */
+
+#if defined(GLEW_MX) && defined(_WIN32)
+struct GLEWContextStruct
+{
+#endif /* GLEW_MX */
+
+GLEW_FUN_EXPORT PFNGLCOPYTEXSUBIMAGE3DPROC __glewCopyTexSubImage3D;
+GLEW_FUN_EXPORT PFNGLDRAWRANGEELEMENTSPROC __glewDrawRangeElements;
+GLEW_FUN_EXPORT PFNGLTEXIMAGE3DPROC __glewTexImage3D;
+GLEW_FUN_EXPORT PFNGLTEXSUBIMAGE3DPROC __glewTexSubImage3D;
+
+GLEW_FUN_EXPORT PFNGLACTIVETEXTUREPROC __glewActiveTexture;
+GLEW_FUN_EXPORT PFNGLCLIENTACTIVETEXTUREPROC __glewClientActiveTexture;
+GLEW_FUN_EXPORT PFNGLCOMPRESSEDTEXIMAGE1DPROC __glewCompressedTexImage1D;
+GLEW_FUN_EXPORT PFNGLCOMPRESSEDTEXIMAGE2DPROC __glewCompressedTexImage2D;
+GLEW_FUN_EXPORT PFNGLCOMPRESSEDTEXIMAGE3DPROC __glewCompressedTexImage3D;
+GLEW_FUN_EXPORT PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC __glewCompressedTexSubImage1D;
+GLEW_FUN_EXPORT PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC __glewCompressedTexSubImage2D;
+GLEW_FUN_EXPORT PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC __glewCompressedTexSubImage3D;
+GLEW_FUN_EXPORT PFNGLGETCOMPRESSEDTEXIMAGEPROC __glewGetCompressedTexImage;
+GLEW_FUN_EXPORT PFNGLLOADTRANSPOSEMATRIXDPROC __glewLoadTransposeMatrixd;
+GLEW_FUN_EXPORT PFNGLLOADTRANSPOSEMATRIXFPROC __glewLoadTransposeMatrixf;
+GLEW_FUN_EXPORT PFNGLMULTTRANSPOSEMATRIXDPROC __glewMultTransposeMatrixd;
+GLEW_FUN_EXPORT PFNGLMULTTRANSPOSEMATRIXFPROC __glewMultTransposeMatrixf;
+GLEW_FUN_EXPORT PFNGLMULTITEXCOORD1DPROC __glewMultiTexCoord1d;
+GLEW_FUN_EXPORT PFNGLMULTITEXCOORD1DVPROC __glewMultiTexCoord1dv;
+GLEW_FUN_EXPORT PFNGLMULTITEXCOORD1FPROC __glewMultiTexCoord1f;
+GLEW_FUN_EXPORT PFNGLMULTITEXCOORD1FVPROC __glewMultiTexCoord1fv;
+GLEW_FUN_EXPORT PFNGLMULTITEXCOORD1IPROC __glewMultiTexCoord1i;
+GLEW_FUN_EXPORT PFNGLMULTITEXCOORD1IVPROC __glewMultiTexCoord1iv;
+GLEW_FUN_EXPORT PFNGLMULTITEXCOORD1SPROC __glewMultiTexCoord1s;
+GLEW_FUN_EXPORT PFNGLMULTITEXCOORD1SVPROC __glewMultiTexCoord1sv;
+GLEW_FUN_EXPORT PFNGLMULTITEXCOORD2DPROC __glewMultiTexCoord2d;
+GLEW_FUN_EXPORT PFNGLMULTITEXCOORD2DVPROC __glewMultiTexCoord2dv;
+GLEW_FUN_EXPORT PFNGLMULTITEXCOORD2FPROC __glewMultiTexCoord2f;
+GLEW_FUN_EXPORT PFNGLMULTITEXCOORD2FVPROC __glewMultiTexCoord2fv;
+GLEW_FUN_EXPORT PFNGLMULTITEXCOORD2IPROC __glewMultiTexCoord2i;
+GLEW_FUN_EXPORT PFNGLMULTITEXCOORD2IVPROC __glewMultiTexCoord2iv;
+GLEW_FUN_EXPORT PFNGLMULTITEXCOORD2SPROC __glewMultiTexCoord2s;
+GLEW_FUN_EXPORT PFNGLMULTITEXCOORD2SVPROC __glewMultiTexCoord2sv;
+GLEW_FUN_EXPORT PFNGLMULTITEXCOORD3DPROC __glewMultiTexCoord3d;
+GLEW_FUN_EXPORT PFNGLMULTITEXCOORD3DVPROC __glewMultiTexCoord3dv;
+GLEW_FUN_EXPORT PFNGLMULTITEXCOORD3FPROC __glewMultiTexCoord3f;
+GLEW_FUN_EXPORT PFNGLMULTITEXCOORD3FVPROC __glewMultiTexCoord3fv;
+GLEW_FUN_EXPORT PFNGLMULTITEXCOORD3IPROC __glewMultiTexCoord3i;
+GLEW_FUN_EXPORT PFNGLMULTITEXCOORD3IVPROC __glewMultiTexCoord3iv;
+GLEW_FUN_EXPORT PFNGLMULTITEXCOORD3SPROC __glewMultiTexCoord3s;
+GLEW_FUN_EXPORT PFNGLMULTITEXCOORD3SVPROC __glewMultiTexCoord3sv;
+GLEW_FUN_EXPORT PFNGLMULTITEXCOORD4DPROC __glewMultiTexCoord4d;
+GLEW_FUN_EXPORT PFNGLMULTITEXCOORD4DVPROC __glewMultiTexCoord4dv;
+GLEW_FUN_EXPORT PFNGLMULTITEXCOORD4FPROC __glewMultiTexCoord4f;
+GLEW_FUN_EXPORT PFNGLMULTITEXCOORD4FVPROC __glewMultiTexCoord4fv;
+GLEW_FUN_EXPORT PFNGLMULTITEXCOORD4IPROC __glewMultiTexCoord4i;
+GLEW_FUN_EXPORT PFNGLMULTITEXCOORD4IVPROC __glewMultiTexCoord4iv;
+GLEW_FUN_EXPORT PFNGLMULTITEXCOORD4SPROC __glewMultiTexCoord4s;
+GLEW_FUN_EXPORT PFNGLMULTITEXCOORD4SVPROC __glewMultiTexCoord4sv;
+GLEW_FUN_EXPORT PFNGLSAMPLECOVERAGEPROC __glewSampleCoverage;
+
+GLEW_FUN_EXPORT PFNGLBLENDCOLORPROC __glewBlendColor;
+GLEW_FUN_EXPORT PFNGLBLENDEQUATIONPROC __glewBlendEquation;
+GLEW_FUN_EXPORT PFNGLBLENDFUNCSEPARATEPROC __glewBlendFuncSeparate;
+GLEW_FUN_EXPORT PFNGLFOGCOORDPOINTERPROC __glewFogCoordPointer;
+GLEW_FUN_EXPORT PFNGLFOGCOORDDPROC __glewFogCoordd;
+GLEW_FUN_EXPORT PFNGLFOGCOORDDVPROC __glewFogCoorddv;
+GLEW_FUN_EXPORT PFNGLFOGCOORDFPROC __glewFogCoordf;
+GLEW_FUN_EXPORT PFNGLFOGCOORDFVPROC __glewFogCoordfv;
+GLEW_FUN_EXPORT PFNGLMULTIDRAWARRAYSPROC __glewMultiDrawArrays;
+GLEW_FUN_EXPORT PFNGLMULTIDRAWELEMENTSPROC __glewMultiDrawElements;
+GLEW_FUN_EXPORT PFNGLPOINTPARAMETERFPROC __glewPointParameterf;
+GLEW_FUN_EXPORT PFNGLPOINTPARAMETERFVPROC __glewPointParameterfv;
+GLEW_FUN_EXPORT PFNGLPOINTPARAMETERIPROC __glewPointParameteri;
+GLEW_FUN_EXPORT PFNGLPOINTPARAMETERIVPROC __glewPointParameteriv;
+GLEW_FUN_EXPORT PFNGLSECONDARYCOLOR3BPROC __glewSecondaryColor3b;
+GLEW_FUN_EXPORT PFNGLSECONDARYCOLOR3BVPROC __glewSecondaryColor3bv;
+GLEW_FUN_EXPORT PFNGLSECONDARYCOLOR3DPROC __glewSecondaryColor3d;
+GLEW_FUN_EXPORT PFNGLSECONDARYCOLOR3DVPROC __glewSecondaryColor3dv;
+GLEW_FUN_EXPORT PFNGLSECONDARYCOLOR3FPROC __glewSecondaryColor3f;
+GLEW_FUN_EXPORT PFNGLSECONDARYCOLOR3FVPROC __glewSecondaryColor3fv;
+GLEW_FUN_EXPORT PFNGLSECONDARYCOLOR3IPROC __glewSecondaryColor3i;
+GLEW_FUN_EXPORT PFNGLSECONDARYCOLOR3IVPROC __glewSecondaryColor3iv;
+GLEW_FUN_EXPORT PFNGLSECONDARYCOLOR3SPROC __glewSecondaryColor3s;
+GLEW_FUN_EXPORT PFNGLSECONDARYCOLOR3SVPROC __glewSecondaryColor3sv;
+GLEW_FUN_EXPORT PFNGLSECONDARYCOLOR3UBPROC __glewSecondaryColor3ub;
+GLEW_FUN_EXPORT PFNGLSECONDARYCOLOR3UBVPROC __glewSecondaryColor3ubv;
+GLEW_FUN_EXPORT PFNGLSECONDARYCOLOR3UIPROC __glewSecondaryColor3ui;
+GLEW_FUN_EXPORT PFNGLSECONDARYCOLOR3UIVPROC __glewSecondaryColor3uiv;
+GLEW_FUN_EXPORT PFNGLSECONDARYCOLOR3USPROC __glewSecondaryColor3us;
+GLEW_FUN_EXPORT PFNGLSECONDARYCOLOR3USVPROC __glewSecondaryColor3usv;
+GLEW_FUN_EXPORT PFNGLSECONDARYCOLORPOINTERPROC __glewSecondaryColorPointer;
+GLEW_FUN_EXPORT PFNGLWINDOWPOS2DPROC __glewWindowPos2d;
+GLEW_FUN_EXPORT PFNGLWINDOWPOS2DVPROC __glewWindowPos2dv;
+GLEW_FUN_EXPORT PFNGLWINDOWPOS2FPROC __glewWindowPos2f;
+GLEW_FUN_EXPORT PFNGLWINDOWPOS2FVPROC __glewWindowPos2fv;
+GLEW_FUN_EXPORT PFNGLWINDOWPOS2IPROC __glewWindowPos2i;
+GLEW_FUN_EXPORT PFNGLWINDOWPOS2IVPROC __glewWindowPos2iv;
+GLEW_FUN_EXPORT PFNGLWINDOWPOS2SPROC __glewWindowPos2s;
+GLEW_FUN_EXPORT PFNGLWINDOWPOS2SVPROC __glewWindowPos2sv;
+GLEW_FUN_EXPORT PFNGLWINDOWPOS3DPROC __glewWindowPos3d;
+GLEW_FUN_EXPORT PFNGLWINDOWPOS3DVPROC __glewWindowPos3dv;
+GLEW_FUN_EXPORT PFNGLWINDOWPOS3FPROC __glewWindowPos3f;
+GLEW_FUN_EXPORT PFNGLWINDOWPOS3FVPROC __glewWindowPos3fv;
+GLEW_FUN_EXPORT PFNGLWINDOWPOS3IPROC __glewWindowPos3i;
+GLEW_FUN_EXPORT PFNGLWINDOWPOS3IVPROC __glewWindowPos3iv;
+GLEW_FUN_EXPORT PFNGLWINDOWPOS3SPROC __glewWindowPos3s;
+GLEW_FUN_EXPORT PFNGLWINDOWPOS3SVPROC __glewWindowPos3sv;
+
+GLEW_FUN_EXPORT PFNGLBEGINQUERYPROC __glewBeginQuery;
+GLEW_FUN_EXPORT PFNGLBINDBUFFERPROC __glewBindBuffer;
+GLEW_FUN_EXPORT PFNGLBUFFERDATAPROC __glewBufferData;
+GLEW_FUN_EXPORT PFNGLBUFFERSUBDATAPROC __glewBufferSubData;
+GLEW_FUN_EXPORT PFNGLDELETEBUFFERSPROC __glewDeleteBuffers;
+GLEW_FUN_EXPORT PFNGLDELETEQUERIESPROC __glewDeleteQueries;
+GLEW_FUN_EXPORT PFNGLENDQUERYPROC __glewEndQuery;
+GLEW_FUN_EXPORT PFNGLGENBUFFERSPROC __glewGenBuffers;
+GLEW_FUN_EXPORT PFNGLGENQUERIESPROC __glewGenQueries;
+GLEW_FUN_EXPORT PFNGLGETBUFFERPARAMETERIVPROC __glewGetBufferParameteriv;
+GLEW_FUN_EXPORT PFNGLGETBUFFERPOINTERVPROC __glewGetBufferPointerv;
+GLEW_FUN_EXPORT PFNGLGETBUFFERSUBDATAPROC __glewGetBufferSubData;
+GLEW_FUN_EXPORT PFNGLGETQUERYOBJECTIVPROC __glewGetQueryObjectiv;
+GLEW_FUN_EXPORT PFNGLGETQUERYOBJECTUIVPROC __glewGetQueryObjectuiv;
+GLEW_FUN_EXPORT PFNGLGETQUERYIVPROC __glewGetQueryiv;
+GLEW_FUN_EXPORT PFNGLISBUFFERPROC __glewIsBuffer;
+GLEW_FUN_EXPORT PFNGLISQUERYPROC __glewIsQuery;
+GLEW_FUN_EXPORT PFNGLMAPBUFFERPROC __glewMapBuffer;
+GLEW_FUN_EXPORT PFNGLUNMAPBUFFERPROC __glewUnmapBuffer;
+
+GLEW_FUN_EXPORT PFNGLATTACHSHADERPROC __glewAttachShader;
+GLEW_FUN_EXPORT PFNGLBINDATTRIBLOCATIONPROC __glewBindAttribLocation;
+GLEW_FUN_EXPORT PFNGLBLENDEQUATIONSEPARATEPROC __glewBlendEquationSeparate;
+GLEW_FUN_EXPORT PFNGLCOMPILESHADERPROC __glewCompileShader;
+GLEW_FUN_EXPORT PFNGLCREATEPROGRAMPROC __glewCreateProgram;
+GLEW_FUN_EXPORT PFNGLCREATESHADERPROC __glewCreateShader;
+GLEW_FUN_EXPORT PFNGLDELETEPROGRAMPROC __glewDeleteProgram;
+GLEW_FUN_EXPORT PFNGLDELETESHADERPROC __glewDeleteShader;
+GLEW_FUN_EXPORT PFNGLDETACHSHADERPROC __glewDetachShader;
+GLEW_FUN_EXPORT PFNGLDISABLEVERTEXATTRIBARRAYPROC __glewDisableVertexAttribArray;
+GLEW_FUN_EXPORT PFNGLDRAWBUFFERSPROC __glewDrawBuffers;
+GLEW_FUN_EXPORT PFNGLENABLEVERTEXATTRIBARRAYPROC __glewEnableVertexAttribArray;
+GLEW_FUN_EXPORT PFNGLGETACTIVEATTRIBPROC __glewGetActiveAttrib;
+GLEW_FUN_EXPORT PFNGLGETACTIVEUNIFORMPROC __glewGetActiveUniform;
+GLEW_FUN_EXPORT PFNGLGETATTACHEDSHADERSPROC __glewGetAttachedShaders;
+GLEW_FUN_EXPORT PFNGLGETATTRIBLOCATIONPROC __glewGetAttribLocation;
+GLEW_FUN_EXPORT PFNGLGETPROGRAMINFOLOGPROC __glewGetProgramInfoLog;
+GLEW_FUN_EXPORT PFNGLGETPROGRAMIVPROC __glewGetProgramiv;
+GLEW_FUN_EXPORT PFNGLGETSHADERINFOLOGPROC __glewGetShaderInfoLog;
+GLEW_FUN_EXPORT PFNGLGETSHADERSOURCEPROC __glewGetShaderSource;
+GLEW_FUN_EXPORT PFNGLGETSHADERIVPROC __glewGetShaderiv;
+GLEW_FUN_EXPORT PFNGLGETUNIFORMLOCATIONPROC __glewGetUniformLocation;
+GLEW_FUN_EXPORT PFNGLGETUNIFORMFVPROC __glewGetUniformfv;
+GLEW_FUN_EXPORT PFNGLGETUNIFORMIVPROC __glewGetUniformiv;
+GLEW_FUN_EXPORT PFNGLGETVERTEXATTRIBPOINTERVPROC __glewGetVertexAttribPointerv;
+GLEW_FUN_EXPORT PFNGLGETVERTEXATTRIBDVPROC __glewGetVertexAttribdv;
+GLEW_FUN_EXPORT PFNGLGETVERTEXATTRIBFVPROC __glewGetVertexAttribfv;
+GLEW_FUN_EXPORT PFNGLGETVERTEXATTRIBIVPROC __glewGetVertexAttribiv;
+GLEW_FUN_EXPORT PFNGLISPROGRAMPROC __glewIsProgram;
+GLEW_FUN_EXPORT PFNGLISSHADERPROC __glewIsShader;
+GLEW_FUN_EXPORT PFNGLLINKPROGRAMPROC __glewLinkProgram;
+GLEW_FUN_EXPORT PFNGLSHADERSOURCEPROC __glewShaderSource;
+GLEW_FUN_EXPORT PFNGLSTENCILFUNCSEPARATEPROC __glewStencilFuncSeparate;
+GLEW_FUN_EXPORT PFNGLSTENCILMASKSEPARATEPROC __glewStencilMaskSeparate;
+GLEW_FUN_EXPORT PFNGLSTENCILOPSEPARATEPROC __glewStencilOpSeparate;
+GLEW_FUN_EXPORT PFNGLUNIFORM1FPROC __glewUniform1f;
+GLEW_FUN_EXPORT PFNGLUNIFORM1FVPROC __glewUniform1fv;
+GLEW_FUN_EXPORT PFNGLUNIFORM1IPROC __glewUniform1i;
+GLEW_FUN_EXPORT PFNGLUNIFORM1IVPROC __glewUniform1iv;
+GLEW_FUN_EXPORT PFNGLUNIFORM2FPROC __glewUniform2f;
+GLEW_FUN_EXPORT PFNGLUNIFORM2FVPROC __glewUniform2fv;
+GLEW_FUN_EXPORT PFNGLUNIFORM2IPROC __glewUniform2i;
+GLEW_FUN_EXPORT PFNGLUNIFORM2IVPROC __glewUniform2iv;
+GLEW_FUN_EXPORT PFNGLUNIFORM3FPROC __glewUniform3f;
+GLEW_FUN_EXPORT PFNGLUNIFORM3FVPROC __glewUniform3fv;
+GLEW_FUN_EXPORT PFNGLUNIFORM3IPROC __glewUniform3i;
+GLEW_FUN_EXPORT PFNGLUNIFORM3IVPROC __glewUniform3iv;
+GLEW_FUN_EXPORT PFNGLUNIFORM4FPROC __glewUniform4f;
+GLEW_FUN_EXPORT PFNGLUNIFORM4FVPROC __glewUniform4fv;
+GLEW_FUN_EXPORT PFNGLUNIFORM4IPROC __glewUniform4i;
+GLEW_FUN_EXPORT PFNGLUNIFORM4IVPROC __glewUniform4iv;
+GLEW_FUN_EXPORT PFNGLUNIFORMMATRIX2FVPROC __glewUniformMatrix2fv;
+GLEW_FUN_EXPORT PFNGLUNIFORMMATRIX3FVPROC __glewUniformMatrix3fv;
+GLEW_FUN_EXPORT PFNGLUNIFORMMATRIX4FVPROC __glewUniformMatrix4fv;
+GLEW_FUN_EXPORT PFNGLUSEPROGRAMPROC __glewUseProgram;
+GLEW_FUN_EXPORT PFNGLVALIDATEPROGRAMPROC __glewValidateProgram;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIB1DPROC __glewVertexAttrib1d;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIB1DVPROC __glewVertexAttrib1dv;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIB1FPROC __glewVertexAttrib1f;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIB1FVPROC __glewVertexAttrib1fv;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIB1SPROC __glewVertexAttrib1s;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIB1SVPROC __glewVertexAttrib1sv;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIB2DPROC __glewVertexAttrib2d;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIB2DVPROC __glewVertexAttrib2dv;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIB2FPROC __glewVertexAttrib2f;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIB2FVPROC __glewVertexAttrib2fv;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIB2SPROC __glewVertexAttrib2s;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIB2SVPROC __glewVertexAttrib2sv;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIB3DPROC __glewVertexAttrib3d;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIB3DVPROC __glewVertexAttrib3dv;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIB3FPROC __glewVertexAttrib3f;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIB3FVPROC __glewVertexAttrib3fv;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIB3SPROC __glewVertexAttrib3s;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIB3SVPROC __glewVertexAttrib3sv;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIB4NBVPROC __glewVertexAttrib4Nbv;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIB4NIVPROC __glewVertexAttrib4Niv;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIB4NSVPROC __glewVertexAttrib4Nsv;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIB4NUBPROC __glewVertexAttrib4Nub;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIB4NUBVPROC __glewVertexAttrib4Nubv;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIB4NUIVPROC __glewVertexAttrib4Nuiv;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIB4NUSVPROC __glewVertexAttrib4Nusv;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIB4BVPROC __glewVertexAttrib4bv;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIB4DPROC __glewVertexAttrib4d;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIB4DVPROC __glewVertexAttrib4dv;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIB4FPROC __glewVertexAttrib4f;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIB4FVPROC __glewVertexAttrib4fv;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIB4IVPROC __glewVertexAttrib4iv;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIB4SPROC __glewVertexAttrib4s;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIB4SVPROC __glewVertexAttrib4sv;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIB4UBVPROC __glewVertexAttrib4ubv;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIB4UIVPROC __glewVertexAttrib4uiv;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIB4USVPROC __glewVertexAttrib4usv;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIBPOINTERPROC __glewVertexAttribPointer;
+
+GLEW_FUN_EXPORT PFNGLUNIFORMMATRIX2X3FVPROC __glewUniformMatrix2x3fv;
+GLEW_FUN_EXPORT PFNGLUNIFORMMATRIX2X4FVPROC __glewUniformMatrix2x4fv;
+GLEW_FUN_EXPORT PFNGLUNIFORMMATRIX3X2FVPROC __glewUniformMatrix3x2fv;
+GLEW_FUN_EXPORT PFNGLUNIFORMMATRIX3X4FVPROC __glewUniformMatrix3x4fv;
+GLEW_FUN_EXPORT PFNGLUNIFORMMATRIX4X2FVPROC __glewUniformMatrix4x2fv;
+GLEW_FUN_EXPORT PFNGLUNIFORMMATRIX4X3FVPROC __glewUniformMatrix4x3fv;
+
+GLEW_FUN_EXPORT PFNGLBEGINCONDITIONALRENDERPROC __glewBeginConditionalRender;
+GLEW_FUN_EXPORT PFNGLBEGINTRANSFORMFEEDBACKPROC __glewBeginTransformFeedback;
+GLEW_FUN_EXPORT PFNGLBINDFRAGDATALOCATIONPROC __glewBindFragDataLocation;
+GLEW_FUN_EXPORT PFNGLCLAMPCOLORPROC __glewClampColor;
+GLEW_FUN_EXPORT PFNGLCLEARBUFFERFIPROC __glewClearBufferfi;
+GLEW_FUN_EXPORT PFNGLCLEARBUFFERFVPROC __glewClearBufferfv;
+GLEW_FUN_EXPORT PFNGLCLEARBUFFERIVPROC __glewClearBufferiv;
+GLEW_FUN_EXPORT PFNGLCLEARBUFFERUIVPROC __glewClearBufferuiv;
+GLEW_FUN_EXPORT PFNGLCOLORMASKIPROC __glewColorMaski;
+GLEW_FUN_EXPORT PFNGLDISABLEIPROC __glewDisablei;
+GLEW_FUN_EXPORT PFNGLENABLEIPROC __glewEnablei;
+GLEW_FUN_EXPORT PFNGLENDCONDITIONALRENDERPROC __glewEndConditionalRender;
+GLEW_FUN_EXPORT PFNGLENDTRANSFORMFEEDBACKPROC __glewEndTransformFeedback;
+GLEW_FUN_EXPORT PFNGLGETBOOLEANI_VPROC __glewGetBooleani_v;
+GLEW_FUN_EXPORT PFNGLGETFRAGDATALOCATIONPROC __glewGetFragDataLocation;
+GLEW_FUN_EXPORT PFNGLGETSTRINGIPROC __glewGetStringi;
+GLEW_FUN_EXPORT PFNGLGETTEXPARAMETERIIVPROC __glewGetTexParameterIiv;
+GLEW_FUN_EXPORT PFNGLGETTEXPARAMETERIUIVPROC __glewGetTexParameterIuiv;
+GLEW_FUN_EXPORT PFNGLGETTRANSFORMFEEDBACKVARYINGPROC __glewGetTransformFeedbackVarying;
+GLEW_FUN_EXPORT PFNGLGETUNIFORMUIVPROC __glewGetUniformuiv;
+GLEW_FUN_EXPORT PFNGLGETVERTEXATTRIBIIVPROC __glewGetVertexAttribIiv;
+GLEW_FUN_EXPORT PFNGLGETVERTEXATTRIBIUIVPROC __glewGetVertexAttribIuiv;
+GLEW_FUN_EXPORT PFNGLISENABLEDIPROC __glewIsEnabledi;
+GLEW_FUN_EXPORT PFNGLTEXPARAMETERIIVPROC __glewTexParameterIiv;
+GLEW_FUN_EXPORT PFNGLTEXPARAMETERIUIVPROC __glewTexParameterIuiv;
+GLEW_FUN_EXPORT PFNGLTRANSFORMFEEDBACKVARYINGSPROC __glewTransformFeedbackVaryings;
+GLEW_FUN_EXPORT PFNGLUNIFORM1UIPROC __glewUniform1ui;
+GLEW_FUN_EXPORT PFNGLUNIFORM1UIVPROC __glewUniform1uiv;
+GLEW_FUN_EXPORT PFNGLUNIFORM2UIPROC __glewUniform2ui;
+GLEW_FUN_EXPORT PFNGLUNIFORM2UIVPROC __glewUniform2uiv;
+GLEW_FUN_EXPORT PFNGLUNIFORM3UIPROC __glewUniform3ui;
+GLEW_FUN_EXPORT PFNGLUNIFORM3UIVPROC __glewUniform3uiv;
+GLEW_FUN_EXPORT PFNGLUNIFORM4UIPROC __glewUniform4ui;
+GLEW_FUN_EXPORT PFNGLUNIFORM4UIVPROC __glewUniform4uiv;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIBI1IPROC __glewVertexAttribI1i;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIBI1IVPROC __glewVertexAttribI1iv;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIBI1UIPROC __glewVertexAttribI1ui;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIBI1UIVPROC __glewVertexAttribI1uiv;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIBI2IPROC __glewVertexAttribI2i;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIBI2IVPROC __glewVertexAttribI2iv;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIBI2UIPROC __glewVertexAttribI2ui;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIBI2UIVPROC __glewVertexAttribI2uiv;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIBI3IPROC __glewVertexAttribI3i;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIBI3IVPROC __glewVertexAttribI3iv;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIBI3UIPROC __glewVertexAttribI3ui;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIBI3UIVPROC __glewVertexAttribI3uiv;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIBI4BVPROC __glewVertexAttribI4bv;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIBI4IPROC __glewVertexAttribI4i;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIBI4IVPROC __glewVertexAttribI4iv;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIBI4SVPROC __glewVertexAttribI4sv;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIBI4UBVPROC __glewVertexAttribI4ubv;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIBI4UIPROC __glewVertexAttribI4ui;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIBI4UIVPROC __glewVertexAttribI4uiv;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIBI4USVPROC __glewVertexAttribI4usv;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIBIPOINTERPROC __glewVertexAttribIPointer;
+
+GLEW_FUN_EXPORT PFNGLDRAWARRAYSINSTANCEDPROC __glewDrawArraysInstanced;
+GLEW_FUN_EXPORT PFNGLDRAWELEMENTSINSTANCEDPROC __glewDrawElementsInstanced;
+GLEW_FUN_EXPORT PFNGLPRIMITIVERESTARTINDEXPROC __glewPrimitiveRestartIndex;
+GLEW_FUN_EXPORT PFNGLTEXBUFFERPROC __glewTexBuffer;
+
+GLEW_FUN_EXPORT PFNGLFRAMEBUFFERTEXTUREPROC __glewFramebufferTexture;
+GLEW_FUN_EXPORT PFNGLGETBUFFERPARAMETERI64VPROC __glewGetBufferParameteri64v;
+GLEW_FUN_EXPORT PFNGLGETINTEGER64I_VPROC __glewGetInteger64i_v;
+
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIBDIVISORPROC __glewVertexAttribDivisor;
+
+GLEW_FUN_EXPORT PFNGLBLENDEQUATIONSEPARATEIPROC __glewBlendEquationSeparatei;
+GLEW_FUN_EXPORT PFNGLBLENDEQUATIONIPROC __glewBlendEquationi;
+GLEW_FUN_EXPORT PFNGLBLENDFUNCSEPARATEIPROC __glewBlendFuncSeparatei;
+GLEW_FUN_EXPORT PFNGLBLENDFUNCIPROC __glewBlendFunci;
+GLEW_FUN_EXPORT PFNGLMINSAMPLESHADINGPROC __glewMinSampleShading;
+
+GLEW_FUN_EXPORT PFNGLGETGRAPHICSRESETSTATUSPROC __glewGetGraphicsResetStatus;
+
+GLEW_FUN_EXPORT PFNGLTBUFFERMASK3DFXPROC __glewTbufferMask3DFX;
+
+GLEW_FUN_EXPORT PFNGLDEBUGMESSAGECALLBACKAMDPROC __glewDebugMessageCallbackAMD;
+GLEW_FUN_EXPORT PFNGLDEBUGMESSAGEENABLEAMDPROC __glewDebugMessageEnableAMD;
+GLEW_FUN_EXPORT PFNGLDEBUGMESSAGEINSERTAMDPROC __glewDebugMessageInsertAMD;
+GLEW_FUN_EXPORT PFNGLGETDEBUGMESSAGELOGAMDPROC __glewGetDebugMessageLogAMD;
+
+GLEW_FUN_EXPORT PFNGLBLENDEQUATIONINDEXEDAMDPROC __glewBlendEquationIndexedAMD;
+GLEW_FUN_EXPORT PFNGLBLENDEQUATIONSEPARATEINDEXEDAMDPROC __glewBlendEquationSeparateIndexedAMD;
+GLEW_FUN_EXPORT PFNGLBLENDFUNCINDEXEDAMDPROC __glewBlendFuncIndexedAMD;
+GLEW_FUN_EXPORT PFNGLBLENDFUNCSEPARATEINDEXEDAMDPROC __glewBlendFuncSeparateIndexedAMD;
+
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIBPARAMETERIAMDPROC __glewVertexAttribParameteriAMD;
+
+GLEW_FUN_EXPORT PFNGLMULTIDRAWARRAYSINDIRECTAMDPROC __glewMultiDrawArraysIndirectAMD;
+GLEW_FUN_EXPORT PFNGLMULTIDRAWELEMENTSINDIRECTAMDPROC __glewMultiDrawElementsIndirectAMD;
+
+GLEW_FUN_EXPORT PFNGLDELETENAMESAMDPROC __glewDeleteNamesAMD;
+GLEW_FUN_EXPORT PFNGLGENNAMESAMDPROC __glewGenNamesAMD;
+GLEW_FUN_EXPORT PFNGLISNAMEAMDPROC __glewIsNameAMD;
+
+GLEW_FUN_EXPORT PFNGLQUERYOBJECTPARAMETERUIAMDPROC __glewQueryObjectParameteruiAMD;
+
+GLEW_FUN_EXPORT PFNGLBEGINPERFMONITORAMDPROC __glewBeginPerfMonitorAMD;
+GLEW_FUN_EXPORT PFNGLDELETEPERFMONITORSAMDPROC __glewDeletePerfMonitorsAMD;
+GLEW_FUN_EXPORT PFNGLENDPERFMONITORAMDPROC __glewEndPerfMonitorAMD;
+GLEW_FUN_EXPORT PFNGLGENPERFMONITORSAMDPROC __glewGenPerfMonitorsAMD;
+GLEW_FUN_EXPORT PFNGLGETPERFMONITORCOUNTERDATAAMDPROC __glewGetPerfMonitorCounterDataAMD;
+GLEW_FUN_EXPORT PFNGLGETPERFMONITORCOUNTERINFOAMDPROC __glewGetPerfMonitorCounterInfoAMD;
+GLEW_FUN_EXPORT PFNGLGETPERFMONITORCOUNTERSTRINGAMDPROC __glewGetPerfMonitorCounterStringAMD;
+GLEW_FUN_EXPORT PFNGLGETPERFMONITORCOUNTERSAMDPROC __glewGetPerfMonitorCountersAMD;
+GLEW_FUN_EXPORT PFNGLGETPERFMONITORGROUPSTRINGAMDPROC __glewGetPerfMonitorGroupStringAMD;
+GLEW_FUN_EXPORT PFNGLGETPERFMONITORGROUPSAMDPROC __glewGetPerfMonitorGroupsAMD;
+GLEW_FUN_EXPORT PFNGLSELECTPERFMONITORCOUNTERSAMDPROC __glewSelectPerfMonitorCountersAMD;
+
+GLEW_FUN_EXPORT PFNGLSETMULTISAMPLEFVAMDPROC __glewSetMultisamplefvAMD;
+
+GLEW_FUN_EXPORT PFNGLTEXSTORAGESPARSEAMDPROC __glewTexStorageSparseAMD;
+GLEW_FUN_EXPORT PFNGLTEXTURESTORAGESPARSEAMDPROC __glewTextureStorageSparseAMD;
+
+GLEW_FUN_EXPORT PFNGLSTENCILOPVALUEAMDPROC __glewStencilOpValueAMD;
+
+GLEW_FUN_EXPORT PFNGLTESSELLATIONFACTORAMDPROC __glewTessellationFactorAMD;
+GLEW_FUN_EXPORT PFNGLTESSELLATIONMODEAMDPROC __glewTessellationModeAMD;
+
+GLEW_FUN_EXPORT PFNGLBLITFRAMEBUFFERANGLEPROC __glewBlitFramebufferANGLE;
+
+GLEW_FUN_EXPORT PFNGLRENDERBUFFERSTORAGEMULTISAMPLEANGLEPROC __glewRenderbufferStorageMultisampleANGLE;
+
+GLEW_FUN_EXPORT PFNGLDRAWARRAYSINSTANCEDANGLEPROC __glewDrawArraysInstancedANGLE;
+GLEW_FUN_EXPORT PFNGLDRAWELEMENTSINSTANCEDANGLEPROC __glewDrawElementsInstancedANGLE;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIBDIVISORANGLEPROC __glewVertexAttribDivisorANGLE;
+
+GLEW_FUN_EXPORT PFNGLBEGINQUERYANGLEPROC __glewBeginQueryANGLE;
+GLEW_FUN_EXPORT PFNGLDELETEQUERIESANGLEPROC __glewDeleteQueriesANGLE;
+GLEW_FUN_EXPORT PFNGLENDQUERYANGLEPROC __glewEndQueryANGLE;
+GLEW_FUN_EXPORT PFNGLGENQUERIESANGLEPROC __glewGenQueriesANGLE;
+GLEW_FUN_EXPORT PFNGLGETQUERYOBJECTI64VANGLEPROC __glewGetQueryObjecti64vANGLE;
+GLEW_FUN_EXPORT PFNGLGETQUERYOBJECTIVANGLEPROC __glewGetQueryObjectivANGLE;
+GLEW_FUN_EXPORT PFNGLGETQUERYOBJECTUI64VANGLEPROC __glewGetQueryObjectui64vANGLE;
+GLEW_FUN_EXPORT PFNGLGETQUERYOBJECTUIVANGLEPROC __glewGetQueryObjectuivANGLE;
+GLEW_FUN_EXPORT PFNGLGETQUERYIVANGLEPROC __glewGetQueryivANGLE;
+GLEW_FUN_EXPORT PFNGLISQUERYANGLEPROC __glewIsQueryANGLE;
+GLEW_FUN_EXPORT PFNGLQUERYCOUNTERANGLEPROC __glewQueryCounterANGLE;
+
+GLEW_FUN_EXPORT PFNGLGETTRANSLATEDSHADERSOURCEANGLEPROC __glewGetTranslatedShaderSourceANGLE;
+
+GLEW_FUN_EXPORT PFNGLDRAWELEMENTARRAYAPPLEPROC __glewDrawElementArrayAPPLE;
+GLEW_FUN_EXPORT PFNGLDRAWRANGEELEMENTARRAYAPPLEPROC __glewDrawRangeElementArrayAPPLE;
+GLEW_FUN_EXPORT PFNGLELEMENTPOINTERAPPLEPROC __glewElementPointerAPPLE;
+GLEW_FUN_EXPORT PFNGLMULTIDRAWELEMENTARRAYAPPLEPROC __glewMultiDrawElementArrayAPPLE;
+GLEW_FUN_EXPORT PFNGLMULTIDRAWRANGEELEMENTARRAYAPPLEPROC __glewMultiDrawRangeElementArrayAPPLE;
+
+GLEW_FUN_EXPORT PFNGLDELETEFENCESAPPLEPROC __glewDeleteFencesAPPLE;
+GLEW_FUN_EXPORT PFNGLFINISHFENCEAPPLEPROC __glewFinishFenceAPPLE;
+GLEW_FUN_EXPORT PFNGLFINISHOBJECTAPPLEPROC __glewFinishObjectAPPLE;
+GLEW_FUN_EXPORT PFNGLGENFENCESAPPLEPROC __glewGenFencesAPPLE;
+GLEW_FUN_EXPORT PFNGLISFENCEAPPLEPROC __glewIsFenceAPPLE;
+GLEW_FUN_EXPORT PFNGLSETFENCEAPPLEPROC __glewSetFenceAPPLE;
+GLEW_FUN_EXPORT PFNGLTESTFENCEAPPLEPROC __glewTestFenceAPPLE;
+GLEW_FUN_EXPORT PFNGLTESTOBJECTAPPLEPROC __glewTestObjectAPPLE;
+
+GLEW_FUN_EXPORT PFNGLBUFFERPARAMETERIAPPLEPROC __glewBufferParameteriAPPLE;
+GLEW_FUN_EXPORT PFNGLFLUSHMAPPEDBUFFERRANGEAPPLEPROC __glewFlushMappedBufferRangeAPPLE;
+
+GLEW_FUN_EXPORT PFNGLGETOBJECTPARAMETERIVAPPLEPROC __glewGetObjectParameterivAPPLE;
+GLEW_FUN_EXPORT PFNGLOBJECTPURGEABLEAPPLEPROC __glewObjectPurgeableAPPLE;
+GLEW_FUN_EXPORT PFNGLOBJECTUNPURGEABLEAPPLEPROC __glewObjectUnpurgeableAPPLE;
+
+GLEW_FUN_EXPORT PFNGLGETTEXPARAMETERPOINTERVAPPLEPROC __glewGetTexParameterPointervAPPLE;
+GLEW_FUN_EXPORT PFNGLTEXTURERANGEAPPLEPROC __glewTextureRangeAPPLE;
+
+GLEW_FUN_EXPORT PFNGLBINDVERTEXARRAYAPPLEPROC __glewBindVertexArrayAPPLE;
+GLEW_FUN_EXPORT PFNGLDELETEVERTEXARRAYSAPPLEPROC __glewDeleteVertexArraysAPPLE;
+GLEW_FUN_EXPORT PFNGLGENVERTEXARRAYSAPPLEPROC __glewGenVertexArraysAPPLE;
+GLEW_FUN_EXPORT PFNGLISVERTEXARRAYAPPLEPROC __glewIsVertexArrayAPPLE;
+
+GLEW_FUN_EXPORT PFNGLFLUSHVERTEXARRAYRANGEAPPLEPROC __glewFlushVertexArrayRangeAPPLE;
+GLEW_FUN_EXPORT PFNGLVERTEXARRAYPARAMETERIAPPLEPROC __glewVertexArrayParameteriAPPLE;
+GLEW_FUN_EXPORT PFNGLVERTEXARRAYRANGEAPPLEPROC __glewVertexArrayRangeAPPLE;
+
+GLEW_FUN_EXPORT PFNGLDISABLEVERTEXATTRIBAPPLEPROC __glewDisableVertexAttribAPPLE;
+GLEW_FUN_EXPORT PFNGLENABLEVERTEXATTRIBAPPLEPROC __glewEnableVertexAttribAPPLE;
+GLEW_FUN_EXPORT PFNGLISVERTEXATTRIBENABLEDAPPLEPROC __glewIsVertexAttribEnabledAPPLE;
+GLEW_FUN_EXPORT PFNGLMAPVERTEXATTRIB1DAPPLEPROC __glewMapVertexAttrib1dAPPLE;
+GLEW_FUN_EXPORT PFNGLMAPVERTEXATTRIB1FAPPLEPROC __glewMapVertexAttrib1fAPPLE;
+GLEW_FUN_EXPORT PFNGLMAPVERTEXATTRIB2DAPPLEPROC __glewMapVertexAttrib2dAPPLE;
+GLEW_FUN_EXPORT PFNGLMAPVERTEXATTRIB2FAPPLEPROC __glewMapVertexAttrib2fAPPLE;
+
+GLEW_FUN_EXPORT PFNGLCLEARDEPTHFPROC __glewClearDepthf;
+GLEW_FUN_EXPORT PFNGLDEPTHRANGEFPROC __glewDepthRangef;
+GLEW_FUN_EXPORT PFNGLGETSHADERPRECISIONFORMATPROC __glewGetShaderPrecisionFormat;
+GLEW_FUN_EXPORT PFNGLRELEASESHADERCOMPILERPROC __glewReleaseShaderCompiler;
+GLEW_FUN_EXPORT PFNGLSHADERBINARYPROC __glewShaderBinary;
+
+GLEW_FUN_EXPORT PFNGLMEMORYBARRIERBYREGIONPROC __glewMemoryBarrierByRegion;
+
+GLEW_FUN_EXPORT PFNGLDRAWARRAYSINSTANCEDBASEINSTANCEPROC __glewDrawArraysInstancedBaseInstance;
+GLEW_FUN_EXPORT PFNGLDRAWELEMENTSINSTANCEDBASEINSTANCEPROC __glewDrawElementsInstancedBaseInstance;
+GLEW_FUN_EXPORT PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXBASEINSTANCEPROC __glewDrawElementsInstancedBaseVertexBaseInstance;
+
+GLEW_FUN_EXPORT PFNGLGETIMAGEHANDLEARBPROC __glewGetImageHandleARB;
+GLEW_FUN_EXPORT PFNGLGETTEXTUREHANDLEARBPROC __glewGetTextureHandleARB;
+GLEW_FUN_EXPORT PFNGLGETTEXTURESAMPLERHANDLEARBPROC __glewGetTextureSamplerHandleARB;
+GLEW_FUN_EXPORT PFNGLGETVERTEXATTRIBLUI64VARBPROC __glewGetVertexAttribLui64vARB;
+GLEW_FUN_EXPORT PFNGLISIMAGEHANDLERESIDENTARBPROC __glewIsImageHandleResidentARB;
+GLEW_FUN_EXPORT PFNGLISTEXTUREHANDLERESIDENTARBPROC __glewIsTextureHandleResidentARB;
+GLEW_FUN_EXPORT PFNGLMAKEIMAGEHANDLENONRESIDENTARBPROC __glewMakeImageHandleNonResidentARB;
+GLEW_FUN_EXPORT PFNGLMAKEIMAGEHANDLERESIDENTARBPROC __glewMakeImageHandleResidentARB;
+GLEW_FUN_EXPORT PFNGLMAKETEXTUREHANDLENONRESIDENTARBPROC __glewMakeTextureHandleNonResidentARB;
+GLEW_FUN_EXPORT PFNGLMAKETEXTUREHANDLERESIDENTARBPROC __glewMakeTextureHandleResidentARB;
+GLEW_FUN_EXPORT PFNGLPROGRAMUNIFORMHANDLEUI64ARBPROC __glewProgramUniformHandleui64ARB;
+GLEW_FUN_EXPORT PFNGLPROGRAMUNIFORMHANDLEUI64VARBPROC __glewProgramUniformHandleui64vARB;
+GLEW_FUN_EXPORT PFNGLUNIFORMHANDLEUI64ARBPROC __glewUniformHandleui64ARB;
+GLEW_FUN_EXPORT PFNGLUNIFORMHANDLEUI64VARBPROC __glewUniformHandleui64vARB;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIBL1UI64ARBPROC __glewVertexAttribL1ui64ARB;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIBL1UI64VARBPROC __glewVertexAttribL1ui64vARB;
+
+GLEW_FUN_EXPORT PFNGLBINDFRAGDATALOCATIONINDEXEDPROC __glewBindFragDataLocationIndexed;
+GLEW_FUN_EXPORT PFNGLGETFRAGDATAINDEXPROC __glewGetFragDataIndex;
+
+GLEW_FUN_EXPORT PFNGLBUFFERSTORAGEPROC __glewBufferStorage;
+GLEW_FUN_EXPORT PFNGLNAMEDBUFFERSTORAGEEXTPROC __glewNamedBufferStorageEXT;
+
+GLEW_FUN_EXPORT PFNGLCREATESYNCFROMCLEVENTARBPROC __glewCreateSyncFromCLeventARB;
+
+GLEW_FUN_EXPORT PFNGLCLEARBUFFERDATAPROC __glewClearBufferData;
+GLEW_FUN_EXPORT PFNGLCLEARBUFFERSUBDATAPROC __glewClearBufferSubData;
+GLEW_FUN_EXPORT PFNGLCLEARNAMEDBUFFERDATAEXTPROC __glewClearNamedBufferDataEXT;
+GLEW_FUN_EXPORT PFNGLCLEARNAMEDBUFFERSUBDATAEXTPROC __glewClearNamedBufferSubDataEXT;
+
+GLEW_FUN_EXPORT PFNGLCLEARTEXIMAGEPROC __glewClearTexImage;
+GLEW_FUN_EXPORT PFNGLCLEARTEXSUBIMAGEPROC __glewClearTexSubImage;
+
+GLEW_FUN_EXPORT PFNGLCLIPCONTROLPROC __glewClipControl;
+
+GLEW_FUN_EXPORT PFNGLCLAMPCOLORARBPROC __glewClampColorARB;
+
+GLEW_FUN_EXPORT PFNGLDISPATCHCOMPUTEPROC __glewDispatchCompute;
+GLEW_FUN_EXPORT PFNGLDISPATCHCOMPUTEINDIRECTPROC __glewDispatchComputeIndirect;
+
+GLEW_FUN_EXPORT PFNGLDISPATCHCOMPUTEGROUPSIZEARBPROC __glewDispatchComputeGroupSizeARB;
+
+GLEW_FUN_EXPORT PFNGLCOPYBUFFERSUBDATAPROC __glewCopyBufferSubData;
+
+GLEW_FUN_EXPORT PFNGLCOPYIMAGESUBDATAPROC __glewCopyImageSubData;
+
+GLEW_FUN_EXPORT PFNGLDEBUGMESSAGECALLBACKARBPROC __glewDebugMessageCallbackARB;
+GLEW_FUN_EXPORT PFNGLDEBUGMESSAGECONTROLARBPROC __glewDebugMessageControlARB;
+GLEW_FUN_EXPORT PFNGLDEBUGMESSAGEINSERTARBPROC __glewDebugMessageInsertARB;
+GLEW_FUN_EXPORT PFNGLGETDEBUGMESSAGELOGARBPROC __glewGetDebugMessageLogARB;
+
+GLEW_FUN_EXPORT PFNGLBINDTEXTUREUNITPROC __glewBindTextureUnit;
+GLEW_FUN_EXPORT PFNGLBLITNAMEDFRAMEBUFFERPROC __glewBlitNamedFramebuffer;
+GLEW_FUN_EXPORT PFNGLCHECKNAMEDFRAMEBUFFERSTATUSPROC __glewCheckNamedFramebufferStatus;
+GLEW_FUN_EXPORT PFNGLCLEARNAMEDBUFFERDATAPROC __glewClearNamedBufferData;
+GLEW_FUN_EXPORT PFNGLCLEARNAMEDBUFFERSUBDATAPROC __glewClearNamedBufferSubData;
+GLEW_FUN_EXPORT PFNGLCLEARNAMEDFRAMEBUFFERFIPROC __glewClearNamedFramebufferfi;
+GLEW_FUN_EXPORT PFNGLCLEARNAMEDFRAMEBUFFERFVPROC __glewClearNamedFramebufferfv;
+GLEW_FUN_EXPORT PFNGLCLEARNAMEDFRAMEBUFFERIVPROC __glewClearNamedFramebufferiv;
+GLEW_FUN_EXPORT PFNGLCLEARNAMEDFRAMEBUFFERUIVPROC __glewClearNamedFramebufferuiv;
+GLEW_FUN_EXPORT PFNGLCOMPRESSEDTEXTURESUBIMAGE1DPROC __glewCompressedTextureSubImage1D;
+GLEW_FUN_EXPORT PFNGLCOMPRESSEDTEXTURESUBIMAGE2DPROC __glewCompressedTextureSubImage2D;
+GLEW_FUN_EXPORT PFNGLCOMPRESSEDTEXTURESUBIMAGE3DPROC __glewCompressedTextureSubImage3D;
+GLEW_FUN_EXPORT PFNGLCOPYNAMEDBUFFERSUBDATAPROC __glewCopyNamedBufferSubData;
+GLEW_FUN_EXPORT PFNGLCOPYTEXTURESUBIMAGE1DPROC __glewCopyTextureSubImage1D;
+GLEW_FUN_EXPORT PFNGLCOPYTEXTURESUBIMAGE2DPROC __glewCopyTextureSubImage2D;
+GLEW_FUN_EXPORT PFNGLCOPYTEXTURESUBIMAGE3DPROC __glewCopyTextureSubImage3D;
+GLEW_FUN_EXPORT PFNGLCREATEBUFFERSPROC __glewCreateBuffers;
+GLEW_FUN_EXPORT PFNGLCREATEFRAMEBUFFERSPROC __glewCreateFramebuffers;
+GLEW_FUN_EXPORT PFNGLCREATEPROGRAMPIPELINESPROC __glewCreateProgramPipelines;
+GLEW_FUN_EXPORT PFNGLCREATEQUERIESPROC __glewCreateQueries;
+GLEW_FUN_EXPORT PFNGLCREATERENDERBUFFERSPROC __glewCreateRenderbuffers;
+GLEW_FUN_EXPORT PFNGLCREATESAMPLERSPROC __glewCreateSamplers;
+GLEW_FUN_EXPORT PFNGLCREATETEXTURESPROC __glewCreateTextures;
+GLEW_FUN_EXPORT PFNGLCREATETRANSFORMFEEDBACKSPROC __glewCreateTransformFeedbacks;
+GLEW_FUN_EXPORT PFNGLCREATEVERTEXARRAYSPROC __glewCreateVertexArrays;
+GLEW_FUN_EXPORT PFNGLDISABLEVERTEXARRAYATTRIBPROC __glewDisableVertexArrayAttrib;
+GLEW_FUN_EXPORT PFNGLENABLEVERTEXARRAYATTRIBPROC __glewEnableVertexArrayAttrib;
+GLEW_FUN_EXPORT PFNGLFLUSHMAPPEDNAMEDBUFFERRANGEPROC __glewFlushMappedNamedBufferRange;
+GLEW_FUN_EXPORT PFNGLGENERATETEXTUREMIPMAPPROC __glewGenerateTextureMipmap;
+GLEW_FUN_EXPORT PFNGLGETCOMPRESSEDTEXTUREIMAGEPROC __glewGetCompressedTextureImage;
+GLEW_FUN_EXPORT PFNGLGETNAMEDBUFFERPARAMETERI64VPROC __glewGetNamedBufferParameteri64v;
+GLEW_FUN_EXPORT PFNGLGETNAMEDBUFFERPARAMETERIVPROC __glewGetNamedBufferParameteriv;
+GLEW_FUN_EXPORT PFNGLGETNAMEDBUFFERPOINTERVPROC __glewGetNamedBufferPointerv;
+GLEW_FUN_EXPORT PFNGLGETNAMEDBUFFERSUBDATAPROC __glewGetNamedBufferSubData;
+GLEW_FUN_EXPORT PFNGLGETNAMEDFRAMEBUFFERATTACHMENTPARAMETERIVPROC __glewGetNamedFramebufferAttachmentParameteriv;
+GLEW_FUN_EXPORT PFNGLGETNAMEDFRAMEBUFFERPARAMETERIVPROC __glewGetNamedFramebufferParameteriv;
+GLEW_FUN_EXPORT PFNGLGETNAMEDRENDERBUFFERPARAMETERIVPROC __glewGetNamedRenderbufferParameteriv;
+GLEW_FUN_EXPORT PFNGLGETQUERYBUFFEROBJECTI64VPROC __glewGetQueryBufferObjecti64v;
+GLEW_FUN_EXPORT PFNGLGETQUERYBUFFEROBJECTIVPROC __glewGetQueryBufferObjectiv;
+GLEW_FUN_EXPORT PFNGLGETQUERYBUFFEROBJECTUI64VPROC __glewGetQueryBufferObjectui64v;
+GLEW_FUN_EXPORT PFNGLGETQUERYBUFFEROBJECTUIVPROC __glewGetQueryBufferObjectuiv;
+GLEW_FUN_EXPORT PFNGLGETTEXTUREIMAGEPROC __glewGetTextureImage;
+GLEW_FUN_EXPORT PFNGLGETTEXTURELEVELPARAMETERFVPROC __glewGetTextureLevelParameterfv;
+GLEW_FUN_EXPORT PFNGLGETTEXTURELEVELPARAMETERIVPROC __glewGetTextureLevelParameteriv;
+GLEW_FUN_EXPORT PFNGLGETTEXTUREPARAMETERIIVPROC __glewGetTextureParameterIiv;
+GLEW_FUN_EXPORT PFNGLGETTEXTUREPARAMETERIUIVPROC __glewGetTextureParameterIuiv;
+GLEW_FUN_EXPORT PFNGLGETTEXTUREPARAMETERFVPROC __glewGetTextureParameterfv;
+GLEW_FUN_EXPORT PFNGLGETTEXTUREPARAMETERIVPROC __glewGetTextureParameteriv;
+GLEW_FUN_EXPORT PFNGLGETTRANSFORMFEEDBACKI64_VPROC __glewGetTransformFeedbacki64_v;
+GLEW_FUN_EXPORT PFNGLGETTRANSFORMFEEDBACKI_VPROC __glewGetTransformFeedbacki_v;
+GLEW_FUN_EXPORT PFNGLGETTRANSFORMFEEDBACKIVPROC __glewGetTransformFeedbackiv;
+GLEW_FUN_EXPORT PFNGLGETVERTEXARRAYINDEXED64IVPROC __glewGetVertexArrayIndexed64iv;
+GLEW_FUN_EXPORT PFNGLGETVERTEXARRAYINDEXEDIVPROC __glewGetVertexArrayIndexediv;
+GLEW_FUN_EXPORT PFNGLGETVERTEXARRAYIVPROC __glewGetVertexArrayiv;
+GLEW_FUN_EXPORT PFNGLINVALIDATENAMEDFRAMEBUFFERDATAPROC __glewInvalidateNamedFramebufferData;
+GLEW_FUN_EXPORT PFNGLINVALIDATENAMEDFRAMEBUFFERSUBDATAPROC __glewInvalidateNamedFramebufferSubData;
+GLEW_FUN_EXPORT PFNGLMAPNAMEDBUFFERPROC __glewMapNamedBuffer;
+GLEW_FUN_EXPORT PFNGLMAPNAMEDBUFFERRANGEPROC __glewMapNamedBufferRange;
+GLEW_FUN_EXPORT PFNGLNAMEDBUFFERDATAPROC __glewNamedBufferData;
+GLEW_FUN_EXPORT PFNGLNAMEDBUFFERSTORAGEPROC __glewNamedBufferStorage;
+GLEW_FUN_EXPORT PFNGLNAMEDBUFFERSUBDATAPROC __glewNamedBufferSubData;
+GLEW_FUN_EXPORT PFNGLNAMEDFRAMEBUFFERDRAWBUFFERPROC __glewNamedFramebufferDrawBuffer;
+GLEW_FUN_EXPORT PFNGLNAMEDFRAMEBUFFERDRAWBUFFERSPROC __glewNamedFramebufferDrawBuffers;
+GLEW_FUN_EXPORT PFNGLNAMEDFRAMEBUFFERPARAMETERIPROC __glewNamedFramebufferParameteri;
+GLEW_FUN_EXPORT PFNGLNAMEDFRAMEBUFFERREADBUFFERPROC __glewNamedFramebufferReadBuffer;
+GLEW_FUN_EXPORT PFNGLNAMEDFRAMEBUFFERRENDERBUFFERPROC __glewNamedFramebufferRenderbuffer;
+GLEW_FUN_EXPORT PFNGLNAMEDFRAMEBUFFERTEXTUREPROC __glewNamedFramebufferTexture;
+GLEW_FUN_EXPORT PFNGLNAMEDFRAMEBUFFERTEXTURELAYERPROC __glewNamedFramebufferTextureLayer;
+GLEW_FUN_EXPORT PFNGLNAMEDRENDERBUFFERSTORAGEPROC __glewNamedRenderbufferStorage;
+GLEW_FUN_EXPORT PFNGLNAMEDRENDERBUFFERSTORAGEMULTISAMPLEPROC __glewNamedRenderbufferStorageMultisample;
+GLEW_FUN_EXPORT PFNGLTEXTUREBUFFERPROC __glewTextureBuffer;
+GLEW_FUN_EXPORT PFNGLTEXTUREBUFFERRANGEPROC __glewTextureBufferRange;
+GLEW_FUN_EXPORT PFNGLTEXTUREPARAMETERIIVPROC __glewTextureParameterIiv;
+GLEW_FUN_EXPORT PFNGLTEXTUREPARAMETERIUIVPROC __glewTextureParameterIuiv;
+GLEW_FUN_EXPORT PFNGLTEXTUREPARAMETERFPROC __glewTextureParameterf;
+GLEW_FUN_EXPORT PFNGLTEXTUREPARAMETERFVPROC __glewTextureParameterfv;
+GLEW_FUN_EXPORT PFNGLTEXTUREPARAMETERIPROC __glewTextureParameteri;
+GLEW_FUN_EXPORT PFNGLTEXTUREPARAMETERIVPROC __glewTextureParameteriv;
+GLEW_FUN_EXPORT PFNGLTEXTURESTORAGE1DPROC __glewTextureStorage1D;
+GLEW_FUN_EXPORT PFNGLTEXTURESTORAGE2DPROC __glewTextureStorage2D;
+GLEW_FUN_EXPORT PFNGLTEXTURESTORAGE2DMULTISAMPLEPROC __glewTextureStorage2DMultisample;
+GLEW_FUN_EXPORT PFNGLTEXTURESTORAGE3DPROC __glewTextureStorage3D;
+GLEW_FUN_EXPORT PFNGLTEXTURESTORAGE3DMULTISAMPLEPROC __glewTextureStorage3DMultisample;
+GLEW_FUN_EXPORT PFNGLTEXTURESUBIMAGE1DPROC __glewTextureSubImage1D;
+GLEW_FUN_EXPORT PFNGLTEXTURESUBIMAGE2DPROC __glewTextureSubImage2D;
+GLEW_FUN_EXPORT PFNGLTEXTURESUBIMAGE3DPROC __glewTextureSubImage3D;
+GLEW_FUN_EXPORT PFNGLTRANSFORMFEEDBACKBUFFERBASEPROC __glewTransformFeedbackBufferBase;
+GLEW_FUN_EXPORT PFNGLTRANSFORMFEEDBACKBUFFERRANGEPROC __glewTransformFeedbackBufferRange;
+GLEW_FUN_EXPORT PFNGLUNMAPNAMEDBUFFERPROC __glewUnmapNamedBuffer;
+GLEW_FUN_EXPORT PFNGLVERTEXARRAYATTRIBBINDINGPROC __glewVertexArrayAttribBinding;
+GLEW_FUN_EXPORT PFNGLVERTEXARRAYATTRIBFORMATPROC __glewVertexArrayAttribFormat;
+GLEW_FUN_EXPORT PFNGLVERTEXARRAYATTRIBIFORMATPROC __glewVertexArrayAttribIFormat;
+GLEW_FUN_EXPORT PFNGLVERTEXARRAYATTRIBLFORMATPROC __glewVertexArrayAttribLFormat;
+GLEW_FUN_EXPORT PFNGLVERTEXARRAYBINDINGDIVISORPROC __glewVertexArrayBindingDivisor;
+GLEW_FUN_EXPORT PFNGLVERTEXARRAYELEMENTBUFFERPROC __glewVertexArrayElementBuffer;
+GLEW_FUN_EXPORT PFNGLVERTEXARRAYVERTEXBUFFERPROC __glewVertexArrayVertexBuffer;
+GLEW_FUN_EXPORT PFNGLVERTEXARRAYVERTEXBUFFERSPROC __glewVertexArrayVertexBuffers;
+
+GLEW_FUN_EXPORT PFNGLDRAWBUFFERSARBPROC __glewDrawBuffersARB;
+
+GLEW_FUN_EXPORT PFNGLBLENDEQUATIONSEPARATEIARBPROC __glewBlendEquationSeparateiARB;
+GLEW_FUN_EXPORT PFNGLBLENDEQUATIONIARBPROC __glewBlendEquationiARB;
+GLEW_FUN_EXPORT PFNGLBLENDFUNCSEPARATEIARBPROC __glewBlendFuncSeparateiARB;
+GLEW_FUN_EXPORT PFNGLBLENDFUNCIARBPROC __glewBlendFunciARB;
+
+GLEW_FUN_EXPORT PFNGLDRAWELEMENTSBASEVERTEXPROC __glewDrawElementsBaseVertex;
+GLEW_FUN_EXPORT PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXPROC __glewDrawElementsInstancedBaseVertex;
+GLEW_FUN_EXPORT PFNGLDRAWRANGEELEMENTSBASEVERTEXPROC __glewDrawRangeElementsBaseVertex;
+GLEW_FUN_EXPORT PFNGLMULTIDRAWELEMENTSBASEVERTEXPROC __glewMultiDrawElementsBaseVertex;
+
+GLEW_FUN_EXPORT PFNGLDRAWARRAYSINDIRECTPROC __glewDrawArraysIndirect;
+GLEW_FUN_EXPORT PFNGLDRAWELEMENTSINDIRECTPROC __glewDrawElementsIndirect;
+
+GLEW_FUN_EXPORT PFNGLFRAMEBUFFERPARAMETERIPROC __glewFramebufferParameteri;
+GLEW_FUN_EXPORT PFNGLGETFRAMEBUFFERPARAMETERIVPROC __glewGetFramebufferParameteriv;
+GLEW_FUN_EXPORT PFNGLGETNAMEDFRAMEBUFFERPARAMETERIVEXTPROC __glewGetNamedFramebufferParameterivEXT;
+GLEW_FUN_EXPORT PFNGLNAMEDFRAMEBUFFERPARAMETERIEXTPROC __glewNamedFramebufferParameteriEXT;
+
+GLEW_FUN_EXPORT PFNGLBINDFRAMEBUFFERPROC __glewBindFramebuffer;
+GLEW_FUN_EXPORT PFNGLBINDRENDERBUFFERPROC __glewBindRenderbuffer;
+GLEW_FUN_EXPORT PFNGLBLITFRAMEBUFFERPROC __glewBlitFramebuffer;
+GLEW_FUN_EXPORT PFNGLCHECKFRAMEBUFFERSTATUSPROC __glewCheckFramebufferStatus;
+GLEW_FUN_EXPORT PFNGLDELETEFRAMEBUFFERSPROC __glewDeleteFramebuffers;
+GLEW_FUN_EXPORT PFNGLDELETERENDERBUFFERSPROC __glewDeleteRenderbuffers;
+GLEW_FUN_EXPORT PFNGLFRAMEBUFFERRENDERBUFFERPROC __glewFramebufferRenderbuffer;
+GLEW_FUN_EXPORT PFNGLFRAMEBUFFERTEXTURE1DPROC __glewFramebufferTexture1D;
+GLEW_FUN_EXPORT PFNGLFRAMEBUFFERTEXTURE2DPROC __glewFramebufferTexture2D;
+GLEW_FUN_EXPORT PFNGLFRAMEBUFFERTEXTURE3DPROC __glewFramebufferTexture3D;
+GLEW_FUN_EXPORT PFNGLFRAMEBUFFERTEXTURELAYERPROC __glewFramebufferTextureLayer;
+GLEW_FUN_EXPORT PFNGLGENFRAMEBUFFERSPROC __glewGenFramebuffers;
+GLEW_FUN_EXPORT PFNGLGENRENDERBUFFERSPROC __glewGenRenderbuffers;
+GLEW_FUN_EXPORT PFNGLGENERATEMIPMAPPROC __glewGenerateMipmap;
+GLEW_FUN_EXPORT PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC __glewGetFramebufferAttachmentParameteriv;
+GLEW_FUN_EXPORT PFNGLGETRENDERBUFFERPARAMETERIVPROC __glewGetRenderbufferParameteriv;
+GLEW_FUN_EXPORT PFNGLISFRAMEBUFFERPROC __glewIsFramebuffer;
+GLEW_FUN_EXPORT PFNGLISRENDERBUFFERPROC __glewIsRenderbuffer;
+GLEW_FUN_EXPORT PFNGLRENDERBUFFERSTORAGEPROC __glewRenderbufferStorage;
+GLEW_FUN_EXPORT PFNGLRENDERBUFFERSTORAGEMULTISAMPLEPROC __glewRenderbufferStorageMultisample;
+
+GLEW_FUN_EXPORT PFNGLFRAMEBUFFERTEXTUREARBPROC __glewFramebufferTextureARB;
+GLEW_FUN_EXPORT PFNGLFRAMEBUFFERTEXTUREFACEARBPROC __glewFramebufferTextureFaceARB;
+GLEW_FUN_EXPORT PFNGLFRAMEBUFFERTEXTURELAYERARBPROC __glewFramebufferTextureLayerARB;
+GLEW_FUN_EXPORT PFNGLPROGRAMPARAMETERIARBPROC __glewProgramParameteriARB;
+
+GLEW_FUN_EXPORT PFNGLGETPROGRAMBINARYPROC __glewGetProgramBinary;
+GLEW_FUN_EXPORT PFNGLPROGRAMBINARYPROC __glewProgramBinary;
+GLEW_FUN_EXPORT PFNGLPROGRAMPARAMETERIPROC __glewProgramParameteri;
+
+GLEW_FUN_EXPORT PFNGLGETCOMPRESSEDTEXTURESUBIMAGEPROC __glewGetCompressedTextureSubImage;
+GLEW_FUN_EXPORT PFNGLGETTEXTURESUBIMAGEPROC __glewGetTextureSubImage;
+
+GLEW_FUN_EXPORT PFNGLGETUNIFORMDVPROC __glewGetUniformdv;
+GLEW_FUN_EXPORT PFNGLUNIFORM1DPROC __glewUniform1d;
+GLEW_FUN_EXPORT PFNGLUNIFORM1DVPROC __glewUniform1dv;
+GLEW_FUN_EXPORT PFNGLUNIFORM2DPROC __glewUniform2d;
+GLEW_FUN_EXPORT PFNGLUNIFORM2DVPROC __glewUniform2dv;
+GLEW_FUN_EXPORT PFNGLUNIFORM3DPROC __glewUniform3d;
+GLEW_FUN_EXPORT PFNGLUNIFORM3DVPROC __glewUniform3dv;
+GLEW_FUN_EXPORT PFNGLUNIFORM4DPROC __glewUniform4d;
+GLEW_FUN_EXPORT PFNGLUNIFORM4DVPROC __glewUniform4dv;
+GLEW_FUN_EXPORT PFNGLUNIFORMMATRIX2DVPROC __glewUniformMatrix2dv;
+GLEW_FUN_EXPORT PFNGLUNIFORMMATRIX2X3DVPROC __glewUniformMatrix2x3dv;
+GLEW_FUN_EXPORT PFNGLUNIFORMMATRIX2X4DVPROC __glewUniformMatrix2x4dv;
+GLEW_FUN_EXPORT PFNGLUNIFORMMATRIX3DVPROC __glewUniformMatrix3dv;
+GLEW_FUN_EXPORT PFNGLUNIFORMMATRIX3X2DVPROC __glewUniformMatrix3x2dv;
+GLEW_FUN_EXPORT PFNGLUNIFORMMATRIX3X4DVPROC __glewUniformMatrix3x4dv;
+GLEW_FUN_EXPORT PFNGLUNIFORMMATRIX4DVPROC __glewUniformMatrix4dv;
+GLEW_FUN_EXPORT PFNGLUNIFORMMATRIX4X2DVPROC __glewUniformMatrix4x2dv;
+GLEW_FUN_EXPORT PFNGLUNIFORMMATRIX4X3DVPROC __glewUniformMatrix4x3dv;
+
+GLEW_FUN_EXPORT PFNGLCOLORSUBTABLEPROC __glewColorSubTable;
+GLEW_FUN_EXPORT PFNGLCOLORTABLEPROC __glewColorTable;
+GLEW_FUN_EXPORT PFNGLCOLORTABLEPARAMETERFVPROC __glewColorTableParameterfv;
+GLEW_FUN_EXPORT PFNGLCOLORTABLEPARAMETERIVPROC __glewColorTableParameteriv;
+GLEW_FUN_EXPORT PFNGLCONVOLUTIONFILTER1DPROC __glewConvolutionFilter1D;
+GLEW_FUN_EXPORT PFNGLCONVOLUTIONFILTER2DPROC __glewConvolutionFilter2D;
+GLEW_FUN_EXPORT PFNGLCONVOLUTIONPARAMETERFPROC __glewConvolutionParameterf;
+GLEW_FUN_EXPORT PFNGLCONVOLUTIONPARAMETERFVPROC __glewConvolutionParameterfv;
+GLEW_FUN_EXPORT PFNGLCONVOLUTIONPARAMETERIPROC __glewConvolutionParameteri;
+GLEW_FUN_EXPORT PFNGLCONVOLUTIONPARAMETERIVPROC __glewConvolutionParameteriv;
+GLEW_FUN_EXPORT PFNGLCOPYCOLORSUBTABLEPROC __glewCopyColorSubTable;
+GLEW_FUN_EXPORT PFNGLCOPYCOLORTABLEPROC __glewCopyColorTable;
+GLEW_FUN_EXPORT PFNGLCOPYCONVOLUTIONFILTER1DPROC __glewCopyConvolutionFilter1D;
+GLEW_FUN_EXPORT PFNGLCOPYCONVOLUTIONFILTER2DPROC __glewCopyConvolutionFilter2D;
+GLEW_FUN_EXPORT PFNGLGETCOLORTABLEPROC __glewGetColorTable;
+GLEW_FUN_EXPORT PFNGLGETCOLORTABLEPARAMETERFVPROC __glewGetColorTableParameterfv;
+GLEW_FUN_EXPORT PFNGLGETCOLORTABLEPARAMETERIVPROC __glewGetColorTableParameteriv;
+GLEW_FUN_EXPORT PFNGLGETCONVOLUTIONFILTERPROC __glewGetConvolutionFilter;
+GLEW_FUN_EXPORT PFNGLGETCONVOLUTIONPARAMETERFVPROC __glewGetConvolutionParameterfv;
+GLEW_FUN_EXPORT PFNGLGETCONVOLUTIONPARAMETERIVPROC __glewGetConvolutionParameteriv;
+GLEW_FUN_EXPORT PFNGLGETHISTOGRAMPROC __glewGetHistogram;
+GLEW_FUN_EXPORT PFNGLGETHISTOGRAMPARAMETERFVPROC __glewGetHistogramParameterfv;
+GLEW_FUN_EXPORT PFNGLGETHISTOGRAMPARAMETERIVPROC __glewGetHistogramParameteriv;
+GLEW_FUN_EXPORT PFNGLGETMINMAXPROC __glewGetMinmax;
+GLEW_FUN_EXPORT PFNGLGETMINMAXPARAMETERFVPROC __glewGetMinmaxParameterfv;
+GLEW_FUN_EXPORT PFNGLGETMINMAXPARAMETERIVPROC __glewGetMinmaxParameteriv;
+GLEW_FUN_EXPORT PFNGLGETSEPARABLEFILTERPROC __glewGetSeparableFilter;
+GLEW_FUN_EXPORT PFNGLHISTOGRAMPROC __glewHistogram;
+GLEW_FUN_EXPORT PFNGLMINMAXPROC __glewMinmax;
+GLEW_FUN_EXPORT PFNGLRESETHISTOGRAMPROC __glewResetHistogram;
+GLEW_FUN_EXPORT PFNGLRESETMINMAXPROC __glewResetMinmax;
+GLEW_FUN_EXPORT PFNGLSEPARABLEFILTER2DPROC __glewSeparableFilter2D;
+
+GLEW_FUN_EXPORT PFNGLMULTIDRAWARRAYSINDIRECTCOUNTARBPROC __glewMultiDrawArraysIndirectCountARB;
+GLEW_FUN_EXPORT PFNGLMULTIDRAWELEMENTSINDIRECTCOUNTARBPROC __glewMultiDrawElementsIndirectCountARB;
+
+GLEW_FUN_EXPORT PFNGLDRAWARRAYSINSTANCEDARBPROC __glewDrawArraysInstancedARB;
+GLEW_FUN_EXPORT PFNGLDRAWELEMENTSINSTANCEDARBPROC __glewDrawElementsInstancedARB;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIBDIVISORARBPROC __glewVertexAttribDivisorARB;
+
+GLEW_FUN_EXPORT PFNGLGETINTERNALFORMATIVPROC __glewGetInternalformativ;
+
+GLEW_FUN_EXPORT PFNGLGETINTERNALFORMATI64VPROC __glewGetInternalformati64v;
+
+GLEW_FUN_EXPORT PFNGLINVALIDATEBUFFERDATAPROC __glewInvalidateBufferData;
+GLEW_FUN_EXPORT PFNGLINVALIDATEBUFFERSUBDATAPROC __glewInvalidateBufferSubData;
+GLEW_FUN_EXPORT PFNGLINVALIDATEFRAMEBUFFERPROC __glewInvalidateFramebuffer;
+GLEW_FUN_EXPORT PFNGLINVALIDATESUBFRAMEBUFFERPROC __glewInvalidateSubFramebuffer;
+GLEW_FUN_EXPORT PFNGLINVALIDATETEXIMAGEPROC __glewInvalidateTexImage;
+GLEW_FUN_EXPORT PFNGLINVALIDATETEXSUBIMAGEPROC __glewInvalidateTexSubImage;
+
+GLEW_FUN_EXPORT PFNGLFLUSHMAPPEDBUFFERRANGEPROC __glewFlushMappedBufferRange;
+GLEW_FUN_EXPORT PFNGLMAPBUFFERRANGEPROC __glewMapBufferRange;
+
+GLEW_FUN_EXPORT PFNGLCURRENTPALETTEMATRIXARBPROC __glewCurrentPaletteMatrixARB;
+GLEW_FUN_EXPORT PFNGLMATRIXINDEXPOINTERARBPROC __glewMatrixIndexPointerARB;
+GLEW_FUN_EXPORT PFNGLMATRIXINDEXUBVARBPROC __glewMatrixIndexubvARB;
+GLEW_FUN_EXPORT PFNGLMATRIXINDEXUIVARBPROC __glewMatrixIndexuivARB;
+GLEW_FUN_EXPORT PFNGLMATRIXINDEXUSVARBPROC __glewMatrixIndexusvARB;
+
+GLEW_FUN_EXPORT PFNGLBINDBUFFERSBASEPROC __glewBindBuffersBase;
+GLEW_FUN_EXPORT PFNGLBINDBUFFERSRANGEPROC __glewBindBuffersRange;
+GLEW_FUN_EXPORT PFNGLBINDIMAGETEXTURESPROC __glewBindImageTextures;
+GLEW_FUN_EXPORT PFNGLBINDSAMPLERSPROC __glewBindSamplers;
+GLEW_FUN_EXPORT PFNGLBINDTEXTURESPROC __glewBindTextures;
+GLEW_FUN_EXPORT PFNGLBINDVERTEXBUFFERSPROC __glewBindVertexBuffers;
+
+GLEW_FUN_EXPORT PFNGLMULTIDRAWARRAYSINDIRECTPROC __glewMultiDrawArraysIndirect;
+GLEW_FUN_EXPORT PFNGLMULTIDRAWELEMENTSINDIRECTPROC __glewMultiDrawElementsIndirect;
+
+GLEW_FUN_EXPORT PFNGLSAMPLECOVERAGEARBPROC __glewSampleCoverageARB;
+
+GLEW_FUN_EXPORT PFNGLACTIVETEXTUREARBPROC __glewActiveTextureARB;
+GLEW_FUN_EXPORT PFNGLCLIENTACTIVETEXTUREARBPROC __glewClientActiveTextureARB;
+GLEW_FUN_EXPORT PFNGLMULTITEXCOORD1DARBPROC __glewMultiTexCoord1dARB;
+GLEW_FUN_EXPORT PFNGLMULTITEXCOORD1DVARBPROC __glewMultiTexCoord1dvARB;
+GLEW_FUN_EXPORT PFNGLMULTITEXCOORD1FARBPROC __glewMultiTexCoord1fARB;
+GLEW_FUN_EXPORT PFNGLMULTITEXCOORD1FVARBPROC __glewMultiTexCoord1fvARB;
+GLEW_FUN_EXPORT PFNGLMULTITEXCOORD1IARBPROC __glewMultiTexCoord1iARB;
+GLEW_FUN_EXPORT PFNGLMULTITEXCOORD1IVARBPROC __glewMultiTexCoord1ivARB;
+GLEW_FUN_EXPORT PFNGLMULTITEXCOORD1SARBPROC __glewMultiTexCoord1sARB;
+GLEW_FUN_EXPORT PFNGLMULTITEXCOORD1SVARBPROC __glewMultiTexCoord1svARB;
+GLEW_FUN_EXPORT PFNGLMULTITEXCOORD2DARBPROC __glewMultiTexCoord2dARB;
+GLEW_FUN_EXPORT PFNGLMULTITEXCOORD2DVARBPROC __glewMultiTexCoord2dvARB;
+GLEW_FUN_EXPORT PFNGLMULTITEXCOORD2FARBPROC __glewMultiTexCoord2fARB;
+GLEW_FUN_EXPORT PFNGLMULTITEXCOORD2FVARBPROC __glewMultiTexCoord2fvARB;
+GLEW_FUN_EXPORT PFNGLMULTITEXCOORD2IARBPROC __glewMultiTexCoord2iARB;
+GLEW_FUN_EXPORT PFNGLMULTITEXCOORD2IVARBPROC __glewMultiTexCoord2ivARB;
+GLEW_FUN_EXPORT PFNGLMULTITEXCOORD2SARBPROC __glewMultiTexCoord2sARB;
+GLEW_FUN_EXPORT PFNGLMULTITEXCOORD2SVARBPROC __glewMultiTexCoord2svARB;
+GLEW_FUN_EXPORT PFNGLMULTITEXCOORD3DARBPROC __glewMultiTexCoord3dARB;
+GLEW_FUN_EXPORT PFNGLMULTITEXCOORD3DVARBPROC __glewMultiTexCoord3dvARB;
+GLEW_FUN_EXPORT PFNGLMULTITEXCOORD3FARBPROC __glewMultiTexCoord3fARB;
+GLEW_FUN_EXPORT PFNGLMULTITEXCOORD3FVARBPROC __glewMultiTexCoord3fvARB;
+GLEW_FUN_EXPORT PFNGLMULTITEXCOORD3IARBPROC __glewMultiTexCoord3iARB;
+GLEW_FUN_EXPORT PFNGLMULTITEXCOORD3IVARBPROC __glewMultiTexCoord3ivARB;
+GLEW_FUN_EXPORT PFNGLMULTITEXCOORD3SARBPROC __glewMultiTexCoord3sARB;
+GLEW_FUN_EXPORT PFNGLMULTITEXCOORD3SVARBPROC __glewMultiTexCoord3svARB;
+GLEW_FUN_EXPORT PFNGLMULTITEXCOORD4DARBPROC __glewMultiTexCoord4dARB;
+GLEW_FUN_EXPORT PFNGLMULTITEXCOORD4DVARBPROC __glewMultiTexCoord4dvARB;
+GLEW_FUN_EXPORT PFNGLMULTITEXCOORD4FARBPROC __glewMultiTexCoord4fARB;
+GLEW_FUN_EXPORT PFNGLMULTITEXCOORD4FVARBPROC __glewMultiTexCoord4fvARB;
+GLEW_FUN_EXPORT PFNGLMULTITEXCOORD4IARBPROC __glewMultiTexCoord4iARB;
+GLEW_FUN_EXPORT PFNGLMULTITEXCOORD4IVARBPROC __glewMultiTexCoord4ivARB;
+GLEW_FUN_EXPORT PFNGLMULTITEXCOORD4SARBPROC __glewMultiTexCoord4sARB;
+GLEW_FUN_EXPORT PFNGLMULTITEXCOORD4SVARBPROC __glewMultiTexCoord4svARB;
+
+GLEW_FUN_EXPORT PFNGLBEGINQUERYARBPROC __glewBeginQueryARB;
+GLEW_FUN_EXPORT PFNGLDELETEQUERIESARBPROC __glewDeleteQueriesARB;
+GLEW_FUN_EXPORT PFNGLENDQUERYARBPROC __glewEndQueryARB;
+GLEW_FUN_EXPORT PFNGLGENQUERIESARBPROC __glewGenQueriesARB;
+GLEW_FUN_EXPORT PFNGLGETQUERYOBJECTIVARBPROC __glewGetQueryObjectivARB;
+GLEW_FUN_EXPORT PFNGLGETQUERYOBJECTUIVARBPROC __glewGetQueryObjectuivARB;
+GLEW_FUN_EXPORT PFNGLGETQUERYIVARBPROC __glewGetQueryivARB;
+GLEW_FUN_EXPORT PFNGLISQUERYARBPROC __glewIsQueryARB;
+
+GLEW_FUN_EXPORT PFNGLPOINTPARAMETERFARBPROC __glewPointParameterfARB;
+GLEW_FUN_EXPORT PFNGLPOINTPARAMETERFVARBPROC __glewPointParameterfvARB;
+
+GLEW_FUN_EXPORT PFNGLGETPROGRAMINTERFACEIVPROC __glewGetProgramInterfaceiv;
+GLEW_FUN_EXPORT PFNGLGETPROGRAMRESOURCEINDEXPROC __glewGetProgramResourceIndex;
+GLEW_FUN_EXPORT PFNGLGETPROGRAMRESOURCELOCATIONPROC __glewGetProgramResourceLocation;
+GLEW_FUN_EXPORT PFNGLGETPROGRAMRESOURCELOCATIONINDEXPROC __glewGetProgramResourceLocationIndex;
+GLEW_FUN_EXPORT PFNGLGETPROGRAMRESOURCENAMEPROC __glewGetProgramResourceName;
+GLEW_FUN_EXPORT PFNGLGETPROGRAMRESOURCEIVPROC __glewGetProgramResourceiv;
+
+GLEW_FUN_EXPORT PFNGLPROVOKINGVERTEXPROC __glewProvokingVertex;
+
+GLEW_FUN_EXPORT PFNGLGETGRAPHICSRESETSTATUSARBPROC __glewGetGraphicsResetStatusARB;
+GLEW_FUN_EXPORT PFNGLGETNCOLORTABLEARBPROC __glewGetnColorTableARB;
+GLEW_FUN_EXPORT PFNGLGETNCOMPRESSEDTEXIMAGEARBPROC __glewGetnCompressedTexImageARB;
+GLEW_FUN_EXPORT PFNGLGETNCONVOLUTIONFILTERARBPROC __glewGetnConvolutionFilterARB;
+GLEW_FUN_EXPORT PFNGLGETNHISTOGRAMARBPROC __glewGetnHistogramARB;
+GLEW_FUN_EXPORT PFNGLGETNMAPDVARBPROC __glewGetnMapdvARB;
+GLEW_FUN_EXPORT PFNGLGETNMAPFVARBPROC __glewGetnMapfvARB;
+GLEW_FUN_EXPORT PFNGLGETNMAPIVARBPROC __glewGetnMapivARB;
+GLEW_FUN_EXPORT PFNGLGETNMINMAXARBPROC __glewGetnMinmaxARB;
+GLEW_FUN_EXPORT PFNGLGETNPIXELMAPFVARBPROC __glewGetnPixelMapfvARB;
+GLEW_FUN_EXPORT PFNGLGETNPIXELMAPUIVARBPROC __glewGetnPixelMapuivARB;
+GLEW_FUN_EXPORT PFNGLGETNPIXELMAPUSVARBPROC __glewGetnPixelMapusvARB;
+GLEW_FUN_EXPORT PFNGLGETNPOLYGONSTIPPLEARBPROC __glewGetnPolygonStippleARB;
+GLEW_FUN_EXPORT PFNGLGETNSEPARABLEFILTERARBPROC __glewGetnSeparableFilterARB;
+GLEW_FUN_EXPORT PFNGLGETNTEXIMAGEARBPROC __glewGetnTexImageARB;
+GLEW_FUN_EXPORT PFNGLGETNUNIFORMDVARBPROC __glewGetnUniformdvARB;
+GLEW_FUN_EXPORT PFNGLGETNUNIFORMFVARBPROC __glewGetnUniformfvARB;
+GLEW_FUN_EXPORT PFNGLGETNUNIFORMIVARBPROC __glewGetnUniformivARB;
+GLEW_FUN_EXPORT PFNGLGETNUNIFORMUIVARBPROC __glewGetnUniformuivARB;
+GLEW_FUN_EXPORT PFNGLREADNPIXELSARBPROC __glewReadnPixelsARB;
+
+GLEW_FUN_EXPORT PFNGLMINSAMPLESHADINGARBPROC __glewMinSampleShadingARB;
+
+GLEW_FUN_EXPORT PFNGLBINDSAMPLERPROC __glewBindSampler;
+GLEW_FUN_EXPORT PFNGLDELETESAMPLERSPROC __glewDeleteSamplers;
+GLEW_FUN_EXPORT PFNGLGENSAMPLERSPROC __glewGenSamplers;
+GLEW_FUN_EXPORT PFNGLGETSAMPLERPARAMETERIIVPROC __glewGetSamplerParameterIiv;
+GLEW_FUN_EXPORT PFNGLGETSAMPLERPARAMETERIUIVPROC __glewGetSamplerParameterIuiv;
+GLEW_FUN_EXPORT PFNGLGETSAMPLERPARAMETERFVPROC __glewGetSamplerParameterfv;
+GLEW_FUN_EXPORT PFNGLGETSAMPLERPARAMETERIVPROC __glewGetSamplerParameteriv;
+GLEW_FUN_EXPORT PFNGLISSAMPLERPROC __glewIsSampler;
+GLEW_FUN_EXPORT PFNGLSAMPLERPARAMETERIIVPROC __glewSamplerParameterIiv;
+GLEW_FUN_EXPORT PFNGLSAMPLERPARAMETERIUIVPROC __glewSamplerParameterIuiv;
+GLEW_FUN_EXPORT PFNGLSAMPLERPARAMETERFPROC __glewSamplerParameterf;
+GLEW_FUN_EXPORT PFNGLSAMPLERPARAMETERFVPROC __glewSamplerParameterfv;
+GLEW_FUN_EXPORT PFNGLSAMPLERPARAMETERIPROC __glewSamplerParameteri;
+GLEW_FUN_EXPORT PFNGLSAMPLERPARAMETERIVPROC __glewSamplerParameteriv;
+
+GLEW_FUN_EXPORT PFNGLACTIVESHADERPROGRAMPROC __glewActiveShaderProgram;
+GLEW_FUN_EXPORT PFNGLBINDPROGRAMPIPELINEPROC __glewBindProgramPipeline;
+GLEW_FUN_EXPORT PFNGLCREATESHADERPROGRAMVPROC __glewCreateShaderProgramv;
+GLEW_FUN_EXPORT PFNGLDELETEPROGRAMPIPELINESPROC __glewDeleteProgramPipelines;
+GLEW_FUN_EXPORT PFNGLGENPROGRAMPIPELINESPROC __glewGenProgramPipelines;
+GLEW_FUN_EXPORT PFNGLGETPROGRAMPIPELINEINFOLOGPROC __glewGetProgramPipelineInfoLog;
+GLEW_FUN_EXPORT PFNGLGETPROGRAMPIPELINEIVPROC __glewGetProgramPipelineiv;
+GLEW_FUN_EXPORT PFNGLISPROGRAMPIPELINEPROC __glewIsProgramPipeline;
+GLEW_FUN_EXPORT PFNGLPROGRAMUNIFORM1DPROC __glewProgramUniform1d;
+GLEW_FUN_EXPORT PFNGLPROGRAMUNIFORM1DVPROC __glewProgramUniform1dv;
+GLEW_FUN_EXPORT PFNGLPROGRAMUNIFORM1FPROC __glewProgramUniform1f;
+GLEW_FUN_EXPORT PFNGLPROGRAMUNIFORM1FVPROC __glewProgramUniform1fv;
+GLEW_FUN_EXPORT PFNGLPROGRAMUNIFORM1IPROC __glewProgramUniform1i;
+GLEW_FUN_EXPORT PFNGLPROGRAMUNIFORM1IVPROC __glewProgramUniform1iv;
+GLEW_FUN_EXPORT PFNGLPROGRAMUNIFORM1UIPROC __glewProgramUniform1ui;
+GLEW_FUN_EXPORT PFNGLPROGRAMUNIFORM1UIVPROC __glewProgramUniform1uiv;
+GLEW_FUN_EXPORT PFNGLPROGRAMUNIFORM2DPROC __glewProgramUniform2d;
+GLEW_FUN_EXPORT PFNGLPROGRAMUNIFORM2DVPROC __glewProgramUniform2dv;
+GLEW_FUN_EXPORT PFNGLPROGRAMUNIFORM2FPROC __glewProgramUniform2f;
+GLEW_FUN_EXPORT PFNGLPROGRAMUNIFORM2FVPROC __glewProgramUniform2fv;
+GLEW_FUN_EXPORT PFNGLPROGRAMUNIFORM2IPROC __glewProgramUniform2i;
+GLEW_FUN_EXPORT PFNGLPROGRAMUNIFORM2IVPROC __glewProgramUniform2iv;
+GLEW_FUN_EXPORT PFNGLPROGRAMUNIFORM2UIPROC __glewProgramUniform2ui;
+GLEW_FUN_EXPORT PFNGLPROGRAMUNIFORM2UIVPROC __glewProgramUniform2uiv;
+GLEW_FUN_EXPORT PFNGLPROGRAMUNIFORM3DPROC __glewProgramUniform3d;
+GLEW_FUN_EXPORT PFNGLPROGRAMUNIFORM3DVPROC __glewProgramUniform3dv;
+GLEW_FUN_EXPORT PFNGLPROGRAMUNIFORM3FPROC __glewProgramUniform3f;
+GLEW_FUN_EXPORT PFNGLPROGRAMUNIFORM3FVPROC __glewProgramUniform3fv;
+GLEW_FUN_EXPORT PFNGLPROGRAMUNIFORM3IPROC __glewProgramUniform3i;
+GLEW_FUN_EXPORT PFNGLPROGRAMUNIFORM3IVPROC __glewProgramUniform3iv;
+GLEW_FUN_EXPORT PFNGLPROGRAMUNIFORM3UIPROC __glewProgramUniform3ui;
+GLEW_FUN_EXPORT PFNGLPROGRAMUNIFORM3UIVPROC __glewProgramUniform3uiv;
+GLEW_FUN_EXPORT PFNGLPROGRAMUNIFORM4DPROC __glewProgramUniform4d;
+GLEW_FUN_EXPORT PFNGLPROGRAMUNIFORM4DVPROC __glewProgramUniform4dv;
+GLEW_FUN_EXPORT PFNGLPROGRAMUNIFORM4FPROC __glewProgramUniform4f;
+GLEW_FUN_EXPORT PFNGLPROGRAMUNIFORM4FVPROC __glewProgramUniform4fv;
+GLEW_FUN_EXPORT PFNGLPROGRAMUNIFORM4IPROC __glewProgramUniform4i;
+GLEW_FUN_EXPORT PFNGLPROGRAMUNIFORM4IVPROC __glewProgramUniform4iv;
+GLEW_FUN_EXPORT PFNGLPROGRAMUNIFORM4UIPROC __glewProgramUniform4ui;
+GLEW_FUN_EXPORT PFNGLPROGRAMUNIFORM4UIVPROC __glewProgramUniform4uiv;
+GLEW_FUN_EXPORT PFNGLPROGRAMUNIFORMMATRIX2DVPROC __glewProgramUniformMatrix2dv;
+GLEW_FUN_EXPORT PFNGLPROGRAMUNIFORMMATRIX2FVPROC __glewProgramUniformMatrix2fv;
+GLEW_FUN_EXPORT PFNGLPROGRAMUNIFORMMATRIX2X3DVPROC __glewProgramUniformMatrix2x3dv;
+GLEW_FUN_EXPORT PFNGLPROGRAMUNIFORMMATRIX2X3FVPROC __glewProgramUniformMatrix2x3fv;
+GLEW_FUN_EXPORT PFNGLPROGRAMUNIFORMMATRIX2X4DVPROC __glewProgramUniformMatrix2x4dv;
+GLEW_FUN_EXPORT PFNGLPROGRAMUNIFORMMATRIX2X4FVPROC __glewProgramUniformMatrix2x4fv;
+GLEW_FUN_EXPORT PFNGLPROGRAMUNIFORMMATRIX3DVPROC __glewProgramUniformMatrix3dv;
+GLEW_FUN_EXPORT PFNGLPROGRAMUNIFORMMATRIX3FVPROC __glewProgramUniformMatrix3fv;
+GLEW_FUN_EXPORT PFNGLPROGRAMUNIFORMMATRIX3X2DVPROC __glewProgramUniformMatrix3x2dv;
+GLEW_FUN_EXPORT PFNGLPROGRAMUNIFORMMATRIX3X2FVPROC __glewProgramUniformMatrix3x2fv;
+GLEW_FUN_EXPORT PFNGLPROGRAMUNIFORMMATRIX3X4DVPROC __glewProgramUniformMatrix3x4dv;
+GLEW_FUN_EXPORT PFNGLPROGRAMUNIFORMMATRIX3X4FVPROC __glewProgramUniformMatrix3x4fv;
+GLEW_FUN_EXPORT PFNGLPROGRAMUNIFORMMATRIX4DVPROC __glewProgramUniformMatrix4dv;
+GLEW_FUN_EXPORT PFNGLPROGRAMUNIFORMMATRIX4FVPROC __glewProgramUniformMatrix4fv;
+GLEW_FUN_EXPORT PFNGLPROGRAMUNIFORMMATRIX4X2DVPROC __glewProgramUniformMatrix4x2dv;
+GLEW_FUN_EXPORT PFNGLPROGRAMUNIFORMMATRIX4X2FVPROC __glewProgramUniformMatrix4x2fv;
+GLEW_FUN_EXPORT PFNGLPROGRAMUNIFORMMATRIX4X3DVPROC __glewProgramUniformMatrix4x3dv;
+GLEW_FUN_EXPORT PFNGLPROGRAMUNIFORMMATRIX4X3FVPROC __glewProgramUniformMatrix4x3fv;
+GLEW_FUN_EXPORT PFNGLUSEPROGRAMSTAGESPROC __glewUseProgramStages;
+GLEW_FUN_EXPORT PFNGLVALIDATEPROGRAMPIPELINEPROC __glewValidateProgramPipeline;
+
+GLEW_FUN_EXPORT PFNGLGETACTIVEATOMICCOUNTERBUFFERIVPROC __glewGetActiveAtomicCounterBufferiv;
+
+GLEW_FUN_EXPORT PFNGLBINDIMAGETEXTUREPROC __glewBindImageTexture;
+GLEW_FUN_EXPORT PFNGLMEMORYBARRIERPROC __glewMemoryBarrier;
+
+GLEW_FUN_EXPORT PFNGLATTACHOBJECTARBPROC __glewAttachObjectARB;
+GLEW_FUN_EXPORT PFNGLCOMPILESHADERARBPROC __glewCompileShaderARB;
+GLEW_FUN_EXPORT PFNGLCREATEPROGRAMOBJECTARBPROC __glewCreateProgramObjectARB;
+GLEW_FUN_EXPORT PFNGLCREATESHADEROBJECTARBPROC __glewCreateShaderObjectARB;
+GLEW_FUN_EXPORT PFNGLDELETEOBJECTARBPROC __glewDeleteObjectARB;
+GLEW_FUN_EXPORT PFNGLDETACHOBJECTARBPROC __glewDetachObjectARB;
+GLEW_FUN_EXPORT PFNGLGETACTIVEUNIFORMARBPROC __glewGetActiveUniformARB;
+GLEW_FUN_EXPORT PFNGLGETATTACHEDOBJECTSARBPROC __glewGetAttachedObjectsARB;
+GLEW_FUN_EXPORT PFNGLGETHANDLEARBPROC __glewGetHandleARB;
+GLEW_FUN_EXPORT PFNGLGETINFOLOGARBPROC __glewGetInfoLogARB;
+GLEW_FUN_EXPORT PFNGLGETOBJECTPARAMETERFVARBPROC __glewGetObjectParameterfvARB;
+GLEW_FUN_EXPORT PFNGLGETOBJECTPARAMETERIVARBPROC __glewGetObjectParameterivARB;
+GLEW_FUN_EXPORT PFNGLGETSHADERSOURCEARBPROC __glewGetShaderSourceARB;
+GLEW_FUN_EXPORT PFNGLGETUNIFORMLOCATIONARBPROC __glewGetUniformLocationARB;
+GLEW_FUN_EXPORT PFNGLGETUNIFORMFVARBPROC __glewGetUniformfvARB;
+GLEW_FUN_EXPORT PFNGLGETUNIFORMIVARBPROC __glewGetUniformivARB;
+GLEW_FUN_EXPORT PFNGLLINKPROGRAMARBPROC __glewLinkProgramARB;
+GLEW_FUN_EXPORT PFNGLSHADERSOURCEARBPROC __glewShaderSourceARB;
+GLEW_FUN_EXPORT PFNGLUNIFORM1FARBPROC __glewUniform1fARB;
+GLEW_FUN_EXPORT PFNGLUNIFORM1FVARBPROC __glewUniform1fvARB;
+GLEW_FUN_EXPORT PFNGLUNIFORM1IARBPROC __glewUniform1iARB;
+GLEW_FUN_EXPORT PFNGLUNIFORM1IVARBPROC __glewUniform1ivARB;
+GLEW_FUN_EXPORT PFNGLUNIFORM2FARBPROC __glewUniform2fARB;
+GLEW_FUN_EXPORT PFNGLUNIFORM2FVARBPROC __glewUniform2fvARB;
+GLEW_FUN_EXPORT PFNGLUNIFORM2IARBPROC __glewUniform2iARB;
+GLEW_FUN_EXPORT PFNGLUNIFORM2IVARBPROC __glewUniform2ivARB;
+GLEW_FUN_EXPORT PFNGLUNIFORM3FARBPROC __glewUniform3fARB;
+GLEW_FUN_EXPORT PFNGLUNIFORM3FVARBPROC __glewUniform3fvARB;
+GLEW_FUN_EXPORT PFNGLUNIFORM3IARBPROC __glewUniform3iARB;
+GLEW_FUN_EXPORT PFNGLUNIFORM3IVARBPROC __glewUniform3ivARB;
+GLEW_FUN_EXPORT PFNGLUNIFORM4FARBPROC __glewUniform4fARB;
+GLEW_FUN_EXPORT PFNGLUNIFORM4FVARBPROC __glewUniform4fvARB;
+GLEW_FUN_EXPORT PFNGLUNIFORM4IARBPROC __glewUniform4iARB;
+GLEW_FUN_EXPORT PFNGLUNIFORM4IVARBPROC __glewUniform4ivARB;
+GLEW_FUN_EXPORT PFNGLUNIFORMMATRIX2FVARBPROC __glewUniformMatrix2fvARB;
+GLEW_FUN_EXPORT PFNGLUNIFORMMATRIX3FVARBPROC __glewUniformMatrix3fvARB;
+GLEW_FUN_EXPORT PFNGLUNIFORMMATRIX4FVARBPROC __glewUniformMatrix4fvARB;
+GLEW_FUN_EXPORT PFNGLUSEPROGRAMOBJECTARBPROC __glewUseProgramObjectARB;
+GLEW_FUN_EXPORT PFNGLVALIDATEPROGRAMARBPROC __glewValidateProgramARB;
+
+GLEW_FUN_EXPORT PFNGLSHADERSTORAGEBLOCKBINDINGPROC __glewShaderStorageBlockBinding;
+
+GLEW_FUN_EXPORT PFNGLGETACTIVESUBROUTINENAMEPROC __glewGetActiveSubroutineName;
+GLEW_FUN_EXPORT PFNGLGETACTIVESUBROUTINEUNIFORMNAMEPROC __glewGetActiveSubroutineUniformName;
+GLEW_FUN_EXPORT PFNGLGETACTIVESUBROUTINEUNIFORMIVPROC __glewGetActiveSubroutineUniformiv;
+GLEW_FUN_EXPORT PFNGLGETPROGRAMSTAGEIVPROC __glewGetProgramStageiv;
+GLEW_FUN_EXPORT PFNGLGETSUBROUTINEINDEXPROC __glewGetSubroutineIndex;
+GLEW_FUN_EXPORT PFNGLGETSUBROUTINEUNIFORMLOCATIONPROC __glewGetSubroutineUniformLocation;
+GLEW_FUN_EXPORT PFNGLGETUNIFORMSUBROUTINEUIVPROC __glewGetUniformSubroutineuiv;
+GLEW_FUN_EXPORT PFNGLUNIFORMSUBROUTINESUIVPROC __glewUniformSubroutinesuiv;
+
+GLEW_FUN_EXPORT PFNGLCOMPILESHADERINCLUDEARBPROC __glewCompileShaderIncludeARB;
+GLEW_FUN_EXPORT PFNGLDELETENAMEDSTRINGARBPROC __glewDeleteNamedStringARB;
+GLEW_FUN_EXPORT PFNGLGETNAMEDSTRINGARBPROC __glewGetNamedStringARB;
+GLEW_FUN_EXPORT PFNGLGETNAMEDSTRINGIVARBPROC __glewGetNamedStringivARB;
+GLEW_FUN_EXPORT PFNGLISNAMEDSTRINGARBPROC __glewIsNamedStringARB;
+GLEW_FUN_EXPORT PFNGLNAMEDSTRINGARBPROC __glewNamedStringARB;
+
+GLEW_FUN_EXPORT PFNGLBUFFERPAGECOMMITMENTARBPROC __glewBufferPageCommitmentARB;
+
+GLEW_FUN_EXPORT PFNGLTEXPAGECOMMITMENTARBPROC __glewTexPageCommitmentARB;
+GLEW_FUN_EXPORT PFNGLTEXTUREPAGECOMMITMENTEXTPROC __glewTexturePageCommitmentEXT;
+
+GLEW_FUN_EXPORT PFNGLCLIENTWAITSYNCPROC __glewClientWaitSync;
+GLEW_FUN_EXPORT PFNGLDELETESYNCPROC __glewDeleteSync;
+GLEW_FUN_EXPORT PFNGLFENCESYNCPROC __glewFenceSync;
+GLEW_FUN_EXPORT PFNGLGETINTEGER64VPROC __glewGetInteger64v;
+GLEW_FUN_EXPORT PFNGLGETSYNCIVPROC __glewGetSynciv;
+GLEW_FUN_EXPORT PFNGLISSYNCPROC __glewIsSync;
+GLEW_FUN_EXPORT PFNGLWAITSYNCPROC __glewWaitSync;
+
+GLEW_FUN_EXPORT PFNGLPATCHPARAMETERFVPROC __glewPatchParameterfv;
+GLEW_FUN_EXPORT PFNGLPATCHPARAMETERIPROC __glewPatchParameteri;
+
+GLEW_FUN_EXPORT PFNGLTEXTUREBARRIERPROC __glewTextureBarrier;
+
+GLEW_FUN_EXPORT PFNGLTEXBUFFERARBPROC __glewTexBufferARB;
+
+GLEW_FUN_EXPORT PFNGLTEXBUFFERRANGEPROC __glewTexBufferRange;
+GLEW_FUN_EXPORT PFNGLTEXTUREBUFFERRANGEEXTPROC __glewTextureBufferRangeEXT;
+
+GLEW_FUN_EXPORT PFNGLCOMPRESSEDTEXIMAGE1DARBPROC __glewCompressedTexImage1DARB;
+GLEW_FUN_EXPORT PFNGLCOMPRESSEDTEXIMAGE2DARBPROC __glewCompressedTexImage2DARB;
+GLEW_FUN_EXPORT PFNGLCOMPRESSEDTEXIMAGE3DARBPROC __glewCompressedTexImage3DARB;
+GLEW_FUN_EXPORT PFNGLCOMPRESSEDTEXSUBIMAGE1DARBPROC __glewCompressedTexSubImage1DARB;
+GLEW_FUN_EXPORT PFNGLCOMPRESSEDTEXSUBIMAGE2DARBPROC __glewCompressedTexSubImage2DARB;
+GLEW_FUN_EXPORT PFNGLCOMPRESSEDTEXSUBIMAGE3DARBPROC __glewCompressedTexSubImage3DARB;
+GLEW_FUN_EXPORT PFNGLGETCOMPRESSEDTEXIMAGEARBPROC __glewGetCompressedTexImageARB;
+
+GLEW_FUN_EXPORT PFNGLGETMULTISAMPLEFVPROC __glewGetMultisamplefv;
+GLEW_FUN_EXPORT PFNGLSAMPLEMASKIPROC __glewSampleMaski;
+GLEW_FUN_EXPORT PFNGLTEXIMAGE2DMULTISAMPLEPROC __glewTexImage2DMultisample;
+GLEW_FUN_EXPORT PFNGLTEXIMAGE3DMULTISAMPLEPROC __glewTexImage3DMultisample;
+
+GLEW_FUN_EXPORT PFNGLTEXSTORAGE1DPROC __glewTexStorage1D;
+GLEW_FUN_EXPORT PFNGLTEXSTORAGE2DPROC __glewTexStorage2D;
+GLEW_FUN_EXPORT PFNGLTEXSTORAGE3DPROC __glewTexStorage3D;
+GLEW_FUN_EXPORT PFNGLTEXTURESTORAGE1DEXTPROC __glewTextureStorage1DEXT;
+GLEW_FUN_EXPORT PFNGLTEXTURESTORAGE2DEXTPROC __glewTextureStorage2DEXT;
+GLEW_FUN_EXPORT PFNGLTEXTURESTORAGE3DEXTPROC __glewTextureStorage3DEXT;
+
+GLEW_FUN_EXPORT PFNGLTEXSTORAGE2DMULTISAMPLEPROC __glewTexStorage2DMultisample;
+GLEW_FUN_EXPORT PFNGLTEXSTORAGE3DMULTISAMPLEPROC __glewTexStorage3DMultisample;
+GLEW_FUN_EXPORT PFNGLTEXTURESTORAGE2DMULTISAMPLEEXTPROC __glewTextureStorage2DMultisampleEXT;
+GLEW_FUN_EXPORT PFNGLTEXTURESTORAGE3DMULTISAMPLEEXTPROC __glewTextureStorage3DMultisampleEXT;
+
+GLEW_FUN_EXPORT PFNGLTEXTUREVIEWPROC __glewTextureView;
+
+GLEW_FUN_EXPORT PFNGLGETQUERYOBJECTI64VPROC __glewGetQueryObjecti64v;
+GLEW_FUN_EXPORT PFNGLGETQUERYOBJECTUI64VPROC __glewGetQueryObjectui64v;
+GLEW_FUN_EXPORT PFNGLQUERYCOUNTERPROC __glewQueryCounter;
+
+GLEW_FUN_EXPORT PFNGLBINDTRANSFORMFEEDBACKPROC __glewBindTransformFeedback;
+GLEW_FUN_EXPORT PFNGLDELETETRANSFORMFEEDBACKSPROC __glewDeleteTransformFeedbacks;
+GLEW_FUN_EXPORT PFNGLDRAWTRANSFORMFEEDBACKPROC __glewDrawTransformFeedback;
+GLEW_FUN_EXPORT PFNGLGENTRANSFORMFEEDBACKSPROC __glewGenTransformFeedbacks;
+GLEW_FUN_EXPORT PFNGLISTRANSFORMFEEDBACKPROC __glewIsTransformFeedback;
+GLEW_FUN_EXPORT PFNGLPAUSETRANSFORMFEEDBACKPROC __glewPauseTransformFeedback;
+GLEW_FUN_EXPORT PFNGLRESUMETRANSFORMFEEDBACKPROC __glewResumeTransformFeedback;
+
+GLEW_FUN_EXPORT PFNGLBEGINQUERYINDEXEDPROC __glewBeginQueryIndexed;
+GLEW_FUN_EXPORT PFNGLDRAWTRANSFORMFEEDBACKSTREAMPROC __glewDrawTransformFeedbackStream;
+GLEW_FUN_EXPORT PFNGLENDQUERYINDEXEDPROC __glewEndQueryIndexed;
+GLEW_FUN_EXPORT PFNGLGETQUERYINDEXEDIVPROC __glewGetQueryIndexediv;
+
+GLEW_FUN_EXPORT PFNGLDRAWTRANSFORMFEEDBACKINSTANCEDPROC __glewDrawTransformFeedbackInstanced;
+GLEW_FUN_EXPORT PFNGLDRAWTRANSFORMFEEDBACKSTREAMINSTANCEDPROC __glewDrawTransformFeedbackStreamInstanced;
+
+GLEW_FUN_EXPORT PFNGLLOADTRANSPOSEMATRIXDARBPROC __glewLoadTransposeMatrixdARB;
+GLEW_FUN_EXPORT PFNGLLOADTRANSPOSEMATRIXFARBPROC __glewLoadTransposeMatrixfARB;
+GLEW_FUN_EXPORT PFNGLMULTTRANSPOSEMATRIXDARBPROC __glewMultTransposeMatrixdARB;
+GLEW_FUN_EXPORT PFNGLMULTTRANSPOSEMATRIXFARBPROC __glewMultTransposeMatrixfARB;
+
+GLEW_FUN_EXPORT PFNGLBINDBUFFERBASEPROC __glewBindBufferBase;
+GLEW_FUN_EXPORT PFNGLBINDBUFFERRANGEPROC __glewBindBufferRange;
+GLEW_FUN_EXPORT PFNGLGETACTIVEUNIFORMBLOCKNAMEPROC __glewGetActiveUniformBlockName;
+GLEW_FUN_EXPORT PFNGLGETACTIVEUNIFORMBLOCKIVPROC __glewGetActiveUniformBlockiv;
+GLEW_FUN_EXPORT PFNGLGETACTIVEUNIFORMNAMEPROC __glewGetActiveUniformName;
+GLEW_FUN_EXPORT PFNGLGETACTIVEUNIFORMSIVPROC __glewGetActiveUniformsiv;
+GLEW_FUN_EXPORT PFNGLGETINTEGERI_VPROC __glewGetIntegeri_v;
+GLEW_FUN_EXPORT PFNGLGETUNIFORMBLOCKINDEXPROC __glewGetUniformBlockIndex;
+GLEW_FUN_EXPORT PFNGLGETUNIFORMINDICESPROC __glewGetUniformIndices;
+GLEW_FUN_EXPORT PFNGLUNIFORMBLOCKBINDINGPROC __glewUniformBlockBinding;
+
+GLEW_FUN_EXPORT PFNGLBINDVERTEXARRAYPROC __glewBindVertexArray;
+GLEW_FUN_EXPORT PFNGLDELETEVERTEXARRAYSPROC __glewDeleteVertexArrays;
+GLEW_FUN_EXPORT PFNGLGENVERTEXARRAYSPROC __glewGenVertexArrays;
+GLEW_FUN_EXPORT PFNGLISVERTEXARRAYPROC __glewIsVertexArray;
+
+GLEW_FUN_EXPORT PFNGLGETVERTEXATTRIBLDVPROC __glewGetVertexAttribLdv;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIBL1DPROC __glewVertexAttribL1d;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIBL1DVPROC __glewVertexAttribL1dv;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIBL2DPROC __glewVertexAttribL2d;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIBL2DVPROC __glewVertexAttribL2dv;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIBL3DPROC __glewVertexAttribL3d;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIBL3DVPROC __glewVertexAttribL3dv;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIBL4DPROC __glewVertexAttribL4d;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIBL4DVPROC __glewVertexAttribL4dv;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIBLPOINTERPROC __glewVertexAttribLPointer;
+
+GLEW_FUN_EXPORT PFNGLBINDVERTEXBUFFERPROC __glewBindVertexBuffer;
+GLEW_FUN_EXPORT PFNGLVERTEXARRAYBINDVERTEXBUFFEREXTPROC __glewVertexArrayBindVertexBufferEXT;
+GLEW_FUN_EXPORT PFNGLVERTEXARRAYVERTEXATTRIBBINDINGEXTPROC __glewVertexArrayVertexAttribBindingEXT;
+GLEW_FUN_EXPORT PFNGLVERTEXARRAYVERTEXATTRIBFORMATEXTPROC __glewVertexArrayVertexAttribFormatEXT;
+GLEW_FUN_EXPORT PFNGLVERTEXARRAYVERTEXATTRIBIFORMATEXTPROC __glewVertexArrayVertexAttribIFormatEXT;
+GLEW_FUN_EXPORT PFNGLVERTEXARRAYVERTEXATTRIBLFORMATEXTPROC __glewVertexArrayVertexAttribLFormatEXT;
+GLEW_FUN_EXPORT PFNGLVERTEXARRAYVERTEXBINDINGDIVISOREXTPROC __glewVertexArrayVertexBindingDivisorEXT;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIBBINDINGPROC __glewVertexAttribBinding;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIBFORMATPROC __glewVertexAttribFormat;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIBIFORMATPROC __glewVertexAttribIFormat;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIBLFORMATPROC __glewVertexAttribLFormat;
+GLEW_FUN_EXPORT PFNGLVERTEXBINDINGDIVISORPROC __glewVertexBindingDivisor;
+
+GLEW_FUN_EXPORT PFNGLVERTEXBLENDARBPROC __glewVertexBlendARB;
+GLEW_FUN_EXPORT PFNGLWEIGHTPOINTERARBPROC __glewWeightPointerARB;
+GLEW_FUN_EXPORT PFNGLWEIGHTBVARBPROC __glewWeightbvARB;
+GLEW_FUN_EXPORT PFNGLWEIGHTDVARBPROC __glewWeightdvARB;
+GLEW_FUN_EXPORT PFNGLWEIGHTFVARBPROC __glewWeightfvARB;
+GLEW_FUN_EXPORT PFNGLWEIGHTIVARBPROC __glewWeightivARB;
+GLEW_FUN_EXPORT PFNGLWEIGHTSVARBPROC __glewWeightsvARB;
+GLEW_FUN_EXPORT PFNGLWEIGHTUBVARBPROC __glewWeightubvARB;
+GLEW_FUN_EXPORT PFNGLWEIGHTUIVARBPROC __glewWeightuivARB;
+GLEW_FUN_EXPORT PFNGLWEIGHTUSVARBPROC __glewWeightusvARB;
+
+GLEW_FUN_EXPORT PFNGLBINDBUFFERARBPROC __glewBindBufferARB;
+GLEW_FUN_EXPORT PFNGLBUFFERDATAARBPROC __glewBufferDataARB;
+GLEW_FUN_EXPORT PFNGLBUFFERSUBDATAARBPROC __glewBufferSubDataARB;
+GLEW_FUN_EXPORT PFNGLDELETEBUFFERSARBPROC __glewDeleteBuffersARB;
+GLEW_FUN_EXPORT PFNGLGENBUFFERSARBPROC __glewGenBuffersARB;
+GLEW_FUN_EXPORT PFNGLGETBUFFERPARAMETERIVARBPROC __glewGetBufferParameterivARB;
+GLEW_FUN_EXPORT PFNGLGETBUFFERPOINTERVARBPROC __glewGetBufferPointervARB;
+GLEW_FUN_EXPORT PFNGLGETBUFFERSUBDATAARBPROC __glewGetBufferSubDataARB;
+GLEW_FUN_EXPORT PFNGLISBUFFERARBPROC __glewIsBufferARB;
+GLEW_FUN_EXPORT PFNGLMAPBUFFERARBPROC __glewMapBufferARB;
+GLEW_FUN_EXPORT PFNGLUNMAPBUFFERARBPROC __glewUnmapBufferARB;
+
+GLEW_FUN_EXPORT PFNGLBINDPROGRAMARBPROC __glewBindProgramARB;
+GLEW_FUN_EXPORT PFNGLDELETEPROGRAMSARBPROC __glewDeleteProgramsARB;
+GLEW_FUN_EXPORT PFNGLDISABLEVERTEXATTRIBARRAYARBPROC __glewDisableVertexAttribArrayARB;
+GLEW_FUN_EXPORT PFNGLENABLEVERTEXATTRIBARRAYARBPROC __glewEnableVertexAttribArrayARB;
+GLEW_FUN_EXPORT PFNGLGENPROGRAMSARBPROC __glewGenProgramsARB;
+GLEW_FUN_EXPORT PFNGLGETPROGRAMENVPARAMETERDVARBPROC __glewGetProgramEnvParameterdvARB;
+GLEW_FUN_EXPORT PFNGLGETPROGRAMENVPARAMETERFVARBPROC __glewGetProgramEnvParameterfvARB;
+GLEW_FUN_EXPORT PFNGLGETPROGRAMLOCALPARAMETERDVARBPROC __glewGetProgramLocalParameterdvARB;
+GLEW_FUN_EXPORT PFNGLGETPROGRAMLOCALPARAMETERFVARBPROC __glewGetProgramLocalParameterfvARB;
+GLEW_FUN_EXPORT PFNGLGETPROGRAMSTRINGARBPROC __glewGetProgramStringARB;
+GLEW_FUN_EXPORT PFNGLGETPROGRAMIVARBPROC __glewGetProgramivARB;
+GLEW_FUN_EXPORT PFNGLGETVERTEXATTRIBPOINTERVARBPROC __glewGetVertexAttribPointervARB;
+GLEW_FUN_EXPORT PFNGLGETVERTEXATTRIBDVARBPROC __glewGetVertexAttribdvARB;
+GLEW_FUN_EXPORT PFNGLGETVERTEXATTRIBFVARBPROC __glewGetVertexAttribfvARB;
+GLEW_FUN_EXPORT PFNGLGETVERTEXATTRIBIVARBPROC __glewGetVertexAttribivARB;
+GLEW_FUN_EXPORT PFNGLISPROGRAMARBPROC __glewIsProgramARB;
+GLEW_FUN_EXPORT PFNGLPROGRAMENVPARAMETER4DARBPROC __glewProgramEnvParameter4dARB;
+GLEW_FUN_EXPORT PFNGLPROGRAMENVPARAMETER4DVARBPROC __glewProgramEnvParameter4dvARB;
+GLEW_FUN_EXPORT PFNGLPROGRAMENVPARAMETER4FARBPROC __glewProgramEnvParameter4fARB;
+GLEW_FUN_EXPORT PFNGLPROGRAMENVPARAMETER4FVARBPROC __glewProgramEnvParameter4fvARB;
+GLEW_FUN_EXPORT PFNGLPROGRAMLOCALPARAMETER4DARBPROC __glewProgramLocalParameter4dARB;
+GLEW_FUN_EXPORT PFNGLPROGRAMLOCALPARAMETER4DVARBPROC __glewProgramLocalParameter4dvARB;
+GLEW_FUN_EXPORT PFNGLPROGRAMLOCALPARAMETER4FARBPROC __glewProgramLocalParameter4fARB;
+GLEW_FUN_EXPORT PFNGLPROGRAMLOCALPARAMETER4FVARBPROC __glewProgramLocalParameter4fvARB;
+GLEW_FUN_EXPORT PFNGLPROGRAMSTRINGARBPROC __glewProgramStringARB;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIB1DARBPROC __glewVertexAttrib1dARB;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIB1DVARBPROC __glewVertexAttrib1dvARB;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIB1FARBPROC __glewVertexAttrib1fARB;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIB1FVARBPROC __glewVertexAttrib1fvARB;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIB1SARBPROC __glewVertexAttrib1sARB;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIB1SVARBPROC __glewVertexAttrib1svARB;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIB2DARBPROC __glewVertexAttrib2dARB;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIB2DVARBPROC __glewVertexAttrib2dvARB;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIB2FARBPROC __glewVertexAttrib2fARB;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIB2FVARBPROC __glewVertexAttrib2fvARB;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIB2SARBPROC __glewVertexAttrib2sARB;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIB2SVARBPROC __glewVertexAttrib2svARB;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIB3DARBPROC __glewVertexAttrib3dARB;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIB3DVARBPROC __glewVertexAttrib3dvARB;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIB3FARBPROC __glewVertexAttrib3fARB;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIB3FVARBPROC __glewVertexAttrib3fvARB;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIB3SARBPROC __glewVertexAttrib3sARB;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIB3SVARBPROC __glewVertexAttrib3svARB;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIB4NBVARBPROC __glewVertexAttrib4NbvARB;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIB4NIVARBPROC __glewVertexAttrib4NivARB;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIB4NSVARBPROC __glewVertexAttrib4NsvARB;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIB4NUBARBPROC __glewVertexAttrib4NubARB;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIB4NUBVARBPROC __glewVertexAttrib4NubvARB;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIB4NUIVARBPROC __glewVertexAttrib4NuivARB;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIB4NUSVARBPROC __glewVertexAttrib4NusvARB;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIB4BVARBPROC __glewVertexAttrib4bvARB;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIB4DARBPROC __glewVertexAttrib4dARB;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIB4DVARBPROC __glewVertexAttrib4dvARB;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIB4FARBPROC __glewVertexAttrib4fARB;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIB4FVARBPROC __glewVertexAttrib4fvARB;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIB4IVARBPROC __glewVertexAttrib4ivARB;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIB4SARBPROC __glewVertexAttrib4sARB;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIB4SVARBPROC __glewVertexAttrib4svARB;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIB4UBVARBPROC __glewVertexAttrib4ubvARB;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIB4UIVARBPROC __glewVertexAttrib4uivARB;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIB4USVARBPROC __glewVertexAttrib4usvARB;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIBPOINTERARBPROC __glewVertexAttribPointerARB;
+
+GLEW_FUN_EXPORT PFNGLBINDATTRIBLOCATIONARBPROC __glewBindAttribLocationARB;
+GLEW_FUN_EXPORT PFNGLGETACTIVEATTRIBARBPROC __glewGetActiveAttribARB;
+GLEW_FUN_EXPORT PFNGLGETATTRIBLOCATIONARBPROC __glewGetAttribLocationARB;
+
+GLEW_FUN_EXPORT PFNGLCOLORP3UIPROC __glewColorP3ui;
+GLEW_FUN_EXPORT PFNGLCOLORP3UIVPROC __glewColorP3uiv;
+GLEW_FUN_EXPORT PFNGLCOLORP4UIPROC __glewColorP4ui;
+GLEW_FUN_EXPORT PFNGLCOLORP4UIVPROC __glewColorP4uiv;
+GLEW_FUN_EXPORT PFNGLMULTITEXCOORDP1UIPROC __glewMultiTexCoordP1ui;
+GLEW_FUN_EXPORT PFNGLMULTITEXCOORDP1UIVPROC __glewMultiTexCoordP1uiv;
+GLEW_FUN_EXPORT PFNGLMULTITEXCOORDP2UIPROC __glewMultiTexCoordP2ui;
+GLEW_FUN_EXPORT PFNGLMULTITEXCOORDP2UIVPROC __glewMultiTexCoordP2uiv;
+GLEW_FUN_EXPORT PFNGLMULTITEXCOORDP3UIPROC __glewMultiTexCoordP3ui;
+GLEW_FUN_EXPORT PFNGLMULTITEXCOORDP3UIVPROC __glewMultiTexCoordP3uiv;
+GLEW_FUN_EXPORT PFNGLMULTITEXCOORDP4UIPROC __glewMultiTexCoordP4ui;
+GLEW_FUN_EXPORT PFNGLMULTITEXCOORDP4UIVPROC __glewMultiTexCoordP4uiv;
+GLEW_FUN_EXPORT PFNGLNORMALP3UIPROC __glewNormalP3ui;
+GLEW_FUN_EXPORT PFNGLNORMALP3UIVPROC __glewNormalP3uiv;
+GLEW_FUN_EXPORT PFNGLSECONDARYCOLORP3UIPROC __glewSecondaryColorP3ui;
+GLEW_FUN_EXPORT PFNGLSECONDARYCOLORP3UIVPROC __glewSecondaryColorP3uiv;
+GLEW_FUN_EXPORT PFNGLTEXCOORDP1UIPROC __glewTexCoordP1ui;
+GLEW_FUN_EXPORT PFNGLTEXCOORDP1UIVPROC __glewTexCoordP1uiv;
+GLEW_FUN_EXPORT PFNGLTEXCOORDP2UIPROC __glewTexCoordP2ui;
+GLEW_FUN_EXPORT PFNGLTEXCOORDP2UIVPROC __glewTexCoordP2uiv;
+GLEW_FUN_EXPORT PFNGLTEXCOORDP3UIPROC __glewTexCoordP3ui;
+GLEW_FUN_EXPORT PFNGLTEXCOORDP3UIVPROC __glewTexCoordP3uiv;
+GLEW_FUN_EXPORT PFNGLTEXCOORDP4UIPROC __glewTexCoordP4ui;
+GLEW_FUN_EXPORT PFNGLTEXCOORDP4UIVPROC __glewTexCoordP4uiv;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIBP1UIPROC __glewVertexAttribP1ui;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIBP1UIVPROC __glewVertexAttribP1uiv;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIBP2UIPROC __glewVertexAttribP2ui;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIBP2UIVPROC __glewVertexAttribP2uiv;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIBP3UIPROC __glewVertexAttribP3ui;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIBP3UIVPROC __glewVertexAttribP3uiv;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIBP4UIPROC __glewVertexAttribP4ui;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIBP4UIVPROC __glewVertexAttribP4uiv;
+GLEW_FUN_EXPORT PFNGLVERTEXP2UIPROC __glewVertexP2ui;
+GLEW_FUN_EXPORT PFNGLVERTEXP2UIVPROC __glewVertexP2uiv;
+GLEW_FUN_EXPORT PFNGLVERTEXP3UIPROC __glewVertexP3ui;
+GLEW_FUN_EXPORT PFNGLVERTEXP3UIVPROC __glewVertexP3uiv;
+GLEW_FUN_EXPORT PFNGLVERTEXP4UIPROC __glewVertexP4ui;
+GLEW_FUN_EXPORT PFNGLVERTEXP4UIVPROC __glewVertexP4uiv;
+
+GLEW_FUN_EXPORT PFNGLDEPTHRANGEARRAYVPROC __glewDepthRangeArrayv;
+GLEW_FUN_EXPORT PFNGLDEPTHRANGEINDEXEDPROC __glewDepthRangeIndexed;
+GLEW_FUN_EXPORT PFNGLGETDOUBLEI_VPROC __glewGetDoublei_v;
+GLEW_FUN_EXPORT PFNGLGETFLOATI_VPROC __glewGetFloati_v;
+GLEW_FUN_EXPORT PFNGLSCISSORARRAYVPROC __glewScissorArrayv;
+GLEW_FUN_EXPORT PFNGLSCISSORINDEXEDPROC __glewScissorIndexed;
+GLEW_FUN_EXPORT PFNGLSCISSORINDEXEDVPROC __glewScissorIndexedv;
+GLEW_FUN_EXPORT PFNGLVIEWPORTARRAYVPROC __glewViewportArrayv;
+GLEW_FUN_EXPORT PFNGLVIEWPORTINDEXEDFPROC __glewViewportIndexedf;
+GLEW_FUN_EXPORT PFNGLVIEWPORTINDEXEDFVPROC __glewViewportIndexedfv;
+
+GLEW_FUN_EXPORT PFNGLWINDOWPOS2DARBPROC __glewWindowPos2dARB;
+GLEW_FUN_EXPORT PFNGLWINDOWPOS2DVARBPROC __glewWindowPos2dvARB;
+GLEW_FUN_EXPORT PFNGLWINDOWPOS2FARBPROC __glewWindowPos2fARB;
+GLEW_FUN_EXPORT PFNGLWINDOWPOS2FVARBPROC __glewWindowPos2fvARB;
+GLEW_FUN_EXPORT PFNGLWINDOWPOS2IARBPROC __glewWindowPos2iARB;
+GLEW_FUN_EXPORT PFNGLWINDOWPOS2IVARBPROC __glewWindowPos2ivARB;
+GLEW_FUN_EXPORT PFNGLWINDOWPOS2SARBPROC __glewWindowPos2sARB;
+GLEW_FUN_EXPORT PFNGLWINDOWPOS2SVARBPROC __glewWindowPos2svARB;
+GLEW_FUN_EXPORT PFNGLWINDOWPOS3DARBPROC __glewWindowPos3dARB;
+GLEW_FUN_EXPORT PFNGLWINDOWPOS3DVARBPROC __glewWindowPos3dvARB;
+GLEW_FUN_EXPORT PFNGLWINDOWPOS3FARBPROC __glewWindowPos3fARB;
+GLEW_FUN_EXPORT PFNGLWINDOWPOS3FVARBPROC __glewWindowPos3fvARB;
+GLEW_FUN_EXPORT PFNGLWINDOWPOS3IARBPROC __glewWindowPos3iARB;
+GLEW_FUN_EXPORT PFNGLWINDOWPOS3IVARBPROC __glewWindowPos3ivARB;
+GLEW_FUN_EXPORT PFNGLWINDOWPOS3SARBPROC __glewWindowPos3sARB;
+GLEW_FUN_EXPORT PFNGLWINDOWPOS3SVARBPROC __glewWindowPos3svARB;
+
+GLEW_FUN_EXPORT PFNGLDRAWBUFFERSATIPROC __glewDrawBuffersATI;
+
+GLEW_FUN_EXPORT PFNGLDRAWELEMENTARRAYATIPROC __glewDrawElementArrayATI;
+GLEW_FUN_EXPORT PFNGLDRAWRANGEELEMENTARRAYATIPROC __glewDrawRangeElementArrayATI;
+GLEW_FUN_EXPORT PFNGLELEMENTPOINTERATIPROC __glewElementPointerATI;
+
+GLEW_FUN_EXPORT PFNGLGETTEXBUMPPARAMETERFVATIPROC __glewGetTexBumpParameterfvATI;
+GLEW_FUN_EXPORT PFNGLGETTEXBUMPPARAMETERIVATIPROC __glewGetTexBumpParameterivATI;
+GLEW_FUN_EXPORT PFNGLTEXBUMPPARAMETERFVATIPROC __glewTexBumpParameterfvATI;
+GLEW_FUN_EXPORT PFNGLTEXBUMPPARAMETERIVATIPROC __glewTexBumpParameterivATI;
+
+GLEW_FUN_EXPORT PFNGLALPHAFRAGMENTOP1ATIPROC __glewAlphaFragmentOp1ATI;
+GLEW_FUN_EXPORT PFNGLALPHAFRAGMENTOP2ATIPROC __glewAlphaFragmentOp2ATI;
+GLEW_FUN_EXPORT PFNGLALPHAFRAGMENTOP3ATIPROC __glewAlphaFragmentOp3ATI;
+GLEW_FUN_EXPORT PFNGLBEGINFRAGMENTSHADERATIPROC __glewBeginFragmentShaderATI;
+GLEW_FUN_EXPORT PFNGLBINDFRAGMENTSHADERATIPROC __glewBindFragmentShaderATI;
+GLEW_FUN_EXPORT PFNGLCOLORFRAGMENTOP1ATIPROC __glewColorFragmentOp1ATI;
+GLEW_FUN_EXPORT PFNGLCOLORFRAGMENTOP2ATIPROC __glewColorFragmentOp2ATI;
+GLEW_FUN_EXPORT PFNGLCOLORFRAGMENTOP3ATIPROC __glewColorFragmentOp3ATI;
+GLEW_FUN_EXPORT PFNGLDELETEFRAGMENTSHADERATIPROC __glewDeleteFragmentShaderATI;
+GLEW_FUN_EXPORT PFNGLENDFRAGMENTSHADERATIPROC __glewEndFragmentShaderATI;
+GLEW_FUN_EXPORT PFNGLGENFRAGMENTSHADERSATIPROC __glewGenFragmentShadersATI;
+GLEW_FUN_EXPORT PFNGLPASSTEXCOORDATIPROC __glewPassTexCoordATI;
+GLEW_FUN_EXPORT PFNGLSAMPLEMAPATIPROC __glewSampleMapATI;
+GLEW_FUN_EXPORT PFNGLSETFRAGMENTSHADERCONSTANTATIPROC __glewSetFragmentShaderConstantATI;
+
+GLEW_FUN_EXPORT PFNGLMAPOBJECTBUFFERATIPROC __glewMapObjectBufferATI;
+GLEW_FUN_EXPORT PFNGLUNMAPOBJECTBUFFERATIPROC __glewUnmapObjectBufferATI;
+
+GLEW_FUN_EXPORT PFNGLPNTRIANGLESFATIPROC __glewPNTrianglesfATI;
+GLEW_FUN_EXPORT PFNGLPNTRIANGLESIATIPROC __glewPNTrianglesiATI;
+
+GLEW_FUN_EXPORT PFNGLSTENCILFUNCSEPARATEATIPROC __glewStencilFuncSeparateATI;
+GLEW_FUN_EXPORT PFNGLSTENCILOPSEPARATEATIPROC __glewStencilOpSeparateATI;
+
+GLEW_FUN_EXPORT PFNGLARRAYOBJECTATIPROC __glewArrayObjectATI;
+GLEW_FUN_EXPORT PFNGLFREEOBJECTBUFFERATIPROC __glewFreeObjectBufferATI;
+GLEW_FUN_EXPORT PFNGLGETARRAYOBJECTFVATIPROC __glewGetArrayObjectfvATI;
+GLEW_FUN_EXPORT PFNGLGETARRAYOBJECTIVATIPROC __glewGetArrayObjectivATI;
+GLEW_FUN_EXPORT PFNGLGETOBJECTBUFFERFVATIPROC __glewGetObjectBufferfvATI;
+GLEW_FUN_EXPORT PFNGLGETOBJECTBUFFERIVATIPROC __glewGetObjectBufferivATI;
+GLEW_FUN_EXPORT PFNGLGETVARIANTARRAYOBJECTFVATIPROC __glewGetVariantArrayObjectfvATI;
+GLEW_FUN_EXPORT PFNGLGETVARIANTARRAYOBJECTIVATIPROC __glewGetVariantArrayObjectivATI;
+GLEW_FUN_EXPORT PFNGLISOBJECTBUFFERATIPROC __glewIsObjectBufferATI;
+GLEW_FUN_EXPORT PFNGLNEWOBJECTBUFFERATIPROC __glewNewObjectBufferATI;
+GLEW_FUN_EXPORT PFNGLUPDATEOBJECTBUFFERATIPROC __glewUpdateObjectBufferATI;
+GLEW_FUN_EXPORT PFNGLVARIANTARRAYOBJECTATIPROC __glewVariantArrayObjectATI;
+
+GLEW_FUN_EXPORT PFNGLGETVERTEXATTRIBARRAYOBJECTFVATIPROC __glewGetVertexAttribArrayObjectfvATI;
+GLEW_FUN_EXPORT PFNGLGETVERTEXATTRIBARRAYOBJECTIVATIPROC __glewGetVertexAttribArrayObjectivATI;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIBARRAYOBJECTATIPROC __glewVertexAttribArrayObjectATI;
+
+GLEW_FUN_EXPORT PFNGLCLIENTACTIVEVERTEXSTREAMATIPROC __glewClientActiveVertexStreamATI;
+GLEW_FUN_EXPORT PFNGLNORMALSTREAM3BATIPROC __glewNormalStream3bATI;
+GLEW_FUN_EXPORT PFNGLNORMALSTREAM3BVATIPROC __glewNormalStream3bvATI;
+GLEW_FUN_EXPORT PFNGLNORMALSTREAM3DATIPROC __glewNormalStream3dATI;
+GLEW_FUN_EXPORT PFNGLNORMALSTREAM3DVATIPROC __glewNormalStream3dvATI;
+GLEW_FUN_EXPORT PFNGLNORMALSTREAM3FATIPROC __glewNormalStream3fATI;
+GLEW_FUN_EXPORT PFNGLNORMALSTREAM3FVATIPROC __glewNormalStream3fvATI;
+GLEW_FUN_EXPORT PFNGLNORMALSTREAM3IATIPROC __glewNormalStream3iATI;
+GLEW_FUN_EXPORT PFNGLNORMALSTREAM3IVATIPROC __glewNormalStream3ivATI;
+GLEW_FUN_EXPORT PFNGLNORMALSTREAM3SATIPROC __glewNormalStream3sATI;
+GLEW_FUN_EXPORT PFNGLNORMALSTREAM3SVATIPROC __glewNormalStream3svATI;
+GLEW_FUN_EXPORT PFNGLVERTEXBLENDENVFATIPROC __glewVertexBlendEnvfATI;
+GLEW_FUN_EXPORT PFNGLVERTEXBLENDENVIATIPROC __glewVertexBlendEnviATI;
+GLEW_FUN_EXPORT PFNGLVERTEXSTREAM1DATIPROC __glewVertexStream1dATI;
+GLEW_FUN_EXPORT PFNGLVERTEXSTREAM1DVATIPROC __glewVertexStream1dvATI;
+GLEW_FUN_EXPORT PFNGLVERTEXSTREAM1FATIPROC __glewVertexStream1fATI;
+GLEW_FUN_EXPORT PFNGLVERTEXSTREAM1FVATIPROC __glewVertexStream1fvATI;
+GLEW_FUN_EXPORT PFNGLVERTEXSTREAM1IATIPROC __glewVertexStream1iATI;
+GLEW_FUN_EXPORT PFNGLVERTEXSTREAM1IVATIPROC __glewVertexStream1ivATI;
+GLEW_FUN_EXPORT PFNGLVERTEXSTREAM1SATIPROC __glewVertexStream1sATI;
+GLEW_FUN_EXPORT PFNGLVERTEXSTREAM1SVATIPROC __glewVertexStream1svATI;
+GLEW_FUN_EXPORT PFNGLVERTEXSTREAM2DATIPROC __glewVertexStream2dATI;
+GLEW_FUN_EXPORT PFNGLVERTEXSTREAM2DVATIPROC __glewVertexStream2dvATI;
+GLEW_FUN_EXPORT PFNGLVERTEXSTREAM2FATIPROC __glewVertexStream2fATI;
+GLEW_FUN_EXPORT PFNGLVERTEXSTREAM2FVATIPROC __glewVertexStream2fvATI;
+GLEW_FUN_EXPORT PFNGLVERTEXSTREAM2IATIPROC __glewVertexStream2iATI;
+GLEW_FUN_EXPORT PFNGLVERTEXSTREAM2IVATIPROC __glewVertexStream2ivATI;
+GLEW_FUN_EXPORT PFNGLVERTEXSTREAM2SATIPROC __glewVertexStream2sATI;
+GLEW_FUN_EXPORT PFNGLVERTEXSTREAM2SVATIPROC __glewVertexStream2svATI;
+GLEW_FUN_EXPORT PFNGLVERTEXSTREAM3DATIPROC __glewVertexStream3dATI;
+GLEW_FUN_EXPORT PFNGLVERTEXSTREAM3DVATIPROC __glewVertexStream3dvATI;
+GLEW_FUN_EXPORT PFNGLVERTEXSTREAM3FATIPROC __glewVertexStream3fATI;
+GLEW_FUN_EXPORT PFNGLVERTEXSTREAM3FVATIPROC __glewVertexStream3fvATI;
+GLEW_FUN_EXPORT PFNGLVERTEXSTREAM3IATIPROC __glewVertexStream3iATI;
+GLEW_FUN_EXPORT PFNGLVERTEXSTREAM3IVATIPROC __glewVertexStream3ivATI;
+GLEW_FUN_EXPORT PFNGLVERTEXSTREAM3SATIPROC __glewVertexStream3sATI;
+GLEW_FUN_EXPORT PFNGLVERTEXSTREAM3SVATIPROC __glewVertexStream3svATI;
+GLEW_FUN_EXPORT PFNGLVERTEXSTREAM4DATIPROC __glewVertexStream4dATI;
+GLEW_FUN_EXPORT PFNGLVERTEXSTREAM4DVATIPROC __glewVertexStream4dvATI;
+GLEW_FUN_EXPORT PFNGLVERTEXSTREAM4FATIPROC __glewVertexStream4fATI;
+GLEW_FUN_EXPORT PFNGLVERTEXSTREAM4FVATIPROC __glewVertexStream4fvATI;
+GLEW_FUN_EXPORT PFNGLVERTEXSTREAM4IATIPROC __glewVertexStream4iATI;
+GLEW_FUN_EXPORT PFNGLVERTEXSTREAM4IVATIPROC __glewVertexStream4ivATI;
+GLEW_FUN_EXPORT PFNGLVERTEXSTREAM4SATIPROC __glewVertexStream4sATI;
+GLEW_FUN_EXPORT PFNGLVERTEXSTREAM4SVATIPROC __glewVertexStream4svATI;
+
+GLEW_FUN_EXPORT PFNGLGETUNIFORMBUFFERSIZEEXTPROC __glewGetUniformBufferSizeEXT;
+GLEW_FUN_EXPORT PFNGLGETUNIFORMOFFSETEXTPROC __glewGetUniformOffsetEXT;
+GLEW_FUN_EXPORT PFNGLUNIFORMBUFFEREXTPROC __glewUniformBufferEXT;
+
+GLEW_FUN_EXPORT PFNGLBLENDCOLOREXTPROC __glewBlendColorEXT;
+
+GLEW_FUN_EXPORT PFNGLBLENDEQUATIONSEPARATEEXTPROC __glewBlendEquationSeparateEXT;
+
+GLEW_FUN_EXPORT PFNGLBLENDFUNCSEPARATEEXTPROC __glewBlendFuncSeparateEXT;
+
+GLEW_FUN_EXPORT PFNGLBLENDEQUATIONEXTPROC __glewBlendEquationEXT;
+
+GLEW_FUN_EXPORT PFNGLCOLORSUBTABLEEXTPROC __glewColorSubTableEXT;
+GLEW_FUN_EXPORT PFNGLCOPYCOLORSUBTABLEEXTPROC __glewCopyColorSubTableEXT;
+
+GLEW_FUN_EXPORT PFNGLLOCKARRAYSEXTPROC __glewLockArraysEXT;
+GLEW_FUN_EXPORT PFNGLUNLOCKARRAYSEXTPROC __glewUnlockArraysEXT;
+
+GLEW_FUN_EXPORT PFNGLCONVOLUTIONFILTER1DEXTPROC __glewConvolutionFilter1DEXT;
+GLEW_FUN_EXPORT PFNGLCONVOLUTIONFILTER2DEXTPROC __glewConvolutionFilter2DEXT;
+GLEW_FUN_EXPORT PFNGLCONVOLUTIONPARAMETERFEXTPROC __glewConvolutionParameterfEXT;
+GLEW_FUN_EXPORT PFNGLCONVOLUTIONPARAMETERFVEXTPROC __glewConvolutionParameterfvEXT;
+GLEW_FUN_EXPORT PFNGLCONVOLUTIONPARAMETERIEXTPROC __glewConvolutionParameteriEXT;
+GLEW_FUN_EXPORT PFNGLCONVOLUTIONPARAMETERIVEXTPROC __glewConvolutionParameterivEXT;
+GLEW_FUN_EXPORT PFNGLCOPYCONVOLUTIONFILTER1DEXTPROC __glewCopyConvolutionFilter1DEXT;
+GLEW_FUN_EXPORT PFNGLCOPYCONVOLUTIONFILTER2DEXTPROC __glewCopyConvolutionFilter2DEXT;
+GLEW_FUN_EXPORT PFNGLGETCONVOLUTIONFILTEREXTPROC __glewGetConvolutionFilterEXT;
+GLEW_FUN_EXPORT PFNGLGETCONVOLUTIONPARAMETERFVEXTPROC __glewGetConvolutionParameterfvEXT;
+GLEW_FUN_EXPORT PFNGLGETCONVOLUTIONPARAMETERIVEXTPROC __glewGetConvolutionParameterivEXT;
+GLEW_FUN_EXPORT PFNGLGETSEPARABLEFILTEREXTPROC __glewGetSeparableFilterEXT;
+GLEW_FUN_EXPORT PFNGLSEPARABLEFILTER2DEXTPROC __glewSeparableFilter2DEXT;
+
+GLEW_FUN_EXPORT PFNGLBINORMALPOINTEREXTPROC __glewBinormalPointerEXT;
+GLEW_FUN_EXPORT PFNGLTANGENTPOINTEREXTPROC __glewTangentPointerEXT;
+
+GLEW_FUN_EXPORT PFNGLCOPYTEXIMAGE1DEXTPROC __glewCopyTexImage1DEXT;
+GLEW_FUN_EXPORT PFNGLCOPYTEXIMAGE2DEXTPROC __glewCopyTexImage2DEXT;
+GLEW_FUN_EXPORT PFNGLCOPYTEXSUBIMAGE1DEXTPROC __glewCopyTexSubImage1DEXT;
+GLEW_FUN_EXPORT PFNGLCOPYTEXSUBIMAGE2DEXTPROC __glewCopyTexSubImage2DEXT;
+GLEW_FUN_EXPORT PFNGLCOPYTEXSUBIMAGE3DEXTPROC __glewCopyTexSubImage3DEXT;
+
+GLEW_FUN_EXPORT PFNGLCULLPARAMETERDVEXTPROC __glewCullParameterdvEXT;
+GLEW_FUN_EXPORT PFNGLCULLPARAMETERFVEXTPROC __glewCullParameterfvEXT;
+
+GLEW_FUN_EXPORT PFNGLGETOBJECTLABELEXTPROC __glewGetObjectLabelEXT;
+GLEW_FUN_EXPORT PFNGLLABELOBJECTEXTPROC __glewLabelObjectEXT;
+
+GLEW_FUN_EXPORT PFNGLINSERTEVENTMARKEREXTPROC __glewInsertEventMarkerEXT;
+GLEW_FUN_EXPORT PFNGLPOPGROUPMARKEREXTPROC __glewPopGroupMarkerEXT;
+GLEW_FUN_EXPORT PFNGLPUSHGROUPMARKEREXTPROC __glewPushGroupMarkerEXT;
+
+GLEW_FUN_EXPORT PFNGLDEPTHBOUNDSEXTPROC __glewDepthBoundsEXT;
+
+GLEW_FUN_EXPORT PFNGLBINDMULTITEXTUREEXTPROC __glewBindMultiTextureEXT;
+GLEW_FUN_EXPORT PFNGLCHECKNAMEDFRAMEBUFFERSTATUSEXTPROC __glewCheckNamedFramebufferStatusEXT;
+GLEW_FUN_EXPORT PFNGLCLIENTATTRIBDEFAULTEXTPROC __glewClientAttribDefaultEXT;
+GLEW_FUN_EXPORT PFNGLCOMPRESSEDMULTITEXIMAGE1DEXTPROC __glewCompressedMultiTexImage1DEXT;
+GLEW_FUN_EXPORT PFNGLCOMPRESSEDMULTITEXIMAGE2DEXTPROC __glewCompressedMultiTexImage2DEXT;
+GLEW_FUN_EXPORT PFNGLCOMPRESSEDMULTITEXIMAGE3DEXTPROC __glewCompressedMultiTexImage3DEXT;
+GLEW_FUN_EXPORT PFNGLCOMPRESSEDMULTITEXSUBIMAGE1DEXTPROC __glewCompressedMultiTexSubImage1DEXT;
+GLEW_FUN_EXPORT PFNGLCOMPRESSEDMULTITEXSUBIMAGE2DEXTPROC __glewCompressedMultiTexSubImage2DEXT;
+GLEW_FUN_EXPORT PFNGLCOMPRESSEDMULTITEXSUBIMAGE3DEXTPROC __glewCompressedMultiTexSubImage3DEXT;
+GLEW_FUN_EXPORT PFNGLCOMPRESSEDTEXTUREIMAGE1DEXTPROC __glewCompressedTextureImage1DEXT;
+GLEW_FUN_EXPORT PFNGLCOMPRESSEDTEXTUREIMAGE2DEXTPROC __glewCompressedTextureImage2DEXT;
+GLEW_FUN_EXPORT PFNGLCOMPRESSEDTEXTUREIMAGE3DEXTPROC __glewCompressedTextureImage3DEXT;
+GLEW_FUN_EXPORT PFNGLCOMPRESSEDTEXTURESUBIMAGE1DEXTPROC __glewCompressedTextureSubImage1DEXT;
+GLEW_FUN_EXPORT PFNGLCOMPRESSEDTEXTURESUBIMAGE2DEXTPROC __glewCompressedTextureSubImage2DEXT;
+GLEW_FUN_EXPORT PFNGLCOMPRESSEDTEXTURESUBIMAGE3DEXTPROC __glewCompressedTextureSubImage3DEXT;
+GLEW_FUN_EXPORT PFNGLCOPYMULTITEXIMAGE1DEXTPROC __glewCopyMultiTexImage1DEXT;
+GLEW_FUN_EXPORT PFNGLCOPYMULTITEXIMAGE2DEXTPROC __glewCopyMultiTexImage2DEXT;
+GLEW_FUN_EXPORT PFNGLCOPYMULTITEXSUBIMAGE1DEXTPROC __glewCopyMultiTexSubImage1DEXT;
+GLEW_FUN_EXPORT PFNGLCOPYMULTITEXSUBIMAGE2DEXTPROC __glewCopyMultiTexSubImage2DEXT;
+GLEW_FUN_EXPORT PFNGLCOPYMULTITEXSUBIMAGE3DEXTPROC __glewCopyMultiTexSubImage3DEXT;
+GLEW_FUN_EXPORT PFNGLCOPYTEXTUREIMAGE1DEXTPROC __glewCopyTextureImage1DEXT;
+GLEW_FUN_EXPORT PFNGLCOPYTEXTUREIMAGE2DEXTPROC __glewCopyTextureImage2DEXT;
+GLEW_FUN_EXPORT PFNGLCOPYTEXTURESUBIMAGE1DEXTPROC __glewCopyTextureSubImage1DEXT;
+GLEW_FUN_EXPORT PFNGLCOPYTEXTURESUBIMAGE2DEXTPROC __glewCopyTextureSubImage2DEXT;
+GLEW_FUN_EXPORT PFNGLCOPYTEXTURESUBIMAGE3DEXTPROC __glewCopyTextureSubImage3DEXT;
+GLEW_FUN_EXPORT PFNGLDISABLECLIENTSTATEINDEXEDEXTPROC __glewDisableClientStateIndexedEXT;
+GLEW_FUN_EXPORT PFNGLDISABLECLIENTSTATEIEXTPROC __glewDisableClientStateiEXT;
+GLEW_FUN_EXPORT PFNGLDISABLEVERTEXARRAYATTRIBEXTPROC __glewDisableVertexArrayAttribEXT;
+GLEW_FUN_EXPORT PFNGLDISABLEVERTEXARRAYEXTPROC __glewDisableVertexArrayEXT;
+GLEW_FUN_EXPORT PFNGLENABLECLIENTSTATEINDEXEDEXTPROC __glewEnableClientStateIndexedEXT;
+GLEW_FUN_EXPORT PFNGLENABLECLIENTSTATEIEXTPROC __glewEnableClientStateiEXT;
+GLEW_FUN_EXPORT PFNGLENABLEVERTEXARRAYATTRIBEXTPROC __glewEnableVertexArrayAttribEXT;
+GLEW_FUN_EXPORT PFNGLENABLEVERTEXARRAYEXTPROC __glewEnableVertexArrayEXT;
+GLEW_FUN_EXPORT PFNGLFLUSHMAPPEDNAMEDBUFFERRANGEEXTPROC __glewFlushMappedNamedBufferRangeEXT;
+GLEW_FUN_EXPORT PFNGLFRAMEBUFFERDRAWBUFFEREXTPROC __glewFramebufferDrawBufferEXT;
+GLEW_FUN_EXPORT PFNGLFRAMEBUFFERDRAWBUFFERSEXTPROC __glewFramebufferDrawBuffersEXT;
+GLEW_FUN_EXPORT PFNGLFRAMEBUFFERREADBUFFEREXTPROC __glewFramebufferReadBufferEXT;
+GLEW_FUN_EXPORT PFNGLGENERATEMULTITEXMIPMAPEXTPROC __glewGenerateMultiTexMipmapEXT;
+GLEW_FUN_EXPORT PFNGLGENERATETEXTUREMIPMAPEXTPROC __glewGenerateTextureMipmapEXT;
+GLEW_FUN_EXPORT PFNGLGETCOMPRESSEDMULTITEXIMAGEEXTPROC __glewGetCompressedMultiTexImageEXT;
+GLEW_FUN_EXPORT PFNGLGETCOMPRESSEDTEXTUREIMAGEEXTPROC __glewGetCompressedTextureImageEXT;
+GLEW_FUN_EXPORT PFNGLGETDOUBLEINDEXEDVEXTPROC __glewGetDoubleIndexedvEXT;
+GLEW_FUN_EXPORT PFNGLGETDOUBLEI_VEXTPROC __glewGetDoublei_vEXT;
+GLEW_FUN_EXPORT PFNGLGETFLOATINDEXEDVEXTPROC __glewGetFloatIndexedvEXT;
+GLEW_FUN_EXPORT PFNGLGETFLOATI_VEXTPROC __glewGetFloati_vEXT;
+GLEW_FUN_EXPORT PFNGLGETFRAMEBUFFERPARAMETERIVEXTPROC __glewGetFramebufferParameterivEXT;
+GLEW_FUN_EXPORT PFNGLGETMULTITEXENVFVEXTPROC __glewGetMultiTexEnvfvEXT;
+GLEW_FUN_EXPORT PFNGLGETMULTITEXENVIVEXTPROC __glewGetMultiTexEnvivEXT;
+GLEW_FUN_EXPORT PFNGLGETMULTITEXGENDVEXTPROC __glewGetMultiTexGendvEXT;
+GLEW_FUN_EXPORT PFNGLGETMULTITEXGENFVEXTPROC __glewGetMultiTexGenfvEXT;
+GLEW_FUN_EXPORT PFNGLGETMULTITEXGENIVEXTPROC __glewGetMultiTexGenivEXT;
+GLEW_FUN_EXPORT PFNGLGETMULTITEXIMAGEEXTPROC __glewGetMultiTexImageEXT;
+GLEW_FUN_EXPORT PFNGLGETMULTITEXLEVELPARAMETERFVEXTPROC __glewGetMultiTexLevelParameterfvEXT;
+GLEW_FUN_EXPORT PFNGLGETMULTITEXLEVELPARAMETERIVEXTPROC __glewGetMultiTexLevelParameterivEXT;
+GLEW_FUN_EXPORT PFNGLGETMULTITEXPARAMETERIIVEXTPROC __glewGetMultiTexParameterIivEXT;
+GLEW_FUN_EXPORT PFNGLGETMULTITEXPARAMETERIUIVEXTPROC __glewGetMultiTexParameterIuivEXT;
+GLEW_FUN_EXPORT PFNGLGETMULTITEXPARAMETERFVEXTPROC __glewGetMultiTexParameterfvEXT;
+GLEW_FUN_EXPORT PFNGLGETMULTITEXPARAMETERIVEXTPROC __glewGetMultiTexParameterivEXT;
+GLEW_FUN_EXPORT PFNGLGETNAMEDBUFFERPARAMETERIVEXTPROC __glewGetNamedBufferParameterivEXT;
+GLEW_FUN_EXPORT PFNGLGETNAMEDBUFFERPOINTERVEXTPROC __glewGetNamedBufferPointervEXT;
+GLEW_FUN_EXPORT PFNGLGETNAMEDBUFFERSUBDATAEXTPROC __glewGetNamedBufferSubDataEXT;
+GLEW_FUN_EXPORT PFNGLGETNAMEDFRAMEBUFFERATTACHMENTPARAMETERIVEXTPROC __glewGetNamedFramebufferAttachmentParameterivEXT;
+GLEW_FUN_EXPORT PFNGLGETNAMEDPROGRAMLOCALPARAMETERIIVEXTPROC __glewGetNamedProgramLocalParameterIivEXT;
+GLEW_FUN_EXPORT PFNGLGETNAMEDPROGRAMLOCALPARAMETERIUIVEXTPROC __glewGetNamedProgramLocalParameterIuivEXT;
+GLEW_FUN_EXPORT PFNGLGETNAMEDPROGRAMLOCALPARAMETERDVEXTPROC __glewGetNamedProgramLocalParameterdvEXT;
+GLEW_FUN_EXPORT PFNGLGETNAMEDPROGRAMLOCALPARAMETERFVEXTPROC __glewGetNamedProgramLocalParameterfvEXT;
+GLEW_FUN_EXPORT PFNGLGETNAMEDPROGRAMSTRINGEXTPROC __glewGetNamedProgramStringEXT;
+GLEW_FUN_EXPORT PFNGLGETNAMEDPROGRAMIVEXTPROC __glewGetNamedProgramivEXT;
+GLEW_FUN_EXPORT PFNGLGETNAMEDRENDERBUFFERPARAMETERIVEXTPROC __glewGetNamedRenderbufferParameterivEXT;
+GLEW_FUN_EXPORT PFNGLGETPOINTERINDEXEDVEXTPROC __glewGetPointerIndexedvEXT;
+GLEW_FUN_EXPORT PFNGLGETPOINTERI_VEXTPROC __glewGetPointeri_vEXT;
+GLEW_FUN_EXPORT PFNGLGETTEXTUREIMAGEEXTPROC __glewGetTextureImageEXT;
+GLEW_FUN_EXPORT PFNGLGETTEXTURELEVELPARAMETERFVEXTPROC __glewGetTextureLevelParameterfvEXT;
+GLEW_FUN_EXPORT PFNGLGETTEXTURELEVELPARAMETERIVEXTPROC __glewGetTextureLevelParameterivEXT;
+GLEW_FUN_EXPORT PFNGLGETTEXTUREPARAMETERIIVEXTPROC __glewGetTextureParameterIivEXT;
+GLEW_FUN_EXPORT PFNGLGETTEXTUREPARAMETERIUIVEXTPROC __glewGetTextureParameterIuivEXT;
+GLEW_FUN_EXPORT PFNGLGETTEXTUREPARAMETERFVEXTPROC __glewGetTextureParameterfvEXT;
+GLEW_FUN_EXPORT PFNGLGETTEXTUREPARAMETERIVEXTPROC __glewGetTextureParameterivEXT;
+GLEW_FUN_EXPORT PFNGLGETVERTEXARRAYINTEGERI_VEXTPROC __glewGetVertexArrayIntegeri_vEXT;
+GLEW_FUN_EXPORT PFNGLGETVERTEXARRAYINTEGERVEXTPROC __glewGetVertexArrayIntegervEXT;
+GLEW_FUN_EXPORT PFNGLGETVERTEXARRAYPOINTERI_VEXTPROC __glewGetVertexArrayPointeri_vEXT;
+GLEW_FUN_EXPORT PFNGLGETVERTEXARRAYPOINTERVEXTPROC __glewGetVertexArrayPointervEXT;
+GLEW_FUN_EXPORT PFNGLMAPNAMEDBUFFEREXTPROC __glewMapNamedBufferEXT;
+GLEW_FUN_EXPORT PFNGLMAPNAMEDBUFFERRANGEEXTPROC __glewMapNamedBufferRangeEXT;
+GLEW_FUN_EXPORT PFNGLMATRIXFRUSTUMEXTPROC __glewMatrixFrustumEXT;
+GLEW_FUN_EXPORT PFNGLMATRIXLOADIDENTITYEXTPROC __glewMatrixLoadIdentityEXT;
+GLEW_FUN_EXPORT PFNGLMATRIXLOADTRANSPOSEDEXTPROC __glewMatrixLoadTransposedEXT;
+GLEW_FUN_EXPORT PFNGLMATRIXLOADTRANSPOSEFEXTPROC __glewMatrixLoadTransposefEXT;
+GLEW_FUN_EXPORT PFNGLMATRIXLOADDEXTPROC __glewMatrixLoaddEXT;
+GLEW_FUN_EXPORT PFNGLMATRIXLOADFEXTPROC __glewMatrixLoadfEXT;
+GLEW_FUN_EXPORT PFNGLMATRIXMULTTRANSPOSEDEXTPROC __glewMatrixMultTransposedEXT;
+GLEW_FUN_EXPORT PFNGLMATRIXMULTTRANSPOSEFEXTPROC __glewMatrixMultTransposefEXT;
+GLEW_FUN_EXPORT PFNGLMATRIXMULTDEXTPROC __glewMatrixMultdEXT;
+GLEW_FUN_EXPORT PFNGLMATRIXMULTFEXTPROC __glewMatrixMultfEXT;
+GLEW_FUN_EXPORT PFNGLMATRIXORTHOEXTPROC __glewMatrixOrthoEXT;
+GLEW_FUN_EXPORT PFNGLMATRIXPOPEXTPROC __glewMatrixPopEXT;
+GLEW_FUN_EXPORT PFNGLMATRIXPUSHEXTPROC __glewMatrixPushEXT;
+GLEW_FUN_EXPORT PFNGLMATRIXROTATEDEXTPROC __glewMatrixRotatedEXT;
+GLEW_FUN_EXPORT PFNGLMATRIXROTATEFEXTPROC __glewMatrixRotatefEXT;
+GLEW_FUN_EXPORT PFNGLMATRIXSCALEDEXTPROC __glewMatrixScaledEXT;
+GLEW_FUN_EXPORT PFNGLMATRIXSCALEFEXTPROC __glewMatrixScalefEXT;
+GLEW_FUN_EXPORT PFNGLMATRIXTRANSLATEDEXTPROC __glewMatrixTranslatedEXT;
+GLEW_FUN_EXPORT PFNGLMATRIXTRANSLATEFEXTPROC __glewMatrixTranslatefEXT;
+GLEW_FUN_EXPORT PFNGLMULTITEXBUFFEREXTPROC __glewMultiTexBufferEXT;
+GLEW_FUN_EXPORT PFNGLMULTITEXCOORDPOINTEREXTPROC __glewMultiTexCoordPointerEXT;
+GLEW_FUN_EXPORT PFNGLMULTITEXENVFEXTPROC __glewMultiTexEnvfEXT;
+GLEW_FUN_EXPORT PFNGLMULTITEXENVFVEXTPROC __glewMultiTexEnvfvEXT;
+GLEW_FUN_EXPORT PFNGLMULTITEXENVIEXTPROC __glewMultiTexEnviEXT;
+GLEW_FUN_EXPORT PFNGLMULTITEXENVIVEXTPROC __glewMultiTexEnvivEXT;
+GLEW_FUN_EXPORT PFNGLMULTITEXGENDEXTPROC __glewMultiTexGendEXT;
+GLEW_FUN_EXPORT PFNGLMULTITEXGENDVEXTPROC __glewMultiTexGendvEXT;
+GLEW_FUN_EXPORT PFNGLMULTITEXGENFEXTPROC __glewMultiTexGenfEXT;
+GLEW_FUN_EXPORT PFNGLMULTITEXGENFVEXTPROC __glewMultiTexGenfvEXT;
+GLEW_FUN_EXPORT PFNGLMULTITEXGENIEXTPROC __glewMultiTexGeniEXT;
+GLEW_FUN_EXPORT PFNGLMULTITEXGENIVEXTPROC __glewMultiTexGenivEXT;
+GLEW_FUN_EXPORT PFNGLMULTITEXIMAGE1DEXTPROC __glewMultiTexImage1DEXT;
+GLEW_FUN_EXPORT PFNGLMULTITEXIMAGE2DEXTPROC __glewMultiTexImage2DEXT;
+GLEW_FUN_EXPORT PFNGLMULTITEXIMAGE3DEXTPROC __glewMultiTexImage3DEXT;
+GLEW_FUN_EXPORT PFNGLMULTITEXPARAMETERIIVEXTPROC __glewMultiTexParameterIivEXT;
+GLEW_FUN_EXPORT PFNGLMULTITEXPARAMETERIUIVEXTPROC __glewMultiTexParameterIuivEXT;
+GLEW_FUN_EXPORT PFNGLMULTITEXPARAMETERFEXTPROC __glewMultiTexParameterfEXT;
+GLEW_FUN_EXPORT PFNGLMULTITEXPARAMETERFVEXTPROC __glewMultiTexParameterfvEXT;
+GLEW_FUN_EXPORT PFNGLMULTITEXPARAMETERIEXTPROC __glewMultiTexParameteriEXT;
+GLEW_FUN_EXPORT PFNGLMULTITEXPARAMETERIVEXTPROC __glewMultiTexParameterivEXT;
+GLEW_FUN_EXPORT PFNGLMULTITEXRENDERBUFFEREXTPROC __glewMultiTexRenderbufferEXT;
+GLEW_FUN_EXPORT PFNGLMULTITEXSUBIMAGE1DEXTPROC __glewMultiTexSubImage1DEXT;
+GLEW_FUN_EXPORT PFNGLMULTITEXSUBIMAGE2DEXTPROC __glewMultiTexSubImage2DEXT;
+GLEW_FUN_EXPORT PFNGLMULTITEXSUBIMAGE3DEXTPROC __glewMultiTexSubImage3DEXT;
+GLEW_FUN_EXPORT PFNGLNAMEDBUFFERDATAEXTPROC __glewNamedBufferDataEXT;
+GLEW_FUN_EXPORT PFNGLNAMEDBUFFERSUBDATAEXTPROC __glewNamedBufferSubDataEXT;
+GLEW_FUN_EXPORT PFNGLNAMEDCOPYBUFFERSUBDATAEXTPROC __glewNamedCopyBufferSubDataEXT;
+GLEW_FUN_EXPORT PFNGLNAMEDFRAMEBUFFERRENDERBUFFEREXTPROC __glewNamedFramebufferRenderbufferEXT;
+GLEW_FUN_EXPORT PFNGLNAMEDFRAMEBUFFERTEXTURE1DEXTPROC __glewNamedFramebufferTexture1DEXT;
+GLEW_FUN_EXPORT PFNGLNAMEDFRAMEBUFFERTEXTURE2DEXTPROC __glewNamedFramebufferTexture2DEXT;
+GLEW_FUN_EXPORT PFNGLNAMEDFRAMEBUFFERTEXTURE3DEXTPROC __glewNamedFramebufferTexture3DEXT;
+GLEW_FUN_EXPORT PFNGLNAMEDFRAMEBUFFERTEXTUREEXTPROC __glewNamedFramebufferTextureEXT;
+GLEW_FUN_EXPORT PFNGLNAMEDFRAMEBUFFERTEXTUREFACEEXTPROC __glewNamedFramebufferTextureFaceEXT;
+GLEW_FUN_EXPORT PFNGLNAMEDFRAMEBUFFERTEXTURELAYEREXTPROC __glewNamedFramebufferTextureLayerEXT;
+GLEW_FUN_EXPORT PFNGLNAMEDPROGRAMLOCALPARAMETER4DEXTPROC __glewNamedProgramLocalParameter4dEXT;
+GLEW_FUN_EXPORT PFNGLNAMEDPROGRAMLOCALPARAMETER4DVEXTPROC __glewNamedProgramLocalParameter4dvEXT;
+GLEW_FUN_EXPORT PFNGLNAMEDPROGRAMLOCALPARAMETER4FEXTPROC __glewNamedProgramLocalParameter4fEXT;
+GLEW_FUN_EXPORT PFNGLNAMEDPROGRAMLOCALPARAMETER4FVEXTPROC __glewNamedProgramLocalParameter4fvEXT;
+GLEW_FUN_EXPORT PFNGLNAMEDPROGRAMLOCALPARAMETERI4IEXTPROC __glewNamedProgramLocalParameterI4iEXT;
+GLEW_FUN_EXPORT PFNGLNAMEDPROGRAMLOCALPARAMETERI4IVEXTPROC __glewNamedProgramLocalParameterI4ivEXT;
+GLEW_FUN_EXPORT PFNGLNAMEDPROGRAMLOCALPARAMETERI4UIEXTPROC __glewNamedProgramLocalParameterI4uiEXT;
+GLEW_FUN_EXPORT PFNGLNAMEDPROGRAMLOCALPARAMETERI4UIVEXTPROC __glewNamedProgramLocalParameterI4uivEXT;
+GLEW_FUN_EXPORT PFNGLNAMEDPROGRAMLOCALPARAMETERS4FVEXTPROC __glewNamedProgramLocalParameters4fvEXT;
+GLEW_FUN_EXPORT PFNGLNAMEDPROGRAMLOCALPARAMETERSI4IVEXTPROC __glewNamedProgramLocalParametersI4ivEXT;
+GLEW_FUN_EXPORT PFNGLNAMEDPROGRAMLOCALPARAMETERSI4UIVEXTPROC __glewNamedProgramLocalParametersI4uivEXT;
+GLEW_FUN_EXPORT PFNGLNAMEDPROGRAMSTRINGEXTPROC __glewNamedProgramStringEXT;
+GLEW_FUN_EXPORT PFNGLNAMEDRENDERBUFFERSTORAGEEXTPROC __glewNamedRenderbufferStorageEXT;
+GLEW_FUN_EXPORT PFNGLNAMEDRENDERBUFFERSTORAGEMULTISAMPLECOVERAGEEXTPROC __glewNamedRenderbufferStorageMultisampleCoverageEXT;
+GLEW_FUN_EXPORT PFNGLNAMEDRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC __glewNamedRenderbufferStorageMultisampleEXT;
+GLEW_FUN_EXPORT PFNGLPROGRAMUNIFORM1FEXTPROC __glewProgramUniform1fEXT;
+GLEW_FUN_EXPORT PFNGLPROGRAMUNIFORM1FVEXTPROC __glewProgramUniform1fvEXT;
+GLEW_FUN_EXPORT PFNGLPROGRAMUNIFORM1IEXTPROC __glewProgramUniform1iEXT;
+GLEW_FUN_EXPORT PFNGLPROGRAMUNIFORM1IVEXTPROC __glewProgramUniform1ivEXT;
+GLEW_FUN_EXPORT PFNGLPROGRAMUNIFORM1UIEXTPROC __glewProgramUniform1uiEXT;
+GLEW_FUN_EXPORT PFNGLPROGRAMUNIFORM1UIVEXTPROC __glewProgramUniform1uivEXT;
+GLEW_FUN_EXPORT PFNGLPROGRAMUNIFORM2FEXTPROC __glewProgramUniform2fEXT;
+GLEW_FUN_EXPORT PFNGLPROGRAMUNIFORM2FVEXTPROC __glewProgramUniform2fvEXT;
+GLEW_FUN_EXPORT PFNGLPROGRAMUNIFORM2IEXTPROC __glewProgramUniform2iEXT;
+GLEW_FUN_EXPORT PFNGLPROGRAMUNIFORM2IVEXTPROC __glewProgramUniform2ivEXT;
+GLEW_FUN_EXPORT PFNGLPROGRAMUNIFORM2UIEXTPROC __glewProgramUniform2uiEXT;
+GLEW_FUN_EXPORT PFNGLPROGRAMUNIFORM2UIVEXTPROC __glewProgramUniform2uivEXT;
+GLEW_FUN_EXPORT PFNGLPROGRAMUNIFORM3FEXTPROC __glewProgramUniform3fEXT;
+GLEW_FUN_EXPORT PFNGLPROGRAMUNIFORM3FVEXTPROC __glewProgramUniform3fvEXT;
+GLEW_FUN_EXPORT PFNGLPROGRAMUNIFORM3IEXTPROC __glewProgramUniform3iEXT;
+GLEW_FUN_EXPORT PFNGLPROGRAMUNIFORM3IVEXTPROC __glewProgramUniform3ivEXT;
+GLEW_FUN_EXPORT PFNGLPROGRAMUNIFORM3UIEXTPROC __glewProgramUniform3uiEXT;
+GLEW_FUN_EXPORT PFNGLPROGRAMUNIFORM3UIVEXTPROC __glewProgramUniform3uivEXT;
+GLEW_FUN_EXPORT PFNGLPROGRAMUNIFORM4FEXTPROC __glewProgramUniform4fEXT;
+GLEW_FUN_EXPORT PFNGLPROGRAMUNIFORM4FVEXTPROC __glewProgramUniform4fvEXT;
+GLEW_FUN_EXPORT PFNGLPROGRAMUNIFORM4IEXTPROC __glewProgramUniform4iEXT;
+GLEW_FUN_EXPORT PFNGLPROGRAMUNIFORM4IVEXTPROC __glewProgramUniform4ivEXT;
+GLEW_FUN_EXPORT PFNGLPROGRAMUNIFORM4UIEXTPROC __glewProgramUniform4uiEXT;
+GLEW_FUN_EXPORT PFNGLPROGRAMUNIFORM4UIVEXTPROC __glewProgramUniform4uivEXT;
+GLEW_FUN_EXPORT PFNGLPROGRAMUNIFORMMATRIX2FVEXTPROC __glewProgramUniformMatrix2fvEXT;
+GLEW_FUN_EXPORT PFNGLPROGRAMUNIFORMMATRIX2X3FVEXTPROC __glewProgramUniformMatrix2x3fvEXT;
+GLEW_FUN_EXPORT PFNGLPROGRAMUNIFORMMATRIX2X4FVEXTPROC __glewProgramUniformMatrix2x4fvEXT;
+GLEW_FUN_EXPORT PFNGLPROGRAMUNIFORMMATRIX3FVEXTPROC __glewProgramUniformMatrix3fvEXT;
+GLEW_FUN_EXPORT PFNGLPROGRAMUNIFORMMATRIX3X2FVEXTPROC __glewProgramUniformMatrix3x2fvEXT;
+GLEW_FUN_EXPORT PFNGLPROGRAMUNIFORMMATRIX3X4FVEXTPROC __glewProgramUniformMatrix3x4fvEXT;
+GLEW_FUN_EXPORT PFNGLPROGRAMUNIFORMMATRIX4FVEXTPROC __glewProgramUniformMatrix4fvEXT;
+GLEW_FUN_EXPORT PFNGLPROGRAMUNIFORMMATRIX4X2FVEXTPROC __glewProgramUniformMatrix4x2fvEXT;
+GLEW_FUN_EXPORT PFNGLPROGRAMUNIFORMMATRIX4X3FVEXTPROC __glewProgramUniformMatrix4x3fvEXT;
+GLEW_FUN_EXPORT PFNGLPUSHCLIENTATTRIBDEFAULTEXTPROC __glewPushClientAttribDefaultEXT;
+GLEW_FUN_EXPORT PFNGLTEXTUREBUFFEREXTPROC __glewTextureBufferEXT;
+GLEW_FUN_EXPORT PFNGLTEXTUREIMAGE1DEXTPROC __glewTextureImage1DEXT;
+GLEW_FUN_EXPORT PFNGLTEXTUREIMAGE2DEXTPROC __glewTextureImage2DEXT;
+GLEW_FUN_EXPORT PFNGLTEXTUREIMAGE3DEXTPROC __glewTextureImage3DEXT;
+GLEW_FUN_EXPORT PFNGLTEXTUREPARAMETERIIVEXTPROC __glewTextureParameterIivEXT;
+GLEW_FUN_EXPORT PFNGLTEXTUREPARAMETERIUIVEXTPROC __glewTextureParameterIuivEXT;
+GLEW_FUN_EXPORT PFNGLTEXTUREPARAMETERFEXTPROC __glewTextureParameterfEXT;
+GLEW_FUN_EXPORT PFNGLTEXTUREPARAMETERFVEXTPROC __glewTextureParameterfvEXT;
+GLEW_FUN_EXPORT PFNGLTEXTUREPARAMETERIEXTPROC __glewTextureParameteriEXT;
+GLEW_FUN_EXPORT PFNGLTEXTUREPARAMETERIVEXTPROC __glewTextureParameterivEXT;
+GLEW_FUN_EXPORT PFNGLTEXTURERENDERBUFFEREXTPROC __glewTextureRenderbufferEXT;
+GLEW_FUN_EXPORT PFNGLTEXTURESUBIMAGE1DEXTPROC __glewTextureSubImage1DEXT;
+GLEW_FUN_EXPORT PFNGLTEXTURESUBIMAGE2DEXTPROC __glewTextureSubImage2DEXT;
+GLEW_FUN_EXPORT PFNGLTEXTURESUBIMAGE3DEXTPROC __glewTextureSubImage3DEXT;
+GLEW_FUN_EXPORT PFNGLUNMAPNAMEDBUFFEREXTPROC __glewUnmapNamedBufferEXT;
+GLEW_FUN_EXPORT PFNGLVERTEXARRAYCOLOROFFSETEXTPROC __glewVertexArrayColorOffsetEXT;
+GLEW_FUN_EXPORT PFNGLVERTEXARRAYEDGEFLAGOFFSETEXTPROC __glewVertexArrayEdgeFlagOffsetEXT;
+GLEW_FUN_EXPORT PFNGLVERTEXARRAYFOGCOORDOFFSETEXTPROC __glewVertexArrayFogCoordOffsetEXT;
+GLEW_FUN_EXPORT PFNGLVERTEXARRAYINDEXOFFSETEXTPROC __glewVertexArrayIndexOffsetEXT;
+GLEW_FUN_EXPORT PFNGLVERTEXARRAYMULTITEXCOORDOFFSETEXTPROC __glewVertexArrayMultiTexCoordOffsetEXT;
+GLEW_FUN_EXPORT PFNGLVERTEXARRAYNORMALOFFSETEXTPROC __glewVertexArrayNormalOffsetEXT;
+GLEW_FUN_EXPORT PFNGLVERTEXARRAYSECONDARYCOLOROFFSETEXTPROC __glewVertexArraySecondaryColorOffsetEXT;
+GLEW_FUN_EXPORT PFNGLVERTEXARRAYTEXCOORDOFFSETEXTPROC __glewVertexArrayTexCoordOffsetEXT;
+GLEW_FUN_EXPORT PFNGLVERTEXARRAYVERTEXATTRIBDIVISOREXTPROC __glewVertexArrayVertexAttribDivisorEXT;
+GLEW_FUN_EXPORT PFNGLVERTEXARRAYVERTEXATTRIBIOFFSETEXTPROC __glewVertexArrayVertexAttribIOffsetEXT;
+GLEW_FUN_EXPORT PFNGLVERTEXARRAYVERTEXATTRIBOFFSETEXTPROC __glewVertexArrayVertexAttribOffsetEXT;
+GLEW_FUN_EXPORT PFNGLVERTEXARRAYVERTEXOFFSETEXTPROC __glewVertexArrayVertexOffsetEXT;
+
+GLEW_FUN_EXPORT PFNGLCOLORMASKINDEXEDEXTPROC __glewColorMaskIndexedEXT;
+GLEW_FUN_EXPORT PFNGLDISABLEINDEXEDEXTPROC __glewDisableIndexedEXT;
+GLEW_FUN_EXPORT PFNGLENABLEINDEXEDEXTPROC __glewEnableIndexedEXT;
+GLEW_FUN_EXPORT PFNGLGETBOOLEANINDEXEDVEXTPROC __glewGetBooleanIndexedvEXT;
+GLEW_FUN_EXPORT PFNGLGETINTEGERINDEXEDVEXTPROC __glewGetIntegerIndexedvEXT;
+GLEW_FUN_EXPORT PFNGLISENABLEDINDEXEDEXTPROC __glewIsEnabledIndexedEXT;
+
+GLEW_FUN_EXPORT PFNGLDRAWARRAYSINSTANCEDEXTPROC __glewDrawArraysInstancedEXT;
+GLEW_FUN_EXPORT PFNGLDRAWELEMENTSINSTANCEDEXTPROC __glewDrawElementsInstancedEXT;
+
+GLEW_FUN_EXPORT PFNGLDRAWRANGEELEMENTSEXTPROC __glewDrawRangeElementsEXT;
+
+GLEW_FUN_EXPORT PFNGLFOGCOORDPOINTEREXTPROC __glewFogCoordPointerEXT;
+GLEW_FUN_EXPORT PFNGLFOGCOORDDEXTPROC __glewFogCoorddEXT;
+GLEW_FUN_EXPORT PFNGLFOGCOORDDVEXTPROC __glewFogCoorddvEXT;
+GLEW_FUN_EXPORT PFNGLFOGCOORDFEXTPROC __glewFogCoordfEXT;
+GLEW_FUN_EXPORT PFNGLFOGCOORDFVEXTPROC __glewFogCoordfvEXT;
+
+GLEW_FUN_EXPORT PFNGLFRAGMENTCOLORMATERIALEXTPROC __glewFragmentColorMaterialEXT;
+GLEW_FUN_EXPORT PFNGLFRAGMENTLIGHTMODELFEXTPROC __glewFragmentLightModelfEXT;
+GLEW_FUN_EXPORT PFNGLFRAGMENTLIGHTMODELFVEXTPROC __glewFragmentLightModelfvEXT;
+GLEW_FUN_EXPORT PFNGLFRAGMENTLIGHTMODELIEXTPROC __glewFragmentLightModeliEXT;
+GLEW_FUN_EXPORT PFNGLFRAGMENTLIGHTMODELIVEXTPROC __glewFragmentLightModelivEXT;
+GLEW_FUN_EXPORT PFNGLFRAGMENTLIGHTFEXTPROC __glewFragmentLightfEXT;
+GLEW_FUN_EXPORT PFNGLFRAGMENTLIGHTFVEXTPROC __glewFragmentLightfvEXT;
+GLEW_FUN_EXPORT PFNGLFRAGMENTLIGHTIEXTPROC __glewFragmentLightiEXT;
+GLEW_FUN_EXPORT PFNGLFRAGMENTLIGHTIVEXTPROC __glewFragmentLightivEXT;
+GLEW_FUN_EXPORT PFNGLFRAGMENTMATERIALFEXTPROC __glewFragmentMaterialfEXT;
+GLEW_FUN_EXPORT PFNGLFRAGMENTMATERIALFVEXTPROC __glewFragmentMaterialfvEXT;
+GLEW_FUN_EXPORT PFNGLFRAGMENTMATERIALIEXTPROC __glewFragmentMaterialiEXT;
+GLEW_FUN_EXPORT PFNGLFRAGMENTMATERIALIVEXTPROC __glewFragmentMaterialivEXT;
+GLEW_FUN_EXPORT PFNGLGETFRAGMENTLIGHTFVEXTPROC __glewGetFragmentLightfvEXT;
+GLEW_FUN_EXPORT PFNGLGETFRAGMENTLIGHTIVEXTPROC __glewGetFragmentLightivEXT;
+GLEW_FUN_EXPORT PFNGLGETFRAGMENTMATERIALFVEXTPROC __glewGetFragmentMaterialfvEXT;
+GLEW_FUN_EXPORT PFNGLGETFRAGMENTMATERIALIVEXTPROC __glewGetFragmentMaterialivEXT;
+GLEW_FUN_EXPORT PFNGLLIGHTENVIEXTPROC __glewLightEnviEXT;
+
+GLEW_FUN_EXPORT PFNGLBLITFRAMEBUFFEREXTPROC __glewBlitFramebufferEXT;
+
+GLEW_FUN_EXPORT PFNGLRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC __glewRenderbufferStorageMultisampleEXT;
+
+GLEW_FUN_EXPORT PFNGLBINDFRAMEBUFFEREXTPROC __glewBindFramebufferEXT;
+GLEW_FUN_EXPORT PFNGLBINDRENDERBUFFEREXTPROC __glewBindRenderbufferEXT;
+GLEW_FUN_EXPORT PFNGLCHECKFRAMEBUFFERSTATUSEXTPROC __glewCheckFramebufferStatusEXT;
+GLEW_FUN_EXPORT PFNGLDELETEFRAMEBUFFERSEXTPROC __glewDeleteFramebuffersEXT;
+GLEW_FUN_EXPORT PFNGLDELETERENDERBUFFERSEXTPROC __glewDeleteRenderbuffersEXT;
+GLEW_FUN_EXPORT PFNGLFRAMEBUFFERRENDERBUFFEREXTPROC __glewFramebufferRenderbufferEXT;
+GLEW_FUN_EXPORT PFNGLFRAMEBUFFERTEXTURE1DEXTPROC __glewFramebufferTexture1DEXT;
+GLEW_FUN_EXPORT PFNGLFRAMEBUFFERTEXTURE2DEXTPROC __glewFramebufferTexture2DEXT;
+GLEW_FUN_EXPORT PFNGLFRAMEBUFFERTEXTURE3DEXTPROC __glewFramebufferTexture3DEXT;
+GLEW_FUN_EXPORT PFNGLGENFRAMEBUFFERSEXTPROC __glewGenFramebuffersEXT;
+GLEW_FUN_EXPORT PFNGLGENRENDERBUFFERSEXTPROC __glewGenRenderbuffersEXT;
+GLEW_FUN_EXPORT PFNGLGENERATEMIPMAPEXTPROC __glewGenerateMipmapEXT;
+GLEW_FUN_EXPORT PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVEXTPROC __glewGetFramebufferAttachmentParameterivEXT;
+GLEW_FUN_EXPORT PFNGLGETRENDERBUFFERPARAMETERIVEXTPROC __glewGetRenderbufferParameterivEXT;
+GLEW_FUN_EXPORT PFNGLISFRAMEBUFFEREXTPROC __glewIsFramebufferEXT;
+GLEW_FUN_EXPORT PFNGLISRENDERBUFFEREXTPROC __glewIsRenderbufferEXT;
+GLEW_FUN_EXPORT PFNGLRENDERBUFFERSTORAGEEXTPROC __glewRenderbufferStorageEXT;
+
+GLEW_FUN_EXPORT PFNGLFRAMEBUFFERTEXTUREEXTPROC __glewFramebufferTextureEXT;
+GLEW_FUN_EXPORT PFNGLFRAMEBUFFERTEXTUREFACEEXTPROC __glewFramebufferTextureFaceEXT;
+GLEW_FUN_EXPORT PFNGLPROGRAMPARAMETERIEXTPROC __glewProgramParameteriEXT;
+
+GLEW_FUN_EXPORT PFNGLPROGRAMENVPARAMETERS4FVEXTPROC __glewProgramEnvParameters4fvEXT;
+GLEW_FUN_EXPORT PFNGLPROGRAMLOCALPARAMETERS4FVEXTPROC __glewProgramLocalParameters4fvEXT;
+
+GLEW_FUN_EXPORT PFNGLBINDFRAGDATALOCATIONEXTPROC __glewBindFragDataLocationEXT;
+GLEW_FUN_EXPORT PFNGLGETFRAGDATALOCATIONEXTPROC __glewGetFragDataLocationEXT;
+GLEW_FUN_EXPORT PFNGLGETUNIFORMUIVEXTPROC __glewGetUniformuivEXT;
+GLEW_FUN_EXPORT PFNGLGETVERTEXATTRIBIIVEXTPROC __glewGetVertexAttribIivEXT;
+GLEW_FUN_EXPORT PFNGLGETVERTEXATTRIBIUIVEXTPROC __glewGetVertexAttribIuivEXT;
+GLEW_FUN_EXPORT PFNGLUNIFORM1UIEXTPROC __glewUniform1uiEXT;
+GLEW_FUN_EXPORT PFNGLUNIFORM1UIVEXTPROC __glewUniform1uivEXT;
+GLEW_FUN_EXPORT PFNGLUNIFORM2UIEXTPROC __glewUniform2uiEXT;
+GLEW_FUN_EXPORT PFNGLUNIFORM2UIVEXTPROC __glewUniform2uivEXT;
+GLEW_FUN_EXPORT PFNGLUNIFORM3UIEXTPROC __glewUniform3uiEXT;
+GLEW_FUN_EXPORT PFNGLUNIFORM3UIVEXTPROC __glewUniform3uivEXT;
+GLEW_FUN_EXPORT PFNGLUNIFORM4UIEXTPROC __glewUniform4uiEXT;
+GLEW_FUN_EXPORT PFNGLUNIFORM4UIVEXTPROC __glewUniform4uivEXT;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIBI1IEXTPROC __glewVertexAttribI1iEXT;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIBI1IVEXTPROC __glewVertexAttribI1ivEXT;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIBI1UIEXTPROC __glewVertexAttribI1uiEXT;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIBI1UIVEXTPROC __glewVertexAttribI1uivEXT;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIBI2IEXTPROC __glewVertexAttribI2iEXT;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIBI2IVEXTPROC __glewVertexAttribI2ivEXT;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIBI2UIEXTPROC __glewVertexAttribI2uiEXT;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIBI2UIVEXTPROC __glewVertexAttribI2uivEXT;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIBI3IEXTPROC __glewVertexAttribI3iEXT;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIBI3IVEXTPROC __glewVertexAttribI3ivEXT;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIBI3UIEXTPROC __glewVertexAttribI3uiEXT;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIBI3UIVEXTPROC __glewVertexAttribI3uivEXT;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIBI4BVEXTPROC __glewVertexAttribI4bvEXT;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIBI4IEXTPROC __glewVertexAttribI4iEXT;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIBI4IVEXTPROC __glewVertexAttribI4ivEXT;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIBI4SVEXTPROC __glewVertexAttribI4svEXT;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIBI4UBVEXTPROC __glewVertexAttribI4ubvEXT;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIBI4UIEXTPROC __glewVertexAttribI4uiEXT;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIBI4UIVEXTPROC __glewVertexAttribI4uivEXT;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIBI4USVEXTPROC __glewVertexAttribI4usvEXT;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIBIPOINTEREXTPROC __glewVertexAttribIPointerEXT;
+
+GLEW_FUN_EXPORT PFNGLGETHISTOGRAMEXTPROC __glewGetHistogramEXT;
+GLEW_FUN_EXPORT PFNGLGETHISTOGRAMPARAMETERFVEXTPROC __glewGetHistogramParameterfvEXT;
+GLEW_FUN_EXPORT PFNGLGETHISTOGRAMPARAMETERIVEXTPROC __glewGetHistogramParameterivEXT;
+GLEW_FUN_EXPORT PFNGLGETMINMAXEXTPROC __glewGetMinmaxEXT;
+GLEW_FUN_EXPORT PFNGLGETMINMAXPARAMETERFVEXTPROC __glewGetMinmaxParameterfvEXT;
+GLEW_FUN_EXPORT PFNGLGETMINMAXPARAMETERIVEXTPROC __glewGetMinmaxParameterivEXT;
+GLEW_FUN_EXPORT PFNGLHISTOGRAMEXTPROC __glewHistogramEXT;
+GLEW_FUN_EXPORT PFNGLMINMAXEXTPROC __glewMinmaxEXT;
+GLEW_FUN_EXPORT PFNGLRESETHISTOGRAMEXTPROC __glewResetHistogramEXT;
+GLEW_FUN_EXPORT PFNGLRESETMINMAXEXTPROC __glewResetMinmaxEXT;
+
+GLEW_FUN_EXPORT PFNGLINDEXFUNCEXTPROC __glewIndexFuncEXT;
+
+GLEW_FUN_EXPORT PFNGLINDEXMATERIALEXTPROC __glewIndexMaterialEXT;
+
+GLEW_FUN_EXPORT PFNGLAPPLYTEXTUREEXTPROC __glewApplyTextureEXT;
+GLEW_FUN_EXPORT PFNGLTEXTURELIGHTEXTPROC __glewTextureLightEXT;
+GLEW_FUN_EXPORT PFNGLTEXTUREMATERIALEXTPROC __glewTextureMaterialEXT;
+
+GLEW_FUN_EXPORT PFNGLMULTIDRAWARRAYSEXTPROC __glewMultiDrawArraysEXT;
+GLEW_FUN_EXPORT PFNGLMULTIDRAWELEMENTSEXTPROC __glewMultiDrawElementsEXT;
+
+GLEW_FUN_EXPORT PFNGLSAMPLEMASKEXTPROC __glewSampleMaskEXT;
+GLEW_FUN_EXPORT PFNGLSAMPLEPATTERNEXTPROC __glewSamplePatternEXT;
+
+GLEW_FUN_EXPORT PFNGLCOLORTABLEEXTPROC __glewColorTableEXT;
+GLEW_FUN_EXPORT PFNGLGETCOLORTABLEEXTPROC __glewGetColorTableEXT;
+GLEW_FUN_EXPORT PFNGLGETCOLORTABLEPARAMETERFVEXTPROC __glewGetColorTableParameterfvEXT;
+GLEW_FUN_EXPORT PFNGLGETCOLORTABLEPARAMETERIVEXTPROC __glewGetColorTableParameterivEXT;
+
+GLEW_FUN_EXPORT PFNGLGETPIXELTRANSFORMPARAMETERFVEXTPROC __glewGetPixelTransformParameterfvEXT;
+GLEW_FUN_EXPORT PFNGLGETPIXELTRANSFORMPARAMETERIVEXTPROC __glewGetPixelTransformParameterivEXT;
+GLEW_FUN_EXPORT PFNGLPIXELTRANSFORMPARAMETERFEXTPROC __glewPixelTransformParameterfEXT;
+GLEW_FUN_EXPORT PFNGLPIXELTRANSFORMPARAMETERFVEXTPROC __glewPixelTransformParameterfvEXT;
+GLEW_FUN_EXPORT PFNGLPIXELTRANSFORMPARAMETERIEXTPROC __glewPixelTransformParameteriEXT;
+GLEW_FUN_EXPORT PFNGLPIXELTRANSFORMPARAMETERIVEXTPROC __glewPixelTransformParameterivEXT;
+
+GLEW_FUN_EXPORT PFNGLPOINTPARAMETERFEXTPROC __glewPointParameterfEXT;
+GLEW_FUN_EXPORT PFNGLPOINTPARAMETERFVEXTPROC __glewPointParameterfvEXT;
+
+GLEW_FUN_EXPORT PFNGLPOLYGONOFFSETEXTPROC __glewPolygonOffsetEXT;
+
+GLEW_FUN_EXPORT PFNGLPOLYGONOFFSETCLAMPEXTPROC __glewPolygonOffsetClampEXT;
+
+GLEW_FUN_EXPORT PFNGLPROVOKINGVERTEXEXTPROC __glewProvokingVertexEXT;
+
+GLEW_FUN_EXPORT PFNGLCOVERAGEMODULATIONNVPROC __glewCoverageModulationNV;
+GLEW_FUN_EXPORT PFNGLCOVERAGEMODULATIONTABLENVPROC __glewCoverageModulationTableNV;
+GLEW_FUN_EXPORT PFNGLGETCOVERAGEMODULATIONTABLENVPROC __glewGetCoverageModulationTableNV;
+GLEW_FUN_EXPORT PFNGLRASTERSAMPLESEXTPROC __glewRasterSamplesEXT;
+
+GLEW_FUN_EXPORT PFNGLBEGINSCENEEXTPROC __glewBeginSceneEXT;
+GLEW_FUN_EXPORT PFNGLENDSCENEEXTPROC __glewEndSceneEXT;
+
+GLEW_FUN_EXPORT PFNGLSECONDARYCOLOR3BEXTPROC __glewSecondaryColor3bEXT;
+GLEW_FUN_EXPORT PFNGLSECONDARYCOLOR3BVEXTPROC __glewSecondaryColor3bvEXT;
+GLEW_FUN_EXPORT PFNGLSECONDARYCOLOR3DEXTPROC __glewSecondaryColor3dEXT;
+GLEW_FUN_EXPORT PFNGLSECONDARYCOLOR3DVEXTPROC __glewSecondaryColor3dvEXT;
+GLEW_FUN_EXPORT PFNGLSECONDARYCOLOR3FEXTPROC __glewSecondaryColor3fEXT;
+GLEW_FUN_EXPORT PFNGLSECONDARYCOLOR3FVEXTPROC __glewSecondaryColor3fvEXT;
+GLEW_FUN_EXPORT PFNGLSECONDARYCOLOR3IEXTPROC __glewSecondaryColor3iEXT;
+GLEW_FUN_EXPORT PFNGLSECONDARYCOLOR3IVEXTPROC __glewSecondaryColor3ivEXT;
+GLEW_FUN_EXPORT PFNGLSECONDARYCOLOR3SEXTPROC __glewSecondaryColor3sEXT;
+GLEW_FUN_EXPORT PFNGLSECONDARYCOLOR3SVEXTPROC __glewSecondaryColor3svEXT;
+GLEW_FUN_EXPORT PFNGLSECONDARYCOLOR3UBEXTPROC __glewSecondaryColor3ubEXT;
+GLEW_FUN_EXPORT PFNGLSECONDARYCOLOR3UBVEXTPROC __glewSecondaryColor3ubvEXT;
+GLEW_FUN_EXPORT PFNGLSECONDARYCOLOR3UIEXTPROC __glewSecondaryColor3uiEXT;
+GLEW_FUN_EXPORT PFNGLSECONDARYCOLOR3UIVEXTPROC __glewSecondaryColor3uivEXT;
+GLEW_FUN_EXPORT PFNGLSECONDARYCOLOR3USEXTPROC __glewSecondaryColor3usEXT;
+GLEW_FUN_EXPORT PFNGLSECONDARYCOLOR3USVEXTPROC __glewSecondaryColor3usvEXT;
+GLEW_FUN_EXPORT PFNGLSECONDARYCOLORPOINTEREXTPROC __glewSecondaryColorPointerEXT;
+
+GLEW_FUN_EXPORT PFNGLACTIVEPROGRAMEXTPROC __glewActiveProgramEXT;
+GLEW_FUN_EXPORT PFNGLCREATESHADERPROGRAMEXTPROC __glewCreateShaderProgramEXT;
+GLEW_FUN_EXPORT PFNGLUSESHADERPROGRAMEXTPROC __glewUseShaderProgramEXT;
+
+GLEW_FUN_EXPORT PFNGLBINDIMAGETEXTUREEXTPROC __glewBindImageTextureEXT;
+GLEW_FUN_EXPORT PFNGLMEMORYBARRIEREXTPROC __glewMemoryBarrierEXT;
+
+GLEW_FUN_EXPORT PFNGLACTIVESTENCILFACEEXTPROC __glewActiveStencilFaceEXT;
+
+GLEW_FUN_EXPORT PFNGLTEXSUBIMAGE1DEXTPROC __glewTexSubImage1DEXT;
+GLEW_FUN_EXPORT PFNGLTEXSUBIMAGE2DEXTPROC __glewTexSubImage2DEXT;
+GLEW_FUN_EXPORT PFNGLTEXSUBIMAGE3DEXTPROC __glewTexSubImage3DEXT;
+
+GLEW_FUN_EXPORT PFNGLTEXIMAGE3DEXTPROC __glewTexImage3DEXT;
+
+GLEW_FUN_EXPORT PFNGLFRAMEBUFFERTEXTURELAYEREXTPROC __glewFramebufferTextureLayerEXT;
+
+GLEW_FUN_EXPORT PFNGLTEXBUFFEREXTPROC __glewTexBufferEXT;
+
+GLEW_FUN_EXPORT PFNGLCLEARCOLORIIEXTPROC __glewClearColorIiEXT;
+GLEW_FUN_EXPORT PFNGLCLEARCOLORIUIEXTPROC __glewClearColorIuiEXT;
+GLEW_FUN_EXPORT PFNGLGETTEXPARAMETERIIVEXTPROC __glewGetTexParameterIivEXT;
+GLEW_FUN_EXPORT PFNGLGETTEXPARAMETERIUIVEXTPROC __glewGetTexParameterIuivEXT;
+GLEW_FUN_EXPORT PFNGLTEXPARAMETERIIVEXTPROC __glewTexParameterIivEXT;
+GLEW_FUN_EXPORT PFNGLTEXPARAMETERIUIVEXTPROC __glewTexParameterIuivEXT;
+
+GLEW_FUN_EXPORT PFNGLARETEXTURESRESIDENTEXTPROC __glewAreTexturesResidentEXT;
+GLEW_FUN_EXPORT PFNGLBINDTEXTUREEXTPROC __glewBindTextureEXT;
+GLEW_FUN_EXPORT PFNGLDELETETEXTURESEXTPROC __glewDeleteTexturesEXT;
+GLEW_FUN_EXPORT PFNGLGENTEXTURESEXTPROC __glewGenTexturesEXT;
+GLEW_FUN_EXPORT PFNGLISTEXTUREEXTPROC __glewIsTextureEXT;
+GLEW_FUN_EXPORT PFNGLPRIORITIZETEXTURESEXTPROC __glewPrioritizeTexturesEXT;
+
+GLEW_FUN_EXPORT PFNGLTEXTURENORMALEXTPROC __glewTextureNormalEXT;
+
+GLEW_FUN_EXPORT PFNGLGETQUERYOBJECTI64VEXTPROC __glewGetQueryObjecti64vEXT;
+GLEW_FUN_EXPORT PFNGLGETQUERYOBJECTUI64VEXTPROC __glewGetQueryObjectui64vEXT;
+
+GLEW_FUN_EXPORT PFNGLBEGINTRANSFORMFEEDBACKEXTPROC __glewBeginTransformFeedbackEXT;
+GLEW_FUN_EXPORT PFNGLBINDBUFFERBASEEXTPROC __glewBindBufferBaseEXT;
+GLEW_FUN_EXPORT PFNGLBINDBUFFEROFFSETEXTPROC __glewBindBufferOffsetEXT;
+GLEW_FUN_EXPORT PFNGLBINDBUFFERRANGEEXTPROC __glewBindBufferRangeEXT;
+GLEW_FUN_EXPORT PFNGLENDTRANSFORMFEEDBACKEXTPROC __glewEndTransformFeedbackEXT;
+GLEW_FUN_EXPORT PFNGLGETTRANSFORMFEEDBACKVARYINGEXTPROC __glewGetTransformFeedbackVaryingEXT;
+GLEW_FUN_EXPORT PFNGLTRANSFORMFEEDBACKVARYINGSEXTPROC __glewTransformFeedbackVaryingsEXT;
+
+GLEW_FUN_EXPORT PFNGLARRAYELEMENTEXTPROC __glewArrayElementEXT;
+GLEW_FUN_EXPORT PFNGLCOLORPOINTEREXTPROC __glewColorPointerEXT;
+GLEW_FUN_EXPORT PFNGLDRAWARRAYSEXTPROC __glewDrawArraysEXT;
+GLEW_FUN_EXPORT PFNGLEDGEFLAGPOINTEREXTPROC __glewEdgeFlagPointerEXT;
+GLEW_FUN_EXPORT PFNGLINDEXPOINTEREXTPROC __glewIndexPointerEXT;
+GLEW_FUN_EXPORT PFNGLNORMALPOINTEREXTPROC __glewNormalPointerEXT;
+GLEW_FUN_EXPORT PFNGLTEXCOORDPOINTEREXTPROC __glewTexCoordPointerEXT;
+GLEW_FUN_EXPORT PFNGLVERTEXPOINTEREXTPROC __glewVertexPointerEXT;
+
+GLEW_FUN_EXPORT PFNGLGETVERTEXATTRIBLDVEXTPROC __glewGetVertexAttribLdvEXT;
+GLEW_FUN_EXPORT PFNGLVERTEXARRAYVERTEXATTRIBLOFFSETEXTPROC __glewVertexArrayVertexAttribLOffsetEXT;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIBL1DEXTPROC __glewVertexAttribL1dEXT;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIBL1DVEXTPROC __glewVertexAttribL1dvEXT;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIBL2DEXTPROC __glewVertexAttribL2dEXT;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIBL2DVEXTPROC __glewVertexAttribL2dvEXT;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIBL3DEXTPROC __glewVertexAttribL3dEXT;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIBL3DVEXTPROC __glewVertexAttribL3dvEXT;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIBL4DEXTPROC __glewVertexAttribL4dEXT;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIBL4DVEXTPROC __glewVertexAttribL4dvEXT;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIBLPOINTEREXTPROC __glewVertexAttribLPointerEXT;
+
+GLEW_FUN_EXPORT PFNGLBEGINVERTEXSHADEREXTPROC __glewBeginVertexShaderEXT;
+GLEW_FUN_EXPORT PFNGLBINDLIGHTPARAMETEREXTPROC __glewBindLightParameterEXT;
+GLEW_FUN_EXPORT PFNGLBINDMATERIALPARAMETEREXTPROC __glewBindMaterialParameterEXT;
+GLEW_FUN_EXPORT PFNGLBINDPARAMETEREXTPROC __glewBindParameterEXT;
+GLEW_FUN_EXPORT PFNGLBINDTEXGENPARAMETEREXTPROC __glewBindTexGenParameterEXT;
+GLEW_FUN_EXPORT PFNGLBINDTEXTUREUNITPARAMETEREXTPROC __glewBindTextureUnitParameterEXT;
+GLEW_FUN_EXPORT PFNGLBINDVERTEXSHADEREXTPROC __glewBindVertexShaderEXT;
+GLEW_FUN_EXPORT PFNGLDELETEVERTEXSHADEREXTPROC __glewDeleteVertexShaderEXT;
+GLEW_FUN_EXPORT PFNGLDISABLEVARIANTCLIENTSTATEEXTPROC __glewDisableVariantClientStateEXT;
+GLEW_FUN_EXPORT PFNGLENABLEVARIANTCLIENTSTATEEXTPROC __glewEnableVariantClientStateEXT;
+GLEW_FUN_EXPORT PFNGLENDVERTEXSHADEREXTPROC __glewEndVertexShaderEXT;
+GLEW_FUN_EXPORT PFNGLEXTRACTCOMPONENTEXTPROC __glewExtractComponentEXT;
+GLEW_FUN_EXPORT PFNGLGENSYMBOLSEXTPROC __glewGenSymbolsEXT;
+GLEW_FUN_EXPORT PFNGLGENVERTEXSHADERSEXTPROC __glewGenVertexShadersEXT;
+GLEW_FUN_EXPORT PFNGLGETINVARIANTBOOLEANVEXTPROC __glewGetInvariantBooleanvEXT;
+GLEW_FUN_EXPORT PFNGLGETINVARIANTFLOATVEXTPROC __glewGetInvariantFloatvEXT;
+GLEW_FUN_EXPORT PFNGLGETINVARIANTINTEGERVEXTPROC __glewGetInvariantIntegervEXT;
+GLEW_FUN_EXPORT PFNGLGETLOCALCONSTANTBOOLEANVEXTPROC __glewGetLocalConstantBooleanvEXT;
+GLEW_FUN_EXPORT PFNGLGETLOCALCONSTANTFLOATVEXTPROC __glewGetLocalConstantFloatvEXT;
+GLEW_FUN_EXPORT PFNGLGETLOCALCONSTANTINTEGERVEXTPROC __glewGetLocalConstantIntegervEXT;
+GLEW_FUN_EXPORT PFNGLGETVARIANTBOOLEANVEXTPROC __glewGetVariantBooleanvEXT;
+GLEW_FUN_EXPORT PFNGLGETVARIANTFLOATVEXTPROC __glewGetVariantFloatvEXT;
+GLEW_FUN_EXPORT PFNGLGETVARIANTINTEGERVEXTPROC __glewGetVariantIntegervEXT;
+GLEW_FUN_EXPORT PFNGLGETVARIANTPOINTERVEXTPROC __glewGetVariantPointervEXT;
+GLEW_FUN_EXPORT PFNGLINSERTCOMPONENTEXTPROC __glewInsertComponentEXT;
+GLEW_FUN_EXPORT PFNGLISVARIANTENABLEDEXTPROC __glewIsVariantEnabledEXT;
+GLEW_FUN_EXPORT PFNGLSETINVARIANTEXTPROC __glewSetInvariantEXT;
+GLEW_FUN_EXPORT PFNGLSETLOCALCONSTANTEXTPROC __glewSetLocalConstantEXT;
+GLEW_FUN_EXPORT PFNGLSHADEROP1EXTPROC __glewShaderOp1EXT;
+GLEW_FUN_EXPORT PFNGLSHADEROP2EXTPROC __glewShaderOp2EXT;
+GLEW_FUN_EXPORT PFNGLSHADEROP3EXTPROC __glewShaderOp3EXT;
+GLEW_FUN_EXPORT PFNGLSWIZZLEEXTPROC __glewSwizzleEXT;
+GLEW_FUN_EXPORT PFNGLVARIANTPOINTEREXTPROC __glewVariantPointerEXT;
+GLEW_FUN_EXPORT PFNGLVARIANTBVEXTPROC __glewVariantbvEXT;
+GLEW_FUN_EXPORT PFNGLVARIANTDVEXTPROC __glewVariantdvEXT;
+GLEW_FUN_EXPORT PFNGLVARIANTFVEXTPROC __glewVariantfvEXT;
+GLEW_FUN_EXPORT PFNGLVARIANTIVEXTPROC __glewVariantivEXT;
+GLEW_FUN_EXPORT PFNGLVARIANTSVEXTPROC __glewVariantsvEXT;
+GLEW_FUN_EXPORT PFNGLVARIANTUBVEXTPROC __glewVariantubvEXT;
+GLEW_FUN_EXPORT PFNGLVARIANTUIVEXTPROC __glewVariantuivEXT;
+GLEW_FUN_EXPORT PFNGLVARIANTUSVEXTPROC __glewVariantusvEXT;
+GLEW_FUN_EXPORT PFNGLWRITEMASKEXTPROC __glewWriteMaskEXT;
+
+GLEW_FUN_EXPORT PFNGLVERTEXWEIGHTPOINTEREXTPROC __glewVertexWeightPointerEXT;
+GLEW_FUN_EXPORT PFNGLVERTEXWEIGHTFEXTPROC __glewVertexWeightfEXT;
+GLEW_FUN_EXPORT PFNGLVERTEXWEIGHTFVEXTPROC __glewVertexWeightfvEXT;
+
+GLEW_FUN_EXPORT PFNGLIMPORTSYNCEXTPROC __glewImportSyncEXT;
+
+GLEW_FUN_EXPORT PFNGLFRAMETERMINATORGREMEDYPROC __glewFrameTerminatorGREMEDY;
+
+GLEW_FUN_EXPORT PFNGLSTRINGMARKERGREMEDYPROC __glewStringMarkerGREMEDY;
+
+GLEW_FUN_EXPORT PFNGLGETIMAGETRANSFORMPARAMETERFVHPPROC __glewGetImageTransformParameterfvHP;
+GLEW_FUN_EXPORT PFNGLGETIMAGETRANSFORMPARAMETERIVHPPROC __glewGetImageTransformParameterivHP;
+GLEW_FUN_EXPORT PFNGLIMAGETRANSFORMPARAMETERFHPPROC __glewImageTransformParameterfHP;
+GLEW_FUN_EXPORT PFNGLIMAGETRANSFORMPARAMETERFVHPPROC __glewImageTransformParameterfvHP;
+GLEW_FUN_EXPORT PFNGLIMAGETRANSFORMPARAMETERIHPPROC __glewImageTransformParameteriHP;
+GLEW_FUN_EXPORT PFNGLIMAGETRANSFORMPARAMETERIVHPPROC __glewImageTransformParameterivHP;
+
+GLEW_FUN_EXPORT PFNGLMULTIMODEDRAWARRAYSIBMPROC __glewMultiModeDrawArraysIBM;
+GLEW_FUN_EXPORT PFNGLMULTIMODEDRAWELEMENTSIBMPROC __glewMultiModeDrawElementsIBM;
+
+GLEW_FUN_EXPORT PFNGLCOLORPOINTERLISTIBMPROC __glewColorPointerListIBM;
+GLEW_FUN_EXPORT PFNGLEDGEFLAGPOINTERLISTIBMPROC __glewEdgeFlagPointerListIBM;
+GLEW_FUN_EXPORT PFNGLFOGCOORDPOINTERLISTIBMPROC __glewFogCoordPointerListIBM;
+GLEW_FUN_EXPORT PFNGLINDEXPOINTERLISTIBMPROC __glewIndexPointerListIBM;
+GLEW_FUN_EXPORT PFNGLNORMALPOINTERLISTIBMPROC __glewNormalPointerListIBM;
+GLEW_FUN_EXPORT PFNGLSECONDARYCOLORPOINTERLISTIBMPROC __glewSecondaryColorPointerListIBM;
+GLEW_FUN_EXPORT PFNGLTEXCOORDPOINTERLISTIBMPROC __glewTexCoordPointerListIBM;
+GLEW_FUN_EXPORT PFNGLVERTEXPOINTERLISTIBMPROC __glewVertexPointerListIBM;
+
+GLEW_FUN_EXPORT PFNGLMAPTEXTURE2DINTELPROC __glewMapTexture2DINTEL;
+GLEW_FUN_EXPORT PFNGLSYNCTEXTUREINTELPROC __glewSyncTextureINTEL;
+GLEW_FUN_EXPORT PFNGLUNMAPTEXTURE2DINTELPROC __glewUnmapTexture2DINTEL;
+
+GLEW_FUN_EXPORT PFNGLCOLORPOINTERVINTELPROC __glewColorPointervINTEL;
+GLEW_FUN_EXPORT PFNGLNORMALPOINTERVINTELPROC __glewNormalPointervINTEL;
+GLEW_FUN_EXPORT PFNGLTEXCOORDPOINTERVINTELPROC __glewTexCoordPointervINTEL;
+GLEW_FUN_EXPORT PFNGLVERTEXPOINTERVINTELPROC __glewVertexPointervINTEL;
+
+GLEW_FUN_EXPORT PFNGLBEGINPERFQUERYINTELPROC __glewBeginPerfQueryINTEL;
+GLEW_FUN_EXPORT PFNGLCREATEPERFQUERYINTELPROC __glewCreatePerfQueryINTEL;
+GLEW_FUN_EXPORT PFNGLDELETEPERFQUERYINTELPROC __glewDeletePerfQueryINTEL;
+GLEW_FUN_EXPORT PFNGLENDPERFQUERYINTELPROC __glewEndPerfQueryINTEL;
+GLEW_FUN_EXPORT PFNGLGETFIRSTPERFQUERYIDINTELPROC __glewGetFirstPerfQueryIdINTEL;
+GLEW_FUN_EXPORT PFNGLGETNEXTPERFQUERYIDINTELPROC __glewGetNextPerfQueryIdINTEL;
+GLEW_FUN_EXPORT PFNGLGETPERFCOUNTERINFOINTELPROC __glewGetPerfCounterInfoINTEL;
+GLEW_FUN_EXPORT PFNGLGETPERFQUERYDATAINTELPROC __glewGetPerfQueryDataINTEL;
+GLEW_FUN_EXPORT PFNGLGETPERFQUERYIDBYNAMEINTELPROC __glewGetPerfQueryIdByNameINTEL;
+GLEW_FUN_EXPORT PFNGLGETPERFQUERYINFOINTELPROC __glewGetPerfQueryInfoINTEL;
+
+GLEW_FUN_EXPORT PFNGLTEXSCISSORFUNCINTELPROC __glewTexScissorFuncINTEL;
+GLEW_FUN_EXPORT PFNGLTEXSCISSORINTELPROC __glewTexScissorINTEL;
+
+GLEW_FUN_EXPORT PFNGLBLENDBARRIERKHRPROC __glewBlendBarrierKHR;
+
+GLEW_FUN_EXPORT PFNGLDEBUGMESSAGECALLBACKPROC __glewDebugMessageCallback;
+GLEW_FUN_EXPORT PFNGLDEBUGMESSAGECONTROLPROC __glewDebugMessageControl;
+GLEW_FUN_EXPORT PFNGLDEBUGMESSAGEINSERTPROC __glewDebugMessageInsert;
+GLEW_FUN_EXPORT PFNGLGETDEBUGMESSAGELOGPROC __glewGetDebugMessageLog;
+GLEW_FUN_EXPORT PFNGLGETOBJECTLABELPROC __glewGetObjectLabel;
+GLEW_FUN_EXPORT PFNGLGETOBJECTPTRLABELPROC __glewGetObjectPtrLabel;
+GLEW_FUN_EXPORT PFNGLOBJECTLABELPROC __glewObjectLabel;
+GLEW_FUN_EXPORT PFNGLOBJECTPTRLABELPROC __glewObjectPtrLabel;
+GLEW_FUN_EXPORT PFNGLPOPDEBUGGROUPPROC __glewPopDebugGroup;
+GLEW_FUN_EXPORT PFNGLPUSHDEBUGGROUPPROC __glewPushDebugGroup;
+
+GLEW_FUN_EXPORT PFNGLGETNUNIFORMFVPROC __glewGetnUniformfv;
+GLEW_FUN_EXPORT PFNGLGETNUNIFORMIVPROC __glewGetnUniformiv;
+GLEW_FUN_EXPORT PFNGLGETNUNIFORMUIVPROC __glewGetnUniformuiv;
+GLEW_FUN_EXPORT PFNGLREADNPIXELSPROC __glewReadnPixels;
+
+GLEW_FUN_EXPORT PFNGLBUFFERREGIONENABLEDPROC __glewBufferRegionEnabled;
+GLEW_FUN_EXPORT PFNGLDELETEBUFFERREGIONPROC __glewDeleteBufferRegion;
+GLEW_FUN_EXPORT PFNGLDRAWBUFFERREGIONPROC __glewDrawBufferRegion;
+GLEW_FUN_EXPORT PFNGLNEWBUFFERREGIONPROC __glewNewBufferRegion;
+GLEW_FUN_EXPORT PFNGLREADBUFFERREGIONPROC __glewReadBufferRegion;
+
+GLEW_FUN_EXPORT PFNGLRESIZEBUFFERSMESAPROC __glewResizeBuffersMESA;
+
+GLEW_FUN_EXPORT PFNGLWINDOWPOS2DMESAPROC __glewWindowPos2dMESA;
+GLEW_FUN_EXPORT PFNGLWINDOWPOS2DVMESAPROC __glewWindowPos2dvMESA;
+GLEW_FUN_EXPORT PFNGLWINDOWPOS2FMESAPROC __glewWindowPos2fMESA;
+GLEW_FUN_EXPORT PFNGLWINDOWPOS2FVMESAPROC __glewWindowPos2fvMESA;
+GLEW_FUN_EXPORT PFNGLWINDOWPOS2IMESAPROC __glewWindowPos2iMESA;
+GLEW_FUN_EXPORT PFNGLWINDOWPOS2IVMESAPROC __glewWindowPos2ivMESA;
+GLEW_FUN_EXPORT PFNGLWINDOWPOS2SMESAPROC __glewWindowPos2sMESA;
+GLEW_FUN_EXPORT PFNGLWINDOWPOS2SVMESAPROC __glewWindowPos2svMESA;
+GLEW_FUN_EXPORT PFNGLWINDOWPOS3DMESAPROC __glewWindowPos3dMESA;
+GLEW_FUN_EXPORT PFNGLWINDOWPOS3DVMESAPROC __glewWindowPos3dvMESA;
+GLEW_FUN_EXPORT PFNGLWINDOWPOS3FMESAPROC __glewWindowPos3fMESA;
+GLEW_FUN_EXPORT PFNGLWINDOWPOS3FVMESAPROC __glewWindowPos3fvMESA;
+GLEW_FUN_EXPORT PFNGLWINDOWPOS3IMESAPROC __glewWindowPos3iMESA;
+GLEW_FUN_EXPORT PFNGLWINDOWPOS3IVMESAPROC __glewWindowPos3ivMESA;
+GLEW_FUN_EXPORT PFNGLWINDOWPOS3SMESAPROC __glewWindowPos3sMESA;
+GLEW_FUN_EXPORT PFNGLWINDOWPOS3SVMESAPROC __glewWindowPos3svMESA;
+GLEW_FUN_EXPORT PFNGLWINDOWPOS4DMESAPROC __glewWindowPos4dMESA;
+GLEW_FUN_EXPORT PFNGLWINDOWPOS4DVMESAPROC __glewWindowPos4dvMESA;
+GLEW_FUN_EXPORT PFNGLWINDOWPOS4FMESAPROC __glewWindowPos4fMESA;
+GLEW_FUN_EXPORT PFNGLWINDOWPOS4FVMESAPROC __glewWindowPos4fvMESA;
+GLEW_FUN_EXPORT PFNGLWINDOWPOS4IMESAPROC __glewWindowPos4iMESA;
+GLEW_FUN_EXPORT PFNGLWINDOWPOS4IVMESAPROC __glewWindowPos4ivMESA;
+GLEW_FUN_EXPORT PFNGLWINDOWPOS4SMESAPROC __glewWindowPos4sMESA;
+GLEW_FUN_EXPORT PFNGLWINDOWPOS4SVMESAPROC __glewWindowPos4svMESA;
+
+GLEW_FUN_EXPORT PFNGLBEGINCONDITIONALRENDERNVXPROC __glewBeginConditionalRenderNVX;
+GLEW_FUN_EXPORT PFNGLENDCONDITIONALRENDERNVXPROC __glewEndConditionalRenderNVX;
+
+GLEW_FUN_EXPORT PFNGLMULTIDRAWARRAYSINDIRECTBINDLESSNVPROC __glewMultiDrawArraysIndirectBindlessNV;
+GLEW_FUN_EXPORT PFNGLMULTIDRAWELEMENTSINDIRECTBINDLESSNVPROC __glewMultiDrawElementsIndirectBindlessNV;
+
+GLEW_FUN_EXPORT PFNGLMULTIDRAWARRAYSINDIRECTBINDLESSCOUNTNVPROC __glewMultiDrawArraysIndirectBindlessCountNV;
+GLEW_FUN_EXPORT PFNGLMULTIDRAWELEMENTSINDIRECTBINDLESSCOUNTNVPROC __glewMultiDrawElementsIndirectBindlessCountNV;
+
+GLEW_FUN_EXPORT PFNGLGETIMAGEHANDLENVPROC __glewGetImageHandleNV;
+GLEW_FUN_EXPORT PFNGLGETTEXTUREHANDLENVPROC __glewGetTextureHandleNV;
+GLEW_FUN_EXPORT PFNGLGETTEXTURESAMPLERHANDLENVPROC __glewGetTextureSamplerHandleNV;
+GLEW_FUN_EXPORT PFNGLISIMAGEHANDLERESIDENTNVPROC __glewIsImageHandleResidentNV;
+GLEW_FUN_EXPORT PFNGLISTEXTUREHANDLERESIDENTNVPROC __glewIsTextureHandleResidentNV;
+GLEW_FUN_EXPORT PFNGLMAKEIMAGEHANDLENONRESIDENTNVPROC __glewMakeImageHandleNonResidentNV;
+GLEW_FUN_EXPORT PFNGLMAKEIMAGEHANDLERESIDENTNVPROC __glewMakeImageHandleResidentNV;
+GLEW_FUN_EXPORT PFNGLMAKETEXTUREHANDLENONRESIDENTNVPROC __glewMakeTextureHandleNonResidentNV;
+GLEW_FUN_EXPORT PFNGLMAKETEXTUREHANDLERESIDENTNVPROC __glewMakeTextureHandleResidentNV;
+GLEW_FUN_EXPORT PFNGLPROGRAMUNIFORMHANDLEUI64NVPROC __glewProgramUniformHandleui64NV;
+GLEW_FUN_EXPORT PFNGLPROGRAMUNIFORMHANDLEUI64VNVPROC __glewProgramUniformHandleui64vNV;
+GLEW_FUN_EXPORT PFNGLUNIFORMHANDLEUI64NVPROC __glewUniformHandleui64NV;
+GLEW_FUN_EXPORT PFNGLUNIFORMHANDLEUI64VNVPROC __glewUniformHandleui64vNV;
+
+GLEW_FUN_EXPORT PFNGLBLENDBARRIERNVPROC __glewBlendBarrierNV;
+GLEW_FUN_EXPORT PFNGLBLENDPARAMETERINVPROC __glewBlendParameteriNV;
+
+GLEW_FUN_EXPORT PFNGLBEGINCONDITIONALRENDERNVPROC __glewBeginConditionalRenderNV;
+GLEW_FUN_EXPORT PFNGLENDCONDITIONALRENDERNVPROC __glewEndConditionalRenderNV;
+
+GLEW_FUN_EXPORT PFNGLSUBPIXELPRECISIONBIASNVPROC __glewSubpixelPrecisionBiasNV;
+
+GLEW_FUN_EXPORT PFNGLCOPYIMAGESUBDATANVPROC __glewCopyImageSubDataNV;
+
+GLEW_FUN_EXPORT PFNGLCLEARDEPTHDNVPROC __glewClearDepthdNV;
+GLEW_FUN_EXPORT PFNGLDEPTHBOUNDSDNVPROC __glewDepthBoundsdNV;
+GLEW_FUN_EXPORT PFNGLDEPTHRANGEDNVPROC __glewDepthRangedNV;
+
+GLEW_FUN_EXPORT PFNGLDRAWTEXTURENVPROC __glewDrawTextureNV;
+
+GLEW_FUN_EXPORT PFNGLEVALMAPSNVPROC __glewEvalMapsNV;
+GLEW_FUN_EXPORT PFNGLGETMAPATTRIBPARAMETERFVNVPROC __glewGetMapAttribParameterfvNV;
+GLEW_FUN_EXPORT PFNGLGETMAPATTRIBPARAMETERIVNVPROC __glewGetMapAttribParameterivNV;
+GLEW_FUN_EXPORT PFNGLGETMAPCONTROLPOINTSNVPROC __glewGetMapControlPointsNV;
+GLEW_FUN_EXPORT PFNGLGETMAPPARAMETERFVNVPROC __glewGetMapParameterfvNV;
+GLEW_FUN_EXPORT PFNGLGETMAPPARAMETERIVNVPROC __glewGetMapParameterivNV;
+GLEW_FUN_EXPORT PFNGLMAPCONTROLPOINTSNVPROC __glewMapControlPointsNV;
+GLEW_FUN_EXPORT PFNGLMAPPARAMETERFVNVPROC __glewMapParameterfvNV;
+GLEW_FUN_EXPORT PFNGLMAPPARAMETERIVNVPROC __glewMapParameterivNV;
+
+GLEW_FUN_EXPORT PFNGLGETMULTISAMPLEFVNVPROC __glewGetMultisamplefvNV;
+GLEW_FUN_EXPORT PFNGLSAMPLEMASKINDEXEDNVPROC __glewSampleMaskIndexedNV;
+GLEW_FUN_EXPORT PFNGLTEXRENDERBUFFERNVPROC __glewTexRenderbufferNV;
+
+GLEW_FUN_EXPORT PFNGLDELETEFENCESNVPROC __glewDeleteFencesNV;
+GLEW_FUN_EXPORT PFNGLFINISHFENCENVPROC __glewFinishFenceNV;
+GLEW_FUN_EXPORT PFNGLGENFENCESNVPROC __glewGenFencesNV;
+GLEW_FUN_EXPORT PFNGLGETFENCEIVNVPROC __glewGetFenceivNV;
+GLEW_FUN_EXPORT PFNGLISFENCENVPROC __glewIsFenceNV;
+GLEW_FUN_EXPORT PFNGLSETFENCENVPROC __glewSetFenceNV;
+GLEW_FUN_EXPORT PFNGLTESTFENCENVPROC __glewTestFenceNV;
+
+GLEW_FUN_EXPORT PFNGLFRAGMENTCOVERAGECOLORNVPROC __glewFragmentCoverageColorNV;
+
+GLEW_FUN_EXPORT PFNGLGETPROGRAMNAMEDPARAMETERDVNVPROC __glewGetProgramNamedParameterdvNV;
+GLEW_FUN_EXPORT PFNGLGETPROGRAMNAMEDPARAMETERFVNVPROC __glewGetProgramNamedParameterfvNV;
+GLEW_FUN_EXPORT PFNGLPROGRAMNAMEDPARAMETER4DNVPROC __glewProgramNamedParameter4dNV;
+GLEW_FUN_EXPORT PFNGLPROGRAMNAMEDPARAMETER4DVNVPROC __glewProgramNamedParameter4dvNV;
+GLEW_FUN_EXPORT PFNGLPROGRAMNAMEDPARAMETER4FNVPROC __glewProgramNamedParameter4fNV;
+GLEW_FUN_EXPORT PFNGLPROGRAMNAMEDPARAMETER4FVNVPROC __glewProgramNamedParameter4fvNV;
+
+GLEW_FUN_EXPORT PFNGLRENDERBUFFERSTORAGEMULTISAMPLECOVERAGENVPROC __glewRenderbufferStorageMultisampleCoverageNV;
+
+GLEW_FUN_EXPORT PFNGLPROGRAMVERTEXLIMITNVPROC __glewProgramVertexLimitNV;
+
+GLEW_FUN_EXPORT PFNGLPROGRAMENVPARAMETERI4INVPROC __glewProgramEnvParameterI4iNV;
+GLEW_FUN_EXPORT PFNGLPROGRAMENVPARAMETERI4IVNVPROC __glewProgramEnvParameterI4ivNV;
+GLEW_FUN_EXPORT PFNGLPROGRAMENVPARAMETERI4UINVPROC __glewProgramEnvParameterI4uiNV;
+GLEW_FUN_EXPORT PFNGLPROGRAMENVPARAMETERI4UIVNVPROC __glewProgramEnvParameterI4uivNV;
+GLEW_FUN_EXPORT PFNGLPROGRAMENVPARAMETERSI4IVNVPROC __glewProgramEnvParametersI4ivNV;
+GLEW_FUN_EXPORT PFNGLPROGRAMENVPARAMETERSI4UIVNVPROC __glewProgramEnvParametersI4uivNV;
+GLEW_FUN_EXPORT PFNGLPROGRAMLOCALPARAMETERI4INVPROC __glewProgramLocalParameterI4iNV;
+GLEW_FUN_EXPORT PFNGLPROGRAMLOCALPARAMETERI4IVNVPROC __glewProgramLocalParameterI4ivNV;
+GLEW_FUN_EXPORT PFNGLPROGRAMLOCALPARAMETERI4UINVPROC __glewProgramLocalParameterI4uiNV;
+GLEW_FUN_EXPORT PFNGLPROGRAMLOCALPARAMETERI4UIVNVPROC __glewProgramLocalParameterI4uivNV;
+GLEW_FUN_EXPORT PFNGLPROGRAMLOCALPARAMETERSI4IVNVPROC __glewProgramLocalParametersI4ivNV;
+GLEW_FUN_EXPORT PFNGLPROGRAMLOCALPARAMETERSI4UIVNVPROC __glewProgramLocalParametersI4uivNV;
+
+GLEW_FUN_EXPORT PFNGLGETUNIFORMI64VNVPROC __glewGetUniformi64vNV;
+GLEW_FUN_EXPORT PFNGLGETUNIFORMUI64VNVPROC __glewGetUniformui64vNV;
+GLEW_FUN_EXPORT PFNGLPROGRAMUNIFORM1I64NVPROC __glewProgramUniform1i64NV;
+GLEW_FUN_EXPORT PFNGLPROGRAMUNIFORM1I64VNVPROC __glewProgramUniform1i64vNV;
+GLEW_FUN_EXPORT PFNGLPROGRAMUNIFORM1UI64NVPROC __glewProgramUniform1ui64NV;
+GLEW_FUN_EXPORT PFNGLPROGRAMUNIFORM1UI64VNVPROC __glewProgramUniform1ui64vNV;
+GLEW_FUN_EXPORT PFNGLPROGRAMUNIFORM2I64NVPROC __glewProgramUniform2i64NV;
+GLEW_FUN_EXPORT PFNGLPROGRAMUNIFORM2I64VNVPROC __glewProgramUniform2i64vNV;
+GLEW_FUN_EXPORT PFNGLPROGRAMUNIFORM2UI64NVPROC __glewProgramUniform2ui64NV;
+GLEW_FUN_EXPORT PFNGLPROGRAMUNIFORM2UI64VNVPROC __glewProgramUniform2ui64vNV;
+GLEW_FUN_EXPORT PFNGLPROGRAMUNIFORM3I64NVPROC __glewProgramUniform3i64NV;
+GLEW_FUN_EXPORT PFNGLPROGRAMUNIFORM3I64VNVPROC __glewProgramUniform3i64vNV;
+GLEW_FUN_EXPORT PFNGLPROGRAMUNIFORM3UI64NVPROC __glewProgramUniform3ui64NV;
+GLEW_FUN_EXPORT PFNGLPROGRAMUNIFORM3UI64VNVPROC __glewProgramUniform3ui64vNV;
+GLEW_FUN_EXPORT PFNGLPROGRAMUNIFORM4I64NVPROC __glewProgramUniform4i64NV;
+GLEW_FUN_EXPORT PFNGLPROGRAMUNIFORM4I64VNVPROC __glewProgramUniform4i64vNV;
+GLEW_FUN_EXPORT PFNGLPROGRAMUNIFORM4UI64NVPROC __glewProgramUniform4ui64NV;
+GLEW_FUN_EXPORT PFNGLPROGRAMUNIFORM4UI64VNVPROC __glewProgramUniform4ui64vNV;
+GLEW_FUN_EXPORT PFNGLUNIFORM1I64NVPROC __glewUniform1i64NV;
+GLEW_FUN_EXPORT PFNGLUNIFORM1I64VNVPROC __glewUniform1i64vNV;
+GLEW_FUN_EXPORT PFNGLUNIFORM1UI64NVPROC __glewUniform1ui64NV;
+GLEW_FUN_EXPORT PFNGLUNIFORM1UI64VNVPROC __glewUniform1ui64vNV;
+GLEW_FUN_EXPORT PFNGLUNIFORM2I64NVPROC __glewUniform2i64NV;
+GLEW_FUN_EXPORT PFNGLUNIFORM2I64VNVPROC __glewUniform2i64vNV;
+GLEW_FUN_EXPORT PFNGLUNIFORM2UI64NVPROC __glewUniform2ui64NV;
+GLEW_FUN_EXPORT PFNGLUNIFORM2UI64VNVPROC __glewUniform2ui64vNV;
+GLEW_FUN_EXPORT PFNGLUNIFORM3I64NVPROC __glewUniform3i64NV;
+GLEW_FUN_EXPORT PFNGLUNIFORM3I64VNVPROC __glewUniform3i64vNV;
+GLEW_FUN_EXPORT PFNGLUNIFORM3UI64NVPROC __glewUniform3ui64NV;
+GLEW_FUN_EXPORT PFNGLUNIFORM3UI64VNVPROC __glewUniform3ui64vNV;
+GLEW_FUN_EXPORT PFNGLUNIFORM4I64NVPROC __glewUniform4i64NV;
+GLEW_FUN_EXPORT PFNGLUNIFORM4I64VNVPROC __glewUniform4i64vNV;
+GLEW_FUN_EXPORT PFNGLUNIFORM4UI64NVPROC __glewUniform4ui64NV;
+GLEW_FUN_EXPORT PFNGLUNIFORM4UI64VNVPROC __glewUniform4ui64vNV;
+
+GLEW_FUN_EXPORT PFNGLCOLOR3HNVPROC __glewColor3hNV;
+GLEW_FUN_EXPORT PFNGLCOLOR3HVNVPROC __glewColor3hvNV;
+GLEW_FUN_EXPORT PFNGLCOLOR4HNVPROC __glewColor4hNV;
+GLEW_FUN_EXPORT PFNGLCOLOR4HVNVPROC __glewColor4hvNV;
+GLEW_FUN_EXPORT PFNGLFOGCOORDHNVPROC __glewFogCoordhNV;
+GLEW_FUN_EXPORT PFNGLFOGCOORDHVNVPROC __glewFogCoordhvNV;
+GLEW_FUN_EXPORT PFNGLMULTITEXCOORD1HNVPROC __glewMultiTexCoord1hNV;
+GLEW_FUN_EXPORT PFNGLMULTITEXCOORD1HVNVPROC __glewMultiTexCoord1hvNV;
+GLEW_FUN_EXPORT PFNGLMULTITEXCOORD2HNVPROC __glewMultiTexCoord2hNV;
+GLEW_FUN_EXPORT PFNGLMULTITEXCOORD2HVNVPROC __glewMultiTexCoord2hvNV;
+GLEW_FUN_EXPORT PFNGLMULTITEXCOORD3HNVPROC __glewMultiTexCoord3hNV;
+GLEW_FUN_EXPORT PFNGLMULTITEXCOORD3HVNVPROC __glewMultiTexCoord3hvNV;
+GLEW_FUN_EXPORT PFNGLMULTITEXCOORD4HNVPROC __glewMultiTexCoord4hNV;
+GLEW_FUN_EXPORT PFNGLMULTITEXCOORD4HVNVPROC __glewMultiTexCoord4hvNV;
+GLEW_FUN_EXPORT PFNGLNORMAL3HNVPROC __glewNormal3hNV;
+GLEW_FUN_EXPORT PFNGLNORMAL3HVNVPROC __glewNormal3hvNV;
+GLEW_FUN_EXPORT PFNGLSECONDARYCOLOR3HNVPROC __glewSecondaryColor3hNV;
+GLEW_FUN_EXPORT PFNGLSECONDARYCOLOR3HVNVPROC __glewSecondaryColor3hvNV;
+GLEW_FUN_EXPORT PFNGLTEXCOORD1HNVPROC __glewTexCoord1hNV;
+GLEW_FUN_EXPORT PFNGLTEXCOORD1HVNVPROC __glewTexCoord1hvNV;
+GLEW_FUN_EXPORT PFNGLTEXCOORD2HNVPROC __glewTexCoord2hNV;
+GLEW_FUN_EXPORT PFNGLTEXCOORD2HVNVPROC __glewTexCoord2hvNV;
+GLEW_FUN_EXPORT PFNGLTEXCOORD3HNVPROC __glewTexCoord3hNV;
+GLEW_FUN_EXPORT PFNGLTEXCOORD3HVNVPROC __glewTexCoord3hvNV;
+GLEW_FUN_EXPORT PFNGLTEXCOORD4HNVPROC __glewTexCoord4hNV;
+GLEW_FUN_EXPORT PFNGLTEXCOORD4HVNVPROC __glewTexCoord4hvNV;
+GLEW_FUN_EXPORT PFNGLVERTEX2HNVPROC __glewVertex2hNV;
+GLEW_FUN_EXPORT PFNGLVERTEX2HVNVPROC __glewVertex2hvNV;
+GLEW_FUN_EXPORT PFNGLVERTEX3HNVPROC __glewVertex3hNV;
+GLEW_FUN_EXPORT PFNGLVERTEX3HVNVPROC __glewVertex3hvNV;
+GLEW_FUN_EXPORT PFNGLVERTEX4HNVPROC __glewVertex4hNV;
+GLEW_FUN_EXPORT PFNGLVERTEX4HVNVPROC __glewVertex4hvNV;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIB1HNVPROC __glewVertexAttrib1hNV;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIB1HVNVPROC __glewVertexAttrib1hvNV;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIB2HNVPROC __glewVertexAttrib2hNV;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIB2HVNVPROC __glewVertexAttrib2hvNV;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIB3HNVPROC __glewVertexAttrib3hNV;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIB3HVNVPROC __glewVertexAttrib3hvNV;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIB4HNVPROC __glewVertexAttrib4hNV;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIB4HVNVPROC __glewVertexAttrib4hvNV;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIBS1HVNVPROC __glewVertexAttribs1hvNV;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIBS2HVNVPROC __glewVertexAttribs2hvNV;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIBS3HVNVPROC __glewVertexAttribs3hvNV;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIBS4HVNVPROC __glewVertexAttribs4hvNV;
+GLEW_FUN_EXPORT PFNGLVERTEXWEIGHTHNVPROC __glewVertexWeighthNV;
+GLEW_FUN_EXPORT PFNGLVERTEXWEIGHTHVNVPROC __glewVertexWeighthvNV;
+
+GLEW_FUN_EXPORT PFNGLGETINTERNALFORMATSAMPLEIVNVPROC __glewGetInternalformatSampleivNV;
+
+GLEW_FUN_EXPORT PFNGLBEGINOCCLUSIONQUERYNVPROC __glewBeginOcclusionQueryNV;
+GLEW_FUN_EXPORT PFNGLDELETEOCCLUSIONQUERIESNVPROC __glewDeleteOcclusionQueriesNV;
+GLEW_FUN_EXPORT PFNGLENDOCCLUSIONQUERYNVPROC __glewEndOcclusionQueryNV;
+GLEW_FUN_EXPORT PFNGLGENOCCLUSIONQUERIESNVPROC __glewGenOcclusionQueriesNV;
+GLEW_FUN_EXPORT PFNGLGETOCCLUSIONQUERYIVNVPROC __glewGetOcclusionQueryivNV;
+GLEW_FUN_EXPORT PFNGLGETOCCLUSIONQUERYUIVNVPROC __glewGetOcclusionQueryuivNV;
+GLEW_FUN_EXPORT PFNGLISOCCLUSIONQUERYNVPROC __glewIsOcclusionQueryNV;
+
+GLEW_FUN_EXPORT PFNGLPROGRAMBUFFERPARAMETERSIIVNVPROC __glewProgramBufferParametersIivNV;
+GLEW_FUN_EXPORT PFNGLPROGRAMBUFFERPARAMETERSIUIVNVPROC __glewProgramBufferParametersIuivNV;
+GLEW_FUN_EXPORT PFNGLPROGRAMBUFFERPARAMETERSFVNVPROC __glewProgramBufferParametersfvNV;
+
+GLEW_FUN_EXPORT PFNGLCOPYPATHNVPROC __glewCopyPathNV;
+GLEW_FUN_EXPORT PFNGLCOVERFILLPATHINSTANCEDNVPROC __glewCoverFillPathInstancedNV;
+GLEW_FUN_EXPORT PFNGLCOVERFILLPATHNVPROC __glewCoverFillPathNV;
+GLEW_FUN_EXPORT PFNGLCOVERSTROKEPATHINSTANCEDNVPROC __glewCoverStrokePathInstancedNV;
+GLEW_FUN_EXPORT PFNGLCOVERSTROKEPATHNVPROC __glewCoverStrokePathNV;
+GLEW_FUN_EXPORT PFNGLDELETEPATHSNVPROC __glewDeletePathsNV;
+GLEW_FUN_EXPORT PFNGLGENPATHSNVPROC __glewGenPathsNV;
+GLEW_FUN_EXPORT PFNGLGETPATHCOLORGENFVNVPROC __glewGetPathColorGenfvNV;
+GLEW_FUN_EXPORT PFNGLGETPATHCOLORGENIVNVPROC __glewGetPathColorGenivNV;
+GLEW_FUN_EXPORT PFNGLGETPATHCOMMANDSNVPROC __glewGetPathCommandsNV;
+GLEW_FUN_EXPORT PFNGLGETPATHCOORDSNVPROC __glewGetPathCoordsNV;
+GLEW_FUN_EXPORT PFNGLGETPATHDASHARRAYNVPROC __glewGetPathDashArrayNV;
+GLEW_FUN_EXPORT PFNGLGETPATHLENGTHNVPROC __glewGetPathLengthNV;
+GLEW_FUN_EXPORT PFNGLGETPATHMETRICRANGENVPROC __glewGetPathMetricRangeNV;
+GLEW_FUN_EXPORT PFNGLGETPATHMETRICSNVPROC __glewGetPathMetricsNV;
+GLEW_FUN_EXPORT PFNGLGETPATHPARAMETERFVNVPROC __glewGetPathParameterfvNV;
+GLEW_FUN_EXPORT PFNGLGETPATHPARAMETERIVNVPROC __glewGetPathParameterivNV;
+GLEW_FUN_EXPORT PFNGLGETPATHSPACINGNVPROC __glewGetPathSpacingNV;
+GLEW_FUN_EXPORT PFNGLGETPATHTEXGENFVNVPROC __glewGetPathTexGenfvNV;
+GLEW_FUN_EXPORT PFNGLGETPATHTEXGENIVNVPROC __glewGetPathTexGenivNV;
+GLEW_FUN_EXPORT PFNGLGETPROGRAMRESOURCEFVNVPROC __glewGetProgramResourcefvNV;
+GLEW_FUN_EXPORT PFNGLINTERPOLATEPATHSNVPROC __glewInterpolatePathsNV;
+GLEW_FUN_EXPORT PFNGLISPATHNVPROC __glewIsPathNV;
+GLEW_FUN_EXPORT PFNGLISPOINTINFILLPATHNVPROC __glewIsPointInFillPathNV;
+GLEW_FUN_EXPORT PFNGLISPOINTINSTROKEPATHNVPROC __glewIsPointInStrokePathNV;
+GLEW_FUN_EXPORT PFNGLMATRIXLOAD3X2FNVPROC __glewMatrixLoad3x2fNV;
+GLEW_FUN_EXPORT PFNGLMATRIXLOAD3X3FNVPROC __glewMatrixLoad3x3fNV;
+GLEW_FUN_EXPORT PFNGLMATRIXLOADTRANSPOSE3X3FNVPROC __glewMatrixLoadTranspose3x3fNV;
+GLEW_FUN_EXPORT PFNGLMATRIXMULT3X2FNVPROC __glewMatrixMult3x2fNV;
+GLEW_FUN_EXPORT PFNGLMATRIXMULT3X3FNVPROC __glewMatrixMult3x3fNV;
+GLEW_FUN_EXPORT PFNGLMATRIXMULTTRANSPOSE3X3FNVPROC __glewMatrixMultTranspose3x3fNV;
+GLEW_FUN_EXPORT PFNGLPATHCOLORGENNVPROC __glewPathColorGenNV;
+GLEW_FUN_EXPORT PFNGLPATHCOMMANDSNVPROC __glewPathCommandsNV;
+GLEW_FUN_EXPORT PFNGLPATHCOORDSNVPROC __glewPathCoordsNV;
+GLEW_FUN_EXPORT PFNGLPATHCOVERDEPTHFUNCNVPROC __glewPathCoverDepthFuncNV;
+GLEW_FUN_EXPORT PFNGLPATHDASHARRAYNVPROC __glewPathDashArrayNV;
+GLEW_FUN_EXPORT PFNGLPATHFOGGENNVPROC __glewPathFogGenNV;
+GLEW_FUN_EXPORT PFNGLPATHGLYPHINDEXARRAYNVPROC __glewPathGlyphIndexArrayNV;
+GLEW_FUN_EXPORT PFNGLPATHGLYPHINDEXRANGENVPROC __glewPathGlyphIndexRangeNV;
+GLEW_FUN_EXPORT PFNGLPATHGLYPHRANGENVPROC __glewPathGlyphRangeNV;
+GLEW_FUN_EXPORT PFNGLPATHGLYPHSNVPROC __glewPathGlyphsNV;
+GLEW_FUN_EXPORT PFNGLPATHMEMORYGLYPHINDEXARRAYNVPROC __glewPathMemoryGlyphIndexArrayNV;
+GLEW_FUN_EXPORT PFNGLPATHPARAMETERFNVPROC __glewPathParameterfNV;
+GLEW_FUN_EXPORT PFNGLPATHPARAMETERFVNVPROC __glewPathParameterfvNV;
+GLEW_FUN_EXPORT PFNGLPATHPARAMETERINVPROC __glewPathParameteriNV;
+GLEW_FUN_EXPORT PFNGLPATHPARAMETERIVNVPROC __glewPathParameterivNV;
+GLEW_FUN_EXPORT PFNGLPATHSTENCILDEPTHOFFSETNVPROC __glewPathStencilDepthOffsetNV;
+GLEW_FUN_EXPORT PFNGLPATHSTENCILFUNCNVPROC __glewPathStencilFuncNV;
+GLEW_FUN_EXPORT PFNGLPATHSTRINGNVPROC __glewPathStringNV;
+GLEW_FUN_EXPORT PFNGLPATHSUBCOMMANDSNVPROC __glewPathSubCommandsNV;
+GLEW_FUN_EXPORT PFNGLPATHSUBCOORDSNVPROC __glewPathSubCoordsNV;
+GLEW_FUN_EXPORT PFNGLPATHTEXGENNVPROC __glewPathTexGenNV;
+GLEW_FUN_EXPORT PFNGLPOINTALONGPATHNVPROC __glewPointAlongPathNV;
+GLEW_FUN_EXPORT PFNGLPROGRAMPATHFRAGMENTINPUTGENNVPROC __glewProgramPathFragmentInputGenNV;
+GLEW_FUN_EXPORT PFNGLSTENCILFILLPATHINSTANCEDNVPROC __glewStencilFillPathInstancedNV;
+GLEW_FUN_EXPORT PFNGLSTENCILFILLPATHNVPROC __glewStencilFillPathNV;
+GLEW_FUN_EXPORT PFNGLSTENCILSTROKEPATHINSTANCEDNVPROC __glewStencilStrokePathInstancedNV;
+GLEW_FUN_EXPORT PFNGLSTENCILSTROKEPATHNVPROC __glewStencilStrokePathNV;
+GLEW_FUN_EXPORT PFNGLSTENCILTHENCOVERFILLPATHINSTANCEDNVPROC __glewStencilThenCoverFillPathInstancedNV;
+GLEW_FUN_EXPORT PFNGLSTENCILTHENCOVERFILLPATHNVPROC __glewStencilThenCoverFillPathNV;
+GLEW_FUN_EXPORT PFNGLSTENCILTHENCOVERSTROKEPATHINSTANCEDNVPROC __glewStencilThenCoverStrokePathInstancedNV;
+GLEW_FUN_EXPORT PFNGLSTENCILTHENCOVERSTROKEPATHNVPROC __glewStencilThenCoverStrokePathNV;
+GLEW_FUN_EXPORT PFNGLTRANSFORMPATHNVPROC __glewTransformPathNV;
+GLEW_FUN_EXPORT PFNGLWEIGHTPATHSNVPROC __glewWeightPathsNV;
+
+GLEW_FUN_EXPORT PFNGLFLUSHPIXELDATARANGENVPROC __glewFlushPixelDataRangeNV;
+GLEW_FUN_EXPORT PFNGLPIXELDATARANGENVPROC __glewPixelDataRangeNV;
+
+GLEW_FUN_EXPORT PFNGLPOINTPARAMETERINVPROC __glewPointParameteriNV;
+GLEW_FUN_EXPORT PFNGLPOINTPARAMETERIVNVPROC __glewPointParameterivNV;
+
+GLEW_FUN_EXPORT PFNGLGETVIDEOI64VNVPROC __glewGetVideoi64vNV;
+GLEW_FUN_EXPORT PFNGLGETVIDEOIVNVPROC __glewGetVideoivNV;
+GLEW_FUN_EXPORT PFNGLGETVIDEOUI64VNVPROC __glewGetVideoui64vNV;
+GLEW_FUN_EXPORT PFNGLGETVIDEOUIVNVPROC __glewGetVideouivNV;
+GLEW_FUN_EXPORT PFNGLPRESENTFRAMEDUALFILLNVPROC __glewPresentFrameDualFillNV;
+GLEW_FUN_EXPORT PFNGLPRESENTFRAMEKEYEDNVPROC __glewPresentFrameKeyedNV;
+
+GLEW_FUN_EXPORT PFNGLPRIMITIVERESTARTINDEXNVPROC __glewPrimitiveRestartIndexNV;
+GLEW_FUN_EXPORT PFNGLPRIMITIVERESTARTNVPROC __glewPrimitiveRestartNV;
+
+GLEW_FUN_EXPORT PFNGLCOMBINERINPUTNVPROC __glewCombinerInputNV;
+GLEW_FUN_EXPORT PFNGLCOMBINEROUTPUTNVPROC __glewCombinerOutputNV;
+GLEW_FUN_EXPORT PFNGLCOMBINERPARAMETERFNVPROC __glewCombinerParameterfNV;
+GLEW_FUN_EXPORT PFNGLCOMBINERPARAMETERFVNVPROC __glewCombinerParameterfvNV;
+GLEW_FUN_EXPORT PFNGLCOMBINERPARAMETERINVPROC __glewCombinerParameteriNV;
+GLEW_FUN_EXPORT PFNGLCOMBINERPARAMETERIVNVPROC __glewCombinerParameterivNV;
+GLEW_FUN_EXPORT PFNGLFINALCOMBINERINPUTNVPROC __glewFinalCombinerInputNV;
+GLEW_FUN_EXPORT PFNGLGETCOMBINERINPUTPARAMETERFVNVPROC __glewGetCombinerInputParameterfvNV;
+GLEW_FUN_EXPORT PFNGLGETCOMBINERINPUTPARAMETERIVNVPROC __glewGetCombinerInputParameterivNV;
+GLEW_FUN_EXPORT PFNGLGETCOMBINEROUTPUTPARAMETERFVNVPROC __glewGetCombinerOutputParameterfvNV;
+GLEW_FUN_EXPORT PFNGLGETCOMBINEROUTPUTPARAMETERIVNVPROC __glewGetCombinerOutputParameterivNV;
+GLEW_FUN_EXPORT PFNGLGETFINALCOMBINERINPUTPARAMETERFVNVPROC __glewGetFinalCombinerInputParameterfvNV;
+GLEW_FUN_EXPORT PFNGLGETFINALCOMBINERINPUTPARAMETERIVNVPROC __glewGetFinalCombinerInputParameterivNV;
+
+GLEW_FUN_EXPORT PFNGLCOMBINERSTAGEPARAMETERFVNVPROC __glewCombinerStageParameterfvNV;
+GLEW_FUN_EXPORT PFNGLGETCOMBINERSTAGEPARAMETERFVNVPROC __glewGetCombinerStageParameterfvNV;
+
+GLEW_FUN_EXPORT PFNGLFRAMEBUFFERSAMPLELOCATIONSFVNVPROC __glewFramebufferSampleLocationsfvNV;
+GLEW_FUN_EXPORT PFNGLNAMEDFRAMEBUFFERSAMPLELOCATIONSFVNVPROC __glewNamedFramebufferSampleLocationsfvNV;
+
+GLEW_FUN_EXPORT PFNGLGETBUFFERPARAMETERUI64VNVPROC __glewGetBufferParameterui64vNV;
+GLEW_FUN_EXPORT PFNGLGETINTEGERUI64VNVPROC __glewGetIntegerui64vNV;
+GLEW_FUN_EXPORT PFNGLGETNAMEDBUFFERPARAMETERUI64VNVPROC __glewGetNamedBufferParameterui64vNV;
+GLEW_FUN_EXPORT PFNGLISBUFFERRESIDENTNVPROC __glewIsBufferResidentNV;
+GLEW_FUN_EXPORT PFNGLISNAMEDBUFFERRESIDENTNVPROC __glewIsNamedBufferResidentNV;
+GLEW_FUN_EXPORT PFNGLMAKEBUFFERNONRESIDENTNVPROC __glewMakeBufferNonResidentNV;
+GLEW_FUN_EXPORT PFNGLMAKEBUFFERRESIDENTNVPROC __glewMakeBufferResidentNV;
+GLEW_FUN_EXPORT PFNGLMAKENAMEDBUFFERNONRESIDENTNVPROC __glewMakeNamedBufferNonResidentNV;
+GLEW_FUN_EXPORT PFNGLMAKENAMEDBUFFERRESIDENTNVPROC __glewMakeNamedBufferResidentNV;
+GLEW_FUN_EXPORT PFNGLPROGRAMUNIFORMUI64NVPROC __glewProgramUniformui64NV;
+GLEW_FUN_EXPORT PFNGLPROGRAMUNIFORMUI64VNVPROC __glewProgramUniformui64vNV;
+GLEW_FUN_EXPORT PFNGLUNIFORMUI64NVPROC __glewUniformui64NV;
+GLEW_FUN_EXPORT PFNGLUNIFORMUI64VNVPROC __glewUniformui64vNV;
+
+GLEW_FUN_EXPORT PFNGLTEXTUREBARRIERNVPROC __glewTextureBarrierNV;
+
+GLEW_FUN_EXPORT PFNGLTEXIMAGE2DMULTISAMPLECOVERAGENVPROC __glewTexImage2DMultisampleCoverageNV;
+GLEW_FUN_EXPORT PFNGLTEXIMAGE3DMULTISAMPLECOVERAGENVPROC __glewTexImage3DMultisampleCoverageNV;
+GLEW_FUN_EXPORT PFNGLTEXTUREIMAGE2DMULTISAMPLECOVERAGENVPROC __glewTextureImage2DMultisampleCoverageNV;
+GLEW_FUN_EXPORT PFNGLTEXTUREIMAGE2DMULTISAMPLENVPROC __glewTextureImage2DMultisampleNV;
+GLEW_FUN_EXPORT PFNGLTEXTUREIMAGE3DMULTISAMPLECOVERAGENVPROC __glewTextureImage3DMultisampleCoverageNV;
+GLEW_FUN_EXPORT PFNGLTEXTUREIMAGE3DMULTISAMPLENVPROC __glewTextureImage3DMultisampleNV;
+
+GLEW_FUN_EXPORT PFNGLACTIVEVARYINGNVPROC __glewActiveVaryingNV;
+GLEW_FUN_EXPORT PFNGLBEGINTRANSFORMFEEDBACKNVPROC __glewBeginTransformFeedbackNV;
+GLEW_FUN_EXPORT PFNGLBINDBUFFERBASENVPROC __glewBindBufferBaseNV;
+GLEW_FUN_EXPORT PFNGLBINDBUFFEROFFSETNVPROC __glewBindBufferOffsetNV;
+GLEW_FUN_EXPORT PFNGLBINDBUFFERRANGENVPROC __glewBindBufferRangeNV;
+GLEW_FUN_EXPORT PFNGLENDTRANSFORMFEEDBACKNVPROC __glewEndTransformFeedbackNV;
+GLEW_FUN_EXPORT PFNGLGETACTIVEVARYINGNVPROC __glewGetActiveVaryingNV;
+GLEW_FUN_EXPORT PFNGLGETTRANSFORMFEEDBACKVARYINGNVPROC __glewGetTransformFeedbackVaryingNV;
+GLEW_FUN_EXPORT PFNGLGETVARYINGLOCATIONNVPROC __glewGetVaryingLocationNV;
+GLEW_FUN_EXPORT PFNGLTRANSFORMFEEDBACKATTRIBSNVPROC __glewTransformFeedbackAttribsNV;
+GLEW_FUN_EXPORT PFNGLTRANSFORMFEEDBACKVARYINGSNVPROC __glewTransformFeedbackVaryingsNV;
+
+GLEW_FUN_EXPORT PFNGLBINDTRANSFORMFEEDBACKNVPROC __glewBindTransformFeedbackNV;
+GLEW_FUN_EXPORT PFNGLDELETETRANSFORMFEEDBACKSNVPROC __glewDeleteTransformFeedbacksNV;
+GLEW_FUN_EXPORT PFNGLDRAWTRANSFORMFEEDBACKNVPROC __glewDrawTransformFeedbackNV;
+GLEW_FUN_EXPORT PFNGLGENTRANSFORMFEEDBACKSNVPROC __glewGenTransformFeedbacksNV;
+GLEW_FUN_EXPORT PFNGLISTRANSFORMFEEDBACKNVPROC __glewIsTransformFeedbackNV;
+GLEW_FUN_EXPORT PFNGLPAUSETRANSFORMFEEDBACKNVPROC __glewPauseTransformFeedbackNV;
+GLEW_FUN_EXPORT PFNGLRESUMETRANSFORMFEEDBACKNVPROC __glewResumeTransformFeedbackNV;
+
+GLEW_FUN_EXPORT PFNGLVDPAUFININVPROC __glewVDPAUFiniNV;
+GLEW_FUN_EXPORT PFNGLVDPAUGETSURFACEIVNVPROC __glewVDPAUGetSurfaceivNV;
+GLEW_FUN_EXPORT PFNGLVDPAUINITNVPROC __glewVDPAUInitNV;
+GLEW_FUN_EXPORT PFNGLVDPAUISSURFACENVPROC __glewVDPAUIsSurfaceNV;
+GLEW_FUN_EXPORT PFNGLVDPAUMAPSURFACESNVPROC __glewVDPAUMapSurfacesNV;
+GLEW_FUN_EXPORT PFNGLVDPAUREGISTEROUTPUTSURFACENVPROC __glewVDPAURegisterOutputSurfaceNV;
+GLEW_FUN_EXPORT PFNGLVDPAUREGISTERVIDEOSURFACENVPROC __glewVDPAURegisterVideoSurfaceNV;
+GLEW_FUN_EXPORT PFNGLVDPAUSURFACEACCESSNVPROC __glewVDPAUSurfaceAccessNV;
+GLEW_FUN_EXPORT PFNGLVDPAUUNMAPSURFACESNVPROC __glewVDPAUUnmapSurfacesNV;
+GLEW_FUN_EXPORT PFNGLVDPAUUNREGISTERSURFACENVPROC __glewVDPAUUnregisterSurfaceNV;
+
+GLEW_FUN_EXPORT PFNGLFLUSHVERTEXARRAYRANGENVPROC __glewFlushVertexArrayRangeNV;
+GLEW_FUN_EXPORT PFNGLVERTEXARRAYRANGENVPROC __glewVertexArrayRangeNV;
+
+GLEW_FUN_EXPORT PFNGLGETVERTEXATTRIBLI64VNVPROC __glewGetVertexAttribLi64vNV;
+GLEW_FUN_EXPORT PFNGLGETVERTEXATTRIBLUI64VNVPROC __glewGetVertexAttribLui64vNV;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIBL1I64NVPROC __glewVertexAttribL1i64NV;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIBL1I64VNVPROC __glewVertexAttribL1i64vNV;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIBL1UI64NVPROC __glewVertexAttribL1ui64NV;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIBL1UI64VNVPROC __glewVertexAttribL1ui64vNV;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIBL2I64NVPROC __glewVertexAttribL2i64NV;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIBL2I64VNVPROC __glewVertexAttribL2i64vNV;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIBL2UI64NVPROC __glewVertexAttribL2ui64NV;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIBL2UI64VNVPROC __glewVertexAttribL2ui64vNV;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIBL3I64NVPROC __glewVertexAttribL3i64NV;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIBL3I64VNVPROC __glewVertexAttribL3i64vNV;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIBL3UI64NVPROC __glewVertexAttribL3ui64NV;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIBL3UI64VNVPROC __glewVertexAttribL3ui64vNV;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIBL4I64NVPROC __glewVertexAttribL4i64NV;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIBL4I64VNVPROC __glewVertexAttribL4i64vNV;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIBL4UI64NVPROC __glewVertexAttribL4ui64NV;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIBL4UI64VNVPROC __glewVertexAttribL4ui64vNV;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIBLFORMATNVPROC __glewVertexAttribLFormatNV;
+
+GLEW_FUN_EXPORT PFNGLBUFFERADDRESSRANGENVPROC __glewBufferAddressRangeNV;
+GLEW_FUN_EXPORT PFNGLCOLORFORMATNVPROC __glewColorFormatNV;
+GLEW_FUN_EXPORT PFNGLEDGEFLAGFORMATNVPROC __glewEdgeFlagFormatNV;
+GLEW_FUN_EXPORT PFNGLFOGCOORDFORMATNVPROC __glewFogCoordFormatNV;
+GLEW_FUN_EXPORT PFNGLGETINTEGERUI64I_VNVPROC __glewGetIntegerui64i_vNV;
+GLEW_FUN_EXPORT PFNGLINDEXFORMATNVPROC __glewIndexFormatNV;
+GLEW_FUN_EXPORT PFNGLNORMALFORMATNVPROC __glewNormalFormatNV;
+GLEW_FUN_EXPORT PFNGLSECONDARYCOLORFORMATNVPROC __glewSecondaryColorFormatNV;
+GLEW_FUN_EXPORT PFNGLTEXCOORDFORMATNVPROC __glewTexCoordFormatNV;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIBFORMATNVPROC __glewVertexAttribFormatNV;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIBIFORMATNVPROC __glewVertexAttribIFormatNV;
+GLEW_FUN_EXPORT PFNGLVERTEXFORMATNVPROC __glewVertexFormatNV;
+
+GLEW_FUN_EXPORT PFNGLAREPROGRAMSRESIDENTNVPROC __glewAreProgramsResidentNV;
+GLEW_FUN_EXPORT PFNGLBINDPROGRAMNVPROC __glewBindProgramNV;
+GLEW_FUN_EXPORT PFNGLDELETEPROGRAMSNVPROC __glewDeleteProgramsNV;
+GLEW_FUN_EXPORT PFNGLEXECUTEPROGRAMNVPROC __glewExecuteProgramNV;
+GLEW_FUN_EXPORT PFNGLGENPROGRAMSNVPROC __glewGenProgramsNV;
+GLEW_FUN_EXPORT PFNGLGETPROGRAMPARAMETERDVNVPROC __glewGetProgramParameterdvNV;
+GLEW_FUN_EXPORT PFNGLGETPROGRAMPARAMETERFVNVPROC __glewGetProgramParameterfvNV;
+GLEW_FUN_EXPORT PFNGLGETPROGRAMSTRINGNVPROC __glewGetProgramStringNV;
+GLEW_FUN_EXPORT PFNGLGETPROGRAMIVNVPROC __glewGetProgramivNV;
+GLEW_FUN_EXPORT PFNGLGETTRACKMATRIXIVNVPROC __glewGetTrackMatrixivNV;
+GLEW_FUN_EXPORT PFNGLGETVERTEXATTRIBPOINTERVNVPROC __glewGetVertexAttribPointervNV;
+GLEW_FUN_EXPORT PFNGLGETVERTEXATTRIBDVNVPROC __glewGetVertexAttribdvNV;
+GLEW_FUN_EXPORT PFNGLGETVERTEXATTRIBFVNVPROC __glewGetVertexAttribfvNV;
+GLEW_FUN_EXPORT PFNGLGETVERTEXATTRIBIVNVPROC __glewGetVertexAttribivNV;
+GLEW_FUN_EXPORT PFNGLISPROGRAMNVPROC __glewIsProgramNV;
+GLEW_FUN_EXPORT PFNGLLOADPROGRAMNVPROC __glewLoadProgramNV;
+GLEW_FUN_EXPORT PFNGLPROGRAMPARAMETER4DNVPROC __glewProgramParameter4dNV;
+GLEW_FUN_EXPORT PFNGLPROGRAMPARAMETER4DVNVPROC __glewProgramParameter4dvNV;
+GLEW_FUN_EXPORT PFNGLPROGRAMPARAMETER4FNVPROC __glewProgramParameter4fNV;
+GLEW_FUN_EXPORT PFNGLPROGRAMPARAMETER4FVNVPROC __glewProgramParameter4fvNV;
+GLEW_FUN_EXPORT PFNGLPROGRAMPARAMETERS4DVNVPROC __glewProgramParameters4dvNV;
+GLEW_FUN_EXPORT PFNGLPROGRAMPARAMETERS4FVNVPROC __glewProgramParameters4fvNV;
+GLEW_FUN_EXPORT PFNGLREQUESTRESIDENTPROGRAMSNVPROC __glewRequestResidentProgramsNV;
+GLEW_FUN_EXPORT PFNGLTRACKMATRIXNVPROC __glewTrackMatrixNV;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIB1DNVPROC __glewVertexAttrib1dNV;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIB1DVNVPROC __glewVertexAttrib1dvNV;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIB1FNVPROC __glewVertexAttrib1fNV;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIB1FVNVPROC __glewVertexAttrib1fvNV;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIB1SNVPROC __glewVertexAttrib1sNV;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIB1SVNVPROC __glewVertexAttrib1svNV;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIB2DNVPROC __glewVertexAttrib2dNV;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIB2DVNVPROC __glewVertexAttrib2dvNV;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIB2FNVPROC __glewVertexAttrib2fNV;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIB2FVNVPROC __glewVertexAttrib2fvNV;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIB2SNVPROC __glewVertexAttrib2sNV;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIB2SVNVPROC __glewVertexAttrib2svNV;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIB3DNVPROC __glewVertexAttrib3dNV;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIB3DVNVPROC __glewVertexAttrib3dvNV;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIB3FNVPROC __glewVertexAttrib3fNV;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIB3FVNVPROC __glewVertexAttrib3fvNV;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIB3SNVPROC __glewVertexAttrib3sNV;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIB3SVNVPROC __glewVertexAttrib3svNV;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIB4DNVPROC __glewVertexAttrib4dNV;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIB4DVNVPROC __glewVertexAttrib4dvNV;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIB4FNVPROC __glewVertexAttrib4fNV;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIB4FVNVPROC __glewVertexAttrib4fvNV;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIB4SNVPROC __glewVertexAttrib4sNV;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIB4SVNVPROC __glewVertexAttrib4svNV;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIB4UBNVPROC __glewVertexAttrib4ubNV;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIB4UBVNVPROC __glewVertexAttrib4ubvNV;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIBPOINTERNVPROC __glewVertexAttribPointerNV;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIBS1DVNVPROC __glewVertexAttribs1dvNV;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIBS1FVNVPROC __glewVertexAttribs1fvNV;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIBS1SVNVPROC __glewVertexAttribs1svNV;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIBS2DVNVPROC __glewVertexAttribs2dvNV;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIBS2FVNVPROC __glewVertexAttribs2fvNV;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIBS2SVNVPROC __glewVertexAttribs2svNV;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIBS3DVNVPROC __glewVertexAttribs3dvNV;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIBS3FVNVPROC __glewVertexAttribs3fvNV;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIBS3SVNVPROC __glewVertexAttribs3svNV;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIBS4DVNVPROC __glewVertexAttribs4dvNV;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIBS4FVNVPROC __glewVertexAttribs4fvNV;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIBS4SVNVPROC __glewVertexAttribs4svNV;
+GLEW_FUN_EXPORT PFNGLVERTEXATTRIBS4UBVNVPROC __glewVertexAttribs4ubvNV;
+
+GLEW_FUN_EXPORT PFNGLBEGINVIDEOCAPTURENVPROC __glewBeginVideoCaptureNV;
+GLEW_FUN_EXPORT PFNGLBINDVIDEOCAPTURESTREAMBUFFERNVPROC __glewBindVideoCaptureStreamBufferNV;
+GLEW_FUN_EXPORT PFNGLBINDVIDEOCAPTURESTREAMTEXTURENVPROC __glewBindVideoCaptureStreamTextureNV;
+GLEW_FUN_EXPORT PFNGLENDVIDEOCAPTURENVPROC __glewEndVideoCaptureNV;
+GLEW_FUN_EXPORT PFNGLGETVIDEOCAPTURESTREAMDVNVPROC __glewGetVideoCaptureStreamdvNV;
+GLEW_FUN_EXPORT PFNGLGETVIDEOCAPTURESTREAMFVNVPROC __glewGetVideoCaptureStreamfvNV;
+GLEW_FUN_EXPORT PFNGLGETVIDEOCAPTURESTREAMIVNVPROC __glewGetVideoCaptureStreamivNV;
+GLEW_FUN_EXPORT PFNGLGETVIDEOCAPTUREIVNVPROC __glewGetVideoCaptureivNV;
+GLEW_FUN_EXPORT PFNGLVIDEOCAPTURENVPROC __glewVideoCaptureNV;
+GLEW_FUN_EXPORT PFNGLVIDEOCAPTURESTREAMPARAMETERDVNVPROC __glewVideoCaptureStreamParameterdvNV;
+GLEW_FUN_EXPORT PFNGLVIDEOCAPTURESTREAMPARAMETERFVNVPROC __glewVideoCaptureStreamParameterfvNV;
+GLEW_FUN_EXPORT PFNGLVIDEOCAPTURESTREAMPARAMETERIVNVPROC __glewVideoCaptureStreamParameterivNV;
+
+GLEW_FUN_EXPORT PFNGLCLEARDEPTHFOESPROC __glewClearDepthfOES;
+GLEW_FUN_EXPORT PFNGLCLIPPLANEFOESPROC __glewClipPlanefOES;
+GLEW_FUN_EXPORT PFNGLDEPTHRANGEFOESPROC __glewDepthRangefOES;
+GLEW_FUN_EXPORT PFNGLFRUSTUMFOESPROC __glewFrustumfOES;
+GLEW_FUN_EXPORT PFNGLGETCLIPPLANEFOESPROC __glewGetClipPlanefOES;
+GLEW_FUN_EXPORT PFNGLORTHOFOESPROC __glewOrthofOES;
+
+GLEW_FUN_EXPORT PFNGLALPHAFUNCXPROC __glewAlphaFuncx;
+GLEW_FUN_EXPORT PFNGLCLEARCOLORXPROC __glewClearColorx;
+GLEW_FUN_EXPORT PFNGLCLEARDEPTHXPROC __glewClearDepthx;
+GLEW_FUN_EXPORT PFNGLCOLOR4XPROC __glewColor4x;
+GLEW_FUN_EXPORT PFNGLDEPTHRANGEXPROC __glewDepthRangex;
+GLEW_FUN_EXPORT PFNGLFOGXPROC __glewFogx;
+GLEW_FUN_EXPORT PFNGLFOGXVPROC __glewFogxv;
+GLEW_FUN_EXPORT PFNGLFRUSTUMFPROC __glewFrustumf;
+GLEW_FUN_EXPORT PFNGLFRUSTUMXPROC __glewFrustumx;
+GLEW_FUN_EXPORT PFNGLLIGHTMODELXPROC __glewLightModelx;
+GLEW_FUN_EXPORT PFNGLLIGHTMODELXVPROC __glewLightModelxv;
+GLEW_FUN_EXPORT PFNGLLIGHTXPROC __glewLightx;
+GLEW_FUN_EXPORT PFNGLLIGHTXVPROC __glewLightxv;
+GLEW_FUN_EXPORT PFNGLLINEWIDTHXPROC __glewLineWidthx;
+GLEW_FUN_EXPORT PFNGLLOADMATRIXXPROC __glewLoadMatrixx;
+GLEW_FUN_EXPORT PFNGLMATERIALXPROC __glewMaterialx;
+GLEW_FUN_EXPORT PFNGLMATERIALXVPROC __glewMaterialxv;
+GLEW_FUN_EXPORT PFNGLMULTMATRIXXPROC __glewMultMatrixx;
+GLEW_FUN_EXPORT PFNGLMULTITEXCOORD4XPROC __glewMultiTexCoord4x;
+GLEW_FUN_EXPORT PFNGLNORMAL3XPROC __glewNormal3x;
+GLEW_FUN_EXPORT PFNGLORTHOFPROC __glewOrthof;
+GLEW_FUN_EXPORT PFNGLORTHOXPROC __glewOrthox;
+GLEW_FUN_EXPORT PFNGLPOINTSIZEXPROC __glewPointSizex;
+GLEW_FUN_EXPORT PFNGLPOLYGONOFFSETXPROC __glewPolygonOffsetx;
+GLEW_FUN_EXPORT PFNGLROTATEXPROC __glewRotatex;
+GLEW_FUN_EXPORT PFNGLSAMPLECOVERAGEXPROC __glewSampleCoveragex;
+GLEW_FUN_EXPORT PFNGLSCALEXPROC __glewScalex;
+GLEW_FUN_EXPORT PFNGLTEXENVXPROC __glewTexEnvx;
+GLEW_FUN_EXPORT PFNGLTEXENVXVPROC __glewTexEnvxv;
+GLEW_FUN_EXPORT PFNGLTEXPARAMETERXPROC __glewTexParameterx;
+GLEW_FUN_EXPORT PFNGLTRANSLATEXPROC __glewTranslatex;
+
+GLEW_FUN_EXPORT PFNGLCLIPPLANEFPROC __glewClipPlanef;
+GLEW_FUN_EXPORT PFNGLCLIPPLANEXPROC __glewClipPlanex;
+GLEW_FUN_EXPORT PFNGLGETCLIPPLANEFPROC __glewGetClipPlanef;
+GLEW_FUN_EXPORT PFNGLGETCLIPPLANEXPROC __glewGetClipPlanex;
+GLEW_FUN_EXPORT PFNGLGETFIXEDVPROC __glewGetFixedv;
+GLEW_FUN_EXPORT PFNGLGETLIGHTXVPROC __glewGetLightxv;
+GLEW_FUN_EXPORT PFNGLGETMATERIALXVPROC __glewGetMaterialxv;
+GLEW_FUN_EXPORT PFNGLGETTEXENVXVPROC __glewGetTexEnvxv;
+GLEW_FUN_EXPORT PFNGLGETTEXPARAMETERXVPROC __glewGetTexParameterxv;
+GLEW_FUN_EXPORT PFNGLPOINTPARAMETERXPROC __glewPointParameterx;
+GLEW_FUN_EXPORT PFNGLPOINTPARAMETERXVPROC __glewPointParameterxv;
+GLEW_FUN_EXPORT PFNGLPOINTSIZEPOINTEROESPROC __glewPointSizePointerOES;
+GLEW_FUN_EXPORT PFNGLTEXPARAMETERXVPROC __glewTexParameterxv;
+
+GLEW_FUN_EXPORT PFNGLERRORSTRINGREGALPROC __glewErrorStringREGAL;
+
+GLEW_FUN_EXPORT PFNGLGETEXTENSIONREGALPROC __glewGetExtensionREGAL;
+GLEW_FUN_EXPORT PFNGLISSUPPORTEDREGALPROC __glewIsSupportedREGAL;
+
+GLEW_FUN_EXPORT PFNGLLOGMESSAGECALLBACKREGALPROC __glewLogMessageCallbackREGAL;
+
+GLEW_FUN_EXPORT PFNGLGETPROCADDRESSREGALPROC __glewGetProcAddressREGAL;
+
+GLEW_FUN_EXPORT PFNGLDETAILTEXFUNCSGISPROC __glewDetailTexFuncSGIS;
+GLEW_FUN_EXPORT PFNGLGETDETAILTEXFUNCSGISPROC __glewGetDetailTexFuncSGIS;
+
+GLEW_FUN_EXPORT PFNGLFOGFUNCSGISPROC __glewFogFuncSGIS;
+GLEW_FUN_EXPORT PFNGLGETFOGFUNCSGISPROC __glewGetFogFuncSGIS;
+
+GLEW_FUN_EXPORT PFNGLSAMPLEMASKSGISPROC __glewSampleMaskSGIS;
+GLEW_FUN_EXPORT PFNGLSAMPLEPATTERNSGISPROC __glewSamplePatternSGIS;
+
+GLEW_FUN_EXPORT PFNGLGETSHARPENTEXFUNCSGISPROC __glewGetSharpenTexFuncSGIS;
+GLEW_FUN_EXPORT PFNGLSHARPENTEXFUNCSGISPROC __glewSharpenTexFuncSGIS;
+
+GLEW_FUN_EXPORT PFNGLTEXIMAGE4DSGISPROC __glewTexImage4DSGIS;
+GLEW_FUN_EXPORT PFNGLTEXSUBIMAGE4DSGISPROC __glewTexSubImage4DSGIS;
+
+GLEW_FUN_EXPORT PFNGLGETTEXFILTERFUNCSGISPROC __glewGetTexFilterFuncSGIS;
+GLEW_FUN_EXPORT PFNGLTEXFILTERFUNCSGISPROC __glewTexFilterFuncSGIS;
+
+GLEW_FUN_EXPORT PFNGLASYNCMARKERSGIXPROC __glewAsyncMarkerSGIX;
+GLEW_FUN_EXPORT PFNGLDELETEASYNCMARKERSSGIXPROC __glewDeleteAsyncMarkersSGIX;
+GLEW_FUN_EXPORT PFNGLFINISHASYNCSGIXPROC __glewFinishAsyncSGIX;
+GLEW_FUN_EXPORT PFNGLGENASYNCMARKERSSGIXPROC __glewGenAsyncMarkersSGIX;
+GLEW_FUN_EXPORT PFNGLISASYNCMARKERSGIXPROC __glewIsAsyncMarkerSGIX;
+GLEW_FUN_EXPORT PFNGLPOLLASYNCSGIXPROC __glewPollAsyncSGIX;
+
+GLEW_FUN_EXPORT PFNGLFLUSHRASTERSGIXPROC __glewFlushRasterSGIX;
+
+GLEW_FUN_EXPORT PFNGLTEXTUREFOGSGIXPROC __glewTextureFogSGIX;
+
+GLEW_FUN_EXPORT PFNGLFRAGMENTCOLORMATERIALSGIXPROC __glewFragmentColorMaterialSGIX;
+GLEW_FUN_EXPORT PFNGLFRAGMENTLIGHTMODELFSGIXPROC __glewFragmentLightModelfSGIX;
+GLEW_FUN_EXPORT PFNGLFRAGMENTLIGHTMODELFVSGIXPROC __glewFragmentLightModelfvSGIX;
+GLEW_FUN_EXPORT PFNGLFRAGMENTLIGHTMODELISGIXPROC __glewFragmentLightModeliSGIX;
+GLEW_FUN_EXPORT PFNGLFRAGMENTLIGHTMODELIVSGIXPROC __glewFragmentLightModelivSGIX;
+GLEW_FUN_EXPORT PFNGLFRAGMENTLIGHTFSGIXPROC __glewFragmentLightfSGIX;
+GLEW_FUN_EXPORT PFNGLFRAGMENTLIGHTFVSGIXPROC __glewFragmentLightfvSGIX;
+GLEW_FUN_EXPORT PFNGLFRAGMENTLIGHTISGIXPROC __glewFragmentLightiSGIX;
+GLEW_FUN_EXPORT PFNGLFRAGMENTLIGHTIVSGIXPROC __glewFragmentLightivSGIX;
+GLEW_FUN_EXPORT PFNGLFRAGMENTMATERIALFSGIXPROC __glewFragmentMaterialfSGIX;
+GLEW_FUN_EXPORT PFNGLFRAGMENTMATERIALFVSGIXPROC __glewFragmentMaterialfvSGIX;
+GLEW_FUN_EXPORT PFNGLFRAGMENTMATERIALISGIXPROC __glewFragmentMaterialiSGIX;
+GLEW_FUN_EXPORT PFNGLFRAGMENTMATERIALIVSGIXPROC __glewFragmentMaterialivSGIX;
+GLEW_FUN_EXPORT PFNGLGETFRAGMENTLIGHTFVSGIXPROC __glewGetFragmentLightfvSGIX;
+GLEW_FUN_EXPORT PFNGLGETFRAGMENTLIGHTIVSGIXPROC __glewGetFragmentLightivSGIX;
+GLEW_FUN_EXPORT PFNGLGETFRAGMENTMATERIALFVSGIXPROC __glewGetFragmentMaterialfvSGIX;
+GLEW_FUN_EXPORT PFNGLGETFRAGMENTMATERIALIVSGIXPROC __glewGetFragmentMaterialivSGIX;
+
+GLEW_FUN_EXPORT PFNGLFRAMEZOOMSGIXPROC __glewFrameZoomSGIX;
+
+GLEW_FUN_EXPORT PFNGLPIXELTEXGENSGIXPROC __glewPixelTexGenSGIX;
+
+GLEW_FUN_EXPORT PFNGLREFERENCEPLANESGIXPROC __glewReferencePlaneSGIX;
+
+GLEW_FUN_EXPORT PFNGLSPRITEPARAMETERFSGIXPROC __glewSpriteParameterfSGIX;
+GLEW_FUN_EXPORT PFNGLSPRITEPARAMETERFVSGIXPROC __glewSpriteParameterfvSGIX;
+GLEW_FUN_EXPORT PFNGLSPRITEPARAMETERISGIXPROC __glewSpriteParameteriSGIX;
+GLEW_FUN_EXPORT PFNGLSPRITEPARAMETERIVSGIXPROC __glewSpriteParameterivSGIX;
+
+GLEW_FUN_EXPORT PFNGLTAGSAMPLEBUFFERSGIXPROC __glewTagSampleBufferSGIX;
+
+GLEW_FUN_EXPORT PFNGLCOLORTABLEPARAMETERFVSGIPROC __glewColorTableParameterfvSGI;
+GLEW_FUN_EXPORT PFNGLCOLORTABLEPARAMETERIVSGIPROC __glewColorTableParameterivSGI;
+GLEW_FUN_EXPORT PFNGLCOLORTABLESGIPROC __glewColorTableSGI;
+GLEW_FUN_EXPORT PFNGLCOPYCOLORTABLESGIPROC __glewCopyColorTableSGI;
+GLEW_FUN_EXPORT PFNGLGETCOLORTABLEPARAMETERFVSGIPROC __glewGetColorTableParameterfvSGI;
+GLEW_FUN_EXPORT PFNGLGETCOLORTABLEPARAMETERIVSGIPROC __glewGetColorTableParameterivSGI;
+GLEW_FUN_EXPORT PFNGLGETCOLORTABLESGIPROC __glewGetColorTableSGI;
+
+GLEW_FUN_EXPORT PFNGLFINISHTEXTURESUNXPROC __glewFinishTextureSUNX;
+
+GLEW_FUN_EXPORT PFNGLGLOBALALPHAFACTORBSUNPROC __glewGlobalAlphaFactorbSUN;
+GLEW_FUN_EXPORT PFNGLGLOBALALPHAFACTORDSUNPROC __glewGlobalAlphaFactordSUN;
+GLEW_FUN_EXPORT PFNGLGLOBALALPHAFACTORFSUNPROC __glewGlobalAlphaFactorfSUN;
+GLEW_FUN_EXPORT PFNGLGLOBALALPHAFACTORISUNPROC __glewGlobalAlphaFactoriSUN;
+GLEW_FUN_EXPORT PFNGLGLOBALALPHAFACTORSSUNPROC __glewGlobalAlphaFactorsSUN;
+GLEW_FUN_EXPORT PFNGLGLOBALALPHAFACTORUBSUNPROC __glewGlobalAlphaFactorubSUN;
+GLEW_FUN_EXPORT PFNGLGLOBALALPHAFACTORUISUNPROC __glewGlobalAlphaFactoruiSUN;
+GLEW_FUN_EXPORT PFNGLGLOBALALPHAFACTORUSSUNPROC __glewGlobalAlphaFactorusSUN;
+
+GLEW_FUN_EXPORT PFNGLREADVIDEOPIXELSSUNPROC __glewReadVideoPixelsSUN;
+
+GLEW_FUN_EXPORT PFNGLREPLACEMENTCODEPOINTERSUNPROC __glewReplacementCodePointerSUN;
+GLEW_FUN_EXPORT PFNGLREPLACEMENTCODEUBSUNPROC __glewReplacementCodeubSUN;
+GLEW_FUN_EXPORT PFNGLREPLACEMENTCODEUBVSUNPROC __glewReplacementCodeubvSUN;
+GLEW_FUN_EXPORT PFNGLREPLACEMENTCODEUISUNPROC __glewReplacementCodeuiSUN;
+GLEW_FUN_EXPORT PFNGLREPLACEMENTCODEUIVSUNPROC __glewReplacementCodeuivSUN;
+GLEW_FUN_EXPORT PFNGLREPLACEMENTCODEUSSUNPROC __glewReplacementCodeusSUN;
+GLEW_FUN_EXPORT PFNGLREPLACEMENTCODEUSVSUNPROC __glewReplacementCodeusvSUN;
+
+GLEW_FUN_EXPORT PFNGLCOLOR3FVERTEX3FSUNPROC __glewColor3fVertex3fSUN;
+GLEW_FUN_EXPORT PFNGLCOLOR3FVERTEX3FVSUNPROC __glewColor3fVertex3fvSUN;
+GLEW_FUN_EXPORT PFNGLCOLOR4FNORMAL3FVERTEX3FSUNPROC __glewColor4fNormal3fVertex3fSUN;
+GLEW_FUN_EXPORT PFNGLCOLOR4FNORMAL3FVERTEX3FVSUNPROC __glewColor4fNormal3fVertex3fvSUN;
+GLEW_FUN_EXPORT PFNGLCOLOR4UBVERTEX2FSUNPROC __glewColor4ubVertex2fSUN;
+GLEW_FUN_EXPORT PFNGLCOLOR4UBVERTEX2FVSUNPROC __glewColor4ubVertex2fvSUN;
+GLEW_FUN_EXPORT PFNGLCOLOR4UBVERTEX3FSUNPROC __glewColor4ubVertex3fSUN;
+GLEW_FUN_EXPORT PFNGLCOLOR4UBVERTEX3FVSUNPROC __glewColor4ubVertex3fvSUN;
+GLEW_FUN_EXPORT PFNGLNORMAL3FVERTEX3FSUNPROC __glewNormal3fVertex3fSUN;
+GLEW_FUN_EXPORT PFNGLNORMAL3FVERTEX3FVSUNPROC __glewNormal3fVertex3fvSUN;
+GLEW_FUN_EXPORT PFNGLREPLACEMENTCODEUICOLOR3FVERTEX3FSUNPROC __glewReplacementCodeuiColor3fVertex3fSUN;
+GLEW_FUN_EXPORT PFNGLREPLACEMENTCODEUICOLOR3FVERTEX3FVSUNPROC __glewReplacementCodeuiColor3fVertex3fvSUN;
+GLEW_FUN_EXPORT PFNGLREPLACEMENTCODEUICOLOR4FNORMAL3FVERTEX3FSUNPROC __glewReplacementCodeuiColor4fNormal3fVertex3fSUN;
+GLEW_FUN_EXPORT PFNGLREPLACEMENTCODEUICOLOR4FNORMAL3FVERTEX3FVSUNPROC __glewReplacementCodeuiColor4fNormal3fVertex3fvSUN;
+GLEW_FUN_EXPORT PFNGLREPLACEMENTCODEUICOLOR4UBVERTEX3FSUNPROC __glewReplacementCodeuiColor4ubVertex3fSUN;
+GLEW_FUN_EXPORT PFNGLREPLACEMENTCODEUICOLOR4UBVERTEX3FVSUNPROC __glewReplacementCodeuiColor4ubVertex3fvSUN;
+GLEW_FUN_EXPORT PFNGLREPLACEMENTCODEUINORMAL3FVERTEX3FSUNPROC __glewReplacementCodeuiNormal3fVertex3fSUN;
+GLEW_FUN_EXPORT PFNGLREPLACEMENTCODEUINORMAL3FVERTEX3FVSUNPROC __glewReplacementCodeuiNormal3fVertex3fvSUN;
+GLEW_FUN_EXPORT PFNGLREPLACEMENTCODEUITEXCOORD2FCOLOR4FNORMAL3FVERTEX3FSUNPROC __glewReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN;
+GLEW_FUN_EXPORT PFNGLREPLACEMENTCODEUITEXCOORD2FCOLOR4FNORMAL3FVERTEX3FVSUNPROC __glewReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN;
+GLEW_FUN_EXPORT PFNGLREPLACEMENTCODEUITEXCOORD2FNORMAL3FVERTEX3FSUNPROC __glewReplacementCodeuiTexCoord2fNormal3fVertex3fSUN;
+GLEW_FUN_EXPORT PFNGLREPLACEMENTCODEUITEXCOORD2FNORMAL3FVERTEX3FVSUNPROC __glewReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN;
+GLEW_FUN_EXPORT PFNGLREPLACEMENTCODEUITEXCOORD2FVERTEX3FSUNPROC __glewReplacementCodeuiTexCoord2fVertex3fSUN;
+GLEW_FUN_EXPORT PFNGLREPLACEMENTCODEUITEXCOORD2FVERTEX3FVSUNPROC __glewReplacementCodeuiTexCoord2fVertex3fvSUN;
+GLEW_FUN_EXPORT PFNGLREPLACEMENTCODEUIVERTEX3FSUNPROC __glewReplacementCodeuiVertex3fSUN;
+GLEW_FUN_EXPORT PFNGLREPLACEMENTCODEUIVERTEX3FVSUNPROC __glewReplacementCodeuiVertex3fvSUN;
+GLEW_FUN_EXPORT PFNGLTEXCOORD2FCOLOR3FVERTEX3FSUNPROC __glewTexCoord2fColor3fVertex3fSUN;
+GLEW_FUN_EXPORT PFNGLTEXCOORD2FCOLOR3FVERTEX3FVSUNPROC __glewTexCoord2fColor3fVertex3fvSUN;
+GLEW_FUN_EXPORT PFNGLTEXCOORD2FCOLOR4FNORMAL3FVERTEX3FSUNPROC __glewTexCoord2fColor4fNormal3fVertex3fSUN;
+GLEW_FUN_EXPORT PFNGLTEXCOORD2FCOLOR4FNORMAL3FVERTEX3FVSUNPROC __glewTexCoord2fColor4fNormal3fVertex3fvSUN;
+GLEW_FUN_EXPORT PFNGLTEXCOORD2FCOLOR4UBVERTEX3FSUNPROC __glewTexCoord2fColor4ubVertex3fSUN;
+GLEW_FUN_EXPORT PFNGLTEXCOORD2FCOLOR4UBVERTEX3FVSUNPROC __glewTexCoord2fColor4ubVertex3fvSUN;
+GLEW_FUN_EXPORT PFNGLTEXCOORD2FNORMAL3FVERTEX3FSUNPROC __glewTexCoord2fNormal3fVertex3fSUN;
+GLEW_FUN_EXPORT PFNGLTEXCOORD2FNORMAL3FVERTEX3FVSUNPROC __glewTexCoord2fNormal3fVertex3fvSUN;
+GLEW_FUN_EXPORT PFNGLTEXCOORD2FVERTEX3FSUNPROC __glewTexCoord2fVertex3fSUN;
+GLEW_FUN_EXPORT PFNGLTEXCOORD2FVERTEX3FVSUNPROC __glewTexCoord2fVertex3fvSUN;
+GLEW_FUN_EXPORT PFNGLTEXCOORD4FCOLOR4FNORMAL3FVERTEX4FSUNPROC __glewTexCoord4fColor4fNormal3fVertex4fSUN;
+GLEW_FUN_EXPORT PFNGLTEXCOORD4FCOLOR4FNORMAL3FVERTEX4FVSUNPROC __glewTexCoord4fColor4fNormal3fVertex4fvSUN;
+GLEW_FUN_EXPORT PFNGLTEXCOORD4FVERTEX4FSUNPROC __glewTexCoord4fVertex4fSUN;
+GLEW_FUN_EXPORT PFNGLTEXCOORD4FVERTEX4FVSUNPROC __glewTexCoord4fVertex4fvSUN;
+
+GLEW_FUN_EXPORT PFNGLADDSWAPHINTRECTWINPROC __glewAddSwapHintRectWIN;
+
+#if defined(GLEW_MX) && !defined(_WIN32)
+struct GLEWContextStruct
+{
+#endif /* GLEW_MX */
+
+GLEW_VAR_EXPORT GLboolean __GLEW_VERSION_1_1;
+GLEW_VAR_EXPORT GLboolean __GLEW_VERSION_1_2;
+GLEW_VAR_EXPORT GLboolean __GLEW_VERSION_1_2_1;
+GLEW_VAR_EXPORT GLboolean __GLEW_VERSION_1_3;
+GLEW_VAR_EXPORT GLboolean __GLEW_VERSION_1_4;
+GLEW_VAR_EXPORT GLboolean __GLEW_VERSION_1_5;
+GLEW_VAR_EXPORT GLboolean __GLEW_VERSION_2_0;
+GLEW_VAR_EXPORT GLboolean __GLEW_VERSION_2_1;
+GLEW_VAR_EXPORT GLboolean __GLEW_VERSION_3_0;
+GLEW_VAR_EXPORT GLboolean __GLEW_VERSION_3_1;
+GLEW_VAR_EXPORT GLboolean __GLEW_VERSION_3_2;
+GLEW_VAR_EXPORT GLboolean __GLEW_VERSION_3_3;
+GLEW_VAR_EXPORT GLboolean __GLEW_VERSION_4_0;
+GLEW_VAR_EXPORT GLboolean __GLEW_VERSION_4_1;
+GLEW_VAR_EXPORT GLboolean __GLEW_VERSION_4_2;
+GLEW_VAR_EXPORT GLboolean __GLEW_VERSION_4_3;
+GLEW_VAR_EXPORT GLboolean __GLEW_VERSION_4_4;
+GLEW_VAR_EXPORT GLboolean __GLEW_VERSION_4_5;
+GLEW_VAR_EXPORT GLboolean __GLEW_3DFX_multisample;
+GLEW_VAR_EXPORT GLboolean __GLEW_3DFX_tbuffer;
+GLEW_VAR_EXPORT GLboolean __GLEW_3DFX_texture_compression_FXT1;
+GLEW_VAR_EXPORT GLboolean __GLEW_AMD_blend_minmax_factor;
+GLEW_VAR_EXPORT GLboolean __GLEW_AMD_conservative_depth;
+GLEW_VAR_EXPORT GLboolean __GLEW_AMD_debug_output;
+GLEW_VAR_EXPORT GLboolean __GLEW_AMD_depth_clamp_separate;
+GLEW_VAR_EXPORT GLboolean __GLEW_AMD_draw_buffers_blend;
+GLEW_VAR_EXPORT GLboolean __GLEW_AMD_gcn_shader;
+GLEW_VAR_EXPORT GLboolean __GLEW_AMD_gpu_shader_int64;
+GLEW_VAR_EXPORT GLboolean __GLEW_AMD_interleaved_elements;
+GLEW_VAR_EXPORT GLboolean __GLEW_AMD_multi_draw_indirect;
+GLEW_VAR_EXPORT GLboolean __GLEW_AMD_name_gen_delete;
+GLEW_VAR_EXPORT GLboolean __GLEW_AMD_occlusion_query_event;
+GLEW_VAR_EXPORT GLboolean __GLEW_AMD_performance_monitor;
+GLEW_VAR_EXPORT GLboolean __GLEW_AMD_pinned_memory;
+GLEW_VAR_EXPORT GLboolean __GLEW_AMD_query_buffer_object;
+GLEW_VAR_EXPORT GLboolean __GLEW_AMD_sample_positions;
+GLEW_VAR_EXPORT GLboolean __GLEW_AMD_seamless_cubemap_per_texture;
+GLEW_VAR_EXPORT GLboolean __GLEW_AMD_shader_atomic_counter_ops;
+GLEW_VAR_EXPORT GLboolean __GLEW_AMD_shader_stencil_export;
+GLEW_VAR_EXPORT GLboolean __GLEW_AMD_shader_stencil_value_export;
+GLEW_VAR_EXPORT GLboolean __GLEW_AMD_shader_trinary_minmax;
+GLEW_VAR_EXPORT GLboolean __GLEW_AMD_sparse_texture;
+GLEW_VAR_EXPORT GLboolean __GLEW_AMD_stencil_operation_extended;
+GLEW_VAR_EXPORT GLboolean __GLEW_AMD_texture_texture4;
+GLEW_VAR_EXPORT GLboolean __GLEW_AMD_transform_feedback3_lines_triangles;
+GLEW_VAR_EXPORT GLboolean __GLEW_AMD_transform_feedback4;
+GLEW_VAR_EXPORT GLboolean __GLEW_AMD_vertex_shader_layer;
+GLEW_VAR_EXPORT GLboolean __GLEW_AMD_vertex_shader_tessellator;
+GLEW_VAR_EXPORT GLboolean __GLEW_AMD_vertex_shader_viewport_index;
+GLEW_VAR_EXPORT GLboolean __GLEW_ANGLE_depth_texture;
+GLEW_VAR_EXPORT GLboolean __GLEW_ANGLE_framebuffer_blit;
+GLEW_VAR_EXPORT GLboolean __GLEW_ANGLE_framebuffer_multisample;
+GLEW_VAR_EXPORT GLboolean __GLEW_ANGLE_instanced_arrays;
+GLEW_VAR_EXPORT GLboolean __GLEW_ANGLE_pack_reverse_row_order;
+GLEW_VAR_EXPORT GLboolean __GLEW_ANGLE_program_binary;
+GLEW_VAR_EXPORT GLboolean __GLEW_ANGLE_texture_compression_dxt1;
+GLEW_VAR_EXPORT GLboolean __GLEW_ANGLE_texture_compression_dxt3;
+GLEW_VAR_EXPORT GLboolean __GLEW_ANGLE_texture_compression_dxt5;
+GLEW_VAR_EXPORT GLboolean __GLEW_ANGLE_texture_usage;
+GLEW_VAR_EXPORT GLboolean __GLEW_ANGLE_timer_query;
+GLEW_VAR_EXPORT GLboolean __GLEW_ANGLE_translated_shader_source;
+GLEW_VAR_EXPORT GLboolean __GLEW_APPLE_aux_depth_stencil;
+GLEW_VAR_EXPORT GLboolean __GLEW_APPLE_client_storage;
+GLEW_VAR_EXPORT GLboolean __GLEW_APPLE_element_array;
+GLEW_VAR_EXPORT GLboolean __GLEW_APPLE_fence;
+GLEW_VAR_EXPORT GLboolean __GLEW_APPLE_float_pixels;
+GLEW_VAR_EXPORT GLboolean __GLEW_APPLE_flush_buffer_range;
+GLEW_VAR_EXPORT GLboolean __GLEW_APPLE_object_purgeable;
+GLEW_VAR_EXPORT GLboolean __GLEW_APPLE_pixel_buffer;
+GLEW_VAR_EXPORT GLboolean __GLEW_APPLE_rgb_422;
+GLEW_VAR_EXPORT GLboolean __GLEW_APPLE_row_bytes;
+GLEW_VAR_EXPORT GLboolean __GLEW_APPLE_specular_vector;
+GLEW_VAR_EXPORT GLboolean __GLEW_APPLE_texture_range;
+GLEW_VAR_EXPORT GLboolean __GLEW_APPLE_transform_hint;
+GLEW_VAR_EXPORT GLboolean __GLEW_APPLE_vertex_array_object;
+GLEW_VAR_EXPORT GLboolean __GLEW_APPLE_vertex_array_range;
+GLEW_VAR_EXPORT GLboolean __GLEW_APPLE_vertex_program_evaluators;
+GLEW_VAR_EXPORT GLboolean __GLEW_APPLE_ycbcr_422;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_ES2_compatibility;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_ES3_1_compatibility;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_ES3_compatibility;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_arrays_of_arrays;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_base_instance;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_bindless_texture;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_blend_func_extended;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_buffer_storage;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_cl_event;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_clear_buffer_object;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_clear_texture;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_clip_control;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_color_buffer_float;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_compatibility;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_compressed_texture_pixel_storage;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_compute_shader;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_compute_variable_group_size;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_conditional_render_inverted;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_conservative_depth;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_copy_buffer;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_copy_image;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_cull_distance;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_debug_output;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_depth_buffer_float;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_depth_clamp;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_depth_texture;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_derivative_control;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_direct_state_access;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_draw_buffers;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_draw_buffers_blend;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_draw_elements_base_vertex;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_draw_indirect;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_draw_instanced;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_enhanced_layouts;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_explicit_attrib_location;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_explicit_uniform_location;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_fragment_coord_conventions;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_fragment_layer_viewport;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_fragment_program;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_fragment_program_shadow;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_fragment_shader;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_framebuffer_no_attachments;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_framebuffer_object;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_framebuffer_sRGB;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_geometry_shader4;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_get_program_binary;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_get_texture_sub_image;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_gpu_shader5;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_gpu_shader_fp64;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_half_float_pixel;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_half_float_vertex;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_imaging;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_indirect_parameters;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_instanced_arrays;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_internalformat_query;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_internalformat_query2;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_invalidate_subdata;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_map_buffer_alignment;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_map_buffer_range;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_matrix_palette;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_multi_bind;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_multi_draw_indirect;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_multisample;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_multitexture;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_occlusion_query;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_occlusion_query2;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_pipeline_statistics_query;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_pixel_buffer_object;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_point_parameters;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_point_sprite;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_program_interface_query;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_provoking_vertex;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_query_buffer_object;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_robust_buffer_access_behavior;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_robustness;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_robustness_application_isolation;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_robustness_share_group_isolation;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_sample_shading;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_sampler_objects;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_seamless_cube_map;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_seamless_cubemap_per_texture;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_separate_shader_objects;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_shader_atomic_counters;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_shader_bit_encoding;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_shader_draw_parameters;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_shader_group_vote;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_shader_image_load_store;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_shader_image_size;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_shader_objects;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_shader_precision;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_shader_stencil_export;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_shader_storage_buffer_object;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_shader_subroutine;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_shader_texture_image_samples;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_shader_texture_lod;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_shading_language_100;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_shading_language_420pack;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_shading_language_include;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_shading_language_packing;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_shadow;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_shadow_ambient;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_sparse_buffer;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_sparse_texture;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_stencil_texturing;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_sync;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_tessellation_shader;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_texture_barrier;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_texture_border_clamp;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_texture_buffer_object;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_texture_buffer_object_rgb32;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_texture_buffer_range;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_texture_compression;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_texture_compression_bptc;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_texture_compression_rgtc;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_texture_cube_map;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_texture_cube_map_array;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_texture_env_add;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_texture_env_combine;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_texture_env_crossbar;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_texture_env_dot3;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_texture_float;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_texture_gather;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_texture_mirror_clamp_to_edge;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_texture_mirrored_repeat;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_texture_multisample;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_texture_non_power_of_two;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_texture_query_levels;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_texture_query_lod;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_texture_rectangle;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_texture_rg;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_texture_rgb10_a2ui;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_texture_stencil8;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_texture_storage;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_texture_storage_multisample;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_texture_swizzle;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_texture_view;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_timer_query;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_transform_feedback2;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_transform_feedback3;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_transform_feedback_instanced;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_transform_feedback_overflow_query;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_transpose_matrix;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_uniform_buffer_object;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_vertex_array_bgra;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_vertex_array_object;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_vertex_attrib_64bit;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_vertex_attrib_binding;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_vertex_blend;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_vertex_buffer_object;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_vertex_program;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_vertex_shader;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_vertex_type_10f_11f_11f_rev;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_vertex_type_2_10_10_10_rev;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_viewport_array;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_window_pos;
+GLEW_VAR_EXPORT GLboolean __GLEW_ATIX_point_sprites;
+GLEW_VAR_EXPORT GLboolean __GLEW_ATIX_texture_env_combine3;
+GLEW_VAR_EXPORT GLboolean __GLEW_ATIX_texture_env_route;
+GLEW_VAR_EXPORT GLboolean __GLEW_ATIX_vertex_shader_output_point_size;
+GLEW_VAR_EXPORT GLboolean __GLEW_ATI_draw_buffers;
+GLEW_VAR_EXPORT GLboolean __GLEW_ATI_element_array;
+GLEW_VAR_EXPORT GLboolean __GLEW_ATI_envmap_bumpmap;
+GLEW_VAR_EXPORT GLboolean __GLEW_ATI_fragment_shader;
+GLEW_VAR_EXPORT GLboolean __GLEW_ATI_map_object_buffer;
+GLEW_VAR_EXPORT GLboolean __GLEW_ATI_meminfo;
+GLEW_VAR_EXPORT GLboolean __GLEW_ATI_pn_triangles;
+GLEW_VAR_EXPORT GLboolean __GLEW_ATI_separate_stencil;
+GLEW_VAR_EXPORT GLboolean __GLEW_ATI_shader_texture_lod;
+GLEW_VAR_EXPORT GLboolean __GLEW_ATI_text_fragment_shader;
+GLEW_VAR_EXPORT GLboolean __GLEW_ATI_texture_compression_3dc;
+GLEW_VAR_EXPORT GLboolean __GLEW_ATI_texture_env_combine3;
+GLEW_VAR_EXPORT GLboolean __GLEW_ATI_texture_float;
+GLEW_VAR_EXPORT GLboolean __GLEW_ATI_texture_mirror_once;
+GLEW_VAR_EXPORT GLboolean __GLEW_ATI_vertex_array_object;
+GLEW_VAR_EXPORT GLboolean __GLEW_ATI_vertex_attrib_array_object;
+GLEW_VAR_EXPORT GLboolean __GLEW_ATI_vertex_streams;
+GLEW_VAR_EXPORT GLboolean __GLEW_EXT_422_pixels;
+GLEW_VAR_EXPORT GLboolean __GLEW_EXT_Cg_shader;
+GLEW_VAR_EXPORT GLboolean __GLEW_EXT_abgr;
+GLEW_VAR_EXPORT GLboolean __GLEW_EXT_bgra;
+GLEW_VAR_EXPORT GLboolean __GLEW_EXT_bindable_uniform;
+GLEW_VAR_EXPORT GLboolean __GLEW_EXT_blend_color;
+GLEW_VAR_EXPORT GLboolean __GLEW_EXT_blend_equation_separate;
+GLEW_VAR_EXPORT GLboolean __GLEW_EXT_blend_func_separate;
+GLEW_VAR_EXPORT GLboolean __GLEW_EXT_blend_logic_op;
+GLEW_VAR_EXPORT GLboolean __GLEW_EXT_blend_minmax;
+GLEW_VAR_EXPORT GLboolean __GLEW_EXT_blend_subtract;
+GLEW_VAR_EXPORT GLboolean __GLEW_EXT_clip_volume_hint;
+GLEW_VAR_EXPORT GLboolean __GLEW_EXT_cmyka;
+GLEW_VAR_EXPORT GLboolean __GLEW_EXT_color_subtable;
+GLEW_VAR_EXPORT GLboolean __GLEW_EXT_compiled_vertex_array;
+GLEW_VAR_EXPORT GLboolean __GLEW_EXT_convolution;
+GLEW_VAR_EXPORT GLboolean __GLEW_EXT_coordinate_frame;
+GLEW_VAR_EXPORT GLboolean __GLEW_EXT_copy_texture;
+GLEW_VAR_EXPORT GLboolean __GLEW_EXT_cull_vertex;
+GLEW_VAR_EXPORT GLboolean __GLEW_EXT_debug_label;
+GLEW_VAR_EXPORT GLboolean __GLEW_EXT_debug_marker;
+GLEW_VAR_EXPORT GLboolean __GLEW_EXT_depth_bounds_test;
+GLEW_VAR_EXPORT GLboolean __GLEW_EXT_direct_state_access;
+GLEW_VAR_EXPORT GLboolean __GLEW_EXT_draw_buffers2;
+GLEW_VAR_EXPORT GLboolean __GLEW_EXT_draw_instanced;
+GLEW_VAR_EXPORT GLboolean __GLEW_EXT_draw_range_elements;
+GLEW_VAR_EXPORT GLboolean __GLEW_EXT_fog_coord;
+GLEW_VAR_EXPORT GLboolean __GLEW_EXT_fragment_lighting;
+GLEW_VAR_EXPORT GLboolean __GLEW_EXT_framebuffer_blit;
+GLEW_VAR_EXPORT GLboolean __GLEW_EXT_framebuffer_multisample;
+GLEW_VAR_EXPORT GLboolean __GLEW_EXT_framebuffer_multisample_blit_scaled;
+GLEW_VAR_EXPORT GLboolean __GLEW_EXT_framebuffer_object;
+GLEW_VAR_EXPORT GLboolean __GLEW_EXT_framebuffer_sRGB;
+GLEW_VAR_EXPORT GLboolean __GLEW_EXT_geometry_shader4;
+GLEW_VAR_EXPORT GLboolean __GLEW_EXT_gpu_program_parameters;
+GLEW_VAR_EXPORT GLboolean __GLEW_EXT_gpu_shader4;
+GLEW_VAR_EXPORT GLboolean __GLEW_EXT_histogram;
+GLEW_VAR_EXPORT GLboolean __GLEW_EXT_index_array_formats;
+GLEW_VAR_EXPORT GLboolean __GLEW_EXT_index_func;
+GLEW_VAR_EXPORT GLboolean __GLEW_EXT_index_material;
+GLEW_VAR_EXPORT GLboolean __GLEW_EXT_index_texture;
+GLEW_VAR_EXPORT GLboolean __GLEW_EXT_light_texture;
+GLEW_VAR_EXPORT GLboolean __GLEW_EXT_misc_attribute;
+GLEW_VAR_EXPORT GLboolean __GLEW_EXT_multi_draw_arrays;
+GLEW_VAR_EXPORT GLboolean __GLEW_EXT_multisample;
+GLEW_VAR_EXPORT GLboolean __GLEW_EXT_packed_depth_stencil;
+GLEW_VAR_EXPORT GLboolean __GLEW_EXT_packed_float;
+GLEW_VAR_EXPORT GLboolean __GLEW_EXT_packed_pixels;
+GLEW_VAR_EXPORT GLboolean __GLEW_EXT_paletted_texture;
+GLEW_VAR_EXPORT GLboolean __GLEW_EXT_pixel_buffer_object;
+GLEW_VAR_EXPORT GLboolean __GLEW_EXT_pixel_transform;
+GLEW_VAR_EXPORT GLboolean __GLEW_EXT_pixel_transform_color_table;
+GLEW_VAR_EXPORT GLboolean __GLEW_EXT_point_parameters;
+GLEW_VAR_EXPORT GLboolean __GLEW_EXT_polygon_offset;
+GLEW_VAR_EXPORT GLboolean __GLEW_EXT_polygon_offset_clamp;
+GLEW_VAR_EXPORT GLboolean __GLEW_EXT_post_depth_coverage;
+GLEW_VAR_EXPORT GLboolean __GLEW_EXT_provoking_vertex;
+GLEW_VAR_EXPORT GLboolean __GLEW_EXT_raster_multisample;
+GLEW_VAR_EXPORT GLboolean __GLEW_EXT_rescale_normal;
+GLEW_VAR_EXPORT GLboolean __GLEW_EXT_scene_marker;
+GLEW_VAR_EXPORT GLboolean __GLEW_EXT_secondary_color;
+GLEW_VAR_EXPORT GLboolean __GLEW_EXT_separate_shader_objects;
+GLEW_VAR_EXPORT GLboolean __GLEW_EXT_separate_specular_color;
+GLEW_VAR_EXPORT GLboolean __GLEW_EXT_shader_image_load_formatted;
+GLEW_VAR_EXPORT GLboolean __GLEW_EXT_shader_image_load_store;
+GLEW_VAR_EXPORT GLboolean __GLEW_EXT_shader_integer_mix;
+GLEW_VAR_EXPORT GLboolean __GLEW_EXT_shadow_funcs;
+GLEW_VAR_EXPORT GLboolean __GLEW_EXT_shared_texture_palette;
+GLEW_VAR_EXPORT GLboolean __GLEW_EXT_sparse_texture2;
+GLEW_VAR_EXPORT GLboolean __GLEW_EXT_stencil_clear_tag;
+GLEW_VAR_EXPORT GLboolean __GLEW_EXT_stencil_two_side;
+GLEW_VAR_EXPORT GLboolean __GLEW_EXT_stencil_wrap;
+GLEW_VAR_EXPORT GLboolean __GLEW_EXT_subtexture;
+GLEW_VAR_EXPORT GLboolean __GLEW_EXT_texture;
+GLEW_VAR_EXPORT GLboolean __GLEW_EXT_texture3D;
+GLEW_VAR_EXPORT GLboolean __GLEW_EXT_texture_array;
+GLEW_VAR_EXPORT GLboolean __GLEW_EXT_texture_buffer_object;
+GLEW_VAR_EXPORT GLboolean __GLEW_EXT_texture_compression_dxt1;
+GLEW_VAR_EXPORT GLboolean __GLEW_EXT_texture_compression_latc;
+GLEW_VAR_EXPORT GLboolean __GLEW_EXT_texture_compression_rgtc;
+GLEW_VAR_EXPORT GLboolean __GLEW_EXT_texture_compression_s3tc;
+GLEW_VAR_EXPORT GLboolean __GLEW_EXT_texture_cube_map;
+GLEW_VAR_EXPORT GLboolean __GLEW_EXT_texture_edge_clamp;
+GLEW_VAR_EXPORT GLboolean __GLEW_EXT_texture_env;
+GLEW_VAR_EXPORT GLboolean __GLEW_EXT_texture_env_add;
+GLEW_VAR_EXPORT GLboolean __GLEW_EXT_texture_env_combine;
+GLEW_VAR_EXPORT GLboolean __GLEW_EXT_texture_env_dot3;
+GLEW_VAR_EXPORT GLboolean __GLEW_EXT_texture_filter_anisotropic;
+GLEW_VAR_EXPORT GLboolean __GLEW_EXT_texture_filter_minmax;
+GLEW_VAR_EXPORT GLboolean __GLEW_EXT_texture_integer;
+GLEW_VAR_EXPORT GLboolean __GLEW_EXT_texture_lod_bias;
+GLEW_VAR_EXPORT GLboolean __GLEW_EXT_texture_mirror_clamp;
+GLEW_VAR_EXPORT GLboolean __GLEW_EXT_texture_object;
+GLEW_VAR_EXPORT GLboolean __GLEW_EXT_texture_perturb_normal;
+GLEW_VAR_EXPORT GLboolean __GLEW_EXT_texture_rectangle;
+GLEW_VAR_EXPORT GLboolean __GLEW_EXT_texture_sRGB;
+GLEW_VAR_EXPORT GLboolean __GLEW_EXT_texture_sRGB_decode;
+GLEW_VAR_EXPORT GLboolean __GLEW_EXT_texture_shared_exponent;
+GLEW_VAR_EXPORT GLboolean __GLEW_EXT_texture_snorm;
+GLEW_VAR_EXPORT GLboolean __GLEW_EXT_texture_swizzle;
+GLEW_VAR_EXPORT GLboolean __GLEW_EXT_timer_query;
+GLEW_VAR_EXPORT GLboolean __GLEW_EXT_transform_feedback;
+GLEW_VAR_EXPORT GLboolean __GLEW_EXT_vertex_array;
+GLEW_VAR_EXPORT GLboolean __GLEW_EXT_vertex_array_bgra;
+GLEW_VAR_EXPORT GLboolean __GLEW_EXT_vertex_attrib_64bit;
+GLEW_VAR_EXPORT GLboolean __GLEW_EXT_vertex_shader;
+GLEW_VAR_EXPORT GLboolean __GLEW_EXT_vertex_weighting;
+GLEW_VAR_EXPORT GLboolean __GLEW_EXT_x11_sync_object;
+GLEW_VAR_EXPORT GLboolean __GLEW_GREMEDY_frame_terminator;
+GLEW_VAR_EXPORT GLboolean __GLEW_GREMEDY_string_marker;
+GLEW_VAR_EXPORT GLboolean __GLEW_HP_convolution_border_modes;
+GLEW_VAR_EXPORT GLboolean __GLEW_HP_image_transform;
+GLEW_VAR_EXPORT GLboolean __GLEW_HP_occlusion_test;
+GLEW_VAR_EXPORT GLboolean __GLEW_HP_texture_lighting;
+GLEW_VAR_EXPORT GLboolean __GLEW_IBM_cull_vertex;
+GLEW_VAR_EXPORT GLboolean __GLEW_IBM_multimode_draw_arrays;
+GLEW_VAR_EXPORT GLboolean __GLEW_IBM_rasterpos_clip;
+GLEW_VAR_EXPORT GLboolean __GLEW_IBM_static_data;
+GLEW_VAR_EXPORT GLboolean __GLEW_IBM_texture_mirrored_repeat;
+GLEW_VAR_EXPORT GLboolean __GLEW_IBM_vertex_array_lists;
+GLEW_VAR_EXPORT GLboolean __GLEW_INGR_color_clamp;
+GLEW_VAR_EXPORT GLboolean __GLEW_INGR_interlace_read;
+GLEW_VAR_EXPORT GLboolean __GLEW_INTEL_fragment_shader_ordering;
+GLEW_VAR_EXPORT GLboolean __GLEW_INTEL_map_texture;
+GLEW_VAR_EXPORT GLboolean __GLEW_INTEL_parallel_arrays;
+GLEW_VAR_EXPORT GLboolean __GLEW_INTEL_performance_query;
+GLEW_VAR_EXPORT GLboolean __GLEW_INTEL_texture_scissor;
+GLEW_VAR_EXPORT GLboolean __GLEW_KHR_blend_equation_advanced;
+GLEW_VAR_EXPORT GLboolean __GLEW_KHR_blend_equation_advanced_coherent;
+GLEW_VAR_EXPORT GLboolean __GLEW_KHR_context_flush_control;
+GLEW_VAR_EXPORT GLboolean __GLEW_KHR_debug;
+GLEW_VAR_EXPORT GLboolean __GLEW_KHR_robust_buffer_access_behavior;
+GLEW_VAR_EXPORT GLboolean __GLEW_KHR_robustness;
+GLEW_VAR_EXPORT GLboolean __GLEW_KHR_texture_compression_astc_hdr;
+GLEW_VAR_EXPORT GLboolean __GLEW_KHR_texture_compression_astc_ldr;
+GLEW_VAR_EXPORT GLboolean __GLEW_KTX_buffer_region;
+GLEW_VAR_EXPORT GLboolean __GLEW_MESAX_texture_stack;
+GLEW_VAR_EXPORT GLboolean __GLEW_MESA_pack_invert;
+GLEW_VAR_EXPORT GLboolean __GLEW_MESA_resize_buffers;
+GLEW_VAR_EXPORT GLboolean __GLEW_MESA_window_pos;
+GLEW_VAR_EXPORT GLboolean __GLEW_MESA_ycbcr_texture;
+GLEW_VAR_EXPORT GLboolean __GLEW_NVX_conditional_render;
+GLEW_VAR_EXPORT GLboolean __GLEW_NVX_gpu_memory_info;
+GLEW_VAR_EXPORT GLboolean __GLEW_NV_bindless_multi_draw_indirect;
+GLEW_VAR_EXPORT GLboolean __GLEW_NV_bindless_multi_draw_indirect_count;
+GLEW_VAR_EXPORT GLboolean __GLEW_NV_bindless_texture;
+GLEW_VAR_EXPORT GLboolean __GLEW_NV_blend_equation_advanced;
+GLEW_VAR_EXPORT GLboolean __GLEW_NV_blend_equation_advanced_coherent;
+GLEW_VAR_EXPORT GLboolean __GLEW_NV_blend_square;
+GLEW_VAR_EXPORT GLboolean __GLEW_NV_compute_program5;
+GLEW_VAR_EXPORT GLboolean __GLEW_NV_conditional_render;
+GLEW_VAR_EXPORT GLboolean __GLEW_NV_conservative_raster;
+GLEW_VAR_EXPORT GLboolean __GLEW_NV_copy_depth_to_color;
+GLEW_VAR_EXPORT GLboolean __GLEW_NV_copy_image;
+GLEW_VAR_EXPORT GLboolean __GLEW_NV_deep_texture3D;
+GLEW_VAR_EXPORT GLboolean __GLEW_NV_depth_buffer_float;
+GLEW_VAR_EXPORT GLboolean __GLEW_NV_depth_clamp;
+GLEW_VAR_EXPORT GLboolean __GLEW_NV_depth_range_unclamped;
+GLEW_VAR_EXPORT GLboolean __GLEW_NV_draw_texture;
+GLEW_VAR_EXPORT GLboolean __GLEW_NV_evaluators;
+GLEW_VAR_EXPORT GLboolean __GLEW_NV_explicit_multisample;
+GLEW_VAR_EXPORT GLboolean __GLEW_NV_fence;
+GLEW_VAR_EXPORT GLboolean __GLEW_NV_fill_rectangle;
+GLEW_VAR_EXPORT GLboolean __GLEW_NV_float_buffer;
+GLEW_VAR_EXPORT GLboolean __GLEW_NV_fog_distance;
+GLEW_VAR_EXPORT GLboolean __GLEW_NV_fragment_coverage_to_color;
+GLEW_VAR_EXPORT GLboolean __GLEW_NV_fragment_program;
+GLEW_VAR_EXPORT GLboolean __GLEW_NV_fragment_program2;
+GLEW_VAR_EXPORT GLboolean __GLEW_NV_fragment_program4;
+GLEW_VAR_EXPORT GLboolean __GLEW_NV_fragment_program_option;
+GLEW_VAR_EXPORT GLboolean __GLEW_NV_fragment_shader_interlock;
+GLEW_VAR_EXPORT GLboolean __GLEW_NV_framebuffer_mixed_samples;
+GLEW_VAR_EXPORT GLboolean __GLEW_NV_framebuffer_multisample_coverage;
+GLEW_VAR_EXPORT GLboolean __GLEW_NV_geometry_program4;
+GLEW_VAR_EXPORT GLboolean __GLEW_NV_geometry_shader4;
+GLEW_VAR_EXPORT GLboolean __GLEW_NV_geometry_shader_passthrough;
+GLEW_VAR_EXPORT GLboolean __GLEW_NV_gpu_program4;
+GLEW_VAR_EXPORT GLboolean __GLEW_NV_gpu_program5;
+GLEW_VAR_EXPORT GLboolean __GLEW_NV_gpu_program5_mem_extended;
+GLEW_VAR_EXPORT GLboolean __GLEW_NV_gpu_program_fp64;
+GLEW_VAR_EXPORT GLboolean __GLEW_NV_gpu_shader5;
+GLEW_VAR_EXPORT GLboolean __GLEW_NV_half_float;
+GLEW_VAR_EXPORT GLboolean __GLEW_NV_internalformat_sample_query;
+GLEW_VAR_EXPORT GLboolean __GLEW_NV_light_max_exponent;
+GLEW_VAR_EXPORT GLboolean __GLEW_NV_multisample_coverage;
+GLEW_VAR_EXPORT GLboolean __GLEW_NV_multisample_filter_hint;
+GLEW_VAR_EXPORT GLboolean __GLEW_NV_occlusion_query;
+GLEW_VAR_EXPORT GLboolean __GLEW_NV_packed_depth_stencil;
+GLEW_VAR_EXPORT GLboolean __GLEW_NV_parameter_buffer_object;
+GLEW_VAR_EXPORT GLboolean __GLEW_NV_parameter_buffer_object2;
+GLEW_VAR_EXPORT GLboolean __GLEW_NV_path_rendering;
+GLEW_VAR_EXPORT GLboolean __GLEW_NV_path_rendering_shared_edge;
+GLEW_VAR_EXPORT GLboolean __GLEW_NV_pixel_data_range;
+GLEW_VAR_EXPORT GLboolean __GLEW_NV_point_sprite;
+GLEW_VAR_EXPORT GLboolean __GLEW_NV_present_video;
+GLEW_VAR_EXPORT GLboolean __GLEW_NV_primitive_restart;
+GLEW_VAR_EXPORT GLboolean __GLEW_NV_register_combiners;
+GLEW_VAR_EXPORT GLboolean __GLEW_NV_register_combiners2;
+GLEW_VAR_EXPORT GLboolean __GLEW_NV_sample_locations;
+GLEW_VAR_EXPORT GLboolean __GLEW_NV_sample_mask_override_coverage;
+GLEW_VAR_EXPORT GLboolean __GLEW_NV_shader_atomic_counters;
+GLEW_VAR_EXPORT GLboolean __GLEW_NV_shader_atomic_float;
+GLEW_VAR_EXPORT GLboolean __GLEW_NV_shader_atomic_fp16_vector;
+GLEW_VAR_EXPORT GLboolean __GLEW_NV_shader_atomic_int64;
+GLEW_VAR_EXPORT GLboolean __GLEW_NV_shader_buffer_load;
+GLEW_VAR_EXPORT GLboolean __GLEW_NV_shader_storage_buffer_object;
+GLEW_VAR_EXPORT GLboolean __GLEW_NV_shader_thread_group;
+GLEW_VAR_EXPORT GLboolean __GLEW_NV_shader_thread_shuffle;
+GLEW_VAR_EXPORT GLboolean __GLEW_NV_tessellation_program5;
+GLEW_VAR_EXPORT GLboolean __GLEW_NV_texgen_emboss;
+GLEW_VAR_EXPORT GLboolean __GLEW_NV_texgen_reflection;
+GLEW_VAR_EXPORT GLboolean __GLEW_NV_texture_barrier;
+GLEW_VAR_EXPORT GLboolean __GLEW_NV_texture_compression_vtc;
+GLEW_VAR_EXPORT GLboolean __GLEW_NV_texture_env_combine4;
+GLEW_VAR_EXPORT GLboolean __GLEW_NV_texture_expand_normal;
+GLEW_VAR_EXPORT GLboolean __GLEW_NV_texture_multisample;
+GLEW_VAR_EXPORT GLboolean __GLEW_NV_texture_rectangle;
+GLEW_VAR_EXPORT GLboolean __GLEW_NV_texture_shader;
+GLEW_VAR_EXPORT GLboolean __GLEW_NV_texture_shader2;
+GLEW_VAR_EXPORT GLboolean __GLEW_NV_texture_shader3;
+GLEW_VAR_EXPORT GLboolean __GLEW_NV_transform_feedback;
+GLEW_VAR_EXPORT GLboolean __GLEW_NV_transform_feedback2;
+GLEW_VAR_EXPORT GLboolean __GLEW_NV_uniform_buffer_unified_memory;
+GLEW_VAR_EXPORT GLboolean __GLEW_NV_vdpau_interop;
+GLEW_VAR_EXPORT GLboolean __GLEW_NV_vertex_array_range;
+GLEW_VAR_EXPORT GLboolean __GLEW_NV_vertex_array_range2;
+GLEW_VAR_EXPORT GLboolean __GLEW_NV_vertex_attrib_integer_64bit;
+GLEW_VAR_EXPORT GLboolean __GLEW_NV_vertex_buffer_unified_memory;
+GLEW_VAR_EXPORT GLboolean __GLEW_NV_vertex_program;
+GLEW_VAR_EXPORT GLboolean __GLEW_NV_vertex_program1_1;
+GLEW_VAR_EXPORT GLboolean __GLEW_NV_vertex_program2;
+GLEW_VAR_EXPORT GLboolean __GLEW_NV_vertex_program2_option;
+GLEW_VAR_EXPORT GLboolean __GLEW_NV_vertex_program3;
+GLEW_VAR_EXPORT GLboolean __GLEW_NV_vertex_program4;
+GLEW_VAR_EXPORT GLboolean __GLEW_NV_video_capture;
+GLEW_VAR_EXPORT GLboolean __GLEW_NV_viewport_array2;
+GLEW_VAR_EXPORT GLboolean __GLEW_OES_byte_coordinates;
+GLEW_VAR_EXPORT GLboolean __GLEW_OES_compressed_paletted_texture;
+GLEW_VAR_EXPORT GLboolean __GLEW_OES_read_format;
+GLEW_VAR_EXPORT GLboolean __GLEW_OES_single_precision;
+GLEW_VAR_EXPORT GLboolean __GLEW_OML_interlace;
+GLEW_VAR_EXPORT GLboolean __GLEW_OML_resample;
+GLEW_VAR_EXPORT GLboolean __GLEW_OML_subsample;
+GLEW_VAR_EXPORT GLboolean __GLEW_PGI_misc_hints;
+GLEW_VAR_EXPORT GLboolean __GLEW_PGI_vertex_hints;
+GLEW_VAR_EXPORT GLboolean __GLEW_REGAL_ES1_0_compatibility;
+GLEW_VAR_EXPORT GLboolean __GLEW_REGAL_ES1_1_compatibility;
+GLEW_VAR_EXPORT GLboolean __GLEW_REGAL_enable;
+GLEW_VAR_EXPORT GLboolean __GLEW_REGAL_error_string;
+GLEW_VAR_EXPORT GLboolean __GLEW_REGAL_extension_query;
+GLEW_VAR_EXPORT GLboolean __GLEW_REGAL_log;
+GLEW_VAR_EXPORT GLboolean __GLEW_REGAL_proc_address;
+GLEW_VAR_EXPORT GLboolean __GLEW_REND_screen_coordinates;
+GLEW_VAR_EXPORT GLboolean __GLEW_S3_s3tc;
+GLEW_VAR_EXPORT GLboolean __GLEW_SGIS_color_range;
+GLEW_VAR_EXPORT GLboolean __GLEW_SGIS_detail_texture;
+GLEW_VAR_EXPORT GLboolean __GLEW_SGIS_fog_function;
+GLEW_VAR_EXPORT GLboolean __GLEW_SGIS_generate_mipmap;
+GLEW_VAR_EXPORT GLboolean __GLEW_SGIS_multisample;
+GLEW_VAR_EXPORT GLboolean __GLEW_SGIS_pixel_texture;
+GLEW_VAR_EXPORT GLboolean __GLEW_SGIS_point_line_texgen;
+GLEW_VAR_EXPORT GLboolean __GLEW_SGIS_sharpen_texture;
+GLEW_VAR_EXPORT GLboolean __GLEW_SGIS_texture4D;
+GLEW_VAR_EXPORT GLboolean __GLEW_SGIS_texture_border_clamp;
+GLEW_VAR_EXPORT GLboolean __GLEW_SGIS_texture_edge_clamp;
+GLEW_VAR_EXPORT GLboolean __GLEW_SGIS_texture_filter4;
+GLEW_VAR_EXPORT GLboolean __GLEW_SGIS_texture_lod;
+GLEW_VAR_EXPORT GLboolean __GLEW_SGIS_texture_select;
+GLEW_VAR_EXPORT GLboolean __GLEW_SGIX_async;
+GLEW_VAR_EXPORT GLboolean __GLEW_SGIX_async_histogram;
+GLEW_VAR_EXPORT GLboolean __GLEW_SGIX_async_pixel;
+GLEW_VAR_EXPORT GLboolean __GLEW_SGIX_blend_alpha_minmax;
+GLEW_VAR_EXPORT GLboolean __GLEW_SGIX_clipmap;
+GLEW_VAR_EXPORT GLboolean __GLEW_SGIX_convolution_accuracy;
+GLEW_VAR_EXPORT GLboolean __GLEW_SGIX_depth_texture;
+GLEW_VAR_EXPORT GLboolean __GLEW_SGIX_flush_raster;
+GLEW_VAR_EXPORT GLboolean __GLEW_SGIX_fog_offset;
+GLEW_VAR_EXPORT GLboolean __GLEW_SGIX_fog_texture;
+GLEW_VAR_EXPORT GLboolean __GLEW_SGIX_fragment_specular_lighting;
+GLEW_VAR_EXPORT GLboolean __GLEW_SGIX_framezoom;
+GLEW_VAR_EXPORT GLboolean __GLEW_SGIX_interlace;
+GLEW_VAR_EXPORT GLboolean __GLEW_SGIX_ir_instrument1;
+GLEW_VAR_EXPORT GLboolean __GLEW_SGIX_list_priority;
+GLEW_VAR_EXPORT GLboolean __GLEW_SGIX_pixel_texture;
+GLEW_VAR_EXPORT GLboolean __GLEW_SGIX_pixel_texture_bits;
+GLEW_VAR_EXPORT GLboolean __GLEW_SGIX_reference_plane;
+GLEW_VAR_EXPORT GLboolean __GLEW_SGIX_resample;
+GLEW_VAR_EXPORT GLboolean __GLEW_SGIX_shadow;
+GLEW_VAR_EXPORT GLboolean __GLEW_SGIX_shadow_ambient;
+GLEW_VAR_EXPORT GLboolean __GLEW_SGIX_sprite;
+GLEW_VAR_EXPORT GLboolean __GLEW_SGIX_tag_sample_buffer;
+GLEW_VAR_EXPORT GLboolean __GLEW_SGIX_texture_add_env;
+GLEW_VAR_EXPORT GLboolean __GLEW_SGIX_texture_coordinate_clamp;
+GLEW_VAR_EXPORT GLboolean __GLEW_SGIX_texture_lod_bias;
+GLEW_VAR_EXPORT GLboolean __GLEW_SGIX_texture_multi_buffer;
+GLEW_VAR_EXPORT GLboolean __GLEW_SGIX_texture_range;
+GLEW_VAR_EXPORT GLboolean __GLEW_SGIX_texture_scale_bias;
+GLEW_VAR_EXPORT GLboolean __GLEW_SGIX_vertex_preclip;
+GLEW_VAR_EXPORT GLboolean __GLEW_SGIX_vertex_preclip_hint;
+GLEW_VAR_EXPORT GLboolean __GLEW_SGIX_ycrcb;
+GLEW_VAR_EXPORT GLboolean __GLEW_SGI_color_matrix;
+GLEW_VAR_EXPORT GLboolean __GLEW_SGI_color_table;
+GLEW_VAR_EXPORT GLboolean __GLEW_SGI_texture_color_table;
+GLEW_VAR_EXPORT GLboolean __GLEW_SUNX_constant_data;
+GLEW_VAR_EXPORT GLboolean __GLEW_SUN_convolution_border_modes;
+GLEW_VAR_EXPORT GLboolean __GLEW_SUN_global_alpha;
+GLEW_VAR_EXPORT GLboolean __GLEW_SUN_mesh_array;
+GLEW_VAR_EXPORT GLboolean __GLEW_SUN_read_video_pixels;
+GLEW_VAR_EXPORT GLboolean __GLEW_SUN_slice_accum;
+GLEW_VAR_EXPORT GLboolean __GLEW_SUN_triangle_list;
+GLEW_VAR_EXPORT GLboolean __GLEW_SUN_vertex;
+GLEW_VAR_EXPORT GLboolean __GLEW_WIN_phong_shading;
+GLEW_VAR_EXPORT GLboolean __GLEW_WIN_specular_fog;
+GLEW_VAR_EXPORT GLboolean __GLEW_WIN_swap_hint;
+
+#ifdef GLEW_MX
+}; /* GLEWContextStruct */
+#endif /* GLEW_MX */
+
+/* ------------------------------------------------------------------------- */
+
+/* error codes */
+#define GLEW_OK 0
+#define GLEW_NO_ERROR 0
+#define GLEW_ERROR_NO_GL_VERSION 1  /* missing GL version */
+#define GLEW_ERROR_GL_VERSION_10_ONLY 2  /* Need at least OpenGL 1.1 */
+#define GLEW_ERROR_GLX_VERSION_11_ONLY 3  /* Need at least GLX 1.2 */
+
+/* string codes */
+#define GLEW_VERSION 1
+#define GLEW_VERSION_MAJOR 2
+#define GLEW_VERSION_MINOR 3
+#define GLEW_VERSION_MICRO 4
+
+/* API */
+#ifdef GLEW_MX
+
+typedef struct GLEWContextStruct GLEWContext;
+GLEWAPI GLenum GLEWAPIENTRY glewContextInit (GLEWContext *ctx);
+GLEWAPI GLboolean GLEWAPIENTRY glewContextIsSupported (const GLEWContext *ctx, const char *name);
+
+#define glewInit() glewContextInit(glewGetContext())
+#define glewIsSupported(x) glewContextIsSupported(glewGetContext(), x)
+#define glewIsExtensionSupported(x) glewIsSupported(x)
+
+#define GLEW_GET_VAR(x) (*(const GLboolean*)&(glewGetContext()->x))
+#ifdef _WIN32
+#  define GLEW_GET_FUN(x) glewGetContext()->x
+#else
+#  define GLEW_GET_FUN(x) x
+#endif
+
+#else /* GLEW_MX */
+
+GLEWAPI GLenum GLEWAPIENTRY glewInit (void);
+GLEWAPI GLboolean GLEWAPIENTRY glewIsSupported (const char *name);
+#define glewIsExtensionSupported(x) glewIsSupported(x)
+
+#define GLEW_GET_VAR(x) (*(const GLboolean*)&x)
+#define GLEW_GET_FUN(x) x
+
+#endif /* GLEW_MX */
+
+GLEWAPI GLboolean glewExperimental;
+GLEWAPI GLboolean GLEWAPIENTRY glewGetExtension (const char *name);
+GLEWAPI const GLubyte * GLEWAPIENTRY glewGetErrorString (GLenum error);
+GLEWAPI const GLubyte * GLEWAPIENTRY glewGetString (GLenum name);
+
+#ifdef __cplusplus
+}
+#endif
+
+#ifdef GLEW_APIENTRY_DEFINED
+#undef GLEW_APIENTRY_DEFINED
+#undef APIENTRY
+#endif
+
+#ifdef GLEW_CALLBACK_DEFINED
+#undef GLEW_CALLBACK_DEFINED
+#undef CALLBACK
+#endif
+
+#ifdef GLEW_WINGDIAPI_DEFINED
+#undef GLEW_WINGDIAPI_DEFINED
+#undef WINGDIAPI
+#endif
+
+#undef GLAPI
+/* #undef GLEWAPI */
+
+#endif /* __glew_h__ */
diff --git a/include/GL/glxew.h b/include/GL/glxew.h
new file mode 100644 (file)
index 0000000..ca6cf8f
--- /dev/null
@@ -0,0 +1,1771 @@
+/*
+** The OpenGL Extension Wrangler Library
+** Copyright (C) 2008-2015, Nigel Stewart <nigels[]users sourceforge net>
+** 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.
+*/
+
+/*
+ * 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.
+*/
+
+#ifndef __glxew_h__
+#define __glxew_h__
+#define __GLXEW_H__
+
+#ifdef __glxext_h_
+#error glxext.h included before glxew.h
+#endif
+
+#if defined(GLX_H) || defined(__GLX_glx_h__) || defined(__glx_h__)
+#error glx.h included before glxew.h
+#endif
+
+#define __glxext_h_
+
+#define GLX_H
+#define __GLX_glx_h__
+#define __glx_h__
+
+#include <X11/Xlib.h>
+#include <X11/Xutil.h>
+#include <X11/Xmd.h>
+#include <GL/glew.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* ---------------------------- GLX_VERSION_1_0 --------------------------- */
+
+#ifndef GLX_VERSION_1_0
+#define GLX_VERSION_1_0 1
+
+#define GLX_USE_GL 1
+#define GLX_BUFFER_SIZE 2
+#define GLX_LEVEL 3
+#define GLX_RGBA 4
+#define GLX_DOUBLEBUFFER 5
+#define GLX_STEREO 6
+#define GLX_AUX_BUFFERS 7
+#define GLX_RED_SIZE 8
+#define GLX_GREEN_SIZE 9
+#define GLX_BLUE_SIZE 10
+#define GLX_ALPHA_SIZE 11
+#define GLX_DEPTH_SIZE 12
+#define GLX_STENCIL_SIZE 13
+#define GLX_ACCUM_RED_SIZE 14
+#define GLX_ACCUM_GREEN_SIZE 15
+#define GLX_ACCUM_BLUE_SIZE 16
+#define GLX_ACCUM_ALPHA_SIZE 17
+#define GLX_BAD_SCREEN 1
+#define GLX_BAD_ATTRIBUTE 2
+#define GLX_NO_EXTENSION 3
+#define GLX_BAD_VISUAL 4
+#define GLX_BAD_CONTEXT 5
+#define GLX_BAD_VALUE 6
+#define GLX_BAD_ENUM 7
+
+typedef XID GLXDrawable;
+typedef XID GLXPixmap;
+#ifdef __sun
+typedef struct __glXContextRec *GLXContext;
+#else
+typedef struct __GLXcontextRec *GLXContext;
+#endif
+
+typedef unsigned int GLXVideoDeviceNV; 
+
+extern Bool glXQueryExtension (Display *dpy, int *errorBase, int *eventBase);
+extern Bool glXQueryVersion (Display *dpy, int *major, int *minor);
+extern int glXGetConfig (Display *dpy, XVisualInfo *vis, int attrib, int *value);
+extern XVisualInfo* glXChooseVisual (Display *dpy, int screen, int *attribList);
+extern GLXPixmap glXCreateGLXPixmap (Display *dpy, XVisualInfo *vis, Pixmap pixmap);
+extern void glXDestroyGLXPixmap (Display *dpy, GLXPixmap pix);
+extern GLXContext glXCreateContext (Display *dpy, XVisualInfo *vis, GLXContext shareList, Bool direct);
+extern void glXDestroyContext (Display *dpy, GLXContext ctx);
+extern Bool glXIsDirect (Display *dpy, GLXContext ctx);
+extern void glXCopyContext (Display *dpy, GLXContext src, GLXContext dst, GLulong mask);
+extern Bool glXMakeCurrent (Display *dpy, GLXDrawable drawable, GLXContext ctx);
+extern GLXContext glXGetCurrentContext (void);
+extern GLXDrawable glXGetCurrentDrawable (void);
+extern void glXWaitGL (void);
+extern void glXWaitX (void);
+extern void glXSwapBuffers (Display *dpy, GLXDrawable drawable);
+extern void glXUseXFont (Font font, int first, int count, int listBase);
+
+#define GLXEW_VERSION_1_0 GLXEW_GET_VAR(__GLXEW_VERSION_1_0)
+
+#endif /* GLX_VERSION_1_0 */
+
+/* ---------------------------- GLX_VERSION_1_1 --------------------------- */
+
+#ifndef GLX_VERSION_1_1
+#define GLX_VERSION_1_1
+
+#define GLX_VENDOR 0x1
+#define GLX_VERSION 0x2
+#define GLX_EXTENSIONS 0x3
+
+extern const char* glXQueryExtensionsString (Display *dpy, int screen);
+extern const char* glXGetClientString (Display *dpy, int name);
+extern const char* glXQueryServerString (Display *dpy, int screen, int name);
+
+#define GLXEW_VERSION_1_1 GLXEW_GET_VAR(__GLXEW_VERSION_1_1)
+
+#endif /* GLX_VERSION_1_1 */
+
+/* ---------------------------- GLX_VERSION_1_2 ---------------------------- */
+
+#ifndef GLX_VERSION_1_2
+#define GLX_VERSION_1_2 1
+
+typedef Display* ( * PFNGLXGETCURRENTDISPLAYPROC) (void);
+
+#define glXGetCurrentDisplay GLXEW_GET_FUN(__glewXGetCurrentDisplay)
+
+#define GLXEW_VERSION_1_2 GLXEW_GET_VAR(__GLXEW_VERSION_1_2)
+
+#endif /* GLX_VERSION_1_2 */
+
+/* ---------------------------- GLX_VERSION_1_3 ---------------------------- */
+
+#ifndef GLX_VERSION_1_3
+#define GLX_VERSION_1_3 1
+
+#define GLX_FRONT_LEFT_BUFFER_BIT 0x00000001
+#define GLX_RGBA_BIT 0x00000001
+#define GLX_WINDOW_BIT 0x00000001
+#define GLX_COLOR_INDEX_BIT 0x00000002
+#define GLX_FRONT_RIGHT_BUFFER_BIT 0x00000002
+#define GLX_PIXMAP_BIT 0x00000002
+#define GLX_BACK_LEFT_BUFFER_BIT 0x00000004
+#define GLX_PBUFFER_BIT 0x00000004
+#define GLX_BACK_RIGHT_BUFFER_BIT 0x00000008
+#define GLX_AUX_BUFFERS_BIT 0x00000010
+#define GLX_CONFIG_CAVEAT 0x20
+#define GLX_DEPTH_BUFFER_BIT 0x00000020
+#define GLX_X_VISUAL_TYPE 0x22
+#define GLX_TRANSPARENT_TYPE 0x23
+#define GLX_TRANSPARENT_INDEX_VALUE 0x24
+#define GLX_TRANSPARENT_RED_VALUE 0x25
+#define GLX_TRANSPARENT_GREEN_VALUE 0x26
+#define GLX_TRANSPARENT_BLUE_VALUE 0x27
+#define GLX_TRANSPARENT_ALPHA_VALUE 0x28
+#define GLX_STENCIL_BUFFER_BIT 0x00000040
+#define GLX_ACCUM_BUFFER_BIT 0x00000080
+#define GLX_NONE 0x8000
+#define GLX_SLOW_CONFIG 0x8001
+#define GLX_TRUE_COLOR 0x8002
+#define GLX_DIRECT_COLOR 0x8003
+#define GLX_PSEUDO_COLOR 0x8004
+#define GLX_STATIC_COLOR 0x8005
+#define GLX_GRAY_SCALE 0x8006
+#define GLX_STATIC_GRAY 0x8007
+#define GLX_TRANSPARENT_RGB 0x8008
+#define GLX_TRANSPARENT_INDEX 0x8009
+#define GLX_VISUAL_ID 0x800B
+#define GLX_SCREEN 0x800C
+#define GLX_NON_CONFORMANT_CONFIG 0x800D
+#define GLX_DRAWABLE_TYPE 0x8010
+#define GLX_RENDER_TYPE 0x8011
+#define GLX_X_RENDERABLE 0x8012
+#define GLX_FBCONFIG_ID 0x8013
+#define GLX_RGBA_TYPE 0x8014
+#define GLX_COLOR_INDEX_TYPE 0x8015
+#define GLX_MAX_PBUFFER_WIDTH 0x8016
+#define GLX_MAX_PBUFFER_HEIGHT 0x8017
+#define GLX_MAX_PBUFFER_PIXELS 0x8018
+#define GLX_PRESERVED_CONTENTS 0x801B
+#define GLX_LARGEST_PBUFFER 0x801C
+#define GLX_WIDTH 0x801D
+#define GLX_HEIGHT 0x801E
+#define GLX_EVENT_MASK 0x801F
+#define GLX_DAMAGED 0x8020
+#define GLX_SAVED 0x8021
+#define GLX_WINDOW 0x8022
+#define GLX_PBUFFER 0x8023
+#define GLX_PBUFFER_HEIGHT 0x8040
+#define GLX_PBUFFER_WIDTH 0x8041
+#define GLX_PBUFFER_CLOBBER_MASK 0x08000000
+#define GLX_DONT_CARE 0xFFFFFFFF
+
+typedef XID GLXFBConfigID;
+typedef XID GLXPbuffer;
+typedef XID GLXWindow;
+typedef struct __GLXFBConfigRec *GLXFBConfig;
+
+typedef struct {
+  int event_type; 
+  int draw_type; 
+  unsigned long serial; 
+  Bool send_event; 
+  Display *display; 
+  GLXDrawable drawable; 
+  unsigned int buffer_mask; 
+  unsigned int aux_buffer; 
+  int x, y; 
+  int width, height; 
+  int count; 
+} GLXPbufferClobberEvent;
+typedef union __GLXEvent {
+  GLXPbufferClobberEvent glxpbufferclobber; 
+  long pad[24]; 
+} GLXEvent;
+
+typedef GLXFBConfig* ( * PFNGLXCHOOSEFBCONFIGPROC) (Display *dpy, int screen, const int *attrib_list, int *nelements);
+typedef GLXContext ( * PFNGLXCREATENEWCONTEXTPROC) (Display *dpy, GLXFBConfig config, int render_type, GLXContext share_list, Bool direct);
+typedef GLXPbuffer ( * PFNGLXCREATEPBUFFERPROC) (Display *dpy, GLXFBConfig config, const int *attrib_list);
+typedef GLXPixmap ( * PFNGLXCREATEPIXMAPPROC) (Display *dpy, GLXFBConfig config, Pixmap pixmap, const int *attrib_list);
+typedef GLXWindow ( * PFNGLXCREATEWINDOWPROC) (Display *dpy, GLXFBConfig config, Window win, const int *attrib_list);
+typedef void ( * PFNGLXDESTROYPBUFFERPROC) (Display *dpy, GLXPbuffer pbuf);
+typedef void ( * PFNGLXDESTROYPIXMAPPROC) (Display *dpy, GLXPixmap pixmap);
+typedef void ( * PFNGLXDESTROYWINDOWPROC) (Display *dpy, GLXWindow win);
+typedef GLXDrawable ( * PFNGLXGETCURRENTREADDRAWABLEPROC) (void);
+typedef int ( * PFNGLXGETFBCONFIGATTRIBPROC) (Display *dpy, GLXFBConfig config, int attribute, int *value);
+typedef GLXFBConfig* ( * PFNGLXGETFBCONFIGSPROC) (Display *dpy, int screen, int *nelements);
+typedef void ( * PFNGLXGETSELECTEDEVENTPROC) (Display *dpy, GLXDrawable draw, unsigned long *event_mask);
+typedef XVisualInfo* ( * PFNGLXGETVISUALFROMFBCONFIGPROC) (Display *dpy, GLXFBConfig config);
+typedef Bool ( * PFNGLXMAKECONTEXTCURRENTPROC) (Display *display, GLXDrawable draw, GLXDrawable read, GLXContext ctx);
+typedef int ( * PFNGLXQUERYCONTEXTPROC) (Display *dpy, GLXContext ctx, int attribute, int *value);
+typedef void ( * PFNGLXQUERYDRAWABLEPROC) (Display *dpy, GLXDrawable draw, int attribute, unsigned int *value);
+typedef void ( * PFNGLXSELECTEVENTPROC) (Display *dpy, GLXDrawable draw, unsigned long event_mask);
+
+#define glXChooseFBConfig GLXEW_GET_FUN(__glewXChooseFBConfig)
+#define glXCreateNewContext GLXEW_GET_FUN(__glewXCreateNewContext)
+#define glXCreatePbuffer GLXEW_GET_FUN(__glewXCreatePbuffer)
+#define glXCreatePixmap GLXEW_GET_FUN(__glewXCreatePixmap)
+#define glXCreateWindow GLXEW_GET_FUN(__glewXCreateWindow)
+#define glXDestroyPbuffer GLXEW_GET_FUN(__glewXDestroyPbuffer)
+#define glXDestroyPixmap GLXEW_GET_FUN(__glewXDestroyPixmap)
+#define glXDestroyWindow GLXEW_GET_FUN(__glewXDestroyWindow)
+#define glXGetCurrentReadDrawable GLXEW_GET_FUN(__glewXGetCurrentReadDrawable)
+#define glXGetFBConfigAttrib GLXEW_GET_FUN(__glewXGetFBConfigAttrib)
+#define glXGetFBConfigs GLXEW_GET_FUN(__glewXGetFBConfigs)
+#define glXGetSelectedEvent GLXEW_GET_FUN(__glewXGetSelectedEvent)
+#define glXGetVisualFromFBConfig GLXEW_GET_FUN(__glewXGetVisualFromFBConfig)
+#define glXMakeContextCurrent GLXEW_GET_FUN(__glewXMakeContextCurrent)
+#define glXQueryContext GLXEW_GET_FUN(__glewXQueryContext)
+#define glXQueryDrawable GLXEW_GET_FUN(__glewXQueryDrawable)
+#define glXSelectEvent GLXEW_GET_FUN(__glewXSelectEvent)
+
+#define GLXEW_VERSION_1_3 GLXEW_GET_VAR(__GLXEW_VERSION_1_3)
+
+#endif /* GLX_VERSION_1_3 */
+
+/* ---------------------------- GLX_VERSION_1_4 ---------------------------- */
+
+#ifndef GLX_VERSION_1_4
+#define GLX_VERSION_1_4 1
+
+#define GLX_SAMPLE_BUFFERS 100000
+#define GLX_SAMPLES 100001
+
+extern void ( * glXGetProcAddress (const GLubyte *procName)) (void);
+
+#define GLXEW_VERSION_1_4 GLXEW_GET_VAR(__GLXEW_VERSION_1_4)
+
+#endif /* GLX_VERSION_1_4 */
+
+/* -------------------------- GLX_3DFX_multisample ------------------------- */
+
+#ifndef GLX_3DFX_multisample
+#define GLX_3DFX_multisample 1
+
+#define GLX_SAMPLE_BUFFERS_3DFX 0x8050
+#define GLX_SAMPLES_3DFX 0x8051
+
+#define GLXEW_3DFX_multisample GLXEW_GET_VAR(__GLXEW_3DFX_multisample)
+
+#endif /* GLX_3DFX_multisample */
+
+/* ------------------------ GLX_AMD_gpu_association ------------------------ */
+
+#ifndef GLX_AMD_gpu_association
+#define GLX_AMD_gpu_association 1
+
+#define GLX_GPU_VENDOR_AMD 0x1F00
+#define GLX_GPU_RENDERER_STRING_AMD 0x1F01
+#define GLX_GPU_OPENGL_VERSION_STRING_AMD 0x1F02
+#define GLX_GPU_FASTEST_TARGET_GPUS_AMD 0x21A2
+#define GLX_GPU_RAM_AMD 0x21A3
+#define GLX_GPU_CLOCK_AMD 0x21A4
+#define GLX_GPU_NUM_PIPES_AMD 0x21A5
+#define GLX_GPU_NUM_SIMD_AMD 0x21A6
+#define GLX_GPU_NUM_RB_AMD 0x21A7
+#define GLX_GPU_NUM_SPI_AMD 0x21A8
+
+typedef void ( * PFNGLXBLITCONTEXTFRAMEBUFFERAMDPROC) (GLXContext dstCtx, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
+typedef GLXContext ( * PFNGLXCREATEASSOCIATEDCONTEXTAMDPROC) (unsigned int id, GLXContext share_list);
+typedef GLXContext ( * PFNGLXCREATEASSOCIATEDCONTEXTATTRIBSAMDPROC) (unsigned int id, GLXContext share_context, const int* attribList);
+typedef Bool ( * PFNGLXDELETEASSOCIATEDCONTEXTAMDPROC) (GLXContext ctx);
+typedef unsigned int ( * PFNGLXGETCONTEXTGPUIDAMDPROC) (GLXContext ctx);
+typedef GLXContext ( * PFNGLXGETCURRENTASSOCIATEDCONTEXTAMDPROC) (void);
+typedef unsigned int ( * PFNGLXGETGPUIDSAMDPROC) (unsigned int maxCount, unsigned int* ids);
+typedef int ( * PFNGLXGETGPUINFOAMDPROC) (unsigned int id, int property, GLenum dataType, unsigned int size, void* data);
+typedef Bool ( * PFNGLXMAKEASSOCIATEDCONTEXTCURRENTAMDPROC) (GLXContext ctx);
+
+#define glXBlitContextFramebufferAMD GLXEW_GET_FUN(__glewXBlitContextFramebufferAMD)
+#define glXCreateAssociatedContextAMD GLXEW_GET_FUN(__glewXCreateAssociatedContextAMD)
+#define glXCreateAssociatedContextAttribsAMD GLXEW_GET_FUN(__glewXCreateAssociatedContextAttribsAMD)
+#define glXDeleteAssociatedContextAMD GLXEW_GET_FUN(__glewXDeleteAssociatedContextAMD)
+#define glXGetContextGPUIDAMD GLXEW_GET_FUN(__glewXGetContextGPUIDAMD)
+#define glXGetCurrentAssociatedContextAMD GLXEW_GET_FUN(__glewXGetCurrentAssociatedContextAMD)
+#define glXGetGPUIDsAMD GLXEW_GET_FUN(__glewXGetGPUIDsAMD)
+#define glXGetGPUInfoAMD GLXEW_GET_FUN(__glewXGetGPUInfoAMD)
+#define glXMakeAssociatedContextCurrentAMD GLXEW_GET_FUN(__glewXMakeAssociatedContextCurrentAMD)
+
+#define GLXEW_AMD_gpu_association GLXEW_GET_VAR(__GLXEW_AMD_gpu_association)
+
+#endif /* GLX_AMD_gpu_association */
+
+/* --------------------- GLX_ARB_context_flush_control --------------------- */
+
+#ifndef GLX_ARB_context_flush_control
+#define GLX_ARB_context_flush_control 1
+
+#define GLX_CONTEXT_RELEASE_BEHAVIOR_NONE_ARB 0x0000
+#define GLX_CONTEXT_RELEASE_BEHAVIOR_ARB 0x2097
+#define GLX_CONTEXT_RELEASE_BEHAVIOR_FLUSH_ARB 0x2098
+
+#define GLXEW_ARB_context_flush_control GLXEW_GET_VAR(__GLXEW_ARB_context_flush_control)
+
+#endif /* GLX_ARB_context_flush_control */
+
+/* ------------------------- GLX_ARB_create_context ------------------------ */
+
+#ifndef GLX_ARB_create_context
+#define GLX_ARB_create_context 1
+
+#define GLX_CONTEXT_DEBUG_BIT_ARB 0x0001
+#define GLX_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB 0x0002
+#define GLX_CONTEXT_MAJOR_VERSION_ARB 0x2091
+#define GLX_CONTEXT_MINOR_VERSION_ARB 0x2092
+#define GLX_CONTEXT_FLAGS_ARB 0x2094
+
+typedef GLXContext ( * PFNGLXCREATECONTEXTATTRIBSARBPROC) (Display* dpy, GLXFBConfig config, GLXContext share_context, Bool direct, const int *attrib_list);
+
+#define glXCreateContextAttribsARB GLXEW_GET_FUN(__glewXCreateContextAttribsARB)
+
+#define GLXEW_ARB_create_context GLXEW_GET_VAR(__GLXEW_ARB_create_context)
+
+#endif /* GLX_ARB_create_context */
+
+/* --------------------- GLX_ARB_create_context_profile -------------------- */
+
+#ifndef GLX_ARB_create_context_profile
+#define GLX_ARB_create_context_profile 1
+
+#define GLX_CONTEXT_CORE_PROFILE_BIT_ARB 0x00000001
+#define GLX_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB 0x00000002
+#define GLX_CONTEXT_PROFILE_MASK_ARB 0x9126
+
+#define GLXEW_ARB_create_context_profile GLXEW_GET_VAR(__GLXEW_ARB_create_context_profile)
+
+#endif /* GLX_ARB_create_context_profile */
+
+/* ------------------- GLX_ARB_create_context_robustness ------------------- */
+
+#ifndef GLX_ARB_create_context_robustness
+#define GLX_ARB_create_context_robustness 1
+
+#define GLX_CONTEXT_ROBUST_ACCESS_BIT_ARB 0x00000004
+#define GLX_LOSE_CONTEXT_ON_RESET_ARB 0x8252
+#define GLX_CONTEXT_RESET_NOTIFICATION_STRATEGY_ARB 0x8256
+#define GLX_NO_RESET_NOTIFICATION_ARB 0x8261
+
+#define GLXEW_ARB_create_context_robustness GLXEW_GET_VAR(__GLXEW_ARB_create_context_robustness)
+
+#endif /* GLX_ARB_create_context_robustness */
+
+/* ------------------------- GLX_ARB_fbconfig_float ------------------------ */
+
+#ifndef GLX_ARB_fbconfig_float
+#define GLX_ARB_fbconfig_float 1
+
+#define GLX_RGBA_FLOAT_BIT 0x00000004
+#define GLX_RGBA_FLOAT_TYPE 0x20B9
+
+#define GLXEW_ARB_fbconfig_float GLXEW_GET_VAR(__GLXEW_ARB_fbconfig_float)
+
+#endif /* GLX_ARB_fbconfig_float */
+
+/* ------------------------ GLX_ARB_framebuffer_sRGB ----------------------- */
+
+#ifndef GLX_ARB_framebuffer_sRGB
+#define GLX_ARB_framebuffer_sRGB 1
+
+#define GLX_FRAMEBUFFER_SRGB_CAPABLE_ARB 0x20B2
+
+#define GLXEW_ARB_framebuffer_sRGB GLXEW_GET_VAR(__GLXEW_ARB_framebuffer_sRGB)
+
+#endif /* GLX_ARB_framebuffer_sRGB */
+
+/* ------------------------ GLX_ARB_get_proc_address ----------------------- */
+
+#ifndef GLX_ARB_get_proc_address
+#define GLX_ARB_get_proc_address 1
+
+extern void ( * glXGetProcAddressARB (const GLubyte *procName)) (void);
+
+#define GLXEW_ARB_get_proc_address GLXEW_GET_VAR(__GLXEW_ARB_get_proc_address)
+
+#endif /* GLX_ARB_get_proc_address */
+
+/* -------------------------- GLX_ARB_multisample -------------------------- */
+
+#ifndef GLX_ARB_multisample
+#define GLX_ARB_multisample 1
+
+#define GLX_SAMPLE_BUFFERS_ARB 100000
+#define GLX_SAMPLES_ARB 100001
+
+#define GLXEW_ARB_multisample GLXEW_GET_VAR(__GLXEW_ARB_multisample)
+
+#endif /* GLX_ARB_multisample */
+
+/* ---------------- GLX_ARB_robustness_application_isolation --------------- */
+
+#ifndef GLX_ARB_robustness_application_isolation
+#define GLX_ARB_robustness_application_isolation 1
+
+#define GLX_CONTEXT_RESET_ISOLATION_BIT_ARB 0x00000008
+
+#define GLXEW_ARB_robustness_application_isolation GLXEW_GET_VAR(__GLXEW_ARB_robustness_application_isolation)
+
+#endif /* GLX_ARB_robustness_application_isolation */
+
+/* ---------------- GLX_ARB_robustness_share_group_isolation --------------- */
+
+#ifndef GLX_ARB_robustness_share_group_isolation
+#define GLX_ARB_robustness_share_group_isolation 1
+
+#define GLX_CONTEXT_RESET_ISOLATION_BIT_ARB 0x00000008
+
+#define GLXEW_ARB_robustness_share_group_isolation GLXEW_GET_VAR(__GLXEW_ARB_robustness_share_group_isolation)
+
+#endif /* GLX_ARB_robustness_share_group_isolation */
+
+/* ---------------------- GLX_ARB_vertex_buffer_object --------------------- */
+
+#ifndef GLX_ARB_vertex_buffer_object
+#define GLX_ARB_vertex_buffer_object 1
+
+#define GLX_CONTEXT_ALLOW_BUFFER_BYTE_ORDER_MISMATCH_ARB 0x2095
+
+#define GLXEW_ARB_vertex_buffer_object GLXEW_GET_VAR(__GLXEW_ARB_vertex_buffer_object)
+
+#endif /* GLX_ARB_vertex_buffer_object */
+
+/* ----------------------- GLX_ATI_pixel_format_float ---------------------- */
+
+#ifndef GLX_ATI_pixel_format_float
+#define GLX_ATI_pixel_format_float 1
+
+#define GLX_RGBA_FLOAT_ATI_BIT 0x00000100
+
+#define GLXEW_ATI_pixel_format_float GLXEW_GET_VAR(__GLXEW_ATI_pixel_format_float)
+
+#endif /* GLX_ATI_pixel_format_float */
+
+/* ------------------------- GLX_ATI_render_texture ------------------------ */
+
+#ifndef GLX_ATI_render_texture
+#define GLX_ATI_render_texture 1
+
+#define GLX_BIND_TO_TEXTURE_RGB_ATI 0x9800
+#define GLX_BIND_TO_TEXTURE_RGBA_ATI 0x9801
+#define GLX_TEXTURE_FORMAT_ATI 0x9802
+#define GLX_TEXTURE_TARGET_ATI 0x9803
+#define GLX_MIPMAP_TEXTURE_ATI 0x9804
+#define GLX_TEXTURE_RGB_ATI 0x9805
+#define GLX_TEXTURE_RGBA_ATI 0x9806
+#define GLX_NO_TEXTURE_ATI 0x9807
+#define GLX_TEXTURE_CUBE_MAP_ATI 0x9808
+#define GLX_TEXTURE_1D_ATI 0x9809
+#define GLX_TEXTURE_2D_ATI 0x980A
+#define GLX_MIPMAP_LEVEL_ATI 0x980B
+#define GLX_CUBE_MAP_FACE_ATI 0x980C
+#define GLX_TEXTURE_CUBE_MAP_POSITIVE_X_ATI 0x980D
+#define GLX_TEXTURE_CUBE_MAP_NEGATIVE_X_ATI 0x980E
+#define GLX_TEXTURE_CUBE_MAP_POSITIVE_Y_ATI 0x980F
+#define GLX_TEXTURE_CUBE_MAP_NEGATIVE_Y_ATI 0x9810
+#define GLX_TEXTURE_CUBE_MAP_POSITIVE_Z_ATI 0x9811
+#define GLX_TEXTURE_CUBE_MAP_NEGATIVE_Z_ATI 0x9812
+#define GLX_FRONT_LEFT_ATI 0x9813
+#define GLX_FRONT_RIGHT_ATI 0x9814
+#define GLX_BACK_LEFT_ATI 0x9815
+#define GLX_BACK_RIGHT_ATI 0x9816
+#define GLX_AUX0_ATI 0x9817
+#define GLX_AUX1_ATI 0x9818
+#define GLX_AUX2_ATI 0x9819
+#define GLX_AUX3_ATI 0x981A
+#define GLX_AUX4_ATI 0x981B
+#define GLX_AUX5_ATI 0x981C
+#define GLX_AUX6_ATI 0x981D
+#define GLX_AUX7_ATI 0x981E
+#define GLX_AUX8_ATI 0x981F
+#define GLX_AUX9_ATI 0x9820
+#define GLX_BIND_TO_TEXTURE_LUMINANCE_ATI 0x9821
+#define GLX_BIND_TO_TEXTURE_INTENSITY_ATI 0x9822
+
+typedef void ( * PFNGLXBINDTEXIMAGEATIPROC) (Display *dpy, GLXPbuffer pbuf, int buffer);
+typedef void ( * PFNGLXDRAWABLEATTRIBATIPROC) (Display *dpy, GLXDrawable draw, const int *attrib_list);
+typedef void ( * PFNGLXRELEASETEXIMAGEATIPROC) (Display *dpy, GLXPbuffer pbuf, int buffer);
+
+#define glXBindTexImageATI GLXEW_GET_FUN(__glewXBindTexImageATI)
+#define glXDrawableAttribATI GLXEW_GET_FUN(__glewXDrawableAttribATI)
+#define glXReleaseTexImageATI GLXEW_GET_FUN(__glewXReleaseTexImageATI)
+
+#define GLXEW_ATI_render_texture GLXEW_GET_VAR(__GLXEW_ATI_render_texture)
+
+#endif /* GLX_ATI_render_texture */
+
+/* --------------------------- GLX_EXT_buffer_age -------------------------- */
+
+#ifndef GLX_EXT_buffer_age
+#define GLX_EXT_buffer_age 1
+
+#define GLX_BACK_BUFFER_AGE_EXT 0x20F4
+
+#define GLXEW_EXT_buffer_age GLXEW_GET_VAR(__GLXEW_EXT_buffer_age)
+
+#endif /* GLX_EXT_buffer_age */
+
+/* ------------------- GLX_EXT_create_context_es2_profile ------------------ */
+
+#ifndef GLX_EXT_create_context_es2_profile
+#define GLX_EXT_create_context_es2_profile 1
+
+#define GLX_CONTEXT_ES2_PROFILE_BIT_EXT 0x00000004
+
+#define GLXEW_EXT_create_context_es2_profile GLXEW_GET_VAR(__GLXEW_EXT_create_context_es2_profile)
+
+#endif /* GLX_EXT_create_context_es2_profile */
+
+/* ------------------- GLX_EXT_create_context_es_profile ------------------- */
+
+#ifndef GLX_EXT_create_context_es_profile
+#define GLX_EXT_create_context_es_profile 1
+
+#define GLX_CONTEXT_ES_PROFILE_BIT_EXT 0x00000004
+
+#define GLXEW_EXT_create_context_es_profile GLXEW_GET_VAR(__GLXEW_EXT_create_context_es_profile)
+
+#endif /* GLX_EXT_create_context_es_profile */
+
+/* --------------------- GLX_EXT_fbconfig_packed_float --------------------- */
+
+#ifndef GLX_EXT_fbconfig_packed_float
+#define GLX_EXT_fbconfig_packed_float 1
+
+#define GLX_RGBA_UNSIGNED_FLOAT_BIT_EXT 0x00000008
+#define GLX_RGBA_UNSIGNED_FLOAT_TYPE_EXT 0x20B1
+
+#define GLXEW_EXT_fbconfig_packed_float GLXEW_GET_VAR(__GLXEW_EXT_fbconfig_packed_float)
+
+#endif /* GLX_EXT_fbconfig_packed_float */
+
+/* ------------------------ GLX_EXT_framebuffer_sRGB ----------------------- */
+
+#ifndef GLX_EXT_framebuffer_sRGB
+#define GLX_EXT_framebuffer_sRGB 1
+
+#define GLX_FRAMEBUFFER_SRGB_CAPABLE_EXT 0x20B2
+
+#define GLXEW_EXT_framebuffer_sRGB GLXEW_GET_VAR(__GLXEW_EXT_framebuffer_sRGB)
+
+#endif /* GLX_EXT_framebuffer_sRGB */
+
+/* ------------------------- GLX_EXT_import_context ------------------------ */
+
+#ifndef GLX_EXT_import_context
+#define GLX_EXT_import_context 1
+
+#define GLX_SHARE_CONTEXT_EXT 0x800A
+#define GLX_VISUAL_ID_EXT 0x800B
+#define GLX_SCREEN_EXT 0x800C
+
+typedef XID GLXContextID;
+
+typedef void ( * PFNGLXFREECONTEXTEXTPROC) (Display* dpy, GLXContext context);
+typedef GLXContextID ( * PFNGLXGETCONTEXTIDEXTPROC) (const GLXContext context);
+typedef GLXContext ( * PFNGLXIMPORTCONTEXTEXTPROC) (Display* dpy, GLXContextID contextID);
+typedef int ( * PFNGLXQUERYCONTEXTINFOEXTPROC) (Display* dpy, GLXContext context, int attribute,int *value);
+
+#define glXFreeContextEXT GLXEW_GET_FUN(__glewXFreeContextEXT)
+#define glXGetContextIDEXT GLXEW_GET_FUN(__glewXGetContextIDEXT)
+#define glXImportContextEXT GLXEW_GET_FUN(__glewXImportContextEXT)
+#define glXQueryContextInfoEXT GLXEW_GET_FUN(__glewXQueryContextInfoEXT)
+
+#define GLXEW_EXT_import_context GLXEW_GET_VAR(__GLXEW_EXT_import_context)
+
+#endif /* GLX_EXT_import_context */
+
+/* -------------------------- GLX_EXT_scene_marker ------------------------- */
+
+#ifndef GLX_EXT_scene_marker
+#define GLX_EXT_scene_marker 1
+
+#define GLXEW_EXT_scene_marker GLXEW_GET_VAR(__GLXEW_EXT_scene_marker)
+
+#endif /* GLX_EXT_scene_marker */
+
+/* -------------------------- GLX_EXT_stereo_tree -------------------------- */
+
+#ifndef GLX_EXT_stereo_tree
+#define GLX_EXT_stereo_tree 1
+
+#define GLX_STEREO_NOTIFY_EXT 0x00000000
+#define GLX_STEREO_NOTIFY_MASK_EXT 0x00000001
+#define GLX_STEREO_TREE_EXT 0x20F5
+
+#define GLXEW_EXT_stereo_tree GLXEW_GET_VAR(__GLXEW_EXT_stereo_tree)
+
+#endif /* GLX_EXT_stereo_tree */
+
+/* -------------------------- GLX_EXT_swap_control ------------------------- */
+
+#ifndef GLX_EXT_swap_control
+#define GLX_EXT_swap_control 1
+
+#define GLX_SWAP_INTERVAL_EXT 0x20F1
+#define GLX_MAX_SWAP_INTERVAL_EXT 0x20F2
+
+typedef void ( * PFNGLXSWAPINTERVALEXTPROC) (Display* dpy, GLXDrawable drawable, int interval);
+
+#define glXSwapIntervalEXT GLXEW_GET_FUN(__glewXSwapIntervalEXT)
+
+#define GLXEW_EXT_swap_control GLXEW_GET_VAR(__GLXEW_EXT_swap_control)
+
+#endif /* GLX_EXT_swap_control */
+
+/* ----------------------- GLX_EXT_swap_control_tear ----------------------- */
+
+#ifndef GLX_EXT_swap_control_tear
+#define GLX_EXT_swap_control_tear 1
+
+#define GLX_LATE_SWAPS_TEAR_EXT 0x20F3
+
+#define GLXEW_EXT_swap_control_tear GLXEW_GET_VAR(__GLXEW_EXT_swap_control_tear)
+
+#endif /* GLX_EXT_swap_control_tear */
+
+/* ---------------------- GLX_EXT_texture_from_pixmap ---------------------- */
+
+#ifndef GLX_EXT_texture_from_pixmap
+#define GLX_EXT_texture_from_pixmap 1
+
+#define GLX_TEXTURE_1D_BIT_EXT 0x00000001
+#define GLX_TEXTURE_2D_BIT_EXT 0x00000002
+#define GLX_TEXTURE_RECTANGLE_BIT_EXT 0x00000004
+#define GLX_BIND_TO_TEXTURE_RGB_EXT 0x20D0
+#define GLX_BIND_TO_TEXTURE_RGBA_EXT 0x20D1
+#define GLX_BIND_TO_MIPMAP_TEXTURE_EXT 0x20D2
+#define GLX_BIND_TO_TEXTURE_TARGETS_EXT 0x20D3
+#define GLX_Y_INVERTED_EXT 0x20D4
+#define GLX_TEXTURE_FORMAT_EXT 0x20D5
+#define GLX_TEXTURE_TARGET_EXT 0x20D6
+#define GLX_MIPMAP_TEXTURE_EXT 0x20D7
+#define GLX_TEXTURE_FORMAT_NONE_EXT 0x20D8
+#define GLX_TEXTURE_FORMAT_RGB_EXT 0x20D9
+#define GLX_TEXTURE_FORMAT_RGBA_EXT 0x20DA
+#define GLX_TEXTURE_1D_EXT 0x20DB
+#define GLX_TEXTURE_2D_EXT 0x20DC
+#define GLX_TEXTURE_RECTANGLE_EXT 0x20DD
+#define GLX_FRONT_LEFT_EXT 0x20DE
+#define GLX_FRONT_RIGHT_EXT 0x20DF
+#define GLX_BACK_LEFT_EXT 0x20E0
+#define GLX_BACK_RIGHT_EXT 0x20E1
+#define GLX_AUX0_EXT 0x20E2
+#define GLX_AUX1_EXT 0x20E3
+#define GLX_AUX2_EXT 0x20E4
+#define GLX_AUX3_EXT 0x20E5
+#define GLX_AUX4_EXT 0x20E6
+#define GLX_AUX5_EXT 0x20E7
+#define GLX_AUX6_EXT 0x20E8
+#define GLX_AUX7_EXT 0x20E9
+#define GLX_AUX8_EXT 0x20EA
+#define GLX_AUX9_EXT 0x20EB
+
+typedef void ( * PFNGLXBINDTEXIMAGEEXTPROC) (Display* display, GLXDrawable drawable, int buffer, const int *attrib_list);
+typedef void ( * PFNGLXRELEASETEXIMAGEEXTPROC) (Display* display, GLXDrawable drawable, int buffer);
+
+#define glXBindTexImageEXT GLXEW_GET_FUN(__glewXBindTexImageEXT)
+#define glXReleaseTexImageEXT GLXEW_GET_FUN(__glewXReleaseTexImageEXT)
+
+#define GLXEW_EXT_texture_from_pixmap GLXEW_GET_VAR(__GLXEW_EXT_texture_from_pixmap)
+
+#endif /* GLX_EXT_texture_from_pixmap */
+
+/* -------------------------- GLX_EXT_visual_info -------------------------- */
+
+#ifndef GLX_EXT_visual_info
+#define GLX_EXT_visual_info 1
+
+#define GLX_X_VISUAL_TYPE_EXT 0x22
+#define GLX_TRANSPARENT_TYPE_EXT 0x23
+#define GLX_TRANSPARENT_INDEX_VALUE_EXT 0x24
+#define GLX_TRANSPARENT_RED_VALUE_EXT 0x25
+#define GLX_TRANSPARENT_GREEN_VALUE_EXT 0x26
+#define GLX_TRANSPARENT_BLUE_VALUE_EXT 0x27
+#define GLX_TRANSPARENT_ALPHA_VALUE_EXT 0x28
+#define GLX_NONE_EXT 0x8000
+#define GLX_TRUE_COLOR_EXT 0x8002
+#define GLX_DIRECT_COLOR_EXT 0x8003
+#define GLX_PSEUDO_COLOR_EXT 0x8004
+#define GLX_STATIC_COLOR_EXT 0x8005
+#define GLX_GRAY_SCALE_EXT 0x8006
+#define GLX_STATIC_GRAY_EXT 0x8007
+#define GLX_TRANSPARENT_RGB_EXT 0x8008
+#define GLX_TRANSPARENT_INDEX_EXT 0x8009
+
+#define GLXEW_EXT_visual_info GLXEW_GET_VAR(__GLXEW_EXT_visual_info)
+
+#endif /* GLX_EXT_visual_info */
+
+/* ------------------------- GLX_EXT_visual_rating ------------------------- */
+
+#ifndef GLX_EXT_visual_rating
+#define GLX_EXT_visual_rating 1
+
+#define GLX_VISUAL_CAVEAT_EXT 0x20
+#define GLX_SLOW_VISUAL_EXT 0x8001
+#define GLX_NON_CONFORMANT_VISUAL_EXT 0x800D
+
+#define GLXEW_EXT_visual_rating GLXEW_GET_VAR(__GLXEW_EXT_visual_rating)
+
+#endif /* GLX_EXT_visual_rating */
+
+/* -------------------------- GLX_INTEL_swap_event ------------------------- */
+
+#ifndef GLX_INTEL_swap_event
+#define GLX_INTEL_swap_event 1
+
+#define GLX_EXCHANGE_COMPLETE_INTEL 0x8180
+#define GLX_COPY_COMPLETE_INTEL 0x8181
+#define GLX_FLIP_COMPLETE_INTEL 0x8182
+#define GLX_BUFFER_SWAP_COMPLETE_INTEL_MASK 0x04000000
+
+#define GLXEW_INTEL_swap_event GLXEW_GET_VAR(__GLXEW_INTEL_swap_event)
+
+#endif /* GLX_INTEL_swap_event */
+
+/* -------------------------- GLX_MESA_agp_offset -------------------------- */
+
+#ifndef GLX_MESA_agp_offset
+#define GLX_MESA_agp_offset 1
+
+typedef unsigned int ( * PFNGLXGETAGPOFFSETMESAPROC) (const void* pointer);
+
+#define glXGetAGPOffsetMESA GLXEW_GET_FUN(__glewXGetAGPOffsetMESA)
+
+#define GLXEW_MESA_agp_offset GLXEW_GET_VAR(__GLXEW_MESA_agp_offset)
+
+#endif /* GLX_MESA_agp_offset */
+
+/* ------------------------ GLX_MESA_copy_sub_buffer ----------------------- */
+
+#ifndef GLX_MESA_copy_sub_buffer
+#define GLX_MESA_copy_sub_buffer 1
+
+typedef void ( * PFNGLXCOPYSUBBUFFERMESAPROC) (Display* dpy, GLXDrawable drawable, int x, int y, int width, int height);
+
+#define glXCopySubBufferMESA GLXEW_GET_FUN(__glewXCopySubBufferMESA)
+
+#define GLXEW_MESA_copy_sub_buffer GLXEW_GET_VAR(__GLXEW_MESA_copy_sub_buffer)
+
+#endif /* GLX_MESA_copy_sub_buffer */
+
+/* ------------------------ GLX_MESA_pixmap_colormap ----------------------- */
+
+#ifndef GLX_MESA_pixmap_colormap
+#define GLX_MESA_pixmap_colormap 1
+
+typedef GLXPixmap ( * PFNGLXCREATEGLXPIXMAPMESAPROC) (Display* dpy, XVisualInfo *visual, Pixmap pixmap, Colormap cmap);
+
+#define glXCreateGLXPixmapMESA GLXEW_GET_FUN(__glewXCreateGLXPixmapMESA)
+
+#define GLXEW_MESA_pixmap_colormap GLXEW_GET_VAR(__GLXEW_MESA_pixmap_colormap)
+
+#endif /* GLX_MESA_pixmap_colormap */
+
+/* ------------------------ GLX_MESA_query_renderer ------------------------ */
+
+#ifndef GLX_MESA_query_renderer
+#define GLX_MESA_query_renderer 1
+
+#define GLX_RENDERER_VENDOR_ID_MESA 0x8183
+#define GLX_RENDERER_DEVICE_ID_MESA 0x8184
+#define GLX_RENDERER_VERSION_MESA 0x8185
+#define GLX_RENDERER_ACCELERATED_MESA 0x8186
+#define GLX_RENDERER_VIDEO_MEMORY_MESA 0x8187
+#define GLX_RENDERER_UNIFIED_MEMORY_ARCHITECTURE_MESA 0x8188
+#define GLX_RENDERER_PREFERRED_PROFILE_MESA 0x8189
+#define GLX_RENDERER_OPENGL_CORE_PROFILE_VERSION_MESA 0x818A
+#define GLX_RENDERER_OPENGL_COMPATIBILITY_PROFILE_VERSION_MESA 0x818B
+#define GLX_RENDERER_OPENGL_ES_PROFILE_VERSION_MESA 0x818C
+#define GLX_RENDERER_OPENGL_ES2_PROFILE_VERSION_MESA 0x818D
+#define GLX_RENDERER_ID_MESA 0x818E
+
+typedef Bool ( * PFNGLXQUERYCURRENTRENDERERINTEGERMESAPROC) (int attribute, unsigned int* value);
+typedef const char* ( * PFNGLXQUERYCURRENTRENDERERSTRINGMESAPROC) (int attribute);
+typedef Bool ( * PFNGLXQUERYRENDERERINTEGERMESAPROC) (Display* dpy, int screen, int renderer, int attribute, unsigned int *value);
+typedef const char* ( * PFNGLXQUERYRENDERERSTRINGMESAPROC) (Display *dpy, int screen, int renderer, int attribute);
+
+#define glXQueryCurrentRendererIntegerMESA GLXEW_GET_FUN(__glewXQueryCurrentRendererIntegerMESA)
+#define glXQueryCurrentRendererStringMESA GLXEW_GET_FUN(__glewXQueryCurrentRendererStringMESA)
+#define glXQueryRendererIntegerMESA GLXEW_GET_FUN(__glewXQueryRendererIntegerMESA)
+#define glXQueryRendererStringMESA GLXEW_GET_FUN(__glewXQueryRendererStringMESA)
+
+#define GLXEW_MESA_query_renderer GLXEW_GET_VAR(__GLXEW_MESA_query_renderer)
+
+#endif /* GLX_MESA_query_renderer */
+
+/* ------------------------ GLX_MESA_release_buffers ----------------------- */
+
+#ifndef GLX_MESA_release_buffers
+#define GLX_MESA_release_buffers 1
+
+typedef Bool ( * PFNGLXRELEASEBUFFERSMESAPROC) (Display* dpy, GLXDrawable d);
+
+#define glXReleaseBuffersMESA GLXEW_GET_FUN(__glewXReleaseBuffersMESA)
+
+#define GLXEW_MESA_release_buffers GLXEW_GET_VAR(__GLXEW_MESA_release_buffers)
+
+#endif /* GLX_MESA_release_buffers */
+
+/* ------------------------- GLX_MESA_set_3dfx_mode ------------------------ */
+
+#ifndef GLX_MESA_set_3dfx_mode
+#define GLX_MESA_set_3dfx_mode 1
+
+#define GLX_3DFX_WINDOW_MODE_MESA 0x1
+#define GLX_3DFX_FULLSCREEN_MODE_MESA 0x2
+
+typedef GLboolean ( * PFNGLXSET3DFXMODEMESAPROC) (GLint mode);
+
+#define glXSet3DfxModeMESA GLXEW_GET_FUN(__glewXSet3DfxModeMESA)
+
+#define GLXEW_MESA_set_3dfx_mode GLXEW_GET_VAR(__GLXEW_MESA_set_3dfx_mode)
+
+#endif /* GLX_MESA_set_3dfx_mode */
+
+/* ------------------------- GLX_MESA_swap_control ------------------------- */
+
+#ifndef GLX_MESA_swap_control
+#define GLX_MESA_swap_control 1
+
+typedef int ( * PFNGLXGETSWAPINTERVALMESAPROC) (void);
+typedef int ( * PFNGLXSWAPINTERVALMESAPROC) (unsigned int interval);
+
+#define glXGetSwapIntervalMESA GLXEW_GET_FUN(__glewXGetSwapIntervalMESA)
+#define glXSwapIntervalMESA GLXEW_GET_FUN(__glewXSwapIntervalMESA)
+
+#define GLXEW_MESA_swap_control GLXEW_GET_VAR(__GLXEW_MESA_swap_control)
+
+#endif /* GLX_MESA_swap_control */
+
+/* --------------------------- GLX_NV_copy_buffer -------------------------- */
+
+#ifndef GLX_NV_copy_buffer
+#define GLX_NV_copy_buffer 1
+
+typedef void ( * PFNGLXCOPYBUFFERSUBDATANVPROC) (Display* dpy, GLXContext readCtx, GLXContext writeCtx, GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size);
+typedef void ( * PFNGLXNAMEDCOPYBUFFERSUBDATANVPROC) (Display* dpy, GLXContext readCtx, GLXContext writeCtx, GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size);
+
+#define glXCopyBufferSubDataNV GLXEW_GET_FUN(__glewXCopyBufferSubDataNV)
+#define glXNamedCopyBufferSubDataNV GLXEW_GET_FUN(__glewXNamedCopyBufferSubDataNV)
+
+#define GLXEW_NV_copy_buffer GLXEW_GET_VAR(__GLXEW_NV_copy_buffer)
+
+#endif /* GLX_NV_copy_buffer */
+
+/* --------------------------- GLX_NV_copy_image --------------------------- */
+
+#ifndef GLX_NV_copy_image
+#define GLX_NV_copy_image 1
+
+typedef void ( * PFNGLXCOPYIMAGESUBDATANVPROC) (Display *dpy, GLXContext srcCtx, GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLXContext dstCtx, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei width, GLsizei height, GLsizei depth);
+
+#define glXCopyImageSubDataNV GLXEW_GET_FUN(__glewXCopyImageSubDataNV)
+
+#define GLXEW_NV_copy_image GLXEW_GET_VAR(__GLXEW_NV_copy_image)
+
+#endif /* GLX_NV_copy_image */
+
+/* ------------------------ GLX_NV_delay_before_swap ----------------------- */
+
+#ifndef GLX_NV_delay_before_swap
+#define GLX_NV_delay_before_swap 1
+
+typedef Bool ( * PFNGLXDELAYBEFORESWAPNVPROC) (Display* dpy, GLXDrawable drawable, GLfloat seconds);
+
+#define glXDelayBeforeSwapNV GLXEW_GET_FUN(__glewXDelayBeforeSwapNV)
+
+#define GLXEW_NV_delay_before_swap GLXEW_GET_VAR(__GLXEW_NV_delay_before_swap)
+
+#endif /* GLX_NV_delay_before_swap */
+
+/* -------------------------- GLX_NV_float_buffer -------------------------- */
+
+#ifndef GLX_NV_float_buffer
+#define GLX_NV_float_buffer 1
+
+#define GLX_FLOAT_COMPONENTS_NV 0x20B0
+
+#define GLXEW_NV_float_buffer GLXEW_GET_VAR(__GLXEW_NV_float_buffer)
+
+#endif /* GLX_NV_float_buffer */
+
+/* ---------------------- GLX_NV_multisample_coverage ---------------------- */
+
+#ifndef GLX_NV_multisample_coverage
+#define GLX_NV_multisample_coverage 1
+
+#define GLX_COLOR_SAMPLES_NV 0x20B3
+#define GLX_COVERAGE_SAMPLES_NV 100001
+
+#define GLXEW_NV_multisample_coverage GLXEW_GET_VAR(__GLXEW_NV_multisample_coverage)
+
+#endif /* GLX_NV_multisample_coverage */
+
+/* -------------------------- GLX_NV_present_video ------------------------- */
+
+#ifndef GLX_NV_present_video
+#define GLX_NV_present_video 1
+
+#define GLX_NUM_VIDEO_SLOTS_NV 0x20F0
+
+typedef int ( * PFNGLXBINDVIDEODEVICENVPROC) (Display* dpy, unsigned int video_slot, unsigned int video_device, const int *attrib_list);
+typedef unsigned int* ( * PFNGLXENUMERATEVIDEODEVICESNVPROC) (Display *dpy, int screen, int *nelements);
+
+#define glXBindVideoDeviceNV GLXEW_GET_FUN(__glewXBindVideoDeviceNV)
+#define glXEnumerateVideoDevicesNV GLXEW_GET_FUN(__glewXEnumerateVideoDevicesNV)
+
+#define GLXEW_NV_present_video GLXEW_GET_VAR(__GLXEW_NV_present_video)
+
+#endif /* GLX_NV_present_video */
+
+/* --------------------------- GLX_NV_swap_group --------------------------- */
+
+#ifndef GLX_NV_swap_group
+#define GLX_NV_swap_group 1
+
+typedef Bool ( * PFNGLXBINDSWAPBARRIERNVPROC) (Display* dpy, GLuint group, GLuint barrier);
+typedef Bool ( * PFNGLXJOINSWAPGROUPNVPROC) (Display* dpy, GLXDrawable drawable, GLuint group);
+typedef Bool ( * PFNGLXQUERYFRAMECOUNTNVPROC) (Display* dpy, int screen, GLuint *count);
+typedef Bool ( * PFNGLXQUERYMAXSWAPGROUPSNVPROC) (Display* dpy, int screen, GLuint *maxGroups, GLuint *maxBarriers);
+typedef Bool ( * PFNGLXQUERYSWAPGROUPNVPROC) (Display* dpy, GLXDrawable drawable, GLuint *group, GLuint *barrier);
+typedef Bool ( * PFNGLXRESETFRAMECOUNTNVPROC) (Display* dpy, int screen);
+
+#define glXBindSwapBarrierNV GLXEW_GET_FUN(__glewXBindSwapBarrierNV)
+#define glXJoinSwapGroupNV GLXEW_GET_FUN(__glewXJoinSwapGroupNV)
+#define glXQueryFrameCountNV GLXEW_GET_FUN(__glewXQueryFrameCountNV)
+#define glXQueryMaxSwapGroupsNV GLXEW_GET_FUN(__glewXQueryMaxSwapGroupsNV)
+#define glXQuerySwapGroupNV GLXEW_GET_FUN(__glewXQuerySwapGroupNV)
+#define glXResetFrameCountNV GLXEW_GET_FUN(__glewXResetFrameCountNV)
+
+#define GLXEW_NV_swap_group GLXEW_GET_VAR(__GLXEW_NV_swap_group)
+
+#endif /* GLX_NV_swap_group */
+
+/* ----------------------- GLX_NV_vertex_array_range ----------------------- */
+
+#ifndef GLX_NV_vertex_array_range
+#define GLX_NV_vertex_array_range 1
+
+typedef void * ( * PFNGLXALLOCATEMEMORYNVPROC) (GLsizei size, GLfloat readFrequency, GLfloat writeFrequency, GLfloat priority);
+typedef void ( * PFNGLXFREEMEMORYNVPROC) (void *pointer);
+
+#define glXAllocateMemoryNV GLXEW_GET_FUN(__glewXAllocateMemoryNV)
+#define glXFreeMemoryNV GLXEW_GET_FUN(__glewXFreeMemoryNV)
+
+#define GLXEW_NV_vertex_array_range GLXEW_GET_VAR(__GLXEW_NV_vertex_array_range)
+
+#endif /* GLX_NV_vertex_array_range */
+
+/* -------------------------- GLX_NV_video_capture ------------------------- */
+
+#ifndef GLX_NV_video_capture
+#define GLX_NV_video_capture 1
+
+#define GLX_DEVICE_ID_NV 0x20CD
+#define GLX_UNIQUE_ID_NV 0x20CE
+#define GLX_NUM_VIDEO_CAPTURE_SLOTS_NV 0x20CF
+
+typedef XID GLXVideoCaptureDeviceNV;
+
+typedef int ( * PFNGLXBINDVIDEOCAPTUREDEVICENVPROC) (Display* dpy, unsigned int video_capture_slot, GLXVideoCaptureDeviceNV device);
+typedef GLXVideoCaptureDeviceNV * ( * PFNGLXENUMERATEVIDEOCAPTUREDEVICESNVPROC) (Display* dpy, int screen, int *nelements);
+typedef void ( * PFNGLXLOCKVIDEOCAPTUREDEVICENVPROC) (Display* dpy, GLXVideoCaptureDeviceNV device);
+typedef int ( * PFNGLXQUERYVIDEOCAPTUREDEVICENVPROC) (Display* dpy, GLXVideoCaptureDeviceNV device, int attribute, int *value);
+typedef void ( * PFNGLXRELEASEVIDEOCAPTUREDEVICENVPROC) (Display* dpy, GLXVideoCaptureDeviceNV device);
+
+#define glXBindVideoCaptureDeviceNV GLXEW_GET_FUN(__glewXBindVideoCaptureDeviceNV)
+#define glXEnumerateVideoCaptureDevicesNV GLXEW_GET_FUN(__glewXEnumerateVideoCaptureDevicesNV)
+#define glXLockVideoCaptureDeviceNV GLXEW_GET_FUN(__glewXLockVideoCaptureDeviceNV)
+#define glXQueryVideoCaptureDeviceNV GLXEW_GET_FUN(__glewXQueryVideoCaptureDeviceNV)
+#define glXReleaseVideoCaptureDeviceNV GLXEW_GET_FUN(__glewXReleaseVideoCaptureDeviceNV)
+
+#define GLXEW_NV_video_capture GLXEW_GET_VAR(__GLXEW_NV_video_capture)
+
+#endif /* GLX_NV_video_capture */
+
+/* ---------------------------- GLX_NV_video_out --------------------------- */
+
+#ifndef GLX_NV_video_out
+#define GLX_NV_video_out 1
+
+#define GLX_VIDEO_OUT_COLOR_NV 0x20C3
+#define GLX_VIDEO_OUT_ALPHA_NV 0x20C4
+#define GLX_VIDEO_OUT_DEPTH_NV 0x20C5
+#define GLX_VIDEO_OUT_COLOR_AND_ALPHA_NV 0x20C6
+#define GLX_VIDEO_OUT_COLOR_AND_DEPTH_NV 0x20C7
+#define GLX_VIDEO_OUT_FRAME_NV 0x20C8
+#define GLX_VIDEO_OUT_FIELD_1_NV 0x20C9
+#define GLX_VIDEO_OUT_FIELD_2_NV 0x20CA
+#define GLX_VIDEO_OUT_STACKED_FIELDS_1_2_NV 0x20CB
+#define GLX_VIDEO_OUT_STACKED_FIELDS_2_1_NV 0x20CC
+
+typedef int ( * PFNGLXBINDVIDEOIMAGENVPROC) (Display* dpy, GLXVideoDeviceNV VideoDevice, GLXPbuffer pbuf, int iVideoBuffer);
+typedef int ( * PFNGLXGETVIDEODEVICENVPROC) (Display* dpy, int screen, int numVideoDevices, GLXVideoDeviceNV *pVideoDevice);
+typedef int ( * PFNGLXGETVIDEOINFONVPROC) (Display* dpy, int screen, GLXVideoDeviceNV VideoDevice, unsigned long *pulCounterOutputPbuffer, unsigned long *pulCounterOutputVideo);
+typedef int ( * PFNGLXRELEASEVIDEODEVICENVPROC) (Display* dpy, int screen, GLXVideoDeviceNV VideoDevice);
+typedef int ( * PFNGLXRELEASEVIDEOIMAGENVPROC) (Display* dpy, GLXPbuffer pbuf);
+typedef int ( * PFNGLXSENDPBUFFERTOVIDEONVPROC) (Display* dpy, GLXPbuffer pbuf, int iBufferType, unsigned long *pulCounterPbuffer, GLboolean bBlock);
+
+#define glXBindVideoImageNV GLXEW_GET_FUN(__glewXBindVideoImageNV)
+#define glXGetVideoDeviceNV GLXEW_GET_FUN(__glewXGetVideoDeviceNV)
+#define glXGetVideoInfoNV GLXEW_GET_FUN(__glewXGetVideoInfoNV)
+#define glXReleaseVideoDeviceNV GLXEW_GET_FUN(__glewXReleaseVideoDeviceNV)
+#define glXReleaseVideoImageNV GLXEW_GET_FUN(__glewXReleaseVideoImageNV)
+#define glXSendPbufferToVideoNV GLXEW_GET_FUN(__glewXSendPbufferToVideoNV)
+
+#define GLXEW_NV_video_out GLXEW_GET_VAR(__GLXEW_NV_video_out)
+
+#endif /* GLX_NV_video_out */
+
+/* -------------------------- GLX_OML_swap_method -------------------------- */
+
+#ifndef GLX_OML_swap_method
+#define GLX_OML_swap_method 1
+
+#define GLX_SWAP_METHOD_OML 0x8060
+#define GLX_SWAP_EXCHANGE_OML 0x8061
+#define GLX_SWAP_COPY_OML 0x8062
+#define GLX_SWAP_UNDEFINED_OML 0x8063
+
+#define GLXEW_OML_swap_method GLXEW_GET_VAR(__GLXEW_OML_swap_method)
+
+#endif /* GLX_OML_swap_method */
+
+/* -------------------------- GLX_OML_sync_control ------------------------- */
+
+#ifndef GLX_OML_sync_control
+#define GLX_OML_sync_control 1
+
+typedef Bool ( * PFNGLXGETMSCRATEOMLPROC) (Display* dpy, GLXDrawable drawable, int32_t* numerator, int32_t* denominator);
+typedef Bool ( * PFNGLXGETSYNCVALUESOMLPROC) (Display* dpy, GLXDrawable drawable, int64_t* ust, int64_t* msc, int64_t* sbc);
+typedef int64_t ( * PFNGLXSWAPBUFFERSMSCOMLPROC) (Display* dpy, GLXDrawable drawable, int64_t target_msc, int64_t divisor, int64_t remainder);
+typedef Bool ( * PFNGLXWAITFORMSCOMLPROC) (Display* dpy, GLXDrawable drawable, int64_t target_msc, int64_t divisor, int64_t remainder, int64_t* ust, int64_t* msc, int64_t* sbc);
+typedef Bool ( * PFNGLXWAITFORSBCOMLPROC) (Display* dpy, GLXDrawable drawable, int64_t target_sbc, int64_t* ust, int64_t* msc, int64_t* sbc);
+
+#define glXGetMscRateOML GLXEW_GET_FUN(__glewXGetMscRateOML)
+#define glXGetSyncValuesOML GLXEW_GET_FUN(__glewXGetSyncValuesOML)
+#define glXSwapBuffersMscOML GLXEW_GET_FUN(__glewXSwapBuffersMscOML)
+#define glXWaitForMscOML GLXEW_GET_FUN(__glewXWaitForMscOML)
+#define glXWaitForSbcOML GLXEW_GET_FUN(__glewXWaitForSbcOML)
+
+#define GLXEW_OML_sync_control GLXEW_GET_VAR(__GLXEW_OML_sync_control)
+
+#endif /* GLX_OML_sync_control */
+
+/* ------------------------ GLX_SGIS_blended_overlay ----------------------- */
+
+#ifndef GLX_SGIS_blended_overlay
+#define GLX_SGIS_blended_overlay 1
+
+#define GLX_BLENDED_RGBA_SGIS 0x8025
+
+#define GLXEW_SGIS_blended_overlay GLXEW_GET_VAR(__GLXEW_SGIS_blended_overlay)
+
+#endif /* GLX_SGIS_blended_overlay */
+
+/* -------------------------- GLX_SGIS_color_range ------------------------- */
+
+#ifndef GLX_SGIS_color_range
+#define GLX_SGIS_color_range 1
+
+#define GLXEW_SGIS_color_range GLXEW_GET_VAR(__GLXEW_SGIS_color_range)
+
+#endif /* GLX_SGIS_color_range */
+
+/* -------------------------- GLX_SGIS_multisample ------------------------- */
+
+#ifndef GLX_SGIS_multisample
+#define GLX_SGIS_multisample 1
+
+#define GLX_SAMPLE_BUFFERS_SGIS 100000
+#define GLX_SAMPLES_SGIS 100001
+
+#define GLXEW_SGIS_multisample GLXEW_GET_VAR(__GLXEW_SGIS_multisample)
+
+#endif /* GLX_SGIS_multisample */
+
+/* ---------------------- GLX_SGIS_shared_multisample ---------------------- */
+
+#ifndef GLX_SGIS_shared_multisample
+#define GLX_SGIS_shared_multisample 1
+
+#define GLX_MULTISAMPLE_SUB_RECT_WIDTH_SGIS 0x8026
+#define GLX_MULTISAMPLE_SUB_RECT_HEIGHT_SGIS 0x8027
+
+#define GLXEW_SGIS_shared_multisample GLXEW_GET_VAR(__GLXEW_SGIS_shared_multisample)
+
+#endif /* GLX_SGIS_shared_multisample */
+
+/* --------------------------- GLX_SGIX_fbconfig --------------------------- */
+
+#ifndef GLX_SGIX_fbconfig
+#define GLX_SGIX_fbconfig 1
+
+#define GLX_RGBA_BIT_SGIX 0x00000001
+#define GLX_WINDOW_BIT_SGIX 0x00000001
+#define GLX_COLOR_INDEX_BIT_SGIX 0x00000002
+#define GLX_PIXMAP_BIT_SGIX 0x00000002
+#define GLX_SCREEN_EXT 0x800C
+#define GLX_DRAWABLE_TYPE_SGIX 0x8010
+#define GLX_RENDER_TYPE_SGIX 0x8011
+#define GLX_X_RENDERABLE_SGIX 0x8012
+#define GLX_FBCONFIG_ID_SGIX 0x8013
+#define GLX_RGBA_TYPE_SGIX 0x8014
+#define GLX_COLOR_INDEX_TYPE_SGIX 0x8015
+
+typedef XID GLXFBConfigIDSGIX;
+typedef struct __GLXFBConfigRec *GLXFBConfigSGIX;
+
+typedef GLXFBConfigSGIX* ( * PFNGLXCHOOSEFBCONFIGSGIXPROC) (Display *dpy, int screen, const int *attrib_list, int *nelements);
+typedef GLXContext ( * PFNGLXCREATECONTEXTWITHCONFIGSGIXPROC) (Display* dpy, GLXFBConfig config, int render_type, GLXContext share_list, Bool direct);
+typedef GLXPixmap ( * PFNGLXCREATEGLXPIXMAPWITHCONFIGSGIXPROC) (Display* dpy, GLXFBConfig config, Pixmap pixmap);
+typedef int ( * PFNGLXGETFBCONFIGATTRIBSGIXPROC) (Display* dpy, GLXFBConfigSGIX config, int attribute, int *value);
+typedef GLXFBConfigSGIX ( * PFNGLXGETFBCONFIGFROMVISUALSGIXPROC) (Display* dpy, XVisualInfo *vis);
+typedef XVisualInfo* ( * PFNGLXGETVISUALFROMFBCONFIGSGIXPROC) (Display *dpy, GLXFBConfig config);
+
+#define glXChooseFBConfigSGIX GLXEW_GET_FUN(__glewXChooseFBConfigSGIX)
+#define glXCreateContextWithConfigSGIX GLXEW_GET_FUN(__glewXCreateContextWithConfigSGIX)
+#define glXCreateGLXPixmapWithConfigSGIX GLXEW_GET_FUN(__glewXCreateGLXPixmapWithConfigSGIX)
+#define glXGetFBConfigAttribSGIX GLXEW_GET_FUN(__glewXGetFBConfigAttribSGIX)
+#define glXGetFBConfigFromVisualSGIX GLXEW_GET_FUN(__glewXGetFBConfigFromVisualSGIX)
+#define glXGetVisualFromFBConfigSGIX GLXEW_GET_FUN(__glewXGetVisualFromFBConfigSGIX)
+
+#define GLXEW_SGIX_fbconfig GLXEW_GET_VAR(__GLXEW_SGIX_fbconfig)
+
+#endif /* GLX_SGIX_fbconfig */
+
+/* --------------------------- GLX_SGIX_hyperpipe -------------------------- */
+
+#ifndef GLX_SGIX_hyperpipe
+#define GLX_SGIX_hyperpipe 1
+
+#define GLX_HYPERPIPE_DISPLAY_PIPE_SGIX 0x00000001
+#define GLX_PIPE_RECT_SGIX 0x00000001
+#define GLX_HYPERPIPE_RENDER_PIPE_SGIX 0x00000002
+#define GLX_PIPE_RECT_LIMITS_SGIX 0x00000002
+#define GLX_HYPERPIPE_STEREO_SGIX 0x00000003
+#define GLX_HYPERPIPE_PIXEL_AVERAGE_SGIX 0x00000004
+#define GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX 80
+#define GLX_BAD_HYPERPIPE_CONFIG_SGIX 91
+#define GLX_BAD_HYPERPIPE_SGIX 92
+#define GLX_HYPERPIPE_ID_SGIX 0x8030
+
+typedef struct {
+  char pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX]; 
+  int  networkId; 
+} GLXHyperpipeNetworkSGIX;
+typedef struct {
+  char pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX]; 
+  int XOrigin; 
+  int YOrigin; 
+  int maxHeight; 
+  int maxWidth; 
+} GLXPipeRectLimits;
+typedef struct {
+  char pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX]; 
+  int channel; 
+  unsigned int participationType; 
+  int timeSlice; 
+} GLXHyperpipeConfigSGIX;
+typedef struct {
+  char pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX]; 
+  int srcXOrigin; 
+  int srcYOrigin; 
+  int srcWidth; 
+  int srcHeight; 
+  int destXOrigin; 
+  int destYOrigin; 
+  int destWidth; 
+  int destHeight; 
+} GLXPipeRect;
+
+typedef int ( * PFNGLXBINDHYPERPIPESGIXPROC) (Display *dpy, int hpId);
+typedef int ( * PFNGLXDESTROYHYPERPIPECONFIGSGIXPROC) (Display *dpy, int hpId);
+typedef int ( * PFNGLXHYPERPIPEATTRIBSGIXPROC) (Display *dpy, int timeSlice, int attrib, int size, void *attribList);
+typedef int ( * PFNGLXHYPERPIPECONFIGSGIXPROC) (Display *dpy, int networkId, int npipes, GLXHyperpipeConfigSGIX *cfg, int *hpId);
+typedef int ( * PFNGLXQUERYHYPERPIPEATTRIBSGIXPROC) (Display *dpy, int timeSlice, int attrib, int size, void *returnAttribList);
+typedef int ( * PFNGLXQUERYHYPERPIPEBESTATTRIBSGIXPROC) (Display *dpy, int timeSlice, int attrib, int size, void *attribList, void *returnAttribList);
+typedef GLXHyperpipeConfigSGIX * ( * PFNGLXQUERYHYPERPIPECONFIGSGIXPROC) (Display *dpy, int hpId, int *npipes);
+typedef GLXHyperpipeNetworkSGIX * ( * PFNGLXQUERYHYPERPIPENETWORKSGIXPROC) (Display *dpy, int *npipes);
+
+#define glXBindHyperpipeSGIX GLXEW_GET_FUN(__glewXBindHyperpipeSGIX)
+#define glXDestroyHyperpipeConfigSGIX GLXEW_GET_FUN(__glewXDestroyHyperpipeConfigSGIX)
+#define glXHyperpipeAttribSGIX GLXEW_GET_FUN(__glewXHyperpipeAttribSGIX)
+#define glXHyperpipeConfigSGIX GLXEW_GET_FUN(__glewXHyperpipeConfigSGIX)
+#define glXQueryHyperpipeAttribSGIX GLXEW_GET_FUN(__glewXQueryHyperpipeAttribSGIX)
+#define glXQueryHyperpipeBestAttribSGIX GLXEW_GET_FUN(__glewXQueryHyperpipeBestAttribSGIX)
+#define glXQueryHyperpipeConfigSGIX GLXEW_GET_FUN(__glewXQueryHyperpipeConfigSGIX)
+#define glXQueryHyperpipeNetworkSGIX GLXEW_GET_FUN(__glewXQueryHyperpipeNetworkSGIX)
+
+#define GLXEW_SGIX_hyperpipe GLXEW_GET_VAR(__GLXEW_SGIX_hyperpipe)
+
+#endif /* GLX_SGIX_hyperpipe */
+
+/* ---------------------------- GLX_SGIX_pbuffer --------------------------- */
+
+#ifndef GLX_SGIX_pbuffer
+#define GLX_SGIX_pbuffer 1
+
+#define GLX_FRONT_LEFT_BUFFER_BIT_SGIX 0x00000001
+#define GLX_FRONT_RIGHT_BUFFER_BIT_SGIX 0x00000002
+#define GLX_BACK_LEFT_BUFFER_BIT_SGIX 0x00000004
+#define GLX_PBUFFER_BIT_SGIX 0x00000004
+#define GLX_BACK_RIGHT_BUFFER_BIT_SGIX 0x00000008
+#define GLX_AUX_BUFFERS_BIT_SGIX 0x00000010
+#define GLX_DEPTH_BUFFER_BIT_SGIX 0x00000020
+#define GLX_STENCIL_BUFFER_BIT_SGIX 0x00000040
+#define GLX_ACCUM_BUFFER_BIT_SGIX 0x00000080
+#define GLX_SAMPLE_BUFFERS_BIT_SGIX 0x00000100
+#define GLX_MAX_PBUFFER_WIDTH_SGIX 0x8016
+#define GLX_MAX_PBUFFER_HEIGHT_SGIX 0x8017
+#define GLX_MAX_PBUFFER_PIXELS_SGIX 0x8018
+#define GLX_OPTIMAL_PBUFFER_WIDTH_SGIX 0x8019
+#define GLX_OPTIMAL_PBUFFER_HEIGHT_SGIX 0x801A
+#define GLX_PRESERVED_CONTENTS_SGIX 0x801B
+#define GLX_LARGEST_PBUFFER_SGIX 0x801C
+#define GLX_WIDTH_SGIX 0x801D
+#define GLX_HEIGHT_SGIX 0x801E
+#define GLX_EVENT_MASK_SGIX 0x801F
+#define GLX_DAMAGED_SGIX 0x8020
+#define GLX_SAVED_SGIX 0x8021
+#define GLX_WINDOW_SGIX 0x8022
+#define GLX_PBUFFER_SGIX 0x8023
+#define GLX_BUFFER_CLOBBER_MASK_SGIX 0x08000000
+
+typedef XID GLXPbufferSGIX;
+typedef 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;
+
+typedef GLXPbuffer ( * PFNGLXCREATEGLXPBUFFERSGIXPROC) (Display* dpy, GLXFBConfig config, unsigned int width, unsigned int height, int *attrib_list);
+typedef void ( * PFNGLXDESTROYGLXPBUFFERSGIXPROC) (Display* dpy, GLXPbuffer pbuf);
+typedef void ( * PFNGLXGETSELECTEDEVENTSGIXPROC) (Display* dpy, GLXDrawable drawable, unsigned long *mask);
+typedef void ( * PFNGLXQUERYGLXPBUFFERSGIXPROC) (Display* dpy, GLXPbuffer pbuf, int attribute, unsigned int *value);
+typedef void ( * PFNGLXSELECTEVENTSGIXPROC) (Display* dpy, GLXDrawable drawable, unsigned long mask);
+
+#define glXCreateGLXPbufferSGIX GLXEW_GET_FUN(__glewXCreateGLXPbufferSGIX)
+#define glXDestroyGLXPbufferSGIX GLXEW_GET_FUN(__glewXDestroyGLXPbufferSGIX)
+#define glXGetSelectedEventSGIX GLXEW_GET_FUN(__glewXGetSelectedEventSGIX)
+#define glXQueryGLXPbufferSGIX GLXEW_GET_FUN(__glewXQueryGLXPbufferSGIX)
+#define glXSelectEventSGIX GLXEW_GET_FUN(__glewXSelectEventSGIX)
+
+#define GLXEW_SGIX_pbuffer GLXEW_GET_VAR(__GLXEW_SGIX_pbuffer)
+
+#endif /* GLX_SGIX_pbuffer */
+
+/* ------------------------- GLX_SGIX_swap_barrier ------------------------- */
+
+#ifndef GLX_SGIX_swap_barrier
+#define GLX_SGIX_swap_barrier 1
+
+typedef void ( * PFNGLXBINDSWAPBARRIERSGIXPROC) (Display *dpy, GLXDrawable drawable, int barrier);
+typedef Bool ( * PFNGLXQUERYMAXSWAPBARRIERSSGIXPROC) (Display *dpy, int screen, int *max);
+
+#define glXBindSwapBarrierSGIX GLXEW_GET_FUN(__glewXBindSwapBarrierSGIX)
+#define glXQueryMaxSwapBarriersSGIX GLXEW_GET_FUN(__glewXQueryMaxSwapBarriersSGIX)
+
+#define GLXEW_SGIX_swap_barrier GLXEW_GET_VAR(__GLXEW_SGIX_swap_barrier)
+
+#endif /* GLX_SGIX_swap_barrier */
+
+/* -------------------------- GLX_SGIX_swap_group -------------------------- */
+
+#ifndef GLX_SGIX_swap_group
+#define GLX_SGIX_swap_group 1
+
+typedef void ( * PFNGLXJOINSWAPGROUPSGIXPROC) (Display *dpy, GLXDrawable drawable, GLXDrawable member);
+
+#define glXJoinSwapGroupSGIX GLXEW_GET_FUN(__glewXJoinSwapGroupSGIX)
+
+#define GLXEW_SGIX_swap_group GLXEW_GET_VAR(__GLXEW_SGIX_swap_group)
+
+#endif /* GLX_SGIX_swap_group */
+
+/* ------------------------- GLX_SGIX_video_resize ------------------------- */
+
+#ifndef GLX_SGIX_video_resize
+#define GLX_SGIX_video_resize 1
+
+#define GLX_SYNC_FRAME_SGIX 0x00000000
+#define GLX_SYNC_SWAP_SGIX 0x00000001
+
+typedef int ( * PFNGLXBINDCHANNELTOWINDOWSGIXPROC) (Display* display, int screen, int channel, Window window);
+typedef int ( * PFNGLXCHANNELRECTSGIXPROC) (Display* display, int screen, int channel, int x, int y, int w, int h);
+typedef int ( * PFNGLXCHANNELRECTSYNCSGIXPROC) (Display* display, int screen, int channel, GLenum synctype);
+typedef int ( * PFNGLXQUERYCHANNELDELTASSGIXPROC) (Display* display, int screen, int channel, int *x, int *y, int *w, int *h);
+typedef int ( * PFNGLXQUERYCHANNELRECTSGIXPROC) (Display* display, int screen, int channel, int *dx, int *dy, int *dw, int *dh);
+
+#define glXBindChannelToWindowSGIX GLXEW_GET_FUN(__glewXBindChannelToWindowSGIX)
+#define glXChannelRectSGIX GLXEW_GET_FUN(__glewXChannelRectSGIX)
+#define glXChannelRectSyncSGIX GLXEW_GET_FUN(__glewXChannelRectSyncSGIX)
+#define glXQueryChannelDeltasSGIX GLXEW_GET_FUN(__glewXQueryChannelDeltasSGIX)
+#define glXQueryChannelRectSGIX GLXEW_GET_FUN(__glewXQueryChannelRectSGIX)
+
+#define GLXEW_SGIX_video_resize GLXEW_GET_VAR(__GLXEW_SGIX_video_resize)
+
+#endif /* GLX_SGIX_video_resize */
+
+/* ---------------------- GLX_SGIX_visual_select_group --------------------- */
+
+#ifndef GLX_SGIX_visual_select_group
+#define GLX_SGIX_visual_select_group 1
+
+#define GLX_VISUAL_SELECT_GROUP_SGIX 0x8028
+
+#define GLXEW_SGIX_visual_select_group GLXEW_GET_VAR(__GLXEW_SGIX_visual_select_group)
+
+#endif /* GLX_SGIX_visual_select_group */
+
+/* ---------------------------- GLX_SGI_cushion ---------------------------- */
+
+#ifndef GLX_SGI_cushion
+#define GLX_SGI_cushion 1
+
+typedef void ( * PFNGLXCUSHIONSGIPROC) (Display* dpy, Window window, float cushion);
+
+#define glXCushionSGI GLXEW_GET_FUN(__glewXCushionSGI)
+
+#define GLXEW_SGI_cushion GLXEW_GET_VAR(__GLXEW_SGI_cushion)
+
+#endif /* GLX_SGI_cushion */
+
+/* ----------------------- GLX_SGI_make_current_read ----------------------- */
+
+#ifndef GLX_SGI_make_current_read
+#define GLX_SGI_make_current_read 1
+
+typedef GLXDrawable ( * PFNGLXGETCURRENTREADDRAWABLESGIPROC) (void);
+typedef Bool ( * PFNGLXMAKECURRENTREADSGIPROC) (Display* dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx);
+
+#define glXGetCurrentReadDrawableSGI GLXEW_GET_FUN(__glewXGetCurrentReadDrawableSGI)
+#define glXMakeCurrentReadSGI GLXEW_GET_FUN(__glewXMakeCurrentReadSGI)
+
+#define GLXEW_SGI_make_current_read GLXEW_GET_VAR(__GLXEW_SGI_make_current_read)
+
+#endif /* GLX_SGI_make_current_read */
+
+/* -------------------------- GLX_SGI_swap_control ------------------------- */
+
+#ifndef GLX_SGI_swap_control
+#define GLX_SGI_swap_control 1
+
+typedef int ( * PFNGLXSWAPINTERVALSGIPROC) (int interval);
+
+#define glXSwapIntervalSGI GLXEW_GET_FUN(__glewXSwapIntervalSGI)
+
+#define GLXEW_SGI_swap_control GLXEW_GET_VAR(__GLXEW_SGI_swap_control)
+
+#endif /* GLX_SGI_swap_control */
+
+/* --------------------------- GLX_SGI_video_sync -------------------------- */
+
+#ifndef GLX_SGI_video_sync
+#define GLX_SGI_video_sync 1
+
+typedef int ( * PFNGLXGETVIDEOSYNCSGIPROC) (unsigned int* count);
+typedef int ( * PFNGLXWAITVIDEOSYNCSGIPROC) (int divisor, int remainder, unsigned int* count);
+
+#define glXGetVideoSyncSGI GLXEW_GET_FUN(__glewXGetVideoSyncSGI)
+#define glXWaitVideoSyncSGI GLXEW_GET_FUN(__glewXWaitVideoSyncSGI)
+
+#define GLXEW_SGI_video_sync GLXEW_GET_VAR(__GLXEW_SGI_video_sync)
+
+#endif /* GLX_SGI_video_sync */
+
+/* --------------------- GLX_SUN_get_transparent_index --------------------- */
+
+#ifndef GLX_SUN_get_transparent_index
+#define GLX_SUN_get_transparent_index 1
+
+typedef Status ( * PFNGLXGETTRANSPARENTINDEXSUNPROC) (Display* dpy, Window overlay, Window underlay, unsigned long *pTransparentIndex);
+
+#define glXGetTransparentIndexSUN GLXEW_GET_FUN(__glewXGetTransparentIndexSUN)
+
+#define GLXEW_SUN_get_transparent_index GLXEW_GET_VAR(__GLXEW_SUN_get_transparent_index)
+
+#endif /* GLX_SUN_get_transparent_index */
+
+/* -------------------------- GLX_SUN_video_resize ------------------------- */
+
+#ifndef GLX_SUN_video_resize
+#define GLX_SUN_video_resize 1
+
+#define GLX_VIDEO_RESIZE_SUN 0x8171
+#define GL_VIDEO_RESIZE_COMPENSATION_SUN 0x85CD
+
+typedef int ( * PFNGLXGETVIDEORESIZESUNPROC) (Display* display, GLXDrawable window, float* factor);
+typedef int ( * PFNGLXVIDEORESIZESUNPROC) (Display* display, GLXDrawable window, float factor);
+
+#define glXGetVideoResizeSUN GLXEW_GET_FUN(__glewXGetVideoResizeSUN)
+#define glXVideoResizeSUN GLXEW_GET_FUN(__glewXVideoResizeSUN)
+
+#define GLXEW_SUN_video_resize GLXEW_GET_VAR(__GLXEW_SUN_video_resize)
+
+#endif /* GLX_SUN_video_resize */
+
+/* ------------------------------------------------------------------------- */
+
+#ifdef GLEW_MX
+#define GLXEW_FUN_EXPORT GLEW_FUN_EXPORT
+#define GLXEW_VAR_EXPORT
+#else
+#define GLXEW_FUN_EXPORT GLEW_FUN_EXPORT
+#define GLXEW_VAR_EXPORT GLEW_VAR_EXPORT
+#endif /* GLEW_MX */
+
+GLXEW_FUN_EXPORT PFNGLXGETCURRENTDISPLAYPROC __glewXGetCurrentDisplay;
+
+GLXEW_FUN_EXPORT PFNGLXCHOOSEFBCONFIGPROC __glewXChooseFBConfig;
+GLXEW_FUN_EXPORT PFNGLXCREATENEWCONTEXTPROC __glewXCreateNewContext;
+GLXEW_FUN_EXPORT PFNGLXCREATEPBUFFERPROC __glewXCreatePbuffer;
+GLXEW_FUN_EXPORT PFNGLXCREATEPIXMAPPROC __glewXCreatePixmap;
+GLXEW_FUN_EXPORT PFNGLXCREATEWINDOWPROC __glewXCreateWindow;
+GLXEW_FUN_EXPORT PFNGLXDESTROYPBUFFERPROC __glewXDestroyPbuffer;
+GLXEW_FUN_EXPORT PFNGLXDESTROYPIXMAPPROC __glewXDestroyPixmap;
+GLXEW_FUN_EXPORT PFNGLXDESTROYWINDOWPROC __glewXDestroyWindow;
+GLXEW_FUN_EXPORT PFNGLXGETCURRENTREADDRAWABLEPROC __glewXGetCurrentReadDrawable;
+GLXEW_FUN_EXPORT PFNGLXGETFBCONFIGATTRIBPROC __glewXGetFBConfigAttrib;
+GLXEW_FUN_EXPORT PFNGLXGETFBCONFIGSPROC __glewXGetFBConfigs;
+GLXEW_FUN_EXPORT PFNGLXGETSELECTEDEVENTPROC __glewXGetSelectedEvent;
+GLXEW_FUN_EXPORT PFNGLXGETVISUALFROMFBCONFIGPROC __glewXGetVisualFromFBConfig;
+GLXEW_FUN_EXPORT PFNGLXMAKECONTEXTCURRENTPROC __glewXMakeContextCurrent;
+GLXEW_FUN_EXPORT PFNGLXQUERYCONTEXTPROC __glewXQueryContext;
+GLXEW_FUN_EXPORT PFNGLXQUERYDRAWABLEPROC __glewXQueryDrawable;
+GLXEW_FUN_EXPORT PFNGLXSELECTEVENTPROC __glewXSelectEvent;
+
+GLXEW_FUN_EXPORT PFNGLXBLITCONTEXTFRAMEBUFFERAMDPROC __glewXBlitContextFramebufferAMD;
+GLXEW_FUN_EXPORT PFNGLXCREATEASSOCIATEDCONTEXTAMDPROC __glewXCreateAssociatedContextAMD;
+GLXEW_FUN_EXPORT PFNGLXCREATEASSOCIATEDCONTEXTATTRIBSAMDPROC __glewXCreateAssociatedContextAttribsAMD;
+GLXEW_FUN_EXPORT PFNGLXDELETEASSOCIATEDCONTEXTAMDPROC __glewXDeleteAssociatedContextAMD;
+GLXEW_FUN_EXPORT PFNGLXGETCONTEXTGPUIDAMDPROC __glewXGetContextGPUIDAMD;
+GLXEW_FUN_EXPORT PFNGLXGETCURRENTASSOCIATEDCONTEXTAMDPROC __glewXGetCurrentAssociatedContextAMD;
+GLXEW_FUN_EXPORT PFNGLXGETGPUIDSAMDPROC __glewXGetGPUIDsAMD;
+GLXEW_FUN_EXPORT PFNGLXGETGPUINFOAMDPROC __glewXGetGPUInfoAMD;
+GLXEW_FUN_EXPORT PFNGLXMAKEASSOCIATEDCONTEXTCURRENTAMDPROC __glewXMakeAssociatedContextCurrentAMD;
+
+GLXEW_FUN_EXPORT PFNGLXCREATECONTEXTATTRIBSARBPROC __glewXCreateContextAttribsARB;
+
+GLXEW_FUN_EXPORT PFNGLXBINDTEXIMAGEATIPROC __glewXBindTexImageATI;
+GLXEW_FUN_EXPORT PFNGLXDRAWABLEATTRIBATIPROC __glewXDrawableAttribATI;
+GLXEW_FUN_EXPORT PFNGLXRELEASETEXIMAGEATIPROC __glewXReleaseTexImageATI;
+
+GLXEW_FUN_EXPORT PFNGLXFREECONTEXTEXTPROC __glewXFreeContextEXT;
+GLXEW_FUN_EXPORT PFNGLXGETCONTEXTIDEXTPROC __glewXGetContextIDEXT;
+GLXEW_FUN_EXPORT PFNGLXIMPORTCONTEXTEXTPROC __glewXImportContextEXT;
+GLXEW_FUN_EXPORT PFNGLXQUERYCONTEXTINFOEXTPROC __glewXQueryContextInfoEXT;
+
+GLXEW_FUN_EXPORT PFNGLXSWAPINTERVALEXTPROC __glewXSwapIntervalEXT;
+
+GLXEW_FUN_EXPORT PFNGLXBINDTEXIMAGEEXTPROC __glewXBindTexImageEXT;
+GLXEW_FUN_EXPORT PFNGLXRELEASETEXIMAGEEXTPROC __glewXReleaseTexImageEXT;
+
+GLXEW_FUN_EXPORT PFNGLXGETAGPOFFSETMESAPROC __glewXGetAGPOffsetMESA;
+
+GLXEW_FUN_EXPORT PFNGLXCOPYSUBBUFFERMESAPROC __glewXCopySubBufferMESA;
+
+GLXEW_FUN_EXPORT PFNGLXCREATEGLXPIXMAPMESAPROC __glewXCreateGLXPixmapMESA;
+
+GLXEW_FUN_EXPORT PFNGLXQUERYCURRENTRENDERERINTEGERMESAPROC __glewXQueryCurrentRendererIntegerMESA;
+GLXEW_FUN_EXPORT PFNGLXQUERYCURRENTRENDERERSTRINGMESAPROC __glewXQueryCurrentRendererStringMESA;
+GLXEW_FUN_EXPORT PFNGLXQUERYRENDERERINTEGERMESAPROC __glewXQueryRendererIntegerMESA;
+GLXEW_FUN_EXPORT PFNGLXQUERYRENDERERSTRINGMESAPROC __glewXQueryRendererStringMESA;
+
+GLXEW_FUN_EXPORT PFNGLXRELEASEBUFFERSMESAPROC __glewXReleaseBuffersMESA;
+
+GLXEW_FUN_EXPORT PFNGLXSET3DFXMODEMESAPROC __glewXSet3DfxModeMESA;
+
+GLXEW_FUN_EXPORT PFNGLXGETSWAPINTERVALMESAPROC __glewXGetSwapIntervalMESA;
+GLXEW_FUN_EXPORT PFNGLXSWAPINTERVALMESAPROC __glewXSwapIntervalMESA;
+
+GLXEW_FUN_EXPORT PFNGLXCOPYBUFFERSUBDATANVPROC __glewXCopyBufferSubDataNV;
+GLXEW_FUN_EXPORT PFNGLXNAMEDCOPYBUFFERSUBDATANVPROC __glewXNamedCopyBufferSubDataNV;
+
+GLXEW_FUN_EXPORT PFNGLXCOPYIMAGESUBDATANVPROC __glewXCopyImageSubDataNV;
+
+GLXEW_FUN_EXPORT PFNGLXDELAYBEFORESWAPNVPROC __glewXDelayBeforeSwapNV;
+
+GLXEW_FUN_EXPORT PFNGLXBINDVIDEODEVICENVPROC __glewXBindVideoDeviceNV;
+GLXEW_FUN_EXPORT PFNGLXENUMERATEVIDEODEVICESNVPROC __glewXEnumerateVideoDevicesNV;
+
+GLXEW_FUN_EXPORT PFNGLXBINDSWAPBARRIERNVPROC __glewXBindSwapBarrierNV;
+GLXEW_FUN_EXPORT PFNGLXJOINSWAPGROUPNVPROC __glewXJoinSwapGroupNV;
+GLXEW_FUN_EXPORT PFNGLXQUERYFRAMECOUNTNVPROC __glewXQueryFrameCountNV;
+GLXEW_FUN_EXPORT PFNGLXQUERYMAXSWAPGROUPSNVPROC __glewXQueryMaxSwapGroupsNV;
+GLXEW_FUN_EXPORT PFNGLXQUERYSWAPGROUPNVPROC __glewXQuerySwapGroupNV;
+GLXEW_FUN_EXPORT PFNGLXRESETFRAMECOUNTNVPROC __glewXResetFrameCountNV;
+
+GLXEW_FUN_EXPORT PFNGLXALLOCATEMEMORYNVPROC __glewXAllocateMemoryNV;
+GLXEW_FUN_EXPORT PFNGLXFREEMEMORYNVPROC __glewXFreeMemoryNV;
+
+GLXEW_FUN_EXPORT PFNGLXBINDVIDEOCAPTUREDEVICENVPROC __glewXBindVideoCaptureDeviceNV;
+GLXEW_FUN_EXPORT PFNGLXENUMERATEVIDEOCAPTUREDEVICESNVPROC __glewXEnumerateVideoCaptureDevicesNV;
+GLXEW_FUN_EXPORT PFNGLXLOCKVIDEOCAPTUREDEVICENVPROC __glewXLockVideoCaptureDeviceNV;
+GLXEW_FUN_EXPORT PFNGLXQUERYVIDEOCAPTUREDEVICENVPROC __glewXQueryVideoCaptureDeviceNV;
+GLXEW_FUN_EXPORT PFNGLXRELEASEVIDEOCAPTUREDEVICENVPROC __glewXReleaseVideoCaptureDeviceNV;
+
+GLXEW_FUN_EXPORT PFNGLXBINDVIDEOIMAGENVPROC __glewXBindVideoImageNV;
+GLXEW_FUN_EXPORT PFNGLXGETVIDEODEVICENVPROC __glewXGetVideoDeviceNV;
+GLXEW_FUN_EXPORT PFNGLXGETVIDEOINFONVPROC __glewXGetVideoInfoNV;
+GLXEW_FUN_EXPORT PFNGLXRELEASEVIDEODEVICENVPROC __glewXReleaseVideoDeviceNV;
+GLXEW_FUN_EXPORT PFNGLXRELEASEVIDEOIMAGENVPROC __glewXReleaseVideoImageNV;
+GLXEW_FUN_EXPORT PFNGLXSENDPBUFFERTOVIDEONVPROC __glewXSendPbufferToVideoNV;
+
+GLXEW_FUN_EXPORT PFNGLXGETMSCRATEOMLPROC __glewXGetMscRateOML;
+GLXEW_FUN_EXPORT PFNGLXGETSYNCVALUESOMLPROC __glewXGetSyncValuesOML;
+GLXEW_FUN_EXPORT PFNGLXSWAPBUFFERSMSCOMLPROC __glewXSwapBuffersMscOML;
+GLXEW_FUN_EXPORT PFNGLXWAITFORMSCOMLPROC __glewXWaitForMscOML;
+GLXEW_FUN_EXPORT PFNGLXWAITFORSBCOMLPROC __glewXWaitForSbcOML;
+
+GLXEW_FUN_EXPORT PFNGLXCHOOSEFBCONFIGSGIXPROC __glewXChooseFBConfigSGIX;
+GLXEW_FUN_EXPORT PFNGLXCREATECONTEXTWITHCONFIGSGIXPROC __glewXCreateContextWithConfigSGIX;
+GLXEW_FUN_EXPORT PFNGLXCREATEGLXPIXMAPWITHCONFIGSGIXPROC __glewXCreateGLXPixmapWithConfigSGIX;
+GLXEW_FUN_EXPORT PFNGLXGETFBCONFIGATTRIBSGIXPROC __glewXGetFBConfigAttribSGIX;
+GLXEW_FUN_EXPORT PFNGLXGETFBCONFIGFROMVISUALSGIXPROC __glewXGetFBConfigFromVisualSGIX;
+GLXEW_FUN_EXPORT PFNGLXGETVISUALFROMFBCONFIGSGIXPROC __glewXGetVisualFromFBConfigSGIX;
+
+GLXEW_FUN_EXPORT PFNGLXBINDHYPERPIPESGIXPROC __glewXBindHyperpipeSGIX;
+GLXEW_FUN_EXPORT PFNGLXDESTROYHYPERPIPECONFIGSGIXPROC __glewXDestroyHyperpipeConfigSGIX;
+GLXEW_FUN_EXPORT PFNGLXHYPERPIPEATTRIBSGIXPROC __glewXHyperpipeAttribSGIX;
+GLXEW_FUN_EXPORT PFNGLXHYPERPIPECONFIGSGIXPROC __glewXHyperpipeConfigSGIX;
+GLXEW_FUN_EXPORT PFNGLXQUERYHYPERPIPEATTRIBSGIXPROC __glewXQueryHyperpipeAttribSGIX;
+GLXEW_FUN_EXPORT PFNGLXQUERYHYPERPIPEBESTATTRIBSGIXPROC __glewXQueryHyperpipeBestAttribSGIX;
+GLXEW_FUN_EXPORT PFNGLXQUERYHYPERPIPECONFIGSGIXPROC __glewXQueryHyperpipeConfigSGIX;
+GLXEW_FUN_EXPORT PFNGLXQUERYHYPERPIPENETWORKSGIXPROC __glewXQueryHyperpipeNetworkSGIX;
+
+GLXEW_FUN_EXPORT PFNGLXCREATEGLXPBUFFERSGIXPROC __glewXCreateGLXPbufferSGIX;
+GLXEW_FUN_EXPORT PFNGLXDESTROYGLXPBUFFERSGIXPROC __glewXDestroyGLXPbufferSGIX;
+GLXEW_FUN_EXPORT PFNGLXGETSELECTEDEVENTSGIXPROC __glewXGetSelectedEventSGIX;
+GLXEW_FUN_EXPORT PFNGLXQUERYGLXPBUFFERSGIXPROC __glewXQueryGLXPbufferSGIX;
+GLXEW_FUN_EXPORT PFNGLXSELECTEVENTSGIXPROC __glewXSelectEventSGIX;
+
+GLXEW_FUN_EXPORT PFNGLXBINDSWAPBARRIERSGIXPROC __glewXBindSwapBarrierSGIX;
+GLXEW_FUN_EXPORT PFNGLXQUERYMAXSWAPBARRIERSSGIXPROC __glewXQueryMaxSwapBarriersSGIX;
+
+GLXEW_FUN_EXPORT PFNGLXJOINSWAPGROUPSGIXPROC __glewXJoinSwapGroupSGIX;
+
+GLXEW_FUN_EXPORT PFNGLXBINDCHANNELTOWINDOWSGIXPROC __glewXBindChannelToWindowSGIX;
+GLXEW_FUN_EXPORT PFNGLXCHANNELRECTSGIXPROC __glewXChannelRectSGIX;
+GLXEW_FUN_EXPORT PFNGLXCHANNELRECTSYNCSGIXPROC __glewXChannelRectSyncSGIX;
+GLXEW_FUN_EXPORT PFNGLXQUERYCHANNELDELTASSGIXPROC __glewXQueryChannelDeltasSGIX;
+GLXEW_FUN_EXPORT PFNGLXQUERYCHANNELRECTSGIXPROC __glewXQueryChannelRectSGIX;
+
+GLXEW_FUN_EXPORT PFNGLXCUSHIONSGIPROC __glewXCushionSGI;
+
+GLXEW_FUN_EXPORT PFNGLXGETCURRENTREADDRAWABLESGIPROC __glewXGetCurrentReadDrawableSGI;
+GLXEW_FUN_EXPORT PFNGLXMAKECURRENTREADSGIPROC __glewXMakeCurrentReadSGI;
+
+GLXEW_FUN_EXPORT PFNGLXSWAPINTERVALSGIPROC __glewXSwapIntervalSGI;
+
+GLXEW_FUN_EXPORT PFNGLXGETVIDEOSYNCSGIPROC __glewXGetVideoSyncSGI;
+GLXEW_FUN_EXPORT PFNGLXWAITVIDEOSYNCSGIPROC __glewXWaitVideoSyncSGI;
+
+GLXEW_FUN_EXPORT PFNGLXGETTRANSPARENTINDEXSUNPROC __glewXGetTransparentIndexSUN;
+
+GLXEW_FUN_EXPORT PFNGLXGETVIDEORESIZESUNPROC __glewXGetVideoResizeSUN;
+GLXEW_FUN_EXPORT PFNGLXVIDEORESIZESUNPROC __glewXVideoResizeSUN;
+
+#if defined(GLEW_MX)
+struct GLXEWContextStruct
+{
+#endif /* GLEW_MX */
+
+GLXEW_VAR_EXPORT GLboolean __GLXEW_VERSION_1_0;
+GLXEW_VAR_EXPORT GLboolean __GLXEW_VERSION_1_1;
+GLXEW_VAR_EXPORT GLboolean __GLXEW_VERSION_1_2;
+GLXEW_VAR_EXPORT GLboolean __GLXEW_VERSION_1_3;
+GLXEW_VAR_EXPORT GLboolean __GLXEW_VERSION_1_4;
+GLXEW_VAR_EXPORT GLboolean __GLXEW_3DFX_multisample;
+GLXEW_VAR_EXPORT GLboolean __GLXEW_AMD_gpu_association;
+GLXEW_VAR_EXPORT GLboolean __GLXEW_ARB_context_flush_control;
+GLXEW_VAR_EXPORT GLboolean __GLXEW_ARB_create_context;
+GLXEW_VAR_EXPORT GLboolean __GLXEW_ARB_create_context_profile;
+GLXEW_VAR_EXPORT GLboolean __GLXEW_ARB_create_context_robustness;
+GLXEW_VAR_EXPORT GLboolean __GLXEW_ARB_fbconfig_float;
+GLXEW_VAR_EXPORT GLboolean __GLXEW_ARB_framebuffer_sRGB;
+GLXEW_VAR_EXPORT GLboolean __GLXEW_ARB_get_proc_address;
+GLXEW_VAR_EXPORT GLboolean __GLXEW_ARB_multisample;
+GLXEW_VAR_EXPORT GLboolean __GLXEW_ARB_robustness_application_isolation;
+GLXEW_VAR_EXPORT GLboolean __GLXEW_ARB_robustness_share_group_isolation;
+GLXEW_VAR_EXPORT GLboolean __GLXEW_ARB_vertex_buffer_object;
+GLXEW_VAR_EXPORT GLboolean __GLXEW_ATI_pixel_format_float;
+GLXEW_VAR_EXPORT GLboolean __GLXEW_ATI_render_texture;
+GLXEW_VAR_EXPORT GLboolean __GLXEW_EXT_buffer_age;
+GLXEW_VAR_EXPORT GLboolean __GLXEW_EXT_create_context_es2_profile;
+GLXEW_VAR_EXPORT GLboolean __GLXEW_EXT_create_context_es_profile;
+GLXEW_VAR_EXPORT GLboolean __GLXEW_EXT_fbconfig_packed_float;
+GLXEW_VAR_EXPORT GLboolean __GLXEW_EXT_framebuffer_sRGB;
+GLXEW_VAR_EXPORT GLboolean __GLXEW_EXT_import_context;
+GLXEW_VAR_EXPORT GLboolean __GLXEW_EXT_scene_marker;
+GLXEW_VAR_EXPORT GLboolean __GLXEW_EXT_stereo_tree;
+GLXEW_VAR_EXPORT GLboolean __GLXEW_EXT_swap_control;
+GLXEW_VAR_EXPORT GLboolean __GLXEW_EXT_swap_control_tear;
+GLXEW_VAR_EXPORT GLboolean __GLXEW_EXT_texture_from_pixmap;
+GLXEW_VAR_EXPORT GLboolean __GLXEW_EXT_visual_info;
+GLXEW_VAR_EXPORT GLboolean __GLXEW_EXT_visual_rating;
+GLXEW_VAR_EXPORT GLboolean __GLXEW_INTEL_swap_event;
+GLXEW_VAR_EXPORT GLboolean __GLXEW_MESA_agp_offset;
+GLXEW_VAR_EXPORT GLboolean __GLXEW_MESA_copy_sub_buffer;
+GLXEW_VAR_EXPORT GLboolean __GLXEW_MESA_pixmap_colormap;
+GLXEW_VAR_EXPORT GLboolean __GLXEW_MESA_query_renderer;
+GLXEW_VAR_EXPORT GLboolean __GLXEW_MESA_release_buffers;
+GLXEW_VAR_EXPORT GLboolean __GLXEW_MESA_set_3dfx_mode;
+GLXEW_VAR_EXPORT GLboolean __GLXEW_MESA_swap_control;
+GLXEW_VAR_EXPORT GLboolean __GLXEW_NV_copy_buffer;
+GLXEW_VAR_EXPORT GLboolean __GLXEW_NV_copy_image;
+GLXEW_VAR_EXPORT GLboolean __GLXEW_NV_delay_before_swap;
+GLXEW_VAR_EXPORT GLboolean __GLXEW_NV_float_buffer;
+GLXEW_VAR_EXPORT GLboolean __GLXEW_NV_multisample_coverage;
+GLXEW_VAR_EXPORT GLboolean __GLXEW_NV_present_video;
+GLXEW_VAR_EXPORT GLboolean __GLXEW_NV_swap_group;
+GLXEW_VAR_EXPORT GLboolean __GLXEW_NV_vertex_array_range;
+GLXEW_VAR_EXPORT GLboolean __GLXEW_NV_video_capture;
+GLXEW_VAR_EXPORT GLboolean __GLXEW_NV_video_out;
+GLXEW_VAR_EXPORT GLboolean __GLXEW_OML_swap_method;
+GLXEW_VAR_EXPORT GLboolean __GLXEW_OML_sync_control;
+GLXEW_VAR_EXPORT GLboolean __GLXEW_SGIS_blended_overlay;
+GLXEW_VAR_EXPORT GLboolean __GLXEW_SGIS_color_range;
+GLXEW_VAR_EXPORT GLboolean __GLXEW_SGIS_multisample;
+GLXEW_VAR_EXPORT GLboolean __GLXEW_SGIS_shared_multisample;
+GLXEW_VAR_EXPORT GLboolean __GLXEW_SGIX_fbconfig;
+GLXEW_VAR_EXPORT GLboolean __GLXEW_SGIX_hyperpipe;
+GLXEW_VAR_EXPORT GLboolean __GLXEW_SGIX_pbuffer;
+GLXEW_VAR_EXPORT GLboolean __GLXEW_SGIX_swap_barrier;
+GLXEW_VAR_EXPORT GLboolean __GLXEW_SGIX_swap_group;
+GLXEW_VAR_EXPORT GLboolean __GLXEW_SGIX_video_resize;
+GLXEW_VAR_EXPORT GLboolean __GLXEW_SGIX_visual_select_group;
+GLXEW_VAR_EXPORT GLboolean __GLXEW_SGI_cushion;
+GLXEW_VAR_EXPORT GLboolean __GLXEW_SGI_make_current_read;
+GLXEW_VAR_EXPORT GLboolean __GLXEW_SGI_swap_control;
+GLXEW_VAR_EXPORT GLboolean __GLXEW_SGI_video_sync;
+GLXEW_VAR_EXPORT GLboolean __GLXEW_SUN_get_transparent_index;
+GLXEW_VAR_EXPORT GLboolean __GLXEW_SUN_video_resize;
+
+#ifdef GLEW_MX
+}; /* GLXEWContextStruct */
+#endif /* GLEW_MX */
+
+/* ------------------------------------------------------------------------ */
+
+#ifdef GLEW_MX
+
+typedef struct GLXEWContextStruct GLXEWContext;
+GLEWAPI GLenum GLEWAPIENTRY glxewContextInit (GLXEWContext *ctx);
+GLEWAPI GLboolean GLEWAPIENTRY glxewContextIsSupported (const GLXEWContext *ctx, const char *name);
+
+#define glxewInit() glxewContextInit(glxewGetContext())
+#define glxewIsSupported(x) glxewContextIsSupported(glxewGetContext(), x)
+
+#define GLXEW_GET_VAR(x) (*(const GLboolean*)&(glxewGetContext()->x))
+#define GLXEW_GET_FUN(x) x
+
+#else /* GLEW_MX */
+
+#define GLXEW_GET_VAR(x) (*(const GLboolean*)&x)
+#define GLXEW_GET_FUN(x) x
+
+GLEWAPI GLboolean GLEWAPIENTRY glxewIsSupported (const char *name);
+
+#endif /* GLEW_MX */
+
+GLEWAPI GLboolean GLEWAPIENTRY glxewGetExtension (const char *name);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __glxew_h__ */
diff --git a/include/GL/wglew.h b/include/GL/wglew.h
new file mode 100644 (file)
index 0000000..650b34c
--- /dev/null
@@ -0,0 +1,1452 @@
+/*
+** The OpenGL Extension Wrangler Library
+** Copyright (C) 2008-2015, Nigel Stewart <nigels[]users sourceforge net>
+** 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.
+*/
+
+/*
+** 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.
+*/
+
+#ifndef __wglew_h__
+#define __wglew_h__
+#define __WGLEW_H__
+
+#ifdef __wglext_h_
+#error wglext.h included before wglew.h
+#endif
+
+#define __wglext_h_
+
+#if !defined(WINAPI)
+#  ifndef WIN32_LEAN_AND_MEAN
+#    define WIN32_LEAN_AND_MEAN 1
+#  endif
+#include <windows.h>
+#  undef WIN32_LEAN_AND_MEAN
+#endif
+
+/*
+ * GLEW_STATIC needs to be set when using the static version.
+ * GLEW_BUILD is set when building the DLL version.
+ */
+#ifdef GLEW_STATIC
+#  define GLEWAPI extern
+#else
+#  ifdef GLEW_BUILD
+#    define GLEWAPI extern __declspec(dllexport)
+#  else
+#    define GLEWAPI extern __declspec(dllimport)
+#  endif
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* -------------------------- WGL_3DFX_multisample ------------------------- */
+
+#ifndef WGL_3DFX_multisample
+#define WGL_3DFX_multisample 1
+
+#define WGL_SAMPLE_BUFFERS_3DFX 0x2060
+#define WGL_SAMPLES_3DFX 0x2061
+
+#define WGLEW_3DFX_multisample WGLEW_GET_VAR(__WGLEW_3DFX_multisample)
+
+#endif /* WGL_3DFX_multisample */
+
+/* ------------------------- WGL_3DL_stereo_control ------------------------ */
+
+#ifndef WGL_3DL_stereo_control
+#define WGL_3DL_stereo_control 1
+
+#define WGL_STEREO_EMITTER_ENABLE_3DL 0x2055
+#define WGL_STEREO_EMITTER_DISABLE_3DL 0x2056
+#define WGL_STEREO_POLARITY_NORMAL_3DL 0x2057
+#define WGL_STEREO_POLARITY_INVERT_3DL 0x2058
+
+typedef BOOL (WINAPI * PFNWGLSETSTEREOEMITTERSTATE3DLPROC) (HDC hDC, UINT uState);
+
+#define wglSetStereoEmitterState3DL WGLEW_GET_FUN(__wglewSetStereoEmitterState3DL)
+
+#define WGLEW_3DL_stereo_control WGLEW_GET_VAR(__WGLEW_3DL_stereo_control)
+
+#endif /* WGL_3DL_stereo_control */
+
+/* ------------------------ WGL_AMD_gpu_association ------------------------ */
+
+#ifndef WGL_AMD_gpu_association
+#define WGL_AMD_gpu_association 1
+
+#define WGL_GPU_VENDOR_AMD 0x1F00
+#define WGL_GPU_RENDERER_STRING_AMD 0x1F01
+#define WGL_GPU_OPENGL_VERSION_STRING_AMD 0x1F02
+#define WGL_GPU_FASTEST_TARGET_GPUS_AMD 0x21A2
+#define WGL_GPU_RAM_AMD 0x21A3
+#define WGL_GPU_CLOCK_AMD 0x21A4
+#define WGL_GPU_NUM_PIPES_AMD 0x21A5
+#define WGL_GPU_NUM_SIMD_AMD 0x21A6
+#define WGL_GPU_NUM_RB_AMD 0x21A7
+#define WGL_GPU_NUM_SPI_AMD 0x21A8
+
+typedef VOID (WINAPI * PFNWGLBLITCONTEXTFRAMEBUFFERAMDPROC) (HGLRC dstCtx, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
+typedef HGLRC (WINAPI * PFNWGLCREATEASSOCIATEDCONTEXTAMDPROC) (UINT id);
+typedef HGLRC (WINAPI * PFNWGLCREATEASSOCIATEDCONTEXTATTRIBSAMDPROC) (UINT id, HGLRC hShareContext, const int* attribList);
+typedef BOOL (WINAPI * PFNWGLDELETEASSOCIATEDCONTEXTAMDPROC) (HGLRC hglrc);
+typedef UINT (WINAPI * PFNWGLGETCONTEXTGPUIDAMDPROC) (HGLRC hglrc);
+typedef HGLRC (WINAPI * PFNWGLGETCURRENTASSOCIATEDCONTEXTAMDPROC) (void);
+typedef UINT (WINAPI * PFNWGLGETGPUIDSAMDPROC) (UINT maxCount, UINT* ids);
+typedef INT (WINAPI * PFNWGLGETGPUINFOAMDPROC) (UINT id, INT property, GLenum dataType, UINT size, void* data);
+typedef BOOL (WINAPI * PFNWGLMAKEASSOCIATEDCONTEXTCURRENTAMDPROC) (HGLRC hglrc);
+
+#define wglBlitContextFramebufferAMD WGLEW_GET_FUN(__wglewBlitContextFramebufferAMD)
+#define wglCreateAssociatedContextAMD WGLEW_GET_FUN(__wglewCreateAssociatedContextAMD)
+#define wglCreateAssociatedContextAttribsAMD WGLEW_GET_FUN(__wglewCreateAssociatedContextAttribsAMD)
+#define wglDeleteAssociatedContextAMD WGLEW_GET_FUN(__wglewDeleteAssociatedContextAMD)
+#define wglGetContextGPUIDAMD WGLEW_GET_FUN(__wglewGetContextGPUIDAMD)
+#define wglGetCurrentAssociatedContextAMD WGLEW_GET_FUN(__wglewGetCurrentAssociatedContextAMD)
+#define wglGetGPUIDsAMD WGLEW_GET_FUN(__wglewGetGPUIDsAMD)
+#define wglGetGPUInfoAMD WGLEW_GET_FUN(__wglewGetGPUInfoAMD)
+#define wglMakeAssociatedContextCurrentAMD WGLEW_GET_FUN(__wglewMakeAssociatedContextCurrentAMD)
+
+#define WGLEW_AMD_gpu_association WGLEW_GET_VAR(__WGLEW_AMD_gpu_association)
+
+#endif /* WGL_AMD_gpu_association */
+
+/* ------------------------- WGL_ARB_buffer_region ------------------------- */
+
+#ifndef WGL_ARB_buffer_region
+#define WGL_ARB_buffer_region 1
+
+#define WGL_FRONT_COLOR_BUFFER_BIT_ARB 0x00000001
+#define WGL_BACK_COLOR_BUFFER_BIT_ARB 0x00000002
+#define WGL_DEPTH_BUFFER_BIT_ARB 0x00000004
+#define WGL_STENCIL_BUFFER_BIT_ARB 0x00000008
+
+typedef HANDLE (WINAPI * PFNWGLCREATEBUFFERREGIONARBPROC) (HDC hDC, int iLayerPlane, UINT uType);
+typedef VOID (WINAPI * PFNWGLDELETEBUFFERREGIONARBPROC) (HANDLE hRegion);
+typedef BOOL (WINAPI * PFNWGLRESTOREBUFFERREGIONARBPROC) (HANDLE hRegion, int x, int y, int width, int height, int xSrc, int ySrc);
+typedef BOOL (WINAPI * PFNWGLSAVEBUFFERREGIONARBPROC) (HANDLE hRegion, int x, int y, int width, int height);
+
+#define wglCreateBufferRegionARB WGLEW_GET_FUN(__wglewCreateBufferRegionARB)
+#define wglDeleteBufferRegionARB WGLEW_GET_FUN(__wglewDeleteBufferRegionARB)
+#define wglRestoreBufferRegionARB WGLEW_GET_FUN(__wglewRestoreBufferRegionARB)
+#define wglSaveBufferRegionARB WGLEW_GET_FUN(__wglewSaveBufferRegionARB)
+
+#define WGLEW_ARB_buffer_region WGLEW_GET_VAR(__WGLEW_ARB_buffer_region)
+
+#endif /* WGL_ARB_buffer_region */
+
+/* --------------------- WGL_ARB_context_flush_control --------------------- */
+
+#ifndef WGL_ARB_context_flush_control
+#define WGL_ARB_context_flush_control 1
+
+#define WGL_CONTEXT_RELEASE_BEHAVIOR_NONE_ARB 0x0000
+#define WGL_CONTEXT_RELEASE_BEHAVIOR_ARB 0x2097
+#define WGL_CONTEXT_RELEASE_BEHAVIOR_FLUSH_ARB 0x2098
+
+#define WGLEW_ARB_context_flush_control WGLEW_GET_VAR(__WGLEW_ARB_context_flush_control)
+
+#endif /* WGL_ARB_context_flush_control */
+
+/* ------------------------- WGL_ARB_create_context ------------------------ */
+
+#ifndef WGL_ARB_create_context
+#define WGL_ARB_create_context 1
+
+#define WGL_CONTEXT_DEBUG_BIT_ARB 0x0001
+#define WGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB 0x0002
+#define WGL_CONTEXT_MAJOR_VERSION_ARB 0x2091
+#define WGL_CONTEXT_MINOR_VERSION_ARB 0x2092
+#define WGL_CONTEXT_LAYER_PLANE_ARB 0x2093
+#define WGL_CONTEXT_FLAGS_ARB 0x2094
+#define ERROR_INVALID_VERSION_ARB 0x2095
+#define ERROR_INVALID_PROFILE_ARB 0x2096
+
+typedef HGLRC (WINAPI * PFNWGLCREATECONTEXTATTRIBSARBPROC) (HDC hDC, HGLRC hShareContext, const int* attribList);
+
+#define wglCreateContextAttribsARB WGLEW_GET_FUN(__wglewCreateContextAttribsARB)
+
+#define WGLEW_ARB_create_context WGLEW_GET_VAR(__WGLEW_ARB_create_context)
+
+#endif /* WGL_ARB_create_context */
+
+/* --------------------- WGL_ARB_create_context_profile -------------------- */
+
+#ifndef WGL_ARB_create_context_profile
+#define WGL_ARB_create_context_profile 1
+
+#define WGL_CONTEXT_CORE_PROFILE_BIT_ARB 0x00000001
+#define WGL_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB 0x00000002
+#define WGL_CONTEXT_PROFILE_MASK_ARB 0x9126
+
+#define WGLEW_ARB_create_context_profile WGLEW_GET_VAR(__WGLEW_ARB_create_context_profile)
+
+#endif /* WGL_ARB_create_context_profile */
+
+/* ------------------- WGL_ARB_create_context_robustness ------------------- */
+
+#ifndef WGL_ARB_create_context_robustness
+#define WGL_ARB_create_context_robustness 1
+
+#define WGL_CONTEXT_ROBUST_ACCESS_BIT_ARB 0x00000004
+#define WGL_LOSE_CONTEXT_ON_RESET_ARB 0x8252
+#define WGL_CONTEXT_RESET_NOTIFICATION_STRATEGY_ARB 0x8256
+#define WGL_NO_RESET_NOTIFICATION_ARB 0x8261
+
+#define WGLEW_ARB_create_context_robustness WGLEW_GET_VAR(__WGLEW_ARB_create_context_robustness)
+
+#endif /* WGL_ARB_create_context_robustness */
+
+/* ----------------------- WGL_ARB_extensions_string ----------------------- */
+
+#ifndef WGL_ARB_extensions_string
+#define WGL_ARB_extensions_string 1
+
+typedef const char* (WINAPI * PFNWGLGETEXTENSIONSSTRINGARBPROC) (HDC hdc);
+
+#define wglGetExtensionsStringARB WGLEW_GET_FUN(__wglewGetExtensionsStringARB)
+
+#define WGLEW_ARB_extensions_string WGLEW_GET_VAR(__WGLEW_ARB_extensions_string)
+
+#endif /* WGL_ARB_extensions_string */
+
+/* ------------------------ WGL_ARB_framebuffer_sRGB ----------------------- */
+
+#ifndef WGL_ARB_framebuffer_sRGB
+#define WGL_ARB_framebuffer_sRGB 1
+
+#define WGL_FRAMEBUFFER_SRGB_CAPABLE_ARB 0x20A9
+
+#define WGLEW_ARB_framebuffer_sRGB WGLEW_GET_VAR(__WGLEW_ARB_framebuffer_sRGB)
+
+#endif /* WGL_ARB_framebuffer_sRGB */
+
+/* ----------------------- WGL_ARB_make_current_read ----------------------- */
+
+#ifndef WGL_ARB_make_current_read
+#define WGL_ARB_make_current_read 1
+
+#define ERROR_INVALID_PIXEL_TYPE_ARB 0x2043
+#define ERROR_INCOMPATIBLE_DEVICE_CONTEXTS_ARB 0x2054
+
+typedef HDC (WINAPI * PFNWGLGETCURRENTREADDCARBPROC) (VOID);
+typedef BOOL (WINAPI * PFNWGLMAKECONTEXTCURRENTARBPROC) (HDC hDrawDC, HDC hReadDC, HGLRC hglrc);
+
+#define wglGetCurrentReadDCARB WGLEW_GET_FUN(__wglewGetCurrentReadDCARB)
+#define wglMakeContextCurrentARB WGLEW_GET_FUN(__wglewMakeContextCurrentARB)
+
+#define WGLEW_ARB_make_current_read WGLEW_GET_VAR(__WGLEW_ARB_make_current_read)
+
+#endif /* WGL_ARB_make_current_read */
+
+/* -------------------------- WGL_ARB_multisample -------------------------- */
+
+#ifndef WGL_ARB_multisample
+#define WGL_ARB_multisample 1
+
+#define WGL_SAMPLE_BUFFERS_ARB 0x2041
+#define WGL_SAMPLES_ARB 0x2042
+
+#define WGLEW_ARB_multisample WGLEW_GET_VAR(__WGLEW_ARB_multisample)
+
+#endif /* WGL_ARB_multisample */
+
+/* ---------------------------- WGL_ARB_pbuffer ---------------------------- */
+
+#ifndef WGL_ARB_pbuffer
+#define WGL_ARB_pbuffer 1
+
+#define WGL_DRAW_TO_PBUFFER_ARB 0x202D
+#define WGL_MAX_PBUFFER_PIXELS_ARB 0x202E
+#define WGL_MAX_PBUFFER_WIDTH_ARB 0x202F
+#define WGL_MAX_PBUFFER_HEIGHT_ARB 0x2030
+#define WGL_PBUFFER_LARGEST_ARB 0x2033
+#define WGL_PBUFFER_WIDTH_ARB 0x2034
+#define WGL_PBUFFER_HEIGHT_ARB 0x2035
+#define WGL_PBUFFER_LOST_ARB 0x2036
+
+DECLARE_HANDLE(HPBUFFERARB);
+
+typedef HPBUFFERARB (WINAPI * PFNWGLCREATEPBUFFERARBPROC) (HDC hDC, int iPixelFormat, int iWidth, int iHeight, const int* piAttribList);
+typedef BOOL (WINAPI * PFNWGLDESTROYPBUFFERARBPROC) (HPBUFFERARB hPbuffer);
+typedef HDC (WINAPI * PFNWGLGETPBUFFERDCARBPROC) (HPBUFFERARB hPbuffer);
+typedef BOOL (WINAPI * PFNWGLQUERYPBUFFERARBPROC) (HPBUFFERARB hPbuffer, int iAttribute, int* piValue);
+typedef int (WINAPI * PFNWGLRELEASEPBUFFERDCARBPROC) (HPBUFFERARB hPbuffer, HDC hDC);
+
+#define wglCreatePbufferARB WGLEW_GET_FUN(__wglewCreatePbufferARB)
+#define wglDestroyPbufferARB WGLEW_GET_FUN(__wglewDestroyPbufferARB)
+#define wglGetPbufferDCARB WGLEW_GET_FUN(__wglewGetPbufferDCARB)
+#define wglQueryPbufferARB WGLEW_GET_FUN(__wglewQueryPbufferARB)
+#define wglReleasePbufferDCARB WGLEW_GET_FUN(__wglewReleasePbufferDCARB)
+
+#define WGLEW_ARB_pbuffer WGLEW_GET_VAR(__WGLEW_ARB_pbuffer)
+
+#endif /* WGL_ARB_pbuffer */
+
+/* -------------------------- WGL_ARB_pixel_format ------------------------- */
+
+#ifndef WGL_ARB_pixel_format
+#define WGL_ARB_pixel_format 1
+
+#define WGL_NUMBER_PIXEL_FORMATS_ARB 0x2000
+#define WGL_DRAW_TO_WINDOW_ARB 0x2001
+#define WGL_DRAW_TO_BITMAP_ARB 0x2002
+#define WGL_ACCELERATION_ARB 0x2003
+#define WGL_NEED_PALETTE_ARB 0x2004
+#define WGL_NEED_SYSTEM_PALETTE_ARB 0x2005
+#define WGL_SWAP_LAYER_BUFFERS_ARB 0x2006
+#define WGL_SWAP_METHOD_ARB 0x2007
+#define WGL_NUMBER_OVERLAYS_ARB 0x2008
+#define WGL_NUMBER_UNDERLAYS_ARB 0x2009
+#define WGL_TRANSPARENT_ARB 0x200A
+#define WGL_SHARE_DEPTH_ARB 0x200C
+#define WGL_SHARE_STENCIL_ARB 0x200D
+#define WGL_SHARE_ACCUM_ARB 0x200E
+#define WGL_SUPPORT_GDI_ARB 0x200F
+#define WGL_SUPPORT_OPENGL_ARB 0x2010
+#define WGL_DOUBLE_BUFFER_ARB 0x2011
+#define WGL_STEREO_ARB 0x2012
+#define WGL_PIXEL_TYPE_ARB 0x2013
+#define WGL_COLOR_BITS_ARB 0x2014
+#define WGL_RED_BITS_ARB 0x2015
+#define WGL_RED_SHIFT_ARB 0x2016
+#define WGL_GREEN_BITS_ARB 0x2017
+#define WGL_GREEN_SHIFT_ARB 0x2018
+#define WGL_BLUE_BITS_ARB 0x2019
+#define WGL_BLUE_SHIFT_ARB 0x201A
+#define WGL_ALPHA_BITS_ARB 0x201B
+#define WGL_ALPHA_SHIFT_ARB 0x201C
+#define WGL_ACCUM_BITS_ARB 0x201D
+#define WGL_ACCUM_RED_BITS_ARB 0x201E
+#define WGL_ACCUM_GREEN_BITS_ARB 0x201F
+#define WGL_ACCUM_BLUE_BITS_ARB 0x2020
+#define WGL_ACCUM_ALPHA_BITS_ARB 0x2021
+#define WGL_DEPTH_BITS_ARB 0x2022
+#define WGL_STENCIL_BITS_ARB 0x2023
+#define WGL_AUX_BUFFERS_ARB 0x2024
+#define WGL_NO_ACCELERATION_ARB 0x2025
+#define WGL_GENERIC_ACCELERATION_ARB 0x2026
+#define WGL_FULL_ACCELERATION_ARB 0x2027
+#define WGL_SWAP_EXCHANGE_ARB 0x2028
+#define WGL_SWAP_COPY_ARB 0x2029
+#define WGL_SWAP_UNDEFINED_ARB 0x202A
+#define WGL_TYPE_RGBA_ARB 0x202B
+#define WGL_TYPE_COLORINDEX_ARB 0x202C
+#define WGL_TRANSPARENT_RED_VALUE_ARB 0x2037
+#define WGL_TRANSPARENT_GREEN_VALUE_ARB 0x2038
+#define WGL_TRANSPARENT_BLUE_VALUE_ARB 0x2039
+#define WGL_TRANSPARENT_ALPHA_VALUE_ARB 0x203A
+#define WGL_TRANSPARENT_INDEX_VALUE_ARB 0x203B
+
+typedef BOOL (WINAPI * PFNWGLCHOOSEPIXELFORMATARBPROC) (HDC hdc, const int* piAttribIList, const FLOAT *pfAttribFList, UINT nMaxFormats, int *piFormats, UINT *nNumFormats);
+typedef BOOL (WINAPI * PFNWGLGETPIXELFORMATATTRIBFVARBPROC) (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const int* piAttributes, FLOAT *pfValues);
+typedef BOOL (WINAPI * PFNWGLGETPIXELFORMATATTRIBIVARBPROC) (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const int* piAttributes, int *piValues);
+
+#define wglChoosePixelFormatARB WGLEW_GET_FUN(__wglewChoosePixelFormatARB)
+#define wglGetPixelFormatAttribfvARB WGLEW_GET_FUN(__wglewGetPixelFormatAttribfvARB)
+#define wglGetPixelFormatAttribivARB WGLEW_GET_FUN(__wglewGetPixelFormatAttribivARB)
+
+#define WGLEW_ARB_pixel_format WGLEW_GET_VAR(__WGLEW_ARB_pixel_format)
+
+#endif /* WGL_ARB_pixel_format */
+
+/* ----------------------- WGL_ARB_pixel_format_float ---------------------- */
+
+#ifndef WGL_ARB_pixel_format_float
+#define WGL_ARB_pixel_format_float 1
+
+#define WGL_TYPE_RGBA_FLOAT_ARB 0x21A0
+
+#define WGLEW_ARB_pixel_format_float WGLEW_GET_VAR(__WGLEW_ARB_pixel_format_float)
+
+#endif /* WGL_ARB_pixel_format_float */
+
+/* ------------------------- WGL_ARB_render_texture ------------------------ */
+
+#ifndef WGL_ARB_render_texture
+#define WGL_ARB_render_texture 1
+
+#define WGL_BIND_TO_TEXTURE_RGB_ARB 0x2070
+#define WGL_BIND_TO_TEXTURE_RGBA_ARB 0x2071
+#define WGL_TEXTURE_FORMAT_ARB 0x2072
+#define WGL_TEXTURE_TARGET_ARB 0x2073
+#define WGL_MIPMAP_TEXTURE_ARB 0x2074
+#define WGL_TEXTURE_RGB_ARB 0x2075
+#define WGL_TEXTURE_RGBA_ARB 0x2076
+#define WGL_NO_TEXTURE_ARB 0x2077
+#define WGL_TEXTURE_CUBE_MAP_ARB 0x2078
+#define WGL_TEXTURE_1D_ARB 0x2079
+#define WGL_TEXTURE_2D_ARB 0x207A
+#define WGL_MIPMAP_LEVEL_ARB 0x207B
+#define WGL_CUBE_MAP_FACE_ARB 0x207C
+#define WGL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB 0x207D
+#define WGL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB 0x207E
+#define WGL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB 0x207F
+#define WGL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB 0x2080
+#define WGL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB 0x2081
+#define WGL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB 0x2082
+#define WGL_FRONT_LEFT_ARB 0x2083
+#define WGL_FRONT_RIGHT_ARB 0x2084
+#define WGL_BACK_LEFT_ARB 0x2085
+#define WGL_BACK_RIGHT_ARB 0x2086
+#define WGL_AUX0_ARB 0x2087
+#define WGL_AUX1_ARB 0x2088
+#define WGL_AUX2_ARB 0x2089
+#define WGL_AUX3_ARB 0x208A
+#define WGL_AUX4_ARB 0x208B
+#define WGL_AUX5_ARB 0x208C
+#define WGL_AUX6_ARB 0x208D
+#define WGL_AUX7_ARB 0x208E
+#define WGL_AUX8_ARB 0x208F
+#define WGL_AUX9_ARB 0x2090
+
+typedef BOOL (WINAPI * PFNWGLBINDTEXIMAGEARBPROC) (HPBUFFERARB hPbuffer, int iBuffer);
+typedef BOOL (WINAPI * PFNWGLRELEASETEXIMAGEARBPROC) (HPBUFFERARB hPbuffer, int iBuffer);
+typedef BOOL (WINAPI * PFNWGLSETPBUFFERATTRIBARBPROC) (HPBUFFERARB hPbuffer, const int* piAttribList);
+
+#define wglBindTexImageARB WGLEW_GET_FUN(__wglewBindTexImageARB)
+#define wglReleaseTexImageARB WGLEW_GET_FUN(__wglewReleaseTexImageARB)
+#define wglSetPbufferAttribARB WGLEW_GET_FUN(__wglewSetPbufferAttribARB)
+
+#define WGLEW_ARB_render_texture WGLEW_GET_VAR(__WGLEW_ARB_render_texture)
+
+#endif /* WGL_ARB_render_texture */
+
+/* ---------------- WGL_ARB_robustness_application_isolation --------------- */
+
+#ifndef WGL_ARB_robustness_application_isolation
+#define WGL_ARB_robustness_application_isolation 1
+
+#define WGL_CONTEXT_RESET_ISOLATION_BIT_ARB 0x00000008
+
+#define WGLEW_ARB_robustness_application_isolation WGLEW_GET_VAR(__WGLEW_ARB_robustness_application_isolation)
+
+#endif /* WGL_ARB_robustness_application_isolation */
+
+/* ---------------- WGL_ARB_robustness_share_group_isolation --------------- */
+
+#ifndef WGL_ARB_robustness_share_group_isolation
+#define WGL_ARB_robustness_share_group_isolation 1
+
+#define WGL_CONTEXT_RESET_ISOLATION_BIT_ARB 0x00000008
+
+#define WGLEW_ARB_robustness_share_group_isolation WGLEW_GET_VAR(__WGLEW_ARB_robustness_share_group_isolation)
+
+#endif /* WGL_ARB_robustness_share_group_isolation */
+
+/* ----------------------- WGL_ATI_pixel_format_float ---------------------- */
+
+#ifndef WGL_ATI_pixel_format_float
+#define WGL_ATI_pixel_format_float 1
+
+#define WGL_TYPE_RGBA_FLOAT_ATI 0x21A0
+#define GL_RGBA_FLOAT_MODE_ATI 0x8820
+#define GL_COLOR_CLEAR_UNCLAMPED_VALUE_ATI 0x8835
+
+#define WGLEW_ATI_pixel_format_float WGLEW_GET_VAR(__WGLEW_ATI_pixel_format_float)
+
+#endif /* WGL_ATI_pixel_format_float */
+
+/* -------------------- WGL_ATI_render_texture_rectangle ------------------- */
+
+#ifndef WGL_ATI_render_texture_rectangle
+#define WGL_ATI_render_texture_rectangle 1
+
+#define WGL_TEXTURE_RECTANGLE_ATI 0x21A5
+
+#define WGLEW_ATI_render_texture_rectangle WGLEW_GET_VAR(__WGLEW_ATI_render_texture_rectangle)
+
+#endif /* WGL_ATI_render_texture_rectangle */
+
+/* ------------------- WGL_EXT_create_context_es2_profile ------------------ */
+
+#ifndef WGL_EXT_create_context_es2_profile
+#define WGL_EXT_create_context_es2_profile 1
+
+#define WGL_CONTEXT_ES2_PROFILE_BIT_EXT 0x00000004
+
+#define WGLEW_EXT_create_context_es2_profile WGLEW_GET_VAR(__WGLEW_EXT_create_context_es2_profile)
+
+#endif /* WGL_EXT_create_context_es2_profile */
+
+/* ------------------- WGL_EXT_create_context_es_profile ------------------- */
+
+#ifndef WGL_EXT_create_context_es_profile
+#define WGL_EXT_create_context_es_profile 1
+
+#define WGL_CONTEXT_ES_PROFILE_BIT_EXT 0x00000004
+
+#define WGLEW_EXT_create_context_es_profile WGLEW_GET_VAR(__WGLEW_EXT_create_context_es_profile)
+
+#endif /* WGL_EXT_create_context_es_profile */
+
+/* -------------------------- WGL_EXT_depth_float -------------------------- */
+
+#ifndef WGL_EXT_depth_float
+#define WGL_EXT_depth_float 1
+
+#define WGL_DEPTH_FLOAT_EXT 0x2040
+
+#define WGLEW_EXT_depth_float WGLEW_GET_VAR(__WGLEW_EXT_depth_float)
+
+#endif /* WGL_EXT_depth_float */
+
+/* ---------------------- WGL_EXT_display_color_table ---------------------- */
+
+#ifndef WGL_EXT_display_color_table
+#define WGL_EXT_display_color_table 1
+
+typedef GLboolean (WINAPI * PFNWGLBINDDISPLAYCOLORTABLEEXTPROC) (GLushort id);
+typedef GLboolean (WINAPI * PFNWGLCREATEDISPLAYCOLORTABLEEXTPROC) (GLushort id);
+typedef void (WINAPI * PFNWGLDESTROYDISPLAYCOLORTABLEEXTPROC) (GLushort id);
+typedef GLboolean (WINAPI * PFNWGLLOADDISPLAYCOLORTABLEEXTPROC) (GLushort* table, GLuint length);
+
+#define wglBindDisplayColorTableEXT WGLEW_GET_FUN(__wglewBindDisplayColorTableEXT)
+#define wglCreateDisplayColorTableEXT WGLEW_GET_FUN(__wglewCreateDisplayColorTableEXT)
+#define wglDestroyDisplayColorTableEXT WGLEW_GET_FUN(__wglewDestroyDisplayColorTableEXT)
+#define wglLoadDisplayColorTableEXT WGLEW_GET_FUN(__wglewLoadDisplayColorTableEXT)
+
+#define WGLEW_EXT_display_color_table WGLEW_GET_VAR(__WGLEW_EXT_display_color_table)
+
+#endif /* WGL_EXT_display_color_table */
+
+/* ----------------------- WGL_EXT_extensions_string ----------------------- */
+
+#ifndef WGL_EXT_extensions_string
+#define WGL_EXT_extensions_string 1
+
+typedef const char* (WINAPI * PFNWGLGETEXTENSIONSSTRINGEXTPROC) (void);
+
+#define wglGetExtensionsStringEXT WGLEW_GET_FUN(__wglewGetExtensionsStringEXT)
+
+#define WGLEW_EXT_extensions_string WGLEW_GET_VAR(__WGLEW_EXT_extensions_string)
+
+#endif /* WGL_EXT_extensions_string */
+
+/* ------------------------ WGL_EXT_framebuffer_sRGB ----------------------- */
+
+#ifndef WGL_EXT_framebuffer_sRGB
+#define WGL_EXT_framebuffer_sRGB 1
+
+#define WGL_FRAMEBUFFER_SRGB_CAPABLE_EXT 0x20A9
+
+#define WGLEW_EXT_framebuffer_sRGB WGLEW_GET_VAR(__WGLEW_EXT_framebuffer_sRGB)
+
+#endif /* WGL_EXT_framebuffer_sRGB */
+
+/* ----------------------- WGL_EXT_make_current_read ----------------------- */
+
+#ifndef WGL_EXT_make_current_read
+#define WGL_EXT_make_current_read 1
+
+#define ERROR_INVALID_PIXEL_TYPE_EXT 0x2043
+
+typedef HDC (WINAPI * PFNWGLGETCURRENTREADDCEXTPROC) (VOID);
+typedef BOOL (WINAPI * PFNWGLMAKECONTEXTCURRENTEXTPROC) (HDC hDrawDC, HDC hReadDC, HGLRC hglrc);
+
+#define wglGetCurrentReadDCEXT WGLEW_GET_FUN(__wglewGetCurrentReadDCEXT)
+#define wglMakeContextCurrentEXT WGLEW_GET_FUN(__wglewMakeContextCurrentEXT)
+
+#define WGLEW_EXT_make_current_read WGLEW_GET_VAR(__WGLEW_EXT_make_current_read)
+
+#endif /* WGL_EXT_make_current_read */
+
+/* -------------------------- WGL_EXT_multisample -------------------------- */
+
+#ifndef WGL_EXT_multisample
+#define WGL_EXT_multisample 1
+
+#define WGL_SAMPLE_BUFFERS_EXT 0x2041
+#define WGL_SAMPLES_EXT 0x2042
+
+#define WGLEW_EXT_multisample WGLEW_GET_VAR(__WGLEW_EXT_multisample)
+
+#endif /* WGL_EXT_multisample */
+
+/* ---------------------------- WGL_EXT_pbuffer ---------------------------- */
+
+#ifndef WGL_EXT_pbuffer
+#define WGL_EXT_pbuffer 1
+
+#define WGL_DRAW_TO_PBUFFER_EXT 0x202D
+#define WGL_MAX_PBUFFER_PIXELS_EXT 0x202E
+#define WGL_MAX_PBUFFER_WIDTH_EXT 0x202F
+#define WGL_MAX_PBUFFER_HEIGHT_EXT 0x2030
+#define WGL_OPTIMAL_PBUFFER_WIDTH_EXT 0x2031
+#define WGL_OPTIMAL_PBUFFER_HEIGHT_EXT 0x2032
+#define WGL_PBUFFER_LARGEST_EXT 0x2033
+#define WGL_PBUFFER_WIDTH_EXT 0x2034
+#define WGL_PBUFFER_HEIGHT_EXT 0x2035
+
+DECLARE_HANDLE(HPBUFFEREXT);
+
+typedef HPBUFFEREXT (WINAPI * PFNWGLCREATEPBUFFEREXTPROC) (HDC hDC, int iPixelFormat, int iWidth, int iHeight, const int* piAttribList);
+typedef BOOL (WINAPI * PFNWGLDESTROYPBUFFEREXTPROC) (HPBUFFEREXT hPbuffer);
+typedef HDC (WINAPI * PFNWGLGETPBUFFERDCEXTPROC) (HPBUFFEREXT hPbuffer);
+typedef BOOL (WINAPI * PFNWGLQUERYPBUFFEREXTPROC) (HPBUFFEREXT hPbuffer, int iAttribute, int* piValue);
+typedef int (WINAPI * PFNWGLRELEASEPBUFFERDCEXTPROC) (HPBUFFEREXT hPbuffer, HDC hDC);
+
+#define wglCreatePbufferEXT WGLEW_GET_FUN(__wglewCreatePbufferEXT)
+#define wglDestroyPbufferEXT WGLEW_GET_FUN(__wglewDestroyPbufferEXT)
+#define wglGetPbufferDCEXT WGLEW_GET_FUN(__wglewGetPbufferDCEXT)
+#define wglQueryPbufferEXT WGLEW_GET_FUN(__wglewQueryPbufferEXT)
+#define wglReleasePbufferDCEXT WGLEW_GET_FUN(__wglewReleasePbufferDCEXT)
+
+#define WGLEW_EXT_pbuffer WGLEW_GET_VAR(__WGLEW_EXT_pbuffer)
+
+#endif /* WGL_EXT_pbuffer */
+
+/* -------------------------- WGL_EXT_pixel_format ------------------------- */
+
+#ifndef WGL_EXT_pixel_format
+#define WGL_EXT_pixel_format 1
+
+#define WGL_NUMBER_PIXEL_FORMATS_EXT 0x2000
+#define WGL_DRAW_TO_WINDOW_EXT 0x2001
+#define WGL_DRAW_TO_BITMAP_EXT 0x2002
+#define WGL_ACCELERATION_EXT 0x2003
+#define WGL_NEED_PALETTE_EXT 0x2004
+#define WGL_NEED_SYSTEM_PALETTE_EXT 0x2005
+#define WGL_SWAP_LAYER_BUFFERS_EXT 0x2006
+#define WGL_SWAP_METHOD_EXT 0x2007
+#define WGL_NUMBER_OVERLAYS_EXT 0x2008
+#define WGL_NUMBER_UNDERLAYS_EXT 0x2009
+#define WGL_TRANSPARENT_EXT 0x200A
+#define WGL_TRANSPARENT_VALUE_EXT 0x200B
+#define WGL_SHARE_DEPTH_EXT 0x200C
+#define WGL_SHARE_STENCIL_EXT 0x200D
+#define WGL_SHARE_ACCUM_EXT 0x200E
+#define WGL_SUPPORT_GDI_EXT 0x200F
+#define WGL_SUPPORT_OPENGL_EXT 0x2010
+#define WGL_DOUBLE_BUFFER_EXT 0x2011
+#define WGL_STEREO_EXT 0x2012
+#define WGL_PIXEL_TYPE_EXT 0x2013
+#define WGL_COLOR_BITS_EXT 0x2014
+#define WGL_RED_BITS_EXT 0x2015
+#define WGL_RED_SHIFT_EXT 0x2016
+#define WGL_GREEN_BITS_EXT 0x2017
+#define WGL_GREEN_SHIFT_EXT 0x2018
+#define WGL_BLUE_BITS_EXT 0x2019
+#define WGL_BLUE_SHIFT_EXT 0x201A
+#define WGL_ALPHA_BITS_EXT 0x201B
+#define WGL_ALPHA_SHIFT_EXT 0x201C
+#define WGL_ACCUM_BITS_EXT 0x201D
+#define WGL_ACCUM_RED_BITS_EXT 0x201E
+#define WGL_ACCUM_GREEN_BITS_EXT 0x201F
+#define WGL_ACCUM_BLUE_BITS_EXT 0x2020
+#define WGL_ACCUM_ALPHA_BITS_EXT 0x2021
+#define WGL_DEPTH_BITS_EXT 0x2022
+#define WGL_STENCIL_BITS_EXT 0x2023
+#define WGL_AUX_BUFFERS_EXT 0x2024
+#define WGL_NO_ACCELERATION_EXT 0x2025
+#define WGL_GENERIC_ACCELERATION_EXT 0x2026
+#define WGL_FULL_ACCELERATION_EXT 0x2027
+#define WGL_SWAP_EXCHANGE_EXT 0x2028
+#define WGL_SWAP_COPY_EXT 0x2029
+#define WGL_SWAP_UNDEFINED_EXT 0x202A
+#define WGL_TYPE_RGBA_EXT 0x202B
+#define WGL_TYPE_COLORINDEX_EXT 0x202C
+
+typedef BOOL (WINAPI * PFNWGLCHOOSEPIXELFORMATEXTPROC) (HDC hdc, const int* piAttribIList, const FLOAT *pfAttribFList, UINT nMaxFormats, int *piFormats, UINT *nNumFormats);
+typedef BOOL (WINAPI * PFNWGLGETPIXELFORMATATTRIBFVEXTPROC) (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, int* piAttributes, FLOAT *pfValues);
+typedef BOOL (WINAPI * PFNWGLGETPIXELFORMATATTRIBIVEXTPROC) (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, int* piAttributes, int *piValues);
+
+#define wglChoosePixelFormatEXT WGLEW_GET_FUN(__wglewChoosePixelFormatEXT)
+#define wglGetPixelFormatAttribfvEXT WGLEW_GET_FUN(__wglewGetPixelFormatAttribfvEXT)
+#define wglGetPixelFormatAttribivEXT WGLEW_GET_FUN(__wglewGetPixelFormatAttribivEXT)
+
+#define WGLEW_EXT_pixel_format WGLEW_GET_VAR(__WGLEW_EXT_pixel_format)
+
+#endif /* WGL_EXT_pixel_format */
+
+/* ------------------- WGL_EXT_pixel_format_packed_float ------------------- */
+
+#ifndef WGL_EXT_pixel_format_packed_float
+#define WGL_EXT_pixel_format_packed_float 1
+
+#define WGL_TYPE_RGBA_UNSIGNED_FLOAT_EXT 0x20A8
+
+#define WGLEW_EXT_pixel_format_packed_float WGLEW_GET_VAR(__WGLEW_EXT_pixel_format_packed_float)
+
+#endif /* WGL_EXT_pixel_format_packed_float */
+
+/* -------------------------- WGL_EXT_swap_control ------------------------- */
+
+#ifndef WGL_EXT_swap_control
+#define WGL_EXT_swap_control 1
+
+typedef int (WINAPI * PFNWGLGETSWAPINTERVALEXTPROC) (void);
+typedef BOOL (WINAPI * PFNWGLSWAPINTERVALEXTPROC) (int interval);
+
+#define wglGetSwapIntervalEXT WGLEW_GET_FUN(__wglewGetSwapIntervalEXT)
+#define wglSwapIntervalEXT WGLEW_GET_FUN(__wglewSwapIntervalEXT)
+
+#define WGLEW_EXT_swap_control WGLEW_GET_VAR(__WGLEW_EXT_swap_control)
+
+#endif /* WGL_EXT_swap_control */
+
+/* ----------------------- WGL_EXT_swap_control_tear ----------------------- */
+
+#ifndef WGL_EXT_swap_control_tear
+#define WGL_EXT_swap_control_tear 1
+
+#define WGLEW_EXT_swap_control_tear WGLEW_GET_VAR(__WGLEW_EXT_swap_control_tear)
+
+#endif /* WGL_EXT_swap_control_tear */
+
+/* --------------------- WGL_I3D_digital_video_control --------------------- */
+
+#ifndef WGL_I3D_digital_video_control
+#define WGL_I3D_digital_video_control 1
+
+#define WGL_DIGITAL_VIDEO_CURSOR_ALPHA_FRAMEBUFFER_I3D 0x2050
+#define WGL_DIGITAL_VIDEO_CURSOR_ALPHA_VALUE_I3D 0x2051
+#define WGL_DIGITAL_VIDEO_CURSOR_INCLUDED_I3D 0x2052
+#define WGL_DIGITAL_VIDEO_GAMMA_CORRECTED_I3D 0x2053
+
+typedef BOOL (WINAPI * PFNWGLGETDIGITALVIDEOPARAMETERSI3DPROC) (HDC hDC, int iAttribute, int* piValue);
+typedef BOOL (WINAPI * PFNWGLSETDIGITALVIDEOPARAMETERSI3DPROC) (HDC hDC, int iAttribute, const int* piValue);
+
+#define wglGetDigitalVideoParametersI3D WGLEW_GET_FUN(__wglewGetDigitalVideoParametersI3D)
+#define wglSetDigitalVideoParametersI3D WGLEW_GET_FUN(__wglewSetDigitalVideoParametersI3D)
+
+#define WGLEW_I3D_digital_video_control WGLEW_GET_VAR(__WGLEW_I3D_digital_video_control)
+
+#endif /* WGL_I3D_digital_video_control */
+
+/* ----------------------------- WGL_I3D_gamma ----------------------------- */
+
+#ifndef WGL_I3D_gamma
+#define WGL_I3D_gamma 1
+
+#define WGL_GAMMA_TABLE_SIZE_I3D 0x204E
+#define WGL_GAMMA_EXCLUDE_DESKTOP_I3D 0x204F
+
+typedef BOOL (WINAPI * PFNWGLGETGAMMATABLEI3DPROC) (HDC hDC, int iEntries, USHORT* puRed, USHORT *puGreen, USHORT *puBlue);
+typedef BOOL (WINAPI * PFNWGLGETGAMMATABLEPARAMETERSI3DPROC) (HDC hDC, int iAttribute, int* piValue);
+typedef BOOL (WINAPI * PFNWGLSETGAMMATABLEI3DPROC) (HDC hDC, int iEntries, const USHORT* puRed, const USHORT *puGreen, const USHORT *puBlue);
+typedef BOOL (WINAPI * PFNWGLSETGAMMATABLEPARAMETERSI3DPROC) (HDC hDC, int iAttribute, const int* piValue);
+
+#define wglGetGammaTableI3D WGLEW_GET_FUN(__wglewGetGammaTableI3D)
+#define wglGetGammaTableParametersI3D WGLEW_GET_FUN(__wglewGetGammaTableParametersI3D)
+#define wglSetGammaTableI3D WGLEW_GET_FUN(__wglewSetGammaTableI3D)
+#define wglSetGammaTableParametersI3D WGLEW_GET_FUN(__wglewSetGammaTableParametersI3D)
+
+#define WGLEW_I3D_gamma WGLEW_GET_VAR(__WGLEW_I3D_gamma)
+
+#endif /* WGL_I3D_gamma */
+
+/* ---------------------------- WGL_I3D_genlock ---------------------------- */
+
+#ifndef WGL_I3D_genlock
+#define WGL_I3D_genlock 1
+
+#define WGL_GENLOCK_SOURCE_MULTIVIEW_I3D 0x2044
+#define WGL_GENLOCK_SOURCE_EXTERNAL_SYNC_I3D 0x2045
+#define WGL_GENLOCK_SOURCE_EXTERNAL_FIELD_I3D 0x2046
+#define WGL_GENLOCK_SOURCE_EXTERNAL_TTL_I3D 0x2047
+#define WGL_GENLOCK_SOURCE_DIGITAL_SYNC_I3D 0x2048
+#define WGL_GENLOCK_SOURCE_DIGITAL_FIELD_I3D 0x2049
+#define WGL_GENLOCK_SOURCE_EDGE_FALLING_I3D 0x204A
+#define WGL_GENLOCK_SOURCE_EDGE_RISING_I3D 0x204B
+#define WGL_GENLOCK_SOURCE_EDGE_BOTH_I3D 0x204C
+
+typedef BOOL (WINAPI * PFNWGLDISABLEGENLOCKI3DPROC) (HDC hDC);
+typedef BOOL (WINAPI * PFNWGLENABLEGENLOCKI3DPROC) (HDC hDC);
+typedef BOOL (WINAPI * PFNWGLGENLOCKSAMPLERATEI3DPROC) (HDC hDC, UINT uRate);
+typedef BOOL (WINAPI * PFNWGLGENLOCKSOURCEDELAYI3DPROC) (HDC hDC, UINT uDelay);
+typedef BOOL (WINAPI * PFNWGLGENLOCKSOURCEEDGEI3DPROC) (HDC hDC, UINT uEdge);
+typedef BOOL (WINAPI * PFNWGLGENLOCKSOURCEI3DPROC) (HDC hDC, UINT uSource);
+typedef BOOL (WINAPI * PFNWGLGETGENLOCKSAMPLERATEI3DPROC) (HDC hDC, UINT* uRate);
+typedef BOOL (WINAPI * PFNWGLGETGENLOCKSOURCEDELAYI3DPROC) (HDC hDC, UINT* uDelay);
+typedef BOOL (WINAPI * PFNWGLGETGENLOCKSOURCEEDGEI3DPROC) (HDC hDC, UINT* uEdge);
+typedef BOOL (WINAPI * PFNWGLGETGENLOCKSOURCEI3DPROC) (HDC hDC, UINT* uSource);
+typedef BOOL (WINAPI * PFNWGLISENABLEDGENLOCKI3DPROC) (HDC hDC, BOOL* pFlag);
+typedef BOOL (WINAPI * PFNWGLQUERYGENLOCKMAXSOURCEDELAYI3DPROC) (HDC hDC, UINT* uMaxLineDelay, UINT *uMaxPixelDelay);
+
+#define wglDisableGenlockI3D WGLEW_GET_FUN(__wglewDisableGenlockI3D)
+#define wglEnableGenlockI3D WGLEW_GET_FUN(__wglewEnableGenlockI3D)
+#define wglGenlockSampleRateI3D WGLEW_GET_FUN(__wglewGenlockSampleRateI3D)
+#define wglGenlockSourceDelayI3D WGLEW_GET_FUN(__wglewGenlockSourceDelayI3D)
+#define wglGenlockSourceEdgeI3D WGLEW_GET_FUN(__wglewGenlockSourceEdgeI3D)
+#define wglGenlockSourceI3D WGLEW_GET_FUN(__wglewGenlockSourceI3D)
+#define wglGetGenlockSampleRateI3D WGLEW_GET_FUN(__wglewGetGenlockSampleRateI3D)
+#define wglGetGenlockSourceDelayI3D WGLEW_GET_FUN(__wglewGetGenlockSourceDelayI3D)
+#define wglGetGenlockSourceEdgeI3D WGLEW_GET_FUN(__wglewGetGenlockSourceEdgeI3D)
+#define wglGetGenlockSourceI3D WGLEW_GET_FUN(__wglewGetGenlockSourceI3D)
+#define wglIsEnabledGenlockI3D WGLEW_GET_FUN(__wglewIsEnabledGenlockI3D)
+#define wglQueryGenlockMaxSourceDelayI3D WGLEW_GET_FUN(__wglewQueryGenlockMaxSourceDelayI3D)
+
+#define WGLEW_I3D_genlock WGLEW_GET_VAR(__WGLEW_I3D_genlock)
+
+#endif /* WGL_I3D_genlock */
+
+/* -------------------------- WGL_I3D_image_buffer ------------------------- */
+
+#ifndef WGL_I3D_image_buffer
+#define WGL_I3D_image_buffer 1
+
+#define WGL_IMAGE_BUFFER_MIN_ACCESS_I3D 0x00000001
+#define WGL_IMAGE_BUFFER_LOCK_I3D 0x00000002
+
+typedef BOOL (WINAPI * PFNWGLASSOCIATEIMAGEBUFFEREVENTSI3DPROC) (HDC hdc, HANDLE* pEvent, LPVOID *pAddress, DWORD *pSize, UINT count);
+typedef LPVOID (WINAPI * PFNWGLCREATEIMAGEBUFFERI3DPROC) (HDC hDC, DWORD dwSize, UINT uFlags);
+typedef BOOL (WINAPI * PFNWGLDESTROYIMAGEBUFFERI3DPROC) (HDC hDC, LPVOID pAddress);
+typedef BOOL (WINAPI * PFNWGLRELEASEIMAGEBUFFEREVENTSI3DPROC) (HDC hdc, LPVOID* pAddress, UINT count);
+
+#define wglAssociateImageBufferEventsI3D WGLEW_GET_FUN(__wglewAssociateImageBufferEventsI3D)
+#define wglCreateImageBufferI3D WGLEW_GET_FUN(__wglewCreateImageBufferI3D)
+#define wglDestroyImageBufferI3D WGLEW_GET_FUN(__wglewDestroyImageBufferI3D)
+#define wglReleaseImageBufferEventsI3D WGLEW_GET_FUN(__wglewReleaseImageBufferEventsI3D)
+
+#define WGLEW_I3D_image_buffer WGLEW_GET_VAR(__WGLEW_I3D_image_buffer)
+
+#endif /* WGL_I3D_image_buffer */
+
+/* ------------------------ WGL_I3D_swap_frame_lock ------------------------ */
+
+#ifndef WGL_I3D_swap_frame_lock
+#define WGL_I3D_swap_frame_lock 1
+
+typedef BOOL (WINAPI * PFNWGLDISABLEFRAMELOCKI3DPROC) (VOID);
+typedef BOOL (WINAPI * PFNWGLENABLEFRAMELOCKI3DPROC) (VOID);
+typedef BOOL (WINAPI * PFNWGLISENABLEDFRAMELOCKI3DPROC) (BOOL* pFlag);
+typedef BOOL (WINAPI * PFNWGLQUERYFRAMELOCKMASTERI3DPROC) (BOOL* pFlag);
+
+#define wglDisableFrameLockI3D WGLEW_GET_FUN(__wglewDisableFrameLockI3D)
+#define wglEnableFrameLockI3D WGLEW_GET_FUN(__wglewEnableFrameLockI3D)
+#define wglIsEnabledFrameLockI3D WGLEW_GET_FUN(__wglewIsEnabledFrameLockI3D)
+#define wglQueryFrameLockMasterI3D WGLEW_GET_FUN(__wglewQueryFrameLockMasterI3D)
+
+#define WGLEW_I3D_swap_frame_lock WGLEW_GET_VAR(__WGLEW_I3D_swap_frame_lock)
+
+#endif /* WGL_I3D_swap_frame_lock */
+
+/* ------------------------ WGL_I3D_swap_frame_usage ----------------------- */
+
+#ifndef WGL_I3D_swap_frame_usage
+#define WGL_I3D_swap_frame_usage 1
+
+typedef BOOL (WINAPI * PFNWGLBEGINFRAMETRACKINGI3DPROC) (void);
+typedef BOOL (WINAPI * PFNWGLENDFRAMETRACKINGI3DPROC) (void);
+typedef BOOL (WINAPI * PFNWGLGETFRAMEUSAGEI3DPROC) (float* pUsage);
+typedef BOOL (WINAPI * PFNWGLQUERYFRAMETRACKINGI3DPROC) (DWORD* pFrameCount, DWORD *pMissedFrames, float *pLastMissedUsage);
+
+#define wglBeginFrameTrackingI3D WGLEW_GET_FUN(__wglewBeginFrameTrackingI3D)
+#define wglEndFrameTrackingI3D WGLEW_GET_FUN(__wglewEndFrameTrackingI3D)
+#define wglGetFrameUsageI3D WGLEW_GET_FUN(__wglewGetFrameUsageI3D)
+#define wglQueryFrameTrackingI3D WGLEW_GET_FUN(__wglewQueryFrameTrackingI3D)
+
+#define WGLEW_I3D_swap_frame_usage WGLEW_GET_VAR(__WGLEW_I3D_swap_frame_usage)
+
+#endif /* WGL_I3D_swap_frame_usage */
+
+/* --------------------------- WGL_NV_DX_interop --------------------------- */
+
+#ifndef WGL_NV_DX_interop
+#define WGL_NV_DX_interop 1
+
+#define WGL_ACCESS_READ_ONLY_NV 0x0000
+#define WGL_ACCESS_READ_WRITE_NV 0x0001
+#define WGL_ACCESS_WRITE_DISCARD_NV 0x0002
+
+typedef BOOL (WINAPI * PFNWGLDXCLOSEDEVICENVPROC) (HANDLE hDevice);
+typedef BOOL (WINAPI * PFNWGLDXLOCKOBJECTSNVPROC) (HANDLE hDevice, GLint count, HANDLE* hObjects);
+typedef BOOL (WINAPI * PFNWGLDXOBJECTACCESSNVPROC) (HANDLE hObject, GLenum access);
+typedef HANDLE (WINAPI * PFNWGLDXOPENDEVICENVPROC) (void* dxDevice);
+typedef HANDLE (WINAPI * PFNWGLDXREGISTEROBJECTNVPROC) (HANDLE hDevice, void* dxObject, GLuint name, GLenum type, GLenum access);
+typedef BOOL (WINAPI * PFNWGLDXSETRESOURCESHAREHANDLENVPROC) (void* dxObject, HANDLE shareHandle);
+typedef BOOL (WINAPI * PFNWGLDXUNLOCKOBJECTSNVPROC) (HANDLE hDevice, GLint count, HANDLE* hObjects);
+typedef BOOL (WINAPI * PFNWGLDXUNREGISTEROBJECTNVPROC) (HANDLE hDevice, HANDLE hObject);
+
+#define wglDXCloseDeviceNV WGLEW_GET_FUN(__wglewDXCloseDeviceNV)
+#define wglDXLockObjectsNV WGLEW_GET_FUN(__wglewDXLockObjectsNV)
+#define wglDXObjectAccessNV WGLEW_GET_FUN(__wglewDXObjectAccessNV)
+#define wglDXOpenDeviceNV WGLEW_GET_FUN(__wglewDXOpenDeviceNV)
+#define wglDXRegisterObjectNV WGLEW_GET_FUN(__wglewDXRegisterObjectNV)
+#define wglDXSetResourceShareHandleNV WGLEW_GET_FUN(__wglewDXSetResourceShareHandleNV)
+#define wglDXUnlockObjectsNV WGLEW_GET_FUN(__wglewDXUnlockObjectsNV)
+#define wglDXUnregisterObjectNV WGLEW_GET_FUN(__wglewDXUnregisterObjectNV)
+
+#define WGLEW_NV_DX_interop WGLEW_GET_VAR(__WGLEW_NV_DX_interop)
+
+#endif /* WGL_NV_DX_interop */
+
+/* --------------------------- WGL_NV_DX_interop2 -------------------------- */
+
+#ifndef WGL_NV_DX_interop2
+#define WGL_NV_DX_interop2 1
+
+#define WGLEW_NV_DX_interop2 WGLEW_GET_VAR(__WGLEW_NV_DX_interop2)
+
+#endif /* WGL_NV_DX_interop2 */
+
+/* --------------------------- WGL_NV_copy_image --------------------------- */
+
+#ifndef WGL_NV_copy_image
+#define WGL_NV_copy_image 1
+
+typedef BOOL (WINAPI * PFNWGLCOPYIMAGESUBDATANVPROC) (HGLRC hSrcRC, GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, HGLRC hDstRC, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei width, GLsizei height, GLsizei depth);
+
+#define wglCopyImageSubDataNV WGLEW_GET_FUN(__wglewCopyImageSubDataNV)
+
+#define WGLEW_NV_copy_image WGLEW_GET_VAR(__WGLEW_NV_copy_image)
+
+#endif /* WGL_NV_copy_image */
+
+/* ------------------------ WGL_NV_delay_before_swap ----------------------- */
+
+#ifndef WGL_NV_delay_before_swap
+#define WGL_NV_delay_before_swap 1
+
+typedef BOOL (WINAPI * PFNWGLDELAYBEFORESWAPNVPROC) (HDC hDC, GLfloat seconds);
+
+#define wglDelayBeforeSwapNV WGLEW_GET_FUN(__wglewDelayBeforeSwapNV)
+
+#define WGLEW_NV_delay_before_swap WGLEW_GET_VAR(__WGLEW_NV_delay_before_swap)
+
+#endif /* WGL_NV_delay_before_swap */
+
+/* -------------------------- WGL_NV_float_buffer -------------------------- */
+
+#ifndef WGL_NV_float_buffer
+#define WGL_NV_float_buffer 1
+
+#define WGL_FLOAT_COMPONENTS_NV 0x20B0
+#define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_R_NV 0x20B1
+#define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RG_NV 0x20B2
+#define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RGB_NV 0x20B3
+#define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RGBA_NV 0x20B4
+#define WGL_TEXTURE_FLOAT_R_NV 0x20B5
+#define WGL_TEXTURE_FLOAT_RG_NV 0x20B6
+#define WGL_TEXTURE_FLOAT_RGB_NV 0x20B7
+#define WGL_TEXTURE_FLOAT_RGBA_NV 0x20B8
+
+#define WGLEW_NV_float_buffer WGLEW_GET_VAR(__WGLEW_NV_float_buffer)
+
+#endif /* WGL_NV_float_buffer */
+
+/* -------------------------- WGL_NV_gpu_affinity -------------------------- */
+
+#ifndef WGL_NV_gpu_affinity
+#define WGL_NV_gpu_affinity 1
+
+#define WGL_ERROR_INCOMPATIBLE_AFFINITY_MASKS_NV 0x20D0
+#define WGL_ERROR_MISSING_AFFINITY_MASK_NV 0x20D1
+
+DECLARE_HANDLE(HGPUNV);
+typedef struct _GPU_DEVICE {
+  DWORD cb; 
+  CHAR DeviceName[32]; 
+  CHAR DeviceString[128]; 
+  DWORD Flags; 
+  RECT rcVirtualScreen; 
+} GPU_DEVICE, *PGPU_DEVICE;
+
+typedef HDC (WINAPI * PFNWGLCREATEAFFINITYDCNVPROC) (const HGPUNV *phGpuList);
+typedef BOOL (WINAPI * PFNWGLDELETEDCNVPROC) (HDC hdc);
+typedef BOOL (WINAPI * PFNWGLENUMGPUDEVICESNVPROC) (HGPUNV hGpu, UINT iDeviceIndex, PGPU_DEVICE lpGpuDevice);
+typedef BOOL (WINAPI * PFNWGLENUMGPUSFROMAFFINITYDCNVPROC) (HDC hAffinityDC, UINT iGpuIndex, HGPUNV *hGpu);
+typedef BOOL (WINAPI * PFNWGLENUMGPUSNVPROC) (UINT iGpuIndex, HGPUNV *phGpu);
+
+#define wglCreateAffinityDCNV WGLEW_GET_FUN(__wglewCreateAffinityDCNV)
+#define wglDeleteDCNV WGLEW_GET_FUN(__wglewDeleteDCNV)
+#define wglEnumGpuDevicesNV WGLEW_GET_FUN(__wglewEnumGpuDevicesNV)
+#define wglEnumGpusFromAffinityDCNV WGLEW_GET_FUN(__wglewEnumGpusFromAffinityDCNV)
+#define wglEnumGpusNV WGLEW_GET_FUN(__wglewEnumGpusNV)
+
+#define WGLEW_NV_gpu_affinity WGLEW_GET_VAR(__WGLEW_NV_gpu_affinity)
+
+#endif /* WGL_NV_gpu_affinity */
+
+/* ---------------------- WGL_NV_multisample_coverage ---------------------- */
+
+#ifndef WGL_NV_multisample_coverage
+#define WGL_NV_multisample_coverage 1
+
+#define WGL_COVERAGE_SAMPLES_NV 0x2042
+#define WGL_COLOR_SAMPLES_NV 0x20B9
+
+#define WGLEW_NV_multisample_coverage WGLEW_GET_VAR(__WGLEW_NV_multisample_coverage)
+
+#endif /* WGL_NV_multisample_coverage */
+
+/* -------------------------- WGL_NV_present_video ------------------------- */
+
+#ifndef WGL_NV_present_video
+#define WGL_NV_present_video 1
+
+#define WGL_NUM_VIDEO_SLOTS_NV 0x20F0
+
+DECLARE_HANDLE(HVIDEOOUTPUTDEVICENV);
+
+typedef BOOL (WINAPI * PFNWGLBINDVIDEODEVICENVPROC) (HDC hDc, unsigned int uVideoSlot, HVIDEOOUTPUTDEVICENV hVideoDevice, const int* piAttribList);
+typedef int (WINAPI * PFNWGLENUMERATEVIDEODEVICESNVPROC) (HDC hDc, HVIDEOOUTPUTDEVICENV* phDeviceList);
+typedef BOOL (WINAPI * PFNWGLQUERYCURRENTCONTEXTNVPROC) (int iAttribute, int* piValue);
+
+#define wglBindVideoDeviceNV WGLEW_GET_FUN(__wglewBindVideoDeviceNV)
+#define wglEnumerateVideoDevicesNV WGLEW_GET_FUN(__wglewEnumerateVideoDevicesNV)
+#define wglQueryCurrentContextNV WGLEW_GET_FUN(__wglewQueryCurrentContextNV)
+
+#define WGLEW_NV_present_video WGLEW_GET_VAR(__WGLEW_NV_present_video)
+
+#endif /* WGL_NV_present_video */
+
+/* ---------------------- WGL_NV_render_depth_texture ---------------------- */
+
+#ifndef WGL_NV_render_depth_texture
+#define WGL_NV_render_depth_texture 1
+
+#define WGL_NO_TEXTURE_ARB 0x2077
+#define WGL_BIND_TO_TEXTURE_DEPTH_NV 0x20A3
+#define WGL_BIND_TO_TEXTURE_RECTANGLE_DEPTH_NV 0x20A4
+#define WGL_DEPTH_TEXTURE_FORMAT_NV 0x20A5
+#define WGL_TEXTURE_DEPTH_COMPONENT_NV 0x20A6
+#define WGL_DEPTH_COMPONENT_NV 0x20A7
+
+#define WGLEW_NV_render_depth_texture WGLEW_GET_VAR(__WGLEW_NV_render_depth_texture)
+
+#endif /* WGL_NV_render_depth_texture */
+
+/* -------------------- WGL_NV_render_texture_rectangle -------------------- */
+
+#ifndef WGL_NV_render_texture_rectangle
+#define WGL_NV_render_texture_rectangle 1
+
+#define WGL_BIND_TO_TEXTURE_RECTANGLE_RGB_NV 0x20A0
+#define WGL_BIND_TO_TEXTURE_RECTANGLE_RGBA_NV 0x20A1
+#define WGL_TEXTURE_RECTANGLE_NV 0x20A2
+
+#define WGLEW_NV_render_texture_rectangle WGLEW_GET_VAR(__WGLEW_NV_render_texture_rectangle)
+
+#endif /* WGL_NV_render_texture_rectangle */
+
+/* --------------------------- WGL_NV_swap_group --------------------------- */
+
+#ifndef WGL_NV_swap_group
+#define WGL_NV_swap_group 1
+
+typedef BOOL (WINAPI * PFNWGLBINDSWAPBARRIERNVPROC) (GLuint group, GLuint barrier);
+typedef BOOL (WINAPI * PFNWGLJOINSWAPGROUPNVPROC) (HDC hDC, GLuint group);
+typedef BOOL (WINAPI * PFNWGLQUERYFRAMECOUNTNVPROC) (HDC hDC, GLuint* count);
+typedef BOOL (WINAPI * PFNWGLQUERYMAXSWAPGROUPSNVPROC) (HDC hDC, GLuint* maxGroups, GLuint *maxBarriers);
+typedef BOOL (WINAPI * PFNWGLQUERYSWAPGROUPNVPROC) (HDC hDC, GLuint* group, GLuint *barrier);
+typedef BOOL (WINAPI * PFNWGLRESETFRAMECOUNTNVPROC) (HDC hDC);
+
+#define wglBindSwapBarrierNV WGLEW_GET_FUN(__wglewBindSwapBarrierNV)
+#define wglJoinSwapGroupNV WGLEW_GET_FUN(__wglewJoinSwapGroupNV)
+#define wglQueryFrameCountNV WGLEW_GET_FUN(__wglewQueryFrameCountNV)
+#define wglQueryMaxSwapGroupsNV WGLEW_GET_FUN(__wglewQueryMaxSwapGroupsNV)
+#define wglQuerySwapGroupNV WGLEW_GET_FUN(__wglewQuerySwapGroupNV)
+#define wglResetFrameCountNV WGLEW_GET_FUN(__wglewResetFrameCountNV)
+
+#define WGLEW_NV_swap_group WGLEW_GET_VAR(__WGLEW_NV_swap_group)
+
+#endif /* WGL_NV_swap_group */
+
+/* ----------------------- WGL_NV_vertex_array_range ----------------------- */
+
+#ifndef WGL_NV_vertex_array_range
+#define WGL_NV_vertex_array_range 1
+
+typedef void * (WINAPI * PFNWGLALLOCATEMEMORYNVPROC) (GLsizei size, GLfloat readFrequency, GLfloat writeFrequency, GLfloat priority);
+typedef void (WINAPI * PFNWGLFREEMEMORYNVPROC) (void *pointer);
+
+#define wglAllocateMemoryNV WGLEW_GET_FUN(__wglewAllocateMemoryNV)
+#define wglFreeMemoryNV WGLEW_GET_FUN(__wglewFreeMemoryNV)
+
+#define WGLEW_NV_vertex_array_range WGLEW_GET_VAR(__WGLEW_NV_vertex_array_range)
+
+#endif /* WGL_NV_vertex_array_range */
+
+/* -------------------------- WGL_NV_video_capture ------------------------- */
+
+#ifndef WGL_NV_video_capture
+#define WGL_NV_video_capture 1
+
+#define WGL_UNIQUE_ID_NV 0x20CE
+#define WGL_NUM_VIDEO_CAPTURE_SLOTS_NV 0x20CF
+
+DECLARE_HANDLE(HVIDEOINPUTDEVICENV);
+
+typedef BOOL (WINAPI * PFNWGLBINDVIDEOCAPTUREDEVICENVPROC) (UINT uVideoSlot, HVIDEOINPUTDEVICENV hDevice);
+typedef UINT (WINAPI * PFNWGLENUMERATEVIDEOCAPTUREDEVICESNVPROC) (HDC hDc, HVIDEOINPUTDEVICENV* phDeviceList);
+typedef BOOL (WINAPI * PFNWGLLOCKVIDEOCAPTUREDEVICENVPROC) (HDC hDc, HVIDEOINPUTDEVICENV hDevice);
+typedef BOOL (WINAPI * PFNWGLQUERYVIDEOCAPTUREDEVICENVPROC) (HDC hDc, HVIDEOINPUTDEVICENV hDevice, int iAttribute, int* piValue);
+typedef BOOL (WINAPI * PFNWGLRELEASEVIDEOCAPTUREDEVICENVPROC) (HDC hDc, HVIDEOINPUTDEVICENV hDevice);
+
+#define wglBindVideoCaptureDeviceNV WGLEW_GET_FUN(__wglewBindVideoCaptureDeviceNV)
+#define wglEnumerateVideoCaptureDevicesNV WGLEW_GET_FUN(__wglewEnumerateVideoCaptureDevicesNV)
+#define wglLockVideoCaptureDeviceNV WGLEW_GET_FUN(__wglewLockVideoCaptureDeviceNV)
+#define wglQueryVideoCaptureDeviceNV WGLEW_GET_FUN(__wglewQueryVideoCaptureDeviceNV)
+#define wglReleaseVideoCaptureDeviceNV WGLEW_GET_FUN(__wglewReleaseVideoCaptureDeviceNV)
+
+#define WGLEW_NV_video_capture WGLEW_GET_VAR(__WGLEW_NV_video_capture)
+
+#endif /* WGL_NV_video_capture */
+
+/* -------------------------- WGL_NV_video_output -------------------------- */
+
+#ifndef WGL_NV_video_output
+#define WGL_NV_video_output 1
+
+#define WGL_BIND_TO_VIDEO_RGB_NV 0x20C0
+#define WGL_BIND_TO_VIDEO_RGBA_NV 0x20C1
+#define WGL_BIND_TO_VIDEO_RGB_AND_DEPTH_NV 0x20C2
+#define WGL_VIDEO_OUT_COLOR_NV 0x20C3
+#define WGL_VIDEO_OUT_ALPHA_NV 0x20C4
+#define WGL_VIDEO_OUT_DEPTH_NV 0x20C5
+#define WGL_VIDEO_OUT_COLOR_AND_ALPHA_NV 0x20C6
+#define WGL_VIDEO_OUT_COLOR_AND_DEPTH_NV 0x20C7
+#define WGL_VIDEO_OUT_FRAME 0x20C8
+#define WGL_VIDEO_OUT_FIELD_1 0x20C9
+#define WGL_VIDEO_OUT_FIELD_2 0x20CA
+#define WGL_VIDEO_OUT_STACKED_FIELDS_1_2 0x20CB
+#define WGL_VIDEO_OUT_STACKED_FIELDS_2_1 0x20CC
+
+DECLARE_HANDLE(HPVIDEODEV);
+
+typedef BOOL (WINAPI * PFNWGLBINDVIDEOIMAGENVPROC) (HPVIDEODEV hVideoDevice, HPBUFFERARB hPbuffer, int iVideoBuffer);
+typedef BOOL (WINAPI * PFNWGLGETVIDEODEVICENVPROC) (HDC hDC, int numDevices, HPVIDEODEV* hVideoDevice);
+typedef BOOL (WINAPI * PFNWGLGETVIDEOINFONVPROC) (HPVIDEODEV hpVideoDevice, unsigned long* pulCounterOutputPbuffer, unsigned long *pulCounterOutputVideo);
+typedef BOOL (WINAPI * PFNWGLRELEASEVIDEODEVICENVPROC) (HPVIDEODEV hVideoDevice);
+typedef BOOL (WINAPI * PFNWGLRELEASEVIDEOIMAGENVPROC) (HPBUFFERARB hPbuffer, int iVideoBuffer);
+typedef BOOL (WINAPI * PFNWGLSENDPBUFFERTOVIDEONVPROC) (HPBUFFERARB hPbuffer, int iBufferType, unsigned long* pulCounterPbuffer, BOOL bBlock);
+
+#define wglBindVideoImageNV WGLEW_GET_FUN(__wglewBindVideoImageNV)
+#define wglGetVideoDeviceNV WGLEW_GET_FUN(__wglewGetVideoDeviceNV)
+#define wglGetVideoInfoNV WGLEW_GET_FUN(__wglewGetVideoInfoNV)
+#define wglReleaseVideoDeviceNV WGLEW_GET_FUN(__wglewReleaseVideoDeviceNV)
+#define wglReleaseVideoImageNV WGLEW_GET_FUN(__wglewReleaseVideoImageNV)
+#define wglSendPbufferToVideoNV WGLEW_GET_FUN(__wglewSendPbufferToVideoNV)
+
+#define WGLEW_NV_video_output WGLEW_GET_VAR(__WGLEW_NV_video_output)
+
+#endif /* WGL_NV_video_output */
+
+/* -------------------------- WGL_OML_sync_control ------------------------- */
+
+#ifndef WGL_OML_sync_control
+#define WGL_OML_sync_control 1
+
+typedef BOOL (WINAPI * PFNWGLGETMSCRATEOMLPROC) (HDC hdc, INT32* numerator, INT32 *denominator);
+typedef BOOL (WINAPI * PFNWGLGETSYNCVALUESOMLPROC) (HDC hdc, INT64* ust, INT64 *msc, INT64 *sbc);
+typedef INT64 (WINAPI * PFNWGLSWAPBUFFERSMSCOMLPROC) (HDC hdc, INT64 target_msc, INT64 divisor, INT64 remainder);
+typedef INT64 (WINAPI * PFNWGLSWAPLAYERBUFFERSMSCOMLPROC) (HDC hdc, INT fuPlanes, INT64 target_msc, INT64 divisor, INT64 remainder);
+typedef BOOL (WINAPI * PFNWGLWAITFORMSCOMLPROC) (HDC hdc, INT64 target_msc, INT64 divisor, INT64 remainder, INT64* ust, INT64 *msc, INT64 *sbc);
+typedef BOOL (WINAPI * PFNWGLWAITFORSBCOMLPROC) (HDC hdc, INT64 target_sbc, INT64* ust, INT64 *msc, INT64 *sbc);
+
+#define wglGetMscRateOML WGLEW_GET_FUN(__wglewGetMscRateOML)
+#define wglGetSyncValuesOML WGLEW_GET_FUN(__wglewGetSyncValuesOML)
+#define wglSwapBuffersMscOML WGLEW_GET_FUN(__wglewSwapBuffersMscOML)
+#define wglSwapLayerBuffersMscOML WGLEW_GET_FUN(__wglewSwapLayerBuffersMscOML)
+#define wglWaitForMscOML WGLEW_GET_FUN(__wglewWaitForMscOML)
+#define wglWaitForSbcOML WGLEW_GET_FUN(__wglewWaitForSbcOML)
+
+#define WGLEW_OML_sync_control WGLEW_GET_VAR(__WGLEW_OML_sync_control)
+
+#endif /* WGL_OML_sync_control */
+
+/* ------------------------------------------------------------------------- */
+
+#ifdef GLEW_MX
+#define WGLEW_FUN_EXPORT
+#define WGLEW_VAR_EXPORT
+#else
+#define WGLEW_FUN_EXPORT GLEW_FUN_EXPORT
+#define WGLEW_VAR_EXPORT GLEW_VAR_EXPORT
+#endif /* GLEW_MX */
+
+#ifdef GLEW_MX
+struct WGLEWContextStruct
+{
+#endif /* GLEW_MX */
+
+WGLEW_FUN_EXPORT PFNWGLSETSTEREOEMITTERSTATE3DLPROC __wglewSetStereoEmitterState3DL;
+
+WGLEW_FUN_EXPORT PFNWGLBLITCONTEXTFRAMEBUFFERAMDPROC __wglewBlitContextFramebufferAMD;
+WGLEW_FUN_EXPORT PFNWGLCREATEASSOCIATEDCONTEXTAMDPROC __wglewCreateAssociatedContextAMD;
+WGLEW_FUN_EXPORT PFNWGLCREATEASSOCIATEDCONTEXTATTRIBSAMDPROC __wglewCreateAssociatedContextAttribsAMD;
+WGLEW_FUN_EXPORT PFNWGLDELETEASSOCIATEDCONTEXTAMDPROC __wglewDeleteAssociatedContextAMD;
+WGLEW_FUN_EXPORT PFNWGLGETCONTEXTGPUIDAMDPROC __wglewGetContextGPUIDAMD;
+WGLEW_FUN_EXPORT PFNWGLGETCURRENTASSOCIATEDCONTEXTAMDPROC __wglewGetCurrentAssociatedContextAMD;
+WGLEW_FUN_EXPORT PFNWGLGETGPUIDSAMDPROC __wglewGetGPUIDsAMD;
+WGLEW_FUN_EXPORT PFNWGLGETGPUINFOAMDPROC __wglewGetGPUInfoAMD;
+WGLEW_FUN_EXPORT PFNWGLMAKEASSOCIATEDCONTEXTCURRENTAMDPROC __wglewMakeAssociatedContextCurrentAMD;
+
+WGLEW_FUN_EXPORT PFNWGLCREATEBUFFERREGIONARBPROC __wglewCreateBufferRegionARB;
+WGLEW_FUN_EXPORT PFNWGLDELETEBUFFERREGIONARBPROC __wglewDeleteBufferRegionARB;
+WGLEW_FUN_EXPORT PFNWGLRESTOREBUFFERREGIONARBPROC __wglewRestoreBufferRegionARB;
+WGLEW_FUN_EXPORT PFNWGLSAVEBUFFERREGIONARBPROC __wglewSaveBufferRegionARB;
+
+WGLEW_FUN_EXPORT PFNWGLCREATECONTEXTATTRIBSARBPROC __wglewCreateContextAttribsARB;
+
+WGLEW_FUN_EXPORT PFNWGLGETEXTENSIONSSTRINGARBPROC __wglewGetExtensionsStringARB;
+
+WGLEW_FUN_EXPORT PFNWGLGETCURRENTREADDCARBPROC __wglewGetCurrentReadDCARB;
+WGLEW_FUN_EXPORT PFNWGLMAKECONTEXTCURRENTARBPROC __wglewMakeContextCurrentARB;
+
+WGLEW_FUN_EXPORT PFNWGLCREATEPBUFFERARBPROC __wglewCreatePbufferARB;
+WGLEW_FUN_EXPORT PFNWGLDESTROYPBUFFERARBPROC __wglewDestroyPbufferARB;
+WGLEW_FUN_EXPORT PFNWGLGETPBUFFERDCARBPROC __wglewGetPbufferDCARB;
+WGLEW_FUN_EXPORT PFNWGLQUERYPBUFFERARBPROC __wglewQueryPbufferARB;
+WGLEW_FUN_EXPORT PFNWGLRELEASEPBUFFERDCARBPROC __wglewReleasePbufferDCARB;
+
+WGLEW_FUN_EXPORT PFNWGLCHOOSEPIXELFORMATARBPROC __wglewChoosePixelFormatARB;
+WGLEW_FUN_EXPORT PFNWGLGETPIXELFORMATATTRIBFVARBPROC __wglewGetPixelFormatAttribfvARB;
+WGLEW_FUN_EXPORT PFNWGLGETPIXELFORMATATTRIBIVARBPROC __wglewGetPixelFormatAttribivARB;
+
+WGLEW_FUN_EXPORT PFNWGLBINDTEXIMAGEARBPROC __wglewBindTexImageARB;
+WGLEW_FUN_EXPORT PFNWGLRELEASETEXIMAGEARBPROC __wglewReleaseTexImageARB;
+WGLEW_FUN_EXPORT PFNWGLSETPBUFFERATTRIBARBPROC __wglewSetPbufferAttribARB;
+
+WGLEW_FUN_EXPORT PFNWGLBINDDISPLAYCOLORTABLEEXTPROC __wglewBindDisplayColorTableEXT;
+WGLEW_FUN_EXPORT PFNWGLCREATEDISPLAYCOLORTABLEEXTPROC __wglewCreateDisplayColorTableEXT;
+WGLEW_FUN_EXPORT PFNWGLDESTROYDISPLAYCOLORTABLEEXTPROC __wglewDestroyDisplayColorTableEXT;
+WGLEW_FUN_EXPORT PFNWGLLOADDISPLAYCOLORTABLEEXTPROC __wglewLoadDisplayColorTableEXT;
+
+WGLEW_FUN_EXPORT PFNWGLGETEXTENSIONSSTRINGEXTPROC __wglewGetExtensionsStringEXT;
+
+WGLEW_FUN_EXPORT PFNWGLGETCURRENTREADDCEXTPROC __wglewGetCurrentReadDCEXT;
+WGLEW_FUN_EXPORT PFNWGLMAKECONTEXTCURRENTEXTPROC __wglewMakeContextCurrentEXT;
+
+WGLEW_FUN_EXPORT PFNWGLCREATEPBUFFEREXTPROC __wglewCreatePbufferEXT;
+WGLEW_FUN_EXPORT PFNWGLDESTROYPBUFFEREXTPROC __wglewDestroyPbufferEXT;
+WGLEW_FUN_EXPORT PFNWGLGETPBUFFERDCEXTPROC __wglewGetPbufferDCEXT;
+WGLEW_FUN_EXPORT PFNWGLQUERYPBUFFEREXTPROC __wglewQueryPbufferEXT;
+WGLEW_FUN_EXPORT PFNWGLRELEASEPBUFFERDCEXTPROC __wglewReleasePbufferDCEXT;
+
+WGLEW_FUN_EXPORT PFNWGLCHOOSEPIXELFORMATEXTPROC __wglewChoosePixelFormatEXT;
+WGLEW_FUN_EXPORT PFNWGLGETPIXELFORMATATTRIBFVEXTPROC __wglewGetPixelFormatAttribfvEXT;
+WGLEW_FUN_EXPORT PFNWGLGETPIXELFORMATATTRIBIVEXTPROC __wglewGetPixelFormatAttribivEXT;
+
+WGLEW_FUN_EXPORT PFNWGLGETSWAPINTERVALEXTPROC __wglewGetSwapIntervalEXT;
+WGLEW_FUN_EXPORT PFNWGLSWAPINTERVALEXTPROC __wglewSwapIntervalEXT;
+
+WGLEW_FUN_EXPORT PFNWGLGETDIGITALVIDEOPARAMETERSI3DPROC __wglewGetDigitalVideoParametersI3D;
+WGLEW_FUN_EXPORT PFNWGLSETDIGITALVIDEOPARAMETERSI3DPROC __wglewSetDigitalVideoParametersI3D;
+
+WGLEW_FUN_EXPORT PFNWGLGETGAMMATABLEI3DPROC __wglewGetGammaTableI3D;
+WGLEW_FUN_EXPORT PFNWGLGETGAMMATABLEPARAMETERSI3DPROC __wglewGetGammaTableParametersI3D;
+WGLEW_FUN_EXPORT PFNWGLSETGAMMATABLEI3DPROC __wglewSetGammaTableI3D;
+WGLEW_FUN_EXPORT PFNWGLSETGAMMATABLEPARAMETERSI3DPROC __wglewSetGammaTableParametersI3D;
+
+WGLEW_FUN_EXPORT PFNWGLDISABLEGENLOCKI3DPROC __wglewDisableGenlockI3D;
+WGLEW_FUN_EXPORT PFNWGLENABLEGENLOCKI3DPROC __wglewEnableGenlockI3D;
+WGLEW_FUN_EXPORT PFNWGLGENLOCKSAMPLERATEI3DPROC __wglewGenlockSampleRateI3D;
+WGLEW_FUN_EXPORT PFNWGLGENLOCKSOURCEDELAYI3DPROC __wglewGenlockSourceDelayI3D;
+WGLEW_FUN_EXPORT PFNWGLGENLOCKSOURCEEDGEI3DPROC __wglewGenlockSourceEdgeI3D;
+WGLEW_FUN_EXPORT PFNWGLGENLOCKSOURCEI3DPROC __wglewGenlockSourceI3D;
+WGLEW_FUN_EXPORT PFNWGLGETGENLOCKSAMPLERATEI3DPROC __wglewGetGenlockSampleRateI3D;
+WGLEW_FUN_EXPORT PFNWGLGETGENLOCKSOURCEDELAYI3DPROC __wglewGetGenlockSourceDelayI3D;
+WGLEW_FUN_EXPORT PFNWGLGETGENLOCKSOURCEEDGEI3DPROC __wglewGetGenlockSourceEdgeI3D;
+WGLEW_FUN_EXPORT PFNWGLGETGENLOCKSOURCEI3DPROC __wglewGetGenlockSourceI3D;
+WGLEW_FUN_EXPORT PFNWGLISENABLEDGENLOCKI3DPROC __wglewIsEnabledGenlockI3D;
+WGLEW_FUN_EXPORT PFNWGLQUERYGENLOCKMAXSOURCEDELAYI3DPROC __wglewQueryGenlockMaxSourceDelayI3D;
+
+WGLEW_FUN_EXPORT PFNWGLASSOCIATEIMAGEBUFFEREVENTSI3DPROC __wglewAssociateImageBufferEventsI3D;
+WGLEW_FUN_EXPORT PFNWGLCREATEIMAGEBUFFERI3DPROC __wglewCreateImageBufferI3D;
+WGLEW_FUN_EXPORT PFNWGLDESTROYIMAGEBUFFERI3DPROC __wglewDestroyImageBufferI3D;
+WGLEW_FUN_EXPORT PFNWGLRELEASEIMAGEBUFFEREVENTSI3DPROC __wglewReleaseImageBufferEventsI3D;
+
+WGLEW_FUN_EXPORT PFNWGLDISABLEFRAMELOCKI3DPROC __wglewDisableFrameLockI3D;
+WGLEW_FUN_EXPORT PFNWGLENABLEFRAMELOCKI3DPROC __wglewEnableFrameLockI3D;
+WGLEW_FUN_EXPORT PFNWGLISENABLEDFRAMELOCKI3DPROC __wglewIsEnabledFrameLockI3D;
+WGLEW_FUN_EXPORT PFNWGLQUERYFRAMELOCKMASTERI3DPROC __wglewQueryFrameLockMasterI3D;
+
+WGLEW_FUN_EXPORT PFNWGLBEGINFRAMETRACKINGI3DPROC __wglewBeginFrameTrackingI3D;
+WGLEW_FUN_EXPORT PFNWGLENDFRAMETRACKINGI3DPROC __wglewEndFrameTrackingI3D;
+WGLEW_FUN_EXPORT PFNWGLGETFRAMEUSAGEI3DPROC __wglewGetFrameUsageI3D;
+WGLEW_FUN_EXPORT PFNWGLQUERYFRAMETRACKINGI3DPROC __wglewQueryFrameTrackingI3D;
+
+WGLEW_FUN_EXPORT PFNWGLDXCLOSEDEVICENVPROC __wglewDXCloseDeviceNV;
+WGLEW_FUN_EXPORT PFNWGLDXLOCKOBJECTSNVPROC __wglewDXLockObjectsNV;
+WGLEW_FUN_EXPORT PFNWGLDXOBJECTACCESSNVPROC __wglewDXObjectAccessNV;
+WGLEW_FUN_EXPORT PFNWGLDXOPENDEVICENVPROC __wglewDXOpenDeviceNV;
+WGLEW_FUN_EXPORT PFNWGLDXREGISTEROBJECTNVPROC __wglewDXRegisterObjectNV;
+WGLEW_FUN_EXPORT PFNWGLDXSETRESOURCESHAREHANDLENVPROC __wglewDXSetResourceShareHandleNV;
+WGLEW_FUN_EXPORT PFNWGLDXUNLOCKOBJECTSNVPROC __wglewDXUnlockObjectsNV;
+WGLEW_FUN_EXPORT PFNWGLDXUNREGISTEROBJECTNVPROC __wglewDXUnregisterObjectNV;
+
+WGLEW_FUN_EXPORT PFNWGLCOPYIMAGESUBDATANVPROC __wglewCopyImageSubDataNV;
+
+WGLEW_FUN_EXPORT PFNWGLDELAYBEFORESWAPNVPROC __wglewDelayBeforeSwapNV;
+
+WGLEW_FUN_EXPORT PFNWGLCREATEAFFINITYDCNVPROC __wglewCreateAffinityDCNV;
+WGLEW_FUN_EXPORT PFNWGLDELETEDCNVPROC __wglewDeleteDCNV;
+WGLEW_FUN_EXPORT PFNWGLENUMGPUDEVICESNVPROC __wglewEnumGpuDevicesNV;
+WGLEW_FUN_EXPORT PFNWGLENUMGPUSFROMAFFINITYDCNVPROC __wglewEnumGpusFromAffinityDCNV;
+WGLEW_FUN_EXPORT PFNWGLENUMGPUSNVPROC __wglewEnumGpusNV;
+
+WGLEW_FUN_EXPORT PFNWGLBINDVIDEODEVICENVPROC __wglewBindVideoDeviceNV;
+WGLEW_FUN_EXPORT PFNWGLENUMERATEVIDEODEVICESNVPROC __wglewEnumerateVideoDevicesNV;
+WGLEW_FUN_EXPORT PFNWGLQUERYCURRENTCONTEXTNVPROC __wglewQueryCurrentContextNV;
+
+WGLEW_FUN_EXPORT PFNWGLBINDSWAPBARRIERNVPROC __wglewBindSwapBarrierNV;
+WGLEW_FUN_EXPORT PFNWGLJOINSWAPGROUPNVPROC __wglewJoinSwapGroupNV;
+WGLEW_FUN_EXPORT PFNWGLQUERYFRAMECOUNTNVPROC __wglewQueryFrameCountNV;
+WGLEW_FUN_EXPORT PFNWGLQUERYMAXSWAPGROUPSNVPROC __wglewQueryMaxSwapGroupsNV;
+WGLEW_FUN_EXPORT PFNWGLQUERYSWAPGROUPNVPROC __wglewQuerySwapGroupNV;
+WGLEW_FUN_EXPORT PFNWGLRESETFRAMECOUNTNVPROC __wglewResetFrameCountNV;
+
+WGLEW_FUN_EXPORT PFNWGLALLOCATEMEMORYNVPROC __wglewAllocateMemoryNV;
+WGLEW_FUN_EXPORT PFNWGLFREEMEMORYNVPROC __wglewFreeMemoryNV;
+
+WGLEW_FUN_EXPORT PFNWGLBINDVIDEOCAPTUREDEVICENVPROC __wglewBindVideoCaptureDeviceNV;
+WGLEW_FUN_EXPORT PFNWGLENUMERATEVIDEOCAPTUREDEVICESNVPROC __wglewEnumerateVideoCaptureDevicesNV;
+WGLEW_FUN_EXPORT PFNWGLLOCKVIDEOCAPTUREDEVICENVPROC __wglewLockVideoCaptureDeviceNV;
+WGLEW_FUN_EXPORT PFNWGLQUERYVIDEOCAPTUREDEVICENVPROC __wglewQueryVideoCaptureDeviceNV;
+WGLEW_FUN_EXPORT PFNWGLRELEASEVIDEOCAPTUREDEVICENVPROC __wglewReleaseVideoCaptureDeviceNV;
+
+WGLEW_FUN_EXPORT PFNWGLBINDVIDEOIMAGENVPROC __wglewBindVideoImageNV;
+WGLEW_FUN_EXPORT PFNWGLGETVIDEODEVICENVPROC __wglewGetVideoDeviceNV;
+WGLEW_FUN_EXPORT PFNWGLGETVIDEOINFONVPROC __wglewGetVideoInfoNV;
+WGLEW_FUN_EXPORT PFNWGLRELEASEVIDEODEVICENVPROC __wglewReleaseVideoDeviceNV;
+WGLEW_FUN_EXPORT PFNWGLRELEASEVIDEOIMAGENVPROC __wglewReleaseVideoImageNV;
+WGLEW_FUN_EXPORT PFNWGLSENDPBUFFERTOVIDEONVPROC __wglewSendPbufferToVideoNV;
+
+WGLEW_FUN_EXPORT PFNWGLGETMSCRATEOMLPROC __wglewGetMscRateOML;
+WGLEW_FUN_EXPORT PFNWGLGETSYNCVALUESOMLPROC __wglewGetSyncValuesOML;
+WGLEW_FUN_EXPORT PFNWGLSWAPBUFFERSMSCOMLPROC __wglewSwapBuffersMscOML;
+WGLEW_FUN_EXPORT PFNWGLSWAPLAYERBUFFERSMSCOMLPROC __wglewSwapLayerBuffersMscOML;
+WGLEW_FUN_EXPORT PFNWGLWAITFORMSCOMLPROC __wglewWaitForMscOML;
+WGLEW_FUN_EXPORT PFNWGLWAITFORSBCOMLPROC __wglewWaitForSbcOML;
+WGLEW_VAR_EXPORT GLboolean __WGLEW_3DFX_multisample;
+WGLEW_VAR_EXPORT GLboolean __WGLEW_3DL_stereo_control;
+WGLEW_VAR_EXPORT GLboolean __WGLEW_AMD_gpu_association;
+WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_buffer_region;
+WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_context_flush_control;
+WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_create_context;
+WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_create_context_profile;
+WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_create_context_robustness;
+WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_extensions_string;
+WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_framebuffer_sRGB;
+WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_make_current_read;
+WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_multisample;
+WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_pbuffer;
+WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_pixel_format;
+WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_pixel_format_float;
+WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_render_texture;
+WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_robustness_application_isolation;
+WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_robustness_share_group_isolation;
+WGLEW_VAR_EXPORT GLboolean __WGLEW_ATI_pixel_format_float;
+WGLEW_VAR_EXPORT GLboolean __WGLEW_ATI_render_texture_rectangle;
+WGLEW_VAR_EXPORT GLboolean __WGLEW_EXT_create_context_es2_profile;
+WGLEW_VAR_EXPORT GLboolean __WGLEW_EXT_create_context_es_profile;
+WGLEW_VAR_EXPORT GLboolean __WGLEW_EXT_depth_float;
+WGLEW_VAR_EXPORT GLboolean __WGLEW_EXT_display_color_table;
+WGLEW_VAR_EXPORT GLboolean __WGLEW_EXT_extensions_string;
+WGLEW_VAR_EXPORT GLboolean __WGLEW_EXT_framebuffer_sRGB;
+WGLEW_VAR_EXPORT GLboolean __WGLEW_EXT_make_current_read;
+WGLEW_VAR_EXPORT GLboolean __WGLEW_EXT_multisample;
+WGLEW_VAR_EXPORT GLboolean __WGLEW_EXT_pbuffer;
+WGLEW_VAR_EXPORT GLboolean __WGLEW_EXT_pixel_format;
+WGLEW_VAR_EXPORT GLboolean __WGLEW_EXT_pixel_format_packed_float;
+WGLEW_VAR_EXPORT GLboolean __WGLEW_EXT_swap_control;
+WGLEW_VAR_EXPORT GLboolean __WGLEW_EXT_swap_control_tear;
+WGLEW_VAR_EXPORT GLboolean __WGLEW_I3D_digital_video_control;
+WGLEW_VAR_EXPORT GLboolean __WGLEW_I3D_gamma;
+WGLEW_VAR_EXPORT GLboolean __WGLEW_I3D_genlock;
+WGLEW_VAR_EXPORT GLboolean __WGLEW_I3D_image_buffer;
+WGLEW_VAR_EXPORT GLboolean __WGLEW_I3D_swap_frame_lock;
+WGLEW_VAR_EXPORT GLboolean __WGLEW_I3D_swap_frame_usage;
+WGLEW_VAR_EXPORT GLboolean __WGLEW_NV_DX_interop;
+WGLEW_VAR_EXPORT GLboolean __WGLEW_NV_DX_interop2;
+WGLEW_VAR_EXPORT GLboolean __WGLEW_NV_copy_image;
+WGLEW_VAR_EXPORT GLboolean __WGLEW_NV_delay_before_swap;
+WGLEW_VAR_EXPORT GLboolean __WGLEW_NV_float_buffer;
+WGLEW_VAR_EXPORT GLboolean __WGLEW_NV_gpu_affinity;
+WGLEW_VAR_EXPORT GLboolean __WGLEW_NV_multisample_coverage;
+WGLEW_VAR_EXPORT GLboolean __WGLEW_NV_present_video;
+WGLEW_VAR_EXPORT GLboolean __WGLEW_NV_render_depth_texture;
+WGLEW_VAR_EXPORT GLboolean __WGLEW_NV_render_texture_rectangle;
+WGLEW_VAR_EXPORT GLboolean __WGLEW_NV_swap_group;
+WGLEW_VAR_EXPORT GLboolean __WGLEW_NV_vertex_array_range;
+WGLEW_VAR_EXPORT GLboolean __WGLEW_NV_video_capture;
+WGLEW_VAR_EXPORT GLboolean __WGLEW_NV_video_output;
+WGLEW_VAR_EXPORT GLboolean __WGLEW_OML_sync_control;
+
+#ifdef GLEW_MX
+}; /* WGLEWContextStruct */
+#endif /* GLEW_MX */
+
+/* ------------------------------------------------------------------------- */
+
+#ifdef GLEW_MX
+
+typedef struct WGLEWContextStruct WGLEWContext;
+GLEWAPI GLenum GLEWAPIENTRY wglewContextInit (WGLEWContext *ctx);
+GLEWAPI GLboolean GLEWAPIENTRY wglewContextIsSupported (const WGLEWContext *ctx, const char *name);
+
+#define wglewInit() wglewContextInit(wglewGetContext())
+#define wglewIsSupported(x) wglewContextIsSupported(wglewGetContext(), x)
+
+#define WGLEW_GET_VAR(x) (*(const GLboolean*)&(wglewGetContext()->x))
+#define WGLEW_GET_FUN(x) wglewGetContext()->x
+
+#else /* GLEW_MX */
+
+#define WGLEW_GET_VAR(x) (*(const GLboolean*)&x)
+#define WGLEW_GET_FUN(x) x
+
+GLEWAPI GLboolean GLEWAPIENTRY wglewIsSupported (const char *name);
+
+#endif /* GLEW_MX */
+
+GLEWAPI GLboolean GLEWAPIENTRY wglewGetExtension (const char *name);
+
+#ifdef __cplusplus
+}
+#endif
+
+#undef GLEWAPI
+
+#endif /* __wglew_h__ */
diff --git a/include/SDL2/SDL.h b/include/SDL2/SDL.h
new file mode 100644 (file)
index 0000000..a907709
--- /dev/null
@@ -0,0 +1,163 @@
+/*
+  Simple DirectMedia Layer
+  Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
+
+  This software is provided 'as-is', without any express or implied
+  warranty.  In no event will the authors be held liable for any damages
+  arising from the use of this software.
+
+  Permission is granted to anyone to use this software for any purpose,
+  including commercial applications, and to alter it and redistribute it
+  freely, subject to the following restrictions:
+
+  1. The origin of this software must not be misrepresented; you must not
+     claim that you wrote the original software. If you use this software
+     in a product, an acknowledgment in the product documentation would be
+     appreciated but is not required.
+  2. Altered source versions must be plainly marked as such, and must not be
+     misrepresented as being the original software.
+  3. This notice may not be removed or altered from any source distribution.
+*/
+
+/**
+ *  \file SDL.h
+ *
+ *  Main include header for the SDL library
+ */
+
+/**
+ *  \mainpage Simple DirectMedia Layer (SDL)
+ *
+ *  http://www.libsdl.org/
+ *
+ *  \section intro_sec Introduction
+ *
+ *  Simple DirectMedia Layer is a cross-platform development library designed
+ *  to provide low level access to audio, keyboard, mouse, joystick, and
+ *  graphics hardware via OpenGL and Direct3D. It is used by video playback
+ *  software, emulators, and popular games including Valve's award winning
+ *  catalog and many Humble Bundle games.
+ *
+ *  SDL officially supports Windows, Mac OS X, Linux, iOS, and Android.
+ *  Support for other platforms may be found in the source code.
+ *
+ *  SDL is written in C, works natively with C++, and there are bindings 
+ *  available for several other languages, including C# and Python.
+ *
+ *  This library is distributed under the zlib license, which can be found
+ *  in the file "COPYING.txt".
+ *
+ *  The best way to learn how to use SDL is to check out the header files in
+ *  the "include" subdirectory and the programs in the "test" subdirectory.
+ *  The header files and test programs are well commented and always up to date.
+ *  More documentation and FAQs are available online at:
+ *      http://wiki.libsdl.org/
+ *
+ *  If you need help with the library, or just want to discuss SDL related
+ *  issues, you can join the developers mailing list:
+ *      http://www.libsdl.org/mailing-list.php
+ *
+ *  Enjoy!
+ *      Sam Lantinga                (slouken@libsdl.org)
+ */
+
+#ifndef _SDL_H
+#define _SDL_H
+
+#include "SDL_main.h"
+#include "SDL_stdinc.h"
+#include "SDL_assert.h"
+#include "SDL_atomic.h"
+#include "SDL_audio.h"
+#include "SDL_clipboard.h"
+#include "SDL_cpuinfo.h"
+#include "SDL_endian.h"
+#include "SDL_error.h"
+#include "SDL_events.h"
+#include "SDL_filesystem.h"
+#include "SDL_joystick.h"
+#include "SDL_gamecontroller.h"
+#include "SDL_haptic.h"
+#include "SDL_hints.h"
+#include "SDL_loadso.h"
+#include "SDL_log.h"
+#include "SDL_messagebox.h"
+#include "SDL_mutex.h"
+#include "SDL_power.h"
+#include "SDL_render.h"
+#include "SDL_rwops.h"
+#include "SDL_system.h"
+#include "SDL_thread.h"
+#include "SDL_timer.h"
+#include "SDL_version.h"
+#include "SDL_video.h"
+
+#include "begin_code.h"
+/* Set up for C function definitions, even when using C++ */
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* As of version 0.5, SDL is loaded dynamically into the application */
+
+/**
+ *  \name SDL_INIT_*
+ *
+ *  These are the flags which may be passed to SDL_Init().  You should
+ *  specify the subsystems which you will be using in your application.
+ */
+/* @{ */
+#define SDL_INIT_TIMER          0x00000001
+#define SDL_INIT_AUDIO          0x00000010
+#define SDL_INIT_VIDEO          0x00000020  /**< SDL_INIT_VIDEO implies SDL_INIT_EVENTS */
+#define SDL_INIT_JOYSTICK       0x00000200  /**< SDL_INIT_JOYSTICK implies SDL_INIT_EVENTS */
+#define SDL_INIT_HAPTIC         0x00001000
+#define SDL_INIT_GAMECONTROLLER 0x00002000  /**< SDL_INIT_GAMECONTROLLER implies SDL_INIT_JOYSTICK */
+#define SDL_INIT_EVENTS         0x00004000
+#define SDL_INIT_NOPARACHUTE    0x00100000  /**< Don't catch fatal signals */
+#define SDL_INIT_EVERYTHING ( \
+                SDL_INIT_TIMER | SDL_INIT_AUDIO | SDL_INIT_VIDEO | SDL_INIT_EVENTS | \
+                SDL_INIT_JOYSTICK | SDL_INIT_HAPTIC | SDL_INIT_GAMECONTROLLER \
+            )
+/* @} */
+
+/**
+ *  This function initializes  the subsystems specified by \c flags
+ *  Unless the ::SDL_INIT_NOPARACHUTE flag is set, it will install cleanup
+ *  signal handlers for some commonly ignored fatal signals (like SIGSEGV).
+ */
+extern DECLSPEC int SDLCALL SDL_Init(Uint32 flags);
+
+/**
+ *  This function initializes specific SDL subsystems
+ */
+extern DECLSPEC int SDLCALL SDL_InitSubSystem(Uint32 flags);
+
+/**
+ *  This function cleans up specific SDL subsystems
+ */
+extern DECLSPEC void SDLCALL SDL_QuitSubSystem(Uint32 flags);
+
+/**
+ *  This function returns a mask of the specified subsystems which have
+ *  previously been initialized.
+ *
+ *  If \c flags is 0, it returns a mask of all initialized subsystems.
+ */
+extern DECLSPEC Uint32 SDLCALL SDL_WasInit(Uint32 flags);
+
+/**
+ *  This function cleans up all initialized subsystems. You should
+ *  call it upon all exit conditions.
+ */
+extern DECLSPEC void SDLCALL SDL_Quit(void);
+
+/* Ends C function definitions when using C++ */
+#ifdef __cplusplus
+}
+#endif
+#include "close_code.h"
+
+#endif /* _SDL_H */
+
+/* vi: set ts=4 sw=4 expandtab: */
diff --git a/include/SDL2/SDL_assert.h b/include/SDL2/SDL_assert.h
new file mode 100644 (file)
index 0000000..42348f7
--- /dev/null
@@ -0,0 +1,284 @@
+/*
+  Simple DirectMedia Layer
+  Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
+
+  This software is provided 'as-is', without any express or implied
+  warranty.  In no event will the authors be held liable for any damages
+  arising from the use of this software.
+
+  Permission is granted to anyone to use this software for any purpose,
+  including commercial applications, and to alter it and redistribute it
+  freely, subject to the following restrictions:
+
+  1. The origin of this software must not be misrepresented; you must not
+     claim that you wrote the original software. If you use this software
+     in a product, an acknowledgment in the product documentation would be
+     appreciated but is not required.
+  2. Altered source versions must be plainly marked as such, and must not be
+     misrepresented as being the original software.
+  3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef _SDL_assert_h
+#define _SDL_assert_h
+
+#include "SDL_config.h"
+
+#include "begin_code.h"
+/* Set up for C function definitions, even when using C++ */
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef SDL_ASSERT_LEVEL
+#ifdef SDL_DEFAULT_ASSERT_LEVEL
+#define SDL_ASSERT_LEVEL SDL_DEFAULT_ASSERT_LEVEL
+#elif defined(_DEBUG) || defined(DEBUG) || \
+      (defined(__GNUC__) && !defined(__OPTIMIZE__))
+#define SDL_ASSERT_LEVEL 2
+#else
+#define SDL_ASSERT_LEVEL 1
+#endif
+#endif /* SDL_ASSERT_LEVEL */
+
+/*
+These are macros and not first class functions so that the debugger breaks
+on the assertion line and not in some random guts of SDL, and so each
+assert can have unique static variables associated with it.
+*/
+
+#if defined(_MSC_VER)
+/* Don't include intrin.h here because it contains C++ code */
+    extern void __cdecl __debugbreak(void);
+    #define SDL_TriggerBreakpoint() __debugbreak()
+#elif (defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__)))
+    #define SDL_TriggerBreakpoint() __asm__ __volatile__ ( "int $3\n\t" )
+#elif defined(HAVE_SIGNAL_H)
+    #include <signal.h>
+    #define SDL_TriggerBreakpoint() raise(SIGTRAP)
+#else
+    /* How do we trigger breakpoints on this platform? */
+    #define SDL_TriggerBreakpoint()
+#endif
+
+#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) /* C99 supports __func__ as a standard. */
+#   define SDL_FUNCTION __func__
+#elif ((__GNUC__ >= 2) || defined(_MSC_VER))
+#   define SDL_FUNCTION __FUNCTION__
+#else
+#   define SDL_FUNCTION "???"
+#endif
+#define SDL_FILE    __FILE__
+#define SDL_LINE    __LINE__
+
+/*
+sizeof (x) makes the compiler still parse the expression even without
+assertions enabled, so the code is always checked at compile time, but
+doesn't actually generate code for it, so there are no side effects or
+expensive checks at run time, just the constant size of what x WOULD be,
+which presumably gets optimized out as unused.
+This also solves the problem of...
+
+    int somevalue = blah();
+    SDL_assert(somevalue == 1);
+
+...which would cause compiles to complain that somevalue is unused if we
+disable assertions.
+*/
+
+#ifdef _MSC_VER  /* stupid /W4 warnings. */
+#define SDL_NULL_WHILE_LOOP_CONDITION (-1 == __LINE__)
+#else
+#define SDL_NULL_WHILE_LOOP_CONDITION (0)
+#endif
+
+#define SDL_disabled_assert(condition) \
+    do { (void) sizeof ((condition)); } while (SDL_NULL_WHILE_LOOP_CONDITION)
+
+typedef enum
+{
+    SDL_ASSERTION_RETRY,  /**< Retry the assert immediately. */
+    SDL_ASSERTION_BREAK,  /**< Make the debugger trigger a breakpoint. */
+    SDL_ASSERTION_ABORT,  /**< Terminate the program. */
+    SDL_ASSERTION_IGNORE,  /**< Ignore the assert. */
+    SDL_ASSERTION_ALWAYS_IGNORE  /**< Ignore the assert from now on. */
+} SDL_assert_state;
+
+typedef struct SDL_assert_data
+{
+    int always_ignore;
+    unsigned int trigger_count;
+    const char *condition;
+    const char *filename;
+    int linenum;
+    const char *function;
+    const struct SDL_assert_data *next;
+} SDL_assert_data;
+
+#if (SDL_ASSERT_LEVEL > 0)
+
+/* Never call this directly. Use the SDL_assert* macros. */
+extern DECLSPEC SDL_assert_state SDLCALL SDL_ReportAssertion(SDL_assert_data *,
+                                                             const char *,
+                                                             const char *, int)
+#if defined(__clang__)
+#if __has_feature(attribute_analyzer_noreturn)
+/* this tells Clang's static analysis that we're a custom assert function,
+   and that the analyzer should assume the condition was always true past this
+   SDL_assert test. */
+   __attribute__((analyzer_noreturn))
+#endif
+#endif
+;
+
+/* the do {} while(0) avoids dangling else problems:
+    if (x) SDL_assert(y); else blah();
+       ... without the do/while, the "else" could attach to this macro's "if".
+   We try to handle just the minimum we need here in a macro...the loop,
+   the static vars, and break points. The heavy lifting is handled in
+   SDL_ReportAssertion(), in SDL_assert.c.
+*/
+#define SDL_enabled_assert(condition) \
+    do { \
+        while ( !(condition) ) { \
+            static struct SDL_assert_data assert_data = { \
+                0, 0, #condition, 0, 0, 0, 0 \
+            }; \
+            const SDL_assert_state state = SDL_ReportAssertion(&assert_data, \
+                                                               SDL_FUNCTION, \
+                                                               SDL_FILE, \
+                                                               SDL_LINE); \
+            if (state == SDL_ASSERTION_RETRY) { \
+                continue; /* go again. */ \
+            } else if (state == SDL_ASSERTION_BREAK) { \
+                SDL_TriggerBreakpoint(); \
+            } \
+            break; /* not retrying. */ \
+        } \
+    } while (SDL_NULL_WHILE_LOOP_CONDITION)
+
+#endif  /* enabled assertions support code */
+
+/* Enable various levels of assertions. */
+#if SDL_ASSERT_LEVEL == 0   /* assertions disabled */
+#   define SDL_assert(condition) SDL_disabled_assert(condition)
+#   define SDL_assert_release(condition) SDL_disabled_assert(condition)
+#   define SDL_assert_paranoid(condition) SDL_disabled_assert(condition)
+#elif SDL_ASSERT_LEVEL == 1  /* release settings. */
+#   define SDL_assert(condition) SDL_disabled_assert(condition)
+#   define SDL_assert_release(condition) SDL_enabled_assert(condition)
+#   define SDL_assert_paranoid(condition) SDL_disabled_assert(condition)
+#elif SDL_ASSERT_LEVEL == 2  /* normal settings. */
+#   define SDL_assert(condition) SDL_enabled_assert(condition)
+#   define SDL_assert_release(condition) SDL_enabled_assert(condition)
+#   define SDL_assert_paranoid(condition) SDL_disabled_assert(condition)
+#elif SDL_ASSERT_LEVEL == 3  /* paranoid settings. */
+#   define SDL_assert(condition) SDL_enabled_assert(condition)
+#   define SDL_assert_release(condition) SDL_enabled_assert(condition)
+#   define SDL_assert_paranoid(condition) SDL_enabled_assert(condition)
+#else
+#   error Unknown assertion level.
+#endif
+
+/* this assertion is never disabled at any level. */
+#define SDL_assert_always(condition) SDL_enabled_assert(condition)
+
+
+typedef SDL_assert_state (SDLCALL *SDL_AssertionHandler)(
+                                 const SDL_assert_data* data, void* userdata);
+
+/**
+ *  \brief Set an application-defined assertion handler.
+ *
+ *  This allows an app to show its own assertion UI and/or force the
+ *  response to an assertion failure. If the app doesn't provide this, SDL
+ *  will try to do the right thing, popping up a system-specific GUI dialog,
+ *  and probably minimizing any fullscreen windows.
+ *
+ *  This callback may fire from any thread, but it runs wrapped in a mutex, so
+ *  it will only fire from one thread at a time.
+ *
+ *  Setting the callback to NULL restores SDL's original internal handler.
+ *
+ *  This callback is NOT reset to SDL's internal handler upon SDL_Quit()!
+ *
+ *  \return SDL_assert_state value of how to handle the assertion failure.
+ *
+ *  \param handler Callback function, called when an assertion fails.
+ *  \param userdata A pointer passed to the callback as-is.
+ */
+extern DECLSPEC void SDLCALL SDL_SetAssertionHandler(
+                                            SDL_AssertionHandler handler,
+                                            void *userdata);
+
+/**
+ *  \brief Get the default assertion handler.
+ *
+ *  This returns the function pointer that is called by default when an
+ *   assertion is triggered. This is an internal function provided by SDL,
+ *   that is used for assertions when SDL_SetAssertionHandler() hasn't been
+ *   used to provide a different function.
+ *
+ *  \return The default SDL_AssertionHandler that is called when an assert triggers.
+ */
+extern DECLSPEC SDL_AssertionHandler SDLCALL SDL_GetDefaultAssertionHandler(void);
+
+/**
+ *  \brief Get the current assertion handler.
+ *
+ *  This returns the function pointer that is called when an assertion is
+ *   triggered. This is either the value last passed to
+ *   SDL_SetAssertionHandler(), or if no application-specified function is
+ *   set, is equivalent to calling SDL_GetDefaultAssertionHandler().
+ *
+ *   \param puserdata Pointer to a void*, which will store the "userdata"
+ *                    pointer that was passed to SDL_SetAssertionHandler().
+ *                    This value will always be NULL for the default handler.
+ *                    If you don't care about this data, it is safe to pass
+ *                    a NULL pointer to this function to ignore it.
+ *  \return The SDL_AssertionHandler that is called when an assert triggers.
+ */
+extern DECLSPEC SDL_AssertionHandler SDLCALL SDL_GetAssertionHandler(void **puserdata);
+
+/**
+ *  \brief Get a list of all assertion failures.
+ *
+ *  Get all assertions triggered since last call to SDL_ResetAssertionReport(),
+ *  or the start of the program.
+ *
+ *  The proper way to examine this data looks something like this:
+ *
+ *  <code>
+ *  const SDL_assert_data *item = SDL_GetAssertionReport();
+ *  while (item) {
+ *      printf("'%s', %s (%s:%d), triggered %u times, always ignore: %s.\n",
+ *             item->condition, item->function, item->filename,
+ *             item->linenum, item->trigger_count,
+ *             item->always_ignore ? "yes" : "no");
+ *      item = item->next;
+ *  }
+ *  </code>
+ *
+ *  \return List of all assertions.
+ *  \sa SDL_ResetAssertionReport
+ */
+extern DECLSPEC const SDL_assert_data * SDLCALL SDL_GetAssertionReport(void);
+
+/**
+ *  \brief Reset the list of all assertion failures.
+ *
+ *  Reset list of all assertions triggered.
+ *
+ *  \sa SDL_GetAssertionReport
+ */
+extern DECLSPEC void SDLCALL SDL_ResetAssertionReport(void);
+
+/* Ends C function definitions when using C++ */
+#ifdef __cplusplus
+}
+#endif
+#include "close_code.h"
+
+#endif /* _SDL_assert_h */
+
+/* vi: set ts=4 sw=4 expandtab: */
diff --git a/include/SDL2/SDL_atomic.h b/include/SDL2/SDL_atomic.h
new file mode 100644 (file)
index 0000000..bb3a9b6
--- /dev/null
@@ -0,0 +1,260 @@
+/*
+  Simple DirectMedia Layer
+  Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
+
+  This software is provided 'as-is', without any express or implied
+  warranty.  In no event will the authors be held liable for any damages
+  arising from the use of this software.
+
+  Permission is granted to anyone to use this software for any purpose,
+  including commercial applications, and to alter it and redistribute it
+  freely, subject to the following restrictions:
+
+  1. The origin of this software must not be misrepresented; you must not
+     claim that you wrote the original software. If you use this software
+     in a product, an acknowledgment in the product documentation would be
+     appreciated but is not required.
+  2. Altered source versions must be plainly marked as such, and must not be
+     misrepresented as being the original software.
+  3. This notice may not be removed or altered from any source distribution.
+*/
+
+/**
+ * \file SDL_atomic.h
+ *
+ * Atomic operations.
+ *
+ * IMPORTANT:
+ * If you are not an expert in concurrent lockless programming, you should
+ * only be using the atomic lock and reference counting functions in this
+ * file.  In all other cases you should be protecting your data structures
+ * with full mutexes.
+ *
+ * The list of "safe" functions to use are:
+ *  SDL_AtomicLock()
+ *  SDL_AtomicUnlock()
+ *  SDL_AtomicIncRef()
+ *  SDL_AtomicDecRef()
+ *
+ * Seriously, here be dragons!
+ * ^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ *
+ * You can find out a little more about lockless programming and the
+ * subtle issues that can arise here:
+ * http://msdn.microsoft.com/en-us/library/ee418650%28v=vs.85%29.aspx
+ *
+ * There's also lots of good information here:
+ * http://www.1024cores.net/home/lock-free-algorithms
+ * http://preshing.com/
+ *
+ * These operations may or may not actually be implemented using
+ * processor specific atomic operations. When possible they are
+ * implemented as true processor specific atomic operations. When that
+ * is not possible the are implemented using locks that *do* use the
+ * available atomic operations.
+ *
+ * All of the atomic operations that modify memory are full memory barriers.
+ */
+
+#ifndef _SDL_atomic_h_
+#define _SDL_atomic_h_
+
+#include "SDL_stdinc.h"
+#include "SDL_platform.h"
+
+#include "begin_code.h"
+
+/* Set up for C function definitions, even when using C++ */
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * \name SDL AtomicLock
+ *
+ * The atomic locks are efficient spinlocks using CPU instructions,
+ * but are vulnerable to starvation and can spin forever if a thread
+ * holding a lock has been terminated.  For this reason you should
+ * minimize the code executed inside an atomic lock and never do
+ * expensive things like API or system calls while holding them.
+ *
+ * The atomic locks are not safe to lock recursively.
+ *
+ * Porting Note:
+ * The spin lock functions and type are required and can not be
+ * emulated because they are used in the atomic emulation code.
+ */
+/* @{ */
+
+typedef int SDL_SpinLock;
+
+/**
+ * \brief Try to lock a spin lock by setting it to a non-zero value.
+ *
+ * \param lock Points to the lock.
+ *
+ * \return SDL_TRUE if the lock succeeded, SDL_FALSE if the lock is already held.
+ */
+extern DECLSPEC SDL_bool SDLCALL SDL_AtomicTryLock(SDL_SpinLock *lock);
+
+/**
+ * \brief Lock a spin lock by setting it to a non-zero value.
+ *
+ * \param lock Points to the lock.
+ */
+extern DECLSPEC void SDLCALL SDL_AtomicLock(SDL_SpinLock *lock);
+
+/**
+ * \brief Unlock a spin lock by setting it to 0. Always returns immediately
+ *
+ * \param lock Points to the lock.
+ */
+extern DECLSPEC void SDLCALL SDL_AtomicUnlock(SDL_SpinLock *lock);
+
+/* @} *//* SDL AtomicLock */
+
+
+/**
+ * The compiler barrier prevents the compiler from reordering
+ * reads and writes to globally visible variables across the call.
+ */
+#if defined(_MSC_VER) && (_MSC_VER > 1200)
+void _ReadWriteBarrier(void);
+#pragma intrinsic(_ReadWriteBarrier)
+#define SDL_CompilerBarrier()   _ReadWriteBarrier()
+#elif defined(__GNUC__)
+#define SDL_CompilerBarrier()   __asm__ __volatile__ ("" : : : "memory")
+#else
+#define SDL_CompilerBarrier()   \
+{ SDL_SpinLock _tmp = 0; SDL_AtomicLock(&_tmp); SDL_AtomicUnlock(&_tmp); }
+#endif
+
+/**
+ * Memory barriers are designed to prevent reads and writes from being
+ * reordered by the compiler and being seen out of order on multi-core CPUs.
+ *
+ * A typical pattern would be for thread A to write some data and a flag,
+ * and for thread B to read the flag and get the data. In this case you
+ * would insert a release barrier between writing the data and the flag,
+ * guaranteeing that the data write completes no later than the flag is
+ * written, and you would insert an acquire barrier between reading the
+ * flag and reading the data, to ensure that all the reads associated
+ * with the flag have completed.
+ *
+ * In this pattern you should always see a release barrier paired with
+ * an acquire barrier and you should gate the data reads/writes with a
+ * single flag variable.
+ *
+ * For more information on these semantics, take a look at the blog post:
+ * http://preshing.com/20120913/acquire-and-release-semantics
+ */
+#if defined(__GNUC__) && (defined(__powerpc__) || defined(__ppc__))
+#define SDL_MemoryBarrierRelease()   __asm__ __volatile__ ("lwsync" : : : "memory")
+#define SDL_MemoryBarrierAcquire()   __asm__ __volatile__ ("lwsync" : : : "memory")
+#elif defined(__GNUC__) && defined(__arm__)
+#if defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__) || defined(__ARM_ARCH_7EM__) || defined(__ARM_ARCH_7R__) || defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7S__)
+#define SDL_MemoryBarrierRelease()   __asm__ __volatile__ ("dmb ish" : : : "memory")
+#define SDL_MemoryBarrierAcquire()   __asm__ __volatile__ ("dmb ish" : : : "memory")
+#elif defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) || defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6T2__) || defined(__ARM_ARCH_6Z__) || defined(__ARM_ARCH_6ZK__)
+#ifdef __thumb__
+/* The mcr instruction isn't available in thumb mode, use real functions */
+extern DECLSPEC void SDLCALL SDL_MemoryBarrierRelease();
+extern DECLSPEC void SDLCALL SDL_MemoryBarrierAcquire();
+#else
+#define SDL_MemoryBarrierRelease()   __asm__ __volatile__ ("mcr p15, 0, %0, c7, c10, 5" : : "r"(0) : "memory")
+#define SDL_MemoryBarrierAcquire()   __asm__ __volatile__ ("mcr p15, 0, %0, c7, c10, 5" : : "r"(0) : "memory")
+#endif /* __thumb__ */
+#else
+#define SDL_MemoryBarrierRelease()   __asm__ __volatile__ ("" : : : "memory")
+#define SDL_MemoryBarrierAcquire()   __asm__ __volatile__ ("" : : : "memory")
+#endif /* __GNUC__ && __arm__ */
+#else
+/* This is correct for the x86 and x64 CPUs, and we'll expand this over time. */
+#define SDL_MemoryBarrierRelease()  SDL_CompilerBarrier()
+#define SDL_MemoryBarrierAcquire()  SDL_CompilerBarrier()
+#endif
+
+/**
+ * \brief A type representing an atomic integer value.  It is a struct
+ *        so people don't accidentally use numeric operations on it.
+ */
+typedef struct { int value; } SDL_atomic_t;
+
+/**
+ * \brief Set an atomic variable to a new value if it is currently an old value.
+ *
+ * \return SDL_TRUE if the atomic variable was set, SDL_FALSE otherwise.
+ *
+ * \note If you don't know what this function is for, you shouldn't use it!
+*/
+extern DECLSPEC SDL_bool SDLCALL SDL_AtomicCAS(SDL_atomic_t *a, int oldval, int newval);
+
+/**
+ * \brief Set an atomic variable to a value.
+ *
+ * \return The previous value of the atomic variable.
+ */
+extern DECLSPEC int SDLCALL SDL_AtomicSet(SDL_atomic_t *a, int v);
+
+/**
+ * \brief Get the value of an atomic variable
+ */
+extern DECLSPEC int SDLCALL SDL_AtomicGet(SDL_atomic_t *a);
+
+/**
+ * \brief Add to an atomic variable.
+ *
+ * \return The previous value of the atomic variable.
+ *
+ * \note This same style can be used for any number operation
+ */
+extern DECLSPEC int SDLCALL SDL_AtomicAdd(SDL_atomic_t *a, int v);
+
+/**
+ * \brief Increment an atomic variable used as a reference count.
+ */
+#ifndef SDL_AtomicIncRef
+#define SDL_AtomicIncRef(a)    SDL_AtomicAdd(a, 1)
+#endif
+
+/**
+ * \brief Decrement an atomic variable used as a reference count.
+ *
+ * \return SDL_TRUE if the variable reached zero after decrementing,
+ *         SDL_FALSE otherwise
+ */
+#ifndef SDL_AtomicDecRef
+#define SDL_AtomicDecRef(a)    (SDL_AtomicAdd(a, -1) == 1)
+#endif
+
+/**
+ * \brief Set a pointer to a new value if it is currently an old value.
+ *
+ * \return SDL_TRUE if the pointer was set, SDL_FALSE otherwise.
+ *
+ * \note If you don't know what this function is for, you shouldn't use it!
+*/
+extern DECLSPEC SDL_bool SDLCALL SDL_AtomicCASPtr(void **a, void *oldval, void *newval);
+
+/**
+ * \brief Set a pointer to a value atomically.
+ *
+ * \return The previous value of the pointer.
+ */
+extern DECLSPEC void* SDLCALL SDL_AtomicSetPtr(void **a, void* v);
+
+/**
+ * \brief Get the value of a pointer atomically.
+ */
+extern DECLSPEC void* SDLCALL SDL_AtomicGetPtr(void **a);
+
+/* Ends C function definitions when using C++ */
+#ifdef __cplusplus
+}
+#endif
+
+#include "close_code.h"
+
+#endif /* _SDL_atomic_h_ */
+
+/* vi: set ts=4 sw=4 expandtab: */
diff --git a/include/SDL2/SDL_audio.h b/include/SDL2/SDL_audio.h
new file mode 100644 (file)
index 0000000..4c987d5
--- /dev/null
@@ -0,0 +1,506 @@
+/*
+  Simple DirectMedia Layer
+  Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
+
+  This software is provided 'as-is', without any express or implied
+  warranty.  In no event will the authors be held liable for any damages
+  arising from the use of this software.
+
+  Permission is granted to anyone to use this software for any purpose,
+  including commercial applications, and to alter it and redistribute it
+  freely, subject to the following restrictions:
+
+  1. The origin of this software must not be misrepresented; you must not
+     claim that you wrote the original software. If you use this software
+     in a product, an acknowledgment in the product documentation would be
+     appreciated but is not required.
+  2. Altered source versions must be plainly marked as such, and must not be
+     misrepresented as being the original software.
+  3. This notice may not be removed or altered from any source distribution.
+*/
+
+/**
+ *  \file SDL_audio.h
+ *
+ *  Access to the raw audio mixing buffer for the SDL library.
+ */
+
+#ifndef _SDL_audio_h
+#define _SDL_audio_h
+
+#include "SDL_stdinc.h"
+#include "SDL_error.h"
+#include "SDL_endian.h"
+#include "SDL_mutex.h"
+#include "SDL_thread.h"
+#include "SDL_rwops.h"
+
+#include "begin_code.h"
+/* Set up for C function definitions, even when using C++ */
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ *  \brief Audio format flags.
+ *
+ *  These are what the 16 bits in SDL_AudioFormat currently mean...
+ *  (Unspecified bits are always zero).
+ *
+ *  \verbatim
+    ++-----------------------sample is signed if set
+    ||
+    ||       ++-----------sample is bigendian if set
+    ||       ||
+    ||       ||          ++---sample is float if set
+    ||       ||          ||
+    ||       ||          || +---sample bit size---+
+    ||       ||          || |                     |
+    15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00
+    \endverbatim
+ *
+ *  There are macros in SDL 2.0 and later to query these bits.
+ */
+typedef Uint16 SDL_AudioFormat;
+
+/**
+ *  \name Audio flags
+ */
+/* @{ */
+
+#define SDL_AUDIO_MASK_BITSIZE       (0xFF)
+#define SDL_AUDIO_MASK_DATATYPE      (1<<8)
+#define SDL_AUDIO_MASK_ENDIAN        (1<<12)
+#define SDL_AUDIO_MASK_SIGNED        (1<<15)
+#define SDL_AUDIO_BITSIZE(x)         (x & SDL_AUDIO_MASK_BITSIZE)
+#define SDL_AUDIO_ISFLOAT(x)         (x & SDL_AUDIO_MASK_DATATYPE)
+#define SDL_AUDIO_ISBIGENDIAN(x)     (x & SDL_AUDIO_MASK_ENDIAN)
+#define SDL_AUDIO_ISSIGNED(x)        (x & SDL_AUDIO_MASK_SIGNED)
+#define SDL_AUDIO_ISINT(x)           (!SDL_AUDIO_ISFLOAT(x))
+#define SDL_AUDIO_ISLITTLEENDIAN(x)  (!SDL_AUDIO_ISBIGENDIAN(x))
+#define SDL_AUDIO_ISUNSIGNED(x)      (!SDL_AUDIO_ISSIGNED(x))
+
+/**
+ *  \name Audio format flags
+ *
+ *  Defaults to LSB byte order.
+ */
+/* @{ */
+#define AUDIO_U8        0x0008  /**< Unsigned 8-bit samples */
+#define AUDIO_S8        0x8008  /**< Signed 8-bit samples */
+#define AUDIO_U16LSB    0x0010  /**< Unsigned 16-bit samples */
+#define AUDIO_S16LSB    0x8010  /**< Signed 16-bit samples */
+#define AUDIO_U16MSB    0x1010  /**< As above, but big-endian byte order */
+#define AUDIO_S16MSB    0x9010  /**< As above, but big-endian byte order */
+#define AUDIO_U16       AUDIO_U16LSB
+#define AUDIO_S16       AUDIO_S16LSB
+/* @} */
+
+/**
+ *  \name int32 support
+ */
+/* @{ */
+#define AUDIO_S32LSB    0x8020  /**< 32-bit integer samples */
+#define AUDIO_S32MSB    0x9020  /**< As above, but big-endian byte order */
+#define AUDIO_S32       AUDIO_S32LSB
+/* @} */
+
+/**
+ *  \name float32 support
+ */
+/* @{ */
+#define AUDIO_F32LSB    0x8120  /**< 32-bit floating point samples */
+#define AUDIO_F32MSB    0x9120  /**< As above, but big-endian byte order */
+#define AUDIO_F32       AUDIO_F32LSB
+/* @} */
+
+/**
+ *  \name Native audio byte ordering
+ */
+/* @{ */
+#if SDL_BYTEORDER == SDL_LIL_ENDIAN
+#define AUDIO_U16SYS    AUDIO_U16LSB
+#define AUDIO_S16SYS    AUDIO_S16LSB
+#define AUDIO_S32SYS    AUDIO_S32LSB
+#define AUDIO_F32SYS    AUDIO_F32LSB
+#else
+#define AUDIO_U16SYS    AUDIO_U16MSB
+#define AUDIO_S16SYS    AUDIO_S16MSB
+#define AUDIO_S32SYS    AUDIO_S32MSB
+#define AUDIO_F32SYS    AUDIO_F32MSB
+#endif
+/* @} */
+
+/**
+ *  \name Allow change flags
+ *
+ *  Which audio format changes are allowed when opening a device.
+ */
+/* @{ */
+#define SDL_AUDIO_ALLOW_FREQUENCY_CHANGE    0x00000001
+#define SDL_AUDIO_ALLOW_FORMAT_CHANGE       0x00000002
+#define SDL_AUDIO_ALLOW_CHANNELS_CHANGE     0x00000004
+#define SDL_AUDIO_ALLOW_ANY_CHANGE          (SDL_AUDIO_ALLOW_FREQUENCY_CHANGE|SDL_AUDIO_ALLOW_FORMAT_CHANGE|SDL_AUDIO_ALLOW_CHANNELS_CHANGE)
+/* @} */
+
+/* @} *//* Audio flags */
+
+/**
+ *  This function is called when the audio device needs more data.
+ *
+ *  \param userdata An application-specific parameter saved in
+ *                  the SDL_AudioSpec structure
+ *  \param stream A pointer to the audio data buffer.
+ *  \param len    The length of that buffer in bytes.
+ *
+ *  Once the callback returns, the buffer will no longer be valid.
+ *  Stereo samples are stored in a LRLRLR ordering.
+ */
+typedef void (SDLCALL * SDL_AudioCallback) (void *userdata, Uint8 * stream,
+                                            int len);
+
+/**
+ *  The calculated values in this structure are calculated by SDL_OpenAudio().
+ */
+typedef struct SDL_AudioSpec
+{
+    int freq;                   /**< DSP frequency -- samples per second */
+    SDL_AudioFormat format;     /**< Audio data format */
+    Uint8 channels;             /**< Number of channels: 1 mono, 2 stereo */
+    Uint8 silence;              /**< Audio buffer silence value (calculated) */
+    Uint16 samples;             /**< Audio buffer size in samples (power of 2) */
+    Uint16 padding;             /**< Necessary for some compile environments */
+    Uint32 size;                /**< Audio buffer size in bytes (calculated) */
+    SDL_AudioCallback callback;
+    void *userdata;
+} SDL_AudioSpec;
+
+
+struct SDL_AudioCVT;
+typedef void (SDLCALL * SDL_AudioFilter) (struct SDL_AudioCVT * cvt,
+                                          SDL_AudioFormat format);
+
+/**
+ *  A structure to hold a set of audio conversion filters and buffers.
+ */
+#ifdef __GNUC__
+/* This structure is 84 bytes on 32-bit architectures, make sure GCC doesn't
+   pad it out to 88 bytes to guarantee ABI compatibility between compilers.
+   vvv
+   The next time we rev the ABI, make sure to size the ints and add padding.
+*/
+#define SDL_AUDIOCVT_PACKED __attribute__((packed))
+#else
+#define SDL_AUDIOCVT_PACKED
+#endif
+/* */
+typedef struct SDL_AudioCVT
+{
+    int needed;                 /**< Set to 1 if conversion possible */
+    SDL_AudioFormat src_format; /**< Source audio format */
+    SDL_AudioFormat dst_format; /**< Target audio format */
+    double rate_incr;           /**< Rate conversion increment */
+    Uint8 *buf;                 /**< Buffer to hold entire audio data */
+    int len;                    /**< Length of original audio buffer */
+    int len_cvt;                /**< Length of converted audio buffer */
+    int len_mult;               /**< buffer must be len*len_mult big */
+    double len_ratio;           /**< Given len, final size is len*len_ratio */
+    SDL_AudioFilter filters[10];        /**< Filter list */
+    int filter_index;           /**< Current audio conversion function */
+} SDL_AUDIOCVT_PACKED SDL_AudioCVT;
+
+
+/* Function prototypes */
+
+/**
+ *  \name Driver discovery functions
+ *
+ *  These functions return the list of built in audio drivers, in the
+ *  order that they are normally initialized by default.
+ */
+/* @{ */
+extern DECLSPEC int SDLCALL SDL_GetNumAudioDrivers(void);
+extern DECLSPEC const char *SDLCALL SDL_GetAudioDriver(int index);
+/* @} */
+
+/**
+ *  \name Initialization and cleanup
+ *
+ *  \internal These functions are used internally, and should not be used unless
+ *            you have a specific need to specify the audio driver you want to
+ *            use.  You should normally use SDL_Init() or SDL_InitSubSystem().
+ */
+/* @{ */
+extern DECLSPEC int SDLCALL SDL_AudioInit(const char *driver_name);
+extern DECLSPEC void SDLCALL SDL_AudioQuit(void);
+/* @} */
+
+/**
+ *  This function returns the name of the current audio driver, or NULL
+ *  if no driver has been initialized.
+ */
+extern DECLSPEC const char *SDLCALL SDL_GetCurrentAudioDriver(void);
+
+/**
+ *  This function opens the audio device with the desired parameters, and
+ *  returns 0 if successful, placing the actual hardware parameters in the
+ *  structure pointed to by \c obtained.  If \c obtained is NULL, the audio
+ *  data passed to the callback function will be guaranteed to be in the
+ *  requested format, and will be automatically converted to the hardware
+ *  audio format if necessary.  This function returns -1 if it failed
+ *  to open the audio device, or couldn't set up the audio thread.
+ *
+ *  When filling in the desired audio spec structure,
+ *    - \c desired->freq should be the desired audio frequency in samples-per-
+ *      second.
+ *    - \c desired->format should be the desired audio format.
+ *    - \c desired->samples is the desired size of the audio buffer, in
+ *      samples.  This number should be a power of two, and may be adjusted by
+ *      the audio driver to a value more suitable for the hardware.  Good values
+ *      seem to range between 512 and 8096 inclusive, depending on the
+ *      application and CPU speed.  Smaller values yield faster response time,
+ *      but can lead to underflow if the application is doing heavy processing
+ *      and cannot fill the audio buffer in time.  A stereo sample consists of
+ *      both right and left channels in LR ordering.
+ *      Note that the number of samples is directly related to time by the
+ *      following formula:  \code ms = (samples*1000)/freq \endcode
+ *    - \c desired->size is the size in bytes of the audio buffer, and is
+ *      calculated by SDL_OpenAudio().
+ *    - \c desired->silence is the value used to set the buffer to silence,
+ *      and is calculated by SDL_OpenAudio().
+ *    - \c desired->callback should be set to a function that will be called
+ *      when the audio device is ready for more data.  It is passed a pointer
+ *      to the audio buffer, and the length in bytes of the audio buffer.
+ *      This function usually runs in a separate thread, and so you should
+ *      protect data structures that it accesses by calling SDL_LockAudio()
+ *      and SDL_UnlockAudio() in your code.
+ *    - \c desired->userdata is passed as the first parameter to your callback
+ *      function.
+ *
+ *  The audio device starts out playing silence when it's opened, and should
+ *  be enabled for playing by calling \c SDL_PauseAudio(0) when you are ready
+ *  for your audio callback function to be called.  Since the audio driver
+ *  may modify the requested size of the audio buffer, you should allocate
+ *  any local mixing buffers after you open the audio device.
+ */
+extern DECLSPEC int SDLCALL SDL_OpenAudio(SDL_AudioSpec * desired,
+                                          SDL_AudioSpec * obtained);
+
+/**
+ *  SDL Audio Device IDs.
+ *
+ *  A successful call to SDL_OpenAudio() is always device id 1, and legacy
+ *  SDL audio APIs assume you want this device ID. SDL_OpenAudioDevice() calls
+ *  always returns devices >= 2 on success. The legacy calls are good both
+ *  for backwards compatibility and when you don't care about multiple,
+ *  specific, or capture devices.
+ */
+typedef Uint32 SDL_AudioDeviceID;
+
+/**
+ *  Get the number of available devices exposed by the current driver.
+ *  Only valid after a successfully initializing the audio subsystem.
+ *  Returns -1 if an explicit list of devices can't be determined; this is
+ *  not an error. For example, if SDL is set up to talk to a remote audio
+ *  server, it can't list every one available on the Internet, but it will
+ *  still allow a specific host to be specified to SDL_OpenAudioDevice().
+ *
+ *  In many common cases, when this function returns a value <= 0, it can still
+ *  successfully open the default device (NULL for first argument of
+ *  SDL_OpenAudioDevice()).
+ */
+extern DECLSPEC int SDLCALL SDL_GetNumAudioDevices(int iscapture);
+
+/**
+ *  Get the human-readable name of a specific audio device.
+ *  Must be a value between 0 and (number of audio devices-1).
+ *  Only valid after a successfully initializing the audio subsystem.
+ *  The values returned by this function reflect the latest call to
+ *  SDL_GetNumAudioDevices(); recall that function to redetect available
+ *  hardware.
+ *
+ *  The string returned by this function is UTF-8 encoded, read-only, and
+ *  managed internally. You are not to free it. If you need to keep the
+ *  string for any length of time, you should make your own copy of it, as it
+ *  will be invalid next time any of several other SDL functions is called.
+ */
+extern DECLSPEC const char *SDLCALL SDL_GetAudioDeviceName(int index,
+                                                           int iscapture);
+
+
+/**
+ *  Open a specific audio device. Passing in a device name of NULL requests
+ *  the most reasonable default (and is equivalent to calling SDL_OpenAudio()).
+ *
+ *  The device name is a UTF-8 string reported by SDL_GetAudioDeviceName(), but
+ *  some drivers allow arbitrary and driver-specific strings, such as a
+ *  hostname/IP address for a remote audio server, or a filename in the
+ *  diskaudio driver.
+ *
+ *  \return 0 on error, a valid device ID that is >= 2 on success.
+ *
+ *  SDL_OpenAudio(), unlike this function, always acts on device ID 1.
+ */
+extern DECLSPEC SDL_AudioDeviceID SDLCALL SDL_OpenAudioDevice(const char
+                                                              *device,
+                                                              int iscapture,
+                                                              const
+                                                              SDL_AudioSpec *
+                                                              desired,
+                                                              SDL_AudioSpec *
+                                                              obtained,
+                                                              int
+                                                              allowed_changes);
+
+
+
+/**
+ *  \name Audio state
+ *
+ *  Get the current audio state.
+ */
+/* @{ */
+typedef enum
+{
+    SDL_AUDIO_STOPPED = 0,
+    SDL_AUDIO_PLAYING,
+    SDL_AUDIO_PAUSED
+} SDL_AudioStatus;
+extern DECLSPEC SDL_AudioStatus SDLCALL SDL_GetAudioStatus(void);
+
+extern DECLSPEC SDL_AudioStatus SDLCALL
+SDL_GetAudioDeviceStatus(SDL_AudioDeviceID dev);
+/* @} *//* Audio State */
+
+/**
+ *  \name Pause audio functions
+ *
+ *  These functions pause and unpause the audio callback processing.
+ *  They should be called with a parameter of 0 after opening the audio
+ *  device to start playing sound.  This is so you can safely initialize
+ *  data for your callback function after opening the audio device.
+ *  Silence will be written to the audio device during the pause.
+ */
+/* @{ */
+extern DECLSPEC void SDLCALL SDL_PauseAudio(int pause_on);
+extern DECLSPEC void SDLCALL SDL_PauseAudioDevice(SDL_AudioDeviceID dev,
+                                                  int pause_on);
+/* @} *//* Pause audio functions */
+
+/**
+ *  This function loads a WAVE from the data source, automatically freeing
+ *  that source if \c freesrc is non-zero.  For example, to load a WAVE file,
+ *  you could do:
+ *  \code
+ *      SDL_LoadWAV_RW(SDL_RWFromFile("sample.wav", "rb"), 1, ...);
+ *  \endcode
+ *
+ *  If this function succeeds, it returns the given SDL_AudioSpec,
+ *  filled with the audio data format of the wave data, and sets
+ *  \c *audio_buf to a malloc()'d buffer containing the audio data,
+ *  and sets \c *audio_len to the length of that audio buffer, in bytes.
+ *  You need to free the audio buffer with SDL_FreeWAV() when you are
+ *  done with it.
+ *
+ *  This function returns NULL and sets the SDL error message if the
+ *  wave file cannot be opened, uses an unknown data format, or is
+ *  corrupt.  Currently raw and MS-ADPCM WAVE files are supported.
+ */
+extern DECLSPEC SDL_AudioSpec *SDLCALL SDL_LoadWAV_RW(SDL_RWops * src,
+                                                      int freesrc,
+                                                      SDL_AudioSpec * spec,
+                                                      Uint8 ** audio_buf,
+                                                      Uint32 * audio_len);
+
+/**
+ *  Loads a WAV from a file.
+ *  Compatibility convenience function.
+ */
+#define SDL_LoadWAV(file, spec, audio_buf, audio_len) \
+    SDL_LoadWAV_RW(SDL_RWFromFile(file, "rb"),1, spec,audio_buf,audio_len)
+
+/**
+ *  This function frees data previously allocated with SDL_LoadWAV_RW()
+ */
+extern DECLSPEC void SDLCALL SDL_FreeWAV(Uint8 * audio_buf);
+
+/**
+ *  This function takes a source format and rate and a destination format
+ *  and rate, and initializes the \c cvt structure with information needed
+ *  by SDL_ConvertAudio() to convert a buffer of audio data from one format
+ *  to the other.
+ *
+ *  \return -1 if the format conversion is not supported, 0 if there's
+ *  no conversion needed, or 1 if the audio filter is set up.
+ */
+extern DECLSPEC int SDLCALL SDL_BuildAudioCVT(SDL_AudioCVT * cvt,
+                                              SDL_AudioFormat src_format,
+                                              Uint8 src_channels,
+                                              int src_rate,
+                                              SDL_AudioFormat dst_format,
+                                              Uint8 dst_channels,
+                                              int dst_rate);
+
+/**
+ *  Once you have initialized the \c cvt structure using SDL_BuildAudioCVT(),
+ *  created an audio buffer \c cvt->buf, and filled it with \c cvt->len bytes of
+ *  audio data in the source format, this function will convert it in-place
+ *  to the desired format.
+ *
+ *  The data conversion may expand the size of the audio data, so the buffer
+ *  \c cvt->buf should be allocated after the \c cvt structure is initialized by
+ *  SDL_BuildAudioCVT(), and should be \c cvt->len*cvt->len_mult bytes long.
+ */
+extern DECLSPEC int SDLCALL SDL_ConvertAudio(SDL_AudioCVT * cvt);
+
+#define SDL_MIX_MAXVOLUME 128
+/**
+ *  This takes two audio buffers of the playing audio format and mixes
+ *  them, performing addition, volume adjustment, and overflow clipping.
+ *  The volume ranges from 0 - 128, and should be set to ::SDL_MIX_MAXVOLUME
+ *  for full audio volume.  Note this does not change hardware volume.
+ *  This is provided for convenience -- you can mix your own audio data.
+ */
+extern DECLSPEC void SDLCALL SDL_MixAudio(Uint8 * dst, const Uint8 * src,
+                                          Uint32 len, int volume);
+
+/**
+ *  This works like SDL_MixAudio(), but you specify the audio format instead of
+ *  using the format of audio device 1. Thus it can be used when no audio
+ *  device is open at all.
+ */
+extern DECLSPEC void SDLCALL SDL_MixAudioFormat(Uint8 * dst,
+                                                const Uint8 * src,
+                                                SDL_AudioFormat format,
+                                                Uint32 len, int volume);
+
+/**
+ *  \name Audio lock functions
+ *
+ *  The lock manipulated by these functions protects the callback function.
+ *  During a SDL_LockAudio()/SDL_UnlockAudio() pair, you can be guaranteed that
+ *  the callback function is not running.  Do not call these from the callback
+ *  function or you will cause deadlock.
+ */
+/* @{ */
+extern DECLSPEC void SDLCALL SDL_LockAudio(void);
+extern DECLSPEC void SDLCALL SDL_LockAudioDevice(SDL_AudioDeviceID dev);
+extern DECLSPEC void SDLCALL SDL_UnlockAudio(void);
+extern DECLSPEC void SDLCALL SDL_UnlockAudioDevice(SDL_AudioDeviceID dev);
+/* @} *//* Audio lock functions */
+
+/**
+ *  This function shuts down audio processing and closes the audio device.
+ */
+extern DECLSPEC void SDLCALL SDL_CloseAudio(void);
+extern DECLSPEC void SDLCALL SDL_CloseAudioDevice(SDL_AudioDeviceID dev);
+
+/* Ends C function definitions when using C++ */
+#ifdef __cplusplus
+}
+#endif
+#include "close_code.h"
+
+#endif /* _SDL_audio_h */
+
+/* vi: set ts=4 sw=4 expandtab: */
diff --git a/include/SDL2/SDL_bits.h b/include/SDL2/SDL_bits.h
new file mode 100644 (file)
index 0000000..341524f
--- /dev/null
@@ -0,0 +1,97 @@
+/*
+  Simple DirectMedia Layer
+  Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
+
+  This software is provided 'as-is', without any express or implied
+  warranty.  In no event will the authors be held liable for any damages
+  arising from the use of this software.
+
+  Permission is granted to anyone to use this software for any purpose,
+  including commercial applications, and to alter it and redistribute it
+  freely, subject to the following restrictions:
+
+  1. The origin of this software must not be misrepresented; you must not
+     claim that you wrote the original software. If you use this software
+     in a product, an acknowledgment in the product documentation would be
+     appreciated but is not required.
+  2. Altered source versions must be plainly marked as such, and must not be
+     misrepresented as being the original software.
+  3. This notice may not be removed or altered from any source distribution.
+*/
+
+/**
+ *  \file SDL_bits.h
+ *
+ *  Functions for fiddling with bits and bitmasks.
+ */
+
+#ifndef _SDL_bits_h
+#define _SDL_bits_h
+
+#include "SDL_stdinc.h"
+
+#include "begin_code.h"
+/* Set up for C function definitions, even when using C++ */
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ *  \file SDL_bits.h
+ */
+
+/**
+ *  Get the index of the most significant bit. Result is undefined when called
+ *  with 0. This operation can also be stated as "count leading zeroes" and
+ *  "log base 2".
+ *
+ *  \return Index of the most significant bit, or -1 if the value is 0.
+ */
+SDL_FORCE_INLINE int
+SDL_MostSignificantBitIndex32(Uint32 x)
+{
+#if defined(__GNUC__) && __GNUC__ >= 4
+    /* Count Leading Zeroes builtin in GCC.
+     * http://gcc.gnu.org/onlinedocs/gcc-4.3.4/gcc/Other-Builtins.html
+     */
+    if (x == 0) {
+        return -1;
+    }
+    return 31 - __builtin_clz(x);
+#else
+    /* Based off of Bit Twiddling Hacks by Sean Eron Anderson
+     * <seander@cs.stanford.edu>, released in the public domain.
+     * http://graphics.stanford.edu/~seander/bithacks.html#IntegerLog
+     */
+    const Uint32 b[] = {0x2, 0xC, 0xF0, 0xFF00, 0xFFFF0000};
+    const int    S[] = {1, 2, 4, 8, 16};
+
+    int msbIndex = 0;
+    int i;
+
+    if (x == 0) {
+        return -1;
+    }
+
+    for (i = 4; i >= 0; i--)
+    {
+        if (x & b[i])
+        {
+            x >>= S[i];
+            msbIndex |= S[i];
+        }
+    }
+
+    return msbIndex;
+#endif
+}
+
+/* Ends C function definitions when using C++ */
+#ifdef __cplusplus
+}
+#endif
+#include "close_code.h"
+
+#endif /* _SDL_bits_h */
+
+/* vi: set ts=4 sw=4 expandtab: */
diff --git a/include/SDL2/SDL_blendmode.h b/include/SDL2/SDL_blendmode.h
new file mode 100644 (file)
index 0000000..8c257be
--- /dev/null
@@ -0,0 +1,63 @@
+/*
+  Simple DirectMedia Layer
+  Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
+
+  This software is provided 'as-is', without any express or implied
+  warranty.  In no event will the authors be held liable for any damages
+  arising from the use of this software.
+
+  Permission is granted to anyone to use this software for any purpose,
+  including commercial applications, and to alter it and redistribute it
+  freely, subject to the following restrictions:
+
+  1. The origin of this software must not be misrepresented; you must not
+     claim that you wrote the original software. If you use this software
+     in a product, an acknowledgment in the product documentation would be
+     appreciated but is not required.
+  2. Altered source versions must be plainly marked as such, and must not be
+     misrepresented as being the original software.
+  3. This notice may not be removed or altered from any source distribution.
+*/
+
+/**
+ *  \file SDL_blendmode.h
+ *
+ *  Header file declaring the SDL_BlendMode enumeration
+ */
+
+#ifndef _SDL_blendmode_h
+#define _SDL_blendmode_h
+
+#include "begin_code.h"
+/* Set up for C function definitions, even when using C++ */
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ *  \brief The blend mode used in SDL_RenderCopy() and drawing operations.
+ */
+typedef enum
+{
+    SDL_BLENDMODE_NONE = 0x00000000,     /**< no blending
+                                              dstRGBA = srcRGBA */
+    SDL_BLENDMODE_BLEND = 0x00000001,    /**< alpha blending
+                                              dstRGB = (srcRGB * srcA) + (dstRGB * (1-srcA))
+                                              dstA = srcA + (dstA * (1-srcA)) */
+    SDL_BLENDMODE_ADD = 0x00000002,      /**< additive blending
+                                              dstRGB = (srcRGB * srcA) + dstRGB
+                                              dstA = dstA */
+    SDL_BLENDMODE_MOD = 0x00000004       /**< color modulate
+                                              dstRGB = srcRGB * dstRGB
+                                              dstA = dstA */
+} SDL_BlendMode;
+
+/* Ends C function definitions when using C++ */
+#ifdef __cplusplus
+}
+#endif
+#include "close_code.h"
+
+#endif /* _SDL_video_h */
+
+/* vi: set ts=4 sw=4 expandtab: */
diff --git a/include/SDL2/SDL_clipboard.h b/include/SDL2/SDL_clipboard.h
new file mode 100644 (file)
index 0000000..74e2b32
--- /dev/null
@@ -0,0 +1,71 @@
+/*
+  Simple DirectMedia Layer
+  Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
+
+  This software is provided 'as-is', without any express or implied
+  warranty.  In no event will the authors be held liable for any damages
+  arising from the use of this software.
+
+  Permission is granted to anyone to use this software for any purpose,
+  including commercial applications, and to alter it and redistribute it
+  freely, subject to the following restrictions:
+
+  1. The origin of this software must not be misrepresented; you must not
+     claim that you wrote the original software. If you use this software
+     in a product, an acknowledgment in the product documentation would be
+     appreciated but is not required.
+  2. Altered source versions must be plainly marked as such, and must not be
+     misrepresented as being the original software.
+  3. This notice may not be removed or altered from any source distribution.
+*/
+
+/**
+ * \file SDL_clipboard.h
+ *
+ * Include file for SDL clipboard handling
+ */
+
+#ifndef _SDL_clipboard_h
+#define _SDL_clipboard_h
+
+#include "SDL_stdinc.h"
+
+#include "begin_code.h"
+/* Set up for C function definitions, even when using C++ */
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Function prototypes */
+
+/**
+ * \brief Put UTF-8 text into the clipboard
+ *
+ * \sa SDL_GetClipboardText()
+ */
+extern DECLSPEC int SDLCALL SDL_SetClipboardText(const char *text);
+
+/**
+ * \brief Get UTF-8 text from the clipboard, which must be freed with SDL_free()
+ *
+ * \sa SDL_SetClipboardText()
+ */
+extern DECLSPEC char * SDLCALL SDL_GetClipboardText(void);
+
+/**
+ * \brief Returns a flag indicating whether the clipboard exists and contains a text string that is non-empty
+ *
+ * \sa SDL_GetClipboardText()
+ */
+extern DECLSPEC SDL_bool SDLCALL SDL_HasClipboardText(void);
+
+
+/* Ends C function definitions when using C++ */
+#ifdef __cplusplus
+}
+#endif
+#include "close_code.h"
+
+#endif /* _SDL_clipboard_h */
+
+/* vi: set ts=4 sw=4 expandtab: */
diff --git a/include/SDL2/SDL_config.h b/include/SDL2/SDL_config.h
new file mode 100644 (file)
index 0000000..35eda46
--- /dev/null
@@ -0,0 +1,210 @@
+/*
+  Simple DirectMedia Layer
+  Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
+
+  This software is provided 'as-is', without any express or implied
+  warranty.  In no event will the authors be held liable for any damages
+  arising from the use of this software.
+
+  Permission is granted to anyone to use this software for any purpose,
+  including commercial applications, and to alter it and redistribute it
+  freely, subject to the following restrictions:
+
+  1. The origin of this software must not be misrepresented; you must not
+     claim that you wrote the original software. If you use this software
+     in a product, an acknowledgment in the product documentation would be
+     appreciated but is not required.
+  2. Altered source versions must be plainly marked as such, and must not be
+     misrepresented as being the original software.
+  3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef _SDL_config_windows_h
+#define _SDL_config_windows_h
+
+#include "SDL_platform.h"
+
+/* This is a set of defines to configure the SDL features */
+
+#if !defined(_STDINT_H_) && (!defined(HAVE_STDINT_H) || !_HAVE_STDINT_H)
+#if defined(__GNUC__) || defined(__DMC__) || defined(__WATCOMC__)
+#define HAVE_STDINT_H   1
+#elif defined(_MSC_VER)
+typedef signed __int8 int8_t;
+typedef unsigned __int8 uint8_t;
+typedef signed __int16 int16_t;
+typedef unsigned __int16 uint16_t;
+typedef signed __int32 int32_t;
+typedef unsigned __int32 uint32_t;
+typedef signed __int64 int64_t;
+typedef unsigned __int64 uint64_t;
+#ifndef _UINTPTR_T_DEFINED
+#ifdef  _WIN64
+typedef unsigned __int64 uintptr_t;
+#else
+typedef unsigned int uintptr_t;
+#endif
+#define _UINTPTR_T_DEFINED
+#endif
+/* Older Visual C++ headers don't have the Win64-compatible typedefs... */
+#if ((_MSC_VER <= 1200) && (!defined(DWORD_PTR)))
+#define DWORD_PTR DWORD
+#endif
+#if ((_MSC_VER <= 1200) && (!defined(LONG_PTR)))
+#define LONG_PTR LONG
+#endif
+#else /* !__GNUC__ && !_MSC_VER */
+typedef signed char int8_t;
+typedef unsigned char uint8_t;
+typedef signed short int16_t;
+typedef unsigned short uint16_t;
+typedef signed int int32_t;
+typedef unsigned int uint32_t;
+typedef signed long long int64_t;
+typedef unsigned long long uint64_t;
+#ifndef _SIZE_T_DEFINED_
+#define _SIZE_T_DEFINED_
+typedef unsigned int size_t;
+#endif
+typedef unsigned int uintptr_t;
+#endif /* __GNUC__ || _MSC_VER */
+#endif /* !_STDINT_H_ && !HAVE_STDINT_H */
+
+#ifdef _WIN64
+# define SIZEOF_VOIDP 8
+#else
+# define SIZEOF_VOIDP 4
+#endif
+
+/* This is disabled by default to avoid C runtime dependencies and manifest requirements */
+#ifdef HAVE_LIBC
+/* Useful headers */
+#define HAVE_STDIO_H 1
+#define STDC_HEADERS 1
+#define HAVE_STRING_H 1
+#define HAVE_CTYPE_H 1
+#define HAVE_MATH_H 1
+#define HAVE_SIGNAL_H 1
+
+/* C library functions */
+#define HAVE_MALLOC 1
+#define HAVE_CALLOC 1
+#define HAVE_REALLOC 1
+#define HAVE_FREE 1
+#define HAVE_ALLOCA 1
+#define HAVE_QSORT 1
+#define HAVE_ABS 1
+#define HAVE_MEMSET 1
+#define HAVE_MEMCPY 1
+#define HAVE_MEMMOVE 1
+#define HAVE_MEMCMP 1
+#define HAVE_STRLEN 1
+#define HAVE__STRREV 1
+#define HAVE__STRUPR 1
+#define HAVE__STRLWR 1
+#define HAVE_STRCHR 1
+#define HAVE_STRRCHR 1
+#define HAVE_STRSTR 1
+#define HAVE__LTOA 1
+#define HAVE__ULTOA 1
+#define HAVE_STRTOL 1
+#define HAVE_STRTOUL 1
+#define HAVE_STRTOD 1
+#define HAVE_ATOI 1
+#define HAVE_ATOF 1
+#define HAVE_STRCMP 1
+#define HAVE_STRNCMP 1
+#define HAVE__STRICMP 1
+#define HAVE__STRNICMP 1
+#define HAVE_ATAN 1
+#define HAVE_ATAN2 1
+#define HAVE_ACOS  1
+#define HAVE_ASIN  1
+#define HAVE_CEIL 1
+#define HAVE_COS 1
+#define HAVE_COSF 1
+#define HAVE_FABS 1
+#define HAVE_FLOOR 1
+#define HAVE_LOG 1
+#define HAVE_POW 1
+#define HAVE_SIN 1
+#define HAVE_SINF 1
+#define HAVE_SQRT 1
+#if _MSC_VER >= 1800
+#define HAVE_STRTOLL 1
+#define HAVE_VSSCANF 1
+#define HAVE_COPYSIGN 1
+#define HAVE_SCALBN 1
+#endif
+#if !defined(_MSC_VER) || defined(_USE_MATH_DEFINES)
+#define HAVE_M_PI 1
+#endif
+#else
+#define HAVE_STDARG_H   1
+#define HAVE_STDDEF_H   1
+#endif
+
+/* Enable various audio drivers */
+#define SDL_AUDIO_DRIVER_DSOUND 1
+#define SDL_AUDIO_DRIVER_XAUDIO2    1
+#define SDL_AUDIO_DRIVER_WINMM  1
+#define SDL_AUDIO_DRIVER_DISK   1
+#define SDL_AUDIO_DRIVER_DUMMY  1
+
+/* Enable various input drivers */
+#define SDL_JOYSTICK_DINPUT 1
+#define SDL_HAPTIC_DINPUT   1
+
+/* Enable various shared object loading systems */
+#define SDL_LOADSO_WINDOWS  1
+
+/* Enable various threading systems */
+#define SDL_THREAD_WINDOWS  1
+
+/* Enable various timer systems */
+#define SDL_TIMER_WINDOWS   1
+
+/* Enable various video drivers */
+#define SDL_VIDEO_DRIVER_DUMMY  1
+#define SDL_VIDEO_DRIVER_WINDOWS    1
+
+#ifndef SDL_VIDEO_RENDER_D3D
+#define SDL_VIDEO_RENDER_D3D    1
+#endif
+#ifndef SDL_VIDEO_RENDER_D3D11
+#define SDL_VIDEO_RENDER_D3D11 0
+#endif
+
+/* Enable OpenGL support */
+#ifndef SDL_VIDEO_OPENGL
+#define SDL_VIDEO_OPENGL    1
+#endif
+#ifndef SDL_VIDEO_OPENGL_WGL
+#define SDL_VIDEO_OPENGL_WGL    1
+#endif
+#ifndef SDL_VIDEO_RENDER_OGL
+#define SDL_VIDEO_RENDER_OGL    1
+#endif
+#ifndef SDL_VIDEO_RENDER_OGL_ES2
+#define SDL_VIDEO_RENDER_OGL_ES2    1
+#endif
+#ifndef SDL_VIDEO_OPENGL_ES2
+#define SDL_VIDEO_OPENGL_ES2    1
+#endif
+#ifndef SDL_VIDEO_OPENGL_EGL
+#define SDL_VIDEO_OPENGL_EGL    1
+#endif
+
+
+/* Enable system power support */
+#define SDL_POWER_WINDOWS 1
+
+/* Enable filesystem support */
+#define SDL_FILESYSTEM_WINDOWS  1
+
+/* Enable assembly routines (Win64 doesn't have inline asm) */
+#ifndef _WIN64
+#define SDL_ASSEMBLY_ROUTINES   1
+#endif
+
+#endif /* _SDL_config_windows_h */
diff --git a/include/SDL2/SDL_cpuinfo.h b/include/SDL2/SDL_cpuinfo.h
new file mode 100644 (file)
index 0000000..1f6efd3
--- /dev/null
@@ -0,0 +1,156 @@
+/*
+  Simple DirectMedia Layer
+  Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
+
+  This software is provided 'as-is', without any express or implied
+  warranty.  In no event will the authors be held liable for any damages
+  arising from the use of this software.
+
+  Permission is granted to anyone to use this software for any purpose,
+  including commercial applications, and to alter it and redistribute it
+  freely, subject to the following restrictions:
+
+  1. The origin of this software must not be misrepresented; you must not
+     claim that you wrote the original software. If you use this software
+     in a product, an acknowledgment in the product documentation would be
+     appreciated but is not required.
+  2. Altered source versions must be plainly marked as such, and must not be
+     misrepresented as being the original software.
+  3. This notice may not be removed or altered from any source distribution.
+*/
+
+/**
+ *  \file SDL_cpuinfo.h
+ *
+ *  CPU feature detection for SDL.
+ */
+
+#ifndef _SDL_cpuinfo_h
+#define _SDL_cpuinfo_h
+
+#include "SDL_stdinc.h"
+
+/* Need to do this here because intrin.h has C++ code in it */
+/* Visual Studio 2005 has a bug where intrin.h conflicts with winnt.h */
+#if defined(_MSC_VER) && (_MSC_VER >= 1500) && (defined(_M_IX86) || defined(_M_X64))
+#include <intrin.h>
+#ifndef _WIN64
+#define __MMX__
+#define __3dNOW__
+#endif
+#define __SSE__
+#define __SSE2__
+#elif defined(__MINGW64_VERSION_MAJOR)
+#include <intrin.h>
+#else
+#ifdef __ALTIVEC__
+#if HAVE_ALTIVEC_H && !defined(__APPLE_ALTIVEC__)
+#include <altivec.h>
+#undef pixel
+#endif
+#endif
+#ifdef __MMX__
+#include <mmintrin.h>
+#endif
+#ifdef __3dNOW__
+#include <mm3dnow.h>
+#endif
+#ifdef __SSE__
+#include <xmmintrin.h>
+#endif
+#ifdef __SSE2__
+#include <emmintrin.h>
+#endif
+#endif
+
+#include "begin_code.h"
+/* Set up for C function definitions, even when using C++ */
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* This is a guess for the cacheline size used for padding.
+ * Most x86 processors have a 64 byte cache line.
+ * The 64-bit PowerPC processors have a 128 byte cache line.
+ * We'll use the larger value to be generally safe.
+ */
+#define SDL_CACHELINE_SIZE  128
+
+/**
+ *  This function returns the number of CPU cores available.
+ */
+extern DECLSPEC int SDLCALL SDL_GetCPUCount(void);
+
+/**
+ *  This function returns the L1 cache line size of the CPU
+ *
+ *  This is useful for determining multi-threaded structure padding
+ *  or SIMD prefetch sizes.
+ */
+extern DECLSPEC int SDLCALL SDL_GetCPUCacheLineSize(void);
+
+/**
+ *  This function returns true if the CPU has the RDTSC instruction.
+ */
+extern DECLSPEC SDL_bool SDLCALL SDL_HasRDTSC(void);
+
+/**
+ *  This function returns true if the CPU has AltiVec features.
+ */
+extern DECLSPEC SDL_bool SDLCALL SDL_HasAltiVec(void);
+
+/**
+ *  This function returns true if the CPU has MMX features.
+ */
+extern DECLSPEC SDL_bool SDLCALL SDL_HasMMX(void);
+
+/**
+ *  This function returns true if the CPU has 3DNow! features.
+ */
+extern DECLSPEC SDL_bool SDLCALL SDL_Has3DNow(void);
+
+/**
+ *  This function returns true if the CPU has SSE features.
+ */
+extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE(void);
+
+/**
+ *  This function returns true if the CPU has SSE2 features.
+ */
+extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE2(void);
+
+/**
+ *  This function returns true if the CPU has SSE3 features.
+ */
+extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE3(void);
+
+/**
+ *  This function returns true if the CPU has SSE4.1 features.
+ */
+extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE41(void);
+
+/**
+ *  This function returns true if the CPU has SSE4.2 features.
+ */
+extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE42(void);
+
+/**
+ *  This function returns true if the CPU has AVX features.
+ */
+extern DECLSPEC SDL_bool SDLCALL SDL_HasAVX(void);
+
+/**
+ *  This function returns the amount of RAM configured in the system, in MB.
+ */
+extern DECLSPEC int SDLCALL SDL_GetSystemRAM(void);
+
+
+/* Ends C function definitions when using C++ */
+#ifdef __cplusplus
+}
+#endif
+#include "close_code.h"
+
+#endif /* _SDL_cpuinfo_h */
+
+/* vi: set ts=4 sw=4 expandtab: */
diff --git a/include/SDL2/SDL_endian.h b/include/SDL2/SDL_endian.h
new file mode 100644 (file)
index 0000000..161c418
--- /dev/null
@@ -0,0 +1,239 @@
+/*
+  Simple DirectMedia Layer
+  Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
+
+  This software is provided 'as-is', without any express or implied
+  warranty.  In no event will the authors be held liable for any damages
+  arising from the use of this software.
+
+  Permission is granted to anyone to use this software for any purpose,
+  including commercial applications, and to alter it and redistribute it
+  freely, subject to the following restrictions:
+
+  1. The origin of this software must not be misrepresented; you must not
+     claim that you wrote the original software. If you use this software
+     in a product, an acknowledgment in the product documentation would be
+     appreciated but is not required.
+  2. Altered source versions must be plainly marked as such, and must not be
+     misrepresented as being the original software.
+  3. This notice may not be removed or altered from any source distribution.
+*/
+
+/**
+ *  \file SDL_endian.h
+ *
+ *  Functions for reading and writing endian-specific values
+ */
+
+#ifndef _SDL_endian_h
+#define _SDL_endian_h
+
+#include "SDL_stdinc.h"
+
+/**
+ *  \name The two types of endianness
+ */
+/* @{ */
+#define SDL_LIL_ENDIAN  1234
+#define SDL_BIG_ENDIAN  4321
+/* @} */
+
+#ifndef SDL_BYTEORDER           /* Not defined in SDL_config.h? */
+#ifdef __linux__
+#include <endian.h>
+#define SDL_BYTEORDER  __BYTE_ORDER
+#else /* __linux __ */
+#if defined(__hppa__) || \
+    defined(__m68k__) || defined(mc68000) || defined(_M_M68K) || \
+    (defined(__MIPS__) && defined(__MISPEB__)) || \
+    defined(__ppc__) || defined(__POWERPC__) || defined(_M_PPC) || \
+    defined(__sparc__)
+#define SDL_BYTEORDER   SDL_BIG_ENDIAN
+#else
+#define SDL_BYTEORDER   SDL_LIL_ENDIAN
+#endif
+#endif /* __linux __ */
+#endif /* !SDL_BYTEORDER */
+
+
+#include "begin_code.h"
+/* Set up for C function definitions, even when using C++ */
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ *  \file SDL_endian.h
+ */
+#if defined(__GNUC__) && defined(__i386__) && \
+   !(__GNUC__ == 2 && __GNUC_MINOR__ == 95 /* broken gcc version */)
+SDL_FORCE_INLINE Uint16
+SDL_Swap16(Uint16 x)
+{
+  __asm__("xchgb %b0,%h0": "=q"(x):"0"(x));
+    return x;
+}
+#elif defined(__GNUC__) && defined(__x86_64__)
+SDL_FORCE_INLINE Uint16
+SDL_Swap16(Uint16 x)
+{
+  __asm__("xchgb %b0,%h0": "=Q"(x):"0"(x));
+    return x;
+}
+#elif defined(__GNUC__) && (defined(__powerpc__) || defined(__ppc__))
+SDL_FORCE_INLINE Uint16
+SDL_Swap16(Uint16 x)
+{
+    int result;
+
+  __asm__("rlwimi %0,%2,8,16,23": "=&r"(result):"0"(x >> 8), "r"(x));
+    return (Uint16)result;
+}
+#elif defined(__GNUC__) && (defined(__M68000__) || defined(__M68020__)) && !defined(__mcoldfire__)
+SDL_FORCE_INLINE Uint16
+SDL_Swap16(Uint16 x)
+{
+  __asm__("rorw #8,%0": "=d"(x): "0"(x):"cc");
+    return x;
+}
+#else
+SDL_FORCE_INLINE Uint16
+SDL_Swap16(Uint16 x)
+{
+    return SDL_static_cast(Uint16, ((x << 8) | (x >> 8)));
+}
+#endif
+
+#if defined(__GNUC__) && defined(__i386__)
+SDL_FORCE_INLINE Uint32
+SDL_Swap32(Uint32 x)
+{
+  __asm__("bswap %0": "=r"(x):"0"(x));
+    return x;
+}
+#elif defined(__GNUC__) && defined(__x86_64__)
+SDL_FORCE_INLINE Uint32
+SDL_Swap32(Uint32 x)
+{
+  __asm__("bswapl %0": "=r"(x):"0"(x));
+    return x;
+}
+#elif defined(__GNUC__) && (defined(__powerpc__) || defined(__ppc__))
+SDL_FORCE_INLINE Uint32
+SDL_Swap32(Uint32 x)
+{
+    Uint32 result;
+
+  __asm__("rlwimi %0,%2,24,16,23": "=&r"(result):"0"(x >> 24), "r"(x));
+  __asm__("rlwimi %0,%2,8,8,15": "=&r"(result):"0"(result), "r"(x));
+  __asm__("rlwimi %0,%2,24,0,7": "=&r"(result):"0"(result), "r"(x));
+    return result;
+}
+#elif defined(__GNUC__) && (defined(__M68000__) || defined(__M68020__)) && !defined(__mcoldfire__)
+SDL_FORCE_INLINE Uint32
+SDL_Swap32(Uint32 x)
+{
+  __asm__("rorw #8,%0\n\tswap %0\n\trorw #8,%0": "=d"(x): "0"(x):"cc");
+    return x;
+}
+#else
+SDL_FORCE_INLINE Uint32
+SDL_Swap32(Uint32 x)
+{
+    return SDL_static_cast(Uint32, ((x << 24) | ((x << 8) & 0x00FF0000) |
+                                    ((x >> 8) & 0x0000FF00) | (x >> 24)));
+}
+#endif
+
+#if defined(__GNUC__) && defined(__i386__)
+SDL_FORCE_INLINE Uint64
+SDL_Swap64(Uint64 x)
+{
+    union
+    {
+        struct
+        {
+            Uint32 a, b;
+        } s;
+        Uint64 u;
+    } v;
+    v.u = x;
+  __asm__("bswapl %0 ; bswapl %1 ; xchgl %0,%1": "=r"(v.s.a), "=r"(v.s.b):"0"(v.s.a),
+            "1"(v.s.
+                b));
+    return v.u;
+}
+#elif defined(__GNUC__) && defined(__x86_64__)
+SDL_FORCE_INLINE Uint64
+SDL_Swap64(Uint64 x)
+{
+  __asm__("bswapq %0": "=r"(x):"0"(x));
+    return x;
+}
+#else
+SDL_FORCE_INLINE Uint64
+SDL_Swap64(Uint64 x)
+{
+    Uint32 hi, lo;
+
+    /* Separate into high and low 32-bit values and swap them */
+    lo = SDL_static_cast(Uint32, x & 0xFFFFFFFF);
+    x >>= 32;
+    hi = SDL_static_cast(Uint32, x & 0xFFFFFFFF);
+    x = SDL_Swap32(lo);
+    x <<= 32;
+    x |= SDL_Swap32(hi);
+    return (x);
+}
+#endif
+
+
+SDL_FORCE_INLINE float
+SDL_SwapFloat(float x)
+{
+    union
+    {
+        float f;
+        Uint32 ui32;
+    } swapper;
+    swapper.f = x;
+    swapper.ui32 = SDL_Swap32(swapper.ui32);
+    return swapper.f;
+}
+
+
+/**
+ *  \name Swap to native
+ *  Byteswap item from the specified endianness to the native endianness.
+ */
+/* @{ */
+#if SDL_BYTEORDER == SDL_LIL_ENDIAN
+#define SDL_SwapLE16(X) (X)
+#define SDL_SwapLE32(X) (X)
+#define SDL_SwapLE64(X) (X)
+#define SDL_SwapFloatLE(X)  (X)
+#define SDL_SwapBE16(X) SDL_Swap16(X)
+#define SDL_SwapBE32(X) SDL_Swap32(X)
+#define SDL_SwapBE64(X) SDL_Swap64(X)
+#define SDL_SwapFloatBE(X)  SDL_SwapFloat(X)
+#else
+#define SDL_SwapLE16(X) SDL_Swap16(X)
+#define SDL_SwapLE32(X) SDL_Swap32(X)
+#define SDL_SwapLE64(X) SDL_Swap64(X)
+#define SDL_SwapFloatLE(X)  SDL_SwapFloat(X)
+#define SDL_SwapBE16(X) (X)
+#define SDL_SwapBE32(X) (X)
+#define SDL_SwapBE64(X) (X)
+#define SDL_SwapFloatBE(X)  (X)
+#endif
+/* @} *//* Swap to native */
+
+/* Ends C function definitions when using C++ */
+#ifdef __cplusplus
+}
+#endif
+#include "close_code.h"
+
+#endif /* _SDL_endian_h */
+
+/* vi: set ts=4 sw=4 expandtab: */
diff --git a/include/SDL2/SDL_error.h b/include/SDL2/SDL_error.h
new file mode 100644 (file)
index 0000000..5776cfa
--- /dev/null
@@ -0,0 +1,76 @@
+/*
+  Simple DirectMedia Layer
+  Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
+
+  This software is provided 'as-is', without any express or implied
+  warranty.  In no event will the authors be held liable for any damages
+  arising from the use of this software.
+
+  Permission is granted to anyone to use this software for any purpose,
+  including commercial applications, and to alter it and redistribute it
+  freely, subject to the following restrictions:
+
+  1. The origin of this software must not be misrepresented; you must not
+     claim that you wrote the original software. If you use this software
+     in a product, an acknowledgment in the product documentation would be
+     appreciated but is not required.
+  2. Altered source versions must be plainly marked as such, and must not be
+     misrepresented as being the original software.
+  3. This notice may not be removed or altered from any source distribution.
+*/
+
+/**
+ *  \file SDL_error.h
+ *
+ *  Simple error message routines for SDL.
+ */
+
+#ifndef _SDL_error_h
+#define _SDL_error_h
+
+#include "SDL_stdinc.h"
+
+#include "begin_code.h"
+/* Set up for C function definitions, even when using C++ */
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Public functions */
+/* SDL_SetError() unconditionally returns -1. */
+extern DECLSPEC int SDLCALL SDL_SetError(const char *fmt, ...);
+extern DECLSPEC const char *SDLCALL SDL_GetError(void);
+extern DECLSPEC void SDLCALL SDL_ClearError(void);
+
+/**
+ *  \name Internal error functions
+ *
+ *  \internal
+ *  Private error reporting function - used internally.
+ */
+/* @{ */
+#define SDL_OutOfMemory()   SDL_Error(SDL_ENOMEM)
+#define SDL_Unsupported()   SDL_Error(SDL_UNSUPPORTED)
+#define SDL_InvalidParamError(param)    SDL_SetError("Parameter '%s' is invalid", (param))
+typedef enum
+{
+    SDL_ENOMEM,
+    SDL_EFREAD,
+    SDL_EFWRITE,
+    SDL_EFSEEK,
+    SDL_UNSUPPORTED,
+    SDL_LASTERROR
+} SDL_errorcode;
+/* SDL_Error() unconditionally returns -1. */
+extern DECLSPEC int SDLCALL SDL_Error(SDL_errorcode code);
+/* @} *//* Internal error functions */
+
+/* Ends C function definitions when using C++ */
+#ifdef __cplusplus
+}
+#endif
+#include "close_code.h"
+
+#endif /* _SDL_error_h */
+
+/* vi: set ts=4 sw=4 expandtab: */
diff --git a/include/SDL2/SDL_events.h b/include/SDL2/SDL_events.h
new file mode 100644 (file)
index 0000000..fc5a145
--- /dev/null
@@ -0,0 +1,723 @@
+/*
+  Simple DirectMedia Layer
+  Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
+
+  This software is provided 'as-is', without any express or implied
+  warranty.  In no event will the authors be held liable for any damages
+  arising from the use of this software.
+
+  Permission is granted to anyone to use this software for any purpose,
+  including commercial applications, and to alter it and redistribute it
+  freely, subject to the following restrictions:
+
+  1. The origin of this software must not be misrepresented; you must not
+     claim that you wrote the original software. If you use this software
+     in a product, an acknowledgment in the product documentation would be
+     appreciated but is not required.
+  2. Altered source versions must be plainly marked as such, and must not be
+     misrepresented as being the original software.
+  3. This notice may not be removed or altered from any source distribution.
+*/
+
+/**
+ *  \file SDL_events.h
+ *
+ *  Include file for SDL event handling.
+ */
+
+#ifndef _SDL_events_h
+#define _SDL_events_h
+
+#include "SDL_stdinc.h"
+#include "SDL_error.h"
+#include "SDL_video.h"
+#include "SDL_keyboard.h"
+#include "SDL_mouse.h"
+#include "SDL_joystick.h"
+#include "SDL_gamecontroller.h"
+#include "SDL_quit.h"
+#include "SDL_gesture.h"
+#include "SDL_touch.h"
+
+#include "begin_code.h"
+/* Set up for C function definitions, even when using C++ */
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* General keyboard/mouse state definitions */
+#define SDL_RELEASED    0
+#define SDL_PRESSED 1
+
+/**
+ * \brief The types of events that can be delivered.
+ */
+typedef enum
+{
+    SDL_FIRSTEVENT     = 0,     /**< Unused (do not remove) */
+
+    /* Application events */
+    SDL_QUIT           = 0x100, /**< User-requested quit */
+
+    /* These application events have special meaning on iOS, see README-ios.txt for details */
+    SDL_APP_TERMINATING,        /**< The application is being terminated by the OS
+                                     Called on iOS in applicationWillTerminate()
+                                     Called on Android in onDestroy()
+                                */
+    SDL_APP_LOWMEMORY,          /**< The application is low on memory, free memory if possible.
+                                     Called on iOS in applicationDidReceiveMemoryWarning()
+                                     Called on Android in onLowMemory()
+                                */
+    SDL_APP_WILLENTERBACKGROUND, /**< The application is about to enter the background
+                                     Called on iOS in applicationWillResignActive()
+                                     Called on Android in onPause()
+                                */
+    SDL_APP_DIDENTERBACKGROUND, /**< The application did enter the background and may not get CPU for some time
+                                     Called on iOS in applicationDidEnterBackground()
+                                     Called on Android in onPause()
+                                */
+    SDL_APP_WILLENTERFOREGROUND, /**< The application is about to enter the foreground
+                                     Called on iOS in applicationWillEnterForeground()
+                                     Called on Android in onResume()
+                                */
+    SDL_APP_DIDENTERFOREGROUND, /**< The application is now interactive
+                                     Called on iOS in applicationDidBecomeActive()
+                                     Called on Android in onResume()
+                                */
+
+    /* Window events */
+    SDL_WINDOWEVENT    = 0x200, /**< Window state change */
+    SDL_SYSWMEVENT,             /**< System specific event */
+
+    /* Keyboard events */
+    SDL_KEYDOWN        = 0x300, /**< Key pressed */
+    SDL_KEYUP,                  /**< Key released */
+    SDL_TEXTEDITING,            /**< Keyboard text editing (composition) */
+    SDL_TEXTINPUT,              /**< Keyboard text input */
+
+    /* Mouse events */
+    SDL_MOUSEMOTION    = 0x400, /**< Mouse moved */
+    SDL_MOUSEBUTTONDOWN,        /**< Mouse button pressed */
+    SDL_MOUSEBUTTONUP,          /**< Mouse button released */
+    SDL_MOUSEWHEEL,             /**< Mouse wheel motion */
+
+    /* Joystick events */
+    SDL_JOYAXISMOTION  = 0x600, /**< Joystick axis motion */
+    SDL_JOYBALLMOTION,          /**< Joystick trackball motion */
+    SDL_JOYHATMOTION,           /**< Joystick hat position change */
+    SDL_JOYBUTTONDOWN,          /**< Joystick button pressed */
+    SDL_JOYBUTTONUP,            /**< Joystick button released */
+    SDL_JOYDEVICEADDED,         /**< A new joystick has been inserted into the system */
+    SDL_JOYDEVICEREMOVED,       /**< An opened joystick has been removed */
+
+    /* Game controller events */
+    SDL_CONTROLLERAXISMOTION  = 0x650, /**< Game controller axis motion */
+    SDL_CONTROLLERBUTTONDOWN,          /**< Game controller button pressed */
+    SDL_CONTROLLERBUTTONUP,            /**< Game controller button released */
+    SDL_CONTROLLERDEVICEADDED,         /**< A new Game controller has been inserted into the system */
+    SDL_CONTROLLERDEVICEREMOVED,       /**< An opened Game controller has been removed */
+    SDL_CONTROLLERDEVICEREMAPPED,      /**< The controller mapping was updated */
+
+    /* Touch events */
+    SDL_FINGERDOWN      = 0x700,
+    SDL_FINGERUP,
+    SDL_FINGERMOTION,
+
+    /* Gesture events */
+    SDL_DOLLARGESTURE   = 0x800,
+    SDL_DOLLARRECORD,
+    SDL_MULTIGESTURE,
+
+    /* Clipboard events */
+    SDL_CLIPBOARDUPDATE = 0x900, /**< The clipboard changed */
+
+    /* Drag and drop events */
+    SDL_DROPFILE        = 0x1000, /**< The system requests a file open */
+
+    /* Render events */
+    SDL_RENDER_TARGETS_RESET = 0x2000, /**< The render targets have been reset */
+
+    /** Events ::SDL_USEREVENT through ::SDL_LASTEVENT are for your use,
+     *  and should be allocated with SDL_RegisterEvents()
+     */
+    SDL_USEREVENT    = 0x8000,
+
+    /**
+     *  This last event is only for bounding internal arrays
+     */
+    SDL_LASTEVENT    = 0xFFFF
+} SDL_EventType;
+
+/**
+ *  \brief Fields shared by every event
+ */
+typedef struct SDL_CommonEvent
+{
+    Uint32 type;
+    Uint32 timestamp;
+} SDL_CommonEvent;
+
+/**
+ *  \brief Window state change event data (event.window.*)
+ */
+typedef struct SDL_WindowEvent
+{
+    Uint32 type;        /**< ::SDL_WINDOWEVENT */
+    Uint32 timestamp;
+    Uint32 windowID;    /**< The associated window */
+    Uint8 event;        /**< ::SDL_WindowEventID */
+    Uint8 padding1;
+    Uint8 padding2;
+    Uint8 padding3;
+    Sint32 data1;       /**< event dependent data */
+    Sint32 data2;       /**< event dependent data */
+} SDL_WindowEvent;
+
+/**
+ *  \brief Keyboard button event structure (event.key.*)
+ */
+typedef struct SDL_KeyboardEvent
+{
+    Uint32 type;        /**< ::SDL_KEYDOWN or ::SDL_KEYUP */
+    Uint32 timestamp;
+    Uint32 windowID;    /**< The window with keyboard focus, if any */
+    Uint8 state;        /**< ::SDL_PRESSED or ::SDL_RELEASED */
+    Uint8 repeat;       /**< Non-zero if this is a key repeat */
+    Uint8 padding2;
+    Uint8 padding3;
+    SDL_Keysym keysym;  /**< The key that was pressed or released */
+} SDL_KeyboardEvent;
+
+#define SDL_TEXTEDITINGEVENT_TEXT_SIZE (32)
+/**
+ *  \brief Keyboard text editing event structure (event.edit.*)
+ */
+typedef struct SDL_TextEditingEvent
+{
+    Uint32 type;                                /**< ::SDL_TEXTEDITING */
+    Uint32 timestamp;
+    Uint32 windowID;                            /**< The window with keyboard focus, if any */
+    char text[SDL_TEXTEDITINGEVENT_TEXT_SIZE];  /**< The editing text */
+    Sint32 start;                               /**< The start cursor of selected editing text */
+    Sint32 length;                              /**< The length of selected editing text */
+} SDL_TextEditingEvent;
+
+
+#define SDL_TEXTINPUTEVENT_TEXT_SIZE (32)
+/**
+ *  \brief Keyboard text input event structure (event.text.*)
+ */
+typedef struct SDL_TextInputEvent
+{
+    Uint32 type;                              /**< ::SDL_TEXTINPUT */
+    Uint32 timestamp;
+    Uint32 windowID;                          /**< The window with keyboard focus, if any */
+    char text[SDL_TEXTINPUTEVENT_TEXT_SIZE];  /**< The input text */
+} SDL_TextInputEvent;
+
+/**
+ *  \brief Mouse motion event structure (event.motion.*)
+ */
+typedef struct SDL_MouseMotionEvent
+{
+    Uint32 type;        /**< ::SDL_MOUSEMOTION */
+    Uint32 timestamp;
+    Uint32 windowID;    /**< The window with mouse focus, if any */
+    Uint32 which;       /**< The mouse instance id, or SDL_TOUCH_MOUSEID */
+    Uint32 state;       /**< The current button state */
+    Sint32 x;           /**< X coordinate, relative to window */
+    Sint32 y;           /**< Y coordinate, relative to window */
+    Sint32 xrel;        /**< The relative motion in the X direction */
+    Sint32 yrel;        /**< The relative motion in the Y direction */
+} SDL_MouseMotionEvent;
+
+/**
+ *  \brief Mouse button event structure (event.button.*)
+ */
+typedef struct SDL_MouseButtonEvent
+{
+    Uint32 type;        /**< ::SDL_MOUSEBUTTONDOWN or ::SDL_MOUSEBUTTONUP */
+    Uint32 timestamp;
+    Uint32 windowID;    /**< The window with mouse focus, if any */
+    Uint32 which;       /**< The mouse instance id, or SDL_TOUCH_MOUSEID */
+    Uint8 button;       /**< The mouse button index */
+    Uint8 state;        /**< ::SDL_PRESSED or ::SDL_RELEASED */
+    Uint8 clicks;       /**< 1 for single-click, 2 for double-click, etc. */
+    Uint8 padding1;
+    Sint32 x;           /**< X coordinate, relative to window */
+    Sint32 y;           /**< Y coordinate, relative to window */
+} SDL_MouseButtonEvent;
+
+/**
+ *  \brief Mouse wheel event structure (event.wheel.*)
+ */
+typedef struct SDL_MouseWheelEvent
+{
+    Uint32 type;        /**< ::SDL_MOUSEWHEEL */
+    Uint32 timestamp;
+    Uint32 windowID;    /**< The window with mouse focus, if any */
+    Uint32 which;       /**< The mouse instance id, or SDL_TOUCH_MOUSEID */
+    Sint32 x;           /**< The amount scrolled horizontally, positive to the right and negative to the left */
+    Sint32 y;           /**< The amount scrolled vertically, positive away from the user and negative toward the user */
+} SDL_MouseWheelEvent;
+
+/**
+ *  \brief Joystick axis motion event structure (event.jaxis.*)
+ */
+typedef struct SDL_JoyAxisEvent
+{
+    Uint32 type;        /**< ::SDL_JOYAXISMOTION */
+    Uint32 timestamp;
+    SDL_JoystickID which; /**< The joystick instance id */
+    Uint8 axis;         /**< The joystick axis index */
+    Uint8 padding1;
+    Uint8 padding2;
+    Uint8 padding3;
+    Sint16 value;       /**< The axis value (range: -32768 to 32767) */
+    Uint16 padding4;
+} SDL_JoyAxisEvent;
+
+/**
+ *  \brief Joystick trackball motion event structure (event.jball.*)
+ */
+typedef struct SDL_JoyBallEvent
+{
+    Uint32 type;        /**< ::SDL_JOYBALLMOTION */
+    Uint32 timestamp;
+    SDL_JoystickID which; /**< The joystick instance id */
+    Uint8 ball;         /**< The joystick trackball index */
+    Uint8 padding1;
+    Uint8 padding2;
+    Uint8 padding3;
+    Sint16 xrel;        /**< The relative motion in the X direction */
+    Sint16 yrel;        /**< The relative motion in the Y direction */
+} SDL_JoyBallEvent;
+
+/**
+ *  \brief Joystick hat position change event structure (event.jhat.*)
+ */
+typedef struct SDL_JoyHatEvent
+{
+    Uint32 type;        /**< ::SDL_JOYHATMOTION */
+    Uint32 timestamp;
+    SDL_JoystickID which; /**< The joystick instance id */
+    Uint8 hat;          /**< The joystick hat index */
+    Uint8 value;        /**< The hat position value.
+                         *   \sa ::SDL_HAT_LEFTUP ::SDL_HAT_UP ::SDL_HAT_RIGHTUP
+                         *   \sa ::SDL_HAT_LEFT ::SDL_HAT_CENTERED ::SDL_HAT_RIGHT
+                         *   \sa ::SDL_HAT_LEFTDOWN ::SDL_HAT_DOWN ::SDL_HAT_RIGHTDOWN
+                         *
+                         *   Note that zero means the POV is centered.
+                         */
+    Uint8 padding1;
+    Uint8 padding2;
+} SDL_JoyHatEvent;
+
+/**
+ *  \brief Joystick button event structure (event.jbutton.*)
+ */
+typedef struct SDL_JoyButtonEvent
+{
+    Uint32 type;        /**< ::SDL_JOYBUTTONDOWN or ::SDL_JOYBUTTONUP */
+    Uint32 timestamp;
+    SDL_JoystickID which; /**< The joystick instance id */
+    Uint8 button;       /**< The joystick button index */
+    Uint8 state;        /**< ::SDL_PRESSED or ::SDL_RELEASED */
+    Uint8 padding1;
+    Uint8 padding2;
+} SDL_JoyButtonEvent;
+
+/**
+ *  \brief Joystick device event structure (event.jdevice.*)
+ */
+typedef struct SDL_JoyDeviceEvent
+{
+    Uint32 type;        /**< ::SDL_JOYDEVICEADDED or ::SDL_JOYDEVICEREMOVED */
+    Uint32 timestamp;
+    Sint32 which;       /**< The joystick device index for the ADDED event, instance id for the REMOVED event */
+} SDL_JoyDeviceEvent;
+
+
+/**
+ *  \brief Game controller axis motion event structure (event.caxis.*)
+ */
+typedef struct SDL_ControllerAxisEvent
+{
+    Uint32 type;        /**< ::SDL_CONTROLLERAXISMOTION */
+    Uint32 timestamp;
+    SDL_JoystickID which; /**< The joystick instance id */
+    Uint8 axis;         /**< The controller axis (SDL_GameControllerAxis) */
+    Uint8 padding1;
+    Uint8 padding2;
+    Uint8 padding3;
+    Sint16 value;       /**< The axis value (range: -32768 to 32767) */
+    Uint16 padding4;
+} SDL_ControllerAxisEvent;
+
+
+/**
+ *  \brief Game controller button event structure (event.cbutton.*)
+ */
+typedef struct SDL_ControllerButtonEvent
+{
+    Uint32 type;        /**< ::SDL_CONTROLLERBUTTONDOWN or ::SDL_CONTROLLERBUTTONUP */
+    Uint32 timestamp;
+    SDL_JoystickID which; /**< The joystick instance id */
+    Uint8 button;       /**< The controller button (SDL_GameControllerButton) */
+    Uint8 state;        /**< ::SDL_PRESSED or ::SDL_RELEASED */
+    Uint8 padding1;
+    Uint8 padding2;
+} SDL_ControllerButtonEvent;
+
+
+/**
+ *  \brief Controller device event structure (event.cdevice.*)
+ */
+typedef struct SDL_ControllerDeviceEvent
+{
+    Uint32 type;        /**< ::SDL_CONTROLLERDEVICEADDED, ::SDL_CONTROLLERDEVICEREMOVED, or ::SDL_CONTROLLERDEVICEREMAPPED */
+    Uint32 timestamp;
+    Sint32 which;       /**< The joystick device index for the ADDED event, instance id for the REMOVED or REMAPPED event */
+} SDL_ControllerDeviceEvent;
+
+
+/**
+ *  \brief Touch finger event structure (event.tfinger.*)
+ */
+typedef struct SDL_TouchFingerEvent
+{
+    Uint32 type;        /**< ::SDL_FINGERMOTION or ::SDL_FINGERDOWN or ::SDL_FINGERUP */
+    Uint32 timestamp;
+    SDL_TouchID touchId; /**< The touch device id */
+    SDL_FingerID fingerId;
+    float x;            /**< Normalized in the range 0...1 */
+    float y;            /**< Normalized in the range 0...1 */
+    float dx;           /**< Normalized in the range 0...1 */
+    float dy;           /**< Normalized in the range 0...1 */
+    float pressure;     /**< Normalized in the range 0...1 */
+} SDL_TouchFingerEvent;
+
+
+/**
+ *  \brief Multiple Finger Gesture Event (event.mgesture.*)
+ */
+typedef struct SDL_MultiGestureEvent
+{
+    Uint32 type;        /**< ::SDL_MULTIGESTURE */
+    Uint32 timestamp;
+    SDL_TouchID touchId; /**< The touch device index */
+    float dTheta;
+    float dDist;
+    float x;
+    float y;
+    Uint16 numFingers;
+    Uint16 padding;
+} SDL_MultiGestureEvent;
+
+
+/**
+ * \brief Dollar Gesture Event (event.dgesture.*)
+ */
+typedef struct SDL_DollarGestureEvent
+{
+    Uint32 type;        /**< ::SDL_DOLLARGESTURE */
+    Uint32 timestamp;
+    SDL_TouchID touchId; /**< The touch device id */
+    SDL_GestureID gestureId;
+    Uint32 numFingers;
+    float error;
+    float x;            /**< Normalized center of gesture */
+    float y;            /**< Normalized center of gesture */
+} SDL_DollarGestureEvent;
+
+
+/**
+ *  \brief An event used to request a file open by the system (event.drop.*)
+ *         This event is disabled by default, you can enable it with SDL_EventState()
+ *  \note If you enable this event, you must free the filename in the event.
+ */
+typedef struct SDL_DropEvent
+{
+    Uint32 type;        /**< ::SDL_DROPFILE */
+    Uint32 timestamp;
+    char *file;         /**< The file name, which should be freed with SDL_free() */
+} SDL_DropEvent;
+
+
+/**
+ *  \brief The "quit requested" event
+ */
+typedef struct SDL_QuitEvent
+{
+    Uint32 type;        /**< ::SDL_QUIT */
+    Uint32 timestamp;
+} SDL_QuitEvent;
+
+/**
+ *  \brief OS Specific event
+ */
+typedef struct SDL_OSEvent
+{
+    Uint32 type;        /**< ::SDL_QUIT */
+    Uint32 timestamp;
+} SDL_OSEvent;
+
+/**
+ *  \brief A user-defined event type (event.user.*)
+ */
+typedef struct SDL_UserEvent
+{
+    Uint32 type;        /**< ::SDL_USEREVENT through ::SDL_LASTEVENT-1 */
+    Uint32 timestamp;
+    Uint32 windowID;    /**< The associated window if any */
+    Sint32 code;        /**< User defined event code */
+    void *data1;        /**< User defined data pointer */
+    void *data2;        /**< User defined data pointer */
+} SDL_UserEvent;
+
+
+struct SDL_SysWMmsg;
+typedef struct SDL_SysWMmsg SDL_SysWMmsg;
+
+/**
+ *  \brief A video driver dependent system event (event.syswm.*)
+ *         This event is disabled by default, you can enable it with SDL_EventState()
+ *
+ *  \note If you want to use this event, you should include SDL_syswm.h.
+ */
+typedef struct SDL_SysWMEvent
+{
+    Uint32 type;        /**< ::SDL_SYSWMEVENT */
+    Uint32 timestamp;
+    SDL_SysWMmsg *msg;  /**< driver dependent data, defined in SDL_syswm.h */
+} SDL_SysWMEvent;
+
+/**
+ *  \brief General event structure
+ */
+typedef union SDL_Event
+{
+    Uint32 type;                    /**< Event type, shared with all events */
+    SDL_CommonEvent common;         /**< Common event data */
+    SDL_WindowEvent window;         /**< Window event data */
+    SDL_KeyboardEvent key;          /**< Keyboard event data */
+    SDL_TextEditingEvent edit;      /**< Text editing event data */
+    SDL_TextInputEvent text;        /**< Text input event data */
+    SDL_MouseMotionEvent motion;    /**< Mouse motion event data */
+    SDL_MouseButtonEvent button;    /**< Mouse button event data */
+    SDL_MouseWheelEvent wheel;      /**< Mouse wheel event data */
+    SDL_JoyAxisEvent jaxis;         /**< Joystick axis event data */
+    SDL_JoyBallEvent jball;         /**< Joystick ball event data */
+    SDL_JoyHatEvent jhat;           /**< Joystick hat event data */
+    SDL_JoyButtonEvent jbutton;     /**< Joystick button event data */
+    SDL_JoyDeviceEvent jdevice;     /**< Joystick device change event data */
+    SDL_ControllerAxisEvent caxis;      /**< Game Controller axis event data */
+    SDL_ControllerButtonEvent cbutton;  /**< Game Controller button event data */
+    SDL_ControllerDeviceEvent cdevice;  /**< Game Controller device event data */
+    SDL_QuitEvent quit;             /**< Quit request event data */
+    SDL_UserEvent user;             /**< Custom event data */
+    SDL_SysWMEvent syswm;           /**< System dependent window event data */
+    SDL_TouchFingerEvent tfinger;   /**< Touch finger event data */
+    SDL_MultiGestureEvent mgesture; /**< Gesture event data */
+    SDL_DollarGestureEvent dgesture; /**< Gesture event data */
+    SDL_DropEvent drop;             /**< Drag and drop event data */
+
+    /* This is necessary for ABI compatibility between Visual C++ and GCC
+       Visual C++ will respect the push pack pragma and use 52 bytes for
+       this structure, and GCC will use the alignment of the largest datatype
+       within the union, which is 8 bytes.
+
+       So... we'll add padding to force the size to be 56 bytes for both.
+    */
+    Uint8 padding[56];
+} SDL_Event;
+
+
+/* Function prototypes */
+
+/**
+ *  Pumps the event loop, gathering events from the input devices.
+ *
+ *  This function updates the event queue and internal input device state.
+ *
+ *  This should only be run in the thread that sets the video mode.
+ */
+extern DECLSPEC void SDLCALL SDL_PumpEvents(void);
+
+/* @{ */
+typedef enum
+{
+    SDL_ADDEVENT,
+    SDL_PEEKEVENT,
+    SDL_GETEVENT
+} SDL_eventaction;
+
+/**
+ *  Checks the event queue for messages and optionally returns them.
+ *
+ *  If \c action is ::SDL_ADDEVENT, up to \c numevents events will be added to
+ *  the back of the event queue.
+ *
+ *  If \c action is ::SDL_PEEKEVENT, up to \c numevents events at the front
+ *  of the event queue, within the specified minimum and maximum type,
+ *  will be returned and will not be removed from the queue.
+ *
+ *  If \c action is ::SDL_GETEVENT, up to \c numevents events at the front
+ *  of the event queue, within the specified minimum and maximum type,
+ *  will be returned and will be removed from the queue.
+ *
+ *  \return The number of events actually stored, or -1 if there was an error.
+ *
+ *  This function is thread-safe.
+ */
+extern DECLSPEC int SDLCALL SDL_PeepEvents(SDL_Event * events, int numevents,
+                                           SDL_eventaction action,
+                                           Uint32 minType, Uint32 maxType);
+/* @} */
+
+/**
+ *  Checks to see if certain event types are in the event queue.
+ */
+extern DECLSPEC SDL_bool SDLCALL SDL_HasEvent(Uint32 type);
+extern DECLSPEC SDL_bool SDLCALL SDL_HasEvents(Uint32 minType, Uint32 maxType);
+
+/**
+ *  This function clears events from the event queue
+ */
+extern DECLSPEC void SDLCALL SDL_FlushEvent(Uint32 type);
+extern DECLSPEC void SDLCALL SDL_FlushEvents(Uint32 minType, Uint32 maxType);
+
+/**
+ *  \brief Polls for currently pending events.
+ *
+ *  \return 1 if there are any pending events, or 0 if there are none available.
+ *
+ *  \param event If not NULL, the next event is removed from the queue and
+ *               stored in that area.
+ */
+extern DECLSPEC int SDLCALL SDL_PollEvent(SDL_Event * event);
+
+/**
+ *  \brief Waits indefinitely for the next available event.
+ *
+ *  \return 1, or 0 if there was an error while waiting for events.
+ *
+ *  \param event If not NULL, the next event is removed from the queue and
+ *               stored in that area.
+ */
+extern DECLSPEC int SDLCALL SDL_WaitEvent(SDL_Event * event);
+
+/**
+ *  \brief Waits until the specified timeout (in milliseconds) for the next
+ *         available event.
+ *
+ *  \return 1, or 0 if there was an error while waiting for events.
+ *
+ *  \param event If not NULL, the next event is removed from the queue and
+ *               stored in that area.
+ *  \param timeout The timeout (in milliseconds) to wait for next event.
+ */
+extern DECLSPEC int SDLCALL SDL_WaitEventTimeout(SDL_Event * event,
+                                                 int timeout);
+
+/**
+ *  \brief Add an event to the event queue.
+ *
+ *  \return 1 on success, 0 if the event was filtered, or -1 if the event queue
+ *          was full or there was some other error.
+ */
+extern DECLSPEC int SDLCALL SDL_PushEvent(SDL_Event * event);
+
+typedef int (SDLCALL * SDL_EventFilter) (void *userdata, SDL_Event * event);
+
+/**
+ *  Sets up a filter to process all events before they change internal state and
+ *  are posted to the internal event queue.
+ *
+ *  The filter is prototyped as:
+ *  \code
+ *      int SDL_EventFilter(void *userdata, SDL_Event * event);
+ *  \endcode
+ *
+ *  If the filter returns 1, then the event will be added to the internal queue.
+ *  If it returns 0, then the event will be dropped from the queue, but the
+ *  internal state will still be updated.  This allows selective filtering of
+ *  dynamically arriving events.
+ *
+ *  \warning  Be very careful of what you do in the event filter function, as
+ *            it may run in a different thread!
+ *
+ *  There is one caveat when dealing with the ::SDL_QuitEvent event type.  The
+ *  event filter is only called when the window manager desires to close the
+ *  application window.  If the event filter returns 1, then the window will
+ *  be closed, otherwise the window will remain open if possible.
+ *
+ *  If the quit event is generated by an interrupt signal, it will bypass the
+ *  internal queue and be delivered to the application at the next event poll.
+ */
+extern DECLSPEC void SDLCALL SDL_SetEventFilter(SDL_EventFilter filter,
+                                                void *userdata);
+
+/**
+ *  Return the current event filter - can be used to "chain" filters.
+ *  If there is no event filter set, this function returns SDL_FALSE.
+ */
+extern DECLSPEC SDL_bool SDLCALL SDL_GetEventFilter(SDL_EventFilter * filter,
+                                                    void **userdata);
+
+/**
+ *  Add a function which is called when an event is added to the queue.
+ */
+extern DECLSPEC void SDLCALL SDL_AddEventWatch(SDL_EventFilter filter,
+                                               void *userdata);
+
+/**
+ *  Remove an event watch function added with SDL_AddEventWatch()
+ */
+extern DECLSPEC void SDLCALL SDL_DelEventWatch(SDL_EventFilter filter,
+                                               void *userdata);
+
+/**
+ *  Run the filter function on the current event queue, removing any
+ *  events for which the filter returns 0.
+ */
+extern DECLSPEC void SDLCALL SDL_FilterEvents(SDL_EventFilter filter,
+                                              void *userdata);
+
+/* @{ */
+#define SDL_QUERY   -1
+#define SDL_IGNORE   0
+#define SDL_DISABLE  0
+#define SDL_ENABLE   1
+
+/**
+ *  This function allows you to set the state of processing certain events.
+ *   - If \c state is set to ::SDL_IGNORE, that event will be automatically
+ *     dropped from the event queue and will not event be filtered.
+ *   - If \c state is set to ::SDL_ENABLE, that event will be processed
+ *     normally.
+ *   - If \c state is set to ::SDL_QUERY, SDL_EventState() will return the
+ *     current processing state of the specified event.
+ */
+extern DECLSPEC Uint8 SDLCALL SDL_EventState(Uint32 type, int state);
+/* @} */
+#define SDL_GetEventState(type) SDL_EventState(type, SDL_QUERY)
+
+/**
+ *  This function allocates a set of user-defined events, and returns
+ *  the beginning event number for that set of events.
+ *
+ *  If there aren't enough user-defined events left, this function
+ *  returns (Uint32)-1
+ */
+extern DECLSPEC Uint32 SDLCALL SDL_RegisterEvents(int numevents);
+
+/* Ends C function definitions when using C++ */
+#ifdef __cplusplus
+}
+#endif
+#include "close_code.h"
+
+#endif /* _SDL_events_h */
+
+/* vi: set ts=4 sw=4 expandtab: */
diff --git a/include/SDL2/SDL_filesystem.h b/include/SDL2/SDL_filesystem.h
new file mode 100644 (file)
index 0000000..de3e227
--- /dev/null
@@ -0,0 +1,136 @@
+/*
+  Simple DirectMedia Layer
+  Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
+
+  This software is provided 'as-is', without any express or implied
+  warranty.  In no event will the authors be held liable for any damages
+  arising from the use of this software.
+
+  Permission is granted to anyone to use this software for any purpose,
+  including commercial applications, and to alter it and redistribute it
+  freely, subject to the following restrictions:
+
+  1. The origin of this software must not be misrepresented; you must not
+     claim that you wrote the original software. If you use this software
+     in a product, an acknowledgment in the product documentation would be
+     appreciated but is not required.
+  2. Altered source versions must be plainly marked as such, and must not be
+     misrepresented as being the original software.
+  3. This notice may not be removed or altered from any source distribution.
+*/
+
+/**
+ *  \file SDL_filesystem.h
+ *
+ *  \brief Include file for filesystem SDL API functions
+ */
+
+#ifndef _SDL_filesystem_h
+#define _SDL_filesystem_h
+
+#include "SDL_stdinc.h"
+
+#include "begin_code.h"
+
+/* Set up for C function definitions, even when using C++ */
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * \brief Get the path where the application resides.
+ *
+ * Get the "base path". This is the directory where the application was run
+ *  from, which is probably the installation directory, and may or may not
+ *  be the process's current working directory.
+ *
+ * This returns an absolute path in UTF-8 encoding, and is guaranteed to
+ *  end with a path separator ('\\' on Windows, '/' most other places).
+ *
+ * The pointer returned by this function is owned by you. Please call
+ *  SDL_free() on the pointer when you are done with it, or it will be a
+ *  memory leak. This is not necessarily a fast call, though, so you should
+ *  call this once near startup and save the string if you need it.
+ *
+ * Some platforms can't determine the application's path, and on other
+ *  platforms, this might be meaningless. In such cases, this function will
+ *  return NULL.
+ *
+ *  \return String of base dir in UTF-8 encoding, or NULL on error.
+ *
+ * \sa SDL_GetPrefPath
+ */
+extern DECLSPEC char *SDLCALL SDL_GetBasePath(void);
+
+/**
+ * \brief Get the user-and-app-specific path where files can be written.
+ *
+ * Get the "pref dir". This is meant to be where users can write personal
+ *  files (preferences and save games, etc) that are specific to your
+ *  application. This directory is unique per user, per application.
+ *
+ * This function will decide the appropriate location in the native filesystem,
+ *  create the directory if necessary, and return a string of the absolute
+ *  path to the directory in UTF-8 encoding.
+ *
+ * On Windows, the string might look like:
+ *  "C:\\Users\\bob\\AppData\\Roaming\\My Company\\My Program Name\\"
+ *
+ * On Linux, the string might look like:
+ *  "/home/bob/.local/share/My Program Name/"
+ *
+ * On Mac OS X, the string might look like:
+ *  "/Users/bob/Library/Application Support/My Program Name/"
+ *
+ * (etc.)
+ *
+ * You specify the name of your organization (if it's not a real organization,
+ *  your name or an Internet domain you own might do) and the name of your
+ *  application. These should be untranslated proper names.
+ *
+ * Both the org and app strings may become part of a directory name, so
+ *  please follow these rules:
+ *
+ *    - Try to use the same org string (including case-sensitivity) for
+ *      all your applications that use this function.
+ *    - Always use a unique app string for each one, and make sure it never
+ *      changes for an app once you've decided on it.
+ *    - Unicode characters are legal, as long as it's UTF-8 encoded, but...
+ *    - ...only use letters, numbers, and spaces. Avoid punctuation like
+ *      "Game Name 2: Bad Guy's Revenge!" ... "Game Name 2" is sufficient.
+ *
+ * This returns an absolute path in UTF-8 encoding, and is guaranteed to
+ *  end with a path separator ('\\' on Windows, '/' most other places).
+ *
+ * The pointer returned by this function is owned by you. Please call
+ *  SDL_free() on the pointer when you are done with it, or it will be a
+ *  memory leak. This is not necessarily a fast call, though, so you should
+ *  call this once near startup and save the string if you need it.
+ *
+ * You should assume the path returned by this function is the only safe
+ *  place to write files (and that SDL_GetBasePath(), while it might be
+ *  writable, or even the parent of the returned path, aren't where you
+ *  should be writing things).
+ *
+ * Some platforms can't determine the pref path, and on other
+ *  platforms, this might be meaningless. In such cases, this function will
+ *  return NULL.
+ *
+ *   \param org The name of your organization.
+ *   \param app The name of your application.
+ *  \return UTF-8 string of user dir in platform-dependent notation. NULL
+ *          if there's a problem (creating directory failed, etc).
+ *
+ * \sa SDL_GetBasePath
+ */
+extern DECLSPEC char *SDLCALL SDL_GetPrefPath(const char *org, const char *app);
+
+/* Ends C function definitions when using C++ */
+#ifdef __cplusplus
+}
+#endif
+#include "close_code.h"
+
+#endif /* _SDL_system_h */
+
+/* vi: set ts=4 sw=4 expandtab: */
diff --git a/include/SDL2/SDL_gamecontroller.h b/include/SDL2/SDL_gamecontroller.h
new file mode 100644 (file)
index 0000000..b00ad71
--- /dev/null
@@ -0,0 +1,316 @@
+/*
+  Simple DirectMedia Layer
+  Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
+
+  This software is provided 'as-is', without any express or implied
+  warranty.  In no event will the authors be held liable for any damages
+  arising from the use of this software.
+
+  Permission is granted to anyone to use this software for any purpose,
+  including commercial applications, and to alter it and redistribute it
+  freely, subject to the following restrictions:
+
+  1. The origin of this software must not be misrepresented; you must not
+     claim that you wrote the original software. If you use this software
+     in a product, an acknowledgment in the product documentation would be
+     appreciated but is not required.
+  2. Altered source versions must be plainly marked as such, and must not be
+     misrepresented as being the original software.
+  3. This notice may not be removed or altered from any source distribution.
+*/
+
+/**
+ *  \file SDL_gamecontroller.h
+ *
+ *  Include file for SDL game controller event handling
+ */
+
+#ifndef _SDL_gamecontroller_h
+#define _SDL_gamecontroller_h
+
+#include "SDL_stdinc.h"
+#include "SDL_error.h"
+#include "SDL_rwops.h"
+#include "SDL_joystick.h"
+
+#include "begin_code.h"
+/* Set up for C function definitions, even when using C++ */
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ *  \file SDL_gamecontroller.h
+ *
+ *  In order to use these functions, SDL_Init() must have been called
+ *  with the ::SDL_INIT_JOYSTICK flag.  This causes SDL to scan the system
+ *  for game controllers, and load appropriate drivers.
+ *
+ *  If you would like to receive controller updates while the application
+ *  is in the background, you should set the following hint before calling
+ *  SDL_Init(): SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS
+ */
+
+/* The gamecontroller structure used to identify an SDL game controller */
+struct _SDL_GameController;
+typedef struct _SDL_GameController SDL_GameController;
+
+
+typedef enum
+{
+    SDL_CONTROLLER_BINDTYPE_NONE = 0,
+    SDL_CONTROLLER_BINDTYPE_BUTTON,
+    SDL_CONTROLLER_BINDTYPE_AXIS,
+    SDL_CONTROLLER_BINDTYPE_HAT
+} SDL_GameControllerBindType;
+
+/**
+ *  Get the SDL joystick layer binding for this controller button/axis mapping
+ */
+typedef struct SDL_GameControllerButtonBind
+{
+    SDL_GameControllerBindType bindType;
+    union
+    {
+        int button;
+        int axis;
+        struct {
+            int hat;
+            int hat_mask;
+        } hat;
+    } value;
+
+} SDL_GameControllerButtonBind;
+
+
+/**
+ *  To count the number of game controllers in the system for the following:
+ *  int nJoysticks = SDL_NumJoysticks();
+ *  int nGameControllers = 0;
+ *  for ( int i = 0; i < nJoysticks; i++ ) {
+ *      if ( SDL_IsGameController(i) ) {
+ *          nGameControllers++;
+ *      }
+ *  }
+ *
+ *  Using the SDL_HINT_GAMECONTROLLERCONFIG hint or the SDL_GameControllerAddMapping you can add support for controllers SDL is unaware of or cause an existing controller to have a different binding. The format is:
+ *  guid,name,mappings
+ *
+ *  Where GUID is the string value from SDL_JoystickGetGUIDString(), name is the human readable string for the device and mappings are controller mappings to joystick ones.
+ *  Under Windows there is a reserved GUID of "xinput" that covers any XInput devices.
+ *  The mapping format for joystick is:
+ *      bX - a joystick button, index X
+ *      hX.Y - hat X with value Y
+ *      aX - axis X of the joystick
+ *  Buttons can be used as a controller axis and vice versa.
+ *
+ *  This string shows an example of a valid mapping for a controller
+ *  "341a3608000000000000504944564944,Afterglow PS3 Controller,a:b1,b:b2,y:b3,x:b0,start:b9,guide:b12,back:b8,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftshoulder:b4,rightshoulder:b5,leftstick:b10,rightstick:b11,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7",
+ *
+ */
+
+/**
+ *  Load a set of mappings from a seekable SDL data stream (memory or file), filtered by the current SDL_GetPlatform()
+ *  A community sourced database of controllers is available at https://raw.github.com/gabomdq/SDL_GameControllerDB/master/gamecontrollerdb.txt
+ *
+ *  If \c freerw is non-zero, the stream will be closed after being read.
+ * 
+ * \return number of mappings added, -1 on error
+ */
+extern DECLSPEC int SDLCALL SDL_GameControllerAddMappingsFromRW( SDL_RWops * rw, int freerw );
+
+/**
+ *  Load a set of mappings from a file, filtered by the current SDL_GetPlatform()
+ *
+ *  Convenience macro.
+ */
+#define SDL_GameControllerAddMappingsFromFile(file)   SDL_GameControllerAddMappingsFromRW(SDL_RWFromFile(file, "rb"), 1)
+
+/**
+ *  Add or update an existing mapping configuration
+ *
+ * \return 1 if mapping is added, 0 if updated, -1 on error
+ */
+extern DECLSPEC int SDLCALL SDL_GameControllerAddMapping( const char* mappingString );
+
+/**
+ *  Get a mapping string for a GUID
+ *
+ *  \return the mapping string.  Must be freed with SDL_free.  Returns NULL if no mapping is available
+ */
+extern DECLSPEC char * SDLCALL SDL_GameControllerMappingForGUID( SDL_JoystickGUID guid );
+
+/**
+ *  Get a mapping string for an open GameController
+ *
+ *  \return the mapping string.  Must be freed with SDL_free.  Returns NULL if no mapping is available
+ */
+extern DECLSPEC char * SDLCALL SDL_GameControllerMapping( SDL_GameController * gamecontroller );
+
+/**
+ *  Is the joystick on this index supported by the game controller interface?
+ */
+extern DECLSPEC SDL_bool SDLCALL SDL_IsGameController(int joystick_index);
+
+
+/**
+ *  Get the implementation dependent name of a game controller.
+ *  This can be called before any controllers are opened.
+ *  If no name can be found, this function returns NULL.
+ */
+extern DECLSPEC const char *SDLCALL SDL_GameControllerNameForIndex(int joystick_index);
+
+/**
+ *  Open a game controller for use.
+ *  The index passed as an argument refers to the N'th game controller on the system.
+ *  This index is the value which will identify this controller in future controller
+ *  events.
+ *
+ *  \return A controller identifier, or NULL if an error occurred.
+ */
+extern DECLSPEC SDL_GameController *SDLCALL SDL_GameControllerOpen(int joystick_index);
+
+/**
+ *  Return the name for this currently opened controller
+ */
+extern DECLSPEC const char *SDLCALL SDL_GameControllerName(SDL_GameController *gamecontroller);
+
+/**
+ *  Returns SDL_TRUE if the controller has been opened and currently connected,
+ *  or SDL_FALSE if it has not.
+ */
+extern DECLSPEC SDL_bool SDLCALL SDL_GameControllerGetAttached(SDL_GameController *gamecontroller);
+
+/**
+ *  Get the underlying joystick object used by a controller
+ */
+extern DECLSPEC SDL_Joystick *SDLCALL SDL_GameControllerGetJoystick(SDL_GameController *gamecontroller);
+
+/**
+ *  Enable/disable controller event polling.
+ *
+ *  If controller events are disabled, you must call SDL_GameControllerUpdate()
+ *  yourself and check the state of the controller when you want controller
+ *  information.
+ *
+ *  The state can be one of ::SDL_QUERY, ::SDL_ENABLE or ::SDL_IGNORE.
+ */
+extern DECLSPEC int SDLCALL SDL_GameControllerEventState(int state);
+
+/**
+ *  Update the current state of the open game controllers.
+ *
+ *  This is called automatically by the event loop if any game controller
+ *  events are enabled.
+ */
+extern DECLSPEC void SDLCALL SDL_GameControllerUpdate(void);
+
+
+/**
+ *  The list of axes available from a controller
+ */
+typedef enum
+{
+    SDL_CONTROLLER_AXIS_INVALID = -1,
+    SDL_CONTROLLER_AXIS_LEFTX,
+    SDL_CONTROLLER_AXIS_LEFTY,
+    SDL_CONTROLLER_AXIS_RIGHTX,
+    SDL_CONTROLLER_AXIS_RIGHTY,
+    SDL_CONTROLLER_AXIS_TRIGGERLEFT,
+    SDL_CONTROLLER_AXIS_TRIGGERRIGHT,
+    SDL_CONTROLLER_AXIS_MAX
+} SDL_GameControllerAxis;
+
+/**
+ *  turn this string into a axis mapping
+ */
+extern DECLSPEC SDL_GameControllerAxis SDLCALL SDL_GameControllerGetAxisFromString(const char *pchString);
+
+/**
+ *  turn this axis enum into a string mapping
+ */
+extern DECLSPEC const char* SDLCALL SDL_GameControllerGetStringForAxis(SDL_GameControllerAxis axis);
+
+/**
+ *  Get the SDL joystick layer binding for this controller button mapping
+ */
+extern DECLSPEC SDL_GameControllerButtonBind SDLCALL
+SDL_GameControllerGetBindForAxis(SDL_GameController *gamecontroller,
+                                 SDL_GameControllerAxis axis);
+
+/**
+ *  Get the current state of an axis control on a game controller.
+ *
+ *  The state is a value ranging from -32768 to 32767.
+ *
+ *  The axis indices start at index 0.
+ */
+extern DECLSPEC Sint16 SDLCALL
+SDL_GameControllerGetAxis(SDL_GameController *gamecontroller,
+                          SDL_GameControllerAxis axis);
+
+/**
+ *  The list of buttons available from a controller
+ */
+typedef enum
+{
+    SDL_CONTROLLER_BUTTON_INVALID = -1,
+    SDL_CONTROLLER_BUTTON_A,
+    SDL_CONTROLLER_BUTTON_B,
+    SDL_CONTROLLER_BUTTON_X,
+    SDL_CONTROLLER_BUTTON_Y,
+    SDL_CONTROLLER_BUTTON_BACK,
+    SDL_CONTROLLER_BUTTON_GUIDE,
+    SDL_CONTROLLER_BUTTON_START,
+    SDL_CONTROLLER_BUTTON_LEFTSTICK,
+    SDL_CONTROLLER_BUTTON_RIGHTSTICK,
+    SDL_CONTROLLER_BUTTON_LEFTSHOULDER,
+    SDL_CONTROLLER_BUTTON_RIGHTSHOULDER,
+    SDL_CONTROLLER_BUTTON_DPAD_UP,
+    SDL_CONTROLLER_BUTTON_DPAD_DOWN,
+    SDL_CONTROLLER_BUTTON_DPAD_LEFT,
+    SDL_CONTROLLER_BUTTON_DPAD_RIGHT,
+    SDL_CONTROLLER_BUTTON_MAX
+} SDL_GameControllerButton;
+
+/**
+ *  turn this string into a button mapping
+ */
+extern DECLSPEC SDL_GameControllerButton SDLCALL SDL_GameControllerGetButtonFromString(const char *pchString);
+
+/**
+ *  turn this button enum into a string mapping
+ */
+extern DECLSPEC const char* SDLCALL SDL_GameControllerGetStringForButton(SDL_GameControllerButton button);
+
+/**
+ *  Get the SDL joystick layer binding for this controller button mapping
+ */
+extern DECLSPEC SDL_GameControllerButtonBind SDLCALL
+SDL_GameControllerGetBindForButton(SDL_GameController *gamecontroller,
+                                   SDL_GameControllerButton button);
+
+
+/**
+ *  Get the current state of a button on a game controller.
+ *
+ *  The button indices start at index 0.
+ */
+extern DECLSPEC Uint8 SDLCALL SDL_GameControllerGetButton(SDL_GameController *gamecontroller,
+                                                          SDL_GameControllerButton button);
+
+/**
+ *  Close a controller previously opened with SDL_GameControllerOpen().
+ */
+extern DECLSPEC void SDLCALL SDL_GameControllerClose(SDL_GameController *gamecontroller);
+
+
+/* Ends C function definitions when using C++ */
+#ifdef __cplusplus
+}
+#endif
+#include "close_code.h"
+
+#endif /* _SDL_gamecontroller_h */
+
+/* vi: set ts=4 sw=4 expandtab: */
diff --git a/include/SDL2/SDL_gesture.h b/include/SDL2/SDL_gesture.h
new file mode 100644 (file)
index 0000000..dbc1692
--- /dev/null
@@ -0,0 +1,87 @@
+/*
+  Simple DirectMedia Layer
+  Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
+
+  This software is provided 'as-is', without any express or implied
+  warranty.  In no event will the authors be held liable for any damages
+  arising from the use of this software.
+
+  Permission is granted to anyone to use this software for any purpose,
+  including commercial applications, and to alter it and redistribute it
+  freely, subject to the following restrictions:
+
+  1. The origin of this software must not be misrepresented; you must not
+     claim that you wrote the original software. If you use this software
+     in a product, an acknowledgment in the product documentation would be
+     appreciated but is not required.
+  2. Altered source versions must be plainly marked as such, and must not be
+     misrepresented as being the original software.
+  3. This notice may not be removed or altered from any source distribution.
+*/
+
+/**
+ *  \file SDL_gesture.h
+ *
+ *  Include file for SDL gesture event handling.
+ */
+
+#ifndef _SDL_gesture_h
+#define _SDL_gesture_h
+
+#include "SDL_stdinc.h"
+#include "SDL_error.h"
+#include "SDL_video.h"
+
+#include "SDL_touch.h"
+
+
+#include "begin_code.h"
+/* Set up for C function definitions, even when using C++ */
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef Sint64 SDL_GestureID;
+
+/* Function prototypes */
+
+/**
+ *  \brief Begin Recording a gesture on the specified touch, or all touches (-1)
+ *
+ *
+ */
+extern DECLSPEC int SDLCALL SDL_RecordGesture(SDL_TouchID touchId);
+
+
+/**
+ *  \brief Save all currently loaded Dollar Gesture templates
+ *
+ *
+ */
+extern DECLSPEC int SDLCALL SDL_SaveAllDollarTemplates(SDL_RWops *dst);
+
+/**
+ *  \brief Save a currently loaded Dollar Gesture template
+ *
+ *
+ */
+extern DECLSPEC int SDLCALL SDL_SaveDollarTemplate(SDL_GestureID gestureId,SDL_RWops *dst);
+
+
+/**
+ *  \brief Load Dollar Gesture templates from a file
+ *
+ *
+ */
+extern DECLSPEC int SDLCALL SDL_LoadDollarTemplates(SDL_TouchID touchId, SDL_RWops *src);
+
+
+/* Ends C function definitions when using C++ */
+#ifdef __cplusplus
+}
+#endif
+#include "close_code.h"
+
+#endif /* _SDL_gesture_h */
+
+/* vi: set ts=4 sw=4 expandtab: */
diff --git a/include/SDL2/SDL_haptic.h b/include/SDL2/SDL_haptic.h
new file mode 100644 (file)
index 0000000..234975a
--- /dev/null
@@ -0,0 +1,1225 @@
+/*
+  Simple DirectMedia Layer
+  Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
+
+  This software is provided 'as-is', without any express or implied
+  warranty.  In no event will the authors be held liable for any damages
+  arising from the use of this software.
+
+  Permission is granted to anyone to use this software for any purpose,
+  including commercial applications, and to alter it and redistribute it
+  freely, subject to the following restrictions:
+
+  1. The origin of this software must not be misrepresented; you must not
+     claim that you wrote the original software. If you use this software
+     in a product, an acknowledgment in the product documentation would be
+     appreciated but is not required.
+  2. Altered source versions must be plainly marked as such, and must not be
+     misrepresented as being the original software.
+  3. This notice may not be removed or altered from any source distribution.
+*/
+
+/**
+ *  \file SDL_haptic.h
+ *
+ *  \brief The SDL Haptic subsystem allows you to control haptic (force feedback)
+ *         devices.
+ *
+ *  The basic usage is as follows:
+ *   - Initialize the Subsystem (::SDL_INIT_HAPTIC).
+ *   - Open a Haptic Device.
+ *    - SDL_HapticOpen() to open from index.
+ *    - SDL_HapticOpenFromJoystick() to open from an existing joystick.
+ *   - Create an effect (::SDL_HapticEffect).
+ *   - Upload the effect with SDL_HapticNewEffect().
+ *   - Run the effect with SDL_HapticRunEffect().
+ *   - (optional) Free the effect with SDL_HapticDestroyEffect().
+ *   - Close the haptic device with SDL_HapticClose().
+ *
+ * \par Simple rumble example:
+ * \code
+ *    SDL_Haptic *haptic;
+ *
+ *    // Open the device
+ *    haptic = SDL_HapticOpen( 0 );
+ *    if (haptic == NULL)
+ *       return -1;
+ *
+ *    // Initialize simple rumble
+ *    if (SDL_HapticRumbleInit( haptic ) != 0)
+ *       return -1;
+ *
+ *    // Play effect at 50% strength for 2 seconds
+ *    if (SDL_HapticRumblePlay( haptic, 0.5, 2000 ) != 0)
+ *       return -1;
+ *    SDL_Delay( 2000 );
+ *
+ *    // Clean up
+ *    SDL_HapticClose( haptic );
+ * \endcode
+ *
+ * \par Complete example:
+ * \code
+ * int test_haptic( SDL_Joystick * joystick ) {
+ *    SDL_Haptic *haptic;
+ *    SDL_HapticEffect effect;
+ *    int effect_id;
+ *
+ *    // Open the device
+ *    haptic = SDL_HapticOpenFromJoystick( joystick );
+ *    if (haptic == NULL) return -1; // Most likely joystick isn't haptic
+ *
+ *    // See if it can do sine waves
+ *    if ((SDL_HapticQuery(haptic) & SDL_HAPTIC_SINE)==0) {
+ *       SDL_HapticClose(haptic); // No sine effect
+ *       return -1;
+ *    }
+ *
+ *    // Create the effect
+ *    memset( &effect, 0, sizeof(SDL_HapticEffect) ); // 0 is safe default
+ *    effect.type = SDL_HAPTIC_SINE;
+ *    effect.periodic.direction.type = SDL_HAPTIC_POLAR; // Polar coordinates
+ *    effect.periodic.direction.dir[0] = 18000; // Force comes from south
+ *    effect.periodic.period = 1000; // 1000 ms
+ *    effect.periodic.magnitude = 20000; // 20000/32767 strength
+ *    effect.periodic.length = 5000; // 5 seconds long
+ *    effect.periodic.attack_length = 1000; // Takes 1 second to get max strength
+ *    effect.periodic.fade_length = 1000; // Takes 1 second to fade away
+ *
+ *    // Upload the effect
+ *    effect_id = SDL_HapticNewEffect( haptic, &effect );
+ *
+ *    // Test the effect
+ *    SDL_HapticRunEffect( haptic, effect_id, 1 );
+ *    SDL_Delay( 5000); // Wait for the effect to finish
+ *
+ *    // We destroy the effect, although closing the device also does this
+ *    SDL_HapticDestroyEffect( haptic, effect_id );
+ *
+ *    // Close the device
+ *    SDL_HapticClose(haptic);
+ *
+ *    return 0; // Success
+ * }
+ * \endcode
+ *
+ * You can also find out more information on my blog:
+ * http://bobbens.dyndns.org/journal/2010/sdl_haptic/
+ *
+ * \author Edgar Simo Serra
+ */
+
+#ifndef _SDL_haptic_h
+#define _SDL_haptic_h
+
+#include "SDL_stdinc.h"
+#include "SDL_error.h"
+#include "SDL_joystick.h"
+
+#include "begin_code.h"
+/* Set up for C function definitions, even when using C++ */
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+/**
+ *  \typedef SDL_Haptic
+ *
+ *  \brief The haptic structure used to identify an SDL haptic.
+ *
+ *  \sa SDL_HapticOpen
+ *  \sa SDL_HapticOpenFromJoystick
+ *  \sa SDL_HapticClose
+ */
+struct _SDL_Haptic;
+typedef struct _SDL_Haptic SDL_Haptic;
+
+
+/**
+ *  \name Haptic features
+ *
+ *  Different haptic features a device can have.
+ */
+/* @{ */
+
+/**
+ *  \name Haptic effects
+ */
+/* @{ */
+
+/**
+ *  \brief Constant effect supported.
+ *
+ *  Constant haptic effect.
+ *
+ *  \sa SDL_HapticCondition
+ */
+#define SDL_HAPTIC_CONSTANT   (1<<0)
+
+/**
+ *  \brief Sine wave effect supported.
+ *
+ *  Periodic haptic effect that simulates sine waves.
+ *
+ *  \sa SDL_HapticPeriodic
+ */
+#define SDL_HAPTIC_SINE       (1<<1)
+
+/**
+ *  \brief Left/Right effect supported.
+ *
+ *  Haptic effect for direct control over high/low frequency motors.
+ *
+ *  \sa SDL_HapticLeftRight
+ * \warning this value was SDL_HAPTIC_SQUARE right before 2.0.0 shipped. Sorry,
+ *          we ran out of bits, and this is important for XInput devices.
+ */
+#define SDL_HAPTIC_LEFTRIGHT     (1<<2)
+
+/* !!! FIXME: put this back when we have more bits in 2.1 */
+/* #define SDL_HAPTIC_SQUARE     (1<<2) */
+
+/**
+ *  \brief Triangle wave effect supported.
+ *
+ *  Periodic haptic effect that simulates triangular waves.
+ *
+ *  \sa SDL_HapticPeriodic
+ */
+#define SDL_HAPTIC_TRIANGLE   (1<<3)
+
+/**
+ *  \brief Sawtoothup wave effect supported.
+ *
+ *  Periodic haptic effect that simulates saw tooth up waves.
+ *
+ *  \sa SDL_HapticPeriodic
+ */
+#define SDL_HAPTIC_SAWTOOTHUP (1<<4)
+
+/**
+ *  \brief Sawtoothdown wave effect supported.
+ *
+ *  Periodic haptic effect that simulates saw tooth down waves.
+ *
+ *  \sa SDL_HapticPeriodic
+ */
+#define SDL_HAPTIC_SAWTOOTHDOWN (1<<5)
+
+/**
+ *  \brief Ramp effect supported.
+ *
+ *  Ramp haptic effect.
+ *
+ *  \sa SDL_HapticRamp
+ */
+#define SDL_HAPTIC_RAMP       (1<<6)
+
+/**
+ *  \brief Spring effect supported - uses axes position.
+ *
+ *  Condition haptic effect that simulates a spring.  Effect is based on the
+ *  axes position.
+ *
+ *  \sa SDL_HapticCondition
+ */
+#define SDL_HAPTIC_SPRING     (1<<7)
+
+/**
+ *  \brief Damper effect supported - uses axes velocity.
+ *
+ *  Condition haptic effect that simulates dampening.  Effect is based on the
+ *  axes velocity.
+ *
+ *  \sa SDL_HapticCondition
+ */
+#define SDL_HAPTIC_DAMPER     (1<<8)
+
+/**
+ *  \brief Inertia effect supported - uses axes acceleration.
+ *
+ *  Condition haptic effect that simulates inertia.  Effect is based on the axes
+ *  acceleration.
+ *
+ *  \sa SDL_HapticCondition
+ */
+#define SDL_HAPTIC_INERTIA    (1<<9)
+
+/**
+ *  \brief Friction effect supported - uses axes movement.
+ *
+ *  Condition haptic effect that simulates friction.  Effect is based on the
+ *  axes movement.
+ *
+ *  \sa SDL_HapticCondition
+ */
+#define SDL_HAPTIC_FRICTION   (1<<10)
+
+/**
+ *  \brief Custom effect is supported.
+ *
+ *  User defined custom haptic effect.
+ */
+#define SDL_HAPTIC_CUSTOM     (1<<11)
+
+/* @} *//* Haptic effects */
+
+/* These last few are features the device has, not effects */
+
+/**
+ *  \brief Device can set global gain.
+ *
+ *  Device supports setting the global gain.
+ *
+ *  \sa SDL_HapticSetGain
+ */
+#define SDL_HAPTIC_GAIN       (1<<12)
+
+/**
+ *  \brief Device can set autocenter.
+ *
+ *  Device supports setting autocenter.
+ *
+ *  \sa SDL_HapticSetAutocenter
+ */
+#define SDL_HAPTIC_AUTOCENTER (1<<13)
+
+/**
+ *  \brief Device can be queried for effect status.
+ *
+ *  Device can be queried for effect status.
+ *
+ *  \sa SDL_HapticGetEffectStatus
+ */
+#define SDL_HAPTIC_STATUS     (1<<14)
+
+/**
+ *  \brief Device can be paused.
+ *
+ *  \sa SDL_HapticPause
+ *  \sa SDL_HapticUnpause
+ */
+#define SDL_HAPTIC_PAUSE      (1<<15)
+
+
+/**
+ * \name Direction encodings
+ */
+/* @{ */
+
+/**
+ *  \brief Uses polar coordinates for the direction.
+ *
+ *  \sa SDL_HapticDirection
+ */
+#define SDL_HAPTIC_POLAR      0
+
+/**
+ *  \brief Uses cartesian coordinates for the direction.
+ *
+ *  \sa SDL_HapticDirection
+ */
+#define SDL_HAPTIC_CARTESIAN  1
+
+/**
+ *  \brief Uses spherical coordinates for the direction.
+ *
+ *  \sa SDL_HapticDirection
+ */
+#define SDL_HAPTIC_SPHERICAL  2
+
+/* @} *//* Direction encodings */
+
+/* @} *//* Haptic features */
+
+/*
+ * Misc defines.
+ */
+
+/**
+ * \brief Used to play a device an infinite number of times.
+ *
+ * \sa SDL_HapticRunEffect
+ */
+#define SDL_HAPTIC_INFINITY   4294967295U
+
+
+/**
+ *  \brief Structure that represents a haptic direction.
+ *
+ *  Directions can be specified by:
+ *   - ::SDL_HAPTIC_POLAR : Specified by polar coordinates.
+ *   - ::SDL_HAPTIC_CARTESIAN : Specified by cartesian coordinates.
+ *   - ::SDL_HAPTIC_SPHERICAL : Specified by spherical coordinates.
+ *
+ *  Cardinal directions of the haptic device are relative to the positioning
+ *  of the device.  North is considered to be away from the user.
+ *
+ *  The following diagram represents the cardinal directions:
+ *  \verbatim
+                 .--.
+                 |__| .-------.
+                 |=.| |.-----.|
+                 |--| ||     ||
+                 |  | |'-----'|
+                 |__|~')_____('
+                   [ COMPUTER ]
+
+
+                     North (0,-1)
+                         ^
+                         |
+                         |
+    (1,0)  West <----[ HAPTIC ]----> East (-1,0)
+                         |
+                         |
+                         v
+                      South (0,1)
+
+
+                      [ USER ]
+                        \|||/
+                        (o o)
+                  ---ooO-(_)-Ooo---
+    \endverbatim
+ *
+ *  If type is ::SDL_HAPTIC_POLAR, direction is encoded by hundredths of a
+ *  degree starting north and turning clockwise.  ::SDL_HAPTIC_POLAR only uses
+ *  the first \c dir parameter.  The cardinal directions would be:
+ *   - North: 0 (0 degrees)
+ *   - East: 9000 (90 degrees)
+ *   - South: 18000 (180 degrees)
+ *   - West: 27000 (270 degrees)
+ *
+ *  If type is ::SDL_HAPTIC_CARTESIAN, direction is encoded by three positions
+ *  (X axis, Y axis and Z axis (with 3 axes)).  ::SDL_HAPTIC_CARTESIAN uses
+ *  the first three \c dir parameters.  The cardinal directions would be:
+ *   - North:  0,-1, 0
+ *   - East:  -1, 0, 0
+ *   - South:  0, 1, 0
+ *   - West:   1, 0, 0
+ *
+ *  The Z axis represents the height of the effect if supported, otherwise
+ *  it's unused.  In cartesian encoding (1, 2) would be the same as (2, 4), you
+ *  can use any multiple you want, only the direction matters.
+ *
+ *  If type is ::SDL_HAPTIC_SPHERICAL, direction is encoded by two rotations.
+ *  The first two \c dir parameters are used.  The \c dir parameters are as
+ *  follows (all values are in hundredths of degrees):
+ *   - Degrees from (1, 0) rotated towards (0, 1).
+ *   - Degrees towards (0, 0, 1) (device needs at least 3 axes).
+ *
+ *
+ *  Example of force coming from the south with all encodings (force coming
+ *  from the south means the user will have to pull the stick to counteract):
+ *  \code
+ *  SDL_HapticDirection direction;
+ *
+ *  // Cartesian directions
+ *  direction.type = SDL_HAPTIC_CARTESIAN; // Using cartesian direction encoding.
+ *  direction.dir[0] = 0; // X position
+ *  direction.dir[1] = 1; // Y position
+ *  // Assuming the device has 2 axes, we don't need to specify third parameter.
+ *
+ *  // Polar directions
+ *  direction.type = SDL_HAPTIC_POLAR; // We'll be using polar direction encoding.
+ *  direction.dir[0] = 18000; // Polar only uses first parameter
+ *
+ *  // Spherical coordinates
+ *  direction.type = SDL_HAPTIC_SPHERICAL; // Spherical encoding
+ *  direction.dir[0] = 9000; // Since we only have two axes we don't need more parameters.
+ *  \endcode
+ *
+ *  \sa SDL_HAPTIC_POLAR
+ *  \sa SDL_HAPTIC_CARTESIAN
+ *  \sa SDL_HAPTIC_SPHERICAL
+ *  \sa SDL_HapticEffect
+ *  \sa SDL_HapticNumAxes
+ */
+typedef struct SDL_HapticDirection
+{
+    Uint8 type;         /**< The type of encoding. */
+    Sint32 dir[3];      /**< The encoded direction. */
+} SDL_HapticDirection;
+
+
+/**
+ *  \brief A structure containing a template for a Constant effect.
+ *
+ *  The struct is exclusive to the ::SDL_HAPTIC_CONSTANT effect.
+ *
+ *  A constant effect applies a constant force in the specified direction
+ *  to the joystick.
+ *
+ *  \sa SDL_HAPTIC_CONSTANT
+ *  \sa SDL_HapticEffect
+ */
+typedef struct SDL_HapticConstant
+{
+    /* Header */
+    Uint16 type;            /**< ::SDL_HAPTIC_CONSTANT */
+    SDL_HapticDirection direction;  /**< Direction of the effect. */
+
+    /* Replay */
+    Uint32 length;          /**< Duration of the effect. */
+    Uint16 delay;           /**< Delay before starting the effect. */
+
+    /* Trigger */
+    Uint16 button;          /**< Button that triggers the effect. */
+    Uint16 interval;        /**< How soon it can be triggered again after button. */
+
+    /* Constant */
+    Sint16 level;           /**< Strength of the constant effect. */
+
+    /* Envelope */
+    Uint16 attack_length;   /**< Duration of the attack. */
+    Uint16 attack_level;    /**< Level at the start of the attack. */
+    Uint16 fade_length;     /**< Duration of the fade. */
+    Uint16 fade_level;      /**< Level at the end of the fade. */
+} SDL_HapticConstant;
+
+/**
+ *  \brief A structure containing a template for a Periodic effect.
+ *
+ *  The struct handles the following effects:
+ *   - ::SDL_HAPTIC_SINE
+ *   - ::SDL_HAPTIC_LEFTRIGHT
+ *   - ::SDL_HAPTIC_TRIANGLE
+ *   - ::SDL_HAPTIC_SAWTOOTHUP
+ *   - ::SDL_HAPTIC_SAWTOOTHDOWN
+ *
+ *  A periodic effect consists in a wave-shaped effect that repeats itself
+ *  over time.  The type determines the shape of the wave and the parameters
+ *  determine the dimensions of the wave.
+ *
+ *  Phase is given by hundredth of a cycle meaning that giving the phase a value
+ *  of 9000 will displace it 25% of its period.  Here are sample values:
+ *   -     0: No phase displacement.
+ *   -  9000: Displaced 25% of its period.
+ *   - 18000: Displaced 50% of its period.
+ *   - 27000: Displaced 75% of its period.
+ *   - 36000: Displaced 100% of its period, same as 0, but 0 is preferred.
+ *
+ *  Examples:
+ *  \verbatim
+    SDL_HAPTIC_SINE
+      __      __      __      __
+     /  \    /  \    /  \    /
+    /    \__/    \__/    \__/
+
+    SDL_HAPTIC_SQUARE
+     __    __    __    __    __
+    |  |  |  |  |  |  |  |  |  |
+    |  |__|  |__|  |__|  |__|  |
+
+    SDL_HAPTIC_TRIANGLE
+      /\    /\    /\    /\    /\
+     /  \  /  \  /  \  /  \  /
+    /    \/    \/    \/    \/
+
+    SDL_HAPTIC_SAWTOOTHUP
+      /|  /|  /|  /|  /|  /|  /|
+     / | / | / | / | / | / | / |
+    /  |/  |/  |/  |/  |/  |/  |
+
+    SDL_HAPTIC_SAWTOOTHDOWN
+    \  |\  |\  |\  |\  |\  |\  |
+     \ | \ | \ | \ | \ | \ | \ |
+      \|  \|  \|  \|  \|  \|  \|
+    \endverbatim
+ *
+ *  \sa SDL_HAPTIC_SINE
+ *  \sa SDL_HAPTIC_LEFTRIGHT
+ *  \sa SDL_HAPTIC_TRIANGLE
+ *  \sa SDL_HAPTIC_SAWTOOTHUP
+ *  \sa SDL_HAPTIC_SAWTOOTHDOWN
+ *  \sa SDL_HapticEffect
+ */
+typedef struct SDL_HapticPeriodic
+{
+    /* Header */
+    Uint16 type;        /**< ::SDL_HAPTIC_SINE, ::SDL_HAPTIC_LEFTRIGHT,
+                             ::SDL_HAPTIC_TRIANGLE, ::SDL_HAPTIC_SAWTOOTHUP or
+                             ::SDL_HAPTIC_SAWTOOTHDOWN */
+    SDL_HapticDirection direction;  /**< Direction of the effect. */
+
+    /* Replay */
+    Uint32 length;      /**< Duration of the effect. */
+    Uint16 delay;       /**< Delay before starting the effect. */
+
+    /* Trigger */
+    Uint16 button;      /**< Button that triggers the effect. */
+    Uint16 interval;    /**< How soon it can be triggered again after button. */
+
+    /* Periodic */
+    Uint16 period;      /**< Period of the wave. */
+    Sint16 magnitude;   /**< Peak value. */
+    Sint16 offset;      /**< Mean value of the wave. */
+    Uint16 phase;       /**< Horizontal shift given by hundredth of a cycle. */
+
+    /* Envelope */
+    Uint16 attack_length;   /**< Duration of the attack. */
+    Uint16 attack_level;    /**< Level at the start of the attack. */
+    Uint16 fade_length; /**< Duration of the fade. */
+    Uint16 fade_level;  /**< Level at the end of the fade. */
+} SDL_HapticPeriodic;
+
+/**
+ *  \brief A structure containing a template for a Condition effect.
+ *
+ *  The struct handles the following effects:
+ *   - ::SDL_HAPTIC_SPRING: Effect based on axes position.
+ *   - ::SDL_HAPTIC_DAMPER: Effect based on axes velocity.
+ *   - ::SDL_HAPTIC_INERTIA: Effect based on axes acceleration.
+ *   - ::SDL_HAPTIC_FRICTION: Effect based on axes movement.
+ *
+ *  Direction is handled by condition internals instead of a direction member.
+ *  The condition effect specific members have three parameters.  The first
+ *  refers to the X axis, the second refers to the Y axis and the third
+ *  refers to the Z axis.  The right terms refer to the positive side of the
+ *  axis and the left terms refer to the negative side of the axis.  Please
+ *  refer to the ::SDL_HapticDirection diagram for which side is positive and
+ *  which is negative.
+ *
+ *  \sa SDL_HapticDirection
+ *  \sa SDL_HAPTIC_SPRING
+ *  \sa SDL_HAPTIC_DAMPER
+ *  \sa SDL_HAPTIC_INERTIA
+ *  \sa SDL_HAPTIC_FRICTION
+ *  \sa SDL_HapticEffect
+ */
+typedef struct SDL_HapticCondition
+{
+    /* Header */
+    Uint16 type;            /**< ::SDL_HAPTIC_SPRING, ::SDL_HAPTIC_DAMPER,
+                                 ::SDL_HAPTIC_INERTIA or ::SDL_HAPTIC_FRICTION */
+    SDL_HapticDirection direction;  /**< Direction of the effect - Not used ATM. */
+
+    /* Replay */
+    Uint32 length;          /**< Duration of the effect. */
+    Uint16 delay;           /**< Delay before starting the effect. */
+
+    /* Trigger */
+    Uint16 button;          /**< Button that triggers the effect. */
+    Uint16 interval;        /**< How soon it can be triggered again after button. */
+
+    /* Condition */
+    Uint16 right_sat[3];    /**< Level when joystick is to the positive side. */
+    Uint16 left_sat[3];     /**< Level when joystick is to the negative side. */
+    Sint16 right_coeff[3];  /**< How fast to increase the force towards the positive side. */
+    Sint16 left_coeff[3];   /**< How fast to increase the force towards the negative side. */
+    Uint16 deadband[3];     /**< Size of the dead zone. */
+    Sint16 center[3];       /**< Position of the dead zone. */
+} SDL_HapticCondition;
+
+/**
+ *  \brief A structure containing a template for a Ramp effect.
+ *
+ *  This struct is exclusively for the ::SDL_HAPTIC_RAMP effect.
+ *
+ *  The ramp effect starts at start strength and ends at end strength.
+ *  It augments in linear fashion.  If you use attack and fade with a ramp
+ *  the effects get added to the ramp effect making the effect become
+ *  quadratic instead of linear.
+ *
+ *  \sa SDL_HAPTIC_RAMP
+ *  \sa SDL_HapticEffect
+ */
+typedef struct SDL_HapticRamp
+{
+    /* Header */
+    Uint16 type;            /**< ::SDL_HAPTIC_RAMP */
+    SDL_HapticDirection direction;  /**< Direction of the effect. */
+
+    /* Replay */
+    Uint32 length;          /**< Duration of the effect. */
+    Uint16 delay;           /**< Delay before starting the effect. */
+
+    /* Trigger */
+    Uint16 button;          /**< Button that triggers the effect. */
+    Uint16 interval;        /**< How soon it can be triggered again after button. */
+
+    /* Ramp */
+    Sint16 start;           /**< Beginning strength level. */
+    Sint16 end;             /**< Ending strength level. */
+
+    /* Envelope */
+    Uint16 attack_length;   /**< Duration of the attack. */
+    Uint16 attack_level;    /**< Level at the start of the attack. */
+    Uint16 fade_length;     /**< Duration of the fade. */
+    Uint16 fade_level;      /**< Level at the end of the fade. */
+} SDL_HapticRamp;
+
+/**
+ * \brief A structure containing a template for a Left/Right effect.
+ *
+ * This struct is exclusively for the ::SDL_HAPTIC_LEFTRIGHT effect.
+ *
+ * The Left/Right effect is used to explicitly control the large and small
+ * motors, commonly found in modern game controllers. One motor is high
+ * frequency, the other is low frequency.
+ *
+ * \sa SDL_HAPTIC_LEFTRIGHT
+ * \sa SDL_HapticEffect
+ */
+typedef struct SDL_HapticLeftRight
+{
+    /* Header */
+    Uint16 type;            /**< ::SDL_HAPTIC_LEFTRIGHT */
+
+    /* Replay */
+    Uint32 length;          /**< Duration of the effect. */
+
+    /* Rumble */
+    Uint16 large_magnitude; /**< Control of the large controller motor. */
+    Uint16 small_magnitude; /**< Control of the small controller motor. */
+} SDL_HapticLeftRight;
+
+/**
+ *  \brief A structure containing a template for the ::SDL_HAPTIC_CUSTOM effect.
+ *
+ *  A custom force feedback effect is much like a periodic effect, where the
+ *  application can define its exact shape.  You will have to allocate the
+ *  data yourself.  Data should consist of channels * samples Uint16 samples.
+ *
+ *  If channels is one, the effect is rotated using the defined direction.
+ *  Otherwise it uses the samples in data for the different axes.
+ *
+ *  \sa SDL_HAPTIC_CUSTOM
+ *  \sa SDL_HapticEffect
+ */
+typedef struct SDL_HapticCustom
+{
+    /* Header */
+    Uint16 type;            /**< ::SDL_HAPTIC_CUSTOM */
+    SDL_HapticDirection direction;  /**< Direction of the effect. */
+
+    /* Replay */
+    Uint32 length;          /**< Duration of the effect. */
+    Uint16 delay;           /**< Delay before starting the effect. */
+
+    /* Trigger */
+    Uint16 button;          /**< Button that triggers the effect. */
+    Uint16 interval;        /**< How soon it can be triggered again after button. */
+
+    /* Custom */
+    Uint8 channels;         /**< Axes to use, minimum of one. */
+    Uint16 period;          /**< Sample periods. */
+    Uint16 samples;         /**< Amount of samples. */
+    Uint16 *data;           /**< Should contain channels*samples items. */
+
+    /* Envelope */
+    Uint16 attack_length;   /**< Duration of the attack. */
+    Uint16 attack_level;    /**< Level at the start of the attack. */
+    Uint16 fade_length;     /**< Duration of the fade. */
+    Uint16 fade_level;      /**< Level at the end of the fade. */
+} SDL_HapticCustom;
+
+/**
+ *  \brief The generic template for any haptic effect.
+ *
+ *  All values max at 32767 (0x7FFF).  Signed values also can be negative.
+ *  Time values unless specified otherwise are in milliseconds.
+ *
+ *  You can also pass ::SDL_HAPTIC_INFINITY to length instead of a 0-32767
+ *  value.  Neither delay, interval, attack_length nor fade_length support
+ *  ::SDL_HAPTIC_INFINITY.  Fade will also not be used since effect never ends.
+ *
+ *  Additionally, the ::SDL_HAPTIC_RAMP effect does not support a duration of
+ *  ::SDL_HAPTIC_INFINITY.
+ *
+ *  Button triggers may not be supported on all devices, it is advised to not
+ *  use them if possible.  Buttons start at index 1 instead of index 0 like
+ *  the joystick.
+ *
+ *  If both attack_length and fade_level are 0, the envelope is not used,
+ *  otherwise both values are used.
+ *
+ *  Common parts:
+ *  \code
+ *  // Replay - All effects have this
+ *  Uint32 length;        // Duration of effect (ms).
+ *  Uint16 delay;         // Delay before starting effect.
+ *
+ *  // Trigger - All effects have this
+ *  Uint16 button;        // Button that triggers effect.
+ *  Uint16 interval;      // How soon before effect can be triggered again.
+ *
+ *  // Envelope - All effects except condition effects have this
+ *  Uint16 attack_length; // Duration of the attack (ms).
+ *  Uint16 attack_level;  // Level at the start of the attack.
+ *  Uint16 fade_length;   // Duration of the fade out (ms).
+ *  Uint16 fade_level;    // Level at the end of the fade.
+ *  \endcode
+ *
+ *
+ *  Here we have an example of a constant effect evolution in time:
+ *  \verbatim
+    Strength
+    ^
+    |
+    |    effect level -->  _________________
+    |                     /                 \
+    |                    /                   \
+    |                   /                     \
+    |                  /                       \
+    | attack_level --> |                        \
+    |                  |                        |  <---  fade_level
+    |
+    +--------------------------------------------------> Time
+                       [--]                 [---]
+                       attack_length        fade_length
+
+    [------------------][-----------------------]
+    delay               length
+    \endverbatim
+ *
+ *  Note either the attack_level or the fade_level may be above the actual
+ *  effect level.
+ *
+ *  \sa SDL_HapticConstant
+ *  \sa SDL_HapticPeriodic
+ *  \sa SDL_HapticCondition
+ *  \sa SDL_HapticRamp
+ *  \sa SDL_HapticLeftRight
+ *  \sa SDL_HapticCustom
+ */
+typedef union SDL_HapticEffect
+{
+    /* Common for all force feedback effects */
+    Uint16 type;                    /**< Effect type. */
+    SDL_HapticConstant constant;    /**< Constant effect. */
+    SDL_HapticPeriodic periodic;    /**< Periodic effect. */
+    SDL_HapticCondition condition;  /**< Condition effect. */
+    SDL_HapticRamp ramp;            /**< Ramp effect. */
+    SDL_HapticLeftRight leftright;  /**< Left/Right effect. */
+    SDL_HapticCustom custom;        /**< Custom effect. */
+} SDL_HapticEffect;
+
+
+/* Function prototypes */
+/**
+ *  \brief Count the number of haptic devices attached to the system.
+ *
+ *  \return Number of haptic devices detected on the system.
+ */
+extern DECLSPEC int SDLCALL SDL_NumHaptics(void);
+
+/**
+ *  \brief Get the implementation dependent name of a Haptic device.
+ *
+ *  This can be called before any joysticks are opened.
+ *  If no name can be found, this function returns NULL.
+ *
+ *  \param device_index Index of the device to get its name.
+ *  \return Name of the device or NULL on error.
+ *
+ *  \sa SDL_NumHaptics
+ */
+extern DECLSPEC const char *SDLCALL SDL_HapticName(int device_index);
+
+/**
+ *  \brief Opens a Haptic device for usage.
+ *
+ *  The index passed as an argument refers to the N'th Haptic device on this
+ *  system.
+ *
+ *  When opening a haptic device, its gain will be set to maximum and
+ *  autocenter will be disabled.  To modify these values use
+ *  SDL_HapticSetGain() and SDL_HapticSetAutocenter().
+ *
+ *  \param device_index Index of the device to open.
+ *  \return Device identifier or NULL on error.
+ *
+ *  \sa SDL_HapticIndex
+ *  \sa SDL_HapticOpenFromMouse
+ *  \sa SDL_HapticOpenFromJoystick
+ *  \sa SDL_HapticClose
+ *  \sa SDL_HapticSetGain
+ *  \sa SDL_HapticSetAutocenter
+ *  \sa SDL_HapticPause
+ *  \sa SDL_HapticStopAll
+ */
+extern DECLSPEC SDL_Haptic *SDLCALL SDL_HapticOpen(int device_index);
+
+/**
+ *  \brief Checks if the haptic device at index has been opened.
+ *
+ *  \param device_index Index to check to see if it has been opened.
+ *  \return 1 if it has been opened or 0 if it hasn't.
+ *
+ *  \sa SDL_HapticOpen
+ *  \sa SDL_HapticIndex
+ */
+extern DECLSPEC int SDLCALL SDL_HapticOpened(int device_index);
+
+/**
+ *  \brief Gets the index of a haptic device.
+ *
+ *  \param haptic Haptic device to get the index of.
+ *  \return The index of the haptic device or -1 on error.
+ *
+ *  \sa SDL_HapticOpen
+ *  \sa SDL_HapticOpened
+ */
+extern DECLSPEC int SDLCALL SDL_HapticIndex(SDL_Haptic * haptic);
+
+/**
+ *  \brief Gets whether or not the current mouse has haptic capabilities.
+ *
+ *  \return SDL_TRUE if the mouse is haptic, SDL_FALSE if it isn't.
+ *
+ *  \sa SDL_HapticOpenFromMouse
+ */
+extern DECLSPEC int SDLCALL SDL_MouseIsHaptic(void);
+
+/**
+ *  \brief Tries to open a haptic device from the current mouse.
+ *
+ *  \return The haptic device identifier or NULL on error.
+ *
+ *  \sa SDL_MouseIsHaptic
+ *  \sa SDL_HapticOpen
+ */
+extern DECLSPEC SDL_Haptic *SDLCALL SDL_HapticOpenFromMouse(void);
+
+/**
+ *  \brief Checks to see if a joystick has haptic features.
+ *
+ *  \param joystick Joystick to test for haptic capabilities.
+ *  \return 1 if the joystick is haptic, 0 if it isn't
+ *          or -1 if an error ocurred.
+ *
+ *  \sa SDL_HapticOpenFromJoystick
+ */
+extern DECLSPEC int SDLCALL SDL_JoystickIsHaptic(SDL_Joystick * joystick);
+
+/**
+ *  \brief Opens a Haptic device for usage from a Joystick device.
+ *
+ *  You must still close the haptic device seperately.  It will not be closed
+ *  with the joystick.
+ *
+ *  When opening from a joystick you should first close the haptic device before
+ *  closing the joystick device.  If not, on some implementations the haptic
+ *  device will also get unallocated and you'll be unable to use force feedback
+ *  on that device.
+ *
+ *  \param joystick Joystick to create a haptic device from.
+ *  \return A valid haptic device identifier on success or NULL on error.
+ *
+ *  \sa SDL_HapticOpen
+ *  \sa SDL_HapticClose
+ */
+extern DECLSPEC SDL_Haptic *SDLCALL SDL_HapticOpenFromJoystick(SDL_Joystick *
+                                                               joystick);
+
+/**
+ *  \brief Closes a Haptic device previously opened with SDL_HapticOpen().
+ *
+ *  \param haptic Haptic device to close.
+ */
+extern DECLSPEC void SDLCALL SDL_HapticClose(SDL_Haptic * haptic);
+
+/**
+ *  \brief Returns the number of effects a haptic device can store.
+ *
+ *  On some platforms this isn't fully supported, and therefore is an
+ *  approximation.  Always check to see if your created effect was actually
+ *  created and do not rely solely on SDL_HapticNumEffects().
+ *
+ *  \param haptic The haptic device to query effect max.
+ *  \return The number of effects the haptic device can store or
+ *          -1 on error.
+ *
+ *  \sa SDL_HapticNumEffectsPlaying
+ *  \sa SDL_HapticQuery
+ */
+extern DECLSPEC int SDLCALL SDL_HapticNumEffects(SDL_Haptic * haptic);
+
+/**
+ *  \brief Returns the number of effects a haptic device can play at the same
+ *         time.
+ *
+ *  This is not supported on all platforms, but will always return a value.
+ *  Added here for the sake of completeness.
+ *
+ *  \param haptic The haptic device to query maximum playing effects.
+ *  \return The number of effects the haptic device can play at the same time
+ *          or -1 on error.
+ *
+ *  \sa SDL_HapticNumEffects
+ *  \sa SDL_HapticQuery
+ */
+extern DECLSPEC int SDLCALL SDL_HapticNumEffectsPlaying(SDL_Haptic * haptic);
+
+/**
+ *  \brief Gets the haptic devices supported features in bitwise matter.
+ *
+ *  Example:
+ *  \code
+ *  if (SDL_HapticQuery(haptic) & SDL_HAPTIC_CONSTANT) {
+ *      printf("We have constant haptic effect!");
+ *  }
+ *  \endcode
+ *
+ *  \param haptic The haptic device to query.
+ *  \return Haptic features in bitwise manner (OR'd).
+ *
+ *  \sa SDL_HapticNumEffects
+ *  \sa SDL_HapticEffectSupported
+ */
+extern DECLSPEC unsigned int SDLCALL SDL_HapticQuery(SDL_Haptic * haptic);
+
+
+/**
+ *  \brief Gets the number of haptic axes the device has.
+ *
+ *  \sa SDL_HapticDirection
+ */
+extern DECLSPEC int SDLCALL SDL_HapticNumAxes(SDL_Haptic * haptic);
+
+/**
+ *  \brief Checks to see if effect is supported by haptic.
+ *
+ *  \param haptic Haptic device to check on.
+ *  \param effect Effect to check to see if it is supported.
+ *  \return SDL_TRUE if effect is supported, SDL_FALSE if it isn't or -1 on error.
+ *
+ *  \sa SDL_HapticQuery
+ *  \sa SDL_HapticNewEffect
+ */
+extern DECLSPEC int SDLCALL SDL_HapticEffectSupported(SDL_Haptic * haptic,
+                                                      SDL_HapticEffect *
+                                                      effect);
+
+/**
+ *  \brief Creates a new haptic effect on the device.
+ *
+ *  \param haptic Haptic device to create the effect on.
+ *  \param effect Properties of the effect to create.
+ *  \return The id of the effect on success or -1 on error.
+ *
+ *  \sa SDL_HapticUpdateEffect
+ *  \sa SDL_HapticRunEffect
+ *  \sa SDL_HapticDestroyEffect
+ */
+extern DECLSPEC int SDLCALL SDL_HapticNewEffect(SDL_Haptic * haptic,
+                                                SDL_HapticEffect * effect);
+
+/**
+ *  \brief Updates the properties of an effect.
+ *
+ *  Can be used dynamically, although behaviour when dynamically changing
+ *  direction may be strange.  Specifically the effect may reupload itself
+ *  and start playing from the start.  You cannot change the type either when
+ *  running SDL_HapticUpdateEffect().
+ *
+ *  \param haptic Haptic device that has the effect.
+ *  \param effect Effect to update.
+ *  \param data New effect properties to use.
+ *  \return 0 on success or -1 on error.
+ *
+ *  \sa SDL_HapticNewEffect
+ *  \sa SDL_HapticRunEffect
+ *  \sa SDL_HapticDestroyEffect
+ */
+extern DECLSPEC int SDLCALL SDL_HapticUpdateEffect(SDL_Haptic * haptic,
+                                                   int effect,
+                                                   SDL_HapticEffect * data);
+
+/**
+ *  \brief Runs the haptic effect on its associated haptic device.
+ *
+ *  If iterations are ::SDL_HAPTIC_INFINITY, it'll run the effect over and over
+ *  repeating the envelope (attack and fade) every time.  If you only want the
+ *  effect to last forever, set ::SDL_HAPTIC_INFINITY in the effect's length
+ *  parameter.
+ *
+ *  \param haptic Haptic device to run the effect on.
+ *  \param effect Identifier of the haptic effect to run.
+ *  \param iterations Number of iterations to run the effect. Use
+ *         ::SDL_HAPTIC_INFINITY for infinity.
+ *  \return 0 on success or -1 on error.
+ *
+ *  \sa SDL_HapticStopEffect
+ *  \sa SDL_HapticDestroyEffect
+ *  \sa SDL_HapticGetEffectStatus
+ */
+extern DECLSPEC int SDLCALL SDL_HapticRunEffect(SDL_Haptic * haptic,
+                                                int effect,
+                                                Uint32 iterations);
+
+/**
+ *  \brief Stops the haptic effect on its associated haptic device.
+ *
+ *  \param haptic Haptic device to stop the effect on.
+ *  \param effect Identifier of the effect to stop.
+ *  \return 0 on success or -1 on error.
+ *
+ *  \sa SDL_HapticRunEffect
+ *  \sa SDL_HapticDestroyEffect
+ */
+extern DECLSPEC int SDLCALL SDL_HapticStopEffect(SDL_Haptic * haptic,
+                                                 int effect);
+
+/**
+ *  \brief Destroys a haptic effect on the device.
+ *
+ *  This will stop the effect if it's running.  Effects are automatically
+ *  destroyed when the device is closed.
+ *
+ *  \param haptic Device to destroy the effect on.
+ *  \param effect Identifier of the effect to destroy.
+ *
+ *  \sa SDL_HapticNewEffect
+ */
+extern DECLSPEC void SDLCALL SDL_HapticDestroyEffect(SDL_Haptic * haptic,
+                                                     int effect);
+
+/**
+ *  \brief Gets the status of the current effect on the haptic device.
+ *
+ *  Device must support the ::SDL_HAPTIC_STATUS feature.
+ *
+ *  \param haptic Haptic device to query the effect status on.
+ *  \param effect Identifier of the effect to query its status.
+ *  \return 0 if it isn't playing, 1 if it is playing or -1 on error.
+ *
+ *  \sa SDL_HapticRunEffect
+ *  \sa SDL_HapticStopEffect
+ */
+extern DECLSPEC int SDLCALL SDL_HapticGetEffectStatus(SDL_Haptic * haptic,
+                                                      int effect);
+
+/**
+ *  \brief Sets the global gain of the device.
+ *
+ *  Device must support the ::SDL_HAPTIC_GAIN feature.
+ *
+ *  The user may specify the maximum gain by setting the environment variable
+ *  SDL_HAPTIC_GAIN_MAX which should be between 0 and 100.  All calls to
+ *  SDL_HapticSetGain() will scale linearly using SDL_HAPTIC_GAIN_MAX as the
+ *  maximum.
+ *
+ *  \param haptic Haptic device to set the gain on.
+ *  \param gain Value to set the gain to, should be between 0 and 100.
+ *  \return 0 on success or -1 on error.
+ *
+ *  \sa SDL_HapticQuery
+ */
+extern DECLSPEC int SDLCALL SDL_HapticSetGain(SDL_Haptic * haptic, int gain);
+
+/**
+ *  \brief Sets the global autocenter of the device.
+ *
+ *  Autocenter should be between 0 and 100.  Setting it to 0 will disable
+ *  autocentering.
+ *
+ *  Device must support the ::SDL_HAPTIC_AUTOCENTER feature.
+ *
+ *  \param haptic Haptic device to set autocentering on.
+ *  \param autocenter Value to set autocenter to, 0 disables autocentering.
+ *  \return 0 on success or -1 on error.
+ *
+ *  \sa SDL_HapticQuery
+ */
+extern DECLSPEC int SDLCALL SDL_HapticSetAutocenter(SDL_Haptic * haptic,
+                                                    int autocenter);
+
+/**
+ *  \brief Pauses a haptic device.
+ *
+ *  Device must support the ::SDL_HAPTIC_PAUSE feature.  Call
+ *  SDL_HapticUnpause() to resume playback.
+ *
+ *  Do not modify the effects nor add new ones while the device is paused.
+ *  That can cause all sorts of weird errors.
+ *
+ *  \param haptic Haptic device to pause.
+ *  \return 0 on success or -1 on error.
+ *
+ *  \sa SDL_HapticUnpause
+ */
+extern DECLSPEC int SDLCALL SDL_HapticPause(SDL_Haptic * haptic);
+
+/**
+ *  \brief Unpauses a haptic device.
+ *
+ *  Call to unpause after SDL_HapticPause().
+ *
+ *  \param haptic Haptic device to pause.
+ *  \return 0 on success or -1 on error.
+ *
+ *  \sa SDL_HapticPause
+ */
+extern DECLSPEC int SDLCALL SDL_HapticUnpause(SDL_Haptic * haptic);
+
+/**
+ *  \brief Stops all the currently playing effects on a haptic device.
+ *
+ *  \param haptic Haptic device to stop.
+ *  \return 0 on success or -1 on error.
+ */
+extern DECLSPEC int SDLCALL SDL_HapticStopAll(SDL_Haptic * haptic);
+
+/**
+ *  \brief Checks to see if rumble is supported on a haptic device.
+ *
+ *  \param haptic Haptic device to check to see if it supports rumble.
+ *  \return SDL_TRUE if effect is supported, SDL_FALSE if it isn't or -1 on error.
+ *
+ *  \sa SDL_HapticRumbleInit
+ *  \sa SDL_HapticRumblePlay
+ *  \sa SDL_HapticRumbleStop
+ */
+extern DECLSPEC int SDLCALL SDL_HapticRumbleSupported(SDL_Haptic * haptic);
+
+/**
+ *  \brief Initializes the haptic device for simple rumble playback.
+ *
+ *  \param haptic Haptic device to initialize for simple rumble playback.
+ *  \return 0 on success or -1 on error.
+ *
+ *  \sa SDL_HapticOpen
+ *  \sa SDL_HapticRumbleSupported
+ *  \sa SDL_HapticRumblePlay
+ *  \sa SDL_HapticRumbleStop
+ */
+extern DECLSPEC int SDLCALL SDL_HapticRumbleInit(SDL_Haptic * haptic);
+
+/**
+ *  \brief Runs simple rumble on a haptic device
+ *
+ *  \param haptic Haptic device to play rumble effect on.
+ *  \param strength Strength of the rumble to play as a 0-1 float value.
+ *  \param length Length of the rumble to play in milliseconds.
+ *  \return 0 on success or -1 on error.
+ *
+ *  \sa SDL_HapticRumbleSupported
+ *  \sa SDL_HapticRumbleInit
+ *  \sa SDL_HapticRumbleStop
+ */
+extern DECLSPEC int SDLCALL SDL_HapticRumblePlay(SDL_Haptic * haptic, float strength, Uint32 length );
+
+/**
+ *  \brief Stops the simple rumble on a haptic device.
+ *
+ *  \param haptic Haptic to stop the rumble on.
+ *  \return 0 on success or -1 on error.
+ *
+ *  \sa SDL_HapticRumbleSupported
+ *  \sa SDL_HapticRumbleInit
+ *  \sa SDL_HapticRumblePlay
+ */
+extern DECLSPEC int SDLCALL SDL_HapticRumbleStop(SDL_Haptic * haptic);
+
+/* Ends C function definitions when using C++ */
+#ifdef __cplusplus
+}
+#endif
+#include "close_code.h"
+
+#endif /* _SDL_haptic_h */
+
+/* vi: set ts=4 sw=4 expandtab: */
diff --git a/include/SDL2/SDL_hints.h b/include/SDL2/SDL_hints.h
new file mode 100644 (file)
index 0000000..b98ce68
--- /dev/null
@@ -0,0 +1,517 @@
+/*
+  Simple DirectMedia Layer
+  Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
+
+  This software is provided 'as-is', without any express or implied
+  warranty.  In no event will the authors be held liable for any damages
+  arising from the use of this software.
+
+  Permission is granted to anyone to use this software for any purpose,
+  including commercial applications, and to alter it and redistribute it
+  freely, subject to the following restrictions:
+
+  1. The origin of this software must not be misrepresented; you must not
+     claim that you wrote the original software. If you use this software
+     in a product, an acknowledgment in the product documentation would be
+     appreciated but is not required.
+  2. Altered source versions must be plainly marked as such, and must not be
+     misrepresented as being the original software.
+  3. This notice may not be removed or altered from any source distribution.
+*/
+
+/**
+ *  \file SDL_hints.h
+ *
+ *  Official documentation for SDL configuration variables
+ *
+ *  This file contains functions to set and get configuration hints,
+ *  as well as listing each of them alphabetically.
+ *
+ *  The convention for naming hints is SDL_HINT_X, where "SDL_X" is
+ *  the environment variable that can be used to override the default.
+ *
+ *  In general these hints are just that - they may or may not be
+ *  supported or applicable on any given platform, but they provide
+ *  a way for an application or user to give the library a hint as
+ *  to how they would like the library to work.
+ */
+
+#ifndef _SDL_hints_h
+#define _SDL_hints_h
+
+#include "SDL_stdinc.h"
+
+#include "begin_code.h"
+/* Set up for C function definitions, even when using C++ */
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ *  \brief  A variable controlling how 3D acceleration is used to accelerate the SDL screen surface.
+ *
+ *  SDL can try to accelerate the SDL screen surface by using streaming
+ *  textures with a 3D rendering engine.  This variable controls whether and
+ *  how this is done.
+ *
+ *  This variable can be set to the following values:
+ *    "0"       - Disable 3D acceleration
+ *    "1"       - Enable 3D acceleration, using the default renderer.
+ *    "X"       - Enable 3D acceleration, using X where X is one of the valid rendering drivers.  (e.g. "direct3d", "opengl", etc.)
+ *
+ *  By default SDL tries to make a best guess for each platform whether
+ *  to use acceleration or not.
+ */
+#define SDL_HINT_FRAMEBUFFER_ACCELERATION   "SDL_FRAMEBUFFER_ACCELERATION"
+
+/**
+ *  \brief  A variable specifying which render driver to use.
+ *
+ *  If the application doesn't pick a specific renderer to use, this variable
+ *  specifies the name of the preferred renderer.  If the preferred renderer
+ *  can't be initialized, the normal default renderer is used.
+ *
+ *  This variable is case insensitive and can be set to the following values:
+ *    "direct3d"
+ *    "opengl"
+ *    "opengles2"
+ *    "opengles"
+ *    "software"
+ *
+ *  The default varies by platform, but it's the first one in the list that
+ *  is available on the current platform.
+ */
+#define SDL_HINT_RENDER_DRIVER              "SDL_RENDER_DRIVER"
+
+/**
+ *  \brief  A variable controlling whether the OpenGL render driver uses shaders if they are available.
+ *
+ *  This variable can be set to the following values:
+ *    "0"       - Disable shaders
+ *    "1"       - Enable shaders
+ *
+ *  By default shaders are used if OpenGL supports them.
+ */
+#define SDL_HINT_RENDER_OPENGL_SHADERS      "SDL_RENDER_OPENGL_SHADERS"
+
+/**
+ *  \brief  A variable controlling whether the Direct3D device is initialized for thread-safe operations.
+ *
+ *  This variable can be set to the following values:
+ *    "0"       - Thread-safety is not enabled (faster)
+ *    "1"       - Thread-safety is enabled
+ *
+ *  By default the Direct3D device is created with thread-safety disabled.
+ */
+#define SDL_HINT_RENDER_DIRECT3D_THREADSAFE "SDL_RENDER_DIRECT3D_THREADSAFE"
+
+/**
+ *  \brief  A variable controlling whether to enable Direct3D 11+'s Debug Layer.
+ *
+ *  This variable does not have any effect on the Direct3D 9 based renderer.
+ *
+ *  This variable can be set to the following values:
+ *    "0"       - Disable Debug Layer use
+ *    "1"       - Enable Debug Layer use
+ *
+ *  By default, SDL does not use Direct3D Debug Layer.
+ */
+#define SDL_HINT_RENDER_DIRECT3D11_DEBUG    "SDL_HINT_RENDER_DIRECT3D11_DEBUG"
+
+/**
+ *  \brief  A variable controlling the scaling quality
+ *
+ *  This variable can be set to the following values:
+ *    "0" or "nearest" - Nearest pixel sampling
+ *    "1" or "linear"  - Linear filtering (supported by OpenGL and Direct3D)
+ *    "2" or "best"    - Currently this is the same as "linear"
+ *
+ *  By default nearest pixel sampling is used
+ */
+#define SDL_HINT_RENDER_SCALE_QUALITY       "SDL_RENDER_SCALE_QUALITY"
+
+/**
+ *  \brief  A variable controlling whether updates to the SDL screen surface should be synchronized with the vertical refresh, to avoid tearing.
+ *
+ *  This variable can be set to the following values:
+ *    "0"       - Disable vsync
+ *    "1"       - Enable vsync
+ *
+ *  By default SDL does not sync screen surface updates with vertical refresh.
+ */
+#define SDL_HINT_RENDER_VSYNC               "SDL_RENDER_VSYNC"
+
+/**
+ *  \brief  A variable controlling whether the screensaver is enabled. 
+ *
+ *  This variable can be set to the following values:
+ *    "0"       - Disable screensaver
+ *    "1"       - Enable screensaver
+ *
+ *  By default SDL will disable the screensaver.
+ */
+#define SDL_HINT_VIDEO_ALLOW_SCREENSAVER    "SDL_VIDEO_ALLOW_SCREENSAVER"
+
+/**
+ *  \brief  A variable controlling whether the X11 VidMode extension should be used.
+ *
+ *  This variable can be set to the following values:
+ *    "0"       - Disable XVidMode
+ *    "1"       - Enable XVidMode
+ *
+ *  By default SDL will use XVidMode if it is available.
+ */
+#define SDL_HINT_VIDEO_X11_XVIDMODE         "SDL_VIDEO_X11_XVIDMODE"
+
+/**
+ *  \brief  A variable controlling whether the X11 Xinerama extension should be used.
+ *
+ *  This variable can be set to the following values:
+ *    "0"       - Disable Xinerama
+ *    "1"       - Enable Xinerama
+ *
+ *  By default SDL will use Xinerama if it is available.
+ */
+#define SDL_HINT_VIDEO_X11_XINERAMA         "SDL_VIDEO_X11_XINERAMA"
+
+/**
+ *  \brief  A variable controlling whether the X11 XRandR extension should be used.
+ *
+ *  This variable can be set to the following values:
+ *    "0"       - Disable XRandR
+ *    "1"       - Enable XRandR
+ *
+ *  By default SDL will not use XRandR because of window manager issues.
+ */
+#define SDL_HINT_VIDEO_X11_XRANDR           "SDL_VIDEO_X11_XRANDR"
+
+/**
+ *  \brief  A variable controlling whether grabbing input grabs the keyboard
+ *
+ *  This variable can be set to the following values:
+ *    "0"       - Grab will affect only the mouse
+ *    "1"       - Grab will affect mouse and keyboard
+ *
+ *  By default SDL will not grab the keyboard so system shortcuts still work.
+ */
+#define SDL_HINT_GRAB_KEYBOARD              "SDL_GRAB_KEYBOARD"
+
+/**
+*  \brief  A variable controlling whether relative mouse mode is implemented using mouse warping
+*
+*  This variable can be set to the following values:
+*    "0"       - Relative mouse mode uses raw input
+*    "1"       - Relative mouse mode uses mouse warping
+*
+*  By default SDL will use raw input for relative mouse mode
+*/
+#define SDL_HINT_MOUSE_RELATIVE_MODE_WARP    "SDL_MOUSE_RELATIVE_MODE_WARP"
+
+/**
+ *  \brief Minimize your SDL_Window if it loses key focus when in fullscreen mode. Defaults to true.
+ *
+ */
+#define SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS   "SDL_VIDEO_MINIMIZE_ON_FOCUS_LOSS"
+
+/**
+ *  \brief  A variable controlling whether the idle timer is disabled on iOS.
+ *
+ *  When an iOS app does not receive touches for some time, the screen is
+ *  dimmed automatically. For games where the accelerometer is the only input
+ *  this is problematic. This functionality can be disabled by setting this
+ *  hint.
+ *
+ *  This variable can be set to the following values:
+ *    "0"       - Enable idle timer
+ *    "1"       - Disable idle timer
+ */
+#define SDL_HINT_IDLE_TIMER_DISABLED "SDL_IOS_IDLE_TIMER_DISABLED"
+
+/**
+ *  \brief  A variable controlling which orientations are allowed on iOS.
+ *
+ *  In some circumstances it is necessary to be able to explicitly control
+ *  which UI orientations are allowed.
+ *
+ *  This variable is a space delimited list of the following values:
+ *    "LandscapeLeft", "LandscapeRight", "Portrait" "PortraitUpsideDown"
+ */
+#define SDL_HINT_ORIENTATIONS "SDL_IOS_ORIENTATIONS"
+    
+/**
+ *  \brief  A variable controlling whether an Android built-in accelerometer should be
+ *  listed as a joystick device, rather than listing actual joysticks only.
+ *
+ *  This variable can be set to the following values:
+ *    "0"       - List only real joysticks and accept input from them
+ *    "1"       - List real joysticks along with the accelerometer as if it were a 3 axis joystick (the default).
+ */
+#define SDL_HINT_ACCELEROMETER_AS_JOYSTICK "SDL_ACCELEROMETER_AS_JOYSTICK"
+
+
+/**
+ *  \brief  A variable that lets you disable the detection and use of Xinput gamepad devices
+ *
+ *  The variable can be set to the following values:
+ *    "0"       - Disable XInput detection (only uses direct input)
+ *    "1"       - Enable XInput detection (the default)
+ */
+#define SDL_HINT_XINPUT_ENABLED "SDL_XINPUT_ENABLED"
+
+
+/**
+ *  \brief  A variable that lets you manually hint extra gamecontroller db entries
+ *
+ *  The variable should be newline delimited rows of gamecontroller config data, see SDL_gamecontroller.h
+ *
+ *  This hint must be set before calling SDL_Init(SDL_INIT_GAMECONTROLLER)
+ *  You can update mappings after the system is initialized with SDL_GameControllerMappingForGUID() and SDL_GameControllerAddMapping()
+ */
+#define SDL_HINT_GAMECONTROLLERCONFIG "SDL_GAMECONTROLLERCONFIG"
+
+
+/**
+ *  \brief  A variable that lets you enable joystick (and gamecontroller) events even when your app is in the background.
+ *
+ *  The variable can be set to the following values:
+ *    "0"       - Disable joystick & gamecontroller input events when the
+ *                application is in the background.
+ *    "1"       - Enable joystick & gamecontroller input events when the
+ *                application is in the background.
+ *
+ *  The default value is "0".  This hint may be set at any time.
+ */
+#define SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS "SDL_JOYSTICK_ALLOW_BACKGROUND_EVENTS"
+
+
+/**
+ *  \brief If set to 0 then never set the top most bit on a SDL Window, even if the video mode expects it.
+ *      This is a debugging aid for developers and not expected to be used by end users. The default is "1"
+ *
+ *  This variable can be set to the following values:
+ *    "0"       - don't allow topmost
+ *    "1"       - allow topmost
+ */
+#define SDL_HINT_ALLOW_TOPMOST "SDL_ALLOW_TOPMOST"
+
+
+/**
+ *  \brief A variable that controls the timer resolution, in milliseconds.
+ *
+ *  The higher resolution the timer, the more frequently the CPU services
+ *  timer interrupts, and the more precise delays are, but this takes up
+ *  power and CPU time.  This hint is only used on Windows 7 and earlier.
+ *
+ *  See this blog post for more information:
+ *  http://randomascii.wordpress.com/2013/07/08/windows-timer-resolution-megawatts-wasted/
+ *
+ *  If this variable is set to "0", the system timer resolution is not set.
+ *
+ *  The default value is "1". This hint may be set at any time.
+ */
+#define SDL_HINT_TIMER_RESOLUTION "SDL_TIMER_RESOLUTION"
+
+
+/**
+ *  \brief If set to 1, then do not allow high-DPI windows. ("Retina" on Mac)
+ */
+#define SDL_HINT_VIDEO_HIGHDPI_DISABLED "SDL_VIDEO_HIGHDPI_DISABLED"
+
+/**
+ *  \brief A variable that determines whether ctrl+click should generate a right-click event on Mac
+ *  
+ *  If present, holding ctrl while left clicking will generate a right click
+ *  event when on Mac.
+ */
+#define SDL_HINT_MAC_CTRL_CLICK_EMULATE_RIGHT_CLICK "SDL_MAC_CTRL_CLICK_EMULATE_RIGHT_CLICK"
+
+/**
+*  \brief  A variable specifying which shader compiler to preload when using the Chrome ANGLE binaries
+*
+*  SDL has EGL and OpenGL ES2 support on Windows via the ANGLE project. It
+*  can use two different sets of binaries, those compiled by the user from source
+*  or those provided by the Chrome browser. In the later case, these binaries require
+*  that SDL loads a DLL providing the shader compiler.
+*
+*  This variable can be set to the following values:
+*    "d3dcompiler_46.dll" - default, best for Vista or later.
+*    "d3dcompiler_43.dll" - for XP support.
+*    "none" - do not load any library, useful if you compiled ANGLE from source and included the compiler in your binaries.
+*
+*/
+#define SDL_HINT_VIDEO_WIN_D3DCOMPILER              "SDL_VIDEO_WIN_D3DCOMPILER"
+
+/**
+*  \brief  A variable that is the address of another SDL_Window* (as a hex string formatted with "%p").
+*  
+*  If this hint is set before SDL_CreateWindowFrom() and the SDL_Window* it is set to has
+*  SDL_WINDOW_OPENGL set (and running on WGL only, currently), then two things will occur on the newly 
+*  created SDL_Window:
+*
+*  1. Its pixel format will be set to the same pixel format as this SDL_Window.  This is
+*  needed for example when sharing an OpenGL context across multiple windows.
+*
+*  2. The flag SDL_WINDOW_OPENGL will be set on the new window so it can be used for
+*  OpenGL rendering.
+*
+*  This variable can be set to the following values:
+*    The address (as a string "%p") of the SDL_Window* that new windows created with SDL_CreateWindowFrom() should
+*    share a pixel format with.
+*/
+#define SDL_HINT_VIDEO_WINDOW_SHARE_PIXEL_FORMAT    "SDL_VIDEO_WINDOW_SHARE_PIXEL_FORMAT"
+
+/*
+ *  \brief A URL to a WinRT app's privacy policy
+ *
+ *  All network-enabled WinRT apps must make a privacy policy available to its
+ *  users.  On Windows 8, 8.1, and RT, Microsoft mandates that this policy be
+ *  be available in the Windows Settings charm, as accessed from within the app.
+ *  SDL provides code to add a URL-based link there, which can point to the app's
+ *  privacy policy.
+ *
+ *  To setup a URL to an app's privacy policy, set SDL_HINT_WINRT_PRIVACY_POLICY_URL
+ *  before calling any SDL_Init functions.  The contents of the hint should
+ *  be a valid URL.  For example, "http://www.example.com".
+ *
+ *  The default value is "", which will prevent SDL from adding a privacy policy
+ *  link to the Settings charm.  This hint should only be set during app init.
+ *
+ *  The label text of an app's "Privacy Policy" link may be customized via another
+ *  hint, SDL_HINT_WINRT_PRIVACY_POLICY_LABEL.
+ *
+ *  Please note that on Windows Phone, Microsoft does not provide standard UI
+ *  for displaying a privacy policy link, and as such, SDL_HINT_WINRT_PRIVACY_POLICY_URL
+ *  will not get used on that platform.  Network-enabled phone apps should display
+ *  their privacy policy through some other, in-app means.
+ */
+#define SDL_HINT_WINRT_PRIVACY_POLICY_URL "SDL_HINT_WINRT_PRIVACY_POLICY_URL"
+
+/** \brief Label text for a WinRT app's privacy policy link
+ *
+ *  Network-enabled WinRT apps must include a privacy policy.  On Windows 8, 8.1, and RT,
+ *  Microsoft mandates that this policy be available via the Windows Settings charm.
+ *  SDL provides code to add a link there, with it's label text being set via the
+ *  optional hint, SDL_HINT_WINRT_PRIVACY_POLICY_LABEL.
+ *
+ *  Please note that a privacy policy's contents are not set via this hint.  A separate
+ *  hint, SDL_HINT_WINRT_PRIVACY_POLICY_URL, is used to link to the actual text of the
+ *  policy.
+ *
+ *  The contents of this hint should be encoded as a UTF8 string.
+ *
+ *  The default value is "Privacy Policy".  This hint should only be set during app
+ *  initialization, preferably before any calls to SDL_Init.
+ *
+ *  For additional information on linking to a privacy policy, see the documentation for
+ *  SDL_HINT_WINRT_PRIVACY_POLICY_URL.
+ */
+#define SDL_HINT_WINRT_PRIVACY_POLICY_LABEL "SDL_HINT_WINRT_PRIVACY_POLICY_LABEL"
+
+/** \brief If set to 1, back button press events on Windows Phone 8+ will be marked as handled.
+ *
+ *  TODO, WinRT: document SDL_HINT_WINRT_HANDLE_BACK_BUTTON need and use
+ *  For now, more details on why this is needed can be found at the
+ *  beginning of the following web page:
+ *  http://msdn.microsoft.com/en-us/library/windowsphone/develop/jj247550(v=vs.105).aspx
+ */
+#define SDL_HINT_WINRT_HANDLE_BACK_BUTTON "SDL_HINT_WINRT_HANDLE_BACK_BUTTON"
+
+/**
+ *  \brief  A variable that dictates policy for fullscreen Spaces on Mac OS X.
+ *
+ *  This hint only applies to Mac OS X.
+ *
+ *  The variable can be set to the following values:
+ *    "0"       - Disable Spaces support (FULLSCREEN_DESKTOP won't use them and
+ *                SDL_WINDOW_RESIZABLE windows won't offer the "fullscreen"
+ *                button on their titlebars).
+ *    "1"       - Enable Spaces support (FULLSCREEN_DESKTOP will use them and
+ *                SDL_WINDOW_RESIZABLE windows will offer the "fullscreen"
+ *                button on their titlebars.
+ *
+ *  The default value is "1". Spaces are disabled regardless of this hint if
+ *   the OS isn't at least Mac OS X Lion (10.7). This hint must be set before
+ *   any windows are created.
+ */
+#define SDL_HINT_VIDEO_MAC_FULLSCREEN_SPACES    "SDL_VIDEO_MAC_FULLSCREEN_SPACES"
+
+
+/**
+ *  \brief  An enumeration of hint priorities
+ */
+typedef enum
+{
+    SDL_HINT_DEFAULT,
+    SDL_HINT_NORMAL,
+    SDL_HINT_OVERRIDE
+} SDL_HintPriority;
+
+
+/**
+ *  \brief Set a hint with a specific priority
+ *
+ *  The priority controls the behavior when setting a hint that already
+ *  has a value.  Hints will replace existing hints of their priority and
+ *  lower.  Environment variables are considered to have override priority.
+ *
+ *  \return SDL_TRUE if the hint was set, SDL_FALSE otherwise
+ */
+extern DECLSPEC SDL_bool SDLCALL SDL_SetHintWithPriority(const char *name,
+                                                         const char *value,
+                                                         SDL_HintPriority priority);
+
+/**
+ *  \brief Set a hint with normal priority
+ *
+ *  \return SDL_TRUE if the hint was set, SDL_FALSE otherwise
+ */
+extern DECLSPEC SDL_bool SDLCALL SDL_SetHint(const char *name,
+                                             const char *value);
+
+/**
+ *  \brief Get a hint
+ *
+ *  \return The string value of a hint variable.
+ */
+extern DECLSPEC const char * SDLCALL SDL_GetHint(const char *name);
+
+/**
+ *  \brief Add a function to watch a particular hint
+ *
+ *  \param name The hint to watch
+ *  \param callback The function to call when the hint value changes
+ *  \param userdata A pointer to pass to the callback function
+ */
+typedef void (*SDL_HintCallback)(void *userdata, const char *name, const char *oldValue, const char *newValue);
+extern DECLSPEC void SDLCALL SDL_AddHintCallback(const char *name,
+                                                 SDL_HintCallback callback,
+                                                 void *userdata);
+
+/**
+ *  \brief Remove a function watching a particular hint
+ *
+ *  \param name The hint being watched
+ *  \param callback The function being called when the hint value changes
+ *  \param userdata A pointer being passed to the callback function
+ */
+extern DECLSPEC void SDLCALL SDL_DelHintCallback(const char *name,
+                                                 SDL_HintCallback callback,
+                                                 void *userdata);
+
+/**
+ *  \brief  Clear all hints
+ *
+ *  This function is called during SDL_Quit() to free stored hints.
+ */
+extern DECLSPEC void SDLCALL SDL_ClearHints(void);
+
+
+/* Ends C function definitions when using C++ */
+#ifdef __cplusplus
+}
+#endif
+#include "close_code.h"
+
+#endif /* _SDL_hints_h */
+
+/* vi: set ts=4 sw=4 expandtab: */
diff --git a/include/SDL2/SDL_joystick.h b/include/SDL2/SDL_joystick.h
new file mode 100644 (file)
index 0000000..b0b1c66
--- /dev/null
@@ -0,0 +1,253 @@
+/*
+  Simple DirectMedia Layer
+  Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
+
+  This software is provided 'as-is', without any express or implied
+  warranty.  In no event will the authors be held liable for any damages
+  arising from the use of this software.
+
+  Permission is granted to anyone to use this software for any purpose,
+  including commercial applications, and to alter it and redistribute it
+  freely, subject to the following restrictions:
+
+  1. The origin of this software must not be misrepresented; you must not
+     claim that you wrote the original software. If you use this software
+     in a product, an acknowledgment in the product documentation would be
+     appreciated but is not required.
+  2. Altered source versions must be plainly marked as such, and must not be
+     misrepresented as being the original software.
+  3. This notice may not be removed or altered from any source distribution.
+*/
+
+/**
+ *  \file SDL_joystick.h
+ *
+ *  Include file for SDL joystick event handling
+ *
+ * The term "device_index" identifies currently plugged in joystick devices between 0 and SDL_NumJoysticks, with the exact joystick
+ *   behind a device_index changing as joysticks are plugged and unplugged.
+ *
+ * The term "instance_id" is the current instantiation of a joystick device in the system, if the joystick is removed and then re-inserted
+ *   then it will get a new instance_id, instance_id's are monotonically increasing identifiers of a joystick plugged in.
+ *
+ * The term JoystickGUID is a stable 128-bit identifier for a joystick device that does not change over time, it identifies class of
+ *   the device (a X360 wired controller for example). This identifier is platform dependent.
+ *
+ *
+ */
+
+#ifndef _SDL_joystick_h
+#define _SDL_joystick_h
+
+#include "SDL_stdinc.h"
+#include "SDL_error.h"
+
+#include "begin_code.h"
+/* Set up for C function definitions, even when using C++ */
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ *  \file SDL_joystick.h
+ *
+ *  In order to use these functions, SDL_Init() must have been called
+ *  with the ::SDL_INIT_JOYSTICK flag.  This causes SDL to scan the system
+ *  for joysticks, and load appropriate drivers.
+ *
+ *  If you would like to receive joystick updates while the application
+ *  is in the background, you should set the following hint before calling
+ *  SDL_Init(): SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS
+ */
+
+/* The joystick structure used to identify an SDL joystick */
+struct _SDL_Joystick;
+typedef struct _SDL_Joystick SDL_Joystick;
+
+/* A structure that encodes the stable unique id for a joystick device */
+typedef struct {
+    Uint8 data[16];
+} SDL_JoystickGUID;
+
+typedef Sint32 SDL_JoystickID;
+
+
+/* Function prototypes */
+/**
+ *  Count the number of joysticks attached to the system right now
+ */
+extern DECLSPEC int SDLCALL SDL_NumJoysticks(void);
+
+/**
+ *  Get the implementation dependent name of a joystick.
+ *  This can be called before any joysticks are opened.
+ *  If no name can be found, this function returns NULL.
+ */
+extern DECLSPEC const char *SDLCALL SDL_JoystickNameForIndex(int device_index);
+
+/**
+ *  Open a joystick for use.
+ *  The index passed as an argument refers tothe N'th joystick on the system.
+ *  This index is the value which will identify this joystick in future joystick
+ *  events.
+ *
+ *  \return A joystick identifier, or NULL if an error occurred.
+ */
+extern DECLSPEC SDL_Joystick *SDLCALL SDL_JoystickOpen(int device_index);
+
+/**
+ *  Return the name for this currently opened joystick.
+ *  If no name can be found, this function returns NULL.
+ */
+extern DECLSPEC const char *SDLCALL SDL_JoystickName(SDL_Joystick * joystick);
+
+/**
+ *  Return the GUID for the joystick at this index
+ */
+extern DECLSPEC SDL_JoystickGUID SDLCALL SDL_JoystickGetDeviceGUID(int device_index);
+
+/**
+ *  Return the GUID for this opened joystick
+ */
+extern DECLSPEC SDL_JoystickGUID SDLCALL SDL_JoystickGetGUID(SDL_Joystick * joystick);
+
+/**
+ *  Return a string representation for this guid. pszGUID must point to at least 33 bytes
+ *  (32 for the string plus a NULL terminator).
+ */
+extern DECLSPEC void SDLCALL SDL_JoystickGetGUIDString(SDL_JoystickGUID guid, char *pszGUID, int cbGUID);
+
+/**
+ *  convert a string into a joystick formatted guid
+ */
+extern DECLSPEC SDL_JoystickGUID SDLCALL SDL_JoystickGetGUIDFromString(const char *pchGUID);
+
+/**
+ *  Returns SDL_TRUE if the joystick has been opened and currently connected, or SDL_FALSE if it has not.
+ */
+extern DECLSPEC SDL_bool SDLCALL SDL_JoystickGetAttached(SDL_Joystick * joystick);
+
+/**
+ *  Get the instance ID of an opened joystick or -1 if the joystick is invalid.
+ */
+extern DECLSPEC SDL_JoystickID SDLCALL SDL_JoystickInstanceID(SDL_Joystick * joystick);
+
+/**
+ *  Get the number of general axis controls on a joystick.
+ */
+extern DECLSPEC int SDLCALL SDL_JoystickNumAxes(SDL_Joystick * joystick);
+
+/**
+ *  Get the number of trackballs on a joystick.
+ *
+ *  Joystick trackballs have only relative motion events associated
+ *  with them and their state cannot be polled.
+ */
+extern DECLSPEC int SDLCALL SDL_JoystickNumBalls(SDL_Joystick * joystick);
+
+/**
+ *  Get the number of POV hats on a joystick.
+ */
+extern DECLSPEC int SDLCALL SDL_JoystickNumHats(SDL_Joystick * joystick);
+
+/**
+ *  Get the number of buttons on a joystick.
+ */
+extern DECLSPEC int SDLCALL SDL_JoystickNumButtons(SDL_Joystick * joystick);
+
+/**
+ *  Update the current state of the open joysticks.
+ *
+ *  This is called automatically by the event loop if any joystick
+ *  events are enabled.
+ */
+extern DECLSPEC void SDLCALL SDL_JoystickUpdate(void);
+
+/**
+ *  Enable/disable joystick event polling.
+ *
+ *  If joystick events are disabled, you must call SDL_JoystickUpdate()
+ *  yourself and check the state of the joystick when you want joystick
+ *  information.
+ *
+ *  The state can be one of ::SDL_QUERY, ::SDL_ENABLE or ::SDL_IGNORE.
+ */
+extern DECLSPEC int SDLCALL SDL_JoystickEventState(int state);
+
+/**
+ *  Get the current state of an axis control on a joystick.
+ *
+ *  The state is a value ranging from -32768 to 32767.
+ *
+ *  The axis indices start at index 0.
+ */
+extern DECLSPEC Sint16 SDLCALL SDL_JoystickGetAxis(SDL_Joystick * joystick,
+                                                   int axis);
+
+/**
+ *  \name Hat positions
+ */
+/* @{ */
+#define SDL_HAT_CENTERED    0x00
+#define SDL_HAT_UP      0x01
+#define SDL_HAT_RIGHT       0x02
+#define SDL_HAT_DOWN        0x04
+#define SDL_HAT_LEFT        0x08
+#define SDL_HAT_RIGHTUP     (SDL_HAT_RIGHT|SDL_HAT_UP)
+#define SDL_HAT_RIGHTDOWN   (SDL_HAT_RIGHT|SDL_HAT_DOWN)
+#define SDL_HAT_LEFTUP      (SDL_HAT_LEFT|SDL_HAT_UP)
+#define SDL_HAT_LEFTDOWN    (SDL_HAT_LEFT|SDL_HAT_DOWN)
+/* @} */
+
+/**
+ *  Get the current state of a POV hat on a joystick.
+ *
+ *  The hat indices start at index 0.
+ *
+ *  \return The return value is one of the following positions:
+ *           - ::SDL_HAT_CENTERED
+ *           - ::SDL_HAT_UP
+ *           - ::SDL_HAT_RIGHT
+ *           - ::SDL_HAT_DOWN
+ *           - ::SDL_HAT_LEFT
+ *           - ::SDL_HAT_RIGHTUP
+ *           - ::SDL_HAT_RIGHTDOWN
+ *           - ::SDL_HAT_LEFTUP
+ *           - ::SDL_HAT_LEFTDOWN
+ */
+extern DECLSPEC Uint8 SDLCALL SDL_JoystickGetHat(SDL_Joystick * joystick,
+                                                 int hat);
+
+/**
+ *  Get the ball axis change since the last poll.
+ *
+ *  \return 0, or -1 if you passed it invalid parameters.
+ *
+ *  The ball indices start at index 0.
+ */
+extern DECLSPEC int SDLCALL SDL_JoystickGetBall(SDL_Joystick * joystick,
+                                                int ball, int *dx, int *dy);
+
+/**
+ *  Get the current state of a button on a joystick.
+ *
+ *  The button indices start at index 0.
+ */
+extern DECLSPEC Uint8 SDLCALL SDL_JoystickGetButton(SDL_Joystick * joystick,
+                                                    int button);
+
+/**
+ *  Close a joystick previously opened with SDL_JoystickOpen().
+ */
+extern DECLSPEC void SDLCALL SDL_JoystickClose(SDL_Joystick * joystick);
+
+
+/* Ends C function definitions when using C++ */
+#ifdef __cplusplus
+}
+#endif
+#include "close_code.h"
+
+#endif /* _SDL_joystick_h */
+
+/* vi: set ts=4 sw=4 expandtab: */
diff --git a/include/SDL2/SDL_keyboard.h b/include/SDL2/SDL_keyboard.h
new file mode 100644 (file)
index 0000000..586a26c
--- /dev/null
@@ -0,0 +1,217 @@
+/*
+  Simple DirectMedia Layer
+  Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
+
+  This software is provided 'as-is', without any express or implied
+  warranty.  In no event will the authors be held liable for any damages
+  arising from the use of this software.
+
+  Permission is granted to anyone to use this software for any purpose,
+  including commercial applications, and to alter it and redistribute it
+  freely, subject to the following restrictions:
+
+  1. The origin of this software must not be misrepresented; you must not
+     claim that you wrote the original software. If you use this software
+     in a product, an acknowledgment in the product documentation would be
+     appreciated but is not required.
+  2. Altered source versions must be plainly marked as such, and must not be
+     misrepresented as being the original software.
+  3. This notice may not be removed or altered from any source distribution.
+*/
+
+/**
+ *  \file SDL_keyboard.h
+ *
+ *  Include file for SDL keyboard event handling
+ */
+
+#ifndef _SDL_keyboard_h
+#define _SDL_keyboard_h
+
+#include "SDL_stdinc.h"
+#include "SDL_error.h"
+#include "SDL_keycode.h"
+#include "SDL_video.h"
+
+#include "begin_code.h"
+/* Set up for C function definitions, even when using C++ */
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ *  \brief The SDL keysym structure, used in key events.
+ *
+ *  \note  If you are looking for translated character input, see the ::SDL_TEXTINPUT event.
+ */
+typedef struct SDL_Keysym
+{
+    SDL_Scancode scancode;      /**< SDL physical key code - see ::SDL_Scancode for details */
+    SDL_Keycode sym;            /**< SDL virtual key code - see ::SDL_Keycode for details */
+    Uint16 mod;                 /**< current key modifiers */
+    Uint32 unused;
+} SDL_Keysym;
+
+/* Function prototypes */
+
+/**
+ *  \brief Get the window which currently has keyboard focus.
+ */
+extern DECLSPEC SDL_Window * SDLCALL SDL_GetKeyboardFocus(void);
+
+/**
+ *  \brief Get a snapshot of the current state of the keyboard.
+ *
+ *  \param numkeys if non-NULL, receives the length of the returned array.
+ *
+ *  \return An array of key states. Indexes into this array are obtained by using ::SDL_Scancode values.
+ *
+ *  \b Example:
+ *  \code
+ *  const Uint8 *state = SDL_GetKeyboardState(NULL);
+ *  if ( state[SDL_SCANCODE_RETURN] )   {
+ *      printf("<RETURN> is pressed.\n");
+ *  }
+ *  \endcode
+ */
+extern DECLSPEC const Uint8 *SDLCALL SDL_GetKeyboardState(int *numkeys);
+
+/**
+ *  \brief Get the current key modifier state for the keyboard.
+ */
+extern DECLSPEC SDL_Keymod SDLCALL SDL_GetModState(void);
+
+/**
+ *  \brief Set the current key modifier state for the keyboard.
+ *
+ *  \note This does not change the keyboard state, only the key modifier flags.
+ */
+extern DECLSPEC void SDLCALL SDL_SetModState(SDL_Keymod modstate);
+
+/**
+ *  \brief Get the key code corresponding to the given scancode according
+ *         to the current keyboard layout.
+ *
+ *  See ::SDL_Keycode for details.
+ *
+ *  \sa SDL_GetKeyName()
+ */
+extern DECLSPEC SDL_Keycode SDLCALL SDL_GetKeyFromScancode(SDL_Scancode scancode);
+
+/**
+ *  \brief Get the scancode corresponding to the given key code according to the
+ *         current keyboard layout.
+ *
+ *  See ::SDL_Scancode for details.
+ *
+ *  \sa SDL_GetScancodeName()
+ */
+extern DECLSPEC SDL_Scancode SDLCALL SDL_GetScancodeFromKey(SDL_Keycode key);
+
+/**
+ *  \brief Get a human-readable name for a scancode.
+ *
+ *  \return A pointer to the name for the scancode.
+ *          If the scancode doesn't have a name, this function returns
+ *          an empty string ("").
+ *
+ *  \sa SDL_Scancode
+ */
+extern DECLSPEC const char *SDLCALL SDL_GetScancodeName(SDL_Scancode scancode);
+
+/**
+ *  \brief Get a scancode from a human-readable name
+ *
+ *  \return scancode, or SDL_SCANCODE_UNKNOWN if the name wasn't recognized
+ *
+ *  \sa SDL_Scancode
+ */
+extern DECLSPEC SDL_Scancode SDLCALL SDL_GetScancodeFromName(const char *name);
+
+/**
+ *  \brief Get a human-readable name for a key.
+ *
+ *  \return A pointer to a UTF-8 string that stays valid at least until the next
+ *          call to this function. If you need it around any longer, you must
+ *          copy it.  If the key doesn't have a name, this function returns an
+ *          empty string ("").
+ *
+ *  \sa SDL_Key
+ */
+extern DECLSPEC const char *SDLCALL SDL_GetKeyName(SDL_Keycode key);
+
+/**
+ *  \brief Get a key code from a human-readable name
+ *
+ *  \return key code, or SDLK_UNKNOWN if the name wasn't recognized
+ *
+ *  \sa SDL_Keycode
+ */
+extern DECLSPEC SDL_Keycode SDLCALL SDL_GetKeyFromName(const char *name);
+
+/**
+ *  \brief Start accepting Unicode text input events.
+ *         This function will show the on-screen keyboard if supported.
+ *
+ *  \sa SDL_StopTextInput()
+ *  \sa SDL_SetTextInputRect()
+ *  \sa SDL_HasScreenKeyboardSupport()
+ */
+extern DECLSPEC void SDLCALL SDL_StartTextInput(void);
+
+/**
+ *  \brief Return whether or not Unicode text input events are enabled.
+ *
+ *  \sa SDL_StartTextInput()
+ *  \sa SDL_StopTextInput()
+ */
+extern DECLSPEC SDL_bool SDLCALL SDL_IsTextInputActive(void);
+
+/**
+ *  \brief Stop receiving any text input events.
+ *         This function will hide the on-screen keyboard if supported.
+ *
+ *  \sa SDL_StartTextInput()
+ *  \sa SDL_HasScreenKeyboardSupport()
+ */
+extern DECLSPEC void SDLCALL SDL_StopTextInput(void);
+
+/**
+ *  \brief Set the rectangle used to type Unicode text inputs.
+ *         This is used as a hint for IME and on-screen keyboard placement.
+ *
+ *  \sa SDL_StartTextInput()
+ */
+extern DECLSPEC void SDLCALL SDL_SetTextInputRect(SDL_Rect *rect);
+
+/**
+ *  \brief Returns whether the platform has some screen keyboard support.
+ *
+ *  \return SDL_TRUE if some keyboard support is available else SDL_FALSE.
+ *
+ *  \note Not all screen keyboard functions are supported on all platforms.
+ *
+ *  \sa SDL_IsScreenKeyboardShown()
+ */
+extern DECLSPEC SDL_bool SDLCALL SDL_HasScreenKeyboardSupport(void);
+
+/**
+ *  \brief Returns whether the screen keyboard is shown for given window.
+ *
+ *  \param window The window for which screen keyboard should be queried.
+ *
+ *  \return SDL_TRUE if screen keyboard is shown else SDL_FALSE.
+ *
+ *  \sa SDL_HasScreenKeyboardSupport()
+ */
+extern DECLSPEC SDL_bool SDLCALL SDL_IsScreenKeyboardShown(SDL_Window *window);
+
+/* Ends C function definitions when using C++ */
+#ifdef __cplusplus
+}
+#endif
+#include "close_code.h"
+
+#endif /* _SDL_keyboard_h */
+
+/* vi: set ts=4 sw=4 expandtab: */
diff --git a/include/SDL2/SDL_keycode.h b/include/SDL2/SDL_keycode.h
new file mode 100644 (file)
index 0000000..d5f5dd0
--- /dev/null
@@ -0,0 +1,341 @@
+/*
+  Simple DirectMedia Layer
+  Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
+
+  This software is provided 'as-is', without any express or implied
+  warranty.  In no event will the authors be held liable for any damages
+  arising from the use of this software.
+
+  Permission is granted to anyone to use this software for any purpose,
+  including commercial applications, and to alter it and redistribute it
+  freely, subject to the following restrictions:
+
+  1. The origin of this software must not be misrepresented; you must not
+     claim that you wrote the original software. If you use this software
+     in a product, an acknowledgment in the product documentation would be
+     appreciated but is not required.
+  2. Altered source versions must be plainly marked as such, and must not be
+     misrepresented as being the original software.
+  3. This notice may not be removed or altered from any source distribution.
+*/
+
+/**
+ *  \file SDL_keycode.h
+ *
+ *  Defines constants which identify keyboard keys and modifiers.
+ */
+
+#ifndef _SDL_keycode_h
+#define _SDL_keycode_h
+
+#include "SDL_stdinc.h"
+#include "SDL_scancode.h"
+
+/**
+ *  \brief The SDL virtual key representation.
+ *
+ *  Values of this type are used to represent keyboard keys using the current
+ *  layout of the keyboard.  These values include Unicode values representing
+ *  the unmodified character that would be generated by pressing the key, or
+ *  an SDLK_* constant for those keys that do not generate characters.
+ */
+typedef Sint32 SDL_Keycode;
+
+#define SDLK_SCANCODE_MASK (1<<30)
+#define SDL_SCANCODE_TO_KEYCODE(X)  (X | SDLK_SCANCODE_MASK)
+
+enum
+{
+    SDLK_UNKNOWN = 0,
+
+    SDLK_RETURN = '\r',
+    SDLK_ESCAPE = '\033',
+    SDLK_BACKSPACE = '\b',
+    SDLK_TAB = '\t',
+    SDLK_SPACE = ' ',
+    SDLK_EXCLAIM = '!',
+    SDLK_QUOTEDBL = '"',
+    SDLK_HASH = '#',
+    SDLK_PERCENT = '%',
+    SDLK_DOLLAR = '$',
+    SDLK_AMPERSAND = '&',
+    SDLK_QUOTE = '\'',
+    SDLK_LEFTPAREN = '(',
+    SDLK_RIGHTPAREN = ')',
+    SDLK_ASTERISK = '*',
+    SDLK_PLUS = '+',
+    SDLK_COMMA = ',',
+    SDLK_MINUS = '-',
+    SDLK_PERIOD = '.',
+    SDLK_SLASH = '/',
+    SDLK_0 = '0',
+    SDLK_1 = '1',
+    SDLK_2 = '2',
+    SDLK_3 = '3',
+    SDLK_4 = '4',
+    SDLK_5 = '5',
+    SDLK_6 = '6',
+    SDLK_7 = '7',
+    SDLK_8 = '8',
+    SDLK_9 = '9',
+    SDLK_COLON = ':',
+    SDLK_SEMICOLON = ';',
+    SDLK_LESS = '<',
+    SDLK_EQUALS = '=',
+    SDLK_GREATER = '>',
+    SDLK_QUESTION = '?',
+    SDLK_AT = '@',
+    /*
+       Skip uppercase letters
+     */
+    SDLK_LEFTBRACKET = '[',
+    SDLK_BACKSLASH = '\\',
+    SDLK_RIGHTBRACKET = ']',
+    SDLK_CARET = '^',
+    SDLK_UNDERSCORE = '_',
+    SDLK_BACKQUOTE = '`',
+    SDLK_a = 'a',
+    SDLK_b = 'b',
+    SDLK_c = 'c',
+    SDLK_d = 'd',
+    SDLK_e = 'e',
+    SDLK_f = 'f',
+    SDLK_g = 'g',
+    SDLK_h = 'h',
+    SDLK_i = 'i',
+    SDLK_j = 'j',
+    SDLK_k = 'k',
+    SDLK_l = 'l',
+    SDLK_m = 'm',
+    SDLK_n = 'n',
+    SDLK_o = 'o',
+    SDLK_p = 'p',
+    SDLK_q = 'q',
+    SDLK_r = 'r',
+    SDLK_s = 's',
+    SDLK_t = 't',
+    SDLK_u = 'u',
+    SDLK_v = 'v',
+    SDLK_w = 'w',
+    SDLK_x = 'x',
+    SDLK_y = 'y',
+    SDLK_z = 'z',
+
+    SDLK_CAPSLOCK = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CAPSLOCK),
+
+    SDLK_F1 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F1),
+    SDLK_F2 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F2),
+    SDLK_F3 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F3),
+    SDLK_F4 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F4),
+    SDLK_F5 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F5),
+    SDLK_F6 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F6),
+    SDLK_F7 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F7),
+    SDLK_F8 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F8),
+    SDLK_F9 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F9),
+    SDLK_F10 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F10),
+    SDLK_F11 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F11),
+    SDLK_F12 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F12),
+
+    SDLK_PRINTSCREEN = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_PRINTSCREEN),
+    SDLK_SCROLLLOCK = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_SCROLLLOCK),
+    SDLK_PAUSE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_PAUSE),
+    SDLK_INSERT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_INSERT),
+    SDLK_HOME = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_HOME),
+    SDLK_PAGEUP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_PAGEUP),
+    SDLK_DELETE = '\177',
+    SDLK_END = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_END),
+    SDLK_PAGEDOWN = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_PAGEDOWN),
+    SDLK_RIGHT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_RIGHT),
+    SDLK_LEFT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_LEFT),
+    SDLK_DOWN = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_DOWN),
+    SDLK_UP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_UP),
+
+    SDLK_NUMLOCKCLEAR = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_NUMLOCKCLEAR),
+    SDLK_KP_DIVIDE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_DIVIDE),
+    SDLK_KP_MULTIPLY = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MULTIPLY),
+    SDLK_KP_MINUS = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MINUS),
+    SDLK_KP_PLUS = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_PLUS),
+    SDLK_KP_ENTER = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_ENTER),
+    SDLK_KP_1 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_1),
+    SDLK_KP_2 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_2),
+    SDLK_KP_3 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_3),
+    SDLK_KP_4 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_4),
+    SDLK_KP_5 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_5),
+    SDLK_KP_6 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_6),
+    SDLK_KP_7 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_7),
+    SDLK_KP_8 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_8),
+    SDLK_KP_9 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_9),
+    SDLK_KP_0 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_0),
+    SDLK_KP_PERIOD = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_PERIOD),
+
+    SDLK_APPLICATION = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_APPLICATION),
+    SDLK_POWER = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_POWER),
+    SDLK_KP_EQUALS = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_EQUALS),
+    SDLK_F13 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F13),
+    SDLK_F14 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F14),
+    SDLK_F15 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F15),
+    SDLK_F16 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F16),
+    SDLK_F17 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F17),
+    SDLK_F18 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F18),
+    SDLK_F19 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F19),
+    SDLK_F20 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F20),
+    SDLK_F21 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F21),
+    SDLK_F22 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F22),
+    SDLK_F23 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F23),
+    SDLK_F24 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F24),
+    SDLK_EXECUTE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_EXECUTE),
+    SDLK_HELP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_HELP),
+    SDLK_MENU = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MENU),
+    SDLK_SELECT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_SELECT),
+    SDLK_STOP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_STOP),
+    SDLK_AGAIN = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AGAIN),
+    SDLK_UNDO = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_UNDO),
+    SDLK_CUT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CUT),
+    SDLK_COPY = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_COPY),
+    SDLK_PASTE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_PASTE),
+    SDLK_FIND = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_FIND),
+    SDLK_MUTE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MUTE),
+    SDLK_VOLUMEUP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_VOLUMEUP),
+    SDLK_VOLUMEDOWN = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_VOLUMEDOWN),
+    SDLK_KP_COMMA = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_COMMA),
+    SDLK_KP_EQUALSAS400 =
+        SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_EQUALSAS400),
+
+    SDLK_ALTERASE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_ALTERASE),
+    SDLK_SYSREQ = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_SYSREQ),
+    SDLK_CANCEL = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CANCEL),
+    SDLK_CLEAR = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CLEAR),
+    SDLK_PRIOR = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_PRIOR),
+    SDLK_RETURN2 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_RETURN2),
+    SDLK_SEPARATOR = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_SEPARATOR),
+    SDLK_OUT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_OUT),
+    SDLK_OPER = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_OPER),
+    SDLK_CLEARAGAIN = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CLEARAGAIN),
+    SDLK_CRSEL = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CRSEL),
+    SDLK_EXSEL = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_EXSEL),
+
+    SDLK_KP_00 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_00),
+    SDLK_KP_000 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_000),
+    SDLK_THOUSANDSSEPARATOR =
+        SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_THOUSANDSSEPARATOR),
+    SDLK_DECIMALSEPARATOR =
+        SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_DECIMALSEPARATOR),
+    SDLK_CURRENCYUNIT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CURRENCYUNIT),
+    SDLK_CURRENCYSUBUNIT =
+        SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CURRENCYSUBUNIT),
+    SDLK_KP_LEFTPAREN = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_LEFTPAREN),
+    SDLK_KP_RIGHTPAREN = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_RIGHTPAREN),
+    SDLK_KP_LEFTBRACE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_LEFTBRACE),
+    SDLK_KP_RIGHTBRACE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_RIGHTBRACE),
+    SDLK_KP_TAB = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_TAB),
+    SDLK_KP_BACKSPACE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_BACKSPACE),
+    SDLK_KP_A = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_A),
+    SDLK_KP_B = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_B),
+    SDLK_KP_C = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_C),
+    SDLK_KP_D = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_D),
+    SDLK_KP_E = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_E),
+    SDLK_KP_F = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_F),
+    SDLK_KP_XOR = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_XOR),
+    SDLK_KP_POWER = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_POWER),
+    SDLK_KP_PERCENT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_PERCENT),
+    SDLK_KP_LESS = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_LESS),
+    SDLK_KP_GREATER = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_GREATER),
+    SDLK_KP_AMPERSAND = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_AMPERSAND),
+    SDLK_KP_DBLAMPERSAND =
+        SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_DBLAMPERSAND),
+    SDLK_KP_VERTICALBAR =
+        SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_VERTICALBAR),
+    SDLK_KP_DBLVERTICALBAR =
+        SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_DBLVERTICALBAR),
+    SDLK_KP_COLON = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_COLON),
+    SDLK_KP_HASH = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_HASH),
+    SDLK_KP_SPACE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_SPACE),
+    SDLK_KP_AT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_AT),
+    SDLK_KP_EXCLAM = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_EXCLAM),
+    SDLK_KP_MEMSTORE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MEMSTORE),
+    SDLK_KP_MEMRECALL = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MEMRECALL),
+    SDLK_KP_MEMCLEAR = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MEMCLEAR),
+    SDLK_KP_MEMADD = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MEMADD),
+    SDLK_KP_MEMSUBTRACT =
+        SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MEMSUBTRACT),
+    SDLK_KP_MEMMULTIPLY =
+        SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MEMMULTIPLY),
+    SDLK_KP_MEMDIVIDE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MEMDIVIDE),
+    SDLK_KP_PLUSMINUS = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_PLUSMINUS),
+    SDLK_KP_CLEAR = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_CLEAR),
+    SDLK_KP_CLEARENTRY = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_CLEARENTRY),
+    SDLK_KP_BINARY = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_BINARY),
+    SDLK_KP_OCTAL = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_OCTAL),
+    SDLK_KP_DECIMAL = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_DECIMAL),
+    SDLK_KP_HEXADECIMAL =
+        SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_HEXADECIMAL),
+
+    SDLK_LCTRL = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_LCTRL),
+    SDLK_LSHIFT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_LSHIFT),
+    SDLK_LALT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_LALT),
+    SDLK_LGUI = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_LGUI),
+    SDLK_RCTRL = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_RCTRL),
+    SDLK_RSHIFT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_RSHIFT),
+    SDLK_RALT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_RALT),
+    SDLK_RGUI = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_RGUI),
+
+    SDLK_MODE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MODE),
+
+    SDLK_AUDIONEXT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AUDIONEXT),
+    SDLK_AUDIOPREV = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AUDIOPREV),
+    SDLK_AUDIOSTOP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AUDIOSTOP),
+    SDLK_AUDIOPLAY = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AUDIOPLAY),
+    SDLK_AUDIOMUTE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AUDIOMUTE),
+    SDLK_MEDIASELECT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MEDIASELECT),
+    SDLK_WWW = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_WWW),
+    SDLK_MAIL = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MAIL),
+    SDLK_CALCULATOR = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CALCULATOR),
+    SDLK_COMPUTER = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_COMPUTER),
+    SDLK_AC_SEARCH = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_SEARCH),
+    SDLK_AC_HOME = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_HOME),
+    SDLK_AC_BACK = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_BACK),
+    SDLK_AC_FORWARD = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_FORWARD),
+    SDLK_AC_STOP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_STOP),
+    SDLK_AC_REFRESH = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_REFRESH),
+    SDLK_AC_BOOKMARKS = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_BOOKMARKS),
+
+    SDLK_BRIGHTNESSDOWN =
+        SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_BRIGHTNESSDOWN),
+    SDLK_BRIGHTNESSUP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_BRIGHTNESSUP),
+    SDLK_DISPLAYSWITCH = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_DISPLAYSWITCH),
+    SDLK_KBDILLUMTOGGLE =
+        SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KBDILLUMTOGGLE),
+    SDLK_KBDILLUMDOWN = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KBDILLUMDOWN),
+    SDLK_KBDILLUMUP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KBDILLUMUP),
+    SDLK_EJECT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_EJECT),
+    SDLK_SLEEP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_SLEEP)
+};
+
+/**
+ * \brief Enumeration of valid key mods (possibly OR'd together).
+ */
+typedef enum
+{
+    KMOD_NONE = 0x0000,
+    KMOD_LSHIFT = 0x0001,
+    KMOD_RSHIFT = 0x0002,
+    KMOD_LCTRL = 0x0040,
+    KMOD_RCTRL = 0x0080,
+    KMOD_LALT = 0x0100,
+    KMOD_RALT = 0x0200,
+    KMOD_LGUI = 0x0400,
+    KMOD_RGUI = 0x0800,
+    KMOD_NUM = 0x1000,
+    KMOD_CAPS = 0x2000,
+    KMOD_MODE = 0x4000,
+    KMOD_RESERVED = 0x8000
+} SDL_Keymod;
+
+#define KMOD_CTRL   (KMOD_LCTRL|KMOD_RCTRL)
+#define KMOD_SHIFT  (KMOD_LSHIFT|KMOD_RSHIFT)
+#define KMOD_ALT    (KMOD_LALT|KMOD_RALT)
+#define KMOD_GUI    (KMOD_LGUI|KMOD_RGUI)
+
+#endif /* _SDL_keycode_h */
+
+/* vi: set ts=4 sw=4 expandtab: */
diff --git a/include/SDL2/SDL_loadso.h b/include/SDL2/SDL_loadso.h
new file mode 100644 (file)
index 0000000..0359eae
--- /dev/null
@@ -0,0 +1,81 @@
+/*
+  Simple DirectMedia Layer
+  Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
+
+  This software is provided 'as-is', without any express or implied
+  warranty.  In no event will the authors be held liable for any damages
+  arising from the use of this software.
+
+  Permission is granted to anyone to use this software for any purpose,
+  including commercial applications, and to alter it and redistribute it
+  freely, subject to the following restrictions:
+
+  1. The origin of this software must not be misrepresented; you must not
+     claim that you wrote the original software. If you use this software
+     in a product, an acknowledgment in the product documentation would be
+     appreciated but is not required.
+  2. Altered source versions must be plainly marked as such, and must not be
+     misrepresented as being the original software.
+  3. This notice may not be removed or altered from any source distribution.
+*/
+
+/**
+ *  \file SDL_loadso.h
+ *
+ *  System dependent library loading routines
+ *
+ *  Some things to keep in mind:
+ *  \li These functions only work on C function names.  Other languages may
+ *      have name mangling and intrinsic language support that varies from
+ *      compiler to compiler.
+ *  \li Make sure you declare your function pointers with the same calling
+ *      convention as the actual library function.  Your code will crash
+ *      mysteriously if you do not do this.
+ *  \li Avoid namespace collisions.  If you load a symbol from the library,
+ *      it is not defined whether or not it goes into the global symbol
+ *      namespace for the application.  If it does and it conflicts with
+ *      symbols in your code or other shared libraries, you will not get
+ *      the results you expect. :)
+ */
+
+#ifndef _SDL_loadso_h
+#define _SDL_loadso_h
+
+#include "SDL_stdinc.h"
+#include "SDL_error.h"
+
+#include "begin_code.h"
+/* Set up for C function definitions, even when using C++ */
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ *  This function dynamically loads a shared object and returns a pointer
+ *  to the object handle (or NULL if there was an error).
+ *  The 'sofile' parameter is a system dependent name of the object file.
+ */
+extern DECLSPEC void *SDLCALL SDL_LoadObject(const char *sofile);
+
+/**
+ *  Given an object handle, this function looks up the address of the
+ *  named function in the shared object and returns it.  This address
+ *  is no longer valid after calling SDL_UnloadObject().
+ */
+extern DECLSPEC void *SDLCALL SDL_LoadFunction(void *handle,
+                                               const char *name);
+
+/**
+ *  Unload a shared object from memory.
+ */
+extern DECLSPEC void SDLCALL SDL_UnloadObject(void *handle);
+
+/* Ends C function definitions when using C++ */
+#ifdef __cplusplus
+}
+#endif
+#include "close_code.h"
+
+#endif /* _SDL_loadso_h */
+
+/* vi: set ts=4 sw=4 expandtab: */
diff --git a/include/SDL2/SDL_log.h b/include/SDL2/SDL_log.h
new file mode 100644 (file)
index 0000000..5c2bca5
--- /dev/null
@@ -0,0 +1,211 @@
+/*
+  Simple DirectMedia Layer
+  Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
+
+  This software is provided 'as-is', without any express or implied
+  warranty.  In no event will the authors be held liable for any damages
+  arising from the use of this software.
+
+  Permission is granted to anyone to use this software for any purpose,
+  including commercial applications, and to alter it and redistribute it
+  freely, subject to the following restrictions:
+
+  1. The origin of this software must not be misrepresented; you must not
+     claim that you wrote the original software. If you use this software
+     in a product, an acknowledgment in the product documentation would be
+     appreciated but is not required.
+  2. Altered source versions must be plainly marked as such, and must not be
+     misrepresented as being the original software.
+  3. This notice may not be removed or altered from any source distribution.
+*/
+
+/**
+ *  \file SDL_log.h
+ *
+ *  Simple log messages with categories and priorities.
+ *
+ *  By default logs are quiet, but if you're debugging SDL you might want:
+ *
+ *      SDL_LogSetAllPriority(SDL_LOG_PRIORITY_WARN);
+ *
+ *  Here's where the messages go on different platforms:
+ *      Windows: debug output stream
+ *      Android: log output
+ *      Others: standard error output (stderr)
+ */
+
+#ifndef _SDL_log_h
+#define _SDL_log_h
+
+#include "SDL_stdinc.h"
+
+#include "begin_code.h"
+/* Set up for C function definitions, even when using C++ */
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/**
+ *  \brief The maximum size of a log message
+ *
+ *  Messages longer than the maximum size will be truncated
+ */
+#define SDL_MAX_LOG_MESSAGE 4096
+
+/**
+ *  \brief The predefined log categories
+ *
+ *  By default the application category is enabled at the INFO level,
+ *  the assert category is enabled at the WARN level, test is enabled
+ *  at the VERBOSE level and all other categories are enabled at the
+ *  CRITICAL level.
+ */
+enum
+{
+    SDL_LOG_CATEGORY_APPLICATION,
+    SDL_LOG_CATEGORY_ERROR,
+    SDL_LOG_CATEGORY_ASSERT,
+    SDL_LOG_CATEGORY_SYSTEM,
+    SDL_LOG_CATEGORY_AUDIO,
+    SDL_LOG_CATEGORY_VIDEO,
+    SDL_LOG_CATEGORY_RENDER,
+    SDL_LOG_CATEGORY_INPUT,
+    SDL_LOG_CATEGORY_TEST,
+
+    /* Reserved for future SDL library use */
+    SDL_LOG_CATEGORY_RESERVED1,
+    SDL_LOG_CATEGORY_RESERVED2,
+    SDL_LOG_CATEGORY_RESERVED3,
+    SDL_LOG_CATEGORY_RESERVED4,
+    SDL_LOG_CATEGORY_RESERVED5,
+    SDL_LOG_CATEGORY_RESERVED6,
+    SDL_LOG_CATEGORY_RESERVED7,
+    SDL_LOG_CATEGORY_RESERVED8,
+    SDL_LOG_CATEGORY_RESERVED9,
+    SDL_LOG_CATEGORY_RESERVED10,
+
+    /* Beyond this point is reserved for application use, e.g.
+       enum {
+           MYAPP_CATEGORY_AWESOME1 = SDL_LOG_CATEGORY_CUSTOM,
+           MYAPP_CATEGORY_AWESOME2,
+           MYAPP_CATEGORY_AWESOME3,
+           ...
+       };
+     */
+    SDL_LOG_CATEGORY_CUSTOM
+};
+
+/**
+ *  \brief The predefined log priorities
+ */
+typedef enum
+{
+    SDL_LOG_PRIORITY_VERBOSE = 1,
+    SDL_LOG_PRIORITY_DEBUG,
+    SDL_LOG_PRIORITY_INFO,
+    SDL_LOG_PRIORITY_WARN,
+    SDL_LOG_PRIORITY_ERROR,
+    SDL_LOG_PRIORITY_CRITICAL,
+    SDL_NUM_LOG_PRIORITIES
+} SDL_LogPriority;
+
+
+/**
+ *  \brief Set the priority of all log categories
+ */
+extern DECLSPEC void SDLCALL SDL_LogSetAllPriority(SDL_LogPriority priority);
+
+/**
+ *  \brief Set the priority of a particular log category
+ */
+extern DECLSPEC void SDLCALL SDL_LogSetPriority(int category,
+                                                SDL_LogPriority priority);
+
+/**
+ *  \brief Get the priority of a particular log category
+ */
+extern DECLSPEC SDL_LogPriority SDLCALL SDL_LogGetPriority(int category);
+
+/**
+ *  \brief Reset all priorities to default.
+ *
+ *  \note This is called in SDL_Quit().
+ */
+extern DECLSPEC void SDLCALL SDL_LogResetPriorities(void);
+
+/**
+ *  \brief Log a message with SDL_LOG_CATEGORY_APPLICATION and SDL_LOG_PRIORITY_INFO
+ */
+extern DECLSPEC void SDLCALL SDL_Log(const char *fmt, ...);
+
+/**
+ *  \brief Log a message with SDL_LOG_PRIORITY_VERBOSE
+ */
+extern DECLSPEC void SDLCALL SDL_LogVerbose(int category, const char *fmt, ...);
+
+/**
+ *  \brief Log a message with SDL_LOG_PRIORITY_DEBUG
+ */
+extern DECLSPEC void SDLCALL SDL_LogDebug(int category, const char *fmt, ...);
+
+/**
+ *  \brief Log a message with SDL_LOG_PRIORITY_INFO
+ */
+extern DECLSPEC void SDLCALL SDL_LogInfo(int category, const char *fmt, ...);
+
+/**
+ *  \brief Log a message with SDL_LOG_PRIORITY_WARN
+ */
+extern DECLSPEC void SDLCALL SDL_LogWarn(int category, const char *fmt, ...);
+
+/**
+ *  \brief Log a message with SDL_LOG_PRIORITY_ERROR
+ */
+extern DECLSPEC void SDLCALL SDL_LogError(int category, const char *fmt, ...);
+
+/**
+ *  \brief Log a message with SDL_LOG_PRIORITY_CRITICAL
+ */
+extern DECLSPEC void SDLCALL SDL_LogCritical(int category, const char *fmt, ...);
+
+/**
+ *  \brief Log a message with the specified category and priority.
+ */
+extern DECLSPEC void SDLCALL SDL_LogMessage(int category,
+                                            SDL_LogPriority priority,
+                                            const char *fmt, ...);
+
+/**
+ *  \brief Log a message with the specified category and priority.
+ */
+extern DECLSPEC void SDLCALL SDL_LogMessageV(int category,
+                                             SDL_LogPriority priority,
+                                             const char *fmt, va_list ap);
+
+/**
+ *  \brief The prototype for the log output function
+ */
+typedef void (*SDL_LogOutputFunction)(void *userdata, int category, SDL_LogPriority priority, const char *message);
+
+/**
+ *  \brief Get the current log output function.
+ */
+extern DECLSPEC void SDLCALL SDL_LogGetOutputFunction(SDL_LogOutputFunction *callback, void **userdata);
+
+/**
+ *  \brief This function allows you to replace the default log output
+ *         function with one of your own.
+ */
+extern DECLSPEC void SDLCALL SDL_LogSetOutputFunction(SDL_LogOutputFunction callback, void *userdata);
+
+
+/* Ends C function definitions when using C++ */
+#ifdef __cplusplus
+}
+#endif
+#include "close_code.h"
+
+#endif /* _SDL_log_h */
+
+/* vi: set ts=4 sw=4 expandtab: */
diff --git a/include/SDL2/SDL_main.h b/include/SDL2/SDL_main.h
new file mode 100644 (file)
index 0000000..2e8fae9
--- /dev/null
@@ -0,0 +1,155 @@
+/*
+  Simple DirectMedia Layer
+  Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
+
+  This software is provided 'as-is', without any express or implied
+  warranty.  In no event will the authors be held liable for any damages
+  arising from the use of this software.
+
+  Permission is granted to anyone to use this software for any purpose,
+  including commercial applications, and to alter it and redistribute it
+  freely, subject to the following restrictions:
+
+  1. The origin of this software must not be misrepresented; you must not
+     claim that you wrote the original software. If you use this software
+     in a product, an acknowledgment in the product documentation would be
+     appreciated but is not required.
+  2. Altered source versions must be plainly marked as such, and must not be
+     misrepresented as being the original software.
+  3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef _SDL_main_h
+#define _SDL_main_h
+
+#include "SDL_stdinc.h"
+
+/**
+ *  \file SDL_main.h
+ *
+ *  Redefine main() on some platforms so that it is called by SDL.
+ */
+
+#ifndef SDL_MAIN_HANDLED
+#if defined(__WIN32__)
+/* On Windows SDL provides WinMain(), which parses the command line and passes
+   the arguments to your main function.
+
+   If you provide your own WinMain(), you may define SDL_MAIN_HANDLED
+ */
+#define SDL_MAIN_AVAILABLE
+
+#elif defined(__WINRT__)
+/* On WinRT, SDL provides a main function that initializes CoreApplication,
+   creating an instance of IFrameworkView in the process.
+
+   Please note that #include'ing SDL_main.h is not enough to get a main()
+   function working.  In non-XAML apps, the file,
+   src/main/winrt/SDL_WinRT_main_NonXAML.cpp, or a copy of it, must be compiled
+   into the app itself.  In XAML apps, the function, SDL_WinRTRunApp must be
+   called, with a pointer to the Direct3D-hosted XAML control passed in.
+*/
+#define SDL_MAIN_NEEDED
+
+#elif defined(__IPHONEOS__)
+/* On iOS SDL provides a main function that creates an application delegate
+   and starts the iOS application run loop.
+
+   See src/video/uikit/SDL_uikitappdelegate.m for more details.
+ */
+#define SDL_MAIN_NEEDED
+
+#elif defined(__ANDROID__)
+/* On Android SDL provides a Java class in SDLActivity.java that is the
+   main activity entry point.
+
+   See README-android.txt for more details on extending that class.
+ */
+#define SDL_MAIN_NEEDED
+
+#endif
+#endif /* SDL_MAIN_HANDLED */
+
+#ifdef __cplusplus
+#define C_LINKAGE   "C"
+#else
+#define C_LINKAGE
+#endif /* __cplusplus */
+
+/**
+ *  \file SDL_main.h
+ *
+ *  The application's main() function must be called with C linkage,
+ *  and should be declared like this:
+ *  \code
+ *  #ifdef __cplusplus
+ *  extern "C"
+ *  #endif
+ *  int main(int argc, char *argv[])
+ *  {
+ *  }
+ *  \endcode
+ */
+
+#if defined(SDL_MAIN_NEEDED) || defined(SDL_MAIN_AVAILABLE)
+#define main    SDL_main
+#endif
+
+/**
+ *  The prototype for the application's main() function
+ */
+extern C_LINKAGE int SDL_main(int argc, char *argv[]);
+
+
+#include "begin_code.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ *  This is called by the real SDL main function to let the rest of the
+ *  library know that initialization was done properly.
+ *
+ *  Calling this yourself without knowing what you're doing can cause
+ *  crashes and hard to diagnose problems with your application.
+ */
+extern DECLSPEC void SDLCALL SDL_SetMainReady(void);
+
+#ifdef __WIN32__
+
+/**
+ *  This can be called to set the application class at startup
+ */
+extern DECLSPEC int SDLCALL SDL_RegisterApp(char *name, Uint32 style,
+                                            void *hInst);
+extern DECLSPEC void SDLCALL SDL_UnregisterApp(void);
+
+#endif /* __WIN32__ */
+
+
+#ifdef __WINRT__
+
+/**
+ *  \brief Initializes and launches an SDL/WinRT application.
+ *
+ *  \param mainFunction The SDL app's C-style main().
+ *  \param xamlBackgroundPanel An optional, XAML-based, background panel.
+ *     For Non-XAML apps, this value must be set to NULL.  For XAML apps,
+ *     pass in a pointer to a SwapChainBackgroundPanel, casted to an
+ *     IInspectable (via reinterpret_cast).
+ *  \ret 0 on success, -1 on failure.  On failure, use SDL_GetError to retrieve more
+ *      information on the failure.
+ */
+extern DECLSPEC int SDLCALL SDL_WinRTRunApp(int (*mainFunction)(int, char **), void * xamlBackgroundPanel);
+
+#endif /* __WINRT__ */
+
+
+#ifdef __cplusplus
+}
+#endif
+#include "close_code.h"
+
+#endif /* _SDL_main_h */
+
+/* vi: set ts=4 sw=4 expandtab: */
diff --git a/include/SDL2/SDL_messagebox.h b/include/SDL2/SDL_messagebox.h
new file mode 100644 (file)
index 0000000..6004da0
--- /dev/null
@@ -0,0 +1,144 @@
+/*
+  Simple DirectMedia Layer
+  Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
+
+  This software is provided 'as-is', without any express or implied
+  warranty.  In no event will the authors be held liable for any damages
+  arising from the use of this software.
+
+  Permission is granted to anyone to use this software for any purpose,
+  including commercial applications, and to alter it and redistribute it
+  freely, subject to the following restrictions:
+
+  1. The origin of this software must not be misrepresented; you must not
+     claim that you wrote the original software. If you use this software
+     in a product, an acknowledgment in the product documentation would be
+     appreciated but is not required.
+  2. Altered source versions must be plainly marked as such, and must not be
+     misrepresented as being the original software.
+  3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef _SDL_messagebox_h
+#define _SDL_messagebox_h
+
+#include "SDL_stdinc.h"
+#include "SDL_video.h"      /* For SDL_Window */
+
+#include "begin_code.h"
+/* Set up for C function definitions, even when using C++ */
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * \brief SDL_MessageBox flags. If supported will display warning icon, etc.
+ */
+typedef enum
+{
+    SDL_MESSAGEBOX_ERROR        = 0x00000010,   /**< error dialog */
+    SDL_MESSAGEBOX_WARNING      = 0x00000020,   /**< warning dialog */
+    SDL_MESSAGEBOX_INFORMATION  = 0x00000040    /**< informational dialog */
+} SDL_MessageBoxFlags;
+
+/**
+ * \brief Flags for SDL_MessageBoxButtonData.
+ */
+typedef enum
+{
+    SDL_MESSAGEBOX_BUTTON_RETURNKEY_DEFAULT = 0x00000001,  /**< Marks the default button when return is hit */
+    SDL_MESSAGEBOX_BUTTON_ESCAPEKEY_DEFAULT = 0x00000002   /**< Marks the default button when escape is hit */
+} SDL_MessageBoxButtonFlags;
+
+/**
+ *  \brief Individual button data.
+ */
+typedef struct
+{
+    Uint32 flags;       /**< ::SDL_MessageBoxButtonFlags */
+    int buttonid;       /**< User defined button id (value returned via SDL_ShowMessageBox) */
+    const char * text;  /**< The UTF-8 button text */
+} SDL_MessageBoxButtonData;
+
+/**
+ * \brief RGB value used in a message box color scheme
+ */
+typedef struct
+{
+    Uint8 r, g, b;
+} SDL_MessageBoxColor;
+
+typedef enum
+{
+    SDL_MESSAGEBOX_COLOR_BACKGROUND,
+    SDL_MESSAGEBOX_COLOR_TEXT,
+    SDL_MESSAGEBOX_COLOR_BUTTON_BORDER,
+    SDL_MESSAGEBOX_COLOR_BUTTON_BACKGROUND,
+    SDL_MESSAGEBOX_COLOR_BUTTON_SELECTED,
+    SDL_MESSAGEBOX_COLOR_MAX
+} SDL_MessageBoxColorType;
+
+/**
+ * \brief A set of colors to use for message box dialogs
+ */
+typedef struct
+{
+    SDL_MessageBoxColor colors[SDL_MESSAGEBOX_COLOR_MAX];
+} SDL_MessageBoxColorScheme;
+
+/**
+ *  \brief MessageBox structure containing title, text, window, etc.
+ */
+typedef struct
+{
+    Uint32 flags;                       /**< ::SDL_MessageBoxFlags */
+    SDL_Window *window;                 /**< Parent window, can be NULL */
+    const char *title;                  /**< UTF-8 title */
+    const char *message;                /**< UTF-8 message text */
+
+    int numbuttons;
+    const SDL_MessageBoxButtonData *buttons;
+
+    const SDL_MessageBoxColorScheme *colorScheme;   /**< ::SDL_MessageBoxColorScheme, can be NULL to use system settings */
+} SDL_MessageBoxData;
+
+/**
+ *  \brief Create a modal message box.
+ *
+ *  \param messageboxdata The SDL_MessageBoxData structure with title, text, etc.
+ *  \param buttonid The pointer to which user id of hit button should be copied.
+ *
+ *  \return -1 on error, otherwise 0 and buttonid contains user id of button
+ *          hit or -1 if dialog was closed.
+ *
+ *  \note This function should be called on the thread that created the parent
+ *        window, or on the main thread if the messagebox has no parent.  It will
+ *        block execution of that thread until the user clicks a button or
+ *        closes the messagebox.
+ */
+extern DECLSPEC int SDLCALL SDL_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid);
+
+/**
+ *  \brief Create a simple modal message box
+ *
+ *  \param flags    ::SDL_MessageBoxFlags
+ *  \param title    UTF-8 title text
+ *  \param message  UTF-8 message text
+ *  \param window   The parent window, or NULL for no parent
+ *
+ *  \return 0 on success, -1 on error
+ *
+ *  \sa SDL_ShowMessageBox
+ */
+extern DECLSPEC int SDLCALL SDL_ShowSimpleMessageBox(Uint32 flags, const char *title, const char *message, SDL_Window *window);
+
+
+/* Ends C function definitions when using C++ */
+#ifdef __cplusplus
+}
+#endif
+#include "close_code.h"
+
+#endif /* _SDL_messagebox_h */
+
+/* vi: set ts=4 sw=4 expandtab: */
diff --git a/include/SDL2/SDL_mouse.h b/include/SDL2/SDL_mouse.h
new file mode 100644 (file)
index 0000000..ebfd18f
--- /dev/null
@@ -0,0 +1,224 @@
+/*
+  Simple DirectMedia Layer
+  Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
+
+  This software is provided 'as-is', without any express or implied
+  warranty.  In no event will the authors be held liable for any damages
+  arising from the use of this software.
+
+  Permission is granted to anyone to use this software for any purpose,
+  including commercial applications, and to alter it and redistribute it
+  freely, subject to the following restrictions:
+
+  1. The origin of this software must not be misrepresented; you must not
+     claim that you wrote the original software. If you use this software
+     in a product, an acknowledgment in the product documentation would be
+     appreciated but is not required.
+  2. Altered source versions must be plainly marked as such, and must not be
+     misrepresented as being the original software.
+  3. This notice may not be removed or altered from any source distribution.
+*/
+
+/**
+ *  \file SDL_mouse.h
+ *
+ *  Include file for SDL mouse event handling.
+ */
+
+#ifndef _SDL_mouse_h
+#define _SDL_mouse_h
+
+#include "SDL_stdinc.h"
+#include "SDL_error.h"
+#include "SDL_video.h"
+
+#include "begin_code.h"
+/* Set up for C function definitions, even when using C++ */
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef struct SDL_Cursor SDL_Cursor;   /* Implementation dependent */
+
+/**
+ * \brief Cursor types for SDL_CreateSystemCursor.
+ */
+typedef enum
+{
+    SDL_SYSTEM_CURSOR_ARROW,     /**< Arrow */
+    SDL_SYSTEM_CURSOR_IBEAM,     /**< I-beam */
+    SDL_SYSTEM_CURSOR_WAIT,      /**< Wait */
+    SDL_SYSTEM_CURSOR_CROSSHAIR, /**< Crosshair */
+    SDL_SYSTEM_CURSOR_WAITARROW, /**< Small wait cursor (or Wait if not available) */
+    SDL_SYSTEM_CURSOR_SIZENWSE,  /**< Double arrow pointing northwest and southeast */
+    SDL_SYSTEM_CURSOR_SIZENESW,  /**< Double arrow pointing northeast and southwest */
+    SDL_SYSTEM_CURSOR_SIZEWE,    /**< Double arrow pointing west and east */
+    SDL_SYSTEM_CURSOR_SIZENS,    /**< Double arrow pointing north and south */
+    SDL_SYSTEM_CURSOR_SIZEALL,   /**< Four pointed arrow pointing north, south, east, and west */
+    SDL_SYSTEM_CURSOR_NO,        /**< Slashed circle or crossbones */
+    SDL_SYSTEM_CURSOR_HAND,      /**< Hand */
+    SDL_NUM_SYSTEM_CURSORS
+} SDL_SystemCursor;
+
+/* Function prototypes */
+
+/**
+ *  \brief Get the window which currently has mouse focus.
+ */
+extern DECLSPEC SDL_Window * SDLCALL SDL_GetMouseFocus(void);
+
+/**
+ *  \brief Retrieve the current state of the mouse.
+ *
+ *  The current button state is returned as a button bitmask, which can
+ *  be tested using the SDL_BUTTON(X) macros, and x and y are set to the
+ *  mouse cursor position relative to the focus window for the currently
+ *  selected mouse.  You can pass NULL for either x or y.
+ */
+extern DECLSPEC Uint32 SDLCALL SDL_GetMouseState(int *x, int *y);
+
+/**
+ *  \brief Retrieve the relative state of the mouse.
+ *
+ *  The current button state is returned as a button bitmask, which can
+ *  be tested using the SDL_BUTTON(X) macros, and x and y are set to the
+ *  mouse deltas since the last call to SDL_GetRelativeMouseState().
+ */
+extern DECLSPEC Uint32 SDLCALL SDL_GetRelativeMouseState(int *x, int *y);
+
+/**
+ *  \brief Moves the mouse to the given position within the window.
+ *
+ *  \param window The window to move the mouse into, or NULL for the current mouse focus
+ *  \param x The x coordinate within the window
+ *  \param y The y coordinate within the window
+ *
+ *  \note This function generates a mouse motion event
+ */
+extern DECLSPEC void SDLCALL SDL_WarpMouseInWindow(SDL_Window * window,
+                                                   int x, int y);
+
+/**
+ *  \brief Set relative mouse mode.
+ *
+ *  \param enabled Whether or not to enable relative mode
+ *
+ *  \return 0 on success, or -1 if relative mode is not supported.
+ *
+ *  While the mouse is in relative mode, the cursor is hidden, and the
+ *  driver will try to report continuous motion in the current window.
+ *  Only relative motion events will be delivered, the mouse position
+ *  will not change.
+ *
+ *  \note This function will flush any pending mouse motion.
+ *
+ *  \sa SDL_GetRelativeMouseMode()
+ */
+extern DECLSPEC int SDLCALL SDL_SetRelativeMouseMode(SDL_bool enabled);
+
+/**
+ *  \brief Query whether relative mouse mode is enabled.
+ *
+ *  \sa SDL_SetRelativeMouseMode()
+ */
+extern DECLSPEC SDL_bool SDLCALL SDL_GetRelativeMouseMode(void);
+
+/**
+ *  \brief Create a cursor, using the specified bitmap data and
+ *         mask (in MSB format).
+ *
+ *  The cursor width must be a multiple of 8 bits.
+ *
+ *  The cursor is created in black and white according to the following:
+ *  <table>
+ *  <tr><td> data </td><td> mask </td><td> resulting pixel on screen </td></tr>
+ *  <tr><td>  0   </td><td>  1   </td><td> White </td></tr>
+ *  <tr><td>  1   </td><td>  1   </td><td> Black </td></tr>
+ *  <tr><td>  0   </td><td>  0   </td><td> Transparent </td></tr>
+ *  <tr><td>  1   </td><td>  0   </td><td> Inverted color if possible, black
+ *                                         if not. </td></tr>
+ *  </table>
+ *
+ *  \sa SDL_FreeCursor()
+ */
+extern DECLSPEC SDL_Cursor *SDLCALL SDL_CreateCursor(const Uint8 * data,
+                                                     const Uint8 * mask,
+                                                     int w, int h, int hot_x,
+                                                     int hot_y);
+
+/**
+ *  \brief Create a color cursor.
+ *
+ *  \sa SDL_FreeCursor()
+ */
+extern DECLSPEC SDL_Cursor *SDLCALL SDL_CreateColorCursor(SDL_Surface *surface,
+                                                          int hot_x,
+                                                          int hot_y);
+
+/**
+ *  \brief Create a system cursor.
+ *
+ *  \sa SDL_FreeCursor()
+ */
+extern DECLSPEC SDL_Cursor *SDLCALL SDL_CreateSystemCursor(SDL_SystemCursor id);
+
+/**
+ *  \brief Set the active cursor.
+ */
+extern DECLSPEC void SDLCALL SDL_SetCursor(SDL_Cursor * cursor);
+
+/**
+ *  \brief Return the active cursor.
+ */
+extern DECLSPEC SDL_Cursor *SDLCALL SDL_GetCursor(void);
+
+/**
+ *  \brief Return the default cursor.
+ */
+extern DECLSPEC SDL_Cursor *SDLCALL SDL_GetDefaultCursor(void);
+
+/**
+ *  \brief Frees a cursor created with SDL_CreateCursor().
+ *
+ *  \sa SDL_CreateCursor()
+ */
+extern DECLSPEC void SDLCALL SDL_FreeCursor(SDL_Cursor * cursor);
+
+/**
+ *  \brief Toggle whether or not the cursor is shown.
+ *
+ *  \param toggle 1 to show the cursor, 0 to hide it, -1 to query the current
+ *                state.
+ *
+ *  \return 1 if the cursor is shown, or 0 if the cursor is hidden.
+ */
+extern DECLSPEC int SDLCALL SDL_ShowCursor(int toggle);
+
+/**
+ *  Used as a mask when testing buttons in buttonstate.
+ *   - Button 1:  Left mouse button
+ *   - Button 2:  Middle mouse button
+ *   - Button 3:  Right mouse button
+ */
+#define SDL_BUTTON(X)       (1 << ((X)-1))
+#define SDL_BUTTON_LEFT     1
+#define SDL_BUTTON_MIDDLE   2
+#define SDL_BUTTON_RIGHT    3
+#define SDL_BUTTON_X1       4
+#define SDL_BUTTON_X2       5
+#define SDL_BUTTON_LMASK    SDL_BUTTON(SDL_BUTTON_LEFT)
+#define SDL_BUTTON_MMASK    SDL_BUTTON(SDL_BUTTON_MIDDLE)
+#define SDL_BUTTON_RMASK    SDL_BUTTON(SDL_BUTTON_RIGHT)
+#define SDL_BUTTON_X1MASK   SDL_BUTTON(SDL_BUTTON_X1)
+#define SDL_BUTTON_X2MASK   SDL_BUTTON(SDL_BUTTON_X2)
+
+
+/* Ends C function definitions when using C++ */
+#ifdef __cplusplus
+}
+#endif
+#include "close_code.h"
+
+#endif /* _SDL_mouse_h */
+
+/* vi: set ts=4 sw=4 expandtab: */
diff --git a/include/SDL2/SDL_mutex.h b/include/SDL2/SDL_mutex.h
new file mode 100644 (file)
index 0000000..3e8b4db
--- /dev/null
@@ -0,0 +1,251 @@
+/*
+  Simple DirectMedia Layer
+  Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
+
+  This software is provided 'as-is', without any express or implied
+  warranty.  In no event will the authors be held liable for any damages
+  arising from the use of this software.
+
+  Permission is granted to anyone to use this software for any purpose,
+  including commercial applications, and to alter it and redistribute it
+  freely, subject to the following restrictions:
+
+  1. The origin of this software must not be misrepresented; you must not
+     claim that you wrote the original software. If you use this software
+     in a product, an acknowledgment in the product documentation would be
+     appreciated but is not required.
+  2. Altered source versions must be plainly marked as such, and must not be
+     misrepresented as being the original software.
+  3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef _SDL_mutex_h
+#define _SDL_mutex_h
+
+/**
+ *  \file SDL_mutex.h
+ *
+ *  Functions to provide thread synchronization primitives.
+ */
+
+#include "SDL_stdinc.h"
+#include "SDL_error.h"
+
+#include "begin_code.h"
+/* Set up for C function definitions, even when using C++ */
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ *  Synchronization functions which can time out return this value
+ *  if they time out.
+ */
+#define SDL_MUTEX_TIMEDOUT  1
+
+/**
+ *  This is the timeout value which corresponds to never time out.
+ */
+#define SDL_MUTEX_MAXWAIT   (~(Uint32)0)
+
+
+/**
+ *  \name Mutex functions
+ */
+/* @{ */
+
+/* The SDL mutex structure, defined in SDL_sysmutex.c */
+struct SDL_mutex;
+typedef struct SDL_mutex SDL_mutex;
+
+/**
+ *  Create a mutex, initialized unlocked.
+ */
+extern DECLSPEC SDL_mutex *SDLCALL SDL_CreateMutex(void);
+
+/**
+ *  Lock the mutex.
+ *
+ *  \return 0, or -1 on error.
+ */
+#define SDL_mutexP(m)   SDL_LockMutex(m)
+extern DECLSPEC int SDLCALL SDL_LockMutex(SDL_mutex * mutex);
+
+/**
+ *  Try to lock the mutex
+ *
+ *  \return 0, SDL_MUTEX_TIMEDOUT, or -1 on error
+ */
+extern DECLSPEC int SDLCALL SDL_TryLockMutex(SDL_mutex * mutex);
+
+/**
+ *  Unlock the mutex.
+ *
+ *  \return 0, or -1 on error.
+ *
+ *  \warning It is an error to unlock a mutex that has not been locked by
+ *           the current thread, and doing so results in undefined behavior.
+ */
+#define SDL_mutexV(m)   SDL_UnlockMutex(m)
+extern DECLSPEC int SDLCALL SDL_UnlockMutex(SDL_mutex * mutex);
+
+/**
+ *  Destroy a mutex.
+ */
+extern DECLSPEC void SDLCALL SDL_DestroyMutex(SDL_mutex * mutex);
+
+/* @} *//* Mutex functions */
+
+
+/**
+ *  \name Semaphore functions
+ */
+/* @{ */
+
+/* The SDL semaphore structure, defined in SDL_syssem.c */
+struct SDL_semaphore;
+typedef struct SDL_semaphore SDL_sem;
+
+/**
+ *  Create a semaphore, initialized with value, returns NULL on failure.
+ */
+extern DECLSPEC SDL_sem *SDLCALL SDL_CreateSemaphore(Uint32 initial_value);
+
+/**
+ *  Destroy a semaphore.
+ */
+extern DECLSPEC void SDLCALL SDL_DestroySemaphore(SDL_sem * sem);
+
+/**
+ *  This function suspends the calling thread until the semaphore pointed
+ *  to by \c sem has a positive count. It then atomically decreases the
+ *  semaphore count.
+ */
+extern DECLSPEC int SDLCALL SDL_SemWait(SDL_sem * sem);
+
+/**
+ *  Non-blocking variant of SDL_SemWait().
+ *
+ *  \return 0 if the wait succeeds, ::SDL_MUTEX_TIMEDOUT if the wait would
+ *          block, and -1 on error.
+ */
+extern DECLSPEC int SDLCALL SDL_SemTryWait(SDL_sem * sem);
+
+/**
+ *  Variant of SDL_SemWait() with a timeout in milliseconds.
+ *
+ *  \return 0 if the wait succeeds, ::SDL_MUTEX_TIMEDOUT if the wait does not
+ *          succeed in the allotted time, and -1 on error.
+ *
+ *  \warning On some platforms this function is implemented by looping with a
+ *           delay of 1 ms, and so should be avoided if possible.
+ */
+extern DECLSPEC int SDLCALL SDL_SemWaitTimeout(SDL_sem * sem, Uint32 ms);
+
+/**
+ *  Atomically increases the semaphore's count (not blocking).
+ *
+ *  \return 0, or -1 on error.
+ */
+extern DECLSPEC int SDLCALL SDL_SemPost(SDL_sem * sem);
+
+/**
+ *  Returns the current count of the semaphore.
+ */
+extern DECLSPEC Uint32 SDLCALL SDL_SemValue(SDL_sem * sem);
+
+/* @} *//* Semaphore functions */
+
+
+/**
+ *  \name Condition variable functions
+ */
+/* @{ */
+
+/* The SDL condition variable structure, defined in SDL_syscond.c */
+struct SDL_cond;
+typedef struct SDL_cond SDL_cond;
+
+/**
+ *  Create a condition variable.
+ *
+ *  Typical use of condition variables:
+ *
+ *  Thread A:
+ *    SDL_LockMutex(lock);
+ *    while ( ! condition ) {
+ *        SDL_CondWait(cond, lock);
+ *    }
+ *    SDL_UnlockMutex(lock);
+ *
+ *  Thread B:
+ *    SDL_LockMutex(lock);
+ *    ...
+ *    condition = true;
+ *    ...
+ *    SDL_CondSignal(cond);
+ *    SDL_UnlockMutex(lock);
+ *
+ *  There is some discussion whether to signal the condition variable
+ *  with the mutex locked or not.  There is some potential performance
+ *  benefit to unlocking first on some platforms, but there are some
+ *  potential race conditions depending on how your code is structured.
+ *
+ *  In general it's safer to signal the condition variable while the
+ *  mutex is locked.
+ */
+extern DECLSPEC SDL_cond *SDLCALL SDL_CreateCond(void);
+
+/**
+ *  Destroy a condition variable.
+ */
+extern DECLSPEC void SDLCALL SDL_DestroyCond(SDL_cond * cond);
+
+/**
+ *  Restart one of the threads that are waiting on the condition variable.
+ *
+ *  \return 0 or -1 on error.
+ */
+extern DECLSPEC int SDLCALL SDL_CondSignal(SDL_cond * cond);
+
+/**
+ *  Restart all threads that are waiting on the condition variable.
+ *
+ *  \return 0 or -1 on error.
+ */
+extern DECLSPEC int SDLCALL SDL_CondBroadcast(SDL_cond * cond);
+
+/**
+ *  Wait on the condition variable, unlocking the provided mutex.
+ *
+ *  \warning The mutex must be locked before entering this function!
+ *
+ *  The mutex is re-locked once the condition variable is signaled.
+ *
+ *  \return 0 when it is signaled, or -1 on error.
+ */
+extern DECLSPEC int SDLCALL SDL_CondWait(SDL_cond * cond, SDL_mutex * mutex);
+
+/**
+ *  Waits for at most \c ms milliseconds, and returns 0 if the condition
+ *  variable is signaled, ::SDL_MUTEX_TIMEDOUT if the condition is not
+ *  signaled in the allotted time, and -1 on error.
+ *
+ *  \warning On some platforms this function is implemented by looping with a
+ *           delay of 1 ms, and so should be avoided if possible.
+ */
+extern DECLSPEC int SDLCALL SDL_CondWaitTimeout(SDL_cond * cond,
+                                                SDL_mutex * mutex, Uint32 ms);
+
+/* @} *//* Condition variable functions */
+
+
+/* Ends C function definitions when using C++ */
+#ifdef __cplusplus
+}
+#endif
+#include "close_code.h"
+
+#endif /* _SDL_mutex_h */
+
+/* vi: set ts=4 sw=4 expandtab: */
diff --git a/include/SDL2/SDL_name.h b/include/SDL2/SDL_name.h
new file mode 100644 (file)
index 0000000..719666f
--- /dev/null
@@ -0,0 +1,33 @@
+/*
+  Simple DirectMedia Layer
+  Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
+
+  This software is provided 'as-is', without any express or implied
+  warranty.  In no event will the authors be held liable for any damages
+  arising from the use of this software.
+
+  Permission is granted to anyone to use this software for any purpose,
+  including commercial applications, and to alter it and redistribute it
+  freely, subject to the following restrictions:
+
+  1. The origin of this software must not be misrepresented; you must not
+     claim that you wrote the original software. If you use this software
+     in a product, an acknowledgment in the product documentation would be
+     appreciated but is not required.
+  2. Altered source versions must be plainly marked as such, and must not be
+     misrepresented as being the original software.
+  3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef _SDLname_h_
+#define _SDLname_h_
+
+#if defined(__STDC__) || defined(__cplusplus)
+#define NeedFunctionPrototypes 1
+#endif
+
+#define SDL_NAME(X) SDL_##X
+
+#endif /* _SDLname_h_ */
+
+/* vi: set ts=4 sw=4 expandtab: */
diff --git a/include/SDL2/SDL_opengl.h b/include/SDL2/SDL_opengl.h
new file mode 100644 (file)
index 0000000..b48ea7a
--- /dev/null
@@ -0,0 +1,11126 @@
+/*
+  Simple DirectMedia Layer
+  Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
+
+  This software is provided 'as-is', without any express or implied
+  warranty.  In no event will the authors be held liable for any damages
+  arising from the use of this software.
+
+  Permission is granted to anyone to use this software for any purpose,
+  including commercial applications, and to alter it and redistribute it
+  freely, subject to the following restrictions:
+
+  1. The origin of this software must not be misrepresented; you must not
+     claim that you wrote the original software. If you use this software
+     in a product, an acknowledgment in the product documentation would be
+     appreciated but is not required.
+  2. Altered source versions must be plainly marked as such, and must not be
+     misrepresented as being the original software.
+  3. This notice may not be removed or altered from any source distribution.
+*/
+
+/**
+ *  \file SDL_opengl.h
+ *
+ *  This is a simple file to encapsulate the OpenGL API headers.
+ */
+
+#ifndef _SDL_opengl_h
+#define _SDL_opengl_h
+
+#include "SDL_config.h"
+
+#ifndef __IPHONEOS__
+
+#ifdef __WIN32__
+#define WIN32_LEAN_AND_MEAN
+#ifndef NOMINMAX
+#define NOMINMAX                /* Don't defined min() and max() */
+#endif
+#include <windows.h>
+#endif
+
+#ifdef __glext_h_
+/* Someone has already included glext.h */
+#define NO_SDL_GLEXT
+#endif
+#ifndef NO_SDL_GLEXT
+#define __glext_h_              /* Don't let gl.h include glext.h */
+#endif
+#if defined(__MACOSX__)
+#include <OpenGL/gl.h>          /* Header File For The OpenGL Library */
+#define __X_GL_H
+#else
+#include <GL/gl.h>              /* Header File For The OpenGL Library */
+#endif
+#ifndef NO_SDL_GLEXT
+#undef __glext_h_
+#endif
+
+/**
+ *  \file SDL_opengl.h
+ *
+ *  This file is included because glext.h is not available on some systems.
+ *  If you don't want this version included, simply define ::NO_SDL_GLEXT.
+ *
+ *  The latest version is available from:
+ *      http://www.opengl.org/registry/
+ */
+
+/**
+ *  \def NO_SDL_GLEXT
+ *
+ *  Define this if you have your own version of glext.h and want to disable the
+ *  version included in SDL_opengl.h.
+ */
+
+#if !defined(NO_SDL_GLEXT) && !defined(GL_GLEXT_LEGACY)
+#ifndef __glext_h_
+#define __glext_h_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+** Copyright (c) 2007-2010 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.
+*/
+
+/* Header file version number, required by OpenGL ABI for Linux */
+/* glext.h last updated $Date: 2010-08-03 01:30:25 -0700 (Tue, 03 Aug 2010) $ */
+/* Current version at http://www.opengl.org/registry/ */
+#define GL_GLEXT_VERSION 64
+/* Function declaration macros - to move into glplatform.h */
+
+#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__)
+#define WIN32_LEAN_AND_MEAN 1
+#include <windows.h>
+#endif
+
+#ifndef APIENTRY
+#define APIENTRY
+#endif
+#ifndef APIENTRYP
+#define APIENTRYP APIENTRY *
+#endif
+#ifndef GLAPI
+#define GLAPI extern
+#endif
+
+/*************************************************************/
+
+#ifndef GL_VERSION_1_2
+#define GL_UNSIGNED_BYTE_3_3_2            0x8032
+#define GL_UNSIGNED_SHORT_4_4_4_4         0x8033
+#define GL_UNSIGNED_SHORT_5_5_5_1         0x8034
+#define GL_UNSIGNED_INT_8_8_8_8           0x8035
+#define GL_UNSIGNED_INT_10_10_10_2        0x8036
+#define GL_TEXTURE_BINDING_3D             0x806A
+#define GL_PACK_SKIP_IMAGES               0x806B
+#define GL_PACK_IMAGE_HEIGHT              0x806C
+#define GL_UNPACK_SKIP_IMAGES             0x806D
+#define GL_UNPACK_IMAGE_HEIGHT            0x806E
+#define GL_TEXTURE_3D                     0x806F
+#define GL_PROXY_TEXTURE_3D               0x8070
+#define GL_TEXTURE_DEPTH                  0x8071
+#define GL_TEXTURE_WRAP_R                 0x8072
+#define GL_MAX_3D_TEXTURE_SIZE            0x8073
+#define GL_UNSIGNED_BYTE_2_3_3_REV        0x8362
+#define GL_UNSIGNED_SHORT_5_6_5           0x8363
+#define GL_UNSIGNED_SHORT_5_6_5_REV       0x8364
+#define GL_UNSIGNED_SHORT_4_4_4_4_REV     0x8365
+#define GL_UNSIGNED_SHORT_1_5_5_5_REV     0x8366
+#define GL_UNSIGNED_INT_8_8_8_8_REV       0x8367
+#define GL_UNSIGNED_INT_2_10_10_10_REV    0x8368
+#define GL_BGR                            0x80E0
+#define GL_BGRA                           0x80E1
+#define GL_MAX_ELEMENTS_VERTICES          0x80E8
+#define GL_MAX_ELEMENTS_INDICES           0x80E9
+#define GL_CLAMP_TO_EDGE                  0x812F
+#define GL_TEXTURE_MIN_LOD                0x813A
+#define GL_TEXTURE_MAX_LOD                0x813B
+#define GL_TEXTURE_BASE_LEVEL             0x813C
+#define GL_TEXTURE_MAX_LEVEL              0x813D
+#define GL_SMOOTH_POINT_SIZE_RANGE        0x0B12
+#define GL_SMOOTH_POINT_SIZE_GRANULARITY  0x0B13
+#define GL_SMOOTH_LINE_WIDTH_RANGE        0x0B22
+#define GL_SMOOTH_LINE_WIDTH_GRANULARITY  0x0B23
+#define GL_ALIASED_LINE_WIDTH_RANGE       0x846E
+#endif
+
+#ifndef GL_VERSION_1_2_DEPRECATED
+#define GL_RESCALE_NORMAL                 0x803A
+#define GL_LIGHT_MODEL_COLOR_CONTROL      0x81F8
+#define GL_SINGLE_COLOR                   0x81F9
+#define GL_SEPARATE_SPECULAR_COLOR        0x81FA
+#define GL_ALIASED_POINT_SIZE_RANGE       0x846D
+#endif
+
+#ifndef GL_ARB_imaging
+#define GL_CONSTANT_COLOR                 0x8001
+#define GL_ONE_MINUS_CONSTANT_COLOR       0x8002
+#define GL_CONSTANT_ALPHA                 0x8003
+#define GL_ONE_MINUS_CONSTANT_ALPHA       0x8004
+#define GL_BLEND_COLOR                    0x8005
+#define GL_FUNC_ADD                       0x8006
+#define GL_MIN                            0x8007
+#define GL_MAX                            0x8008
+#define GL_BLEND_EQUATION                 0x8009
+#define GL_FUNC_SUBTRACT                  0x800A
+#define GL_FUNC_REVERSE_SUBTRACT          0x800B
+#endif
+
+#ifndef GL_ARB_imaging_DEPRECATED
+#define GL_CONVOLUTION_1D                 0x8010
+#define GL_CONVOLUTION_2D                 0x8011
+#define GL_SEPARABLE_2D                   0x8012
+#define GL_CONVOLUTION_BORDER_MODE        0x8013
+#define GL_CONVOLUTION_FILTER_SCALE       0x8014
+#define GL_CONVOLUTION_FILTER_BIAS        0x8015
+#define GL_REDUCE                         0x8016
+#define GL_CONVOLUTION_FORMAT             0x8017
+#define GL_CONVOLUTION_WIDTH              0x8018
+#define GL_CONVOLUTION_HEIGHT             0x8019
+#define GL_MAX_CONVOLUTION_WIDTH          0x801A
+#define GL_MAX_CONVOLUTION_HEIGHT         0x801B
+#define GL_POST_CONVOLUTION_RED_SCALE     0x801C
+#define GL_POST_CONVOLUTION_GREEN_SCALE   0x801D
+#define GL_POST_CONVOLUTION_BLUE_SCALE    0x801E
+#define GL_POST_CONVOLUTION_ALPHA_SCALE   0x801F
+#define GL_POST_CONVOLUTION_RED_BIAS      0x8020
+#define GL_POST_CONVOLUTION_GREEN_BIAS    0x8021
+#define GL_POST_CONVOLUTION_BLUE_BIAS     0x8022
+#define GL_POST_CONVOLUTION_ALPHA_BIAS    0x8023
+#define GL_HISTOGRAM                      0x8024
+#define GL_PROXY_HISTOGRAM                0x8025
+#define GL_HISTOGRAM_WIDTH                0x8026
+#define GL_HISTOGRAM_FORMAT               0x8027
+#define GL_HISTOGRAM_RED_SIZE             0x8028
+#define GL_HISTOGRAM_GREEN_SIZE           0x8029
+#define GL_HISTOGRAM_BLUE_SIZE            0x802A
+#define GL_HISTOGRAM_ALPHA_SIZE           0x802B
+#define GL_HISTOGRAM_LUMINANCE_SIZE       0x802C
+#define GL_HISTOGRAM_SINK                 0x802D
+#define GL_MINMAX                         0x802E
+#define GL_MINMAX_FORMAT                  0x802F
+#define GL_MINMAX_SINK                    0x8030
+#define GL_TABLE_TOO_LARGE                0x8031
+#define GL_COLOR_MATRIX                   0x80B1
+#define GL_COLOR_MATRIX_STACK_DEPTH       0x80B2
+#define GL_MAX_COLOR_MATRIX_STACK_DEPTH   0x80B3
+#define GL_POST_COLOR_MATRIX_RED_SCALE    0x80B4
+#define GL_POST_COLOR_MATRIX_GREEN_SCALE  0x80B5
+#define GL_POST_COLOR_MATRIX_BLUE_SCALE   0x80B6
+#define GL_POST_COLOR_MATRIX_ALPHA_SCALE  0x80B7
+#define GL_POST_COLOR_MATRIX_RED_BIAS     0x80B8
+#define GL_POST_COLOR_MATRIX_GREEN_BIAS   0x80B9
+#define GL_POST_COLOR_MATRIX_BLUE_BIAS    0x80BA
+#define GL_POST_COLOR_MATRIX_ALPHA_BIAS   0x80BB
+#define GL_COLOR_TABLE                    0x80D0
+#define GL_POST_CONVOLUTION_COLOR_TABLE   0x80D1
+#define GL_POST_COLOR_MATRIX_COLOR_TABLE  0x80D2
+#define GL_PROXY_COLOR_TABLE              0x80D3
+#define GL_PROXY_POST_CONVOLUTION_COLOR_TABLE 0x80D4
+#define GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE 0x80D5
+#define GL_COLOR_TABLE_SCALE              0x80D6
+#define GL_COLOR_TABLE_BIAS               0x80D7
+#define GL_COLOR_TABLE_FORMAT             0x80D8
+#define GL_COLOR_TABLE_WIDTH              0x80D9
+#define GL_COLOR_TABLE_RED_SIZE           0x80DA
+#define GL_COLOR_TABLE_GREEN_SIZE         0x80DB
+#define GL_COLOR_TABLE_BLUE_SIZE          0x80DC
+#define GL_COLOR_TABLE_ALPHA_SIZE         0x80DD
+#define GL_COLOR_TABLE_LUMINANCE_SIZE     0x80DE
+#define GL_COLOR_TABLE_INTENSITY_SIZE     0x80DF
+#define GL_CONSTANT_BORDER                0x8151
+#define GL_REPLICATE_BORDER               0x8153
+#define GL_CONVOLUTION_BORDER_COLOR       0x8154
+#endif
+
+#ifndef GL_VERSION_1_3
+#define GL_TEXTURE0                       0x84C0
+#define GL_TEXTURE1                       0x84C1
+#define GL_TEXTURE2                       0x84C2
+#define GL_TEXTURE3                       0x84C3
+#define GL_TEXTURE4                       0x84C4
+#define GL_TEXTURE5                       0x84C5
+#define GL_TEXTURE6                       0x84C6
+#define GL_TEXTURE7                       0x84C7
+#define GL_TEXTURE8                       0x84C8
+#define GL_TEXTURE9                       0x84C9
+#define GL_TEXTURE10                      0x84CA
+#define GL_TEXTURE11                      0x84CB
+#define GL_TEXTURE12                      0x84CC
+#define GL_TEXTURE13                      0x84CD
+#define GL_TEXTURE14                      0x84CE
+#define GL_TEXTURE15                      0x84CF
+#define GL_TEXTURE16                      0x84D0
+#define GL_TEXTURE17                      0x84D1
+#define GL_TEXTURE18                      0x84D2
+#define GL_TEXTURE19                      0x84D3
+#define GL_TEXTURE20                      0x84D4
+#define GL_TEXTURE21                      0x84D5
+#define GL_TEXTURE22                      0x84D6
+#define GL_TEXTURE23                      0x84D7
+#define GL_TEXTURE24                      0x84D8
+#define GL_TEXTURE25                      0x84D9
+#define GL_TEXTURE26                      0x84DA
+#define GL_TEXTURE27                      0x84DB
+#define GL_TEXTURE28                      0x84DC
+#define GL_TEXTURE29                      0x84DD
+#define GL_TEXTURE30                      0x84DE
+#define GL_TEXTURE31                      0x84DF
+#define GL_ACTIVE_TEXTURE                 0x84E0
+#define GL_MULTISAMPLE                    0x809D
+#define GL_SAMPLE_ALPHA_TO_COVERAGE       0x809E
+#define GL_SAMPLE_ALPHA_TO_ONE            0x809F
+#define GL_SAMPLE_COVERAGE                0x80A0
+#define GL_SAMPLE_BUFFERS                 0x80A8
+#define GL_SAMPLES                        0x80A9
+#define GL_SAMPLE_COVERAGE_VALUE          0x80AA
+#define GL_SAMPLE_COVERAGE_INVERT         0x80AB
+#define GL_TEXTURE_CUBE_MAP               0x8513
+#define GL_TEXTURE_BINDING_CUBE_MAP       0x8514
+#define GL_TEXTURE_CUBE_MAP_POSITIVE_X    0x8515
+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X    0x8516
+#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y    0x8517
+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y    0x8518
+#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z    0x8519
+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z    0x851A
+#define GL_PROXY_TEXTURE_CUBE_MAP         0x851B
+#define GL_MAX_CUBE_MAP_TEXTURE_SIZE      0x851C
+#define GL_COMPRESSED_RGB                 0x84ED
+#define GL_COMPRESSED_RGBA                0x84EE
+#define GL_TEXTURE_COMPRESSION_HINT       0x84EF
+#define GL_TEXTURE_COMPRESSED_IMAGE_SIZE  0x86A0
+#define GL_TEXTURE_COMPRESSED             0x86A1
+#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2
+#define GL_COMPRESSED_TEXTURE_FORMATS     0x86A3
+#define GL_CLAMP_TO_BORDER                0x812D
+#endif
+
+#ifndef GL_VERSION_1_3_DEPRECATED
+#define GL_CLIENT_ACTIVE_TEXTURE          0x84E1
+#define GL_MAX_TEXTURE_UNITS              0x84E2
+#define GL_TRANSPOSE_MODELVIEW_MATRIX     0x84E3
+#define GL_TRANSPOSE_PROJECTION_MATRIX    0x84E4
+#define GL_TRANSPOSE_TEXTURE_MATRIX       0x84E5
+#define GL_TRANSPOSE_COLOR_MATRIX         0x84E6
+#define GL_MULTISAMPLE_BIT                0x20000000
+#define GL_NORMAL_MAP                     0x8511
+#define GL_REFLECTION_MAP                 0x8512
+#define GL_COMPRESSED_ALPHA               0x84E9
+#define GL_COMPRESSED_LUMINANCE           0x84EA
+#define GL_COMPRESSED_LUMINANCE_ALPHA     0x84EB
+#define GL_COMPRESSED_INTENSITY           0x84EC
+#define GL_COMBINE                        0x8570
+#define GL_COMBINE_RGB                    0x8571
+#define GL_COMBINE_ALPHA                  0x8572
+#define GL_SOURCE0_RGB                    0x8580
+#define GL_SOURCE1_RGB                    0x8581
+#define GL_SOURCE2_RGB                    0x8582
+#define GL_SOURCE0_ALPHA                  0x8588
+#define GL_SOURCE1_ALPHA                  0x8589
+#define GL_SOURCE2_ALPHA                  0x858A
+#define GL_OPERAND0_RGB                   0x8590
+#define GL_OPERAND1_RGB                   0x8591
+#define GL_OPERAND2_RGB                   0x8592
+#define GL_OPERAND0_ALPHA                 0x8598
+#define GL_OPERAND1_ALPHA                 0x8599
+#define GL_OPERAND2_ALPHA                 0x859A
+#define GL_RGB_SCALE                      0x8573
+#define GL_ADD_SIGNED                     0x8574
+#define GL_INTERPOLATE                    0x8575
+#define GL_SUBTRACT                       0x84E7
+#define GL_CONSTANT                       0x8576
+#define GL_PRIMARY_COLOR                  0x8577
+#define GL_PREVIOUS                       0x8578
+#define GL_DOT3_RGB                       0x86AE
+#define GL_DOT3_RGBA                      0x86AF
+#endif
+
+#ifndef GL_VERSION_1_4
+#define GL_BLEND_DST_RGB                  0x80C8
+#define GL_BLEND_SRC_RGB                  0x80C9
+#define GL_BLEND_DST_ALPHA                0x80CA
+#define GL_BLEND_SRC_ALPHA                0x80CB
+#define GL_POINT_FADE_THRESHOLD_SIZE      0x8128
+#define GL_DEPTH_COMPONENT16              0x81A5
+#define GL_DEPTH_COMPONENT24              0x81A6
+#define GL_DEPTH_COMPONENT32              0x81A7
+#define GL_MIRRORED_REPEAT                0x8370
+#define GL_MAX_TEXTURE_LOD_BIAS           0x84FD
+#define GL_TEXTURE_LOD_BIAS               0x8501
+#define GL_INCR_WRAP                      0x8507
+#define GL_DECR_WRAP                      0x8508
+#define GL_TEXTURE_DEPTH_SIZE             0x884A
+#define GL_TEXTURE_COMPARE_MODE           0x884C
+#define GL_TEXTURE_COMPARE_FUNC           0x884D
+#endif
+
+#ifndef GL_VERSION_1_4_DEPRECATED
+#define GL_POINT_SIZE_MIN                 0x8126
+#define GL_POINT_SIZE_MAX                 0x8127
+#define GL_POINT_DISTANCE_ATTENUATION     0x8129
+#define GL_GENERATE_MIPMAP                0x8191
+#define GL_GENERATE_MIPMAP_HINT           0x8192
+#define GL_FOG_COORDINATE_SOURCE          0x8450
+#define GL_FOG_COORDINATE                 0x8451
+#define GL_FRAGMENT_DEPTH                 0x8452
+#define GL_CURRENT_FOG_COORDINATE         0x8453
+#define GL_FOG_COORDINATE_ARRAY_TYPE      0x8454
+#define GL_FOG_COORDINATE_ARRAY_STRIDE    0x8455
+#define GL_FOG_COORDINATE_ARRAY_POINTER   0x8456
+#define GL_FOG_COORDINATE_ARRAY           0x8457
+#define GL_COLOR_SUM                      0x8458
+#define GL_CURRENT_SECONDARY_COLOR        0x8459
+#define GL_SECONDARY_COLOR_ARRAY_SIZE     0x845A
+#define GL_SECONDARY_COLOR_ARRAY_TYPE     0x845B
+#define GL_SECONDARY_COLOR_ARRAY_STRIDE   0x845C
+#define GL_SECONDARY_COLOR_ARRAY_POINTER  0x845D
+#define GL_SECONDARY_COLOR_ARRAY          0x845E
+#define GL_TEXTURE_FILTER_CONTROL         0x8500
+#define GL_DEPTH_TEXTURE_MODE             0x884B
+#define GL_COMPARE_R_TO_TEXTURE           0x884E
+#endif
+
+#ifndef GL_VERSION_1_5
+#define GL_BUFFER_SIZE                    0x8764
+#define GL_BUFFER_USAGE                   0x8765
+#define GL_QUERY_COUNTER_BITS             0x8864
+#define GL_CURRENT_QUERY                  0x8865
+#define GL_QUERY_RESULT                   0x8866
+#define GL_QUERY_RESULT_AVAILABLE         0x8867
+#define GL_ARRAY_BUFFER                   0x8892
+#define GL_ELEMENT_ARRAY_BUFFER           0x8893
+#define GL_ARRAY_BUFFER_BINDING           0x8894
+#define GL_ELEMENT_ARRAY_BUFFER_BINDING   0x8895
+#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING 0x889F
+#define GL_READ_ONLY                      0x88B8
+#define GL_WRITE_ONLY                     0x88B9
+#define GL_READ_WRITE                     0x88BA
+#define GL_BUFFER_ACCESS                  0x88BB
+#define GL_BUFFER_MAPPED                  0x88BC
+#define GL_BUFFER_MAP_POINTER             0x88BD
+#define GL_STREAM_DRAW                    0x88E0
+#define GL_STREAM_READ                    0x88E1
+#define GL_STREAM_COPY                    0x88E2
+#define GL_STATIC_DRAW                    0x88E4
+#define GL_STATIC_READ                    0x88E5
+#define GL_STATIC_COPY                    0x88E6
+#define GL_DYNAMIC_DRAW                   0x88E8
+#define GL_DYNAMIC_READ                   0x88E9
+#define GL_DYNAMIC_COPY                   0x88EA
+#define GL_SAMPLES_PASSED                 0x8914
+#endif
+
+#ifndef GL_VERSION_1_5_DEPRECATED
+#define GL_VERTEX_ARRAY_BUFFER_BINDING    0x8896
+#define GL_NORMAL_ARRAY_BUFFER_BINDING    0x8897
+#define GL_COLOR_ARRAY_BUFFER_BINDING     0x8898
+#define GL_INDEX_ARRAY_BUFFER_BINDING     0x8899
+#define GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING 0x889A
+#define GL_EDGE_FLAG_ARRAY_BUFFER_BINDING 0x889B
+#define GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING 0x889C
+#define GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING 0x889D
+#define GL_WEIGHT_ARRAY_BUFFER_BINDING    0x889E
+#define GL_FOG_COORD_SRC                  0x8450
+#define GL_FOG_COORD                      0x8451
+#define GL_CURRENT_FOG_COORD              0x8453
+#define GL_FOG_COORD_ARRAY_TYPE           0x8454
+#define GL_FOG_COORD_ARRAY_STRIDE         0x8455
+#define GL_FOG_COORD_ARRAY_POINTER        0x8456
+#define GL_FOG_COORD_ARRAY                0x8457
+#define GL_FOG_COORD_ARRAY_BUFFER_BINDING 0x889D
+#define GL_SRC0_RGB                       0x8580
+#define GL_SRC1_RGB                       0x8581
+#define GL_SRC2_RGB                       0x8582
+#define GL_SRC0_ALPHA                     0x8588
+#define GL_SRC1_ALPHA                     0x8589
+#define GL_SRC2_ALPHA                     0x858A
+#endif
+
+#ifndef GL_VERSION_2_0
+#define GL_BLEND_EQUATION_RGB             0x8009
+#define GL_VERTEX_ATTRIB_ARRAY_ENABLED    0x8622
+#define GL_VERTEX_ATTRIB_ARRAY_SIZE       0x8623
+#define GL_VERTEX_ATTRIB_ARRAY_STRIDE     0x8624
+#define GL_VERTEX_ATTRIB_ARRAY_TYPE       0x8625
+#define GL_CURRENT_VERTEX_ATTRIB          0x8626
+#define GL_VERTEX_PROGRAM_POINT_SIZE      0x8642
+#define GL_VERTEX_ATTRIB_ARRAY_POINTER    0x8645
+#define GL_STENCIL_BACK_FUNC              0x8800
+#define GL_STENCIL_BACK_FAIL              0x8801
+#define GL_STENCIL_BACK_PASS_DEPTH_FAIL   0x8802
+#define GL_STENCIL_BACK_PASS_DEPTH_PASS   0x8803
+#define GL_MAX_DRAW_BUFFERS               0x8824
+#define GL_DRAW_BUFFER0                   0x8825
+#define GL_DRAW_BUFFER1                   0x8826
+#define GL_DRAW_BUFFER2                   0x8827
+#define GL_DRAW_BUFFER3                   0x8828
+#define GL_DRAW_BUFFER4                   0x8829
+#define GL_DRAW_BUFFER5                   0x882A
+#define GL_DRAW_BUFFER6                   0x882B
+#define GL_DRAW_BUFFER7                   0x882C
+#define GL_DRAW_BUFFER8                   0x882D
+#define GL_DRAW_BUFFER9                   0x882E
+#define GL_DRAW_BUFFER10                  0x882F
+#define GL_DRAW_BUFFER11                  0x8830
+#define GL_DRAW_BUFFER12                  0x8831
+#define GL_DRAW_BUFFER13                  0x8832
+#define GL_DRAW_BUFFER14                  0x8833
+#define GL_DRAW_BUFFER15                  0x8834
+#define GL_BLEND_EQUATION_ALPHA           0x883D
+#define GL_MAX_VERTEX_ATTRIBS             0x8869
+#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED 0x886A
+#define GL_MAX_TEXTURE_IMAGE_UNITS        0x8872
+#define GL_FRAGMENT_SHADER                0x8B30
+#define GL_VERTEX_SHADER                  0x8B31
+#define GL_MAX_FRAGMENT_UNIFORM_COMPONENTS 0x8B49
+#define GL_MAX_VERTEX_UNIFORM_COMPONENTS  0x8B4A
+#define GL_MAX_VARYING_FLOATS             0x8B4B
+#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS 0x8B4C
+#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 0x8B4D
+#define GL_SHADER_TYPE                    0x8B4F
+#define GL_FLOAT_VEC2                     0x8B50
+#define GL_FLOAT_VEC3                     0x8B51
+#define GL_FLOAT_VEC4                     0x8B52
+#define GL_INT_VEC2                       0x8B53
+#define GL_INT_VEC3                       0x8B54
+#define GL_INT_VEC4                       0x8B55
+#define GL_BOOL                           0x8B56
+#define GL_BOOL_VEC2                      0x8B57
+#define GL_BOOL_VEC3                      0x8B58
+#define GL_BOOL_VEC4                      0x8B59
+#define GL_FLOAT_MAT2                     0x8B5A
+#define GL_FLOAT_MAT3                     0x8B5B
+#define GL_FLOAT_MAT4                     0x8B5C
+#define GL_SAMPLER_1D                     0x8B5D
+#define GL_SAMPLER_2D                     0x8B5E
+#define GL_SAMPLER_3D                     0x8B5F
+#define GL_SAMPLER_CUBE                   0x8B60
+#define GL_SAMPLER_1D_SHADOW              0x8B61
+#define GL_SAMPLER_2D_SHADOW              0x8B62
+#define GL_DELETE_STATUS                  0x8B80
+#define GL_COMPILE_STATUS                 0x8B81
+#define GL_LINK_STATUS                    0x8B82
+#define GL_VALIDATE_STATUS                0x8B83
+#define GL_INFO_LOG_LENGTH                0x8B84
+#define GL_ATTACHED_SHADERS               0x8B85
+#define GL_ACTIVE_UNIFORMS                0x8B86
+#define GL_ACTIVE_UNIFORM_MAX_LENGTH      0x8B87
+#define GL_SHADER_SOURCE_LENGTH           0x8B88
+#define GL_ACTIVE_ATTRIBUTES              0x8B89
+#define GL_ACTIVE_ATTRIBUTE_MAX_LENGTH    0x8B8A
+#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT 0x8B8B
+#define GL_SHADING_LANGUAGE_VERSION       0x8B8C
+#define GL_CURRENT_PROGRAM                0x8B8D
+#define GL_POINT_SPRITE_COORD_ORIGIN      0x8CA0
+#define GL_LOWER_LEFT                     0x8CA1
+#define GL_UPPER_LEFT                     0x8CA2
+#define GL_STENCIL_BACK_REF               0x8CA3
+#define GL_STENCIL_BACK_VALUE_MASK        0x8CA4
+#define GL_STENCIL_BACK_WRITEMASK         0x8CA5
+#endif
+
+#ifndef GL_VERSION_2_0_DEPRECATED
+#define GL_VERTEX_PROGRAM_TWO_SIDE        0x8643
+#define GL_POINT_SPRITE                   0x8861
+#define GL_COORD_REPLACE                  0x8862
+#define GL_MAX_TEXTURE_COORDS             0x8871
+#endif
+
+#ifndef GL_VERSION_2_1
+#define GL_PIXEL_PACK_BUFFER              0x88EB
+#define GL_PIXEL_UNPACK_BUFFER            0x88EC
+#define GL_PIXEL_PACK_BUFFER_BINDING      0x88ED
+#define GL_PIXEL_UNPACK_BUFFER_BINDING    0x88EF
+#define GL_FLOAT_MAT2x3                   0x8B65
+#define GL_FLOAT_MAT2x4                   0x8B66
+#define GL_FLOAT_MAT3x2                   0x8B67
+#define GL_FLOAT_MAT3x4                   0x8B68
+#define GL_FLOAT_MAT4x2                   0x8B69
+#define GL_FLOAT_MAT4x3                   0x8B6A
+#define GL_SRGB                           0x8C40
+#define GL_SRGB8                          0x8C41
+#define GL_SRGB_ALPHA                     0x8C42
+#define GL_SRGB8_ALPHA8                   0x8C43
+#define GL_COMPRESSED_SRGB                0x8C48
+#define GL_COMPRESSED_SRGB_ALPHA          0x8C49
+#endif
+
+#ifndef GL_VERSION_2_1_DEPRECATED
+#define GL_CURRENT_RASTER_SECONDARY_COLOR 0x845F
+#define GL_SLUMINANCE_ALPHA               0x8C44
+#define GL_SLUMINANCE8_ALPHA8             0x8C45
+#define GL_SLUMINANCE                     0x8C46
+#define GL_SLUMINANCE8                    0x8C47
+#define GL_COMPRESSED_SLUMINANCE          0x8C4A
+#define GL_COMPRESSED_SLUMINANCE_ALPHA    0x8C4B
+#endif
+
+#ifndef GL_VERSION_3_0
+#define GL_COMPARE_REF_TO_TEXTURE         0x884E
+#define GL_CLIP_DISTANCE0                 0x3000
+#define GL_CLIP_DISTANCE1                 0x3001
+#define GL_CLIP_DISTANCE2                 0x3002
+#define GL_CLIP_DISTANCE3                 0x3003
+#define GL_CLIP_DISTANCE4                 0x3004
+#define GL_CLIP_DISTANCE5                 0x3005
+#define GL_CLIP_DISTANCE6                 0x3006
+#define GL_CLIP_DISTANCE7                 0x3007
+#define GL_MAX_CLIP_DISTANCES             0x0D32
+#define GL_MAJOR_VERSION                  0x821B
+#define GL_MINOR_VERSION                  0x821C
+#define GL_NUM_EXTENSIONS                 0x821D
+#define GL_CONTEXT_FLAGS                  0x821E
+#define GL_DEPTH_BUFFER                   0x8223
+#define GL_STENCIL_BUFFER                 0x8224
+#define GL_COMPRESSED_RED                 0x8225
+#define GL_COMPRESSED_RG                  0x8226
+#define GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT 0x0001
+#define GL_RGBA32F                        0x8814
+#define GL_RGB32F                         0x8815
+#define GL_RGBA16F                        0x881A
+#define GL_RGB16F                         0x881B
+#define GL_VERTEX_ATTRIB_ARRAY_INTEGER    0x88FD
+#define GL_MAX_ARRAY_TEXTURE_LAYERS       0x88FF
+#define GL_MIN_PROGRAM_TEXEL_OFFSET       0x8904
+#define GL_MAX_PROGRAM_TEXEL_OFFSET       0x8905
+#define GL_CLAMP_READ_COLOR               0x891C
+#define GL_FIXED_ONLY                     0x891D
+#define GL_MAX_VARYING_COMPONENTS         0x8B4B
+#define GL_TEXTURE_1D_ARRAY               0x8C18
+#define GL_PROXY_TEXTURE_1D_ARRAY         0x8C19
+#define GL_TEXTURE_2D_ARRAY               0x8C1A
+#define GL_PROXY_TEXTURE_2D_ARRAY         0x8C1B
+#define GL_TEXTURE_BINDING_1D_ARRAY       0x8C1C
+#define GL_TEXTURE_BINDING_2D_ARRAY       0x8C1D
+#define GL_R11F_G11F_B10F                 0x8C3A
+#define GL_UNSIGNED_INT_10F_11F_11F_REV   0x8C3B
+#define GL_RGB9_E5                        0x8C3D
+#define GL_UNSIGNED_INT_5_9_9_9_REV       0x8C3E
+#define GL_TEXTURE_SHARED_SIZE            0x8C3F
+#define GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH 0x8C76
+#define GL_TRANSFORM_FEEDBACK_BUFFER_MODE 0x8C7F
+#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS 0x8C80
+#define GL_TRANSFORM_FEEDBACK_VARYINGS    0x8C83
+#define GL_TRANSFORM_FEEDBACK_BUFFER_START 0x8C84
+#define GL_TRANSFORM_FEEDBACK_BUFFER_SIZE 0x8C85
+#define GL_PRIMITIVES_GENERATED           0x8C87
+#define GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN 0x8C88
+#define GL_RASTERIZER_DISCARD             0x8C89
+#define GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS 0x8C8A
+#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS 0x8C8B
+#define GL_INTERLEAVED_ATTRIBS            0x8C8C
+#define GL_SEPARATE_ATTRIBS               0x8C8D
+#define GL_TRANSFORM_FEEDBACK_BUFFER      0x8C8E
+#define GL_TRANSFORM_FEEDBACK_BUFFER_BINDING 0x8C8F
+#define GL_RGBA32UI                       0x8D70
+#define GL_RGB32UI                        0x8D71
+#define GL_RGBA16UI                       0x8D76
+#define GL_RGB16UI                        0x8D77
+#define GL_RGBA8UI                        0x8D7C
+#define GL_RGB8UI                         0x8D7D
+#define GL_RGBA32I                        0x8D82
+#define GL_RGB32I                         0x8D83
+#define GL_RGBA16I                        0x8D88
+#define GL_RGB16I                         0x8D89
+#define GL_RGBA8I                         0x8D8E
+#define GL_RGB8I                          0x8D8F
+#define GL_RED_INTEGER                    0x8D94
+#define GL_GREEN_INTEGER                  0x8D95
+#define GL_BLUE_INTEGER                   0x8D96
+#define GL_RGB_INTEGER                    0x8D98
+#define GL_RGBA_INTEGER                   0x8D99
+#define GL_BGR_INTEGER                    0x8D9A
+#define GL_BGRA_INTEGER                   0x8D9B
+#define GL_SAMPLER_1D_ARRAY               0x8DC0
+#define GL_SAMPLER_2D_ARRAY               0x8DC1
+#define GL_SAMPLER_1D_ARRAY_SHADOW        0x8DC3
+#define GL_SAMPLER_2D_ARRAY_SHADOW        0x8DC4
+#define GL_SAMPLER_CUBE_SHADOW            0x8DC5
+#define GL_UNSIGNED_INT_VEC2              0x8DC6
+#define GL_UNSIGNED_INT_VEC3              0x8DC7
+#define GL_UNSIGNED_INT_VEC4              0x8DC8
+#define GL_INT_SAMPLER_1D                 0x8DC9
+#define GL_INT_SAMPLER_2D                 0x8DCA
+#define GL_INT_SAMPLER_3D                 0x8DCB
+#define GL_INT_SAMPLER_CUBE               0x8DCC
+#define GL_INT_SAMPLER_1D_ARRAY           0x8DCE
+#define GL_INT_SAMPLER_2D_ARRAY           0x8DCF
+#define GL_UNSIGNED_INT_SAMPLER_1D        0x8DD1
+#define GL_UNSIGNED_INT_SAMPLER_2D        0x8DD2
+#define GL_UNSIGNED_INT_SAMPLER_3D        0x8DD3
+#define GL_UNSIGNED_INT_SAMPLER_CUBE      0x8DD4
+#define GL_UNSIGNED_INT_SAMPLER_1D_ARRAY  0x8DD6
+#define GL_UNSIGNED_INT_SAMPLER_2D_ARRAY  0x8DD7
+#define GL_QUERY_WAIT                     0x8E13
+#define GL_QUERY_NO_WAIT                  0x8E14
+#define GL_QUERY_BY_REGION_WAIT           0x8E15
+#define GL_QUERY_BY_REGION_NO_WAIT        0x8E16
+#define GL_BUFFER_ACCESS_FLAGS            0x911F
+#define GL_BUFFER_MAP_LENGTH              0x9120
+#define GL_BUFFER_MAP_OFFSET              0x9121
+/* Reuse tokens from ARB_depth_buffer_float */
+/* reuse GL_DEPTH_COMPONENT32F */
+/* reuse GL_DEPTH32F_STENCIL8 */
+/* reuse GL_FLOAT_32_UNSIGNED_INT_24_8_REV */
+/* Reuse tokens from ARB_framebuffer_object */
+/* reuse GL_INVALID_FRAMEBUFFER_OPERATION */
+/* reuse GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING */
+/* reuse GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE */
+/* reuse GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE */
+/* reuse GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE */
+/* reuse GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE */
+/* reuse GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE */
+/* reuse GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE */
+/* reuse GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE */
+/* reuse GL_FRAMEBUFFER_DEFAULT */
+/* reuse GL_FRAMEBUFFER_UNDEFINED */
+/* reuse GL_DEPTH_STENCIL_ATTACHMENT */
+/* reuse GL_INDEX */
+/* reuse GL_MAX_RENDERBUFFER_SIZE */
+/* reuse GL_DEPTH_STENCIL */
+/* reuse GL_UNSIGNED_INT_24_8 */
+/* reuse GL_DEPTH24_STENCIL8 */
+/* reuse GL_TEXTURE_STENCIL_SIZE */
+/* reuse GL_TEXTURE_RED_TYPE */
+/* reuse GL_TEXTURE_GREEN_TYPE */
+/* reuse GL_TEXTURE_BLUE_TYPE */
+/* reuse GL_TEXTURE_ALPHA_TYPE */
+/* reuse GL_TEXTURE_DEPTH_TYPE */
+/* reuse GL_UNSIGNED_NORMALIZED */
+/* reuse GL_FRAMEBUFFER_BINDING */
+/* reuse GL_DRAW_FRAMEBUFFER_BINDING */
+/* reuse GL_RENDERBUFFER_BINDING */
+/* reuse GL_READ_FRAMEBUFFER */
+/* reuse GL_DRAW_FRAMEBUFFER */
+/* reuse GL_READ_FRAMEBUFFER_BINDING */
+/* reuse GL_RENDERBUFFER_SAMPLES */
+/* reuse GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE */
+/* reuse GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME */
+/* reuse GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL */
+/* reuse GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE */
+/* reuse GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER */
+/* reuse GL_FRAMEBUFFER_COMPLETE */
+/* reuse GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT */
+/* reuse GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT */
+/* reuse GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER */
+/* reuse GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER */
+/* reuse GL_FRAMEBUFFER_UNSUPPORTED */
+/* reuse GL_MAX_COLOR_ATTACHMENTS */
+/* reuse GL_COLOR_ATTACHMENT0 */
+/* reuse GL_COLOR_ATTACHMENT1 */
+/* reuse GL_COLOR_ATTACHMENT2 */
+/* reuse GL_COLOR_ATTACHMENT3 */
+/* reuse GL_COLOR_ATTACHMENT4 */
+/* reuse GL_COLOR_ATTACHMENT5 */
+/* reuse GL_COLOR_ATTACHMENT6 */
+/* reuse GL_COLOR_ATTACHMENT7 */
+/* reuse GL_COLOR_ATTACHMENT8 */
+/* reuse GL_COLOR_ATTACHMENT9 */
+/* reuse GL_COLOR_ATTACHMENT10 */
+/* reuse GL_COLOR_ATTACHMENT11 */
+/* reuse GL_COLOR_ATTACHMENT12 */
+/* reuse GL_COLOR_ATTACHMENT13 */
+/* reuse GL_COLOR_ATTACHMENT14 */
+/* reuse GL_COLOR_ATTACHMENT15 */
+/* reuse GL_DEPTH_ATTACHMENT */
+/* reuse GL_STENCIL_ATTACHMENT */
+/* reuse GL_FRAMEBUFFER */
+/* reuse GL_RENDERBUFFER */
+/* reuse GL_RENDERBUFFER_WIDTH */
+/* reuse GL_RENDERBUFFER_HEIGHT */
+/* reuse GL_RENDERBUFFER_INTERNAL_FORMAT */
+/* reuse GL_STENCIL_INDEX1 */
+/* reuse GL_STENCIL_INDEX4 */
+/* reuse GL_STENCIL_INDEX8 */
+/* reuse GL_STENCIL_INDEX16 */
+/* reuse GL_RENDERBUFFER_RED_SIZE */
+/* reuse GL_RENDERBUFFER_GREEN_SIZE */
+/* reuse GL_RENDERBUFFER_BLUE_SIZE */
+/* reuse GL_RENDERBUFFER_ALPHA_SIZE */
+/* reuse GL_RENDERBUFFER_DEPTH_SIZE */
+/* reuse GL_RENDERBUFFER_STENCIL_SIZE */
+/* reuse GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE */
+/* reuse GL_MAX_SAMPLES */
+/* Reuse tokens from ARB_framebuffer_sRGB */
+/* reuse GL_FRAMEBUFFER_SRGB */
+/* Reuse tokens from ARB_half_float_vertex */
+/* reuse GL_HALF_FLOAT */
+/* Reuse tokens from ARB_map_buffer_range */
+/* reuse GL_MAP_READ_BIT */
+/* reuse GL_MAP_WRITE_BIT */
+/* reuse GL_MAP_INVALIDATE_RANGE_BIT */
+/* reuse GL_MAP_INVALIDATE_BUFFER_BIT */
+/* reuse GL_MAP_FLUSH_EXPLICIT_BIT */
+/* reuse GL_MAP_UNSYNCHRONIZED_BIT */
+/* Reuse tokens from ARB_texture_compression_rgtc */
+/* reuse GL_COMPRESSED_RED_RGTC1 */
+/* reuse GL_COMPRESSED_SIGNED_RED_RGTC1 */
+/* reuse GL_COMPRESSED_RG_RGTC2 */
+/* reuse GL_COMPRESSED_SIGNED_RG_RGTC2 */
+/* Reuse tokens from ARB_texture_rg */
+/* reuse GL_RG */
+/* reuse GL_RG_INTEGER */
+/* reuse GL_R8 */
+/* reuse GL_R16 */
+/* reuse GL_RG8 */
+/* reuse GL_RG16 */
+/* reuse GL_R16F */
+/* reuse GL_R32F */
+/* reuse GL_RG16F */
+/* reuse GL_RG32F */
+/* reuse GL_R8I */
+/* reuse GL_R8UI */
+/* reuse GL_R16I */
+/* reuse GL_R16UI */
+/* reuse GL_R32I */
+/* reuse GL_R32UI */
+/* reuse GL_RG8I */
+/* reuse GL_RG8UI */
+/* reuse GL_RG16I */
+/* reuse GL_RG16UI */
+/* reuse GL_RG32I */
+/* reuse GL_RG32UI */
+/* Reuse tokens from ARB_vertex_array_object */
+/* reuse GL_VERTEX_ARRAY_BINDING */
+#endif
+
+#ifndef GL_VERSION_3_0_DEPRECATED
+#define GL_CLAMP_VERTEX_COLOR             0x891A
+#define GL_CLAMP_FRAGMENT_COLOR           0x891B
+#define GL_ALPHA_INTEGER                  0x8D97
+/* Reuse tokens from ARB_framebuffer_object */
+/* reuse GL_TEXTURE_LUMINANCE_TYPE */
+/* reuse GL_TEXTURE_INTENSITY_TYPE */
+#endif
+
+#ifndef GL_VERSION_3_1
+#define GL_SAMPLER_2D_RECT                0x8B63
+#define GL_SAMPLER_2D_RECT_SHADOW         0x8B64
+#define GL_SAMPLER_BUFFER                 0x8DC2
+#define GL_INT_SAMPLER_2D_RECT            0x8DCD
+#define GL_INT_SAMPLER_BUFFER             0x8DD0
+#define GL_UNSIGNED_INT_SAMPLER_2D_RECT   0x8DD5
+#define GL_UNSIGNED_INT_SAMPLER_BUFFER    0x8DD8
+#define GL_TEXTURE_BUFFER                 0x8C2A
+#define GL_MAX_TEXTURE_BUFFER_SIZE        0x8C2B
+#define GL_TEXTURE_BINDING_BUFFER         0x8C2C
+#define GL_TEXTURE_BUFFER_DATA_STORE_BINDING 0x8C2D
+#define GL_TEXTURE_BUFFER_FORMAT          0x8C2E
+#define GL_TEXTURE_RECTANGLE              0x84F5
+#define GL_TEXTURE_BINDING_RECTANGLE      0x84F6
+#define GL_PROXY_TEXTURE_RECTANGLE        0x84F7
+#define GL_MAX_RECTANGLE_TEXTURE_SIZE     0x84F8
+#define GL_RED_SNORM                      0x8F90
+#define GL_RG_SNORM                       0x8F91
+#define GL_RGB_SNORM                      0x8F92
+#define GL_RGBA_SNORM                     0x8F93
+#define GL_R8_SNORM                       0x8F94
+#define GL_RG8_SNORM                      0x8F95
+#define GL_RGB8_SNORM                     0x8F96
+#define GL_RGBA8_SNORM                    0x8F97
+#define GL_R16_SNORM                      0x8F98
+#define GL_RG16_SNORM                     0x8F99
+#define GL_RGB16_SNORM                    0x8F9A
+#define GL_RGBA16_SNORM                   0x8F9B
+#define GL_SIGNED_NORMALIZED              0x8F9C
+#define GL_PRIMITIVE_RESTART              0x8F9D
+#define GL_PRIMITIVE_RESTART_INDEX        0x8F9E
+/* Reuse tokens from ARB_copy_buffer */
+/* reuse GL_COPY_READ_BUFFER */
+/* reuse GL_COPY_WRITE_BUFFER */
+/* Reuse tokens from ARB_draw_instanced (none) */
+/* Reuse tokens from ARB_uniform_buffer_object */
+/* reuse GL_UNIFORM_BUFFER */
+/* reuse GL_UNIFORM_BUFFER_BINDING */
+/* reuse GL_UNIFORM_BUFFER_START */
+/* reuse GL_UNIFORM_BUFFER_SIZE */
+/* reuse GL_MAX_VERTEX_UNIFORM_BLOCKS */
+/* reuse GL_MAX_FRAGMENT_UNIFORM_BLOCKS */
+/* reuse GL_MAX_COMBINED_UNIFORM_BLOCKS */
+/* reuse GL_MAX_UNIFORM_BUFFER_BINDINGS */
+/* reuse GL_MAX_UNIFORM_BLOCK_SIZE */
+/* reuse GL_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS */
+/* reuse GL_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS */
+/* reuse GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT */
+/* reuse GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH */
+/* reuse GL_ACTIVE_UNIFORM_BLOCKS */
+/* reuse GL_UNIFORM_TYPE */
+/* reuse GL_UNIFORM_SIZE */
+/* reuse GL_UNIFORM_NAME_LENGTH */
+/* reuse GL_UNIFORM_BLOCK_INDEX */
+/* reuse GL_UNIFORM_OFFSET */
+/* reuse GL_UNIFORM_ARRAY_STRIDE */
+/* reuse GL_UNIFORM_MATRIX_STRIDE */
+/* reuse GL_UNIFORM_IS_ROW_MAJOR */
+/* reuse GL_UNIFORM_BLOCK_BINDING */
+/* reuse GL_UNIFORM_BLOCK_DATA_SIZE */
+/* reuse GL_UNIFORM_BLOCK_NAME_LENGTH */
+/* reuse GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS */
+/* reuse GL_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES */
+/* reuse GL_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER */
+/* reuse GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER */
+/* reuse GL_INVALID_INDEX */
+#endif
+
+#ifndef GL_VERSION_3_2
+#define GL_CONTEXT_CORE_PROFILE_BIT       0x00000001
+#define GL_CONTEXT_COMPATIBILITY_PROFILE_BIT 0x00000002
+#define GL_LINES_ADJACENCY                0x000A
+#define GL_LINE_STRIP_ADJACENCY           0x000B
+#define GL_TRIANGLES_ADJACENCY            0x000C
+#define GL_TRIANGLE_STRIP_ADJACENCY       0x000D
+#define GL_PROGRAM_POINT_SIZE             0x8642
+#define GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS 0x8C29
+#define GL_FRAMEBUFFER_ATTACHMENT_LAYERED 0x8DA7
+#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS 0x8DA8
+#define GL_GEOMETRY_SHADER                0x8DD9
+#define GL_GEOMETRY_VERTICES_OUT          0x8916
+#define GL_GEOMETRY_INPUT_TYPE            0x8917
+#define GL_GEOMETRY_OUTPUT_TYPE           0x8918
+#define GL_MAX_GEOMETRY_UNIFORM_COMPONENTS 0x8DDF
+#define GL_MAX_GEOMETRY_OUTPUT_VERTICES   0x8DE0
+#define GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS 0x8DE1
+#define GL_MAX_VERTEX_OUTPUT_COMPONENTS   0x9122
+#define GL_MAX_GEOMETRY_INPUT_COMPONENTS  0x9123
+#define GL_MAX_GEOMETRY_OUTPUT_COMPONENTS 0x9124
+#define GL_MAX_FRAGMENT_INPUT_COMPONENTS  0x9125
+#define GL_CONTEXT_PROFILE_MASK           0x9126
+/* reuse GL_MAX_VARYING_COMPONENTS */
+/* reuse GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER */
+/* Reuse tokens from ARB_depth_clamp */
+/* reuse GL_DEPTH_CLAMP */
+/* Reuse tokens from ARB_draw_elements_base_vertex (none) */
+/* Reuse tokens from ARB_fragment_coord_conventions (none) */
+/* Reuse tokens from ARB_provoking_vertex */
+/* reuse GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION */
+/* reuse GL_FIRST_VERTEX_CONVENTION */
+/* reuse GL_LAST_VERTEX_CONVENTION */
+/* reuse GL_PROVOKING_VERTEX */
+/* Reuse tokens from ARB_seamless_cube_map */
+/* reuse GL_TEXTURE_CUBE_MAP_SEAMLESS */
+/* Reuse tokens from ARB_sync */
+/* reuse GL_MAX_SERVER_WAIT_TIMEOUT */
+/* reuse GL_OBJECT_TYPE */
+/* reuse GL_SYNC_CONDITION */
+/* reuse GL_SYNC_STATUS */
+/* reuse GL_SYNC_FLAGS */
+/* reuse GL_SYNC_FENCE */
+/* reuse GL_SYNC_GPU_COMMANDS_COMPLETE */
+/* reuse GL_UNSIGNALED */
+/* reuse GL_SIGNALED */
+/* reuse GL_ALREADY_SIGNALED */
+/* reuse GL_TIMEOUT_EXPIRED */
+/* reuse GL_CONDITION_SATISFIED */
+/* reuse GL_WAIT_FAILED */
+/* reuse GL_TIMEOUT_IGNORED */
+/* reuse GL_SYNC_FLUSH_COMMANDS_BIT */
+/* reuse GL_TIMEOUT_IGNORED */
+/* Reuse tokens from ARB_texture_multisample */
+/* reuse GL_SAMPLE_POSITION */
+/* reuse GL_SAMPLE_MASK */
+/* reuse GL_SAMPLE_MASK_VALUE */
+/* reuse GL_MAX_SAMPLE_MASK_WORDS */
+/* reuse GL_TEXTURE_2D_MULTISAMPLE */
+/* reuse GL_PROXY_TEXTURE_2D_MULTISAMPLE */
+/* reuse GL_TEXTURE_2D_MULTISAMPLE_ARRAY */
+/* reuse GL_PROXY_TEXTURE_2D_MULTISAMPLE_ARRAY */
+/* reuse GL_TEXTURE_BINDING_2D_MULTISAMPLE */
+/* reuse GL_TEXTURE_BINDING_2D_MULTISAMPLE_ARRAY */
+/* reuse GL_TEXTURE_SAMPLES */
+/* reuse GL_TEXTURE_FIXED_SAMPLE_LOCATIONS */
+/* reuse GL_SAMPLER_2D_MULTISAMPLE */
+/* reuse GL_INT_SAMPLER_2D_MULTISAMPLE */
+/* reuse GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE */
+/* reuse GL_SAMPLER_2D_MULTISAMPLE_ARRAY */
+/* reuse GL_INT_SAMPLER_2D_MULTISAMPLE_ARRAY */
+/* reuse GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY */
+/* reuse GL_MAX_COLOR_TEXTURE_SAMPLES */
+/* reuse GL_MAX_DEPTH_TEXTURE_SAMPLES */
+/* reuse GL_MAX_INTEGER_SAMPLES */
+/* Don't need to reuse tokens from ARB_vertex_array_bgra since they're already in 1.2 core */
+#endif
+
+#ifndef GL_VERSION_3_3
+#define GL_VERTEX_ATTRIB_ARRAY_DIVISOR    0x88FE
+/* Reuse tokens from ARB_blend_func_extended */
+/* reuse GL_SRC1_COLOR */
+/* reuse GL_ONE_MINUS_SRC1_COLOR */
+/* reuse GL_ONE_MINUS_SRC1_ALPHA */
+/* reuse GL_MAX_DUAL_SOURCE_DRAW_BUFFERS */
+/* Reuse tokens from ARB_explicit_attrib_location (none) */
+/* Reuse tokens from ARB_occlusion_query2 */
+/* reuse GL_ANY_SAMPLES_PASSED */
+/* Reuse tokens from ARB_sampler_objects */
+/* reuse GL_SAMPLER_BINDING */
+/* Reuse tokens from ARB_shader_bit_encoding (none) */
+/* Reuse tokens from ARB_texture_rgb10_a2ui */
+/* reuse GL_RGB10_A2UI */
+/* Reuse tokens from ARB_texture_swizzle */
+/* reuse GL_TEXTURE_SWIZZLE_R */
+/* reuse GL_TEXTURE_SWIZZLE_G */
+/* reuse GL_TEXTURE_SWIZZLE_B */
+/* reuse GL_TEXTURE_SWIZZLE_A */
+/* reuse GL_TEXTURE_SWIZZLE_RGBA */
+/* Reuse tokens from ARB_timer_query */
+/* reuse GL_TIME_ELAPSED */
+/* reuse GL_TIMESTAMP */
+/* Reuse tokens from ARB_vertex_type_2_10_10_10_rev */
+/* reuse GL_INT_2_10_10_10_REV */
+#endif
+
+#ifndef GL_VERSION_4_0
+#define GL_SAMPLE_SHADING                 0x8C36
+#define GL_MIN_SAMPLE_SHADING_VALUE       0x8C37
+#define GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET 0x8E5E
+#define GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET 0x8E5F
+#define GL_TEXTURE_CUBE_MAP_ARRAY         0x9009
+#define GL_TEXTURE_BINDING_CUBE_MAP_ARRAY 0x900A
+#define GL_PROXY_TEXTURE_CUBE_MAP_ARRAY   0x900B
+#define GL_SAMPLER_CUBE_MAP_ARRAY         0x900C
+#define GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW  0x900D
+#define GL_INT_SAMPLER_CUBE_MAP_ARRAY     0x900E
+#define GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY 0x900F
+/* Reuse tokens from ARB_texture_query_lod (none) */
+/* Reuse tokens from ARB_draw_buffers_blend (none) */
+/* Reuse tokens from ARB_draw_indirect */
+/* reuse GL_DRAW_INDIRECT_BUFFER */
+/* reuse GL_DRAW_INDIRECT_BUFFER_BINDING */
+/* Reuse tokens from ARB_gpu_shader5 */
+/* reuse GL_GEOMETRY_SHADER_INVOCATIONS */
+/* reuse GL_MAX_GEOMETRY_SHADER_INVOCATIONS */
+/* reuse GL_MIN_FRAGMENT_INTERPOLATION_OFFSET */
+/* reuse GL_MAX_FRAGMENT_INTERPOLATION_OFFSET */
+/* reuse GL_FRAGMENT_INTERPOLATION_OFFSET_BITS */
+/* reuse GL_MAX_VERTEX_STREAMS */
+/* Reuse tokens from ARB_gpu_shader_fp64 */
+/* reuse GL_DOUBLE_VEC2 */
+/* reuse GL_DOUBLE_VEC3 */
+/* reuse GL_DOUBLE_VEC4 */
+/* reuse GL_DOUBLE_MAT2 */
+/* reuse GL_DOUBLE_MAT3 */
+/* reuse GL_DOUBLE_MAT4 */
+/* reuse GL_DOUBLE_MAT2x3 */
+/* reuse GL_DOUBLE_MAT2x4 */
+/* reuse GL_DOUBLE_MAT3x2 */
+/* reuse GL_DOUBLE_MAT3x4 */
+/* reuse GL_DOUBLE_MAT4x2 */
+/* reuse GL_DOUBLE_MAT4x3 */
+/* Reuse tokens from ARB_shader_subroutine */
+/* reuse GL_ACTIVE_SUBROUTINES */
+/* reuse GL_ACTIVE_SUBROUTINE_UNIFORMS */
+/* reuse GL_ACTIVE_SUBROUTINE_UNIFORM_LOCATIONS */
+/* reuse GL_ACTIVE_SUBROUTINE_MAX_LENGTH */
+/* reuse GL_ACTIVE_SUBROUTINE_UNIFORM_MAX_LENGTH */
+/* reuse GL_MAX_SUBROUTINES */
+/* reuse GL_MAX_SUBROUTINE_UNIFORM_LOCATIONS */
+/* reuse GL_NUM_COMPATIBLE_SUBROUTINES */
+/* reuse GL_COMPATIBLE_SUBROUTINES */
+/* Reuse tokens from ARB_tessellation_shader */
+/* reuse GL_PATCHES */
+/* reuse GL_PATCH_VERTICES */
+/* reuse GL_PATCH_DEFAULT_INNER_LEVEL */
+/* reuse GL_PATCH_DEFAULT_OUTER_LEVEL */
+/* reuse GL_TESS_CONTROL_OUTPUT_VERTICES */
+/* reuse GL_TESS_GEN_MODE */
+/* reuse GL_TESS_GEN_SPACING */
+/* reuse GL_TESS_GEN_VERTEX_ORDER */
+/* reuse GL_TESS_GEN_POINT_MODE */
+/* reuse GL_ISOLINES */
+/* reuse GL_FRACTIONAL_ODD */
+/* reuse GL_FRACTIONAL_EVEN */
+/* reuse GL_MAX_PATCH_VERTICES */
+/* reuse GL_MAX_TESS_GEN_LEVEL */
+/* reuse GL_MAX_TESS_CONTROL_UNIFORM_COMPONENTS */
+/* reuse GL_MAX_TESS_EVALUATION_UNIFORM_COMPONENTS */
+/* reuse GL_MAX_TESS_CONTROL_TEXTURE_IMAGE_UNITS */
+/* reuse GL_MAX_TESS_EVALUATION_TEXTURE_IMAGE_UNITS */
+/* reuse GL_MAX_TESS_CONTROL_OUTPUT_COMPONENTS */
+/* reuse GL_MAX_TESS_PATCH_COMPONENTS */
+/* reuse GL_MAX_TESS_CONTROL_TOTAL_OUTPUT_COMPONENTS */
+/* reuse GL_MAX_TESS_EVALUATION_OUTPUT_COMPONENTS */
+/* reuse GL_MAX_TESS_CONTROL_UNIFORM_BLOCKS */
+/* reuse GL_MAX_TESS_EVALUATION_UNIFORM_BLOCKS */
+/* reuse GL_MAX_TESS_CONTROL_INPUT_COMPONENTS */
+/* reuse GL_MAX_TESS_EVALUATION_INPUT_COMPONENTS */
+/* reuse GL_MAX_COMBINED_TESS_CONTROL_UNIFORM_COMPONENTS */
+/* reuse GL_MAX_COMBINED_TESS_EVALUATION_UNIFORM_COMPONENTS */
+/* reuse GL_UNIFORM_BLOCK_REFERENCED_BY_TESS_CONTROL_SHADER */
+/* reuse GL_UNIFORM_BLOCK_REFERENCED_BY_TESS_EVALUATION_SHADER */
+/* reuse GL_TESS_EVALUATION_SHADER */
+/* reuse GL_TESS_CONTROL_SHADER */
+/* Reuse tokens from ARB_texture_buffer_object_rgb32 (none) */
+/* Reuse tokens from ARB_transform_feedback2 */
+/* reuse GL_TRANSFORM_FEEDBACK */
+/* reuse GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED */
+/* reuse GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE */
+/* reuse GL_TRANSFORM_FEEDBACK_BINDING */
+/* Reuse tokens from ARB_transform_feedback3 */
+/* reuse GL_MAX_TRANSFORM_FEEDBACK_BUFFERS */
+/* reuse GL_MAX_VERTEX_STREAMS */
+#endif
+
+#ifndef GL_VERSION_4_1
+/* Reuse tokens from ARB_ES2_compatibility */
+/* reuse GL_FIXED */
+/* reuse GL_IMPLEMENTATION_COLOR_READ_TYPE */
+/* reuse GL_IMPLEMENTATION_COLOR_READ_FORMAT */
+/* reuse GL_LOW_FLOAT */
+/* reuse GL_MEDIUM_FLOAT */
+/* reuse GL_HIGH_FLOAT */
+/* reuse GL_LOW_INT */
+/* reuse GL_MEDIUM_INT */
+/* reuse GL_HIGH_INT */
+/* reuse GL_SHADER_COMPILER */
+/* reuse GL_NUM_SHADER_BINARY_FORMATS */
+/* reuse GL_MAX_VERTEX_UNIFORM_VECTORS */
+/* reuse GL_MAX_VARYING_VECTORS */
+/* reuse GL_MAX_FRAGMENT_UNIFORM_VECTORS */
+/* Reuse tokens from ARB_get_program_binary */
+/* reuse GL_PROGRAM_BINARY_RETRIEVABLE_HINT */
+/* reuse GL_PROGRAM_BINARY_LENGTH */
+/* reuse GL_NUM_PROGRAM_BINARY_FORMATS */
+/* reuse GL_PROGRAM_BINARY_FORMATS */
+/* Reuse tokens from ARB_separate_shader_objects */
+/* reuse GL_VERTEX_SHADER_BIT */
+/* reuse GL_FRAGMENT_SHADER_BIT */
+/* reuse GL_GEOMETRY_SHADER_BIT */
+/* reuse GL_TESS_CONTROL_SHADER_BIT */
+/* reuse GL_TESS_EVALUATION_SHADER_BIT */
+/* reuse GL_ALL_SHADER_BITS */
+/* reuse GL_PROGRAM_SEPARABLE */
+/* reuse GL_ACTIVE_PROGRAM */
+/* reuse GL_PROGRAM_PIPELINE_BINDING */
+/* Reuse tokens from ARB_shader_precision (none) */
+/* Reuse tokens from ARB_vertex_attrib_64bit - all are in GL 3.0 and 4.0 already */
+/* Reuse tokens from ARB_viewport_array - some are in GL 1.1 and ARB_provoking_vertex already */
+/* reuse GL_MAX_VIEWPORTS */
+/* reuse GL_VIEWPORT_SUBPIXEL_BITS */
+/* reuse GL_VIEWPORT_BOUNDS_RANGE */
+/* reuse GL_LAYER_PROVOKING_VERTEX */
+/* reuse GL_VIEWPORT_INDEX_PROVOKING_VERTEX */
+/* reuse GL_UNDEFINED_VERTEX */
+#endif
+
+#ifndef GL_ARB_multitexture
+#define GL_TEXTURE0_ARB                   0x84C0
+#define GL_TEXTURE1_ARB                   0x84C1
+#define GL_TEXTURE2_ARB                   0x84C2
+#define GL_TEXTURE3_ARB                   0x84C3
+#define GL_TEXTURE4_ARB                   0x84C4
+#define GL_TEXTURE5_ARB                   0x84C5
+#define GL_TEXTURE6_ARB                   0x84C6
+#define GL_TEXTURE7_ARB                   0x84C7
+#define GL_TEXTURE8_ARB                   0x84C8
+#define GL_TEXTURE9_ARB                   0x84C9
+#define GL_TEXTURE10_ARB                  0x84CA
+#define GL_TEXTURE11_ARB                  0x84CB
+#define GL_TEXTURE12_ARB                  0x84CC
+#define GL_TEXTURE13_ARB                  0x84CD
+#define GL_TEXTURE14_ARB                  0x84CE
+#define GL_TEXTURE15_ARB                  0x84CF
+#define GL_TEXTURE16_ARB                  0x84D0
+#define GL_TEXTURE17_ARB                  0x84D1
+#define GL_TEXTURE18_ARB                  0x84D2
+#define GL_TEXTURE19_ARB                  0x84D3
+#define GL_TEXTURE20_ARB                  0x84D4
+#define GL_TEXTURE21_ARB                  0x84D5
+#define GL_TEXTURE22_ARB                  0x84D6
+#define GL_TEXTURE23_ARB                  0x84D7
+#define GL_TEXTURE24_ARB                  0x84D8
+#define GL_TEXTURE25_ARB                  0x84D9
+#define GL_TEXTURE26_ARB                  0x84DA
+#define GL_TEXTURE27_ARB                  0x84DB
+#define GL_TEXTURE28_ARB                  0x84DC
+#define GL_TEXTURE29_ARB                  0x84DD
+#define GL_TEXTURE30_ARB                  0x84DE
+#define GL_TEXTURE31_ARB                  0x84DF
+#define GL_ACTIVE_TEXTURE_ARB             0x84E0
+#define GL_CLIENT_ACTIVE_TEXTURE_ARB      0x84E1
+#define GL_MAX_TEXTURE_UNITS_ARB          0x84E2
+#endif
+
+#ifndef GL_ARB_transpose_matrix
+#define GL_TRANSPOSE_MODELVIEW_MATRIX_ARB 0x84E3
+#define GL_TRANSPOSE_PROJECTION_MATRIX_ARB 0x84E4
+#define GL_TRANSPOSE_TEXTURE_MATRIX_ARB   0x84E5
+#define GL_TRANSPOSE_COLOR_MATRIX_ARB     0x84E6
+#endif
+
+#ifndef GL_ARB_multisample
+#define GL_MULTISAMPLE_ARB                0x809D
+#define GL_SAMPLE_ALPHA_TO_COVERAGE_ARB   0x809E
+#define GL_SAMPLE_ALPHA_TO_ONE_ARB        0x809F
+#define GL_SAMPLE_COVERAGE_ARB            0x80A0
+#define GL_SAMPLE_BUFFERS_ARB             0x80A8
+#define GL_SAMPLES_ARB                    0x80A9
+#define GL_SAMPLE_COVERAGE_VALUE_ARB      0x80AA
+#define GL_SAMPLE_COVERAGE_INVERT_ARB     0x80AB
+#define GL_MULTISAMPLE_BIT_ARB            0x20000000
+#endif
+
+#ifndef GL_ARB_texture_env_add
+#endif
+
+#ifndef GL_ARB_texture_cube_map
+#define GL_NORMAL_MAP_ARB                 0x8511
+#define GL_REFLECTION_MAP_ARB             0x8512
+#define GL_TEXTURE_CUBE_MAP_ARB           0x8513
+#define GL_TEXTURE_BINDING_CUBE_MAP_ARB   0x8514
+#define GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB 0x8515
+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB 0x8516
+#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB 0x8517
+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB 0x8518
+#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB 0x8519
+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB 0x851A
+#define GL_PROXY_TEXTURE_CUBE_MAP_ARB     0x851B
+#define GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB  0x851C
+#endif
+
+#ifndef GL_ARB_texture_compression
+#define GL_COMPRESSED_ALPHA_ARB           0x84E9
+#define GL_COMPRESSED_LUMINANCE_ARB       0x84EA
+#define GL_COMPRESSED_LUMINANCE_ALPHA_ARB 0x84EB
+#define GL_COMPRESSED_INTENSITY_ARB       0x84EC
+#define GL_COMPRESSED_RGB_ARB             0x84ED
+#define GL_COMPRESSED_RGBA_ARB            0x84EE
+#define GL_TEXTURE_COMPRESSION_HINT_ARB   0x84EF
+#define GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB 0x86A0
+#define GL_TEXTURE_COMPRESSED_ARB         0x86A1
+#define GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB 0x86A2
+#define GL_COMPRESSED_TEXTURE_FORMATS_ARB 0x86A3
+#endif
+
+#ifndef GL_ARB_texture_border_clamp
+#define GL_CLAMP_TO_BORDER_ARB            0x812D
+#endif
+
+#ifndef GL_ARB_point_parameters
+#define GL_POINT_SIZE_MIN_ARB             0x8126
+#define GL_POINT_SIZE_MAX_ARB             0x8127
+#define GL_POINT_FADE_THRESHOLD_SIZE_ARB  0x8128
+#define GL_POINT_DISTANCE_ATTENUATION_ARB 0x8129
+#endif
+
+#ifndef GL_ARB_vertex_blend
+#define GL_MAX_VERTEX_UNITS_ARB           0x86A4
+#define GL_ACTIVE_VERTEX_UNITS_ARB        0x86A5
+#define GL_WEIGHT_SUM_UNITY_ARB           0x86A6
+#define GL_VERTEX_BLEND_ARB               0x86A7
+#define GL_CURRENT_WEIGHT_ARB             0x86A8
+#define GL_WEIGHT_ARRAY_TYPE_ARB          0x86A9
+#define GL_WEIGHT_ARRAY_STRIDE_ARB        0x86AA
+#define GL_WEIGHT_ARRAY_SIZE_ARB          0x86AB
+#define GL_WEIGHT_ARRAY_POINTER_ARB       0x86AC
+#define GL_WEIGHT_ARRAY_ARB               0x86AD
+#define GL_MODELVIEW0_ARB                 0x1700
+#define GL_MODELVIEW1_ARB                 0x850A
+#define GL_MODELVIEW2_ARB                 0x8722
+#define GL_MODELVIEW3_ARB                 0x8723
+#define GL_MODELVIEW4_ARB                 0x8724
+#define GL_MODELVIEW5_ARB                 0x8725
+#define GL_MODELVIEW6_ARB                 0x8726
+#define GL_MODELVIEW7_ARB                 0x8727
+#define GL_MODELVIEW8_ARB                 0x8728
+#define GL_MODELVIEW9_ARB                 0x8729
+#define GL_MODELVIEW10_ARB                0x872A
+#define GL_MODELVIEW11_ARB                0x872B
+#define GL_MODELVIEW12_ARB                0x872C
+#define GL_MODELVIEW13_ARB                0x872D
+#define GL_MODELVIEW14_ARB                0x872E
+#define GL_MODELVIEW15_ARB                0x872F
+#define GL_MODELVIEW16_ARB                0x8730
+#define GL_MODELVIEW17_ARB                0x8731
+#define GL_MODELVIEW18_ARB                0x8732
+#define GL_MODELVIEW19_ARB                0x8733
+#define GL_MODELVIEW20_ARB                0x8734
+#define GL_MODELVIEW21_ARB                0x8735
+#define GL_MODELVIEW22_ARB                0x8736
+#define GL_MODELVIEW23_ARB                0x8737
+#define GL_MODELVIEW24_ARB                0x8738
+#define GL_MODELVIEW25_ARB                0x8739
+#define GL_MODELVIEW26_ARB                0x873A
+#define GL_MODELVIEW27_ARB                0x873B
+#define GL_MODELVIEW28_ARB                0x873C
+#define GL_MODELVIEW29_ARB                0x873D
+#define GL_MODELVIEW30_ARB                0x873E
+#define GL_MODELVIEW31_ARB                0x873F
+#endif
+
+#ifndef GL_ARB_matrix_palette
+#define GL_MATRIX_PALETTE_ARB             0x8840
+#define GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB 0x8841
+#define GL_MAX_PALETTE_MATRICES_ARB       0x8842
+#define GL_CURRENT_PALETTE_MATRIX_ARB     0x8843
+#define GL_MATRIX_INDEX_ARRAY_ARB         0x8844
+#define GL_CURRENT_MATRIX_INDEX_ARB       0x8845
+#define GL_MATRIX_INDEX_ARRAY_SIZE_ARB    0x8846
+#define GL_MATRIX_INDEX_ARRAY_TYPE_ARB    0x8847
+#define GL_MATRIX_INDEX_ARRAY_STRIDE_ARB  0x8848
+#define GL_MATRIX_INDEX_ARRAY_POINTER_ARB 0x8849
+#endif
+
+#ifndef GL_ARB_texture_env_combine
+#define GL_COMBINE_ARB                    0x8570
+#define GL_COMBINE_RGB_ARB                0x8571
+#define GL_COMBINE_ALPHA_ARB              0x8572
+#define GL_SOURCE0_RGB_ARB                0x8580
+#define GL_SOURCE1_RGB_ARB                0x8581
+#define GL_SOURCE2_RGB_ARB                0x8582
+#define GL_SOURCE0_ALPHA_ARB              0x8588
+#define GL_SOURCE1_ALPHA_ARB              0x8589
+#define GL_SOURCE2_ALPHA_ARB              0x858A
+#define GL_OPERAND0_RGB_ARB               0x8590
+#define GL_OPERAND1_RGB_ARB               0x8591
+#define GL_OPERAND2_RGB_ARB               0x8592
+#define GL_OPERAND0_ALPHA_ARB             0x8598
+#define GL_OPERAND1_ALPHA_ARB             0x8599
+#define GL_OPERAND2_ALPHA_ARB             0x859A
+#define GL_RGB_SCALE_ARB                  0x8573
+#define GL_ADD_SIGNED_ARB                 0x8574
+#define GL_INTERPOLATE_ARB                0x8575
+#define GL_SUBTRACT_ARB                   0x84E7
+#define GL_CONSTANT_ARB                   0x8576
+#define GL_PRIMARY_COLOR_ARB              0x8577
+#define GL_PREVIOUS_ARB                   0x8578
+#endif
+
+#ifndef GL_ARB_texture_env_crossbar
+#endif
+
+#ifndef GL_ARB_texture_env_dot3
+#define GL_DOT3_RGB_ARB                   0x86AE
+#define GL_DOT3_RGBA_ARB                  0x86AF
+#endif
+
+#ifndef GL_ARB_texture_mirrored_repeat
+#define GL_MIRRORED_REPEAT_ARB            0x8370
+#endif
+
+#ifndef GL_ARB_depth_texture
+#define GL_DEPTH_COMPONENT16_ARB          0x81A5
+#define GL_DEPTH_COMPONENT24_ARB          0x81A6
+#define GL_DEPTH_COMPONENT32_ARB          0x81A7
+#define GL_TEXTURE_DEPTH_SIZE_ARB         0x884A
+#define GL_DEPTH_TEXTURE_MODE_ARB         0x884B
+#endif
+
+#ifndef GL_ARB_shadow
+#define GL_TEXTURE_COMPARE_MODE_ARB       0x884C
+#define GL_TEXTURE_COMPARE_FUNC_ARB       0x884D
+#define GL_COMPARE_R_TO_TEXTURE_ARB       0x884E
+#endif
+
+#ifndef GL_ARB_shadow_ambient
+#define GL_TEXTURE_COMPARE_FAIL_VALUE_ARB 0x80BF
+#endif
+
+#ifndef GL_ARB_window_pos
+#endif
+
+#ifndef GL_ARB_vertex_program
+#define GL_COLOR_SUM_ARB                  0x8458
+#define GL_VERTEX_PROGRAM_ARB             0x8620
+#define GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB 0x8622
+#define GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB   0x8623
+#define GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB 0x8624
+#define GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB   0x8625
+#define GL_CURRENT_VERTEX_ATTRIB_ARB      0x8626
+#define GL_PROGRAM_LENGTH_ARB             0x8627
+#define GL_PROGRAM_STRING_ARB             0x8628
+#define GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB 0x862E
+#define GL_MAX_PROGRAM_MATRICES_ARB       0x862F
+#define GL_CURRENT_MATRIX_STACK_DEPTH_ARB 0x8640
+#define GL_CURRENT_MATRIX_ARB             0x8641
+#define GL_VERTEX_PROGRAM_POINT_SIZE_ARB  0x8642
+#define GL_VERTEX_PROGRAM_TWO_SIDE_ARB    0x8643
+#define GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB 0x8645
+#define GL_PROGRAM_ERROR_POSITION_ARB     0x864B
+#define GL_PROGRAM_BINDING_ARB            0x8677
+#define GL_MAX_VERTEX_ATTRIBS_ARB         0x8869
+#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB 0x886A
+#define GL_PROGRAM_ERROR_STRING_ARB       0x8874
+#define GL_PROGRAM_FORMAT_ASCII_ARB       0x8875
+#define GL_PROGRAM_FORMAT_ARB             0x8876
+#define GL_PROGRAM_INSTRUCTIONS_ARB       0x88A0
+#define GL_MAX_PROGRAM_INSTRUCTIONS_ARB   0x88A1
+#define GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB 0x88A2
+#define GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB 0x88A3
+#define GL_PROGRAM_TEMPORARIES_ARB        0x88A4
+#define GL_MAX_PROGRAM_TEMPORARIES_ARB    0x88A5
+#define GL_PROGRAM_NATIVE_TEMPORARIES_ARB 0x88A6
+#define GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB 0x88A7
+#define GL_PROGRAM_PARAMETERS_ARB         0x88A8
+#define GL_MAX_PROGRAM_PARAMETERS_ARB     0x88A9
+#define GL_PROGRAM_NATIVE_PARAMETERS_ARB  0x88AA
+#define GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB 0x88AB
+#define GL_PROGRAM_ATTRIBS_ARB            0x88AC
+#define GL_MAX_PROGRAM_ATTRIBS_ARB        0x88AD
+#define GL_PROGRAM_NATIVE_ATTRIBS_ARB     0x88AE
+#define GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB 0x88AF
+#define GL_PROGRAM_ADDRESS_REGISTERS_ARB  0x88B0
+#define GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB 0x88B1
+#define GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB 0x88B2
+#define GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB 0x88B3
+#define GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB 0x88B4
+#define GL_MAX_PROGRAM_ENV_PARAMETERS_ARB 0x88B5
+#define GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB 0x88B6
+#define GL_TRANSPOSE_CURRENT_MATRIX_ARB   0x88B7
+#define GL_MATRIX0_ARB                    0x88C0
+#define GL_MATRIX1_ARB                    0x88C1
+#define GL_MATRIX2_ARB                    0x88C2
+#define GL_MATRIX3_ARB                    0x88C3
+#define GL_MATRIX4_ARB                    0x88C4
+#define GL_MATRIX5_ARB                    0x88C5
+#define GL_MATRIX6_ARB                    0x88C6
+#define GL_MATRIX7_ARB                    0x88C7
+#define GL_MATRIX8_ARB                    0x88C8
+#define GL_MATRIX9_ARB                    0x88C9
+#define GL_MATRIX10_ARB                   0x88CA
+#define GL_MATRIX11_ARB                   0x88CB
+#define GL_MATRIX12_ARB                   0x88CC
+#define GL_MATRIX13_ARB                   0x88CD
+#define GL_MATRIX14_ARB                   0x88CE
+#define GL_MATRIX15_ARB                   0x88CF
+#define GL_MATRIX16_ARB                   0x88D0
+#define GL_MATRIX17_ARB                   0x88D1
+#define GL_MATRIX18_ARB                   0x88D2
+#define GL_MATRIX19_ARB                   0x88D3
+#define GL_MATRIX20_ARB                   0x88D4
+#define GL_MATRIX21_ARB                   0x88D5
+#define GL_MATRIX22_ARB                   0x88D6
+#define GL_MATRIX23_ARB                   0x88D7
+#define GL_MATRIX24_ARB                   0x88D8
+#define GL_MATRIX25_ARB                   0x88D9
+#define GL_MATRIX26_ARB                   0x88DA
+#define GL_MATRIX27_ARB                   0x88DB
+#define GL_MATRIX28_ARB                   0x88DC
+#define GL_MATRIX29_ARB                   0x88DD
+#define GL_MATRIX30_ARB                   0x88DE
+#define GL_MATRIX31_ARB                   0x88DF
+#endif
+
+#ifndef GL_ARB_fragment_program
+#define GL_FRAGMENT_PROGRAM_ARB           0x8804
+#define GL_PROGRAM_ALU_INSTRUCTIONS_ARB   0x8805
+#define GL_PROGRAM_TEX_INSTRUCTIONS_ARB   0x8806
+#define GL_PROGRAM_TEX_INDIRECTIONS_ARB   0x8807
+#define GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB 0x8808
+#define GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB 0x8809
+#define GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB 0x880A
+#define GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB 0x880B
+#define GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB 0x880C
+#define GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB 0x880D
+#define GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB 0x880E
+#define GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB 0x880F
+#define GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB 0x8810
+#define GL_MAX_TEXTURE_COORDS_ARB         0x8871
+#define GL_MAX_TEXTURE_IMAGE_UNITS_ARB    0x8872
+#endif
+
+#ifndef GL_ARB_vertex_buffer_object
+#define GL_BUFFER_SIZE_ARB                0x8764
+#define GL_BUFFER_USAGE_ARB               0x8765
+#define GL_ARRAY_BUFFER_ARB               0x8892
+#define GL_ELEMENT_ARRAY_BUFFER_ARB       0x8893
+#define GL_ARRAY_BUFFER_BINDING_ARB       0x8894
+#define GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB 0x8895
+#define GL_VERTEX_ARRAY_BUFFER_BINDING_ARB 0x8896
+#define GL_NORMAL_ARRAY_BUFFER_BINDING_ARB 0x8897
+#define GL_COLOR_ARRAY_BUFFER_BINDING_ARB 0x8898
+#define GL_INDEX_ARRAY_BUFFER_BINDING_ARB 0x8899
+#define GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB 0x889A
+#define GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB 0x889B
+#define GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB 0x889C
+#define GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB 0x889D
+#define GL_WEIGHT_ARRAY_BUFFER_BINDING_ARB 0x889E
+#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB 0x889F
+#define GL_READ_ONLY_ARB                  0x88B8
+#define GL_WRITE_ONLY_ARB                 0x88B9
+#define GL_READ_WRITE_ARB                 0x88BA
+#define GL_BUFFER_ACCESS_ARB              0x88BB
+#define GL_BUFFER_MAPPED_ARB              0x88BC
+#define GL_BUFFER_MAP_POINTER_ARB         0x88BD
+#define GL_STREAM_DRAW_ARB                0x88E0
+#define GL_STREAM_READ_ARB                0x88E1
+#define GL_STREAM_COPY_ARB                0x88E2
+#define GL_STATIC_DRAW_ARB                0x88E4
+#define GL_STATIC_READ_ARB                0x88E5
+#define GL_STATIC_COPY_ARB                0x88E6
+#define GL_DYNAMIC_DRAW_ARB               0x88E8
+#define GL_DYNAMIC_READ_ARB               0x88E9
+#define GL_DYNAMIC_COPY_ARB               0x88EA
+#endif
+
+#ifndef GL_ARB_occlusion_query
+#define GL_QUERY_COUNTER_BITS_ARB         0x8864
+#define GL_CURRENT_QUERY_ARB              0x8865
+#define GL_QUERY_RESULT_ARB               0x8866
+#define GL_QUERY_RESULT_AVAILABLE_ARB     0x8867
+#define GL_SAMPLES_PASSED_ARB             0x8914
+#endif
+
+#ifndef GL_ARB_shader_objects
+#define GL_PROGRAM_OBJECT_ARB             0x8B40
+#define GL_SHADER_OBJECT_ARB              0x8B48
+#define GL_OBJECT_TYPE_ARB                0x8B4E
+#define GL_OBJECT_SUBTYPE_ARB             0x8B4F
+#define GL_FLOAT_VEC2_ARB                 0x8B50
+#define GL_FLOAT_VEC3_ARB                 0x8B51
+#define GL_FLOAT_VEC4_ARB                 0x8B52
+#define GL_INT_VEC2_ARB                   0x8B53
+#define GL_INT_VEC3_ARB                   0x8B54
+#define GL_INT_VEC4_ARB                   0x8B55
+#define GL_BOOL_ARB                       0x8B56
+#define GL_BOOL_VEC2_ARB                  0x8B57
+#define GL_BOOL_VEC3_ARB                  0x8B58
+#define GL_BOOL_VEC4_ARB                  0x8B59
+#define GL_FLOAT_MAT2_ARB                 0x8B5A
+#define GL_FLOAT_MAT3_ARB                 0x8B5B
+#define GL_FLOAT_MAT4_ARB                 0x8B5C
+#define GL_SAMPLER_1D_ARB                 0x8B5D
+#define GL_SAMPLER_2D_ARB                 0x8B5E
+#define GL_SAMPLER_3D_ARB                 0x8B5F
+#define GL_SAMPLER_CUBE_ARB               0x8B60
+#define GL_SAMPLER_1D_SHADOW_ARB          0x8B61
+#define GL_SAMPLER_2D_SHADOW_ARB          0x8B62
+#define GL_SAMPLER_2D_RECT_ARB            0x8B63
+#define GL_SAMPLER_2D_RECT_SHADOW_ARB     0x8B64
+#define GL_OBJECT_DELETE_STATUS_ARB       0x8B80
+#define GL_OBJECT_COMPILE_STATUS_ARB      0x8B81
+#define GL_OBJECT_LINK_STATUS_ARB         0x8B82
+#define GL_OBJECT_VALIDATE_STATUS_ARB     0x8B83
+#define GL_OBJECT_INFO_LOG_LENGTH_ARB     0x8B84
+#define GL_OBJECT_ATTACHED_OBJECTS_ARB    0x8B85
+#define GL_OBJECT_ACTIVE_UNIFORMS_ARB     0x8B86
+#define GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB 0x8B87
+#define GL_OBJECT_SHADER_SOURCE_LENGTH_ARB 0x8B88
+#endif
+
+#ifndef GL_ARB_vertex_shader
+#define GL_VERTEX_SHADER_ARB              0x8B31
+#define GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB 0x8B4A
+#define GL_MAX_VARYING_FLOATS_ARB         0x8B4B
+#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB 0x8B4C
+#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB 0x8B4D
+#define GL_OBJECT_ACTIVE_ATTRIBUTES_ARB   0x8B89
+#define GL_OBJECT_ACTIVE_ATTRIBUTE_MAX_LENGTH_ARB 0x8B8A
+#endif
+
+#ifndef GL_ARB_fragment_shader
+#define GL_FRAGMENT_SHADER_ARB            0x8B30
+#define GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB 0x8B49
+#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT_ARB 0x8B8B
+#endif
+
+#ifndef GL_ARB_shading_language_100
+#define GL_SHADING_LANGUAGE_VERSION_ARB   0x8B8C
+#endif
+
+#ifndef GL_ARB_texture_non_power_of_two
+#endif
+
+#ifndef GL_ARB_point_sprite
+#define GL_POINT_SPRITE_ARB               0x8861
+#define GL_COORD_REPLACE_ARB              0x8862
+#endif
+
+#ifndef GL_ARB_fragment_program_shadow
+#endif
+
+#ifndef GL_ARB_draw_buffers
+#define GL_MAX_DRAW_BUFFERS_ARB           0x8824
+#define GL_DRAW_BUFFER0_ARB               0x8825
+#define GL_DRAW_BUFFER1_ARB               0x8826
+#define GL_DRAW_BUFFER2_ARB               0x8827
+#define GL_DRAW_BUFFER3_ARB               0x8828
+#define GL_DRAW_BUFFER4_ARB               0x8829
+#define GL_DRAW_BUFFER5_ARB               0x882A
+#define GL_DRAW_BUFFER6_ARB               0x882B
+#define GL_DRAW_BUFFER7_ARB               0x882C
+#define GL_DRAW_BUFFER8_ARB               0x882D
+#define GL_DRAW_BUFFER9_ARB               0x882E
+#define GL_DRAW_BUFFER10_ARB              0x882F
+#define GL_DRAW_BUFFER11_ARB              0x8830
+#define GL_DRAW_BUFFER12_ARB              0x8831
+#define GL_DRAW_BUFFER13_ARB              0x8832
+#define GL_DRAW_BUFFER14_ARB              0x8833
+#define GL_DRAW_BUFFER15_ARB              0x8834
+#endif
+
+#ifndef GL_ARB_texture_rectangle
+#define GL_TEXTURE_RECTANGLE_ARB          0x84F5
+#define GL_TEXTURE_BINDING_RECTANGLE_ARB  0x84F6
+#define GL_PROXY_TEXTURE_RECTANGLE_ARB    0x84F7
+#define GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB 0x84F8
+#endif
+
+#ifndef GL_ARB_color_buffer_float
+#define GL_RGBA_FLOAT_MODE_ARB            0x8820
+#define GL_CLAMP_VERTEX_COLOR_ARB         0x891A
+#define GL_CLAMP_FRAGMENT_COLOR_ARB       0x891B
+#define GL_CLAMP_READ_COLOR_ARB           0x891C
+#define GL_FIXED_ONLY_ARB                 0x891D
+#endif
+
+#ifndef GL_ARB_half_float_pixel
+#define GL_HALF_FLOAT_ARB                 0x140B
+#endif
+
+#ifndef GL_ARB_texture_float
+#define GL_TEXTURE_RED_TYPE_ARB           0x8C10
+#define GL_TEXTURE_GREEN_TYPE_ARB         0x8C11
+#define GL_TEXTURE_BLUE_TYPE_ARB          0x8C12
+#define GL_TEXTURE_ALPHA_TYPE_ARB         0x8C13
+#define GL_TEXTURE_LUMINANCE_TYPE_ARB     0x8C14
+#define GL_TEXTURE_INTENSITY_TYPE_ARB     0x8C15
+#define GL_TEXTURE_DEPTH_TYPE_ARB         0x8C16
+#define GL_UNSIGNED_NORMALIZED_ARB        0x8C17
+#define GL_RGBA32F_ARB                    0x8814
+#define GL_RGB32F_ARB                     0x8815
+#define GL_ALPHA32F_ARB                   0x8816
+#define GL_INTENSITY32F_ARB               0x8817
+#define GL_LUMINANCE32F_ARB               0x8818
+#define GL_LUMINANCE_ALPHA32F_ARB         0x8819
+#define GL_RGBA16F_ARB                    0x881A
+#define GL_RGB16F_ARB                     0x881B
+#define GL_ALPHA16F_ARB                   0x881C
+#define GL_INTENSITY16F_ARB               0x881D
+#define GL_LUMINANCE16F_ARB               0x881E
+#define GL_LUMINANCE_ALPHA16F_ARB         0x881F
+#endif
+
+#ifndef GL_ARB_pixel_buffer_object
+#define GL_PIXEL_PACK_BUFFER_ARB          0x88EB
+#define GL_PIXEL_UNPACK_BUFFER_ARB        0x88EC
+#define GL_PIXEL_PACK_BUFFER_BINDING_ARB  0x88ED
+#define GL_PIXEL_UNPACK_BUFFER_BINDING_ARB 0x88EF
+#endif
+
+#ifndef GL_ARB_depth_buffer_float
+#define GL_DEPTH_COMPONENT32F             0x8CAC
+#define GL_DEPTH32F_STENCIL8              0x8CAD
+#define GL_FLOAT_32_UNSIGNED_INT_24_8_REV 0x8DAD
+#endif
+
+#ifndef GL_ARB_draw_instanced
+#endif
+
+#ifndef GL_ARB_framebuffer_object
+#define GL_INVALID_FRAMEBUFFER_OPERATION  0x0506
+#define GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING 0x8210
+#define GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE 0x8211
+#define GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE 0x8212
+#define GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE 0x8213
+#define GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE 0x8214
+#define GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE 0x8215
+#define GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE 0x8216
+#define GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE 0x8217
+#define GL_FRAMEBUFFER_DEFAULT            0x8218
+#define GL_FRAMEBUFFER_UNDEFINED          0x8219
+#define GL_DEPTH_STENCIL_ATTACHMENT       0x821A
+#define GL_MAX_RENDERBUFFER_SIZE          0x84E8
+#define GL_DEPTH_STENCIL                  0x84F9
+#define GL_UNSIGNED_INT_24_8              0x84FA
+#define GL_DEPTH24_STENCIL8               0x88F0
+#define GL_TEXTURE_STENCIL_SIZE           0x88F1
+#define GL_TEXTURE_RED_TYPE               0x8C10
+#define GL_TEXTURE_GREEN_TYPE             0x8C11
+#define GL_TEXTURE_BLUE_TYPE              0x8C12
+#define GL_TEXTURE_ALPHA_TYPE             0x8C13
+#define GL_TEXTURE_DEPTH_TYPE             0x8C16
+#define GL_UNSIGNED_NORMALIZED            0x8C17
+#define GL_FRAMEBUFFER_BINDING            0x8CA6
+#define GL_DRAW_FRAMEBUFFER_BINDING       GL_FRAMEBUFFER_BINDING
+#define GL_RENDERBUFFER_BINDING           0x8CA7
+#define GL_READ_FRAMEBUFFER               0x8CA8
+#define GL_DRAW_FRAMEBUFFER               0x8CA9
+#define GL_READ_FRAMEBUFFER_BINDING       0x8CAA
+#define GL_RENDERBUFFER_SAMPLES           0x8CAB
+#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE 0x8CD0
+#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME 0x8CD1
+#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL 0x8CD2
+#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE 0x8CD3
+#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER 0x8CD4
+#define GL_FRAMEBUFFER_COMPLETE           0x8CD5
+#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT 0x8CD6
+#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT 0x8CD7
+#define GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER 0x8CDB
+#define GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER 0x8CDC
+#define GL_FRAMEBUFFER_UNSUPPORTED        0x8CDD
+#define GL_MAX_COLOR_ATTACHMENTS          0x8CDF
+#define GL_COLOR_ATTACHMENT0              0x8CE0
+#define GL_COLOR_ATTACHMENT1              0x8CE1
+#define GL_COLOR_ATTACHMENT2              0x8CE2
+#define GL_COLOR_ATTACHMENT3              0x8CE3
+#define GL_COLOR_ATTACHMENT4              0x8CE4
+#define GL_COLOR_ATTACHMENT5              0x8CE5
+#define GL_COLOR_ATTACHMENT6              0x8CE6
+#define GL_COLOR_ATTACHMENT7              0x8CE7
+#define GL_COLOR_ATTACHMENT8              0x8CE8
+#define GL_COLOR_ATTACHMENT9              0x8CE9
+#define GL_COLOR_ATTACHMENT10             0x8CEA
+#define GL_COLOR_ATTACHMENT11             0x8CEB
+#define GL_COLOR_ATTACHMENT12             0x8CEC
+#define GL_COLOR_ATTACHMENT13             0x8CED
+#define GL_COLOR_ATTACHMENT14             0x8CEE
+#define GL_COLOR_ATTACHMENT15             0x8CEF
+#define GL_DEPTH_ATTACHMENT               0x8D00
+#define GL_STENCIL_ATTACHMENT             0x8D20
+#define GL_FRAMEBUFFER                    0x8D40
+#define GL_RENDERBUFFER                   0x8D41
+#define GL_RENDERBUFFER_WIDTH             0x8D42
+#define GL_RENDERBUFFER_HEIGHT            0x8D43
+#define GL_RENDERBUFFER_INTERNAL_FORMAT   0x8D44
+#define GL_STENCIL_INDEX1                 0x8D46
+#define GL_STENCIL_INDEX4                 0x8D47
+#define GL_STENCIL_INDEX8                 0x8D48
+#define GL_STENCIL_INDEX16                0x8D49
+#define GL_RENDERBUFFER_RED_SIZE          0x8D50
+#define GL_RENDERBUFFER_GREEN_SIZE        0x8D51
+#define GL_RENDERBUFFER_BLUE_SIZE         0x8D52
+#define GL_RENDERBUFFER_ALPHA_SIZE        0x8D53
+#define GL_RENDERBUFFER_DEPTH_SIZE        0x8D54
+#define GL_RENDERBUFFER_STENCIL_SIZE      0x8D55
+#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE 0x8D56
+#define GL_MAX_SAMPLES                    0x8D57
+#endif
+
+#ifndef GL_ARB_framebuffer_object_DEPRECATED
+#define GL_INDEX                          0x8222
+#define GL_TEXTURE_LUMINANCE_TYPE         0x8C14
+#define GL_TEXTURE_INTENSITY_TYPE         0x8C15
+#endif
+
+#ifndef GL_ARB_framebuffer_sRGB
+#define GL_FRAMEBUFFER_SRGB               0x8DB9
+#endif
+
+#ifndef GL_ARB_geometry_shader4
+#define GL_LINES_ADJACENCY_ARB            0x000A
+#define GL_LINE_STRIP_ADJACENCY_ARB       0x000B
+#define GL_TRIANGLES_ADJACENCY_ARB        0x000C
+#define GL_TRIANGLE_STRIP_ADJACENCY_ARB   0x000D
+#define GL_PROGRAM_POINT_SIZE_ARB         0x8642
+#define GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_ARB 0x8C29
+#define GL_FRAMEBUFFER_ATTACHMENT_LAYERED_ARB 0x8DA7
+#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_ARB 0x8DA8
+#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_ARB 0x8DA9
+#define GL_GEOMETRY_SHADER_ARB            0x8DD9
+#define GL_GEOMETRY_VERTICES_OUT_ARB      0x8DDA
+#define GL_GEOMETRY_INPUT_TYPE_ARB        0x8DDB
+#define GL_GEOMETRY_OUTPUT_TYPE_ARB       0x8DDC
+#define GL_MAX_GEOMETRY_VARYING_COMPONENTS_ARB 0x8DDD
+#define GL_MAX_VERTEX_VARYING_COMPONENTS_ARB 0x8DDE
+#define GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_ARB 0x8DDF
+#define GL_MAX_GEOMETRY_OUTPUT_VERTICES_ARB 0x8DE0
+#define GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_ARB 0x8DE1
+/* reuse GL_MAX_VARYING_COMPONENTS */
+/* reuse GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER */
+#endif
+
+#ifndef GL_ARB_half_float_vertex
+#define GL_HALF_FLOAT                     0x140B
+#endif
+
+#ifndef GL_ARB_instanced_arrays
+#define GL_VERTEX_ATTRIB_ARRAY_DIVISOR_ARB 0x88FE
+#endif
+
+#ifndef GL_ARB_map_buffer_range
+#define GL_MAP_READ_BIT                   0x0001
+#define GL_MAP_WRITE_BIT                  0x0002
+#define GL_MAP_INVALIDATE_RANGE_BIT       0x0004
+#define GL_MAP_INVALIDATE_BUFFER_BIT      0x0008
+#define GL_MAP_FLUSH_EXPLICIT_BIT         0x0010
+#define GL_MAP_UNSYNCHRONIZED_BIT         0x0020
+#endif
+
+#ifndef GL_ARB_texture_buffer_object
+#define GL_TEXTURE_BUFFER_ARB             0x8C2A
+#define GL_MAX_TEXTURE_BUFFER_SIZE_ARB    0x8C2B
+#define GL_TEXTURE_BINDING_BUFFER_ARB     0x8C2C
+#define GL_TEXTURE_BUFFER_DATA_STORE_BINDING_ARB 0x8C2D
+#define GL_TEXTURE_BUFFER_FORMAT_ARB      0x8C2E
+#endif
+
+#ifndef GL_ARB_texture_compression_rgtc
+#define GL_COMPRESSED_RED_RGTC1           0x8DBB
+#define GL_COMPRESSED_SIGNED_RED_RGTC1    0x8DBC
+#define GL_COMPRESSED_RG_RGTC2            0x8DBD
+#define GL_COMPRESSED_SIGNED_RG_RGTC2     0x8DBE
+#endif
+
+#ifndef GL_ARB_texture_rg
+#define GL_RG                             0x8227
+#define GL_RG_INTEGER                     0x8228
+#define GL_R8                             0x8229
+#define GL_R16                            0x822A
+#define GL_RG8                            0x822B
+#define GL_RG16                           0x822C
+#define GL_R16F                           0x822D
+#define GL_R32F                           0x822E
+#define GL_RG16F                          0x822F
+#define GL_RG32F                          0x8230
+#define GL_R8I                            0x8231
+#define GL_R8UI                           0x8232
+#define GL_R16I                           0x8233
+#define GL_R16UI                          0x8234
+#define GL_R32I                           0x8235
+#define GL_R32UI                          0x8236
+#define GL_RG8I                           0x8237
+#define GL_RG8UI                          0x8238
+#define GL_RG16I                          0x8239
+#define GL_RG16UI                         0x823A
+#define GL_RG32I                          0x823B
+#define GL_RG32UI                         0x823C
+#endif
+
+#ifndef GL_ARB_vertex_array_object
+#define GL_VERTEX_ARRAY_BINDING           0x85B5
+#endif
+
+#ifndef GL_ARB_uniform_buffer_object
+#define GL_UNIFORM_BUFFER                 0x8A11
+#define GL_UNIFORM_BUFFER_BINDING         0x8A28
+#define GL_UNIFORM_BUFFER_START           0x8A29
+#define GL_UNIFORM_BUFFER_SIZE            0x8A2A
+#define GL_MAX_VERTEX_UNIFORM_BLOCKS      0x8A2B
+#define GL_MAX_GEOMETRY_UNIFORM_BLOCKS    0x8A2C
+#define GL_MAX_FRAGMENT_UNIFORM_BLOCKS    0x8A2D
+#define GL_MAX_COMBINED_UNIFORM_BLOCKS    0x8A2E
+#define GL_MAX_UNIFORM_BUFFER_BINDINGS    0x8A2F
+#define GL_MAX_UNIFORM_BLOCK_SIZE         0x8A30
+#define GL_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS 0x8A31
+#define GL_MAX_COMBINED_GEOMETRY_UNIFORM_COMPONENTS 0x8A32
+#define GL_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS 0x8A33
+#define GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT 0x8A34
+#define GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH 0x8A35
+#define GL_ACTIVE_UNIFORM_BLOCKS          0x8A36
+#define GL_UNIFORM_TYPE                   0x8A37
+#define GL_UNIFORM_SIZE                   0x8A38
+#define GL_UNIFORM_NAME_LENGTH            0x8A39
+#define GL_UNIFORM_BLOCK_INDEX            0x8A3A
+#define GL_UNIFORM_OFFSET                 0x8A3B
+#define GL_UNIFORM_ARRAY_STRIDE           0x8A3C
+#define GL_UNIFORM_MATRIX_STRIDE          0x8A3D
+#define GL_UNIFORM_IS_ROW_MAJOR           0x8A3E
+#define GL_UNIFORM_BLOCK_BINDING          0x8A3F
+#define GL_UNIFORM_BLOCK_DATA_SIZE        0x8A40
+#define GL_UNIFORM_BLOCK_NAME_LENGTH      0x8A41
+#define GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS  0x8A42
+#define GL_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES 0x8A43
+#define GL_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER 0x8A44
+#define GL_UNIFORM_BLOCK_REFERENCED_BY_GEOMETRY_SHADER 0x8A45
+#define GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER 0x8A46
+#define GL_INVALID_INDEX                  0xFFFFFFFFu
+#endif
+
+#ifndef GL_ARB_compatibility
+/* ARB_compatibility just defines tokens from core 3.0 */
+#endif
+
+#ifndef GL_ARB_copy_buffer
+#define GL_COPY_READ_BUFFER               0x8F36
+#define GL_COPY_WRITE_BUFFER              0x8F37
+#endif
+
+#ifndef GL_ARB_shader_texture_lod
+#endif
+
+#ifndef GL_ARB_depth_clamp
+#define GL_DEPTH_CLAMP                    0x864F
+#endif
+
+#ifndef GL_ARB_draw_elements_base_vertex
+#endif
+
+#ifndef GL_ARB_fragment_coord_conventions
+#endif
+
+#ifndef GL_ARB_provoking_vertex
+#define GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION 0x8E4C
+#define GL_FIRST_VERTEX_CONVENTION        0x8E4D
+#define GL_LAST_VERTEX_CONVENTION         0x8E4E
+#define GL_PROVOKING_VERTEX               0x8E4F
+#endif
+
+#ifndef GL_ARB_seamless_cube_map
+#define GL_TEXTURE_CUBE_MAP_SEAMLESS      0x884F
+#endif
+
+#ifndef GL_ARB_sync
+#define GL_MAX_SERVER_WAIT_TIMEOUT        0x9111
+#define GL_OBJECT_TYPE                    0x9112
+#define GL_SYNC_CONDITION                 0x9113
+#define GL_SYNC_STATUS                    0x9114
+#define GL_SYNC_FLAGS                     0x9115
+#define GL_SYNC_FENCE                     0x9116
+#define GL_SYNC_GPU_COMMANDS_COMPLETE     0x9117
+#define GL_UNSIGNALED                     0x9118
+#define GL_SIGNALED                       0x9119
+#define GL_ALREADY_SIGNALED               0x911A
+#define GL_TIMEOUT_EXPIRED                0x911B
+#define GL_CONDITION_SATISFIED            0x911C
+#define GL_WAIT_FAILED                    0x911D
+#define GL_SYNC_FLUSH_COMMANDS_BIT        0x00000001
+#define GL_TIMEOUT_IGNORED                0xFFFFFFFFFFFFFFFFull
+#endif
+
+#ifndef GL_ARB_texture_multisample
+#define GL_SAMPLE_POSITION                0x8E50
+#define GL_SAMPLE_MASK                    0x8E51
+#define GL_SAMPLE_MASK_VALUE              0x8E52
+#define GL_MAX_SAMPLE_MASK_WORDS          0x8E59
+#define GL_TEXTURE_2D_MULTISAMPLE         0x9100
+#define GL_PROXY_TEXTURE_2D_MULTISAMPLE   0x9101
+#define GL_TEXTURE_2D_MULTISAMPLE_ARRAY   0x9102
+#define GL_PROXY_TEXTURE_2D_MULTISAMPLE_ARRAY 0x9103
+#define GL_TEXTURE_BINDING_2D_MULTISAMPLE 0x9104
+#define GL_TEXTURE_BINDING_2D_MULTISAMPLE_ARRAY 0x9105
+#define GL_TEXTURE_SAMPLES                0x9106
+#define GL_TEXTURE_FIXED_SAMPLE_LOCATIONS 0x9107
+#define GL_SAMPLER_2D_MULTISAMPLE         0x9108
+#define GL_INT_SAMPLER_2D_MULTISAMPLE     0x9109
+#define GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE 0x910A
+#define GL_SAMPLER_2D_MULTISAMPLE_ARRAY   0x910B
+#define GL_INT_SAMPLER_2D_MULTISAMPLE_ARRAY 0x910C
+#define GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY 0x910D
+#define GL_MAX_COLOR_TEXTURE_SAMPLES      0x910E
+#define GL_MAX_DEPTH_TEXTURE_SAMPLES      0x910F
+#define GL_MAX_INTEGER_SAMPLES            0x9110
+#endif
+
+#ifndef GL_ARB_vertex_array_bgra
+/* reuse GL_BGRA */
+#endif
+
+#ifndef GL_ARB_draw_buffers_blend
+#endif
+
+#ifndef GL_ARB_sample_shading
+#define GL_SAMPLE_SHADING_ARB             0x8C36
+#define GL_MIN_SAMPLE_SHADING_VALUE_ARB   0x8C37
+#endif
+
+#ifndef GL_ARB_texture_cube_map_array
+#define GL_TEXTURE_CUBE_MAP_ARRAY_ARB     0x9009
+#define GL_TEXTURE_BINDING_CUBE_MAP_ARRAY_ARB 0x900A
+#define GL_PROXY_TEXTURE_CUBE_MAP_ARRAY_ARB 0x900B
+#define GL_SAMPLER_CUBE_MAP_ARRAY_ARB     0x900C
+#define GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW_ARB 0x900D
+#define GL_INT_SAMPLER_CUBE_MAP_ARRAY_ARB 0x900E
+#define GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY_ARB 0x900F
+#endif
+
+#ifndef GL_ARB_texture_gather
+#define GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET_ARB 0x8E5E
+#define GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET_ARB 0x8E5F
+#endif
+
+#ifndef GL_ARB_texture_query_lod
+#endif
+
+#ifndef GL_ARB_shading_language_include
+#define GL_SHADER_INCLUDE_ARB             0x8DAE
+#define GL_NAMED_STRING_LENGTH_ARB        0x8DE9
+#define GL_NAMED_STRING_TYPE_ARB          0x8DEA
+#endif
+
+#ifndef GL_ARB_texture_compression_bptc
+#define GL_COMPRESSED_RGBA_BPTC_UNORM_ARB 0x8E8C
+#define GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM_ARB 0x8E8D
+#define GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT_ARB 0x8E8E
+#define GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_ARB 0x8E8F
+#endif
+
+#ifndef GL_ARB_blend_func_extended
+#define GL_SRC1_COLOR                     0x88F9
+/* reuse GL_SRC1_ALPHA */
+#define GL_ONE_MINUS_SRC1_COLOR           0x88FA
+#define GL_ONE_MINUS_SRC1_ALPHA           0x88FB
+#define GL_MAX_DUAL_SOURCE_DRAW_BUFFERS   0x88FC
+#endif
+
+#ifndef GL_ARB_explicit_attrib_location
+#endif
+
+#ifndef GL_ARB_occlusion_query2
+#define GL_ANY_SAMPLES_PASSED             0x8C2F
+#endif
+
+#ifndef GL_ARB_sampler_objects
+#define GL_SAMPLER_BINDING                0x8919
+#endif
+
+#ifndef GL_ARB_shader_bit_encoding
+#endif
+
+#ifndef GL_ARB_texture_rgb10_a2ui
+#define GL_RGB10_A2UI                     0x906F
+#endif
+
+#ifndef GL_ARB_texture_swizzle
+#define GL_TEXTURE_SWIZZLE_R              0x8E42
+#define GL_TEXTURE_SWIZZLE_G              0x8E43
+#define GL_TEXTURE_SWIZZLE_B              0x8E44
+#define GL_TEXTURE_SWIZZLE_A              0x8E45
+#define GL_TEXTURE_SWIZZLE_RGBA           0x8E46
+#endif
+
+#ifndef GL_ARB_timer_query
+#define GL_TIME_ELAPSED                   0x88BF
+#define GL_TIMESTAMP                      0x8E28
+#endif
+
+#ifndef GL_ARB_vertex_type_2_10_10_10_rev
+/* reuse GL_UNSIGNED_INT_2_10_10_10_REV */
+#define GL_INT_2_10_10_10_REV             0x8D9F
+#endif
+
+#ifndef GL_ARB_draw_indirect
+#define GL_DRAW_INDIRECT_BUFFER           0x8F3F
+#define GL_DRAW_INDIRECT_BUFFER_BINDING   0x8F43
+#endif
+
+#ifndef GL_ARB_gpu_shader5
+#define GL_GEOMETRY_SHADER_INVOCATIONS    0x887F
+#define GL_MAX_GEOMETRY_SHADER_INVOCATIONS 0x8E5A
+#define GL_MIN_FRAGMENT_INTERPOLATION_OFFSET 0x8E5B
+#define GL_MAX_FRAGMENT_INTERPOLATION_OFFSET 0x8E5C
+#define GL_FRAGMENT_INTERPOLATION_OFFSET_BITS 0x8E5D
+/* reuse GL_MAX_VERTEX_STREAMS */
+#endif
+
+#ifndef GL_ARB_gpu_shader_fp64
+/* reuse GL_DOUBLE */
+#define GL_DOUBLE_VEC2                    0x8FFC
+#define GL_DOUBLE_VEC3                    0x8FFD
+#define GL_DOUBLE_VEC4                    0x8FFE
+#define GL_DOUBLE_MAT2                    0x8F46
+#define GL_DOUBLE_MAT3                    0x8F47
+#define GL_DOUBLE_MAT4                    0x8F48
+#define GL_DOUBLE_MAT2x3                  0x8F49
+#define GL_DOUBLE_MAT2x4                  0x8F4A
+#define GL_DOUBLE_MAT3x2                  0x8F4B
+#define GL_DOUBLE_MAT3x4                  0x8F4C
+#define GL_DOUBLE_MAT4x2                  0x8F4D
+#define GL_DOUBLE_MAT4x3                  0x8F4E
+#endif
+
+#ifndef GL_ARB_shader_subroutine
+#define GL_ACTIVE_SUBROUTINES             0x8DE5
+#define GL_ACTIVE_SUBROUTINE_UNIFORMS     0x8DE6
+#define GL_ACTIVE_SUBROUTINE_UNIFORM_LOCATIONS 0x8E47
+#define GL_ACTIVE_SUBROUTINE_MAX_LENGTH   0x8E48
+#define GL_ACTIVE_SUBROUTINE_UNIFORM_MAX_LENGTH 0x8E49
+#define GL_MAX_SUBROUTINES                0x8DE7
+#define GL_MAX_SUBROUTINE_UNIFORM_LOCATIONS 0x8DE8
+#define GL_NUM_COMPATIBLE_SUBROUTINES     0x8E4A
+#define GL_COMPATIBLE_SUBROUTINES         0x8E4B
+/* reuse GL_UNIFORM_SIZE */
+/* reuse GL_UNIFORM_NAME_LENGTH */
+#endif
+
+#ifndef GL_ARB_tessellation_shader
+#define GL_PATCHES                        0x000E
+#define GL_PATCH_VERTICES                 0x8E72
+#define GL_PATCH_DEFAULT_INNER_LEVEL      0x8E73
+#define GL_PATCH_DEFAULT_OUTER_LEVEL      0x8E74
+#define GL_TESS_CONTROL_OUTPUT_VERTICES   0x8E75
+#define GL_TESS_GEN_MODE                  0x8E76
+#define GL_TESS_GEN_SPACING               0x8E77
+#define GL_TESS_GEN_VERTEX_ORDER          0x8E78
+#define GL_TESS_GEN_POINT_MODE            0x8E79
+/* reuse GL_TRIANGLES */
+/* reuse GL_QUADS */
+#define GL_ISOLINES                       0x8E7A
+/* reuse GL_EQUAL */
+#define GL_FRACTIONAL_ODD                 0x8E7B
+#define GL_FRACTIONAL_EVEN                0x8E7C
+/* reuse GL_CCW */
+/* reuse GL_CW */
+#define GL_MAX_PATCH_VERTICES             0x8E7D
+#define GL_MAX_TESS_GEN_LEVEL             0x8E7E
+#define GL_MAX_TESS_CONTROL_UNIFORM_COMPONENTS 0x8E7F
+#define GL_MAX_TESS_EVALUATION_UNIFORM_COMPONENTS 0x8E80
+#define GL_MAX_TESS_CONTROL_TEXTURE_IMAGE_UNITS 0x8E81
+#define GL_MAX_TESS_EVALUATION_TEXTURE_IMAGE_UNITS 0x8E82
+#define GL_MAX_TESS_CONTROL_OUTPUT_COMPONENTS 0x8E83
+#define GL_MAX_TESS_PATCH_COMPONENTS      0x8E84
+#define GL_MAX_TESS_CONTROL_TOTAL_OUTPUT_COMPONENTS 0x8E85
+#define GL_MAX_TESS_EVALUATION_OUTPUT_COMPONENTS 0x8E86
+#define GL_MAX_TESS_CONTROL_UNIFORM_BLOCKS 0x8E89
+#define GL_MAX_TESS_EVALUATION_UNIFORM_BLOCKS 0x8E8A
+#define GL_MAX_TESS_CONTROL_INPUT_COMPONENTS 0x886C
+#define GL_MAX_TESS_EVALUATION_INPUT_COMPONENTS 0x886D
+#define GL_MAX_COMBINED_TESS_CONTROL_UNIFORM_COMPONENTS 0x8E1E
+#define GL_MAX_COMBINED_TESS_EVALUATION_UNIFORM_COMPONENTS 0x8E1F
+#define GL_UNIFORM_BLOCK_REFERENCED_BY_TESS_CONTROL_SHADER 0x84F0
+#define GL_UNIFORM_BLOCK_REFERENCED_BY_TESS_EVALUATION_SHADER 0x84F1
+#define GL_TESS_EVALUATION_SHADER         0x8E87
+#define GL_TESS_CONTROL_SHADER            0x8E88
+#endif
+
+#ifndef GL_ARB_texture_buffer_object_rgb32
+/* reuse GL_RGB32F */
+/* reuse GL_RGB32UI */
+/* reuse GL_RGB32I */
+#endif
+
+#ifndef GL_ARB_transform_feedback2
+#define GL_TRANSFORM_FEEDBACK             0x8E22
+#define GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED 0x8E23
+#define GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE 0x8E24
+#define GL_TRANSFORM_FEEDBACK_BINDING     0x8E25
+#endif
+
+#ifndef GL_ARB_transform_feedback3
+#define GL_MAX_TRANSFORM_FEEDBACK_BUFFERS 0x8E70
+#define GL_MAX_VERTEX_STREAMS             0x8E71
+#endif
+
+#ifndef GL_ARB_ES2_compatibility
+#define GL_FIXED                          0x140C
+#define GL_IMPLEMENTATION_COLOR_READ_TYPE 0x8B9A
+#define GL_IMPLEMENTATION_COLOR_READ_FORMAT 0x8B9B
+#define GL_LOW_FLOAT                      0x8DF0
+#define GL_MEDIUM_FLOAT                   0x8DF1
+#define GL_HIGH_FLOAT                     0x8DF2
+#define GL_LOW_INT                        0x8DF3
+#define GL_MEDIUM_INT                     0x8DF4
+#define GL_HIGH_INT                       0x8DF5
+#define GL_SHADER_COMPILER                0x8DFA
+#define GL_NUM_SHADER_BINARY_FORMATS      0x8DF9
+#define GL_MAX_VERTEX_UNIFORM_VECTORS     0x8DFB
+#define GL_MAX_VARYING_VECTORS            0x8DFC
+#define GL_MAX_FRAGMENT_UNIFORM_VECTORS   0x8DFD
+#endif
+
+#ifndef GL_ARB_get_program_binary
+#define GL_PROGRAM_BINARY_RETRIEVABLE_HINT 0x8257
+#define GL_PROGRAM_BINARY_LENGTH          0x8741
+#define GL_NUM_PROGRAM_BINARY_FORMATS     0x87FE
+#define GL_PROGRAM_BINARY_FORMATS         0x87FF
+#endif
+
+#ifndef GL_ARB_separate_shader_objects
+#define GL_VERTEX_SHADER_BIT              0x00000001
+#define GL_FRAGMENT_SHADER_BIT            0x00000002
+#define GL_GEOMETRY_SHADER_BIT            0x00000004
+#define GL_TESS_CONTROL_SHADER_BIT        0x00000008
+#define GL_TESS_EVALUATION_SHADER_BIT     0x00000010
+#define GL_ALL_SHADER_BITS                0xFFFFFFFF
+#define GL_PROGRAM_SEPARABLE              0x8258
+#define GL_ACTIVE_PROGRAM                 0x8259
+#define GL_PROGRAM_PIPELINE_BINDING       0x825A
+#endif
+
+#ifndef GL_ARB_shader_precision
+#endif
+
+#ifndef GL_ARB_vertex_attrib_64bit
+/* reuse GL_RGB32I */
+/* reuse GL_DOUBLE_VEC2 */
+/* reuse GL_DOUBLE_VEC3 */
+/* reuse GL_DOUBLE_VEC4 */
+/* reuse GL_DOUBLE_MAT2 */
+/* reuse GL_DOUBLE_MAT3 */
+/* reuse GL_DOUBLE_MAT4 */
+/* reuse GL_DOUBLE_MAT2x3 */
+/* reuse GL_DOUBLE_MAT2x4 */
+/* reuse GL_DOUBLE_MAT3x2 */
+/* reuse GL_DOUBLE_MAT3x4 */
+/* reuse GL_DOUBLE_MAT4x2 */
+/* reuse GL_DOUBLE_MAT4x3 */
+#endif
+
+#ifndef GL_ARB_viewport_array
+/* reuse GL_SCISSOR_BOX */
+/* reuse GL_VIEWPORT */
+/* reuse GL_DEPTH_RANGE */
+/* reuse GL_SCISSOR_TEST */
+#define GL_MAX_VIEWPORTS                  0x825B
+#define GL_VIEWPORT_SUBPIXEL_BITS         0x825C
+#define GL_VIEWPORT_BOUNDS_RANGE          0x825D
+#define GL_LAYER_PROVOKING_VERTEX         0x825E
+#define GL_VIEWPORT_INDEX_PROVOKING_VERTEX 0x825F
+#define GL_UNDEFINED_VERTEX               0x8260
+/* reuse GL_FIRST_VERTEX_CONVENTION */
+/* reuse GL_LAST_VERTEX_CONVENTION */
+/* reuse GL_PROVOKING_VERTEX */
+#endif
+
+#ifndef GL_ARB_cl_event
+#define GL_SYNC_CL_EVENT_ARB              0x8240
+#define GL_SYNC_CL_EVENT_COMPLETE_ARB     0x8241
+#endif
+
+#ifndef GL_ARB_debug_output
+#define GL_DEBUG_OUTPUT_SYNCHRONOUS_ARB   0x8242
+#define GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH_ARB 0x8243
+#define GL_DEBUG_CALLBACK_FUNCTION_ARB    0x8244
+#define GL_DEBUG_CALLBACK_USER_PARAM_ARB  0x8245
+#define GL_DEBUG_SOURCE_API_ARB           0x8246
+#define GL_DEBUG_SOURCE_WINDOW_SYSTEM_ARB 0x8247
+#define GL_DEBUG_SOURCE_SHADER_COMPILER_ARB 0x8248
+#define GL_DEBUG_SOURCE_THIRD_PARTY_ARB   0x8249
+#define GL_DEBUG_SOURCE_APPLICATION_ARB   0x824A
+#define GL_DEBUG_SOURCE_OTHER_ARB         0x824B
+#define GL_DEBUG_TYPE_ERROR_ARB           0x824C
+#define GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR_ARB 0x824D
+#define GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR_ARB 0x824E
+#define GL_DEBUG_TYPE_PORTABILITY_ARB     0x824F
+#define GL_DEBUG_TYPE_PERFORMANCE_ARB     0x8250
+#define GL_DEBUG_TYPE_OTHER_ARB           0x8251
+#define GL_MAX_DEBUG_MESSAGE_LENGTH_ARB   0x9143
+#define GL_MAX_DEBUG_LOGGED_MESSAGES_ARB  0x9144
+#define GL_DEBUG_LOGGED_MESSAGES_ARB      0x9145
+#define GL_DEBUG_SEVERITY_HIGH_ARB        0x9146
+#define GL_DEBUG_SEVERITY_MEDIUM_ARB      0x9147
+#define GL_DEBUG_SEVERITY_LOW_ARB         0x9148
+#endif
+
+#ifndef GL_ARB_robustness
+/* reuse GL_NO_ERROR */
+#define GL_CONTEXT_FLAG_ROBUST_ACCESS_BIT_ARB 0x00000004
+#define GL_LOSE_CONTEXT_ON_RESET_ARB      0x8252
+#define GL_GUILTY_CONTEXT_RESET_ARB       0x8253
+#define GL_INNOCENT_CONTEXT_RESET_ARB     0x8254
+#define GL_UNKNOWN_CONTEXT_RESET_ARB      0x8255
+#define GL_RESET_NOTIFICATION_STRATEGY_ARB 0x8256
+#define GL_NO_RESET_NOTIFICATION_ARB      0x8261
+#endif
+
+#ifndef GL_ARB_shader_stencil_export
+#endif
+
+#ifndef GL_EXT_abgr
+#define GL_ABGR_EXT                       0x8000
+#endif
+
+#ifndef GL_EXT_blend_color
+#define GL_CONSTANT_COLOR_EXT             0x8001
+#define GL_ONE_MINUS_CONSTANT_COLOR_EXT   0x8002
+#define GL_CONSTANT_ALPHA_EXT             0x8003
+#define GL_ONE_MINUS_CONSTANT_ALPHA_EXT   0x8004
+#define GL_BLEND_COLOR_EXT                0x8005
+#endif
+
+#ifndef GL_EXT_polygon_offset
+#define GL_POLYGON_OFFSET_EXT             0x8037
+#define GL_POLYGON_OFFSET_FACTOR_EXT      0x8038
+#define GL_POLYGON_OFFSET_BIAS_EXT        0x8039
+#endif
+
+#ifndef GL_EXT_texture
+#define GL_ALPHA4_EXT                     0x803B
+#define GL_ALPHA8_EXT                     0x803C
+#define GL_ALPHA12_EXT                    0x803D
+#define GL_ALPHA16_EXT                    0x803E
+#define GL_LUMINANCE4_EXT                 0x803F
+#define GL_LUMINANCE8_EXT                 0x8040
+#define GL_LUMINANCE12_EXT                0x8041
+#define GL_LUMINANCE16_EXT                0x8042
+#define GL_LUMINANCE4_ALPHA4_EXT          0x8043
+#define GL_LUMINANCE6_ALPHA2_EXT          0x8044
+#define GL_LUMINANCE8_ALPHA8_EXT          0x8045
+#define GL_LUMINANCE12_ALPHA4_EXT         0x8046
+#define GL_LUMINANCE12_ALPHA12_EXT        0x8047
+#define GL_LUMINANCE16_ALPHA16_EXT        0x8048
+#define GL_INTENSITY_EXT                  0x8049
+#define GL_INTENSITY4_EXT                 0x804A
+#define GL_INTENSITY8_EXT                 0x804B
+#define GL_INTENSITY12_EXT                0x804C
+#define GL_INTENSITY16_EXT                0x804D
+#define GL_RGB2_EXT                       0x804E
+#define GL_RGB4_EXT                       0x804F
+#define GL_RGB5_EXT                       0x8050
+#define GL_RGB8_EXT                       0x8051
+#define GL_RGB10_EXT                      0x8052
+#define GL_RGB12_EXT                      0x8053
+#define GL_RGB16_EXT                      0x8054
+#define GL_RGBA2_EXT                      0x8055
+#define GL_RGBA4_EXT                      0x8056
+#define GL_RGB5_A1_EXT                    0x8057
+#define GL_RGBA8_EXT                      0x8058
+#define GL_RGB10_A2_EXT                   0x8059
+#define GL_RGBA12_EXT                     0x805A
+#define GL_RGBA16_EXT                     0x805B
+#define GL_TEXTURE_RED_SIZE_EXT           0x805C
+#define GL_TEXTURE_GREEN_SIZE_EXT         0x805D
+#define GL_TEXTURE_BLUE_SIZE_EXT          0x805E
+#define GL_TEXTURE_ALPHA_SIZE_EXT         0x805F
+#define GL_TEXTURE_LUMINANCE_SIZE_EXT     0x8060
+#define GL_TEXTURE_INTENSITY_SIZE_EXT     0x8061
+#define GL_REPLACE_EXT                    0x8062
+#define GL_PROXY_TEXTURE_1D_EXT           0x8063
+#define GL_PROXY_TEXTURE_2D_EXT           0x8064
+#define GL_TEXTURE_TOO_LARGE_EXT          0x8065
+#endif
+
+#ifndef GL_EXT_texture3D
+#define GL_PACK_SKIP_IMAGES_EXT           0x806B
+#define GL_PACK_IMAGE_HEIGHT_EXT          0x806C
+#define GL_UNPACK_SKIP_IMAGES_EXT         0x806D
+#define GL_UNPACK_IMAGE_HEIGHT_EXT        0x806E
+#define GL_TEXTURE_3D_EXT                 0x806F
+#define GL_PROXY_TEXTURE_3D_EXT           0x8070
+#define GL_TEXTURE_DEPTH_EXT              0x8071
+#define GL_TEXTURE_WRAP_R_EXT             0x8072
+#define GL_MAX_3D_TEXTURE_SIZE_EXT        0x8073
+#endif
+
+#ifndef GL_SGIS_texture_filter4
+#define GL_FILTER4_SGIS                   0x8146
+#define GL_TEXTURE_FILTER4_SIZE_SGIS      0x8147
+#endif
+
+#ifndef GL_EXT_subtexture
+#endif
+
+#ifndef GL_EXT_copy_texture
+#endif
+
+#ifndef GL_EXT_histogram
+#define GL_HISTOGRAM_EXT                  0x8024
+#define GL_PROXY_HISTOGRAM_EXT            0x8025
+#define GL_HISTOGRAM_WIDTH_EXT            0x8026
+#define GL_HISTOGRAM_FORMAT_EXT           0x8027
+#define GL_HISTOGRAM_RED_SIZE_EXT         0x8028
+#define GL_HISTOGRAM_GREEN_SIZE_EXT       0x8029
+#define GL_HISTOGRAM_BLUE_SIZE_EXT        0x802A
+#define GL_HISTOGRAM_ALPHA_SIZE_EXT       0x802B
+#define GL_HISTOGRAM_LUMINANCE_SIZE_EXT   0x802C
+#define GL_HISTOGRAM_SINK_EXT             0x802D
+#define GL_MINMAX_EXT                     0x802E
+#define GL_MINMAX_FORMAT_EXT              0x802F
+#define GL_MINMAX_SINK_EXT                0x8030
+#define GL_TABLE_TOO_LARGE_EXT            0x8031
+#endif
+
+#ifndef GL_EXT_convolution
+#define GL_CONVOLUTION_1D_EXT             0x8010
+#define GL_CONVOLUTION_2D_EXT             0x8011
+#define GL_SEPARABLE_2D_EXT               0x8012
+#define GL_CONVOLUTION_BORDER_MODE_EXT    0x8013
+#define GL_CONVOLUTION_FILTER_SCALE_EXT   0x8014
+#define GL_CONVOLUTION_FILTER_BIAS_EXT    0x8015
+#define GL_REDUCE_EXT                     0x8016
+#define GL_CONVOLUTION_FORMAT_EXT         0x8017
+#define GL_CONVOLUTION_WIDTH_EXT          0x8018
+#define GL_CONVOLUTION_HEIGHT_EXT         0x8019
+#define GL_MAX_CONVOLUTION_WIDTH_EXT      0x801A
+#define GL_MAX_CONVOLUTION_HEIGHT_EXT     0x801B
+#define GL_POST_CONVOLUTION_RED_SCALE_EXT 0x801C
+#define GL_POST_CONVOLUTION_GREEN_SCALE_EXT 0x801D
+#define GL_POST_CONVOLUTION_BLUE_SCALE_EXT 0x801E
+#define GL_POST_CONVOLUTION_ALPHA_SCALE_EXT 0x801F
+#define GL_POST_CONVOLUTION_RED_BIAS_EXT  0x8020
+#define GL_POST_CONVOLUTION_GREEN_BIAS_EXT 0x8021
+#define GL_POST_CONVOLUTION_BLUE_BIAS_EXT 0x8022
+#define GL_POST_CONVOLUTION_ALPHA_BIAS_EXT 0x8023
+#endif
+
+#ifndef GL_SGI_color_matrix
+#define GL_COLOR_MATRIX_SGI               0x80B1
+#define GL_COLOR_MATRIX_STACK_DEPTH_SGI   0x80B2
+#define GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI 0x80B3
+#define GL_POST_COLOR_MATRIX_RED_SCALE_SGI 0x80B4
+#define GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI 0x80B5
+#define GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI 0x80B6
+#define GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI 0x80B7
+#define GL_POST_COLOR_MATRIX_RED_BIAS_SGI 0x80B8
+#define GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI 0x80B9
+#define GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI 0x80BA
+#define GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI 0x80BB
+#endif
+
+#ifndef GL_SGI_color_table
+#define GL_COLOR_TABLE_SGI                0x80D0
+#define GL_POST_CONVOLUTION_COLOR_TABLE_SGI 0x80D1
+#define GL_POST_COLOR_MATRIX_COLOR_TABLE_SGI 0x80D2
+#define GL_PROXY_COLOR_TABLE_SGI          0x80D3
+#define GL_PROXY_POST_CONVOLUTION_COLOR_TABLE_SGI 0x80D4
+#define GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE_SGI 0x80D5
+#define GL_COLOR_TABLE_SCALE_SGI          0x80D6
+#define GL_COLOR_TABLE_BIAS_SGI           0x80D7
+#define GL_COLOR_TABLE_FORMAT_SGI         0x80D8
+#define GL_COLOR_TABLE_WIDTH_SGI          0x80D9
+#define GL_COLOR_TABLE_RED_SIZE_SGI       0x80DA
+#define GL_COLOR_TABLE_GREEN_SIZE_SGI     0x80DB
+#define GL_COLOR_TABLE_BLUE_SIZE_SGI      0x80DC
+#define GL_COLOR_TABLE_ALPHA_SIZE_SGI     0x80DD
+#define GL_COLOR_TABLE_LUMINANCE_SIZE_SGI 0x80DE
+#define GL_COLOR_TABLE_INTENSITY_SIZE_SGI 0x80DF
+#endif
+
+#ifndef GL_SGIS_pixel_texture
+#define GL_PIXEL_TEXTURE_SGIS             0x8353
+#define GL_PIXEL_FRAGMENT_RGB_SOURCE_SGIS 0x8354
+#define GL_PIXEL_FRAGMENT_ALPHA_SOURCE_SGIS 0x8355
+#define GL_PIXEL_GROUP_COLOR_SGIS         0x8356
+#endif
+
+#ifndef GL_SGIX_pixel_texture
+#define GL_PIXEL_TEX_GEN_SGIX             0x8139
+#define GL_PIXEL_TEX_GEN_MODE_SGIX        0x832B
+#endif
+
+#ifndef GL_SGIS_texture4D
+#define GL_PACK_SKIP_VOLUMES_SGIS         0x8130
+#define GL_PACK_IMAGE_DEPTH_SGIS          0x8131
+#define GL_UNPACK_SKIP_VOLUMES_SGIS       0x8132
+#define GL_UNPACK_IMAGE_DEPTH_SGIS        0x8133
+#define GL_TEXTURE_4D_SGIS                0x8134
+#define GL_PROXY_TEXTURE_4D_SGIS          0x8135
+#define GL_TEXTURE_4DSIZE_SGIS            0x8136
+#define GL_TEXTURE_WRAP_Q_SGIS            0x8137
+#define GL_MAX_4D_TEXTURE_SIZE_SGIS       0x8138
+#define GL_TEXTURE_4D_BINDING_SGIS        0x814F
+#endif
+
+#ifndef GL_SGI_texture_color_table
+#define GL_TEXTURE_COLOR_TABLE_SGI        0x80BC
+#define GL_PROXY_TEXTURE_COLOR_TABLE_SGI  0x80BD
+#endif
+
+#ifndef GL_EXT_cmyka
+#define GL_CMYK_EXT                       0x800C
+#define GL_CMYKA_EXT                      0x800D
+#define GL_PACK_CMYK_HINT_EXT             0x800E
+#define GL_UNPACK_CMYK_HINT_EXT           0x800F
+#endif
+
+#ifndef GL_EXT_texture_object
+#define GL_TEXTURE_PRIORITY_EXT           0x8066
+#define GL_TEXTURE_RESIDENT_EXT           0x8067
+#define GL_TEXTURE_1D_BINDING_EXT         0x8068
+#define GL_TEXTURE_2D_BINDING_EXT         0x8069
+#define GL_TEXTURE_3D_BINDING_EXT         0x806A
+#endif
+
+#ifndef GL_SGIS_detail_texture
+#define GL_DETAIL_TEXTURE_2D_SGIS         0x8095
+#define GL_DETAIL_TEXTURE_2D_BINDING_SGIS 0x8096
+#define GL_LINEAR_DETAIL_SGIS             0x8097
+#define GL_LINEAR_DETAIL_ALPHA_SGIS       0x8098
+#define GL_LINEAR_DETAIL_COLOR_SGIS       0x8099
+#define GL_DETAIL_TEXTURE_LEVEL_SGIS      0x809A
+#define GL_DETAIL_TEXTURE_MODE_SGIS       0x809B
+#define GL_DETAIL_TEXTURE_FUNC_POINTS_SGIS 0x809C
+#endif
+
+#ifndef GL_SGIS_sharpen_texture
+#define GL_LINEAR_SHARPEN_SGIS            0x80AD
+#define GL_LINEAR_SHARPEN_ALPHA_SGIS      0x80AE
+#define GL_LINEAR_SHARPEN_COLOR_SGIS      0x80AF
+#define GL_SHARPEN_TEXTURE_FUNC_POINTS_SGIS 0x80B0
+#endif
+
+#ifndef GL_EXT_packed_pixels
+#define GL_UNSIGNED_BYTE_3_3_2_EXT        0x8032
+#define GL_UNSIGNED_SHORT_4_4_4_4_EXT     0x8033
+#define GL_UNSIGNED_SHORT_5_5_5_1_EXT     0x8034
+#define GL_UNSIGNED_INT_8_8_8_8_EXT       0x8035
+#define GL_UNSIGNED_INT_10_10_10_2_EXT    0x8036
+#endif
+
+#ifndef GL_SGIS_texture_lod
+#define GL_TEXTURE_MIN_LOD_SGIS           0x813A
+#define GL_TEXTURE_MAX_LOD_SGIS           0x813B
+#define GL_TEXTURE_BASE_LEVEL_SGIS        0x813C
+#define GL_TEXTURE_MAX_LEVEL_SGIS         0x813D
+#endif
+
+#ifndef GL_SGIS_multisample
+#define GL_MULTISAMPLE_SGIS               0x809D
+#define GL_SAMPLE_ALPHA_TO_MASK_SGIS      0x809E
+#define GL_SAMPLE_ALPHA_TO_ONE_SGIS       0x809F
+#define GL_SAMPLE_MASK_SGIS               0x80A0
+#define GL_1PASS_SGIS                     0x80A1
+#define GL_2PASS_0_SGIS                   0x80A2
+#define GL_2PASS_1_SGIS                   0x80A3
+#define GL_4PASS_0_SGIS                   0x80A4
+#define GL_4PASS_1_SGIS                   0x80A5
+#define GL_4PASS_2_SGIS                   0x80A6
+#define GL_4PASS_3_SGIS                   0x80A7
+#define GL_SAMPLE_BUFFERS_SGIS            0x80A8
+#define GL_SAMPLES_SGIS                   0x80A9
+#define GL_SAMPLE_MASK_VALUE_SGIS         0x80AA
+#define GL_SAMPLE_MASK_INVERT_SGIS        0x80AB
+#define GL_SAMPLE_PATTERN_SGIS            0x80AC
+#endif
+
+#ifndef GL_EXT_rescale_normal
+#define GL_RESCALE_NORMAL_EXT             0x803A
+#endif
+
+#ifndef GL_EXT_vertex_array
+#define GL_VERTEX_ARRAY_EXT               0x8074
+#define GL_NORMAL_ARRAY_EXT               0x8075
+#define GL_COLOR_ARRAY_EXT                0x8076
+#define GL_INDEX_ARRAY_EXT                0x8077
+#define GL_TEXTURE_COORD_ARRAY_EXT        0x8078
+#define GL_EDGE_FLAG_ARRAY_EXT            0x8079
+#define GL_VERTEX_ARRAY_SIZE_EXT          0x807A
+#define GL_VERTEX_ARRAY_TYPE_EXT          0x807B
+#define GL_VERTEX_ARRAY_STRIDE_EXT        0x807C
+#define GL_VERTEX_ARRAY_COUNT_EXT         0x807D
+#define GL_NORMAL_ARRAY_TYPE_EXT          0x807E
+#define GL_NORMAL_ARRAY_STRIDE_EXT        0x807F
+#define GL_NORMAL_ARRAY_COUNT_EXT         0x8080
+#define GL_COLOR_ARRAY_SIZE_EXT           0x8081
+#define GL_COLOR_ARRAY_TYPE_EXT           0x8082
+#define GL_COLOR_ARRAY_STRIDE_EXT         0x8083
+#define GL_COLOR_ARRAY_COUNT_EXT          0x8084
+#define GL_INDEX_ARRAY_TYPE_EXT           0x8085
+#define GL_INDEX_ARRAY_STRIDE_EXT         0x8086
+#define GL_INDEX_ARRAY_COUNT_EXT          0x8087
+#define GL_TEXTURE_COORD_ARRAY_SIZE_EXT   0x8088
+#define GL_TEXTURE_COORD_ARRAY_TYPE_EXT   0x8089
+#define GL_TEXTURE_COORD_ARRAY_STRIDE_EXT 0x808A
+#define GL_TEXTURE_COORD_ARRAY_COUNT_EXT  0x808B
+#define GL_EDGE_FLAG_ARRAY_STRIDE_EXT     0x808C
+#define GL_EDGE_FLAG_ARRAY_COUNT_EXT      0x808D
+#define GL_VERTEX_ARRAY_POINTER_EXT       0x808E
+#define GL_NORMAL_ARRAY_POINTER_EXT       0x808F
+#define GL_COLOR_ARRAY_POINTER_EXT        0x8090
+#define GL_INDEX_ARRAY_POINTER_EXT        0x8091
+#define GL_TEXTURE_COORD_ARRAY_POINTER_EXT 0x8092
+#define GL_EDGE_FLAG_ARRAY_POINTER_EXT    0x8093
+#endif
+
+#ifndef GL_EXT_misc_attribute
+#endif
+
+#ifndef GL_SGIS_generate_mipmap
+#define GL_GENERATE_MIPMAP_SGIS           0x8191
+#define GL_GENERATE_MIPMAP_HINT_SGIS      0x8192
+#endif
+
+#ifndef GL_SGIX_clipmap
+#define GL_LINEAR_CLIPMAP_LINEAR_SGIX     0x8170
+#define GL_TEXTURE_CLIPMAP_CENTER_SGIX    0x8171
+#define GL_TEXTURE_CLIPMAP_FRAME_SGIX     0x8172
+#define GL_TEXTURE_CLIPMAP_OFFSET_SGIX    0x8173
+#define GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX 0x8174
+#define GL_TEXTURE_CLIPMAP_LOD_OFFSET_SGIX 0x8175
+#define GL_TEXTURE_CLIPMAP_DEPTH_SGIX     0x8176
+#define GL_MAX_CLIPMAP_DEPTH_SGIX         0x8177
+#define GL_MAX_CLIPMAP_VIRTUAL_DEPTH_SGIX 0x8178
+#define GL_NEAREST_CLIPMAP_NEAREST_SGIX   0x844D
+#define GL_NEAREST_CLIPMAP_LINEAR_SGIX    0x844E
+#define GL_LINEAR_CLIPMAP_NEAREST_SGIX    0x844F
+#endif
+
+#ifndef GL_SGIX_shadow
+#define GL_TEXTURE_COMPARE_SGIX           0x819A
+#define GL_TEXTURE_COMPARE_OPERATOR_SGIX  0x819B
+#define GL_TEXTURE_LEQUAL_R_SGIX          0x819C
+#define GL_TEXTURE_GEQUAL_R_SGIX          0x819D
+#endif
+
+#ifndef GL_SGIS_texture_edge_clamp
+#define GL_CLAMP_TO_EDGE_SGIS             0x812F
+#endif
+
+#ifndef GL_SGIS_texture_border_clamp
+#define GL_CLAMP_TO_BORDER_SGIS           0x812D
+#endif
+
+#ifndef GL_EXT_blend_minmax
+#define GL_FUNC_ADD_EXT                   0x8006
+#define GL_MIN_EXT                        0x8007
+#define GL_MAX_EXT                        0x8008
+#define GL_BLEND_EQUATION_EXT             0x8009
+#endif
+
+#ifndef GL_EXT_blend_subtract
+#define GL_FUNC_SUBTRACT_EXT              0x800A
+#define GL_FUNC_REVERSE_SUBTRACT_EXT      0x800B
+#endif
+
+#ifndef GL_EXT_blend_logic_op
+#endif
+
+#ifndef GL_SGIX_interlace
+#define GL_INTERLACE_SGIX                 0x8094
+#endif
+
+#ifndef GL_SGIX_pixel_tiles
+#define GL_PIXEL_TILE_BEST_ALIGNMENT_SGIX 0x813E
+#define GL_PIXEL_TILE_CACHE_INCREMENT_SGIX 0x813F
+#define GL_PIXEL_TILE_WIDTH_SGIX          0x8140
+#define GL_PIXEL_TILE_HEIGHT_SGIX         0x8141
+#define GL_PIXEL_TILE_GRID_WIDTH_SGIX     0x8142
+#define GL_PIXEL_TILE_GRID_HEIGHT_SGIX    0x8143
+#define GL_PIXEL_TILE_GRID_DEPTH_SGIX     0x8144
+#define GL_PIXEL_TILE_CACHE_SIZE_SGIX     0x8145
+#endif
+
+#ifndef GL_SGIS_texture_select
+#define GL_DUAL_ALPHA4_SGIS               0x8110
+#define GL_DUAL_ALPHA8_SGIS               0x8111
+#define GL_DUAL_ALPHA12_SGIS              0x8112
+#define GL_DUAL_ALPHA16_SGIS              0x8113
+#define GL_DUAL_LUMINANCE4_SGIS           0x8114
+#define GL_DUAL_LUMINANCE8_SGIS           0x8115
+#define GL_DUAL_LUMINANCE12_SGIS          0x8116
+#define GL_DUAL_LUMINANCE16_SGIS          0x8117
+#define GL_DUAL_INTENSITY4_SGIS           0x8118
+#define GL_DUAL_INTENSITY8_SGIS           0x8119
+#define GL_DUAL_INTENSITY12_SGIS          0x811A
+#define GL_DUAL_INTENSITY16_SGIS          0x811B
+#define GL_DUAL_LUMINANCE_ALPHA4_SGIS     0x811C
+#define GL_DUAL_LUMINANCE_ALPHA8_SGIS     0x811D
+#define GL_QUAD_ALPHA4_SGIS               0x811E
+#define GL_QUAD_ALPHA8_SGIS               0x811F
+#define GL_QUAD_LUMINANCE4_SGIS           0x8120
+#define GL_QUAD_LUMINANCE8_SGIS           0x8121
+#define GL_QUAD_INTENSITY4_SGIS           0x8122
+#define GL_QUAD_INTENSITY8_SGIS           0x8123
+#define GL_DUAL_TEXTURE_SELECT_SGIS       0x8124
+#define GL_QUAD_TEXTURE_SELECT_SGIS       0x8125
+#endif
+
+#ifndef GL_SGIX_sprite
+#define GL_SPRITE_SGIX                    0x8148
+#define GL_SPRITE_MODE_SGIX               0x8149
+#define GL_SPRITE_AXIS_SGIX               0x814A
+#define GL_SPRITE_TRANSLATION_SGIX        0x814B
+#define GL_SPRITE_AXIAL_SGIX              0x814C
+#define GL_SPRITE_OBJECT_ALIGNED_SGIX     0x814D
+#define GL_SPRITE_EYE_ALIGNED_SGIX        0x814E
+#endif
+
+#ifndef GL_SGIX_texture_multi_buffer
+#define GL_TEXTURE_MULTI_BUFFER_HINT_SGIX 0x812E
+#endif
+
+#ifndef GL_EXT_point_parameters
+#define GL_POINT_SIZE_MIN_EXT             0x8126
+#define GL_POINT_SIZE_MAX_EXT             0x8127
+#define GL_POINT_FADE_THRESHOLD_SIZE_EXT  0x8128
+#define GL_DISTANCE_ATTENUATION_EXT       0x8129
+#endif
+
+#ifndef GL_SGIS_point_parameters
+#define GL_POINT_SIZE_MIN_SGIS            0x8126
+#define GL_POINT_SIZE_MAX_SGIS            0x8127
+#define GL_POINT_FADE_THRESHOLD_SIZE_SGIS 0x8128
+#define GL_DISTANCE_ATTENUATION_SGIS      0x8129
+#endif
+
+#ifndef GL_SGIX_instruments
+#define GL_INSTRUMENT_BUFFER_POINTER_SGIX 0x8180
+#define GL_INSTRUMENT_MEASUREMENTS_SGIX   0x8181
+#endif
+
+#ifndef GL_SGIX_texture_scale_bias
+#define GL_POST_TEXTURE_FILTER_BIAS_SGIX  0x8179
+#define GL_POST_TEXTURE_FILTER_SCALE_SGIX 0x817A
+#define GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX 0x817B
+#define GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX 0x817C
+#endif
+
+#ifndef GL_SGIX_framezoom
+#define GL_FRAMEZOOM_SGIX                 0x818B
+#define GL_FRAMEZOOM_FACTOR_SGIX          0x818C
+#define GL_MAX_FRAMEZOOM_FACTOR_SGIX      0x818D
+#endif
+
+#ifndef GL_SGIX_tag_sample_buffer
+#endif
+
+#ifndef GL_FfdMaskSGIX
+#define GL_TEXTURE_DEFORMATION_BIT_SGIX   0x00000001
+#define GL_GEOMETRY_DEFORMATION_BIT_SGIX  0x00000002
+#endif
+
+#ifndef GL_SGIX_polynomial_ffd
+#define GL_GEOMETRY_DEFORMATION_SGIX      0x8194
+#define GL_TEXTURE_DEFORMATION_SGIX       0x8195
+#define GL_DEFORMATIONS_MASK_SGIX         0x8196
+#define GL_MAX_DEFORMATION_ORDER_SGIX     0x8197
+#endif
+
+#ifndef GL_SGIX_reference_plane
+#define GL_REFERENCE_PLANE_SGIX           0x817D
+#define GL_REFERENCE_PLANE_EQUATION_SGIX  0x817E
+#endif
+
+#ifndef GL_SGIX_flush_raster
+#endif
+
+#ifndef GL_SGIX_depth_texture
+#define GL_DEPTH_COMPONENT16_SGIX         0x81A5
+#define GL_DEPTH_COMPONENT24_SGIX         0x81A6
+#define GL_DEPTH_COMPONENT32_SGIX         0x81A7
+#endif
+
+#ifndef GL_SGIS_fog_function
+#define GL_FOG_FUNC_SGIS                  0x812A
+#define GL_FOG_FUNC_POINTS_SGIS           0x812B
+#define GL_MAX_FOG_FUNC_POINTS_SGIS       0x812C
+#endif
+
+#ifndef GL_SGIX_fog_offset
+#define GL_FOG_OFFSET_SGIX                0x8198
+#define GL_FOG_OFFSET_VALUE_SGIX          0x8199
+#endif
+
+#ifndef GL_HP_image_transform
+#define GL_IMAGE_SCALE_X_HP               0x8155
+#define GL_IMAGE_SCALE_Y_HP               0x8156
+#define GL_IMAGE_TRANSLATE_X_HP           0x8157
+#define GL_IMAGE_TRANSLATE_Y_HP           0x8158
+#define GL_IMAGE_ROTATE_ANGLE_HP          0x8159
+#define GL_IMAGE_ROTATE_ORIGIN_X_HP       0x815A
+#define GL_IMAGE_ROTATE_ORIGIN_Y_HP       0x815B
+#define GL_IMAGE_MAG_FILTER_HP            0x815C
+#define GL_IMAGE_MIN_FILTER_HP            0x815D
+#define GL_IMAGE_CUBIC_WEIGHT_HP          0x815E
+#define GL_CUBIC_HP                       0x815F
+#define GL_AVERAGE_HP                     0x8160
+#define GL_IMAGE_TRANSFORM_2D_HP          0x8161
+#define GL_POST_IMAGE_TRANSFORM_COLOR_TABLE_HP 0x8162
+#define GL_PROXY_POST_IMAGE_TRANSFORM_COLOR_TABLE_HP 0x8163
+#endif
+
+#ifndef GL_HP_convolution_border_modes
+#define GL_IGNORE_BORDER_HP               0x8150
+#define GL_CONSTANT_BORDER_HP             0x8151
+#define GL_REPLICATE_BORDER_HP            0x8153
+#define GL_CONVOLUTION_BORDER_COLOR_HP    0x8154
+#endif
+
+#ifndef GL_INGR_palette_buffer
+#endif
+
+#ifndef GL_SGIX_texture_add_env
+#define GL_TEXTURE_ENV_BIAS_SGIX          0x80BE
+#endif
+
+#ifndef GL_EXT_color_subtable
+#endif
+
+#ifndef GL_PGI_vertex_hints
+#define GL_VERTEX_DATA_HINT_PGI           0x1A22A
+#define GL_VERTEX_CONSISTENT_HINT_PGI     0x1A22B
+#define GL_MATERIAL_SIDE_HINT_PGI         0x1A22C
+#define GL_MAX_VERTEX_HINT_PGI            0x1A22D
+#define GL_COLOR3_BIT_PGI                 0x00010000
+#define GL_COLOR4_BIT_PGI                 0x00020000
+#define GL_EDGEFLAG_BIT_PGI               0x00040000
+#define GL_INDEX_BIT_PGI                  0x00080000
+#define GL_MAT_AMBIENT_BIT_PGI            0x00100000
+#define GL_MAT_AMBIENT_AND_DIFFUSE_BIT_PGI 0x00200000
+#define GL_MAT_DIFFUSE_BIT_PGI            0x00400000
+#define GL_MAT_EMISSION_BIT_PGI           0x00800000
+#define GL_MAT_COLOR_INDEXES_BIT_PGI      0x01000000
+#define GL_MAT_SHININESS_BIT_PGI          0x02000000
+#define GL_MAT_SPECULAR_BIT_PGI           0x04000000
+#define GL_NORMAL_BIT_PGI                 0x08000000
+#define GL_TEXCOORD1_BIT_PGI              0x10000000
+#define GL_TEXCOORD2_BIT_PGI              0x20000000
+#define GL_TEXCOORD3_BIT_PGI              0x40000000
+#define GL_TEXCOORD4_BIT_PGI              0x80000000
+#define GL_VERTEX23_BIT_PGI               0x00000004
+#define GL_VERTEX4_BIT_PGI                0x00000008
+#endif
+
+#ifndef GL_PGI_misc_hints
+#define GL_PREFER_DOUBLEBUFFER_HINT_PGI   0x1A1F8
+#define GL_CONSERVE_MEMORY_HINT_PGI       0x1A1FD
+#define GL_RECLAIM_MEMORY_HINT_PGI        0x1A1FE
+#define GL_NATIVE_GRAPHICS_HANDLE_PGI     0x1A202
+#define GL_NATIVE_GRAPHICS_BEGIN_HINT_PGI 0x1A203
+#define GL_NATIVE_GRAPHICS_END_HINT_PGI   0x1A204
+#define GL_ALWAYS_FAST_HINT_PGI           0x1A20C
+#define GL_ALWAYS_SOFT_HINT_PGI           0x1A20D
+#define GL_ALLOW_DRAW_OBJ_HINT_PGI        0x1A20E
+#define GL_ALLOW_DRAW_WIN_HINT_PGI        0x1A20F
+#define GL_ALLOW_DRAW_FRG_HINT_PGI        0x1A210
+#define GL_ALLOW_DRAW_MEM_HINT_PGI        0x1A211
+#define GL_STRICT_DEPTHFUNC_HINT_PGI      0x1A216
+#define GL_STRICT_LIGHTING_HINT_PGI       0x1A217
+#define GL_STRICT_SCISSOR_HINT_PGI        0x1A218
+#define GL_FULL_STIPPLE_HINT_PGI          0x1A219
+#define GL_CLIP_NEAR_HINT_PGI             0x1A220
+#define GL_CLIP_FAR_HINT_PGI              0x1A221
+#define GL_WIDE_LINE_HINT_PGI             0x1A222
+#define GL_BACK_NORMALS_HINT_PGI          0x1A223
+#endif
+
+#ifndef GL_EXT_paletted_texture
+#define GL_COLOR_INDEX1_EXT               0x80E2
+#define GL_COLOR_INDEX2_EXT               0x80E3
+#define GL_COLOR_INDEX4_EXT               0x80E4
+#define GL_COLOR_INDEX8_EXT               0x80E5
+#define GL_COLOR_INDEX12_EXT              0x80E6
+#define GL_COLOR_INDEX16_EXT              0x80E7
+#define GL_TEXTURE_INDEX_SIZE_EXT         0x80ED
+#endif
+
+#ifndef GL_EXT_clip_volume_hint
+#define GL_CLIP_VOLUME_CLIPPING_HINT_EXT  0x80F0
+#endif
+
+#ifndef GL_SGIX_list_priority
+#define GL_LIST_PRIORITY_SGIX             0x8182
+#endif
+
+#ifndef GL_SGIX_ir_instrument1
+#define GL_IR_INSTRUMENT1_SGIX            0x817F
+#endif
+
+#ifndef GL_SGIX_calligraphic_fragment
+#define GL_CALLIGRAPHIC_FRAGMENT_SGIX     0x8183
+#endif
+
+#ifndef GL_SGIX_texture_lod_bias
+#define GL_TEXTURE_LOD_BIAS_S_SGIX        0x818E
+#define GL_TEXTURE_LOD_BIAS_T_SGIX        0x818F
+#define GL_TEXTURE_LOD_BIAS_R_SGIX        0x8190
+#endif
+
+#ifndef GL_SGIX_shadow_ambient
+#define GL_SHADOW_AMBIENT_SGIX            0x80BF
+#endif
+
+#ifndef GL_EXT_index_texture
+#endif
+
+#ifndef GL_EXT_index_material
+#define GL_INDEX_MATERIAL_EXT             0x81B8
+#define GL_INDEX_MATERIAL_PARAMETER_EXT   0x81B9
+#define GL_INDEX_MATERIAL_FACE_EXT        0x81BA
+#endif
+
+#ifndef GL_EXT_index_func
+#define GL_INDEX_TEST_EXT                 0x81B5
+#define GL_INDEX_TEST_FUNC_EXT            0x81B6
+#define GL_INDEX_TEST_REF_EXT             0x81B7
+#endif
+
+#ifndef GL_EXT_index_array_formats
+#define GL_IUI_V2F_EXT                    0x81AD
+#define GL_IUI_V3F_EXT                    0x81AE
+#define GL_IUI_N3F_V2F_EXT                0x81AF
+#define GL_IUI_N3F_V3F_EXT                0x81B0
+#define GL_T2F_IUI_V2F_EXT                0x81B1
+#define GL_T2F_IUI_V3F_EXT                0x81B2
+#define GL_T2F_IUI_N3F_V2F_EXT            0x81B3
+#define GL_T2F_IUI_N3F_V3F_EXT            0x81B4
+#endif
+
+#ifndef GL_EXT_compiled_vertex_array
+#define GL_ARRAY_ELEMENT_LOCK_FIRST_EXT   0x81A8
+#define GL_ARRAY_ELEMENT_LOCK_COUNT_EXT   0x81A9
+#endif
+
+#ifndef GL_EXT_cull_vertex
+#define GL_CULL_VERTEX_EXT                0x81AA
+#define GL_CULL_VERTEX_EYE_POSITION_EXT   0x81AB
+#define GL_CULL_VERTEX_OBJECT_POSITION_EXT 0x81AC
+#endif
+
+#ifndef GL_SGIX_ycrcb
+#define GL_YCRCB_422_SGIX                 0x81BB
+#define GL_YCRCB_444_SGIX                 0x81BC
+#endif
+
+#ifndef GL_SGIX_fragment_lighting
+#define GL_FRAGMENT_LIGHTING_SGIX         0x8400
+#define GL_FRAGMENT_COLOR_MATERIAL_SGIX   0x8401
+#define GL_FRAGMENT_COLOR_MATERIAL_FACE_SGIX 0x8402
+#define GL_FRAGMENT_COLOR_MATERIAL_PARAMETER_SGIX 0x8403
+#define GL_MAX_FRAGMENT_LIGHTS_SGIX       0x8404
+#define GL_MAX_ACTIVE_LIGHTS_SGIX         0x8405
+#define GL_CURRENT_RASTER_NORMAL_SGIX     0x8406
+#define GL_LIGHT_ENV_MODE_SGIX            0x8407
+#define GL_FRAGMENT_LIGHT_MODEL_LOCAL_VIEWER_SGIX 0x8408
+#define GL_FRAGMENT_LIGHT_MODEL_TWO_SIDE_SGIX 0x8409
+#define GL_FRAGMENT_LIGHT_MODEL_AMBIENT_SGIX 0x840A
+#define GL_FRAGMENT_LIGHT_MODEL_NORMAL_INTERPOLATION_SGIX 0x840B
+#define GL_FRAGMENT_LIGHT0_SGIX           0x840C
+#define GL_FRAGMENT_LIGHT1_SGIX           0x840D
+#define GL_FRAGMENT_LIGHT2_SGIX           0x840E
+#define GL_FRAGMENT_LIGHT3_SGIX           0x840F
+#define GL_FRAGMENT_LIGHT4_SGIX           0x8410
+#define GL_FRAGMENT_LIGHT5_SGIX           0x8411
+#define GL_FRAGMENT_LIGHT6_SGIX           0x8412
+#define GL_FRAGMENT_LIGHT7_SGIX           0x8413
+#endif
+
+#ifndef GL_IBM_rasterpos_clip
+#define GL_RASTER_POSITION_UNCLIPPED_IBM  0x19262
+#endif
+
+#ifndef GL_HP_texture_lighting
+#define GL_TEXTURE_LIGHTING_MODE_HP       0x8167
+#define GL_TEXTURE_POST_SPECULAR_HP       0x8168
+#define GL_TEXTURE_PRE_SPECULAR_HP        0x8169
+#endif
+
+#ifndef GL_EXT_draw_range_elements
+#define GL_MAX_ELEMENTS_VERTICES_EXT      0x80E8
+#define GL_MAX_ELEMENTS_INDICES_EXT       0x80E9
+#endif
+
+#ifndef GL_WIN_phong_shading
+#define GL_PHONG_WIN                      0x80EA
+#define GL_PHONG_HINT_WIN                 0x80EB
+#endif
+
+#ifndef GL_WIN_specular_fog
+#define GL_FOG_SPECULAR_TEXTURE_WIN       0x80EC
+#endif
+
+#ifndef GL_EXT_light_texture
+#define GL_FRAGMENT_MATERIAL_EXT          0x8349
+#define GL_FRAGMENT_NORMAL_EXT            0x834A
+#define GL_FRAGMENT_COLOR_EXT             0x834C
+#define GL_ATTENUATION_EXT                0x834D
+#define GL_SHADOW_ATTENUATION_EXT         0x834E
+#define GL_TEXTURE_APPLICATION_MODE_EXT   0x834F
+#define GL_TEXTURE_LIGHT_EXT              0x8350
+#define GL_TEXTURE_MATERIAL_FACE_EXT      0x8351
+#define GL_TEXTURE_MATERIAL_PARAMETER_EXT 0x8352
+/* reuse GL_FRAGMENT_DEPTH_EXT */
+#endif
+
+#ifndef GL_SGIX_blend_alpha_minmax
+#define GL_ALPHA_MIN_SGIX                 0x8320
+#define GL_ALPHA_MAX_SGIX                 0x8321
+#endif
+
+#ifndef GL_SGIX_impact_pixel_texture
+#define GL_PIXEL_TEX_GEN_Q_CEILING_SGIX   0x8184
+#define GL_PIXEL_TEX_GEN_Q_ROUND_SGIX     0x8185
+#define GL_PIXEL_TEX_GEN_Q_FLOOR_SGIX     0x8186
+#define GL_PIXEL_TEX_GEN_ALPHA_REPLACE_SGIX 0x8187
+#define GL_PIXEL_TEX_GEN_ALPHA_NO_REPLACE_SGIX 0x8188
+#define GL_PIXEL_TEX_GEN_ALPHA_LS_SGIX    0x8189
+#define GL_PIXEL_TEX_GEN_ALPHA_MS_SGIX    0x818A
+#endif
+
+#ifndef GL_EXT_bgra
+#define GL_BGR_EXT                        0x80E0
+#define GL_BGRA_EXT                       0x80E1
+#endif
+
+#ifndef GL_SGIX_async
+#define GL_ASYNC_MARKER_SGIX              0x8329
+#endif
+
+#ifndef GL_SGIX_async_pixel
+#define GL_ASYNC_TEX_IMAGE_SGIX           0x835C
+#define GL_ASYNC_DRAW_PIXELS_SGIX         0x835D
+#define GL_ASYNC_READ_PIXELS_SGIX         0x835E
+#define GL_MAX_ASYNC_TEX_IMAGE_SGIX       0x835F
+#define GL_MAX_ASYNC_DRAW_PIXELS_SGIX     0x8360
+#define GL_MAX_ASYNC_READ_PIXELS_SGIX     0x8361
+#endif
+
+#ifndef GL_SGIX_async_histogram
+#define GL_ASYNC_HISTOGRAM_SGIX           0x832C
+#define GL_MAX_ASYNC_HISTOGRAM_SGIX       0x832D
+#endif
+
+#ifndef GL_INTEL_texture_scissor
+#endif
+
+#ifndef GL_INTEL_parallel_arrays
+#define GL_PARALLEL_ARRAYS_INTEL          0x83F4
+#define GL_VERTEX_ARRAY_PARALLEL_POINTERS_INTEL 0x83F5
+#define GL_NORMAL_ARRAY_PARALLEL_POINTERS_INTEL 0x83F6
+#define GL_COLOR_ARRAY_PARALLEL_POINTERS_INTEL 0x83F7
+#define GL_TEXTURE_COORD_ARRAY_PARALLEL_POINTERS_INTEL 0x83F8
+#endif
+
+#ifndef GL_HP_occlusion_test
+#define GL_OCCLUSION_TEST_HP              0x8165
+#define GL_OCCLUSION_TEST_RESULT_HP       0x8166
+#endif
+
+#ifndef GL_EXT_pixel_transform
+#define GL_PIXEL_TRANSFORM_2D_EXT         0x8330
+#define GL_PIXEL_MAG_FILTER_EXT           0x8331
+#define GL_PIXEL_MIN_FILTER_EXT           0x8332
+#define GL_PIXEL_CUBIC_WEIGHT_EXT         0x8333
+#define GL_CUBIC_EXT                      0x8334
+#define GL_AVERAGE_EXT                    0x8335
+#define GL_PIXEL_TRANSFORM_2D_STACK_DEPTH_EXT 0x8336
+#define GL_MAX_PIXEL_TRANSFORM_2D_STACK_DEPTH_EXT 0x8337
+#define GL_PIXEL_TRANSFORM_2D_MATRIX_EXT  0x8338
+#endif
+
+#ifndef GL_EXT_pixel_transform_color_table
+#endif
+
+#ifndef GL_EXT_shared_texture_palette
+#define GL_SHARED_TEXTURE_PALETTE_EXT     0x81FB
+#endif
+
+#ifndef GL_EXT_separate_specular_color
+#define GL_LIGHT_MODEL_COLOR_CONTROL_EXT  0x81F8
+#define GL_SINGLE_COLOR_EXT               0x81F9
+#define GL_SEPARATE_SPECULAR_COLOR_EXT    0x81FA
+#endif
+
+#ifndef GL_EXT_secondary_color
+#define GL_COLOR_SUM_EXT                  0x8458
+#define GL_CURRENT_SECONDARY_COLOR_EXT    0x8459
+#define GL_SECONDARY_COLOR_ARRAY_SIZE_EXT 0x845A
+#define GL_SECONDARY_COLOR_ARRAY_TYPE_EXT 0x845B
+#define GL_SECONDARY_COLOR_ARRAY_STRIDE_EXT 0x845C
+#define GL_SECONDARY_COLOR_ARRAY_POINTER_EXT 0x845D
+#define GL_SECONDARY_COLOR_ARRAY_EXT      0x845E
+#endif
+
+#ifndef GL_EXT_texture_perturb_normal
+#define GL_PERTURB_EXT                    0x85AE
+#define GL_TEXTURE_NORMAL_EXT             0x85AF
+#endif
+
+#ifndef GL_EXT_multi_draw_arrays
+#endif
+
+#ifndef GL_EXT_fog_coord
+#define GL_FOG_COORDINATE_SOURCE_EXT      0x8450
+#define GL_FOG_COORDINATE_EXT             0x8451
+#define GL_FRAGMENT_DEPTH_EXT             0x8452
+#define GL_CURRENT_FOG_COORDINATE_EXT     0x8453
+#define GL_FOG_COORDINATE_ARRAY_TYPE_EXT  0x8454
+#define GL_FOG_COORDINATE_ARRAY_STRIDE_EXT 0x8455
+#define GL_FOG_COORDINATE_ARRAY_POINTER_EXT 0x8456
+#define GL_FOG_COORDINATE_ARRAY_EXT       0x8457
+#endif
+
+#ifndef GL_REND_screen_coordinates
+#define GL_SCREEN_COORDINATES_REND        0x8490
+#define GL_INVERTED_SCREEN_W_REND         0x8491
+#endif
+
+#ifndef GL_EXT_coordinate_frame
+#define GL_TANGENT_ARRAY_EXT              0x8439
+#define GL_BINORMAL_ARRAY_EXT             0x843A
+#define GL_CURRENT_TANGENT_EXT            0x843B
+#define GL_CURRENT_BINORMAL_EXT           0x843C
+#define GL_TANGENT_ARRAY_TYPE_EXT         0x843E
+#define GL_TANGENT_ARRAY_STRIDE_EXT       0x843F
+#define GL_BINORMAL_ARRAY_TYPE_EXT        0x8440
+#define GL_BINORMAL_ARRAY_STRIDE_EXT      0x8441
+#define GL_TANGENT_ARRAY_POINTER_EXT      0x8442
+#define GL_BINORMAL_ARRAY_POINTER_EXT     0x8443
+#define GL_MAP1_TANGENT_EXT               0x8444
+#define GL_MAP2_TANGENT_EXT               0x8445
+#define GL_MAP1_BINORMAL_EXT              0x8446
+#define GL_MAP2_BINORMAL_EXT              0x8447
+#endif
+
+#ifndef GL_EXT_texture_env_combine
+#define GL_COMBINE_EXT                    0x8570
+#define GL_COMBINE_RGB_EXT                0x8571
+#define GL_COMBINE_ALPHA_EXT              0x8572
+#define GL_RGB_SCALE_EXT                  0x8573
+#define GL_ADD_SIGNED_EXT                 0x8574
+#define GL_INTERPOLATE_EXT                0x8575
+#define GL_CONSTANT_EXT                   0x8576
+#define GL_PRIMARY_COLOR_EXT              0x8577
+#define GL_PREVIOUS_EXT                   0x8578
+#define GL_SOURCE0_RGB_EXT                0x8580
+#define GL_SOURCE1_RGB_EXT                0x8581
+#define GL_SOURCE2_RGB_EXT                0x8582
+#define GL_SOURCE0_ALPHA_EXT              0x8588
+#define GL_SOURCE1_ALPHA_EXT              0x8589
+#define GL_SOURCE2_ALPHA_EXT              0x858A
+#define GL_OPERAND0_RGB_EXT               0x8590
+#define GL_OPERAND1_RGB_EXT               0x8591
+#define GL_OPERAND2_RGB_EXT               0x8592
+#define GL_OPERAND0_ALPHA_EXT             0x8598
+#define GL_OPERAND1_ALPHA_EXT             0x8599
+#define GL_OPERAND2_ALPHA_EXT             0x859A
+#endif
+
+#ifndef GL_APPLE_specular_vector
+#define GL_LIGHT_MODEL_SPECULAR_VECTOR_APPLE 0x85B0
+#endif
+
+#ifndef GL_APPLE_transform_hint
+#define GL_TRANSFORM_HINT_APPLE           0x85B1
+#endif
+
+#ifndef GL_SGIX_fog_scale
+#define GL_FOG_SCALE_SGIX                 0x81FC
+#define GL_FOG_SCALE_VALUE_SGIX           0x81FD
+#endif
+
+#ifndef GL_SUNX_constant_data
+#define GL_UNPACK_CONSTANT_DATA_SUNX      0x81D5
+#define GL_TEXTURE_CONSTANT_DATA_SUNX     0x81D6
+#endif
+
+#ifndef GL_SUN_global_alpha
+#define GL_GLOBAL_ALPHA_SUN               0x81D9
+#define GL_GLOBAL_ALPHA_FACTOR_SUN        0x81DA
+#endif
+
+#ifndef GL_SUN_triangle_list
+#define GL_RESTART_SUN                    0x0001
+#define GL_REPLACE_MIDDLE_SUN             0x0002
+#define GL_REPLACE_OLDEST_SUN             0x0003
+#define GL_TRIANGLE_LIST_SUN              0x81D7
+#define GL_REPLACEMENT_CODE_SUN           0x81D8
+#define GL_REPLACEMENT_CODE_ARRAY_SUN     0x85C0
+#define GL_REPLACEMENT_CODE_ARRAY_TYPE_SUN 0x85C1
+#define GL_REPLACEMENT_CODE_ARRAY_STRIDE_SUN 0x85C2
+#define GL_REPLACEMENT_CODE_ARRAY_POINTER_SUN 0x85C3
+#define GL_R1UI_V3F_SUN                   0x85C4
+#define GL_R1UI_C4UB_V3F_SUN              0x85C5
+#define GL_R1UI_C3F_V3F_SUN               0x85C6
+#define GL_R1UI_N3F_V3F_SUN               0x85C7
+#define GL_R1UI_C4F_N3F_V3F_SUN           0x85C8
+#define GL_R1UI_T2F_V3F_SUN               0x85C9
+#define GL_R1UI_T2F_N3F_V3F_SUN           0x85CA
+#define GL_R1UI_T2F_C4F_N3F_V3F_SUN       0x85CB
+#endif
+
+#ifndef GL_SUN_vertex
+#endif
+
+#ifndef GL_EXT_blend_func_separate
+#define GL_BLEND_DST_RGB_EXT              0x80C8
+#define GL_BLEND_SRC_RGB_EXT              0x80C9
+#define GL_BLEND_DST_ALPHA_EXT            0x80CA
+#define GL_BLEND_SRC_ALPHA_EXT            0x80CB
+#endif
+
+#ifndef GL_INGR_color_clamp
+#define GL_RED_MIN_CLAMP_INGR             0x8560
+#define GL_GREEN_MIN_CLAMP_INGR           0x8561
+#define GL_BLUE_MIN_CLAMP_INGR            0x8562
+#define GL_ALPHA_MIN_CLAMP_INGR           0x8563
+#define GL_RED_MAX_CLAMP_INGR             0x8564
+#define GL_GREEN_MAX_CLAMP_INGR           0x8565
+#define GL_BLUE_MAX_CLAMP_INGR            0x8566
+#define GL_ALPHA_MAX_CLAMP_INGR           0x8567
+#endif
+
+#ifndef GL_INGR_interlace_read
+#define GL_INTERLACE_READ_INGR            0x8568
+#endif
+
+#ifndef GL_EXT_stencil_wrap
+#define GL_INCR_WRAP_EXT                  0x8507
+#define GL_DECR_WRAP_EXT                  0x8508
+#endif
+
+#ifndef GL_EXT_422_pixels
+#define GL_422_EXT                        0x80CC
+#define GL_422_REV_EXT                    0x80CD
+#define GL_422_AVERAGE_EXT                0x80CE
+#define GL_422_REV_AVERAGE_EXT            0x80CF
+#endif
+
+#ifndef GL_NV_texgen_reflection
+#define GL_NORMAL_MAP_NV                  0x8511
+#define GL_REFLECTION_MAP_NV              0x8512
+#endif
+
+#ifndef GL_EXT_texture_cube_map
+#define GL_NORMAL_MAP_EXT                 0x8511
+#define GL_REFLECTION_MAP_EXT             0x8512
+#define GL_TEXTURE_CUBE_MAP_EXT           0x8513
+#define GL_TEXTURE_BINDING_CUBE_MAP_EXT   0x8514
+#define GL_TEXTURE_CUBE_MAP_POSITIVE_X_EXT 0x8515
+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X_EXT 0x8516
+#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y_EXT 0x8517
+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_EXT 0x8518
+#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z_EXT 0x8519
+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_EXT 0x851A
+#define GL_PROXY_TEXTURE_CUBE_MAP_EXT     0x851B
+#define GL_MAX_CUBE_MAP_TEXTURE_SIZE_EXT  0x851C
+#endif
+
+#ifndef GL_SUN_convolution_border_modes
+#define GL_WRAP_BORDER_SUN                0x81D4
+#endif
+
+#ifndef GL_EXT_texture_env_add
+#endif
+
+#ifndef GL_EXT_texture_lod_bias
+#define GL_MAX_TEXTURE_LOD_BIAS_EXT       0x84FD
+#define GL_TEXTURE_FILTER_CONTROL_EXT     0x8500
+#define GL_TEXTURE_LOD_BIAS_EXT           0x8501
+#endif
+
+#ifndef GL_EXT_texture_filter_anisotropic
+#define GL_TEXTURE_MAX_ANISOTROPY_EXT     0x84FE
+#define GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT 0x84FF
+#endif
+
+#ifndef GL_EXT_vertex_weighting
+#define GL_MODELVIEW0_STACK_DEPTH_EXT     GL_MODELVIEW_STACK_DEPTH
+#define GL_MODELVIEW1_STACK_DEPTH_EXT     0x8502
+#define GL_MODELVIEW0_MATRIX_EXT          GL_MODELVIEW_MATRIX
+#define GL_MODELVIEW1_MATRIX_EXT          0x8506
+#define GL_VERTEX_WEIGHTING_EXT           0x8509
+#define GL_MODELVIEW0_EXT                 GL_MODELVIEW
+#define GL_MODELVIEW1_EXT                 0x850A
+#define GL_CURRENT_VERTEX_WEIGHT_EXT      0x850B
+#define GL_VERTEX_WEIGHT_ARRAY_EXT        0x850C
+#define GL_VERTEX_WEIGHT_ARRAY_SIZE_EXT   0x850D
+#define GL_VERTEX_WEIGHT_ARRAY_TYPE_EXT   0x850E
+#define GL_VERTEX_WEIGHT_ARRAY_STRIDE_EXT 0x850F
+#define GL_VERTEX_WEIGHT_ARRAY_POINTER_EXT 0x8510
+#endif
+
+#ifndef GL_NV_light_max_exponent
+#define GL_MAX_SHININESS_NV               0x8504
+#define GL_MAX_SPOT_EXPONENT_NV           0x8505
+#endif
+
+#ifndef GL_NV_vertex_array_range
+#define GL_VERTEX_ARRAY_RANGE_NV          0x851D
+#define GL_VERTEX_ARRAY_RANGE_LENGTH_NV   0x851E
+#define GL_VERTEX_ARRAY_RANGE_VALID_NV    0x851F
+#define GL_MAX_VERTEX_ARRAY_RANGE_ELEMENT_NV 0x8520
+#define GL_VERTEX_ARRAY_RANGE_POINTER_NV  0x8521
+#endif
+
+#ifndef GL_NV_register_combiners
+#define GL_REGISTER_COMBINERS_NV          0x8522
+#define GL_VARIABLE_A_NV                  0x8523
+#define GL_VARIABLE_B_NV                  0x8524
+#define GL_VARIABLE_C_NV                  0x8525
+#define GL_VARIABLE_D_NV                  0x8526
+#define GL_VARIABLE_E_NV                  0x8527
+#define GL_VARIABLE_F_NV                  0x8528
+#define GL_VARIABLE_G_NV                  0x8529
+#define GL_CONSTANT_COLOR0_NV             0x852A
+#define GL_CONSTANT_COLOR1_NV             0x852B
+#define GL_PRIMARY_COLOR_NV               0x852C
+#define GL_SECONDARY_COLOR_NV             0x852D
+#define GL_SPARE0_NV                      0x852E
+#define GL_SPARE1_NV                      0x852F
+#define GL_DISCARD_NV                     0x8530
+#define GL_E_TIMES_F_NV                   0x8531
+#define GL_SPARE0_PLUS_SECONDARY_COLOR_NV 0x8532
+#define GL_UNSIGNED_IDENTITY_NV           0x8536
+#define GL_UNSIGNED_INVERT_NV             0x8537
+#define GL_EXPAND_NORMAL_NV               0x8538
+#define GL_EXPAND_NEGATE_NV               0x8539
+#define GL_HALF_BIAS_NORMAL_NV            0x853A
+#define GL_HALF_BIAS_NEGATE_NV            0x853B
+#define GL_SIGNED_IDENTITY_NV             0x853C
+#define GL_SIGNED_NEGATE_NV               0x853D
+#define GL_SCALE_BY_TWO_NV                0x853E
+#define GL_SCALE_BY_FOUR_NV               0x853F
+#define GL_SCALE_BY_ONE_HALF_NV           0x8540
+#define GL_BIAS_BY_NEGATIVE_ONE_HALF_NV   0x8541
+#define GL_COMBINER_INPUT_NV              0x8542
+#define GL_COMBINER_MAPPING_NV            0x8543
+#define GL_COMBINER_COMPONENT_USAGE_NV    0x8544
+#define GL_COMBINER_AB_DOT_PRODUCT_NV     0x8545
+#define GL_COMBINER_CD_DOT_PRODUCT_NV     0x8546
+#define GL_COMBINER_MUX_SUM_NV            0x8547
+#define GL_COMBINER_SCALE_NV              0x8548
+#define GL_COMBINER_BIAS_NV               0x8549
+#define GL_COMBINER_AB_OUTPUT_NV          0x854A
+#define GL_COMBINER_CD_OUTPUT_NV          0x854B
+#define GL_COMBINER_SUM_OUTPUT_NV         0x854C
+#define GL_MAX_GENERAL_COMBINERS_NV       0x854D
+#define GL_NUM_GENERAL_COMBINERS_NV       0x854E
+#define GL_COLOR_SUM_CLAMP_NV             0x854F
+#define GL_COMBINER0_NV                   0x8550
+#define GL_COMBINER1_NV                   0x8551
+#define GL_COMBINER2_NV                   0x8552
+#define GL_COMBINER3_NV                   0x8553
+#define GL_COMBINER4_NV                   0x8554
+#define GL_COMBINER5_NV                   0x8555
+#define GL_COMBINER6_NV                   0x8556
+#define GL_COMBINER7_NV                   0x8557
+/* reuse GL_TEXTURE0_ARB */
+/* reuse GL_TEXTURE1_ARB */
+/* reuse GL_ZERO */
+/* reuse GL_NONE */
+/* reuse GL_FOG */
+#endif
+
+#ifndef GL_NV_fog_distance
+#define GL_FOG_DISTANCE_MODE_NV           0x855A
+#define GL_EYE_RADIAL_NV                  0x855B
+#define GL_EYE_PLANE_ABSOLUTE_NV          0x855C
+/* reuse GL_EYE_PLANE */
+#endif
+
+#ifndef GL_NV_texgen_emboss
+#define GL_EMBOSS_LIGHT_NV                0x855D
+#define GL_EMBOSS_CONSTANT_NV             0x855E
+#define GL_EMBOSS_MAP_NV                  0x855F
+#endif
+
+#ifndef GL_NV_blend_square
+#endif
+
+#ifndef GL_NV_texture_env_combine4
+#define GL_COMBINE4_NV                    0x8503
+#define GL_SOURCE3_RGB_NV                 0x8583
+#define GL_SOURCE3_ALPHA_NV               0x858B
+#define GL_OPERAND3_RGB_NV                0x8593
+#define GL_OPERAND3_ALPHA_NV              0x859B
+#endif
+
+#ifndef GL_MESA_resize_buffers
+#endif
+
+#ifndef GL_MESA_window_pos
+#endif
+
+#ifndef GL_EXT_texture_compression_s3tc
+#define GL_COMPRESSED_RGB_S3TC_DXT1_EXT   0x83F0
+#define GL_COMPRESSED_RGBA_S3TC_DXT1_EXT  0x83F1
+#define GL_COMPRESSED_RGBA_S3TC_DXT3_EXT  0x83F2
+#define GL_COMPRESSED_RGBA_S3TC_DXT5_EXT  0x83F3
+#endif
+
+#ifndef GL_IBM_cull_vertex
+#define GL_CULL_VERTEX_IBM                103050
+#endif
+
+#ifndef GL_IBM_multimode_draw_arrays
+#endif
+
+#ifndef GL_IBM_vertex_array_lists
+#define GL_VERTEX_ARRAY_LIST_IBM          103070
+#define GL_NORMAL_ARRAY_LIST_IBM          103071
+#define GL_COLOR_ARRAY_LIST_IBM           103072
+#define GL_INDEX_ARRAY_LIST_IBM           103073
+#define GL_TEXTURE_COORD_ARRAY_LIST_IBM   103074
+#define GL_EDGE_FLAG_ARRAY_LIST_IBM       103075
+#define GL_FOG_COORDINATE_ARRAY_LIST_IBM  103076
+#define GL_SECONDARY_COLOR_ARRAY_LIST_IBM 103077
+#define GL_VERTEX_ARRAY_LIST_STRIDE_IBM   103080
+#define GL_NORMAL_ARRAY_LIST_STRIDE_IBM   103081
+#define GL_COLOR_ARRAY_LIST_STRIDE_IBM    103082
+#define GL_INDEX_ARRAY_LIST_STRIDE_IBM    103083
+#define GL_TEXTURE_COORD_ARRAY_LIST_STRIDE_IBM 103084
+#define GL_EDGE_FLAG_ARRAY_LIST_STRIDE_IBM 103085
+#define GL_FOG_COORDINATE_ARRAY_LIST_STRIDE_IBM 103086
+#define GL_SECONDARY_COLOR_ARRAY_LIST_STRIDE_IBM 103087
+#endif
+
+#ifndef GL_SGIX_subsample
+#define GL_PACK_SUBSAMPLE_RATE_SGIX       0x85A0
+#define GL_UNPACK_SUBSAMPLE_RATE_SGIX     0x85A1
+#define GL_PIXEL_SUBSAMPLE_4444_SGIX      0x85A2
+#define GL_PIXEL_SUBSAMPLE_2424_SGIX      0x85A3
+#define GL_PIXEL_SUBSAMPLE_4242_SGIX      0x85A4
+#endif
+
+#ifndef GL_SGIX_ycrcb_subsample
+#endif
+
+#ifndef GL_SGIX_ycrcba
+#define GL_YCRCB_SGIX                     0x8318
+#define GL_YCRCBA_SGIX                    0x8319
+#endif
+
+#ifndef GL_SGI_depth_pass_instrument
+#define GL_DEPTH_PASS_INSTRUMENT_SGIX     0x8310
+#define GL_DEPTH_PASS_INSTRUMENT_COUNTERS_SGIX 0x8311
+#define GL_DEPTH_PASS_INSTRUMENT_MAX_SGIX 0x8312
+#endif
+
+#ifndef GL_3DFX_texture_compression_FXT1
+#define GL_COMPRESSED_RGB_FXT1_3DFX       0x86B0
+#define GL_COMPRESSED_RGBA_FXT1_3DFX      0x86B1
+#endif
+
+#ifndef GL_3DFX_multisample
+#define GL_MULTISAMPLE_3DFX               0x86B2
+#define GL_SAMPLE_BUFFERS_3DFX            0x86B3
+#define GL_SAMPLES_3DFX                   0x86B4
+#define GL_MULTISAMPLE_BIT_3DFX           0x20000000
+#endif
+
+#ifndef GL_3DFX_tbuffer
+#endif
+
+#ifndef GL_EXT_multisample
+#define GL_MULTISAMPLE_EXT                0x809D
+#define GL_SAMPLE_ALPHA_TO_MASK_EXT       0x809E
+#define GL_SAMPLE_ALPHA_TO_ONE_EXT        0x809F
+#define GL_SAMPLE_MASK_EXT                0x80A0
+#define GL_1PASS_EXT                      0x80A1
+#define GL_2PASS_0_EXT                    0x80A2
+#define GL_2PASS_1_EXT                    0x80A3
+#define GL_4PASS_0_EXT                    0x80A4
+#define GL_4PASS_1_EXT                    0x80A5
+#define GL_4PASS_2_EXT                    0x80A6
+#define GL_4PASS_3_EXT                    0x80A7
+#define GL_SAMPLE_BUFFERS_EXT             0x80A8
+#define GL_SAMPLES_EXT                    0x80A9
+#define GL_SAMPLE_MASK_VALUE_EXT          0x80AA
+#define GL_SAMPLE_MASK_INVERT_EXT         0x80AB
+#define GL_SAMPLE_PATTERN_EXT             0x80AC
+#define GL_MULTISAMPLE_BIT_EXT            0x20000000
+#endif
+
+#ifndef GL_SGIX_vertex_preclip
+#define GL_VERTEX_PRECLIP_SGIX            0x83EE
+#define GL_VERTEX_PRECLIP_HINT_SGIX       0x83EF
+#endif
+
+#ifndef GL_SGIX_convolution_accuracy
+#define GL_CONVOLUTION_HINT_SGIX          0x8316
+#endif
+
+#ifndef GL_SGIX_resample
+#define GL_PACK_RESAMPLE_SGIX             0x842C
+#define GL_UNPACK_RESAMPLE_SGIX           0x842D
+#define GL_RESAMPLE_REPLICATE_SGIX        0x842E
+#define GL_RESAMPLE_ZERO_FILL_SGIX        0x842F
+#define GL_RESAMPLE_DECIMATE_SGIX         0x8430
+#endif
+
+#ifndef GL_SGIS_point_line_texgen
+#define GL_EYE_DISTANCE_TO_POINT_SGIS     0x81F0
+#define GL_OBJECT_DISTANCE_TO_POINT_SGIS  0x81F1
+#define GL_EYE_DISTANCE_TO_LINE_SGIS      0x81F2
+#define GL_OBJECT_DISTANCE_TO_LINE_SGIS   0x81F3
+#define GL_EYE_POINT_SGIS                 0x81F4
+#define GL_OBJECT_POINT_SGIS              0x81F5
+#define GL_EYE_LINE_SGIS                  0x81F6
+#define GL_OBJECT_LINE_SGIS               0x81F7
+#endif
+
+#ifndef GL_SGIS_texture_color_mask
+#define GL_TEXTURE_COLOR_WRITEMASK_SGIS   0x81EF
+#endif
+
+#ifndef GL_EXT_texture_env_dot3
+#define GL_DOT3_RGB_EXT                   0x8740
+#define GL_DOT3_RGBA_EXT                  0x8741
+#endif
+
+#ifndef GL_ATI_texture_mirror_once
+#define GL_MIRROR_CLAMP_ATI               0x8742
+#define GL_MIRROR_CLAMP_TO_EDGE_ATI       0x8743
+#endif
+
+#ifndef GL_NV_fence
+#define GL_ALL_COMPLETED_NV               0x84F2
+#define GL_FENCE_STATUS_NV                0x84F3
+#define GL_FENCE_CONDITION_NV             0x84F4
+#endif
+
+#ifndef GL_IBM_texture_mirrored_repeat
+#define GL_MIRRORED_REPEAT_IBM            0x8370
+#endif
+
+#ifndef GL_NV_evaluators
+#define GL_EVAL_2D_NV                     0x86C0
+#define GL_EVAL_TRIANGULAR_2D_NV          0x86C1
+#define GL_MAP_TESSELLATION_NV            0x86C2
+#define GL_MAP_ATTRIB_U_ORDER_NV          0x86C3
+#define GL_MAP_ATTRIB_V_ORDER_NV          0x86C4
+#define GL_EVAL_FRACTIONAL_TESSELLATION_NV 0x86C5
+#define GL_EVAL_VERTEX_ATTRIB0_NV         0x86C6
+#define GL_EVAL_VERTEX_ATTRIB1_NV         0x86C7
+#define GL_EVAL_VERTEX_ATTRIB2_NV         0x86C8
+#define GL_EVAL_VERTEX_ATTRIB3_NV         0x86C9
+#define GL_EVAL_VERTEX_ATTRIB4_NV         0x86CA
+#define GL_EVAL_VERTEX_ATTRIB5_NV         0x86CB
+#define GL_EVAL_VERTEX_ATTRIB6_NV         0x86CC
+#define GL_EVAL_VERTEX_ATTRIB7_NV         0x86CD
+#define GL_EVAL_VERTEX_ATTRIB8_NV         0x86CE
+#define GL_EVAL_VERTEX_ATTRIB9_NV         0x86CF
+#define GL_EVAL_VERTEX_ATTRIB10_NV        0x86D0
+#define GL_EVAL_VERTEX_ATTRIB11_NV        0x86D1
+#define GL_EVAL_VERTEX_ATTRIB12_NV        0x86D2
+#define GL_EVAL_VERTEX_ATTRIB13_NV        0x86D3
+#define GL_EVAL_VERTEX_ATTRIB14_NV        0x86D4
+#define GL_EVAL_VERTEX_ATTRIB15_NV        0x86D5
+#define GL_MAX_MAP_TESSELLATION_NV        0x86D6
+#define GL_MAX_RATIONAL_EVAL_ORDER_NV     0x86D7
+#endif
+
+#ifndef GL_NV_packed_depth_stencil
+#define GL_DEPTH_STENCIL_NV               0x84F9
+#define GL_UNSIGNED_INT_24_8_NV           0x84FA
+#endif
+
+#ifndef GL_NV_register_combiners2
+#define GL_PER_STAGE_CONSTANTS_NV         0x8535
+#endif
+
+#ifndef GL_NV_texture_compression_vtc
+#endif
+
+#ifndef GL_NV_texture_rectangle
+#define GL_TEXTURE_RECTANGLE_NV           0x84F5
+#define GL_TEXTURE_BINDING_RECTANGLE_NV   0x84F6
+#define GL_PROXY_TEXTURE_RECTANGLE_NV     0x84F7
+#define GL_MAX_RECTANGLE_TEXTURE_SIZE_NV  0x84F8
+#endif
+
+#ifndef GL_NV_texture_shader
+#define GL_OFFSET_TEXTURE_RECTANGLE_NV    0x864C
+#define GL_OFFSET_TEXTURE_RECTANGLE_SCALE_NV 0x864D
+#define GL_DOT_PRODUCT_TEXTURE_RECTANGLE_NV 0x864E
+#define GL_RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV 0x86D9
+#define GL_UNSIGNED_INT_S8_S8_8_8_NV      0x86DA
+#define GL_UNSIGNED_INT_8_8_S8_S8_REV_NV  0x86DB
+#define GL_DSDT_MAG_INTENSITY_NV          0x86DC
+#define GL_SHADER_CONSISTENT_NV           0x86DD
+#define GL_TEXTURE_SHADER_NV              0x86DE
+#define GL_SHADER_OPERATION_NV            0x86DF
+#define GL_CULL_MODES_NV                  0x86E0
+#define GL_OFFSET_TEXTURE_MATRIX_NV       0x86E1
+#define GL_OFFSET_TEXTURE_SCALE_NV        0x86E2
+#define GL_OFFSET_TEXTURE_BIAS_NV         0x86E3
+#define GL_OFFSET_TEXTURE_2D_MATRIX_NV    GL_OFFSET_TEXTURE_MATRIX_NV
+#define GL_OFFSET_TEXTURE_2D_SCALE_NV     GL_OFFSET_TEXTURE_SCALE_NV
+#define GL_OFFSET_TEXTURE_2D_BIAS_NV      GL_OFFSET_TEXTURE_BIAS_NV
+#define GL_PREVIOUS_TEXTURE_INPUT_NV      0x86E4
+#define GL_CONST_EYE_NV                   0x86E5
+#define GL_PASS_THROUGH_NV                0x86E6
+#define GL_CULL_FRAGMENT_NV               0x86E7
+#define GL_OFFSET_TEXTURE_2D_NV           0x86E8
+#define GL_DEPENDENT_AR_TEXTURE_2D_NV     0x86E9
+#define GL_DEPENDENT_GB_TEXTURE_2D_NV     0x86EA
+#define GL_DOT_PRODUCT_NV                 0x86EC
+#define GL_DOT_PRODUCT_DEPTH_REPLACE_NV   0x86ED
+#define GL_DOT_PRODUCT_TEXTURE_2D_NV      0x86EE
+#define GL_DOT_PRODUCT_TEXTURE_CUBE_MAP_NV 0x86F0
+#define GL_DOT_PRODUCT_DIFFUSE_CUBE_MAP_NV 0x86F1
+#define GL_DOT_PRODUCT_REFLECT_CUBE_MAP_NV 0x86F2
+#define GL_DOT_PRODUCT_CONST_EYE_REFLECT_CUBE_MAP_NV 0x86F3
+#define GL_HILO_NV                        0x86F4
+#define GL_DSDT_NV                        0x86F5
+#define GL_DSDT_MAG_NV                    0x86F6
+#define GL_DSDT_MAG_VIB_NV                0x86F7
+#define GL_HILO16_NV                      0x86F8
+#define GL_SIGNED_HILO_NV                 0x86F9
+#define GL_SIGNED_HILO16_NV               0x86FA
+#define GL_SIGNED_RGBA_NV                 0x86FB
+#define GL_SIGNED_RGBA8_NV                0x86FC
+#define GL_SIGNED_RGB_NV                  0x86FE
+#define GL_SIGNED_RGB8_NV                 0x86FF
+#define GL_SIGNED_LUMINANCE_NV            0x8701
+#define GL_SIGNED_LUMINANCE8_NV           0x8702
+#define GL_SIGNED_LUMINANCE_ALPHA_NV      0x8703
+#define GL_SIGNED_LUMINANCE8_ALPHA8_NV    0x8704
+#define GL_SIGNED_ALPHA_NV                0x8705
+#define GL_SIGNED_ALPHA8_NV               0x8706
+#define GL_SIGNED_INTENSITY_NV            0x8707
+#define GL_SIGNED_INTENSITY8_NV           0x8708
+#define GL_DSDT8_NV                       0x8709
+#define GL_DSDT8_MAG8_NV                  0x870A
+#define GL_DSDT8_MAG8_INTENSITY8_NV       0x870B
+#define GL_SIGNED_RGB_UNSIGNED_ALPHA_NV   0x870C
+#define GL_SIGNED_RGB8_UNSIGNED_ALPHA8_NV 0x870D
+#define GL_HI_SCALE_NV                    0x870E
+#define GL_LO_SCALE_NV                    0x870F
+#define GL_DS_SCALE_NV                    0x8710
+#define GL_DT_SCALE_NV                    0x8711
+#define GL_MAGNITUDE_SCALE_NV             0x8712
+#define GL_VIBRANCE_SCALE_NV              0x8713
+#define GL_HI_BIAS_NV                     0x8714
+#define GL_LO_BIAS_NV                     0x8715
+#define GL_DS_BIAS_NV                     0x8716
+#define GL_DT_BIAS_NV                     0x8717
+#define GL_MAGNITUDE_BIAS_NV              0x8718
+#define GL_VIBRANCE_BIAS_NV               0x8719
+#define GL_TEXTURE_BORDER_VALUES_NV       0x871A
+#define GL_TEXTURE_HI_SIZE_NV             0x871B
+#define GL_TEXTURE_LO_SIZE_NV             0x871C
+#define GL_TEXTURE_DS_SIZE_NV             0x871D
+#define GL_TEXTURE_DT_SIZE_NV             0x871E
+#define GL_TEXTURE_MAG_SIZE_NV            0x871F
+#endif
+
+#ifndef GL_NV_texture_shader2
+#define GL_DOT_PRODUCT_TEXTURE_3D_NV      0x86EF
+#endif
+
+#ifndef GL_NV_vertex_array_range2
+#define GL_VERTEX_ARRAY_RANGE_WITHOUT_FLUSH_NV 0x8533
+#endif
+
+#ifndef GL_NV_vertex_program
+#define GL_VERTEX_PROGRAM_NV              0x8620
+#define GL_VERTEX_STATE_PROGRAM_NV        0x8621
+#define GL_ATTRIB_ARRAY_SIZE_NV           0x8623
+#define GL_ATTRIB_ARRAY_STRIDE_NV         0x8624
+#define GL_ATTRIB_ARRAY_TYPE_NV           0x8625
+#define GL_CURRENT_ATTRIB_NV              0x8626
+#define GL_PROGRAM_LENGTH_NV              0x8627
+#define GL_PROGRAM_STRING_NV              0x8628
+#define GL_MODELVIEW_PROJECTION_NV        0x8629
+#define GL_IDENTITY_NV                    0x862A
+#define GL_INVERSE_NV                     0x862B
+#define GL_TRANSPOSE_NV                   0x862C
+#define GL_INVERSE_TRANSPOSE_NV           0x862D
+#define GL_MAX_TRACK_MATRIX_STACK_DEPTH_NV 0x862E
+#define GL_MAX_TRACK_MATRICES_NV          0x862F
+#define GL_MATRIX0_NV                     0x8630
+#define GL_MATRIX1_NV                     0x8631
+#define GL_MATRIX2_NV                     0x8632
+#define GL_MATRIX3_NV                     0x8633
+#define GL_MATRIX4_NV                     0x8634
+#define GL_MATRIX5_NV                     0x8635
+#define GL_MATRIX6_NV                     0x8636
+#define GL_MATRIX7_NV                     0x8637
+#define GL_CURRENT_MATRIX_STACK_DEPTH_NV  0x8640
+#define GL_CURRENT_MATRIX_NV              0x8641
+#define GL_VERTEX_PROGRAM_POINT_SIZE_NV   0x8642
+#define GL_VERTEX_PROGRAM_TWO_SIDE_NV     0x8643
+#define GL_PROGRAM_PARAMETER_NV           0x8644
+#define GL_ATTRIB_ARRAY_POINTER_NV        0x8645
+#define GL_PROGRAM_TARGET_NV              0x8646
+#define GL_PROGRAM_RESIDENT_NV            0x8647
+#define GL_TRACK_MATRIX_NV                0x8648
+#define GL_TRACK_MATRIX_TRANSFORM_NV      0x8649
+#define GL_VERTEX_PROGRAM_BINDING_NV      0x864A
+#define GL_PROGRAM_ERROR_POSITION_NV      0x864B
+#define GL_VERTEX_ATTRIB_ARRAY0_NV        0x8650
+#define GL_VERTEX_ATTRIB_ARRAY1_NV        0x8651
+#define GL_VERTEX_ATTRIB_ARRAY2_NV        0x8652
+#define GL_VERTEX_ATTRIB_ARRAY3_NV        0x8653
+#define GL_VERTEX_ATTRIB_ARRAY4_NV        0x8654
+#define GL_VERTEX_ATTRIB_ARRAY5_NV        0x8655
+#define GL_VERTEX_ATTRIB_ARRAY6_NV        0x8656
+#define GL_VERTEX_ATTRIB_ARRAY7_NV        0x8657
+#define GL_VERTEX_ATTRIB_ARRAY8_NV        0x8658
+#define GL_VERTEX_ATTRIB_ARRAY9_NV        0x8659
+#define GL_VERTEX_ATTRIB_ARRAY10_NV       0x865A
+#define GL_VERTEX_ATTRIB_ARRAY11_NV       0x865B
+#define GL_VERTEX_ATTRIB_ARRAY12_NV       0x865C
+#define GL_VERTEX_ATTRIB_ARRAY13_NV       0x865D
+#define GL_VERTEX_ATTRIB_ARRAY14_NV       0x865E
+#define GL_VERTEX_ATTRIB_ARRAY15_NV       0x865F
+#define GL_MAP1_VERTEX_ATTRIB0_4_NV       0x8660
+#define GL_MAP1_VERTEX_ATTRIB1_4_NV       0x8661
+#define GL_MAP1_VERTEX_ATTRIB2_4_NV       0x8662
+#define GL_MAP1_VERTEX_ATTRIB3_4_NV       0x8663
+#define GL_MAP1_VERTEX_ATTRIB4_4_NV       0x8664
+#define GL_MAP1_VERTEX_ATTRIB5_4_NV       0x8665
+#define GL_MAP1_VERTEX_ATTRIB6_4_NV       0x8666
+#define GL_MAP1_VERTEX_ATTRIB7_4_NV       0x8667
+#define GL_MAP1_VERTEX_ATTRIB8_4_NV       0x8668
+#define GL_MAP1_VERTEX_ATTRIB9_4_NV       0x8669
+#define GL_MAP1_VERTEX_ATTRIB10_4_NV      0x866A
+#define GL_MAP1_VERTEX_ATTRIB11_4_NV      0x866B
+#define GL_MAP1_VERTEX_ATTRIB12_4_NV      0x866C
+#define GL_MAP1_VERTEX_ATTRIB13_4_NV      0x866D
+#define GL_MAP1_VERTEX_ATTRIB14_4_NV      0x866E
+#define GL_MAP1_VERTEX_ATTRIB15_4_NV      0x866F
+#define GL_MAP2_VERTEX_ATTRIB0_4_NV       0x8670
+#define GL_MAP2_VERTEX_ATTRIB1_4_NV       0x8671
+#define GL_MAP2_VERTEX_ATTRIB2_4_NV       0x8672
+#define GL_MAP2_VERTEX_ATTRIB3_4_NV       0x8673
+#define GL_MAP2_VERTEX_ATTRIB4_4_NV       0x8674
+#define GL_MAP2_VERTEX_ATTRIB5_4_NV       0x8675
+#define GL_MAP2_VERTEX_ATTRIB6_4_NV       0x8676
+#define GL_MAP2_VERTEX_ATTRIB7_4_NV       0x8677
+#define GL_MAP2_VERTEX_ATTRIB8_4_NV       0x8678
+#define GL_MAP2_VERTEX_ATTRIB9_4_NV       0x8679
+#define GL_MAP2_VERTEX_ATTRIB10_4_NV      0x867A
+#define GL_MAP2_VERTEX_ATTRIB11_4_NV      0x867B
+#define GL_MAP2_VERTEX_ATTRIB12_4_NV      0x867C
+#define GL_MAP2_VERTEX_ATTRIB13_4_NV      0x867D
+#define GL_MAP2_VERTEX_ATTRIB14_4_NV      0x867E
+#define GL_MAP2_VERTEX_ATTRIB15_4_NV      0x867F
+#endif
+
+#ifndef GL_SGIX_texture_coordinate_clamp
+#define GL_TEXTURE_MAX_CLAMP_S_SGIX       0x8369
+#define GL_TEXTURE_MAX_CLAMP_T_SGIX       0x836A
+#define GL_TEXTURE_MAX_CLAMP_R_SGIX       0x836B
+#endif
+
+#ifndef GL_SGIX_scalebias_hint
+#define GL_SCALEBIAS_HINT_SGIX            0x8322
+#endif
+
+#ifndef GL_OML_interlace
+#define GL_INTERLACE_OML                  0x8980
+#define GL_INTERLACE_READ_OML             0x8981
+#endif
+
+#ifndef GL_OML_subsample
+#define GL_FORMAT_SUBSAMPLE_24_24_OML     0x8982
+#define GL_FORMAT_SUBSAMPLE_244_244_OML   0x8983
+#endif
+
+#ifndef GL_OML_resample
+#define GL_PACK_RESAMPLE_OML              0x8984
+#define GL_UNPACK_RESAMPLE_OML            0x8985
+#define GL_RESAMPLE_REPLICATE_OML         0x8986
+#define GL_RESAMPLE_ZERO_FILL_OML         0x8987
+#define GL_RESAMPLE_AVERAGE_OML           0x8988
+#define GL_RESAMPLE_DECIMATE_OML          0x8989
+#endif
+
+#ifndef GL_NV_copy_depth_to_color
+#define GL_DEPTH_STENCIL_TO_RGBA_NV       0x886E
+#define GL_DEPTH_STENCIL_TO_BGRA_NV       0x886F
+#endif
+
+#ifndef GL_ATI_envmap_bumpmap
+#define GL_BUMP_ROT_MATRIX_ATI            0x8775
+#define GL_BUMP_ROT_MATRIX_SIZE_ATI       0x8776
+#define GL_BUMP_NUM_TEX_UNITS_ATI         0x8777
+#define GL_BUMP_TEX_UNITS_ATI             0x8778
+#define GL_DUDV_ATI                       0x8779
+#define GL_DU8DV8_ATI                     0x877A
+#define GL_BUMP_ENVMAP_ATI                0x877B
+#define GL_BUMP_TARGET_ATI                0x877C
+#endif
+
+#ifndef GL_ATI_fragment_shader
+#define GL_FRAGMENT_SHADER_ATI            0x8920
+#define GL_REG_0_ATI                      0x8921
+#define GL_REG_1_ATI                      0x8922
+#define GL_REG_2_ATI                      0x8923
+#define GL_REG_3_ATI                      0x8924
+#define GL_REG_4_ATI                      0x8925
+#define GL_REG_5_ATI                      0x8926
+#define GL_REG_6_ATI                      0x8927
+#define GL_REG_7_ATI                      0x8928
+#define GL_REG_8_ATI                      0x8929
+#define GL_REG_9_ATI                      0x892A
+#define GL_REG_10_ATI                     0x892B
+#define GL_REG_11_ATI                     0x892C
+#define GL_REG_12_ATI                     0x892D
+#define GL_REG_13_ATI                     0x892E
+#define GL_REG_14_ATI                     0x892F
+#define GL_REG_15_ATI                     0x8930
+#define GL_REG_16_ATI                     0x8931
+#define GL_REG_17_ATI                     0x8932
+#define GL_REG_18_ATI                     0x8933
+#define GL_REG_19_ATI                     0x8934
+#define GL_REG_20_ATI                     0x8935
+#define GL_REG_21_ATI                     0x8936
+#define GL_REG_22_ATI                     0x8937
+#define GL_REG_23_ATI                     0x8938
+#define GL_REG_24_ATI                     0x8939
+#define GL_REG_25_ATI                     0x893A
+#define GL_REG_26_ATI                     0x893B
+#define GL_REG_27_ATI                     0x893C
+#define GL_REG_28_ATI                     0x893D
+#define GL_REG_29_ATI                     0x893E
+#define GL_REG_30_ATI                     0x893F
+#define GL_REG_31_ATI                     0x8940
+#define GL_CON_0_ATI                      0x8941
+#define GL_CON_1_ATI                      0x8942
+#define GL_CON_2_ATI                      0x8943
+#define GL_CON_3_ATI                      0x8944
+#define GL_CON_4_ATI                      0x8945
+#define GL_CON_5_ATI                      0x8946
+#define GL_CON_6_ATI                      0x8947
+#define GL_CON_7_ATI                      0x8948
+#define GL_CON_8_ATI                      0x8949
+#define GL_CON_9_ATI                      0x894A
+#define GL_CON_10_ATI                     0x894B
+#define GL_CON_11_ATI                     0x894C
+#define GL_CON_12_ATI                     0x894D
+#define GL_CON_13_ATI                     0x894E
+#define GL_CON_14_ATI                     0x894F
+#define GL_CON_15_ATI                     0x8950
+#define GL_CON_16_ATI                     0x8951
+#define GL_CON_17_ATI                     0x8952
+#define GL_CON_18_ATI                     0x8953
+#define GL_CON_19_ATI                     0x8954
+#define GL_CON_20_ATI                     0x8955
+#define GL_CON_21_ATI                     0x8956
+#define GL_CON_22_ATI                     0x8957
+#define GL_CON_23_ATI                     0x8958
+#define GL_CON_24_ATI                     0x8959
+#define GL_CON_25_ATI                     0x895A
+#define GL_CON_26_ATI                     0x895B
+#define GL_CON_27_ATI                     0x895C
+#define GL_CON_28_ATI                     0x895D
+#define GL_CON_29_ATI                     0x895E
+#define GL_CON_30_ATI                     0x895F
+#define GL_CON_31_ATI                     0x8960
+#define GL_MOV_ATI                        0x8961
+#define GL_ADD_ATI                        0x8963
+#define GL_MUL_ATI                        0x8964
+#define GL_SUB_ATI                        0x8965
+#define GL_DOT3_ATI                       0x8966
+#define GL_DOT4_ATI                       0x8967
+#define GL_MAD_ATI                        0x8968
+#define GL_LERP_ATI                       0x8969
+#define GL_CND_ATI                        0x896A
+#define GL_CND0_ATI                       0x896B
+#define GL_DOT2_ADD_ATI                   0x896C
+#define GL_SECONDARY_INTERPOLATOR_ATI     0x896D
+#define GL_NUM_FRAGMENT_REGISTERS_ATI     0x896E
+#define GL_NUM_FRAGMENT_CONSTANTS_ATI     0x896F
+#define GL_NUM_PASSES_ATI                 0x8970
+#define GL_NUM_INSTRUCTIONS_PER_PASS_ATI  0x8971
+#define GL_NUM_INSTRUCTIONS_TOTAL_ATI     0x8972
+#define GL_NUM_INPUT_INTERPOLATOR_COMPONENTS_ATI 0x8973
+#define GL_NUM_LOOPBACK_COMPONENTS_ATI    0x8974
+#define GL_COLOR_ALPHA_PAIRING_ATI        0x8975
+#define GL_SWIZZLE_STR_ATI                0x8976
+#define GL_SWIZZLE_STQ_ATI                0x8977
+#define GL_SWIZZLE_STR_DR_ATI             0x8978
+#define GL_SWIZZLE_STQ_DQ_ATI             0x8979
+#define GL_SWIZZLE_STRQ_ATI               0x897A
+#define GL_SWIZZLE_STRQ_DQ_ATI            0x897B
+#define GL_RED_BIT_ATI                    0x00000001
+#define GL_GREEN_BIT_ATI                  0x00000002
+#define GL_BLUE_BIT_ATI                   0x00000004
+#define GL_2X_BIT_ATI                     0x00000001
+#define GL_4X_BIT_ATI                     0x00000002
+#define GL_8X_BIT_ATI                     0x00000004
+#define GL_HALF_BIT_ATI                   0x00000008
+#define GL_QUARTER_BIT_ATI                0x00000010
+#define GL_EIGHTH_BIT_ATI                 0x00000020
+#define GL_SATURATE_BIT_ATI               0x00000040
+#define GL_COMP_BIT_ATI                   0x00000002
+#define GL_NEGATE_BIT_ATI                 0x00000004
+#define GL_BIAS_BIT_ATI                   0x00000008
+#endif
+
+#ifndef GL_ATI_pn_triangles
+#define GL_PN_TRIANGLES_ATI               0x87F0
+#define GL_MAX_PN_TRIANGLES_TESSELATION_LEVEL_ATI 0x87F1
+#define GL_PN_TRIANGLES_POINT_MODE_ATI    0x87F2
+#define GL_PN_TRIANGLES_NORMAL_MODE_ATI   0x87F3
+#define GL_PN_TRIANGLES_TESSELATION_LEVEL_ATI 0x87F4
+#define GL_PN_TRIANGLES_POINT_MODE_LINEAR_ATI 0x87F5
+#define GL_PN_TRIANGLES_POINT_MODE_CUBIC_ATI 0x87F6
+#define GL_PN_TRIANGLES_NORMAL_MODE_LINEAR_ATI 0x87F7
+#define GL_PN_TRIANGLES_NORMAL_MODE_QUADRATIC_ATI 0x87F8
+#endif
+
+#ifndef GL_ATI_vertex_array_object
+#define GL_STATIC_ATI                     0x8760
+#define GL_DYNAMIC_ATI                    0x8761
+#define GL_PRESERVE_ATI                   0x8762
+#define GL_DISCARD_ATI                    0x8763
+#define GL_OBJECT_BUFFER_SIZE_ATI         0x8764
+#define GL_OBJECT_BUFFER_USAGE_ATI        0x8765
+#define GL_ARRAY_OBJECT_BUFFER_ATI        0x8766
+#define GL_ARRAY_OBJECT_OFFSET_ATI        0x8767
+#endif
+
+#ifndef GL_EXT_vertex_shader
+#define GL_VERTEX_SHADER_EXT              0x8780
+#define GL_VERTEX_SHADER_BINDING_EXT      0x8781
+#define GL_OP_INDEX_EXT                   0x8782
+#define GL_OP_NEGATE_EXT                  0x8783
+#define GL_OP_DOT3_EXT                    0x8784
+#define GL_OP_DOT4_EXT                    0x8785
+#define GL_OP_MUL_EXT                     0x8786
+#define GL_OP_ADD_EXT                     0x8787
+#define GL_OP_MADD_EXT                    0x8788
+#define GL_OP_FRAC_EXT                    0x8789
+#define GL_OP_MAX_EXT                     0x878A
+#define GL_OP_MIN_EXT                     0x878B
+#define GL_OP_SET_GE_EXT                  0x878C
+#define GL_OP_SET_LT_EXT                  0x878D
+#define GL_OP_CLAMP_EXT                   0x878E
+#define GL_OP_FLOOR_EXT                   0x878F
+#define GL_OP_ROUND_EXT                   0x8790
+#define GL_OP_EXP_BASE_2_EXT              0x8791
+#define GL_OP_LOG_BASE_2_EXT              0x8792
+#define GL_OP_POWER_EXT                   0x8793
+#define GL_OP_RECIP_EXT                   0x8794
+#define GL_OP_RECIP_SQRT_EXT              0x8795
+#define GL_OP_SUB_EXT                     0x8796
+#define GL_OP_CROSS_PRODUCT_EXT           0x8797
+#define GL_OP_MULTIPLY_MATRIX_EXT         0x8798
+#define GL_OP_MOV_EXT                     0x8799
+#define GL_OUTPUT_VERTEX_EXT              0x879A
+#define GL_OUTPUT_COLOR0_EXT              0x879B
+#define GL_OUTPUT_COLOR1_EXT              0x879C
+#define GL_OUTPUT_TEXTURE_COORD0_EXT      0x879D
+#define GL_OUTPUT_TEXTURE_COORD1_EXT      0x879E
+#define GL_OUTPUT_TEXTURE_COORD2_EXT      0x879F
+#define GL_OUTPUT_TEXTURE_COORD3_EXT      0x87A0
+#define GL_OUTPUT_TEXTURE_COORD4_EXT      0x87A1
+#define GL_OUTPUT_TEXTURE_COORD5_EXT      0x87A2
+#define GL_OUTPUT_TEXTURE_COORD6_EXT      0x87A3
+#define GL_OUTPUT_TEXTURE_COORD7_EXT      0x87A4
+#define GL_OUTPUT_TEXTURE_COORD8_EXT      0x87A5
+#define GL_OUTPUT_TEXTURE_COORD9_EXT      0x87A6
+#define GL_OUTPUT_TEXTURE_COORD10_EXT     0x87A7
+#define GL_OUTPUT_TEXTURE_COORD11_EXT     0x87A8
+#define GL_OUTPUT_TEXTURE_COORD12_EXT     0x87A9
+#define GL_OUTPUT_TEXTURE_COORD13_EXT     0x87AA
+#define GL_OUTPUT_TEXTURE_COORD14_EXT     0x87AB
+#define GL_OUTPUT_TEXTURE_COORD15_EXT     0x87AC
+#define GL_OUTPUT_TEXTURE_COORD16_EXT     0x87AD
+#define GL_OUTPUT_TEXTURE_COORD17_EXT     0x87AE
+#define GL_OUTPUT_TEXTURE_COORD18_EXT     0x87AF
+#define GL_OUTPUT_TEXTURE_COORD19_EXT     0x87B0
+#define GL_OUTPUT_TEXTURE_COORD20_EXT     0x87B1
+#define GL_OUTPUT_TEXTURE_COORD21_EXT     0x87B2
+#define GL_OUTPUT_TEXTURE_COORD22_EXT     0x87B3
+#define GL_OUTPUT_TEXTURE_COORD23_EXT     0x87B4
+#define GL_OUTPUT_TEXTURE_COORD24_EXT     0x87B5
+#define GL_OUTPUT_TEXTURE_COORD25_EXT     0x87B6
+#define GL_OUTPUT_TEXTURE_COORD26_EXT     0x87B7
+#define GL_OUTPUT_TEXTURE_COORD27_EXT     0x87B8
+#define GL_OUTPUT_TEXTURE_COORD28_EXT     0x87B9
+#define GL_OUTPUT_TEXTURE_COORD29_EXT     0x87BA
+#define GL_OUTPUT_TEXTURE_COORD30_EXT     0x87BB
+#define GL_OUTPUT_TEXTURE_COORD31_EXT     0x87BC
+#define GL_OUTPUT_FOG_EXT                 0x87BD
+#define GL_SCALAR_EXT                     0x87BE
+#define GL_VECTOR_EXT                     0x87BF
+#define GL_MATRIX_EXT                     0x87C0
+#define GL_VARIANT_EXT                    0x87C1
+#define GL_INVARIANT_EXT                  0x87C2
+#define GL_LOCAL_CONSTANT_EXT             0x87C3
+#define GL_LOCAL_EXT                      0x87C4
+#define GL_MAX_VERTEX_SHADER_INSTRUCTIONS_EXT 0x87C5
+#define GL_MAX_VERTEX_SHADER_VARIANTS_EXT 0x87C6
+#define GL_MAX_VERTEX_SHADER_INVARIANTS_EXT 0x87C7
+#define GL_MAX_VERTEX_SHADER_LOCAL_CONSTANTS_EXT 0x87C8
+#define GL_MAX_VERTEX_SHADER_LOCALS_EXT   0x87C9
+#define GL_MAX_OPTIMIZED_VERTEX_SHADER_INSTRUCTIONS_EXT 0x87CA
+#define GL_MAX_OPTIMIZED_VERTEX_SHADER_VARIANTS_EXT 0x87CB
+#define GL_MAX_OPTIMIZED_VERTEX_SHADER_LOCAL_CONSTANTS_EXT 0x87CC
+#define GL_MAX_OPTIMIZED_VERTEX_SHADER_INVARIANTS_EXT 0x87CD
+#define GL_MAX_OPTIMIZED_VERTEX_SHADER_LOCALS_EXT 0x87CE
+#define GL_VERTEX_SHADER_INSTRUCTIONS_EXT 0x87CF
+#define GL_VERTEX_SHADER_VARIANTS_EXT     0x87D0
+#define GL_VERTEX_SHADER_INVARIANTS_EXT   0x87D1
+#define GL_VERTEX_SHADER_LOCAL_CONSTANTS_EXT 0x87D2
+#define GL_VERTEX_SHADER_LOCALS_EXT       0x87D3
+#define GL_VERTEX_SHADER_OPTIMIZED_EXT    0x87D4
+#define GL_X_EXT                          0x87D5
+#define GL_Y_EXT                          0x87D6
+#define GL_Z_EXT                          0x87D7
+#define GL_W_EXT                          0x87D8
+#define GL_NEGATIVE_X_EXT                 0x87D9
+#define GL_NEGATIVE_Y_EXT                 0x87DA
+#define GL_NEGATIVE_Z_EXT                 0x87DB
+#define GL_NEGATIVE_W_EXT                 0x87DC
+#define GL_ZERO_EXT                       0x87DD
+#define GL_ONE_EXT                        0x87DE
+#define GL_NEGATIVE_ONE_EXT               0x87DF
+#define GL_NORMALIZED_RANGE_EXT           0x87E0
+#define GL_FULL_RANGE_EXT                 0x87E1
+#define GL_CURRENT_VERTEX_EXT             0x87E2
+#define GL_MVP_MATRIX_EXT                 0x87E3
+#define GL_VARIANT_VALUE_EXT              0x87E4
+#define GL_VARIANT_DATATYPE_EXT           0x87E5
+#define GL_VARIANT_ARRAY_STRIDE_EXT       0x87E6
+#define GL_VARIANT_ARRAY_TYPE_EXT         0x87E7
+#define GL_VARIANT_ARRAY_EXT              0x87E8
+#define GL_VARIANT_ARRAY_POINTER_EXT      0x87E9
+#define GL_INVARIANT_VALUE_EXT            0x87EA
+#define GL_INVARIANT_DATATYPE_EXT         0x87EB
+#define GL_LOCAL_CONSTANT_VALUE_EXT       0x87EC
+#define GL_LOCAL_CONSTANT_DATATYPE_EXT    0x87ED
+#endif
+
+#ifndef GL_ATI_vertex_streams
+#define GL_MAX_VERTEX_STREAMS_ATI         0x876B
+#define GL_VERTEX_STREAM0_ATI             0x876C
+#define GL_VERTEX_STREAM1_ATI             0x876D
+#define GL_VERTEX_STREAM2_ATI             0x876E
+#define GL_VERTEX_STREAM3_ATI             0x876F
+#define GL_VERTEX_STREAM4_ATI             0x8770
+#define GL_VERTEX_STREAM5_ATI             0x8771
+#define GL_VERTEX_STREAM6_ATI             0x8772
+#define GL_VERTEX_STREAM7_ATI             0x8773
+#define GL_VERTEX_SOURCE_ATI              0x8774
+#endif
+
+#ifndef GL_ATI_element_array
+#define GL_ELEMENT_ARRAY_ATI              0x8768
+#define GL_ELEMENT_ARRAY_TYPE_ATI         0x8769
+#define GL_ELEMENT_ARRAY_POINTER_ATI      0x876A
+#endif
+
+#ifndef GL_SUN_mesh_array
+#define GL_QUAD_MESH_SUN                  0x8614
+#define GL_TRIANGLE_MESH_SUN              0x8615
+#endif
+
+#ifndef GL_SUN_slice_accum
+#define GL_SLICE_ACCUM_SUN                0x85CC
+#endif
+
+#ifndef GL_NV_multisample_filter_hint
+#define GL_MULTISAMPLE_FILTER_HINT_NV     0x8534
+#endif
+
+#ifndef GL_NV_depth_clamp
+#define GL_DEPTH_CLAMP_NV                 0x864F
+#endif
+
+#ifndef GL_NV_occlusion_query
+#define GL_PIXEL_COUNTER_BITS_NV          0x8864
+#define GL_CURRENT_OCCLUSION_QUERY_ID_NV  0x8865
+#define GL_PIXEL_COUNT_NV                 0x8866
+#define GL_PIXEL_COUNT_AVAILABLE_NV       0x8867
+#endif
+
+#ifndef GL_NV_point_sprite
+#define GL_POINT_SPRITE_NV                0x8861
+#define GL_COORD_REPLACE_NV               0x8862
+#define GL_POINT_SPRITE_R_MODE_NV         0x8863
+#endif
+
+#ifndef GL_NV_texture_shader3
+#define GL_OFFSET_PROJECTIVE_TEXTURE_2D_NV 0x8850
+#define GL_OFFSET_PROJECTIVE_TEXTURE_2D_SCALE_NV 0x8851
+#define GL_OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_NV 0x8852
+#define GL_OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_SCALE_NV 0x8853
+#define GL_OFFSET_HILO_TEXTURE_2D_NV      0x8854
+#define GL_OFFSET_HILO_TEXTURE_RECTANGLE_NV 0x8855
+#define GL_OFFSET_HILO_PROJECTIVE_TEXTURE_2D_NV 0x8856
+#define GL_OFFSET_HILO_PROJECTIVE_TEXTURE_RECTANGLE_NV 0x8857
+#define GL_DEPENDENT_HILO_TEXTURE_2D_NV   0x8858
+#define GL_DEPENDENT_RGB_TEXTURE_3D_NV    0x8859
+#define GL_DEPENDENT_RGB_TEXTURE_CUBE_MAP_NV 0x885A
+#define GL_DOT_PRODUCT_PASS_THROUGH_NV    0x885B
+#define GL_DOT_PRODUCT_TEXTURE_1D_NV      0x885C
+#define GL_DOT_PRODUCT_AFFINE_DEPTH_REPLACE_NV 0x885D
+#define GL_HILO8_NV                       0x885E
+#define GL_SIGNED_HILO8_NV                0x885F
+#define GL_FORCE_BLUE_TO_ONE_NV           0x8860
+#endif
+
+#ifndef GL_NV_vertex_program1_1
+#endif
+
+#ifndef GL_EXT_shadow_funcs
+#endif
+
+#ifndef GL_EXT_stencil_two_side
+#define GL_STENCIL_TEST_TWO_SIDE_EXT      0x8910
+#define GL_ACTIVE_STENCIL_FACE_EXT        0x8911
+#endif
+
+#ifndef GL_ATI_text_fragment_shader
+#define GL_TEXT_FRAGMENT_SHADER_ATI       0x8200
+#endif
+
+#ifndef GL_APPLE_client_storage
+#define GL_UNPACK_CLIENT_STORAGE_APPLE    0x85B2
+#endif
+
+#ifndef GL_APPLE_element_array
+#define GL_ELEMENT_ARRAY_APPLE            0x8A0C
+#define GL_ELEMENT_ARRAY_TYPE_APPLE       0x8A0D
+#define GL_ELEMENT_ARRAY_POINTER_APPLE    0x8A0E
+#endif
+
+#ifndef GL_APPLE_fence
+#define GL_DRAW_PIXELS_APPLE              0x8A0A
+#define GL_FENCE_APPLE                    0x8A0B
+#endif
+
+#ifndef GL_APPLE_vertex_array_object
+#define GL_VERTEX_ARRAY_BINDING_APPLE     0x85B5
+#endif
+
+#ifndef GL_APPLE_vertex_array_range
+#define GL_VERTEX_ARRAY_RANGE_APPLE       0x851D
+#define GL_VERTEX_ARRAY_RANGE_LENGTH_APPLE 0x851E
+#define GL_VERTEX_ARRAY_STORAGE_HINT_APPLE 0x851F
+#define GL_VERTEX_ARRAY_RANGE_POINTER_APPLE 0x8521
+#define GL_STORAGE_CLIENT_APPLE           0x85B4
+#define GL_STORAGE_CACHED_APPLE           0x85BE
+#define GL_STORAGE_SHARED_APPLE           0x85BF
+#endif
+
+#ifndef GL_APPLE_ycbcr_422
+#define GL_YCBCR_422_APPLE                0x85B9
+#define GL_UNSIGNED_SHORT_8_8_APPLE       0x85BA
+#define GL_UNSIGNED_SHORT_8_8_REV_APPLE   0x85BB
+#endif
+
+#ifndef GL_S3_s3tc
+#define GL_RGB_S3TC                       0x83A0
+#define GL_RGB4_S3TC                      0x83A1
+#define GL_RGBA_S3TC                      0x83A2
+#define GL_RGBA4_S3TC                     0x83A3
+#endif
+
+#ifndef GL_ATI_draw_buffers
+#define GL_MAX_DRAW_BUFFERS_ATI           0x8824
+#define GL_DRAW_BUFFER0_ATI               0x8825
+#define GL_DRAW_BUFFER1_ATI               0x8826
+#define GL_DRAW_BUFFER2_ATI               0x8827
+#define GL_DRAW_BUFFER3_ATI               0x8828
+#define GL_DRAW_BUFFER4_ATI               0x8829
+#define GL_DRAW_BUFFER5_ATI               0x882A
+#define GL_DRAW_BUFFER6_ATI               0x882B
+#define GL_DRAW_BUFFER7_ATI               0x882C
+#define GL_DRAW_BUFFER8_ATI               0x882D
+#define GL_DRAW_BUFFER9_ATI               0x882E
+#define GL_DRAW_BUFFER10_ATI              0x882F
+#define GL_DRAW_BUFFER11_ATI              0x8830
+#define GL_DRAW_BUFFER12_ATI              0x8831
+#define GL_DRAW_BUFFER13_ATI              0x8832
+#define GL_DRAW_BUFFER14_ATI              0x8833
+#define GL_DRAW_BUFFER15_ATI              0x8834
+#endif
+
+#ifndef GL_ATI_pixel_format_float
+#define GL_TYPE_RGBA_FLOAT_ATI            0x8820
+#define GL_COLOR_CLEAR_UNCLAMPED_VALUE_ATI 0x8835
+#endif
+
+#ifndef GL_ATI_texture_env_combine3
+#define GL_MODULATE_ADD_ATI               0x8744
+#define GL_MODULATE_SIGNED_ADD_ATI        0x8745
+#define GL_MODULATE_SUBTRACT_ATI          0x8746
+#endif
+
+#ifndef GL_ATI_texture_float
+#define GL_RGBA_FLOAT32_ATI               0x8814
+#define GL_RGB_FLOAT32_ATI                0x8815
+#define GL_ALPHA_FLOAT32_ATI              0x8816
+#define GL_INTENSITY_FLOAT32_ATI          0x8817
+#define GL_LUMINANCE_FLOAT32_ATI          0x8818
+#define GL_LUMINANCE_ALPHA_FLOAT32_ATI    0x8819
+#define GL_RGBA_FLOAT16_ATI               0x881A
+#define GL_RGB_FLOAT16_ATI                0x881B
+#define GL_ALPHA_FLOAT16_ATI              0x881C
+#define GL_INTENSITY_FLOAT16_ATI          0x881D
+#define GL_LUMINANCE_FLOAT16_ATI          0x881E
+#define GL_LUMINANCE_ALPHA_FLOAT16_ATI    0x881F
+#endif
+
+#ifndef GL_NV_float_buffer
+#define GL_FLOAT_R_NV                     0x8880
+#define GL_FLOAT_RG_NV                    0x8881
+#define GL_FLOAT_RGB_NV                   0x8882
+#define GL_FLOAT_RGBA_NV                  0x8883
+#define GL_FLOAT_R16_NV                   0x8884
+#define GL_FLOAT_R32_NV                   0x8885
+#define GL_FLOAT_RG16_NV                  0x8886
+#define GL_FLOAT_RG32_NV                  0x8887
+#define GL_FLOAT_RGB16_NV                 0x8888
+#define GL_FLOAT_RGB32_NV                 0x8889
+#define GL_FLOAT_RGBA16_NV                0x888A
+#define GL_FLOAT_RGBA32_NV                0x888B
+#define GL_TEXTURE_FLOAT_COMPONENTS_NV    0x888C
+#define GL_FLOAT_CLEAR_COLOR_VALUE_NV     0x888D
+#define GL_FLOAT_RGBA_MODE_NV             0x888E
+#endif
+
+#ifndef GL_NV_fragment_program
+#define GL_MAX_FRAGMENT_PROGRAM_LOCAL_PARAMETERS_NV 0x8868
+#define GL_FRAGMENT_PROGRAM_NV            0x8870
+#define GL_MAX_TEXTURE_COORDS_NV          0x8871
+#define GL_MAX_TEXTURE_IMAGE_UNITS_NV     0x8872
+#define GL_FRAGMENT_PROGRAM_BINDING_NV    0x8873
+#define GL_PROGRAM_ERROR_STRING_NV        0x8874
+#endif
+
+#ifndef GL_NV_half_float
+#define GL_HALF_FLOAT_NV                  0x140B
+#endif
+
+#ifndef GL_NV_pixel_data_range
+#define GL_WRITE_PIXEL_DATA_RANGE_NV      0x8878
+#define GL_READ_PIXEL_DATA_RANGE_NV       0x8879
+#define GL_WRITE_PIXEL_DATA_RANGE_LENGTH_NV 0x887A
+#define GL_READ_PIXEL_DATA_RANGE_LENGTH_NV 0x887B
+#define GL_WRITE_PIXEL_DATA_RANGE_POINTER_NV 0x887C
+#define GL_READ_PIXEL_DATA_RANGE_POINTER_NV 0x887D
+#endif
+
+#ifndef GL_NV_primitive_restart
+#define GL_PRIMITIVE_RESTART_NV           0x8558
+#define GL_PRIMITIVE_RESTART_INDEX_NV     0x8559
+#endif
+
+#ifndef GL_NV_texture_expand_normal
+#define GL_TEXTURE_UNSIGNED_REMAP_MODE_NV 0x888F
+#endif
+
+#ifndef GL_NV_vertex_program2
+#endif
+
+#ifndef GL_ATI_map_object_buffer
+#endif
+
+#ifndef GL_ATI_separate_stencil
+#define GL_STENCIL_BACK_FUNC_ATI          0x8800
+#define GL_STENCIL_BACK_FAIL_ATI          0x8801
+#define GL_STENCIL_BACK_PASS_DEPTH_FAIL_ATI 0x8802
+#define GL_STENCIL_BACK_PASS_DEPTH_PASS_ATI 0x8803
+#endif
+
+#ifndef GL_ATI_vertex_attrib_array_object
+#endif
+
+#ifndef GL_OES_read_format
+#define GL_IMPLEMENTATION_COLOR_READ_TYPE_OES 0x8B9A
+#define GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES 0x8B9B
+#endif
+
+#ifndef GL_EXT_depth_bounds_test
+#define GL_DEPTH_BOUNDS_TEST_EXT          0x8890
+#define GL_DEPTH_BOUNDS_EXT               0x8891
+#endif
+
+#ifndef GL_EXT_texture_mirror_clamp
+#define GL_MIRROR_CLAMP_EXT               0x8742
+#define GL_MIRROR_CLAMP_TO_EDGE_EXT       0x8743
+#define GL_MIRROR_CLAMP_TO_BORDER_EXT     0x8912
+#endif
+
+#ifndef GL_EXT_blend_equation_separate
+#define GL_BLEND_EQUATION_RGB_EXT         0x8009
+#define GL_BLEND_EQUATION_ALPHA_EXT       0x883D
+#endif
+
+#ifndef GL_MESA_pack_invert
+#define GL_PACK_INVERT_MESA               0x8758
+#endif
+
+#ifndef GL_MESA_ycbcr_texture
+#define GL_UNSIGNED_SHORT_8_8_MESA        0x85BA
+#define GL_UNSIGNED_SHORT_8_8_REV_MESA    0x85BB
+#define GL_YCBCR_MESA                     0x8757
+#endif
+
+#ifndef GL_EXT_pixel_buffer_object
+#define GL_PIXEL_PACK_BUFFER_EXT          0x88EB
+#define GL_PIXEL_UNPACK_BUFFER_EXT        0x88EC
+#define GL_PIXEL_PACK_BUFFER_BINDING_EXT  0x88ED
+#define GL_PIXEL_UNPACK_BUFFER_BINDING_EXT 0x88EF
+#endif
+
+#ifndef GL_NV_fragment_program_option
+#endif
+
+#ifndef GL_NV_fragment_program2
+#define GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV 0x88F4
+#define GL_MAX_PROGRAM_CALL_DEPTH_NV      0x88F5
+#define GL_MAX_PROGRAM_IF_DEPTH_NV        0x88F6
+#define GL_MAX_PROGRAM_LOOP_DEPTH_NV      0x88F7
+#define GL_MAX_PROGRAM_LOOP_COUNT_NV      0x88F8
+#endif
+
+#ifndef GL_NV_vertex_program2_option
+/* reuse GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV */
+/* reuse GL_MAX_PROGRAM_CALL_DEPTH_NV */
+#endif
+
+#ifndef GL_NV_vertex_program3
+/* reuse GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB */
+#endif
+
+#ifndef GL_EXT_framebuffer_object
+#define GL_INVALID_FRAMEBUFFER_OPERATION_EXT 0x0506
+#define GL_MAX_RENDERBUFFER_SIZE_EXT      0x84E8
+#define GL_FRAMEBUFFER_BINDING_EXT        0x8CA6
+#define GL_RENDERBUFFER_BINDING_EXT       0x8CA7
+#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT 0x8CD0
+#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT 0x8CD1
+#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT 0x8CD2
+#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT 0x8CD3
+#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT 0x8CD4
+#define GL_FRAMEBUFFER_COMPLETE_EXT       0x8CD5
+#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT 0x8CD6
+#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT 0x8CD7
+#define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT 0x8CD9
+#define GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT 0x8CDA
+#define GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT 0x8CDB
+#define GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT 0x8CDC
+#define GL_FRAMEBUFFER_UNSUPPORTED_EXT    0x8CDD
+#define GL_MAX_COLOR_ATTACHMENTS_EXT      0x8CDF
+#define GL_COLOR_ATTACHMENT0_EXT          0x8CE0
+#define GL_COLOR_ATTACHMENT1_EXT          0x8CE1
+#define GL_COLOR_ATTACHMENT2_EXT          0x8CE2
+#define GL_COLOR_ATTACHMENT3_EXT          0x8CE3
+#define GL_COLOR_ATTACHMENT4_EXT          0x8CE4
+#define GL_COLOR_ATTACHMENT5_EXT          0x8CE5
+#define GL_COLOR_ATTACHMENT6_EXT          0x8CE6
+#define GL_COLOR_ATTACHMENT7_EXT          0x8CE7
+#define GL_COLOR_ATTACHMENT8_EXT          0x8CE8
+#define GL_COLOR_ATTACHMENT9_EXT          0x8CE9
+#define GL_COLOR_ATTACHMENT10_EXT         0x8CEA
+#define GL_COLOR_ATTACHMENT11_EXT         0x8CEB
+#define GL_COLOR_ATTACHMENT12_EXT         0x8CEC
+#define GL_COLOR_ATTACHMENT13_EXT         0x8CED
+#define GL_COLOR_ATTACHMENT14_EXT         0x8CEE
+#define GL_COLOR_ATTACHMENT15_EXT         0x8CEF
+#define GL_DEPTH_ATTACHMENT_EXT           0x8D00
+#define GL_STENCIL_ATTACHMENT_EXT         0x8D20
+#define GL_FRAMEBUFFER_EXT                0x8D40
+#define GL_RENDERBUFFER_EXT               0x8D41
+#define GL_RENDERBUFFER_WIDTH_EXT         0x8D42
+#define GL_RENDERBUFFER_HEIGHT_EXT        0x8D43
+#define GL_RENDERBUFFER_INTERNAL_FORMAT_EXT 0x8D44
+#define GL_STENCIL_INDEX1_EXT             0x8D46
+#define GL_STENCIL_INDEX4_EXT             0x8D47
+#define GL_STENCIL_INDEX8_EXT             0x8D48
+#define GL_STENCIL_INDEX16_EXT            0x8D49
+#define GL_RENDERBUFFER_RED_SIZE_EXT      0x8D50
+#define GL_RENDERBUFFER_GREEN_SIZE_EXT    0x8D51
+#define GL_RENDERBUFFER_BLUE_SIZE_EXT     0x8D52
+#define GL_RENDERBUFFER_ALPHA_SIZE_EXT    0x8D53
+#define GL_RENDERBUFFER_DEPTH_SIZE_EXT    0x8D54
+#define GL_RENDERBUFFER_STENCIL_SIZE_EXT  0x8D55
+#endif
+
+#ifndef GL_GREMEDY_string_marker
+#endif
+
+#ifndef GL_EXT_packed_depth_stencil
+#define GL_DEPTH_STENCIL_EXT              0x84F9
+#define GL_UNSIGNED_INT_24_8_EXT          0x84FA
+#define GL_DEPTH24_STENCIL8_EXT           0x88F0
+#define GL_TEXTURE_STENCIL_SIZE_EXT       0x88F1
+#endif
+
+#ifndef GL_EXT_stencil_clear_tag
+#define GL_STENCIL_TAG_BITS_EXT           0x88F2
+#define GL_STENCIL_CLEAR_TAG_VALUE_EXT    0x88F3
+#endif
+
+#ifndef GL_EXT_texture_sRGB
+#define GL_SRGB_EXT                       0x8C40
+#define GL_SRGB8_EXT                      0x8C41
+#define GL_SRGB_ALPHA_EXT                 0x8C42
+#define GL_SRGB8_ALPHA8_EXT               0x8C43
+#define GL_SLUMINANCE_ALPHA_EXT           0x8C44
+#define GL_SLUMINANCE8_ALPHA8_EXT         0x8C45
+#define GL_SLUMINANCE_EXT                 0x8C46
+#define GL_SLUMINANCE8_EXT                0x8C47
+#define GL_COMPRESSED_SRGB_EXT            0x8C48
+#define GL_COMPRESSED_SRGB_ALPHA_EXT      0x8C49
+#define GL_COMPRESSED_SLUMINANCE_EXT      0x8C4A
+#define GL_COMPRESSED_SLUMINANCE_ALPHA_EXT 0x8C4B
+#define GL_COMPRESSED_SRGB_S3TC_DXT1_EXT  0x8C4C
+#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT 0x8C4D
+#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT 0x8C4E
+#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT 0x8C4F
+#endif
+
+#ifndef GL_EXT_framebuffer_blit
+#define GL_READ_FRAMEBUFFER_EXT           0x8CA8
+#define GL_DRAW_FRAMEBUFFER_EXT           0x8CA9
+#define GL_DRAW_FRAMEBUFFER_BINDING_EXT   GL_FRAMEBUFFER_BINDING_EXT
+#define GL_READ_FRAMEBUFFER_BINDING_EXT   0x8CAA
+#endif
+
+#ifndef GL_EXT_framebuffer_multisample
+#define GL_RENDERBUFFER_SAMPLES_EXT       0x8CAB
+#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT 0x8D56
+#define GL_MAX_SAMPLES_EXT                0x8D57
+#endif
+
+#ifndef GL_MESAX_texture_stack
+#define GL_TEXTURE_1D_STACK_MESAX         0x8759
+#define GL_TEXTURE_2D_STACK_MESAX         0x875A
+#define GL_PROXY_TEXTURE_1D_STACK_MESAX   0x875B
+#define GL_PROXY_TEXTURE_2D_STACK_MESAX   0x875C
+#define GL_TEXTURE_1D_STACK_BINDING_MESAX 0x875D
+#define GL_TEXTURE_2D_STACK_BINDING_MESAX 0x875E
+#endif
+
+#ifndef GL_EXT_timer_query
+#define GL_TIME_ELAPSED_EXT               0x88BF
+#endif
+
+#ifndef GL_EXT_gpu_program_parameters
+#endif
+
+#ifndef GL_APPLE_flush_buffer_range
+#define GL_BUFFER_SERIALIZED_MODIFY_APPLE 0x8A12
+#define GL_BUFFER_FLUSHING_UNMAP_APPLE    0x8A13
+#endif
+
+#ifndef GL_NV_gpu_program4
+#define GL_MIN_PROGRAM_TEXEL_OFFSET_NV    0x8904
+#define GL_MAX_PROGRAM_TEXEL_OFFSET_NV    0x8905
+#define GL_PROGRAM_ATTRIB_COMPONENTS_NV   0x8906
+#define GL_PROGRAM_RESULT_COMPONENTS_NV   0x8907
+#define GL_MAX_PROGRAM_ATTRIB_COMPONENTS_NV 0x8908
+#define GL_MAX_PROGRAM_RESULT_COMPONENTS_NV 0x8909
+#define GL_MAX_PROGRAM_GENERIC_ATTRIBS_NV 0x8DA5
+#define GL_MAX_PROGRAM_GENERIC_RESULTS_NV 0x8DA6
+#endif
+
+#ifndef GL_NV_geometry_program4
+#define GL_LINES_ADJACENCY_EXT            0x000A
+#define GL_LINE_STRIP_ADJACENCY_EXT       0x000B
+#define GL_TRIANGLES_ADJACENCY_EXT        0x000C
+#define GL_TRIANGLE_STRIP_ADJACENCY_EXT   0x000D
+#define GL_GEOMETRY_PROGRAM_NV            0x8C26
+#define GL_MAX_PROGRAM_OUTPUT_VERTICES_NV 0x8C27
+#define GL_MAX_PROGRAM_TOTAL_OUTPUT_COMPONENTS_NV 0x8C28
+#define GL_GEOMETRY_VERTICES_OUT_EXT      0x8DDA
+#define GL_GEOMETRY_INPUT_TYPE_EXT        0x8DDB
+#define GL_GEOMETRY_OUTPUT_TYPE_EXT       0x8DDC
+#define GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_EXT 0x8C29
+#define GL_FRAMEBUFFER_ATTACHMENT_LAYERED_EXT 0x8DA7
+#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_EXT 0x8DA8
+#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_EXT 0x8DA9
+#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT 0x8CD4
+#define GL_PROGRAM_POINT_SIZE_EXT         0x8642
+#endif
+
+#ifndef GL_EXT_geometry_shader4
+#define GL_GEOMETRY_SHADER_EXT            0x8DD9
+/* reuse GL_GEOMETRY_VERTICES_OUT_EXT */
+/* reuse GL_GEOMETRY_INPUT_TYPE_EXT */
+/* reuse GL_GEOMETRY_OUTPUT_TYPE_EXT */
+/* reuse GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_EXT */
+#define GL_MAX_GEOMETRY_VARYING_COMPONENTS_EXT 0x8DDD
+#define GL_MAX_VERTEX_VARYING_COMPONENTS_EXT 0x8DDE
+#define GL_MAX_VARYING_COMPONENTS_EXT     0x8B4B
+#define GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_EXT 0x8DDF
+#define GL_MAX_GEOMETRY_OUTPUT_VERTICES_EXT 0x8DE0
+#define GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_EXT 0x8DE1
+/* reuse GL_LINES_ADJACENCY_EXT */
+/* reuse GL_LINE_STRIP_ADJACENCY_EXT */
+/* reuse GL_TRIANGLES_ADJACENCY_EXT */
+/* reuse GL_TRIANGLE_STRIP_ADJACENCY_EXT */
+/* reuse GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_EXT */
+/* reuse GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_EXT */
+/* reuse GL_FRAMEBUFFER_ATTACHMENT_LAYERED_EXT */
+/* reuse GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT */
+/* reuse GL_PROGRAM_POINT_SIZE_EXT */
+#endif
+
+#ifndef GL_NV_vertex_program4
+#define GL_VERTEX_ATTRIB_ARRAY_INTEGER_NV 0x88FD
+#endif
+
+#ifndef GL_EXT_gpu_shader4
+#define GL_SAMPLER_1D_ARRAY_EXT           0x8DC0
+#define GL_SAMPLER_2D_ARRAY_EXT           0x8DC1
+#define GL_SAMPLER_BUFFER_EXT             0x8DC2
+#define GL_SAMPLER_1D_ARRAY_SHADOW_EXT    0x8DC3
+#define GL_SAMPLER_2D_ARRAY_SHADOW_EXT    0x8DC4
+#define GL_SAMPLER_CUBE_SHADOW_EXT        0x8DC5
+#define GL_UNSIGNED_INT_VEC2_EXT          0x8DC6
+#define GL_UNSIGNED_INT_VEC3_EXT          0x8DC7
+#define GL_UNSIGNED_INT_VEC4_EXT          0x8DC8
+#define GL_INT_SAMPLER_1D_EXT             0x8DC9
+#define GL_INT_SAMPLER_2D_EXT             0x8DCA
+#define GL_INT_SAMPLER_3D_EXT             0x8DCB
+#define GL_INT_SAMPLER_CUBE_EXT           0x8DCC
+#define GL_INT_SAMPLER_2D_RECT_EXT        0x8DCD
+#define GL_INT_SAMPLER_1D_ARRAY_EXT       0x8DCE
+#define GL_INT_SAMPLER_2D_ARRAY_EXT       0x8DCF
+#define GL_INT_SAMPLER_BUFFER_EXT         0x8DD0
+#define GL_UNSIGNED_INT_SAMPLER_1D_EXT    0x8DD1
+#define GL_UNSIGNED_INT_SAMPLER_2D_EXT    0x8DD2
+#define GL_UNSIGNED_INT_SAMPLER_3D_EXT    0x8DD3
+#define GL_UNSIGNED_INT_SAMPLER_CUBE_EXT  0x8DD4
+#define GL_UNSIGNED_INT_SAMPLER_2D_RECT_EXT 0x8DD5
+#define GL_UNSIGNED_INT_SAMPLER_1D_ARRAY_EXT 0x8DD6
+#define GL_UNSIGNED_INT_SAMPLER_2D_ARRAY_EXT 0x8DD7
+#define GL_UNSIGNED_INT_SAMPLER_BUFFER_EXT 0x8DD8
+#endif
+
+#ifndef GL_EXT_draw_instanced
+#endif
+
+#ifndef GL_EXT_packed_float
+#define GL_R11F_G11F_B10F_EXT             0x8C3A
+#define GL_UNSIGNED_INT_10F_11F_11F_REV_EXT 0x8C3B
+#define GL_RGBA_SIGNED_COMPONENTS_EXT     0x8C3C
+#endif
+
+#ifndef GL_EXT_texture_array
+#define GL_TEXTURE_1D_ARRAY_EXT           0x8C18
+#define GL_PROXY_TEXTURE_1D_ARRAY_EXT     0x8C19
+#define GL_TEXTURE_2D_ARRAY_EXT           0x8C1A
+#define GL_PROXY_TEXTURE_2D_ARRAY_EXT     0x8C1B
+#define GL_TEXTURE_BINDING_1D_ARRAY_EXT   0x8C1C
+#define GL_TEXTURE_BINDING_2D_ARRAY_EXT   0x8C1D
+#define GL_MAX_ARRAY_TEXTURE_LAYERS_EXT   0x88FF
+#define GL_COMPARE_REF_DEPTH_TO_TEXTURE_EXT 0x884E
+/* reuse GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT */
+#endif
+
+#ifndef GL_EXT_texture_buffer_object
+#define GL_TEXTURE_BUFFER_EXT             0x8C2A
+#define GL_MAX_TEXTURE_BUFFER_SIZE_EXT    0x8C2B
+#define GL_TEXTURE_BINDING_BUFFER_EXT     0x8C2C
+#define GL_TEXTURE_BUFFER_DATA_STORE_BINDING_EXT 0x8C2D
+#define GL_TEXTURE_BUFFER_FORMAT_EXT      0x8C2E
+#endif
+
+#ifndef GL_EXT_texture_compression_latc
+#define GL_COMPRESSED_LUMINANCE_LATC1_EXT 0x8C70
+#define GL_COMPRESSED_SIGNED_LUMINANCE_LATC1_EXT 0x8C71
+#define GL_COMPRESSED_LUMINANCE_ALPHA_LATC2_EXT 0x8C72
+#define GL_COMPRESSED_SIGNED_LUMINANCE_ALPHA_LATC2_EXT 0x8C73
+#endif
+
+#ifndef GL_EXT_texture_compression_rgtc
+#define GL_COMPRESSED_RED_RGTC1_EXT       0x8DBB
+#define GL_COMPRESSED_SIGNED_RED_RGTC1_EXT 0x8DBC
+#define GL_COMPRESSED_RED_GREEN_RGTC2_EXT 0x8DBD
+#define GL_COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT 0x8DBE
+#endif
+
+#ifndef GL_EXT_texture_shared_exponent
+#define GL_RGB9_E5_EXT                    0x8C3D
+#define GL_UNSIGNED_INT_5_9_9_9_REV_EXT   0x8C3E
+#define GL_TEXTURE_SHARED_SIZE_EXT        0x8C3F
+#endif
+
+#ifndef GL_NV_depth_buffer_float
+#define GL_DEPTH_COMPONENT32F_NV          0x8DAB
+#define GL_DEPTH32F_STENCIL8_NV           0x8DAC
+#define GL_FLOAT_32_UNSIGNED_INT_24_8_REV_NV 0x8DAD
+#define GL_DEPTH_BUFFER_FLOAT_MODE_NV     0x8DAF
+#endif
+
+#ifndef GL_NV_fragment_program4
+#endif
+
+#ifndef GL_NV_framebuffer_multisample_coverage
+#define GL_RENDERBUFFER_COVERAGE_SAMPLES_NV 0x8CAB
+#define GL_RENDERBUFFER_COLOR_SAMPLES_NV  0x8E10
+#define GL_MAX_MULTISAMPLE_COVERAGE_MODES_NV 0x8E11
+#define GL_MULTISAMPLE_COVERAGE_MODES_NV  0x8E12
+#endif
+
+#ifndef GL_EXT_framebuffer_sRGB
+#define GL_FRAMEBUFFER_SRGB_EXT           0x8DB9
+#define GL_FRAMEBUFFER_SRGB_CAPABLE_EXT   0x8DBA
+#endif
+
+#ifndef GL_NV_geometry_shader4
+#endif
+
+#ifndef GL_NV_parameter_buffer_object
+#define GL_MAX_PROGRAM_PARAMETER_BUFFER_BINDINGS_NV 0x8DA0
+#define GL_MAX_PROGRAM_PARAMETER_BUFFER_SIZE_NV 0x8DA1
+#define GL_VERTEX_PROGRAM_PARAMETER_BUFFER_NV 0x8DA2
+#define GL_GEOMETRY_PROGRAM_PARAMETER_BUFFER_NV 0x8DA3
+#define GL_FRAGMENT_PROGRAM_PARAMETER_BUFFER_NV 0x8DA4
+#endif
+
+#ifndef GL_EXT_draw_buffers2
+#endif
+
+#ifndef GL_NV_transform_feedback
+#define GL_BACK_PRIMARY_COLOR_NV          0x8C77
+#define GL_BACK_SECONDARY_COLOR_NV        0x8C78
+#define GL_TEXTURE_COORD_NV               0x8C79
+#define GL_CLIP_DISTANCE_NV               0x8C7A
+#define GL_VERTEX_ID_NV                   0x8C7B
+#define GL_PRIMITIVE_ID_NV                0x8C7C
+#define GL_GENERIC_ATTRIB_NV              0x8C7D
+#define GL_TRANSFORM_FEEDBACK_ATTRIBS_NV  0x8C7E
+#define GL_TRANSFORM_FEEDBACK_BUFFER_MODE_NV 0x8C7F
+#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS_NV 0x8C80
+#define GL_ACTIVE_VARYINGS_NV             0x8C81
+#define GL_ACTIVE_VARYING_MAX_LENGTH_NV   0x8C82
+#define GL_TRANSFORM_FEEDBACK_VARYINGS_NV 0x8C83
+#define GL_TRANSFORM_FEEDBACK_BUFFER_START_NV 0x8C84
+#define GL_TRANSFORM_FEEDBACK_BUFFER_SIZE_NV 0x8C85
+#define GL_TRANSFORM_FEEDBACK_RECORD_NV   0x8C86
+#define GL_PRIMITIVES_GENERATED_NV        0x8C87
+#define GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN_NV 0x8C88
+#define GL_RASTERIZER_DISCARD_NV          0x8C89
+#define GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_ATTRIBS_NV 0x8C8A
+#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS_NV 0x8C8B
+#define GL_INTERLEAVED_ATTRIBS_NV         0x8C8C
+#define GL_SEPARATE_ATTRIBS_NV            0x8C8D
+#define GL_TRANSFORM_FEEDBACK_BUFFER_NV   0x8C8E
+#define GL_TRANSFORM_FEEDBACK_BUFFER_BINDING_NV 0x8C8F
+#define GL_LAYER_NV                       0x8DAA
+#define GL_NEXT_BUFFER_NV                 -2
+#define GL_SKIP_COMPONENTS4_NV            -3
+#define GL_SKIP_COMPONENTS3_NV            -4
+#define GL_SKIP_COMPONENTS2_NV            -5
+#define GL_SKIP_COMPONENTS1_NV            -6
+#endif
+
+#ifndef GL_EXT_bindable_uniform
+#define GL_MAX_VERTEX_BINDABLE_UNIFORMS_EXT 0x8DE2
+#define GL_MAX_FRAGMENT_BINDABLE_UNIFORMS_EXT 0x8DE3
+#define GL_MAX_GEOMETRY_BINDABLE_UNIFORMS_EXT 0x8DE4
+#define GL_MAX_BINDABLE_UNIFORM_SIZE_EXT  0x8DED
+#define GL_UNIFORM_BUFFER_EXT             0x8DEE
+#define GL_UNIFORM_BUFFER_BINDING_EXT     0x8DEF
+#endif
+
+#ifndef GL_EXT_texture_integer
+#define GL_RGBA32UI_EXT                   0x8D70
+#define GL_RGB32UI_EXT                    0x8D71
+#define GL_ALPHA32UI_EXT                  0x8D72
+#define GL_INTENSITY32UI_EXT              0x8D73
+#define GL_LUMINANCE32UI_EXT              0x8D74
+#define GL_LUMINANCE_ALPHA32UI_EXT        0x8D75
+#define GL_RGBA16UI_EXT                   0x8D76
+#define GL_RGB16UI_EXT                    0x8D77
+#define GL_ALPHA16UI_EXT                  0x8D78
+#define GL_INTENSITY16UI_EXT              0x8D79
+#define GL_LUMINANCE16UI_EXT              0x8D7A
+#define GL_LUMINANCE_ALPHA16UI_EXT        0x8D7B
+#define GL_RGBA8UI_EXT                    0x8D7C
+#define GL_RGB8UI_EXT                     0x8D7D
+#define GL_ALPHA8UI_EXT                   0x8D7E
+#define GL_INTENSITY8UI_EXT               0x8D7F
+#define GL_LUMINANCE8UI_EXT               0x8D80
+#define GL_LUMINANCE_ALPHA8UI_EXT         0x8D81
+#define GL_RGBA32I_EXT                    0x8D82
+#define GL_RGB32I_EXT                     0x8D83
+#define GL_ALPHA32I_EXT                   0x8D84
+#define GL_INTENSITY32I_EXT               0x8D85
+#define GL_LUMINANCE32I_EXT               0x8D86
+#define GL_LUMINANCE_ALPHA32I_EXT         0x8D87
+#define GL_RGBA16I_EXT                    0x8D88
+#define GL_RGB16I_EXT                     0x8D89
+#define GL_ALPHA16I_EXT                   0x8D8A
+#define GL_INTENSITY16I_EXT               0x8D8B
+#define GL_LUMINANCE16I_EXT               0x8D8C
+#define GL_LUMINANCE_ALPHA16I_EXT         0x8D8D
+#define GL_RGBA8I_EXT                     0x8D8E
+#define GL_RGB8I_EXT                      0x8D8F
+#define GL_ALPHA8I_EXT                    0x8D90
+#define GL_INTENSITY8I_EXT                0x8D91
+#define GL_LUMINANCE8I_EXT                0x8D92
+#define GL_LUMINANCE_ALPHA8I_EXT          0x8D93
+#define GL_RED_INTEGER_EXT                0x8D94
+#define GL_GREEN_INTEGER_EXT              0x8D95
+#define GL_BLUE_INTEGER_EXT               0x8D96
+#define GL_ALPHA_INTEGER_EXT              0x8D97
+#define GL_RGB_INTEGER_EXT                0x8D98
+#define GL_RGBA_INTEGER_EXT               0x8D99
+#define GL_BGR_INTEGER_EXT                0x8D9A
+#define GL_BGRA_INTEGER_EXT               0x8D9B
+#define GL_LUMINANCE_INTEGER_EXT          0x8D9C
+#define GL_LUMINANCE_ALPHA_INTEGER_EXT    0x8D9D
+#define GL_RGBA_INTEGER_MODE_EXT          0x8D9E
+#endif
+
+#ifndef GL_GREMEDY_frame_terminator
+#endif
+
+#ifndef GL_NV_conditional_render
+#define GL_QUERY_WAIT_NV                  0x8E13
+#define GL_QUERY_NO_WAIT_NV               0x8E14
+#define GL_QUERY_BY_REGION_WAIT_NV        0x8E15
+#define GL_QUERY_BY_REGION_NO_WAIT_NV     0x8E16
+#endif
+
+#ifndef GL_NV_present_video
+#define GL_FRAME_NV                       0x8E26
+#define GL_FIELDS_NV                      0x8E27
+#define GL_CURRENT_TIME_NV                0x8E28
+#define GL_NUM_FILL_STREAMS_NV            0x8E29
+#define GL_PRESENT_TIME_NV                0x8E2A
+#define GL_PRESENT_DURATION_NV            0x8E2B
+#endif
+
+#ifndef GL_EXT_transform_feedback
+#define GL_TRANSFORM_FEEDBACK_BUFFER_EXT  0x8C8E
+#define GL_TRANSFORM_FEEDBACK_BUFFER_START_EXT 0x8C84
+#define GL_TRANSFORM_FEEDBACK_BUFFER_SIZE_EXT 0x8C85
+#define GL_TRANSFORM_FEEDBACK_BUFFER_BINDING_EXT 0x8C8F
+#define GL_INTERLEAVED_ATTRIBS_EXT        0x8C8C
+#define GL_SEPARATE_ATTRIBS_EXT           0x8C8D
+#define GL_PRIMITIVES_GENERATED_EXT       0x8C87
+#define GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN_EXT 0x8C88
+#define GL_RASTERIZER_DISCARD_EXT         0x8C89
+#define GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS_EXT 0x8C8A
+#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS_EXT 0x8C8B
+#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS_EXT 0x8C80
+#define GL_TRANSFORM_FEEDBACK_VARYINGS_EXT 0x8C83
+#define GL_TRANSFORM_FEEDBACK_BUFFER_MODE_EXT 0x8C7F
+#define GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH_EXT 0x8C76
+#endif
+
+#ifndef GL_EXT_direct_state_access
+#define GL_PROGRAM_MATRIX_EXT             0x8E2D
+#define GL_TRANSPOSE_PROGRAM_MATRIX_EXT   0x8E2E
+#define GL_PROGRAM_MATRIX_STACK_DEPTH_EXT 0x8E2F
+#endif
+
+#ifndef GL_EXT_vertex_array_bgra
+/* reuse GL_BGRA */
+#endif
+
+#ifndef GL_EXT_texture_swizzle
+#define GL_TEXTURE_SWIZZLE_R_EXT          0x8E42
+#define GL_TEXTURE_SWIZZLE_G_EXT          0x8E43
+#define GL_TEXTURE_SWIZZLE_B_EXT          0x8E44
+#define GL_TEXTURE_SWIZZLE_A_EXT          0x8E45
+#define GL_TEXTURE_SWIZZLE_RGBA_EXT       0x8E46
+#endif
+
+#ifndef GL_NV_explicit_multisample
+#define GL_SAMPLE_POSITION_NV             0x8E50
+#define GL_SAMPLE_MASK_NV                 0x8E51
+#define GL_SAMPLE_MASK_VALUE_NV           0x8E52
+#define GL_TEXTURE_BINDING_RENDERBUFFER_NV 0x8E53
+#define GL_TEXTURE_RENDERBUFFER_DATA_STORE_BINDING_NV 0x8E54
+#define GL_TEXTURE_RENDERBUFFER_NV        0x8E55
+#define GL_SAMPLER_RENDERBUFFER_NV        0x8E56
+#define GL_INT_SAMPLER_RENDERBUFFER_NV    0x8E57
+#define GL_UNSIGNED_INT_SAMPLER_RENDERBUFFER_NV 0x8E58
+#define GL_MAX_SAMPLE_MASK_WORDS_NV       0x8E59
+#endif
+
+#ifndef GL_NV_transform_feedback2
+#define GL_TRANSFORM_FEEDBACK_NV          0x8E22
+#define GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED_NV 0x8E23
+#define GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE_NV 0x8E24
+#define GL_TRANSFORM_FEEDBACK_BINDING_NV  0x8E25
+#endif
+
+#ifndef GL_ATI_meminfo
+#define GL_VBO_FREE_MEMORY_ATI            0x87FB
+#define GL_TEXTURE_FREE_MEMORY_ATI        0x87FC
+#define GL_RENDERBUFFER_FREE_MEMORY_ATI   0x87FD
+#endif
+
+#ifndef GL_AMD_performance_monitor
+#define GL_COUNTER_TYPE_AMD               0x8BC0
+#define GL_COUNTER_RANGE_AMD              0x8BC1
+#define GL_UNSIGNED_INT64_AMD             0x8BC2
+#define GL_PERCENTAGE_AMD                 0x8BC3
+#define GL_PERFMON_RESULT_AVAILABLE_AMD   0x8BC4
+#define GL_PERFMON_RESULT_SIZE_AMD        0x8BC5
+#define GL_PERFMON_RESULT_AMD             0x8BC6
+#endif
+
+#ifndef GL_AMD_texture_texture4
+#endif
+
+#ifndef GL_AMD_vertex_shader_tesselator
+#define GL_SAMPLER_BUFFER_AMD             0x9001
+#define GL_INT_SAMPLER_BUFFER_AMD         0x9002
+#define GL_UNSIGNED_INT_SAMPLER_BUFFER_AMD 0x9003
+#define GL_TESSELLATION_MODE_AMD          0x9004
+#define GL_TESSELLATION_FACTOR_AMD        0x9005
+#define GL_DISCRETE_AMD                   0x9006
+#define GL_CONTINUOUS_AMD                 0x9007
+#endif
+
+#ifndef GL_EXT_provoking_vertex
+#define GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION_EXT 0x8E4C
+#define GL_FIRST_VERTEX_CONVENTION_EXT    0x8E4D
+#define GL_LAST_VERTEX_CONVENTION_EXT     0x8E4E
+#define GL_PROVOKING_VERTEX_EXT           0x8E4F
+#endif
+
+#ifndef GL_EXT_texture_snorm
+#define GL_ALPHA_SNORM                    0x9010
+#define GL_LUMINANCE_SNORM                0x9011
+#define GL_LUMINANCE_ALPHA_SNORM          0x9012
+#define GL_INTENSITY_SNORM                0x9013
+#define GL_ALPHA8_SNORM                   0x9014
+#define GL_LUMINANCE8_SNORM               0x9015
+#define GL_LUMINANCE8_ALPHA8_SNORM        0x9016
+#define GL_INTENSITY8_SNORM               0x9017
+#define GL_ALPHA16_SNORM                  0x9018
+#define GL_LUMINANCE16_SNORM              0x9019
+#define GL_LUMINANCE16_ALPHA16_SNORM      0x901A
+#define GL_INTENSITY16_SNORM              0x901B
+/* reuse GL_RED_SNORM */
+/* reuse GL_RG_SNORM */
+/* reuse GL_RGB_SNORM */
+/* reuse GL_RGBA_SNORM */
+/* reuse GL_R8_SNORM */
+/* reuse GL_RG8_SNORM */
+/* reuse GL_RGB8_SNORM */
+/* reuse GL_RGBA8_SNORM */
+/* reuse GL_R16_SNORM */
+/* reuse GL_RG16_SNORM */
+/* reuse GL_RGB16_SNORM */
+/* reuse GL_RGBA16_SNORM */
+/* reuse GL_SIGNED_NORMALIZED */
+#endif
+
+#ifndef GL_AMD_draw_buffers_blend
+#endif
+
+#ifndef GL_APPLE_texture_range
+#define GL_TEXTURE_RANGE_LENGTH_APPLE     0x85B7
+#define GL_TEXTURE_RANGE_POINTER_APPLE    0x85B8
+#define GL_TEXTURE_STORAGE_HINT_APPLE     0x85BC
+#define GL_STORAGE_PRIVATE_APPLE          0x85BD
+/* reuse GL_STORAGE_CACHED_APPLE */
+/* reuse GL_STORAGE_SHARED_APPLE */
+#endif
+
+#ifndef GL_APPLE_float_pixels
+#define GL_HALF_APPLE                     0x140B
+#define GL_RGBA_FLOAT32_APPLE             0x8814
+#define GL_RGB_FLOAT32_APPLE              0x8815
+#define GL_ALPHA_FLOAT32_APPLE            0x8816
+#define GL_INTENSITY_FLOAT32_APPLE        0x8817
+#define GL_LUMINANCE_FLOAT32_APPLE        0x8818
+#define GL_LUMINANCE_ALPHA_FLOAT32_APPLE  0x8819
+#define GL_RGBA_FLOAT16_APPLE             0x881A
+#define GL_RGB_FLOAT16_APPLE              0x881B
+#define GL_ALPHA_FLOAT16_APPLE            0x881C
+#define GL_INTENSITY_FLOAT16_APPLE        0x881D
+#define GL_LUMINANCE_FLOAT16_APPLE        0x881E
+#define GL_LUMINANCE_ALPHA_FLOAT16_APPLE  0x881F
+#define GL_COLOR_FLOAT_APPLE              0x8A0F
+#endif
+
+#ifndef GL_APPLE_vertex_program_evaluators
+#define GL_VERTEX_ATTRIB_MAP1_APPLE       0x8A00
+#define GL_VERTEX_ATTRIB_MAP2_APPLE       0x8A01
+#define GL_VERTEX_ATTRIB_MAP1_SIZE_APPLE  0x8A02
+#define GL_VERTEX_ATTRIB_MAP1_COEFF_APPLE 0x8A03
+#define GL_VERTEX_ATTRIB_MAP1_ORDER_APPLE 0x8A04
+#define GL_VERTEX_ATTRIB_MAP1_DOMAIN_APPLE 0x8A05
+#define GL_VERTEX_ATTRIB_MAP2_SIZE_APPLE  0x8A06
+#define GL_VERTEX_ATTRIB_MAP2_COEFF_APPLE 0x8A07
+#define GL_VERTEX_ATTRIB_MAP2_ORDER_APPLE 0x8A08
+#define GL_VERTEX_ATTRIB_MAP2_DOMAIN_APPLE 0x8A09
+#endif
+
+#ifndef GL_APPLE_aux_depth_stencil
+#define GL_AUX_DEPTH_STENCIL_APPLE        0x8A14
+#endif
+
+#ifndef GL_APPLE_object_purgeable
+#define GL_BUFFER_OBJECT_APPLE            0x85B3
+#define GL_RELEASED_APPLE                 0x8A19
+#define GL_VOLATILE_APPLE                 0x8A1A
+#define GL_RETAINED_APPLE                 0x8A1B
+#define GL_UNDEFINED_APPLE                0x8A1C
+#define GL_PURGEABLE_APPLE                0x8A1D
+#endif
+
+#ifndef GL_APPLE_row_bytes
+#define GL_PACK_ROW_BYTES_APPLE           0x8A15
+#define GL_UNPACK_ROW_BYTES_APPLE         0x8A16
+#endif
+
+#ifndef GL_APPLE_rgb_422
+#define GL_RGB_422_APPLE                  0x8A1F
+/* reuse GL_UNSIGNED_SHORT_8_8_APPLE */
+/* reuse GL_UNSIGNED_SHORT_8_8_REV_APPLE */
+#endif
+
+#ifndef GL_NV_video_capture
+#define GL_VIDEO_BUFFER_NV                0x9020
+#define GL_VIDEO_BUFFER_BINDING_NV        0x9021
+#define GL_FIELD_UPPER_NV                 0x9022
+#define GL_FIELD_LOWER_NV                 0x9023
+#define GL_NUM_VIDEO_CAPTURE_STREAMS_NV   0x9024
+#define GL_NEXT_VIDEO_CAPTURE_BUFFER_STATUS_NV 0x9025
+#define GL_VIDEO_CAPTURE_TO_422_SUPPORTED_NV 0x9026
+#define GL_LAST_VIDEO_CAPTURE_STATUS_NV   0x9027
+#define GL_VIDEO_BUFFER_PITCH_NV          0x9028
+#define GL_VIDEO_COLOR_CONVERSION_MATRIX_NV 0x9029
+#define GL_VIDEO_COLOR_CONVERSION_MAX_NV  0x902A
+#define GL_VIDEO_COLOR_CONVERSION_MIN_NV  0x902B
+#define GL_VIDEO_COLOR_CONVERSION_OFFSET_NV 0x902C
+#define GL_VIDEO_BUFFER_INTERNAL_FORMAT_NV 0x902D
+#define GL_PARTIAL_SUCCESS_NV             0x902E
+#define GL_SUCCESS_NV                     0x902F
+#define GL_FAILURE_NV                     0x9030
+#define GL_YCBYCR8_422_NV                 0x9031
+#define GL_YCBAYCR8A_4224_NV              0x9032
+#define GL_Z6Y10Z6CB10Z6Y10Z6CR10_422_NV  0x9033
+#define GL_Z6Y10Z6CB10Z6A10Z6Y10Z6CR10Z6A10_4224_NV 0x9034
+#define GL_Z4Y12Z4CB12Z4Y12Z4CR12_422_NV  0x9035
+#define GL_Z4Y12Z4CB12Z4A12Z4Y12Z4CR12Z4A12_4224_NV 0x9036
+#define GL_Z4Y12Z4CB12Z4CR12_444_NV       0x9037
+#define GL_VIDEO_CAPTURE_FRAME_WIDTH_NV   0x9038
+#define GL_VIDEO_CAPTURE_FRAME_HEIGHT_NV  0x9039
+#define GL_VIDEO_CAPTURE_FIELD_UPPER_HEIGHT_NV 0x903A
+#define GL_VIDEO_CAPTURE_FIELD_LOWER_HEIGHT_NV 0x903B
+#define GL_VIDEO_CAPTURE_SURFACE_ORIGIN_NV 0x903C
+#endif
+
+#ifndef GL_NV_copy_image
+#endif
+
+#ifndef GL_EXT_separate_shader_objects
+#define GL_ACTIVE_PROGRAM_EXT             0x8B8D
+#endif
+
+#ifndef GL_NV_parameter_buffer_object2
+#endif
+
+#ifndef GL_NV_shader_buffer_load
+#define GL_BUFFER_GPU_ADDRESS_NV          0x8F1D
+#define GL_GPU_ADDRESS_NV                 0x8F34
+#define GL_MAX_SHADER_BUFFER_ADDRESS_NV   0x8F35
+#endif
+
+#ifndef GL_NV_vertex_buffer_unified_memory
+#define GL_VERTEX_ATTRIB_ARRAY_UNIFIED_NV 0x8F1E
+#define GL_ELEMENT_ARRAY_UNIFIED_NV       0x8F1F
+#define GL_VERTEX_ATTRIB_ARRAY_ADDRESS_NV 0x8F20
+#define GL_VERTEX_ARRAY_ADDRESS_NV        0x8F21
+#define GL_NORMAL_ARRAY_ADDRESS_NV        0x8F22
+#define GL_COLOR_ARRAY_ADDRESS_NV         0x8F23
+#define GL_INDEX_ARRAY_ADDRESS_NV         0x8F24
+#define GL_TEXTURE_COORD_ARRAY_ADDRESS_NV 0x8F25
+#define GL_EDGE_FLAG_ARRAY_ADDRESS_NV     0x8F26
+#define GL_SECONDARY_COLOR_ARRAY_ADDRESS_NV 0x8F27
+#define GL_FOG_COORD_ARRAY_ADDRESS_NV     0x8F28
+#define GL_ELEMENT_ARRAY_ADDRESS_NV       0x8F29
+#define GL_VERTEX_ATTRIB_ARRAY_LENGTH_NV  0x8F2A
+#define GL_VERTEX_ARRAY_LENGTH_NV         0x8F2B
+#define GL_NORMAL_ARRAY_LENGTH_NV         0x8F2C
+#define GL_COLOR_ARRAY_LENGTH_NV          0x8F2D
+#define GL_INDEX_ARRAY_LENGTH_NV          0x8F2E
+#define GL_TEXTURE_COORD_ARRAY_LENGTH_NV  0x8F2F
+#define GL_EDGE_FLAG_ARRAY_LENGTH_NV      0x8F30
+#define GL_SECONDARY_COLOR_ARRAY_LENGTH_NV 0x8F31
+#define GL_FOG_COORD_ARRAY_LENGTH_NV      0x8F32
+#define GL_ELEMENT_ARRAY_LENGTH_NV        0x8F33
+#define GL_DRAW_INDIRECT_UNIFIED_NV       0x8F40
+#define GL_DRAW_INDIRECT_ADDRESS_NV       0x8F41
+#define GL_DRAW_INDIRECT_LENGTH_NV        0x8F42
+#endif
+
+#ifndef GL_NV_texture_barrier
+#endif
+
+#ifndef GL_AMD_shader_stencil_export
+#endif
+
+#ifndef GL_AMD_seamless_cubemap_per_texture
+/* reuse GL_TEXTURE_CUBE_MAP_SEAMLESS_ARB */
+#endif
+
+#ifndef GL_AMD_conservative_depth
+#endif
+
+#ifndef GL_EXT_shader_image_load_store
+#define GL_MAX_IMAGE_UNITS_EXT            0x8F38
+#define GL_MAX_COMBINED_IMAGE_UNITS_AND_FRAGMENT_OUTPUTS_EXT 0x8F39
+#define GL_IMAGE_BINDING_NAME_EXT         0x8F3A
+#define GL_IMAGE_BINDING_LEVEL_EXT        0x8F3B
+#define GL_IMAGE_BINDING_LAYERED_EXT      0x8F3C
+#define GL_IMAGE_BINDING_LAYER_EXT        0x8F3D
+#define GL_IMAGE_BINDING_ACCESS_EXT       0x8F3E
+#define GL_IMAGE_1D_EXT                   0x904C
+#define GL_IMAGE_2D_EXT                   0x904D
+#define GL_IMAGE_3D_EXT                   0x904E
+#define GL_IMAGE_2D_RECT_EXT              0x904F
+#define GL_IMAGE_CUBE_EXT                 0x9050
+#define GL_IMAGE_BUFFER_EXT               0x9051
+#define GL_IMAGE_1D_ARRAY_EXT             0x9052
+#define GL_IMAGE_2D_ARRAY_EXT             0x9053
+#define GL_IMAGE_CUBE_MAP_ARRAY_EXT       0x9054
+#define GL_IMAGE_2D_MULTISAMPLE_EXT       0x9055
+#define GL_IMAGE_2D_MULTISAMPLE_ARRAY_EXT 0x9056
+#define GL_INT_IMAGE_1D_EXT               0x9057
+#define GL_INT_IMAGE_2D_EXT               0x9058
+#define GL_INT_IMAGE_3D_EXT               0x9059
+#define GL_INT_IMAGE_2D_RECT_EXT          0x905A
+#define GL_INT_IMAGE_CUBE_EXT             0x905B
+#define GL_INT_IMAGE_BUFFER_EXT           0x905C
+#define GL_INT_IMAGE_1D_ARRAY_EXT         0x905D
+#define GL_INT_IMAGE_2D_ARRAY_EXT         0x905E
+#define GL_INT_IMAGE_CUBE_MAP_ARRAY_EXT   0x905F
+#define GL_INT_IMAGE_2D_MULTISAMPLE_EXT   0x9060
+#define GL_INT_IMAGE_2D_MULTISAMPLE_ARRAY_EXT 0x9061
+#define GL_UNSIGNED_INT_IMAGE_1D_EXT      0x9062
+#define GL_UNSIGNED_INT_IMAGE_2D_EXT      0x9063
+#define GL_UNSIGNED_INT_IMAGE_3D_EXT      0x9064
+#define GL_UNSIGNED_INT_IMAGE_2D_RECT_EXT 0x9065
+#define GL_UNSIGNED_INT_IMAGE_CUBE_EXT    0x9066
+#define GL_UNSIGNED_INT_IMAGE_BUFFER_EXT  0x9067
+#define GL_UNSIGNED_INT_IMAGE_1D_ARRAY_EXT 0x9068
+#define GL_UNSIGNED_INT_IMAGE_2D_ARRAY_EXT 0x9069
+#define GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY_EXT 0x906A
+#define GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_EXT 0x906B
+#define GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_ARRAY_EXT 0x906C
+#define GL_MAX_IMAGE_SAMPLES_EXT          0x906D
+#define GL_IMAGE_BINDING_FORMAT_EXT       0x906E
+#define GL_VERTEX_ATTRIB_ARRAY_BARRIER_BIT_EXT 0x00000001
+#define GL_ELEMENT_ARRAY_BARRIER_BIT_EXT  0x00000002
+#define GL_UNIFORM_BARRIER_BIT_EXT        0x00000004
+#define GL_TEXTURE_FETCH_BARRIER_BIT_EXT  0x00000008
+#define GL_SHADER_IMAGE_ACCESS_BARRIER_BIT_EXT 0x00000020
+#define GL_COMMAND_BARRIER_BIT_EXT        0x00000040
+#define GL_PIXEL_BUFFER_BARRIER_BIT_EXT   0x00000080
+#define GL_TEXTURE_UPDATE_BARRIER_BIT_EXT 0x00000100
+#define GL_BUFFER_UPDATE_BARRIER_BIT_EXT  0x00000200
+#define GL_FRAMEBUFFER_BARRIER_BIT_EXT    0x00000400
+#define GL_TRANSFORM_FEEDBACK_BARRIER_BIT_EXT 0x00000800
+#define GL_ATOMIC_COUNTER_BARRIER_BIT_EXT 0x00001000
+#define GL_ALL_BARRIER_BITS_EXT           0xFFFFFFFF
+#endif
+
+#ifndef GL_EXT_vertex_attrib_64bit
+/* reuse GL_DOUBLE */
+#define GL_DOUBLE_VEC2_EXT                0x8FFC
+#define GL_DOUBLE_VEC3_EXT                0x8FFD
+#define GL_DOUBLE_VEC4_EXT                0x8FFE
+#define GL_DOUBLE_MAT2_EXT                0x8F46
+#define GL_DOUBLE_MAT3_EXT                0x8F47
+#define GL_DOUBLE_MAT4_EXT                0x8F48
+#define GL_DOUBLE_MAT2x3_EXT              0x8F49
+#define GL_DOUBLE_MAT2x4_EXT              0x8F4A
+#define GL_DOUBLE_MAT3x2_EXT              0x8F4B
+#define GL_DOUBLE_MAT3x4_EXT              0x8F4C
+#define GL_DOUBLE_MAT4x2_EXT              0x8F4D
+#define GL_DOUBLE_MAT4x3_EXT              0x8F4E
+#endif
+
+#ifndef GL_NV_gpu_program5
+#define GL_MAX_GEOMETRY_PROGRAM_INVOCATIONS_NV 0x8E5A
+#define GL_MIN_FRAGMENT_INTERPOLATION_OFFSET_NV 0x8E5B
+#define GL_MAX_FRAGMENT_INTERPOLATION_OFFSET_NV 0x8E5C
+#define GL_FRAGMENT_PROGRAM_INTERPOLATION_OFFSET_BITS_NV 0x8E5D
+#define GL_MAX_PROGRAM_SUBROUTINE_PARAMETERS_NV 0x8F44
+#define GL_MAX_PROGRAM_SUBROUTINE_NUM_NV  0x8F45
+#endif
+
+#ifndef GL_NV_gpu_shader5
+#define GL_INT64_NV                       0x140E
+#define GL_UNSIGNED_INT64_NV              0x140F
+#define GL_INT8_NV                        0x8FE0
+#define GL_INT8_VEC2_NV                   0x8FE1
+#define GL_INT8_VEC3_NV                   0x8FE2
+#define GL_INT8_VEC4_NV                   0x8FE3
+#define GL_INT16_NV                       0x8FE4
+#define GL_INT16_VEC2_NV                  0x8FE5
+#define GL_INT16_VEC3_NV                  0x8FE6
+#define GL_INT16_VEC4_NV                  0x8FE7
+#define GL_INT64_VEC2_NV                  0x8FE9
+#define GL_INT64_VEC3_NV                  0x8FEA
+#define GL_INT64_VEC4_NV                  0x8FEB
+#define GL_UNSIGNED_INT8_NV               0x8FEC
+#define GL_UNSIGNED_INT8_VEC2_NV          0x8FED
+#define GL_UNSIGNED_INT8_VEC3_NV          0x8FEE
+#define GL_UNSIGNED_INT8_VEC4_NV          0x8FEF
+#define GL_UNSIGNED_INT16_NV              0x8FF0
+#define GL_UNSIGNED_INT16_VEC2_NV         0x8FF1
+#define GL_UNSIGNED_INT16_VEC3_NV         0x8FF2
+#define GL_UNSIGNED_INT16_VEC4_NV         0x8FF3
+#define GL_UNSIGNED_INT64_VEC2_NV         0x8FF5
+#define GL_UNSIGNED_INT64_VEC3_NV         0x8FF6
+#define GL_UNSIGNED_INT64_VEC4_NV         0x8FF7
+#define GL_FLOAT16_NV                     0x8FF8
+#define GL_FLOAT16_VEC2_NV                0x8FF9
+#define GL_FLOAT16_VEC3_NV                0x8FFA
+#define GL_FLOAT16_VEC4_NV                0x8FFB
+/* reuse GL_PATCHES */
+#endif
+
+#ifndef GL_NV_shader_buffer_store
+#define GL_SHADER_GLOBAL_ACCESS_BARRIER_BIT_NV 0x00000010
+/* reuse GL_READ_WRITE */
+/* reuse GL_WRITE_ONLY */
+#endif
+
+#ifndef GL_NV_tessellation_program5
+#define GL_MAX_PROGRAM_PATCH_ATTRIBS_NV   0x86D8
+#define GL_TESS_CONTROL_PROGRAM_NV        0x891E
+#define GL_TESS_EVALUATION_PROGRAM_NV     0x891F
+#define GL_TESS_CONTROL_PROGRAM_PARAMETER_BUFFER_NV 0x8C74
+#define GL_TESS_EVALUATION_PROGRAM_PARAMETER_BUFFER_NV 0x8C75
+#endif
+
+#ifndef GL_NV_vertex_attrib_integer_64bit
+/* reuse GL_INT64_NV */
+/* reuse GL_UNSIGNED_INT64_NV */
+#endif
+
+#ifndef GL_NV_multisample_coverage
+#define GL_COVERAGE_SAMPLES_NV            0x80A9
+#define GL_COLOR_SAMPLES_NV               0x8E20
+#endif
+
+#ifndef GL_AMD_name_gen_delete
+#define GL_DATA_BUFFER_AMD                0x9151
+#define GL_PERFORMANCE_MONITOR_AMD        0x9152
+#define GL_QUERY_OBJECT_AMD               0x9153
+#define GL_VERTEX_ARRAY_OBJECT_AMD        0x9154
+#define GL_SAMPLER_OBJECT_AMD             0x9155
+#endif
+
+#ifndef GL_AMD_debug_output
+#define GL_MAX_DEBUG_LOGGED_MESSAGES_AMD  0x9144
+#define GL_DEBUG_LOGGED_MESSAGES_AMD      0x9145
+#define GL_DEBUG_SEVERITY_HIGH_AMD        0x9146
+#define GL_DEBUG_SEVERITY_MEDIUM_AMD      0x9147
+#define GL_DEBUG_SEVERITY_LOW_AMD         0x9148
+#define GL_DEBUG_CATEGORY_API_ERROR_AMD   0x9149
+#define GL_DEBUG_CATEGORY_WINDOW_SYSTEM_AMD 0x914A
+#define GL_DEBUG_CATEGORY_DEPRECATION_AMD 0x914B
+#define GL_DEBUG_CATEGORY_UNDEFINED_BEHAVIOR_AMD 0x914C
+#define GL_DEBUG_CATEGORY_PERFORMANCE_AMD 0x914D
+#define GL_DEBUG_CATEGORY_SHADER_COMPILER_AMD 0x914E
+#define GL_DEBUG_CATEGORY_APPLICATION_AMD 0x914F
+#define GL_DEBUG_CATEGORY_OTHER_AMD       0x9150
+#endif
+
+#ifndef GL_NV_vdpau_interop
+#define GL_SURFACE_STATE_NV               0x86EB
+#define GL_SURFACE_REGISTERED_NV          0x86FD
+#define GL_SURFACE_MAPPED_NV              0x8700
+#define GL_WRITE_DISCARD_NV               0x88BE
+#endif
+
+#ifndef GL_AMD_transform_feedback3_lines_triangles
+#endif
+
+
+/*************************************************************/
+
+#include <stddef.h>
+#ifndef GL_VERSION_2_0
+/* GL type for program/shader text */
+typedef char GLchar;
+#endif
+
+#ifndef GL_VERSION_1_5
+/* GL types for handling large vertex buffer objects */
+#if defined(__APPLE__)
+typedef long GLintptr;
+typedef long GLsizeiptr;
+#else
+typedef ptrdiff_t GLintptr;
+typedef ptrdiff_t GLsizeiptr;
+#endif
+#endif
+
+#ifndef GL_ARB_vertex_buffer_object
+/* GL types for handling large vertex buffer objects */
+#if defined(__APPLE__)
+typedef long GLintptrARB;
+typedef long GLsizeiptrARB;
+#else
+typedef ptrdiff_t GLintptrARB;
+typedef ptrdiff_t GLsizeiptrARB;
+#endif
+#endif
+
+#ifndef GL_ARB_shader_objects
+/* GL types for program/shader text and shader object handles */
+typedef char GLcharARB;
+#if defined(__APPLE__)
+typedef void *GLhandleARB;
+#else
+typedef unsigned int GLhandleARB;
+#endif
+#endif
+
+/* GL type for "half" precision (s10e5) float data in host memory */
+#ifndef GL_ARB_half_float_pixel
+typedef unsigned short GLhalfARB;
+#endif
+
+#ifndef GL_NV_half_float
+typedef unsigned short GLhalfNV;
+#endif
+
+#ifndef GLEXT_64_TYPES_DEFINED
+/* This code block is duplicated in glxext.h, so must be protected */
+#define GLEXT_64_TYPES_DEFINED
+/* Define int32_t, int64_t, and uint64_t types for UST/MSC */
+/* (as used in the GL_EXT_timer_query extension). */
+#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+#include <inttypes.h>
+#elif defined(__sun__) || defined(__digital__)
+#include <inttypes.h>
+#if defined(__STDC__)
+#if defined(__arch64__) || defined(_LP64)
+typedef long int int64_t;
+typedef unsigned long int uint64_t;
+#else
+typedef long long int int64_t;
+typedef unsigned long long int uint64_t;
+#endif /* __arch64__ */
+#endif /* __STDC__ */
+#elif defined( __VMS ) || defined(__sgi)
+#include <inttypes.h>
+#elif defined(__SCO__) || defined(__USLC__)
+#include <stdint.h>
+#elif defined(__UNIXOS2__) || defined(__SOL64__)
+typedef long int int32_t;
+typedef long long int int64_t;
+typedef unsigned long long int uint64_t;
+#elif defined(_WIN32) && defined(__GNUC__)
+#include <stdint.h>
+#elif defined(_WIN32)
+typedef __int32 int32_t;
+typedef __int64 int64_t;
+typedef unsigned __int64 uint64_t;
+#else
+/* Fallback if nothing above works */
+#include <inttypes.h>
+#endif
+#endif
+
+#ifndef GL_EXT_timer_query
+typedef int64_t GLint64EXT;
+typedef uint64_t GLuint64EXT;
+#endif
+
+#ifndef GL_ARB_sync
+typedef int64_t GLint64;
+typedef uint64_t GLuint64;
+typedef struct __GLsync *GLsync;
+#endif
+
+#ifndef GL_ARB_cl_event
+/* These incomplete types let us declare types compatible with OpenCL's cl_context and cl_event */
+struct _cl_context;
+struct _cl_event;
+#endif
+
+#ifndef GL_ARB_debug_output
+typedef void (APIENTRY *GLDEBUGPROCARB)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,GLvoid *userParam);
+#endif
+
+#ifndef GL_AMD_debug_output
+typedef void (APIENTRY *GLDEBUGPROCAMD)(GLuint id,GLenum category,GLenum severity,GLsizei length,const GLchar *message,GLvoid *userParam);
+#endif
+
+#ifndef GL_NV_vdpau_interop
+typedef GLintptr GLvdpauSurfaceNV;
+#endif
+
+#ifndef GL_VERSION_1_2
+#define GL_VERSION_1_2 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glBlendColor (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
+GLAPI void APIENTRY glBlendEquation (GLenum mode);
+GLAPI void APIENTRY glDrawRangeElements (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices);
+GLAPI void APIENTRY glTexImage3D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels);
+GLAPI void APIENTRY glTexSubImage3D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels);
+GLAPI void APIENTRY glCopyTexSubImage3D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLBLENDCOLORPROC) (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
+typedef void (APIENTRYP PFNGLBLENDEQUATIONPROC) (GLenum mode);
+typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTSPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices);
+typedef void (APIENTRYP PFNGLTEXIMAGE3DPROC) (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels);
+typedef void (APIENTRYP PFNGLTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels);
+typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
+#endif
+
+#ifndef GL_VERSION_1_2_DEPRECATED
+#define GL_VERSION_1_2_DEPRECATED 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glColorTable (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table);
+GLAPI void APIENTRY glColorTableParameterfv (GLenum target, GLenum pname, const GLfloat *params);
+GLAPI void APIENTRY glColorTableParameteriv (GLenum target, GLenum pname, const GLint *params);
+GLAPI void APIENTRY glCopyColorTable (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
+GLAPI void APIENTRY glGetColorTable (GLenum target, GLenum format, GLenum type, GLvoid *table);
+GLAPI void APIENTRY glGetColorTableParameterfv (GLenum target, GLenum pname, GLfloat *params);
+GLAPI void APIENTRY glGetColorTableParameteriv (GLenum target, GLenum pname, GLint *params);
+GLAPI void APIENTRY glColorSubTable (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *data);
+GLAPI void APIENTRY glCopyColorSubTable (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width);
+GLAPI void APIENTRY glConvolutionFilter1D (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *image);
+GLAPI void APIENTRY glConvolutionFilter2D (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image);
+GLAPI void APIENTRY glConvolutionParameterf (GLenum target, GLenum pname, GLfloat params);
+GLAPI void APIENTRY glConvolutionParameterfv (GLenum target, GLenum pname, const GLfloat *params);
+GLAPI void APIENTRY glConvolutionParameteri (GLenum target, GLenum pname, GLint params);
+GLAPI void APIENTRY glConvolutionParameteriv (GLenum target, GLenum pname, const GLint *params);
+GLAPI void APIENTRY glCopyConvolutionFilter1D (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
+GLAPI void APIENTRY glCopyConvolutionFilter2D (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height);
+GLAPI void APIENTRY glGetConvolutionFilter (GLenum target, GLenum format, GLenum type, GLvoid *image);
+GLAPI void APIENTRY glGetConvolutionParameterfv (GLenum target, GLenum pname, GLfloat *params);
+GLAPI void APIENTRY glGetConvolutionParameteriv (GLenum target, GLenum pname, GLint *params);
+GLAPI void APIENTRY glGetSeparableFilter (GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span);
+GLAPI void APIENTRY glSeparableFilter2D (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column);
+GLAPI void APIENTRY glGetHistogram (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values);
+GLAPI void APIENTRY glGetHistogramParameterfv (GLenum target, GLenum pname, GLfloat *params);
+GLAPI void APIENTRY glGetHistogramParameteriv (GLenum target, GLenum pname, GLint *params);
+GLAPI void APIENTRY glGetMinmax (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values);
+GLAPI void APIENTRY glGetMinmaxParameterfv (GLenum target, GLenum pname, GLfloat *params);
+GLAPI void APIENTRY glGetMinmaxParameteriv (GLenum target, GLenum pname, GLint *params);
+GLAPI void APIENTRY glHistogram (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink);
+GLAPI void APIENTRY glMinmax (GLenum target, GLenum internalformat, GLboolean sink);
+GLAPI void APIENTRY glResetHistogram (GLenum target);
+GLAPI void APIENTRY glResetMinmax (GLenum target);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLCOLORTABLEPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table);
+typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params);
+typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params);
+typedef void (APIENTRYP PFNGLCOPYCOLORTABLEPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
+typedef void (APIENTRYP PFNGLGETCOLORTABLEPROC) (GLenum target, GLenum format, GLenum type, GLvoid *table);
+typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
+typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLCOLORSUBTABLEPROC) (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *data);
+typedef void (APIENTRYP PFNGLCOPYCOLORSUBTABLEPROC) (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width);
+typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER1DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *image);
+typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER2DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image);
+typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFPROC) (GLenum target, GLenum pname, GLfloat params);
+typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params);
+typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIPROC) (GLenum target, GLenum pname, GLint params);
+typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params);
+typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER1DPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
+typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER2DPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height);
+typedef void (APIENTRYP PFNGLGETCONVOLUTIONFILTERPROC) (GLenum target, GLenum format, GLenum type, GLvoid *image);
+typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
+typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLGETSEPARABLEFILTERPROC) (GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span);
+typedef void (APIENTRYP PFNGLSEPARABLEFILTER2DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column);
+typedef void (APIENTRYP PFNGLGETHISTOGRAMPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values);
+typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
+typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLGETMINMAXPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values);
+typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
+typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLHISTOGRAMPROC) (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink);
+typedef void (APIENTRYP PFNGLMINMAXPROC) (GLenum target, GLenum internalformat, GLboolean sink);
+typedef void (APIENTRYP PFNGLRESETHISTOGRAMPROC) (GLenum target);
+typedef void (APIENTRYP PFNGLRESETMINMAXPROC) (GLenum target);
+#endif
+
+#ifndef GL_VERSION_1_3
+#define GL_VERSION_1_3 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glActiveTexture (GLenum texture);
+GLAPI void APIENTRY glSampleCoverage (GLclampf value, GLboolean invert);
+GLAPI void APIENTRY glCompressedTexImage3D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data);
+GLAPI void APIENTRY glCompressedTexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data);
+GLAPI void APIENTRY glCompressedTexImage1D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data);
+GLAPI void APIENTRY glCompressedTexSubImage3D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data);
+GLAPI void APIENTRY glCompressedTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data);
+GLAPI void APIENTRY glCompressedTexSubImage1D (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data);
+GLAPI void APIENTRY glGetCompressedTexImage (GLenum target, GLint level, GLvoid *img);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLACTIVETEXTUREPROC) (GLenum texture);
+typedef void (APIENTRYP PFNGLSAMPLECOVERAGEPROC) (GLclampf value, GLboolean invert);
+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data);
+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE2DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data);
+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE1DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data);
+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data);
+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data);
+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data);
+typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXIMAGEPROC) (GLenum target, GLint level, GLvoid *img);
+#endif
+
+#ifndef GL_VERSION_1_3_DEPRECATED
+#define GL_VERSION_1_3_DEPRECATED 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glClientActiveTexture (GLenum texture);
+GLAPI void APIENTRY glMultiTexCoord1d (GLenum target, GLdouble s);
+GLAPI void APIENTRY glMultiTexCoord1dv (GLenum target, const GLdouble *v);
+GLAPI void APIENTRY glMultiTexCoord1f (GLenum target, GLfloat s);
+GLAPI void APIENTRY glMultiTexCoord1fv (GLenum target, const GLfloat *v);
+GLAPI void APIENTRY glMultiTexCoord1i (GLenum target, GLint s);
+GLAPI void APIENTRY glMultiTexCoord1iv (GLenum target, const GLint *v);
+GLAPI void APIENTRY glMultiTexCoord1s (GLenum target, GLshort s);
+GLAPI void APIENTRY glMultiTexCoord1sv (GLenum target, const GLshort *v);
+GLAPI void APIENTRY glMultiTexCoord2d (GLenum target, GLdouble s, GLdouble t);
+GLAPI void APIENTRY glMultiTexCoord2dv (GLenum target, const GLdouble *v);
+GLAPI void APIENTRY glMultiTexCoord2f (GLenum target, GLfloat s, GLfloat t);
+GLAPI void APIENTRY glMultiTexCoord2fv (GLenum target, const GLfloat *v);
+GLAPI void APIENTRY glMultiTexCoord2i (GLenum target, GLint s, GLint t);
+GLAPI void APIENTRY glMultiTexCoord2iv (GLenum target, const GLint *v);
+GLAPI void APIENTRY glMultiTexCoord2s (GLenum target, GLshort s, GLshort t);
+GLAPI void APIENTRY glMultiTexCoord2sv (GLenum target, const GLshort *v);
+GLAPI void APIENTRY glMultiTexCoord3d (GLenum target, GLdouble s, GLdouble t, GLdouble r);
+GLAPI void APIENTRY glMultiTexCoord3dv (GLenum target, const GLdouble *v);
+GLAPI void APIENTRY glMultiTexCoord3f (GLenum target, GLfloat s, GLfloat t, GLfloat r);
+GLAPI void APIENTRY glMultiTexCoord3fv (GLenum target, const GLfloat *v);
+GLAPI void APIENTRY glMultiTexCoord3i (GLenum target, GLint s, GLint t, GLint r);
+GLAPI void APIENTRY glMultiTexCoord3iv (GLenum target, const GLint *v);
+GLAPI void APIENTRY glMultiTexCoord3s (GLenum target, GLshort s, GLshort t, GLshort r);
+GLAPI void APIENTRY glMultiTexCoord3sv (GLenum target, const GLshort *v);
+GLAPI void APIENTRY glMultiTexCoord4d (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);
+GLAPI void APIENTRY glMultiTexCoord4dv (GLenum target, const GLdouble *v);
+GLAPI void APIENTRY glMultiTexCoord4f (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
+GLAPI void APIENTRY glMultiTexCoord4fv (GLenum target, const GLfloat *v);
+GLAPI void APIENTRY glMultiTexCoord4i (GLenum target, GLint s, GLint t, GLint r, GLint q);
+GLAPI void APIENTRY glMultiTexCoord4iv (GLenum target, const GLint *v);
+GLAPI void APIENTRY glMultiTexCoord4s (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);
+GLAPI void APIENTRY glMultiTexCoord4sv (GLenum target, const GLshort *v);
+GLAPI void APIENTRY glLoadTransposeMatrixf (const GLfloat *m);
+GLAPI void APIENTRY glLoadTransposeMatrixd (const GLdouble *m);
+GLAPI void APIENTRY glMultTransposeMatrixf (const GLfloat *m);
+GLAPI void APIENTRY glMultTransposeMatrixd (const GLdouble *m);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLCLIENTACTIVETEXTUREPROC) (GLenum texture);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD1DPROC) (GLenum target, GLdouble s);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD1DVPROC) (GLenum target, const GLdouble *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD1FPROC) (GLenum target, GLfloat s);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD1FVPROC) (GLenum target, const GLfloat *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD1IPROC) (GLenum target, GLint s);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD1IVPROC) (GLenum target, const GLint *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD1SPROC) (GLenum target, GLshort s);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD1SVPROC) (GLenum target, const GLshort *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD2DPROC) (GLenum target, GLdouble s, GLdouble t);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD2DVPROC) (GLenum target, const GLdouble *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD2FPROC) (GLenum target, GLfloat s, GLfloat t);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD2FVPROC) (GLenum target, const GLfloat *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD2IPROC) (GLenum target, GLint s, GLint t);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD2IVPROC) (GLenum target, const GLint *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD2SPROC) (GLenum target, GLshort s, GLshort t);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD2SVPROC) (GLenum target, const GLshort *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD3DPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD3DVPROC) (GLenum target, const GLdouble *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD3FPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD3FVPROC) (GLenum target, const GLfloat *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD3IPROC) (GLenum target, GLint s, GLint t, GLint r);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD3IVPROC) (GLenum target, const GLint *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD3SPROC) (GLenum target, GLshort s, GLshort t, GLshort r);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD3SVPROC) (GLenum target, const GLshort *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD4DPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD4DVPROC) (GLenum target, const GLdouble *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD4FPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD4FVPROC) (GLenum target, const GLfloat *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD4IPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD4IVPROC) (GLenum target, const GLint *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD4SPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD4SVPROC) (GLenum target, const GLshort *v);
+typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXFPROC) (const GLfloat *m);
+typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXDPROC) (const GLdouble *m);
+typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXFPROC) (const GLfloat *m);
+typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXDPROC) (const GLdouble *m);
+#endif
+
+#ifndef GL_VERSION_1_4
+#define GL_VERSION_1_4 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glBlendFuncSeparate (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
+GLAPI void APIENTRY glMultiDrawArrays (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount);
+GLAPI void APIENTRY glMultiDrawElements (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount);
+GLAPI void APIENTRY glPointParameterf (GLenum pname, GLfloat param);
+GLAPI void APIENTRY glPointParameterfv (GLenum pname, const GLfloat *params);
+GLAPI void APIENTRY glPointParameteri (GLenum pname, GLint param);
+GLAPI void APIENTRY glPointParameteriv (GLenum pname, const GLint *params);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
+typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSPROC) (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount);
+typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSPROC) (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount);
+typedef void (APIENTRYP PFNGLPOINTPARAMETERFPROC) (GLenum pname, GLfloat param);
+typedef void (APIENTRYP PFNGLPOINTPARAMETERFVPROC) (GLenum pname, const GLfloat *params);
+typedef void (APIENTRYP PFNGLPOINTPARAMETERIPROC) (GLenum pname, GLint param);
+typedef void (APIENTRYP PFNGLPOINTPARAMETERIVPROC) (GLenum pname, const GLint *params);
+#endif
+
+#ifndef GL_VERSION_1_4_DEPRECATED
+#define GL_VERSION_1_4_DEPRECATED 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glFogCoordf (GLfloat coord);
+GLAPI void APIENTRY glFogCoordfv (const GLfloat *coord);
+GLAPI void APIENTRY glFogCoordd (GLdouble coord);
+GLAPI void APIENTRY glFogCoorddv (const GLdouble *coord);
+GLAPI void APIENTRY glFogCoordPointer (GLenum type, GLsizei stride, const GLvoid *pointer);
+GLAPI void APIENTRY glSecondaryColor3b (GLbyte red, GLbyte green, GLbyte blue);
+GLAPI void APIENTRY glSecondaryColor3bv (const GLbyte *v);
+GLAPI void APIENTRY glSecondaryColor3d (GLdouble red, GLdouble green, GLdouble blue);
+GLAPI void APIENTRY glSecondaryColor3dv (const GLdouble *v);
+GLAPI void APIENTRY glSecondaryColor3f (GLfloat red, GLfloat green, GLfloat blue);
+GLAPI void APIENTRY glSecondaryColor3fv (const GLfloat *v);
+GLAPI void APIENTRY glSecondaryColor3i (GLint red, GLint green, GLint blue);
+GLAPI void APIENTRY glSecondaryColor3iv (const GLint *v);
+GLAPI void APIENTRY glSecondaryColor3s (GLshort red, GLshort green, GLshort blue);
+GLAPI void APIENTRY glSecondaryColor3sv (const GLshort *v);
+GLAPI void APIENTRY glSecondaryColor3ub (GLubyte red, GLubyte green, GLubyte blue);
+GLAPI void APIENTRY glSecondaryColor3ubv (const GLubyte *v);
+GLAPI void APIENTRY glSecondaryColor3ui (GLuint red, GLuint green, GLuint blue);
+GLAPI void APIENTRY glSecondaryColor3uiv (const GLuint *v);
+GLAPI void APIENTRY glSecondaryColor3us (GLushort red, GLushort green, GLushort blue);
+GLAPI void APIENTRY glSecondaryColor3usv (const GLushort *v);
+GLAPI void APIENTRY glSecondaryColorPointer (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
+GLAPI void APIENTRY glWindowPos2d (GLdouble x, GLdouble y);
+GLAPI void APIENTRY glWindowPos2dv (const GLdouble *v);
+GLAPI void APIENTRY glWindowPos2f (GLfloat x, GLfloat y);
+GLAPI void APIENTRY glWindowPos2fv (const GLfloat *v);
+GLAPI void APIENTRY glWindowPos2i (GLint x, GLint y);
+GLAPI void APIENTRY glWindowPos2iv (const GLint *v);
+GLAPI void APIENTRY glWindowPos2s (GLshort x, GLshort y);
+GLAPI void APIENTRY glWindowPos2sv (const GLshort *v);
+GLAPI void APIENTRY glWindowPos3d (GLdouble x, GLdouble y, GLdouble z);
+GLAPI void APIENTRY glWindowPos3dv (const GLdouble *v);
+GLAPI void APIENTRY glWindowPos3f (GLfloat x, GLfloat y, GLfloat z);
+GLAPI void APIENTRY glWindowPos3fv (const GLfloat *v);
+GLAPI void APIENTRY glWindowPos3i (GLint x, GLint y, GLint z);
+GLAPI void APIENTRY glWindowPos3iv (const GLint *v);
+GLAPI void APIENTRY glWindowPos3s (GLshort x, GLshort y, GLshort z);
+GLAPI void APIENTRY glWindowPos3sv (const GLshort *v);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLFOGCOORDFPROC) (GLfloat coord);
+typedef void (APIENTRYP PFNGLFOGCOORDFVPROC) (const GLfloat *coord);
+typedef void (APIENTRYP PFNGLFOGCOORDDPROC) (GLdouble coord);
+typedef void (APIENTRYP PFNGLFOGCOORDDVPROC) (const GLdouble *coord);
+typedef void (APIENTRYP PFNGLFOGCOORDPOINTERPROC) (GLenum type, GLsizei stride, const GLvoid *pointer);
+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3BPROC) (GLbyte red, GLbyte green, GLbyte blue);
+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3BVPROC) (const GLbyte *v);
+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3DPROC) (GLdouble red, GLdouble green, GLdouble blue);
+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3DVPROC) (const GLdouble *v);
+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3FPROC) (GLfloat red, GLfloat green, GLfloat blue);
+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3FVPROC) (const GLfloat *v);
+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3IPROC) (GLint red, GLint green, GLint blue);
+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3IVPROC) (const GLint *v);
+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3SPROC) (GLshort red, GLshort green, GLshort blue);
+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3SVPROC) (const GLshort *v);
+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBPROC) (GLubyte red, GLubyte green, GLubyte blue);
+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBVPROC) (const GLubyte *v);
+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIPROC) (GLuint red, GLuint green, GLuint blue);
+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIVPROC) (const GLuint *v);
+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3USPROC) (GLushort red, GLushort green, GLushort blue);
+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3USVPROC) (const GLushort *v);
+typedef void (APIENTRYP PFNGLSECONDARYCOLORPOINTERPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
+typedef void (APIENTRYP PFNGLWINDOWPOS2DPROC) (GLdouble x, GLdouble y);
+typedef void (APIENTRYP PFNGLWINDOWPOS2DVPROC) (const GLdouble *v);
+typedef void (APIENTRYP PFNGLWINDOWPOS2FPROC) (GLfloat x, GLfloat y);
+typedef void (APIENTRYP PFNGLWINDOWPOS2FVPROC) (const GLfloat *v);
+typedef void (APIENTRYP PFNGLWINDOWPOS2IPROC) (GLint x, GLint y);
+typedef void (APIENTRYP PFNGLWINDOWPOS2IVPROC) (const GLint *v);
+typedef void (APIENTRYP PFNGLWINDOWPOS2SPROC) (GLshort x, GLshort y);
+typedef void (APIENTRYP PFNGLWINDOWPOS2SVPROC) (const GLshort *v);
+typedef void (APIENTRYP PFNGLWINDOWPOS3DPROC) (GLdouble x, GLdouble y, GLdouble z);
+typedef void (APIENTRYP PFNGLWINDOWPOS3DVPROC) (const GLdouble *v);
+typedef void (APIENTRYP PFNGLWINDOWPOS3FPROC) (GLfloat x, GLfloat y, GLfloat z);
+typedef void (APIENTRYP PFNGLWINDOWPOS3FVPROC) (const GLfloat *v);
+typedef void (APIENTRYP PFNGLWINDOWPOS3IPROC) (GLint x, GLint y, GLint z);
+typedef void (APIENTRYP PFNGLWINDOWPOS3IVPROC) (const GLint *v);
+typedef void (APIENTRYP PFNGLWINDOWPOS3SPROC) (GLshort x, GLshort y, GLshort z);
+typedef void (APIENTRYP PFNGLWINDOWPOS3SVPROC) (const GLshort *v);
+#endif
+
+#ifndef GL_VERSION_1_5
+#define GL_VERSION_1_5 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glGenQueries (GLsizei n, GLuint *ids);
+GLAPI void APIENTRY glDeleteQueries (GLsizei n, const GLuint *ids);
+GLAPI GLboolean APIENTRY glIsQuery (GLuint id);
+GLAPI void APIENTRY glBeginQuery (GLenum target, GLuint id);
+GLAPI void APIENTRY glEndQuery (GLenum target);
+GLAPI void APIENTRY glGetQueryiv (GLenum target, GLenum pname, GLint *params);
+GLAPI void APIENTRY glGetQueryObjectiv (GLuint id, GLenum pname, GLint *params);
+GLAPI void APIENTRY glGetQueryObjectuiv (GLuint id, GLenum pname, GLuint *params);
+GLAPI void APIENTRY glBindBuffer (GLenum target, GLuint buffer);
+GLAPI void APIENTRY glDeleteBuffers (GLsizei n, const GLuint *buffers);
+GLAPI void APIENTRY glGenBuffers (GLsizei n, GLuint *buffers);
+GLAPI GLboolean APIENTRY glIsBuffer (GLuint buffer);
+GLAPI void APIENTRY glBufferData (GLenum target, GLsizeiptr size, const GLvoid *data, GLenum usage);
+GLAPI void APIENTRY glBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid *data);
+GLAPI void APIENTRY glGetBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, GLvoid *data);
+GLAPI GLvoid* APIENTRY glMapBuffer (GLenum target, GLenum access);
+GLAPI GLboolean APIENTRY glUnmapBuffer (GLenum target);
+GLAPI void APIENTRY glGetBufferParameteriv (GLenum target, GLenum pname, GLint *params);
+GLAPI void APIENTRY glGetBufferPointerv (GLenum target, GLenum pname, GLvoid* *params);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLGENQUERIESPROC) (GLsizei n, GLuint *ids);
+typedef void (APIENTRYP PFNGLDELETEQUERIESPROC) (GLsizei n, const GLuint *ids);
+typedef GLboolean (APIENTRYP PFNGLISQUERYPROC) (GLuint id);
+typedef void (APIENTRYP PFNGLBEGINQUERYPROC) (GLenum target, GLuint id);
+typedef void (APIENTRYP PFNGLENDQUERYPROC) (GLenum target);
+typedef void (APIENTRYP PFNGLGETQUERYIVPROC) (GLenum target, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLGETQUERYOBJECTIVPROC) (GLuint id, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLGETQUERYOBJECTUIVPROC) (GLuint id, GLenum pname, GLuint *params);
+typedef void (APIENTRYP PFNGLBINDBUFFERPROC) (GLenum target, GLuint buffer);
+typedef void (APIENTRYP PFNGLDELETEBUFFERSPROC) (GLsizei n, const GLuint *buffers);
+typedef void (APIENTRYP PFNGLGENBUFFERSPROC) (GLsizei n, GLuint *buffers);
+typedef GLboolean (APIENTRYP PFNGLISBUFFERPROC) (GLuint buffer);
+typedef void (APIENTRYP PFNGLBUFFERDATAPROC) (GLenum target, GLsizeiptr size, const GLvoid *data, GLenum usage);
+typedef void (APIENTRYP PFNGLBUFFERSUBDATAPROC) (GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid *data);
+typedef void (APIENTRYP PFNGLGETBUFFERSUBDATAPROC) (GLenum target, GLintptr offset, GLsizeiptr size, GLvoid *data);
+typedef GLvoid* (APIENTRYP PFNGLMAPBUFFERPROC) (GLenum target, GLenum access);
+typedef GLboolean (APIENTRYP PFNGLUNMAPBUFFERPROC) (GLenum target);
+typedef void (APIENTRYP PFNGLGETBUFFERPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLGETBUFFERPOINTERVPROC) (GLenum target, GLenum pname, GLvoid* *params);
+#endif
+
+#ifndef GL_VERSION_2_0
+#define GL_VERSION_2_0 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glBlendEquationSeparate (GLenum modeRGB, GLenum modeAlpha);
+GLAPI void APIENTRY glDrawBuffers (GLsizei n, const GLenum *bufs);
+GLAPI void APIENTRY glStencilOpSeparate (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass);
+GLAPI void APIENTRY glStencilFuncSeparate (GLenum face, GLenum func, GLint ref, GLuint mask);
+GLAPI void APIENTRY glStencilMaskSeparate (GLenum face, GLuint mask);
+GLAPI void APIENTRY glAttachShader (GLuint program, GLuint shader);
+GLAPI void APIENTRY glBindAttribLocation (GLuint program, GLuint index, const GLchar *name);
+GLAPI void APIENTRY glCompileShader (GLuint shader);
+GLAPI GLuint APIENTRY glCreateProgram (void);
+GLAPI GLuint APIENTRY glCreateShader (GLenum type);
+GLAPI void APIENTRY glDeleteProgram (GLuint program);
+GLAPI void APIENTRY glDeleteShader (GLuint shader);
+GLAPI void APIENTRY glDetachShader (GLuint program, GLuint shader);
+GLAPI void APIENTRY glDisableVertexAttribArray (GLuint index);
+GLAPI void APIENTRY glEnableVertexAttribArray (GLuint index);
+GLAPI void APIENTRY glGetActiveAttrib (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
+GLAPI void APIENTRY glGetActiveUniform (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
+GLAPI void APIENTRY glGetAttachedShaders (GLuint program, GLsizei maxCount, GLsizei *count, GLuint *obj);
+GLAPI GLint APIENTRY glGetAttribLocation (GLuint program, const GLchar *name);
+GLAPI void APIENTRY glGetProgramiv (GLuint program, GLenum pname, GLint *params);
+GLAPI void APIENTRY glGetProgramInfoLog (GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
+GLAPI void APIENTRY glGetShaderiv (GLuint shader, GLenum pname, GLint *params);
+GLAPI void APIENTRY glGetShaderInfoLog (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
+GLAPI void APIENTRY glGetShaderSource (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source);
+GLAPI GLint APIENTRY glGetUniformLocation (GLuint program, const GLchar *name);
+GLAPI void APIENTRY glGetUniformfv (GLuint program, GLint location, GLfloat *params);
+GLAPI void APIENTRY glGetUniformiv (GLuint program, GLint location, GLint *params);
+GLAPI void APIENTRY glGetVertexAttribdv (GLuint index, GLenum pname, GLdouble *params);
+GLAPI void APIENTRY glGetVertexAttribfv (GLuint index, GLenum pname, GLfloat *params);
+GLAPI void APIENTRY glGetVertexAttribiv (GLuint index, GLenum pname, GLint *params);
+GLAPI void APIENTRY glGetVertexAttribPointerv (GLuint index, GLenum pname, GLvoid* *pointer);
+GLAPI GLboolean APIENTRY glIsProgram (GLuint program);
+GLAPI GLboolean APIENTRY glIsShader (GLuint shader);
+GLAPI void APIENTRY glLinkProgram (GLuint program);
+GLAPI void APIENTRY glShaderSource (GLuint shader, GLsizei count, const GLchar* *string, const GLint *length);
+GLAPI void APIENTRY glUseProgram (GLuint program);
+GLAPI void APIENTRY glUniform1f (GLint location, GLfloat v0);
+GLAPI void APIENTRY glUniform2f (GLint location, GLfloat v0, GLfloat v1);
+GLAPI void APIENTRY glUniform3f (GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
+GLAPI void APIENTRY glUniform4f (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
+GLAPI void APIENTRY glUniform1i (GLint location, GLint v0);
+GLAPI void APIENTRY glUniform2i (GLint location, GLint v0, GLint v1);
+GLAPI void APIENTRY glUniform3i (GLint location, GLint v0, GLint v1, GLint v2);
+GLAPI void APIENTRY glUniform4i (GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
+GLAPI void APIENTRY glUniform1fv (GLint location, GLsizei count, const GLfloat *value);
+GLAPI void APIENTRY glUniform2fv (GLint location, GLsizei count, const GLfloat *value);
+GLAPI void APIENTRY glUniform3fv (GLint location, GLsizei count, const GLfloat *value);
+GLAPI void APIENTRY glUniform4fv (GLint location, GLsizei count, const GLfloat *value);
+GLAPI void APIENTRY glUniform1iv (GLint location, GLsizei count, const GLint *value);
+GLAPI void APIENTRY glUniform2iv (GLint location, GLsizei count, const GLint *value);
+GLAPI void APIENTRY glUniform3iv (GLint location, GLsizei count, const GLint *value);
+GLAPI void APIENTRY glUniform4iv (GLint location, GLsizei count, const GLint *value);
+GLAPI void APIENTRY glUniformMatrix2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GLAPI void APIENTRY glUniformMatrix3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GLAPI void APIENTRY glUniformMatrix4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GLAPI void APIENTRY glValidateProgram (GLuint program);
+GLAPI void APIENTRY glVertexAttrib1d (GLuint index, GLdouble x);
+GLAPI void APIENTRY glVertexAttrib1dv (GLuint index, const GLdouble *v);
+GLAPI void APIENTRY glVertexAttrib1f (GLuint index, GLfloat x);
+GLAPI void APIENTRY glVertexAttrib1fv (GLuint index, const GLfloat *v);
+GLAPI void APIENTRY glVertexAttrib1s (GLuint index, GLshort x);
+GLAPI void APIENTRY glVertexAttrib1sv (GLuint index, const GLshort *v);
+GLAPI void APIENTRY glVertexAttrib2d (GLuint index, GLdouble x, GLdouble y);
+GLAPI void APIENTRY glVertexAttrib2dv (GLuint index, const GLdouble *v);
+GLAPI void APIENTRY glVertexAttrib2f (GLuint index, GLfloat x, GLfloat y);
+GLAPI void APIENTRY glVertexAttrib2fv (GLuint index, const GLfloat *v);
+GLAPI void APIENTRY glVertexAttrib2s (GLuint index, GLshort x, GLshort y);
+GLAPI void APIENTRY glVertexAttrib2sv (GLuint index, const GLshort *v);
+GLAPI void APIENTRY glVertexAttrib3d (GLuint index, GLdouble x, GLdouble y, GLdouble z);
+GLAPI void APIENTRY glVertexAttrib3dv (GLuint index, const GLdouble *v);
+GLAPI void APIENTRY glVertexAttrib3f (GLuint index, GLfloat x, GLfloat y, GLfloat z);
+GLAPI void APIENTRY glVertexAttrib3fv (GLuint index, const GLfloat *v);
+GLAPI void APIENTRY glVertexAttrib3s (GLuint index, GLshort x, GLshort y, GLshort z);
+GLAPI void APIENTRY glVertexAttrib3sv (GLuint index, const GLshort *v);
+GLAPI void APIENTRY glVertexAttrib4Nbv (GLuint index, const GLbyte *v);
+GLAPI void APIENTRY glVertexAttrib4Niv (GLuint index, const GLint *v);
+GLAPI void APIENTRY glVertexAttrib4Nsv (GLuint index, const GLshort *v);
+GLAPI void APIENTRY glVertexAttrib4Nub (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);
+GLAPI void APIENTRY glVertexAttrib4Nubv (GLuint index, const GLubyte *v);
+GLAPI void APIENTRY glVertexAttrib4Nuiv (GLuint index, const GLuint *v);
+GLAPI void APIENTRY glVertexAttrib4Nusv (GLuint index, const GLushort *v);
+GLAPI void APIENTRY glVertexAttrib4bv (GLuint index, const GLbyte *v);
+GLAPI void APIENTRY glVertexAttrib4d (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
+GLAPI void APIENTRY glVertexAttrib4dv (GLuint index, const GLdouble *v);
+GLAPI void APIENTRY glVertexAttrib4f (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+GLAPI void APIENTRY glVertexAttrib4fv (GLuint index, const GLfloat *v);
+GLAPI void APIENTRY glVertexAttrib4iv (GLuint index, const GLint *v);
+GLAPI void APIENTRY glVertexAttrib4s (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w);
+GLAPI void APIENTRY glVertexAttrib4sv (GLuint index, const GLshort *v);
+GLAPI void APIENTRY glVertexAttrib4ubv (GLuint index, const GLubyte *v);
+GLAPI void APIENTRY glVertexAttrib4uiv (GLuint index, const GLuint *v);
+GLAPI void APIENTRY glVertexAttrib4usv (GLuint index, const GLushort *v);
+GLAPI void APIENTRY glVertexAttribPointer (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEPROC) (GLenum modeRGB, GLenum modeAlpha);
+typedef void (APIENTRYP PFNGLDRAWBUFFERSPROC) (GLsizei n, const GLenum *bufs);
+typedef void (APIENTRYP PFNGLSTENCILOPSEPARATEPROC) (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass);
+typedef void (APIENTRYP PFNGLSTENCILFUNCSEPARATEPROC) (GLenum face, GLenum func, GLint ref, GLuint mask);
+typedef void (APIENTRYP PFNGLSTENCILMASKSEPARATEPROC) (GLenum face, GLuint mask);
+typedef void (APIENTRYP PFNGLATTACHSHADERPROC) (GLuint program, GLuint shader);
+typedef void (APIENTRYP PFNGLBINDATTRIBLOCATIONPROC) (GLuint program, GLuint index, const GLchar *name);
+typedef void (APIENTRYP PFNGLCOMPILESHADERPROC) (GLuint shader);
+typedef GLuint (APIENTRYP PFNGLCREATEPROGRAMPROC) (void);
+typedef GLuint (APIENTRYP PFNGLCREATESHADERPROC) (GLenum type);
+typedef void (APIENTRYP PFNGLDELETEPROGRAMPROC) (GLuint program);
+typedef void (APIENTRYP PFNGLDELETESHADERPROC) (GLuint shader);
+typedef void (APIENTRYP PFNGLDETACHSHADERPROC) (GLuint program, GLuint shader);
+typedef void (APIENTRYP PFNGLDISABLEVERTEXATTRIBARRAYPROC) (GLuint index);
+typedef void (APIENTRYP PFNGLENABLEVERTEXATTRIBARRAYPROC) (GLuint index);
+typedef void (APIENTRYP PFNGLGETACTIVEATTRIBPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
+typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
+typedef void (APIENTRYP PFNGLGETATTACHEDSHADERSPROC) (GLuint program, GLsizei maxCount, GLsizei *count, GLuint *obj);
+typedef GLint (APIENTRYP PFNGLGETATTRIBLOCATIONPROC) (GLuint program, const GLchar *name);
+typedef void (APIENTRYP PFNGLGETPROGRAMIVPROC) (GLuint program, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLGETPROGRAMINFOLOGPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
+typedef void (APIENTRYP PFNGLGETSHADERIVPROC) (GLuint shader, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLGETSHADERINFOLOGPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
+typedef void (APIENTRYP PFNGLGETSHADERSOURCEPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source);
+typedef GLint (APIENTRYP PFNGLGETUNIFORMLOCATIONPROC) (GLuint program, const GLchar *name);
+typedef void (APIENTRYP PFNGLGETUNIFORMFVPROC) (GLuint program, GLint location, GLfloat *params);
+typedef void (APIENTRYP PFNGLGETUNIFORMIVPROC) (GLuint program, GLint location, GLint *params);
+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBDVPROC) (GLuint index, GLenum pname, GLdouble *params);
+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBFVPROC) (GLuint index, GLenum pname, GLfloat *params);
+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIVPROC) (GLuint index, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVPROC) (GLuint index, GLenum pname, GLvoid* *pointer);
+typedef GLboolean (APIENTRYP PFNGLISPROGRAMPROC) (GLuint program);
+typedef GLboolean (APIENTRYP PFNGLISSHADERPROC) (GLuint shader);
+typedef void (APIENTRYP PFNGLLINKPROGRAMPROC) (GLuint program);
+typedef void (APIENTRYP PFNGLSHADERSOURCEPROC) (GLuint shader, GLsizei count, const GLchar* *string, const GLint *length);
+typedef void (APIENTRYP PFNGLUSEPROGRAMPROC) (GLuint program);
+typedef void (APIENTRYP PFNGLUNIFORM1FPROC) (GLint location, GLfloat v0);
+typedef void (APIENTRYP PFNGLUNIFORM2FPROC) (GLint location, GLfloat v0, GLfloat v1);
+typedef void (APIENTRYP PFNGLUNIFORM3FPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
+typedef void (APIENTRYP PFNGLUNIFORM4FPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
+typedef void (APIENTRYP PFNGLUNIFORM1IPROC) (GLint location, GLint v0);
+typedef void (APIENTRYP PFNGLUNIFORM2IPROC) (GLint location, GLint v0, GLint v1);
+typedef void (APIENTRYP PFNGLUNIFORM3IPROC) (GLint location, GLint v0, GLint v1, GLint v2);
+typedef void (APIENTRYP PFNGLUNIFORM4IPROC) (GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
+typedef void (APIENTRYP PFNGLUNIFORM1FVPROC) (GLint location, GLsizei count, const GLfloat *value);
+typedef void (APIENTRYP PFNGLUNIFORM2FVPROC) (GLint location, GLsizei count, const GLfloat *value);
+typedef void (APIENTRYP PFNGLUNIFORM3FVPROC) (GLint location, GLsizei count, const GLfloat *value);
+typedef void (APIENTRYP PFNGLUNIFORM4FVPROC) (GLint location, GLsizei count, const GLfloat *value);
+typedef void (APIENTRYP PFNGLUNIFORM1IVPROC) (GLint location, GLsizei count, const GLint *value);
+typedef void (APIENTRYP PFNGLUNIFORM2IVPROC) (GLint location, GLsizei count, const GLint *value);
+typedef void (APIENTRYP PFNGLUNIFORM3IVPROC) (GLint location, GLsizei count, const GLint *value);
+typedef void (APIENTRYP PFNGLUNIFORM4IVPROC) (GLint location, GLsizei count, const GLint *value);
+typedef void (APIENTRYP PFNGLUNIFORMMATRIX2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+typedef void (APIENTRYP PFNGLUNIFORMMATRIX3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+typedef void (APIENTRYP PFNGLUNIFORMMATRIX4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+typedef void (APIENTRYP PFNGLVALIDATEPROGRAMPROC) (GLuint program);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB1DPROC) (GLuint index, GLdouble x);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB1DVPROC) (GLuint index, const GLdouble *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB1FPROC) (GLuint index, GLfloat x);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB1FVPROC) (GLuint index, const GLfloat *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB1SPROC) (GLuint index, GLshort x);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB1SVPROC) (GLuint index, const GLshort *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB2DPROC) (GLuint index, GLdouble x, GLdouble y);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB2DVPROC) (GLuint index, const GLdouble *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB2FPROC) (GLuint index, GLfloat x, GLfloat y);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB2FVPROC) (GLuint index, const GLfloat *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB2SPROC) (GLuint index, GLshort x, GLshort y);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB2SVPROC) (GLuint index, const GLshort *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB3DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB3DVPROC) (GLuint index, const GLdouble *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB3FPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB3FVPROC) (GLuint index, const GLfloat *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB3SPROC) (GLuint index, GLshort x, GLshort y, GLshort z);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB3SVPROC) (GLuint index, const GLshort *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NBVPROC) (GLuint index, const GLbyte *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NIVPROC) (GLuint index, const GLint *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NSVPROC) (GLuint index, const GLshort *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBVPROC) (GLuint index, const GLubyte *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUIVPROC) (GLuint index, const GLuint *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUSVPROC) (GLuint index, const GLushort *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4BVPROC) (GLuint index, const GLbyte *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4DVPROC) (GLuint index, const GLdouble *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4FPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4FVPROC) (GLuint index, const GLfloat *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4IVPROC) (GLuint index, const GLint *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4SPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4SVPROC) (GLuint index, const GLshort *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4UBVPROC) (GLuint index, const GLubyte *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4UIVPROC) (GLuint index, const GLuint *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4USVPROC) (GLuint index, const GLushort *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBPOINTERPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer);
+#endif
+
+#ifndef GL_VERSION_2_1
+#define GL_VERSION_2_1 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glUniformMatrix2x3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GLAPI void APIENTRY glUniformMatrix3x2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GLAPI void APIENTRY glUniformMatrix2x4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GLAPI void APIENTRY glUniformMatrix4x2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GLAPI void APIENTRY glUniformMatrix3x4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GLAPI void APIENTRY glUniformMatrix4x3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLUNIFORMMATRIX2X3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+typedef void (APIENTRYP PFNGLUNIFORMMATRIX3X2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+typedef void (APIENTRYP PFNGLUNIFORMMATRIX2X4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+typedef void (APIENTRYP PFNGLUNIFORMMATRIX4X2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+typedef void (APIENTRYP PFNGLUNIFORMMATRIX3X4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+typedef void (APIENTRYP PFNGLUNIFORMMATRIX4X3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+#endif
+
+#ifndef GL_VERSION_3_0
+#define GL_VERSION_3_0 1
+/* OpenGL 3.0 also reuses entry points from these extensions: */
+/* ARB_framebuffer_object */
+/* ARB_map_buffer_range */
+/* ARB_vertex_array_object */
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glColorMaski (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a);
+GLAPI void APIENTRY glGetBooleani_v (GLenum target, GLuint index, GLboolean *data);
+GLAPI void APIENTRY glGetIntegeri_v (GLenum target, GLuint index, GLint *data);
+GLAPI void APIENTRY glEnablei (GLenum target, GLuint index);
+GLAPI void APIENTRY glDisablei (GLenum target, GLuint index);
+GLAPI GLboolean APIENTRY glIsEnabledi (GLenum target, GLuint index);
+GLAPI void APIENTRY glBeginTransformFeedback (GLenum primitiveMode);
+GLAPI void APIENTRY glEndTransformFeedback (void);
+GLAPI void APIENTRY glBindBufferRange (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size);
+GLAPI void APIENTRY glBindBufferBase (GLenum target, GLuint index, GLuint buffer);
+GLAPI void APIENTRY glTransformFeedbackVaryings (GLuint program, GLsizei count, const GLchar* *varyings, GLenum bufferMode);
+GLAPI void APIENTRY glGetTransformFeedbackVarying (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name);
+GLAPI void APIENTRY glClampColor (GLenum target, GLenum clamp);
+GLAPI void APIENTRY glBeginConditionalRender (GLuint id, GLenum mode);
+GLAPI void APIENTRY glEndConditionalRender (void);
+GLAPI void APIENTRY glVertexAttribIPointer (GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
+GLAPI void APIENTRY glGetVertexAttribIiv (GLuint index, GLenum pname, GLint *params);
+GLAPI void APIENTRY glGetVertexAttribIuiv (GLuint index, GLenum pname, GLuint *params);
+GLAPI void APIENTRY glVertexAttribI1i (GLuint index, GLint x);
+GLAPI void APIENTRY glVertexAttribI2i (GLuint index, GLint x, GLint y);
+GLAPI void APIENTRY glVertexAttribI3i (GLuint index, GLint x, GLint y, GLint z);
+GLAPI void APIENTRY glVertexAttribI4i (GLuint index, GLint x, GLint y, GLint z, GLint w);
+GLAPI void APIENTRY glVertexAttribI1ui (GLuint index, GLuint x);
+GLAPI void APIENTRY glVertexAttribI2ui (GLuint index, GLuint x, GLuint y);
+GLAPI void APIENTRY glVertexAttribI3ui (GLuint index, GLuint x, GLuint y, GLuint z);
+GLAPI void APIENTRY glVertexAttribI4ui (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
+GLAPI void APIENTRY glVertexAttribI1iv (GLuint index, const GLint *v);
+GLAPI void APIENTRY glVertexAttribI2iv (GLuint index, const GLint *v);
+GLAPI void APIENTRY glVertexAttribI3iv (GLuint index, const GLint *v);
+GLAPI void APIENTRY glVertexAttribI4iv (GLuint index, const GLint *v);
+GLAPI void APIENTRY glVertexAttribI1uiv (GLuint index, const GLuint *v);
+GLAPI void APIENTRY glVertexAttribI2uiv (GLuint index, const GLuint *v);
+GLAPI void APIENTRY glVertexAttribI3uiv (GLuint index, const GLuint *v);
+GLAPI void APIENTRY glVertexAttribI4uiv (GLuint index, const GLuint *v);
+GLAPI void APIENTRY glVertexAttribI4bv (GLuint index, const GLbyte *v);
+GLAPI void APIENTRY glVertexAttribI4sv (GLuint index, const GLshort *v);
+GLAPI void APIENTRY glVertexAttribI4ubv (GLuint index, const GLubyte *v);
+GLAPI void APIENTRY glVertexAttribI4usv (GLuint index, const GLushort *v);
+GLAPI void APIENTRY glGetUniformuiv (GLuint program, GLint location, GLuint *params);
+GLAPI void APIENTRY glBindFragDataLocation (GLuint program, GLuint color, const GLchar *name);
+GLAPI GLint APIENTRY glGetFragDataLocation (GLuint program, const GLchar *name);
+GLAPI void APIENTRY glUniform1ui (GLint location, GLuint v0);
+GLAPI void APIENTRY glUniform2ui (GLint location, GLuint v0, GLuint v1);
+GLAPI void APIENTRY glUniform3ui (GLint location, GLuint v0, GLuint v1, GLuint v2);
+GLAPI void APIENTRY glUniform4ui (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
+GLAPI void APIENTRY glUniform1uiv (GLint location, GLsizei count, const GLuint *value);
+GLAPI void APIENTRY glUniform2uiv (GLint location, GLsizei count, const GLuint *value);
+GLAPI void APIENTRY glUniform3uiv (GLint location, GLsizei count, const GLuint *value);
+GLAPI void APIENTRY glUniform4uiv (GLint location, GLsizei count, const GLuint *value);
+GLAPI void APIENTRY glTexParameterIiv (GLenum target, GLenum pname, const GLint *params);
+GLAPI void APIENTRY glTexParameterIuiv (GLenum target, GLenum pname, const GLuint *params);
+GLAPI void APIENTRY glGetTexParameterIiv (GLenum target, GLenum pname, GLint *params);
+GLAPI void APIENTRY glGetTexParameterIuiv (GLenum target, GLenum pname, GLuint *params);
+GLAPI void APIENTRY glClearBufferiv (GLenum buffer, GLint drawbuffer, const GLint *value);
+GLAPI void APIENTRY glClearBufferuiv (GLenum buffer, GLint drawbuffer, const GLuint *value);
+GLAPI void APIENTRY glClearBufferfv (GLenum buffer, GLint drawbuffer, const GLfloat *value);
+GLAPI void APIENTRY glClearBufferfi (GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil);
+GLAPI const GLubyte * APIENTRY glGetStringi (GLenum name, GLuint index);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLCOLORMASKIPROC) (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a);
+typedef void (APIENTRYP PFNGLGETBOOLEANI_VPROC) (GLenum target, GLuint index, GLboolean *data);
+typedef void (APIENTRYP PFNGLGETINTEGERI_VPROC) (GLenum target, GLuint index, GLint *data);
+typedef void (APIENTRYP PFNGLENABLEIPROC) (GLenum target, GLuint index);
+typedef void (APIENTRYP PFNGLDISABLEIPROC) (GLenum target, GLuint index);
+typedef GLboolean (APIENTRYP PFNGLISENABLEDIPROC) (GLenum target, GLuint index);
+typedef void (APIENTRYP PFNGLBEGINTRANSFORMFEEDBACKPROC) (GLenum primitiveMode);
+typedef void (APIENTRYP PFNGLENDTRANSFORMFEEDBACKPROC) (void);
+typedef void (APIENTRYP PFNGLBINDBUFFERRANGEPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size);
+typedef void (APIENTRYP PFNGLBINDBUFFERBASEPROC) (GLenum target, GLuint index, GLuint buffer);
+typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKVARYINGSPROC) (GLuint program, GLsizei count, const GLchar* *varyings, GLenum bufferMode);
+typedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKVARYINGPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name);
+typedef void (APIENTRYP PFNGLCLAMPCOLORPROC) (GLenum target, GLenum clamp);
+typedef void (APIENTRYP PFNGLBEGINCONDITIONALRENDERPROC) (GLuint id, GLenum mode);
+typedef void (APIENTRYP PFNGLENDCONDITIONALRENDERPROC) (void);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBIPOINTERPROC) (GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIIVPROC) (GLuint index, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIUIVPROC) (GLuint index, GLenum pname, GLuint *params);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBI1IPROC) (GLuint index, GLint x);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBI2IPROC) (GLuint index, GLint x, GLint y);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBI3IPROC) (GLuint index, GLint x, GLint y, GLint z);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBI4IPROC) (GLuint index, GLint x, GLint y, GLint z, GLint w);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBI1UIPROC) (GLuint index, GLuint x);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBI2UIPROC) (GLuint index, GLuint x, GLuint y);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBI3UIPROC) (GLuint index, GLuint x, GLuint y, GLuint z);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UIPROC) (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBI1IVPROC) (GLuint index, const GLint *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBI2IVPROC) (GLuint index, const GLint *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBI3IVPROC) (GLuint index, const GLint *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBI4IVPROC) (GLuint index, const GLint *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBI1UIVPROC) (GLuint index, const GLuint *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBI2UIVPROC) (GLuint index, const GLuint *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBI3UIVPROC) (GLuint index, const GLuint *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UIVPROC) (GLuint index, const GLuint *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBI4BVPROC) (GLuint index, const GLbyte *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBI4SVPROC) (GLuint index, const GLshort *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UBVPROC) (GLuint index, const GLubyte *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBI4USVPROC) (GLuint index, const GLushort *v);
+typedef void (APIENTRYP PFNGLGETUNIFORMUIVPROC) (GLuint program, GLint location, GLuint *params);
+typedef void (APIENTRYP PFNGLBINDFRAGDATALOCATIONPROC) (GLuint program, GLuint color, const GLchar *name);
+typedef GLint (APIENTRYP PFNGLGETFRAGDATALOCATIONPROC) (GLuint program, const GLchar *name);
+typedef void (APIENTRYP PFNGLUNIFORM1UIPROC) (GLint location, GLuint v0);
+typedef void (APIENTRYP PFNGLUNIFORM2UIPROC) (GLint location, GLuint v0, GLuint v1);
+typedef void (APIENTRYP PFNGLUNIFORM3UIPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2);
+typedef void (APIENTRYP PFNGLUNIFORM4UIPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
+typedef void (APIENTRYP PFNGLUNIFORM1UIVPROC) (GLint location, GLsizei count, const GLuint *value);
+typedef void (APIENTRYP PFNGLUNIFORM2UIVPROC) (GLint location, GLsizei count, const GLuint *value);
+typedef void (APIENTRYP PFNGLUNIFORM3UIVPROC) (GLint location, GLsizei count, const GLuint *value);
+typedef void (APIENTRYP PFNGLUNIFORM4UIVPROC) (GLint location, GLsizei count, const GLuint *value);
+typedef void (APIENTRYP PFNGLTEXPARAMETERIIVPROC) (GLenum target, GLenum pname, const GLint *params);
+typedef void (APIENTRYP PFNGLTEXPARAMETERIUIVPROC) (GLenum target, GLenum pname, const GLuint *params);
+typedef void (APIENTRYP PFNGLGETTEXPARAMETERIIVPROC) (GLenum target, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLGETTEXPARAMETERIUIVPROC) (GLenum target, GLenum pname, GLuint *params);
+typedef void (APIENTRYP PFNGLCLEARBUFFERIVPROC) (GLenum buffer, GLint drawbuffer, const GLint *value);
+typedef void (APIENTRYP PFNGLCLEARBUFFERUIVPROC) (GLenum buffer, GLint drawbuffer, const GLuint *value);
+typedef void (APIENTRYP PFNGLCLEARBUFFERFVPROC) (GLenum buffer, GLint drawbuffer, const GLfloat *value);
+typedef void (APIENTRYP PFNGLCLEARBUFFERFIPROC) (GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil);
+typedef const GLubyte * (APIENTRYP PFNGLGETSTRINGIPROC) (GLenum name, GLuint index);
+#endif
+
+#ifndef GL_VERSION_3_1
+#define GL_VERSION_3_1 1
+/* OpenGL 3.1 also reuses entry points from these extensions: */
+/* ARB_copy_buffer */
+/* ARB_uniform_buffer_object */
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glDrawArraysInstanced (GLenum mode, GLint first, GLsizei count, GLsizei primcount);
+GLAPI void APIENTRY glDrawElementsInstanced (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount);
+GLAPI void APIENTRY glTexBuffer (GLenum target, GLenum internalformat, GLuint buffer);
+GLAPI void APIENTRY glPrimitiveRestartIndex (GLuint index);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLDRAWARRAYSINSTANCEDPROC) (GLenum mode, GLint first, GLsizei count, GLsizei primcount);
+typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDPROC) (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount);
+typedef void (APIENTRYP PFNGLTEXBUFFERPROC) (GLenum target, GLenum internalformat, GLuint buffer);
+typedef void (APIENTRYP PFNGLPRIMITIVERESTARTINDEXPROC) (GLuint index);
+#endif
+
+#ifndef GL_VERSION_3_2
+#define GL_VERSION_3_2 1
+/* OpenGL 3.2 also reuses entry points from these extensions: */
+/* ARB_draw_elements_base_vertex */
+/* ARB_provoking_vertex */
+/* ARB_sync */
+/* ARB_texture_multisample */
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glGetInteger64i_v (GLenum target, GLuint index, GLint64 *data);
+GLAPI void APIENTRY glGetBufferParameteri64v (GLenum target, GLenum pname, GLint64 *params);
+GLAPI void APIENTRY glFramebufferTexture (GLenum target, GLenum attachment, GLuint texture, GLint level);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLGETINTEGER64I_VPROC) (GLenum target, GLuint index, GLint64 *data);
+typedef void (APIENTRYP PFNGLGETBUFFERPARAMETERI64VPROC) (GLenum target, GLenum pname, GLint64 *params);
+typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level);
+#endif
+
+#ifndef GL_VERSION_3_3
+#define GL_VERSION_3_3 1
+/* OpenGL 3.3 also reuses entry points from these extensions: */
+/* ARB_blend_func_extended */
+/* ARB_sampler_objects */
+/* ARB_explicit_attrib_location, but it has none */
+/* ARB_occlusion_query2 (no entry points) */
+/* ARB_shader_bit_encoding (no entry points) */
+/* ARB_texture_rgb10_a2ui (no entry points) */
+/* ARB_texture_swizzle (no entry points) */
+/* ARB_timer_query */
+/* ARB_vertex_type_2_10_10_10_rev */
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glVertexAttribDivisor (GLuint index, GLuint divisor);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLVERTEXATTRIBDIVISORPROC) (GLuint index, GLuint divisor);
+#endif
+
+#ifndef GL_VERSION_4_0
+#define GL_VERSION_4_0 1
+/* OpenGL 4.0 also reuses entry points from these extensions: */
+/* ARB_texture_query_lod (no entry points) */
+/* ARB_draw_indirect */
+/* ARB_gpu_shader5 (no entry points) */
+/* ARB_gpu_shader_fp64 */
+/* ARB_shader_subroutine */
+/* ARB_tessellation_shader */
+/* ARB_texture_buffer_object_rgb32 (no entry points) */
+/* ARB_texture_cube_map_array (no entry points) */
+/* ARB_texture_gather (no entry points) */
+/* ARB_transform_feedback2 */
+/* ARB_transform_feedback3 */
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glMinSampleShading (GLclampf value);
+GLAPI void APIENTRY glBlendEquationi (GLuint buf, GLenum mode);
+GLAPI void APIENTRY glBlendEquationSeparatei (GLuint buf, GLenum modeRGB, GLenum modeAlpha);
+GLAPI void APIENTRY glBlendFunci (GLuint buf, GLenum src, GLenum dst);
+GLAPI void APIENTRY glBlendFuncSeparatei (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLMINSAMPLESHADINGPROC) (GLclampf value);
+typedef void (APIENTRYP PFNGLBLENDEQUATIONIPROC) (GLuint buf, GLenum mode);
+typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEIPROC) (GLuint buf, GLenum modeRGB, GLenum modeAlpha);
+typedef void (APIENTRYP PFNGLBLENDFUNCIPROC) (GLuint buf, GLenum src, GLenum dst);
+typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEIPROC) (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
+#endif
+
+#ifndef GL_VERSION_4_1
+#define GL_VERSION_4_1 1
+/* OpenGL 4.1 also reuses entry points from these extensions: */
+/* ARB_ES2_compatibility */
+/* ARB_get_program_binary */
+/* ARB_separate_shader_objects */
+/* ARB_shader_precision (no entry points) */
+/* ARB_vertex_attrib_64bit */
+/* ARB_viewport_array */
+#endif
+
+#ifndef GL_ARB_multitexture
+#define GL_ARB_multitexture 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glActiveTextureARB (GLenum texture);
+GLAPI void APIENTRY glClientActiveTextureARB (GLenum texture);
+GLAPI void APIENTRY glMultiTexCoord1dARB (GLenum target, GLdouble s);
+GLAPI void APIENTRY glMultiTexCoord1dvARB (GLenum target, const GLdouble *v);
+GLAPI void APIENTRY glMultiTexCoord1fARB (GLenum target, GLfloat s);
+GLAPI void APIENTRY glMultiTexCoord1fvARB (GLenum target, const GLfloat *v);
+GLAPI void APIENTRY glMultiTexCoord1iARB (GLenum target, GLint s);
+GLAPI void APIENTRY glMultiTexCoord1ivARB (GLenum target, const GLint *v);
+GLAPI void APIENTRY glMultiTexCoord1sARB (GLenum target, GLshort s);
+GLAPI void APIENTRY glMultiTexCoord1svARB (GLenum target, const GLshort *v);
+GLAPI void APIENTRY glMultiTexCoord2dARB (GLenum target, GLdouble s, GLdouble t);
+GLAPI void APIENTRY glMultiTexCoord2dvARB (GLenum target, const GLdouble *v);
+GLAPI void APIENTRY glMultiTexCoord2fARB (GLenum target, GLfloat s, GLfloat t);
+GLAPI void APIENTRY glMultiTexCoord2fvARB (GLenum target, const GLfloat *v);
+GLAPI void APIENTRY glMultiTexCoord2iARB (GLenum target, GLint s, GLint t);
+GLAPI void APIENTRY glMultiTexCoord2ivARB (GLenum target, const GLint *v);
+GLAPI void APIENTRY glMultiTexCoord2sARB (GLenum target, GLshort s, GLshort t);
+GLAPI void APIENTRY glMultiTexCoord2svARB (GLenum target, const GLshort *v);
+GLAPI void APIENTRY glMultiTexCoord3dARB (GLenum target, GLdouble s, GLdouble t, GLdouble r);
+GLAPI void APIENTRY glMultiTexCoord3dvARB (GLenum target, const GLdouble *v);
+GLAPI void APIENTRY glMultiTexCoord3fARB (GLenum target, GLfloat s, GLfloat t, GLfloat r);
+GLAPI void APIENTRY glMultiTexCoord3fvARB (GLenum target, const GLfloat *v);
+GLAPI void APIENTRY glMultiTexCoord3iARB (GLenum target, GLint s, GLint t, GLint r);
+GLAPI void APIENTRY glMultiTexCoord3ivARB (GLenum target, const GLint *v);
+GLAPI void APIENTRY glMultiTexCoord3sARB (GLenum target, GLshort s, GLshort t, GLshort r);
+GLAPI void APIENTRY glMultiTexCoord3svARB (GLenum target, const GLshort *v);
+GLAPI void APIENTRY glMultiTexCoord4dARB (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);
+GLAPI void APIENTRY glMultiTexCoord4dvARB (GLenum target, const GLdouble *v);
+GLAPI void APIENTRY glMultiTexCoord4fARB (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
+GLAPI void APIENTRY glMultiTexCoord4fvARB (GLenum target, const GLfloat *v);
+GLAPI void APIENTRY glMultiTexCoord4iARB (GLenum target, GLint s, GLint t, GLint r, GLint q);
+GLAPI void APIENTRY glMultiTexCoord4ivARB (GLenum target, const GLint *v);
+GLAPI void APIENTRY glMultiTexCoord4sARB (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);
+GLAPI void APIENTRY glMultiTexCoord4svARB (GLenum target, const GLshort *v);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLACTIVETEXTUREARBPROC) (GLenum texture);
+typedef void (APIENTRYP PFNGLCLIENTACTIVETEXTUREARBPROC) (GLenum texture);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD1DARBPROC) (GLenum target, GLdouble s);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD1DVARBPROC) (GLenum target, const GLdouble *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD1FARBPROC) (GLenum target, GLfloat s);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD1FVARBPROC) (GLenum target, const GLfloat *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD1IARBPROC) (GLenum target, GLint s);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD1IVARBPROC) (GLenum target, const GLint *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD1SARBPROC) (GLenum target, GLshort s);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD1SVARBPROC) (GLenum target, const GLshort *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD2DARBPROC) (GLenum target, GLdouble s, GLdouble t);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD2DVARBPROC) (GLenum target, const GLdouble *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD2FARBPROC) (GLenum target, GLfloat s, GLfloat t);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD2FVARBPROC) (GLenum target, const GLfloat *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD2IARBPROC) (GLenum target, GLint s, GLint t);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD2IVARBPROC) (GLenum target, const GLint *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD2SARBPROC) (GLenum target, GLshort s, GLshort t);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD2SVARBPROC) (GLenum target, const GLshort *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD3DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD3DVARBPROC) (GLenum target, const GLdouble *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD3FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD3FVARBPROC) (GLenum target, const GLfloat *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD3IARBPROC) (GLenum target, GLint s, GLint t, GLint r);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD3IVARBPROC) (GLenum target, const GLint *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD3SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD3SVARBPROC) (GLenum target, const GLshort *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD4DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD4DVARBPROC) (GLenum target, const GLdouble *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD4FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD4FVARBPROC) (GLenum target, const GLfloat *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD4IARBPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD4IVARBPROC) (GLenum target, const GLint *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD4SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD4SVARBPROC) (GLenum target, const GLshort *v);
+#endif
+
+#ifndef GL_ARB_transpose_matrix
+#define GL_ARB_transpose_matrix 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glLoadTransposeMatrixfARB (const GLfloat *m);
+GLAPI void APIENTRY glLoadTransposeMatrixdARB (const GLdouble *m);
+GLAPI void APIENTRY glMultTransposeMatrixfARB (const GLfloat *m);
+GLAPI void APIENTRY glMultTransposeMatrixdARB (const GLdouble *m);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXFARBPROC) (const GLfloat *m);
+typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXDARBPROC) (const GLdouble *m);
+typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXFARBPROC) (const GLfloat *m);
+typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXDARBPROC) (const GLdouble *m);
+#endif
+
+#ifndef GL_ARB_multisample
+#define GL_ARB_multisample 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glSampleCoverageARB (GLclampf value, GLboolean invert);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLSAMPLECOVERAGEARBPROC) (GLclampf value, GLboolean invert);
+#endif
+
+#ifndef GL_ARB_texture_env_add
+#define GL_ARB_texture_env_add 1
+#endif
+
+#ifndef GL_ARB_texture_cube_map
+#define GL_ARB_texture_cube_map 1
+#endif
+
+#ifndef GL_ARB_texture_compression
+#define GL_ARB_texture_compression 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glCompressedTexImage3DARB (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data);
+GLAPI void APIENTRY glCompressedTexImage2DARB (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data);
+GLAPI void APIENTRY glCompressedTexImage1DARB (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data);
+GLAPI void APIENTRY glCompressedTexSubImage3DARB (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data);
+GLAPI void APIENTRY glCompressedTexSubImage2DARB (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data);
+GLAPI void APIENTRY glCompressedTexSubImage1DARB (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data);
+GLAPI void APIENTRY glGetCompressedTexImageARB (GLenum target, GLint level, GLvoid *img);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data);
+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE2DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data);
+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE1DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data);
+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE3DARBPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data);
+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE2DARBPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data);
+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE1DARBPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data);
+typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXIMAGEARBPROC) (GLenum target, GLint level, GLvoid *img);
+#endif
+
+#ifndef GL_ARB_texture_border_clamp
+#define GL_ARB_texture_border_clamp 1
+#endif
+
+#ifndef GL_ARB_point_parameters
+#define GL_ARB_point_parameters 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glPointParameterfARB (GLenum pname, GLfloat param);
+GLAPI void APIENTRY glPointParameterfvARB (GLenum pname, const GLfloat *params);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLPOINTPARAMETERFARBPROC) (GLenum pname, GLfloat param);
+typedef void (APIENTRYP PFNGLPOINTPARAMETERFVARBPROC) (GLenum pname, const GLfloat *params);
+#endif
+
+#ifndef GL_ARB_vertex_blend
+#define GL_ARB_vertex_blend 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glWeightbvARB (GLint size, const GLbyte *weights);
+GLAPI void APIENTRY glWeightsvARB (GLint size, const GLshort *weights);
+GLAPI void APIENTRY glWeightivARB (GLint size, const GLint *weights);
+GLAPI void APIENTRY glWeightfvARB (GLint size, const GLfloat *weights);
+GLAPI void APIENTRY glWeightdvARB (GLint size, const GLdouble *weights);
+GLAPI void APIENTRY glWeightubvARB (GLint size, const GLubyte *weights);
+GLAPI void APIENTRY glWeightusvARB (GLint size, const GLushort *weights);
+GLAPI void APIENTRY glWeightuivARB (GLint size, const GLuint *weights);
+GLAPI void APIENTRY glWeightPointerARB (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
+GLAPI void APIENTRY glVertexBlendARB (GLint count);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLWEIGHTBVARBPROC) (GLint size, const GLbyte *weights);
+typedef void (APIENTRYP PFNGLWEIGHTSVARBPROC) (GLint size, const GLshort *weights);
+typedef void (APIENTRYP PFNGLWEIGHTIVARBPROC) (GLint size, const GLint *weights);
+typedef void (APIENTRYP PFNGLWEIGHTFVARBPROC) (GLint size, const GLfloat *weights);
+typedef void (APIENTRYP PFNGLWEIGHTDVARBPROC) (GLint size, const GLdouble *weights);
+typedef void (APIENTRYP PFNGLWEIGHTUBVARBPROC) (GLint size, const GLubyte *weights);
+typedef void (APIENTRYP PFNGLWEIGHTUSVARBPROC) (GLint size, const GLushort *weights);
+typedef void (APIENTRYP PFNGLWEIGHTUIVARBPROC) (GLint size, const GLuint *weights);
+typedef void (APIENTRYP PFNGLWEIGHTPOINTERARBPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
+typedef void (APIENTRYP PFNGLVERTEXBLENDARBPROC) (GLint count);
+#endif
+
+#ifndef GL_ARB_matrix_palette
+#define GL_ARB_matrix_palette 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glCurrentPaletteMatrixARB (GLint index);
+GLAPI void APIENTRY glMatrixIndexubvARB (GLint size, const GLubyte *indices);
+GLAPI void APIENTRY glMatrixIndexusvARB (GLint size, const GLushort *indices);
+GLAPI void APIENTRY glMatrixIndexuivARB (GLint size, const GLuint *indices);
+GLAPI void APIENTRY glMatrixIndexPointerARB (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLCURRENTPALETTEMATRIXARBPROC) (GLint index);
+typedef void (APIENTRYP PFNGLMATRIXINDEXUBVARBPROC) (GLint size, const GLubyte *indices);
+typedef void (APIENTRYP PFNGLMATRIXINDEXUSVARBPROC) (GLint size, const GLushort *indices);
+typedef void (APIENTRYP PFNGLMATRIXINDEXUIVARBPROC) (GLint size, const GLuint *indices);
+typedef void (APIENTRYP PFNGLMATRIXINDEXPOINTERARBPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
+#endif
+
+#ifndef GL_ARB_texture_env_combine
+#define GL_ARB_texture_env_combine 1
+#endif
+
+#ifndef GL_ARB_texture_env_crossbar
+#define GL_ARB_texture_env_crossbar 1
+#endif
+
+#ifndef GL_ARB_texture_env_dot3
+#define GL_ARB_texture_env_dot3 1
+#endif
+
+#ifndef GL_ARB_texture_mirrored_repeat
+#define GL_ARB_texture_mirrored_repeat 1
+#endif
+
+#ifndef GL_ARB_depth_texture
+#define GL_ARB_depth_texture 1
+#endif
+
+#ifndef GL_ARB_shadow
+#define GL_ARB_shadow 1
+#endif
+
+#ifndef GL_ARB_shadow_ambient
+#define GL_ARB_shadow_ambient 1
+#endif
+
+#ifndef GL_ARB_window_pos
+#define GL_ARB_window_pos 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glWindowPos2dARB (GLdouble x, GLdouble y);
+GLAPI void APIENTRY glWindowPos2dvARB (const GLdouble *v);
+GLAPI void APIENTRY glWindowPos2fARB (GLfloat x, GLfloat y);
+GLAPI void APIENTRY glWindowPos2fvARB (const GLfloat *v);
+GLAPI void APIENTRY glWindowPos2iARB (GLint x, GLint y);
+GLAPI void APIENTRY glWindowPos2ivARB (const GLint *v);
+GLAPI void APIENTRY glWindowPos2sARB (GLshort x, GLshort y);
+GLAPI void APIENTRY glWindowPos2svARB (const GLshort *v);
+GLAPI void APIENTRY glWindowPos3dARB (GLdouble x, GLdouble y, GLdouble z);
+GLAPI void APIENTRY glWindowPos3dvARB (const GLdouble *v);
+GLAPI void APIENTRY glWindowPos3fARB (GLfloat x, GLfloat y, GLfloat z);
+GLAPI void APIENTRY glWindowPos3fvARB (const GLfloat *v);
+GLAPI void APIENTRY glWindowPos3iARB (GLint x, GLint y, GLint z);
+GLAPI void APIENTRY glWindowPos3ivARB (const GLint *v);
+GLAPI void APIENTRY glWindowPos3sARB (GLshort x, GLshort y, GLshort z);
+GLAPI void APIENTRY glWindowPos3svARB (const GLshort *v);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLWINDOWPOS2DARBPROC) (GLdouble x, GLdouble y);
+typedef void (APIENTRYP PFNGLWINDOWPOS2DVARBPROC) (const GLdouble *v);
+typedef void (APIENTRYP PFNGLWINDOWPOS2FARBPROC) (GLfloat x, GLfloat y);
+typedef void (APIENTRYP PFNGLWINDOWPOS2FVARBPROC) (const GLfloat *v);
+typedef void (APIENTRYP PFNGLWINDOWPOS2IARBPROC) (GLint x, GLint y);
+typedef void (APIENTRYP PFNGLWINDOWPOS2IVARBPROC) (const GLint *v);
+typedef void (APIENTRYP PFNGLWINDOWPOS2SARBPROC) (GLshort x, GLshort y);
+typedef void (APIENTRYP PFNGLWINDOWPOS2SVARBPROC) (const GLshort *v);
+typedef void (APIENTRYP PFNGLWINDOWPOS3DARBPROC) (GLdouble x, GLdouble y, GLdouble z);
+typedef void (APIENTRYP PFNGLWINDOWPOS3DVARBPROC) (const GLdouble *v);
+typedef void (APIENTRYP PFNGLWINDOWPOS3FARBPROC) (GLfloat x, GLfloat y, GLfloat z);
+typedef void (APIENTRYP PFNGLWINDOWPOS3FVARBPROC) (const GLfloat *v);
+typedef void (APIENTRYP PFNGLWINDOWPOS3IARBPROC) (GLint x, GLint y, GLint z);
+typedef void (APIENTRYP PFNGLWINDOWPOS3IVARBPROC) (const GLint *v);
+typedef void (APIENTRYP PFNGLWINDOWPOS3SARBPROC) (GLshort x, GLshort y, GLshort z);
+typedef void (APIENTRYP PFNGLWINDOWPOS3SVARBPROC) (const GLshort *v);
+#endif
+
+#ifndef GL_ARB_vertex_program
+#define GL_ARB_vertex_program 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glVertexAttrib1dARB (GLuint index, GLdouble x);
+GLAPI void APIENTRY glVertexAttrib1dvARB (GLuint index, const GLdouble *v);
+GLAPI void APIENTRY glVertexAttrib1fARB (GLuint index, GLfloat x);
+GLAPI void APIENTRY glVertexAttrib1fvARB (GLuint index, const GLfloat *v);
+GLAPI void APIENTRY glVertexAttrib1sARB (GLuint index, GLshort x);
+GLAPI void APIENTRY glVertexAttrib1svARB (GLuint index, const GLshort *v);
+GLAPI void APIENTRY glVertexAttrib2dARB (GLuint index, GLdouble x, GLdouble y);
+GLAPI void APIENTRY glVertexAttrib2dvARB (GLuint index, const GLdouble *v);
+GLAPI void APIENTRY glVertexAttrib2fARB (GLuint index, GLfloat x, GLfloat y);
+GLAPI void APIENTRY glVertexAttrib2fvARB (GLuint index, const GLfloat *v);
+GLAPI void APIENTRY glVertexAttrib2sARB (GLuint index, GLshort x, GLshort y);
+GLAPI void APIENTRY glVertexAttrib2svARB (GLuint index, const GLshort *v);
+GLAPI void APIENTRY glVertexAttrib3dARB (GLuint index, GLdouble x, GLdouble y, GLdouble z);
+GLAPI void APIENTRY glVertexAttrib3dvARB (GLuint index, const GLdouble *v);
+GLAPI void APIENTRY glVertexAttrib3fARB (GLuint index, GLfloat x, GLfloat y, GLfloat z);
+GLAPI void APIENTRY glVertexAttrib3fvARB (GLuint index, const GLfloat *v);
+GLAPI void APIENTRY glVertexAttrib3sARB (GLuint index, GLshort x, GLshort y, GLshort z);
+GLAPI void APIENTRY glVertexAttrib3svARB (GLuint index, const GLshort *v);
+GLAPI void APIENTRY glVertexAttrib4NbvARB (GLuint index, const GLbyte *v);
+GLAPI void APIENTRY glVertexAttrib4NivARB (GLuint index, const GLint *v);
+GLAPI void APIENTRY glVertexAttrib4NsvARB (GLuint index, const GLshort *v);
+GLAPI void APIENTRY glVertexAttrib4NubARB (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);
+GLAPI void APIENTRY glVertexAttrib4NubvARB (GLuint index, const GLubyte *v);
+GLAPI void APIENTRY glVertexAttrib4NuivARB (GLuint index, const GLuint *v);
+GLAPI void APIENTRY glVertexAttrib4NusvARB (GLuint index, const GLushort *v);
+GLAPI void APIENTRY glVertexAttrib4bvARB (GLuint index, const GLbyte *v);
+GLAPI void APIENTRY glVertexAttrib4dARB (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
+GLAPI void APIENTRY glVertexAttrib4dvARB (GLuint index, const GLdouble *v);
+GLAPI void APIENTRY glVertexAttrib4fARB (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+GLAPI void APIENTRY glVertexAttrib4fvARB (GLuint index, const GLfloat *v);
+GLAPI void APIENTRY glVertexAttrib4ivARB (GLuint index, const GLint *v);
+GLAPI void APIENTRY glVertexAttrib4sARB (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w);
+GLAPI void APIENTRY glVertexAttrib4svARB (GLuint index, const GLshort *v);
+GLAPI void APIENTRY glVertexAttrib4ubvARB (GLuint index, const GLubyte *v);
+GLAPI void APIENTRY glVertexAttrib4uivARB (GLuint index, const GLuint *v);
+GLAPI void APIENTRY glVertexAttrib4usvARB (GLuint index, const GLushort *v);
+GLAPI void APIENTRY glVertexAttribPointerARB (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer);
+GLAPI void APIENTRY glEnableVertexAttribArrayARB (GLuint index);
+GLAPI void APIENTRY glDisableVertexAttribArrayARB (GLuint index);
+GLAPI void APIENTRY glProgramStringARB (GLenum target, GLenum format, GLsizei len, const GLvoid *string);
+GLAPI void APIENTRY glBindProgramARB (GLenum target, GLuint program);
+GLAPI void APIENTRY glDeleteProgramsARB (GLsizei n, const GLuint *programs);
+GLAPI void APIENTRY glGenProgramsARB (GLsizei n, GLuint *programs);
+GLAPI void APIENTRY glProgramEnvParameter4dARB (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
+GLAPI void APIENTRY glProgramEnvParameter4dvARB (GLenum target, GLuint index, const GLdouble *params);
+GLAPI void APIENTRY glProgramEnvParameter4fARB (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+GLAPI void APIENTRY glProgramEnvParameter4fvARB (GLenum target, GLuint index, const GLfloat *params);
+GLAPI void APIENTRY glProgramLocalParameter4dARB (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
+GLAPI void APIENTRY glProgramLocalParameter4dvARB (GLenum target, GLuint index, const GLdouble *params);
+GLAPI void APIENTRY glProgramLocalParameter4fARB (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+GLAPI void APIENTRY glProgramLocalParameter4fvARB (GLenum target, GLuint index, const GLfloat *params);
+GLAPI void APIENTRY glGetProgramEnvParameterdvARB (GLenum target, GLuint index, GLdouble *params);
+GLAPI void APIENTRY glGetProgramEnvParameterfvARB (GLenum target, GLuint index, GLfloat *params);
+GLAPI void APIENTRY glGetProgramLocalParameterdvARB (GLenum target, GLuint index, GLdouble *params);
+GLAPI void APIENTRY glGetProgramLocalParameterfvARB (GLenum target, GLuint index, GLfloat *params);
+GLAPI void APIENTRY glGetProgramivARB (GLenum target, GLenum pname, GLint *params);
+GLAPI void APIENTRY glGetProgramStringARB (GLenum target, GLenum pname, GLvoid *string);
+GLAPI void APIENTRY glGetVertexAttribdvARB (GLuint index, GLenum pname, GLdouble *params);
+GLAPI void APIENTRY glGetVertexAttribfvARB (GLuint index, GLenum pname, GLfloat *params);
+GLAPI void APIENTRY glGetVertexAttribivARB (GLuint index, GLenum pname, GLint *params);
+GLAPI void APIENTRY glGetVertexAttribPointervARB (GLuint index, GLenum pname, GLvoid* *pointer);
+GLAPI GLboolean APIENTRY glIsProgramARB (GLuint program);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLVERTEXATTRIB1DARBPROC) (GLuint index, GLdouble x);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB1DVARBPROC) (GLuint index, const GLdouble *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB1FARBPROC) (GLuint index, GLfloat x);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB1FVARBPROC) (GLuint index, const GLfloat *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB1SARBPROC) (GLuint index, GLshort x);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB1SVARBPROC) (GLuint index, const GLshort *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB2DARBPROC) (GLuint index, GLdouble x, GLdouble y);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB2DVARBPROC) (GLuint index, const GLdouble *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB2FARBPROC) (GLuint index, GLfloat x, GLfloat y);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB2FVARBPROC) (GLuint index, const GLfloat *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB2SARBPROC) (GLuint index, GLshort x, GLshort y);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB2SVARBPROC) (GLuint index, const GLshort *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB3DARBPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB3DVARBPROC) (GLuint index, const GLdouble *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB3FARBPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB3FVARBPROC) (GLuint index, const GLfloat *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB3SARBPROC) (GLuint index, GLshort x, GLshort y, GLshort z);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB3SVARBPROC) (GLuint index, const GLshort *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NBVARBPROC) (GLuint index, const GLbyte *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NIVARBPROC) (GLuint index, const GLint *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NSVARBPROC) (GLuint index, const GLshort *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBARBPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBVARBPROC) (GLuint index, const GLubyte *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUIVARBPROC) (GLuint index, const GLuint *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUSVARBPROC) (GLuint index, const GLushort *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4BVARBPROC) (GLuint index, const GLbyte *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4DARBPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4DVARBPROC) (GLuint index, const GLdouble *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4FARBPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4FVARBPROC) (GLuint index, const GLfloat *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4IVARBPROC) (GLuint index, const GLint *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4SARBPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4SVARBPROC) (GLuint index, const GLshort *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4UBVARBPROC) (GLuint index, const GLubyte *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4UIVARBPROC) (GLuint index, const GLuint *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4USVARBPROC) (GLuint index, const GLushort *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBPOINTERARBPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer);
+typedef void (APIENTRYP PFNGLENABLEVERTEXATTRIBARRAYARBPROC) (GLuint index);
+typedef void (APIENTRYP PFNGLDISABLEVERTEXATTRIBARRAYARBPROC) (GLuint index);
+typedef void (APIENTRYP PFNGLPROGRAMSTRINGARBPROC) (GLenum target, GLenum format, GLsizei len, const GLvoid *string);
+typedef void (APIENTRYP PFNGLBINDPROGRAMARBPROC) (GLenum target, GLuint program);
+typedef void (APIENTRYP PFNGLDELETEPROGRAMSARBPROC) (GLsizei n, const GLuint *programs);
+typedef void (APIENTRYP PFNGLGENPROGRAMSARBPROC) (GLsizei n, GLuint *programs);
+typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4DARBPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
+typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4DVARBPROC) (GLenum target, GLuint index, const GLdouble *params);
+typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4FARBPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4FVARBPROC) (GLenum target, GLuint index, const GLfloat *params);
+typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4DARBPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
+typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4DVARBPROC) (GLenum target, GLuint index, const GLdouble *params);
+typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4FARBPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4FVARBPROC) (GLenum target, GLuint index, const GLfloat *params);
+typedef void (APIENTRYP PFNGLGETPROGRAMENVPARAMETERDVARBPROC) (GLenum target, GLuint index, GLdouble *params);
+typedef void (APIENTRYP PFNGLGETPROGRAMENVPARAMETERFVARBPROC) (GLenum target, GLuint index, GLfloat *params);
+typedef void (APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERDVARBPROC) (GLenum target, GLuint index, GLdouble *params);
+typedef void (APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERFVARBPROC) (GLenum target, GLuint index, GLfloat *params);
+typedef void (APIENTRYP PFNGLGETPROGRAMIVARBPROC) (GLenum target, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLGETPROGRAMSTRINGARBPROC) (GLenum target, GLenum pname, GLvoid *string);
+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBDVARBPROC) (GLuint index, GLenum pname, GLdouble *params);
+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBFVARBPROC) (GLuint index, GLenum pname, GLfloat *params);
+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIVARBPROC) (GLuint index, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVARBPROC) (GLuint index, GLenum pname, GLvoid* *pointer);
+typedef GLboolean (APIENTRYP PFNGLISPROGRAMARBPROC) (GLuint program);
+#endif
+
+#ifndef GL_ARB_fragment_program
+#define GL_ARB_fragment_program 1
+/* All ARB_fragment_program entry points are shared with ARB_vertex_program. */
+#endif
+
+#ifndef GL_ARB_vertex_buffer_object
+#define GL_ARB_vertex_buffer_object 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glBindBufferARB (GLenum target, GLuint buffer);
+GLAPI void APIENTRY glDeleteBuffersARB (GLsizei n, const GLuint *buffers);
+GLAPI void APIENTRY glGenBuffersARB (GLsizei n, GLuint *buffers);
+GLAPI GLboolean APIENTRY glIsBufferARB (GLuint buffer);
+GLAPI void APIENTRY glBufferDataARB (GLenum target, GLsizeiptrARB size, const GLvoid *data, GLenum usage);
+GLAPI void APIENTRY glBufferSubDataARB (GLenum target, GLintptrARB offset, GLsizeiptrARB size, const GLvoid *data);
+GLAPI void APIENTRY glGetBufferSubDataARB (GLenum target, GLintptrARB offset, GLsizeiptrARB size, GLvoid *data);
+GLAPI GLvoid* APIENTRY glMapBufferARB (GLenum target, GLenum access);
+GLAPI GLboolean APIENTRY glUnmapBufferARB (GLenum target);
+GLAPI void APIENTRY glGetBufferParameterivARB (GLenum target, GLenum pname, GLint *params);
+GLAPI void APIENTRY glGetBufferPointervARB (GLenum target, GLenum pname, GLvoid* *params);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLBINDBUFFERARBPROC) (GLenum target, GLuint buffer);
+typedef void (APIENTRYP PFNGLDELETEBUFFERSARBPROC) (GLsizei n, const GLuint *buffers);
+typedef void (APIENTRYP PFNGLGENBUFFERSARBPROC) (GLsizei n, GLuint *buffers);
+typedef GLboolean (APIENTRYP PFNGLISBUFFERARBPROC) (GLuint buffer);
+typedef void (APIENTRYP PFNGLBUFFERDATAARBPROC) (GLenum target, GLsizeiptrARB size, const GLvoid *data, GLenum usage);
+typedef void (APIENTRYP PFNGLBUFFERSUBDATAARBPROC) (GLenum target, GLintptrARB offset, GLsizeiptrARB size, const GLvoid *data);
+typedef void (APIENTRYP PFNGLGETBUFFERSUBDATAARBPROC) (GLenum target, GLintptrARB offset, GLsizeiptrARB size, GLvoid *data);
+typedef GLvoid* (APIENTRYP PFNGLMAPBUFFERARBPROC) (GLenum target, GLenum access);
+typedef GLboolean (APIENTRYP PFNGLUNMAPBUFFERARBPROC) (GLenum target);
+typedef void (APIENTRYP PFNGLGETBUFFERPARAMETERIVARBPROC) (GLenum target, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLGETBUFFERPOINTERVARBPROC) (GLenum target, GLenum pname, GLvoid* *params);
+#endif
+
+#ifndef GL_ARB_occlusion_query
+#define GL_ARB_occlusion_query 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glGenQueriesARB (GLsizei n, GLuint *ids);
+GLAPI void APIENTRY glDeleteQueriesARB (GLsizei n, const GLuint *ids);
+GLAPI GLboolean APIENTRY glIsQueryARB (GLuint id);
+GLAPI void APIENTRY glBeginQueryARB (GLenum target, GLuint id);
+GLAPI void APIENTRY glEndQueryARB (GLenum target);
+GLAPI void APIENTRY glGetQueryivARB (GLenum target, GLenum pname, GLint *params);
+GLAPI void APIENTRY glGetQueryObjectivARB (GLuint id, GLenum pname, GLint *params);
+GLAPI void APIENTRY glGetQueryObjectuivARB (GLuint id, GLenum pname, GLuint *params);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLGENQUERIESARBPROC) (GLsizei n, GLuint *ids);
+typedef void (APIENTRYP PFNGLDELETEQUERIESARBPROC) (GLsizei n, const GLuint *ids);
+typedef GLboolean (APIENTRYP PFNGLISQUERYARBPROC) (GLuint id);
+typedef void (APIENTRYP PFNGLBEGINQUERYARBPROC) (GLenum target, GLuint id);
+typedef void (APIENTRYP PFNGLENDQUERYARBPROC) (GLenum target);
+typedef void (APIENTRYP PFNGLGETQUERYIVARBPROC) (GLenum target, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLGETQUERYOBJECTIVARBPROC) (GLuint id, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLGETQUERYOBJECTUIVARBPROC) (GLuint id, GLenum pname, GLuint *params);
+#endif
+
+#ifndef GL_ARB_shader_objects
+#define GL_ARB_shader_objects 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glDeleteObjectARB (GLhandleARB obj);
+GLAPI GLhandleARB APIENTRY glGetHandleARB (GLenum pname);
+GLAPI void APIENTRY glDetachObjectARB (GLhandleARB containerObj, GLhandleARB attachedObj);
+GLAPI GLhandleARB APIENTRY glCreateShaderObjectARB (GLenum shaderType);
+GLAPI void APIENTRY glShaderSourceARB (GLhandleARB shaderObj, GLsizei count, const GLcharARB* *string, const GLint *length);
+GLAPI void APIENTRY glCompileShaderARB (GLhandleARB shaderObj);
+GLAPI GLhandleARB APIENTRY glCreateProgramObjectARB (void);
+GLAPI void APIENTRY glAttachObjectARB (GLhandleARB containerObj, GLhandleARB obj);
+GLAPI void APIENTRY glLinkProgramARB (GLhandleARB programObj);
+GLAPI void APIENTRY glUseProgramObjectARB (GLhandleARB programObj);
+GLAPI void APIENTRY glValidateProgramARB (GLhandleARB programObj);
+GLAPI void APIENTRY glUniform1fARB (GLint location, GLfloat v0);
+GLAPI void APIENTRY glUniform2fARB (GLint location, GLfloat v0, GLfloat v1);
+GLAPI void APIENTRY glUniform3fARB (GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
+GLAPI void APIENTRY glUniform4fARB (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
+GLAPI void APIENTRY glUniform1iARB (GLint location, GLint v0);
+GLAPI void APIENTRY glUniform2iARB (GLint location, GLint v0, GLint v1);
+GLAPI void APIENTRY glUniform3iARB (GLint location, GLint v0, GLint v1, GLint v2);
+GLAPI void APIENTRY glUniform4iARB (GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
+GLAPI void APIENTRY glUniform1fvARB (GLint location, GLsizei count, const GLfloat *value);
+GLAPI void APIENTRY glUniform2fvARB (GLint location, GLsizei count, const GLfloat *value);
+GLAPI void APIENTRY glUniform3fvARB (GLint location, GLsizei count, const GLfloat *value);
+GLAPI void APIENTRY glUniform4fvARB (GLint location, GLsizei count, const GLfloat *value);
+GLAPI void APIENTRY glUniform1ivARB (GLint location, GLsizei count, const GLint *value);
+GLAPI void APIENTRY glUniform2ivARB (GLint location, GLsizei count, const GLint *value);
+GLAPI void APIENTRY glUniform3ivARB (GLint location, GLsizei count, const GLint *value);
+GLAPI void APIENTRY glUniform4ivARB (GLint location, GLsizei count, const GLint *value);
+GLAPI void APIENTRY glUniformMatrix2fvARB (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GLAPI void APIENTRY glUniformMatrix3fvARB (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GLAPI void APIENTRY glUniformMatrix4fvARB (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GLAPI void APIENTRY glGetObjectParameterfvARB (GLhandleARB obj, GLenum pname, GLfloat *params);
+GLAPI void APIENTRY glGetObjectParameterivARB (GLhandleARB obj, GLenum pname, GLint *params);
+GLAPI void APIENTRY glGetInfoLogARB (GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *infoLog);
+GLAPI void APIENTRY glGetAttachedObjectsARB (GLhandleARB containerObj, GLsizei maxCount, GLsizei *count, GLhandleARB *obj);
+GLAPI GLint APIENTRY glGetUniformLocationARB (GLhandleARB programObj, const GLcharARB *name);
+GLAPI void APIENTRY glGetActiveUniformARB (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name);
+GLAPI void APIENTRY glGetUniformfvARB (GLhandleARB programObj, GLint location, GLfloat *params);
+GLAPI void APIENTRY glGetUniformivARB (GLhandleARB programObj, GLint location, GLint *params);
+GLAPI void APIENTRY glGetShaderSourceARB (GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *source);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLDELETEOBJECTARBPROC) (GLhandleARB obj);
+typedef GLhandleARB (APIENTRYP PFNGLGETHANDLEARBPROC) (GLenum pname);
+typedef void (APIENTRYP PFNGLDETACHOBJECTARBPROC) (GLhandleARB containerObj, GLhandleARB attachedObj);
+typedef GLhandleARB (APIENTRYP PFNGLCREATESHADEROBJECTARBPROC) (GLenum shaderType);
+typedef void (APIENTRYP PFNGLSHADERSOURCEARBPROC) (GLhandleARB shaderObj, GLsizei count, const GLcharARB* *string, const GLint *length);
+typedef void (APIENTRYP PFNGLCOMPILESHADERARBPROC) (GLhandleARB shaderObj);
+typedef GLhandleARB (APIENTRYP PFNGLCREATEPROGRAMOBJECTARBPROC) (void);
+typedef void (APIENTRYP PFNGLATTACHOBJECTARBPROC) (GLhandleARB containerObj, GLhandleARB obj);
+typedef void (APIENTRYP PFNGLLINKPROGRAMARBPROC) (GLhandleARB programObj);
+typedef void (APIENTRYP PFNGLUSEPROGRAMOBJECTARBPROC) (GLhandleARB programObj);
+typedef void (APIENTRYP PFNGLVALIDATEPROGRAMARBPROC) (GLhandleARB programObj);
+typedef void (APIENTRYP PFNGLUNIFORM1FARBPROC) (GLint location, GLfloat v0);
+typedef void (APIENTRYP PFNGLUNIFORM2FARBPROC) (GLint location, GLfloat v0, GLfloat v1);
+typedef void (APIENTRYP PFNGLUNIFORM3FARBPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
+typedef void (APIENTRYP PFNGLUNIFORM4FARBPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
+typedef void (APIENTRYP PFNGLUNIFORM1IARBPROC) (GLint location, GLint v0);
+typedef void (APIENTRYP PFNGLUNIFORM2IARBPROC) (GLint location, GLint v0, GLint v1);
+typedef void (APIENTRYP PFNGLUNIFORM3IARBPROC) (GLint location, GLint v0, GLint v1, GLint v2);
+typedef void (APIENTRYP PFNGLUNIFORM4IARBPROC) (GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
+typedef void (APIENTRYP PFNGLUNIFORM1FVARBPROC) (GLint location, GLsizei count, const GLfloat *value);
+typedef void (APIENTRYP PFNGLUNIFORM2FVARBPROC) (GLint location, GLsizei count, const GLfloat *value);
+typedef void (APIENTRYP PFNGLUNIFORM3FVARBPROC) (GLint location, GLsizei count, const GLfloat *value);
+typedef void (APIENTRYP PFNGLUNIFORM4FVARBPROC) (GLint location, GLsizei count, const GLfloat *value);
+typedef void (APIENTRYP PFNGLUNIFORM1IVARBPROC) (GLint location, GLsizei count, const GLint *value);
+typedef void (APIENTRYP PFNGLUNIFORM2IVARBPROC) (GLint location, GLsizei count, const GLint *value);
+typedef void (APIENTRYP PFNGLUNIFORM3IVARBPROC) (GLint location, GLsizei count, const GLint *value);
+typedef void (APIENTRYP PFNGLUNIFORM4IVARBPROC) (GLint location, GLsizei count, const GLint *value);
+typedef void (APIENTRYP PFNGLUNIFORMMATRIX2FVARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+typedef void (APIENTRYP PFNGLUNIFORMMATRIX3FVARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+typedef void (APIENTRYP PFNGLUNIFORMMATRIX4FVARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+typedef void (APIENTRYP PFNGLGETOBJECTPARAMETERFVARBPROC) (GLhandleARB obj, GLenum pname, GLfloat *params);
+typedef void (APIENTRYP PFNGLGETOBJECTPARAMETERIVARBPROC) (GLhandleARB obj, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLGETINFOLOGARBPROC) (GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *infoLog);
+typedef void (APIENTRYP PFNGLGETATTACHEDOBJECTSARBPROC) (GLhandleARB containerObj, GLsizei maxCount, GLsizei *count, GLhandleARB *obj);
+typedef GLint (APIENTRYP PFNGLGETUNIFORMLOCATIONARBPROC) (GLhandleARB programObj, const GLcharARB *name);
+typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMARBPROC) (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name);
+typedef void (APIENTRYP PFNGLGETUNIFORMFVARBPROC) (GLhandleARB programObj, GLint location, GLfloat *params);
+typedef void (APIENTRYP PFNGLGETUNIFORMIVARBPROC) (GLhandleARB programObj, GLint location, GLint *params);
+typedef void (APIENTRYP PFNGLGETSHADERSOURCEARBPROC) (GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *source);
+#endif
+
+#ifndef GL_ARB_vertex_shader
+#define GL_ARB_vertex_shader 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glBindAttribLocationARB (GLhandleARB programObj, GLuint index, const GLcharARB *name);
+GLAPI void APIENTRY glGetActiveAttribARB (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name);
+GLAPI GLint APIENTRY glGetAttribLocationARB (GLhandleARB programObj, const GLcharARB *name);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLBINDATTRIBLOCATIONARBPROC) (GLhandleARB programObj, GLuint index, const GLcharARB *name);
+typedef void (APIENTRYP PFNGLGETACTIVEATTRIBARBPROC) (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name);
+typedef GLint (APIENTRYP PFNGLGETATTRIBLOCATIONARBPROC) (GLhandleARB programObj, const GLcharARB *name);
+#endif
+
+#ifndef GL_ARB_fragment_shader
+#define GL_ARB_fragment_shader 1
+#endif
+
+#ifndef GL_ARB_shading_language_100
+#define GL_ARB_shading_language_100 1
+#endif
+
+#ifndef GL_ARB_texture_non_power_of_two
+#define GL_ARB_texture_non_power_of_two 1
+#endif
+
+#ifndef GL_ARB_point_sprite
+#define GL_ARB_point_sprite 1
+#endif
+
+#ifndef GL_ARB_fragment_program_shadow
+#define GL_ARB_fragment_program_shadow 1
+#endif
+
+#ifndef GL_ARB_draw_buffers
+#define GL_ARB_draw_buffers 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glDrawBuffersARB (GLsizei n, const GLenum *bufs);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLDRAWBUFFERSARBPROC) (GLsizei n, const GLenum *bufs);
+#endif
+
+#ifndef GL_ARB_texture_rectangle
+#define GL_ARB_texture_rectangle 1
+#endif
+
+#ifndef GL_ARB_color_buffer_float
+#define GL_ARB_color_buffer_float 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glClampColorARB (GLenum target, GLenum clamp);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLCLAMPCOLORARBPROC) (GLenum target, GLenum clamp);
+#endif
+
+#ifndef GL_ARB_half_float_pixel
+#define GL_ARB_half_float_pixel 1
+#endif
+
+#ifndef GL_ARB_texture_float
+#define GL_ARB_texture_float 1
+#endif
+
+#ifndef GL_ARB_pixel_buffer_object
+#define GL_ARB_pixel_buffer_object 1
+#endif
+
+#ifndef GL_ARB_depth_buffer_float
+#define GL_ARB_depth_buffer_float 1
+#endif
+
+#ifndef GL_ARB_draw_instanced
+#define GL_ARB_draw_instanced 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glDrawArraysInstancedARB (GLenum mode, GLint first, GLsizei count, GLsizei primcount);
+GLAPI void APIENTRY glDrawElementsInstancedARB (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLDRAWARRAYSINSTANCEDARBPROC) (GLenum mode, GLint first, GLsizei count, GLsizei primcount);
+typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDARBPROC) (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount);
+#endif
+
+#ifndef GL_ARB_framebuffer_object
+#define GL_ARB_framebuffer_object 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI GLboolean APIENTRY glIsRenderbuffer (GLuint renderbuffer);
+GLAPI void APIENTRY glBindRenderbuffer (GLenum target, GLuint renderbuffer);
+GLAPI void APIENTRY glDeleteRenderbuffers (GLsizei n, const GLuint *renderbuffers);
+GLAPI void APIENTRY glGenRenderbuffers (GLsizei n, GLuint *renderbuffers);
+GLAPI void APIENTRY glRenderbufferStorage (GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
+GLAPI void APIENTRY glGetRenderbufferParameteriv (GLenum target, GLenum pname, GLint *params);
+GLAPI GLboolean APIENTRY glIsFramebuffer (GLuint framebuffer);
+GLAPI void APIENTRY glBindFramebuffer (GLenum target, GLuint framebuffer);
+GLAPI void APIENTRY glDeleteFramebuffers (GLsizei n, const GLuint *framebuffers);
+GLAPI void APIENTRY glGenFramebuffers (GLsizei n, GLuint *framebuffers);
+GLAPI GLenum APIENTRY glCheckFramebufferStatus (GLenum target);
+GLAPI void APIENTRY glFramebufferTexture1D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
+GLAPI void APIENTRY glFramebufferTexture2D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
+GLAPI void APIENTRY glFramebufferTexture3D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
+GLAPI void APIENTRY glFramebufferRenderbuffer (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
+GLAPI void APIENTRY glGetFramebufferAttachmentParameteriv (GLenum target, GLenum attachment, GLenum pname, GLint *params);
+GLAPI void APIENTRY glGenerateMipmap (GLenum target);
+GLAPI void APIENTRY glBlitFramebuffer (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
+GLAPI void APIENTRY glRenderbufferStorageMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
+GLAPI void APIENTRY glFramebufferTextureLayer (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef GLboolean (APIENTRYP PFNGLISRENDERBUFFERPROC) (GLuint renderbuffer);
+typedef void (APIENTRYP PFNGLBINDRENDERBUFFERPROC) (GLenum target, GLuint renderbuffer);
+typedef void (APIENTRYP PFNGLDELETERENDERBUFFERSPROC) (GLsizei n, const GLuint *renderbuffers);
+typedef void (APIENTRYP PFNGLGENRENDERBUFFERSPROC) (GLsizei n, GLuint *renderbuffers);
+typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
+typedef void (APIENTRYP PFNGLGETRENDERBUFFERPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
+typedef GLboolean (APIENTRYP PFNGLISFRAMEBUFFERPROC) (GLuint framebuffer);
+typedef void (APIENTRYP PFNGLBINDFRAMEBUFFERPROC) (GLenum target, GLuint framebuffer);
+typedef void (APIENTRYP PFNGLDELETEFRAMEBUFFERSPROC) (GLsizei n, const GLuint *framebuffers);
+typedef void (APIENTRYP PFNGLGENFRAMEBUFFERSPROC) (GLsizei n, GLuint *framebuffers);
+typedef GLenum (APIENTRYP PFNGLCHECKFRAMEBUFFERSTATUSPROC) (GLenum target);
+typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE1DPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
+typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
+typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE3DPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
+typedef void (APIENTRYP PFNGLFRAMEBUFFERRENDERBUFFERPROC) (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
+typedef void (APIENTRYP PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC) (GLenum target, GLenum attachment, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLGENERATEMIPMAPPROC) (GLenum target);
+typedef void (APIENTRYP PFNGLBLITFRAMEBUFFERPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
+typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
+typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURELAYERPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer);
+#endif
+
+#ifndef GL_ARB_framebuffer_sRGB
+#define GL_ARB_framebuffer_sRGB 1
+#endif
+
+#ifndef GL_ARB_geometry_shader4
+#define GL_ARB_geometry_shader4 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glProgramParameteriARB (GLuint program, GLenum pname, GLint value);
+GLAPI void APIENTRY glFramebufferTextureARB (GLenum target, GLenum attachment, GLuint texture, GLint level);
+GLAPI void APIENTRY glFramebufferTextureLayerARB (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer);
+GLAPI void APIENTRY glFramebufferTextureFaceARB (GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLPROGRAMPARAMETERIARBPROC) (GLuint program, GLenum pname, GLint value);
+typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREARBPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level);
+typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURELAYERARBPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer);
+typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREFACEARBPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face);
+#endif
+
+#ifndef GL_ARB_half_float_vertex
+#define GL_ARB_half_float_vertex 1
+#endif
+
+#ifndef GL_ARB_instanced_arrays
+#define GL_ARB_instanced_arrays 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glVertexAttribDivisorARB (GLuint index, GLuint divisor);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLVERTEXATTRIBDIVISORARBPROC) (GLuint index, GLuint divisor);
+#endif
+
+#ifndef GL_ARB_map_buffer_range
+#define GL_ARB_map_buffer_range 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI GLvoid* APIENTRY glMapBufferRange (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access);
+GLAPI void APIENTRY glFlushMappedBufferRange (GLenum target, GLintptr offset, GLsizeiptr length);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef GLvoid* (APIENTRYP PFNGLMAPBUFFERRANGEPROC) (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access);
+typedef void (APIENTRYP PFNGLFLUSHMAPPEDBUFFERRANGEPROC) (GLenum target, GLintptr offset, GLsizeiptr length);
+#endif
+
+#ifndef GL_ARB_texture_buffer_object
+#define GL_ARB_texture_buffer_object 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glTexBufferARB (GLenum target, GLenum internalformat, GLuint buffer);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLTEXBUFFERARBPROC) (GLenum target, GLenum internalformat, GLuint buffer);
+#endif
+
+#ifndef GL_ARB_texture_compression_rgtc
+#define GL_ARB_texture_compression_rgtc 1
+#endif
+
+#ifndef GL_ARB_texture_rg
+#define GL_ARB_texture_rg 1
+#endif
+
+#ifndef GL_ARB_vertex_array_object
+#define GL_ARB_vertex_array_object 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glBindVertexArray (GLuint array);
+GLAPI void APIENTRY glDeleteVertexArrays (GLsizei n, const GLuint *arrays);
+GLAPI void APIENTRY glGenVertexArrays (GLsizei n, GLuint *arrays);
+GLAPI GLboolean APIENTRY glIsVertexArray (GLuint array);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLBINDVERTEXARRAYPROC) (GLuint array);
+typedef void (APIENTRYP PFNGLDELETEVERTEXARRAYSPROC) (GLsizei n, const GLuint *arrays);
+typedef void (APIENTRYP PFNGLGENVERTEXARRAYSPROC) (GLsizei n, GLuint *arrays);
+typedef GLboolean (APIENTRYP PFNGLISVERTEXARRAYPROC) (GLuint array);
+#endif
+
+#ifndef GL_ARB_uniform_buffer_object
+#define GL_ARB_uniform_buffer_object 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glGetUniformIndices (GLuint program, GLsizei uniformCount, const GLchar* *uniformNames, GLuint *uniformIndices);
+GLAPI void APIENTRY glGetActiveUniformsiv (GLuint program, GLsizei uniformCount, const GLuint *uniformIndices, GLenum pname, GLint *params);
+GLAPI void APIENTRY glGetActiveUniformName (GLuint program, GLuint uniformIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformName);
+GLAPI GLuint APIENTRY glGetUniformBlockIndex (GLuint program, const GLchar *uniformBlockName);
+GLAPI void APIENTRY glGetActiveUniformBlockiv (GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint *params);
+GLAPI void APIENTRY glGetActiveUniformBlockName (GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName);
+GLAPI void APIENTRY glUniformBlockBinding (GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLGETUNIFORMINDICESPROC) (GLuint program, GLsizei uniformCount, const GLchar* *uniformNames, GLuint *uniformIndices);
+typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMSIVPROC) (GLuint program, GLsizei uniformCount, const GLuint *uniformIndices, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMNAMEPROC) (GLuint program, GLuint uniformIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformName);
+typedef GLuint (APIENTRYP PFNGLGETUNIFORMBLOCKINDEXPROC) (GLuint program, const GLchar *uniformBlockName);
+typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMBLOCKIVPROC) (GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMBLOCKNAMEPROC) (GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName);
+typedef void (APIENTRYP PFNGLUNIFORMBLOCKBINDINGPROC) (GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding);
+#endif
+
+#ifndef GL_ARB_compatibility
+#define GL_ARB_compatibility 1
+#endif
+
+#ifndef GL_ARB_copy_buffer
+#define GL_ARB_copy_buffer 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glCopyBufferSubData (GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLCOPYBUFFERSUBDATAPROC) (GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size);
+#endif
+
+#ifndef GL_ARB_shader_texture_lod
+#define GL_ARB_shader_texture_lod 1
+#endif
+
+#ifndef GL_ARB_depth_clamp
+#define GL_ARB_depth_clamp 1
+#endif
+
+#ifndef GL_ARB_draw_elements_base_vertex
+#define GL_ARB_draw_elements_base_vertex 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glDrawElementsBaseVertex (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLint basevertex);
+GLAPI void APIENTRY glDrawRangeElementsBaseVertex (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices, GLint basevertex);
+GLAPI void APIENTRY glDrawElementsInstancedBaseVertex (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount, GLint basevertex);
+GLAPI void APIENTRY glMultiDrawElementsBaseVertex (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount, const GLint *basevertex);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLDRAWELEMENTSBASEVERTEXPROC) (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLint basevertex);
+typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTSBASEVERTEXPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices, GLint basevertex);
+typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXPROC) (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount, GLint basevertex);
+typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSBASEVERTEXPROC) (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount, const GLint *basevertex);
+#endif
+
+#ifndef GL_ARB_fragment_coord_conventions
+#define GL_ARB_fragment_coord_conventions 1
+#endif
+
+#ifndef GL_ARB_provoking_vertex
+#define GL_ARB_provoking_vertex 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glProvokingVertex (GLenum mode);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLPROVOKINGVERTEXPROC) (GLenum mode);
+#endif
+
+#ifndef GL_ARB_seamless_cube_map
+#define GL_ARB_seamless_cube_map 1
+#endif
+
+#ifndef GL_ARB_sync
+#define GL_ARB_sync 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI GLsync APIENTRY glFenceSync (GLenum condition, GLbitfield flags);
+GLAPI GLboolean APIENTRY glIsSync (GLsync sync);
+GLAPI void APIENTRY glDeleteSync (GLsync sync);
+GLAPI GLenum APIENTRY glClientWaitSync (GLsync sync, GLbitfield flags, GLuint64 timeout);
+GLAPI void APIENTRY glWaitSync (GLsync sync, GLbitfield flags, GLuint64 timeout);
+GLAPI void APIENTRY glGetInteger64v (GLenum pname, GLint64 *params);
+GLAPI void APIENTRY glGetSynciv (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef GLsync (APIENTRYP PFNGLFENCESYNCPROC) (GLenum condition, GLbitfield flags);
+typedef GLboolean (APIENTRYP PFNGLISSYNCPROC) (GLsync sync);
+typedef void (APIENTRYP PFNGLDELETESYNCPROC) (GLsync sync);
+typedef GLenum (APIENTRYP PFNGLCLIENTWAITSYNCPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout);
+typedef void (APIENTRYP PFNGLWAITSYNCPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout);
+typedef void (APIENTRYP PFNGLGETINTEGER64VPROC) (GLenum pname, GLint64 *params);
+typedef void (APIENTRYP PFNGLGETSYNCIVPROC) (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values);
+#endif
+
+#ifndef GL_ARB_texture_multisample
+#define GL_ARB_texture_multisample 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glTexImage2DMultisample (GLenum target, GLsizei samples, GLint internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations);
+GLAPI void APIENTRY glTexImage3DMultisample (GLenum target, GLsizei samples, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations);
+GLAPI void APIENTRY glGetMultisamplefv (GLenum pname, GLuint index, GLfloat *val);
+GLAPI void APIENTRY glSampleMaski (GLuint index, GLbitfield mask);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLTEXIMAGE2DMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLint internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations);
+typedef void (APIENTRYP PFNGLTEXIMAGE3DMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations);
+typedef void (APIENTRYP PFNGLGETMULTISAMPLEFVPROC) (GLenum pname, GLuint index, GLfloat *val);
+typedef void (APIENTRYP PFNGLSAMPLEMASKIPROC) (GLuint index, GLbitfield mask);
+#endif
+
+#ifndef GL_ARB_vertex_array_bgra
+#define GL_ARB_vertex_array_bgra 1
+#endif
+
+#ifndef GL_ARB_draw_buffers_blend
+#define GL_ARB_draw_buffers_blend 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glBlendEquationiARB (GLuint buf, GLenum mode);
+GLAPI void APIENTRY glBlendEquationSeparateiARB (GLuint buf, GLenum modeRGB, GLenum modeAlpha);
+GLAPI void APIENTRY glBlendFunciARB (GLuint buf, GLenum src, GLenum dst);
+GLAPI void APIENTRY glBlendFuncSeparateiARB (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLBLENDEQUATIONIARBPROC) (GLuint buf, GLenum mode);
+typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEIARBPROC) (GLuint buf, GLenum modeRGB, GLenum modeAlpha);
+typedef void (APIENTRYP PFNGLBLENDFUNCIARBPROC) (GLuint buf, GLenum src, GLenum dst);
+typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEIARBPROC) (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
+#endif
+
+#ifndef GL_ARB_sample_shading
+#define GL_ARB_sample_shading 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glMinSampleShadingARB (GLclampf value);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLMINSAMPLESHADINGARBPROC) (GLclampf value);
+#endif
+
+#ifndef GL_ARB_texture_cube_map_array
+#define GL_ARB_texture_cube_map_array 1
+#endif
+
+#ifndef GL_ARB_texture_gather
+#define GL_ARB_texture_gather 1
+#endif
+
+#ifndef GL_ARB_texture_query_lod
+#define GL_ARB_texture_query_lod 1
+#endif
+
+#ifndef GL_ARB_shading_language_include
+#define GL_ARB_shading_language_include 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glNamedStringARB (GLenum type, GLint namelen, const GLchar *name, GLint stringlen, const GLchar *string);
+GLAPI void APIENTRY glDeleteNamedStringARB (GLint namelen, const GLchar *name);
+GLAPI void APIENTRY glCompileShaderIncludeARB (GLuint shader, GLsizei count, const GLchar* *path, const GLint *length);
+GLAPI GLboolean APIENTRY glIsNamedStringARB (GLint namelen, const GLchar *name);
+GLAPI void APIENTRY glGetNamedStringARB (GLint namelen, const GLchar *name, GLsizei bufSize, GLint *stringlen, GLchar *string);
+GLAPI void APIENTRY glGetNamedStringivARB (GLint namelen, const GLchar *name, GLenum pname, GLint *params);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLNAMEDSTRINGARBPROC) (GLenum type, GLint namelen, const GLchar *name, GLint stringlen, const GLchar *string);
+typedef void (APIENTRYP PFNGLDELETENAMEDSTRINGARBPROC) (GLint namelen, const GLchar *name);
+typedef void (APIENTRYP PFNGLCOMPILESHADERINCLUDEARBPROC) (GLuint shader, GLsizei count, const GLchar* *path, const GLint *length);
+typedef GLboolean (APIENTRYP PFNGLISNAMEDSTRINGARBPROC) (GLint namelen, const GLchar *name);
+typedef void (APIENTRYP PFNGLGETNAMEDSTRINGARBPROC) (GLint namelen, const GLchar *name, GLsizei bufSize, GLint *stringlen, GLchar *string);
+typedef void (APIENTRYP PFNGLGETNAMEDSTRINGIVARBPROC) (GLint namelen, const GLchar *name, GLenum pname, GLint *params);
+#endif
+
+#ifndef GL_ARB_texture_compression_bptc
+#define GL_ARB_texture_compression_bptc 1
+#endif
+
+#ifndef GL_ARB_blend_func_extended
+#define GL_ARB_blend_func_extended 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glBindFragDataLocationIndexed (GLuint program, GLuint colorNumber, GLuint index, const GLchar *name);
+GLAPI GLint APIENTRY glGetFragDataIndex (GLuint program, const GLchar *name);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLBINDFRAGDATALOCATIONINDEXEDPROC) (GLuint program, GLuint colorNumber, GLuint index, const GLchar *name);
+typedef GLint (APIENTRYP PFNGLGETFRAGDATAINDEXPROC) (GLuint program, const GLchar *name);
+#endif
+
+#ifndef GL_ARB_explicit_attrib_location
+#define GL_ARB_explicit_attrib_location 1
+#endif
+
+#ifndef GL_ARB_occlusion_query2
+#define GL_ARB_occlusion_query2 1
+#endif
+
+#ifndef GL_ARB_sampler_objects
+#define GL_ARB_sampler_objects 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glGenSamplers (GLsizei count, GLuint *samplers);
+GLAPI void APIENTRY glDeleteSamplers (GLsizei count, const GLuint *samplers);
+GLAPI GLboolean APIENTRY glIsSampler (GLuint sampler);
+GLAPI void APIENTRY glBindSampler (GLuint unit, GLuint sampler);
+GLAPI void APIENTRY glSamplerParameteri (GLuint sampler, GLenum pname, GLint param);
+GLAPI void APIENTRY glSamplerParameteriv (GLuint sampler, GLenum pname, const GLint *param);
+GLAPI void APIENTRY glSamplerParameterf (GLuint sampler, GLenum pname, GLfloat param);
+GLAPI void APIENTRY glSamplerParameterfv (GLuint sampler, GLenum pname, const GLfloat *param);
+GLAPI void APIENTRY glSamplerParameterIiv (GLuint sampler, GLenum pname, const GLint *param);
+GLAPI void APIENTRY glSamplerParameterIuiv (GLuint sampler, GLenum pname, const GLuint *param);
+GLAPI void APIENTRY glGetSamplerParameteriv (GLuint sampler, GLenum pname, GLint *params);
+GLAPI void APIENTRY glGetSamplerParameterIiv (GLuint sampler, GLenum pname, GLint *params);
+GLAPI void APIENTRY glGetSamplerParameterfv (GLuint sampler, GLenum pname, GLfloat *params);
+GLAPI void APIENTRY glGetSamplerParameterIuiv (GLuint sampler, GLenum pname, GLuint *params);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLGENSAMPLERSPROC) (GLsizei count, GLuint *samplers);
+typedef void (APIENTRYP PFNGLDELETESAMPLERSPROC) (GLsizei count, const GLuint *samplers);
+typedef GLboolean (APIENTRYP PFNGLISSAMPLERPROC) (GLuint sampler);
+typedef void (APIENTRYP PFNGLBINDSAMPLERPROC) (GLuint unit, GLuint sampler);
+typedef void (APIENTRYP PFNGLSAMPLERPARAMETERIPROC) (GLuint sampler, GLenum pname, GLint param);
+typedef void (APIENTRYP PFNGLSAMPLERPARAMETERIVPROC) (GLuint sampler, GLenum pname, const GLint *param);
+typedef void (APIENTRYP PFNGLSAMPLERPARAMETERFPROC) (GLuint sampler, GLenum pname, GLfloat param);
+typedef void (APIENTRYP PFNGLSAMPLERPARAMETERFVPROC) (GLuint sampler, GLenum pname, const GLfloat *param);
+typedef void (APIENTRYP PFNGLSAMPLERPARAMETERIIVPROC) (GLuint sampler, GLenum pname, const GLint *param);
+typedef void (APIENTRYP PFNGLSAMPLERPARAMETERIUIVPROC) (GLuint sampler, GLenum pname, const GLuint *param);
+typedef void (APIENTRYP PFNGLGETSAMPLERPARAMETERIVPROC) (GLuint sampler, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLGETSAMPLERPARAMETERIIVPROC) (GLuint sampler, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLGETSAMPLERPARAMETERFVPROC) (GLuint sampler, GLenum pname, GLfloat *params);
+typedef void (APIENTRYP PFNGLGETSAMPLERPARAMETERIUIVPROC) (GLuint sampler, GLenum pname, GLuint *params);
+#endif
+
+#ifndef GL_ARB_texture_rgb10_a2ui
+#define GL_ARB_texture_rgb10_a2ui 1
+#endif
+
+#ifndef GL_ARB_texture_swizzle
+#define GL_ARB_texture_swizzle 1
+#endif
+
+#ifndef GL_ARB_timer_query
+#define GL_ARB_timer_query 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glQueryCounter (GLuint id, GLenum target);
+GLAPI void APIENTRY glGetQueryObjecti64v (GLuint id, GLenum pname, GLint64 *params);
+GLAPI void APIENTRY glGetQueryObjectui64v (GLuint id, GLenum pname, GLuint64 *params);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLQUERYCOUNTERPROC) (GLuint id, GLenum target);
+typedef void (APIENTRYP PFNGLGETQUERYOBJECTI64VPROC) (GLuint id, GLenum pname, GLint64 *params);
+typedef void (APIENTRYP PFNGLGETQUERYOBJECTUI64VPROC) (GLuint id, GLenum pname, GLuint64 *params);
+#endif
+
+#ifndef GL_ARB_vertex_type_2_10_10_10_rev
+#define GL_ARB_vertex_type_2_10_10_10_rev 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glVertexP2ui (GLenum type, GLuint value);
+GLAPI void APIENTRY glVertexP2uiv (GLenum type, const GLuint *value);
+GLAPI void APIENTRY glVertexP3ui (GLenum type, GLuint value);
+GLAPI void APIENTRY glVertexP3uiv (GLenum type, const GLuint *value);
+GLAPI void APIENTRY glVertexP4ui (GLenum type, GLuint value);
+GLAPI void APIENTRY glVertexP4uiv (GLenum type, const GLuint *value);
+GLAPI void APIENTRY glTexCoordP1ui (GLenum type, GLuint coords);
+GLAPI void APIENTRY glTexCoordP1uiv (GLenum type, const GLuint *coords);
+GLAPI void APIENTRY glTexCoordP2ui (GLenum type, GLuint coords);
+GLAPI void APIENTRY glTexCoordP2uiv (GLenum type, const GLuint *coords);
+GLAPI void APIENTRY glTexCoordP3ui (GLenum type, GLuint coords);
+GLAPI void APIENTRY glTexCoordP3uiv (GLenum type, const GLuint *coords);
+GLAPI void APIENTRY glTexCoordP4ui (GLenum type, GLuint coords);
+GLAPI void APIENTRY glTexCoordP4uiv (GLenum type, const GLuint *coords);
+GLAPI void APIENTRY glMultiTexCoordP1ui (GLenum texture, GLenum type, GLuint coords);
+GLAPI void APIENTRY glMultiTexCoordP1uiv (GLenum texture, GLenum type, const GLuint *coords);
+GLAPI void APIENTRY glMultiTexCoordP2ui (GLenum texture, GLenum type, GLuint coords);
+GLAPI void APIENTRY glMultiTexCoordP2uiv (GLenum texture, GLenum type, const GLuint *coords);
+GLAPI void APIENTRY glMultiTexCoordP3ui (GLenum texture, GLenum type, GLuint coords);
+GLAPI void APIENTRY glMultiTexCoordP3uiv (GLenum texture, GLenum type, const GLuint *coords);
+GLAPI void APIENTRY glMultiTexCoordP4ui (GLenum texture, GLenum type, GLuint coords);
+GLAPI void APIENTRY glMultiTexCoordP4uiv (GLenum texture, GLenum type, const GLuint *coords);
+GLAPI void APIENTRY glNormalP3ui (GLenum type, GLuint coords);
+GLAPI void APIENTRY glNormalP3uiv (GLenum type, const GLuint *coords);
+GLAPI void APIENTRY glColorP3ui (GLenum type, GLuint color);
+GLAPI void APIENTRY glColorP3uiv (GLenum type, const GLuint *color);
+GLAPI void APIENTRY glColorP4ui (GLenum type, GLuint color);
+GLAPI void APIENTRY glColorP4uiv (GLenum type, const GLuint *color);
+GLAPI void APIENTRY glSecondaryColorP3ui (GLenum type, GLuint color);
+GLAPI void APIENTRY glSecondaryColorP3uiv (GLenum type, const GLuint *color);
+GLAPI void APIENTRY glVertexAttribP1ui (GLuint index, GLenum type, GLboolean normalized, GLuint value);
+GLAPI void APIENTRY glVertexAttribP1uiv (GLuint index, GLenum type, GLboolean normalized, const GLuint *value);
+GLAPI void APIENTRY glVertexAttribP2ui (GLuint index, GLenum type, GLboolean normalized, GLuint value);
+GLAPI void APIENTRY glVertexAttribP2uiv (GLuint index, GLenum type, GLboolean normalized, const GLuint *value);
+GLAPI void APIENTRY glVertexAttribP3ui (GLuint index, GLenum type, GLboolean normalized, GLuint value);
+GLAPI void APIENTRY glVertexAttribP3uiv (GLuint index, GLenum type, GLboolean normalized, const GLuint *value);
+GLAPI void APIENTRY glVertexAttribP4ui (GLuint index, GLenum type, GLboolean normalized, GLuint value);
+GLAPI void APIENTRY glVertexAttribP4uiv (GLuint index, GLenum type, GLboolean normalized, const GLuint *value);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLVERTEXP2UIPROC) (GLenum type, GLuint value);
+typedef void (APIENTRYP PFNGLVERTEXP2UIVPROC) (GLenum type, const GLuint *value);
+typedef void (APIENTRYP PFNGLVERTEXP3UIPROC) (GLenum type, GLuint value);
+typedef void (APIENTRYP PFNGLVERTEXP3UIVPROC) (GLenum type, const GLuint *value);
+typedef void (APIENTRYP PFNGLVERTEXP4UIPROC) (GLenum type, GLuint value);
+typedef void (APIENTRYP PFNGLVERTEXP4UIVPROC) (GLenum type, const GLuint *value);
+typedef void (APIENTRYP PFNGLTEXCOORDP1UIPROC) (GLenum type, GLuint coords);
+typedef void (APIENTRYP PFNGLTEXCOORDP1UIVPROC) (GLenum type, const GLuint *coords);
+typedef void (APIENTRYP PFNGLTEXCOORDP2UIPROC) (GLenum type, GLuint coords);
+typedef void (APIENTRYP PFNGLTEXCOORDP2UIVPROC) (GLenum type, const GLuint *coords);
+typedef void (APIENTRYP PFNGLTEXCOORDP3UIPROC) (GLenum type, GLuint coords);
+typedef void (APIENTRYP PFNGLTEXCOORDP3UIVPROC) (GLenum type, const GLuint *coords);
+typedef void (APIENTRYP PFNGLTEXCOORDP4UIPROC) (GLenum type, GLuint coords);
+typedef void (APIENTRYP PFNGLTEXCOORDP4UIVPROC) (GLenum type, const GLuint *coords);
+typedef void (APIENTRYP PFNGLMULTITEXCOORDP1UIPROC) (GLenum texture, GLenum type, GLuint coords);
+typedef void (APIENTRYP PFNGLMULTITEXCOORDP1UIVPROC) (GLenum texture, GLenum type, const GLuint *coords);
+typedef void (APIENTRYP PFNGLMULTITEXCOORDP2UIPROC) (GLenum texture, GLenum type, GLuint coords);
+typedef void (APIENTRYP PFNGLMULTITEXCOORDP2UIVPROC) (GLenum texture, GLenum type, const GLuint *coords);
+typedef void (APIENTRYP PFNGLMULTITEXCOORDP3UIPROC) (GLenum texture, GLenum type, GLuint coords);
+typedef void (APIENTRYP PFNGLMULTITEXCOORDP3UIVPROC) (GLenum texture, GLenum type, const GLuint *coords);
+typedef void (APIENTRYP PFNGLMULTITEXCOORDP4UIPROC) (GLenum texture, GLenum type, GLuint coords);
+typedef void (APIENTRYP PFNGLMULTITEXCOORDP4UIVPROC) (GLenum texture, GLenum type, const GLuint *coords);
+typedef void (APIENTRYP PFNGLNORMALP3UIPROC) (GLenum type, GLuint coords);
+typedef void (APIENTRYP PFNGLNORMALP3UIVPROC) (GLenum type, const GLuint *coords);
+typedef void (APIENTRYP PFNGLCOLORP3UIPROC) (GLenum type, GLuint color);
+typedef void (APIENTRYP PFNGLCOLORP3UIVPROC) (GLenum type, const GLuint *color);
+typedef void (APIENTRYP PFNGLCOLORP4UIPROC) (GLenum type, GLuint color);
+typedef void (APIENTRYP PFNGLCOLORP4UIVPROC) (GLenum type, const GLuint *color);
+typedef void (APIENTRYP PFNGLSECONDARYCOLORP3UIPROC) (GLenum type, GLuint color);
+typedef void (APIENTRYP PFNGLSECONDARYCOLORP3UIVPROC) (GLenum type, const GLuint *color);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBP1UIPROC) (GLuint index, GLenum type, GLboolean normalized, GLuint value);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBP1UIVPROC) (GLuint index, GLenum type, GLboolean normalized, const GLuint *value);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBP2UIPROC) (GLuint index, GLenum type, GLboolean normalized, GLuint value);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBP2UIVPROC) (GLuint index, GLenum type, GLboolean normalized, const GLuint *value);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBP3UIPROC) (GLuint index, GLenum type, GLboolean normalized, GLuint value);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBP3UIVPROC) (GLuint index, GLenum type, GLboolean normalized, const GLuint *value);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBP4UIPROC) (GLuint index, GLenum type, GLboolean normalized, GLuint value);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBP4UIVPROC) (GLuint index, GLenum type, GLboolean normalized, const GLuint *value);
+#endif
+
+#ifndef GL_ARB_draw_indirect
+#define GL_ARB_draw_indirect 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glDrawArraysIndirect (GLenum mode, const GLvoid *indirect);
+GLAPI void APIENTRY glDrawElementsIndirect (GLenum mode, GLenum type, const GLvoid *indirect);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLDRAWARRAYSINDIRECTPROC) (GLenum mode, const GLvoid *indirect);
+typedef void (APIENTRYP PFNGLDRAWELEMENTSINDIRECTPROC) (GLenum mode, GLenum type, const GLvoid *indirect);
+#endif
+
+#ifndef GL_ARB_gpu_shader5
+#define GL_ARB_gpu_shader5 1
+#endif
+
+#ifndef GL_ARB_gpu_shader_fp64
+#define GL_ARB_gpu_shader_fp64 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glUniform1d (GLint location, GLdouble x);
+GLAPI void APIENTRY glUniform2d (GLint location, GLdouble x, GLdouble y);
+GLAPI void APIENTRY glUniform3d (GLint location, GLdouble x, GLdouble y, GLdouble z);
+GLAPI void APIENTRY glUniform4d (GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
+GLAPI void APIENTRY glUniform1dv (GLint location, GLsizei count, const GLdouble *value);
+GLAPI void APIENTRY glUniform2dv (GLint location, GLsizei count, const GLdouble *value);
+GLAPI void APIENTRY glUniform3dv (GLint location, GLsizei count, const GLdouble *value);
+GLAPI void APIENTRY glUniform4dv (GLint location, GLsizei count, const GLdouble *value);
+GLAPI void APIENTRY glUniformMatrix2dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+GLAPI void APIENTRY glUniformMatrix3dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+GLAPI void APIENTRY glUniformMatrix4dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+GLAPI void APIENTRY glUniformMatrix2x3dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+GLAPI void APIENTRY glUniformMatrix2x4dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+GLAPI void APIENTRY glUniformMatrix3x2dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+GLAPI void APIENTRY glUniformMatrix3x4dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+GLAPI void APIENTRY glUniformMatrix4x2dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+GLAPI void APIENTRY glUniformMatrix4x3dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+GLAPI void APIENTRY glGetUniformdv (GLuint program, GLint location, GLdouble *params);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLUNIFORM1DPROC) (GLint location, GLdouble x);
+typedef void (APIENTRYP PFNGLUNIFORM2DPROC) (GLint location, GLdouble x, GLdouble y);
+typedef void (APIENTRYP PFNGLUNIFORM3DPROC) (GLint location, GLdouble x, GLdouble y, GLdouble z);
+typedef void (APIENTRYP PFNGLUNIFORM4DPROC) (GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
+typedef void (APIENTRYP PFNGLUNIFORM1DVPROC) (GLint location, GLsizei count, const GLdouble *value);
+typedef void (APIENTRYP PFNGLUNIFORM2DVPROC) (GLint location, GLsizei count, const GLdouble *value);
+typedef void (APIENTRYP PFNGLUNIFORM3DVPROC) (GLint location, GLsizei count, const GLdouble *value);
+typedef void (APIENTRYP PFNGLUNIFORM4DVPROC) (GLint location, GLsizei count, const GLdouble *value);
+typedef void (APIENTRYP PFNGLUNIFORMMATRIX2DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+typedef void (APIENTRYP PFNGLUNIFORMMATRIX3DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+typedef void (APIENTRYP PFNGLUNIFORMMATRIX4DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+typedef void (APIENTRYP PFNGLUNIFORMMATRIX2X3DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+typedef void (APIENTRYP PFNGLUNIFORMMATRIX2X4DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+typedef void (APIENTRYP PFNGLUNIFORMMATRIX3X2DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+typedef void (APIENTRYP PFNGLUNIFORMMATRIX3X4DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+typedef void (APIENTRYP PFNGLUNIFORMMATRIX4X2DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+typedef void (APIENTRYP PFNGLUNIFORMMATRIX4X3DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+typedef void (APIENTRYP PFNGLGETUNIFORMDVPROC) (GLuint program, GLint location, GLdouble *params);
+#endif
+
+#ifndef GL_ARB_shader_subroutine
+#define GL_ARB_shader_subroutine 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI GLint APIENTRY glGetSubroutineUniformLocation (GLuint program, GLenum shadertype, const GLchar *name);
+GLAPI GLuint APIENTRY glGetSubroutineIndex (GLuint program, GLenum shadertype, const GLchar *name);
+GLAPI void APIENTRY glGetActiveSubroutineUniformiv (GLuint program, GLenum shadertype, GLuint index, GLenum pname, GLint *values);
+GLAPI void APIENTRY glGetActiveSubroutineUniformName (GLuint program, GLenum shadertype, GLuint index, GLsizei bufsize, GLsizei *length, GLchar *name);
+GLAPI void APIENTRY glGetActiveSubroutineName (GLuint program, GLenum shadertype, GLuint index, GLsizei bufsize, GLsizei *length, GLchar *name);
+GLAPI void APIENTRY glUniformSubroutinesuiv (GLenum shadertype, GLsizei count, const GLuint *indices);
+GLAPI void APIENTRY glGetUniformSubroutineuiv (GLenum shadertype, GLint location, GLuint *params);
+GLAPI void APIENTRY glGetProgramStageiv (GLuint program, GLenum shadertype, GLenum pname, GLint *values);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef GLint (APIENTRYP PFNGLGETSUBROUTINEUNIFORMLOCATIONPROC) (GLuint program, GLenum shadertype, const GLchar *name);
+typedef GLuint (APIENTRYP PFNGLGETSUBROUTINEINDEXPROC) (GLuint program, GLenum shadertype, const GLchar *name);
+typedef void (APIENTRYP PFNGLGETACTIVESUBROUTINEUNIFORMIVPROC) (GLuint program, GLenum shadertype, GLuint index, GLenum pname, GLint *values);
+typedef void (APIENTRYP PFNGLGETACTIVESUBROUTINEUNIFORMNAMEPROC) (GLuint program, GLenum shadertype, GLuint index, GLsizei bufsize, GLsizei *length, GLchar *name);
+typedef void (APIENTRYP PFNGLGETACTIVESUBROUTINENAMEPROC) (GLuint program, GLenum shadertype, GLuint index, GLsizei bufsize, GLsizei *length, GLchar *name);
+typedef void (APIENTRYP PFNGLUNIFORMSUBROUTINESUIVPROC) (GLenum shadertype, GLsizei count, const GLuint *indices);
+typedef void (APIENTRYP PFNGLGETUNIFORMSUBROUTINEUIVPROC) (GLenum shadertype, GLint location, GLuint *params);
+typedef void (APIENTRYP PFNGLGETPROGRAMSTAGEIVPROC) (GLuint program, GLenum shadertype, GLenum pname, GLint *values);
+#endif
+
+#ifndef GL_ARB_tessellation_shader
+#define GL_ARB_tessellation_shader 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glPatchParameteri (GLenum pname, GLint value);
+GLAPI void APIENTRY glPatchParameterfv (GLenum pname, const GLfloat *values);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLPATCHPARAMETERIPROC) (GLenum pname, GLint value);
+typedef void (APIENTRYP PFNGLPATCHPARAMETERFVPROC) (GLenum pname, const GLfloat *values);
+#endif
+
+#ifndef GL_ARB_texture_buffer_object_rgb32
+#define GL_ARB_texture_buffer_object_rgb32 1
+#endif
+
+#ifndef GL_ARB_transform_feedback2
+#define GL_ARB_transform_feedback2 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glBindTransformFeedback (GLenum target, GLuint id);
+GLAPI void APIENTRY glDeleteTransformFeedbacks (GLsizei n, const GLuint *ids);
+GLAPI void APIENTRY glGenTransformFeedbacks (GLsizei n, GLuint *ids);
+GLAPI GLboolean APIENTRY glIsTransformFeedback (GLuint id);
+GLAPI void APIENTRY glPauseTransformFeedback (void);
+GLAPI void APIENTRY glResumeTransformFeedback (void);
+GLAPI void APIENTRY glDrawTransformFeedback (GLenum mode, GLuint id);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLBINDTRANSFORMFEEDBACKPROC) (GLenum target, GLuint id);
+typedef void (APIENTRYP PFNGLDELETETRANSFORMFEEDBACKSPROC) (GLsizei n, const GLuint *ids);
+typedef void (APIENTRYP PFNGLGENTRANSFORMFEEDBACKSPROC) (GLsizei n, GLuint *ids);
+typedef GLboolean (APIENTRYP PFNGLISTRANSFORMFEEDBACKPROC) (GLuint id);
+typedef void (APIENTRYP PFNGLPAUSETRANSFORMFEEDBACKPROC) (void);
+typedef void (APIENTRYP PFNGLRESUMETRANSFORMFEEDBACKPROC) (void);
+typedef void (APIENTRYP PFNGLDRAWTRANSFORMFEEDBACKPROC) (GLenum mode, GLuint id);
+#endif
+
+#ifndef GL_ARB_transform_feedback3
+#define GL_ARB_transform_feedback3 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glDrawTransformFeedbackStream (GLenum mode, GLuint id, GLuint stream);
+GLAPI void APIENTRY glBeginQueryIndexed (GLenum target, GLuint index, GLuint id);
+GLAPI void APIENTRY glEndQueryIndexed (GLenum target, GLuint index);
+GLAPI void APIENTRY glGetQueryIndexediv (GLenum target, GLuint index, GLenum pname, GLint *params);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLDRAWTRANSFORMFEEDBACKSTREAMPROC) (GLenum mode, GLuint id, GLuint stream);
+typedef void (APIENTRYP PFNGLBEGINQUERYINDEXEDPROC) (GLenum target, GLuint index, GLuint id);
+typedef void (APIENTRYP PFNGLENDQUERYINDEXEDPROC) (GLenum target, GLuint index);
+typedef void (APIENTRYP PFNGLGETQUERYINDEXEDIVPROC) (GLenum target, GLuint index, GLenum pname, GLint *params);
+#endif
+
+#ifndef GL_ARB_ES2_compatibility
+#define GL_ARB_ES2_compatibility 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glReleaseShaderCompiler (void);
+GLAPI void APIENTRY glShaderBinary (GLsizei count, const GLuint *shaders, GLenum binaryformat, const GLvoid *binary, GLsizei length);
+GLAPI void APIENTRY glGetShaderPrecisionFormat (GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision);
+GLAPI void APIENTRY glDepthRangef (GLclampf n, GLclampf f);
+GLAPI void APIENTRY glClearDepthf (GLclampf d);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLRELEASESHADERCOMPILERPROC) (void);
+typedef void (APIENTRYP PFNGLSHADERBINARYPROC) (GLsizei count, const GLuint *shaders, GLenum binaryformat, const GLvoid *binary, GLsizei length);
+typedef void (APIENTRYP PFNGLGETSHADERPRECISIONFORMATPROC) (GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision);
+typedef void (APIENTRYP PFNGLDEPTHRANGEFPROC) (GLclampf n, GLclampf f);
+typedef void (APIENTRYP PFNGLCLEARDEPTHFPROC) (GLclampf d);
+#endif
+
+#ifndef GL_ARB_get_program_binary
+#define GL_ARB_get_program_binary 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glGetProgramBinary (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, GLvoid *binary);
+GLAPI void APIENTRY glProgramBinary (GLuint program, GLenum binaryFormat, const GLvoid *binary, GLsizei length);
+GLAPI void APIENTRY glProgramParameteri (GLuint program, GLenum pname, GLint value);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLGETPROGRAMBINARYPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, GLvoid *binary);
+typedef void (APIENTRYP PFNGLPROGRAMBINARYPROC) (GLuint program, GLenum binaryFormat, const GLvoid *binary, GLsizei length);
+typedef void (APIENTRYP PFNGLPROGRAMPARAMETERIPROC) (GLuint program, GLenum pname, GLint value);
+#endif
+
+#ifndef GL_ARB_separate_shader_objects
+#define GL_ARB_separate_shader_objects 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glUseProgramStages (GLuint pipeline, GLbitfield stages, GLuint program);
+GLAPI void APIENTRY glActiveShaderProgram (GLuint pipeline, GLuint program);
+GLAPI GLuint APIENTRY glCreateShaderProgramv (GLenum type, GLsizei count, const GLchar* *strings);
+GLAPI void APIENTRY glBindProgramPipeline (GLuint pipeline);
+GLAPI void APIENTRY glDeleteProgramPipelines (GLsizei n, const GLuint *pipelines);
+GLAPI void APIENTRY glGenProgramPipelines (GLsizei n, GLuint *pipelines);
+GLAPI GLboolean APIENTRY glIsProgramPipeline (GLuint pipeline);
+GLAPI void APIENTRY glGetProgramPipelineiv (GLuint pipeline, GLenum pname, GLint *params);
+GLAPI void APIENTRY glProgramUniform1i (GLuint program, GLint location, GLint v0);
+GLAPI void APIENTRY glProgramUniform1iv (GLuint program, GLint location, GLsizei count, const GLint *value);
+GLAPI void APIENTRY glProgramUniform1f (GLuint program, GLint location, GLfloat v0);
+GLAPI void APIENTRY glProgramUniform1fv (GLuint program, GLint location, GLsizei count, const GLfloat *value);
+GLAPI void APIENTRY glProgramUniform1d (GLuint program, GLint location, GLdouble v0);
+GLAPI void APIENTRY glProgramUniform1dv (GLuint program, GLint location, GLsizei count, const GLdouble *value);
+GLAPI void APIENTRY glProgramUniform1ui (GLuint program, GLint location, GLuint v0);
+GLAPI void APIENTRY glProgramUniform1uiv (GLuint program, GLint location, GLsizei count, const GLuint *value);
+GLAPI void APIENTRY glProgramUniform2i (GLuint program, GLint location, GLint v0, GLint v1);
+GLAPI void APIENTRY glProgramUniform2iv (GLuint program, GLint location, GLsizei count, const GLint *value);
+GLAPI void APIENTRY glProgramUniform2f (GLuint program, GLint location, GLfloat v0, GLfloat v1);
+GLAPI void APIENTRY glProgramUniform2fv (GLuint program, GLint location, GLsizei count, const GLfloat *value);
+GLAPI void APIENTRY glProgramUniform2d (GLuint program, GLint location, GLdouble v0, GLdouble v1);
+GLAPI void APIENTRY glProgramUniform2dv (GLuint program, GLint location, GLsizei count, const GLdouble *value);
+GLAPI void APIENTRY glProgramUniform2ui (GLuint program, GLint location, GLuint v0, GLuint v1);
+GLAPI void APIENTRY glProgramUniform2uiv (GLuint program, GLint location, GLsizei count, const GLuint *value);
+GLAPI void APIENTRY glProgramUniform3i (GLuint program, GLint location, GLint v0, GLint v1, GLint v2);
+GLAPI void APIENTRY glProgramUniform3iv (GLuint program, GLint location, GLsizei count, const GLint *value);
+GLAPI void APIENTRY glProgramUniform3f (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
+GLAPI void APIENTRY glProgramUniform3fv (GLuint program, GLint location, GLsizei count, const GLfloat *value);
+GLAPI void APIENTRY glProgramUniform3d (GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2);
+GLAPI void APIENTRY glProgramUniform3dv (GLuint program, GLint location, GLsizei count, const GLdouble *value);
+GLAPI void APIENTRY glProgramUniform3ui (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2);
+GLAPI void APIENTRY glProgramUniform3uiv (GLuint program, GLint location, GLsizei count, const GLuint *value);
+GLAPI void APIENTRY glProgramUniform4i (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
+GLAPI void APIENTRY glProgramUniform4iv (GLuint program, GLint location, GLsizei count, const GLint *value);
+GLAPI void APIENTRY glProgramUniform4f (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
+GLAPI void APIENTRY glProgramUniform4fv (GLuint program, GLint location, GLsizei count, const GLfloat *value);
+GLAPI void APIENTRY glProgramUniform4d (GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2, GLdouble v3);
+GLAPI void APIENTRY glProgramUniform4dv (GLuint program, GLint location, GLsizei count, const GLdouble *value);
+GLAPI void APIENTRY glProgramUniform4ui (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
+GLAPI void APIENTRY glProgramUniform4uiv (GLuint program, GLint location, GLsizei count, const GLuint *value);
+GLAPI void APIENTRY glProgramUniformMatrix2fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GLAPI void APIENTRY glProgramUniformMatrix3fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GLAPI void APIENTRY glProgramUniformMatrix4fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GLAPI void APIENTRY glProgramUniformMatrix2dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+GLAPI void APIENTRY glProgramUniformMatrix3dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+GLAPI void APIENTRY glProgramUniformMatrix4dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+GLAPI void APIENTRY glProgramUniformMatrix2x3fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GLAPI void APIENTRY glProgramUniformMatrix3x2fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GLAPI void APIENTRY glProgramUniformMatrix2x4fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GLAPI void APIENTRY glProgramUniformMatrix4x2fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GLAPI void APIENTRY glProgramUniformMatrix3x4fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GLAPI void APIENTRY glProgramUniformMatrix4x3fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GLAPI void APIENTRY glProgramUniformMatrix2x3dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+GLAPI void APIENTRY glProgramUniformMatrix3x2dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+GLAPI void APIENTRY glProgramUniformMatrix2x4dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+GLAPI void APIENTRY glProgramUniformMatrix4x2dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+GLAPI void APIENTRY glProgramUniformMatrix3x4dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+GLAPI void APIENTRY glProgramUniformMatrix4x3dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+GLAPI void APIENTRY glValidateProgramPipeline (GLuint pipeline);
+GLAPI void APIENTRY glGetProgramPipelineInfoLog (GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLUSEPROGRAMSTAGESPROC) (GLuint pipeline, GLbitfield stages, GLuint program);
+typedef void (APIENTRYP PFNGLACTIVESHADERPROGRAMPROC) (GLuint pipeline, GLuint program);
+typedef GLuint (APIENTRYP PFNGLCREATESHADERPROGRAMVPROC) (GLenum type, GLsizei count, const GLchar* *strings);
+typedef void (APIENTRYP PFNGLBINDPROGRAMPIPELINEPROC) (GLuint pipeline);
+typedef void (APIENTRYP PFNGLDELETEPROGRAMPIPELINESPROC) (GLsizei n, const GLuint *pipelines);
+typedef void (APIENTRYP PFNGLGENPROGRAMPIPELINESPROC) (GLsizei n, GLuint *pipelines);
+typedef GLboolean (APIENTRYP PFNGLISPROGRAMPIPELINEPROC) (GLuint pipeline);
+typedef void (APIENTRYP PFNGLGETPROGRAMPIPELINEIVPROC) (GLuint pipeline, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1IPROC) (GLuint program, GLint location, GLint v0);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1IVPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1FPROC) (GLuint program, GLint location, GLfloat v0);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1FVPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1DPROC) (GLuint program, GLint location, GLdouble v0);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1DVPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UIPROC) (GLuint program, GLint location, GLuint v0);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UIVPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2IPROC) (GLuint program, GLint location, GLint v0, GLint v1);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2IVPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2FPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2FVPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2DPROC) (GLuint program, GLint location, GLdouble v0, GLdouble v1);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2DVPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UIPROC) (GLuint program, GLint location, GLuint v0, GLuint v1);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UIVPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3IPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3IVPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3FPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3FVPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3DPROC) (GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3DVPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UIPROC) (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UIVPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4IPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4IVPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4FPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4FVPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4DPROC) (GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2, GLdouble v3);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4DVPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UIPROC) (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UIVPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X3FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X2FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X4FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X2FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X4FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X3FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X3DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X2DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X4DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X2DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X4DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X3DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+typedef void (APIENTRYP PFNGLVALIDATEPROGRAMPIPELINEPROC) (GLuint pipeline);
+typedef void (APIENTRYP PFNGLGETPROGRAMPIPELINEINFOLOGPROC) (GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
+#endif
+
+#ifndef GL_ARB_vertex_attrib_64bit
+#define GL_ARB_vertex_attrib_64bit 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glVertexAttribL1d (GLuint index, GLdouble x);
+GLAPI void APIENTRY glVertexAttribL2d (GLuint index, GLdouble x, GLdouble y);
+GLAPI void APIENTRY glVertexAttribL3d (GLuint index, GLdouble x, GLdouble y, GLdouble z);
+GLAPI void APIENTRY glVertexAttribL4d (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
+GLAPI void APIENTRY glVertexAttribL1dv (GLuint index, const GLdouble *v);
+GLAPI void APIENTRY glVertexAttribL2dv (GLuint index, const GLdouble *v);
+GLAPI void APIENTRY glVertexAttribL3dv (GLuint index, const GLdouble *v);
+GLAPI void APIENTRY glVertexAttribL4dv (GLuint index, const GLdouble *v);
+GLAPI void APIENTRY glVertexAttribLPointer (GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
+GLAPI void APIENTRY glGetVertexAttribLdv (GLuint index, GLenum pname, GLdouble *params);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLVERTEXATTRIBL1DPROC) (GLuint index, GLdouble x);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBL2DPROC) (GLuint index, GLdouble x, GLdouble y);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBL3DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBL4DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBL1DVPROC) (GLuint index, const GLdouble *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBL2DVPROC) (GLuint index, const GLdouble *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBL3DVPROC) (GLuint index, const GLdouble *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBL4DVPROC) (GLuint index, const GLdouble *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBLPOINTERPROC) (GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBLDVPROC) (GLuint index, GLenum pname, GLdouble *params);
+#endif
+
+#ifndef GL_ARB_viewport_array
+#define GL_ARB_viewport_array 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glViewportArrayv (GLuint first, GLsizei count, const GLfloat *v);
+GLAPI void APIENTRY glViewportIndexedf (GLuint index, GLfloat x, GLfloat y, GLfloat w, GLfloat h);
+GLAPI void APIENTRY glViewportIndexedfv (GLuint index, const GLfloat *v);
+GLAPI void APIENTRY glScissorArrayv (GLuint first, GLsizei count, const GLint *v);
+GLAPI void APIENTRY glScissorIndexed (GLuint index, GLint left, GLint bottom, GLsizei width, GLsizei height);
+GLAPI void APIENTRY glScissorIndexedv (GLuint index, const GLint *v);
+GLAPI void APIENTRY glDepthRangeArrayv (GLuint first, GLsizei count, const GLclampd *v);
+GLAPI void APIENTRY glDepthRangeIndexed (GLuint index, GLclampd n, GLclampd f);
+GLAPI void APIENTRY glGetFloati_v (GLenum target, GLuint index, GLfloat *data);
+GLAPI void APIENTRY glGetDoublei_v (GLenum target, GLuint index, GLdouble *data);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLVIEWPORTARRAYVPROC) (GLuint first, GLsizei count, const GLfloat *v);
+typedef void (APIENTRYP PFNGLVIEWPORTINDEXEDFPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat w, GLfloat h);
+typedef void (APIENTRYP PFNGLVIEWPORTINDEXEDFVPROC) (GLuint index, const GLfloat *v);
+typedef void (APIENTRYP PFNGLSCISSORARRAYVPROC) (GLuint first, GLsizei count, const GLint *v);
+typedef void (APIENTRYP PFNGLSCISSORINDEXEDPROC) (GLuint index, GLint left, GLint bottom, GLsizei width, GLsizei height);
+typedef void (APIENTRYP PFNGLSCISSORINDEXEDVPROC) (GLuint index, const GLint *v);
+typedef void (APIENTRYP PFNGLDEPTHRANGEARRAYVPROC) (GLuint first, GLsizei count, const GLclampd *v);
+typedef void (APIENTRYP PFNGLDEPTHRANGEINDEXEDPROC) (GLuint index, GLclampd n, GLclampd f);
+typedef void (APIENTRYP PFNGLGETFLOATI_VPROC) (GLenum target, GLuint index, GLfloat *data);
+typedef void (APIENTRYP PFNGLGETDOUBLEI_VPROC) (GLenum target, GLuint index, GLdouble *data);
+#endif
+
+#ifndef GL_ARB_cl_event
+#define GL_ARB_cl_event 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI GLsync APIENTRY glCreateSyncFromCLeventARB (struct _cl_context * context, struct _cl_event * event, GLbitfield flags);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef GLsync (APIENTRYP PFNGLCREATESYNCFROMCLEVENTARBPROC) (struct _cl_context * context, struct _cl_event * event, GLbitfield flags);
+#endif
+
+#ifndef GL_ARB_debug_output
+#define GL_ARB_debug_output 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glDebugMessageControlARB (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled);
+GLAPI void APIENTRY glDebugMessageInsertARB (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf);
+GLAPI void APIENTRY glDebugMessageCallbackARB (GLDEBUGPROCARB callback, const GLvoid *userParam);
+GLAPI GLuint APIENTRY glGetDebugMessageLogARB (GLuint count, GLsizei bufsize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLDEBUGMESSAGECONTROLARBPROC) (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled);
+typedef void (APIENTRYP PFNGLDEBUGMESSAGEINSERTARBPROC) (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf);
+typedef void (APIENTRYP PFNGLDEBUGMESSAGECALLBACKARBPROC) (GLDEBUGPROCARB callback, const GLvoid *userParam);
+typedef GLuint (APIENTRYP PFNGLGETDEBUGMESSAGELOGARBPROC) (GLuint count, GLsizei bufsize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog);
+#endif
+
+#ifndef GL_ARB_robustness
+#define GL_ARB_robustness 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI GLenum APIENTRY glGetGraphicsResetStatusARB (void);
+GLAPI void APIENTRY glGetnMapdvARB (GLenum target, GLenum query, GLsizei bufSize, GLdouble *v);
+GLAPI void APIENTRY glGetnMapfvARB (GLenum target, GLenum query, GLsizei bufSize, GLfloat *v);
+GLAPI void APIENTRY glGetnMapivARB (GLenum target, GLenum query, GLsizei bufSize, GLint *v);
+GLAPI void APIENTRY glGetnPixelMapfvARB (GLenum map, GLsizei bufSize, GLfloat *values);
+GLAPI void APIENTRY glGetnPixelMapuivARB (GLenum map, GLsizei bufSize, GLuint *values);
+GLAPI void APIENTRY glGetnPixelMapusvARB (GLenum map, GLsizei bufSize, GLushort *values);
+GLAPI void APIENTRY glGetnPolygonStippleARB (GLsizei bufSize, GLubyte *pattern);
+GLAPI void APIENTRY glGetnColorTableARB (GLenum target, GLenum format, GLenum type, GLsizei bufSize, GLvoid *table);
+GLAPI void APIENTRY glGetnConvolutionFilterARB (GLenum target, GLenum format, GLenum type, GLsizei bufSize, GLvoid *image);
+GLAPI void APIENTRY glGetnSeparableFilterARB (GLenum target, GLenum format, GLenum type, GLsizei rowBufSize, GLvoid *row, GLsizei columnBufSize, GLvoid *column, GLvoid *span);
+GLAPI void APIENTRY glGetnHistogramARB (GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, GLvoid *values);
+GLAPI void APIENTRY glGetnMinmaxARB (GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, GLvoid *values);
+GLAPI void APIENTRY glGetnTexImageARB (GLenum target, GLint level, GLenum format, GLenum type, GLsizei bufSize, GLvoid *img);
+GLAPI void APIENTRY glReadnPixelsARB (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, GLvoid *data);
+GLAPI void APIENTRY glGetnCompressedTexImageARB (GLenum target, GLint lod, GLsizei bufSize, GLvoid *img);
+GLAPI void APIENTRY glGetnUniformfvARB (GLuint program, GLint location, GLsizei bufSize, GLfloat *params);
+GLAPI void APIENTRY glGetnUniformivARB (GLuint program, GLint location, GLsizei bufSize, GLint *params);
+GLAPI void APIENTRY glGetnUniformuivARB (GLuint program, GLint location, GLsizei bufSize, GLuint *params);
+GLAPI void APIENTRY glGetnUniformdvARB (GLuint program, GLint location, GLsizei bufSize, GLdouble *params);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef GLenum (APIENTRYP PFNGLGETGRAPHICSRESETSTATUSARBPROC) (void);
+typedef void (APIENTRYP PFNGLGETNMAPDVARBPROC) (GLenum target, GLenum query, GLsizei bufSize, GLdouble *v);
+typedef void (APIENTRYP PFNGLGETNMAPFVARBPROC) (GLenum target, GLenum query, GLsizei bufSize, GLfloat *v);
+typedef void (APIENTRYP PFNGLGETNMAPIVARBPROC) (GLenum target, GLenum query, GLsizei bufSize, GLint *v);
+typedef void (APIENTRYP PFNGLGETNPIXELMAPFVARBPROC) (GLenum map, GLsizei bufSize, GLfloat *values);
+typedef void (APIENTRYP PFNGLGETNPIXELMAPUIVARBPROC) (GLenum map, GLsizei bufSize, GLuint *values);
+typedef void (APIENTRYP PFNGLGETNPIXELMAPUSVARBPROC) (GLenum map, GLsizei bufSize, GLushort *values);
+typedef void (APIENTRYP PFNGLGETNPOLYGONSTIPPLEARBPROC) (GLsizei bufSize, GLubyte *pattern);
+typedef void (APIENTRYP PFNGLGETNCOLORTABLEARBPROC) (GLenum target, GLenum format, GLenum type, GLsizei bufSize, GLvoid *table);
+typedef void (APIENTRYP PFNGLGETNCONVOLUTIONFILTERARBPROC) (GLenum target, GLenum format, GLenum type, GLsizei bufSize, GLvoid *image);
+typedef void (APIENTRYP PFNGLGETNSEPARABLEFILTERARBPROC) (GLenum target, GLenum format, GLenum type, GLsizei rowBufSize, GLvoid *row, GLsizei columnBufSize, GLvoid *column, GLvoid *span);
+typedef void (APIENTRYP PFNGLGETNHISTOGRAMARBPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, GLvoid *values);
+typedef void (APIENTRYP PFNGLGETNMINMAXARBPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, GLvoid *values);
+typedef void (APIENTRYP PFNGLGETNTEXIMAGEARBPROC) (GLenum target, GLint level, GLenum format, GLenum type, GLsizei bufSize, GLvoid *img);
+typedef void (APIENTRYP PFNGLREADNPIXELSARBPROC) (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, GLvoid *data);
+typedef void (APIENTRYP PFNGLGETNCOMPRESSEDTEXIMAGEARBPROC) (GLenum target, GLint lod, GLsizei bufSize, GLvoid *img);
+typedef void (APIENTRYP PFNGLGETNUNIFORMFVARBPROC) (GLuint program, GLint location, GLsizei bufSize, GLfloat *params);
+typedef void (APIENTRYP PFNGLGETNUNIFORMIVARBPROC) (GLuint program, GLint location, GLsizei bufSize, GLint *params);
+typedef void (APIENTRYP PFNGLGETNUNIFORMUIVARBPROC) (GLuint program, GLint location, GLsizei bufSize, GLuint *params);
+typedef void (APIENTRYP PFNGLGETNUNIFORMDVARBPROC) (GLuint program, GLint location, GLsizei bufSize, GLdouble *params);
+#endif
+
+#ifndef GL_ARB_shader_stencil_export
+#define GL_ARB_shader_stencil_export 1
+#endif
+
+#ifndef GL_EXT_abgr
+#define GL_EXT_abgr 1
+#endif
+
+#ifndef GL_EXT_blend_color
+#define GL_EXT_blend_color 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glBlendColorEXT (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLBLENDCOLOREXTPROC) (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
+#endif
+
+#ifndef GL_EXT_polygon_offset
+#define GL_EXT_polygon_offset 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glPolygonOffsetEXT (GLfloat factor, GLfloat bias);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLPOLYGONOFFSETEXTPROC) (GLfloat factor, GLfloat bias);
+#endif
+
+#ifndef GL_EXT_texture
+#define GL_EXT_texture 1
+#endif
+
+#ifndef GL_EXT_texture3D
+#define GL_EXT_texture3D 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glTexImage3DEXT (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels);
+GLAPI void APIENTRY glTexSubImage3DEXT (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLTEXIMAGE3DEXTPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels);
+typedef void (APIENTRYP PFNGLTEXSUBIMAGE3DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels);
+#endif
+
+#ifndef GL_SGIS_texture_filter4
+#define GL_SGIS_texture_filter4 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glGetTexFilterFuncSGIS (GLenum target, GLenum filter, GLfloat *weights);
+GLAPI void APIENTRY glTexFilterFuncSGIS (GLenum target, GLenum filter, GLsizei n, const GLfloat *weights);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLGETTEXFILTERFUNCSGISPROC) (GLenum target, GLenum filter, GLfloat *weights);
+typedef void (APIENTRYP PFNGLTEXFILTERFUNCSGISPROC) (GLenum target, GLenum filter, GLsizei n, const GLfloat *weights);
+#endif
+
+#ifndef GL_EXT_subtexture
+#define GL_EXT_subtexture 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glTexSubImage1DEXT (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels);
+GLAPI void APIENTRY glTexSubImage2DEXT (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLTEXSUBIMAGE1DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels);
+typedef void (APIENTRYP PFNGLTEXSUBIMAGE2DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels);
+#endif
+
+#ifndef GL_EXT_copy_texture
+#define GL_EXT_copy_texture 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glCopyTexImage1DEXT (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border);
+GLAPI void APIENTRY glCopyTexImage2DEXT (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
+GLAPI void APIENTRY glCopyTexSubImage1DEXT (GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);
+GLAPI void APIENTRY glCopyTexSubImage2DEXT (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
+GLAPI void APIENTRY glCopyTexSubImage3DEXT (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLCOPYTEXIMAGE1DEXTPROC) (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border);
+typedef void (APIENTRYP PFNGLCOPYTEXIMAGE2DEXTPROC) (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
+typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE1DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);
+typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE2DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
+typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE3DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
+#endif
+
+#ifndef GL_EXT_histogram
+#define GL_EXT_histogram 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glGetHistogramEXT (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values);
+GLAPI void APIENTRY glGetHistogramParameterfvEXT (GLenum target, GLenum pname, GLfloat *params);
+GLAPI void APIENTRY glGetHistogramParameterivEXT (GLenum target, GLenum pname, GLint *params);
+GLAPI void APIENTRY glGetMinmaxEXT (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values);
+GLAPI void APIENTRY glGetMinmaxParameterfvEXT (GLenum target, GLenum pname, GLfloat *params);
+GLAPI void APIENTRY glGetMinmaxParameterivEXT (GLenum target, GLenum pname, GLint *params);
+GLAPI void APIENTRY glHistogramEXT (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink);
+GLAPI void APIENTRY glMinmaxEXT (GLenum target, GLenum internalformat, GLboolean sink);
+GLAPI void APIENTRY glResetHistogramEXT (GLenum target);
+GLAPI void APIENTRY glResetMinmaxEXT (GLenum target);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLGETHISTOGRAMEXTPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values);
+typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params);
+typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLGETMINMAXEXTPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values);
+typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params);
+typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLHISTOGRAMEXTPROC) (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink);
+typedef void (APIENTRYP PFNGLMINMAXEXTPROC) (GLenum target, GLenum internalformat, GLboolean sink);
+typedef void (APIENTRYP PFNGLRESETHISTOGRAMEXTPROC) (GLenum target);
+typedef void (APIENTRYP PFNGLRESETMINMAXEXTPROC) (GLenum target);
+#endif
+
+#ifndef GL_EXT_convolution
+#define GL_EXT_convolution 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glConvolutionFilter1DEXT (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *image);
+GLAPI void APIENTRY glConvolutionFilter2DEXT (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image);
+GLAPI void APIENTRY glConvolutionParameterfEXT (GLenum target, GLenum pname, GLfloat params);
+GLAPI void APIENTRY glConvolutionParameterfvEXT (GLenum target, GLenum pname, const GLfloat *params);
+GLAPI void APIENTRY glConvolutionParameteriEXT (GLenum target, GLenum pname, GLint params);
+GLAPI void APIENTRY glConvolutionParameterivEXT (GLenum target, GLenum pname, const GLint *params);
+GLAPI void APIENTRY glCopyConvolutionFilter1DEXT (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
+GLAPI void APIENTRY glCopyConvolutionFilter2DEXT (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height);
+GLAPI void APIENTRY glGetConvolutionFilterEXT (GLenum target, GLenum format, GLenum type, GLvoid *image);
+GLAPI void APIENTRY glGetConvolutionParameterfvEXT (GLenum target, GLenum pname, GLfloat *params);
+GLAPI void APIENTRY glGetConvolutionParameterivEXT (GLenum target, GLenum pname, GLint *params);
+GLAPI void APIENTRY glGetSeparableFilterEXT (GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span);
+GLAPI void APIENTRY glSeparableFilter2DEXT (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER1DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *image);
+typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image);
+typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFEXTPROC) (GLenum target, GLenum pname, GLfloat params);
+typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFVEXTPROC) (GLenum target, GLenum pname, const GLfloat *params);
+typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIEXTPROC) (GLenum target, GLenum pname, GLint params);
+typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIVEXTPROC) (GLenum target, GLenum pname, const GLint *params);
+typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER1DEXTPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
+typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height);
+typedef void (APIENTRYP PFNGLGETCONVOLUTIONFILTEREXTPROC) (GLenum target, GLenum format, GLenum type, GLvoid *image);
+typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params);
+typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLGETSEPARABLEFILTEREXTPROC) (GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span);
+typedef void (APIENTRYP PFNGLSEPARABLEFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column);
+#endif
+
+#ifndef GL_SGI_color_matrix
+#define GL_SGI_color_matrix 1
+#endif
+
+#ifndef GL_SGI_color_table
+#define GL_SGI_color_table 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glColorTableSGI (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table);
+GLAPI void APIENTRY glColorTableParameterfvSGI (GLenum target, GLenum pname, const GLfloat *params);
+GLAPI void APIENTRY glColorTableParameterivSGI (GLenum target, GLenum pname, const GLint *params);
+GLAPI void APIENTRY glCopyColorTableSGI (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
+GLAPI void APIENTRY glGetColorTableSGI (GLenum target, GLenum format, GLenum type, GLvoid *table);
+GLAPI void APIENTRY glGetColorTableParameterfvSGI (GLenum target, GLenum pname, GLfloat *params);
+GLAPI void APIENTRY glGetColorTableParameterivSGI (GLenum target, GLenum pname, GLint *params);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLCOLORTABLESGIPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table);
+typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERFVSGIPROC) (GLenum target, GLenum pname, const GLfloat *params);
+typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERIVSGIPROC) (GLenum target, GLenum pname, const GLint *params);
+typedef void (APIENTRYP PFNGLCOPYCOLORTABLESGIPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
+typedef void (APIENTRYP PFNGLGETCOLORTABLESGIPROC) (GLenum target, GLenum format, GLenum type, GLvoid *table);
+typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERFVSGIPROC) (GLenum target, GLenum pname, GLfloat *params);
+typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERIVSGIPROC) (GLenum target, GLenum pname, GLint *params);
+#endif
+
+#ifndef GL_SGIX_pixel_texture
+#define GL_SGIX_pixel_texture 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glPixelTexGenSGIX (GLenum mode);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLPIXELTEXGENSGIXPROC) (GLenum mode);
+#endif
+
+#ifndef GL_SGIS_pixel_texture
+#define GL_SGIS_pixel_texture 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glPixelTexGenParameteriSGIS (GLenum pname, GLint param);
+GLAPI void APIENTRY glPixelTexGenParameterivSGIS (GLenum pname, const GLint *params);
+GLAPI void APIENTRY glPixelTexGenParameterfSGIS (GLenum pname, GLfloat param);
+GLAPI void APIENTRY glPixelTexGenParameterfvSGIS (GLenum pname, const GLfloat *params);
+GLAPI void APIENTRY glGetPixelTexGenParameterivSGIS (GLenum pname, GLint *params);
+GLAPI void APIENTRY glGetPixelTexGenParameterfvSGIS (GLenum pname, GLfloat *params);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERISGISPROC) (GLenum pname, GLint param);
+typedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERIVSGISPROC) (GLenum pname, const GLint *params);
+typedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERFSGISPROC) (GLenum pname, GLfloat param);
+typedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERFVSGISPROC) (GLenum pname, const GLfloat *params);
+typedef void (APIENTRYP PFNGLGETPIXELTEXGENPARAMETERIVSGISPROC) (GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLGETPIXELTEXGENPARAMETERFVSGISPROC) (GLenum pname, GLfloat *params);
+#endif
+
+#ifndef GL_SGIS_texture4D
+#define GL_SGIS_texture4D 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glTexImage4DSGIS (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLsizei size4d, GLint border, GLenum format, GLenum type, const GLvoid *pixels);
+GLAPI void APIENTRY glTexSubImage4DSGIS (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint woffset, GLsizei width, GLsizei height, GLsizei depth, GLsizei size4d, GLenum format, GLenum type, const GLvoid *pixels);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLTEXIMAGE4DSGISPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLsizei size4d, GLint border, GLenum format, GLenum type, const GLvoid *pixels);
+typedef void (APIENTRYP PFNGLTEXSUBIMAGE4DSGISPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint woffset, GLsizei width, GLsizei height, GLsizei depth, GLsizei size4d, GLenum format, GLenum type, const GLvoid *pixels);
+#endif
+
+#ifndef GL_SGI_texture_color_table
+#define GL_SGI_texture_color_table 1
+#endif
+
+#ifndef GL_EXT_cmyka
+#define GL_EXT_cmyka 1
+#endif
+
+#ifndef GL_EXT_texture_object
+#define GL_EXT_texture_object 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI GLboolean APIENTRY glAreTexturesResidentEXT (GLsizei n, const GLuint *textures, GLboolean *residences);
+GLAPI void APIENTRY glBindTextureEXT (GLenum target, GLuint texture);
+GLAPI void APIENTRY glDeleteTexturesEXT (GLsizei n, const GLuint *textures);
+GLAPI void APIENTRY glGenTexturesEXT (GLsizei n, GLuint *textures);
+GLAPI GLboolean APIENTRY glIsTextureEXT (GLuint texture);
+GLAPI void APIENTRY glPrioritizeTexturesEXT (GLsizei n, const GLuint *textures, const GLclampf *priorities);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef GLboolean (APIENTRYP PFNGLARETEXTURESRESIDENTEXTPROC) (GLsizei n, const GLuint *textures, GLboolean *residences);
+typedef void (APIENTRYP PFNGLBINDTEXTUREEXTPROC) (GLenum target, GLuint texture);
+typedef void (APIENTRYP PFNGLDELETETEXTURESEXTPROC) (GLsizei n, const GLuint *textures);
+typedef void (APIENTRYP PFNGLGENTEXTURESEXTPROC) (GLsizei n, GLuint *textures);
+typedef GLboolean (APIENTRYP PFNGLISTEXTUREEXTPROC) (GLuint texture);
+typedef void (APIENTRYP PFNGLPRIORITIZETEXTURESEXTPROC) (GLsizei n, const GLuint *textures, const GLclampf *priorities);
+#endif
+
+#ifndef GL_SGIS_detail_texture
+#define GL_SGIS_detail_texture 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glDetailTexFuncSGIS (GLenum target, GLsizei n, const GLfloat *points);
+GLAPI void APIENTRY glGetDetailTexFuncSGIS (GLenum target, GLfloat *points);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLDETAILTEXFUNCSGISPROC) (GLenum target, GLsizei n, const GLfloat *points);
+typedef void (APIENTRYP PFNGLGETDETAILTEXFUNCSGISPROC) (GLenum target, GLfloat *points);
+#endif
+
+#ifndef GL_SGIS_sharpen_texture
+#define GL_SGIS_sharpen_texture 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glSharpenTexFuncSGIS (GLenum target, GLsizei n, const GLfloat *points);
+GLAPI void APIENTRY glGetSharpenTexFuncSGIS (GLenum target, GLfloat *points);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLSHARPENTEXFUNCSGISPROC) (GLenum target, GLsizei n, const GLfloat *points);
+typedef void (APIENTRYP PFNGLGETSHARPENTEXFUNCSGISPROC) (GLenum target, GLfloat *points);
+#endif
+
+#ifndef GL_EXT_packed_pixels
+#define GL_EXT_packed_pixels 1
+#endif
+
+#ifndef GL_SGIS_texture_lod
+#define GL_SGIS_texture_lod 1
+#endif
+
+#ifndef GL_SGIS_multisample
+#define GL_SGIS_multisample 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glSampleMaskSGIS (GLclampf value, GLboolean invert);
+GLAPI void APIENTRY glSamplePatternSGIS (GLenum pattern);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLSAMPLEMASKSGISPROC) (GLclampf value, GLboolean invert);
+typedef void (APIENTRYP PFNGLSAMPLEPATTERNSGISPROC) (GLenum pattern);
+#endif
+
+#ifndef GL_EXT_rescale_normal
+#define GL_EXT_rescale_normal 1
+#endif
+
+#ifndef GL_EXT_vertex_array
+#define GL_EXT_vertex_array 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glArrayElementEXT (GLint i);
+GLAPI void APIENTRY glColorPointerEXT (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer);
+GLAPI void APIENTRY glDrawArraysEXT (GLenum mode, GLint first, GLsizei count);
+GLAPI void APIENTRY glEdgeFlagPointerEXT (GLsizei stride, GLsizei count, const GLboolean *pointer);
+GLAPI void APIENTRY glGetPointervEXT (GLenum pname, GLvoid* *params);
+GLAPI void APIENTRY glIndexPointerEXT (GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer);
+GLAPI void APIENTRY glNormalPointerEXT (GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer);
+GLAPI void APIENTRY glTexCoordPointerEXT (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer);
+GLAPI void APIENTRY glVertexPointerEXT (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLARRAYELEMENTEXTPROC) (GLint i);
+typedef void (APIENTRYP PFNGLCOLORPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer);
+typedef void (APIENTRYP PFNGLDRAWARRAYSEXTPROC) (GLenum mode, GLint first, GLsizei count);
+typedef void (APIENTRYP PFNGLEDGEFLAGPOINTEREXTPROC) (GLsizei stride, GLsizei count, const GLboolean *pointer);
+typedef void (APIENTRYP PFNGLGETPOINTERVEXTPROC) (GLenum pname, GLvoid* *params);
+typedef void (APIENTRYP PFNGLINDEXPOINTEREXTPROC) (GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer);
+typedef void (APIENTRYP PFNGLNORMALPOINTEREXTPROC) (GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer);
+typedef void (APIENTRYP PFNGLTEXCOORDPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer);
+typedef void (APIENTRYP PFNGLVERTEXPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer);
+#endif
+
+#ifndef GL_EXT_misc_attribute
+#define GL_EXT_misc_attribute 1
+#endif
+
+#ifndef GL_SGIS_generate_mipmap
+#define GL_SGIS_generate_mipmap 1
+#endif
+
+#ifndef GL_SGIX_clipmap
+#define GL_SGIX_clipmap 1
+#endif
+
+#ifndef GL_SGIX_shadow
+#define GL_SGIX_shadow 1
+#endif
+
+#ifndef GL_SGIS_texture_edge_clamp
+#define GL_SGIS_texture_edge_clamp 1
+#endif
+
+#ifndef GL_SGIS_texture_border_clamp
+#define GL_SGIS_texture_border_clamp 1
+#endif
+
+#ifndef GL_EXT_blend_minmax
+#define GL_EXT_blend_minmax 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glBlendEquationEXT (GLenum mode);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLBLENDEQUATIONEXTPROC) (GLenum mode);
+#endif
+
+#ifndef GL_EXT_blend_subtract
+#define GL_EXT_blend_subtract 1
+#endif
+
+#ifndef GL_EXT_blend_logic_op
+#define GL_EXT_blend_logic_op 1
+#endif
+
+#ifndef GL_SGIX_interlace
+#define GL_SGIX_interlace 1
+#endif
+
+#ifndef GL_SGIX_pixel_tiles
+#define GL_SGIX_pixel_tiles 1
+#endif
+
+#ifndef GL_SGIX_texture_select
+#define GL_SGIX_texture_select 1
+#endif
+
+#ifndef GL_SGIX_sprite
+#define GL_SGIX_sprite 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glSpriteParameterfSGIX (GLenum pname, GLfloat param);
+GLAPI void APIENTRY glSpriteParameterfvSGIX (GLenum pname, const GLfloat *params);
+GLAPI void APIENTRY glSpriteParameteriSGIX (GLenum pname, GLint param);
+GLAPI void APIENTRY glSpriteParameterivSGIX (GLenum pname, const GLint *params);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLSPRITEPARAMETERFSGIXPROC) (GLenum pname, GLfloat param);
+typedef void (APIENTRYP PFNGLSPRITEPARAMETERFVSGIXPROC) (GLenum pname, const GLfloat *params);
+typedef void (APIENTRYP PFNGLSPRITEPARAMETERISGIXPROC) (GLenum pname, GLint param);
+typedef void (APIENTRYP PFNGLSPRITEPARAMETERIVSGIXPROC) (GLenum pname, const GLint *params);
+#endif
+
+#ifndef GL_SGIX_texture_multi_buffer
+#define GL_SGIX_texture_multi_buffer 1
+#endif
+
+#ifndef GL_EXT_point_parameters
+#define GL_EXT_point_parameters 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glPointParameterfEXT (GLenum pname, GLfloat param);
+GLAPI void APIENTRY glPointParameterfvEXT (GLenum pname, const GLfloat *params);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLPOINTPARAMETERFEXTPROC) (GLenum pname, GLfloat param);
+typedef void (APIENTRYP PFNGLPOINTPARAMETERFVEXTPROC) (GLenum pname, const GLfloat *params);
+#endif
+
+#ifndef GL_SGIS_point_parameters
+#define GL_SGIS_point_parameters 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glPointParameterfSGIS (GLenum pname, GLfloat param);
+GLAPI void APIENTRY glPointParameterfvSGIS (GLenum pname, const GLfloat *params);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLPOINTPARAMETERFSGISPROC) (GLenum pname, GLfloat param);
+typedef void (APIENTRYP PFNGLPOINTPARAMETERFVSGISPROC) (GLenum pname, const GLfloat *params);
+#endif
+
+#ifndef GL_SGIX_instruments
+#define GL_SGIX_instruments 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI GLint APIENTRY glGetInstrumentsSGIX (void);
+GLAPI void APIENTRY glInstrumentsBufferSGIX (GLsizei size, GLint *buffer);
+GLAPI GLint APIENTRY glPollInstrumentsSGIX (GLint *marker_p);
+GLAPI void APIENTRY glReadInstrumentsSGIX (GLint marker);
+GLAPI void APIENTRY glStartInstrumentsSGIX (void);
+GLAPI void APIENTRY glStopInstrumentsSGIX (GLint marker);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef GLint (APIENTRYP PFNGLGETINSTRUMENTSSGIXPROC) (void);
+typedef void (APIENTRYP PFNGLINSTRUMENTSBUFFERSGIXPROC) (GLsizei size, GLint *buffer);
+typedef GLint (APIENTRYP PFNGLPOLLINSTRUMENTSSGIXPROC) (GLint *marker_p);
+typedef void (APIENTRYP PFNGLREADINSTRUMENTSSGIXPROC) (GLint marker);
+typedef void (APIENTRYP PFNGLSTARTINSTRUMENTSSGIXPROC) (void);
+typedef void (APIENTRYP PFNGLSTOPINSTRUMENTSSGIXPROC) (GLint marker);
+#endif
+
+#ifndef GL_SGIX_texture_scale_bias
+#define GL_SGIX_texture_scale_bias 1
+#endif
+
+#ifndef GL_SGIX_framezoom
+#define GL_SGIX_framezoom 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glFrameZoomSGIX (GLint factor);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLFRAMEZOOMSGIXPROC) (GLint factor);
+#endif
+
+#ifndef GL_SGIX_tag_sample_buffer
+#define GL_SGIX_tag_sample_buffer 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glTagSampleBufferSGIX (void);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLTAGSAMPLEBUFFERSGIXPROC) (void);
+#endif
+
+#ifndef GL_SGIX_polynomial_ffd
+#define GL_SGIX_polynomial_ffd 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glDeformationMap3dSGIX (GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, GLdouble w1, GLdouble w2, GLint wstride, GLint worder, const GLdouble *points);
+GLAPI void APIENTRY glDeformationMap3fSGIX (GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, GLfloat w1, GLfloat w2, GLint wstride, GLint worder, const GLfloat *points);
+GLAPI void APIENTRY glDeformSGIX (GLbitfield mask);
+GLAPI void APIENTRY glLoadIdentityDeformationMapSGIX (GLbitfield mask);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLDEFORMATIONMAP3DSGIXPROC) (GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, GLdouble w1, GLdouble w2, GLint wstride, GLint worder, const GLdouble *points);
+typedef void (APIENTRYP PFNGLDEFORMATIONMAP3FSGIXPROC) (GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, GLfloat w1, GLfloat w2, GLint wstride, GLint worder, const GLfloat *points);
+typedef void (APIENTRYP PFNGLDEFORMSGIXPROC) (GLbitfield mask);
+typedef void (APIENTRYP PFNGLLOADIDENTITYDEFORMATIONMAPSGIXPROC) (GLbitfield mask);
+#endif
+
+#ifndef GL_SGIX_reference_plane
+#define GL_SGIX_reference_plane 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glReferencePlaneSGIX (const GLdouble *equation);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLREFERENCEPLANESGIXPROC) (const GLdouble *equation);
+#endif
+
+#ifndef GL_SGIX_flush_raster
+#define GL_SGIX_flush_raster 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glFlushRasterSGIX (void);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLFLUSHRASTERSGIXPROC) (void);
+#endif
+
+#ifndef GL_SGIX_depth_texture
+#define GL_SGIX_depth_texture 1
+#endif
+
+#ifndef GL_SGIS_fog_function
+#define GL_SGIS_fog_function 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glFogFuncSGIS (GLsizei n, const GLfloat *points);
+GLAPI void APIENTRY glGetFogFuncSGIS (GLfloat *points);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLFOGFUNCSGISPROC) (GLsizei n, const GLfloat *points);
+typedef void (APIENTRYP PFNGLGETFOGFUNCSGISPROC) (GLfloat *points);
+#endif
+
+#ifndef GL_SGIX_fog_offset
+#define GL_SGIX_fog_offset 1
+#endif
+
+#ifndef GL_HP_image_transform
+#define GL_HP_image_transform 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glImageTransformParameteriHP (GLenum target, GLenum pname, GLint param);
+GLAPI void APIENTRY glImageTransformParameterfHP (GLenum target, GLenum pname, GLfloat param);
+GLAPI void APIENTRY glImageTransformParameterivHP (GLenum target, GLenum pname, const GLint *params);
+GLAPI void APIENTRY glImageTransformParameterfvHP (GLenum target, GLenum pname, const GLfloat *params);
+GLAPI void APIENTRY glGetImageTransformParameterivHP (GLenum target, GLenum pname, GLint *params);
+GLAPI void APIENTRY glGetImageTransformParameterfvHP (GLenum target, GLenum pname, GLfloat *params);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERIHPPROC) (GLenum target, GLenum pname, GLint param);
+typedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERFHPPROC) (GLenum target, GLenum pname, GLfloat param);
+typedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERIVHPPROC) (GLenum target, GLenum pname, const GLint *params);
+typedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERFVHPPROC) (GLenum target, GLenum pname, const GLfloat *params);
+typedef void (APIENTRYP PFNGLGETIMAGETRANSFORMPARAMETERIVHPPROC) (GLenum target, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLGETIMAGETRANSFORMPARAMETERFVHPPROC) (GLenum target, GLenum pname, GLfloat *params);
+#endif
+
+#ifndef GL_HP_convolution_border_modes
+#define GL_HP_convolution_border_modes 1
+#endif
+
+#ifndef GL_SGIX_texture_add_env
+#define GL_SGIX_texture_add_env 1
+#endif
+
+#ifndef GL_EXT_color_subtable
+#define GL_EXT_color_subtable 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glColorSubTableEXT (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *data);
+GLAPI void APIENTRY glCopyColorSubTableEXT (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLCOLORSUBTABLEEXTPROC) (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *data);
+typedef void (APIENTRYP PFNGLCOPYCOLORSUBTABLEEXTPROC) (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width);
+#endif
+
+#ifndef GL_PGI_vertex_hints
+#define GL_PGI_vertex_hints 1
+#endif
+
+#ifndef GL_PGI_misc_hints
+#define GL_PGI_misc_hints 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glHintPGI (GLenum target, GLint mode);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLHINTPGIPROC) (GLenum target, GLint mode);
+#endif
+
+#ifndef GL_EXT_paletted_texture
+#define GL_EXT_paletted_texture 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glColorTableEXT (GLenum target, GLenum internalFormat, GLsizei width, GLenum format, GLenum type, const GLvoid *table);
+GLAPI void APIENTRY glGetColorTableEXT (GLenum target, GLenum format, GLenum type, GLvoid *data);
+GLAPI void APIENTRY glGetColorTableParameterivEXT (GLenum target, GLenum pname, GLint *params);
+GLAPI void APIENTRY glGetColorTableParameterfvEXT (GLenum target, GLenum pname, GLfloat *params);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLCOLORTABLEEXTPROC) (GLenum target, GLenum internalFormat, GLsizei width, GLenum format, GLenum type, const GLvoid *table);
+typedef void (APIENTRYP PFNGLGETCOLORTABLEEXTPROC) (GLenum target, GLenum format, GLenum type, GLvoid *data);
+typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params);
+#endif
+
+#ifndef GL_EXT_clip_volume_hint
+#define GL_EXT_clip_volume_hint 1
+#endif
+
+#ifndef GL_SGIX_list_priority
+#define GL_SGIX_list_priority 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glGetListParameterfvSGIX (GLuint list, GLenum pname, GLfloat *params);
+GLAPI void APIENTRY glGetListParameterivSGIX (GLuint list, GLenum pname, GLint *params);
+GLAPI void APIENTRY glListParameterfSGIX (GLuint list, GLenum pname, GLfloat param);
+GLAPI void APIENTRY glListParameterfvSGIX (GLuint list, GLenum pname, const GLfloat *params);
+GLAPI void APIENTRY glListParameteriSGIX (GLuint list, GLenum pname, GLint param);
+GLAPI void APIENTRY glListParameterivSGIX (GLuint list, GLenum pname, const GLint *params);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLGETLISTPARAMETERFVSGIXPROC) (GLuint list, GLenum pname, GLfloat *params);
+typedef void (APIENTRYP PFNGLGETLISTPARAMETERIVSGIXPROC) (GLuint list, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLLISTPARAMETERFSGIXPROC) (GLuint list, GLenum pname, GLfloat param);
+typedef void (APIENTRYP PFNGLLISTPARAMETERFVSGIXPROC) (GLuint list, GLenum pname, const GLfloat *params);
+typedef void (APIENTRYP PFNGLLISTPARAMETERISGIXPROC) (GLuint list, GLenum pname, GLint param);
+typedef void (APIENTRYP PFNGLLISTPARAMETERIVSGIXPROC) (GLuint list, GLenum pname, const GLint *params);
+#endif
+
+#ifndef GL_SGIX_ir_instrument1
+#define GL_SGIX_ir_instrument1 1
+#endif
+
+#ifndef GL_SGIX_calligraphic_fragment
+#define GL_SGIX_calligraphic_fragment 1
+#endif
+
+#ifndef GL_SGIX_texture_lod_bias
+#define GL_SGIX_texture_lod_bias 1
+#endif
+
+#ifndef GL_SGIX_shadow_ambient
+#define GL_SGIX_shadow_ambient 1
+#endif
+
+#ifndef GL_EXT_index_texture
+#define GL_EXT_index_texture 1
+#endif
+
+#ifndef GL_EXT_index_material
+#define GL_EXT_index_material 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glIndexMaterialEXT (GLenum face, GLenum mode);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLINDEXMATERIALEXTPROC) (GLenum face, GLenum mode);
+#endif
+
+#ifndef GL_EXT_index_func
+#define GL_EXT_index_func 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glIndexFuncEXT (GLenum func, GLclampf ref);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLINDEXFUNCEXTPROC) (GLenum func, GLclampf ref);
+#endif
+
+#ifndef GL_EXT_index_array_formats
+#define GL_EXT_index_array_formats 1
+#endif
+
+#ifndef GL_EXT_compiled_vertex_array
+#define GL_EXT_compiled_vertex_array 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glLockArraysEXT (GLint first, GLsizei count);
+GLAPI void APIENTRY glUnlockArraysEXT (void);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLLOCKARRAYSEXTPROC) (GLint first, GLsizei count);
+typedef void (APIENTRYP PFNGLUNLOCKARRAYSEXTPROC) (void);
+#endif
+
+#ifndef GL_EXT_cull_vertex
+#define GL_EXT_cull_vertex 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glCullParameterdvEXT (GLenum pname, GLdouble *params);
+GLAPI void APIENTRY glCullParameterfvEXT (GLenum pname, GLfloat *params);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLCULLPARAMETERDVEXTPROC) (GLenum pname, GLdouble *params);
+typedef void (APIENTRYP PFNGLCULLPARAMETERFVEXTPROC) (GLenum pname, GLfloat *params);
+#endif
+
+#ifndef GL_SGIX_ycrcb
+#define GL_SGIX_ycrcb 1
+#endif
+
+#ifndef GL_SGIX_fragment_lighting
+#define GL_SGIX_fragment_lighting 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glFragmentColorMaterialSGIX (GLenum face, GLenum mode);
+GLAPI void APIENTRY glFragmentLightfSGIX (GLenum light, GLenum pname, GLfloat param);
+GLAPI void APIENTRY glFragmentLightfvSGIX (GLenum light, GLenum pname, const GLfloat *params);
+GLAPI void APIENTRY glFragmentLightiSGIX (GLenum light, GLenum pname, GLint param);
+GLAPI void APIENTRY glFragmentLightivSGIX (GLenum light, GLenum pname, const GLint *params);
+GLAPI void APIENTRY glFragmentLightModelfSGIX (GLenum pname, GLfloat param);
+GLAPI void APIENTRY glFragmentLightModelfvSGIX (GLenum pname, const GLfloat *params);
+GLAPI void APIENTRY glFragmentLightModeliSGIX (GLenum pname, GLint param);
+GLAPI void APIENTRY glFragmentLightModelivSGIX (GLenum pname, const GLint *params);
+GLAPI void APIENTRY glFragmentMaterialfSGIX (GLenum face, GLenum pname, GLfloat param);
+GLAPI void APIENTRY glFragmentMaterialfvSGIX (GLenum face, GLenum pname, const GLfloat *params);
+GLAPI void APIENTRY glFragmentMaterialiSGIX (GLenum face, GLenum pname, GLint param);
+GLAPI void APIENTRY glFragmentMaterialivSGIX (GLenum face, GLenum pname, const GLint *params);
+GLAPI void APIENTRY glGetFragmentLightfvSGIX (GLenum light, GLenum pname, GLfloat *params);
+GLAPI void APIENTRY glGetFragmentLightivSGIX (GLenum light, GLenum pname, GLint *params);
+GLAPI void APIENTRY glGetFragmentMaterialfvSGIX (GLenum face, GLenum pname, GLfloat *params);
+GLAPI void APIENTRY glGetFragmentMaterialivSGIX (GLenum face, GLenum pname, GLint *params);
+GLAPI void APIENTRY glLightEnviSGIX (GLenum pname, GLint param);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLFRAGMENTCOLORMATERIALSGIXPROC) (GLenum face, GLenum mode);
+typedef void (APIENTRYP PFNGLFRAGMENTLIGHTFSGIXPROC) (GLenum light, GLenum pname, GLfloat param);
+typedef void (APIENTRYP PFNGLFRAGMENTLIGHTFVSGIXPROC) (GLenum light, GLenum pname, const GLfloat *params);
+typedef void (APIENTRYP PFNGLFRAGMENTLIGHTISGIXPROC) (GLenum light, GLenum pname, GLint param);
+typedef void (APIENTRYP PFNGLFRAGMENTLIGHTIVSGIXPROC) (GLenum light, GLenum pname, const GLint *params);
+typedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELFSGIXPROC) (GLenum pname, GLfloat param);
+typedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELFVSGIXPROC) (GLenum pname, const GLfloat *params);
+typedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELISGIXPROC) (GLenum pname, GLint param);
+typedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELIVSGIXPROC) (GLenum pname, const GLint *params);
+typedef void (APIENTRYP PFNGLFRAGMENTMATERIALFSGIXPROC) (GLenum face, GLenum pname, GLfloat param);
+typedef void (APIENTRYP PFNGLFRAGMENTMATERIALFVSGIXPROC) (GLenum face, GLenum pname, const GLfloat *params);
+typedef void (APIENTRYP PFNGLFRAGMENTMATERIALISGIXPROC) (GLenum face, GLenum pname, GLint param);
+typedef void (APIENTRYP PFNGLFRAGMENTMATERIALIVSGIXPROC) (GLenum face, GLenum pname, const GLint *params);
+typedef void (APIENTRYP PFNGLGETFRAGMENTLIGHTFVSGIXPROC) (GLenum light, GLenum pname, GLfloat *params);
+typedef void (APIENTRYP PFNGLGETFRAGMENTLIGHTIVSGIXPROC) (GLenum light, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLGETFRAGMENTMATERIALFVSGIXPROC) (GLenum face, GLenum pname, GLfloat *params);
+typedef void (APIENTRYP PFNGLGETFRAGMENTMATERIALIVSGIXPROC) (GLenum face, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLLIGHTENVISGIXPROC) (GLenum pname, GLint param);
+#endif
+
+#ifndef GL_IBM_rasterpos_clip
+#define GL_IBM_rasterpos_clip 1
+#endif
+
+#ifndef GL_HP_texture_lighting
+#define GL_HP_texture_lighting 1
+#endif
+
+#ifndef GL_EXT_draw_range_elements
+#define GL_EXT_draw_range_elements 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glDrawRangeElementsEXT (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTSEXTPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices);
+#endif
+
+#ifndef GL_WIN_phong_shading
+#define GL_WIN_phong_shading 1
+#endif
+
+#ifndef GL_WIN_specular_fog
+#define GL_WIN_specular_fog 1
+#endif
+
+#ifndef GL_EXT_light_texture
+#define GL_EXT_light_texture 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glApplyTextureEXT (GLenum mode);
+GLAPI void APIENTRY glTextureLightEXT (GLenum pname);
+GLAPI void APIENTRY glTextureMaterialEXT (GLenum face, GLenum mode);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLAPPLYTEXTUREEXTPROC) (GLenum mode);
+typedef void (APIENTRYP PFNGLTEXTURELIGHTEXTPROC) (GLenum pname);
+typedef void (APIENTRYP PFNGLTEXTUREMATERIALEXTPROC) (GLenum face, GLenum mode);
+#endif
+
+#ifndef GL_SGIX_blend_alpha_minmax
+#define GL_SGIX_blend_alpha_minmax 1
+#endif
+
+#ifndef GL_EXT_bgra
+#define GL_EXT_bgra 1
+#endif
+
+#ifndef GL_SGIX_async
+#define GL_SGIX_async 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glAsyncMarkerSGIX (GLuint marker);
+GLAPI GLint APIENTRY glFinishAsyncSGIX (GLuint *markerp);
+GLAPI GLint APIENTRY glPollAsyncSGIX (GLuint *markerp);
+GLAPI GLuint APIENTRY glGenAsyncMarkersSGIX (GLsizei range);
+GLAPI void APIENTRY glDeleteAsyncMarkersSGIX (GLuint marker, GLsizei range);
+GLAPI GLboolean APIENTRY glIsAsyncMarkerSGIX (GLuint marker);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLASYNCMARKERSGIXPROC) (GLuint marker);
+typedef GLint (APIENTRYP PFNGLFINISHASYNCSGIXPROC) (GLuint *markerp);
+typedef GLint (APIENTRYP PFNGLPOLLASYNCSGIXPROC) (GLuint *markerp);
+typedef GLuint (APIENTRYP PFNGLGENASYNCMARKERSSGIXPROC) (GLsizei range);
+typedef void (APIENTRYP PFNGLDELETEASYNCMARKERSSGIXPROC) (GLuint marker, GLsizei range);
+typedef GLboolean (APIENTRYP PFNGLISASYNCMARKERSGIXPROC) (GLuint marker);
+#endif
+
+#ifndef GL_SGIX_async_pixel
+#define GL_SGIX_async_pixel 1
+#endif
+
+#ifndef GL_SGIX_async_histogram
+#define GL_SGIX_async_histogram 1
+#endif
+
+#ifndef GL_INTEL_parallel_arrays
+#define GL_INTEL_parallel_arrays 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glVertexPointervINTEL (GLint size, GLenum type, const GLvoid* *pointer);
+GLAPI void APIENTRY glNormalPointervINTEL (GLenum type, const GLvoid* *pointer);
+GLAPI void APIENTRY glColorPointervINTEL (GLint size, GLenum type, const GLvoid* *pointer);
+GLAPI void APIENTRY glTexCoordPointervINTEL (GLint size, GLenum type, const GLvoid* *pointer);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLVERTEXPOINTERVINTELPROC) (GLint size, GLenum type, const GLvoid* *pointer);
+typedef void (APIENTRYP PFNGLNORMALPOINTERVINTELPROC) (GLenum type, const GLvoid* *pointer);
+typedef void (APIENTRYP PFNGLCOLORPOINTERVINTELPROC) (GLint size, GLenum type, const GLvoid* *pointer);
+typedef void (APIENTRYP PFNGLTEXCOORDPOINTERVINTELPROC) (GLint size, GLenum type, const GLvoid* *pointer);
+#endif
+
+#ifndef GL_HP_occlusion_test
+#define GL_HP_occlusion_test 1
+#endif
+
+#ifndef GL_EXT_pixel_transform
+#define GL_EXT_pixel_transform 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glPixelTransformParameteriEXT (GLenum target, GLenum pname, GLint param);
+GLAPI void APIENTRY glPixelTransformParameterfEXT (GLenum target, GLenum pname, GLfloat param);
+GLAPI void APIENTRY glPixelTransformParameterivEXT (GLenum target, GLenum pname, const GLint *params);
+GLAPI void APIENTRY glPixelTransformParameterfvEXT (GLenum target, GLenum pname, const GLfloat *params);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERIEXTPROC) (GLenum target, GLenum pname, GLint param);
+typedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERFEXTPROC) (GLenum target, GLenum pname, GLfloat param);
+typedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERIVEXTPROC) (GLenum target, GLenum pname, const GLint *params);
+typedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERFVEXTPROC) (GLenum target, GLenum pname, const GLfloat *params);
+#endif
+
+#ifndef GL_EXT_pixel_transform_color_table
+#define GL_EXT_pixel_transform_color_table 1
+#endif
+
+#ifndef GL_EXT_shared_texture_palette
+#define GL_EXT_shared_texture_palette 1
+#endif
+
+#ifndef GL_EXT_separate_specular_color
+#define GL_EXT_separate_specular_color 1
+#endif
+
+#ifndef GL_EXT_secondary_color
+#define GL_EXT_secondary_color 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glSecondaryColor3bEXT (GLbyte red, GLbyte green, GLbyte blue);
+GLAPI void APIENTRY glSecondaryColor3bvEXT (const GLbyte *v);
+GLAPI void APIENTRY glSecondaryColor3dEXT (GLdouble red, GLdouble green, GLdouble blue);
+GLAPI void APIENTRY glSecondaryColor3dvEXT (const GLdouble *v);
+GLAPI void APIENTRY glSecondaryColor3fEXT (GLfloat red, GLfloat green, GLfloat blue);
+GLAPI void APIENTRY glSecondaryColor3fvEXT (const GLfloat *v);
+GLAPI void APIENTRY glSecondaryColor3iEXT (GLint red, GLint green, GLint blue);
+GLAPI void APIENTRY glSecondaryColor3ivEXT (const GLint *v);
+GLAPI void APIENTRY glSecondaryColor3sEXT (GLshort red, GLshort green, GLshort blue);
+GLAPI void APIENTRY glSecondaryColor3svEXT (const GLshort *v);
+GLAPI void APIENTRY glSecondaryColor3ubEXT (GLubyte red, GLubyte green, GLubyte blue);
+GLAPI void APIENTRY glSecondaryColor3ubvEXT (const GLubyte *v);
+GLAPI void APIENTRY glSecondaryColor3uiEXT (GLuint red, GLuint green, GLuint blue);
+GLAPI void APIENTRY glSecondaryColor3uivEXT (const GLuint *v);
+GLAPI void APIENTRY glSecondaryColor3usEXT (GLushort red, GLushort green, GLushort blue);
+GLAPI void APIENTRY glSecondaryColor3usvEXT (const GLushort *v);
+GLAPI void APIENTRY glSecondaryColorPointerEXT (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3BEXTPROC) (GLbyte red, GLbyte green, GLbyte blue);
+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3BVEXTPROC) (const GLbyte *v);
+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3DEXTPROC) (GLdouble red, GLdouble green, GLdouble blue);
+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3DVEXTPROC) (const GLdouble *v);
+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3FEXTPROC) (GLfloat red, GLfloat green, GLfloat blue);
+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3FVEXTPROC) (const GLfloat *v);
+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3IEXTPROC) (GLint red, GLint green, GLint blue);
+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3IVEXTPROC) (const GLint *v);
+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3SEXTPROC) (GLshort red, GLshort green, GLshort blue);
+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3SVEXTPROC) (const GLshort *v);
+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBEXTPROC) (GLubyte red, GLubyte green, GLubyte blue);
+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBVEXTPROC) (const GLubyte *v);
+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIEXTPROC) (GLuint red, GLuint green, GLuint blue);
+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIVEXTPROC) (const GLuint *v);
+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3USEXTPROC) (GLushort red, GLushort green, GLushort blue);
+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3USVEXTPROC) (const GLushort *v);
+typedef void (APIENTRYP PFNGLSECONDARYCOLORPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
+#endif
+
+#ifndef GL_EXT_texture_perturb_normal
+#define GL_EXT_texture_perturb_normal 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glTextureNormalEXT (GLenum mode);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLTEXTURENORMALEXTPROC) (GLenum mode);
+#endif
+
+#ifndef GL_EXT_multi_draw_arrays
+#define GL_EXT_multi_draw_arrays 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glMultiDrawArraysEXT (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount);
+GLAPI void APIENTRY glMultiDrawElementsEXT (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSEXTPROC) (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount);
+typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSEXTPROC) (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount);
+#endif
+
+#ifndef GL_EXT_fog_coord
+#define GL_EXT_fog_coord 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glFogCoordfEXT (GLfloat coord);
+GLAPI void APIENTRY glFogCoordfvEXT (const GLfloat *coord);
+GLAPI void APIENTRY glFogCoorddEXT (GLdouble coord);
+GLAPI void APIENTRY glFogCoorddvEXT (const GLdouble *coord);
+GLAPI void APIENTRY glFogCoordPointerEXT (GLenum type, GLsizei stride, const GLvoid *pointer);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLFOGCOORDFEXTPROC) (GLfloat coord);
+typedef void (APIENTRYP PFNGLFOGCOORDFVEXTPROC) (const GLfloat *coord);
+typedef void (APIENTRYP PFNGLFOGCOORDDEXTPROC) (GLdouble coord);
+typedef void (APIENTRYP PFNGLFOGCOORDDVEXTPROC) (const GLdouble *coord);
+typedef void (APIENTRYP PFNGLFOGCOORDPOINTEREXTPROC) (GLenum type, GLsizei stride, const GLvoid *pointer);
+#endif
+
+#ifndef GL_REND_screen_coordinates
+#define GL_REND_screen_coordinates 1
+#endif
+
+#ifndef GL_EXT_coordinate_frame
+#define GL_EXT_coordinate_frame 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glTangent3bEXT (GLbyte tx, GLbyte ty, GLbyte tz);
+GLAPI void APIENTRY glTangent3bvEXT (const GLbyte *v);
+GLAPI void APIENTRY glTangent3dEXT (GLdouble tx, GLdouble ty, GLdouble tz);
+GLAPI void APIENTRY glTangent3dvEXT (const GLdouble *v);
+GLAPI void APIENTRY glTangent3fEXT (GLfloat tx, GLfloat ty, GLfloat tz);
+GLAPI void APIENTRY glTangent3fvEXT (const GLfloat *v);
+GLAPI void APIENTRY glTangent3iEXT (GLint tx, GLint ty, GLint tz);
+GLAPI void APIENTRY glTangent3ivEXT (const GLint *v);
+GLAPI void APIENTRY glTangent3sEXT (GLshort tx, GLshort ty, GLshort tz);
+GLAPI void APIENTRY glTangent3svEXT (const GLshort *v);
+GLAPI void APIENTRY glBinormal3bEXT (GLbyte bx, GLbyte by, GLbyte bz);
+GLAPI void APIENTRY glBinormal3bvEXT (const GLbyte *v);
+GLAPI void APIENTRY glBinormal3dEXT (GLdouble bx, GLdouble by, GLdouble bz);
+GLAPI void APIENTRY glBinormal3dvEXT (const GLdouble *v);
+GLAPI void APIENTRY glBinormal3fEXT (GLfloat bx, GLfloat by, GLfloat bz);
+GLAPI void APIENTRY glBinormal3fvEXT (const GLfloat *v);
+GLAPI void APIENTRY glBinormal3iEXT (GLint bx, GLint by, GLint bz);
+GLAPI void APIENTRY glBinormal3ivEXT (const GLint *v);
+GLAPI void APIENTRY glBinormal3sEXT (GLshort bx, GLshort by, GLshort bz);
+GLAPI void APIENTRY glBinormal3svEXT (const GLshort *v);
+GLAPI void APIENTRY glTangentPointerEXT (GLenum type, GLsizei stride, const GLvoid *pointer);
+GLAPI void APIENTRY glBinormalPointerEXT (GLenum type, GLsizei stride, const GLvoid *pointer);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLTANGENT3BEXTPROC) (GLbyte tx, GLbyte ty, GLbyte tz);
+typedef void (APIENTRYP PFNGLTANGENT3BVEXTPROC) (const GLbyte *v);
+typedef void (APIENTRYP PFNGLTANGENT3DEXTPROC) (GLdouble tx, GLdouble ty, GLdouble tz);
+typedef void (APIENTRYP PFNGLTANGENT3DVEXTPROC) (const GLdouble *v);
+typedef void (APIENTRYP PFNGLTANGENT3FEXTPROC) (GLfloat tx, GLfloat ty, GLfloat tz);
+typedef void (APIENTRYP PFNGLTANGENT3FVEXTPROC) (const GLfloat *v);
+typedef void (APIENTRYP PFNGLTANGENT3IEXTPROC) (GLint tx, GLint ty, GLint tz);
+typedef void (APIENTRYP PFNGLTANGENT3IVEXTPROC) (const GLint *v);
+typedef void (APIENTRYP PFNGLTANGENT3SEXTPROC) (GLshort tx, GLshort ty, GLshort tz);
+typedef void (APIENTRYP PFNGLTANGENT3SVEXTPROC) (const GLshort *v);
+typedef void (APIENTRYP PFNGLBINORMAL3BEXTPROC) (GLbyte bx, GLbyte by, GLbyte bz);
+typedef void (APIENTRYP PFNGLBINORMAL3BVEXTPROC) (const GLbyte *v);
+typedef void (APIENTRYP PFNGLBINORMAL3DEXTPROC) (GLdouble bx, GLdouble by, GLdouble bz);
+typedef void (APIENTRYP PFNGLBINORMAL3DVEXTPROC) (const GLdouble *v);
+typedef void (APIENTRYP PFNGLBINORMAL3FEXTPROC) (GLfloat bx, GLfloat by, GLfloat bz);
+typedef void (APIENTRYP PFNGLBINORMAL3FVEXTPROC) (const GLfloat *v);
+typedef void (APIENTRYP PFNGLBINORMAL3IEXTPROC) (GLint bx, GLint by, GLint bz);
+typedef void (APIENTRYP PFNGLBINORMAL3IVEXTPROC) (const GLint *v);
+typedef void (APIENTRYP PFNGLBINORMAL3SEXTPROC) (GLshort bx, GLshort by, GLshort bz);
+typedef void (APIENTRYP PFNGLBINORMAL3SVEXTPROC) (const GLshort *v);
+typedef void (APIENTRYP PFNGLTANGENTPOINTEREXTPROC) (GLenum type, GLsizei stride, const GLvoid *pointer);
+typedef void (APIENTRYP PFNGLBINORMALPOINTEREXTPROC) (GLenum type, GLsizei stride, const GLvoid *pointer);
+#endif
+
+#ifndef GL_EXT_texture_env_combine
+#define GL_EXT_texture_env_combine 1
+#endif
+
+#ifndef GL_APPLE_specular_vector
+#define GL_APPLE_specular_vector 1
+#endif
+
+#ifndef GL_APPLE_transform_hint
+#define GL_APPLE_transform_hint 1
+#endif
+
+#ifndef GL_SGIX_fog_scale
+#define GL_SGIX_fog_scale 1
+#endif
+
+#ifndef GL_SUNX_constant_data
+#define GL_SUNX_constant_data 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glFinishTextureSUNX (void);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLFINISHTEXTURESUNXPROC) (void);
+#endif
+
+#ifndef GL_SUN_global_alpha
+#define GL_SUN_global_alpha 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glGlobalAlphaFactorbSUN (GLbyte factor);
+GLAPI void APIENTRY glGlobalAlphaFactorsSUN (GLshort factor);
+GLAPI void APIENTRY glGlobalAlphaFactoriSUN (GLint factor);
+GLAPI void APIENTRY glGlobalAlphaFactorfSUN (GLfloat factor);
+GLAPI void APIENTRY glGlobalAlphaFactordSUN (GLdouble factor);
+GLAPI void APIENTRY glGlobalAlphaFactorubSUN (GLubyte factor);
+GLAPI void APIENTRY glGlobalAlphaFactorusSUN (GLushort factor);
+GLAPI void APIENTRY glGlobalAlphaFactoruiSUN (GLuint factor);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORBSUNPROC) (GLbyte factor);
+typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORSSUNPROC) (GLshort factor);
+typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORISUNPROC) (GLint factor);
+typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORFSUNPROC) (GLfloat factor);
+typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORDSUNPROC) (GLdouble factor);
+typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORUBSUNPROC) (GLubyte factor);
+typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORUSSUNPROC) (GLushort factor);
+typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORUISUNPROC) (GLuint factor);
+#endif
+
+#ifndef GL_SUN_triangle_list
+#define GL_SUN_triangle_list 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glReplacementCodeuiSUN (GLuint code);
+GLAPI void APIENTRY glReplacementCodeusSUN (GLushort code);
+GLAPI void APIENTRY glReplacementCodeubSUN (GLubyte code);
+GLAPI void APIENTRY glReplacementCodeuivSUN (const GLuint *code);
+GLAPI void APIENTRY glReplacementCodeusvSUN (const GLushort *code);
+GLAPI void APIENTRY glReplacementCodeubvSUN (const GLubyte *code);
+GLAPI void APIENTRY glReplacementCodePointerSUN (GLenum type, GLsizei stride, const GLvoid* *pointer);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUISUNPROC) (GLuint code);
+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUSSUNPROC) (GLushort code);
+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUBSUNPROC) (GLubyte code);
+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUIVSUNPROC) (const GLuint *code);
+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUSVSUNPROC) (const GLushort *code);
+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUBVSUNPROC) (const GLubyte *code);
+typedef void (APIENTRYP PFNGLREPLACEMENTCODEPOINTERSUNPROC) (GLenum type, GLsizei stride, const GLvoid* *pointer);
+#endif
+
+#ifndef GL_SUN_vertex
+#define GL_SUN_vertex 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glColor4ubVertex2fSUN (GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y);
+GLAPI void APIENTRY glColor4ubVertex2fvSUN (const GLubyte *c, const GLfloat *v);
+GLAPI void APIENTRY glColor4ubVertex3fSUN (GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z);
+GLAPI void APIENTRY glColor4ubVertex3fvSUN (const GLubyte *c, const GLfloat *v);
+GLAPI void APIENTRY glColor3fVertex3fSUN (GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z);
+GLAPI void APIENTRY glColor3fVertex3fvSUN (const GLfloat *c, const GLfloat *v);
+GLAPI void APIENTRY glNormal3fVertex3fSUN (GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
+GLAPI void APIENTRY glNormal3fVertex3fvSUN (const GLfloat *n, const GLfloat *v);
+GLAPI void APIENTRY glColor4fNormal3fVertex3fSUN (GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
+GLAPI void APIENTRY glColor4fNormal3fVertex3fvSUN (const GLfloat *c, const GLfloat *n, const GLfloat *v);
+GLAPI void APIENTRY glTexCoord2fVertex3fSUN (GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z);
+GLAPI void APIENTRY glTexCoord2fVertex3fvSUN (const GLfloat *tc, const GLfloat *v);
+GLAPI void APIENTRY glTexCoord4fVertex4fSUN (GLfloat s, GLfloat t, GLfloat p, GLfloat q, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+GLAPI void APIENTRY glTexCoord4fVertex4fvSUN (const GLfloat *tc, const GLfloat *v);
+GLAPI void APIENTRY glTexCoord2fColor4ubVertex3fSUN (GLfloat s, GLfloat t, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z);
+GLAPI void APIENTRY glTexCoord2fColor4ubVertex3fvSUN (const GLfloat *tc, const GLubyte *c, const GLfloat *v);
+GLAPI void APIENTRY glTexCoord2fColor3fVertex3fSUN (GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z);
+GLAPI void APIENTRY glTexCoord2fColor3fVertex3fvSUN (const GLfloat *tc, const GLfloat *c, const GLfloat *v);
+GLAPI void APIENTRY glTexCoord2fNormal3fVertex3fSUN (GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
+GLAPI void APIENTRY glTexCoord2fNormal3fVertex3fvSUN (const GLfloat *tc, const GLfloat *n, const GLfloat *v);
+GLAPI void APIENTRY glTexCoord2fColor4fNormal3fVertex3fSUN (GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
+GLAPI void APIENTRY glTexCoord2fColor4fNormal3fVertex3fvSUN (const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v);
+GLAPI void APIENTRY glTexCoord4fColor4fNormal3fVertex4fSUN (GLfloat s, GLfloat t, GLfloat p, GLfloat q, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+GLAPI void APIENTRY glTexCoord4fColor4fNormal3fVertex4fvSUN (const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v);
+GLAPI void APIENTRY glReplacementCodeuiVertex3fSUN (GLuint rc, GLfloat x, GLfloat y, GLfloat z);
+GLAPI void APIENTRY glReplacementCodeuiVertex3fvSUN (const GLuint *rc, const GLfloat *v);
+GLAPI void APIENTRY glReplacementCodeuiColor4ubVertex3fSUN (GLuint rc, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z);
+GLAPI void APIENTRY glReplacementCodeuiColor4ubVertex3fvSUN (const GLuint *rc, const GLubyte *c, const GLfloat *v);
+GLAPI void APIENTRY glReplacementCodeuiColor3fVertex3fSUN (GLuint rc, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z);
+GLAPI void APIENTRY glReplacementCodeuiColor3fVertex3fvSUN (const GLuint *rc, const GLfloat *c, const GLfloat *v);
+GLAPI void APIENTRY glReplacementCodeuiNormal3fVertex3fSUN (GLuint rc, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
+GLAPI void APIENTRY glReplacementCodeuiNormal3fVertex3fvSUN (const GLuint *rc, const GLfloat *n, const GLfloat *v);
+GLAPI void APIENTRY glReplacementCodeuiColor4fNormal3fVertex3fSUN (GLuint rc, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
+GLAPI void APIENTRY glReplacementCodeuiColor4fNormal3fVertex3fvSUN (const GLuint *rc, const GLfloat *c, const GLfloat *n, const GLfloat *v);
+GLAPI void APIENTRY glReplacementCodeuiTexCoord2fVertex3fSUN (GLuint rc, GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z);
+GLAPI void APIENTRY glReplacementCodeuiTexCoord2fVertex3fvSUN (const GLuint *rc, const GLfloat *tc, const GLfloat *v);
+GLAPI void APIENTRY glReplacementCodeuiTexCoord2fNormal3fVertex3fSUN (GLuint rc, GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
+GLAPI void APIENTRY glReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN (const GLuint *rc, const GLfloat *tc, const GLfloat *n, const GLfloat *v);
+GLAPI void APIENTRY glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN (GLuint rc, GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
+GLAPI void APIENTRY glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN (const GLuint *rc, const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLCOLOR4UBVERTEX2FSUNPROC) (GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y);
+typedef void (APIENTRYP PFNGLCOLOR4UBVERTEX2FVSUNPROC) (const GLubyte *c, const GLfloat *v);
+typedef void (APIENTRYP PFNGLCOLOR4UBVERTEX3FSUNPROC) (GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z);
+typedef void (APIENTRYP PFNGLCOLOR4UBVERTEX3FVSUNPROC) (const GLubyte *c, const GLfloat *v);
+typedef void (APIENTRYP PFNGLCOLOR3FVERTEX3FSUNPROC) (GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z);
+typedef void (APIENTRYP PFNGLCOLOR3FVERTEX3FVSUNPROC) (const GLfloat *c, const GLfloat *v);
+typedef void (APIENTRYP PFNGLNORMAL3FVERTEX3FSUNPROC) (GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
+typedef void (APIENTRYP PFNGLNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *n, const GLfloat *v);
+typedef void (APIENTRYP PFNGLCOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
+typedef void (APIENTRYP PFNGLCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *c, const GLfloat *n, const GLfloat *v);
+typedef void (APIENTRYP PFNGLTEXCOORD2FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z);
+typedef void (APIENTRYP PFNGLTEXCOORD2FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *v);
+typedef void (APIENTRYP PFNGLTEXCOORD4FVERTEX4FSUNPROC) (GLfloat s, GLfloat t, GLfloat p, GLfloat q, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+typedef void (APIENTRYP PFNGLTEXCOORD4FVERTEX4FVSUNPROC) (const GLfloat *tc, const GLfloat *v);
+typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR4UBVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z);
+typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR4UBVERTEX3FVSUNPROC) (const GLfloat *tc, const GLubyte *c, const GLfloat *v);
+typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR3FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z);
+typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR3FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *c, const GLfloat *v);
+typedef void (APIENTRYP PFNGLTEXCOORD2FNORMAL3FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
+typedef void (APIENTRYP PFNGLTEXCOORD2FNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *n, const GLfloat *v);
+typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
+typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v);
+typedef void (APIENTRYP PFNGLTEXCOORD4FCOLOR4FNORMAL3FVERTEX4FSUNPROC) (GLfloat s, GLfloat t, GLfloat p, GLfloat q, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+typedef void (APIENTRYP PFNGLTEXCOORD4FCOLOR4FNORMAL3FVERTEX4FVSUNPROC) (const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v);
+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUIVERTEX3FSUNPROC) (GLuint rc, GLfloat x, GLfloat y, GLfloat z);
+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUIVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *v);
+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR4UBVERTEX3FSUNPROC) (GLuint rc, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z);
+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR4UBVERTEX3FVSUNPROC) (const GLuint *rc, const GLubyte *c, const GLfloat *v);
+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR3FVERTEX3FSUNPROC) (GLuint rc, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z);
+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *c, const GLfloat *v);
+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUINORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUINORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *n, const GLfloat *v);
+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *c, const GLfloat *n, const GLfloat *v);
+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FVERTEX3FSUNPROC) (GLuint rc, GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z);
+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *tc, const GLfloat *v);
+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FNORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FNORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *tc, const GLfloat *n, const GLfloat *v);
+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FCOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
+typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v);
+#endif
+
+#ifndef GL_EXT_blend_func_separate
+#define GL_EXT_blend_func_separate 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glBlendFuncSeparateEXT (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEEXTPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
+#endif
+
+#ifndef GL_INGR_blend_func_separate
+#define GL_INGR_blend_func_separate 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glBlendFuncSeparateINGR (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEINGRPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
+#endif
+
+#ifndef GL_INGR_color_clamp
+#define GL_INGR_color_clamp 1
+#endif
+
+#ifndef GL_INGR_interlace_read
+#define GL_INGR_interlace_read 1
+#endif
+
+#ifndef GL_EXT_stencil_wrap
+#define GL_EXT_stencil_wrap 1
+#endif
+
+#ifndef GL_EXT_422_pixels
+#define GL_EXT_422_pixels 1
+#endif
+
+#ifndef GL_NV_texgen_reflection
+#define GL_NV_texgen_reflection 1
+#endif
+
+#ifndef GL_SUN_convolution_border_modes
+#define GL_SUN_convolution_border_modes 1
+#endif
+
+#ifndef GL_EXT_texture_env_add
+#define GL_EXT_texture_env_add 1
+#endif
+
+#ifndef GL_EXT_texture_lod_bias
+#define GL_EXT_texture_lod_bias 1
+#endif
+
+#ifndef GL_EXT_texture_filter_anisotropic
+#define GL_EXT_texture_filter_anisotropic 1
+#endif
+
+#ifndef GL_EXT_vertex_weighting
+#define GL_EXT_vertex_weighting 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glVertexWeightfEXT (GLfloat weight);
+GLAPI void APIENTRY glVertexWeightfvEXT (const GLfloat *weight);
+GLAPI void APIENTRY glVertexWeightPointerEXT (GLsizei size, GLenum type, GLsizei stride, const GLvoid *pointer);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLVERTEXWEIGHTFEXTPROC) (GLfloat weight);
+typedef void (APIENTRYP PFNGLVERTEXWEIGHTFVEXTPROC) (const GLfloat *weight);
+typedef void (APIENTRYP PFNGLVERTEXWEIGHTPOINTEREXTPROC) (GLsizei size, GLenum type, GLsizei stride, const GLvoid *pointer);
+#endif
+
+#ifndef GL_NV_light_max_exponent
+#define GL_NV_light_max_exponent 1
+#endif
+
+#ifndef GL_NV_vertex_array_range
+#define GL_NV_vertex_array_range 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glFlushVertexArrayRangeNV (void);
+GLAPI void APIENTRY glVertexArrayRangeNV (GLsizei length, const GLvoid *pointer);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLFLUSHVERTEXARRAYRANGENVPROC) (void);
+typedef void (APIENTRYP PFNGLVERTEXARRAYRANGENVPROC) (GLsizei length, const GLvoid *pointer);
+#endif
+
+#ifndef GL_NV_register_combiners
+#define GL_NV_register_combiners 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glCombinerParameterfvNV (GLenum pname, const GLfloat *params);
+GLAPI void APIENTRY glCombinerParameterfNV (GLenum pname, GLfloat param);
+GLAPI void APIENTRY glCombinerParameterivNV (GLenum pname, const GLint *params);
+GLAPI void APIENTRY glCombinerParameteriNV (GLenum pname, GLint param);
+GLAPI void APIENTRY glCombinerInputNV (GLenum stage, GLenum portion, GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage);
+GLAPI void APIENTRY glCombinerOutputNV (GLenum stage, GLenum portion, GLenum abOutput, GLenum cdOutput, GLenum sumOutput, GLenum scale, GLenum bias, GLboolean abDotProduct, GLboolean cdDotProduct, GLboolean muxSum);
+GLAPI void APIENTRY glFinalCombinerInputNV (GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage);
+GLAPI void APIENTRY glGetCombinerInputParameterfvNV (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLfloat *params);
+GLAPI void APIENTRY glGetCombinerInputParameterivNV (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLint *params);
+GLAPI void APIENTRY glGetCombinerOutputParameterfvNV (GLenum stage, GLenum portion, GLenum pname, GLfloat *params);
+GLAPI void APIENTRY glGetCombinerOutputParameterivNV (GLenum stage, GLenum portion, GLenum pname, GLint *params);
+GLAPI void APIENTRY glGetFinalCombinerInputParameterfvNV (GLenum variable, GLenum pname, GLfloat *params);
+GLAPI void APIENTRY glGetFinalCombinerInputParameterivNV (GLenum variable, GLenum pname, GLint *params);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLCOMBINERPARAMETERFVNVPROC) (GLenum pname, const GLfloat *params);
+typedef void (APIENTRYP PFNGLCOMBINERPARAMETERFNVPROC) (GLenum pname, GLfloat param);
+typedef void (APIENTRYP PFNGLCOMBINERPARAMETERIVNVPROC) (GLenum pname, const GLint *params);
+typedef void (APIENTRYP PFNGLCOMBINERPARAMETERINVPROC) (GLenum pname, GLint param);
+typedef void (APIENTRYP PFNGLCOMBINERINPUTNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage);
+typedef void (APIENTRYP PFNGLCOMBINEROUTPUTNVPROC) (GLenum stage, GLenum portion, GLenum abOutput, GLenum cdOutput, GLenum sumOutput, GLenum scale, GLenum bias, GLboolean abDotProduct, GLboolean cdDotProduct, GLboolean muxSum);
+typedef void (APIENTRYP PFNGLFINALCOMBINERINPUTNVPROC) (GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage);
+typedef void (APIENTRYP PFNGLGETCOMBINERINPUTPARAMETERFVNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLfloat *params);
+typedef void (APIENTRYP PFNGLGETCOMBINERINPUTPARAMETERIVNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLGETCOMBINEROUTPUTPARAMETERFVNVPROC) (GLenum stage, GLenum portion, GLenum pname, GLfloat *params);
+typedef void (APIENTRYP PFNGLGETCOMBINEROUTPUTPARAMETERIVNVPROC) (GLenum stage, GLenum portion, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLGETFINALCOMBINERINPUTPARAMETERFVNVPROC) (GLenum variable, GLenum pname, GLfloat *params);
+typedef void (APIENTRYP PFNGLGETFINALCOMBINERINPUTPARAMETERIVNVPROC) (GLenum variable, GLenum pname, GLint *params);
+#endif
+
+#ifndef GL_NV_fog_distance
+#define GL_NV_fog_distance 1
+#endif
+
+#ifndef GL_NV_texgen_emboss
+#define GL_NV_texgen_emboss 1
+#endif
+
+#ifndef GL_NV_blend_square
+#define GL_NV_blend_square 1
+#endif
+
+#ifndef GL_NV_texture_env_combine4
+#define GL_NV_texture_env_combine4 1
+#endif
+
+#ifndef GL_MESA_resize_buffers
+#define GL_MESA_resize_buffers 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glResizeBuffersMESA (void);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLRESIZEBUFFERSMESAPROC) (void);
+#endif
+
+#ifndef GL_MESA_window_pos
+#define GL_MESA_window_pos 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glWindowPos2dMESA (GLdouble x, GLdouble y);
+GLAPI void APIENTRY glWindowPos2dvMESA (const GLdouble *v);
+GLAPI void APIENTRY glWindowPos2fMESA (GLfloat x, GLfloat y);
+GLAPI void APIENTRY glWindowPos2fvMESA (const GLfloat *v);
+GLAPI void APIENTRY glWindowPos2iMESA (GLint x, GLint y);
+GLAPI void APIENTRY glWindowPos2ivMESA (const GLint *v);
+GLAPI void APIENTRY glWindowPos2sMESA (GLshort x, GLshort y);
+GLAPI void APIENTRY glWindowPos2svMESA (const GLshort *v);
+GLAPI void APIENTRY glWindowPos3dMESA (GLdouble x, GLdouble y, GLdouble z);
+GLAPI void APIENTRY glWindowPos3dvMESA (const GLdouble *v);
+GLAPI void APIENTRY glWindowPos3fMESA (GLfloat x, GLfloat y, GLfloat z);
+GLAPI void APIENTRY glWindowPos3fvMESA (const GLfloat *v);
+GLAPI void APIENTRY glWindowPos3iMESA (GLint x, GLint y, GLint z);
+GLAPI void APIENTRY glWindowPos3ivMESA (const GLint *v);
+GLAPI void APIENTRY glWindowPos3sMESA (GLshort x, GLshort y, GLshort z);
+GLAPI void APIENTRY glWindowPos3svMESA (const GLshort *v);
+GLAPI void APIENTRY glWindowPos4dMESA (GLdouble x, GLdouble y, GLdouble z, GLdouble w);
+GLAPI void APIENTRY glWindowPos4dvMESA (const GLdouble *v);
+GLAPI void APIENTRY glWindowPos4fMESA (GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+GLAPI void APIENTRY glWindowPos4fvMESA (const GLfloat *v);
+GLAPI void APIENTRY glWindowPos4iMESA (GLint x, GLint y, GLint z, GLint w);
+GLAPI void APIENTRY glWindowPos4ivMESA (const GLint *v);
+GLAPI void APIENTRY glWindowPos4sMESA (GLshort x, GLshort y, GLshort z, GLshort w);
+GLAPI void APIENTRY glWindowPos4svMESA (const GLshort *v);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLWINDOWPOS2DMESAPROC) (GLdouble x, GLdouble y);
+typedef void (APIENTRYP PFNGLWINDOWPOS2DVMESAPROC) (const GLdouble *v);
+typedef void (APIENTRYP PFNGLWINDOWPOS2FMESAPROC) (GLfloat x, GLfloat y);
+typedef void (APIENTRYP PFNGLWINDOWPOS2FVMESAPROC) (const GLfloat *v);
+typedef void (APIENTRYP PFNGLWINDOWPOS2IMESAPROC) (GLint x, GLint y);
+typedef void (APIENTRYP PFNGLWINDOWPOS2IVMESAPROC) (const GLint *v);
+typedef void (APIENTRYP PFNGLWINDOWPOS2SMESAPROC) (GLshort x, GLshort y);
+typedef void (APIENTRYP PFNGLWINDOWPOS2SVMESAPROC) (const GLshort *v);
+typedef void (APIENTRYP PFNGLWINDOWPOS3DMESAPROC) (GLdouble x, GLdouble y, GLdouble z);
+typedef void (APIENTRYP PFNGLWINDOWPOS3DVMESAPROC) (const GLdouble *v);
+typedef void (APIENTRYP PFNGLWINDOWPOS3FMESAPROC) (GLfloat x, GLfloat y, GLfloat z);
+typedef void (APIENTRYP PFNGLWINDOWPOS3FVMESAPROC) (const GLfloat *v);
+typedef void (APIENTRYP PFNGLWINDOWPOS3IMESAPROC) (GLint x, GLint y, GLint z);
+typedef void (APIENTRYP PFNGLWINDOWPOS3IVMESAPROC) (const GLint *v);
+typedef void (APIENTRYP PFNGLWINDOWPOS3SMESAPROC) (GLshort x, GLshort y, GLshort z);
+typedef void (APIENTRYP PFNGLWINDOWPOS3SVMESAPROC) (const GLshort *v);
+typedef void (APIENTRYP PFNGLWINDOWPOS4DMESAPROC) (GLdouble x, GLdouble y, GLdouble z, GLdouble w);
+typedef void (APIENTRYP PFNGLWINDOWPOS4DVMESAPROC) (const GLdouble *v);
+typedef void (APIENTRYP PFNGLWINDOWPOS4FMESAPROC) (GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+typedef void (APIENTRYP PFNGLWINDOWPOS4FVMESAPROC) (const GLfloat *v);
+typedef void (APIENTRYP PFNGLWINDOWPOS4IMESAPROC) (GLint x, GLint y, GLint z, GLint w);
+typedef void (APIENTRYP PFNGLWINDOWPOS4IVMESAPROC) (const GLint *v);
+typedef void (APIENTRYP PFNGLWINDOWPOS4SMESAPROC) (GLshort x, GLshort y, GLshort z, GLshort w);
+typedef void (APIENTRYP PFNGLWINDOWPOS4SVMESAPROC) (const GLshort *v);
+#endif
+
+#ifndef GL_IBM_cull_vertex
+#define GL_IBM_cull_vertex 1
+#endif
+
+#ifndef GL_IBM_multimode_draw_arrays
+#define GL_IBM_multimode_draw_arrays 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glMultiModeDrawArraysIBM (const GLenum *mode, const GLint *first, const GLsizei *count, GLsizei primcount, GLint modestride);
+GLAPI void APIENTRY glMultiModeDrawElementsIBM (const GLenum *mode, const GLsizei *count, GLenum type, const GLvoid* const *indices, GLsizei primcount, GLint modestride);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLMULTIMODEDRAWARRAYSIBMPROC) (const GLenum *mode, const GLint *first, const GLsizei *count, GLsizei primcount, GLint modestride);
+typedef void (APIENTRYP PFNGLMULTIMODEDRAWELEMENTSIBMPROC) (const GLenum *mode, const GLsizei *count, GLenum type, const GLvoid* const *indices, GLsizei primcount, GLint modestride);
+#endif
+
+#ifndef GL_IBM_vertex_array_lists
+#define GL_IBM_vertex_array_lists 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glColorPointerListIBM (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride);
+GLAPI void APIENTRY glSecondaryColorPointerListIBM (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride);
+GLAPI void APIENTRY glEdgeFlagPointerListIBM (GLint stride, const GLboolean* *pointer, GLint ptrstride);
+GLAPI void APIENTRY glFogCoordPointerListIBM (GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride);
+GLAPI void APIENTRY glIndexPointerListIBM (GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride);
+GLAPI void APIENTRY glNormalPointerListIBM (GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride);
+GLAPI void APIENTRY glTexCoordPointerListIBM (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride);
+GLAPI void APIENTRY glVertexPointerListIBM (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLCOLORPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride);
+typedef void (APIENTRYP PFNGLSECONDARYCOLORPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride);
+typedef void (APIENTRYP PFNGLEDGEFLAGPOINTERLISTIBMPROC) (GLint stride, const GLboolean* *pointer, GLint ptrstride);
+typedef void (APIENTRYP PFNGLFOGCOORDPOINTERLISTIBMPROC) (GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride);
+typedef void (APIENTRYP PFNGLINDEXPOINTERLISTIBMPROC) (GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride);
+typedef void (APIENTRYP PFNGLNORMALPOINTERLISTIBMPROC) (GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride);
+typedef void (APIENTRYP PFNGLTEXCOORDPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride);
+typedef void (APIENTRYP PFNGLVERTEXPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride);
+#endif
+
+#ifndef GL_SGIX_subsample
+#define GL_SGIX_subsample 1
+#endif
+
+#ifndef GL_SGIX_ycrcba
+#define GL_SGIX_ycrcba 1
+#endif
+
+#ifndef GL_SGIX_ycrcb_subsample
+#define GL_SGIX_ycrcb_subsample 1
+#endif
+
+#ifndef GL_SGIX_depth_pass_instrument
+#define GL_SGIX_depth_pass_instrument 1
+#endif
+
+#ifndef GL_3DFX_texture_compression_FXT1
+#define GL_3DFX_texture_compression_FXT1 1
+#endif
+
+#ifndef GL_3DFX_multisample
+#define GL_3DFX_multisample 1
+#endif
+
+#ifndef GL_3DFX_tbuffer
+#define GL_3DFX_tbuffer 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glTbufferMask3DFX (GLuint mask);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLTBUFFERMASK3DFXPROC) (GLuint mask);
+#endif
+
+#ifndef GL_EXT_multisample
+#define GL_EXT_multisample 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glSampleMaskEXT (GLclampf value, GLboolean invert);
+GLAPI void APIENTRY glSamplePatternEXT (GLenum pattern);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLSAMPLEMASKEXTPROC) (GLclampf value, GLboolean invert);
+typedef void (APIENTRYP PFNGLSAMPLEPATTERNEXTPROC) (GLenum pattern);
+#endif
+
+#ifndef GL_SGIX_vertex_preclip
+#define GL_SGIX_vertex_preclip 1
+#endif
+
+#ifndef GL_SGIX_convolution_accuracy
+#define GL_SGIX_convolution_accuracy 1
+#endif
+
+#ifndef GL_SGIX_resample
+#define GL_SGIX_resample 1
+#endif
+
+#ifndef GL_SGIS_point_line_texgen
+#define GL_SGIS_point_line_texgen 1
+#endif
+
+#ifndef GL_SGIS_texture_color_mask
+#define GL_SGIS_texture_color_mask 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glTextureColorMaskSGIS (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLTEXTURECOLORMASKSGISPROC) (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
+#endif
+
+#ifndef GL_SGIX_igloo_interface
+#define GL_SGIX_igloo_interface 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glIglooInterfaceSGIX (GLenum pname, const GLvoid *params);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLIGLOOINTERFACESGIXPROC) (GLenum pname, const GLvoid *params);
+#endif
+
+#ifndef GL_EXT_texture_env_dot3
+#define GL_EXT_texture_env_dot3 1
+#endif
+
+#ifndef GL_ATI_texture_mirror_once
+#define GL_ATI_texture_mirror_once 1
+#endif
+
+#ifndef GL_NV_fence
+#define GL_NV_fence 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glDeleteFencesNV (GLsizei n, const GLuint *fences);
+GLAPI void APIENTRY glGenFencesNV (GLsizei n, GLuint *fences);
+GLAPI GLboolean APIENTRY glIsFenceNV (GLuint fence);
+GLAPI GLboolean APIENTRY glTestFenceNV (GLuint fence);
+GLAPI void APIENTRY glGetFenceivNV (GLuint fence, GLenum pname, GLint *params);
+GLAPI void APIENTRY glFinishFenceNV (GLuint fence);
+GLAPI void APIENTRY glSetFenceNV (GLuint fence, GLenum condition);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLDELETEFENCESNVPROC) (GLsizei n, const GLuint *fences);
+typedef void (APIENTRYP PFNGLGENFENCESNVPROC) (GLsizei n, GLuint *fences);
+typedef GLboolean (APIENTRYP PFNGLISFENCENVPROC) (GLuint fence);
+typedef GLboolean (APIENTRYP PFNGLTESTFENCENVPROC) (GLuint fence);
+typedef void (APIENTRYP PFNGLGETFENCEIVNVPROC) (GLuint fence, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLFINISHFENCENVPROC) (GLuint fence);
+typedef void (APIENTRYP PFNGLSETFENCENVPROC) (GLuint fence, GLenum condition);
+#endif
+
+#ifndef GL_NV_evaluators
+#define GL_NV_evaluators 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glMapControlPointsNV (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLint uorder, GLint vorder, GLboolean packed, const GLvoid *points);
+GLAPI void APIENTRY glMapParameterivNV (GLenum target, GLenum pname, const GLint *params);
+GLAPI void APIENTRY glMapParameterfvNV (GLenum target, GLenum pname, const GLfloat *params);
+GLAPI void APIENTRY glGetMapControlPointsNV (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLboolean packed, GLvoid *points);
+GLAPI void APIENTRY glGetMapParameterivNV (GLenum target, GLenum pname, GLint *params);
+GLAPI void APIENTRY glGetMapParameterfvNV (GLenum target, GLenum pname, GLfloat *params);
+GLAPI void APIENTRY glGetMapAttribParameterivNV (GLenum target, GLuint index, GLenum pname, GLint *params);
+GLAPI void APIENTRY glGetMapAttribParameterfvNV (GLenum target, GLuint index, GLenum pname, GLfloat *params);
+GLAPI void APIENTRY glEvalMapsNV (GLenum target, GLenum mode);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLMAPCONTROLPOINTSNVPROC) (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLint uorder, GLint vorder, GLboolean packed, const GLvoid *points);
+typedef void (APIENTRYP PFNGLMAPPARAMETERIVNVPROC) (GLenum target, GLenum pname, const GLint *params);
+typedef void (APIENTRYP PFNGLMAPPARAMETERFVNVPROC) (GLenum target, GLenum pname, const GLfloat *params);
+typedef void (APIENTRYP PFNGLGETMAPCONTROLPOINTSNVPROC) (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLboolean packed, GLvoid *points);
+typedef void (APIENTRYP PFNGLGETMAPPARAMETERIVNVPROC) (GLenum target, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLGETMAPPARAMETERFVNVPROC) (GLenum target, GLenum pname, GLfloat *params);
+typedef void (APIENTRYP PFNGLGETMAPATTRIBPARAMETERIVNVPROC) (GLenum target, GLuint index, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLGETMAPATTRIBPARAMETERFVNVPROC) (GLenum target, GLuint index, GLenum pname, GLfloat *params);
+typedef void (APIENTRYP PFNGLEVALMAPSNVPROC) (GLenum target, GLenum mode);
+#endif
+
+#ifndef GL_NV_packed_depth_stencil
+#define GL_NV_packed_depth_stencil 1
+#endif
+
+#ifndef GL_NV_register_combiners2
+#define GL_NV_register_combiners2 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glCombinerStageParameterfvNV (GLenum stage, GLenum pname, const GLfloat *params);
+GLAPI void APIENTRY glGetCombinerStageParameterfvNV (GLenum stage, GLenum pname, GLfloat *params);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLCOMBINERSTAGEPARAMETERFVNVPROC) (GLenum stage, GLenum pname, const GLfloat *params);
+typedef void (APIENTRYP PFNGLGETCOMBINERSTAGEPARAMETERFVNVPROC) (GLenum stage, GLenum pname, GLfloat *params);
+#endif
+
+#ifndef GL_NV_texture_compression_vtc
+#define GL_NV_texture_compression_vtc 1
+#endif
+
+#ifndef GL_NV_texture_rectangle
+#define GL_NV_texture_rectangle 1
+#endif
+
+#ifndef GL_NV_texture_shader
+#define GL_NV_texture_shader 1
+#endif
+
+#ifndef GL_NV_texture_shader2
+#define GL_NV_texture_shader2 1
+#endif
+
+#ifndef GL_NV_vertex_array_range2
+#define GL_NV_vertex_array_range2 1
+#endif
+
+#ifndef GL_NV_vertex_program
+#define GL_NV_vertex_program 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI GLboolean APIENTRY glAreProgramsResidentNV (GLsizei n, const GLuint *programs, GLboolean *residences);
+GLAPI void APIENTRY glBindProgramNV (GLenum target, GLuint id);
+GLAPI void APIENTRY glDeleteProgramsNV (GLsizei n, const GLuint *programs);
+GLAPI void APIENTRY glExecuteProgramNV (GLenum target, GLuint id, const GLfloat *params);
+GLAPI void APIENTRY glGenProgramsNV (GLsizei n, GLuint *programs);
+GLAPI void APIENTRY glGetProgramParameterdvNV (GLenum target, GLuint index, GLenum pname, GLdouble *params);
+GLAPI void APIENTRY glGetProgramParameterfvNV (GLenum target, GLuint index, GLenum pname, GLfloat *params);
+GLAPI void APIENTRY glGetProgramivNV (GLuint id, GLenum pname, GLint *params);
+GLAPI void APIENTRY glGetProgramStringNV (GLuint id, GLenum pname, GLubyte *program);
+GLAPI void APIENTRY glGetTrackMatrixivNV (GLenum target, GLuint address, GLenum pname, GLint *params);
+GLAPI void APIENTRY glGetVertexAttribdvNV (GLuint index, GLenum pname, GLdouble *params);
+GLAPI void APIENTRY glGetVertexAttribfvNV (GLuint index, GLenum pname, GLfloat *params);
+GLAPI void APIENTRY glGetVertexAttribivNV (GLuint index, GLenum pname, GLint *params);
+GLAPI void APIENTRY glGetVertexAttribPointervNV (GLuint index, GLenum pname, GLvoid* *pointer);
+GLAPI GLboolean APIENTRY glIsProgramNV (GLuint id);
+GLAPI void APIENTRY glLoadProgramNV (GLenum target, GLuint id, GLsizei len, const GLubyte *program);
+GLAPI void APIENTRY glProgramParameter4dNV (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
+GLAPI void APIENTRY glProgramParameter4dvNV (GLenum target, GLuint index, const GLdouble *v);
+GLAPI void APIENTRY glProgramParameter4fNV (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+GLAPI void APIENTRY glProgramParameter4fvNV (GLenum target, GLuint index, const GLfloat *v);
+GLAPI void APIENTRY glProgramParameters4dvNV (GLenum target, GLuint index, GLuint count, const GLdouble *v);
+GLAPI void APIENTRY glProgramParameters4fvNV (GLenum target, GLuint index, GLuint count, const GLfloat *v);
+GLAPI void APIENTRY glRequestResidentProgramsNV (GLsizei n, const GLuint *programs);
+GLAPI void APIENTRY glTrackMatrixNV (GLenum target, GLuint address, GLenum matrix, GLenum transform);
+GLAPI void APIENTRY glVertexAttribPointerNV (GLuint index, GLint fsize, GLenum type, GLsizei stride, const GLvoid *pointer);
+GLAPI void APIENTRY glVertexAttrib1dNV (GLuint index, GLdouble x);
+GLAPI void APIENTRY glVertexAttrib1dvNV (GLuint index, const GLdouble *v);
+GLAPI void APIENTRY glVertexAttrib1fNV (GLuint index, GLfloat x);
+GLAPI void APIENTRY glVertexAttrib1fvNV (GLuint index, const GLfloat *v);
+GLAPI void APIENTRY glVertexAttrib1sNV (GLuint index, GLshort x);
+GLAPI void APIENTRY glVertexAttrib1svNV (GLuint index, const GLshort *v);
+GLAPI void APIENTRY glVertexAttrib2dNV (GLuint index, GLdouble x, GLdouble y);
+GLAPI void APIENTRY glVertexAttrib2dvNV (GLuint index, const GLdouble *v);
+GLAPI void APIENTRY glVertexAttrib2fNV (GLuint index, GLfloat x, GLfloat y);
+GLAPI void APIENTRY glVertexAttrib2fvNV (GLuint index, const GLfloat *v);
+GLAPI void APIENTRY glVertexAttrib2sNV (GLuint index, GLshort x, GLshort y);
+GLAPI void APIENTRY glVertexAttrib2svNV (GLuint index, const GLshort *v);
+GLAPI void APIENTRY glVertexAttrib3dNV (GLuint index, GLdouble x, GLdouble y, GLdouble z);
+GLAPI void APIENTRY glVertexAttrib3dvNV (GLuint index, const GLdouble *v);
+GLAPI void APIENTRY glVertexAttrib3fNV (GLuint index, GLfloat x, GLfloat y, GLfloat z);
+GLAPI void APIENTRY glVertexAttrib3fvNV (GLuint index, const GLfloat *v);
+GLAPI void APIENTRY glVertexAttrib3sNV (GLuint index, GLshort x, GLshort y, GLshort z);
+GLAPI void APIENTRY glVertexAttrib3svNV (GLuint index, const GLshort *v);
+GLAPI void APIENTRY glVertexAttrib4dNV (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
+GLAPI void APIENTRY glVertexAttrib4dvNV (GLuint index, const GLdouble *v);
+GLAPI void APIENTRY glVertexAttrib4fNV (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+GLAPI void APIENTRY glVertexAttrib4fvNV (GLuint index, const GLfloat *v);
+GLAPI void APIENTRY glVertexAttrib4sNV (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w);
+GLAPI void APIENTRY glVertexAttrib4svNV (GLuint index, const GLshort *v);
+GLAPI void APIENTRY glVertexAttrib4ubNV (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);
+GLAPI void APIENTRY glVertexAttrib4ubvNV (GLuint index, const GLubyte *v);
+GLAPI void APIENTRY glVertexAttribs1dvNV (GLuint index, GLsizei count, const GLdouble *v);
+GLAPI void APIENTRY glVertexAttribs1fvNV (GLuint index, GLsizei count, const GLfloat *v);
+GLAPI void APIENTRY glVertexAttribs1svNV (GLuint index, GLsizei count, const GLshort *v);
+GLAPI void APIENTRY glVertexAttribs2dvNV (GLuint index, GLsizei count, const GLdouble *v);
+GLAPI void APIENTRY glVertexAttribs2fvNV (GLuint index, GLsizei count, const GLfloat *v);
+GLAPI void APIENTRY glVertexAttribs2svNV (GLuint index, GLsizei count, const GLshort *v);
+GLAPI void APIENTRY glVertexAttribs3dvNV (GLuint index, GLsizei count, const GLdouble *v);
+GLAPI void APIENTRY glVertexAttribs3fvNV (GLuint index, GLsizei count, const GLfloat *v);
+GLAPI void APIENTRY glVertexAttribs3svNV (GLuint index, GLsizei count, const GLshort *v);
+GLAPI void APIENTRY glVertexAttribs4dvNV (GLuint index, GLsizei count, const GLdouble *v);
+GLAPI void APIENTRY glVertexAttribs4fvNV (GLuint index, GLsizei count, const GLfloat *v);
+GLAPI void APIENTRY glVertexAttribs4svNV (GLuint index, GLsizei count, const GLshort *v);
+GLAPI void APIENTRY glVertexAttribs4ubvNV (GLuint index, GLsizei count, const GLubyte *v);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef GLboolean (APIENTRYP PFNGLAREPROGRAMSRESIDENTNVPROC) (GLsizei n, const GLuint *programs, GLboolean *residences);
+typedef void (APIENTRYP PFNGLBINDPROGRAMNVPROC) (GLenum target, GLuint id);
+typedef void (APIENTRYP PFNGLDELETEPROGRAMSNVPROC) (GLsizei n, const GLuint *programs);
+typedef void (APIENTRYP PFNGLEXECUTEPROGRAMNVPROC) (GLenum target, GLuint id, const GLfloat *params);
+typedef void (APIENTRYP PFNGLGENPROGRAMSNVPROC) (GLsizei n, GLuint *programs);
+typedef void (APIENTRYP PFNGLGETPROGRAMPARAMETERDVNVPROC) (GLenum target, GLuint index, GLenum pname, GLdouble *params);
+typedef void (APIENTRYP PFNGLGETPROGRAMPARAMETERFVNVPROC) (GLenum target, GLuint index, GLenum pname, GLfloat *params);
+typedef void (APIENTRYP PFNGLGETPROGRAMIVNVPROC) (GLuint id, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLGETPROGRAMSTRINGNVPROC) (GLuint id, GLenum pname, GLubyte *program);
+typedef void (APIENTRYP PFNGLGETTRACKMATRIXIVNVPROC) (GLenum target, GLuint address, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBDVNVPROC) (GLuint index, GLenum pname, GLdouble *params);
+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBFVNVPROC) (GLuint index, GLenum pname, GLfloat *params);
+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIVNVPROC) (GLuint index, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVNVPROC) (GLuint index, GLenum pname, GLvoid* *pointer);
+typedef GLboolean (APIENTRYP PFNGLISPROGRAMNVPROC) (GLuint id);
+typedef void (APIENTRYP PFNGLLOADPROGRAMNVPROC) (GLenum target, GLuint id, GLsizei len, const GLubyte *program);
+typedef void (APIENTRYP PFNGLPROGRAMPARAMETER4DNVPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
+typedef void (APIENTRYP PFNGLPROGRAMPARAMETER4DVNVPROC) (GLenum target, GLuint index, const GLdouble *v);
+typedef void (APIENTRYP PFNGLPROGRAMPARAMETER4FNVPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+typedef void (APIENTRYP PFNGLPROGRAMPARAMETER4FVNVPROC) (GLenum target, GLuint index, const GLfloat *v);
+typedef void (APIENTRYP PFNGLPROGRAMPARAMETERS4DVNVPROC) (GLenum target, GLuint index, GLuint count, const GLdouble *v);
+typedef void (APIENTRYP PFNGLPROGRAMPARAMETERS4FVNVPROC) (GLenum target, GLuint index, GLuint count, const GLfloat *v);
+typedef void (APIENTRYP PFNGLREQUESTRESIDENTPROGRAMSNVPROC) (GLsizei n, const GLuint *programs);
+typedef void (APIENTRYP PFNGLTRACKMATRIXNVPROC) (GLenum target, GLuint address, GLenum matrix, GLenum transform);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBPOINTERNVPROC) (GLuint index, GLint fsize, GLenum type, GLsizei stride, const GLvoid *pointer);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB1DNVPROC) (GLuint index, GLdouble x);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB1DVNVPROC) (GLuint index, const GLdouble *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB1FNVPROC) (GLuint index, GLfloat x);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB1FVNVPROC) (GLuint index, const GLfloat *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB1SNVPROC) (GLuint index, GLshort x);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB1SVNVPROC) (GLuint index, const GLshort *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB2DNVPROC) (GLuint index, GLdouble x, GLdouble y);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB2DVNVPROC) (GLuint index, const GLdouble *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB2FNVPROC) (GLuint index, GLfloat x, GLfloat y);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB2FVNVPROC) (GLuint index, const GLfloat *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB2SNVPROC) (GLuint index, GLshort x, GLshort y);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB2SVNVPROC) (GLuint index, const GLshort *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB3DNVPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB3DVNVPROC) (GLuint index, const GLdouble *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB3FNVPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB3FVNVPROC) (GLuint index, const GLfloat *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB3SNVPROC) (GLuint index, GLshort x, GLshort y, GLshort z);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB3SVNVPROC) (GLuint index, const GLshort *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4DNVPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4DVNVPROC) (GLuint index, const GLdouble *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4FNVPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4FVNVPROC) (GLuint index, const GLfloat *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4SNVPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4SVNVPROC) (GLuint index, const GLshort *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4UBNVPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4UBVNVPROC) (GLuint index, const GLubyte *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBS1DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBS1FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBS1SVNVPROC) (GLuint index, GLsizei count, const GLshort *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBS2DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBS2FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBS2SVNVPROC) (GLuint index, GLsizei count, const GLshort *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBS3DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBS3FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBS3SVNVPROC) (GLuint index, GLsizei count, const GLshort *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBS4DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBS4FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBS4SVNVPROC) (GLuint index, GLsizei count, const GLshort *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBS4UBVNVPROC) (GLuint index, GLsizei count, const GLubyte *v);
+#endif
+
+#ifndef GL_SGIX_texture_coordinate_clamp
+#define GL_SGIX_texture_coordinate_clamp 1
+#endif
+
+#ifndef GL_SGIX_scalebias_hint
+#define GL_SGIX_scalebias_hint 1
+#endif
+
+#ifndef GL_OML_interlace
+#define GL_OML_interlace 1
+#endif
+
+#ifndef GL_OML_subsample
+#define GL_OML_subsample 1
+#endif
+
+#ifndef GL_OML_resample
+#define GL_OML_resample 1
+#endif
+
+#ifndef GL_NV_copy_depth_to_color
+#define GL_NV_copy_depth_to_color 1
+#endif
+
+#ifndef GL_ATI_envmap_bumpmap
+#define GL_ATI_envmap_bumpmap 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glTexBumpParameterivATI (GLenum pname, const GLint *param);
+GLAPI void APIENTRY glTexBumpParameterfvATI (GLenum pname, const GLfloat *param);
+GLAPI void APIENTRY glGetTexBumpParameterivATI (GLenum pname, GLint *param);
+GLAPI void APIENTRY glGetTexBumpParameterfvATI (GLenum pname, GLfloat *param);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLTEXBUMPPARAMETERIVATIPROC) (GLenum pname, const GLint *param);
+typedef void (APIENTRYP PFNGLTEXBUMPPARAMETERFVATIPROC) (GLenum pname, const GLfloat *param);
+typedef void (APIENTRYP PFNGLGETTEXBUMPPARAMETERIVATIPROC) (GLenum pname, GLint *param);
+typedef void (APIENTRYP PFNGLGETTEXBUMPPARAMETERFVATIPROC) (GLenum pname, GLfloat *param);
+#endif
+
+#ifndef GL_ATI_fragment_shader
+#define GL_ATI_fragment_shader 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI GLuint APIENTRY glGenFragmentShadersATI (GLuint range);
+GLAPI void APIENTRY glBindFragmentShaderATI (GLuint id);
+GLAPI void APIENTRY glDeleteFragmentShaderATI (GLuint id);
+GLAPI void APIENTRY glBeginFragmentShaderATI (void);
+GLAPI void APIENTRY glEndFragmentShaderATI (void);
+GLAPI void APIENTRY glPassTexCoordATI (GLuint dst, GLuint coord, GLenum swizzle);
+GLAPI void APIENTRY glSampleMapATI (GLuint dst, GLuint interp, GLenum swizzle);
+GLAPI void APIENTRY glColorFragmentOp1ATI (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod);
+GLAPI void APIENTRY glColorFragmentOp2ATI (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod);
+GLAPI void APIENTRY glColorFragmentOp3ATI (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod);
+GLAPI void APIENTRY glAlphaFragmentOp1ATI (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod);
+GLAPI void APIENTRY glAlphaFragmentOp2ATI (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod);
+GLAPI void APIENTRY glAlphaFragmentOp3ATI (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod);
+GLAPI void APIENTRY glSetFragmentShaderConstantATI (GLuint dst, const GLfloat *value);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef GLuint (APIENTRYP PFNGLGENFRAGMENTSHADERSATIPROC) (GLuint range);
+typedef void (APIENTRYP PFNGLBINDFRAGMENTSHADERATIPROC) (GLuint id);
+typedef void (APIENTRYP PFNGLDELETEFRAGMENTSHADERATIPROC) (GLuint id);
+typedef void (APIENTRYP PFNGLBEGINFRAGMENTSHADERATIPROC) (void);
+typedef void (APIENTRYP PFNGLENDFRAGMENTSHADERATIPROC) (void);
+typedef void (APIENTRYP PFNGLPASSTEXCOORDATIPROC) (GLuint dst, GLuint coord, GLenum swizzle);
+typedef void (APIENTRYP PFNGLSAMPLEMAPATIPROC) (GLuint dst, GLuint interp, GLenum swizzle);
+typedef void (APIENTRYP PFNGLCOLORFRAGMENTOP1ATIPROC) (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod);
+typedef void (APIENTRYP PFNGLCOLORFRAGMENTOP2ATIPROC) (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod);
+typedef void (APIENTRYP PFNGLCOLORFRAGMENTOP3ATIPROC) (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod);
+typedef void (APIENTRYP PFNGLALPHAFRAGMENTOP1ATIPROC) (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod);
+typedef void (APIENTRYP PFNGLALPHAFRAGMENTOP2ATIPROC) (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod);
+typedef void (APIENTRYP PFNGLALPHAFRAGMENTOP3ATIPROC) (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod);
+typedef void (APIENTRYP PFNGLSETFRAGMENTSHADERCONSTANTATIPROC) (GLuint dst, const GLfloat *value);
+#endif
+
+#ifndef GL_ATI_pn_triangles
+#define GL_ATI_pn_triangles 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glPNTrianglesiATI (GLenum pname, GLint param);
+GLAPI void APIENTRY glPNTrianglesfATI (GLenum pname, GLfloat param);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLPNTRIANGLESIATIPROC) (GLenum pname, GLint param);
+typedef void (APIENTRYP PFNGLPNTRIANGLESFATIPROC) (GLenum pname, GLfloat param);
+#endif
+
+#ifndef GL_ATI_vertex_array_object
+#define GL_ATI_vertex_array_object 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI GLuint APIENTRY glNewObjectBufferATI (GLsizei size, const GLvoid *pointer, GLenum usage);
+GLAPI GLboolean APIENTRY glIsObjectBufferATI (GLuint buffer);
+GLAPI void APIENTRY glUpdateObjectBufferATI (GLuint buffer, GLuint offset, GLsizei size, const GLvoid *pointer, GLenum preserve);
+GLAPI void APIENTRY glGetObjectBufferfvATI (GLuint buffer, GLenum pname, GLfloat *params);
+GLAPI void APIENTRY glGetObjectBufferivATI (GLuint buffer, GLenum pname, GLint *params);
+GLAPI void APIENTRY glFreeObjectBufferATI (GLuint buffer);
+GLAPI void APIENTRY glArrayObjectATI (GLenum array, GLint size, GLenum type, GLsizei stride, GLuint buffer, GLuint offset);
+GLAPI void APIENTRY glGetArrayObjectfvATI (GLenum array, GLenum pname, GLfloat *params);
+GLAPI void APIENTRY glGetArrayObjectivATI (GLenum array, GLenum pname, GLint *params);
+GLAPI void APIENTRY glVariantArrayObjectATI (GLuint id, GLenum type, GLsizei stride, GLuint buffer, GLuint offset);
+GLAPI void APIENTRY glGetVariantArrayObjectfvATI (GLuint id, GLenum pname, GLfloat *params);
+GLAPI void APIENTRY glGetVariantArrayObjectivATI (GLuint id, GLenum pname, GLint *params);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef GLuint (APIENTRYP PFNGLNEWOBJECTBUFFERATIPROC) (GLsizei size, const GLvoid *pointer, GLenum usage);
+typedef GLboolean (APIENTRYP PFNGLISOBJECTBUFFERATIPROC) (GLuint buffer);
+typedef void (APIENTRYP PFNGLUPDATEOBJECTBUFFERATIPROC) (GLuint buffer, GLuint offset, GLsizei size, const GLvoid *pointer, GLenum preserve);
+typedef void (APIENTRYP PFNGLGETOBJECTBUFFERFVATIPROC) (GLuint buffer, GLenum pname, GLfloat *params);
+typedef void (APIENTRYP PFNGLGETOBJECTBUFFERIVATIPROC) (GLuint buffer, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLFREEOBJECTBUFFERATIPROC) (GLuint buffer);
+typedef void (APIENTRYP PFNGLARRAYOBJECTATIPROC) (GLenum array, GLint size, GLenum type, GLsizei stride, GLuint buffer, GLuint offset);
+typedef void (APIENTRYP PFNGLGETARRAYOBJECTFVATIPROC) (GLenum array, GLenum pname, GLfloat *params);
+typedef void (APIENTRYP PFNGLGETARRAYOBJECTIVATIPROC) (GLenum array, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLVARIANTARRAYOBJECTATIPROC) (GLuint id, GLenum type, GLsizei stride, GLuint buffer, GLuint offset);
+typedef void (APIENTRYP PFNGLGETVARIANTARRAYOBJECTFVATIPROC) (GLuint id, GLenum pname, GLfloat *params);
+typedef void (APIENTRYP PFNGLGETVARIANTARRAYOBJECTIVATIPROC) (GLuint id, GLenum pname, GLint *params);
+#endif
+
+#ifndef GL_EXT_vertex_shader
+#define GL_EXT_vertex_shader 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glBeginVertexShaderEXT (void);
+GLAPI void APIENTRY glEndVertexShaderEXT (void);
+GLAPI void APIENTRY glBindVertexShaderEXT (GLuint id);
+GLAPI GLuint APIENTRY glGenVertexShadersEXT (GLuint range);
+GLAPI void APIENTRY glDeleteVertexShaderEXT (GLuint id);
+GLAPI void APIENTRY glShaderOp1EXT (GLenum op, GLuint res, GLuint arg1);
+GLAPI void APIENTRY glShaderOp2EXT (GLenum op, GLuint res, GLuint arg1, GLuint arg2);
+GLAPI void APIENTRY glShaderOp3EXT (GLenum op, GLuint res, GLuint arg1, GLuint arg2, GLuint arg3);
+GLAPI void APIENTRY glSwizzleEXT (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW);
+GLAPI void APIENTRY glWriteMaskEXT (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW);
+GLAPI void APIENTRY glInsertComponentEXT (GLuint res, GLuint src, GLuint num);
+GLAPI void APIENTRY glExtractComponentEXT (GLuint res, GLuint src, GLuint num);
+GLAPI GLuint APIENTRY glGenSymbolsEXT (GLenum datatype, GLenum storagetype, GLenum range, GLuint components);
+GLAPI void APIENTRY glSetInvariantEXT (GLuint id, GLenum type, const GLvoid *addr);
+GLAPI void APIENTRY glSetLocalConstantEXT (GLuint id, GLenum type, const GLvoid *addr);
+GLAPI void APIENTRY glVariantbvEXT (GLuint id, const GLbyte *addr);
+GLAPI void APIENTRY glVariantsvEXT (GLuint id, const GLshort *addr);
+GLAPI void APIENTRY glVariantivEXT (GLuint id, const GLint *addr);
+GLAPI void APIENTRY glVariantfvEXT (GLuint id, const GLfloat *addr);
+GLAPI void APIENTRY glVariantdvEXT (GLuint id, const GLdouble *addr);
+GLAPI void APIENTRY glVariantubvEXT (GLuint id, const GLubyte *addr);
+GLAPI void APIENTRY glVariantusvEXT (GLuint id, const GLushort *addr);
+GLAPI void APIENTRY glVariantuivEXT (GLuint id, const GLuint *addr);
+GLAPI void APIENTRY glVariantPointerEXT (GLuint id, GLenum type, GLuint stride, const GLvoid *addr);
+GLAPI void APIENTRY glEnableVariantClientStateEXT (GLuint id);
+GLAPI void APIENTRY glDisableVariantClientStateEXT (GLuint id);
+GLAPI GLuint APIENTRY glBindLightParameterEXT (GLenum light, GLenum value);
+GLAPI GLuint APIENTRY glBindMaterialParameterEXT (GLenum face, GLenum value);
+GLAPI GLuint APIENTRY glBindTexGenParameterEXT (GLenum unit, GLenum coord, GLenum value);
+GLAPI GLuint APIENTRY glBindTextureUnitParameterEXT (GLenum unit, GLenum value);
+GLAPI GLuint APIENTRY glBindParameterEXT (GLenum value);
+GLAPI GLboolean APIENTRY glIsVariantEnabledEXT (GLuint id, GLenum cap);
+GLAPI void APIENTRY glGetVariantBooleanvEXT (GLuint id, GLenum value, GLboolean *data);
+GLAPI void APIENTRY glGetVariantIntegervEXT (GLuint id, GLenum value, GLint *data);
+GLAPI void APIENTRY glGetVariantFloatvEXT (GLuint id, GLenum value, GLfloat *data);
+GLAPI void APIENTRY glGetVariantPointervEXT (GLuint id, GLenum value, GLvoid* *data);
+GLAPI void APIENTRY glGetInvariantBooleanvEXT (GLuint id, GLenum value, GLboolean *data);
+GLAPI void APIENTRY glGetInvariantIntegervEXT (GLuint id, GLenum value, GLint *data);
+GLAPI void APIENTRY glGetInvariantFloatvEXT (GLuint id, GLenum value, GLfloat *data);
+GLAPI void APIENTRY glGetLocalConstantBooleanvEXT (GLuint id, GLenum value, GLboolean *data);
+GLAPI void APIENTRY glGetLocalConstantIntegervEXT (GLuint id, GLenum value, GLint *data);
+GLAPI void APIENTRY glGetLocalConstantFloatvEXT (GLuint id, GLenum value, GLfloat *data);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLBEGINVERTEXSHADEREXTPROC) (void);
+typedef void (APIENTRYP PFNGLENDVERTEXSHADEREXTPROC) (void);
+typedef void (APIENTRYP PFNGLBINDVERTEXSHADEREXTPROC) (GLuint id);
+typedef GLuint (APIENTRYP PFNGLGENVERTEXSHADERSEXTPROC) (GLuint range);
+typedef void (APIENTRYP PFNGLDELETEVERTEXSHADEREXTPROC) (GLuint id);
+typedef void (APIENTRYP PFNGLSHADEROP1EXTPROC) (GLenum op, GLuint res, GLuint arg1);
+typedef void (APIENTRYP PFNGLSHADEROP2EXTPROC) (GLenum op, GLuint res, GLuint arg1, GLuint arg2);
+typedef void (APIENTRYP PFNGLSHADEROP3EXTPROC) (GLenum op, GLuint res, GLuint arg1, GLuint arg2, GLuint arg3);
+typedef void (APIENTRYP PFNGLSWIZZLEEXTPROC) (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW);
+typedef void (APIENTRYP PFNGLWRITEMASKEXTPROC) (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW);
+typedef void (APIENTRYP PFNGLINSERTCOMPONENTEXTPROC) (GLuint res, GLuint src, GLuint num);
+typedef void (APIENTRYP PFNGLEXTRACTCOMPONENTEXTPROC) (GLuint res, GLuint src, GLuint num);
+typedef GLuint (APIENTRYP PFNGLGENSYMBOLSEXTPROC) (GLenum datatype, GLenum storagetype, GLenum range, GLuint components);
+typedef void (APIENTRYP PFNGLSETINVARIANTEXTPROC) (GLuint id, GLenum type, const GLvoid *addr);
+typedef void (APIENTRYP PFNGLSETLOCALCONSTANTEXTPROC) (GLuint id, GLenum type, const GLvoid *addr);
+typedef void (APIENTRYP PFNGLVARIANTBVEXTPROC) (GLuint id, const GLbyte *addr);
+typedef void (APIENTRYP PFNGLVARIANTSVEXTPROC) (GLuint id, const GLshort *addr);
+typedef void (APIENTRYP PFNGLVARIANTIVEXTPROC) (GLuint id, const GLint *addr);
+typedef void (APIENTRYP PFNGLVARIANTFVEXTPROC) (GLuint id, const GLfloat *addr);
+typedef void (APIENTRYP PFNGLVARIANTDVEXTPROC) (GLuint id, const GLdouble *addr);
+typedef void (APIENTRYP PFNGLVARIANTUBVEXTPROC) (GLuint id, const GLubyte *addr);
+typedef void (APIENTRYP PFNGLVARIANTUSVEXTPROC) (GLuint id, const GLushort *addr);
+typedef void (APIENTRYP PFNGLVARIANTUIVEXTPROC) (GLuint id, const GLuint *addr);
+typedef void (APIENTRYP PFNGLVARIANTPOINTEREXTPROC) (GLuint id, GLenum type, GLuint stride, const GLvoid *addr);
+typedef void (APIENTRYP PFNGLENABLEVARIANTCLIENTSTATEEXTPROC) (GLuint id);
+typedef void (APIENTRYP PFNGLDISABLEVARIANTCLIENTSTATEEXTPROC) (GLuint id);
+typedef GLuint (APIENTRYP PFNGLBINDLIGHTPARAMETEREXTPROC) (GLenum light, GLenum value);
+typedef GLuint (APIENTRYP PFNGLBINDMATERIALPARAMETEREXTPROC) (GLenum face, GLenum value);
+typedef GLuint (APIENTRYP PFNGLBINDTEXGENPARAMETEREXTPROC) (GLenum unit, GLenum coord, GLenum value);
+typedef GLuint (APIENTRYP PFNGLBINDTEXTUREUNITPARAMETEREXTPROC) (GLenum unit, GLenum value);
+typedef GLuint (APIENTRYP PFNGLBINDPARAMETEREXTPROC) (GLenum value);
+typedef GLboolean (APIENTRYP PFNGLISVARIANTENABLEDEXTPROC) (GLuint id, GLenum cap);
+typedef void (APIENTRYP PFNGLGETVARIANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean *data);
+typedef void (APIENTRYP PFNGLGETVARIANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint *data);
+typedef void (APIENTRYP PFNGLGETVARIANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat *data);
+typedef void (APIENTRYP PFNGLGETVARIANTPOINTERVEXTPROC) (GLuint id, GLenum value, GLvoid* *data);
+typedef void (APIENTRYP PFNGLGETINVARIANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean *data);
+typedef void (APIENTRYP PFNGLGETINVARIANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint *data);
+typedef void (APIENTRYP PFNGLGETINVARIANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat *data);
+typedef void (APIENTRYP PFNGLGETLOCALCONSTANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean *data);
+typedef void (APIENTRYP PFNGLGETLOCALCONSTANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint *data);
+typedef void (APIENTRYP PFNGLGETLOCALCONSTANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat *data);
+#endif
+
+#ifndef GL_ATI_vertex_streams
+#define GL_ATI_vertex_streams 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glVertexStream1sATI (GLenum stream, GLshort x);
+GLAPI void APIENTRY glVertexStream1svATI (GLenum stream, const GLshort *coords);
+GLAPI void APIENTRY glVertexStream1iATI (GLenum stream, GLint x);
+GLAPI void APIENTRY glVertexStream1ivATI (GLenum stream, const GLint *coords);
+GLAPI void APIENTRY glVertexStream1fATI (GLenum stream, GLfloat x);
+GLAPI void APIENTRY glVertexStream1fvATI (GLenum stream, const GLfloat *coords);
+GLAPI void APIENTRY glVertexStream1dATI (GLenum stream, GLdouble x);
+GLAPI void APIENTRY glVertexStream1dvATI (GLenum stream, const GLdouble *coords);
+GLAPI void APIENTRY glVertexStream2sATI (GLenum stream, GLshort x, GLshort y);
+GLAPI void APIENTRY glVertexStream2svATI (GLenum stream, const GLshort *coords);
+GLAPI void APIENTRY glVertexStream2iATI (GLenum stream, GLint x, GLint y);
+GLAPI void APIENTRY glVertexStream2ivATI (GLenum stream, const GLint *coords);
+GLAPI void APIENTRY glVertexStream2fATI (GLenum stream, GLfloat x, GLfloat y);
+GLAPI void APIENTRY glVertexStream2fvATI (GLenum stream, const GLfloat *coords);
+GLAPI void APIENTRY glVertexStream2dATI (GLenum stream, GLdouble x, GLdouble y);
+GLAPI void APIENTRY glVertexStream2dvATI (GLenum stream, const GLdouble *coords);
+GLAPI void APIENTRY glVertexStream3sATI (GLenum stream, GLshort x, GLshort y, GLshort z);
+GLAPI void APIENTRY glVertexStream3svATI (GLenum stream, const GLshort *coords);
+GLAPI void APIENTRY glVertexStream3iATI (GLenum stream, GLint x, GLint y, GLint z);
+GLAPI void APIENTRY glVertexStream3ivATI (GLenum stream, const GLint *coords);
+GLAPI void APIENTRY glVertexStream3fATI (GLenum stream, GLfloat x, GLfloat y, GLfloat z);
+GLAPI void APIENTRY glVertexStream3fvATI (GLenum stream, const GLfloat *coords);
+GLAPI void APIENTRY glVertexStream3dATI (GLenum stream, GLdouble x, GLdouble y, GLdouble z);
+GLAPI void APIENTRY glVertexStream3dvATI (GLenum stream, const GLdouble *coords);
+GLAPI void APIENTRY glVertexStream4sATI (GLenum stream, GLshort x, GLshort y, GLshort z, GLshort w);
+GLAPI void APIENTRY glVertexStream4svATI (GLenum stream, const GLshort *coords);
+GLAPI void APIENTRY glVertexStream4iATI (GLenum stream, GLint x, GLint y, GLint z, GLint w);
+GLAPI void APIENTRY glVertexStream4ivATI (GLenum stream, const GLint *coords);
+GLAPI void APIENTRY glVertexStream4fATI (GLenum stream, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+GLAPI void APIENTRY glVertexStream4fvATI (GLenum stream, const GLfloat *coords);
+GLAPI void APIENTRY glVertexStream4dATI (GLenum stream, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
+GLAPI void APIENTRY glVertexStream4dvATI (GLenum stream, const GLdouble *coords);
+GLAPI void APIENTRY glNormalStream3bATI (GLenum stream, GLbyte nx, GLbyte ny, GLbyte nz);
+GLAPI void APIENTRY glNormalStream3bvATI (GLenum stream, const GLbyte *coords);
+GLAPI void APIENTRY glNormalStream3sATI (GLenum stream, GLshort nx, GLshort ny, GLshort nz);
+GLAPI void APIENTRY glNormalStream3svATI (GLenum stream, const GLshort *coords);
+GLAPI void APIENTRY glNormalStream3iATI (GLenum stream, GLint nx, GLint ny, GLint nz);
+GLAPI void APIENTRY glNormalStream3ivATI (GLenum stream, const GLint *coords);
+GLAPI void APIENTRY glNormalStream3fATI (GLenum stream, GLfloat nx, GLfloat ny, GLfloat nz);
+GLAPI void APIENTRY glNormalStream3fvATI (GLenum stream, const GLfloat *coords);
+GLAPI void APIENTRY glNormalStream3dATI (GLenum stream, GLdouble nx, GLdouble ny, GLdouble nz);
+GLAPI void APIENTRY glNormalStream3dvATI (GLenum stream, const GLdouble *coords);
+GLAPI void APIENTRY glClientActiveVertexStreamATI (GLenum stream);
+GLAPI void APIENTRY glVertexBlendEnviATI (GLenum pname, GLint param);
+GLAPI void APIENTRY glVertexBlendEnvfATI (GLenum pname, GLfloat param);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLVERTEXSTREAM1SATIPROC) (GLenum stream, GLshort x);
+typedef void (APIENTRYP PFNGLVERTEXSTREAM1SVATIPROC) (GLenum stream, const GLshort *coords);
+typedef void (APIENTRYP PFNGLVERTEXSTREAM1IATIPROC) (GLenum stream, GLint x);
+typedef void (APIENTRYP PFNGLVERTEXSTREAM1IVATIPROC) (GLenum stream, const GLint *coords);
+typedef void (APIENTRYP PFNGLVERTEXSTREAM1FATIPROC) (GLenum stream, GLfloat x);
+typedef void (APIENTRYP PFNGLVERTEXSTREAM1FVATIPROC) (GLenum stream, const GLfloat *coords);
+typedef void (APIENTRYP PFNGLVERTEXSTREAM1DATIPROC) (GLenum stream, GLdouble x);
+typedef void (APIENTRYP PFNGLVERTEXSTREAM1DVATIPROC) (GLenum stream, const GLdouble *coords);
+typedef void (APIENTRYP PFNGLVERTEXSTREAM2SATIPROC) (GLenum stream, GLshort x, GLshort y);
+typedef void (APIENTRYP PFNGLVERTEXSTREAM2SVATIPROC) (GLenum stream, const GLshort *coords);
+typedef void (APIENTRYP PFNGLVERTEXSTREAM2IATIPROC) (GLenum stream, GLint x, GLint y);
+typedef void (APIENTRYP PFNGLVERTEXSTREAM2IVATIPROC) (GLenum stream, const GLint *coords);
+typedef void (APIENTRYP PFNGLVERTEXSTREAM2FATIPROC) (GLenum stream, GLfloat x, GLfloat y);
+typedef void (APIENTRYP PFNGLVERTEXSTREAM2FVATIPROC) (GLenum stream, const GLfloat *coords);
+typedef void (APIENTRYP PFNGLVERTEXSTREAM2DATIPROC) (GLenum stream, GLdouble x, GLdouble y);
+typedef void (APIENTRYP PFNGLVERTEXSTREAM2DVATIPROC) (GLenum stream, const GLdouble *coords);
+typedef void (APIENTRYP PFNGLVERTEXSTREAM3SATIPROC) (GLenum stream, GLshort x, GLshort y, GLshort z);
+typedef void (APIENTRYP PFNGLVERTEXSTREAM3SVATIPROC) (GLenum stream, const GLshort *coords);
+typedef void (APIENTRYP PFNGLVERTEXSTREAM3IATIPROC) (GLenum stream, GLint x, GLint y, GLint z);
+typedef void (APIENTRYP PFNGLVERTEXSTREAM3IVATIPROC) (GLenum stream, const GLint *coords);
+typedef void (APIENTRYP PFNGLVERTEXSTREAM3FATIPROC) (GLenum stream, GLfloat x, GLfloat y, GLfloat z);
+typedef void (APIENTRYP PFNGLVERTEXSTREAM3FVATIPROC) (GLenum stream, const GLfloat *coords);
+typedef void (APIENTRYP PFNGLVERTEXSTREAM3DATIPROC) (GLenum stream, GLdouble x, GLdouble y, GLdouble z);
+typedef void (APIENTRYP PFNGLVERTEXSTREAM3DVATIPROC) (GLenum stream, const GLdouble *coords);
+typedef void (APIENTRYP PFNGLVERTEXSTREAM4SATIPROC) (GLenum stream, GLshort x, GLshort y, GLshort z, GLshort w);
+typedef void (APIENTRYP PFNGLVERTEXSTREAM4SVATIPROC) (GLenum stream, const GLshort *coords);
+typedef void (APIENTRYP PFNGLVERTEXSTREAM4IATIPROC) (GLenum stream, GLint x, GLint y, GLint z, GLint w);
+typedef void (APIENTRYP PFNGLVERTEXSTREAM4IVATIPROC) (GLenum stream, const GLint *coords);
+typedef void (APIENTRYP PFNGLVERTEXSTREAM4FATIPROC) (GLenum stream, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+typedef void (APIENTRYP PFNGLVERTEXSTREAM4FVATIPROC) (GLenum stream, const GLfloat *coords);
+typedef void (APIENTRYP PFNGLVERTEXSTREAM4DATIPROC) (GLenum stream, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
+typedef void (APIENTRYP PFNGLVERTEXSTREAM4DVATIPROC) (GLenum stream, const GLdouble *coords);
+typedef void (APIENTRYP PFNGLNORMALSTREAM3BATIPROC) (GLenum stream, GLbyte nx, GLbyte ny, GLbyte nz);
+typedef void (APIENTRYP PFNGLNORMALSTREAM3BVATIPROC) (GLenum stream, const GLbyte *coords);
+typedef void (APIENTRYP PFNGLNORMALSTREAM3SATIPROC) (GLenum stream, GLshort nx, GLshort ny, GLshort nz);
+typedef void (APIENTRYP PFNGLNORMALSTREAM3SVATIPROC) (GLenum stream, const GLshort *coords);
+typedef void (APIENTRYP PFNGLNORMALSTREAM3IATIPROC) (GLenum stream, GLint nx, GLint ny, GLint nz);
+typedef void (APIENTRYP PFNGLNORMALSTREAM3IVATIPROC) (GLenum stream, const GLint *coords);
+typedef void (APIENTRYP PFNGLNORMALSTREAM3FATIPROC) (GLenum stream, GLfloat nx, GLfloat ny, GLfloat nz);
+typedef void (APIENTRYP PFNGLNORMALSTREAM3FVATIPROC) (GLenum stream, const GLfloat *coords);
+typedef void (APIENTRYP PFNGLNORMALSTREAM3DATIPROC) (GLenum stream, GLdouble nx, GLdouble ny, GLdouble nz);
+typedef void (APIENTRYP PFNGLNORMALSTREAM3DVATIPROC) (GLenum stream, const GLdouble *coords);
+typedef void (APIENTRYP PFNGLCLIENTACTIVEVERTEXSTREAMATIPROC) (GLenum stream);
+typedef void (APIENTRYP PFNGLVERTEXBLENDENVIATIPROC) (GLenum pname, GLint param);
+typedef void (APIENTRYP PFNGLVERTEXBLENDENVFATIPROC) (GLenum pname, GLfloat param);
+#endif
+
+#ifndef GL_ATI_element_array
+#define GL_ATI_element_array 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glElementPointerATI (GLenum type, const GLvoid *pointer);
+GLAPI void APIENTRY glDrawElementArrayATI (GLenum mode, GLsizei count);
+GLAPI void APIENTRY glDrawRangeElementArrayATI (GLenum mode, GLuint start, GLuint end, GLsizei count);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLELEMENTPOINTERATIPROC) (GLenum type, const GLvoid *pointer);
+typedef void (APIENTRYP PFNGLDRAWELEMENTARRAYATIPROC) (GLenum mode, GLsizei count);
+typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTARRAYATIPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count);
+#endif
+
+#ifndef GL_SUN_mesh_array
+#define GL_SUN_mesh_array 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glDrawMeshArraysSUN (GLenum mode, GLint first, GLsizei count, GLsizei width);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLDRAWMESHARRAYSSUNPROC) (GLenum mode, GLint first, GLsizei count, GLsizei width);
+#endif
+
+#ifndef GL_SUN_slice_accum
+#define GL_SUN_slice_accum 1
+#endif
+
+#ifndef GL_NV_multisample_filter_hint
+#define GL_NV_multisample_filter_hint 1
+#endif
+
+#ifndef GL_NV_depth_clamp
+#define GL_NV_depth_clamp 1
+#endif
+
+#ifndef GL_NV_occlusion_query
+#define GL_NV_occlusion_query 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glGenOcclusionQueriesNV (GLsizei n, GLuint *ids);
+GLAPI void APIENTRY glDeleteOcclusionQueriesNV (GLsizei n, const GLuint *ids);
+GLAPI GLboolean APIENTRY glIsOcclusionQueryNV (GLuint id);
+GLAPI void APIENTRY glBeginOcclusionQueryNV (GLuint id);
+GLAPI void APIENTRY glEndOcclusionQueryNV (void);
+GLAPI void APIENTRY glGetOcclusionQueryivNV (GLuint id, GLenum pname, GLint *params);
+GLAPI void APIENTRY glGetOcclusionQueryuivNV (GLuint id, GLenum pname, GLuint *params);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLGENOCCLUSIONQUERIESNVPROC) (GLsizei n, GLuint *ids);
+typedef void (APIENTRYP PFNGLDELETEOCCLUSIONQUERIESNVPROC) (GLsizei n, const GLuint *ids);
+typedef GLboolean (APIENTRYP PFNGLISOCCLUSIONQUERYNVPROC) (GLuint id);
+typedef void (APIENTRYP PFNGLBEGINOCCLUSIONQUERYNVPROC) (GLuint id);
+typedef void (APIENTRYP PFNGLENDOCCLUSIONQUERYNVPROC) (void);
+typedef void (APIENTRYP PFNGLGETOCCLUSIONQUERYIVNVPROC) (GLuint id, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLGETOCCLUSIONQUERYUIVNVPROC) (GLuint id, GLenum pname, GLuint *params);
+#endif
+
+#ifndef GL_NV_point_sprite
+#define GL_NV_point_sprite 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glPointParameteriNV (GLenum pname, GLint param);
+GLAPI void APIENTRY glPointParameterivNV (GLenum pname, const GLint *params);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLPOINTPARAMETERINVPROC) (GLenum pname, GLint param);
+typedef void (APIENTRYP PFNGLPOINTPARAMETERIVNVPROC) (GLenum pname, const GLint *params);
+#endif
+
+#ifndef GL_NV_texture_shader3
+#define GL_NV_texture_shader3 1
+#endif
+
+#ifndef GL_NV_vertex_program1_1
+#define GL_NV_vertex_program1_1 1
+#endif
+
+#ifndef GL_EXT_shadow_funcs
+#define GL_EXT_shadow_funcs 1
+#endif
+
+#ifndef GL_EXT_stencil_two_side
+#define GL_EXT_stencil_two_side 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glActiveStencilFaceEXT (GLenum face);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLACTIVESTENCILFACEEXTPROC) (GLenum face);
+#endif
+
+#ifndef GL_ATI_text_fragment_shader
+#define GL_ATI_text_fragment_shader 1
+#endif
+
+#ifndef GL_APPLE_client_storage
+#define GL_APPLE_client_storage 1
+#endif
+
+#ifndef GL_APPLE_element_array
+#define GL_APPLE_element_array 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glElementPointerAPPLE (GLenum type, const GLvoid *pointer);
+GLAPI void APIENTRY glDrawElementArrayAPPLE (GLenum mode, GLint first, GLsizei count);
+GLAPI void APIENTRY glDrawRangeElementArrayAPPLE (GLenum mode, GLuint start, GLuint end, GLint first, GLsizei count);
+GLAPI void APIENTRY glMultiDrawElementArrayAPPLE (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount);
+GLAPI void APIENTRY glMultiDrawRangeElementArrayAPPLE (GLenum mode, GLuint start, GLuint end, const GLint *first, const GLsizei *count, GLsizei primcount);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLELEMENTPOINTERAPPLEPROC) (GLenum type, const GLvoid *pointer);
+typedef void (APIENTRYP PFNGLDRAWELEMENTARRAYAPPLEPROC) (GLenum mode, GLint first, GLsizei count);
+typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTARRAYAPPLEPROC) (GLenum mode, GLuint start, GLuint end, GLint first, GLsizei count);
+typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTARRAYAPPLEPROC) (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount);
+typedef void (APIENTRYP PFNGLMULTIDRAWRANGEELEMENTARRAYAPPLEPROC) (GLenum mode, GLuint start, GLuint end, const GLint *first, const GLsizei *count, GLsizei primcount);
+#endif
+
+#ifndef GL_APPLE_fence
+#define GL_APPLE_fence 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glGenFencesAPPLE (GLsizei n, GLuint *fences);
+GLAPI void APIENTRY glDeleteFencesAPPLE (GLsizei n, const GLuint *fences);
+GLAPI void APIENTRY glSetFenceAPPLE (GLuint fence);
+GLAPI GLboolean APIENTRY glIsFenceAPPLE (GLuint fence);
+GLAPI GLboolean APIENTRY glTestFenceAPPLE (GLuint fence);
+GLAPI void APIENTRY glFinishFenceAPPLE (GLuint fence);
+GLAPI GLboolean APIENTRY glTestObjectAPPLE (GLenum object, GLuint name);
+GLAPI void APIENTRY glFinishObjectAPPLE (GLenum object, GLint name);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLGENFENCESAPPLEPROC) (GLsizei n, GLuint *fences);
+typedef void (APIENTRYP PFNGLDELETEFENCESAPPLEPROC) (GLsizei n, const GLuint *fences);
+typedef void (APIENTRYP PFNGLSETFENCEAPPLEPROC) (GLuint fence);
+typedef GLboolean (APIENTRYP PFNGLISFENCEAPPLEPROC) (GLuint fence);
+typedef GLboolean (APIENTRYP PFNGLTESTFENCEAPPLEPROC) (GLuint fence);
+typedef void (APIENTRYP PFNGLFINISHFENCEAPPLEPROC) (GLuint fence);
+typedef GLboolean (APIENTRYP PFNGLTESTOBJECTAPPLEPROC) (GLenum object, GLuint name);
+typedef void (APIENTRYP PFNGLFINISHOBJECTAPPLEPROC) (GLenum object, GLint name);
+#endif
+
+#ifndef GL_APPLE_vertex_array_object
+#define GL_APPLE_vertex_array_object 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glBindVertexArrayAPPLE (GLuint array);
+GLAPI void APIENTRY glDeleteVertexArraysAPPLE (GLsizei n, const GLuint *arrays);
+GLAPI void APIENTRY glGenVertexArraysAPPLE (GLsizei n, GLuint *arrays);
+GLAPI GLboolean APIENTRY glIsVertexArrayAPPLE (GLuint array);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLBINDVERTEXARRAYAPPLEPROC) (GLuint array);
+typedef void (APIENTRYP PFNGLDELETEVERTEXARRAYSAPPLEPROC) (GLsizei n, const GLuint *arrays);
+typedef void (APIENTRYP PFNGLGENVERTEXARRAYSAPPLEPROC) (GLsizei n, GLuint *arrays);
+typedef GLboolean (APIENTRYP PFNGLISVERTEXARRAYAPPLEPROC) (GLuint array);
+#endif
+
+#ifndef GL_APPLE_vertex_array_range
+#define GL_APPLE_vertex_array_range 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glVertexArrayRangeAPPLE (GLsizei length, GLvoid *pointer);
+GLAPI void APIENTRY glFlushVertexArrayRangeAPPLE (GLsizei length, GLvoid *pointer);
+GLAPI void APIENTRY glVertexArrayParameteriAPPLE (GLenum pname, GLint param);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLVERTEXARRAYRANGEAPPLEPROC) (GLsizei length, GLvoid *pointer);
+typedef void (APIENTRYP PFNGLFLUSHVERTEXARRAYRANGEAPPLEPROC) (GLsizei length, GLvoid *pointer);
+typedef void (APIENTRYP PFNGLVERTEXARRAYPARAMETERIAPPLEPROC) (GLenum pname, GLint param);
+#endif
+
+#ifndef GL_APPLE_ycbcr_422
+#define GL_APPLE_ycbcr_422 1
+#endif
+
+#ifndef GL_S3_s3tc
+#define GL_S3_s3tc 1
+#endif
+
+#ifndef GL_ATI_draw_buffers
+#define GL_ATI_draw_buffers 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glDrawBuffersATI (GLsizei n, const GLenum *bufs);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLDRAWBUFFERSATIPROC) (GLsizei n, const GLenum *bufs);
+#endif
+
+#ifndef GL_ATI_pixel_format_float
+#define GL_ATI_pixel_format_float 1
+/* This is really a WGL extension, but defines some associated GL enums.
+ * ATI does not export "GL_ATI_pixel_format_float" in the GL_EXTENSIONS string.
+ */
+#endif
+
+#ifndef GL_ATI_texture_env_combine3
+#define GL_ATI_texture_env_combine3 1
+#endif
+
+#ifndef GL_ATI_texture_float
+#define GL_ATI_texture_float 1
+#endif
+
+#ifndef GL_NV_float_buffer
+#define GL_NV_float_buffer 1
+#endif
+
+#ifndef GL_NV_fragment_program
+#define GL_NV_fragment_program 1
+/* Some NV_fragment_program entry points are shared with ARB_vertex_program. */
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glProgramNamedParameter4fNV (GLuint id, GLsizei len, const GLubyte *name, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+GLAPI void APIENTRY glProgramNamedParameter4dNV (GLuint id, GLsizei len, const GLubyte *name, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
+GLAPI void APIENTRY glProgramNamedParameter4fvNV (GLuint id, GLsizei len, const GLubyte *name, const GLfloat *v);
+GLAPI void APIENTRY glProgramNamedParameter4dvNV (GLuint id, GLsizei len, const GLubyte *name, const GLdouble *v);
+GLAPI void APIENTRY glGetProgramNamedParameterfvNV (GLuint id, GLsizei len, const GLubyte *name, GLfloat *params);
+GLAPI void APIENTRY glGetProgramNamedParameterdvNV (GLuint id, GLsizei len, const GLubyte *name, GLdouble *params);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4FNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+typedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4DNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
+typedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4FVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, const GLfloat *v);
+typedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4DVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, const GLdouble *v);
+typedef void (APIENTRYP PFNGLGETPROGRAMNAMEDPARAMETERFVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLfloat *params);
+typedef void (APIENTRYP PFNGLGETPROGRAMNAMEDPARAMETERDVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLdouble *params);
+#endif
+
+#ifndef GL_NV_half_float
+#define GL_NV_half_float 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glVertex2hNV (GLhalfNV x, GLhalfNV y);
+GLAPI void APIENTRY glVertex2hvNV (const GLhalfNV *v);
+GLAPI void APIENTRY glVertex3hNV (GLhalfNV x, GLhalfNV y, GLhalfNV z);
+GLAPI void APIENTRY glVertex3hvNV (const GLhalfNV *v);
+GLAPI void APIENTRY glVertex4hNV (GLhalfNV x, GLhalfNV y, GLhalfNV z, GLhalfNV w);
+GLAPI void APIENTRY glVertex4hvNV (const GLhalfNV *v);
+GLAPI void APIENTRY glNormal3hNV (GLhalfNV nx, GLhalfNV ny, GLhalfNV nz);
+GLAPI void APIENTRY glNormal3hvNV (const GLhalfNV *v);
+GLAPI void APIENTRY glColor3hNV (GLhalfNV red, GLhalfNV green, GLhalfNV blue);
+GLAPI void APIENTRY glColor3hvNV (const GLhalfNV *v);
+GLAPI void APIENTRY glColor4hNV (GLhalfNV red, GLhalfNV green, GLhalfNV blue, GLhalfNV alpha);
+GLAPI void APIENTRY glColor4hvNV (const GLhalfNV *v);
+GLAPI void APIENTRY glTexCoord1hNV (GLhalfNV s);
+GLAPI void APIENTRY glTexCoord1hvNV (const GLhalfNV *v);
+GLAPI void APIENTRY glTexCoord2hNV (GLhalfNV s, GLhalfNV t);
+GLAPI void APIENTRY glTexCoord2hvNV (const GLhalfNV *v);
+GLAPI void APIENTRY glTexCoord3hNV (GLhalfNV s, GLhalfNV t, GLhalfNV r);
+GLAPI void APIENTRY glTexCoord3hvNV (const GLhalfNV *v);
+GLAPI void APIENTRY glTexCoord4hNV (GLhalfNV s, GLhalfNV t, GLhalfNV r, GLhalfNV q);
+GLAPI void APIENTRY glTexCoord4hvNV (const GLhalfNV *v);
+GLAPI void APIENTRY glMultiTexCoord1hNV (GLenum target, GLhalfNV s);
+GLAPI void APIENTRY glMultiTexCoord1hvNV (GLenum target, const GLhalfNV *v);
+GLAPI void APIENTRY glMultiTexCoord2hNV (GLenum target, GLhalfNV s, GLhalfNV t);
+GLAPI void APIENTRY glMultiTexCoord2hvNV (GLenum target, const GLhalfNV *v);
+GLAPI void APIENTRY glMultiTexCoord3hNV (GLenum target, GLhalfNV s, GLhalfNV t, GLhalfNV r);
+GLAPI void APIENTRY glMultiTexCoord3hvNV (GLenum target, const GLhalfNV *v);
+GLAPI void APIENTRY glMultiTexCoord4hNV (GLenum target, GLhalfNV s, GLhalfNV t, GLhalfNV r, GLhalfNV q);
+GLAPI void APIENTRY glMultiTexCoord4hvNV (GLenum target, const GLhalfNV *v);
+GLAPI void APIENTRY glFogCoordhNV (GLhalfNV fog);
+GLAPI void APIENTRY glFogCoordhvNV (const GLhalfNV *fog);
+GLAPI void APIENTRY glSecondaryColor3hNV (GLhalfNV red, GLhalfNV green, GLhalfNV blue);
+GLAPI void APIENTRY glSecondaryColor3hvNV (const GLhalfNV *v);
+GLAPI void APIENTRY glVertexWeighthNV (GLhalfNV weight);
+GLAPI void APIENTRY glVertexWeighthvNV (const GLhalfNV *weight);
+GLAPI void APIENTRY glVertexAttrib1hNV (GLuint index, GLhalfNV x);
+GLAPI void APIENTRY glVertexAttrib1hvNV (GLuint index, const GLhalfNV *v);
+GLAPI void APIENTRY glVertexAttrib2hNV (GLuint index, GLhalfNV x, GLhalfNV y);
+GLAPI void APIENTRY glVertexAttrib2hvNV (GLuint index, const GLhalfNV *v);
+GLAPI void APIENTRY glVertexAttrib3hNV (GLuint index, GLhalfNV x, GLhalfNV y, GLhalfNV z);
+GLAPI void APIENTRY glVertexAttrib3hvNV (GLuint index, const GLhalfNV *v);
+GLAPI void APIENTRY glVertexAttrib4hNV (GLuint index, GLhalfNV x, GLhalfNV y, GLhalfNV z, GLhalfNV w);
+GLAPI void APIENTRY glVertexAttrib4hvNV (GLuint index, const GLhalfNV *v);
+GLAPI void APIENTRY glVertexAttribs1hvNV (GLuint index, GLsizei n, const GLhalfNV *v);
+GLAPI void APIENTRY glVertexAttribs2hvNV (GLuint index, GLsizei n, const GLhalfNV *v);
+GLAPI void APIENTRY glVertexAttribs3hvNV (GLuint index, GLsizei n, const GLhalfNV *v);
+GLAPI void APIENTRY glVertexAttribs4hvNV (GLuint index, GLsizei n, const GLhalfNV *v);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLVERTEX2HNVPROC) (GLhalfNV x, GLhalfNV y);
+typedef void (APIENTRYP PFNGLVERTEX2HVNVPROC) (const GLhalfNV *v);
+typedef void (APIENTRYP PFNGLVERTEX3HNVPROC) (GLhalfNV x, GLhalfNV y, GLhalfNV z);
+typedef void (APIENTRYP PFNGLVERTEX3HVNVPROC) (const GLhalfNV *v);
+typedef void (APIENTRYP PFNGLVERTEX4HNVPROC) (GLhalfNV x, GLhalfNV y, GLhalfNV z, GLhalfNV w);
+typedef void (APIENTRYP PFNGLVERTEX4HVNVPROC) (const GLhalfNV *v);
+typedef void (APIENTRYP PFNGLNORMAL3HNVPROC) (GLhalfNV nx, GLhalfNV ny, GLhalfNV nz);
+typedef void (APIENTRYP PFNGLNORMAL3HVNVPROC) (const GLhalfNV *v);
+typedef void (APIENTRYP PFNGLCOLOR3HNVPROC) (GLhalfNV red, GLhalfNV green, GLhalfNV blue);
+typedef void (APIENTRYP PFNGLCOLOR3HVNVPROC) (const GLhalfNV *v);
+typedef void (APIENTRYP PFNGLCOLOR4HNVPROC) (GLhalfNV red, GLhalfNV green, GLhalfNV blue, GLhalfNV alpha);
+typedef void (APIENTRYP PFNGLCOLOR4HVNVPROC) (const GLhalfNV *v);
+typedef void (APIENTRYP PFNGLTEXCOORD1HNVPROC) (GLhalfNV s);
+typedef void (APIENTRYP PFNGLTEXCOORD1HVNVPROC) (const GLhalfNV *v);
+typedef void (APIENTRYP PFNGLTEXCOORD2HNVPROC) (GLhalfNV s, GLhalfNV t);
+typedef void (APIENTRYP PFNGLTEXCOORD2HVNVPROC) (const GLhalfNV *v);
+typedef void (APIENTRYP PFNGLTEXCOORD3HNVPROC) (GLhalfNV s, GLhalfNV t, GLhalfNV r);
+typedef void (APIENTRYP PFNGLTEXCOORD3HVNVPROC) (const GLhalfNV *v);
+typedef void (APIENTRYP PFNGLTEXCOORD4HNVPROC) (GLhalfNV s, GLhalfNV t, GLhalfNV r, GLhalfNV q);
+typedef void (APIENTRYP PFNGLTEXCOORD4HVNVPROC) (const GLhalfNV *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD1HNVPROC) (GLenum target, GLhalfNV s);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD1HVNVPROC) (GLenum target, const GLhalfNV *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD2HNVPROC) (GLenum target, GLhalfNV s, GLhalfNV t);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD2HVNVPROC) (GLenum target, const GLhalfNV *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD3HNVPROC) (GLenum target, GLhalfNV s, GLhalfNV t, GLhalfNV r);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD3HVNVPROC) (GLenum target, const GLhalfNV *v);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD4HNVPROC) (GLenum target, GLhalfNV s, GLhalfNV t, GLhalfNV r, GLhalfNV q);
+typedef void (APIENTRYP PFNGLMULTITEXCOORD4HVNVPROC) (GLenum target, const GLhalfNV *v);
+typedef void (APIENTRYP PFNGLFOGCOORDHNVPROC) (GLhalfNV fog);
+typedef void (APIENTRYP PFNGLFOGCOORDHVNVPROC) (const GLhalfNV *fog);
+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3HNVPROC) (GLhalfNV red, GLhalfNV green, GLhalfNV blue);
+typedef void (APIENTRYP PFNGLSECONDARYCOLOR3HVNVPROC) (const GLhalfNV *v);
+typedef void (APIENTRYP PFNGLVERTEXWEIGHTHNVPROC) (GLhalfNV weight);
+typedef void (APIENTRYP PFNGLVERTEXWEIGHTHVNVPROC) (const GLhalfNV *weight);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB1HNVPROC) (GLuint index, GLhalfNV x);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB1HVNVPROC) (GLuint index, const GLhalfNV *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB2HNVPROC) (GLuint index, GLhalfNV x, GLhalfNV y);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB2HVNVPROC) (GLuint index, const GLhalfNV *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB3HNVPROC) (GLuint index, GLhalfNV x, GLhalfNV y, GLhalfNV z);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB3HVNVPROC) (GLuint index, const GLhalfNV *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4HNVPROC) (GLuint index, GLhalfNV x, GLhalfNV y, GLhalfNV z, GLhalfNV w);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4HVNVPROC) (GLuint index, const GLhalfNV *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBS1HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBS2HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBS3HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBS4HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v);
+#endif
+
+#ifndef GL_NV_pixel_data_range
+#define GL_NV_pixel_data_range 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glPixelDataRangeNV (GLenum target, GLsizei length, GLvoid *pointer);
+GLAPI void APIENTRY glFlushPixelDataRangeNV (GLenum target);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLPIXELDATARANGENVPROC) (GLenum target, GLsizei length, GLvoid *pointer);
+typedef void (APIENTRYP PFNGLFLUSHPIXELDATARANGENVPROC) (GLenum target);
+#endif
+
+#ifndef GL_NV_primitive_restart
+#define GL_NV_primitive_restart 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glPrimitiveRestartNV (void);
+GLAPI void APIENTRY glPrimitiveRestartIndexNV (GLuint index);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLPRIMITIVERESTARTNVPROC) (void);
+typedef void (APIENTRYP PFNGLPRIMITIVERESTARTINDEXNVPROC) (GLuint index);
+#endif
+
+#ifndef GL_NV_texture_expand_normal
+#define GL_NV_texture_expand_normal 1
+#endif
+
+#ifndef GL_NV_vertex_program2
+#define GL_NV_vertex_program2 1
+#endif
+
+#ifndef GL_ATI_map_object_buffer
+#define GL_ATI_map_object_buffer 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI GLvoid* APIENTRY glMapObjectBufferATI (GLuint buffer);
+GLAPI void APIENTRY glUnmapObjectBufferATI (GLuint buffer);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef GLvoid* (APIENTRYP PFNGLMAPOBJECTBUFFERATIPROC) (GLuint buffer);
+typedef void (APIENTRYP PFNGLUNMAPOBJECTBUFFERATIPROC) (GLuint buffer);
+#endif
+
+#ifndef GL_ATI_separate_stencil
+#define GL_ATI_separate_stencil 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glStencilOpSeparateATI (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass);
+GLAPI void APIENTRY glStencilFuncSeparateATI (GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLSTENCILOPSEPARATEATIPROC) (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass);
+typedef void (APIENTRYP PFNGLSTENCILFUNCSEPARATEATIPROC) (GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask);
+#endif
+
+#ifndef GL_ATI_vertex_attrib_array_object
+#define GL_ATI_vertex_attrib_array_object 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glVertexAttribArrayObjectATI (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLuint buffer, GLuint offset);
+GLAPI void APIENTRY glGetVertexAttribArrayObjectfvATI (GLuint index, GLenum pname, GLfloat *params);
+GLAPI void APIENTRY glGetVertexAttribArrayObjectivATI (GLuint index, GLenum pname, GLint *params);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLVERTEXATTRIBARRAYOBJECTATIPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLuint buffer, GLuint offset);
+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBARRAYOBJECTFVATIPROC) (GLuint index, GLenum pname, GLfloat *params);
+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBARRAYOBJECTIVATIPROC) (GLuint index, GLenum pname, GLint *params);
+#endif
+
+#ifndef GL_OES_read_format
+#define GL_OES_read_format 1
+#endif
+
+#ifndef GL_EXT_depth_bounds_test
+#define GL_EXT_depth_bounds_test 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glDepthBoundsEXT (GLclampd zmin, GLclampd zmax);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLDEPTHBOUNDSEXTPROC) (GLclampd zmin, GLclampd zmax);
+#endif
+
+#ifndef GL_EXT_texture_mirror_clamp
+#define GL_EXT_texture_mirror_clamp 1
+#endif
+
+#ifndef GL_EXT_blend_equation_separate
+#define GL_EXT_blend_equation_separate 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glBlendEquationSeparateEXT (GLenum modeRGB, GLenum modeAlpha);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEEXTPROC) (GLenum modeRGB, GLenum modeAlpha);
+#endif
+
+#ifndef GL_MESA_pack_invert
+#define GL_MESA_pack_invert 1
+#endif
+
+#ifndef GL_MESA_ycbcr_texture
+#define GL_MESA_ycbcr_texture 1
+#endif
+
+#ifndef GL_EXT_pixel_buffer_object
+#define GL_EXT_pixel_buffer_object 1
+#endif
+
+#ifndef GL_NV_fragment_program_option
+#define GL_NV_fragment_program_option 1
+#endif
+
+#ifndef GL_NV_fragment_program2
+#define GL_NV_fragment_program2 1
+#endif
+
+#ifndef GL_NV_vertex_program2_option
+#define GL_NV_vertex_program2_option 1
+#endif
+
+#ifndef GL_NV_vertex_program3
+#define GL_NV_vertex_program3 1
+#endif
+
+#ifndef GL_EXT_framebuffer_object
+#define GL_EXT_framebuffer_object 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI GLboolean APIENTRY glIsRenderbufferEXT (GLuint renderbuffer);
+GLAPI void APIENTRY glBindRenderbufferEXT (GLenum target, GLuint renderbuffer);
+GLAPI void APIENTRY glDeleteRenderbuffersEXT (GLsizei n, const GLuint *renderbuffers);
+GLAPI void APIENTRY glGenRenderbuffersEXT (GLsizei n, GLuint *renderbuffers);
+GLAPI void APIENTRY glRenderbufferStorageEXT (GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
+GLAPI void APIENTRY glGetRenderbufferParameterivEXT (GLenum target, GLenum pname, GLint *params);
+GLAPI GLboolean APIENTRY glIsFramebufferEXT (GLuint framebuffer);
+GLAPI void APIENTRY glBindFramebufferEXT (GLenum target, GLuint framebuffer);
+GLAPI void APIENTRY glDeleteFramebuffersEXT (GLsizei n, const GLuint *framebuffers);
+GLAPI void APIENTRY glGenFramebuffersEXT (GLsizei n, GLuint *framebuffers);
+GLAPI GLenum APIENTRY glCheckFramebufferStatusEXT (GLenum target);
+GLAPI void APIENTRY glFramebufferTexture1DEXT (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
+GLAPI void APIENTRY glFramebufferTexture2DEXT (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
+GLAPI void APIENTRY glFramebufferTexture3DEXT (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
+GLAPI void APIENTRY glFramebufferRenderbufferEXT (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
+GLAPI void APIENTRY glGetFramebufferAttachmentParameterivEXT (GLenum target, GLenum attachment, GLenum pname, GLint *params);
+GLAPI void APIENTRY glGenerateMipmapEXT (GLenum target);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef GLboolean (APIENTRYP PFNGLISRENDERBUFFEREXTPROC) (GLuint renderbuffer);
+typedef void (APIENTRYP PFNGLBINDRENDERBUFFEREXTPROC) (GLenum target, GLuint renderbuffer);
+typedef void (APIENTRYP PFNGLDELETERENDERBUFFERSEXTPROC) (GLsizei n, const GLuint *renderbuffers);
+typedef void (APIENTRYP PFNGLGENRENDERBUFFERSEXTPROC) (GLsizei n, GLuint *renderbuffers);
+typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
+typedef void (APIENTRYP PFNGLGETRENDERBUFFERPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
+typedef GLboolean (APIENTRYP PFNGLISFRAMEBUFFEREXTPROC) (GLuint framebuffer);
+typedef void (APIENTRYP PFNGLBINDFRAMEBUFFEREXTPROC) (GLenum target, GLuint framebuffer);
+typedef void (APIENTRYP PFNGLDELETEFRAMEBUFFERSEXTPROC) (GLsizei n, const GLuint *framebuffers);
+typedef void (APIENTRYP PFNGLGENFRAMEBUFFERSEXTPROC) (GLsizei n, GLuint *framebuffers);
+typedef GLenum (APIENTRYP PFNGLCHECKFRAMEBUFFERSTATUSEXTPROC) (GLenum target);
+typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE1DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
+typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
+typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE3DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
+typedef void (APIENTRYP PFNGLFRAMEBUFFERRENDERBUFFEREXTPROC) (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
+typedef void (APIENTRYP PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVEXTPROC) (GLenum target, GLenum attachment, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLGENERATEMIPMAPEXTPROC) (GLenum target);
+#endif
+
+#ifndef GL_GREMEDY_string_marker
+#define GL_GREMEDY_string_marker 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glStringMarkerGREMEDY (GLsizei len, const GLvoid *string);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLSTRINGMARKERGREMEDYPROC) (GLsizei len, const GLvoid *string);
+#endif
+
+#ifndef GL_EXT_packed_depth_stencil
+#define GL_EXT_packed_depth_stencil 1
+#endif
+
+#ifndef GL_EXT_stencil_clear_tag
+#define GL_EXT_stencil_clear_tag 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glStencilClearTagEXT (GLsizei stencilTagBits, GLuint stencilClearTag);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLSTENCILCLEARTAGEXTPROC) (GLsizei stencilTagBits, GLuint stencilClearTag);
+#endif
+
+#ifndef GL_EXT_texture_sRGB
+#define GL_EXT_texture_sRGB 1
+#endif
+
+#ifndef GL_EXT_framebuffer_blit
+#define GL_EXT_framebuffer_blit 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glBlitFramebufferEXT (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLBLITFRAMEBUFFEREXTPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
+#endif
+
+#ifndef GL_EXT_framebuffer_multisample
+#define GL_EXT_framebuffer_multisample 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glRenderbufferStorageMultisampleEXT (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
+#endif
+
+#ifndef GL_MESAX_texture_stack
+#define GL_MESAX_texture_stack 1
+#endif
+
+#ifndef GL_EXT_timer_query
+#define GL_EXT_timer_query 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glGetQueryObjecti64vEXT (GLuint id, GLenum pname, GLint64EXT *params);
+GLAPI void APIENTRY glGetQueryObjectui64vEXT (GLuint id, GLenum pname, GLuint64EXT *params);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLGETQUERYOBJECTI64VEXTPROC) (GLuint id, GLenum pname, GLint64EXT *params);
+typedef void (APIENTRYP PFNGLGETQUERYOBJECTUI64VEXTPROC) (GLuint id, GLenum pname, GLuint64EXT *params);
+#endif
+
+#ifndef GL_EXT_gpu_program_parameters
+#define GL_EXT_gpu_program_parameters 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glProgramEnvParameters4fvEXT (GLenum target, GLuint index, GLsizei count, const GLfloat *params);
+GLAPI void APIENTRY glProgramLocalParameters4fvEXT (GLenum target, GLuint index, GLsizei count, const GLfloat *params);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERS4FVEXTPROC) (GLenum target, GLuint index, GLsizei count, const GLfloat *params);
+typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERS4FVEXTPROC) (GLenum target, GLuint index, GLsizei count, const GLfloat *params);
+#endif
+
+#ifndef GL_APPLE_flush_buffer_range
+#define GL_APPLE_flush_buffer_range 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glBufferParameteriAPPLE (GLenum target, GLenum pname, GLint param);
+GLAPI void APIENTRY glFlushMappedBufferRangeAPPLE (GLenum target, GLintptr offset, GLsizeiptr size);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLBUFFERPARAMETERIAPPLEPROC) (GLenum target, GLenum pname, GLint param);
+typedef void (APIENTRYP PFNGLFLUSHMAPPEDBUFFERRANGEAPPLEPROC) (GLenum target, GLintptr offset, GLsizeiptr size);
+#endif
+
+#ifndef GL_NV_gpu_program4
+#define GL_NV_gpu_program4 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glProgramLocalParameterI4iNV (GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w);
+GLAPI void APIENTRY glProgramLocalParameterI4ivNV (GLenum target, GLuint index, const GLint *params);
+GLAPI void APIENTRY glProgramLocalParametersI4ivNV (GLenum target, GLuint index, GLsizei count, const GLint *params);
+GLAPI void APIENTRY glProgramLocalParameterI4uiNV (GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
+GLAPI void APIENTRY glProgramLocalParameterI4uivNV (GLenum target, GLuint index, const GLuint *params);
+GLAPI void APIENTRY glProgramLocalParametersI4uivNV (GLenum target, GLuint index, GLsizei count, const GLuint *params);
+GLAPI void APIENTRY glProgramEnvParameterI4iNV (GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w);
+GLAPI void APIENTRY glProgramEnvParameterI4ivNV (GLenum target, GLuint index, const GLint *params);
+GLAPI void APIENTRY glProgramEnvParametersI4ivNV (GLenum target, GLuint index, GLsizei count, const GLint *params);
+GLAPI void APIENTRY glProgramEnvParameterI4uiNV (GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
+GLAPI void APIENTRY glProgramEnvParameterI4uivNV (GLenum target, GLuint index, const GLuint *params);
+GLAPI void APIENTRY glProgramEnvParametersI4uivNV (GLenum target, GLuint index, GLsizei count, const GLuint *params);
+GLAPI void APIENTRY glGetProgramLocalParameterIivNV (GLenum target, GLuint index, GLint *params);
+GLAPI void APIENTRY glGetProgramLocalParameterIuivNV (GLenum target, GLuint index, GLuint *params);
+GLAPI void APIENTRY glGetProgramEnvParameterIivNV (GLenum target, GLuint index, GLint *params);
+GLAPI void APIENTRY glGetProgramEnvParameterIuivNV (GLenum target, GLuint index, GLuint *params);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERI4INVPROC) (GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w);
+typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERI4IVNVPROC) (GLenum target, GLuint index, const GLint *params);
+typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERSI4IVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLint *params);
+typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERI4UINVPROC) (GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
+typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERI4UIVNVPROC) (GLenum target, GLuint index, const GLuint *params);
+typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERSI4UIVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLuint *params);
+typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERI4INVPROC) (GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w);
+typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERI4IVNVPROC) (GLenum target, GLuint index, const GLint *params);
+typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERSI4IVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLint *params);
+typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERI4UINVPROC) (GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
+typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERI4UIVNVPROC) (GLenum target, GLuint index, const GLuint *params);
+typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERSI4UIVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLuint *params);
+typedef void (APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERIIVNVPROC) (GLenum target, GLuint index, GLint *params);
+typedef void (APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERIUIVNVPROC) (GLenum target, GLuint index, GLuint *params);
+typedef void (APIENTRYP PFNGLGETPROGRAMENVPARAMETERIIVNVPROC) (GLenum target, GLuint index, GLint *params);
+typedef void (APIENTRYP PFNGLGETPROGRAMENVPARAMETERIUIVNVPROC) (GLenum target, GLuint index, GLuint *params);
+#endif
+
+#ifndef GL_NV_geometry_program4
+#define GL_NV_geometry_program4 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glProgramVertexLimitNV (GLenum target, GLint limit);
+GLAPI void APIENTRY glFramebufferTextureEXT (GLenum target, GLenum attachment, GLuint texture, GLint level);
+GLAPI void APIENTRY glFramebufferTextureLayerEXT (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer);
+GLAPI void APIENTRY glFramebufferTextureFaceEXT (GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLPROGRAMVERTEXLIMITNVPROC) (GLenum target, GLint limit);
+typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREEXTPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level);
+typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURELAYEREXTPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer);
+typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREFACEEXTPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face);
+#endif
+
+#ifndef GL_EXT_geometry_shader4
+#define GL_EXT_geometry_shader4 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glProgramParameteriEXT (GLuint program, GLenum pname, GLint value);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLPROGRAMPARAMETERIEXTPROC) (GLuint program, GLenum pname, GLint value);
+#endif
+
+#ifndef GL_NV_vertex_program4
+#define GL_NV_vertex_program4 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glVertexAttribI1iEXT (GLuint index, GLint x);
+GLAPI void APIENTRY glVertexAttribI2iEXT (GLuint index, GLint x, GLint y);
+GLAPI void APIENTRY glVertexAttribI3iEXT (GLuint index, GLint x, GLint y, GLint z);
+GLAPI void APIENTRY glVertexAttribI4iEXT (GLuint index, GLint x, GLint y, GLint z, GLint w);
+GLAPI void APIENTRY glVertexAttribI1uiEXT (GLuint index, GLuint x);
+GLAPI void APIENTRY glVertexAttribI2uiEXT (GLuint index, GLuint x, GLuint y);
+GLAPI void APIENTRY glVertexAttribI3uiEXT (GLuint index, GLuint x, GLuint y, GLuint z);
+GLAPI void APIENTRY glVertexAttribI4uiEXT (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
+GLAPI void APIENTRY glVertexAttribI1ivEXT (GLuint index, const GLint *v);
+GLAPI void APIENTRY glVertexAttribI2ivEXT (GLuint index, const GLint *v);
+GLAPI void APIENTRY glVertexAttribI3ivEXT (GLuint index, const GLint *v);
+GLAPI void APIENTRY glVertexAttribI4ivEXT (GLuint index, const GLint *v);
+GLAPI void APIENTRY glVertexAttribI1uivEXT (GLuint index, const GLuint *v);
+GLAPI void APIENTRY glVertexAttribI2uivEXT (GLuint index, const GLuint *v);
+GLAPI void APIENTRY glVertexAttribI3uivEXT (GLuint index, const GLuint *v);
+GLAPI void APIENTRY glVertexAttribI4uivEXT (GLuint index, const GLuint *v);
+GLAPI void APIENTRY glVertexAttribI4bvEXT (GLuint index, const GLbyte *v);
+GLAPI void APIENTRY glVertexAttribI4svEXT (GLuint index, const GLshort *v);
+GLAPI void APIENTRY glVertexAttribI4ubvEXT (GLuint index, const GLubyte *v);
+GLAPI void APIENTRY glVertexAttribI4usvEXT (GLuint index, const GLushort *v);
+GLAPI void APIENTRY glVertexAttribIPointerEXT (GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
+GLAPI void APIENTRY glGetVertexAttribIivEXT (GLuint index, GLenum pname, GLint *params);
+GLAPI void APIENTRY glGetVertexAttribIuivEXT (GLuint index, GLenum pname, GLuint *params);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLVERTEXATTRIBI1IEXTPROC) (GLuint index, GLint x);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBI2IEXTPROC) (GLuint index, GLint x, GLint y);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBI3IEXTPROC) (GLuint index, GLint x, GLint y, GLint z);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBI4IEXTPROC) (GLuint index, GLint x, GLint y, GLint z, GLint w);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBI1UIEXTPROC) (GLuint index, GLuint x);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBI2UIEXTPROC) (GLuint index, GLuint x, GLuint y);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBI3UIEXTPROC) (GLuint index, GLuint x, GLuint y, GLuint z);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UIEXTPROC) (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBI1IVEXTPROC) (GLuint index, const GLint *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBI2IVEXTPROC) (GLuint index, const GLint *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBI3IVEXTPROC) (GLuint index, const GLint *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBI4IVEXTPROC) (GLuint index, const GLint *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBI1UIVEXTPROC) (GLuint index, const GLuint *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBI2UIVEXTPROC) (GLuint index, const GLuint *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBI3UIVEXTPROC) (GLuint index, const GLuint *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UIVEXTPROC) (GLuint index, const GLuint *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBI4BVEXTPROC) (GLuint index, const GLbyte *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBI4SVEXTPROC) (GLuint index, const GLshort *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UBVEXTPROC) (GLuint index, const GLubyte *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBI4USVEXTPROC) (GLuint index, const GLushort *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBIPOINTEREXTPROC) (GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIIVEXTPROC) (GLuint index, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIUIVEXTPROC) (GLuint index, GLenum pname, GLuint *params);
+#endif
+
+#ifndef GL_EXT_gpu_shader4
+#define GL_EXT_gpu_shader4 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glGetUniformuivEXT (GLuint program, GLint location, GLuint *params);
+GLAPI void APIENTRY glBindFragDataLocationEXT (GLuint program, GLuint color, const GLchar *name);
+GLAPI GLint APIENTRY glGetFragDataLocationEXT (GLuint program, const GLchar *name);
+GLAPI void APIENTRY glUniform1uiEXT (GLint location, GLuint v0);
+GLAPI void APIENTRY glUniform2uiEXT (GLint location, GLuint v0, GLuint v1);
+GLAPI void APIENTRY glUniform3uiEXT (GLint location, GLuint v0, GLuint v1, GLuint v2);
+GLAPI void APIENTRY glUniform4uiEXT (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
+GLAPI void APIENTRY glUniform1uivEXT (GLint location, GLsizei count, const GLuint *value);
+GLAPI void APIENTRY glUniform2uivEXT (GLint location, GLsizei count, const GLuint *value);
+GLAPI void APIENTRY glUniform3uivEXT (GLint location, GLsizei count, const GLuint *value);
+GLAPI void APIENTRY glUniform4uivEXT (GLint location, GLsizei count, const GLuint *value);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLGETUNIFORMUIVEXTPROC) (GLuint program, GLint location, GLuint *params);
+typedef void (APIENTRYP PFNGLBINDFRAGDATALOCATIONEXTPROC) (GLuint program, GLuint color, const GLchar *name);
+typedef GLint (APIENTRYP PFNGLGETFRAGDATALOCATIONEXTPROC) (GLuint program, const GLchar *name);
+typedef void (APIENTRYP PFNGLUNIFORM1UIEXTPROC) (GLint location, GLuint v0);
+typedef void (APIENTRYP PFNGLUNIFORM2UIEXTPROC) (GLint location, GLuint v0, GLuint v1);
+typedef void (APIENTRYP PFNGLUNIFORM3UIEXTPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2);
+typedef void (APIENTRYP PFNGLUNIFORM4UIEXTPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
+typedef void (APIENTRYP PFNGLUNIFORM1UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value);
+typedef void (APIENTRYP PFNGLUNIFORM2UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value);
+typedef void (APIENTRYP PFNGLUNIFORM3UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value);
+typedef void (APIENTRYP PFNGLUNIFORM4UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value);
+#endif
+
+#ifndef GL_EXT_draw_instanced
+#define GL_EXT_draw_instanced 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glDrawArraysInstancedEXT (GLenum mode, GLint start, GLsizei count, GLsizei primcount);
+GLAPI void APIENTRY glDrawElementsInstancedEXT (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLDRAWARRAYSINSTANCEDEXTPROC) (GLenum mode, GLint start, GLsizei count, GLsizei primcount);
+typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDEXTPROC) (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount);
+#endif
+
+#ifndef GL_EXT_packed_float
+#define GL_EXT_packed_float 1
+#endif
+
+#ifndef GL_EXT_texture_array
+#define GL_EXT_texture_array 1
+#endif
+
+#ifndef GL_EXT_texture_buffer_object
+#define GL_EXT_texture_buffer_object 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glTexBufferEXT (GLenum target, GLenum internalformat, GLuint buffer);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLTEXBUFFEREXTPROC) (GLenum target, GLenum internalformat, GLuint buffer);
+#endif
+
+#ifndef GL_EXT_texture_compression_latc
+#define GL_EXT_texture_compression_latc 1
+#endif
+
+#ifndef GL_EXT_texture_compression_rgtc
+#define GL_EXT_texture_compression_rgtc 1
+#endif
+
+#ifndef GL_EXT_texture_shared_exponent
+#define GL_EXT_texture_shared_exponent 1
+#endif
+
+#ifndef GL_NV_depth_buffer_float
+#define GL_NV_depth_buffer_float 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glDepthRangedNV (GLdouble zNear, GLdouble zFar);
+GLAPI void APIENTRY glClearDepthdNV (GLdouble depth);
+GLAPI void APIENTRY glDepthBoundsdNV (GLdouble zmin, GLdouble zmax);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLDEPTHRANGEDNVPROC) (GLdouble zNear, GLdouble zFar);
+typedef void (APIENTRYP PFNGLCLEARDEPTHDNVPROC) (GLdouble depth);
+typedef void (APIENTRYP PFNGLDEPTHBOUNDSDNVPROC) (GLdouble zmin, GLdouble zmax);
+#endif
+
+#ifndef GL_NV_fragment_program4
+#define GL_NV_fragment_program4 1
+#endif
+
+#ifndef GL_NV_framebuffer_multisample_coverage
+#define GL_NV_framebuffer_multisample_coverage 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glRenderbufferStorageMultisampleCoverageNV (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLenum internalformat, GLsizei width, GLsizei height);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLECOVERAGENVPROC) (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLenum internalformat, GLsizei width, GLsizei height);
+#endif
+
+#ifndef GL_EXT_framebuffer_sRGB
+#define GL_EXT_framebuffer_sRGB 1
+#endif
+
+#ifndef GL_NV_geometry_shader4
+#define GL_NV_geometry_shader4 1
+#endif
+
+#ifndef GL_NV_parameter_buffer_object
+#define GL_NV_parameter_buffer_object 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glProgramBufferParametersfvNV (GLenum target, GLuint buffer, GLuint index, GLsizei count, const GLfloat *params);
+GLAPI void APIENTRY glProgramBufferParametersIivNV (GLenum target, GLuint buffer, GLuint index, GLsizei count, const GLint *params);
+GLAPI void APIENTRY glProgramBufferParametersIuivNV (GLenum target, GLuint buffer, GLuint index, GLsizei count, const GLuint *params);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLPROGRAMBUFFERPARAMETERSFVNVPROC) (GLenum target, GLuint buffer, GLuint index, GLsizei count, const GLfloat *params);
+typedef void (APIENTRYP PFNGLPROGRAMBUFFERPARAMETERSIIVNVPROC) (GLenum target, GLuint buffer, GLuint index, GLsizei count, const GLint *params);
+typedef void (APIENTRYP PFNGLPROGRAMBUFFERPARAMETERSIUIVNVPROC) (GLenum target, GLuint buffer, GLuint index, GLsizei count, const GLuint *params);
+#endif
+
+#ifndef GL_EXT_draw_buffers2
+#define GL_EXT_draw_buffers2 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glColorMaskIndexedEXT (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a);
+GLAPI void APIENTRY glGetBooleanIndexedvEXT (GLenum target, GLuint index, GLboolean *data);
+GLAPI void APIENTRY glGetIntegerIndexedvEXT (GLenum target, GLuint index, GLint *data);
+GLAPI void APIENTRY glEnableIndexedEXT (GLenum target, GLuint index);
+GLAPI void APIENTRY glDisableIndexedEXT (GLenum target, GLuint index);
+GLAPI GLboolean APIENTRY glIsEnabledIndexedEXT (GLenum target, GLuint index);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLCOLORMASKINDEXEDEXTPROC) (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a);
+typedef void (APIENTRYP PFNGLGETBOOLEANINDEXEDVEXTPROC) (GLenum target, GLuint index, GLboolean *data);
+typedef void (APIENTRYP PFNGLGETINTEGERINDEXEDVEXTPROC) (GLenum target, GLuint index, GLint *data);
+typedef void (APIENTRYP PFNGLENABLEINDEXEDEXTPROC) (GLenum target, GLuint index);
+typedef void (APIENTRYP PFNGLDISABLEINDEXEDEXTPROC) (GLenum target, GLuint index);
+typedef GLboolean (APIENTRYP PFNGLISENABLEDINDEXEDEXTPROC) (GLenum target, GLuint index);
+#endif
+
+#ifndef GL_NV_transform_feedback
+#define GL_NV_transform_feedback 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glBeginTransformFeedbackNV (GLenum primitiveMode);
+GLAPI void APIENTRY glEndTransformFeedbackNV (void);
+GLAPI void APIENTRY glTransformFeedbackAttribsNV (GLuint count, const GLint *attribs, GLenum bufferMode);
+GLAPI void APIENTRY glBindBufferRangeNV (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size);
+GLAPI void APIENTRY glBindBufferOffsetNV (GLenum target, GLuint index, GLuint buffer, GLintptr offset);
+GLAPI void APIENTRY glBindBufferBaseNV (GLenum target, GLuint index, GLuint buffer);
+GLAPI void APIENTRY glTransformFeedbackVaryingsNV (GLuint program, GLsizei count, const GLint *locations, GLenum bufferMode);
+GLAPI void APIENTRY glActiveVaryingNV (GLuint program, const GLchar *name);
+GLAPI GLint APIENTRY glGetVaryingLocationNV (GLuint program, const GLchar *name);
+GLAPI void APIENTRY glGetActiveVaryingNV (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name);
+GLAPI void APIENTRY glGetTransformFeedbackVaryingNV (GLuint program, GLuint index, GLint *location);
+GLAPI void APIENTRY glTransformFeedbackStreamAttribsNV (GLsizei count, const GLint *attribs, GLsizei nbuffers, const GLint *bufstreams, GLenum bufferMode);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLBEGINTRANSFORMFEEDBACKNVPROC) (GLenum primitiveMode);
+typedef void (APIENTRYP PFNGLENDTRANSFORMFEEDBACKNVPROC) (void);
+typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKATTRIBSNVPROC) (GLuint count, const GLint *attribs, GLenum bufferMode);
+typedef void (APIENTRYP PFNGLBINDBUFFERRANGENVPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size);
+typedef void (APIENTRYP PFNGLBINDBUFFEROFFSETNVPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset);
+typedef void (APIENTRYP PFNGLBINDBUFFERBASENVPROC) (GLenum target, GLuint index, GLuint buffer);
+typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKVARYINGSNVPROC) (GLuint program, GLsizei count, const GLint *locations, GLenum bufferMode);
+typedef void (APIENTRYP PFNGLACTIVEVARYINGNVPROC) (GLuint program, const GLchar *name);
+typedef GLint (APIENTRYP PFNGLGETVARYINGLOCATIONNVPROC) (GLuint program, const GLchar *name);
+typedef void (APIENTRYP PFNGLGETACTIVEVARYINGNVPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name);
+typedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKVARYINGNVPROC) (GLuint program, GLuint index, GLint *location);
+typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKSTREAMATTRIBSNVPROC) (GLsizei count, const GLint *attribs, GLsizei nbuffers, const GLint *bufstreams, GLenum bufferMode);
+#endif
+
+#ifndef GL_EXT_bindable_uniform
+#define GL_EXT_bindable_uniform 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glUniformBufferEXT (GLuint program, GLint location, GLuint buffer);
+GLAPI GLint APIENTRY glGetUniformBufferSizeEXT (GLuint program, GLint location);
+GLAPI GLintptr APIENTRY glGetUniformOffsetEXT (GLuint program, GLint location);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLUNIFORMBUFFEREXTPROC) (GLuint program, GLint location, GLuint buffer);
+typedef GLint (APIENTRYP PFNGLGETUNIFORMBUFFERSIZEEXTPROC) (GLuint program, GLint location);
+typedef GLintptr (APIENTRYP PFNGLGETUNIFORMOFFSETEXTPROC) (GLuint program, GLint location);
+#endif
+
+#ifndef GL_EXT_texture_integer
+#define GL_EXT_texture_integer 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glTexParameterIivEXT (GLenum target, GLenum pname, const GLint *params);
+GLAPI void APIENTRY glTexParameterIuivEXT (GLenum target, GLenum pname, const GLuint *params);
+GLAPI void APIENTRY glGetTexParameterIivEXT (GLenum target, GLenum pname, GLint *params);
+GLAPI void APIENTRY glGetTexParameterIuivEXT (GLenum target, GLenum pname, GLuint *params);
+GLAPI void APIENTRY glClearColorIiEXT (GLint red, GLint green, GLint blue, GLint alpha);
+GLAPI void APIENTRY glClearColorIuiEXT (GLuint red, GLuint green, GLuint blue, GLuint alpha);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLTEXPARAMETERIIVEXTPROC) (GLenum target, GLenum pname, const GLint *params);
+typedef void (APIENTRYP PFNGLTEXPARAMETERIUIVEXTPROC) (GLenum target, GLenum pname, const GLuint *params);
+typedef void (APIENTRYP PFNGLGETTEXPARAMETERIIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLGETTEXPARAMETERIUIVEXTPROC) (GLenum target, GLenum pname, GLuint *params);
+typedef void (APIENTRYP PFNGLCLEARCOLORIIEXTPROC) (GLint red, GLint green, GLint blue, GLint alpha);
+typedef void (APIENTRYP PFNGLCLEARCOLORIUIEXTPROC) (GLuint red, GLuint green, GLuint blue, GLuint alpha);
+#endif
+
+#ifndef GL_GREMEDY_frame_terminator
+#define GL_GREMEDY_frame_terminator 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glFrameTerminatorGREMEDY (void);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLFRAMETERMINATORGREMEDYPROC) (void);
+#endif
+
+#ifndef GL_NV_conditional_render
+#define GL_NV_conditional_render 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glBeginConditionalRenderNV (GLuint id, GLenum mode);
+GLAPI void APIENTRY glEndConditionalRenderNV (void);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLBEGINCONDITIONALRENDERNVPROC) (GLuint id, GLenum mode);
+typedef void (APIENTRYP PFNGLENDCONDITIONALRENDERNVPROC) (void);
+#endif
+
+#ifndef GL_NV_present_video
+#define GL_NV_present_video 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glPresentFrameKeyedNV (GLuint video_slot, GLuint64EXT minPresentTime, GLuint beginPresentTimeId, GLuint presentDurationId, GLenum type, GLenum target0, GLuint fill0, GLuint key0, GLenum target1, GLuint fill1, GLuint key1);
+GLAPI void APIENTRY glPresentFrameDualFillNV (GLuint video_slot, GLuint64EXT minPresentTime, GLuint beginPresentTimeId, GLuint presentDurationId, GLenum type, GLenum target0, GLuint fill0, GLenum target1, GLuint fill1, GLenum target2, GLuint fill2, GLenum target3, GLuint fill3);
+GLAPI void APIENTRY glGetVideoivNV (GLuint video_slot, GLenum pname, GLint *params);
+GLAPI void APIENTRY glGetVideouivNV (GLuint video_slot, GLenum pname, GLuint *params);
+GLAPI void APIENTRY glGetVideoi64vNV (GLuint video_slot, GLenum pname, GLint64EXT *params);
+GLAPI void APIENTRY glGetVideoui64vNV (GLuint video_slot, GLenum pname, GLuint64EXT *params);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLPRESENTFRAMEKEYEDNVPROC) (GLuint video_slot, GLuint64EXT minPresentTime, GLuint beginPresentTimeId, GLuint presentDurationId, GLenum type, GLenum target0, GLuint fill0, GLuint key0, GLenum target1, GLuint fill1, GLuint key1);
+typedef void (APIENTRYP PFNGLPRESENTFRAMEDUALFILLNVPROC) (GLuint video_slot, GLuint64EXT minPresentTime, GLuint beginPresentTimeId, GLuint presentDurationId, GLenum type, GLenum target0, GLuint fill0, GLenum target1, GLuint fill1, GLenum target2, GLuint fill2, GLenum target3, GLuint fill3);
+typedef void (APIENTRYP PFNGLGETVIDEOIVNVPROC) (GLuint video_slot, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLGETVIDEOUIVNVPROC) (GLuint video_slot, GLenum pname, GLuint *params);
+typedef void (APIENTRYP PFNGLGETVIDEOI64VNVPROC) (GLuint video_slot, GLenum pname, GLint64EXT *params);
+typedef void (APIENTRYP PFNGLGETVIDEOUI64VNVPROC) (GLuint video_slot, GLenum pname, GLuint64EXT *params);
+#endif
+
+#ifndef GL_EXT_transform_feedback
+#define GL_EXT_transform_feedback 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glBeginTransformFeedbackEXT (GLenum primitiveMode);
+GLAPI void APIENTRY glEndTransformFeedbackEXT (void);
+GLAPI void APIENTRY glBindBufferRangeEXT (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size);
+GLAPI void APIENTRY glBindBufferOffsetEXT (GLenum target, GLuint index, GLuint buffer, GLintptr offset);
+GLAPI void APIENTRY glBindBufferBaseEXT (GLenum target, GLuint index, GLuint buffer);
+GLAPI void APIENTRY glTransformFeedbackVaryingsEXT (GLuint program, GLsizei count, const GLchar* *varyings, GLenum bufferMode);
+GLAPI void APIENTRY glGetTransformFeedbackVaryingEXT (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLBEGINTRANSFORMFEEDBACKEXTPROC) (GLenum primitiveMode);
+typedef void (APIENTRYP PFNGLENDTRANSFORMFEEDBACKEXTPROC) (void);
+typedef void (APIENTRYP PFNGLBINDBUFFERRANGEEXTPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size);
+typedef void (APIENTRYP PFNGLBINDBUFFEROFFSETEXTPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset);
+typedef void (APIENTRYP PFNGLBINDBUFFERBASEEXTPROC) (GLenum target, GLuint index, GLuint buffer);
+typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKVARYINGSEXTPROC) (GLuint program, GLsizei count, const GLchar* *varyings, GLenum bufferMode);
+typedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKVARYINGEXTPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name);
+#endif
+
+#ifndef GL_EXT_direct_state_access
+#define GL_EXT_direct_state_access 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glClientAttribDefaultEXT (GLbitfield mask);
+GLAPI void APIENTRY glPushClientAttribDefaultEXT (GLbitfield mask);
+GLAPI void APIENTRY glMatrixLoadfEXT (GLenum mode, const GLfloat *m);
+GLAPI void APIENTRY glMatrixLoaddEXT (GLenum mode, const GLdouble *m);
+GLAPI void APIENTRY glMatrixMultfEXT (GLenum mode, const GLfloat *m);
+GLAPI void APIENTRY glMatrixMultdEXT (GLenum mode, const GLdouble *m);
+GLAPI void APIENTRY glMatrixLoadIdentityEXT (GLenum mode);
+GLAPI void APIENTRY glMatrixRotatefEXT (GLenum mode, GLfloat angle, GLfloat x, GLfloat y, GLfloat z);
+GLAPI void APIENTRY glMatrixRotatedEXT (GLenum mode, GLdouble angle, GLdouble x, GLdouble y, GLdouble z);
+GLAPI void APIENTRY glMatrixScalefEXT (GLenum mode, GLfloat x, GLfloat y, GLfloat z);
+GLAPI void APIENTRY glMatrixScaledEXT (GLenum mode, GLdouble x, GLdouble y, GLdouble z);
+GLAPI void APIENTRY glMatrixTranslatefEXT (GLenum mode, GLfloat x, GLfloat y, GLfloat z);
+GLAPI void APIENTRY glMatrixTranslatedEXT (GLenum mode, GLdouble x, GLdouble y, GLdouble z);
+GLAPI void APIENTRY glMatrixFrustumEXT (GLenum mode, GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar);
+GLAPI void APIENTRY glMatrixOrthoEXT (GLenum mode, GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar);
+GLAPI void APIENTRY glMatrixPopEXT (GLenum mode);
+GLAPI void APIENTRY glMatrixPushEXT (GLenum mode);
+GLAPI void APIENTRY glMatrixLoadTransposefEXT (GLenum mode, const GLfloat *m);
+GLAPI void APIENTRY glMatrixLoadTransposedEXT (GLenum mode, const GLdouble *m);
+GLAPI void APIENTRY glMatrixMultTransposefEXT (GLenum mode, const GLfloat *m);
+GLAPI void APIENTRY glMatrixMultTransposedEXT (GLenum mode, const GLdouble *m);
+GLAPI void APIENTRY glTextureParameterfEXT (GLuint texture, GLenum target, GLenum pname, GLfloat param);
+GLAPI void APIENTRY glTextureParameterfvEXT (GLuint texture, GLenum target, GLenum pname, const GLfloat *params);
+GLAPI void APIENTRY glTextureParameteriEXT (GLuint texture, GLenum target, GLenum pname, GLint param);
+GLAPI void APIENTRY glTextureParameterivEXT (GLuint texture, GLenum target, GLenum pname, const GLint *params);
+GLAPI void APIENTRY glTextureImage1DEXT (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid *pixels);
+GLAPI void APIENTRY glTextureImage2DEXT (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels);
+GLAPI void APIENTRY glTextureSubImage1DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels);
+GLAPI void APIENTRY glTextureSubImage2DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels);
+GLAPI void APIENTRY glCopyTextureImage1DEXT (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border);
+GLAPI void APIENTRY glCopyTextureImage2DEXT (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
+GLAPI void APIENTRY glCopyTextureSubImage1DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);
+GLAPI void APIENTRY glCopyTextureSubImage2DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
+GLAPI void APIENTRY glGetTextureImageEXT (GLuint texture, GLenum target, GLint level, GLenum format, GLenum type, GLvoid *pixels);
+GLAPI void APIENTRY glGetTextureParameterfvEXT (GLuint texture, GLenum target, GLenum pname, GLfloat *params);
+GLAPI void APIENTRY glGetTextureParameterivEXT (GLuint texture, GLenum target, GLenum pname, GLint *params);
+GLAPI void APIENTRY glGetTextureLevelParameterfvEXT (GLuint texture, GLenum target, GLint level, GLenum pname, GLfloat *params);
+GLAPI void APIENTRY glGetTextureLevelParameterivEXT (GLuint texture, GLenum target, GLint level, GLenum pname, GLint *params);
+GLAPI void APIENTRY glTextureImage3DEXT (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels);
+GLAPI void APIENTRY glTextureSubImage3DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels);
+GLAPI void APIENTRY glCopyTextureSubImage3DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
+GLAPI void APIENTRY glMultiTexParameterfEXT (GLenum texunit, GLenum target, GLenum pname, GLfloat param);
+GLAPI void APIENTRY glMultiTexParameterfvEXT (GLenum texunit, GLenum target, GLenum pname, const GLfloat *params);
+GLAPI void APIENTRY glMultiTexParameteriEXT (GLenum texunit, GLenum target, GLenum pname, GLint param);
+GLAPI void APIENTRY glMultiTexParameterivEXT (GLenum texunit, GLenum target, GLenum pname, const GLint *params);
+GLAPI void APIENTRY glMultiTexImage1DEXT (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid *pixels);
+GLAPI void APIENTRY glMultiTexImage2DEXT (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels);
+GLAPI void APIENTRY glMultiTexSubImage1DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels);
+GLAPI void APIENTRY glMultiTexSubImage2DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels);
+GLAPI void APIENTRY glCopyMultiTexImage1DEXT (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border);
+GLAPI void APIENTRY glCopyMultiTexImage2DEXT (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
+GLAPI void APIENTRY glCopyMultiTexSubImage1DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);
+GLAPI void APIENTRY glCopyMultiTexSubImage2DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
+GLAPI void APIENTRY glGetMultiTexImageEXT (GLenum texunit, GLenum target, GLint level, GLenum format, GLenum type, GLvoid *pixels);
+GLAPI void APIENTRY glGetMultiTexParameterfvEXT (GLenum texunit, GLenum target, GLenum pname, GLfloat *params);
+GLAPI void APIENTRY glGetMultiTexParameterivEXT (GLenum texunit, GLenum target, GLenum pname, GLint *params);
+GLAPI void APIENTRY glGetMultiTexLevelParameterfvEXT (GLenum texunit, GLenum target, GLint level, GLenum pname, GLfloat *params);
+GLAPI void APIENTRY glGetMultiTexLevelParameterivEXT (GLenum texunit, GLenum target, GLint level, GLenum pname, GLint *params);
+GLAPI void APIENTRY glMultiTexImage3DEXT (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels);
+GLAPI void APIENTRY glMultiTexSubImage3DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels);
+GLAPI void APIENTRY glCopyMultiTexSubImage3DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
+GLAPI void APIENTRY glBindMultiTextureEXT (GLenum texunit, GLenum target, GLuint texture);
+GLAPI void APIENTRY glEnableClientStateIndexedEXT (GLenum array, GLuint index);
+GLAPI void APIENTRY glDisableClientStateIndexedEXT (GLenum array, GLuint index);
+GLAPI void APIENTRY glMultiTexCoordPointerEXT (GLenum texunit, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
+GLAPI void APIENTRY glMultiTexEnvfEXT (GLenum texunit, GLenum target, GLenum pname, GLfloat param);
+GLAPI void APIENTRY glMultiTexEnvfvEXT (GLenum texunit, GLenum target, GLenum pname, const GLfloat *params);
+GLAPI void APIENTRY glMultiTexEnviEXT (GLenum texunit, GLenum target, GLenum pname, GLint param);
+GLAPI void APIENTRY glMultiTexEnvivEXT (GLenum texunit, GLenum target, GLenum pname, const GLint *params);
+GLAPI void APIENTRY glMultiTexGendEXT (GLenum texunit, GLenum coord, GLenum pname, GLdouble param);
+GLAPI void APIENTRY glMultiTexGendvEXT (GLenum texunit, GLenum coord, GLenum pname, const GLdouble *params);
+GLAPI void APIENTRY glMultiTexGenfEXT (GLenum texunit, GLenum coord, GLenum pname, GLfloat param);
+GLAPI void APIENTRY glMultiTexGenfvEXT (GLenum texunit, GLenum coord, GLenum pname, const GLfloat *params);
+GLAPI void APIENTRY glMultiTexGeniEXT (GLenum texunit, GLenum coord, GLenum pname, GLint param);
+GLAPI void APIENTRY glMultiTexGenivEXT (GLenum texunit, GLenum coord, GLenum pname, const GLint *params);
+GLAPI void APIENTRY glGetMultiTexEnvfvEXT (GLenum texunit, GLenum target, GLenum pname, GLfloat *params);
+GLAPI void APIENTRY glGetMultiTexEnvivEXT (GLenum texunit, GLenum target, GLenum pname, GLint *params);
+GLAPI void APIENTRY glGetMultiTexGendvEXT (GLenum texunit, GLenum coord, GLenum pname, GLdouble *params);
+GLAPI void APIENTRY glGetMultiTexGenfvEXT (GLenum texunit, GLenum coord, GLenum pname, GLfloat *params);
+GLAPI void APIENTRY glGetMultiTexGenivEXT (GLenum texunit, GLenum coord, GLenum pname, GLint *params);
+GLAPI void APIENTRY glGetFloatIndexedvEXT (GLenum target, GLuint index, GLfloat *data);
+GLAPI void APIENTRY glGetDoubleIndexedvEXT (GLenum target, GLuint index, GLdouble *data);
+GLAPI void APIENTRY glGetPointerIndexedvEXT (GLenum target, GLuint index, GLvoid* *data);
+GLAPI void APIENTRY glCompressedTextureImage3DEXT (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *bits);
+GLAPI void APIENTRY glCompressedTextureImage2DEXT (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *bits);
+GLAPI void APIENTRY glCompressedTextureImage1DEXT (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *bits);
+GLAPI void APIENTRY glCompressedTextureSubImage3DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *bits);
+GLAPI void APIENTRY glCompressedTextureSubImage2DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *bits);
+GLAPI void APIENTRY glCompressedTextureSubImage1DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *bits);
+GLAPI void APIENTRY glGetCompressedTextureImageEXT (GLuint texture, GLenum target, GLint lod, GLvoid *img);
+GLAPI void APIENTRY glCompressedMultiTexImage3DEXT (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *bits);
+GLAPI void APIENTRY glCompressedMultiTexImage2DEXT (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *bits);
+GLAPI void APIENTRY glCompressedMultiTexImage1DEXT (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *bits);
+GLAPI void APIENTRY glCompressedMultiTexSubImage3DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *bits);
+GLAPI void APIENTRY glCompressedMultiTexSubImage2DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *bits);
+GLAPI void APIENTRY glCompressedMultiTexSubImage1DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *bits);
+GLAPI void APIENTRY glGetCompressedMultiTexImageEXT (GLenum texunit, GLenum target, GLint lod, GLvoid *img);
+GLAPI void APIENTRY glNamedProgramStringEXT (GLuint program, GLenum target, GLenum format, GLsizei len, const GLvoid *string);
+GLAPI void APIENTRY glNamedProgramLocalParameter4dEXT (GLuint program, GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
+GLAPI void APIENTRY glNamedProgramLocalParameter4dvEXT (GLuint program, GLenum target, GLuint index, const GLdouble *params);
+GLAPI void APIENTRY glNamedProgramLocalParameter4fEXT (GLuint program, GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+GLAPI void APIENTRY glNamedProgramLocalParameter4fvEXT (GLuint program, GLenum target, GLuint index, const GLfloat *params);
+GLAPI void APIENTRY glGetNamedProgramLocalParameterdvEXT (GLuint program, GLenum target, GLuint index, GLdouble *params);
+GLAPI void APIENTRY glGetNamedProgramLocalParameterfvEXT (GLuint program, GLenum target, GLuint index, GLfloat *params);
+GLAPI void APIENTRY glGetNamedProgramivEXT (GLuint program, GLenum target, GLenum pname, GLint *params);
+GLAPI void APIENTRY glGetNamedProgramStringEXT (GLuint program, GLenum target, GLenum pname, GLvoid *string);
+GLAPI void APIENTRY glNamedProgramLocalParameters4fvEXT (GLuint program, GLenum target, GLuint index, GLsizei count, const GLfloat *params);
+GLAPI void APIENTRY glNamedProgramLocalParameterI4iEXT (GLuint program, GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w);
+GLAPI void APIENTRY glNamedProgramLocalParameterI4ivEXT (GLuint program, GLenum target, GLuint index, const GLint *params);
+GLAPI void APIENTRY glNamedProgramLocalParametersI4ivEXT (GLuint program, GLenum target, GLuint index, GLsizei count, const GLint *params);
+GLAPI void APIENTRY glNamedProgramLocalParameterI4uiEXT (GLuint program, GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
+GLAPI void APIENTRY glNamedProgramLocalParameterI4uivEXT (GLuint program, GLenum target, GLuint index, const GLuint *params);
+GLAPI void APIENTRY glNamedProgramLocalParametersI4uivEXT (GLuint program, GLenum target, GLuint index, GLsizei count, const GLuint *params);
+GLAPI void APIENTRY glGetNamedProgramLocalParameterIivEXT (GLuint program, GLenum target, GLuint index, GLint *params);
+GLAPI void APIENTRY glGetNamedProgramLocalParameterIuivEXT (GLuint program, GLenum target, GLuint index, GLuint *params);
+GLAPI void APIENTRY glTextureParameterIivEXT (GLuint texture, GLenum target, GLenum pname, const GLint *params);
+GLAPI void APIENTRY glTextureParameterIuivEXT (GLuint texture, GLenum target, GLenum pname, const GLuint *params);
+GLAPI void APIENTRY glGetTextureParameterIivEXT (GLuint texture, GLenum target, GLenum pname, GLint *params);
+GLAPI void APIENTRY glGetTextureParameterIuivEXT (GLuint texture, GLenum target, GLenum pname, GLuint *params);
+GLAPI void APIENTRY glMultiTexParameterIivEXT (GLenum texunit, GLenum target, GLenum pname, const GLint *params);
+GLAPI void APIENTRY glMultiTexParameterIuivEXT (GLenum texunit, GLenum target, GLenum pname, const GLuint *params);
+GLAPI void APIENTRY glGetMultiTexParameterIivEXT (GLenum texunit, GLenum target, GLenum pname, GLint *params);
+GLAPI void APIENTRY glGetMultiTexParameterIuivEXT (GLenum texunit, GLenum target, GLenum pname, GLuint *params);
+GLAPI void APIENTRY glProgramUniform1fEXT (GLuint program, GLint location, GLfloat v0);
+GLAPI void APIENTRY glProgramUniform2fEXT (GLuint program, GLint location, GLfloat v0, GLfloat v1);
+GLAPI void APIENTRY glProgramUniform3fEXT (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
+GLAPI void APIENTRY glProgramUniform4fEXT (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
+GLAPI void APIENTRY glProgramUniform1iEXT (GLuint program, GLint location, GLint v0);
+GLAPI void APIENTRY glProgramUniform2iEXT (GLuint program, GLint location, GLint v0, GLint v1);
+GLAPI void APIENTRY glProgramUniform3iEXT (GLuint program, GLint location, GLint v0, GLint v1, GLint v2);
+GLAPI void APIENTRY glProgramUniform4iEXT (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
+GLAPI void APIENTRY glProgramUniform1fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value);
+GLAPI void APIENTRY glProgramUniform2fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value);
+GLAPI void APIENTRY glProgramUniform3fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value);
+GLAPI void APIENTRY glProgramUniform4fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value);
+GLAPI void APIENTRY glProgramUniform1ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value);
+GLAPI void APIENTRY glProgramUniform2ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value);
+GLAPI void APIENTRY glProgramUniform3ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value);
+GLAPI void APIENTRY glProgramUniform4ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value);
+GLAPI void APIENTRY glProgramUniformMatrix2fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GLAPI void APIENTRY glProgramUniformMatrix3fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GLAPI void APIENTRY glProgramUniformMatrix4fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GLAPI void APIENTRY glProgramUniformMatrix2x3fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GLAPI void APIENTRY glProgramUniformMatrix3x2fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GLAPI void APIENTRY glProgramUniformMatrix2x4fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GLAPI void APIENTRY glProgramUniformMatrix4x2fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GLAPI void APIENTRY glProgramUniformMatrix3x4fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GLAPI void APIENTRY glProgramUniformMatrix4x3fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GLAPI void APIENTRY glProgramUniform1uiEXT (GLuint program, GLint location, GLuint v0);
+GLAPI void APIENTRY glProgramUniform2uiEXT (GLuint program, GLint location, GLuint v0, GLuint v1);
+GLAPI void APIENTRY glProgramUniform3uiEXT (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2);
+GLAPI void APIENTRY glProgramUniform4uiEXT (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
+GLAPI void APIENTRY glProgramUniform1uivEXT (GLuint program, GLint location, GLsizei count, const GLuint *value);
+GLAPI void APIENTRY glProgramUniform2uivEXT (GLuint program, GLint location, GLsizei count, const GLuint *value);
+GLAPI void APIENTRY glProgramUniform3uivEXT (GLuint program, GLint location, GLsizei count, const GLuint *value);
+GLAPI void APIENTRY glProgramUniform4uivEXT (GLuint program, GLint location, GLsizei count, const GLuint *value);
+GLAPI void APIENTRY glNamedBufferDataEXT (GLuint buffer, GLsizeiptr size, const GLvoid *data, GLenum usage);
+GLAPI void APIENTRY glNamedBufferSubDataEXT (GLuint buffer, GLintptr offset, GLsizeiptr size, const GLvoid *data);
+GLAPI GLvoid* APIENTRY glMapNamedBufferEXT (GLuint buffer, GLenum access);
+GLAPI GLboolean APIENTRY glUnmapNamedBufferEXT (GLuint buffer);
+GLAPI GLvoid* APIENTRY glMapNamedBufferRangeEXT (GLuint buffer, GLintptr offset, GLsizeiptr length, GLbitfield access);
+GLAPI void APIENTRY glFlushMappedNamedBufferRangeEXT (GLuint buffer, GLintptr offset, GLsizeiptr length);
+GLAPI void APIENTRY glNamedCopyBufferSubDataEXT (GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size);
+GLAPI void APIENTRY glGetNamedBufferParameterivEXT (GLuint buffer, GLenum pname, GLint *params);
+GLAPI void APIENTRY glGetNamedBufferPointervEXT (GLuint buffer, GLenum pname, GLvoid* *params);
+GLAPI void APIENTRY glGetNamedBufferSubDataEXT (GLuint buffer, GLintptr offset, GLsizeiptr size, GLvoid *data);
+GLAPI void APIENTRY glTextureBufferEXT (GLuint texture, GLenum target, GLenum internalformat, GLuint buffer);
+GLAPI void APIENTRY glMultiTexBufferEXT (GLenum texunit, GLenum target, GLenum internalformat, GLuint buffer);
+GLAPI void APIENTRY glNamedRenderbufferStorageEXT (GLuint renderbuffer, GLenum internalformat, GLsizei width, GLsizei height);
+GLAPI void APIENTRY glGetNamedRenderbufferParameterivEXT (GLuint renderbuffer, GLenum pname, GLint *params);
+GLAPI GLenum APIENTRY glCheckNamedFramebufferStatusEXT (GLuint framebuffer, GLenum target);
+GLAPI void APIENTRY glNamedFramebufferTexture1DEXT (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
+GLAPI void APIENTRY glNamedFramebufferTexture2DEXT (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
+GLAPI void APIENTRY glNamedFramebufferTexture3DEXT (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
+GLAPI void APIENTRY glNamedFramebufferRenderbufferEXT (GLuint framebuffer, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
+GLAPI void APIENTRY glGetNamedFramebufferAttachmentParameterivEXT (GLuint framebuffer, GLenum attachment, GLenum pname, GLint *params);
+GLAPI void APIENTRY glGenerateTextureMipmapEXT (GLuint texture, GLenum target);
+GLAPI void APIENTRY glGenerateMultiTexMipmapEXT (GLenum texunit, GLenum target);
+GLAPI void APIENTRY glFramebufferDrawBufferEXT (GLuint framebuffer, GLenum mode);
+GLAPI void APIENTRY glFramebufferDrawBuffersEXT (GLuint framebuffer, GLsizei n, const GLenum *bufs);
+GLAPI void APIENTRY glFramebufferReadBufferEXT (GLuint framebuffer, GLenum mode);
+GLAPI void APIENTRY glGetFramebufferParameterivEXT (GLuint framebuffer, GLenum pname, GLint *params);
+GLAPI void APIENTRY glNamedRenderbufferStorageMultisampleEXT (GLuint renderbuffer, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
+GLAPI void APIENTRY glNamedRenderbufferStorageMultisampleCoverageEXT (GLuint renderbuffer, GLsizei coverageSamples, GLsizei colorSamples, GLenum internalformat, GLsizei width, GLsizei height);
+GLAPI void APIENTRY glNamedFramebufferTextureEXT (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level);
+GLAPI void APIENTRY glNamedFramebufferTextureLayerEXT (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLint layer);
+GLAPI void APIENTRY glNamedFramebufferTextureFaceEXT (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLenum face);
+GLAPI void APIENTRY glTextureRenderbufferEXT (GLuint texture, GLenum target, GLuint renderbuffer);
+GLAPI void APIENTRY glMultiTexRenderbufferEXT (GLenum texunit, GLenum target, GLuint renderbuffer);
+GLAPI void APIENTRY glProgramUniform1dEXT (GLuint program, GLint location, GLdouble x);
+GLAPI void APIENTRY glProgramUniform2dEXT (GLuint program, GLint location, GLdouble x, GLdouble y);
+GLAPI void APIENTRY glProgramUniform3dEXT (GLuint program, GLint location, GLdouble x, GLdouble y, GLdouble z);
+GLAPI void APIENTRY glProgramUniform4dEXT (GLuint program, GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
+GLAPI void APIENTRY glProgramUniform1dvEXT (GLuint program, GLint location, GLsizei count, const GLdouble *value);
+GLAPI void APIENTRY glProgramUniform2dvEXT (GLuint program, GLint location, GLsizei count, const GLdouble *value);
+GLAPI void APIENTRY glProgramUniform3dvEXT (GLuint program, GLint location, GLsizei count, const GLdouble *value);
+GLAPI void APIENTRY glProgramUniform4dvEXT (GLuint program, GLint location, GLsizei count, const GLdouble *value);
+GLAPI void APIENTRY glProgramUniformMatrix2dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+GLAPI void APIENTRY glProgramUniformMatrix3dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+GLAPI void APIENTRY glProgramUniformMatrix4dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+GLAPI void APIENTRY glProgramUniformMatrix2x3dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+GLAPI void APIENTRY glProgramUniformMatrix2x4dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+GLAPI void APIENTRY glProgramUniformMatrix3x2dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+GLAPI void APIENTRY glProgramUniformMatrix3x4dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+GLAPI void APIENTRY glProgramUniformMatrix4x2dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+GLAPI void APIENTRY glProgramUniformMatrix4x3dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLCLIENTATTRIBDEFAULTEXTPROC) (GLbitfield mask);
+typedef void (APIENTRYP PFNGLPUSHCLIENTATTRIBDEFAULTEXTPROC) (GLbitfield mask);
+typedef void (APIENTRYP PFNGLMATRIXLOADFEXTPROC) (GLenum mode, const GLfloat *m);
+typedef void (APIENTRYP PFNGLMATRIXLOADDEXTPROC) (GLenum mode, const GLdouble *m);
+typedef void (APIENTRYP PFNGLMATRIXMULTFEXTPROC) (GLenum mode, const GLfloat *m);
+typedef void (APIENTRYP PFNGLMATRIXMULTDEXTPROC) (GLenum mode, const GLdouble *m);
+typedef void (APIENTRYP PFNGLMATRIXLOADIDENTITYEXTPROC) (GLenum mode);
+typedef void (APIENTRYP PFNGLMATRIXROTATEFEXTPROC) (GLenum mode, GLfloat angle, GLfloat x, GLfloat y, GLfloat z);
+typedef void (APIENTRYP PFNGLMATRIXROTATEDEXTPROC) (GLenum mode, GLdouble angle, GLdouble x, GLdouble y, GLdouble z);
+typedef void (APIENTRYP PFNGLMATRIXSCALEFEXTPROC) (GLenum mode, GLfloat x, GLfloat y, GLfloat z);
+typedef void (APIENTRYP PFNGLMATRIXSCALEDEXTPROC) (GLenum mode, GLdouble x, GLdouble y, GLdouble z);
+typedef void (APIENTRYP PFNGLMATRIXTRANSLATEFEXTPROC) (GLenum mode, GLfloat x, GLfloat y, GLfloat z);
+typedef void (APIENTRYP PFNGLMATRIXTRANSLATEDEXTPROC) (GLenum mode, GLdouble x, GLdouble y, GLdouble z);
+typedef void (APIENTRYP PFNGLMATRIXFRUSTUMEXTPROC) (GLenum mode, GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar);
+typedef void (APIENTRYP PFNGLMATRIXORTHOEXTPROC) (GLenum mode, GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar);
+typedef void (APIENTRYP PFNGLMATRIXPOPEXTPROC) (GLenum mode);
+typedef void (APIENTRYP PFNGLMATRIXPUSHEXTPROC) (GLenum mode);
+typedef void (APIENTRYP PFNGLMATRIXLOADTRANSPOSEFEXTPROC) (GLenum mode, const GLfloat *m);
+typedef void (APIENTRYP PFNGLMATRIXLOADTRANSPOSEDEXTPROC) (GLenum mode, const GLdouble *m);
+typedef void (APIENTRYP PFNGLMATRIXMULTTRANSPOSEFEXTPROC) (GLenum mode, const GLfloat *m);
+typedef void (APIENTRYP PFNGLMATRIXMULTTRANSPOSEDEXTPROC) (GLenum mode, const GLdouble *m);
+typedef void (APIENTRYP PFNGLTEXTUREPARAMETERFEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLfloat param);
+typedef void (APIENTRYP PFNGLTEXTUREPARAMETERFVEXTPROC) (GLuint texture, GLenum target, GLenum pname, const GLfloat *params);
+typedef void (APIENTRYP PFNGLTEXTUREPARAMETERIEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLint param);
+typedef void (APIENTRYP PFNGLTEXTUREPARAMETERIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, const GLint *params);
+typedef void (APIENTRYP PFNGLTEXTUREIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid *pixels);
+typedef void (APIENTRYP PFNGLTEXTUREIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels);
+typedef void (APIENTRYP PFNGLTEXTURESUBIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels);
+typedef void (APIENTRYP PFNGLTEXTURESUBIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels);
+typedef void (APIENTRYP PFNGLCOPYTEXTUREIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border);
+typedef void (APIENTRYP PFNGLCOPYTEXTUREIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
+typedef void (APIENTRYP PFNGLCOPYTEXTURESUBIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);
+typedef void (APIENTRYP PFNGLCOPYTEXTURESUBIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
+typedef void (APIENTRYP PFNGLGETTEXTUREIMAGEEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum format, GLenum type, GLvoid *pixels);
+typedef void (APIENTRYP PFNGLGETTEXTUREPARAMETERFVEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLfloat *params);
+typedef void (APIENTRYP PFNGLGETTEXTUREPARAMETERIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLGETTEXTURELEVELPARAMETERFVEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum pname, GLfloat *params);
+typedef void (APIENTRYP PFNGLGETTEXTURELEVELPARAMETERIVEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLTEXTUREIMAGE3DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels);
+typedef void (APIENTRYP PFNGLTEXTURESUBIMAGE3DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels);
+typedef void (APIENTRYP PFNGLCOPYTEXTURESUBIMAGE3DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
+typedef void (APIENTRYP PFNGLMULTITEXPARAMETERFEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLfloat param);
+typedef void (APIENTRYP PFNGLMULTITEXPARAMETERFVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLfloat *params);
+typedef void (APIENTRYP PFNGLMULTITEXPARAMETERIEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLint param);
+typedef void (APIENTRYP PFNGLMULTITEXPARAMETERIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLint *params);
+typedef void (APIENTRYP PFNGLMULTITEXIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid *pixels);
+typedef void (APIENTRYP PFNGLMULTITEXIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels);
+typedef void (APIENTRYP PFNGLMULTITEXSUBIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels);
+typedef void (APIENTRYP PFNGLMULTITEXSUBIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels);
+typedef void (APIENTRYP PFNGLCOPYMULTITEXIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border);
+typedef void (APIENTRYP PFNGLCOPYMULTITEXIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
+typedef void (APIENTRYP PFNGLCOPYMULTITEXSUBIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);
+typedef void (APIENTRYP PFNGLCOPYMULTITEXSUBIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
+typedef void (APIENTRYP PFNGLGETMULTITEXIMAGEEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum format, GLenum type, GLvoid *pixels);
+typedef void (APIENTRYP PFNGLGETMULTITEXPARAMETERFVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLfloat *params);
+typedef void (APIENTRYP PFNGLGETMULTITEXPARAMETERIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLGETMULTITEXLEVELPARAMETERFVEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum pname, GLfloat *params);
+typedef void (APIENTRYP PFNGLGETMULTITEXLEVELPARAMETERIVEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLMULTITEXIMAGE3DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels);
+typedef void (APIENTRYP PFNGLMULTITEXSUBIMAGE3DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels);
+typedef void (APIENTRYP PFNGLCOPYMULTITEXSUBIMAGE3DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
+typedef void (APIENTRYP PFNGLBINDMULTITEXTUREEXTPROC) (GLenum texunit, GLenum target, GLuint texture);
+typedef void (APIENTRYP PFNGLENABLECLIENTSTATEINDEXEDEXTPROC) (GLenum array, GLuint index);
+typedef void (APIENTRYP PFNGLDISABLECLIENTSTATEINDEXEDEXTPROC) (GLenum array, GLuint index);
+typedef void (APIENTRYP PFNGLMULTITEXCOORDPOINTEREXTPROC) (GLenum texunit, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
+typedef void (APIENTRYP PFNGLMULTITEXENVFEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLfloat param);
+typedef void (APIENTRYP PFNGLMULTITEXENVFVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLfloat *params);
+typedef void (APIENTRYP PFNGLMULTITEXENVIEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLint param);
+typedef void (APIENTRYP PFNGLMULTITEXENVIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLint *params);
+typedef void (APIENTRYP PFNGLMULTITEXGENDEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLdouble param);
+typedef void (APIENTRYP PFNGLMULTITEXGENDVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, const GLdouble *params);
+typedef void (APIENTRYP PFNGLMULTITEXGENFEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLfloat param);
+typedef void (APIENTRYP PFNGLMULTITEXGENFVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, const GLfloat *params);
+typedef void (APIENTRYP PFNGLMULTITEXGENIEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLint param);
+typedef void (APIENTRYP PFNGLMULTITEXGENIVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, const GLint *params);
+typedef void (APIENTRYP PFNGLGETMULTITEXENVFVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLfloat *params);
+typedef void (APIENTRYP PFNGLGETMULTITEXENVIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLGETMULTITEXGENDVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLdouble *params);
+typedef void (APIENTRYP PFNGLGETMULTITEXGENFVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLfloat *params);
+typedef void (APIENTRYP PFNGLGETMULTITEXGENIVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLGETFLOATINDEXEDVEXTPROC) (GLenum target, GLuint index, GLfloat *data);
+typedef void (APIENTRYP PFNGLGETDOUBLEINDEXEDVEXTPROC) (GLenum target, GLuint index, GLdouble *data);
+typedef void (APIENTRYP PFNGLGETPOINTERINDEXEDVEXTPROC) (GLenum target, GLuint index, GLvoid* *data);
+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTUREIMAGE3DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *bits);
+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTUREIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *bits);
+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTUREIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *bits);
+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTURESUBIMAGE3DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *bits);
+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTURESUBIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *bits);
+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTURESUBIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *bits);
+typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXTUREIMAGEEXTPROC) (GLuint texture, GLenum target, GLint lod, GLvoid *img);
+typedef void (APIENTRYP PFNGLCOMPRESSEDMULTITEXIMAGE3DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *bits);
+typedef void (APIENTRYP PFNGLCOMPRESSEDMULTITEXIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *bits);
+typedef void (APIENTRYP PFNGLCOMPRESSEDMULTITEXIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *bits);
+typedef void (APIENTRYP PFNGLCOMPRESSEDMULTITEXSUBIMAGE3DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *bits);
+typedef void (APIENTRYP PFNGLCOMPRESSEDMULTITEXSUBIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *bits);
+typedef void (APIENTRYP PFNGLCOMPRESSEDMULTITEXSUBIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *bits);
+typedef void (APIENTRYP PFNGLGETCOMPRESSEDMULTITEXIMAGEEXTPROC) (GLenum texunit, GLenum target, GLint lod, GLvoid *img);
+typedef void (APIENTRYP PFNGLNAMEDPROGRAMSTRINGEXTPROC) (GLuint program, GLenum target, GLenum format, GLsizei len, const GLvoid *string);
+typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETER4DEXTPROC) (GLuint program, GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
+typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETER4DVEXTPROC) (GLuint program, GLenum target, GLuint index, const GLdouble *params);
+typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETER4FEXTPROC) (GLuint program, GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETER4FVEXTPROC) (GLuint program, GLenum target, GLuint index, const GLfloat *params);
+typedef void (APIENTRYP PFNGLGETNAMEDPROGRAMLOCALPARAMETERDVEXTPROC) (GLuint program, GLenum target, GLuint index, GLdouble *params);
+typedef void (APIENTRYP PFNGLGETNAMEDPROGRAMLOCALPARAMETERFVEXTPROC) (GLuint program, GLenum target, GLuint index, GLfloat *params);
+typedef void (APIENTRYP PFNGLGETNAMEDPROGRAMIVEXTPROC) (GLuint program, GLenum target, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLGETNAMEDPROGRAMSTRINGEXTPROC) (GLuint program, GLenum target, GLenum pname, GLvoid *string);
+typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERS4FVEXTPROC) (GLuint program, GLenum target, GLuint index, GLsizei count, const GLfloat *params);
+typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERI4IEXTPROC) (GLuint program, GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w);
+typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERI4IVEXTPROC) (GLuint program, GLenum target, GLuint index, const GLint *params);
+typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERSI4IVEXTPROC) (GLuint program, GLenum target, GLuint index, GLsizei count, const GLint *params);
+typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERI4UIEXTPROC) (GLuint program, GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
+typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERI4UIVEXTPROC) (GLuint program, GLenum target, GLuint index, const GLuint *params);
+typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERSI4UIVEXTPROC) (GLuint program, GLenum target, GLuint index, GLsizei count, const GLuint *params);
+typedef void (APIENTRYP PFNGLGETNAMEDPROGRAMLOCALPARAMETERIIVEXTPROC) (GLuint program, GLenum target, GLuint index, GLint *params);
+typedef void (APIENTRYP PFNGLGETNAMEDPROGRAMLOCALPARAMETERIUIVEXTPROC) (GLuint program, GLenum target, GLuint index, GLuint *params);
+typedef void (APIENTRYP PFNGLTEXTUREPARAMETERIIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, const GLint *params);
+typedef void (APIENTRYP PFNGLTEXTUREPARAMETERIUIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, const GLuint *params);
+typedef void (APIENTRYP PFNGLGETTEXTUREPARAMETERIIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLGETTEXTUREPARAMETERIUIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLuint *params);
+typedef void (APIENTRYP PFNGLMULTITEXPARAMETERIIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLint *params);
+typedef void (APIENTRYP PFNGLMULTITEXPARAMETERIUIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLuint *params);
+typedef void (APIENTRYP PFNGLGETMULTITEXPARAMETERIIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLGETMULTITEXPARAMETERIUIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLuint *params);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1FEXTPROC) (GLuint program, GLint location, GLfloat v0);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2FEXTPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3FEXTPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4FEXTPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1IEXTPROC) (GLuint program, GLint location, GLint v0);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2IEXTPROC) (GLuint program, GLint location, GLint v0, GLint v1);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3IEXTPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4IEXTPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X3FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X2FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X4FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X2FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X4FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X3FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UIEXTPROC) (GLuint program, GLint location, GLuint v0);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UIEXTPROC) (GLuint program, GLint location, GLuint v0, GLuint v1);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UIEXTPROC) (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UIEXTPROC) (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value);
+typedef void (APIENTRYP PFNGLNAMEDBUFFERDATAEXTPROC) (GLuint buffer, GLsizeiptr size, const GLvoid *data, GLenum usage);
+typedef void (APIENTRYP PFNGLNAMEDBUFFERSUBDATAEXTPROC) (GLuint buffer, GLintptr offset, GLsizeiptr size, const GLvoid *data);
+typedef GLvoid* (APIENTRYP PFNGLMAPNAMEDBUFFEREXTPROC) (GLuint buffer, GLenum access);
+typedef GLboolean (APIENTRYP PFNGLUNMAPNAMEDBUFFEREXTPROC) (GLuint buffer);
+typedef GLvoid* (APIENTRYP PFNGLMAPNAMEDBUFFERRANGEEXTPROC) (GLuint buffer, GLintptr offset, GLsizeiptr length, GLbitfield access);
+typedef void (APIENTRYP PFNGLFLUSHMAPPEDNAMEDBUFFERRANGEEXTPROC) (GLuint buffer, GLintptr offset, GLsizeiptr length);
+typedef void (APIENTRYP PFNGLNAMEDCOPYBUFFERSUBDATAEXTPROC) (GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size);
+typedef void (APIENTRYP PFNGLGETNAMEDBUFFERPARAMETERIVEXTPROC) (GLuint buffer, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLGETNAMEDBUFFERPOINTERVEXTPROC) (GLuint buffer, GLenum pname, GLvoid* *params);
+typedef void (APIENTRYP PFNGLGETNAMEDBUFFERSUBDATAEXTPROC) (GLuint buffer, GLintptr offset, GLsizeiptr size, GLvoid *data);
+typedef void (APIENTRYP PFNGLTEXTUREBUFFEREXTPROC) (GLuint texture, GLenum target, GLenum internalformat, GLuint buffer);
+typedef void (APIENTRYP PFNGLMULTITEXBUFFEREXTPROC) (GLenum texunit, GLenum target, GLenum internalformat, GLuint buffer);
+typedef void (APIENTRYP PFNGLNAMEDRENDERBUFFERSTORAGEEXTPROC) (GLuint renderbuffer, GLenum internalformat, GLsizei width, GLsizei height);
+typedef void (APIENTRYP PFNGLGETNAMEDRENDERBUFFERPARAMETERIVEXTPROC) (GLuint renderbuffer, GLenum pname, GLint *params);
+typedef GLenum (APIENTRYP PFNGLCHECKNAMEDFRAMEBUFFERSTATUSEXTPROC) (GLuint framebuffer, GLenum target);
+typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTURE1DEXTPROC) (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
+typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTURE2DEXTPROC) (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
+typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTURE3DEXTPROC) (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
+typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERRENDERBUFFEREXTPROC) (GLuint framebuffer, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
+typedef void (APIENTRYP PFNGLGETNAMEDFRAMEBUFFERATTACHMENTPARAMETERIVEXTPROC) (GLuint framebuffer, GLenum attachment, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLGENERATETEXTUREMIPMAPEXTPROC) (GLuint texture, GLenum target);
+typedef void (APIENTRYP PFNGLGENERATEMULTITEXMIPMAPEXTPROC) (GLenum texunit, GLenum target);
+typedef void (APIENTRYP PFNGLFRAMEBUFFERDRAWBUFFEREXTPROC) (GLuint framebuffer, GLenum mode);
+typedef void (APIENTRYP PFNGLFRAMEBUFFERDRAWBUFFERSEXTPROC) (GLuint framebuffer, GLsizei n, const GLenum *bufs);
+typedef void (APIENTRYP PFNGLFRAMEBUFFERREADBUFFEREXTPROC) (GLuint framebuffer, GLenum mode);
+typedef void (APIENTRYP PFNGLGETFRAMEBUFFERPARAMETERIVEXTPROC) (GLuint framebuffer, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLNAMEDRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC) (GLuint renderbuffer, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
+typedef void (APIENTRYP PFNGLNAMEDRENDERBUFFERSTORAGEMULTISAMPLECOVERAGEEXTPROC) (GLuint renderbuffer, GLsizei coverageSamples, GLsizei colorSamples, GLenum internalformat, GLsizei width, GLsizei height);
+typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTUREEXTPROC) (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level);
+typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTURELAYEREXTPROC) (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLint layer);
+typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTUREFACEEXTPROC) (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLenum face);
+typedef void (APIENTRYP PFNGLTEXTURERENDERBUFFEREXTPROC) (GLuint texture, GLenum target, GLuint renderbuffer);
+typedef void (APIENTRYP PFNGLMULTITEXRENDERBUFFEREXTPROC) (GLenum texunit, GLenum target, GLuint renderbuffer);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1DEXTPROC) (GLuint program, GLint location, GLdouble x);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2DEXTPROC) (GLuint program, GLint location, GLdouble x, GLdouble y);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3DEXTPROC) (GLuint program, GLint location, GLdouble x, GLdouble y, GLdouble z);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4DEXTPROC) (GLuint program, GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1DVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2DVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3DVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4DVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X3DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X4DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X2DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X4DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X2DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X3DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+#endif
+
+#ifndef GL_EXT_vertex_array_bgra
+#define GL_EXT_vertex_array_bgra 1
+#endif
+
+#ifndef GL_EXT_texture_swizzle
+#define GL_EXT_texture_swizzle 1
+#endif
+
+#ifndef GL_NV_explicit_multisample
+#define GL_NV_explicit_multisample 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glGetMultisamplefvNV (GLenum pname, GLuint index, GLfloat *val);
+GLAPI void APIENTRY glSampleMaskIndexedNV (GLuint index, GLbitfield mask);
+GLAPI void APIENTRY glTexRenderbufferNV (GLenum target, GLuint renderbuffer);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLGETMULTISAMPLEFVNVPROC) (GLenum pname, GLuint index, GLfloat *val);
+typedef void (APIENTRYP PFNGLSAMPLEMASKINDEXEDNVPROC) (GLuint index, GLbitfield mask);
+typedef void (APIENTRYP PFNGLTEXRENDERBUFFERNVPROC) (GLenum target, GLuint renderbuffer);
+#endif
+
+#ifndef GL_NV_transform_feedback2
+#define GL_NV_transform_feedback2 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glBindTransformFeedbackNV (GLenum target, GLuint id);
+GLAPI void APIENTRY glDeleteTransformFeedbacksNV (GLsizei n, const GLuint *ids);
+GLAPI void APIENTRY glGenTransformFeedbacksNV (GLsizei n, GLuint *ids);
+GLAPI GLboolean APIENTRY glIsTransformFeedbackNV (GLuint id);
+GLAPI void APIENTRY glPauseTransformFeedbackNV (void);
+GLAPI void APIENTRY glResumeTransformFeedbackNV (void);
+GLAPI void APIENTRY glDrawTransformFeedbackNV (GLenum mode, GLuint id);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLBINDTRANSFORMFEEDBACKNVPROC) (GLenum target, GLuint id);
+typedef void (APIENTRYP PFNGLDELETETRANSFORMFEEDBACKSNVPROC) (GLsizei n, const GLuint *ids);
+typedef void (APIENTRYP PFNGLGENTRANSFORMFEEDBACKSNVPROC) (GLsizei n, GLuint *ids);
+typedef GLboolean (APIENTRYP PFNGLISTRANSFORMFEEDBACKNVPROC) (GLuint id);
+typedef void (APIENTRYP PFNGLPAUSETRANSFORMFEEDBACKNVPROC) (void);
+typedef void (APIENTRYP PFNGLRESUMETRANSFORMFEEDBACKNVPROC) (void);
+typedef void (APIENTRYP PFNGLDRAWTRANSFORMFEEDBACKNVPROC) (GLenum mode, GLuint id);
+#endif
+
+#ifndef GL_ATI_meminfo
+#define GL_ATI_meminfo 1
+#endif
+
+#ifndef GL_AMD_performance_monitor
+#define GL_AMD_performance_monitor 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glGetPerfMonitorGroupsAMD (GLint *numGroups, GLsizei groupsSize, GLuint *groups);
+GLAPI void APIENTRY glGetPerfMonitorCountersAMD (GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters);
+GLAPI void APIENTRY glGetPerfMonitorGroupStringAMD (GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString);
+GLAPI void APIENTRY glGetPerfMonitorCounterStringAMD (GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString);
+GLAPI void APIENTRY glGetPerfMonitorCounterInfoAMD (GLuint group, GLuint counter, GLenum pname, GLvoid *data);
+GLAPI void APIENTRY glGenPerfMonitorsAMD (GLsizei n, GLuint *monitors);
+GLAPI void APIENTRY glDeletePerfMonitorsAMD (GLsizei n, GLuint *monitors);
+GLAPI void APIENTRY glSelectPerfMonitorCountersAMD (GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *counterList);
+GLAPI void APIENTRY glBeginPerfMonitorAMD (GLuint monitor);
+GLAPI void APIENTRY glEndPerfMonitorAMD (GLuint monitor);
+GLAPI void APIENTRY glGetPerfMonitorCounterDataAMD (GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLGETPERFMONITORGROUPSAMDPROC) (GLint *numGroups, GLsizei groupsSize, GLuint *groups);
+typedef void (APIENTRYP PFNGLGETPERFMONITORCOUNTERSAMDPROC) (GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters);
+typedef void (APIENTRYP PFNGLGETPERFMONITORGROUPSTRINGAMDPROC) (GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString);
+typedef void (APIENTRYP PFNGLGETPERFMONITORCOUNTERSTRINGAMDPROC) (GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString);
+typedef void (APIENTRYP PFNGLGETPERFMONITORCOUNTERINFOAMDPROC) (GLuint group, GLuint counter, GLenum pname, GLvoid *data);
+typedef void (APIENTRYP PFNGLGENPERFMONITORSAMDPROC) (GLsizei n, GLuint *monitors);
+typedef void (APIENTRYP PFNGLDELETEPERFMONITORSAMDPROC) (GLsizei n, GLuint *monitors);
+typedef void (APIENTRYP PFNGLSELECTPERFMONITORCOUNTERSAMDPROC) (GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *counterList);
+typedef void (APIENTRYP PFNGLBEGINPERFMONITORAMDPROC) (GLuint monitor);
+typedef void (APIENTRYP PFNGLENDPERFMONITORAMDPROC) (GLuint monitor);
+typedef void (APIENTRYP PFNGLGETPERFMONITORCOUNTERDATAAMDPROC) (GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten);
+#endif
+
+#ifndef GL_AMD_texture_texture4
+#define GL_AMD_texture_texture4 1
+#endif
+
+#ifndef GL_AMD_vertex_shader_tesselator
+#define GL_AMD_vertex_shader_tesselator 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glTessellationFactorAMD (GLfloat factor);
+GLAPI void APIENTRY glTessellationModeAMD (GLenum mode);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLTESSELLATIONFACTORAMDPROC) (GLfloat factor);
+typedef void (APIENTRYP PFNGLTESSELLATIONMODEAMDPROC) (GLenum mode);
+#endif
+
+#ifndef GL_EXT_provoking_vertex
+#define GL_EXT_provoking_vertex 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glProvokingVertexEXT (GLenum mode);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLPROVOKINGVERTEXEXTPROC) (GLenum mode);
+#endif
+
+#ifndef GL_EXT_texture_snorm
+#define GL_EXT_texture_snorm 1
+#endif
+
+#ifndef GL_AMD_draw_buffers_blend
+#define GL_AMD_draw_buffers_blend 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glBlendFuncIndexedAMD (GLuint buf, GLenum src, GLenum dst);
+GLAPI void APIENTRY glBlendFuncSeparateIndexedAMD (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
+GLAPI void APIENTRY glBlendEquationIndexedAMD (GLuint buf, GLenum mode);
+GLAPI void APIENTRY glBlendEquationSeparateIndexedAMD (GLuint buf, GLenum modeRGB, GLenum modeAlpha);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLBLENDFUNCINDEXEDAMDPROC) (GLuint buf, GLenum src, GLenum dst);
+typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEINDEXEDAMDPROC) (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
+typedef void (APIENTRYP PFNGLBLENDEQUATIONINDEXEDAMDPROC) (GLuint buf, GLenum mode);
+typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEINDEXEDAMDPROC) (GLuint buf, GLenum modeRGB, GLenum modeAlpha);
+#endif
+
+#ifndef GL_APPLE_texture_range
+#define GL_APPLE_texture_range 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glTextureRangeAPPLE (GLenum target, GLsizei length, const GLvoid *pointer);
+GLAPI void APIENTRY glGetTexParameterPointervAPPLE (GLenum target, GLenum pname, GLvoid* *params);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLTEXTURERANGEAPPLEPROC) (GLenum target, GLsizei length, const GLvoid *pointer);
+typedef void (APIENTRYP PFNGLGETTEXPARAMETERPOINTERVAPPLEPROC) (GLenum target, GLenum pname, GLvoid* *params);
+#endif
+
+#ifndef GL_APPLE_float_pixels
+#define GL_APPLE_float_pixels 1
+#endif
+
+#ifndef GL_APPLE_vertex_program_evaluators
+#define GL_APPLE_vertex_program_evaluators 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glEnableVertexAttribAPPLE (GLuint index, GLenum pname);
+GLAPI void APIENTRY glDisableVertexAttribAPPLE (GLuint index, GLenum pname);
+GLAPI GLboolean APIENTRY glIsVertexAttribEnabledAPPLE (GLuint index, GLenum pname);
+GLAPI void APIENTRY glMapVertexAttrib1dAPPLE (GLuint index, GLuint size, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble *points);
+GLAPI void APIENTRY glMapVertexAttrib1fAPPLE (GLuint index, GLuint size, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat *points);
+GLAPI void APIENTRY glMapVertexAttrib2dAPPLE (GLuint index, GLuint size, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble *points);
+GLAPI void APIENTRY glMapVertexAttrib2fAPPLE (GLuint index, GLuint size, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat *points);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLENABLEVERTEXATTRIBAPPLEPROC) (GLuint index, GLenum pname);
+typedef void (APIENTRYP PFNGLDISABLEVERTEXATTRIBAPPLEPROC) (GLuint index, GLenum pname);
+typedef GLboolean (APIENTRYP PFNGLISVERTEXATTRIBENABLEDAPPLEPROC) (GLuint index, GLenum pname);
+typedef void (APIENTRYP PFNGLMAPVERTEXATTRIB1DAPPLEPROC) (GLuint index, GLuint size, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble *points);
+typedef void (APIENTRYP PFNGLMAPVERTEXATTRIB1FAPPLEPROC) (GLuint index, GLuint size, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat *points);
+typedef void (APIENTRYP PFNGLMAPVERTEXATTRIB2DAPPLEPROC) (GLuint index, GLuint size, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble *points);
+typedef void (APIENTRYP PFNGLMAPVERTEXATTRIB2FAPPLEPROC) (GLuint index, GLuint size, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat *points);
+#endif
+
+#ifndef GL_APPLE_aux_depth_stencil
+#define GL_APPLE_aux_depth_stencil 1
+#endif
+
+#ifndef GL_APPLE_object_purgeable
+#define GL_APPLE_object_purgeable 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI GLenum APIENTRY glObjectPurgeableAPPLE (GLenum objectType, GLuint name, GLenum option);
+GLAPI GLenum APIENTRY glObjectUnpurgeableAPPLE (GLenum objectType, GLuint name, GLenum option);
+GLAPI void APIENTRY glGetObjectParameterivAPPLE (GLenum objectType, GLuint name, GLenum pname, GLint *params);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef GLenum (APIENTRYP PFNGLOBJECTPURGEABLEAPPLEPROC) (GLenum objectType, GLuint name, GLenum option);
+typedef GLenum (APIENTRYP PFNGLOBJECTUNPURGEABLEAPPLEPROC) (GLenum objectType, GLuint name, GLenum option);
+typedef void (APIENTRYP PFNGLGETOBJECTPARAMETERIVAPPLEPROC) (GLenum objectType, GLuint name, GLenum pname, GLint *params);
+#endif
+
+#ifndef GL_APPLE_row_bytes
+#define GL_APPLE_row_bytes 1
+#endif
+
+#ifndef GL_APPLE_rgb_422
+#define GL_APPLE_rgb_422 1
+#endif
+
+#ifndef GL_NV_video_capture
+#define GL_NV_video_capture 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glBeginVideoCaptureNV (GLuint video_capture_slot);
+GLAPI void APIENTRY glBindVideoCaptureStreamBufferNV (GLuint video_capture_slot, GLuint stream, GLenum frame_region, GLintptrARB offset);
+GLAPI void APIENTRY glBindVideoCaptureStreamTextureNV (GLuint video_capture_slot, GLuint stream, GLenum frame_region, GLenum target, GLuint texture);
+GLAPI void APIENTRY glEndVideoCaptureNV (GLuint video_capture_slot);
+GLAPI void APIENTRY glGetVideoCaptureivNV (GLuint video_capture_slot, GLenum pname, GLint *params);
+GLAPI void APIENTRY glGetVideoCaptureStreamivNV (GLuint video_capture_slot, GLuint stream, GLenum pname, GLint *params);
+GLAPI void APIENTRY glGetVideoCaptureStreamfvNV (GLuint video_capture_slot, GLuint stream, GLenum pname, GLfloat *params);
+GLAPI void APIENTRY glGetVideoCaptureStreamdvNV (GLuint video_capture_slot, GLuint stream, GLenum pname, GLdouble *params);
+GLAPI GLenum APIENTRY glVideoCaptureNV (GLuint video_capture_slot, GLuint *sequence_num, GLuint64EXT *capture_time);
+GLAPI void APIENTRY glVideoCaptureStreamParameterivNV (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLint *params);
+GLAPI void APIENTRY glVideoCaptureStreamParameterfvNV (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLfloat *params);
+GLAPI void APIENTRY glVideoCaptureStreamParameterdvNV (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLdouble *params);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLBEGINVIDEOCAPTURENVPROC) (GLuint video_capture_slot);
+typedef void (APIENTRYP PFNGLBINDVIDEOCAPTURESTREAMBUFFERNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum frame_region, GLintptrARB offset);
+typedef void (APIENTRYP PFNGLBINDVIDEOCAPTURESTREAMTEXTURENVPROC) (GLuint video_capture_slot, GLuint stream, GLenum frame_region, GLenum target, GLuint texture);
+typedef void (APIENTRYP PFNGLENDVIDEOCAPTURENVPROC) (GLuint video_capture_slot);
+typedef void (APIENTRYP PFNGLGETVIDEOCAPTUREIVNVPROC) (GLuint video_capture_slot, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLGETVIDEOCAPTURESTREAMIVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLGETVIDEOCAPTURESTREAMFVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, GLfloat *params);
+typedef void (APIENTRYP PFNGLGETVIDEOCAPTURESTREAMDVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, GLdouble *params);
+typedef GLenum (APIENTRYP PFNGLVIDEOCAPTURENVPROC) (GLuint video_capture_slot, GLuint *sequence_num, GLuint64EXT *capture_time);
+typedef void (APIENTRYP PFNGLVIDEOCAPTURESTREAMPARAMETERIVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLint *params);
+typedef void (APIENTRYP PFNGLVIDEOCAPTURESTREAMPARAMETERFVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLfloat *params);
+typedef void (APIENTRYP PFNGLVIDEOCAPTURESTREAMPARAMETERDVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLdouble *params);
+#endif
+
+#ifndef GL_NV_copy_image
+#define GL_NV_copy_image 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glCopyImageSubDataNV (GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei width, GLsizei height, GLsizei depth);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLCOPYIMAGESUBDATANVPROC) (GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei width, GLsizei height, GLsizei depth);
+#endif
+
+#ifndef GL_EXT_separate_shader_objects
+#define GL_EXT_separate_shader_objects 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glUseShaderProgramEXT (GLenum type, GLuint program);
+GLAPI void APIENTRY glActiveProgramEXT (GLuint program);
+GLAPI GLuint APIENTRY glCreateShaderProgramEXT (GLenum type, const GLchar *string);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLUSESHADERPROGRAMEXTPROC) (GLenum type, GLuint program);
+typedef void (APIENTRYP PFNGLACTIVEPROGRAMEXTPROC) (GLuint program);
+typedef GLuint (APIENTRYP PFNGLCREATESHADERPROGRAMEXTPROC) (GLenum type, const GLchar *string);
+#endif
+
+#ifndef GL_NV_parameter_buffer_object2
+#define GL_NV_parameter_buffer_object2 1
+#endif
+
+#ifndef GL_NV_shader_buffer_load
+#define GL_NV_shader_buffer_load 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glMakeBufferResidentNV (GLenum target, GLenum access);
+GLAPI void APIENTRY glMakeBufferNonResidentNV (GLenum target);
+GLAPI GLboolean APIENTRY glIsBufferResidentNV (GLenum target);
+GLAPI void APIENTRY glMakeNamedBufferResidentNV (GLuint buffer, GLenum access);
+GLAPI void APIENTRY glMakeNamedBufferNonResidentNV (GLuint buffer);
+GLAPI GLboolean APIENTRY glIsNamedBufferResidentNV (GLuint buffer);
+GLAPI void APIENTRY glGetBufferParameterui64vNV (GLenum target, GLenum pname, GLuint64EXT *params);
+GLAPI void APIENTRY glGetNamedBufferParameterui64vNV (GLuint buffer, GLenum pname, GLuint64EXT *params);
+GLAPI void APIENTRY glGetIntegerui64vNV (GLenum value, GLuint64EXT *result);
+GLAPI void APIENTRY glUniformui64NV (GLint location, GLuint64EXT value);
+GLAPI void APIENTRY glUniformui64vNV (GLint location, GLsizei count, const GLuint64EXT *value);
+GLAPI void APIENTRY glGetUniformui64vNV (GLuint program, GLint location, GLuint64EXT *params);
+GLAPI void APIENTRY glProgramUniformui64NV (GLuint program, GLint location, GLuint64EXT value);
+GLAPI void APIENTRY glProgramUniformui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLMAKEBUFFERRESIDENTNVPROC) (GLenum target, GLenum access);
+typedef void (APIENTRYP PFNGLMAKEBUFFERNONRESIDENTNVPROC) (GLenum target);
+typedef GLboolean (APIENTRYP PFNGLISBUFFERRESIDENTNVPROC) (GLenum target);
+typedef void (APIENTRYP PFNGLMAKENAMEDBUFFERRESIDENTNVPROC) (GLuint buffer, GLenum access);
+typedef void (APIENTRYP PFNGLMAKENAMEDBUFFERNONRESIDENTNVPROC) (GLuint buffer);
+typedef GLboolean (APIENTRYP PFNGLISNAMEDBUFFERRESIDENTNVPROC) (GLuint buffer);
+typedef void (APIENTRYP PFNGLGETBUFFERPARAMETERUI64VNVPROC) (GLenum target, GLenum pname, GLuint64EXT *params);
+typedef void (APIENTRYP PFNGLGETNAMEDBUFFERPARAMETERUI64VNVPROC) (GLuint buffer, GLenum pname, GLuint64EXT *params);
+typedef void (APIENTRYP PFNGLGETINTEGERUI64VNVPROC) (GLenum value, GLuint64EXT *result);
+typedef void (APIENTRYP PFNGLUNIFORMUI64NVPROC) (GLint location, GLuint64EXT value);
+typedef void (APIENTRYP PFNGLUNIFORMUI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value);
+typedef void (APIENTRYP PFNGLGETUNIFORMUI64VNVPROC) (GLuint program, GLint location, GLuint64EXT *params);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORMUI64NVPROC) (GLuint program, GLint location, GLuint64EXT value);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORMUI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value);
+#endif
+
+#ifndef GL_NV_vertex_buffer_unified_memory
+#define GL_NV_vertex_buffer_unified_memory 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glBufferAddressRangeNV (GLenum pname, GLuint index, GLuint64EXT address, GLsizeiptr length);
+GLAPI void APIENTRY glVertexFormatNV (GLint size, GLenum type, GLsizei stride);
+GLAPI void APIENTRY glNormalFormatNV (GLenum type, GLsizei stride);
+GLAPI void APIENTRY glColorFormatNV (GLint size, GLenum type, GLsizei stride);
+GLAPI void APIENTRY glIndexFormatNV (GLenum type, GLsizei stride);
+GLAPI void APIENTRY glTexCoordFormatNV (GLint size, GLenum type, GLsizei stride);
+GLAPI void APIENTRY glEdgeFlagFormatNV (GLsizei stride);
+GLAPI void APIENTRY glSecondaryColorFormatNV (GLint size, GLenum type, GLsizei stride);
+GLAPI void APIENTRY glFogCoordFormatNV (GLenum type, GLsizei stride);
+GLAPI void APIENTRY glVertexAttribFormatNV (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride);
+GLAPI void APIENTRY glVertexAttribIFormatNV (GLuint index, GLint size, GLenum type, GLsizei stride);
+GLAPI void APIENTRY glGetIntegerui64i_vNV (GLenum value, GLuint index, GLuint64EXT *result);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLBUFFERADDRESSRANGENVPROC) (GLenum pname, GLuint index, GLuint64EXT address, GLsizeiptr length);
+typedef void (APIENTRYP PFNGLVERTEXFORMATNVPROC) (GLint size, GLenum type, GLsizei stride);
+typedef void (APIENTRYP PFNGLNORMALFORMATNVPROC) (GLenum type, GLsizei stride);
+typedef void (APIENTRYP PFNGLCOLORFORMATNVPROC) (GLint size, GLenum type, GLsizei stride);
+typedef void (APIENTRYP PFNGLINDEXFORMATNVPROC) (GLenum type, GLsizei stride);
+typedef void (APIENTRYP PFNGLTEXCOORDFORMATNVPROC) (GLint size, GLenum type, GLsizei stride);
+typedef void (APIENTRYP PFNGLEDGEFLAGFORMATNVPROC) (GLsizei stride);
+typedef void (APIENTRYP PFNGLSECONDARYCOLORFORMATNVPROC) (GLint size, GLenum type, GLsizei stride);
+typedef void (APIENTRYP PFNGLFOGCOORDFORMATNVPROC) (GLenum type, GLsizei stride);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBFORMATNVPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBIFORMATNVPROC) (GLuint index, GLint size, GLenum type, GLsizei stride);
+typedef void (APIENTRYP PFNGLGETINTEGERUI64I_VNVPROC) (GLenum value, GLuint index, GLuint64EXT *result);
+#endif
+
+#ifndef GL_NV_texture_barrier
+#define GL_NV_texture_barrier 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glTextureBarrierNV (void);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLTEXTUREBARRIERNVPROC) (void);
+#endif
+
+#ifndef GL_AMD_shader_stencil_export
+#define GL_AMD_shader_stencil_export 1
+#endif
+
+#ifndef GL_AMD_seamless_cubemap_per_texture
+#define GL_AMD_seamless_cubemap_per_texture 1
+#endif
+
+#ifndef GL_AMD_conservative_depth
+#define GL_AMD_conservative_depth 1
+#endif
+
+#ifndef GL_EXT_shader_image_load_store
+#define GL_EXT_shader_image_load_store 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glBindImageTextureEXT (GLuint index, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLint format);
+GLAPI void APIENTRY glMemoryBarrierEXT (GLbitfield barriers);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLBINDIMAGETEXTUREEXTPROC) (GLuint index, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLint format);
+typedef void (APIENTRYP PFNGLMEMORYBARRIEREXTPROC) (GLbitfield barriers);
+#endif
+
+#ifndef GL_EXT_vertex_attrib_64bit
+#define GL_EXT_vertex_attrib_64bit 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glVertexAttribL1dEXT (GLuint index, GLdouble x);
+GLAPI void APIENTRY glVertexAttribL2dEXT (GLuint index, GLdouble x, GLdouble y);
+GLAPI void APIENTRY glVertexAttribL3dEXT (GLuint index, GLdouble x, GLdouble y, GLdouble z);
+GLAPI void APIENTRY glVertexAttribL4dEXT (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
+GLAPI void APIENTRY glVertexAttribL1dvEXT (GLuint index, const GLdouble *v);
+GLAPI void APIENTRY glVertexAttribL2dvEXT (GLuint index, const GLdouble *v);
+GLAPI void APIENTRY glVertexAttribL3dvEXT (GLuint index, const GLdouble *v);
+GLAPI void APIENTRY glVertexAttribL4dvEXT (GLuint index, const GLdouble *v);
+GLAPI void APIENTRY glVertexAttribLPointerEXT (GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
+GLAPI void APIENTRY glGetVertexAttribLdvEXT (GLuint index, GLenum pname, GLdouble *params);
+GLAPI void APIENTRY glVertexArrayVertexAttribLOffsetEXT (GLuint vaobj, GLuint buffer, GLuint index, GLint size, GLenum type, GLsizei stride, GLintptr offset);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLVERTEXATTRIBL1DEXTPROC) (GLuint index, GLdouble x);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBL2DEXTPROC) (GLuint index, GLdouble x, GLdouble y);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBL3DEXTPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBL4DEXTPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBL1DVEXTPROC) (GLuint index, const GLdouble *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBL2DVEXTPROC) (GLuint index, const GLdouble *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBL3DVEXTPROC) (GLuint index, const GLdouble *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBL4DVEXTPROC) (GLuint index, const GLdouble *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBLPOINTEREXTPROC) (GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBLDVEXTPROC) (GLuint index, GLenum pname, GLdouble *params);
+typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBLOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLuint index, GLint size, GLenum type, GLsizei stride, GLintptr offset);
+#endif
+
+#ifndef GL_NV_gpu_program5
+#define GL_NV_gpu_program5 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glProgramSubroutineParametersuivNV (GLenum target, GLsizei count, const GLuint *params);
+GLAPI void APIENTRY glGetProgramSubroutineParameteruivNV (GLenum target, GLuint index, GLuint *param);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLPROGRAMSUBROUTINEPARAMETERSUIVNVPROC) (GLenum target, GLsizei count, const GLuint *params);
+typedef void (APIENTRYP PFNGLGETPROGRAMSUBROUTINEPARAMETERUIVNVPROC) (GLenum target, GLuint index, GLuint *param);
+#endif
+
+#ifndef GL_NV_gpu_shader5
+#define GL_NV_gpu_shader5 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glUniform1i64NV (GLint location, GLint64EXT x);
+GLAPI void APIENTRY glUniform2i64NV (GLint location, GLint64EXT x, GLint64EXT y);
+GLAPI void APIENTRY glUniform3i64NV (GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z);
+GLAPI void APIENTRY glUniform4i64NV (GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w);
+GLAPI void APIENTRY glUniform1i64vNV (GLint location, GLsizei count, const GLint64EXT *value);
+GLAPI void APIENTRY glUniform2i64vNV (GLint location, GLsizei count, const GLint64EXT *value);
+GLAPI void APIENTRY glUniform3i64vNV (GLint location, GLsizei count, const GLint64EXT *value);
+GLAPI void APIENTRY glUniform4i64vNV (GLint location, GLsizei count, const GLint64EXT *value);
+GLAPI void APIENTRY glUniform1ui64NV (GLint location, GLuint64EXT x);
+GLAPI void APIENTRY glUniform2ui64NV (GLint location, GLuint64EXT x, GLuint64EXT y);
+GLAPI void APIENTRY glUniform3ui64NV (GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z);
+GLAPI void APIENTRY glUniform4ui64NV (GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w);
+GLAPI void APIENTRY glUniform1ui64vNV (GLint location, GLsizei count, const GLuint64EXT *value);
+GLAPI void APIENTRY glUniform2ui64vNV (GLint location, GLsizei count, const GLuint64EXT *value);
+GLAPI void APIENTRY glUniform3ui64vNV (GLint location, GLsizei count, const GLuint64EXT *value);
+GLAPI void APIENTRY glUniform4ui64vNV (GLint location, GLsizei count, const GLuint64EXT *value);
+GLAPI void APIENTRY glGetUniformi64vNV (GLuint program, GLint location, GLint64EXT *params);
+GLAPI void APIENTRY glProgramUniform1i64NV (GLuint program, GLint location, GLint64EXT x);
+GLAPI void APIENTRY glProgramUniform2i64NV (GLuint program, GLint location, GLint64EXT x, GLint64EXT y);
+GLAPI void APIENTRY glProgramUniform3i64NV (GLuint program, GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z);
+GLAPI void APIENTRY glProgramUniform4i64NV (GLuint program, GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w);
+GLAPI void APIENTRY glProgramUniform1i64vNV (GLuint program, GLint location, GLsizei count, const GLint64EXT *value);
+GLAPI void APIENTRY glProgramUniform2i64vNV (GLuint program, GLint location, GLsizei count, const GLint64EXT *value);
+GLAPI void APIENTRY glProgramUniform3i64vNV (GLuint program, GLint location, GLsizei count, const GLint64EXT *value);
+GLAPI void APIENTRY glProgramUniform4i64vNV (GLuint program, GLint location, GLsizei count, const GLint64EXT *value);
+GLAPI void APIENTRY glProgramUniform1ui64NV (GLuint program, GLint location, GLuint64EXT x);
+GLAPI void APIENTRY glProgramUniform2ui64NV (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y);
+GLAPI void APIENTRY glProgramUniform3ui64NV (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z);
+GLAPI void APIENTRY glProgramUniform4ui64NV (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w);
+GLAPI void APIENTRY glProgramUniform1ui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value);
+GLAPI void APIENTRY glProgramUniform2ui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value);
+GLAPI void APIENTRY glProgramUniform3ui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value);
+GLAPI void APIENTRY glProgramUniform4ui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLUNIFORM1I64NVPROC) (GLint location, GLint64EXT x);
+typedef void (APIENTRYP PFNGLUNIFORM2I64NVPROC) (GLint location, GLint64EXT x, GLint64EXT y);
+typedef void (APIENTRYP PFNGLUNIFORM3I64NVPROC) (GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z);
+typedef void (APIENTRYP PFNGLUNIFORM4I64NVPROC) (GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w);
+typedef void (APIENTRYP PFNGLUNIFORM1I64VNVPROC) (GLint location, GLsizei count, const GLint64EXT *value);
+typedef void (APIENTRYP PFNGLUNIFORM2I64VNVPROC) (GLint location, GLsizei count, const GLint64EXT *value);
+typedef void (APIENTRYP PFNGLUNIFORM3I64VNVPROC) (GLint location, GLsizei count, const GLint64EXT *value);
+typedef void (APIENTRYP PFNGLUNIFORM4I64VNVPROC) (GLint location, GLsizei count, const GLint64EXT *value);
+typedef void (APIENTRYP PFNGLUNIFORM1UI64NVPROC) (GLint location, GLuint64EXT x);
+typedef void (APIENTRYP PFNGLUNIFORM2UI64NVPROC) (GLint location, GLuint64EXT x, GLuint64EXT y);
+typedef void (APIENTRYP PFNGLUNIFORM3UI64NVPROC) (GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z);
+typedef void (APIENTRYP PFNGLUNIFORM4UI64NVPROC) (GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w);
+typedef void (APIENTRYP PFNGLUNIFORM1UI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value);
+typedef void (APIENTRYP PFNGLUNIFORM2UI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value);
+typedef void (APIENTRYP PFNGLUNIFORM3UI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value);
+typedef void (APIENTRYP PFNGLUNIFORM4UI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value);
+typedef void (APIENTRYP PFNGLGETUNIFORMI64VNVPROC) (GLuint program, GLint location, GLint64EXT *params);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1I64NVPROC) (GLuint program, GLint location, GLint64EXT x);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2I64NVPROC) (GLuint program, GLint location, GLint64EXT x, GLint64EXT y);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3I64NVPROC) (GLuint program, GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4I64NVPROC) (GLuint program, GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1I64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLint64EXT *value);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2I64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLint64EXT *value);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3I64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLint64EXT *value);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4I64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLint64EXT *value);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UI64NVPROC) (GLuint program, GLint location, GLuint64EXT x);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UI64NVPROC) (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UI64NVPROC) (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UI64NVPROC) (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value);
+#endif
+
+#ifndef GL_NV_shader_buffer_store
+#define GL_NV_shader_buffer_store 1
+#endif
+
+#ifndef GL_NV_tessellation_program5
+#define GL_NV_tessellation_program5 1
+#endif
+
+#ifndef GL_NV_vertex_attrib_integer_64bit
+#define GL_NV_vertex_attrib_integer_64bit 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glVertexAttribL1i64NV (GLuint index, GLint64EXT x);
+GLAPI void APIENTRY glVertexAttribL2i64NV (GLuint index, GLint64EXT x, GLint64EXT y);
+GLAPI void APIENTRY glVertexAttribL3i64NV (GLuint index, GLint64EXT x, GLint64EXT y, GLint64EXT z);
+GLAPI void APIENTRY glVertexAttribL4i64NV (GLuint index, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w);
+GLAPI void APIENTRY glVertexAttribL1i64vNV (GLuint index, const GLint64EXT *v);
+GLAPI void APIENTRY glVertexAttribL2i64vNV (GLuint index, const GLint64EXT *v);
+GLAPI void APIENTRY glVertexAttribL3i64vNV (GLuint index, const GLint64EXT *v);
+GLAPI void APIENTRY glVertexAttribL4i64vNV (GLuint index, const GLint64EXT *v);
+GLAPI void APIENTRY glVertexAttribL1ui64NV (GLuint index, GLuint64EXT x);
+GLAPI void APIENTRY glVertexAttribL2ui64NV (GLuint index, GLuint64EXT x, GLuint64EXT y);
+GLAPI void APIENTRY glVertexAttribL3ui64NV (GLuint index, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z);
+GLAPI void APIENTRY glVertexAttribL4ui64NV (GLuint index, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w);
+GLAPI void APIENTRY glVertexAttribL1ui64vNV (GLuint index, const GLuint64EXT *v);
+GLAPI void APIENTRY glVertexAttribL2ui64vNV (GLuint index, const GLuint64EXT *v);
+GLAPI void APIENTRY glVertexAttribL3ui64vNV (GLuint index, const GLuint64EXT *v);
+GLAPI void APIENTRY glVertexAttribL4ui64vNV (GLuint index, const GLuint64EXT *v);
+GLAPI void APIENTRY glGetVertexAttribLi64vNV (GLuint index, GLenum pname, GLint64EXT *params);
+GLAPI void APIENTRY glGetVertexAttribLui64vNV (GLuint index, GLenum pname, GLuint64EXT *params);
+GLAPI void APIENTRY glVertexAttribLFormatNV (GLuint index, GLint size, GLenum type, GLsizei stride);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLVERTEXATTRIBL1I64NVPROC) (GLuint index, GLint64EXT x);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBL2I64NVPROC) (GLuint index, GLint64EXT x, GLint64EXT y);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBL3I64NVPROC) (GLuint index, GLint64EXT x, GLint64EXT y, GLint64EXT z);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBL4I64NVPROC) (GLuint index, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBL1I64VNVPROC) (GLuint index, const GLint64EXT *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBL2I64VNVPROC) (GLuint index, const GLint64EXT *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBL3I64VNVPROC) (GLuint index, const GLint64EXT *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBL4I64VNVPROC) (GLuint index, const GLint64EXT *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBL1UI64NVPROC) (GLuint index, GLuint64EXT x);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBL2UI64NVPROC) (GLuint index, GLuint64EXT x, GLuint64EXT y);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBL3UI64NVPROC) (GLuint index, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBL4UI64NVPROC) (GLuint index, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBL1UI64VNVPROC) (GLuint index, const GLuint64EXT *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBL2UI64VNVPROC) (GLuint index, const GLuint64EXT *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBL3UI64VNVPROC) (GLuint index, const GLuint64EXT *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBL4UI64VNVPROC) (GLuint index, const GLuint64EXT *v);
+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBLI64VNVPROC) (GLuint index, GLenum pname, GLint64EXT *params);
+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBLUI64VNVPROC) (GLuint index, GLenum pname, GLuint64EXT *params);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBLFORMATNVPROC) (GLuint index, GLint size, GLenum type, GLsizei stride);
+#endif
+
+#ifndef GL_NV_multisample_coverage
+#define GL_NV_multisample_coverage 1
+#endif
+
+#ifndef GL_AMD_name_gen_delete
+#define GL_AMD_name_gen_delete 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glGenNamesAMD (GLenum identifier, GLuint num, GLuint *names);
+GLAPI void APIENTRY glDeleteNamesAMD (GLenum identifier, GLuint num, const GLuint *names);
+GLAPI GLboolean APIENTRY glIsNameAMD (GLenum identifier, GLuint name);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLGENNAMESAMDPROC) (GLenum identifier, GLuint num, GLuint *names);
+typedef void (APIENTRYP PFNGLDELETENAMESAMDPROC) (GLenum identifier, GLuint num, const GLuint *names);
+typedef GLboolean (APIENTRYP PFNGLISNAMEAMDPROC) (GLenum identifier, GLuint name);
+#endif
+
+#ifndef GL_AMD_debug_output
+#define GL_AMD_debug_output 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glDebugMessageEnableAMD (GLenum category, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled);
+GLAPI void APIENTRY glDebugMessageInsertAMD (GLenum category, GLenum severity, GLuint id, GLsizei length, const GLchar *buf);
+GLAPI void APIENTRY glDebugMessageCallbackAMD (GLDEBUGPROCAMD callback, GLvoid *userParam);
+GLAPI GLuint APIENTRY glGetDebugMessageLogAMD (GLuint count, GLsizei bufsize, GLenum *categories, GLuint *severities, GLuint *ids, GLsizei *lengths, GLchar *message);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLDEBUGMESSAGEENABLEAMDPROC) (GLenum category, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled);
+typedef void (APIENTRYP PFNGLDEBUGMESSAGEINSERTAMDPROC) (GLenum category, GLenum severity, GLuint id, GLsizei length, const GLchar *buf);
+typedef void (APIENTRYP PFNGLDEBUGMESSAGECALLBACKAMDPROC) (GLDEBUGPROCAMD callback, GLvoid *userParam);
+typedef GLuint (APIENTRYP PFNGLGETDEBUGMESSAGELOGAMDPROC) (GLuint count, GLsizei bufsize, GLenum *categories, GLuint *severities, GLuint *ids, GLsizei *lengths, GLchar *message);
+#endif
+
+#ifndef GL_NV_vdpau_interop
+#define GL_NV_vdpau_interop 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glVDPAUInitNV (const GLvoid *vdpDevice, const GLvoid *getProcAddress);
+GLAPI void APIENTRY glVDPAUFiniNV (void);
+GLAPI GLvdpauSurfaceNV APIENTRY glVDPAURegisterVideoSurfaceNV (GLvoid *vdpSurface, GLenum target, GLsizei numTextureNames, const GLuint *textureNames);
+GLAPI GLvdpauSurfaceNV APIENTRY glVDPAURegisterOutputSurfaceNV (GLvoid *vdpSurface, GLenum target, GLsizei numTextureNames, const GLuint *textureNames);
+GLAPI void APIENTRY glVDPAUIsSurfaceNV (GLvdpauSurfaceNV surface);
+GLAPI void APIENTRY glVDPAUUnregisterSurfaceNV (GLvdpauSurfaceNV surface);
+GLAPI void APIENTRY glVDPAUGetSurfaceivNV (GLvdpauSurfaceNV surface, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values);
+GLAPI void APIENTRY glVDPAUSurfaceAccessNV (GLvdpauSurfaceNV surface, GLenum access);
+GLAPI void APIENTRY glVDPAUMapSurfacesNV (GLsizei numSurfaces, const GLvdpauSurfaceNV *surfaces);
+GLAPI void APIENTRY glVDPAUUnmapSurfacesNV (GLsizei numSurface, const GLvdpauSurfaceNV *surfaces);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLVDPAUINITNVPROC) (const GLvoid *vdpDevice, const GLvoid *getProcAddress);
+typedef void (APIENTRYP PFNGLVDPAUFININVPROC) (void);
+typedef GLvdpauSurfaceNV (APIENTRYP PFNGLVDPAUREGISTERVIDEOSURFACENVPROC) (GLvoid *vdpSurface, GLenum target, GLsizei numTextureNames, const GLuint *textureNames);
+typedef GLvdpauSurfaceNV (APIENTRYP PFNGLVDPAUREGISTEROUTPUTSURFACENVPROC) (GLvoid *vdpSurface, GLenum target, GLsizei numTextureNames, const GLuint *textureNames);
+typedef void (APIENTRYP PFNGLVDPAUISSURFACENVPROC) (GLvdpauSurfaceNV surface);
+typedef void (APIENTRYP PFNGLVDPAUUNREGISTERSURFACENVPROC) (GLvdpauSurfaceNV surface);
+typedef void (APIENTRYP PFNGLVDPAUGETSURFACEIVNVPROC) (GLvdpauSurfaceNV surface, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values);
+typedef void (APIENTRYP PFNGLVDPAUSURFACEACCESSNVPROC) (GLvdpauSurfaceNV surface, GLenum access);
+typedef void (APIENTRYP PFNGLVDPAUMAPSURFACESNVPROC) (GLsizei numSurfaces, const GLvdpauSurfaceNV *surfaces);
+typedef void (APIENTRYP PFNGLVDPAUUNMAPSURFACESNVPROC) (GLsizei numSurface, const GLvdpauSurfaceNV *surfaces);
+#endif
+
+#ifndef GL_AMD_transform_feedback3_lines_triangles
+#define GL_AMD_transform_feedback3_lines_triangles 1
+#endif
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+#endif /* NO_SDL_GLEXT */
+
+#endif /* !__IPHONEOS__ */
+
+#endif /* _SDL_opengl_h */
+
+/* vi: set ts=4 sw=4 expandtab: */
diff --git a/include/SDL2/SDL_opengles.h b/include/SDL2/SDL_opengles.h
new file mode 100644 (file)
index 0000000..d88e157
--- /dev/null
@@ -0,0 +1,38 @@
+/*
+  Simple DirectMedia Layer
+  Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
+
+  This software is provided 'as-is', without any express or implied
+  warranty.  In no event will the authors be held liable for any damages
+  arising from the use of this software.
+
+  Permission is granted to anyone to use this software for any purpose,
+  including commercial applications, and to alter it and redistribute it
+  freely, subject to the following restrictions:
+
+  1. The origin of this software must not be misrepresented; you must not
+     claim that you wrote the original software. If you use this software
+     in a product, an acknowledgment in the product documentation would be
+     appreciated but is not required.
+  2. Altered source versions must be plainly marked as such, and must not be
+     misrepresented as being the original software.
+  3. This notice may not be removed or altered from any source distribution.
+*/
+
+/**
+ *  \file SDL_opengles.h
+ *
+ *  This is a simple file to encapsulate the OpenGL ES 1.X API headers.
+ */
+
+#ifdef __IPHONEOS__
+#include <OpenGLES/ES1/gl.h>
+#include <OpenGLES/ES1/glext.h>
+#else
+#include <GLES/gl.h>
+#include <GLES/glext.h>
+#endif
+
+#ifndef APIENTRY
+#define APIENTRY
+#endif
diff --git a/include/SDL2/SDL_opengles2.h b/include/SDL2/SDL_opengles2.h
new file mode 100644 (file)
index 0000000..2c05479
--- /dev/null
@@ -0,0 +1,2790 @@
+/*
+  Simple DirectMedia Layer
+  Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
+
+  This software is provided 'as-is', without any express or implied
+  warranty.  In no event will the authors be held liable for any damages
+  arising from the use of this software.
+
+  Permission is granted to anyone to use this software for any purpose,
+  including commercial applications, and to alter it and redistribute it
+  freely, subject to the following restrictions:
+
+  1. The origin of this software must not be misrepresented; you must not
+     claim that you wrote the original software. If you use this software
+     in a product, an acknowledgment in the product documentation would be
+     appreciated but is not required.
+  2. Altered source versions must be plainly marked as such, and must not be
+     misrepresented as being the original software.
+  3. This notice may not be removed or altered from any source distribution.
+*/
+
+/**
+ *  \file SDL_opengles.h
+ *
+ *  This is a simple file to encapsulate the OpenGL ES 2.0 API headers.
+ */
+#ifndef _MSC_VER
+#ifdef __IPHONEOS__
+#include <OpenGLES/ES2/gl.h>
+#include <OpenGLES/ES2/glext.h>
+#else
+#include <GLES2/gl2.h>
+#include <GLES2/gl2ext.h>
+#endif
+
+#else /* _MSC_VER */
+
+/* OpenGL ES2 headers for Visual Studio */
+
+#ifndef __khrplatform_h_
+#define __khrplatform_h_
+
+/*
+** Copyright (c) 2008-2009 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.
+*/
+
+/* Khronos platform-specific types and definitions.
+*
+* $Revision: 23298 $ on $Date: 2013-09-30 17:07:13 -0700 (Mon, 30 Sep 2013) $
+*
+* Adopters may modify this file to suit their platform. Adopters are
+* encouraged to submit platform specific modifications to the Khronos
+* group so that they can be included in future versions of this file.
+* Please submit changes by sending them to the public Khronos Bugzilla
+* (http://khronos.org/bugzilla) by filing a bug against product
+* "Khronos (general)" component "Registry".
+*
+* A predefined template which fills in some of the bug fields can be
+* reached using http://tinyurl.com/khrplatform-h-bugreport, but you
+* must create a Bugzilla login first.
+*
+*
+* See the Implementer's Guidelines for information about where this file
+* should be located on your system and for more details of its use:
+*    http://www.khronos.org/registry/implementers_guide.pdf
+*
+* This file should be included as
+*        #include <KHR/khrplatform.h>
+* by Khronos client API header files that use its types and defines.
+*
+* The types in khrplatform.h should only be used to define API-specific types.
+*
+* Types defined in khrplatform.h:
+*    khronos_int8_t              signed   8  bit
+*    khronos_uint8_t             unsigned 8  bit
+*    khronos_int16_t             signed   16 bit
+*    khronos_uint16_t            unsigned 16 bit
+*    khronos_int32_t             signed   32 bit
+*    khronos_uint32_t            unsigned 32 bit
+*    khronos_int64_t             signed   64 bit
+*    khronos_uint64_t            unsigned 64 bit
+*    khronos_intptr_t            signed   same number of bits as a pointer
+*    khronos_uintptr_t           unsigned same number of bits as a pointer
+*    khronos_ssize_t             signed   size
+*    khronos_usize_t             unsigned size
+*    khronos_float_t             signed   32 bit floating point
+*    khronos_time_ns_t           unsigned 64 bit time in nanoseconds
+*    khronos_utime_nanoseconds_t unsigned time interval or absolute time in
+*                                         nanoseconds
+*    khronos_stime_nanoseconds_t signed time interval in nanoseconds
+*    khronos_boolean_enum_t      enumerated boolean type. This should
+*      only be used as a base type when a client API's boolean type is
+*      an enum. Client APIs which use an integer or other type for
+*      booleans cannot use this as the base type for their boolean.
+*
+* Tokens defined in khrplatform.h:
+*
+*    KHRONOS_FALSE, KHRONOS_TRUE Enumerated boolean false/true values.
+*
+*    KHRONOS_SUPPORT_INT64 is 1 if 64 bit integers are supported; otherwise 0.
+*    KHRONOS_SUPPORT_FLOAT is 1 if floats are supported; otherwise 0.
+*
+* Calling convention macros defined in this file:
+*    KHRONOS_APICALL
+*    KHRONOS_APIENTRY
+*    KHRONOS_APIATTRIBUTES
+*
+* These may be used in function prototypes as:
+*
+*      KHRONOS_APICALL void KHRONOS_APIENTRY funcname(
+*                                  int arg1,
+*                                  int arg2) KHRONOS_APIATTRIBUTES;
+*/
+
+/*-------------------------------------------------------------------------
+* Definition of KHRONOS_APICALL
+*-------------------------------------------------------------------------
+* This precedes the return type of the function in the function prototype.
+*/
+#if defined(_WIN32) && !defined(__SCITECH_SNAP__)
+#   define KHRONOS_APICALL __declspec(dllimport)
+#elif defined (__SYMBIAN32__)
+#   define KHRONOS_APICALL IMPORT_C
+#else
+#   define KHRONOS_APICALL
+#endif
+
+/*-------------------------------------------------------------------------
+* Definition of KHRONOS_APIENTRY
+*-------------------------------------------------------------------------
+* This follows the return type of the function  and precedes the function
+* name in the function prototype.
+*/
+#if defined(_WIN32) && !defined(_WIN32_WCE) && !defined(__SCITECH_SNAP__)
+/* Win32 but not WinCE */
+#   define KHRONOS_APIENTRY __stdcall
+#else
+#   define KHRONOS_APIENTRY
+#endif
+
+/*-------------------------------------------------------------------------
+* Definition of KHRONOS_APIATTRIBUTES
+*-------------------------------------------------------------------------
+* This follows the closing parenthesis of the function prototype arguments.
+*/
+#if defined (__ARMCC_2__)
+#define KHRONOS_APIATTRIBUTES __softfp
+#else
+#define KHRONOS_APIATTRIBUTES
+#endif
+
+/*-------------------------------------------------------------------------
+* basic type definitions
+*-----------------------------------------------------------------------*/
+#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || defined(__GNUC__) || defined(__SCO__) || defined(__USLC__)
+
+
+/*
+* Using <stdint.h>
+*/
+#include <stdint.h>
+typedef int32_t                 khronos_int32_t;
+typedef uint32_t                khronos_uint32_t;
+typedef int64_t                 khronos_int64_t;
+typedef uint64_t                khronos_uint64_t;
+#define KHRONOS_SUPPORT_INT64   1
+#define KHRONOS_SUPPORT_FLOAT   1
+
+#elif defined(__VMS ) || defined(__sgi)
+
+/*
+* Using <inttypes.h>
+*/
+#include <inttypes.h>
+typedef int32_t                 khronos_int32_t;
+typedef uint32_t                khronos_uint32_t;
+typedef int64_t                 khronos_int64_t;
+typedef uint64_t                khronos_uint64_t;
+#define KHRONOS_SUPPORT_INT64   1
+#define KHRONOS_SUPPORT_FLOAT   1
+
+#elif defined(_WIN32) && !defined(__SCITECH_SNAP__)
+
+/*
+* Win32
+*/
+typedef __int32                 khronos_int32_t;
+typedef unsigned __int32        khronos_uint32_t;
+typedef __int64                 khronos_int64_t;
+typedef unsigned __int64        khronos_uint64_t;
+#define KHRONOS_SUPPORT_INT64   1
+#define KHRONOS_SUPPORT_FLOAT   1
+
+#elif defined(__sun__) || defined(__digital__)
+
+/*
+* Sun or Digital
+*/
+typedef int                     khronos_int32_t;
+typedef unsigned int            khronos_uint32_t;
+#if defined(__arch64__) || defined(_LP64)
+typedef long int                khronos_int64_t;
+typedef unsigned long int       khronos_uint64_t;
+#else
+typedef long long int           khronos_int64_t;
+typedef unsigned long long int  khronos_uint64_t;
+#endif /* __arch64__ */
+#define KHRONOS_SUPPORT_INT64   1
+#define KHRONOS_SUPPORT_FLOAT   1
+
+#elif 0
+
+/*
+* Hypothetical platform with no float or int64 support
+*/
+typedef int                     khronos_int32_t;
+typedef unsigned int            khronos_uint32_t;
+#define KHRONOS_SUPPORT_INT64   0
+#define KHRONOS_SUPPORT_FLOAT   0
+
+#else
+
+/*
+* Generic fallback
+*/
+#include <stdint.h>
+typedef int32_t                 khronos_int32_t;
+typedef uint32_t                khronos_uint32_t;
+typedef int64_t                 khronos_int64_t;
+typedef uint64_t                khronos_uint64_t;
+#define KHRONOS_SUPPORT_INT64   1
+#define KHRONOS_SUPPORT_FLOAT   1
+
+#endif
+
+
+/*
+* Types that are (so far) the same on all platforms
+*/
+typedef signed   char          khronos_int8_t;
+typedef unsigned char          khronos_uint8_t;
+typedef signed   short int     khronos_int16_t;
+typedef unsigned short int     khronos_uint16_t;
+
+/*
+* Types that differ between LLP64 and LP64 architectures - in LLP64,
+* pointers are 64 bits, but 'long' is still 32 bits. Win64 appears
+* to be the only LLP64 architecture in current use.
+*/
+#ifdef _WIN64
+typedef signed   long long int khronos_intptr_t;
+typedef unsigned long long int khronos_uintptr_t;
+typedef signed   long long int khronos_ssize_t;
+typedef unsigned long long int khronos_usize_t;
+#else
+typedef signed   long  int     khronos_intptr_t;
+typedef unsigned long  int     khronos_uintptr_t;
+typedef signed   long  int     khronos_ssize_t;
+typedef unsigned long  int     khronos_usize_t;
+#endif
+
+#if KHRONOS_SUPPORT_FLOAT
+/*
+* Float type
+*/
+typedef          float         khronos_float_t;
+#endif
+
+#if KHRONOS_SUPPORT_INT64
+/* Time types
+*
+* These types can be used to represent a time interval in nanoseconds or
+* an absolute Unadjusted System Time.  Unadjusted System Time is the number
+* of nanoseconds since some arbitrary system event (e.g. since the last
+* time the system booted).  The Unadjusted System Time is an unsigned
+* 64 bit value that wraps back to 0 every 584 years.  Time intervals
+* may be either signed or unsigned.
+*/
+typedef khronos_uint64_t       khronos_utime_nanoseconds_t;
+typedef khronos_int64_t        khronos_stime_nanoseconds_t;
+#endif
+
+/*
+* Dummy value used to pad enum types to 32 bits.
+*/
+#ifndef KHRONOS_MAX_ENUM
+#define KHRONOS_MAX_ENUM 0x7FFFFFFF
+#endif
+
+/*
+* Enumerated boolean type
+*
+* Values other than zero should be considered to be true.  Therefore
+* comparisons should not be made against KHRONOS_TRUE.
+*/
+typedef enum {
+    KHRONOS_FALSE = 0,
+    KHRONOS_TRUE = 1,
+    KHRONOS_BOOLEAN_ENUM_FORCE_SIZE = KHRONOS_MAX_ENUM
+} khronos_boolean_enum_t;
+
+#endif /* __khrplatform_h_ */
+
+
+#ifndef __gl2platform_h_
+#define __gl2platform_h_
+
+/* $Revision: 10602 $ on $Date:: 2010-03-04 22:35:34 -0800 #$ */
+
+/*
+ * This document is licensed under the SGI Free Software B License Version
+ * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ .
+ */
+
+/* Platform-specific types and definitions for OpenGL ES 2.X  gl2.h
+ *
+ * Adopters may modify khrplatform.h and this file to suit their platform.
+ * You are encouraged to submit all modifications to the Khronos group so that
+ * they can be included in future versions of this file.  Please submit changes
+ * by sending them to the public Khronos Bugzilla (http://khronos.org/bugzilla)
+ * by filing a bug against product "OpenGL-ES" component "Registry".
+ */
+
+/*#include <KHR/khrplatform.h>*/
+
+#ifndef GL_APICALL
+#define GL_APICALL  KHRONOS_APICALL
+#endif
+
+#ifndef GL_APIENTRY
+#define GL_APIENTRY KHRONOS_APIENTRY
+#endif
+
+#endif /* __gl2platform_h_ */
+
+#ifndef __gl2_h_
+#define __gl2_h_
+
+/* $Revision: 16803 $ on $Date:: 2012-02-02 09:49:18 -0800 #$ */
+
+/*#include <GLES2/gl2platform.h>*/
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * This document is licensed under the SGI Free Software B License Version
+ * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ .
+ */
+
+/*-------------------------------------------------------------------------
+ * Data type definitions
+ *-----------------------------------------------------------------------*/
+
+typedef void             GLvoid;
+typedef char             GLchar;
+typedef unsigned int     GLenum;
+typedef unsigned char    GLboolean;
+typedef unsigned int     GLbitfield;
+typedef khronos_int8_t   GLbyte;
+typedef short            GLshort;
+typedef int              GLint;
+typedef int              GLsizei;
+typedef khronos_uint8_t  GLubyte;
+typedef unsigned short   GLushort;
+typedef unsigned int     GLuint;
+typedef khronos_float_t  GLfloat;
+typedef khronos_float_t  GLclampf;
+typedef khronos_int32_t  GLfixed;
+
+/* GL types for handling large vertex buffer objects */
+typedef khronos_intptr_t GLintptr;
+typedef khronos_ssize_t  GLsizeiptr;
+
+/* OpenGL ES core versions */
+#define GL_ES_VERSION_2_0                 1
+
+/* ClearBufferMask */
+#define GL_DEPTH_BUFFER_BIT               0x00000100
+#define GL_STENCIL_BUFFER_BIT             0x00000400
+#define GL_COLOR_BUFFER_BIT               0x00004000
+
+/* Boolean */
+#define GL_FALSE                          0
+#define GL_TRUE                           1
+
+/* BeginMode */
+#define GL_POINTS                         0x0000
+#define GL_LINES                          0x0001
+#define GL_LINE_LOOP                      0x0002
+#define GL_LINE_STRIP                     0x0003
+#define GL_TRIANGLES                      0x0004
+#define GL_TRIANGLE_STRIP                 0x0005
+#define GL_TRIANGLE_FAN                   0x0006
+
+/* AlphaFunction (not supported in ES20) */
+/*      GL_NEVER */
+/*      GL_LESS */
+/*      GL_EQUAL */
+/*      GL_LEQUAL */
+/*      GL_GREATER */
+/*      GL_NOTEQUAL */
+/*      GL_GEQUAL */
+/*      GL_ALWAYS */
+
+/* BlendingFactorDest */
+#define GL_ZERO                           0
+#define GL_ONE                            1
+#define GL_SRC_COLOR                      0x0300
+#define GL_ONE_MINUS_SRC_COLOR            0x0301
+#define GL_SRC_ALPHA                      0x0302
+#define GL_ONE_MINUS_SRC_ALPHA            0x0303
+#define GL_DST_ALPHA                      0x0304
+#define GL_ONE_MINUS_DST_ALPHA            0x0305
+
+/* BlendingFactorSrc */
+/*      GL_ZERO */
+/*      GL_ONE */
+#define GL_DST_COLOR                      0x0306
+#define GL_ONE_MINUS_DST_COLOR            0x0307
+#define GL_SRC_ALPHA_SATURATE             0x0308
+/*      GL_SRC_ALPHA */
+/*      GL_ONE_MINUS_SRC_ALPHA */
+/*      GL_DST_ALPHA */
+/*      GL_ONE_MINUS_DST_ALPHA */
+
+/* BlendEquationSeparate */
+#define GL_FUNC_ADD                       0x8006
+#define GL_BLEND_EQUATION                 0x8009
+#define GL_BLEND_EQUATION_RGB             0x8009    /* same as BLEND_EQUATION */
+#define GL_BLEND_EQUATION_ALPHA           0x883D
+
+/* BlendSubtract */
+#define GL_FUNC_SUBTRACT                  0x800A
+#define GL_FUNC_REVERSE_SUBTRACT          0x800B
+
+/* Separate Blend Functions */
+#define GL_BLEND_DST_RGB                  0x80C8
+#define GL_BLEND_SRC_RGB                  0x80C9
+#define GL_BLEND_DST_ALPHA                0x80CA
+#define GL_BLEND_SRC_ALPHA                0x80CB
+#define GL_CONSTANT_COLOR                 0x8001
+#define GL_ONE_MINUS_CONSTANT_COLOR       0x8002
+#define GL_CONSTANT_ALPHA                 0x8003
+#define GL_ONE_MINUS_CONSTANT_ALPHA       0x8004
+#define GL_BLEND_COLOR                    0x8005
+
+/* Buffer Objects */
+#define GL_ARRAY_BUFFER                   0x8892
+#define GL_ELEMENT_ARRAY_BUFFER           0x8893
+#define GL_ARRAY_BUFFER_BINDING           0x8894
+#define GL_ELEMENT_ARRAY_BUFFER_BINDING   0x8895
+
+#define GL_STREAM_DRAW                    0x88E0
+#define GL_STATIC_DRAW                    0x88E4
+#define GL_DYNAMIC_DRAW                   0x88E8
+
+#define GL_BUFFER_SIZE                    0x8764
+#define GL_BUFFER_USAGE                   0x8765
+
+#define GL_CURRENT_VERTEX_ATTRIB          0x8626
+
+/* CullFaceMode */
+#define GL_FRONT                          0x0404
+#define GL_BACK                           0x0405
+#define GL_FRONT_AND_BACK                 0x0408
+
+/* DepthFunction */
+/*      GL_NEVER */
+/*      GL_LESS */
+/*      GL_EQUAL */
+/*      GL_LEQUAL */
+/*      GL_GREATER */
+/*      GL_NOTEQUAL */
+/*      GL_GEQUAL */
+/*      GL_ALWAYS */
+
+/* EnableCap */
+#define GL_TEXTURE_2D                     0x0DE1
+#define GL_CULL_FACE                      0x0B44
+#define GL_BLEND                          0x0BE2
+#define GL_DITHER                         0x0BD0
+#define GL_STENCIL_TEST                   0x0B90
+#define GL_DEPTH_TEST                     0x0B71
+#define GL_SCISSOR_TEST                   0x0C11
+#define GL_POLYGON_OFFSET_FILL            0x8037
+#define GL_SAMPLE_ALPHA_TO_COVERAGE       0x809E
+#define GL_SAMPLE_COVERAGE                0x80A0
+
+/* ErrorCode */
+#define GL_NO_ERROR                       0
+#define GL_INVALID_ENUM                   0x0500
+#define GL_INVALID_VALUE                  0x0501
+#define GL_INVALID_OPERATION              0x0502
+#define GL_OUT_OF_MEMORY                  0x0505
+
+/* FrontFaceDirection */
+#define GL_CW                             0x0900
+#define GL_CCW                            0x0901
+
+/* GetPName */
+#define GL_LINE_WIDTH                     0x0B21
+#define GL_ALIASED_POINT_SIZE_RANGE       0x846D
+#define GL_ALIASED_LINE_WIDTH_RANGE       0x846E
+#define GL_CULL_FACE_MODE                 0x0B45
+#define GL_FRONT_FACE                     0x0B46
+#define GL_DEPTH_RANGE                    0x0B70
+#define GL_DEPTH_WRITEMASK                0x0B72
+#define GL_DEPTH_CLEAR_VALUE              0x0B73
+#define GL_DEPTH_FUNC                     0x0B74
+#define GL_STENCIL_CLEAR_VALUE            0x0B91
+#define GL_STENCIL_FUNC                   0x0B92
+#define GL_STENCIL_FAIL                   0x0B94
+#define GL_STENCIL_PASS_DEPTH_FAIL        0x0B95
+#define GL_STENCIL_PASS_DEPTH_PASS        0x0B96
+#define GL_STENCIL_REF                    0x0B97
+#define GL_STENCIL_VALUE_MASK             0x0B93
+#define GL_STENCIL_WRITEMASK              0x0B98
+#define GL_STENCIL_BACK_FUNC              0x8800
+#define GL_STENCIL_BACK_FAIL              0x8801
+#define GL_STENCIL_BACK_PASS_DEPTH_FAIL   0x8802
+#define GL_STENCIL_BACK_PASS_DEPTH_PASS   0x8803
+#define GL_STENCIL_BACK_REF               0x8CA3
+#define GL_STENCIL_BACK_VALUE_MASK        0x8CA4
+#define GL_STENCIL_BACK_WRITEMASK         0x8CA5
+#define GL_VIEWPORT                       0x0BA2
+#define GL_SCISSOR_BOX                    0x0C10
+/*      GL_SCISSOR_TEST */
+#define GL_COLOR_CLEAR_VALUE              0x0C22
+#define GL_COLOR_WRITEMASK                0x0C23
+#define GL_UNPACK_ALIGNMENT               0x0CF5
+#define GL_PACK_ALIGNMENT                 0x0D05
+#define GL_MAX_TEXTURE_SIZE               0x0D33
+#define GL_MAX_VIEWPORT_DIMS              0x0D3A
+#define GL_SUBPIXEL_BITS                  0x0D50
+#define GL_RED_BITS                       0x0D52
+#define GL_GREEN_BITS                     0x0D53
+#define GL_BLUE_BITS                      0x0D54
+#define GL_ALPHA_BITS                     0x0D55
+#define GL_DEPTH_BITS                     0x0D56
+#define GL_STENCIL_BITS                   0x0D57
+#define GL_POLYGON_OFFSET_UNITS           0x2A00
+/*      GL_POLYGON_OFFSET_FILL */
+#define GL_POLYGON_OFFSET_FACTOR          0x8038
+#define GL_TEXTURE_BINDING_2D             0x8069
+#define GL_SAMPLE_BUFFERS                 0x80A8
+#define GL_SAMPLES                        0x80A9
+#define GL_SAMPLE_COVERAGE_VALUE          0x80AA
+#define GL_SAMPLE_COVERAGE_INVERT         0x80AB
+
+/* GetTextureParameter */
+/*      GL_TEXTURE_MAG_FILTER */
+/*      GL_TEXTURE_MIN_FILTER */
+/*      GL_TEXTURE_WRAP_S */
+/*      GL_TEXTURE_WRAP_T */
+
+#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2
+#define GL_COMPRESSED_TEXTURE_FORMATS     0x86A3
+
+/* HintMode */
+#define GL_DONT_CARE                      0x1100
+#define GL_FASTEST                        0x1101
+#define GL_NICEST                         0x1102
+
+/* HintTarget */
+#define GL_GENERATE_MIPMAP_HINT            0x8192
+
+/* DataType */
+#define GL_BYTE                           0x1400
+#define GL_UNSIGNED_BYTE                  0x1401
+#define GL_SHORT                          0x1402
+#define GL_UNSIGNED_SHORT                 0x1403
+#define GL_INT                            0x1404
+#define GL_UNSIGNED_INT                   0x1405
+#define GL_FLOAT                          0x1406
+#define GL_FIXED                          0x140C
+
+/* PixelFormat */
+#define GL_DEPTH_COMPONENT                0x1902
+#define GL_ALPHA                          0x1906
+#define GL_RGB                            0x1907
+#define GL_RGBA                           0x1908
+#define GL_LUMINANCE                      0x1909
+#define GL_LUMINANCE_ALPHA                0x190A
+
+/* PixelType */
+/*      GL_UNSIGNED_BYTE */
+#define GL_UNSIGNED_SHORT_4_4_4_4         0x8033
+#define GL_UNSIGNED_SHORT_5_5_5_1         0x8034
+#define GL_UNSIGNED_SHORT_5_6_5           0x8363
+
+/* Shaders */
+#define GL_FRAGMENT_SHADER                  0x8B30
+#define GL_VERTEX_SHADER                    0x8B31
+#define GL_MAX_VERTEX_ATTRIBS               0x8869
+#define GL_MAX_VERTEX_UNIFORM_VECTORS       0x8DFB
+#define GL_MAX_VARYING_VECTORS              0x8DFC
+#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 0x8B4D
+#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS   0x8B4C
+#define GL_MAX_TEXTURE_IMAGE_UNITS          0x8872
+#define GL_MAX_FRAGMENT_UNIFORM_VECTORS     0x8DFD
+#define GL_SHADER_TYPE                      0x8B4F
+#define GL_DELETE_STATUS                    0x8B80
+#define GL_LINK_STATUS                      0x8B82
+#define GL_VALIDATE_STATUS                  0x8B83
+#define GL_ATTACHED_SHADERS                 0x8B85
+#define GL_ACTIVE_UNIFORMS                  0x8B86
+#define GL_ACTIVE_UNIFORM_MAX_LENGTH        0x8B87
+#define GL_ACTIVE_ATTRIBUTES                0x8B89
+#define GL_ACTIVE_ATTRIBUTE_MAX_LENGTH      0x8B8A
+#define GL_SHADING_LANGUAGE_VERSION         0x8B8C
+#define GL_CURRENT_PROGRAM                  0x8B8D
+
+/* StencilFunction */
+#define GL_NEVER                          0x0200
+#define GL_LESS                           0x0201
+#define GL_EQUAL                          0x0202
+#define GL_LEQUAL                         0x0203
+#define GL_GREATER                        0x0204
+#define GL_NOTEQUAL                       0x0205
+#define GL_GEQUAL                         0x0206
+#define GL_ALWAYS                         0x0207
+
+/* StencilOp */
+/*      GL_ZERO */
+#define GL_KEEP                           0x1E00
+#define GL_REPLACE                        0x1E01
+#define GL_INCR                           0x1E02
+#define GL_DECR                           0x1E03
+#define GL_INVERT                         0x150A
+#define GL_INCR_WRAP                      0x8507
+#define GL_DECR_WRAP                      0x8508
+
+/* StringName */
+#define GL_VENDOR                         0x1F00
+#define GL_RENDERER                       0x1F01
+#define GL_VERSION                        0x1F02
+#define GL_EXTENSIONS                     0x1F03
+
+/* TextureMagFilter */
+#define GL_NEAREST                        0x2600
+#define GL_LINEAR                         0x2601
+
+/* TextureMinFilter */
+/*      GL_NEAREST */
+/*      GL_LINEAR */
+#define GL_NEAREST_MIPMAP_NEAREST         0x2700
+#define GL_LINEAR_MIPMAP_NEAREST          0x2701
+#define GL_NEAREST_MIPMAP_LINEAR          0x2702
+#define GL_LINEAR_MIPMAP_LINEAR           0x2703
+
+/* TextureParameterName */
+#define GL_TEXTURE_MAG_FILTER             0x2800
+#define GL_TEXTURE_MIN_FILTER             0x2801
+#define GL_TEXTURE_WRAP_S                 0x2802
+#define GL_TEXTURE_WRAP_T                 0x2803
+
+/* TextureTarget */
+/*      GL_TEXTURE_2D */
+#define GL_TEXTURE                        0x1702
+
+#define GL_TEXTURE_CUBE_MAP               0x8513
+#define GL_TEXTURE_BINDING_CUBE_MAP       0x8514
+#define GL_TEXTURE_CUBE_MAP_POSITIVE_X    0x8515
+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X    0x8516
+#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y    0x8517
+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y    0x8518
+#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z    0x8519
+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z    0x851A
+#define GL_MAX_CUBE_MAP_TEXTURE_SIZE      0x851C
+
+/* TextureUnit */
+#define GL_TEXTURE0                       0x84C0
+#define GL_TEXTURE1                       0x84C1
+#define GL_TEXTURE2                       0x84C2
+#define GL_TEXTURE3                       0x84C3
+#define GL_TEXTURE4                       0x84C4
+#define GL_TEXTURE5                       0x84C5
+#define GL_TEXTURE6                       0x84C6
+#define GL_TEXTURE7                       0x84C7
+#define GL_TEXTURE8                       0x84C8
+#define GL_TEXTURE9                       0x84C9
+#define GL_TEXTURE10                      0x84CA
+#define GL_TEXTURE11                      0x84CB
+#define GL_TEXTURE12                      0x84CC
+#define GL_TEXTURE13                      0x84CD
+#define GL_TEXTURE14                      0x84CE
+#define GL_TEXTURE15                      0x84CF
+#define GL_TEXTURE16                      0x84D0
+#define GL_TEXTURE17                      0x84D1
+#define GL_TEXTURE18                      0x84D2
+#define GL_TEXTURE19                      0x84D3
+#define GL_TEXTURE20                      0x84D4
+#define GL_TEXTURE21                      0x84D5
+#define GL_TEXTURE22                      0x84D6
+#define GL_TEXTURE23                      0x84D7
+#define GL_TEXTURE24                      0x84D8
+#define GL_TEXTURE25                      0x84D9
+#define GL_TEXTURE26                      0x84DA
+#define GL_TEXTURE27                      0x84DB
+#define GL_TEXTURE28                      0x84DC
+#define GL_TEXTURE29                      0x84DD
+#define GL_TEXTURE30                      0x84DE
+#define GL_TEXTURE31                      0x84DF
+#define GL_ACTIVE_TEXTURE                 0x84E0
+
+/* TextureWrapMode */
+#define GL_REPEAT                         0x2901
+#define GL_CLAMP_TO_EDGE                  0x812F
+#define GL_MIRRORED_REPEAT                0x8370
+
+/* Uniform Types */
+#define GL_FLOAT_VEC2                     0x8B50
+#define GL_FLOAT_VEC3                     0x8B51
+#define GL_FLOAT_VEC4                     0x8B52
+#define GL_INT_VEC2                       0x8B53
+#define GL_INT_VEC3                       0x8B54
+#define GL_INT_VEC4                       0x8B55
+#define GL_BOOL                           0x8B56
+#define GL_BOOL_VEC2                      0x8B57
+#define GL_BOOL_VEC3                      0x8B58
+#define GL_BOOL_VEC4                      0x8B59
+#define GL_FLOAT_MAT2                     0x8B5A
+#define GL_FLOAT_MAT3                     0x8B5B
+#define GL_FLOAT_MAT4                     0x8B5C
+#define GL_SAMPLER_2D                     0x8B5E
+#define GL_SAMPLER_CUBE                   0x8B60
+
+/* Vertex Arrays */
+#define GL_VERTEX_ATTRIB_ARRAY_ENABLED        0x8622
+#define GL_VERTEX_ATTRIB_ARRAY_SIZE           0x8623
+#define GL_VERTEX_ATTRIB_ARRAY_STRIDE         0x8624
+#define GL_VERTEX_ATTRIB_ARRAY_TYPE           0x8625
+#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED     0x886A
+#define GL_VERTEX_ATTRIB_ARRAY_POINTER        0x8645
+#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING 0x889F
+
+/* Read Format */
+#define GL_IMPLEMENTATION_COLOR_READ_TYPE   0x8B9A
+#define GL_IMPLEMENTATION_COLOR_READ_FORMAT 0x8B9B
+
+/* Shader Source */
+#define GL_COMPILE_STATUS                 0x8B81
+#define GL_INFO_LOG_LENGTH                0x8B84
+#define GL_SHADER_SOURCE_LENGTH           0x8B88
+#define GL_SHADER_COMPILER                0x8DFA
+
+/* Shader Binary */
+#define GL_SHADER_BINARY_FORMATS          0x8DF8
+#define GL_NUM_SHADER_BINARY_FORMATS      0x8DF9
+
+/* Shader Precision-Specified Types */
+#define GL_LOW_FLOAT                      0x8DF0
+#define GL_MEDIUM_FLOAT                   0x8DF1
+#define GL_HIGH_FLOAT                     0x8DF2
+#define GL_LOW_INT                        0x8DF3
+#define GL_MEDIUM_INT                     0x8DF4
+#define GL_HIGH_INT                       0x8DF5
+
+/* Framebuffer Object. */
+#define GL_FRAMEBUFFER                    0x8D40
+#define GL_RENDERBUFFER                   0x8D41
+
+#define GL_RGBA4                          0x8056
+#define GL_RGB5_A1                        0x8057
+#define GL_RGB565                         0x8D62
+#define GL_DEPTH_COMPONENT16              0x81A5
+#define GL_STENCIL_INDEX8                 0x8D48
+
+#define GL_RENDERBUFFER_WIDTH             0x8D42
+#define GL_RENDERBUFFER_HEIGHT            0x8D43
+#define GL_RENDERBUFFER_INTERNAL_FORMAT   0x8D44
+#define GL_RENDERBUFFER_RED_SIZE          0x8D50
+#define GL_RENDERBUFFER_GREEN_SIZE        0x8D51
+#define GL_RENDERBUFFER_BLUE_SIZE         0x8D52
+#define GL_RENDERBUFFER_ALPHA_SIZE        0x8D53
+#define GL_RENDERBUFFER_DEPTH_SIZE        0x8D54
+#define GL_RENDERBUFFER_STENCIL_SIZE      0x8D55
+
+#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE           0x8CD0
+#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME           0x8CD1
+#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL         0x8CD2
+#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE 0x8CD3
+
+#define GL_COLOR_ATTACHMENT0              0x8CE0
+#define GL_DEPTH_ATTACHMENT               0x8D00
+#define GL_STENCIL_ATTACHMENT             0x8D20
+
+#define GL_NONE                           0
+
+#define GL_FRAMEBUFFER_COMPLETE                      0x8CD5
+#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT         0x8CD6
+#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT 0x8CD7
+#define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS         0x8CD9
+#define GL_FRAMEBUFFER_UNSUPPORTED                   0x8CDD
+
+#define GL_FRAMEBUFFER_BINDING            0x8CA6
+#define GL_RENDERBUFFER_BINDING           0x8CA7
+#define GL_MAX_RENDERBUFFER_SIZE          0x84E8
+
+#define GL_INVALID_FRAMEBUFFER_OPERATION  0x0506
+
+/*-------------------------------------------------------------------------
+ * GL core functions.
+ *-----------------------------------------------------------------------*/
+
+GL_APICALL void         GL_APIENTRY glActiveTexture (GLenum texture);
+GL_APICALL void         GL_APIENTRY glAttachShader (GLuint program, GLuint shader);
+GL_APICALL void         GL_APIENTRY glBindAttribLocation (GLuint program, GLuint index, const GLchar* name);
+GL_APICALL void         GL_APIENTRY glBindBuffer (GLenum target, GLuint buffer);
+GL_APICALL void         GL_APIENTRY glBindFramebuffer (GLenum target, GLuint framebuffer);
+GL_APICALL void         GL_APIENTRY glBindRenderbuffer (GLenum target, GLuint renderbuffer);
+GL_APICALL void         GL_APIENTRY glBindTexture (GLenum target, GLuint texture);
+GL_APICALL void         GL_APIENTRY glBlendColor (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
+GL_APICALL void         GL_APIENTRY glBlendEquation ( GLenum mode );
+GL_APICALL void         GL_APIENTRY glBlendEquationSeparate (GLenum modeRGB, GLenum modeAlpha);
+GL_APICALL void         GL_APIENTRY glBlendFunc (GLenum sfactor, GLenum dfactor);
+GL_APICALL void         GL_APIENTRY glBlendFuncSeparate (GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
+GL_APICALL void         GL_APIENTRY glBufferData (GLenum target, GLsizeiptr size, const GLvoid* data, GLenum usage);
+GL_APICALL void         GL_APIENTRY glBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid* data);
+GL_APICALL GLenum       GL_APIENTRY glCheckFramebufferStatus (GLenum target);
+GL_APICALL void         GL_APIENTRY glClear (GLbitfield mask);
+GL_APICALL void         GL_APIENTRY glClearColor (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
+GL_APICALL void         GL_APIENTRY glClearDepthf (GLclampf depth);
+GL_APICALL void         GL_APIENTRY glClearStencil (GLint s);
+GL_APICALL void         GL_APIENTRY glColorMask (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
+GL_APICALL void         GL_APIENTRY glCompileShader (GLuint shader);
+GL_APICALL void         GL_APIENTRY glCompressedTexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid* data);
+GL_APICALL void         GL_APIENTRY glCompressedTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid* data);
+GL_APICALL void         GL_APIENTRY glCopyTexImage2D (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
+GL_APICALL void         GL_APIENTRY glCopyTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
+GL_APICALL GLuint       GL_APIENTRY glCreateProgram (void);
+GL_APICALL GLuint       GL_APIENTRY glCreateShader (GLenum type);
+GL_APICALL void         GL_APIENTRY glCullFace (GLenum mode);
+GL_APICALL void         GL_APIENTRY glDeleteBuffers (GLsizei n, const GLuint* buffers);
+GL_APICALL void         GL_APIENTRY glDeleteFramebuffers (GLsizei n, const GLuint* framebuffers);
+GL_APICALL void         GL_APIENTRY glDeleteProgram (GLuint program);
+GL_APICALL void         GL_APIENTRY glDeleteRenderbuffers (GLsizei n, const GLuint* renderbuffers);
+GL_APICALL void         GL_APIENTRY glDeleteShader (GLuint shader);
+GL_APICALL void         GL_APIENTRY glDeleteTextures (GLsizei n, const GLuint* textures);
+GL_APICALL void         GL_APIENTRY glDepthFunc (GLenum func);
+GL_APICALL void         GL_APIENTRY glDepthMask (GLboolean flag);
+GL_APICALL void         GL_APIENTRY glDepthRangef (GLclampf zNear, GLclampf zFar);
+GL_APICALL void         GL_APIENTRY glDetachShader (GLuint program, GLuint shader);
+GL_APICALL void         GL_APIENTRY glDisable (GLenum cap);
+GL_APICALL void         GL_APIENTRY glDisableVertexAttribArray (GLuint index);
+GL_APICALL void         GL_APIENTRY glDrawArrays (GLenum mode, GLint first, GLsizei count);
+GL_APICALL void         GL_APIENTRY glDrawElements (GLenum mode, GLsizei count, GLenum type, const GLvoid* indices);
+GL_APICALL void         GL_APIENTRY glEnable (GLenum cap);
+GL_APICALL void         GL_APIENTRY glEnableVertexAttribArray (GLuint index);
+GL_APICALL void         GL_APIENTRY glFinish (void);
+GL_APICALL void         GL_APIENTRY glFlush (void);
+GL_APICALL void         GL_APIENTRY glFramebufferRenderbuffer (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
+GL_APICALL void         GL_APIENTRY glFramebufferTexture2D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
+GL_APICALL void         GL_APIENTRY glFrontFace (GLenum mode);
+GL_APICALL void         GL_APIENTRY glGenBuffers (GLsizei n, GLuint* buffers);
+GL_APICALL void         GL_APIENTRY glGenerateMipmap (GLenum target);
+GL_APICALL void         GL_APIENTRY glGenFramebuffers (GLsizei n, GLuint* framebuffers);
+GL_APICALL void         GL_APIENTRY glGenRenderbuffers (GLsizei n, GLuint* renderbuffers);
+GL_APICALL void         GL_APIENTRY glGenTextures (GLsizei n, GLuint* textures);
+GL_APICALL void         GL_APIENTRY glGetActiveAttrib (GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name);
+GL_APICALL void         GL_APIENTRY glGetActiveUniform (GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name);
+GL_APICALL void         GL_APIENTRY glGetAttachedShaders (GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders);
+GL_APICALL int          GL_APIENTRY glGetAttribLocation (GLuint program, const GLchar* name);
+GL_APICALL void         GL_APIENTRY glGetBooleanv (GLenum pname, GLboolean* params);
+GL_APICALL void         GL_APIENTRY glGetBufferParameteriv (GLenum target, GLenum pname, GLint* params);
+GL_APICALL GLenum       GL_APIENTRY glGetError (void);
+GL_APICALL void         GL_APIENTRY glGetFloatv (GLenum pname, GLfloat* params);
+GL_APICALL void         GL_APIENTRY glGetFramebufferAttachmentParameteriv (GLenum target, GLenum attachment, GLenum pname, GLint* params);
+GL_APICALL void         GL_APIENTRY glGetIntegerv (GLenum pname, GLint* params);
+GL_APICALL void         GL_APIENTRY glGetProgramiv (GLuint program, GLenum pname, GLint* params);
+GL_APICALL void         GL_APIENTRY glGetProgramInfoLog (GLuint program, GLsizei bufsize, GLsizei* length, GLchar* infolog);
+GL_APICALL void         GL_APIENTRY glGetRenderbufferParameteriv (GLenum target, GLenum pname, GLint* params);
+GL_APICALL void         GL_APIENTRY glGetShaderiv (GLuint shader, GLenum pname, GLint* params);
+GL_APICALL void         GL_APIENTRY glGetShaderInfoLog (GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* infolog);
+GL_APICALL void         GL_APIENTRY glGetShaderPrecisionFormat (GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision);
+GL_APICALL void         GL_APIENTRY glGetShaderSource (GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* source);
+GL_APICALL const GLubyte* GL_APIENTRY glGetString (GLenum name);
+GL_APICALL void         GL_APIENTRY glGetTexParameterfv (GLenum target, GLenum pname, GLfloat* params);
+GL_APICALL void         GL_APIENTRY glGetTexParameteriv (GLenum target, GLenum pname, GLint* params);
+GL_APICALL void         GL_APIENTRY glGetUniformfv (GLuint program, GLint location, GLfloat* params);
+GL_APICALL void         GL_APIENTRY glGetUniformiv (GLuint program, GLint location, GLint* params);
+GL_APICALL int          GL_APIENTRY glGetUniformLocation (GLuint program, const GLchar* name);
+GL_APICALL void         GL_APIENTRY glGetVertexAttribfv (GLuint index, GLenum pname, GLfloat* params);
+GL_APICALL void         GL_APIENTRY glGetVertexAttribiv (GLuint index, GLenum pname, GLint* params);
+GL_APICALL void         GL_APIENTRY glGetVertexAttribPointerv (GLuint index, GLenum pname, GLvoid** pointer);
+GL_APICALL void         GL_APIENTRY glHint (GLenum target, GLenum mode);
+GL_APICALL GLboolean    GL_APIENTRY glIsBuffer (GLuint buffer);
+GL_APICALL GLboolean    GL_APIENTRY glIsEnabled (GLenum cap);
+GL_APICALL GLboolean    GL_APIENTRY glIsFramebuffer (GLuint framebuffer);
+GL_APICALL GLboolean    GL_APIENTRY glIsProgram (GLuint program);
+GL_APICALL GLboolean    GL_APIENTRY glIsRenderbuffer (GLuint renderbuffer);
+GL_APICALL GLboolean    GL_APIENTRY glIsShader (GLuint shader);
+GL_APICALL GLboolean    GL_APIENTRY glIsTexture (GLuint texture);
+GL_APICALL void         GL_APIENTRY glLineWidth (GLfloat width);
+GL_APICALL void         GL_APIENTRY glLinkProgram (GLuint program);
+GL_APICALL void         GL_APIENTRY glPixelStorei (GLenum pname, GLint param);
+GL_APICALL void         GL_APIENTRY glPolygonOffset (GLfloat factor, GLfloat units);
+GL_APICALL void         GL_APIENTRY glReadPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid* pixels);
+GL_APICALL void         GL_APIENTRY glReleaseShaderCompiler (void);
+GL_APICALL void         GL_APIENTRY glRenderbufferStorage (GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
+GL_APICALL void         GL_APIENTRY glSampleCoverage (GLclampf value, GLboolean invert);
+GL_APICALL void         GL_APIENTRY glScissor (GLint x, GLint y, GLsizei width, GLsizei height);
+GL_APICALL void         GL_APIENTRY glShaderBinary (GLsizei n, const GLuint* shaders, GLenum binaryformat, const GLvoid* binary, GLsizei length);
+GL_APICALL void         GL_APIENTRY glShaderSource (GLuint shader, GLsizei count, const GLchar* const* string, const GLint* length);
+GL_APICALL void         GL_APIENTRY glStencilFunc (GLenum func, GLint ref, GLuint mask);
+GL_APICALL void         GL_APIENTRY glStencilFuncSeparate (GLenum face, GLenum func, GLint ref, GLuint mask);
+GL_APICALL void         GL_APIENTRY glStencilMask (GLuint mask);
+GL_APICALL void         GL_APIENTRY glStencilMaskSeparate (GLenum face, GLuint mask);
+GL_APICALL void         GL_APIENTRY glStencilOp (GLenum fail, GLenum zfail, GLenum zpass);
+GL_APICALL void         GL_APIENTRY glStencilOpSeparate (GLenum face, GLenum fail, GLenum zfail, GLenum zpass);
+GL_APICALL void         GL_APIENTRY glTexImage2D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid* pixels);
+GL_APICALL void         GL_APIENTRY glTexParameterf (GLenum target, GLenum pname, GLfloat param);
+GL_APICALL void         GL_APIENTRY glTexParameterfv (GLenum target, GLenum pname, const GLfloat* params);
+GL_APICALL void         GL_APIENTRY glTexParameteri (GLenum target, GLenum pname, GLint param);
+GL_APICALL void         GL_APIENTRY glTexParameteriv (GLenum target, GLenum pname, const GLint* params);
+GL_APICALL void         GL_APIENTRY glTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid* pixels);
+GL_APICALL void         GL_APIENTRY glUniform1f (GLint location, GLfloat x);
+GL_APICALL void         GL_APIENTRY glUniform1fv (GLint location, GLsizei count, const GLfloat* v);
+GL_APICALL void         GL_APIENTRY glUniform1i (GLint location, GLint x);
+GL_APICALL void         GL_APIENTRY glUniform1iv (GLint location, GLsizei count, const GLint* v);
+GL_APICALL void         GL_APIENTRY glUniform2f (GLint location, GLfloat x, GLfloat y);
+GL_APICALL void         GL_APIENTRY glUniform2fv (GLint location, GLsizei count, const GLfloat* v);
+GL_APICALL void         GL_APIENTRY glUniform2i (GLint location, GLint x, GLint y);
+GL_APICALL void         GL_APIENTRY glUniform2iv (GLint location, GLsizei count, const GLint* v);
+GL_APICALL void         GL_APIENTRY glUniform3f (GLint location, GLfloat x, GLfloat y, GLfloat z);
+GL_APICALL void         GL_APIENTRY glUniform3fv (GLint location, GLsizei count, const GLfloat* v);
+GL_APICALL void         GL_APIENTRY glUniform3i (GLint location, GLint x, GLint y, GLint z);
+GL_APICALL void         GL_APIENTRY glUniform3iv (GLint location, GLsizei count, const GLint* v);
+GL_APICALL void         GL_APIENTRY glUniform4f (GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+GL_APICALL void         GL_APIENTRY glUniform4fv (GLint location, GLsizei count, const GLfloat* v);
+GL_APICALL void         GL_APIENTRY glUniform4i (GLint location, GLint x, GLint y, GLint z, GLint w);
+GL_APICALL void         GL_APIENTRY glUniform4iv (GLint location, GLsizei count, const GLint* v);
+GL_APICALL void         GL_APIENTRY glUniformMatrix2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
+GL_APICALL void         GL_APIENTRY glUniformMatrix3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
+GL_APICALL void         GL_APIENTRY glUniformMatrix4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
+GL_APICALL void         GL_APIENTRY glUseProgram (GLuint program);
+GL_APICALL void         GL_APIENTRY glValidateProgram (GLuint program);
+GL_APICALL void         GL_APIENTRY glVertexAttrib1f (GLuint indx, GLfloat x);
+GL_APICALL void         GL_APIENTRY glVertexAttrib1fv (GLuint indx, const GLfloat* values);
+GL_APICALL void         GL_APIENTRY glVertexAttrib2f (GLuint indx, GLfloat x, GLfloat y);
+GL_APICALL void         GL_APIENTRY glVertexAttrib2fv (GLuint indx, const GLfloat* values);
+GL_APICALL void         GL_APIENTRY glVertexAttrib3f (GLuint indx, GLfloat x, GLfloat y, GLfloat z);
+GL_APICALL void         GL_APIENTRY glVertexAttrib3fv (GLuint indx, const GLfloat* values);
+GL_APICALL void         GL_APIENTRY glVertexAttrib4f (GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+GL_APICALL void         GL_APIENTRY glVertexAttrib4fv (GLuint indx, const GLfloat* values);
+GL_APICALL void         GL_APIENTRY glVertexAttribPointer (GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid* ptr);
+GL_APICALL void         GL_APIENTRY glViewport (GLint x, GLint y, GLsizei width, GLsizei height);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __gl2_h_ */
+
+
+#ifndef __gl2ext_h_
+#define __gl2ext_h_
+
+/* $Revision: 19436 $ on $Date:: 2012-10-10 10:37:04 -0700 #$ */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * This document is licensed under the SGI Free Software B License Version
+ * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ .
+ */
+
+#ifndef GL_APIENTRYP
+#   define GL_APIENTRYP GL_APIENTRY*
+#endif
+
+/*------------------------------------------------------------------------*
+ * OES extension tokens
+ *------------------------------------------------------------------------*/
+
+/* GL_OES_compressed_ETC1_RGB8_texture */
+#ifndef GL_OES_compressed_ETC1_RGB8_texture
+#define GL_ETC1_RGB8_OES                                        0x8D64
+#endif
+
+/* GL_OES_compressed_paletted_texture */
+#ifndef GL_OES_compressed_paletted_texture
+#define GL_PALETTE4_RGB8_OES                                    0x8B90
+#define GL_PALETTE4_RGBA8_OES                                   0x8B91
+#define GL_PALETTE4_R5_G6_B5_OES                                0x8B92
+#define GL_PALETTE4_RGBA4_OES                                   0x8B93
+#define GL_PALETTE4_RGB5_A1_OES                                 0x8B94
+#define GL_PALETTE8_RGB8_OES                                    0x8B95
+#define GL_PALETTE8_RGBA8_OES                                   0x8B96
+#define GL_PALETTE8_R5_G6_B5_OES                                0x8B97
+#define GL_PALETTE8_RGBA4_OES                                   0x8B98
+#define GL_PALETTE8_RGB5_A1_OES                                 0x8B99
+#endif
+
+/* GL_OES_depth24 */
+#ifndef GL_OES_depth24
+#define GL_DEPTH_COMPONENT24_OES                                0x81A6
+#endif
+
+/* GL_OES_depth32 */
+#ifndef GL_OES_depth32
+#define GL_DEPTH_COMPONENT32_OES                                0x81A7
+#endif
+
+/* GL_OES_depth_texture */
+/* No new tokens introduced by this extension. */
+
+/* GL_OES_EGL_image */
+#ifndef GL_OES_EGL_image
+typedef void* GLeglImageOES;
+#endif
+
+/* GL_OES_EGL_image_external */
+#ifndef GL_OES_EGL_image_external
+/* GLeglImageOES defined in GL_OES_EGL_image already. */
+#define GL_TEXTURE_EXTERNAL_OES                                 0x8D65
+#define GL_SAMPLER_EXTERNAL_OES                                 0x8D66
+#define GL_TEXTURE_BINDING_EXTERNAL_OES                         0x8D67
+#define GL_REQUIRED_TEXTURE_IMAGE_UNITS_OES                     0x8D68
+#endif
+
+/* GL_OES_element_index_uint */
+#ifndef GL_OES_element_index_uint
+#define GL_UNSIGNED_INT                                         0x1405
+#endif
+
+/* GL_OES_get_program_binary */
+#ifndef GL_OES_get_program_binary
+#define GL_PROGRAM_BINARY_LENGTH_OES                            0x8741
+#define GL_NUM_PROGRAM_BINARY_FORMATS_OES                       0x87FE
+#define GL_PROGRAM_BINARY_FORMATS_OES                           0x87FF
+#endif
+
+/* GL_OES_mapbuffer */
+#ifndef GL_OES_mapbuffer
+#define GL_WRITE_ONLY_OES                                       0x88B9
+#define GL_BUFFER_ACCESS_OES                                    0x88BB
+#define GL_BUFFER_MAPPED_OES                                    0x88BC
+#define GL_BUFFER_MAP_POINTER_OES                               0x88BD
+#endif
+
+/* GL_OES_packed_depth_stencil */
+#ifndef GL_OES_packed_depth_stencil
+#define GL_DEPTH_STENCIL_OES                                    0x84F9
+#define GL_UNSIGNED_INT_24_8_OES                                0x84FA
+#define GL_DEPTH24_STENCIL8_OES                                 0x88F0
+#endif
+
+/* GL_OES_required_internalformat */
+#ifndef GL_OES_required_internalformat 
+#define GL_ALPHA8_OES                                           0x803C
+#define GL_DEPTH_COMPONENT16_OES                                0x81A5
+/* reuse GL_DEPTH_COMPONENT24_OES */                            
+/* reuse GL_DEPTH24_STENCIL8_OES */                             
+/* reuse GL_DEPTH_COMPONENT32_OES */                            
+#define GL_LUMINANCE4_ALPHA4_OES                                0x8043
+#define GL_LUMINANCE8_ALPHA8_OES                                0x8045
+#define GL_LUMINANCE8_OES                                       0x8040
+#define GL_RGBA4_OES                                            0x8056
+#define GL_RGB5_A1_OES                                          0x8057
+#define GL_RGB565_OES                                           0x8D62
+/* reuse GL_RGB8_OES */                              
+/* reuse GL_RGBA8_OES */  
+/* reuse GL_RGB10_EXT */
+/* reuse GL_RGB10_A2_EXT */
+#endif 
+
+/* GL_OES_rgb8_rgba8 */
+#ifndef GL_OES_rgb8_rgba8
+#define GL_RGB8_OES                                             0x8051
+#define GL_RGBA8_OES                                            0x8058
+#endif
+
+/* GL_OES_standard_derivatives */
+#ifndef GL_OES_standard_derivatives
+#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT_OES                  0x8B8B
+#endif
+
+/* GL_OES_stencil1 */
+#ifndef GL_OES_stencil1
+#define GL_STENCIL_INDEX1_OES                                   0x8D46
+#endif
+
+/* GL_OES_stencil4 */
+#ifndef GL_OES_stencil4
+#define GL_STENCIL_INDEX4_OES                                   0x8D47
+#endif
+
+#ifndef GL_OES_surfaceless_context
+#define GL_FRAMEBUFFER_UNDEFINED_OES                            0x8219
+#endif
+
+/* GL_OES_texture_3D */
+#ifndef GL_OES_texture_3D
+#define GL_TEXTURE_WRAP_R_OES                                   0x8072
+#define GL_TEXTURE_3D_OES                                       0x806F
+#define GL_TEXTURE_BINDING_3D_OES                               0x806A
+#define GL_MAX_3D_TEXTURE_SIZE_OES                              0x8073
+#define GL_SAMPLER_3D_OES                                       0x8B5F
+#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_OES        0x8CD4
+#endif
+
+/* GL_OES_texture_float */
+/* No new tokens introduced by this extension. */
+
+/* GL_OES_texture_float_linear */
+/* No new tokens introduced by this extension. */
+
+/* GL_OES_texture_half_float */
+#ifndef GL_OES_texture_half_float
+#define GL_HALF_FLOAT_OES                                       0x8D61
+#endif
+
+/* GL_OES_texture_half_float_linear */
+/* No new tokens introduced by this extension. */
+
+/* GL_OES_texture_npot */
+/* No new tokens introduced by this extension. */
+
+/* GL_OES_vertex_array_object */
+#ifndef GL_OES_vertex_array_object
+#define GL_VERTEX_ARRAY_BINDING_OES                             0x85B5
+#endif
+
+/* GL_OES_vertex_half_float */
+/* GL_HALF_FLOAT_OES defined in GL_OES_texture_half_float already. */
+
+/* GL_OES_vertex_type_10_10_10_2 */
+#ifndef GL_OES_vertex_type_10_10_10_2
+#define GL_UNSIGNED_INT_10_10_10_2_OES                          0x8DF6
+#define GL_INT_10_10_10_2_OES                                   0x8DF7
+#endif
+
+/*------------------------------------------------------------------------*
+ * KHR extension tokens
+ *------------------------------------------------------------------------*/
+
+#ifndef GL_KHR_debug
+typedef void (GL_APIENTRYP GLDEBUGPROC)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,GLvoid *userParam);
+#define GL_DEBUG_OUTPUT_SYNCHRONOUS                             0x8242
+#define GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH                     0x8243
+#define GL_DEBUG_CALLBACK_FUNCTION                              0x8244
+#define GL_DEBUG_CALLBACK_USER_PARAM                            0x8245
+#define GL_DEBUG_SOURCE_API                                     0x8246
+#define GL_DEBUG_SOURCE_WINDOW_SYSTEM                           0x8247
+#define GL_DEBUG_SOURCE_SHADER_COMPILER                         0x8248
+#define GL_DEBUG_SOURCE_THIRD_PARTY                             0x8249
+#define GL_DEBUG_SOURCE_APPLICATION                             0x824A
+#define GL_DEBUG_SOURCE_OTHER                                   0x824B
+#define GL_DEBUG_TYPE_ERROR                                     0x824C
+#define GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR                       0x824D
+#define GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR                        0x824E
+#define GL_DEBUG_TYPE_PORTABILITY                               0x824F
+#define GL_DEBUG_TYPE_PERFORMANCE                               0x8250
+#define GL_DEBUG_TYPE_OTHER                                     0x8251
+#define GL_DEBUG_TYPE_MARKER                                    0x8268
+#define GL_DEBUG_TYPE_PUSH_GROUP                                0x8269
+#define GL_DEBUG_TYPE_POP_GROUP                                 0x826A
+#define GL_DEBUG_SEVERITY_NOTIFICATION                          0x826B
+#define GL_MAX_DEBUG_GROUP_STACK_DEPTH                          0x826C
+#define GL_DEBUG_GROUP_STACK_DEPTH                              0x826D
+#define GL_BUFFER                                               0x82E0
+#define GL_SHADER                                               0x82E1
+#define GL_PROGRAM                                              0x82E2
+#define GL_QUERY                                                0x82E3
+/* PROGRAM_PIPELINE only in GL */                               
+#define GL_SAMPLER                                              0x82E6
+/* DISPLAY_LIST only in GL */                                   
+#define GL_MAX_LABEL_LENGTH                                     0x82E8
+#define GL_MAX_DEBUG_MESSAGE_LENGTH                             0x9143
+#define GL_MAX_DEBUG_LOGGED_MESSAGES                            0x9144
+#define GL_DEBUG_LOGGED_MESSAGES                                0x9145
+#define GL_DEBUG_SEVERITY_HIGH                                  0x9146
+#define GL_DEBUG_SEVERITY_MEDIUM                                0x9147
+#define GL_DEBUG_SEVERITY_LOW                                   0x9148
+#define GL_DEBUG_OUTPUT                                         0x92E0
+#define GL_CONTEXT_FLAG_DEBUG_BIT                               0x00000002
+#define GL_STACK_OVERFLOW                                       0x0503
+#define GL_STACK_UNDERFLOW                                      0x0504
+#endif
+
+#ifndef GL_KHR_texture_compression_astc_ldr
+#define GL_COMPRESSED_RGBA_ASTC_4x4_KHR                         0x93B0
+#define GL_COMPRESSED_RGBA_ASTC_5x4_KHR                         0x93B1
+#define GL_COMPRESSED_RGBA_ASTC_5x5_KHR                         0x93B2
+#define GL_COMPRESSED_RGBA_ASTC_6x5_KHR                         0x93B3
+#define GL_COMPRESSED_RGBA_ASTC_6x6_KHR                         0x93B4
+#define GL_COMPRESSED_RGBA_ASTC_8x5_KHR                         0x93B5
+#define GL_COMPRESSED_RGBA_ASTC_8x6_KHR                         0x93B6
+#define GL_COMPRESSED_RGBA_ASTC_8x8_KHR                         0x93B7
+#define GL_COMPRESSED_RGBA_ASTC_10x5_KHR                        0x93B8
+#define GL_COMPRESSED_RGBA_ASTC_10x6_KHR                        0x93B9
+#define GL_COMPRESSED_RGBA_ASTC_10x8_KHR                        0x93BA
+#define GL_COMPRESSED_RGBA_ASTC_10x10_KHR                       0x93BB
+#define GL_COMPRESSED_RGBA_ASTC_12x10_KHR                       0x93BC
+#define GL_COMPRESSED_RGBA_ASTC_12x12_KHR                       0x93BD
+#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR                 0x93D0
+#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR                 0x93D1
+#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR                 0x93D2
+#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR                 0x93D3
+#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR                 0x93D4
+#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR                 0x93D5
+#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR                 0x93D6
+#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR                 0x93D7
+#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR                0x93D8
+#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR                0x93D9
+#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR                0x93DA
+#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR               0x93DB
+#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR               0x93DC
+#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR               0x93DD
+#endif
+
+/*------------------------------------------------------------------------*
+ * AMD extension tokens
+ *------------------------------------------------------------------------*/
+
+/* GL_AMD_compressed_3DC_texture */
+#ifndef GL_AMD_compressed_3DC_texture
+#define GL_3DC_X_AMD                                            0x87F9
+#define GL_3DC_XY_AMD                                           0x87FA
+#endif
+
+/* GL_AMD_compressed_ATC_texture */
+#ifndef GL_AMD_compressed_ATC_texture
+#define GL_ATC_RGB_AMD                                          0x8C92
+#define GL_ATC_RGBA_EXPLICIT_ALPHA_AMD                          0x8C93
+#define GL_ATC_RGBA_INTERPOLATED_ALPHA_AMD                      0x87EE
+#endif
+
+/* GL_AMD_performance_monitor */
+#ifndef GL_AMD_performance_monitor
+#define GL_COUNTER_TYPE_AMD                                     0x8BC0
+#define GL_COUNTER_RANGE_AMD                                    0x8BC1
+#define GL_UNSIGNED_INT64_AMD                                   0x8BC2
+#define GL_PERCENTAGE_AMD                                       0x8BC3
+#define GL_PERFMON_RESULT_AVAILABLE_AMD                         0x8BC4
+#define GL_PERFMON_RESULT_SIZE_AMD                              0x8BC5
+#define GL_PERFMON_RESULT_AMD                                   0x8BC6
+#endif
+
+/* GL_AMD_program_binary_Z400 */
+#ifndef GL_AMD_program_binary_Z400
+#define GL_Z400_BINARY_AMD                                      0x8740
+#endif
+
+/*------------------------------------------------------------------------*
+ * ANGLE extension tokens
+ *------------------------------------------------------------------------*/
+
+/* GL_ANGLE_framebuffer_blit */
+#ifndef GL_ANGLE_framebuffer_blit
+#define GL_READ_FRAMEBUFFER_ANGLE                               0x8CA8
+#define GL_DRAW_FRAMEBUFFER_ANGLE                               0x8CA9
+#define GL_DRAW_FRAMEBUFFER_BINDING_ANGLE                       0x8CA6
+#define GL_READ_FRAMEBUFFER_BINDING_ANGLE                       0x8CAA
+#endif
+
+/* GL_ANGLE_framebuffer_multisample */
+#ifndef GL_ANGLE_framebuffer_multisample
+#define GL_RENDERBUFFER_SAMPLES_ANGLE                           0x8CAB
+#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_ANGLE             0x8D56
+#define GL_MAX_SAMPLES_ANGLE                                    0x8D57
+#endif
+
+/* GL_ANGLE_instanced_arrays */
+#ifndef GL_ANGLE_instanced_arrays 
+#define GL_VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE                    0x88FE
+#endif
+
+/* GL_ANGLE_pack_reverse_row_order */
+#ifndef GL_ANGLE_pack_reverse_row_order 
+#define GL_PACK_REVERSE_ROW_ORDER_ANGLE                         0x93A4
+#endif
+
+/* GL_ANGLE_texture_compression_dxt3 */
+#ifndef GL_ANGLE_texture_compression_dxt3 
+#define GL_COMPRESSED_RGBA_S3TC_DXT3_ANGLE                      0x83F2
+#endif
+
+/* GL_ANGLE_texture_compression_dxt5 */
+#ifndef GL_ANGLE_texture_compression_dxt5 
+#define GL_COMPRESSED_RGBA_S3TC_DXT5_ANGLE                      0x83F3
+#endif
+
+/* GL_ANGLE_texture_usage */
+#ifndef GL_ANGLE_texture_usage 
+#define GL_TEXTURE_USAGE_ANGLE                                  0x93A2
+#define GL_FRAMEBUFFER_ATTACHMENT_ANGLE                         0x93A3
+#endif
+
+/* GL_ANGLE_translated_shader_source */
+#ifndef GL_ANGLE_translated_shader_source 
+#define GL_TRANSLATED_SHADER_SOURCE_LENGTH_ANGLE                0x93A0
+#endif
+
+/*------------------------------------------------------------------------*
+ * APPLE extension tokens
+ *------------------------------------------------------------------------*/
+
+/* GL_APPLE_copy_texture_levels */
+/* No new tokens introduced by this extension. */
+    
+/* GL_APPLE_framebuffer_multisample */
+#ifndef GL_APPLE_framebuffer_multisample
+#define GL_RENDERBUFFER_SAMPLES_APPLE                           0x8CAB
+#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_APPLE             0x8D56
+#define GL_MAX_SAMPLES_APPLE                                    0x8D57
+#define GL_READ_FRAMEBUFFER_APPLE                               0x8CA8
+#define GL_DRAW_FRAMEBUFFER_APPLE                               0x8CA9
+#define GL_DRAW_FRAMEBUFFER_BINDING_APPLE                       0x8CA6
+#define GL_READ_FRAMEBUFFER_BINDING_APPLE                       0x8CAA
+#endif
+
+/* GL_APPLE_rgb_422 */
+#ifndef GL_APPLE_rgb_422
+#define GL_RGB_422_APPLE                                        0x8A1F
+#define GL_UNSIGNED_SHORT_8_8_APPLE                             0x85BA
+#define GL_UNSIGNED_SHORT_8_8_REV_APPLE                         0x85BB
+#endif
+
+/* GL_APPLE_sync */
+#ifndef GL_APPLE_sync
+
+#ifndef __gl3_h_
+/* These types are defined with reference to <inttypes.h>
+ * in the Apple extension spec, but here we use the Khronos
+ * portable types in khrplatform.h, and assume those types 
+ * are always defined.
+ * If any other extensions using these types are defined, 
+ * the typedefs must move out of this block and be shared.
+ */
+typedef khronos_int64_t GLint64;
+typedef khronos_uint64_t GLuint64;
+typedef struct __GLsync *GLsync;
+#endif
+
+#define GL_SYNC_OBJECT_APPLE                                    0x8A53
+#define GL_MAX_SERVER_WAIT_TIMEOUT_APPLE                        0x9111
+#define GL_OBJECT_TYPE_APPLE                                    0x9112
+#define GL_SYNC_CONDITION_APPLE                                 0x9113
+#define GL_SYNC_STATUS_APPLE                                    0x9114
+#define GL_SYNC_FLAGS_APPLE                                     0x9115
+#define GL_SYNC_FENCE_APPLE                                     0x9116
+#define GL_SYNC_GPU_COMMANDS_COMPLETE_APPLE                     0x9117
+#define GL_UNSIGNALED_APPLE                                     0x9118
+#define GL_SIGNALED_APPLE                                       0x9119
+#define GL_ALREADY_SIGNALED_APPLE                               0x911A
+#define GL_TIMEOUT_EXPIRED_APPLE                                0x911B
+#define GL_CONDITION_SATISFIED_APPLE                            0x911C
+#define GL_WAIT_FAILED_APPLE                                    0x911D
+#define GL_SYNC_FLUSH_COMMANDS_BIT_APPLE                        0x00000001
+#define GL_TIMEOUT_IGNORED_APPLE                                0xFFFFFFFFFFFFFFFFull
+#endif
+
+/* GL_APPLE_texture_format_BGRA8888 */
+#ifndef GL_APPLE_texture_format_BGRA8888
+#define GL_BGRA_EXT                                             0x80E1
+#endif
+
+/* GL_APPLE_texture_max_level */
+#ifndef GL_APPLE_texture_max_level
+#define GL_TEXTURE_MAX_LEVEL_APPLE                              0x813D
+#endif
+
+/*------------------------------------------------------------------------*
+ * ARM extension tokens
+ *------------------------------------------------------------------------*/
+
+/* GL_ARM_mali_program_binary */
+#ifndef GL_ARM_mali_program_binary
+#define GL_MALI_PROGRAM_BINARY_ARM                              0x8F61
+#endif
+
+/* GL_ARM_mali_shader_binary */
+#ifndef GL_ARM_mali_shader_binary
+#define GL_MALI_SHADER_BINARY_ARM                               0x8F60
+#endif
+
+/* GL_ARM_rgba8 */
+/* No new tokens introduced by this extension. */
+
+/*------------------------------------------------------------------------*
+ * EXT extension tokens
+ *------------------------------------------------------------------------*/
+
+/* GL_EXT_blend_minmax */
+#ifndef GL_EXT_blend_minmax
+#define GL_MIN_EXT                                              0x8007
+#define GL_MAX_EXT                                              0x8008
+#endif
+
+/* GL_EXT_color_buffer_half_float */
+#ifndef GL_EXT_color_buffer_half_float
+#define GL_RGBA16F_EXT                                          0x881A
+#define GL_RGB16F_EXT                                           0x881B
+#define GL_RG16F_EXT                                            0x822F
+#define GL_R16F_EXT                                             0x822D
+#define GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT            0x8211
+#define GL_UNSIGNED_NORMALIZED_EXT                              0x8C17
+#endif
+
+/* GL_EXT_debug_label */
+#ifndef GL_EXT_debug_label
+#define GL_PROGRAM_PIPELINE_OBJECT_EXT                          0x8A4F
+#define GL_PROGRAM_OBJECT_EXT                                   0x8B40
+#define GL_SHADER_OBJECT_EXT                                    0x8B48
+#define GL_BUFFER_OBJECT_EXT                                    0x9151
+#define GL_QUERY_OBJECT_EXT                                     0x9153
+#define GL_VERTEX_ARRAY_OBJECT_EXT                              0x9154
+#endif
+
+/* GL_EXT_debug_marker */
+/* No new tokens introduced by this extension. */
+
+/* GL_EXT_discard_framebuffer */
+#ifndef GL_EXT_discard_framebuffer
+#define GL_COLOR_EXT                                            0x1800
+#define GL_DEPTH_EXT                                            0x1801
+#define GL_STENCIL_EXT                                          0x1802
+#endif
+
+/* GL_EXT_map_buffer_range */
+#ifndef GL_EXT_map_buffer_range
+#define GL_MAP_READ_BIT_EXT                                     0x0001
+#define GL_MAP_WRITE_BIT_EXT                                    0x0002
+#define GL_MAP_INVALIDATE_RANGE_BIT_EXT                         0x0004
+#define GL_MAP_INVALIDATE_BUFFER_BIT_EXT                        0x0008
+#define GL_MAP_FLUSH_EXPLICIT_BIT_EXT                           0x0010
+#define GL_MAP_UNSYNCHRONIZED_BIT_EXT                           0x0020
+#endif
+
+/* GL_EXT_multisampled_render_to_texture */
+#ifndef GL_EXT_multisampled_render_to_texture
+#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_SAMPLES_EXT           0x8D6C
+/* reuse values from GL_EXT_framebuffer_multisample (desktop extension) */ 
+#define GL_RENDERBUFFER_SAMPLES_EXT                             0x8CAB
+#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT               0x8D56
+#define GL_MAX_SAMPLES_EXT                                      0x8D57
+#endif
+
+/* GL_EXT_multiview_draw_buffers */
+#ifndef GL_EXT_multiview_draw_buffers
+#define GL_COLOR_ATTACHMENT_EXT                                 0x90F0
+#define GL_MULTIVIEW_EXT                                        0x90F1
+#define GL_DRAW_BUFFER_EXT                                      0x0C01
+#define GL_READ_BUFFER_EXT                                      0x0C02
+#define GL_MAX_MULTIVIEW_BUFFERS_EXT                            0x90F2
+#endif
+
+/* GL_EXT_multi_draw_arrays */
+/* No new tokens introduced by this extension. */
+
+/* GL_EXT_occlusion_query_boolean */
+#ifndef GL_EXT_occlusion_query_boolean
+#define GL_ANY_SAMPLES_PASSED_EXT                               0x8C2F
+#define GL_ANY_SAMPLES_PASSED_CONSERVATIVE_EXT                  0x8D6A
+#define GL_CURRENT_QUERY_EXT                                    0x8865
+#define GL_QUERY_RESULT_EXT                                     0x8866
+#define GL_QUERY_RESULT_AVAILABLE_EXT                           0x8867
+#endif
+
+/* GL_EXT_read_format_bgra */
+#ifndef GL_EXT_read_format_bgra
+#define GL_BGRA_EXT                                             0x80E1
+#define GL_UNSIGNED_SHORT_4_4_4_4_REV_EXT                       0x8365
+#define GL_UNSIGNED_SHORT_1_5_5_5_REV_EXT                       0x8366
+#endif
+
+/* GL_EXT_robustness */
+#ifndef GL_EXT_robustness
+/* reuse GL_NO_ERROR */
+#define GL_GUILTY_CONTEXT_RESET_EXT                             0x8253
+#define GL_INNOCENT_CONTEXT_RESET_EXT                           0x8254
+#define GL_UNKNOWN_CONTEXT_RESET_EXT                            0x8255
+#define GL_CONTEXT_ROBUST_ACCESS_EXT                            0x90F3
+#define GL_RESET_NOTIFICATION_STRATEGY_EXT                      0x8256
+#define GL_LOSE_CONTEXT_ON_RESET_EXT                            0x8252
+#define GL_NO_RESET_NOTIFICATION_EXT                            0x8261
+#endif
+
+/* GL_EXT_separate_shader_objects */
+#ifndef GL_EXT_separate_shader_objects
+#define GL_VERTEX_SHADER_BIT_EXT                                0x00000001
+#define GL_FRAGMENT_SHADER_BIT_EXT                              0x00000002
+#define GL_ALL_SHADER_BITS_EXT                                  0xFFFFFFFF
+#define GL_PROGRAM_SEPARABLE_EXT                                0x8258
+#define GL_ACTIVE_PROGRAM_EXT                                   0x8259
+#define GL_PROGRAM_PIPELINE_BINDING_EXT                         0x825A
+#endif
+
+/* GL_EXT_shader_framebuffer_fetch */
+#ifndef GL_EXT_shader_framebuffer_fetch
+#define GL_FRAGMENT_SHADER_DISCARDS_SAMPLES_EXT                 0x8A52
+#endif
+
+/* GL_EXT_shader_texture_lod */
+/* No new tokens introduced by this extension. */
+
+/* GL_EXT_shadow_samplers */
+#ifndef GL_EXT_shadow_samplers
+#define GL_TEXTURE_COMPARE_MODE_EXT                             0x884C
+#define GL_TEXTURE_COMPARE_FUNC_EXT                             0x884D
+#define GL_COMPARE_REF_TO_TEXTURE_EXT                           0x884E
+#define GL_SAMPLER_2D_SHADOW_EXT                                0x8B62
+#endif
+
+/* GL_EXT_sRGB */
+#ifndef GL_EXT_sRGB
+#define GL_SRGB_EXT                                             0x8C40
+#define GL_SRGB_ALPHA_EXT                                       0x8C42
+#define GL_SRGB8_ALPHA8_EXT                                     0x8C43
+#define GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING_EXT            0x8210
+#endif
+
+/* GL_EXT_texture_compression_dxt1 */
+#ifndef GL_EXT_texture_compression_dxt1
+#define GL_COMPRESSED_RGB_S3TC_DXT1_EXT                         0x83F0
+#define GL_COMPRESSED_RGBA_S3TC_DXT1_EXT                        0x83F1
+#endif
+
+/* GL_EXT_texture_filter_anisotropic */
+#ifndef GL_EXT_texture_filter_anisotropic
+#define GL_TEXTURE_MAX_ANISOTROPY_EXT                           0x84FE
+#define GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT                       0x84FF
+#endif
+
+/* GL_EXT_texture_format_BGRA8888 */
+#ifndef GL_EXT_texture_format_BGRA8888
+#define GL_BGRA_EXT                                             0x80E1
+#endif
+
+/* GL_EXT_texture_rg */
+#ifndef GL_EXT_texture_rg
+#define GL_RED_EXT                                              0x1903
+#define GL_RG_EXT                                               0x8227
+#define GL_R8_EXT                                               0x8229
+#define GL_RG8_EXT                                              0x822B
+#endif
+
+/* GL_EXT_texture_storage */
+#ifndef GL_EXT_texture_storage
+#define GL_TEXTURE_IMMUTABLE_FORMAT_EXT                         0x912F
+#define GL_ALPHA8_EXT                                           0x803C  
+#define GL_LUMINANCE8_EXT                                       0x8040
+#define GL_LUMINANCE8_ALPHA8_EXT                                0x8045
+#define GL_RGBA32F_EXT                                          0x8814  
+#define GL_RGB32F_EXT                                           0x8815
+#define GL_ALPHA32F_EXT                                         0x8816
+#define GL_LUMINANCE32F_EXT                                     0x8818
+#define GL_LUMINANCE_ALPHA32F_EXT                               0x8819
+/* reuse GL_RGBA16F_EXT */
+/* reuse GL_RGB16F_EXT */
+#define GL_ALPHA16F_EXT                                         0x881C
+#define GL_LUMINANCE16F_EXT                                     0x881E
+#define GL_LUMINANCE_ALPHA16F_EXT                               0x881F
+#define GL_RGB10_A2_EXT                                         0x8059  
+#define GL_RGB10_EXT                                            0x8052
+#define GL_BGRA8_EXT                                            0x93A1
+#define GL_R8_EXT                                               0x8229
+#define GL_RG8_EXT                                              0x822B
+#define GL_R32F_EXT                                             0x822E  
+#define GL_RG32F_EXT                                            0x8230
+#define GL_R16F_EXT                                             0x822D
+#define GL_RG16F_EXT                                            0x822F
+#endif
+
+/* GL_EXT_texture_type_2_10_10_10_REV */
+#ifndef GL_EXT_texture_type_2_10_10_10_REV
+#define GL_UNSIGNED_INT_2_10_10_10_REV_EXT                      0x8368
+#endif
+
+/* GL_EXT_unpack_subimage */
+#ifndef GL_EXT_unpack_subimage
+#define GL_UNPACK_ROW_LENGTH                                    0x0CF2
+#define GL_UNPACK_SKIP_ROWS                                     0x0CF3
+#define GL_UNPACK_SKIP_PIXELS                                   0x0CF4
+#endif
+
+/*------------------------------------------------------------------------*
+ * DMP extension tokens
+ *------------------------------------------------------------------------*/
+
+/* GL_DMP_shader_binary */
+#ifndef GL_DMP_shader_binary
+#define GL_SHADER_BINARY_DMP                                    0x9250
+#endif
+
+/*------------------------------------------------------------------------*
+ * FJ extension tokens
+ *------------------------------------------------------------------------*/
+
+/* GL_FJ_shader_binary_GCCSO */
+#ifndef GL_FJ_shader_binary_GCCSO
+#define GCCSO_SHADER_BINARY_FJ                                  0x9260
+#endif
+
+/*------------------------------------------------------------------------*
+ * IMG extension tokens
+ *------------------------------------------------------------------------*/
+
+/* GL_IMG_program_binary */
+#ifndef GL_IMG_program_binary
+#define GL_SGX_PROGRAM_BINARY_IMG                               0x9130
+#endif
+
+/* GL_IMG_read_format */
+#ifndef GL_IMG_read_format
+#define GL_BGRA_IMG                                             0x80E1
+#define GL_UNSIGNED_SHORT_4_4_4_4_REV_IMG                       0x8365
+#endif
+
+/* GL_IMG_shader_binary */
+#ifndef GL_IMG_shader_binary
+#define GL_SGX_BINARY_IMG                                       0x8C0A
+#endif
+
+/* GL_IMG_texture_compression_pvrtc */
+#ifndef GL_IMG_texture_compression_pvrtc
+#define GL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG                      0x8C00
+#define GL_COMPRESSED_RGB_PVRTC_2BPPV1_IMG                      0x8C01
+#define GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG                     0x8C02
+#define GL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG                     0x8C03
+#endif
+
+/* GL_IMG_multisampled_render_to_texture */
+#ifndef GL_IMG_multisampled_render_to_texture
+#define GL_RENDERBUFFER_SAMPLES_IMG                             0x9133
+#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_IMG               0x9134
+#define GL_MAX_SAMPLES_IMG                                      0x9135
+#define GL_TEXTURE_SAMPLES_IMG                                  0x9136
+#endif
+
+/*------------------------------------------------------------------------*
+ * NV extension tokens
+ *------------------------------------------------------------------------*/
+
+/* GL_NV_coverage_sample */
+#ifndef GL_NV_coverage_sample
+#define GL_COVERAGE_COMPONENT_NV                                0x8ED0
+#define GL_COVERAGE_COMPONENT4_NV                               0x8ED1
+#define GL_COVERAGE_ATTACHMENT_NV                               0x8ED2
+#define GL_COVERAGE_BUFFERS_NV                                  0x8ED3
+#define GL_COVERAGE_SAMPLES_NV                                  0x8ED4
+#define GL_COVERAGE_ALL_FRAGMENTS_NV                            0x8ED5
+#define GL_COVERAGE_EDGE_FRAGMENTS_NV                           0x8ED6
+#define GL_COVERAGE_AUTOMATIC_NV                                0x8ED7
+#define GL_COVERAGE_BUFFER_BIT_NV                               0x8000
+#endif
+
+/* GL_NV_depth_nonlinear */
+#ifndef GL_NV_depth_nonlinear
+#define GL_DEPTH_COMPONENT16_NONLINEAR_NV                       0x8E2C
+#endif
+
+/* GL_NV_draw_buffers */
+#ifndef GL_NV_draw_buffers
+#define GL_MAX_DRAW_BUFFERS_NV                                  0x8824
+#define GL_DRAW_BUFFER0_NV                                      0x8825
+#define GL_DRAW_BUFFER1_NV                                      0x8826
+#define GL_DRAW_BUFFER2_NV                                      0x8827
+#define GL_DRAW_BUFFER3_NV                                      0x8828
+#define GL_DRAW_BUFFER4_NV                                      0x8829
+#define GL_DRAW_BUFFER5_NV                                      0x882A
+#define GL_DRAW_BUFFER6_NV                                      0x882B
+#define GL_DRAW_BUFFER7_NV                                      0x882C
+#define GL_DRAW_BUFFER8_NV                                      0x882D
+#define GL_DRAW_BUFFER9_NV                                      0x882E
+#define GL_DRAW_BUFFER10_NV                                     0x882F
+#define GL_DRAW_BUFFER11_NV                                     0x8830
+#define GL_DRAW_BUFFER12_NV                                     0x8831
+#define GL_DRAW_BUFFER13_NV                                     0x8832
+#define GL_DRAW_BUFFER14_NV                                     0x8833
+#define GL_DRAW_BUFFER15_NV                                     0x8834
+#define GL_COLOR_ATTACHMENT0_NV                                 0x8CE0
+#define GL_COLOR_ATTACHMENT1_NV                                 0x8CE1
+#define GL_COLOR_ATTACHMENT2_NV                                 0x8CE2
+#define GL_COLOR_ATTACHMENT3_NV                                 0x8CE3
+#define GL_COLOR_ATTACHMENT4_NV                                 0x8CE4
+#define GL_COLOR_ATTACHMENT5_NV                                 0x8CE5
+#define GL_COLOR_ATTACHMENT6_NV                                 0x8CE6
+#define GL_COLOR_ATTACHMENT7_NV                                 0x8CE7
+#define GL_COLOR_ATTACHMENT8_NV                                 0x8CE8
+#define GL_COLOR_ATTACHMENT9_NV                                 0x8CE9
+#define GL_COLOR_ATTACHMENT10_NV                                0x8CEA
+#define GL_COLOR_ATTACHMENT11_NV                                0x8CEB
+#define GL_COLOR_ATTACHMENT12_NV                                0x8CEC
+#define GL_COLOR_ATTACHMENT13_NV                                0x8CED
+#define GL_COLOR_ATTACHMENT14_NV                                0x8CEE
+#define GL_COLOR_ATTACHMENT15_NV                                0x8CEF
+#endif
+
+/* GL_NV_fbo_color_attachments */
+#ifndef GL_NV_fbo_color_attachments
+#define GL_MAX_COLOR_ATTACHMENTS_NV                             0x8CDF
+/* GL_COLOR_ATTACHMENT{0-15}_NV defined in GL_NV_draw_buffers already. */
+#endif
+
+/* GL_NV_fence */
+#ifndef GL_NV_fence
+#define GL_ALL_COMPLETED_NV                                     0x84F2
+#define GL_FENCE_STATUS_NV                                      0x84F3
+#define GL_FENCE_CONDITION_NV                                   0x84F4
+#endif
+
+/* GL_NV_read_buffer */
+#ifndef GL_NV_read_buffer
+#define GL_READ_BUFFER_NV                                       0x0C02
+#endif
+
+/* GL_NV_read_buffer_front */
+/* No new tokens introduced by this extension. */
+
+/* GL_NV_read_depth */
+/* No new tokens introduced by this extension. */
+
+/* GL_NV_read_depth_stencil */
+/* No new tokens introduced by this extension. */
+
+/* GL_NV_read_stencil */
+/* No new tokens introduced by this extension. */
+
+/* GL_NV_texture_compression_s3tc_update */
+/* No new tokens introduced by this extension. */
+
+/* GL_NV_texture_npot_2D_mipmap */
+/* No new tokens introduced by this extension. */
+
+/*------------------------------------------------------------------------*
+ * QCOM extension tokens
+ *------------------------------------------------------------------------*/
+
+/* GL_QCOM_alpha_test */
+#ifndef GL_QCOM_alpha_test
+#define GL_ALPHA_TEST_QCOM                                      0x0BC0
+#define GL_ALPHA_TEST_FUNC_QCOM                                 0x0BC1
+#define GL_ALPHA_TEST_REF_QCOM                                  0x0BC2
+#endif
+
+/* GL_QCOM_binning_control */
+#ifndef GL_QCOM_binning_control
+#define GL_BINNING_CONTROL_HINT_QCOM                            0x8FB0
+#define GL_CPU_OPTIMIZED_QCOM                                   0x8FB1
+#define GL_GPU_OPTIMIZED_QCOM                                   0x8FB2
+#define GL_RENDER_DIRECT_TO_FRAMEBUFFER_QCOM                    0x8FB3
+#endif
+
+/* GL_QCOM_driver_control */
+/* No new tokens introduced by this extension. */
+
+/* GL_QCOM_extended_get */
+#ifndef GL_QCOM_extended_get
+#define GL_TEXTURE_WIDTH_QCOM                                   0x8BD2
+#define GL_TEXTURE_HEIGHT_QCOM                                  0x8BD3
+#define GL_TEXTURE_DEPTH_QCOM                                   0x8BD4
+#define GL_TEXTURE_INTERNAL_FORMAT_QCOM                         0x8BD5
+#define GL_TEXTURE_FORMAT_QCOM                                  0x8BD6
+#define GL_TEXTURE_TYPE_QCOM                                    0x8BD7
+#define GL_TEXTURE_IMAGE_VALID_QCOM                             0x8BD8
+#define GL_TEXTURE_NUM_LEVELS_QCOM                              0x8BD9
+#define GL_TEXTURE_TARGET_QCOM                                  0x8BDA
+#define GL_TEXTURE_OBJECT_VALID_QCOM                            0x8BDB
+#define GL_STATE_RESTORE                                        0x8BDC
+#endif
+
+/* GL_QCOM_extended_get2 */
+/* No new tokens introduced by this extension. */
+
+/* GL_QCOM_perfmon_global_mode */
+#ifndef GL_QCOM_perfmon_global_mode
+#define GL_PERFMON_GLOBAL_MODE_QCOM                             0x8FA0
+#endif
+
+/* GL_QCOM_writeonly_rendering */
+#ifndef GL_QCOM_writeonly_rendering
+#define GL_WRITEONLY_RENDERING_QCOM                             0x8823
+#endif
+
+/* GL_QCOM_tiled_rendering */
+#ifndef GL_QCOM_tiled_rendering
+#define GL_COLOR_BUFFER_BIT0_QCOM                               0x00000001
+#define GL_COLOR_BUFFER_BIT1_QCOM                               0x00000002
+#define GL_COLOR_BUFFER_BIT2_QCOM                               0x00000004
+#define GL_COLOR_BUFFER_BIT3_QCOM                               0x00000008
+#define GL_COLOR_BUFFER_BIT4_QCOM                               0x00000010
+#define GL_COLOR_BUFFER_BIT5_QCOM                               0x00000020
+#define GL_COLOR_BUFFER_BIT6_QCOM                               0x00000040
+#define GL_COLOR_BUFFER_BIT7_QCOM                               0x00000080
+#define GL_DEPTH_BUFFER_BIT0_QCOM                               0x00000100
+#define GL_DEPTH_BUFFER_BIT1_QCOM                               0x00000200
+#define GL_DEPTH_BUFFER_BIT2_QCOM                               0x00000400
+#define GL_DEPTH_BUFFER_BIT3_QCOM                               0x00000800
+#define GL_DEPTH_BUFFER_BIT4_QCOM                               0x00001000
+#define GL_DEPTH_BUFFER_BIT5_QCOM                               0x00002000
+#define GL_DEPTH_BUFFER_BIT6_QCOM                               0x00004000
+#define GL_DEPTH_BUFFER_BIT7_QCOM                               0x00008000
+#define GL_STENCIL_BUFFER_BIT0_QCOM                             0x00010000
+#define GL_STENCIL_BUFFER_BIT1_QCOM                             0x00020000
+#define GL_STENCIL_BUFFER_BIT2_QCOM                             0x00040000
+#define GL_STENCIL_BUFFER_BIT3_QCOM                             0x00080000
+#define GL_STENCIL_BUFFER_BIT4_QCOM                             0x00100000
+#define GL_STENCIL_BUFFER_BIT5_QCOM                             0x00200000
+#define GL_STENCIL_BUFFER_BIT6_QCOM                             0x00400000
+#define GL_STENCIL_BUFFER_BIT7_QCOM                             0x00800000
+#define GL_MULTISAMPLE_BUFFER_BIT0_QCOM                         0x01000000
+#define GL_MULTISAMPLE_BUFFER_BIT1_QCOM                         0x02000000
+#define GL_MULTISAMPLE_BUFFER_BIT2_QCOM                         0x04000000
+#define GL_MULTISAMPLE_BUFFER_BIT3_QCOM                         0x08000000
+#define GL_MULTISAMPLE_BUFFER_BIT4_QCOM                         0x10000000
+#define GL_MULTISAMPLE_BUFFER_BIT5_QCOM                         0x20000000
+#define GL_MULTISAMPLE_BUFFER_BIT6_QCOM                         0x40000000
+#define GL_MULTISAMPLE_BUFFER_BIT7_QCOM                         0x80000000
+#endif
+
+/*------------------------------------------------------------------------*
+ * VIV extension tokens
+ *------------------------------------------------------------------------*/
+
+/* GL_VIV_shader_binary */
+#ifndef GL_VIV_shader_binary
+#define GL_SHADER_BINARY_VIV                                    0x8FC4
+#endif
+
+/*------------------------------------------------------------------------*
+ * End of extension tokens, start of corresponding extension functions
+ *------------------------------------------------------------------------*/
+
+/*------------------------------------------------------------------------*
+ * OES extension functions
+ *------------------------------------------------------------------------*/
+
+/* GL_OES_compressed_ETC1_RGB8_texture */
+#ifndef GL_OES_compressed_ETC1_RGB8_texture
+#define GL_OES_compressed_ETC1_RGB8_texture 1
+#endif
+
+/* GL_OES_compressed_paletted_texture */
+#ifndef GL_OES_compressed_paletted_texture
+#define GL_OES_compressed_paletted_texture 1
+#endif
+
+/* GL_OES_depth24 */
+#ifndef GL_OES_depth24
+#define GL_OES_depth24 1
+#endif
+
+/* GL_OES_depth32 */
+#ifndef GL_OES_depth32
+#define GL_OES_depth32 1
+#endif
+
+/* GL_OES_depth_texture */
+#ifndef GL_OES_depth_texture
+#define GL_OES_depth_texture 1
+#endif
+
+/* GL_OES_EGL_image */
+#ifndef GL_OES_EGL_image
+#define GL_OES_EGL_image 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glEGLImageTargetTexture2DOES (GLenum target, GLeglImageOES image);
+GL_APICALL void GL_APIENTRY glEGLImageTargetRenderbufferStorageOES (GLenum target, GLeglImageOES image);
+#endif
+typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETTEXTURE2DOESPROC) (GLenum target, GLeglImageOES image);
+typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETRENDERBUFFERSTORAGEOESPROC) (GLenum target, GLeglImageOES image);
+#endif
+
+/* GL_OES_EGL_image_external */
+#ifndef GL_OES_EGL_image_external
+#define GL_OES_EGL_image_external 1
+/* glEGLImageTargetTexture2DOES defined in GL_OES_EGL_image already. */
+#endif
+
+/* GL_OES_element_index_uint */
+#ifndef GL_OES_element_index_uint
+#define GL_OES_element_index_uint 1
+#endif
+
+/* GL_OES_fbo_render_mipmap */
+#ifndef GL_OES_fbo_render_mipmap
+#define GL_OES_fbo_render_mipmap 1
+#endif
+
+/* GL_OES_fragment_precision_high */
+#ifndef GL_OES_fragment_precision_high
+#define GL_OES_fragment_precision_high 1
+#endif
+
+/* GL_OES_get_program_binary */
+#ifndef GL_OES_get_program_binary
+#define GL_OES_get_program_binary 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glGetProgramBinaryOES (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, GLvoid *binary);
+GL_APICALL void GL_APIENTRY glProgramBinaryOES (GLuint program, GLenum binaryFormat, const GLvoid *binary, GLint length);
+#endif
+typedef void (GL_APIENTRYP PFNGLGETPROGRAMBINARYOESPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, GLvoid *binary);
+typedef void (GL_APIENTRYP PFNGLPROGRAMBINARYOESPROC) (GLuint program, GLenum binaryFormat, const GLvoid *binary, GLint length);
+#endif
+
+/* GL_OES_mapbuffer */
+#ifndef GL_OES_mapbuffer
+#define GL_OES_mapbuffer 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void* GL_APIENTRY glMapBufferOES (GLenum target, GLenum access);
+GL_APICALL GLboolean GL_APIENTRY glUnmapBufferOES (GLenum target);
+GL_APICALL void GL_APIENTRY glGetBufferPointervOES (GLenum target, GLenum pname, GLvoid** params);
+#endif
+typedef void* (GL_APIENTRYP PFNGLMAPBUFFEROESPROC) (GLenum target, GLenum access);
+typedef GLboolean (GL_APIENTRYP PFNGLUNMAPBUFFEROESPROC) (GLenum target);
+typedef void (GL_APIENTRYP PFNGLGETBUFFERPOINTERVOESPROC) (GLenum target, GLenum pname, GLvoid** params);
+#endif
+
+/* GL_OES_packed_depth_stencil */
+#ifndef GL_OES_packed_depth_stencil
+#define GL_OES_packed_depth_stencil 1
+#endif
+
+/* GL_OES_required_internalformat */
+#ifndef GL_OES_required_internalformat
+#define GL_OES_required_internalformat 1
+#endif
+
+/* GL_OES_rgb8_rgba8 */
+#ifndef GL_OES_rgb8_rgba8
+#define GL_OES_rgb8_rgba8 1
+#endif
+
+/* GL_OES_standard_derivatives */
+#ifndef GL_OES_standard_derivatives
+#define GL_OES_standard_derivatives 1
+#endif
+
+/* GL_OES_stencil1 */
+#ifndef GL_OES_stencil1
+#define GL_OES_stencil1 1
+#endif
+
+/* GL_OES_stencil4 */
+#ifndef GL_OES_stencil4
+#define GL_OES_stencil4 1
+#endif
+
+#ifndef GL_OES_surfaceless_context
+#define GL_OES_surfaceless_context 1
+#endif
+
+/* GL_OES_texture_3D */
+#ifndef GL_OES_texture_3D
+#define GL_OES_texture_3D 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glTexImage3DOES (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid* pixels);
+GL_APICALL void GL_APIENTRY glTexSubImage3DOES (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid* pixels);
+GL_APICALL void GL_APIENTRY glCopyTexSubImage3DOES (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
+GL_APICALL void GL_APIENTRY glCompressedTexImage3DOES (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid* data);
+GL_APICALL void GL_APIENTRY glCompressedTexSubImage3DOES (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid* data);
+GL_APICALL void GL_APIENTRY glFramebufferTexture3DOES (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
+#endif
+typedef void (GL_APIENTRYP PFNGLTEXIMAGE3DOESPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid* pixels);
+typedef void (GL_APIENTRYP PFNGLTEXSUBIMAGE3DOESPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid* pixels);
+typedef void (GL_APIENTRYP PFNGLCOPYTEXSUBIMAGE3DOESPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
+typedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DOESPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid* data);
+typedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE3DOESPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid* data);
+typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE3DOES) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
+#endif
+
+/* GL_OES_texture_float */
+#ifndef GL_OES_texture_float
+#define GL_OES_texture_float 1
+#endif
+
+/* GL_OES_texture_float_linear */
+#ifndef GL_OES_texture_float_linear
+#define GL_OES_texture_float_linear 1
+#endif
+
+/* GL_OES_texture_half_float */
+#ifndef GL_OES_texture_half_float
+#define GL_OES_texture_half_float 1
+#endif
+
+/* GL_OES_texture_half_float_linear */
+#ifndef GL_OES_texture_half_float_linear
+#define GL_OES_texture_half_float_linear 1
+#endif
+
+/* GL_OES_texture_npot */
+#ifndef GL_OES_texture_npot
+#define GL_OES_texture_npot 1
+#endif
+
+/* GL_OES_vertex_array_object */
+#ifndef GL_OES_vertex_array_object
+#define GL_OES_vertex_array_object 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glBindVertexArrayOES (GLuint array);
+GL_APICALL void GL_APIENTRY glDeleteVertexArraysOES (GLsizei n, const GLuint *arrays);
+GL_APICALL void GL_APIENTRY glGenVertexArraysOES (GLsizei n, GLuint *arrays);
+GL_APICALL GLboolean GL_APIENTRY glIsVertexArrayOES (GLuint array);
+#endif
+typedef void (GL_APIENTRYP PFNGLBINDVERTEXARRAYOESPROC) (GLuint array);
+typedef void (GL_APIENTRYP PFNGLDELETEVERTEXARRAYSOESPROC) (GLsizei n, const GLuint *arrays);
+typedef void (GL_APIENTRYP PFNGLGENVERTEXARRAYSOESPROC) (GLsizei n, GLuint *arrays);
+typedef GLboolean (GL_APIENTRYP PFNGLISVERTEXARRAYOESPROC) (GLuint array);
+#endif
+
+/* GL_OES_vertex_half_float */
+#ifndef GL_OES_vertex_half_float
+#define GL_OES_vertex_half_float 1
+#endif
+
+/* GL_OES_vertex_type_10_10_10_2 */
+#ifndef GL_OES_vertex_type_10_10_10_2
+#define GL_OES_vertex_type_10_10_10_2 1
+#endif
+
+/*------------------------------------------------------------------------*
+ * KHR extension functions
+ *------------------------------------------------------------------------*/
+
+#ifndef GL_KHR_debug
+#define GL_KHR_debug 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glDebugMessageControl (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled);
+GL_APICALL void GL_APIENTRY glDebugMessageInsert (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf);
+GL_APICALL void GL_APIENTRY glDebugMessageCallback (GLDEBUGPROC callback, const void *userParam);
+GL_APICALL GLuint GL_APIENTRY glGetDebugMessageLog (GLuint count, GLsizei bufsize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog);
+GL_APICALL void GL_APIENTRY glPushDebugGroup (GLenum source, GLuint id, GLsizei length, const GLchar *message);
+GL_APICALL void GL_APIENTRY glPopDebugGroup (void);
+GL_APICALL void GL_APIENTRY glObjectLabel (GLenum identifier, GLuint name, GLsizei length, const GLchar *label);
+GL_APICALL void GL_APIENTRY glGetObjectLabel (GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label);
+GL_APICALL void GL_APIENTRY glObjectPtrLabel (const void *ptr, GLsizei length, const GLchar *label);
+GL_APICALL void GL_APIENTRY glGetObjectPtrLabel (const void *ptr, GLsizei bufSize, GLsizei *length, GLchar *label);
+GL_APICALL void GL_APIENTRY glGetPointerv (GLenum pname, void **params);
+#endif 
+typedef void (GL_APIENTRYP PFNGLDEBUGMESSAGECONTROLPROC) (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled);
+typedef void (GL_APIENTRYP PFNGLDEBUGMESSAGEINSERTPROC) (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf);
+typedef void (GL_APIENTRYP PFNGLDEBUGMESSAGECALLBACKPROC) (GLDEBUGPROC callback, const void *userParam);
+typedef GLuint (GL_APIENTRYP PFNGLGETDEBUGMESSAGELOGPROC) (GLuint count, GLsizei bufsize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog);
+typedef void (GL_APIENTRYP PFNGLPUSHDEBUGGROUPPROC) (GLenum source, GLuint id, GLsizei length, const GLchar *message);
+typedef void (GL_APIENTRYP PFNGLPOPDEBUGGROUPPROC) (void);
+typedef void (GL_APIENTRYP PFNGLOBJECTLABELPROC) (GLenum identifier, GLuint name, GLsizei length, const GLchar *label);
+typedef void (GL_APIENTRYP PFNGLGETOBJECTLABELPROC) (GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label);
+typedef void (GL_APIENTRYP PFNGLOBJECTPTRLABELPROC) (const void *ptr, GLsizei length, const GLchar *label);
+typedef void (GL_APIENTRYP PFNGLGETOBJECTPTRLABELPROC) (const void *ptr, GLsizei bufSize, GLsizei *length, GLchar *label);
+typedef void (GL_APIENTRYP PFNGLGETPOINTERVPROC) (GLenum pname, void **params);
+#endif
+
+#ifndef GL_KHR_texture_compression_astc_ldr
+#define GL_KHR_texture_compression_astc_ldr 1
+#endif
+
+
+/*------------------------------------------------------------------------*
+ * AMD extension functions
+ *------------------------------------------------------------------------*/
+
+/* GL_AMD_compressed_3DC_texture */
+#ifndef GL_AMD_compressed_3DC_texture
+#define GL_AMD_compressed_3DC_texture 1
+#endif
+
+/* GL_AMD_compressed_ATC_texture */
+#ifndef GL_AMD_compressed_ATC_texture
+#define GL_AMD_compressed_ATC_texture 1
+#endif
+
+/* AMD_performance_monitor */
+#ifndef GL_AMD_performance_monitor
+#define GL_AMD_performance_monitor 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glGetPerfMonitorGroupsAMD (GLint *numGroups, GLsizei groupsSize, GLuint *groups);
+GL_APICALL void GL_APIENTRY glGetPerfMonitorCountersAMD (GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters);
+GL_APICALL void GL_APIENTRY glGetPerfMonitorGroupStringAMD (GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString);
+GL_APICALL void GL_APIENTRY glGetPerfMonitorCounterStringAMD (GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString);
+GL_APICALL void GL_APIENTRY glGetPerfMonitorCounterInfoAMD (GLuint group, GLuint counter, GLenum pname, GLvoid *data);
+GL_APICALL void GL_APIENTRY glGenPerfMonitorsAMD (GLsizei n, GLuint *monitors);
+GL_APICALL void GL_APIENTRY glDeletePerfMonitorsAMD (GLsizei n, GLuint *monitors);
+GL_APICALL void GL_APIENTRY glSelectPerfMonitorCountersAMD (GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *countersList);
+GL_APICALL void GL_APIENTRY glBeginPerfMonitorAMD (GLuint monitor);
+GL_APICALL void GL_APIENTRY glEndPerfMonitorAMD (GLuint monitor);
+GL_APICALL void GL_APIENTRY glGetPerfMonitorCounterDataAMD (GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten);
+#endif
+typedef void (GL_APIENTRYP PFNGLGETPERFMONITORGROUPSAMDPROC) (GLint *numGroups, GLsizei groupsSize, GLuint *groups);
+typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERSAMDPROC) (GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters);
+typedef void (GL_APIENTRYP PFNGLGETPERFMONITORGROUPSTRINGAMDPROC) (GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString);
+typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERSTRINGAMDPROC) (GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString);
+typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERINFOAMDPROC) (GLuint group, GLuint counter, GLenum pname, GLvoid *data);
+typedef void (GL_APIENTRYP PFNGLGENPERFMONITORSAMDPROC) (GLsizei n, GLuint *monitors);
+typedef void (GL_APIENTRYP PFNGLDELETEPERFMONITORSAMDPROC) (GLsizei n, GLuint *monitors);
+typedef void (GL_APIENTRYP PFNGLSELECTPERFMONITORCOUNTERSAMDPROC) (GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *countersList);
+typedef void (GL_APIENTRYP PFNGLBEGINPERFMONITORAMDPROC) (GLuint monitor);
+typedef void (GL_APIENTRYP PFNGLENDPERFMONITORAMDPROC) (GLuint monitor);
+typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERDATAAMDPROC) (GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten);
+#endif
+
+/* GL_AMD_program_binary_Z400 */
+#ifndef GL_AMD_program_binary_Z400
+#define GL_AMD_program_binary_Z400 1
+#endif
+
+/*------------------------------------------------------------------------*
+ * ANGLE extension functions
+ *------------------------------------------------------------------------*/
+
+/* GL_ANGLE_framebuffer_blit */
+#ifndef GL_ANGLE_framebuffer_blit
+#define GL_ANGLE_framebuffer_blit 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glBlitFramebufferANGLE (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
+#endif
+typedef void (GL_APIENTRYP PFNGLBLITFRAMEBUFFERANGLEPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
+#endif
+
+/* GL_ANGLE_framebuffer_multisample */
+#ifndef GL_ANGLE_framebuffer_multisample
+#define GL_ANGLE_framebuffer_multisample 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleANGLE (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
+#endif
+typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEANGLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
+#endif
+
+#ifndef GL_ANGLE_instanced_arrays 
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glDrawArraysInstancedANGLE (GLenum mode, GLint first, GLsizei count, GLsizei primcount);
+GL_APICALL void GL_APIENTRY glDrawElementsInstancedANGLE (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount);
+GL_APICALL void GL_APIENTRY glVertexAttribDivisorANGLE (GLuint index, GLuint divisor);
+#endif
+typedef void (GL_APIENTRYP PFLGLDRAWARRAYSINSTANCEDANGLEPROC) (GLenum mode, GLint first, GLsizei count, GLsizei primcount);
+typedef void (GL_APIENTRYP PFLGLDRAWELEMENTSINSTANCEDANGLEPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount);
+typedef void (GL_APIENTRYP PFLGLVERTEXATTRIBDIVISORANGLEPROC) (GLuint index, GLuint divisor);
+#endif
+
+/* GL_ANGLE_pack_reverse_row_order */
+#ifndef GL_ANGLE_pack_reverse_row_order 
+#define GL_ANGLE_pack_reverse_row_order 1
+#endif
+
+/* GL_ANGLE_texture_compression_dxt3 */
+#ifndef GL_ANGLE_texture_compression_dxt3 
+#define GL_ANGLE_texture_compression_dxt3 1
+#endif
+
+/* GL_ANGLE_texture_compression_dxt5 */
+#ifndef GL_ANGLE_texture_compression_dxt5 
+#define GL_ANGLE_texture_compression_dxt5 1
+#endif
+
+/* GL_ANGLE_texture_usage */
+#ifndef GL_ANGLE_texture_usage 
+#define GL_ANGLE_texture_usage 1
+#endif
+
+#ifndef GL_ANGLE_translated_shader_source 
+#define GL_ANGLE_translated_shader_source 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glGetTranslatedShaderSourceANGLE (GLuint shader, GLsizei bufsize, GLsizei *length, GLchar *source);
+#endif
+typedef void (GL_APIENTRYP PFLGLGETTRANSLATEDSHADERSOURCEANGLEPROC) (GLuint shader, GLsizei bufsize, GLsizei *length, GLchar *source);
+#endif
+
+/*------------------------------------------------------------------------*
+ * APPLE extension functions
+ *------------------------------------------------------------------------*/
+
+/* GL_APPLE_copy_texture_levels */
+#ifndef GL_APPLE_copy_texture_levels
+#define GL_APPLE_copy_texture_levels 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glCopyTextureLevelsAPPLE (GLuint destinationTexture, GLuint sourceTexture, GLint sourceBaseLevel, GLsizei sourceLevelCount);
+#endif
+typedef void (GL_APIENTRYP PFNGLCOPYTEXTURELEVELSAPPLEPROC) (GLuint destinationTexture, GLuint sourceTexture, GLint sourceBaseLevel, GLsizei sourceLevelCount);
+#endif
+
+/* GL_APPLE_framebuffer_multisample */
+#ifndef GL_APPLE_framebuffer_multisample
+#define GL_APPLE_framebuffer_multisample 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleAPPLE (GLenum, GLsizei, GLenum, GLsizei, GLsizei);
+GL_APICALL void GL_APIENTRY glResolveMultisampleFramebufferAPPLE (void);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEAPPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
+typedef void (GL_APIENTRYP PFNGLRESOLVEMULTISAMPLEFRAMEBUFFERAPPLEPROC) (void);
+#endif
+
+/* GL_APPLE_rgb_422 */
+#ifndef GL_APPLE_rgb_422
+#define GL_APPLE_rgb_422 1
+#endif
+
+/* GL_APPLE_sync */
+#ifndef GL_APPLE_sync
+#define GL_APPLE_sync 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL GLsync GL_APIENTRY glFenceSyncAPPLE (GLenum condition, GLbitfield flags);
+GL_APICALL GLboolean GL_APIENTRY glIsSyncAPPLE (GLsync sync);
+GL_APICALL void GL_APIENTRY glDeleteSyncAPPLE (GLsync sync);
+GL_APICALL GLenum GL_APIENTRY glClientWaitSyncAPPLE (GLsync sync, GLbitfield flags, GLuint64 timeout);
+GL_APICALL void GL_APIENTRY glWaitSyncAPPLE (GLsync sync, GLbitfield flags, GLuint64 timeout);
+GL_APICALL void GL_APIENTRY glGetInteger64vAPPLE (GLenum pname, GLint64 *params);
+GL_APICALL void GL_APIENTRY glGetSyncivAPPLE (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values);
+#endif
+typedef GLsync (GL_APIENTRYP PFNGLFENCESYNCAPPLEPROC) (GLenum condition, GLbitfield flags);
+typedef GLboolean (GL_APIENTRYP PFNGLISSYNCAPPLEPROC) (GLsync sync);
+typedef void (GL_APIENTRYP PFNGLDELETESYNCAPPLEPROC) (GLsync sync);
+typedef GLenum (GL_APIENTRYP PFNGLCLIENTWAITSYNCAPPLEPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout);
+typedef void (GL_APIENTRYP PFNGLWAITSYNCAPPLEPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout);
+typedef void (GL_APIENTRYP PFNGLGETINTEGER64VAPPLEPROC) (GLenum pname, GLint64 *params);
+typedef void (GL_APIENTRYP PFNGLGETSYNCIVAPPLEPROC) (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values);
+#endif
+
+/* GL_APPLE_texture_format_BGRA8888 */
+#ifndef GL_APPLE_texture_format_BGRA8888
+#define GL_APPLE_texture_format_BGRA8888 1
+#endif
+
+/* GL_APPLE_texture_max_level */
+#ifndef GL_APPLE_texture_max_level
+#define GL_APPLE_texture_max_level 1
+#endif
+
+/*------------------------------------------------------------------------*
+ * ARM extension functions
+ *------------------------------------------------------------------------*/
+
+/* GL_ARM_mali_program_binary */
+#ifndef GL_ARM_mali_program_binary
+#define GL_ARM_mali_program_binary 1
+#endif
+
+/* GL_ARM_mali_shader_binary */
+#ifndef GL_ARM_mali_shader_binary
+#define GL_ARM_mali_shader_binary 1
+#endif
+
+/* GL_ARM_rgba8 */
+#ifndef GL_ARM_rgba8
+#define GL_ARM_rgba8 1
+#endif
+
+/*------------------------------------------------------------------------*
+ * EXT extension functions
+ *------------------------------------------------------------------------*/
+
+/* GL_EXT_blend_minmax */
+#ifndef GL_EXT_blend_minmax
+#define GL_EXT_blend_minmax 1
+#endif
+
+/* GL_EXT_color_buffer_half_float */
+#ifndef GL_EXT_color_buffer_half_float
+#define GL_EXT_color_buffer_half_float 1
+#endif
+
+/* GL_EXT_debug_label */
+#ifndef GL_EXT_debug_label
+#define GL_EXT_debug_label 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glLabelObjectEXT (GLenum type, GLuint object, GLsizei length, const GLchar *label);
+GL_APICALL void GL_APIENTRY glGetObjectLabelEXT (GLenum type, GLuint object, GLsizei bufSize, GLsizei *length, GLchar *label);
+#endif
+typedef void (GL_APIENTRYP PFNGLLABELOBJECTEXTPROC) (GLenum type, GLuint object, GLsizei length, const GLchar *label);
+typedef void (GL_APIENTRYP PFNGLGETOBJECTLABELEXTPROC) (GLenum type, GLuint object, GLsizei bufSize, GLsizei *length, GLchar *label);
+#endif
+
+/* GL_EXT_debug_marker */
+#ifndef GL_EXT_debug_marker
+#define GL_EXT_debug_marker 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glInsertEventMarkerEXT (GLsizei length, const GLchar *marker);
+GL_APICALL void GL_APIENTRY glPushGroupMarkerEXT (GLsizei length, const GLchar *marker);
+GL_APICALL void GL_APIENTRY glPopGroupMarkerEXT (void);
+#endif
+typedef void (GL_APIENTRYP PFNGLINSERTEVENTMARKEREXTPROC) (GLsizei length, const GLchar *marker);
+typedef void (GL_APIENTRYP PFNGLPUSHGROUPMARKEREXTPROC) (GLsizei length, const GLchar *marker);
+typedef void (GL_APIENTRYP PFNGLPOPGROUPMARKEREXTPROC) (void);
+#endif
+
+/* GL_EXT_discard_framebuffer */
+#ifndef GL_EXT_discard_framebuffer
+#define GL_EXT_discard_framebuffer 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glDiscardFramebufferEXT (GLenum target, GLsizei numAttachments, const GLenum *attachments);
+#endif
+typedef void (GL_APIENTRYP PFNGLDISCARDFRAMEBUFFEREXTPROC) (GLenum target, GLsizei numAttachments, const GLenum *attachments);
+#endif
+
+/* GL_EXT_map_buffer_range */
+#ifndef GL_EXT_map_buffer_range
+#define GL_EXT_map_buffer_range 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void* GL_APIENTRY glMapBufferRangeEXT (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access);
+GL_APICALL void GL_APIENTRY glFlushMappedBufferRangeEXT (GLenum target, GLintptr offset, GLsizeiptr length);
+#endif
+typedef void* (GL_APIENTRYP PFNGLMAPBUFFERRANGEEXTPROC) (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access);
+typedef void (GL_APIENTRYP PFNGLFLUSHMAPPEDBUFFERRANGEEXTPROC) (GLenum target, GLintptr offset, GLsizeiptr length);
+#endif
+
+/* GL_EXT_multisampled_render_to_texture */
+#ifndef GL_EXT_multisampled_render_to_texture
+#define GL_EXT_multisampled_render_to_texture 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleEXT (GLenum, GLsizei, GLenum, GLsizei, GLsizei);
+GL_APICALL void GL_APIENTRY glFramebufferTexture2DMultisampleEXT (GLenum, GLenum, GLenum, GLuint, GLint, GLsizei);
+#endif
+typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
+typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DMULTISAMPLEEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples);
+#endif
+
+/* GL_EXT_multiview_draw_buffers */
+#ifndef GL_EXT_multiview_draw_buffers
+#define GL_EXT_multiview_draw_buffers 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glReadBufferIndexedEXT (GLenum src, GLint index);
+GL_APICALL void GL_APIENTRY glDrawBuffersIndexedEXT (GLint n, const GLenum *location, const GLint *indices);
+GL_APICALL void GL_APIENTRY glGetIntegeri_vEXT (GLenum target, GLuint index, GLint *data);
+#endif
+typedef void (GL_APIENTRYP PFNGLREADBUFFERINDEXEDEXTPROC) (GLenum src, GLint index);
+typedef void (GL_APIENTRYP PFNGLDRAWBUFFERSINDEXEDEXTPROC) (GLint n, const GLenum *location, const GLint *indices);
+typedef void (GL_APIENTRYP PFNGLGETINTEGERI_VEXTPROC) (GLenum target, GLuint index, GLint *data);
+#endif
+
+#ifndef GL_EXT_multi_draw_arrays
+#define GL_EXT_multi_draw_arrays 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glMultiDrawArraysEXT (GLenum, GLint *, GLsizei *, GLsizei);
+GL_APICALL void GL_APIENTRY glMultiDrawElementsEXT (GLenum, const GLsizei *, GLenum, const GLvoid* *, GLsizei);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (GL_APIENTRYP PFNGLMULTIDRAWARRAYSEXTPROC) (GLenum mode, GLint *first, GLsizei *count, GLsizei primcount);
+typedef void (GL_APIENTRYP PFNGLMULTIDRAWELEMENTSEXTPROC) (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount);
+#endif
+
+/* GL_EXT_occlusion_query_boolean */
+#ifndef GL_EXT_occlusion_query_boolean
+#define GL_EXT_occlusion_query_boolean 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glGenQueriesEXT (GLsizei n, GLuint *ids);
+GL_APICALL void GL_APIENTRY glDeleteQueriesEXT (GLsizei n, const GLuint *ids);
+GL_APICALL GLboolean GL_APIENTRY glIsQueryEXT (GLuint id);
+GL_APICALL void GL_APIENTRY glBeginQueryEXT (GLenum target, GLuint id);
+GL_APICALL void GL_APIENTRY glEndQueryEXT (GLenum target);
+GL_APICALL void GL_APIENTRY glGetQueryivEXT (GLenum target, GLenum pname, GLint *params);
+GL_APICALL void GL_APIENTRY glGetQueryObjectuivEXT (GLuint id, GLenum pname, GLuint *params);
+#endif
+typedef void (GL_APIENTRYP PFNGLGENQUERIESEXTPROC) (GLsizei n, GLuint *ids);
+typedef void (GL_APIENTRYP PFNGLDELETEQUERIESEXTPROC) (GLsizei n, const GLuint *ids);
+typedef GLboolean (GL_APIENTRYP PFNGLISQUERYEXTPROC) (GLuint id);
+typedef void (GL_APIENTRYP PFNGLBEGINQUERYEXTPROC) (GLenum target, GLuint id);
+typedef void (GL_APIENTRYP PFNGLENDQUERYEXTPROC) (GLenum target);
+typedef void (GL_APIENTRYP PFNGLGETQUERYIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
+typedef void (GL_APIENTRYP PFNGLGETQUERYOBJECTUIVEXTPROC) (GLuint id, GLenum pname, GLuint *params);
+#endif
+
+/* GL_EXT_read_format_bgra */
+#ifndef GL_EXT_read_format_bgra
+#define GL_EXT_read_format_bgra 1
+#endif
+
+/* GL_EXT_robustness */
+#ifndef GL_EXT_robustness
+#define GL_EXT_robustness 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL GLenum GL_APIENTRY glGetGraphicsResetStatusEXT (void);
+GL_APICALL void GL_APIENTRY glReadnPixelsEXT (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data);
+GL_APICALL void GL_APIENTRY glGetnUniformfvEXT (GLuint program, GLint location, GLsizei bufSize, float *params);
+GL_APICALL void GL_APIENTRY glGetnUniformivEXT (GLuint program, GLint location, GLsizei bufSize, GLint *params);
+#endif
+typedef GLenum (GL_APIENTRYP PFNGLGETGRAPHICSRESETSTATUSEXTPROC) (void);
+typedef void (GL_APIENTRYP PFNGLREADNPIXELSEXTPROC) (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data);
+typedef void (GL_APIENTRYP PFNGLGETNUNIFORMFVEXTPROC) (GLuint program, GLint location, GLsizei bufSize, float *params);
+typedef void (GL_APIENTRYP PFNGLGETNUNIFORMIVEXTPROC) (GLuint program, GLint location, GLsizei bufSize, GLint *params);
+#endif
+
+/* GL_EXT_separate_shader_objects */
+#ifndef GL_EXT_separate_shader_objects
+#define GL_EXT_separate_shader_objects 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glUseProgramStagesEXT (GLuint pipeline, GLbitfield stages, GLuint program);
+GL_APICALL void GL_APIENTRY glActiveShaderProgramEXT (GLuint pipeline, GLuint program);
+GL_APICALL GLuint GL_APIENTRY glCreateShaderProgramvEXT (GLenum type, GLsizei count, const GLchar **strings);
+GL_APICALL void GL_APIENTRY glBindProgramPipelineEXT (GLuint pipeline);
+GL_APICALL void GL_APIENTRY glDeleteProgramPipelinesEXT (GLsizei n, const GLuint *pipelines);
+GL_APICALL void GL_APIENTRY glGenProgramPipelinesEXT (GLsizei n, GLuint *pipelines);
+GL_APICALL GLboolean GL_APIENTRY glIsProgramPipelineEXT (GLuint pipeline);
+GL_APICALL void GL_APIENTRY glProgramParameteriEXT (GLuint program, GLenum pname, GLint value);
+GL_APICALL void GL_APIENTRY glGetProgramPipelineivEXT (GLuint pipeline, GLenum pname, GLint *params);
+GL_APICALL void GL_APIENTRY glProgramUniform1iEXT (GLuint program, GLint location, GLint x);
+GL_APICALL void GL_APIENTRY glProgramUniform2iEXT (GLuint program, GLint location, GLint x, GLint y);
+GL_APICALL void GL_APIENTRY glProgramUniform3iEXT (GLuint program, GLint location, GLint x, GLint y, GLint z);
+GL_APICALL void GL_APIENTRY glProgramUniform4iEXT (GLuint program, GLint location, GLint x, GLint y, GLint z, GLint w);
+GL_APICALL void GL_APIENTRY glProgramUniform1fEXT (GLuint program, GLint location, GLfloat x);
+GL_APICALL void GL_APIENTRY glProgramUniform2fEXT (GLuint program, GLint location, GLfloat x, GLfloat y);
+GL_APICALL void GL_APIENTRY glProgramUniform3fEXT (GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z);
+GL_APICALL void GL_APIENTRY glProgramUniform4fEXT (GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+GL_APICALL void GL_APIENTRY glProgramUniform1ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value);
+GL_APICALL void GL_APIENTRY glProgramUniform2ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value);
+GL_APICALL void GL_APIENTRY glProgramUniform3ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value);
+GL_APICALL void GL_APIENTRY glProgramUniform4ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value);
+GL_APICALL void GL_APIENTRY glProgramUniform1fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value);
+GL_APICALL void GL_APIENTRY glProgramUniform2fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value);
+GL_APICALL void GL_APIENTRY glProgramUniform3fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value);
+GL_APICALL void GL_APIENTRY glProgramUniform4fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value);
+GL_APICALL void GL_APIENTRY glProgramUniformMatrix2fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GL_APICALL void GL_APIENTRY glProgramUniformMatrix3fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GL_APICALL void GL_APIENTRY glProgramUniformMatrix4fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GL_APICALL void GL_APIENTRY glValidateProgramPipelineEXT (GLuint pipeline);
+GL_APICALL void GL_APIENTRY glGetProgramPipelineInfoLogEXT (GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
+#endif
+typedef void (GL_APIENTRYP PFNGLUSEPROGRAMSTAGESEXTPROC) (GLuint pipeline, GLbitfield stages, GLuint program);
+typedef void (GL_APIENTRYP PFNGLACTIVESHADERPROGRAMEXTPROC) (GLuint pipeline, GLuint program);
+typedef GLuint (GL_APIENTRYP PFNGLCREATESHADERPROGRAMVEXTPROC) (GLenum type, GLsizei count, const GLchar **strings);
+typedef void (GL_APIENTRYP PFNGLBINDPROGRAMPIPELINEEXTPROC) (GLuint pipeline);
+typedef void (GL_APIENTRYP PFNGLDELETEPROGRAMPIPELINESEXTPROC) (GLsizei n, const GLuint *pipelines);
+typedef void (GL_APIENTRYP PFNGLGENPROGRAMPIPELINESEXTPROC) (GLsizei n, GLuint *pipelines);
+typedef GLboolean (GL_APIENTRYP PFNGLISPROGRAMPIPELINEEXTPROC) (GLuint pipeline);
+typedef void (GL_APIENTRYP PFNGLPROGRAMPARAMETERIEXTPROC) (GLuint program, GLenum pname, GLint value);
+typedef void (GL_APIENTRYP PFNGLGETPROGRAMPIPELINEIVEXTPROC) (GLuint pipeline, GLenum pname, GLint *params);
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1IEXTPROC) (GLuint program, GLint location, GLint x);
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2IEXTPROC) (GLuint program, GLint location, GLint x, GLint y);
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3IEXTPROC) (GLuint program, GLint location, GLint x, GLint y, GLint z);
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4IEXTPROC) (GLuint program, GLint location, GLint x, GLint y, GLint z, GLint w);
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1FEXTPROC) (GLuint program, GLint location, GLfloat x);
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2FEXTPROC) (GLuint program, GLint location, GLfloat x, GLfloat y);
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3FEXTPROC) (GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z);
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4FEXTPROC) (GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+typedef void (GL_APIENTRYP PFNGLVALIDATEPROGRAMPIPELINEEXTPROC) (GLuint pipeline);
+typedef void (GL_APIENTRYP PFNGLGETPROGRAMPIPELINEINFOLOGEXTPROC) (GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
+#endif
+
+/* GL_EXT_shader_framebuffer_fetch */
+#ifndef GL_EXT_shader_framebuffer_fetch
+#define GL_EXT_shader_framebuffer_fetch 1
+#endif
+
+/* GL_EXT_shader_texture_lod */
+#ifndef GL_EXT_shader_texture_lod
+#define GL_EXT_shader_texture_lod 1
+#endif
+
+/* GL_EXT_shadow_samplers */
+#ifndef GL_EXT_shadow_samplers
+#define GL_EXT_shadow_samplers 1
+#endif
+
+/* GL_EXT_sRGB */
+#ifndef GL_EXT_sRGB
+#define GL_EXT_sRGB 1
+#endif
+
+/* GL_EXT_texture_compression_dxt1 */
+#ifndef GL_EXT_texture_compression_dxt1
+#define GL_EXT_texture_compression_dxt1 1
+#endif
+
+/* GL_EXT_texture_filter_anisotropic */
+#ifndef GL_EXT_texture_filter_anisotropic
+#define GL_EXT_texture_filter_anisotropic 1
+#endif
+
+/* GL_EXT_texture_format_BGRA8888 */
+#ifndef GL_EXT_texture_format_BGRA8888
+#define GL_EXT_texture_format_BGRA8888 1
+#endif
+
+/* GL_EXT_texture_rg */
+#ifndef GL_EXT_texture_rg
+#define GL_EXT_texture_rg 1
+#endif
+
+/* GL_EXT_texture_storage */
+#ifndef GL_EXT_texture_storage
+#define GL_EXT_texture_storage 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glTexStorage1DEXT (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
+GL_APICALL void GL_APIENTRY glTexStorage2DEXT (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
+GL_APICALL void GL_APIENTRY glTexStorage3DEXT (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
+GL_APICALL void GL_APIENTRY glTextureStorage1DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
+GL_APICALL void GL_APIENTRY glTextureStorage2DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
+GL_APICALL void GL_APIENTRY glTextureStorage3DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
+#endif
+typedef void (GL_APIENTRYP PFNGLTEXSTORAGE1DEXTPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
+typedef void (GL_APIENTRYP PFNGLTEXSTORAGE2DEXTPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
+typedef void (GL_APIENTRYP PFNGLTEXSTORAGE3DEXTPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
+typedef void (GL_APIENTRYP PFNGLTEXTURESTORAGE1DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
+typedef void (GL_APIENTRYP PFNGLTEXTURESTORAGE2DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
+typedef void (GL_APIENTRYP PFNGLTEXTURESTORAGE3DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
+#endif
+
+/* GL_EXT_texture_type_2_10_10_10_REV */
+#ifndef GL_EXT_texture_type_2_10_10_10_REV
+#define GL_EXT_texture_type_2_10_10_10_REV 1
+#endif
+
+/* GL_EXT_unpack_subimage */
+#ifndef GL_EXT_unpack_subimage
+#define GL_EXT_unpack_subimage 1
+#endif
+
+/*------------------------------------------------------------------------*
+ * DMP extension functions
+ *------------------------------------------------------------------------*/
+
+/* GL_DMP_shader_binary */
+#ifndef GL_DMP_shader_binary
+#define GL_DMP_shader_binary 1
+#endif
+
+/*------------------------------------------------------------------------*
+ * FJ extension functions
+ *------------------------------------------------------------------------*/
+
+/* GL_FJ_shader_binary_GCCSO */
+#ifndef GL_FJ_shader_binary_GCCSO
+#define GL_FJ_shader_binary_GCCSO 1
+#endif
+
+/*------------------------------------------------------------------------*
+ * IMG extension functions
+ *------------------------------------------------------------------------*/
+
+/* GL_IMG_program_binary */
+#ifndef GL_IMG_program_binary
+#define GL_IMG_program_binary 1
+#endif
+
+/* GL_IMG_read_format */
+#ifndef GL_IMG_read_format
+#define GL_IMG_read_format 1
+#endif
+
+/* GL_IMG_shader_binary */
+#ifndef GL_IMG_shader_binary
+#define GL_IMG_shader_binary 1
+#endif
+
+/* GL_IMG_texture_compression_pvrtc */
+#ifndef GL_IMG_texture_compression_pvrtc
+#define GL_IMG_texture_compression_pvrtc 1
+#endif
+
+/* GL_IMG_multisampled_render_to_texture */
+#ifndef GL_IMG_multisampled_render_to_texture
+#define GL_IMG_multisampled_render_to_texture 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleIMG (GLenum, GLsizei, GLenum, GLsizei, GLsizei);
+GL_APICALL void GL_APIENTRY glFramebufferTexture2DMultisampleIMG (GLenum, GLenum, GLenum, GLuint, GLint, GLsizei);
+#endif
+typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEIMGPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
+typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DMULTISAMPLEIMGPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples);
+#endif
+
+/*------------------------------------------------------------------------*
+ * NV extension functions
+ *------------------------------------------------------------------------*/
+
+/* GL_NV_coverage_sample */
+#ifndef GL_NV_coverage_sample
+#define GL_NV_coverage_sample 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glCoverageMaskNV (GLboolean mask);
+GL_APICALL void GL_APIENTRY glCoverageOperationNV (GLenum operation);
+#endif
+typedef void (GL_APIENTRYP PFNGLCOVERAGEMASKNVPROC) (GLboolean mask);
+typedef void (GL_APIENTRYP PFNGLCOVERAGEOPERATIONNVPROC) (GLenum operation);
+#endif
+
+/* GL_NV_depth_nonlinear */
+#ifndef GL_NV_depth_nonlinear
+#define GL_NV_depth_nonlinear 1
+#endif
+
+/* GL_NV_draw_buffers */
+#ifndef GL_NV_draw_buffers
+#define GL_NV_draw_buffers 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glDrawBuffersNV (GLsizei n, const GLenum *bufs);
+#endif
+typedef void (GL_APIENTRYP PFNGLDRAWBUFFERSNVPROC) (GLsizei n, const GLenum *bufs);
+#endif
+
+/* GL_NV_fbo_color_attachments */
+#ifndef GL_NV_fbo_color_attachments
+#define GL_NV_fbo_color_attachments 1
+#endif
+
+/* GL_NV_fence */
+#ifndef GL_NV_fence
+#define GL_NV_fence 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glDeleteFencesNV (GLsizei, const GLuint *);
+GL_APICALL void GL_APIENTRY glGenFencesNV (GLsizei, GLuint *);
+GL_APICALL GLboolean GL_APIENTRY glIsFenceNV (GLuint);
+GL_APICALL GLboolean GL_APIENTRY glTestFenceNV (GLuint);
+GL_APICALL void GL_APIENTRY glGetFenceivNV (GLuint, GLenum, GLint *);
+GL_APICALL void GL_APIENTRY glFinishFenceNV (GLuint);
+GL_APICALL void GL_APIENTRY glSetFenceNV (GLuint, GLenum);
+#endif
+typedef void (GL_APIENTRYP PFNGLDELETEFENCESNVPROC) (GLsizei n, const GLuint *fences);
+typedef void (GL_APIENTRYP PFNGLGENFENCESNVPROC) (GLsizei n, GLuint *fences);
+typedef GLboolean (GL_APIENTRYP PFNGLISFENCENVPROC) (GLuint fence);
+typedef GLboolean (GL_APIENTRYP PFNGLTESTFENCENVPROC) (GLuint fence);
+typedef void (GL_APIENTRYP PFNGLGETFENCEIVNVPROC) (GLuint fence, GLenum pname, GLint *params);
+typedef void (GL_APIENTRYP PFNGLFINISHFENCENVPROC) (GLuint fence);
+typedef void (GL_APIENTRYP PFNGLSETFENCENVPROC) (GLuint fence, GLenum condition);
+#endif
+
+/* GL_NV_read_buffer */
+#ifndef GL_NV_read_buffer
+#define GL_NV_read_buffer 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glReadBufferNV (GLenum mode);
+#endif
+typedef void (GL_APIENTRYP PFNGLREADBUFFERNVPROC) (GLenum mode);
+#endif
+
+/* GL_NV_read_buffer_front */
+#ifndef GL_NV_read_buffer_front
+#define GL_NV_read_buffer_front 1
+#endif
+
+/* GL_NV_read_depth */
+#ifndef GL_NV_read_depth
+#define GL_NV_read_depth 1
+#endif
+
+/* GL_NV_read_depth_stencil */
+#ifndef GL_NV_read_depth_stencil
+#define GL_NV_read_depth_stencil 1
+#endif
+
+/* GL_NV_read_stencil */
+#ifndef GL_NV_read_stencil
+#define GL_NV_read_stencil 1
+#endif
+
+/* GL_NV_texture_compression_s3tc_update */
+#ifndef GL_NV_texture_compression_s3tc_update
+#define GL_NV_texture_compression_s3tc_update 1
+#endif
+
+/* GL_NV_texture_npot_2D_mipmap */
+#ifndef GL_NV_texture_npot_2D_mipmap
+#define GL_NV_texture_npot_2D_mipmap 1
+#endif
+
+/*------------------------------------------------------------------------*
+ * QCOM extension functions
+ *------------------------------------------------------------------------*/
+
+/* GL_QCOM_alpha_test */
+#ifndef GL_QCOM_alpha_test
+#define GL_QCOM_alpha_test 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glAlphaFuncQCOM (GLenum func, GLclampf ref);
+#endif
+typedef void (GL_APIENTRYP PFNGLALPHAFUNCQCOMPROC) (GLenum func, GLclampf ref);
+#endif
+
+/* GL_QCOM_binning_control */
+#ifndef GL_QCOM_binning_control
+#define GL_QCOM_binning_control 1
+#endif
+
+/* GL_QCOM_driver_control */
+#ifndef GL_QCOM_driver_control
+#define GL_QCOM_driver_control 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glGetDriverControlsQCOM (GLint *num, GLsizei size, GLuint *driverControls);
+GL_APICALL void GL_APIENTRY glGetDriverControlStringQCOM (GLuint driverControl, GLsizei bufSize, GLsizei *length, GLchar *driverControlString);
+GL_APICALL void GL_APIENTRY glEnableDriverControlQCOM (GLuint driverControl);
+GL_APICALL void GL_APIENTRY glDisableDriverControlQCOM (GLuint driverControl);
+#endif
+typedef void (GL_APIENTRYP PFNGLGETDRIVERCONTROLSQCOMPROC) (GLint *num, GLsizei size, GLuint *driverControls);
+typedef void (GL_APIENTRYP PFNGLGETDRIVERCONTROLSTRINGQCOMPROC) (GLuint driverControl, GLsizei bufSize, GLsizei *length, GLchar *driverControlString);
+typedef void (GL_APIENTRYP PFNGLENABLEDRIVERCONTROLQCOMPROC) (GLuint driverControl);
+typedef void (GL_APIENTRYP PFNGLDISABLEDRIVERCONTROLQCOMPROC) (GLuint driverControl);
+#endif
+
+/* GL_QCOM_extended_get */
+#ifndef GL_QCOM_extended_get
+#define GL_QCOM_extended_get 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glExtGetTexturesQCOM (GLuint *textures, GLint maxTextures, GLint *numTextures);
+GL_APICALL void GL_APIENTRY glExtGetBuffersQCOM (GLuint *buffers, GLint maxBuffers, GLint *numBuffers);
+GL_APICALL void GL_APIENTRY glExtGetRenderbuffersQCOM (GLuint *renderbuffers, GLint maxRenderbuffers, GLint *numRenderbuffers);
+GL_APICALL void GL_APIENTRY glExtGetFramebuffersQCOM (GLuint *framebuffers, GLint maxFramebuffers, GLint *numFramebuffers);
+GL_APICALL void GL_APIENTRY glExtGetTexLevelParameterivQCOM (GLuint texture, GLenum face, GLint level, GLenum pname, GLint *params);
+GL_APICALL void GL_APIENTRY glExtTexObjectStateOverrideiQCOM (GLenum target, GLenum pname, GLint param);
+GL_APICALL void GL_APIENTRY glExtGetTexSubImageQCOM (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLvoid *texels);
+GL_APICALL void GL_APIENTRY glExtGetBufferPointervQCOM (GLenum target, GLvoid **params);
+#endif
+typedef void (GL_APIENTRYP PFNGLEXTGETTEXTURESQCOMPROC) (GLuint *textures, GLint maxTextures, GLint *numTextures);
+typedef void (GL_APIENTRYP PFNGLEXTGETBUFFERSQCOMPROC) (GLuint *buffers, GLint maxBuffers, GLint *numBuffers);
+typedef void (GL_APIENTRYP PFNGLEXTGETRENDERBUFFERSQCOMPROC) (GLuint *renderbuffers, GLint maxRenderbuffers, GLint *numRenderbuffers);
+typedef void (GL_APIENTRYP PFNGLEXTGETFRAMEBUFFERSQCOMPROC) (GLuint *framebuffers, GLint maxFramebuffers, GLint *numFramebuffers);
+typedef void (GL_APIENTRYP PFNGLEXTGETTEXLEVELPARAMETERIVQCOMPROC) (GLuint texture, GLenum face, GLint level, GLenum pname, GLint *params);
+typedef void (GL_APIENTRYP PFNGLEXTTEXOBJECTSTATEOVERRIDEIQCOMPROC) (GLenum target, GLenum pname, GLint param);
+typedef void (GL_APIENTRYP PFNGLEXTGETTEXSUBIMAGEQCOMPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLvoid *texels);
+typedef void (GL_APIENTRYP PFNGLEXTGETBUFFERPOINTERVQCOMPROC) (GLenum target, GLvoid **params);
+#endif
+
+/* GL_QCOM_extended_get2 */
+#ifndef GL_QCOM_extended_get2
+#define GL_QCOM_extended_get2 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glExtGetShadersQCOM (GLuint *shaders, GLint maxShaders, GLint *numShaders);
+GL_APICALL void GL_APIENTRY glExtGetProgramsQCOM (GLuint *programs, GLint maxPrograms, GLint *numPrograms);
+GL_APICALL GLboolean GL_APIENTRY glExtIsProgramBinaryQCOM (GLuint program);
+GL_APICALL void GL_APIENTRY glExtGetProgramBinarySourceQCOM (GLuint program, GLenum shadertype, GLchar *source, GLint *length);
+#endif
+typedef void (GL_APIENTRYP PFNGLEXTGETSHADERSQCOMPROC) (GLuint *shaders, GLint maxShaders, GLint *numShaders);
+typedef void (GL_APIENTRYP PFNGLEXTGETPROGRAMSQCOMPROC) (GLuint *programs, GLint maxPrograms, GLint *numPrograms);
+typedef GLboolean (GL_APIENTRYP PFNGLEXTISPROGRAMBINARYQCOMPROC) (GLuint program);
+typedef void (GL_APIENTRYP PFNGLEXTGETPROGRAMBINARYSOURCEQCOMPROC) (GLuint program, GLenum shadertype, GLchar *source, GLint *length);
+#endif
+
+/* GL_QCOM_perfmon_global_mode */
+#ifndef GL_QCOM_perfmon_global_mode
+#define GL_QCOM_perfmon_global_mode 1
+#endif
+
+/* GL_QCOM_writeonly_rendering */
+#ifndef GL_QCOM_writeonly_rendering
+#define GL_QCOM_writeonly_rendering 1
+#endif
+
+/* GL_QCOM_tiled_rendering */
+#ifndef GL_QCOM_tiled_rendering
+#define GL_QCOM_tiled_rendering 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glStartTilingQCOM (GLuint x, GLuint y, GLuint width, GLuint height, GLbitfield preserveMask);
+GL_APICALL void GL_APIENTRY glEndTilingQCOM (GLbitfield preserveMask);
+#endif
+typedef void (GL_APIENTRYP PFNGLSTARTTILINGQCOMPROC) (GLuint x, GLuint y, GLuint width, GLuint height, GLbitfield preserveMask);
+typedef void (GL_APIENTRYP PFNGLENDTILINGQCOMPROC) (GLbitfield preserveMask);
+#endif
+
+/*------------------------------------------------------------------------*
+ * VIV extension tokens
+ *------------------------------------------------------------------------*/
+
+/* GL_VIV_shader_binary */
+#ifndef GL_VIV_shader_binary
+#define GL_VIV_shader_binary 1
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __gl2ext_h_ */
+
+#endif /* _MSC_VER */
+
+#ifndef APIENTRY
+#define APIENTRY GL_APIENTRY
+#endif
diff --git a/include/SDL2/SDL_pixels.h b/include/SDL2/SDL_pixels.h
new file mode 100644 (file)
index 0000000..3131af7
--- /dev/null
@@ -0,0 +1,429 @@
+/*
+  Simple DirectMedia Layer
+  Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
+
+  This software is provided 'as-is', without any express or implied
+  warranty.  In no event will the authors be held liable for any damages
+  arising from the use of this software.
+
+  Permission is granted to anyone to use this software for any purpose,
+  including commercial applications, and to alter it and redistribute it
+  freely, subject to the following restrictions:
+
+  1. The origin of this software must not be misrepresented; you must not
+     claim that you wrote the original software. If you use this software
+     in a product, an acknowledgment in the product documentation would be
+     appreciated but is not required.
+  2. Altered source versions must be plainly marked as such, and must not be
+     misrepresented as being the original software.
+  3. This notice may not be removed or altered from any source distribution.
+*/
+
+/**
+ *  \file SDL_pixels.h
+ *
+ *  Header for the enumerated pixel format definitions.
+ */
+
+#ifndef _SDL_pixels_h
+#define _SDL_pixels_h
+
+#include "SDL_stdinc.h"
+
+#include "begin_code.h"
+/* Set up for C function definitions, even when using C++ */
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ *  \name Transparency definitions
+ *
+ *  These define alpha as the opacity of a surface.
+ */
+/* @{ */
+#define SDL_ALPHA_OPAQUE 255
+#define SDL_ALPHA_TRANSPARENT 0
+/* @} */
+
+/** Pixel type. */
+enum
+{
+    SDL_PIXELTYPE_UNKNOWN,
+    SDL_PIXELTYPE_INDEX1,
+    SDL_PIXELTYPE_INDEX4,
+    SDL_PIXELTYPE_INDEX8,
+    SDL_PIXELTYPE_PACKED8,
+    SDL_PIXELTYPE_PACKED16,
+    SDL_PIXELTYPE_PACKED32,
+    SDL_PIXELTYPE_ARRAYU8,
+    SDL_PIXELTYPE_ARRAYU16,
+    SDL_PIXELTYPE_ARRAYU32,
+    SDL_PIXELTYPE_ARRAYF16,
+    SDL_PIXELTYPE_ARRAYF32
+};
+
+/** Bitmap pixel order, high bit -> low bit. */
+enum
+{
+    SDL_BITMAPORDER_NONE,
+    SDL_BITMAPORDER_4321,
+    SDL_BITMAPORDER_1234
+};
+
+/** Packed component order, high bit -> low bit. */
+enum
+{
+    SDL_PACKEDORDER_NONE,
+    SDL_PACKEDORDER_XRGB,
+    SDL_PACKEDORDER_RGBX,
+    SDL_PACKEDORDER_ARGB,
+    SDL_PACKEDORDER_RGBA,
+    SDL_PACKEDORDER_XBGR,
+    SDL_PACKEDORDER_BGRX,
+    SDL_PACKEDORDER_ABGR,
+    SDL_PACKEDORDER_BGRA
+};
+
+/** Array component order, low byte -> high byte. */
+enum
+{
+    SDL_ARRAYORDER_NONE,
+    SDL_ARRAYORDER_RGB,
+    SDL_ARRAYORDER_RGBA,
+    SDL_ARRAYORDER_ARGB,
+    SDL_ARRAYORDER_BGR,
+    SDL_ARRAYORDER_BGRA,
+    SDL_ARRAYORDER_ABGR
+};
+
+/** Packed component layout. */
+enum
+{
+    SDL_PACKEDLAYOUT_NONE,
+    SDL_PACKEDLAYOUT_332,
+    SDL_PACKEDLAYOUT_4444,
+    SDL_PACKEDLAYOUT_1555,
+    SDL_PACKEDLAYOUT_5551,
+    SDL_PACKEDLAYOUT_565,
+    SDL_PACKEDLAYOUT_8888,
+    SDL_PACKEDLAYOUT_2101010,
+    SDL_PACKEDLAYOUT_1010102
+};
+
+#define SDL_DEFINE_PIXELFOURCC(A, B, C, D) SDL_FOURCC(A, B, C, D)
+
+#define SDL_DEFINE_PIXELFORMAT(type, order, layout, bits, bytes) \
+    ((1 << 28) | ((type) << 24) | ((order) << 20) | ((layout) << 16) | \
+     ((bits) << 8) | ((bytes) << 0))
+
+#define SDL_PIXELFLAG(X)    (((X) >> 28) & 0x0F)
+#define SDL_PIXELTYPE(X)    (((X) >> 24) & 0x0F)
+#define SDL_PIXELORDER(X)   (((X) >> 20) & 0x0F)
+#define SDL_PIXELLAYOUT(X)  (((X) >> 16) & 0x0F)
+#define SDL_BITSPERPIXEL(X) (((X) >> 8) & 0xFF)
+#define SDL_BYTESPERPIXEL(X) \
+    (SDL_ISPIXELFORMAT_FOURCC(X) ? \
+        ((((X) == SDL_PIXELFORMAT_YUY2) || \
+          ((X) == SDL_PIXELFORMAT_UYVY) || \
+          ((X) == SDL_PIXELFORMAT_YVYU)) ? 2 : 1) : (((X) >> 0) & 0xFF))
+
+#define SDL_ISPIXELFORMAT_INDEXED(format)   \
+    (!SDL_ISPIXELFORMAT_FOURCC(format) && \
+     ((SDL_PIXELTYPE(format) == SDL_PIXELTYPE_INDEX1) || \
+      (SDL_PIXELTYPE(format) == SDL_PIXELTYPE_INDEX4) || \
+      (SDL_PIXELTYPE(format) == SDL_PIXELTYPE_INDEX8)))
+
+#define SDL_ISPIXELFORMAT_ALPHA(format)   \
+    (!SDL_ISPIXELFORMAT_FOURCC(format) && \
+     ((SDL_PIXELORDER(format) == SDL_PACKEDORDER_ARGB) || \
+      (SDL_PIXELORDER(format) == SDL_PACKEDORDER_RGBA) || \
+      (SDL_PIXELORDER(format) == SDL_PACKEDORDER_ABGR) || \
+      (SDL_PIXELORDER(format) == SDL_PACKEDORDER_BGRA)))
+
+/* The flag is set to 1 because 0x1? is not in the printable ASCII range */
+#define SDL_ISPIXELFORMAT_FOURCC(format)    \
+    ((format) && (SDL_PIXELFLAG(format) != 1))
+
+/* Note: If you modify this list, update SDL_GetPixelFormatName() */
+enum
+{
+    SDL_PIXELFORMAT_UNKNOWN,
+    SDL_PIXELFORMAT_INDEX1LSB =
+        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_INDEX1, SDL_BITMAPORDER_4321, 0,
+                               1, 0),
+    SDL_PIXELFORMAT_INDEX1MSB =
+        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_INDEX1, SDL_BITMAPORDER_1234, 0,
+                               1, 0),
+    SDL_PIXELFORMAT_INDEX4LSB =
+        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_INDEX4, SDL_BITMAPORDER_4321, 0,
+                               4, 0),
+    SDL_PIXELFORMAT_INDEX4MSB =
+        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_INDEX4, SDL_BITMAPORDER_1234, 0,
+                               4, 0),
+    SDL_PIXELFORMAT_INDEX8 =
+        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_INDEX8, 0, 0, 8, 1),
+    SDL_PIXELFORMAT_RGB332 =
+        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED8, SDL_PACKEDORDER_XRGB,
+                               SDL_PACKEDLAYOUT_332, 8, 1),
+    SDL_PIXELFORMAT_RGB444 =
+        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_XRGB,
+                               SDL_PACKEDLAYOUT_4444, 12, 2),
+    SDL_PIXELFORMAT_RGB555 =
+        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_XRGB,
+                               SDL_PACKEDLAYOUT_1555, 15, 2),
+    SDL_PIXELFORMAT_BGR555 =
+        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_XBGR,
+                               SDL_PACKEDLAYOUT_1555, 15, 2),
+    SDL_PIXELFORMAT_ARGB4444 =
+        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_ARGB,
+                               SDL_PACKEDLAYOUT_4444, 16, 2),
+    SDL_PIXELFORMAT_RGBA4444 =
+        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_RGBA,
+                               SDL_PACKEDLAYOUT_4444, 16, 2),
+    SDL_PIXELFORMAT_ABGR4444 =
+        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_ABGR,
+                               SDL_PACKEDLAYOUT_4444, 16, 2),
+    SDL_PIXELFORMAT_BGRA4444 =
+        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_BGRA,
+                               SDL_PACKEDLAYOUT_4444, 16, 2),
+    SDL_PIXELFORMAT_ARGB1555 =
+        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_ARGB,
+                               SDL_PACKEDLAYOUT_1555, 16, 2),
+    SDL_PIXELFORMAT_RGBA5551 =
+        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_RGBA,
+                               SDL_PACKEDLAYOUT_5551, 16, 2),
+    SDL_PIXELFORMAT_ABGR1555 =
+        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_ABGR,
+                               SDL_PACKEDLAYOUT_1555, 16, 2),
+    SDL_PIXELFORMAT_BGRA5551 =
+        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_BGRA,
+                               SDL_PACKEDLAYOUT_5551, 16, 2),
+    SDL_PIXELFORMAT_RGB565 =
+        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_XRGB,
+                               SDL_PACKEDLAYOUT_565, 16, 2),
+    SDL_PIXELFORMAT_BGR565 =
+        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_XBGR,
+                               SDL_PACKEDLAYOUT_565, 16, 2),
+    SDL_PIXELFORMAT_RGB24 =
+        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_ARRAYU8, SDL_ARRAYORDER_RGB, 0,
+                               24, 3),
+    SDL_PIXELFORMAT_BGR24 =
+        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_ARRAYU8, SDL_ARRAYORDER_BGR, 0,
+                               24, 3),
+    SDL_PIXELFORMAT_RGB888 =
+        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_XRGB,
+                               SDL_PACKEDLAYOUT_8888, 24, 4),
+    SDL_PIXELFORMAT_RGBX8888 =
+        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_RGBX,
+                               SDL_PACKEDLAYOUT_8888, 24, 4),
+    SDL_PIXELFORMAT_BGR888 =
+        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_XBGR,
+                               SDL_PACKEDLAYOUT_8888, 24, 4),
+    SDL_PIXELFORMAT_BGRX8888 =
+        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_BGRX,
+                               SDL_PACKEDLAYOUT_8888, 24, 4),
+    SDL_PIXELFORMAT_ARGB8888 =
+        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_ARGB,
+                               SDL_PACKEDLAYOUT_8888, 32, 4),
+    SDL_PIXELFORMAT_RGBA8888 =
+        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_RGBA,
+                               SDL_PACKEDLAYOUT_8888, 32, 4),
+    SDL_PIXELFORMAT_ABGR8888 =
+        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_ABGR,
+                               SDL_PACKEDLAYOUT_8888, 32, 4),
+    SDL_PIXELFORMAT_BGRA8888 =
+        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_BGRA,
+                               SDL_PACKEDLAYOUT_8888, 32, 4),
+    SDL_PIXELFORMAT_ARGB2101010 =
+        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_ARGB,
+                               SDL_PACKEDLAYOUT_2101010, 32, 4),
+
+    SDL_PIXELFORMAT_YV12 =      /**< Planar mode: Y + V + U  (3 planes) */
+        SDL_DEFINE_PIXELFOURCC('Y', 'V', '1', '2'),
+    SDL_PIXELFORMAT_IYUV =      /**< Planar mode: Y + U + V  (3 planes) */
+        SDL_DEFINE_PIXELFOURCC('I', 'Y', 'U', 'V'),
+    SDL_PIXELFORMAT_YUY2 =      /**< Packed mode: Y0+U0+Y1+V0 (1 plane) */
+        SDL_DEFINE_PIXELFOURCC('Y', 'U', 'Y', '2'),
+    SDL_PIXELFORMAT_UYVY =      /**< Packed mode: U0+Y0+V0+Y1 (1 plane) */
+        SDL_DEFINE_PIXELFOURCC('U', 'Y', 'V', 'Y'),
+    SDL_PIXELFORMAT_YVYU =      /**< Packed mode: Y0+V0+Y1+U0 (1 plane) */
+        SDL_DEFINE_PIXELFOURCC('Y', 'V', 'Y', 'U')
+};
+
+typedef struct SDL_Color
+{
+    Uint8 r;
+    Uint8 g;
+    Uint8 b;
+    Uint8 a;
+} SDL_Color;
+#define SDL_Colour SDL_Color
+
+typedef struct SDL_Palette
+{
+    int ncolors;
+    SDL_Color *colors;
+    Uint32 version;
+    int refcount;
+} SDL_Palette;
+
+/**
+ *  \note Everything in the pixel format structure is read-only.
+ */
+typedef struct SDL_PixelFormat
+{
+    Uint32 format;
+    SDL_Palette *palette;
+    Uint8 BitsPerPixel;
+    Uint8 BytesPerPixel;
+    Uint8 padding[2];
+    Uint32 Rmask;
+    Uint32 Gmask;
+    Uint32 Bmask;
+    Uint32 Amask;
+    Uint8 Rloss;
+    Uint8 Gloss;
+    Uint8 Bloss;
+    Uint8 Aloss;
+    Uint8 Rshift;
+    Uint8 Gshift;
+    Uint8 Bshift;
+    Uint8 Ashift;
+    int refcount;
+    struct SDL_PixelFormat *next;
+} SDL_PixelFormat;
+
+/**
+ * \brief Get the human readable name of a pixel format
+ */
+extern DECLSPEC const char* SDLCALL SDL_GetPixelFormatName(Uint32 format);
+
+/**
+ *  \brief Convert one of the enumerated pixel formats to a bpp and RGBA masks.
+ *
+ *  \return SDL_TRUE, or SDL_FALSE if the conversion wasn't possible.
+ *
+ *  \sa SDL_MasksToPixelFormatEnum()
+ */
+extern DECLSPEC SDL_bool SDLCALL SDL_PixelFormatEnumToMasks(Uint32 format,
+                                                            int *bpp,
+                                                            Uint32 * Rmask,
+                                                            Uint32 * Gmask,
+                                                            Uint32 * Bmask,
+                                                            Uint32 * Amask);
+
+/**
+ *  \brief Convert a bpp and RGBA masks to an enumerated pixel format.
+ *
+ *  \return The pixel format, or ::SDL_PIXELFORMAT_UNKNOWN if the conversion
+ *          wasn't possible.
+ *
+ *  \sa SDL_PixelFormatEnumToMasks()
+ */
+extern DECLSPEC Uint32 SDLCALL SDL_MasksToPixelFormatEnum(int bpp,
+                                                          Uint32 Rmask,
+                                                          Uint32 Gmask,
+                                                          Uint32 Bmask,
+                                                          Uint32 Amask);
+
+/**
+ *  \brief Create an SDL_PixelFormat structure from a pixel format enum.
+ */
+extern DECLSPEC SDL_PixelFormat * SDLCALL SDL_AllocFormat(Uint32 pixel_format);
+
+/**
+ *  \brief Free an SDL_PixelFormat structure.
+ */
+extern DECLSPEC void SDLCALL SDL_FreeFormat(SDL_PixelFormat *format);
+
+/**
+ *  \brief Create a palette structure with the specified number of color
+ *         entries.
+ *
+ *  \return A new palette, or NULL if there wasn't enough memory.
+ *
+ *  \note The palette entries are initialized to white.
+ *
+ *  \sa SDL_FreePalette()
+ */
+extern DECLSPEC SDL_Palette *SDLCALL SDL_AllocPalette(int ncolors);
+
+/**
+ *  \brief Set the palette for a pixel format structure.
+ */
+extern DECLSPEC int SDLCALL SDL_SetPixelFormatPalette(SDL_PixelFormat * format,
+                                                      SDL_Palette *palette);
+
+/**
+ *  \brief Set a range of colors in a palette.
+ *
+ *  \param palette    The palette to modify.
+ *  \param colors     An array of colors to copy into the palette.
+ *  \param firstcolor The index of the first palette entry to modify.
+ *  \param ncolors    The number of entries to modify.
+ *
+ *  \return 0 on success, or -1 if not all of the colors could be set.
+ */
+extern DECLSPEC int SDLCALL SDL_SetPaletteColors(SDL_Palette * palette,
+                                                 const SDL_Color * colors,
+                                                 int firstcolor, int ncolors);
+
+/**
+ *  \brief Free a palette created with SDL_AllocPalette().
+ *
+ *  \sa SDL_AllocPalette()
+ */
+extern DECLSPEC void SDLCALL SDL_FreePalette(SDL_Palette * palette);
+
+/**
+ *  \brief Maps an RGB triple to an opaque pixel value for a given pixel format.
+ *
+ *  \sa SDL_MapRGBA
+ */
+extern DECLSPEC Uint32 SDLCALL SDL_MapRGB(const SDL_PixelFormat * format,
+                                          Uint8 r, Uint8 g, Uint8 b);
+
+/**
+ *  \brief Maps an RGBA quadruple to a pixel value for a given pixel format.
+ *
+ *  \sa SDL_MapRGB
+ */
+extern DECLSPEC Uint32 SDLCALL SDL_MapRGBA(const SDL_PixelFormat * format,
+                                           Uint8 r, Uint8 g, Uint8 b,
+                                           Uint8 a);
+
+/**
+ *  \brief Get the RGB components from a pixel of the specified format.
+ *
+ *  \sa SDL_GetRGBA
+ */
+extern DECLSPEC void SDLCALL SDL_GetRGB(Uint32 pixel,
+                                        const SDL_PixelFormat * format,
+                                        Uint8 * r, Uint8 * g, Uint8 * b);
+
+/**
+ *  \brief Get the RGBA components from a pixel of the specified format.
+ *
+ *  \sa SDL_GetRGB
+ */
+extern DECLSPEC void SDLCALL SDL_GetRGBA(Uint32 pixel,
+                                         const SDL_PixelFormat * format,
+                                         Uint8 * r, Uint8 * g, Uint8 * b,
+                                         Uint8 * a);
+
+/**
+ *  \brief Calculate a 256 entry gamma ramp for a gamma value.
+ */
+extern DECLSPEC void SDLCALL SDL_CalculateGammaRamp(float gamma, Uint16 * ramp);
+
+
+/* Ends C function definitions when using C++ */
+#ifdef __cplusplus
+}
+#endif
+#include "close_code.h"
+
+#endif /* _SDL_pixels_h */
+
+/* vi: set ts=4 sw=4 expandtab: */
diff --git a/include/SDL2/SDL_platform.h b/include/SDL2/SDL_platform.h
new file mode 100644 (file)
index 0000000..c43f4b5
--- /dev/null
@@ -0,0 +1,164 @@
+/*
+  Simple DirectMedia Layer
+  Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
+
+  This software is provided 'as-is', without any express or implied
+  warranty.  In no event will the authors be held liable for any damages
+  arising from the use of this software.
+
+  Permission is granted to anyone to use this software for any purpose,
+  including commercial applications, and to alter it and redistribute it
+  freely, subject to the following restrictions:
+
+  1. The origin of this software must not be misrepresented; you must not
+     claim that you wrote the original software. If you use this software
+     in a product, an acknowledgment in the product documentation would be
+     appreciated but is not required.
+  2. Altered source versions must be plainly marked as such, and must not be
+     misrepresented as being the original software.
+  3. This notice may not be removed or altered from any source distribution.
+*/
+
+/**
+ *  \file SDL_platform.h
+ *
+ *  Try to get a standard set of platform defines.
+ */
+
+#ifndef _SDL_platform_h
+#define _SDL_platform_h
+
+#if defined(_AIX)
+#undef __AIX__
+#define __AIX__     1
+#endif
+#if defined(__HAIKU__)
+#undef __HAIKU__
+#define __HAIKU__   1
+#endif
+#if defined(bsdi) || defined(__bsdi) || defined(__bsdi__)
+#undef __BSDI__
+#define __BSDI__    1
+#endif
+#if defined(_arch_dreamcast)
+#undef __DREAMCAST__
+#define __DREAMCAST__   1
+#endif
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
+#undef __FREEBSD__
+#define __FREEBSD__ 1
+#endif
+#if defined(hpux) || defined(__hpux) || defined(__hpux__)
+#undef __HPUX__
+#define __HPUX__    1
+#endif
+#if defined(sgi) || defined(__sgi) || defined(__sgi__) || defined(_SGI_SOURCE)
+#undef __IRIX__
+#define __IRIX__    1
+#endif
+#if defined(linux) || defined(__linux) || defined(__linux__)
+#undef __LINUX__
+#define __LINUX__   1
+#endif
+#if defined(ANDROID) || defined(__ANDROID__)
+#undef __ANDROID__
+#undef __LINUX__ /* do we need to do this? */
+#define __ANDROID__ 1
+#endif
+
+#if defined(__APPLE__)
+/* lets us know what version of Mac OS X we're compiling on */
+#include "AvailabilityMacros.h"
+#include "TargetConditionals.h"
+#if TARGET_OS_IPHONE
+/* if compiling for iPhone */
+#undef __IPHONEOS__
+#define __IPHONEOS__ 1
+#undef __MACOSX__
+#else
+/* if not compiling for iPhone */
+#undef __MACOSX__
+#define __MACOSX__  1
+#if MAC_OS_X_VERSION_MIN_REQUIRED < 1050
+# error SDL for Mac OS X only supports deploying on 10.5 and above.
+#endif /* MAC_OS_X_VERSION_MIN_REQUIRED < 1050 */
+#endif /* TARGET_OS_IPHONE */
+#endif /* defined(__APPLE__) */
+
+#if defined(__NetBSD__)
+#undef __NETBSD__
+#define __NETBSD__  1
+#endif
+#if defined(__OpenBSD__)
+#undef __OPENBSD__
+#define __OPENBSD__ 1
+#endif
+#if defined(__OS2__)
+#undef __OS2__
+#define __OS2__     1
+#endif
+#if defined(osf) || defined(__osf) || defined(__osf__) || defined(_OSF_SOURCE)
+#undef __OSF__
+#define __OSF__     1
+#endif
+#if defined(__QNXNTO__)
+#undef __QNXNTO__
+#define __QNXNTO__  1
+#endif
+#if defined(riscos) || defined(__riscos) || defined(__riscos__)
+#undef __RISCOS__
+#define __RISCOS__  1
+#endif
+#if defined(__SVR4)
+#undef __SOLARIS__
+#define __SOLARIS__ 1
+#endif
+
+#if defined(WIN32) || defined(_WIN32) || defined(__CYGWIN__)
+/* Try to find out if we're compiling for WinRT or non-WinRT */
+/* If _USING_V110_SDK71_ is defined it means we are using the v110_xp or v120_xp toolset. */
+#if defined(__MINGW32__) || (defined(_MSC_VER) && (_MSC_VER >= 1700) && !_USING_V110_SDK71_)   /* _MSC_VER==1700 for MSVC 2012 */
+#include <winapifamily.h>
+#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
+#undef __WINDOWS__
+#define __WINDOWS__   1
+/* See if we're compiling for WinRT: */
+#elif WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
+#undef __WINRT__
+#define __WINRT__ 1
+#endif
+#else
+#undef __WINDOWS__
+#define __WINDOWS__   1
+#endif /* _MSC_VER < 1700 */
+#endif /* defined(WIN32) || defined(_WIN32) || defined(__CYGWIN__) */
+
+#if defined(__WINDOWS__)
+#undef __WIN32__
+#define __WIN32__ 1
+#endif
+#if defined(__PSP__)
+#undef __PSP__
+#define __PSP__ 1
+#endif
+
+#include "begin_code.h"
+/* Set up for C function definitions, even when using C++ */
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ *  \brief Gets the name of the platform.
+ */
+extern DECLSPEC const char * SDLCALL SDL_GetPlatform (void);
+
+/* Ends C function definitions when using C++ */
+#ifdef __cplusplus
+}
+#endif
+#include "close_code.h"
+
+#endif /* _SDL_platform_h */
+
+/* vi: set ts=4 sw=4 expandtab: */
diff --git a/include/SDL2/SDL_power.h b/include/SDL2/SDL_power.h
new file mode 100644 (file)
index 0000000..cf71c98
--- /dev/null
@@ -0,0 +1,75 @@
+/*
+  Simple DirectMedia Layer
+  Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
+
+  This software is provided 'as-is', without any express or implied
+  warranty.  In no event will the authors be held liable for any damages
+  arising from the use of this software.
+
+  Permission is granted to anyone to use this software for any purpose,
+  including commercial applications, and to alter it and redistribute it
+  freely, subject to the following restrictions:
+
+  1. The origin of this software must not be misrepresented; you must not
+     claim that you wrote the original software. If you use this software
+     in a product, an acknowledgment in the product documentation would be
+     appreciated but is not required.
+  2. Altered source versions must be plainly marked as such, and must not be
+     misrepresented as being the original software.
+  3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef _SDL_power_h
+#define _SDL_power_h
+
+/**
+ *  \file SDL_power.h
+ *
+ *  Header for the SDL power management routines.
+ */
+
+#include "SDL_stdinc.h"
+
+#include "begin_code.h"
+/* Set up for C function definitions, even when using C++ */
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ *  \brief The basic state for the system's power supply.
+ */
+typedef enum
+{
+    SDL_POWERSTATE_UNKNOWN,      /**< cannot determine power status */
+    SDL_POWERSTATE_ON_BATTERY,   /**< Not plugged in, running on the battery */
+    SDL_POWERSTATE_NO_BATTERY,   /**< Plugged in, no battery available */
+    SDL_POWERSTATE_CHARGING,     /**< Plugged in, charging battery */
+    SDL_POWERSTATE_CHARGED       /**< Plugged in, battery charged */
+} SDL_PowerState;
+
+
+/**
+ *  \brief Get the current power supply details.
+ *
+ *  \param secs Seconds of battery life left. You can pass a NULL here if
+ *              you don't care. Will return -1 if we can't determine a
+ *              value, or we're not running on a battery.
+ *
+ *  \param pct Percentage of battery life left, between 0 and 100. You can
+ *             pass a NULL here if you don't care. Will return -1 if we
+ *             can't determine a value, or we're not running on a battery.
+ *
+ *  \return The state of the battery (if any).
+ */
+extern DECLSPEC SDL_PowerState SDLCALL SDL_GetPowerInfo(int *secs, int *pct);
+
+/* Ends C function definitions when using C++ */
+#ifdef __cplusplus
+}
+#endif
+#include "close_code.h"
+
+#endif /* _SDL_power_h */
+
+/* vi: set ts=4 sw=4 expandtab: */
diff --git a/include/SDL2/SDL_quit.h b/include/SDL2/SDL_quit.h
new file mode 100644 (file)
index 0000000..8a78644
--- /dev/null
@@ -0,0 +1,58 @@
+/*
+  Simple DirectMedia Layer
+  Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
+
+  This software is provided 'as-is', without any express or implied
+  warranty.  In no event will the authors be held liable for any damages
+  arising from the use of this software.
+
+  Permission is granted to anyone to use this software for any purpose,
+  including commercial applications, and to alter it and redistribute it
+  freely, subject to the following restrictions:
+
+  1. The origin of this software must not be misrepresented; you must not
+     claim that you wrote the original software. If you use this software
+     in a product, an acknowledgment in the product documentation would be
+     appreciated but is not required.
+  2. Altered source versions must be plainly marked as such, and must not be
+     misrepresented as being the original software.
+  3. This notice may not be removed or altered from any source distribution.
+*/
+
+/**
+ *  \file SDL_quit.h
+ *
+ *  Include file for SDL quit event handling.
+ */
+
+#ifndef _SDL_quit_h
+#define _SDL_quit_h
+
+#include "SDL_stdinc.h"
+#include "SDL_error.h"
+
+/**
+ *  \file SDL_quit.h
+ *
+ *  An ::SDL_QUIT event is generated when the user tries to close the application
+ *  window.  If it is ignored or filtered out, the window will remain open.
+ *  If it is not ignored or filtered, it is queued normally and the window
+ *  is allowed to close.  When the window is closed, screen updates will
+ *  complete, but have no effect.
+ *
+ *  SDL_Init() installs signal handlers for SIGINT (keyboard interrupt)
+ *  and SIGTERM (system termination request), if handlers do not already
+ *  exist, that generate ::SDL_QUIT events as well.  There is no way
+ *  to determine the cause of an ::SDL_QUIT event, but setting a signal
+ *  handler in your application will override the default generation of
+ *  quit events for that signal.
+ *
+ *  \sa SDL_Quit()
+ */
+
+/* There are no functions directly affecting the quit event */
+
+#define SDL_QuitRequested() \
+        (SDL_PumpEvents(), (SDL_PeepEvents(NULL,0,SDL_PEEKEVENT,SDL_QUIT,SDL_QUIT) > 0))
+
+#endif /* _SDL_quit_h */
diff --git a/include/SDL2/SDL_rect.h b/include/SDL2/SDL_rect.h
new file mode 100644 (file)
index 0000000..0a95a33
--- /dev/null
@@ -0,0 +1,138 @@
+/*
+  Simple DirectMedia Layer
+  Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
+
+  This software is provided 'as-is', without any express or implied
+  warranty.  In no event will the authors be held liable for any damages
+  arising from the use of this software.
+
+  Permission is granted to anyone to use this software for any purpose,
+  including commercial applications, and to alter it and redistribute it
+  freely, subject to the following restrictions:
+
+  1. The origin of this software must not be misrepresented; you must not
+     claim that you wrote the original software. If you use this software
+     in a product, an acknowledgment in the product documentation would be
+     appreciated but is not required.
+  2. Altered source versions must be plainly marked as such, and must not be
+     misrepresented as being the original software.
+  3. This notice may not be removed or altered from any source distribution.
+*/
+
+/**
+ *  \file SDL_rect.h
+ *
+ *  Header file for SDL_rect definition and management functions.
+ */
+
+#ifndef _SDL_rect_h
+#define _SDL_rect_h
+
+#include "SDL_stdinc.h"
+#include "SDL_error.h"
+#include "SDL_pixels.h"
+#include "SDL_rwops.h"
+
+#include "begin_code.h"
+/* Set up for C function definitions, even when using C++ */
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ *  \brief  The structure that defines a point
+ *
+ *  \sa SDL_EnclosePoints
+ */
+typedef struct SDL_Point
+{
+    int x;
+    int y;
+} SDL_Point;
+
+/**
+ *  \brief A rectangle, with the origin at the upper left.
+ *
+ *  \sa SDL_RectEmpty
+ *  \sa SDL_RectEquals
+ *  \sa SDL_HasIntersection
+ *  \sa SDL_IntersectRect
+ *  \sa SDL_UnionRect
+ *  \sa SDL_EnclosePoints
+ */
+typedef struct SDL_Rect
+{
+    int x, y;
+    int w, h;
+} SDL_Rect;
+
+/**
+ *  \brief Returns true if the rectangle has no area.
+ */
+SDL_FORCE_INLINE SDL_bool SDL_RectEmpty(const SDL_Rect *r)
+{
+    return ((!r) || (r->w <= 0) || (r->h <= 0)) ? SDL_TRUE : SDL_FALSE;
+}
+
+/**
+ *  \brief Returns true if the two rectangles are equal.
+ */
+SDL_FORCE_INLINE SDL_bool SDL_RectEquals(const SDL_Rect *a, const SDL_Rect *b)
+{
+    return (a && b && (a->x == b->x) && (a->y == b->y) &&
+            (a->w == b->w) && (a->h == b->h)) ? SDL_TRUE : SDL_FALSE;
+}
+
+/**
+ *  \brief Determine whether two rectangles intersect.
+ *
+ *  \return SDL_TRUE if there is an intersection, SDL_FALSE otherwise.
+ */
+extern DECLSPEC SDL_bool SDLCALL SDL_HasIntersection(const SDL_Rect * A,
+                                                     const SDL_Rect * B);
+
+/**
+ *  \brief Calculate the intersection of two rectangles.
+ *
+ *  \return SDL_TRUE if there is an intersection, SDL_FALSE otherwise.
+ */
+extern DECLSPEC SDL_bool SDLCALL SDL_IntersectRect(const SDL_Rect * A,
+                                                   const SDL_Rect * B,
+                                                   SDL_Rect * result);
+
+/**
+ *  \brief Calculate the union of two rectangles.
+ */
+extern DECLSPEC void SDLCALL SDL_UnionRect(const SDL_Rect * A,
+                                           const SDL_Rect * B,
+                                           SDL_Rect * result);
+
+/**
+ *  \brief Calculate a minimal rectangle enclosing a set of points
+ *
+ *  \return SDL_TRUE if any points were within the clipping rect
+ */
+extern DECLSPEC SDL_bool SDLCALL SDL_EnclosePoints(const SDL_Point * points,
+                                                   int count,
+                                                   const SDL_Rect * clip,
+                                                   SDL_Rect * result);
+
+/**
+ *  \brief Calculate the intersection of a rectangle and line segment.
+ *
+ *  \return SDL_TRUE if there is an intersection, SDL_FALSE otherwise.
+ */
+extern DECLSPEC SDL_bool SDLCALL SDL_IntersectRectAndLine(const SDL_Rect *
+                                                          rect, int *X1,
+                                                          int *Y1, int *X2,
+                                                          int *Y2);
+
+/* Ends C function definitions when using C++ */
+#ifdef __cplusplus
+}
+#endif
+#include "close_code.h"
+
+#endif /* _SDL_rect_h */
+
+/* vi: set ts=4 sw=4 expandtab: */
diff --git a/include/SDL2/SDL_render.h b/include/SDL2/SDL_render.h
new file mode 100644 (file)
index 0000000..77f706a
--- /dev/null
@@ -0,0 +1,870 @@
+/*
+  Simple DirectMedia Layer
+  Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
+
+  This software is provided 'as-is', without any express or implied
+  warranty.  In no event will the authors be held liable for any damages
+  arising from the use of this software.
+
+  Permission is granted to anyone to use this software for any purpose,
+  including commercial applications, and to alter it and redistribute it
+  freely, subject to the following restrictions:
+
+  1. The origin of this software must not be misrepresented; you must not
+     claim that you wrote the original software. If you use this software
+     in a product, an acknowledgment in the product documentation would be
+     appreciated but is not required.
+  2. Altered source versions must be plainly marked as such, and must not be
+     misrepresented as being the original software.
+  3. This notice may not be removed or altered from any source distribution.
+*/
+
+/**
+ *  \file SDL_render.h
+ *
+ *  Header file for SDL 2D rendering functions.
+ *
+ *  This API supports the following features:
+ *      * single pixel points
+ *      * single pixel lines
+ *      * filled rectangles
+ *      * texture images
+ *
+ *  The primitives may be drawn in opaque, blended, or additive modes.
+ *
+ *  The texture images may be drawn in opaque, blended, or additive modes.
+ *  They can have an additional color tint or alpha modulation applied to
+ *  them, and may also be stretched with linear interpolation.
+ *
+ *  This API is designed to accelerate simple 2D operations. You may
+ *  want more functionality such as polygons and particle effects and
+ *  in that case you should use SDL's OpenGL/Direct3D support or one
+ *  of the many good 3D engines.
+ *
+ *  These functions must be called from the main thread.
+ *  See this bug for details: http://bugzilla.libsdl.org/show_bug.cgi?id=1995
+ */
+
+#ifndef _SDL_render_h
+#define _SDL_render_h
+
+#include "SDL_stdinc.h"
+#include "SDL_rect.h"
+#include "SDL_video.h"
+
+#include "begin_code.h"
+/* Set up for C function definitions, even when using C++ */
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ *  \brief Flags used when creating a rendering context
+ */
+typedef enum
+{
+    SDL_RENDERER_SOFTWARE = 0x00000001,         /**< The renderer is a software fallback */
+    SDL_RENDERER_ACCELERATED = 0x00000002,      /**< The renderer uses hardware
+                                                     acceleration */
+    SDL_RENDERER_PRESENTVSYNC = 0x00000004,     /**< Present is synchronized
+                                                     with the refresh rate */
+    SDL_RENDERER_TARGETTEXTURE = 0x00000008     /**< The renderer supports
+                                                     rendering to texture */
+} SDL_RendererFlags;
+
+/**
+ *  \brief Information on the capabilities of a render driver or context.
+ */
+typedef struct SDL_RendererInfo
+{
+    const char *name;           /**< The name of the renderer */
+    Uint32 flags;               /**< Supported ::SDL_RendererFlags */
+    Uint32 num_texture_formats; /**< The number of available texture formats */
+    Uint32 texture_formats[16]; /**< The available texture formats */
+    int max_texture_width;      /**< The maximimum texture width */
+    int max_texture_height;     /**< The maximimum texture height */
+} SDL_RendererInfo;
+
+/**
+ *  \brief The access pattern allowed for a texture.
+ */
+typedef enum
+{
+    SDL_TEXTUREACCESS_STATIC,    /**< Changes rarely, not lockable */
+    SDL_TEXTUREACCESS_STREAMING, /**< Changes frequently, lockable */
+    SDL_TEXTUREACCESS_TARGET     /**< Texture can be used as a render target */
+} SDL_TextureAccess;
+
+/**
+ *  \brief The texture channel modulation used in SDL_RenderCopy().
+ */
+typedef enum
+{
+    SDL_TEXTUREMODULATE_NONE = 0x00000000,     /**< No modulation */
+    SDL_TEXTUREMODULATE_COLOR = 0x00000001,    /**< srcC = srcC * color */
+    SDL_TEXTUREMODULATE_ALPHA = 0x00000002     /**< srcA = srcA * alpha */
+} SDL_TextureModulate;
+
+/**
+ *  \brief Flip constants for SDL_RenderCopyEx
+ */
+typedef enum
+{
+    SDL_FLIP_NONE = 0x00000000,     /**< Do not flip */
+    SDL_FLIP_HORIZONTAL = 0x00000001,    /**< flip horizontally */
+    SDL_FLIP_VERTICAL = 0x00000002     /**< flip vertically */
+} SDL_RendererFlip;
+
+/**
+ *  \brief A structure representing rendering state
+ */
+struct SDL_Renderer;
+typedef struct SDL_Renderer SDL_Renderer;
+
+/**
+ *  \brief An efficient driver-specific representation of pixel data
+ */
+struct SDL_Texture;
+typedef struct SDL_Texture SDL_Texture;
+
+
+/* Function prototypes */
+
+/**
+ *  \brief Get the number of 2D rendering drivers available for the current
+ *         display.
+ *
+ *  A render driver is a set of code that handles rendering and texture
+ *  management on a particular display.  Normally there is only one, but
+ *  some drivers may have several available with different capabilities.
+ *
+ *  \sa SDL_GetRenderDriverInfo()
+ *  \sa SDL_CreateRenderer()
+ */
+extern DECLSPEC int SDLCALL SDL_GetNumRenderDrivers(void);
+
+/**
+ *  \brief Get information about a specific 2D rendering driver for the current
+ *         display.
+ *
+ *  \param index The index of the driver to query information about.
+ *  \param info  A pointer to an SDL_RendererInfo struct to be filled with
+ *               information on the rendering driver.
+ *
+ *  \return 0 on success, -1 if the index was out of range.
+ *
+ *  \sa SDL_CreateRenderer()
+ */
+extern DECLSPEC int SDLCALL SDL_GetRenderDriverInfo(int index,
+                                                    SDL_RendererInfo * info);
+
+/**
+ *  \brief Create a window and default renderer
+ *
+ *  \param width    The width of the window
+ *  \param height   The height of the window
+ *  \param window_flags The flags used to create the window
+ *  \param window   A pointer filled with the window, or NULL on error
+ *  \param renderer A pointer filled with the renderer, or NULL on error
+ *
+ *  \return 0 on success, or -1 on error
+ */
+extern DECLSPEC int SDLCALL SDL_CreateWindowAndRenderer(
+                                int width, int height, Uint32 window_flags,
+                                SDL_Window **window, SDL_Renderer **renderer);
+
+
+/**
+ *  \brief Create a 2D rendering context for a window.
+ *
+ *  \param window The window where rendering is displayed.
+ *  \param index    The index of the rendering driver to initialize, or -1 to
+ *                  initialize the first one supporting the requested flags.
+ *  \param flags    ::SDL_RendererFlags.
+ *
+ *  \return A valid rendering context or NULL if there was an error.
+ *
+ *  \sa SDL_CreateSoftwareRenderer()
+ *  \sa SDL_GetRendererInfo()
+ *  \sa SDL_DestroyRenderer()
+ */
+extern DECLSPEC SDL_Renderer * SDLCALL SDL_CreateRenderer(SDL_Window * window,
+                                               int index, Uint32 flags);
+
+/**
+ *  \brief Create a 2D software rendering context for a surface.
+ *
+ *  \param surface The surface where rendering is done.
+ *
+ *  \return A valid rendering context or NULL if there was an error.
+ *
+ *  \sa SDL_CreateRenderer()
+ *  \sa SDL_DestroyRenderer()
+ */
+extern DECLSPEC SDL_Renderer * SDLCALL SDL_CreateSoftwareRenderer(SDL_Surface * surface);
+
+/**
+ *  \brief Get the renderer associated with a window.
+ */
+extern DECLSPEC SDL_Renderer * SDLCALL SDL_GetRenderer(SDL_Window * window);
+
+/**
+ *  \brief Get information about a rendering context.
+ */
+extern DECLSPEC int SDLCALL SDL_GetRendererInfo(SDL_Renderer * renderer,
+                                                SDL_RendererInfo * info);
+
+/**
+ *  \brief Get the output size of a rendering context.
+ */
+extern DECLSPEC int SDLCALL SDL_GetRendererOutputSize(SDL_Renderer * renderer,
+                                                      int *w, int *h);
+
+/**
+ *  \brief Create a texture for a rendering context.
+ *
+ *  \param renderer The renderer.
+ *  \param format The format of the texture.
+ *  \param access One of the enumerated values in ::SDL_TextureAccess.
+ *  \param w      The width of the texture in pixels.
+ *  \param h      The height of the texture in pixels.
+ *
+ *  \return The created texture is returned, or 0 if no rendering context was
+ *          active,  the format was unsupported, or the width or height were out
+ *          of range.
+ *
+ *  \sa SDL_QueryTexture()
+ *  \sa SDL_UpdateTexture()
+ *  \sa SDL_DestroyTexture()
+ */
+extern DECLSPEC SDL_Texture * SDLCALL SDL_CreateTexture(SDL_Renderer * renderer,
+                                                        Uint32 format,
+                                                        int access, int w,
+                                                        int h);
+
+/**
+ *  \brief Create a texture from an existing surface.
+ *
+ *  \param renderer The renderer.
+ *  \param surface The surface containing pixel data used to fill the texture.
+ *
+ *  \return The created texture is returned, or 0 on error.
+ *
+ *  \note The surface is not modified or freed by this function.
+ *
+ *  \sa SDL_QueryTexture()
+ *  \sa SDL_DestroyTexture()
+ */
+extern DECLSPEC SDL_Texture * SDLCALL SDL_CreateTextureFromSurface(SDL_Renderer * renderer, SDL_Surface * surface);
+
+/**
+ *  \brief Query the attributes of a texture
+ *
+ *  \param texture A texture to be queried.
+ *  \param format  A pointer filled in with the raw format of the texture.  The
+ *                 actual format may differ, but pixel transfers will use this
+ *                 format.
+ *  \param access  A pointer filled in with the actual access to the texture.
+ *  \param w       A pointer filled in with the width of the texture in pixels.
+ *  \param h       A pointer filled in with the height of the texture in pixels.
+ *
+ *  \return 0 on success, or -1 if the texture is not valid.
+ */
+extern DECLSPEC int SDLCALL SDL_QueryTexture(SDL_Texture * texture,
+                                             Uint32 * format, int *access,
+                                             int *w, int *h);
+
+/**
+ *  \brief Set an additional color value used in render copy operations.
+ *
+ *  \param texture The texture to update.
+ *  \param r       The red color value multiplied into copy operations.
+ *  \param g       The green color value multiplied into copy operations.
+ *  \param b       The blue color value multiplied into copy operations.
+ *
+ *  \return 0 on success, or -1 if the texture is not valid or color modulation
+ *          is not supported.
+ *
+ *  \sa SDL_GetTextureColorMod()
+ */
+extern DECLSPEC int SDLCALL SDL_SetTextureColorMod(SDL_Texture * texture,
+                                                   Uint8 r, Uint8 g, Uint8 b);
+
+
+/**
+ *  \brief Get the additional color value used in render copy operations.
+ *
+ *  \param texture The texture to query.
+ *  \param r         A pointer filled in with the current red color value.
+ *  \param g         A pointer filled in with the current green color value.
+ *  \param b         A pointer filled in with the current blue color value.
+ *
+ *  \return 0 on success, or -1 if the texture is not valid.
+ *
+ *  \sa SDL_SetTextureColorMod()
+ */
+extern DECLSPEC int SDLCALL SDL_GetTextureColorMod(SDL_Texture * texture,
+                                                   Uint8 * r, Uint8 * g,
+                                                   Uint8 * b);
+
+/**
+ *  \brief Set an additional alpha value used in render copy operations.
+ *
+ *  \param texture The texture to update.
+ *  \param alpha     The alpha value multiplied into copy operations.
+ *
+ *  \return 0 on success, or -1 if the texture is not valid or alpha modulation
+ *          is not supported.
+ *
+ *  \sa SDL_GetTextureAlphaMod()
+ */
+extern DECLSPEC int SDLCALL SDL_SetTextureAlphaMod(SDL_Texture * texture,
+                                                   Uint8 alpha);
+
+/**
+ *  \brief Get the additional alpha value used in render copy operations.
+ *
+ *  \param texture The texture to query.
+ *  \param alpha     A pointer filled in with the current alpha value.
+ *
+ *  \return 0 on success, or -1 if the texture is not valid.
+ *
+ *  \sa SDL_SetTextureAlphaMod()
+ */
+extern DECLSPEC int SDLCALL SDL_GetTextureAlphaMod(SDL_Texture * texture,
+                                                   Uint8 * alpha);
+
+/**
+ *  \brief Set the blend mode used for texture copy operations.
+ *
+ *  \param texture The texture to update.
+ *  \param blendMode ::SDL_BlendMode to use for texture blending.
+ *
+ *  \return 0 on success, or -1 if the texture is not valid or the blend mode is
+ *          not supported.
+ *
+ *  \note If the blend mode is not supported, the closest supported mode is
+ *        chosen.
+ *
+ *  \sa SDL_GetTextureBlendMode()
+ */
+extern DECLSPEC int SDLCALL SDL_SetTextureBlendMode(SDL_Texture * texture,
+                                                    SDL_BlendMode blendMode);
+
+/**
+ *  \brief Get the blend mode used for texture copy operations.
+ *
+ *  \param texture   The texture to query.
+ *  \param blendMode A pointer filled in with the current blend mode.
+ *
+ *  \return 0 on success, or -1 if the texture is not valid.
+ *
+ *  \sa SDL_SetTextureBlendMode()
+ */
+extern DECLSPEC int SDLCALL SDL_GetTextureBlendMode(SDL_Texture * texture,
+                                                    SDL_BlendMode *blendMode);
+
+/**
+ *  \brief Update the given texture rectangle with new pixel data.
+ *
+ *  \param texture   The texture to update
+ *  \param rect      A pointer to the rectangle of pixels to update, or NULL to
+ *                   update the entire texture.
+ *  \param pixels    The raw pixel data.
+ *  \param pitch     The number of bytes between rows of pixel data.
+ *
+ *  \return 0 on success, or -1 if the texture is not valid.
+ *
+ *  \note This is a fairly slow function.
+ */
+extern DECLSPEC int SDLCALL SDL_UpdateTexture(SDL_Texture * texture,
+                                              const SDL_Rect * rect,
+                                              const void *pixels, int pitch);
+
+/**
+ *  \brief Update a rectangle within a planar YV12 or IYUV texture with new pixel data.
+ *
+ *  \param texture   The texture to update
+ *  \param rect      A pointer to the rectangle of pixels to update, or NULL to
+ *                   update the entire texture.
+ *  \param Yplane    The raw pixel data for the Y plane.
+ *  \param Ypitch    The number of bytes between rows of pixel data for the Y plane.
+ *  \param Uplane    The raw pixel data for the U plane.
+ *  \param Upitch    The number of bytes between rows of pixel data for the U plane.
+ *  \param Vplane    The raw pixel data for the V plane.
+ *  \param Vpitch    The number of bytes between rows of pixel data for the V plane.
+ *
+ *  \return 0 on success, or -1 if the texture is not valid.
+ *
+ *  \note You can use SDL_UpdateTexture() as long as your pixel data is
+ *        a contiguous block of Y and U/V planes in the proper order, but
+ *        this function is available if your pixel data is not contiguous.
+ */
+extern DECLSPEC int SDLCALL SDL_UpdateYUVTexture(SDL_Texture * texture,
+                                                 const SDL_Rect * rect,
+                                                 const Uint8 *Yplane, int Ypitch,
+                                                 const Uint8 *Uplane, int Upitch,
+                                                 const Uint8 *Vplane, int Vpitch);
+
+/**
+ *  \brief Lock a portion of the texture for write-only pixel access.
+ *
+ *  \param texture   The texture to lock for access, which was created with
+ *                   ::SDL_TEXTUREACCESS_STREAMING.
+ *  \param rect      A pointer to the rectangle to lock for access. If the rect
+ *                   is NULL, the entire texture will be locked.
+ *  \param pixels    This is filled in with a pointer to the locked pixels,
+ *                   appropriately offset by the locked area.
+ *  \param pitch     This is filled in with the pitch of the locked pixels.
+ *
+ *  \return 0 on success, or -1 if the texture is not valid or was not created with ::SDL_TEXTUREACCESS_STREAMING.
+ *
+ *  \sa SDL_UnlockTexture()
+ */
+extern DECLSPEC int SDLCALL SDL_LockTexture(SDL_Texture * texture,
+                                            const SDL_Rect * rect,
+                                            void **pixels, int *pitch);
+
+/**
+ *  \brief Unlock a texture, uploading the changes to video memory, if needed.
+ *
+ *  \sa SDL_LockTexture()
+ */
+extern DECLSPEC void SDLCALL SDL_UnlockTexture(SDL_Texture * texture);
+
+/**
+ * \brief Determines whether a window supports the use of render targets
+ *
+ * \param renderer The renderer that will be checked
+ *
+ * \return SDL_TRUE if supported, SDL_FALSE if not.
+ */
+extern DECLSPEC SDL_bool SDLCALL SDL_RenderTargetSupported(SDL_Renderer *renderer);
+
+/**
+ * \brief Set a texture as the current rendering target.
+ *
+ * \param renderer The renderer.
+ * \param texture The targeted texture, which must be created with the SDL_TEXTUREACCESS_TARGET flag, or NULL for the default render target
+ *
+ * \return 0 on success, or -1 on error
+ *
+ *  \sa SDL_GetRenderTarget()
+ */
+extern DECLSPEC int SDLCALL SDL_SetRenderTarget(SDL_Renderer *renderer,
+                                                SDL_Texture *texture);
+
+/**
+ * \brief Get the current render target or NULL for the default render target.
+ *
+ * \return The current render target
+ *
+ *  \sa SDL_SetRenderTarget()
+ */
+extern DECLSPEC SDL_Texture * SDLCALL SDL_GetRenderTarget(SDL_Renderer *renderer);
+
+/**
+ *  \brief Set device independent resolution for rendering
+ *
+ *  \param renderer The renderer for which resolution should be set.
+ *  \param w      The width of the logical resolution
+ *  \param h      The height of the logical resolution
+ *
+ *  This function uses the viewport and scaling functionality to allow a fixed logical
+ *  resolution for rendering, regardless of the actual output resolution.  If the actual
+ *  output resolution doesn't have the same aspect ratio the output rendering will be
+ *  centered within the output display.
+ *
+ *  If the output display is a window, mouse events in the window will be filtered
+ *  and scaled so they seem to arrive within the logical resolution.
+ *
+ *  \note If this function results in scaling or subpixel drawing by the
+ *        rendering backend, it will be handled using the appropriate
+ *        quality hints.
+ *
+ *  \sa SDL_RenderGetLogicalSize()
+ *  \sa SDL_RenderSetScale()
+ *  \sa SDL_RenderSetViewport()
+ */
+extern DECLSPEC int SDLCALL SDL_RenderSetLogicalSize(SDL_Renderer * renderer, int w, int h);
+
+/**
+ *  \brief Get device independent resolution for rendering
+ *
+ *  \param renderer The renderer from which resolution should be queried.
+ *  \param w      A pointer filled with the width of the logical resolution
+ *  \param h      A pointer filled with the height of the logical resolution
+ *
+ *  \sa SDL_RenderSetLogicalSize()
+ */
+extern DECLSPEC void SDLCALL SDL_RenderGetLogicalSize(SDL_Renderer * renderer, int *w, int *h);
+
+/**
+ *  \brief Set the drawing area for rendering on the current target.
+ *
+ *  \param renderer The renderer for which the drawing area should be set.
+ *  \param rect The rectangle representing the drawing area, or NULL to set the viewport to the entire target.
+ *
+ *  The x,y of the viewport rect represents the origin for rendering.
+ *
+ *  \return 0 on success, or -1 on error
+ *
+ *  \note If the window associated with the renderer is resized, the viewport is automatically reset.
+ *
+ *  \sa SDL_RenderGetViewport()
+ *  \sa SDL_RenderSetLogicalSize()
+ */
+extern DECLSPEC int SDLCALL SDL_RenderSetViewport(SDL_Renderer * renderer,
+                                                  const SDL_Rect * rect);
+
+/**
+ *  \brief Get the drawing area for the current target.
+ *
+ *  \sa SDL_RenderSetViewport()
+ */
+extern DECLSPEC void SDLCALL SDL_RenderGetViewport(SDL_Renderer * renderer,
+                                                   SDL_Rect * rect);
+
+/**
+ *  \brief Set the clip rectangle for the current target.
+ *
+ *  \param renderer The renderer for which clip rectangle should be set.
+ *  \param rect   A pointer to the rectangle to set as the clip rectangle, or
+ *                NULL to disable clipping.
+ *
+ *  \return 0 on success, or -1 on error
+ *
+ *  \sa SDL_RenderGetClipRect()
+ */
+extern DECLSPEC int SDLCALL SDL_RenderSetClipRect(SDL_Renderer * renderer,
+                                                  const SDL_Rect * rect);
+
+/**
+ *  \brief Get the clip rectangle for the current target.
+ *
+ *  \param renderer The renderer from which clip rectangle should be queried.
+ *  \param rect   A pointer filled in with the current clip rectangle, or
+ *                an empty rectangle if clipping is disabled.
+ *
+ *  \sa SDL_RenderSetClipRect()
+ */
+extern DECLSPEC void SDLCALL SDL_RenderGetClipRect(SDL_Renderer * renderer,
+                                                   SDL_Rect * rect);
+
+/**
+ *  \brief Set the drawing scale for rendering on the current target.
+ *
+ *  \param renderer The renderer for which the drawing scale should be set.
+ *  \param scaleX The horizontal scaling factor
+ *  \param scaleY The vertical scaling factor
+ *
+ *  The drawing coordinates are scaled by the x/y scaling factors
+ *  before they are used by the renderer.  This allows resolution
+ *  independent drawing with a single coordinate system.
+ *
+ *  \note If this results in scaling or subpixel drawing by the
+ *        rendering backend, it will be handled using the appropriate
+ *        quality hints.  For best results use integer scaling factors.
+ *
+ *  \sa SDL_RenderGetScale()
+ *  \sa SDL_RenderSetLogicalSize()
+ */
+extern DECLSPEC int SDLCALL SDL_RenderSetScale(SDL_Renderer * renderer,
+                                               float scaleX, float scaleY);
+
+/**
+ *  \brief Get the drawing scale for the current target.
+ *
+ *  \param renderer The renderer from which drawing scale should be queried.
+ *  \param scaleX A pointer filled in with the horizontal scaling factor
+ *  \param scaleY A pointer filled in with the vertical scaling factor
+ *
+ *  \sa SDL_RenderSetScale()
+ */
+extern DECLSPEC void SDLCALL SDL_RenderGetScale(SDL_Renderer * renderer,
+                                               float *scaleX, float *scaleY);
+
+/**
+ *  \brief Set the color used for drawing operations (Rect, Line and Clear).
+ *
+ *  \param renderer The renderer for which drawing color should be set.
+ *  \param r The red value used to draw on the rendering target.
+ *  \param g The green value used to draw on the rendering target.
+ *  \param b The blue value used to draw on the rendering target.
+ *  \param a The alpha value used to draw on the rendering target, usually
+ *           ::SDL_ALPHA_OPAQUE (255).
+ *
+ *  \return 0 on success, or -1 on error
+ */
+extern DECLSPEC int SDLCALL SDL_SetRenderDrawColor(SDL_Renderer * renderer,
+                                           Uint8 r, Uint8 g, Uint8 b,
+                                           Uint8 a);
+
+/**
+ *  \brief Get the color used for drawing operations (Rect, Line and Clear).
+ *
+ *  \param renderer The renderer from which drawing color should be queried.
+ *  \param r A pointer to the red value used to draw on the rendering target.
+ *  \param g A pointer to the green value used to draw on the rendering target.
+ *  \param b A pointer to the blue value used to draw on the rendering target.
+ *  \param a A pointer to the alpha value used to draw on the rendering target,
+ *           usually ::SDL_ALPHA_OPAQUE (255).
+ *
+ *  \return 0 on success, or -1 on error
+ */
+extern DECLSPEC int SDLCALL SDL_GetRenderDrawColor(SDL_Renderer * renderer,
+                                           Uint8 * r, Uint8 * g, Uint8 * b,
+                                           Uint8 * a);
+
+/**
+ *  \brief Set the blend mode used for drawing operations (Fill and Line).
+ *
+ *  \param renderer The renderer for which blend mode should be set.
+ *  \param blendMode ::SDL_BlendMode to use for blending.
+ *
+ *  \return 0 on success, or -1 on error
+ *
+ *  \note If the blend mode is not supported, the closest supported mode is
+ *        chosen.
+ *
+ *  \sa SDL_GetRenderDrawBlendMode()
+ */
+extern DECLSPEC int SDLCALL SDL_SetRenderDrawBlendMode(SDL_Renderer * renderer,
+                                                       SDL_BlendMode blendMode);
+
+/**
+ *  \brief Get the blend mode used for drawing operations.
+ *
+ *  \param renderer The renderer from which blend mode should be queried.
+ *  \param blendMode A pointer filled in with the current blend mode.
+ *
+ *  \return 0 on success, or -1 on error
+ *
+ *  \sa SDL_SetRenderDrawBlendMode()
+ */
+extern DECLSPEC int SDLCALL SDL_GetRenderDrawBlendMode(SDL_Renderer * renderer,
+                                                       SDL_BlendMode *blendMode);
+
+/**
+ *  \brief Clear the current rendering target with the drawing color
+ *
+ *  This function clears the entire rendering target, ignoring the viewport.
+ *
+ *  \return 0 on success, or -1 on error
+ */
+extern DECLSPEC int SDLCALL SDL_RenderClear(SDL_Renderer * renderer);
+
+/**
+ *  \brief Draw a point on the current rendering target.
+ *
+ *  \param renderer The renderer which should draw a point.
+ *  \param x The x coordinate of the point.
+ *  \param y The y coordinate of the point.
+ *
+ *  \return 0 on success, or -1 on error
+ */
+extern DECLSPEC int SDLCALL SDL_RenderDrawPoint(SDL_Renderer * renderer,
+                                                int x, int y);
+
+/**
+ *  \brief Draw multiple points on the current rendering target.
+ *
+ *  \param renderer The renderer which should draw multiple points.
+ *  \param points The points to draw
+ *  \param count The number of points to draw
+ *
+ *  \return 0 on success, or -1 on error
+ */
+extern DECLSPEC int SDLCALL SDL_RenderDrawPoints(SDL_Renderer * renderer,
+                                                 const SDL_Point * points,
+                                                 int count);
+
+/**
+ *  \brief Draw a line on the current rendering target.
+ *
+ *  \param renderer The renderer which should draw a line.
+ *  \param x1 The x coordinate of the start point.
+ *  \param y1 The y coordinate of the start point.
+ *  \param x2 The x coordinate of the end point.
+ *  \param y2 The y coordinate of the end point.
+ *
+ *  \return 0 on success, or -1 on error
+ */
+extern DECLSPEC int SDLCALL SDL_RenderDrawLine(SDL_Renderer * renderer,
+                                               int x1, int y1, int x2, int y2);
+
+/**
+ *  \brief Draw a series of connected lines on the current rendering target.
+ *
+ *  \param renderer The renderer which should draw multiple lines.
+ *  \param points The points along the lines
+ *  \param count The number of points, drawing count-1 lines
+ *
+ *  \return 0 on success, or -1 on error
+ */
+extern DECLSPEC int SDLCALL SDL_RenderDrawLines(SDL_Renderer * renderer,
+                                                const SDL_Point * points,
+                                                int count);
+
+/**
+ *  \brief Draw a rectangle on the current rendering target.
+ *
+ *  \param renderer The renderer which should draw a rectangle.
+ *  \param rect A pointer to the destination rectangle, or NULL to outline the entire rendering target.
+ *
+ *  \return 0 on success, or -1 on error
+ */
+extern DECLSPEC int SDLCALL SDL_RenderDrawRect(SDL_Renderer * renderer,
+                                               const SDL_Rect * rect);
+
+/**
+ *  \brief Draw some number of rectangles on the current rendering target.
+ *
+ *  \param renderer The renderer which should draw multiple rectangles.
+ *  \param rects A pointer to an array of destination rectangles.
+ *  \param count The number of rectangles.
+ *
+ *  \return 0 on success, or -1 on error
+ */
+extern DECLSPEC int SDLCALL SDL_RenderDrawRects(SDL_Renderer * renderer,
+                                                const SDL_Rect * rects,
+                                                int count);
+
+/**
+ *  \brief Fill a rectangle on the current rendering target with the drawing color.
+ *
+ *  \param renderer The renderer which should fill a rectangle.
+ *  \param rect A pointer to the destination rectangle, or NULL for the entire
+ *              rendering target.
+ *
+ *  \return 0 on success, or -1 on error
+ */
+extern DECLSPEC int SDLCALL SDL_RenderFillRect(SDL_Renderer * renderer,
+                                               const SDL_Rect * rect);
+
+/**
+ *  \brief Fill some number of rectangles on the current rendering target with the drawing color.
+ *
+ *  \param renderer The renderer which should fill multiple rectangles.
+ *  \param rects A pointer to an array of destination rectangles.
+ *  \param count The number of rectangles.
+ *
+ *  \return 0 on success, or -1 on error
+ */
+extern DECLSPEC int SDLCALL SDL_RenderFillRects(SDL_Renderer * renderer,
+                                                const SDL_Rect * rects,
+                                                int count);
+
+/**
+ *  \brief Copy a portion of the texture to the current rendering target.
+ *
+ *  \param renderer The renderer which should copy parts of a texture.
+ *  \param texture The source texture.
+ *  \param srcrect   A pointer to the source rectangle, or NULL for the entire
+ *                   texture.
+ *  \param dstrect   A pointer to the destination rectangle, or NULL for the
+ *                   entire rendering target.
+ *
+ *  \return 0 on success, or -1 on error
+ */
+extern DECLSPEC int SDLCALL SDL_RenderCopy(SDL_Renderer * renderer,
+                                           SDL_Texture * texture,
+                                           const SDL_Rect * srcrect,
+                                           const SDL_Rect * dstrect);
+
+/**
+ *  \brief Copy a portion of the source texture to the current rendering target, rotating it by angle around the given center
+ *
+ *  \param renderer The renderer which should copy parts of a texture.
+ *  \param texture The source texture.
+ *  \param srcrect   A pointer to the source rectangle, or NULL for the entire
+ *                   texture.
+ *  \param dstrect   A pointer to the destination rectangle, or NULL for the
+ *                   entire rendering target.
+ *  \param angle    An angle in degrees that indicates the rotation that will be applied to dstrect
+ *  \param center   A pointer to a point indicating the point around which dstrect will be rotated (if NULL, rotation will be done aroud dstrect.w/2, dstrect.h/2)
+ *  \param flip     An SDL_RendererFlip value stating which flipping actions should be performed on the texture
+ *
+ *  \return 0 on success, or -1 on error
+ */
+extern DECLSPEC int SDLCALL SDL_RenderCopyEx(SDL_Renderer * renderer,
+                                           SDL_Texture * texture,
+                                           const SDL_Rect * srcrect,
+                                           const SDL_Rect * dstrect,
+                                           const double angle,
+                                           const SDL_Point *center,
+                                           const SDL_RendererFlip flip);
+
+/**
+ *  \brief Read pixels from the current rendering target.
+ *
+ *  \param renderer The renderer from which pixels should be read.
+ *  \param rect   A pointer to the rectangle to read, or NULL for the entire
+ *                render target.
+ *  \param format The desired format of the pixel data, or 0 to use the format
+ *                of the rendering target
+ *  \param pixels A pointer to be filled in with the pixel data
+ *  \param pitch  The pitch of the pixels parameter.
+ *
+ *  \return 0 on success, or -1 if pixel reading is not supported.
+ *
+ *  \warning This is a very slow operation, and should not be used frequently.
+ */
+extern DECLSPEC int SDLCALL SDL_RenderReadPixels(SDL_Renderer * renderer,
+                                                 const SDL_Rect * rect,
+                                                 Uint32 format,
+                                                 void *pixels, int pitch);
+
+/**
+ *  \brief Update the screen with rendering performed.
+ */
+extern DECLSPEC void SDLCALL SDL_RenderPresent(SDL_Renderer * renderer);
+
+/**
+ *  \brief Destroy the specified texture.
+ *
+ *  \sa SDL_CreateTexture()
+ *  \sa SDL_CreateTextureFromSurface()
+ */
+extern DECLSPEC void SDLCALL SDL_DestroyTexture(SDL_Texture * texture);
+
+/**
+ *  \brief Destroy the rendering context for a window and free associated
+ *         textures.
+ *
+ *  \sa SDL_CreateRenderer()
+ */
+extern DECLSPEC void SDLCALL SDL_DestroyRenderer(SDL_Renderer * renderer);
+
+
+/**
+ *  \brief Bind the texture to the current OpenGL/ES/ES2 context for use with
+ *         OpenGL instructions.
+ *
+ *  \param texture  The SDL texture to bind
+ *  \param texw     A pointer to a float that will be filled with the texture width
+ *  \param texh     A pointer to a float that will be filled with the texture height
+ *
+ *  \return 0 on success, or -1 if the operation is not supported
+ */
+extern DECLSPEC int SDLCALL SDL_GL_BindTexture(SDL_Texture *texture, float *texw, float *texh);
+
+/**
+ *  \brief Unbind a texture from the current OpenGL/ES/ES2 context.
+ *
+ *  \param texture  The SDL texture to unbind
+ *
+ *  \return 0 on success, or -1 if the operation is not supported
+ */
+extern DECLSPEC int SDLCALL SDL_GL_UnbindTexture(SDL_Texture *texture);
+
+
+/* Ends C function definitions when using C++ */
+#ifdef __cplusplus
+}
+#endif
+#include "close_code.h"
+
+#endif /* _SDL_render_h */
+
+/* vi: set ts=4 sw=4 expandtab: */
diff --git a/include/SDL2/SDL_revision.h b/include/SDL2/SDL_revision.h
new file mode 100644 (file)
index 0000000..a75dc33
--- /dev/null
@@ -0,0 +1,2 @@
+#define SDL_REVISION "hg-8628:b558f99d48f0"
+#define SDL_REVISION_NUMBER 8628
diff --git a/include/SDL2/SDL_rwops.h b/include/SDL2/SDL_rwops.h
new file mode 100644 (file)
index 0000000..4bdd787
--- /dev/null
@@ -0,0 +1,232 @@
+/*
+  Simple DirectMedia Layer
+  Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
+
+  This software is provided 'as-is', without any express or implied
+  warranty.  In no event will the authors be held liable for any damages
+  arising from the use of this software.
+
+  Permission is granted to anyone to use this software for any purpose,
+  including commercial applications, and to alter it and redistribute it
+  freely, subject to the following restrictions:
+
+  1. The origin of this software must not be misrepresented; you must not
+     claim that you wrote the original software. If you use this software
+     in a product, an acknowledgment in the product documentation would be
+     appreciated but is not required.
+  2. Altered source versions must be plainly marked as such, and must not be
+     misrepresented as being the original software.
+  3. This notice may not be removed or altered from any source distribution.
+*/
+
+/**
+ *  \file SDL_rwops.h
+ *
+ *  This file provides a general interface for SDL to read and write
+ *  data streams.  It can easily be extended to files, memory, etc.
+ */
+
+#ifndef _SDL_rwops_h
+#define _SDL_rwops_h
+
+#include "SDL_stdinc.h"
+#include "SDL_error.h"
+
+#include "begin_code.h"
+/* Set up for C function definitions, even when using C++ */
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* RWops Types */
+#define SDL_RWOPS_UNKNOWN   0   /* Unknown stream type */
+#define SDL_RWOPS_WINFILE   1   /* Win32 file */
+#define SDL_RWOPS_STDFILE   2   /* Stdio file */
+#define SDL_RWOPS_JNIFILE   3   /* Android asset */
+#define SDL_RWOPS_MEMORY    4   /* Memory stream */
+#define SDL_RWOPS_MEMORY_RO 5   /* Read-Only memory stream */
+
+/**
+ * This is the read/write operation structure -- very basic.
+ */
+typedef struct SDL_RWops
+{
+    /**
+     *  Return the size of the file in this rwops, or -1 if unknown
+     */
+    Sint64 (SDLCALL * size) (struct SDL_RWops * context);
+
+    /**
+     *  Seek to \c offset relative to \c whence, one of stdio's whence values:
+     *  RW_SEEK_SET, RW_SEEK_CUR, RW_SEEK_END
+     *
+     *  \return the final offset in the data stream, or -1 on error.
+     */
+    Sint64 (SDLCALL * seek) (struct SDL_RWops * context, Sint64 offset,
+                             int whence);
+
+    /**
+     *  Read up to \c maxnum objects each of size \c size from the data
+     *  stream to the area pointed at by \c ptr.
+     *
+     *  \return the number of objects read, or 0 at error or end of file.
+     */
+    size_t (SDLCALL * read) (struct SDL_RWops * context, void *ptr,
+                             size_t size, size_t maxnum);
+
+    /**
+     *  Write exactly \c num objects each of size \c size from the area
+     *  pointed at by \c ptr to data stream.
+     *
+     *  \return the number of objects written, or 0 at error or end of file.
+     */
+    size_t (SDLCALL * write) (struct SDL_RWops * context, const void *ptr,
+                              size_t size, size_t num);
+
+    /**
+     *  Close and free an allocated SDL_RWops structure.
+     *
+     *  \return 0 if successful or -1 on write error when flushing data.
+     */
+    int (SDLCALL * close) (struct SDL_RWops * context);
+
+    Uint32 type;
+    union
+    {
+#if defined(ANDROID)
+        struct
+        {
+            void *fileNameRef;
+            void *inputStreamRef;
+            void *readableByteChannelRef;
+            void *readMethod;
+            void *assetFileDescriptorRef;
+            long position;
+            long size;
+            long offset;
+            int fd;
+        } androidio;
+#elif defined(__WIN32__)
+        struct
+        {
+            SDL_bool append;
+            void *h;
+            struct
+            {
+                void *data;
+                size_t size;
+                size_t left;
+            } buffer;
+        } windowsio;
+#endif
+
+#ifdef HAVE_STDIO_H
+        struct
+        {
+            SDL_bool autoclose;
+            FILE *fp;
+        } stdio;
+#endif
+        struct
+        {
+            Uint8 *base;
+            Uint8 *here;
+            Uint8 *stop;
+        } mem;
+        struct
+        {
+            void *data1;
+            void *data2;
+        } unknown;
+    } hidden;
+
+} SDL_RWops;
+
+
+/**
+ *  \name RWFrom functions
+ *
+ *  Functions to create SDL_RWops structures from various data streams.
+ */
+/* @{ */
+
+extern DECLSPEC SDL_RWops *SDLCALL SDL_RWFromFile(const char *file,
+                                                  const char *mode);
+
+#ifdef HAVE_STDIO_H
+extern DECLSPEC SDL_RWops *SDLCALL SDL_RWFromFP(FILE * fp,
+                                                SDL_bool autoclose);
+#else
+extern DECLSPEC SDL_RWops *SDLCALL SDL_RWFromFP(void * fp,
+                                                SDL_bool autoclose);
+#endif
+
+extern DECLSPEC SDL_RWops *SDLCALL SDL_RWFromMem(void *mem, int size);
+extern DECLSPEC SDL_RWops *SDLCALL SDL_RWFromConstMem(const void *mem,
+                                                      int size);
+
+/* @} *//* RWFrom functions */
+
+
+extern DECLSPEC SDL_RWops *SDLCALL SDL_AllocRW(void);
+extern DECLSPEC void SDLCALL SDL_FreeRW(SDL_RWops * area);
+
+#define RW_SEEK_SET 0       /**< Seek from the beginning of data */
+#define RW_SEEK_CUR 1       /**< Seek relative to current read point */
+#define RW_SEEK_END 2       /**< Seek relative to the end of data */
+
+/**
+ *  \name Read/write macros
+ *
+ *  Macros to easily read and write from an SDL_RWops structure.
+ */
+/* @{ */
+#define SDL_RWsize(ctx)         (ctx)->size(ctx)
+#define SDL_RWseek(ctx, offset, whence) (ctx)->seek(ctx, offset, whence)
+#define SDL_RWtell(ctx)         (ctx)->seek(ctx, 0, RW_SEEK_CUR)
+#define SDL_RWread(ctx, ptr, size, n)   (ctx)->read(ctx, ptr, size, n)
+#define SDL_RWwrite(ctx, ptr, size, n)  (ctx)->write(ctx, ptr, size, n)
+#define SDL_RWclose(ctx)        (ctx)->close(ctx)
+/* @} *//* Read/write macros */
+
+
+/**
+ *  \name Read endian functions
+ *
+ *  Read an item of the specified endianness and return in native format.
+ */
+/* @{ */
+extern DECLSPEC Uint8 SDLCALL SDL_ReadU8(SDL_RWops * src);
+extern DECLSPEC Uint16 SDLCALL SDL_ReadLE16(SDL_RWops * src);
+extern DECLSPEC Uint16 SDLCALL SDL_ReadBE16(SDL_RWops * src);
+extern DECLSPEC Uint32 SDLCALL SDL_ReadLE32(SDL_RWops * src);
+extern DECLSPEC Uint32 SDLCALL SDL_ReadBE32(SDL_RWops * src);
+extern DECLSPEC Uint64 SDLCALL SDL_ReadLE64(SDL_RWops * src);
+extern DECLSPEC Uint64 SDLCALL SDL_ReadBE64(SDL_RWops * src);
+/* @} *//* Read endian functions */
+
+/**
+ *  \name Write endian functions
+ *
+ *  Write an item of native format to the specified endianness.
+ */
+/* @{ */
+extern DECLSPEC size_t SDLCALL SDL_WriteU8(SDL_RWops * dst, Uint8 value);
+extern DECLSPEC size_t SDLCALL SDL_WriteLE16(SDL_RWops * dst, Uint16 value);
+extern DECLSPEC size_t SDLCALL SDL_WriteBE16(SDL_RWops * dst, Uint16 value);
+extern DECLSPEC size_t SDLCALL SDL_WriteLE32(SDL_RWops * dst, Uint32 value);
+extern DECLSPEC size_t SDLCALL SDL_WriteBE32(SDL_RWops * dst, Uint32 value);
+extern DECLSPEC size_t SDLCALL SDL_WriteLE64(SDL_RWops * dst, Uint64 value);
+extern DECLSPEC size_t SDLCALL SDL_WriteBE64(SDL_RWops * dst, Uint64 value);
+/* @} *//* Write endian functions */
+
+
+/* Ends C function definitions when using C++ */
+#ifdef __cplusplus
+}
+#endif
+#include "close_code.h"
+
+#endif /* _SDL_rwops_h */
+
+/* vi: set ts=4 sw=4 expandtab: */
diff --git a/include/SDL2/SDL_scancode.h b/include/SDL2/SDL_scancode.h
new file mode 100644 (file)
index 0000000..4b3be28
--- /dev/null
@@ -0,0 +1,401 @@
+/*
+  Simple DirectMedia Layer
+  Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
+
+  This software is provided 'as-is', without any express or implied
+  warranty.  In no event will the authors be held liable for any damages
+  arising from the use of this software.
+
+  Permission is granted to anyone to use this software for any purpose,
+  including commercial applications, and to alter it and redistribute it
+  freely, subject to the following restrictions:
+
+  1. The origin of this software must not be misrepresented; you must not
+     claim that you wrote the original software. If you use this software
+     in a product, an acknowledgment in the product documentation would be
+     appreciated but is not required.
+  2. Altered source versions must be plainly marked as such, and must not be
+     misrepresented as being the original software.
+  3. This notice may not be removed or altered from any source distribution.
+*/
+
+/**
+ *  \file SDL_scancode.h
+ *
+ *  Defines keyboard scancodes.
+ */
+
+#ifndef _SDL_scancode_h
+#define _SDL_scancode_h
+
+#include "SDL_stdinc.h"
+
+/**
+ *  \brief The SDL keyboard scancode representation.
+ *
+ *  Values of this type are used to represent keyboard keys, among other places
+ *  in the \link SDL_Keysym::scancode key.keysym.scancode \endlink field of the
+ *  SDL_Event structure.
+ *
+ *  The values in this enumeration are based on the USB usage page standard:
+ *  http://www.usb.org/developers/devclass_docs/Hut1_12v2.pdf
+ */
+typedef enum
+{
+    SDL_SCANCODE_UNKNOWN = 0,
+
+    /**
+     *  \name Usage page 0x07
+     *
+     *  These values are from usage page 0x07 (USB keyboard page).
+     */
+    /* @{ */
+
+    SDL_SCANCODE_A = 4,
+    SDL_SCANCODE_B = 5,
+    SDL_SCANCODE_C = 6,
+    SDL_SCANCODE_D = 7,
+    SDL_SCANCODE_E = 8,
+    SDL_SCANCODE_F = 9,
+    SDL_SCANCODE_G = 10,
+    SDL_SCANCODE_H = 11,
+    SDL_SCANCODE_I = 12,
+    SDL_SCANCODE_J = 13,
+    SDL_SCANCODE_K = 14,
+    SDL_SCANCODE_L = 15,
+    SDL_SCANCODE_M = 16,
+    SDL_SCANCODE_N = 17,
+    SDL_SCANCODE_O = 18,
+    SDL_SCANCODE_P = 19,
+    SDL_SCANCODE_Q = 20,
+    SDL_SCANCODE_R = 21,
+    SDL_SCANCODE_S = 22,
+    SDL_SCANCODE_T = 23,
+    SDL_SCANCODE_U = 24,
+    SDL_SCANCODE_V = 25,
+    SDL_SCANCODE_W = 26,
+    SDL_SCANCODE_X = 27,
+    SDL_SCANCODE_Y = 28,
+    SDL_SCANCODE_Z = 29,
+
+    SDL_SCANCODE_1 = 30,
+    SDL_SCANCODE_2 = 31,
+    SDL_SCANCODE_3 = 32,
+    SDL_SCANCODE_4 = 33,
+    SDL_SCANCODE_5 = 34,
+    SDL_SCANCODE_6 = 35,
+    SDL_SCANCODE_7 = 36,
+    SDL_SCANCODE_8 = 37,
+    SDL_SCANCODE_9 = 38,
+    SDL_SCANCODE_0 = 39,
+
+    SDL_SCANCODE_RETURN = 40,
+    SDL_SCANCODE_ESCAPE = 41,
+    SDL_SCANCODE_BACKSPACE = 42,
+    SDL_SCANCODE_TAB = 43,
+    SDL_SCANCODE_SPACE = 44,
+
+    SDL_SCANCODE_MINUS = 45,
+    SDL_SCANCODE_EQUALS = 46,
+    SDL_SCANCODE_LEFTBRACKET = 47,
+    SDL_SCANCODE_RIGHTBRACKET = 48,
+    SDL_SCANCODE_BACKSLASH = 49, /**< Located at the lower left of the return
+                                  *   key on ISO keyboards and at the right end
+                                  *   of the QWERTY row on ANSI keyboards.
+                                  *   Produces REVERSE SOLIDUS (backslash) and
+                                  *   VERTICAL LINE in a US layout, REVERSE
+                                  *   SOLIDUS and VERTICAL LINE in a UK Mac
+                                  *   layout, NUMBER SIGN and TILDE in a UK
+                                  *   Windows layout, DOLLAR SIGN and POUND SIGN
+                                  *   in a Swiss German layout, NUMBER SIGN and
+                                  *   APOSTROPHE in a German layout, GRAVE
+                                  *   ACCENT and POUND SIGN in a French Mac
+                                  *   layout, and ASTERISK and MICRO SIGN in a
+                                  *   French Windows layout.
+                                  */
+    SDL_SCANCODE_NONUSHASH = 50, /**< ISO USB keyboards actually use this code
+                                  *   instead of 49 for the same key, but all
+                                  *   OSes I've seen treat the two codes
+                                  *   identically. So, as an implementor, unless
+                                  *   your keyboard generates both of those
+                                  *   codes and your OS treats them differently,
+                                  *   you should generate SDL_SCANCODE_BACKSLASH
+                                  *   instead of this code. As a user, you
+                                  *   should not rely on this code because SDL
+                                  *   will never generate it with most (all?)
+                                  *   keyboards.
+                                  */
+    SDL_SCANCODE_SEMICOLON = 51,
+    SDL_SCANCODE_APOSTROPHE = 52,
+    SDL_SCANCODE_GRAVE = 53, /**< Located in the top left corner (on both ANSI
+                              *   and ISO keyboards). Produces GRAVE ACCENT and
+                              *   TILDE in a US Windows layout and in US and UK
+                              *   Mac layouts on ANSI keyboards, GRAVE ACCENT
+                              *   and NOT SIGN in a UK Windows layout, SECTION
+                              *   SIGN and PLUS-MINUS SIGN in US and UK Mac
+                              *   layouts on ISO keyboards, SECTION SIGN and
+                              *   DEGREE SIGN in a Swiss German layout (Mac:
+                              *   only on ISO keyboards), CIRCUMFLEX ACCENT and
+                              *   DEGREE SIGN in a German layout (Mac: only on
+                              *   ISO keyboards), SUPERSCRIPT TWO and TILDE in a
+                              *   French Windows layout, COMMERCIAL AT and
+                              *   NUMBER SIGN in a French Mac layout on ISO
+                              *   keyboards, and LESS-THAN SIGN and GREATER-THAN
+                              *   SIGN in a Swiss German, German, or French Mac
+                              *   layout on ANSI keyboards.
+                              */
+    SDL_SCANCODE_COMMA = 54,
+    SDL_SCANCODE_PERIOD = 55,
+    SDL_SCANCODE_SLASH = 56,
+
+    SDL_SCANCODE_CAPSLOCK = 57,
+
+    SDL_SCANCODE_F1 = 58,
+    SDL_SCANCODE_F2 = 59,
+    SDL_SCANCODE_F3 = 60,
+    SDL_SCANCODE_F4 = 61,
+    SDL_SCANCODE_F5 = 62,
+    SDL_SCANCODE_F6 = 63,
+    SDL_SCANCODE_F7 = 64,
+    SDL_SCANCODE_F8 = 65,
+    SDL_SCANCODE_F9 = 66,
+    SDL_SCANCODE_F10 = 67,
+    SDL_SCANCODE_F11 = 68,
+    SDL_SCANCODE_F12 = 69,
+
+    SDL_SCANCODE_PRINTSCREEN = 70,
+    SDL_SCANCODE_SCROLLLOCK = 71,
+    SDL_SCANCODE_PAUSE = 72,
+    SDL_SCANCODE_INSERT = 73, /**< insert on PC, help on some Mac keyboards (but
+                                   does send code 73, not 117) */
+    SDL_SCANCODE_HOME = 74,
+    SDL_SCANCODE_PAGEUP = 75,
+    SDL_SCANCODE_DELETE = 76,
+    SDL_SCANCODE_END = 77,
+    SDL_SCANCODE_PAGEDOWN = 78,
+    SDL_SCANCODE_RIGHT = 79,
+    SDL_SCANCODE_LEFT = 80,
+    SDL_SCANCODE_DOWN = 81,
+    SDL_SCANCODE_UP = 82,
+
+    SDL_SCANCODE_NUMLOCKCLEAR = 83, /**< num lock on PC, clear on Mac keyboards
+                                     */
+    SDL_SCANCODE_KP_DIVIDE = 84,
+    SDL_SCANCODE_KP_MULTIPLY = 85,
+    SDL_SCANCODE_KP_MINUS = 86,
+    SDL_SCANCODE_KP_PLUS = 87,
+    SDL_SCANCODE_KP_ENTER = 88,
+    SDL_SCANCODE_KP_1 = 89,
+    SDL_SCANCODE_KP_2 = 90,
+    SDL_SCANCODE_KP_3 = 91,
+    SDL_SCANCODE_KP_4 = 92,
+    SDL_SCANCODE_KP_5 = 93,
+    SDL_SCANCODE_KP_6 = 94,
+    SDL_SCANCODE_KP_7 = 95,
+    SDL_SCANCODE_KP_8 = 96,
+    SDL_SCANCODE_KP_9 = 97,
+    SDL_SCANCODE_KP_0 = 98,
+    SDL_SCANCODE_KP_PERIOD = 99,
+
+    SDL_SCANCODE_NONUSBACKSLASH = 100, /**< This is the additional key that ISO
+                                        *   keyboards have over ANSI ones,
+                                        *   located between left shift and Y.
+                                        *   Produces GRAVE ACCENT and TILDE in a
+                                        *   US or UK Mac layout, REVERSE SOLIDUS
+                                        *   (backslash) and VERTICAL LINE in a
+                                        *   US or UK Windows layout, and
+                                        *   LESS-THAN SIGN and GREATER-THAN SIGN
+                                        *   in a Swiss German, German, or French
+                                        *   layout. */
+    SDL_SCANCODE_APPLICATION = 101, /**< windows contextual menu, compose */
+    SDL_SCANCODE_POWER = 102, /**< The USB document says this is a status flag,
+                               *   not a physical key - but some Mac keyboards
+                               *   do have a power key. */
+    SDL_SCANCODE_KP_EQUALS = 103,
+    SDL_SCANCODE_F13 = 104,
+    SDL_SCANCODE_F14 = 105,
+    SDL_SCANCODE_F15 = 106,
+    SDL_SCANCODE_F16 = 107,
+    SDL_SCANCODE_F17 = 108,
+    SDL_SCANCODE_F18 = 109,
+    SDL_SCANCODE_F19 = 110,
+    SDL_SCANCODE_F20 = 111,
+    SDL_SCANCODE_F21 = 112,
+    SDL_SCANCODE_F22 = 113,
+    SDL_SCANCODE_F23 = 114,
+    SDL_SCANCODE_F24 = 115,
+    SDL_SCANCODE_EXECUTE = 116,
+    SDL_SCANCODE_HELP = 117,
+    SDL_SCANCODE_MENU = 118,
+    SDL_SCANCODE_SELECT = 119,
+    SDL_SCANCODE_STOP = 120,
+    SDL_SCANCODE_AGAIN = 121,   /**< redo */
+    SDL_SCANCODE_UNDO = 122,
+    SDL_SCANCODE_CUT = 123,
+    SDL_SCANCODE_COPY = 124,
+    SDL_SCANCODE_PASTE = 125,
+    SDL_SCANCODE_FIND = 126,
+    SDL_SCANCODE_MUTE = 127,
+    SDL_SCANCODE_VOLUMEUP = 128,
+    SDL_SCANCODE_VOLUMEDOWN = 129,
+/* not sure whether there's a reason to enable these */
+/*     SDL_SCANCODE_LOCKINGCAPSLOCK = 130,  */
+/*     SDL_SCANCODE_LOCKINGNUMLOCK = 131, */
+/*     SDL_SCANCODE_LOCKINGSCROLLLOCK = 132, */
+    SDL_SCANCODE_KP_COMMA = 133,
+    SDL_SCANCODE_KP_EQUALSAS400 = 134,
+
+    SDL_SCANCODE_INTERNATIONAL1 = 135, /**< used on Asian keyboards, see
+                                            footnotes in USB doc */
+    SDL_SCANCODE_INTERNATIONAL2 = 136,
+    SDL_SCANCODE_INTERNATIONAL3 = 137, /**< Yen */
+    SDL_SCANCODE_INTERNATIONAL4 = 138,
+    SDL_SCANCODE_INTERNATIONAL5 = 139,
+    SDL_SCANCODE_INTERNATIONAL6 = 140,
+    SDL_SCANCODE_INTERNATIONAL7 = 141,
+    SDL_SCANCODE_INTERNATIONAL8 = 142,
+    SDL_SCANCODE_INTERNATIONAL9 = 143,
+    SDL_SCANCODE_LANG1 = 144, /**< Hangul/English toggle */
+    SDL_SCANCODE_LANG2 = 145, /**< Hanja conversion */
+    SDL_SCANCODE_LANG3 = 146, /**< Katakana */
+    SDL_SCANCODE_LANG4 = 147, /**< Hiragana */
+    SDL_SCANCODE_LANG5 = 148, /**< Zenkaku/Hankaku */
+    SDL_SCANCODE_LANG6 = 149, /**< reserved */
+    SDL_SCANCODE_LANG7 = 150, /**< reserved */
+    SDL_SCANCODE_LANG8 = 151, /**< reserved */
+    SDL_SCANCODE_LANG9 = 152, /**< reserved */
+
+    SDL_SCANCODE_ALTERASE = 153, /**< Erase-Eaze */
+    SDL_SCANCODE_SYSREQ = 154,
+    SDL_SCANCODE_CANCEL = 155,
+    SDL_SCANCODE_CLEAR = 156,
+    SDL_SCANCODE_PRIOR = 157,
+    SDL_SCANCODE_RETURN2 = 158,
+    SDL_SCANCODE_SEPARATOR = 159,
+    SDL_SCANCODE_OUT = 160,
+    SDL_SCANCODE_OPER = 161,
+    SDL_SCANCODE_CLEARAGAIN = 162,
+    SDL_SCANCODE_CRSEL = 163,
+    SDL_SCANCODE_EXSEL = 164,
+
+    SDL_SCANCODE_KP_00 = 176,
+    SDL_SCANCODE_KP_000 = 177,
+    SDL_SCANCODE_THOUSANDSSEPARATOR = 178,
+    SDL_SCANCODE_DECIMALSEPARATOR = 179,
+    SDL_SCANCODE_CURRENCYUNIT = 180,
+    SDL_SCANCODE_CURRENCYSUBUNIT = 181,
+    SDL_SCANCODE_KP_LEFTPAREN = 182,
+    SDL_SCANCODE_KP_RIGHTPAREN = 183,
+    SDL_SCANCODE_KP_LEFTBRACE = 184,
+    SDL_SCANCODE_KP_RIGHTBRACE = 185,
+    SDL_SCANCODE_KP_TAB = 186,
+    SDL_SCANCODE_KP_BACKSPACE = 187,
+    SDL_SCANCODE_KP_A = 188,
+    SDL_SCANCODE_KP_B = 189,
+    SDL_SCANCODE_KP_C = 190,
+    SDL_SCANCODE_KP_D = 191,
+    SDL_SCANCODE_KP_E = 192,
+    SDL_SCANCODE_KP_F = 193,
+    SDL_SCANCODE_KP_XOR = 194,
+    SDL_SCANCODE_KP_POWER = 195,
+    SDL_SCANCODE_KP_PERCENT = 196,
+    SDL_SCANCODE_KP_LESS = 197,
+    SDL_SCANCODE_KP_GREATER = 198,
+    SDL_SCANCODE_KP_AMPERSAND = 199,
+    SDL_SCANCODE_KP_DBLAMPERSAND = 200,
+    SDL_SCANCODE_KP_VERTICALBAR = 201,
+    SDL_SCANCODE_KP_DBLVERTICALBAR = 202,
+    SDL_SCANCODE_KP_COLON = 203,
+    SDL_SCANCODE_KP_HASH = 204,
+    SDL_SCANCODE_KP_SPACE = 205,
+    SDL_SCANCODE_KP_AT = 206,
+    SDL_SCANCODE_KP_EXCLAM = 207,
+    SDL_SCANCODE_KP_MEMSTORE = 208,
+    SDL_SCANCODE_KP_MEMRECALL = 209,
+    SDL_SCANCODE_KP_MEMCLEAR = 210,
+    SDL_SCANCODE_KP_MEMADD = 211,
+    SDL_SCANCODE_KP_MEMSUBTRACT = 212,
+    SDL_SCANCODE_KP_MEMMULTIPLY = 213,
+    SDL_SCANCODE_KP_MEMDIVIDE = 214,
+    SDL_SCANCODE_KP_PLUSMINUS = 215,
+    SDL_SCANCODE_KP_CLEAR = 216,
+    SDL_SCANCODE_KP_CLEARENTRY = 217,
+    SDL_SCANCODE_KP_BINARY = 218,
+    SDL_SCANCODE_KP_OCTAL = 219,
+    SDL_SCANCODE_KP_DECIMAL = 220,
+    SDL_SCANCODE_KP_HEXADECIMAL = 221,
+
+    SDL_SCANCODE_LCTRL = 224,
+    SDL_SCANCODE_LSHIFT = 225,
+    SDL_SCANCODE_LALT = 226, /**< alt, option */
+    SDL_SCANCODE_LGUI = 227, /**< windows, command (apple), meta */
+    SDL_SCANCODE_RCTRL = 228,
+    SDL_SCANCODE_RSHIFT = 229,
+    SDL_SCANCODE_RALT = 230, /**< alt gr, option */
+    SDL_SCANCODE_RGUI = 231, /**< windows, command (apple), meta */
+
+    SDL_SCANCODE_MODE = 257,    /**< I'm not sure if this is really not covered
+                                 *   by any of the above, but since there's a
+                                 *   special KMOD_MODE for it I'm adding it here
+                                 */
+
+    /* @} *//* Usage page 0x07 */
+
+    /**
+     *  \name Usage page 0x0C
+     *
+     *  These values are mapped from usage page 0x0C (USB consumer page).
+     */
+    /* @{ */
+
+    SDL_SCANCODE_AUDIONEXT = 258,
+    SDL_SCANCODE_AUDIOPREV = 259,
+    SDL_SCANCODE_AUDIOSTOP = 260,
+    SDL_SCANCODE_AUDIOPLAY = 261,
+    SDL_SCANCODE_AUDIOMUTE = 262,
+    SDL_SCANCODE_MEDIASELECT = 263,
+    SDL_SCANCODE_WWW = 264,
+    SDL_SCANCODE_MAIL = 265,
+    SDL_SCANCODE_CALCULATOR = 266,
+    SDL_SCANCODE_COMPUTER = 267,
+    SDL_SCANCODE_AC_SEARCH = 268,
+    SDL_SCANCODE_AC_HOME = 269,
+    SDL_SCANCODE_AC_BACK = 270,
+    SDL_SCANCODE_AC_FORWARD = 271,
+    SDL_SCANCODE_AC_STOP = 272,
+    SDL_SCANCODE_AC_REFRESH = 273,
+    SDL_SCANCODE_AC_BOOKMARKS = 274,
+
+    /* @} *//* Usage page 0x0C */
+
+    /**
+     *  \name Walther keys
+     *
+     *  These are values that Christian Walther added (for mac keyboard?).
+     */
+    /* @{ */
+
+    SDL_SCANCODE_BRIGHTNESSDOWN = 275,
+    SDL_SCANCODE_BRIGHTNESSUP = 276,
+    SDL_SCANCODE_DISPLAYSWITCH = 277, /**< display mirroring/dual display
+                                           switch, video mode switch */
+    SDL_SCANCODE_KBDILLUMTOGGLE = 278,
+    SDL_SCANCODE_KBDILLUMDOWN = 279,
+    SDL_SCANCODE_KBDILLUMUP = 280,
+    SDL_SCANCODE_EJECT = 281,
+    SDL_SCANCODE_SLEEP = 282,
+
+    SDL_SCANCODE_APP1 = 283,
+    SDL_SCANCODE_APP2 = 284,
+
+    /* @} *//* Walther keys */
+
+    /* Add any other keys here. */
+
+    SDL_NUM_SCANCODES = 512 /**< not a key, just marks the number of scancodes
+                                 for array bounds */
+} SDL_Scancode;
+
+#endif /* _SDL_scancode_h */
+
+/* vi: set ts=4 sw=4 expandtab: */
diff --git a/include/SDL2/SDL_shape.h b/include/SDL2/SDL_shape.h
new file mode 100644 (file)
index 0000000..5302930
--- /dev/null
@@ -0,0 +1,143 @@
+/*
+  Simple DirectMedia Layer
+  Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
+
+  This software is provided 'as-is', without any express or implied
+  warranty.  In no event will the authors be held liable for any damages
+  arising from the use of this software.
+
+  Permission is granted to anyone to use this software for any purpose,
+  including commercial applications, and to alter it and redistribute it
+  freely, subject to the following restrictions:
+
+  1. The origin of this software must not be misrepresented; you must not
+     claim that you wrote the original software. If you use this software
+     in a product, an acknowledgment in the product documentation would be
+     appreciated but is not required.
+  2. Altered source versions must be plainly marked as such, and must not be
+     misrepresented as being the original software.
+  3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef _SDL_shape_h
+#define _SDL_shape_h
+
+#include "SDL_stdinc.h"
+#include "SDL_pixels.h"
+#include "SDL_rect.h"
+#include "SDL_surface.h"
+#include "SDL_video.h"
+
+#include "begin_code.h"
+/* Set up for C function definitions, even when using C++ */
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/** \file SDL_shape.h
+ *
+ * Header file for the shaped window API.
+ */
+
+#define SDL_NONSHAPEABLE_WINDOW -1
+#define SDL_INVALID_SHAPE_ARGUMENT -2
+#define SDL_WINDOW_LACKS_SHAPE -3
+
+/**
+ *  \brief Create a window that can be shaped with the specified position, dimensions, and flags.
+ *
+ *  \param title The title of the window, in UTF-8 encoding.
+ *  \param x     The x position of the window, ::SDL_WINDOWPOS_CENTERED, or
+ *               ::SDL_WINDOWPOS_UNDEFINED.
+ *  \param y     The y position of the window, ::SDL_WINDOWPOS_CENTERED, or
+ *               ::SDL_WINDOWPOS_UNDEFINED.
+ *  \param w     The width of the window.
+ *  \param h     The height of the window.
+ *  \param flags The flags for the window, a mask of SDL_WINDOW_BORDERLESS with any of the following:
+ *               ::SDL_WINDOW_OPENGL,     ::SDL_WINDOW_INPUT_GRABBED,
+ *               ::SDL_WINDOW_HIDDEN,     ::SDL_WINDOW_RESIZABLE,
+ *               ::SDL_WINDOW_MAXIMIZED,  ::SDL_WINDOW_MINIMIZED,
+ *       ::SDL_WINDOW_BORDERLESS is always set, and ::SDL_WINDOW_FULLSCREEN is always unset.
+ *
+ *  \return The window created, or NULL if window creation failed.
+ *
+ *  \sa SDL_DestroyWindow()
+ */
+extern DECLSPEC SDL_Window * SDLCALL SDL_CreateShapedWindow(const char *title,unsigned int x,unsigned int y,unsigned int w,unsigned int h,Uint32 flags);
+
+/**
+ * \brief Return whether the given window is a shaped window.
+ *
+ * \param window The window to query for being shaped.
+ *
+ * \return SDL_TRUE if the window is a window that can be shaped, SDL_FALSE if the window is unshaped or NULL.
+ * \sa SDL_CreateShapedWindow
+ */
+extern DECLSPEC SDL_bool SDLCALL SDL_IsShapedWindow(const SDL_Window *window);
+
+/** \brief An enum denoting the specific type of contents present in an SDL_WindowShapeParams union. */
+typedef enum {
+    /** \brief The default mode, a binarized alpha cutoff of 1. */
+    ShapeModeDefault,
+    /** \brief A binarized alpha cutoff with a given integer value. */
+    ShapeModeBinarizeAlpha,
+    /** \brief A binarized alpha cutoff with a given integer value, but with the opposite comparison. */
+    ShapeModeReverseBinarizeAlpha,
+    /** \brief A color key is applied. */
+    ShapeModeColorKey
+} WindowShapeMode;
+
+#define SDL_SHAPEMODEALPHA(mode) (mode == ShapeModeDefault || mode == ShapeModeBinarizeAlpha || mode == ShapeModeReverseBinarizeAlpha)
+
+/** \brief A union containing parameters for shaped windows. */
+typedef union {
+    /** \brief a cutoff alpha value for binarization of the window shape's alpha channel. */
+    Uint8 binarizationCutoff;
+    SDL_Color colorKey;
+} SDL_WindowShapeParams;
+
+/** \brief A struct that tags the SDL_WindowShapeParams union with an enum describing the type of its contents. */
+typedef struct SDL_WindowShapeMode {
+    /** \brief The mode of these window-shape parameters. */
+    WindowShapeMode mode;
+    /** \brief Window-shape parameters. */
+    SDL_WindowShapeParams parameters;
+} SDL_WindowShapeMode;
+
+/**
+ * \brief Set the shape and parameters of a shaped window.
+ *
+ * \param window The shaped window whose parameters should be set.
+ * \param shape A surface encoding the desired shape for the window.
+ * \param shape_mode The parameters to set for the shaped window.
+ *
+ * \return 0 on success, SDL_INVALID_SHAPE_ARGUMENT on invalid an invalid shape argument, or SDL_NONSHAPEABLE_WINDOW
+ *           if the SDL_Window* given does not reference a valid shaped window.
+ *
+ * \sa SDL_WindowShapeMode
+ * \sa SDL_GetShapedWindowMode.
+ */
+extern DECLSPEC int SDLCALL SDL_SetWindowShape(SDL_Window *window,SDL_Surface *shape,SDL_WindowShapeMode *shape_mode);
+
+/**
+ * \brief Get the shape parameters of a shaped window.
+ *
+ * \param window The shaped window whose parameters should be retrieved.
+ * \param shape_mode An empty shape-mode structure to fill, or NULL to check whether the window has a shape.
+ *
+ * \return 0 if the window has a shape and, provided shape_mode was not NULL, shape_mode has been filled with the mode
+ *           data, SDL_NONSHAPEABLE_WINDOW if the SDL_Window given is not a shaped window, or SDL_WINDOW_LACKS_SHAPE if
+ *           the SDL_Window* given is a shapeable window currently lacking a shape.
+ *
+ * \sa SDL_WindowShapeMode
+ * \sa SDL_SetWindowShape
+ */
+extern DECLSPEC int SDLCALL SDL_GetShapedWindowMode(SDL_Window *window,SDL_WindowShapeMode *shape_mode);
+
+/* Ends C function definitions when using C++ */
+#ifdef __cplusplus
+}
+#endif
+#include "close_code.h"
+
+#endif /* _SDL_shape_h */
diff --git a/include/SDL2/SDL_stdinc.h b/include/SDL2/SDL_stdinc.h
new file mode 100644 (file)
index 0000000..31b343d
--- /dev/null
@@ -0,0 +1,405 @@
+/*
+  Simple DirectMedia Layer
+  Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
+
+  This software is provided 'as-is', without any express or implied
+  warranty.  In no event will the authors be held liable for any damages
+  arising from the use of this software.
+
+  Permission is granted to anyone to use this software for any purpose,
+  including commercial applications, and to alter it and redistribute it
+  freely, subject to the following restrictions:
+
+  1. The origin of this software must not be misrepresented; you must not
+     claim that you wrote the original software. If you use this software
+     in a product, an acknowledgment in the product documentation would be
+     appreciated but is not required.
+  2. Altered source versions must be plainly marked as such, and must not be
+     misrepresented as being the original software.
+  3. This notice may not be removed or altered from any source distribution.
+*/
+
+/**
+ *  \file SDL_stdinc.h
+ *
+ *  This is a general header that includes C language support.
+ */
+
+#ifndef _SDL_stdinc_h
+#define _SDL_stdinc_h
+
+#include "SDL_config.h"
+
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#ifdef HAVE_STDIO_H
+#include <stdio.h>
+#endif
+#if defined(STDC_HEADERS)
+# include <stdlib.h>
+# include <stddef.h>
+# include <stdarg.h>
+#else
+# if defined(HAVE_STDLIB_H)
+#  include <stdlib.h>
+# elif defined(HAVE_MALLOC_H)
+#  include <malloc.h>
+# endif
+# if defined(HAVE_STDDEF_H)
+#  include <stddef.h>
+# endif
+# if defined(HAVE_STDARG_H)
+#  include <stdarg.h>
+# endif
+#endif
+#ifdef HAVE_STRING_H
+# if !defined(STDC_HEADERS) && defined(HAVE_MEMORY_H)
+#  include <memory.h>
+# endif
+# include <string.h>
+#endif
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
+#endif
+#if defined(HAVE_INTTYPES_H)
+# include <inttypes.h>
+#elif defined(HAVE_STDINT_H)
+# include <stdint.h>
+#endif
+#ifdef HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+#ifdef HAVE_MATH_H
+# if defined(__WINRT__)
+/* Defining _USE_MATH_DEFINES is required to get M_PI to be defined on
+   WinRT.  See http://msdn.microsoft.com/en-us/library/4hwaceh6.aspx
+   for more information.
+*/
+#  define _USE_MATH_DEFINES
+# endif
+# include <math.h>
+#endif
+#ifdef HAVE_FLOAT_H
+# include <float.h>
+#endif
+#if defined(HAVE_ICONV) && defined(HAVE_ICONV_H)
+# include <iconv.h>
+#endif
+
+/**
+ *  The number of elements in an array.
+ */
+#define SDL_arraysize(array)    (sizeof(array)/sizeof(array[0]))
+#define SDL_TABLESIZE(table)    SDL_arraysize(table)
+
+/**
+ *  \name Cast operators
+ *
+ *  Use proper C++ casts when compiled as C++ to be compatible with the option
+ *  -Wold-style-cast of GCC (and -Werror=old-style-cast in GCC 4.2 and above).
+ */
+/* @{ */
+#ifdef __cplusplus
+#define SDL_reinterpret_cast(type, expression) reinterpret_cast<type>(expression)
+#define SDL_static_cast(type, expression) static_cast<type>(expression)
+#define SDL_const_cast(type, expression) const_cast<type>(expression)
+#else
+#define SDL_reinterpret_cast(type, expression) ((type)(expression))
+#define SDL_static_cast(type, expression) ((type)(expression))
+#define SDL_const_cast(type, expression) ((type)(expression))
+#endif
+/* @} *//* Cast operators */
+
+/* Define a four character code as a Uint32 */
+#define SDL_FOURCC(A, B, C, D) \
+    ((SDL_static_cast(Uint32, SDL_static_cast(Uint8, (A))) << 0) | \
+     (SDL_static_cast(Uint32, SDL_static_cast(Uint8, (B))) << 8) | \
+     (SDL_static_cast(Uint32, SDL_static_cast(Uint8, (C))) << 16) | \
+     (SDL_static_cast(Uint32, SDL_static_cast(Uint8, (D))) << 24))
+
+/**
+ *  \name Basic data types
+ */
+/* @{ */
+
+typedef enum
+{
+    SDL_FALSE = 0,
+    SDL_TRUE = 1
+} SDL_bool;
+
+/**
+ * \brief A signed 8-bit integer type.
+ */
+typedef int8_t Sint8;
+/**
+ * \brief An unsigned 8-bit integer type.
+ */
+typedef uint8_t Uint8;
+/**
+ * \brief A signed 16-bit integer type.
+ */
+typedef int16_t Sint16;
+/**
+ * \brief An unsigned 16-bit integer type.
+ */
+typedef uint16_t Uint16;
+/**
+ * \brief A signed 32-bit integer type.
+ */
+typedef int32_t Sint32;
+/**
+ * \brief An unsigned 32-bit integer type.
+ */
+typedef uint32_t Uint32;
+
+/**
+ * \brief A signed 64-bit integer type.
+ */
+typedef int64_t Sint64;
+/**
+ * \brief An unsigned 64-bit integer type.
+ */
+typedef uint64_t Uint64;
+
+/* @} *//* Basic data types */
+
+
+#define SDL_COMPILE_TIME_ASSERT(name, x)               \
+       typedef int SDL_dummy_ ## name[(x) * 2 - 1]
+/** \cond */
+#ifndef DOXYGEN_SHOULD_IGNORE_THIS
+SDL_COMPILE_TIME_ASSERT(uint8, sizeof(Uint8) == 1);
+SDL_COMPILE_TIME_ASSERT(sint8, sizeof(Sint8) == 1);
+SDL_COMPILE_TIME_ASSERT(uint16, sizeof(Uint16) == 2);
+SDL_COMPILE_TIME_ASSERT(sint16, sizeof(Sint16) == 2);
+SDL_COMPILE_TIME_ASSERT(uint32, sizeof(Uint32) == 4);
+SDL_COMPILE_TIME_ASSERT(sint32, sizeof(Sint32) == 4);
+SDL_COMPILE_TIME_ASSERT(uint64, sizeof(Uint64) == 8);
+SDL_COMPILE_TIME_ASSERT(sint64, sizeof(Sint64) == 8);
+#endif /* DOXYGEN_SHOULD_IGNORE_THIS */
+/** \endcond */
+
+/* Check to make sure enums are the size of ints, for structure packing.
+   For both Watcom C/C++ and Borland C/C++ the compiler option that makes
+   enums having the size of an int must be enabled.
+   This is "-b" for Borland C/C++ and "-ei" for Watcom C/C++ (v11).
+*/
+
+/** \cond */
+#ifndef DOXYGEN_SHOULD_IGNORE_THIS
+#if !defined(__ANDROID__)
+   /* TODO: include/SDL_stdinc.h:174: error: size of array 'SDL_dummy_enum' is negative */
+typedef enum
+{
+    DUMMY_ENUM_VALUE
+} SDL_DUMMY_ENUM;
+
+SDL_COMPILE_TIME_ASSERT(enum, sizeof(SDL_DUMMY_ENUM) == sizeof(int));
+#endif
+#endif /* DOXYGEN_SHOULD_IGNORE_THIS */
+/** \endcond */
+
+#include "begin_code.h"
+/* Set up for C function definitions, even when using C++ */
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if defined(HAVE_ALLOCA) && !defined(alloca)
+# if defined(HAVE_ALLOCA_H)
+#  include <alloca.h>
+# elif defined(__GNUC__)
+#  define alloca __builtin_alloca
+# elif defined(_MSC_VER)
+#  include <malloc.h>
+#  define alloca _alloca
+# elif defined(__WATCOMC__)
+#  include <malloc.h>
+# elif defined(__BORLANDC__)
+#  include <malloc.h>
+# elif defined(__DMC__)
+#  include <stdlib.h>
+# elif defined(__AIX__)
+#pragma alloca
+# elif defined(__MRC__)
+void *alloca(unsigned);
+# else
+char *alloca();
+# endif
+#endif
+#ifdef HAVE_ALLOCA
+#define SDL_stack_alloc(type, count)    (type*)alloca(sizeof(type)*(count))
+#define SDL_stack_free(data)
+#else
+#define SDL_stack_alloc(type, count)    (type*)SDL_malloc(sizeof(type)*(count))
+#define SDL_stack_free(data)            SDL_free(data)
+#endif
+
+extern DECLSPEC void *SDLCALL SDL_malloc(size_t size);
+extern DECLSPEC void *SDLCALL SDL_calloc(size_t nmemb, size_t size);
+extern DECLSPEC void *SDLCALL SDL_realloc(void *mem, size_t size);
+extern DECLSPEC void SDLCALL SDL_free(void *mem);
+
+extern DECLSPEC char *SDLCALL SDL_getenv(const char *name);
+extern DECLSPEC int SDLCALL SDL_setenv(const char *name, const char *value, int overwrite);
+
+extern DECLSPEC void SDLCALL SDL_qsort(void *base, size_t nmemb, size_t size, int (*compare) (const void *, const void *));
+
+extern DECLSPEC int SDLCALL SDL_abs(int x);
+
+/* !!! FIXME: these have side effects. You probably shouldn't use them. */
+/* !!! FIXME: Maybe we do forceinline functions of SDL_mini, SDL_minf, etc? */
+#define SDL_min(x, y) (((x) < (y)) ? (x) : (y))
+#define SDL_max(x, y) (((x) > (y)) ? (x) : (y))
+
+extern DECLSPEC int SDLCALL SDL_isdigit(int x);
+extern DECLSPEC int SDLCALL SDL_isspace(int x);
+extern DECLSPEC int SDLCALL SDL_toupper(int x);
+extern DECLSPEC int SDLCALL SDL_tolower(int x);
+
+extern DECLSPEC void *SDLCALL SDL_memset(void *dst, int c, size_t len);
+
+#define SDL_zero(x) SDL_memset(&(x), 0, sizeof((x)))
+#define SDL_zerop(x) SDL_memset((x), 0, sizeof(*(x)))
+
+/* Note that memset() is a byte assignment and this is a 32-bit assignment, so they're not directly equivalent. */
+SDL_FORCE_INLINE void SDL_memset4(void *dst, Uint32 val, size_t dwords)
+{
+#if defined(__GNUC__) && defined(i386)
+    int u0, u1, u2;
+    __asm__ __volatile__ (
+        "cld \n\t"
+        "rep ; stosl \n\t"
+        : "=&D" (u0), "=&a" (u1), "=&c" (u2)
+        : "0" (dst), "1" (val), "2" (SDL_static_cast(Uint32, dwords))
+        : "memory"
+    );
+#else
+    size_t _n = (dwords + 3) / 4;
+    Uint32 *_p = SDL_static_cast(Uint32 *, dst);
+    Uint32 _val = (val);
+    if (dwords == 0)
+        return;
+    switch (dwords % 4)
+    {
+        case 0: do {    *_p++ = _val;
+        case 3:         *_p++ = _val;
+        case 2:         *_p++ = _val;
+        case 1:         *_p++ = _val;
+        } while ( --_n );
+    }
+#endif
+}
+
+
+extern DECLSPEC void *SDLCALL SDL_memcpy(void *dst, const void *src, size_t len);
+
+SDL_FORCE_INLINE void *SDL_memcpy4(void *dst, const void *src, size_t dwords)
+{
+    return SDL_memcpy(dst, src, dwords * 4);
+}
+
+extern DECLSPEC void *SDLCALL SDL_memmove(void *dst, const void *src, size_t len);
+extern DECLSPEC int SDLCALL SDL_memcmp(const void *s1, const void *s2, size_t len);
+
+extern DECLSPEC size_t SDLCALL SDL_wcslen(const wchar_t *wstr);
+extern DECLSPEC size_t SDLCALL SDL_wcslcpy(wchar_t *dst, const wchar_t *src, size_t maxlen);
+extern DECLSPEC size_t SDLCALL SDL_wcslcat(wchar_t *dst, const wchar_t *src, size_t maxlen);
+
+extern DECLSPEC size_t SDLCALL SDL_strlen(const char *str);
+extern DECLSPEC size_t SDLCALL SDL_strlcpy(char *dst, const char *src, size_t maxlen);
+extern DECLSPEC size_t SDLCALL SDL_utf8strlcpy(char *dst, const char *src, size_t dst_bytes);
+extern DECLSPEC size_t SDLCALL SDL_strlcat(char *dst, const char *src, size_t maxlen);
+extern DECLSPEC char *SDLCALL SDL_strdup(const char *str);
+extern DECLSPEC char *SDLCALL SDL_strrev(char *str);
+extern DECLSPEC char *SDLCALL SDL_strupr(char *str);
+extern DECLSPEC char *SDLCALL SDL_strlwr(char *str);
+extern DECLSPEC char *SDLCALL SDL_strchr(const char *str, int c);
+extern DECLSPEC char *SDLCALL SDL_strrchr(const char *str, int c);
+extern DECLSPEC char *SDLCALL SDL_strstr(const char *haystack, const char *needle);
+
+extern DECLSPEC char *SDLCALL SDL_itoa(int value, char *str, int radix);
+extern DECLSPEC char *SDLCALL SDL_uitoa(unsigned int value, char *str, int radix);
+extern DECLSPEC char *SDLCALL SDL_ltoa(long value, char *str, int radix);
+extern DECLSPEC char *SDLCALL SDL_ultoa(unsigned long value, char *str, int radix);
+extern DECLSPEC char *SDLCALL SDL_lltoa(Sint64 value, char *str, int radix);
+extern DECLSPEC char *SDLCALL SDL_ulltoa(Uint64 value, char *str, int radix);
+
+extern DECLSPEC int SDLCALL SDL_atoi(const char *str);
+extern DECLSPEC double SDLCALL SDL_atof(const char *str);
+extern DECLSPEC long SDLCALL SDL_strtol(const char *str, char **endp, int base);
+extern DECLSPEC unsigned long SDLCALL SDL_strtoul(const char *str, char **endp, int base);
+extern DECLSPEC Sint64 SDLCALL SDL_strtoll(const char *str, char **endp, int base);
+extern DECLSPEC Uint64 SDLCALL SDL_strtoull(const char *str, char **endp, int base);
+extern DECLSPEC double SDLCALL SDL_strtod(const char *str, char **endp);
+
+extern DECLSPEC int SDLCALL SDL_strcmp(const char *str1, const char *str2);
+extern DECLSPEC int SDLCALL SDL_strncmp(const char *str1, const char *str2, size_t maxlen);
+extern DECLSPEC int SDLCALL SDL_strcasecmp(const char *str1, const char *str2);
+extern DECLSPEC int SDLCALL SDL_strncasecmp(const char *str1, const char *str2, size_t len);
+
+extern DECLSPEC int SDLCALL SDL_sscanf(const char *text, const char *fmt, ...);
+extern DECLSPEC int SDLCALL SDL_vsscanf(const char *text, const char *fmt, va_list ap);
+extern DECLSPEC int SDLCALL SDL_snprintf(char *text, size_t maxlen, const char *fmt, ...);
+extern DECLSPEC int SDLCALL SDL_vsnprintf(char *text, size_t maxlen, const char *fmt, va_list ap);
+
+#ifndef HAVE_M_PI
+#ifndef M_PI
+#define M_PI    3.14159265358979323846264338327950288   /* pi */
+#endif
+#endif
+
+extern DECLSPEC double SDLCALL SDL_acos(double x);
+extern DECLSPEC double SDLCALL SDL_asin(double x);
+extern DECLSPEC double SDLCALL SDL_atan(double x);
+extern DECLSPEC double SDLCALL SDL_atan2(double x, double y);
+extern DECLSPEC double SDLCALL SDL_ceil(double x);
+extern DECLSPEC double SDLCALL SDL_copysign(double x, double y);
+extern DECLSPEC double SDLCALL SDL_cos(double x);
+extern DECLSPEC float SDLCALL SDL_cosf(float x);
+extern DECLSPEC double SDLCALL SDL_fabs(double x);
+extern DECLSPEC double SDLCALL SDL_floor(double x);
+extern DECLSPEC double SDLCALL SDL_log(double x);
+extern DECLSPEC double SDLCALL SDL_pow(double x, double y);
+extern DECLSPEC double SDLCALL SDL_scalbn(double x, int n);
+extern DECLSPEC double SDLCALL SDL_sin(double x);
+extern DECLSPEC float SDLCALL SDL_sinf(float x);
+extern DECLSPEC double SDLCALL SDL_sqrt(double x);
+
+/* The SDL implementation of iconv() returns these error codes */
+#define SDL_ICONV_ERROR     (size_t)-1
+#define SDL_ICONV_E2BIG     (size_t)-2
+#define SDL_ICONV_EILSEQ    (size_t)-3
+#define SDL_ICONV_EINVAL    (size_t)-4
+
+/* SDL_iconv_* are now always real symbols/types, not macros or inlined. */
+typedef struct _SDL_iconv_t *SDL_iconv_t;
+extern DECLSPEC SDL_iconv_t SDLCALL SDL_iconv_open(const char *tocode,
+                                                   const char *fromcode);
+extern DECLSPEC int SDLCALL SDL_iconv_close(SDL_iconv_t cd);
+extern DECLSPEC size_t SDLCALL SDL_iconv(SDL_iconv_t cd, const char **inbuf,
+                                         size_t * inbytesleft, char **outbuf,
+                                         size_t * outbytesleft);
+/**
+ *  This function converts a string between encodings in one pass, returning a
+ *  string that must be freed with SDL_free() or NULL on error.
+ */
+extern DECLSPEC char *SDLCALL SDL_iconv_string(const char *tocode,
+                                               const char *fromcode,
+                                               const char *inbuf,
+                                               size_t inbytesleft);
+#define SDL_iconv_utf8_locale(S)    SDL_iconv_string("", "UTF-8", S, SDL_strlen(S)+1)
+#define SDL_iconv_utf8_ucs2(S)      (Uint16 *)SDL_iconv_string("UCS-2-INTERNAL", "UTF-8", S, SDL_strlen(S)+1)
+#define SDL_iconv_utf8_ucs4(S)      (Uint32 *)SDL_iconv_string("UCS-4-INTERNAL", "UTF-8", S, SDL_strlen(S)+1)
+
+/* Ends C function definitions when using C++ */
+#ifdef __cplusplus
+}
+#endif
+#include "close_code.h"
+
+#endif /* _SDL_stdinc_h */
+
+/* vi: set ts=4 sw=4 expandtab: */
diff --git a/include/SDL2/SDL_surface.h b/include/SDL2/SDL_surface.h
new file mode 100644 (file)
index 0000000..aa8d821
--- /dev/null
@@ -0,0 +1,503 @@
+/*
+  Simple DirectMedia Layer
+  Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
+
+  This software is provided 'as-is', without any express or implied
+  warranty.  In no event will the authors be held liable for any damages
+  arising from the use of this software.
+
+  Permission is granted to anyone to use this software for any purpose,
+  including commercial applications, and to alter it and redistribute it
+  freely, subject to the following restrictions:
+
+  1. The origin of this software must not be misrepresented; you must not
+     claim that you wrote the original software. If you use this software
+     in a product, an acknowledgment in the product documentation would be
+     appreciated but is not required.
+  2. Altered source versions must be plainly marked as such, and must not be
+     misrepresented as being the original software.
+  3. This notice may not be removed or altered from any source distribution.
+*/
+
+/**
+ *  \file SDL_surface.h
+ *
+ *  Header file for ::SDL_Surface definition and management functions.
+ */
+
+#ifndef _SDL_surface_h
+#define _SDL_surface_h
+
+#include "SDL_stdinc.h"
+#include "SDL_pixels.h"
+#include "SDL_rect.h"
+#include "SDL_blendmode.h"
+#include "SDL_rwops.h"
+
+#include "begin_code.h"
+/* Set up for C function definitions, even when using C++ */
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ *  \name Surface flags
+ *
+ *  These are the currently supported flags for the ::SDL_Surface.
+ *
+ *  \internal
+ *  Used internally (read-only).
+ */
+/* @{ */
+#define SDL_SWSURFACE       0           /**< Just here for compatibility */
+#define SDL_PREALLOC        0x00000001  /**< Surface uses preallocated memory */
+#define SDL_RLEACCEL        0x00000002  /**< Surface is RLE encoded */
+#define SDL_DONTFREE        0x00000004  /**< Surface is referenced internally */
+/* @} *//* Surface flags */
+
+/**
+ *  Evaluates to true if the surface needs to be locked before access.
+ */
+#define SDL_MUSTLOCK(S) (((S)->flags & SDL_RLEACCEL) != 0)
+
+/**
+ * \brief A collection of pixels used in software blitting.
+ *
+ * \note  This structure should be treated as read-only, except for \c pixels,
+ *        which, if not NULL, contains the raw pixel data for the surface.
+ */
+typedef struct SDL_Surface
+{
+    Uint32 flags;               /**< Read-only */
+    SDL_PixelFormat *format;    /**< Read-only */
+    int w, h;                   /**< Read-only */
+    int pitch;                  /**< Read-only */
+    void *pixels;               /**< Read-write */
+
+    /** Application data associated with the surface */
+    void *userdata;             /**< Read-write */
+
+    /** information needed for surfaces requiring locks */
+    int locked;                 /**< Read-only */
+    void *lock_data;            /**< Read-only */
+
+    /** clipping information */
+    SDL_Rect clip_rect;         /**< Read-only */
+
+    /** info for fast blit mapping to other surfaces */
+    struct SDL_BlitMap *map;    /**< Private */
+
+    /** Reference count -- used when freeing surface */
+    int refcount;               /**< Read-mostly */
+} SDL_Surface;
+
+/**
+ * \brief The type of function used for surface blitting functions.
+ */
+typedef int (*SDL_blit) (struct SDL_Surface * src, SDL_Rect * srcrect,
+                         struct SDL_Surface * dst, SDL_Rect * dstrect);
+
+/**
+ *  Allocate and free an RGB surface.
+ *
+ *  If the depth is 4 or 8 bits, an empty palette is allocated for the surface.
+ *  If the depth is greater than 8 bits, the pixel format is set using the
+ *  flags '[RGB]mask'.
+ *
+ *  If the function runs out of memory, it will return NULL.
+ *
+ *  \param flags The \c flags are obsolete and should be set to 0.
+ *  \param width The width in pixels of the surface to create.
+ *  \param height The height in pixels of the surface to create.
+ *  \param depth The depth in bits of the surface to create.
+ *  \param Rmask The red mask of the surface to create.
+ *  \param Gmask The green mask of the surface to create.
+ *  \param Bmask The blue mask of the surface to create.
+ *  \param Amask The alpha mask of the surface to create.
+ */
+extern DECLSPEC SDL_Surface *SDLCALL SDL_CreateRGBSurface
+    (Uint32 flags, int width, int height, int depth,
+     Uint32 Rmask, Uint32 Gmask, Uint32 Bmask, Uint32 Amask);
+extern DECLSPEC SDL_Surface *SDLCALL SDL_CreateRGBSurfaceFrom(void *pixels,
+                                                              int width,
+                                                              int height,
+                                                              int depth,
+                                                              int pitch,
+                                                              Uint32 Rmask,
+                                                              Uint32 Gmask,
+                                                              Uint32 Bmask,
+                                                              Uint32 Amask);
+extern DECLSPEC void SDLCALL SDL_FreeSurface(SDL_Surface * surface);
+
+/**
+ *  \brief Set the palette used by a surface.
+ *
+ *  \return 0, or -1 if the surface format doesn't use a palette.
+ *
+ *  \note A single palette can be shared with many surfaces.
+ */
+extern DECLSPEC int SDLCALL SDL_SetSurfacePalette(SDL_Surface * surface,
+                                                  SDL_Palette * palette);
+
+/**
+ *  \brief Sets up a surface for directly accessing the pixels.
+ *
+ *  Between calls to SDL_LockSurface() / SDL_UnlockSurface(), you can write
+ *  to and read from \c surface->pixels, using the pixel format stored in
+ *  \c surface->format.  Once you are done accessing the surface, you should
+ *  use SDL_UnlockSurface() to release it.
+ *
+ *  Not all surfaces require locking.  If SDL_MUSTLOCK(surface) evaluates
+ *  to 0, then you can read and write to the surface at any time, and the
+ *  pixel format of the surface will not change.
+ *
+ *  No operating system or library calls should be made between lock/unlock
+ *  pairs, as critical system locks may be held during this time.
+ *
+ *  SDL_LockSurface() returns 0, or -1 if the surface couldn't be locked.
+ *
+ *  \sa SDL_UnlockSurface()
+ */
+extern DECLSPEC int SDLCALL SDL_LockSurface(SDL_Surface * surface);
+/** \sa SDL_LockSurface() */
+extern DECLSPEC void SDLCALL SDL_UnlockSurface(SDL_Surface * surface);
+
+/**
+ *  Load a surface from a seekable SDL data stream (memory or file).
+ *
+ *  If \c freesrc is non-zero, the stream will be closed after being read.
+ *
+ *  The new surface should be freed with SDL_FreeSurface().
+ *
+ *  \return the new surface, or NULL if there was an error.
+ */
+extern DECLSPEC SDL_Surface *SDLCALL SDL_LoadBMP_RW(SDL_RWops * src,
+                                                    int freesrc);
+
+/**
+ *  Load a surface from a file.
+ *
+ *  Convenience macro.
+ */
+#define SDL_LoadBMP(file)   SDL_LoadBMP_RW(SDL_RWFromFile(file, "rb"), 1)
+
+/**
+ *  Save a surface to a seekable SDL data stream (memory or file).
+ *
+ *  If \c freedst is non-zero, the stream will be closed after being written.
+ *
+ *  \return 0 if successful or -1 if there was an error.
+ */
+extern DECLSPEC int SDLCALL SDL_SaveBMP_RW
+    (SDL_Surface * surface, SDL_RWops * dst, int freedst);
+
+/**
+ *  Save a surface to a file.
+ *
+ *  Convenience macro.
+ */
+#define SDL_SaveBMP(surface, file) \
+        SDL_SaveBMP_RW(surface, SDL_RWFromFile(file, "wb"), 1)
+
+/**
+ *  \brief Sets the RLE acceleration hint for a surface.
+ *
+ *  \return 0 on success, or -1 if the surface is not valid
+ *
+ *  \note If RLE is enabled, colorkey and alpha blending blits are much faster,
+ *        but the surface must be locked before directly accessing the pixels.
+ */
+extern DECLSPEC int SDLCALL SDL_SetSurfaceRLE(SDL_Surface * surface,
+                                              int flag);
+
+/**
+ *  \brief Sets the color key (transparent pixel) in a blittable surface.
+ *
+ *  \param surface The surface to update
+ *  \param flag Non-zero to enable colorkey and 0 to disable colorkey
+ *  \param key The transparent pixel in the native surface format
+ *
+ *  \return 0 on success, or -1 if the surface is not valid
+ *
+ *  You can pass SDL_RLEACCEL to enable RLE accelerated blits.
+ */
+extern DECLSPEC int SDLCALL SDL_SetColorKey(SDL_Surface * surface,
+                                            int flag, Uint32 key);
+
+/**
+ *  \brief Gets the color key (transparent pixel) in a blittable surface.
+ *
+ *  \param surface The surface to update
+ *  \param key A pointer filled in with the transparent pixel in the native
+ *             surface format
+ *
+ *  \return 0 on success, or -1 if the surface is not valid or colorkey is not
+ *          enabled.
+ */
+extern DECLSPEC int SDLCALL SDL_GetColorKey(SDL_Surface * surface,
+                                            Uint32 * key);
+
+/**
+ *  \brief Set an additional color value used in blit operations.
+ *
+ *  \param surface The surface to update.
+ *  \param r The red color value multiplied into blit operations.
+ *  \param g The green color value multiplied into blit operations.
+ *  \param b The blue color value multiplied into blit operations.
+ *
+ *  \return 0 on success, or -1 if the surface is not valid.
+ *
+ *  \sa SDL_GetSurfaceColorMod()
+ */
+extern DECLSPEC int SDLCALL SDL_SetSurfaceColorMod(SDL_Surface * surface,
+                                                   Uint8 r, Uint8 g, Uint8 b);
+
+
+/**
+ *  \brief Get the additional color value used in blit operations.
+ *
+ *  \param surface The surface to query.
+ *  \param r A pointer filled in with the current red color value.
+ *  \param g A pointer filled in with the current green color value.
+ *  \param b A pointer filled in with the current blue color value.
+ *
+ *  \return 0 on success, or -1 if the surface is not valid.
+ *
+ *  \sa SDL_SetSurfaceColorMod()
+ */
+extern DECLSPEC int SDLCALL SDL_GetSurfaceColorMod(SDL_Surface * surface,
+                                                   Uint8 * r, Uint8 * g,
+                                                   Uint8 * b);
+
+/**
+ *  \brief Set an additional alpha value used in blit operations.
+ *
+ *  \param surface The surface to update.
+ *  \param alpha The alpha value multiplied into blit operations.
+ *
+ *  \return 0 on success, or -1 if the surface is not valid.
+ *
+ *  \sa SDL_GetSurfaceAlphaMod()
+ */
+extern DECLSPEC int SDLCALL SDL_SetSurfaceAlphaMod(SDL_Surface * surface,
+                                                   Uint8 alpha);
+
+/**
+ *  \brief Get the additional alpha value used in blit operations.
+ *
+ *  \param surface The surface to query.
+ *  \param alpha A pointer filled in with the current alpha value.
+ *
+ *  \return 0 on success, or -1 if the surface is not valid.
+ *
+ *  \sa SDL_SetSurfaceAlphaMod()
+ */
+extern DECLSPEC int SDLCALL SDL_GetSurfaceAlphaMod(SDL_Surface * surface,
+                                                   Uint8 * alpha);
+
+/**
+ *  \brief Set the blend mode used for blit operations.
+ *
+ *  \param surface The surface to update.
+ *  \param blendMode ::SDL_BlendMode to use for blit blending.
+ *
+ *  \return 0 on success, or -1 if the parameters are not valid.
+ *
+ *  \sa SDL_GetSurfaceBlendMode()
+ */
+extern DECLSPEC int SDLCALL SDL_SetSurfaceBlendMode(SDL_Surface * surface,
+                                                    SDL_BlendMode blendMode);
+
+/**
+ *  \brief Get the blend mode used for blit operations.
+ *
+ *  \param surface   The surface to query.
+ *  \param blendMode A pointer filled in with the current blend mode.
+ *
+ *  \return 0 on success, or -1 if the surface is not valid.
+ *
+ *  \sa SDL_SetSurfaceBlendMode()
+ */
+extern DECLSPEC int SDLCALL SDL_GetSurfaceBlendMode(SDL_Surface * surface,
+                                                    SDL_BlendMode *blendMode);
+
+/**
+ *  Sets the clipping rectangle for the destination surface in a blit.
+ *
+ *  If the clip rectangle is NULL, clipping will be disabled.
+ *
+ *  If the clip rectangle doesn't intersect the surface, the function will
+ *  return SDL_FALSE and blits will be completely clipped.  Otherwise the
+ *  function returns SDL_TRUE and blits to the surface will be clipped to
+ *  the intersection of the surface area and the clipping rectangle.
+ *
+ *  Note that blits are automatically clipped to the edges of the source
+ *  and destination surfaces.
+ */
+extern DECLSPEC SDL_bool SDLCALL SDL_SetClipRect(SDL_Surface * surface,
+                                                 const SDL_Rect * rect);
+
+/**
+ *  Gets the clipping rectangle for the destination surface in a blit.
+ *
+ *  \c rect must be a pointer to a valid rectangle which will be filled
+ *  with the correct values.
+ */
+extern DECLSPEC void SDLCALL SDL_GetClipRect(SDL_Surface * surface,
+                                             SDL_Rect * rect);
+
+/**
+ *  Creates a new surface of the specified format, and then copies and maps
+ *  the given surface to it so the blit of the converted surface will be as
+ *  fast as possible.  If this function fails, it returns NULL.
+ *
+ *  The \c flags parameter is passed to SDL_CreateRGBSurface() and has those
+ *  semantics.  You can also pass ::SDL_RLEACCEL in the flags parameter and
+ *  SDL will try to RLE accelerate colorkey and alpha blits in the resulting
+ *  surface.
+ */
+extern DECLSPEC SDL_Surface *SDLCALL SDL_ConvertSurface
+    (SDL_Surface * src, const SDL_PixelFormat * fmt, Uint32 flags);
+extern DECLSPEC SDL_Surface *SDLCALL SDL_ConvertSurfaceFormat
+    (SDL_Surface * src, Uint32 pixel_format, Uint32 flags);
+
+/**
+ * \brief Copy a block of pixels of one format to another format
+ *
+ *  \return 0 on success, or -1 if there was an error
+ */
+extern DECLSPEC int SDLCALL SDL_ConvertPixels(int width, int height,
+                                              Uint32 src_format,
+                                              const void * src, int src_pitch,
+                                              Uint32 dst_format,
+                                              void * dst, int dst_pitch);
+
+/**
+ *  Performs a fast fill of the given rectangle with \c color.
+ *
+ *  If \c rect is NULL, the whole surface will be filled with \c color.
+ *
+ *  The color should be a pixel of the format used by the surface, and
+ *  can be generated by the SDL_MapRGB() function.
+ *
+ *  \return 0 on success, or -1 on error.
+ */
+extern DECLSPEC int SDLCALL SDL_FillRect
+    (SDL_Surface * dst, const SDL_Rect * rect, Uint32 color);
+extern DECLSPEC int SDLCALL SDL_FillRects
+    (SDL_Surface * dst, const SDL_Rect * rects, int count, Uint32 color);
+
+/**
+ *  Performs a fast blit from the source surface to the destination surface.
+ *
+ *  This assumes that the source and destination rectangles are
+ *  the same size.  If either \c srcrect or \c dstrect are NULL, the entire
+ *  surface (\c src or \c dst) is copied.  The final blit rectangles are saved
+ *  in \c srcrect and \c dstrect after all clipping is performed.
+ *
+ *  \return If the blit is successful, it returns 0, otherwise it returns -1.
+ *
+ *  The blit function should not be called on a locked surface.
+ *
+ *  The blit semantics for surfaces with and without blending and colorkey
+ *  are defined as follows:
+ *  \verbatim
+    RGBA->RGB:
+      Source surface blend mode set to SDL_BLENDMODE_BLEND:
+        alpha-blend (using the source alpha-channel and per-surface alpha)
+        SDL_SRCCOLORKEY ignored.
+      Source surface blend mode set to SDL_BLENDMODE_NONE:
+        copy RGB.
+        if SDL_SRCCOLORKEY set, only copy the pixels matching the
+        RGB values of the source color key, ignoring alpha in the
+        comparison.
+
+    RGB->RGBA:
+      Source surface blend mode set to SDL_BLENDMODE_BLEND:
+        alpha-blend (using the source per-surface alpha)
+      Source surface blend mode set to SDL_BLENDMODE_NONE:
+        copy RGB, set destination alpha to source per-surface alpha value.
+      both:
+        if SDL_SRCCOLORKEY set, only copy the pixels matching the
+        source color key.
+
+    RGBA->RGBA:
+      Source surface blend mode set to SDL_BLENDMODE_BLEND:
+        alpha-blend (using the source alpha-channel and per-surface alpha)
+        SDL_SRCCOLORKEY ignored.
+      Source surface blend mode set to SDL_BLENDMODE_NONE:
+        copy all of RGBA to the destination.
+        if SDL_SRCCOLORKEY set, only copy the pixels matching the
+        RGB values of the source color key, ignoring alpha in the
+        comparison.
+
+    RGB->RGB:
+      Source surface blend mode set to SDL_BLENDMODE_BLEND:
+        alpha-blend (using the source per-surface alpha)
+      Source surface blend mode set to SDL_BLENDMODE_NONE:
+        copy RGB.
+      both:
+        if SDL_SRCCOLORKEY set, only copy the pixels matching the
+        source color key.
+    \endverbatim
+ *
+ *  You should call SDL_BlitSurface() unless you know exactly how SDL
+ *  blitting works internally and how to use the other blit functions.
+ */
+#define SDL_BlitSurface SDL_UpperBlit
+
+/**
+ *  This is the public blit function, SDL_BlitSurface(), and it performs
+ *  rectangle validation and clipping before passing it to SDL_LowerBlit()
+ */
+extern DECLSPEC int SDLCALL SDL_UpperBlit
+    (SDL_Surface * src, const SDL_Rect * srcrect,
+     SDL_Surface * dst, SDL_Rect * dstrect);
+
+/**
+ *  This is a semi-private blit function and it performs low-level surface
+ *  blitting only.
+ */
+extern DECLSPEC int SDLCALL SDL_LowerBlit
+    (SDL_Surface * src, SDL_Rect * srcrect,
+     SDL_Surface * dst, SDL_Rect * dstrect);
+
+/**
+ *  \brief Perform a fast, low quality, stretch blit between two surfaces of the
+ *         same pixel format.
+ *
+ *  \note This function uses a static buffer, and is not thread-safe.
+ */
+extern DECLSPEC int SDLCALL SDL_SoftStretch(SDL_Surface * src,
+                                            const SDL_Rect * srcrect,
+                                            SDL_Surface * dst,
+                                            const SDL_Rect * dstrect);
+
+#define SDL_BlitScaled SDL_UpperBlitScaled
+
+/**
+ *  This is the public scaled blit function, SDL_BlitScaled(), and it performs
+ *  rectangle validation and clipping before passing it to SDL_LowerBlitScaled()
+ */
+extern DECLSPEC int SDLCALL SDL_UpperBlitScaled
+    (SDL_Surface * src, const SDL_Rect * srcrect,
+    SDL_Surface * dst, SDL_Rect * dstrect);
+
+/**
+ *  This is a semi-private blit function and it performs low-level surface
+ *  scaled blitting only.
+ */
+extern DECLSPEC int SDLCALL SDL_LowerBlitScaled
+    (SDL_Surface * src, SDL_Rect * srcrect,
+    SDL_Surface * dst, SDL_Rect * dstrect);
+
+
+/* Ends C function definitions when using C++ */
+#ifdef __cplusplus
+}
+#endif
+#include "close_code.h"
+
+#endif /* _SDL_surface_h */
+
+/* vi: set ts=4 sw=4 expandtab: */
diff --git a/include/SDL2/SDL_system.h b/include/SDL2/SDL_system.h
new file mode 100644 (file)
index 0000000..fd929f7
--- /dev/null
@@ -0,0 +1,191 @@
+/*
+  Simple DirectMedia Layer
+  Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
+
+  This software is provided 'as-is', without any express or implied
+  warranty.  In no event will the authors be held liable for any damages
+  arising from the use of this software.
+
+  Permission is granted to anyone to use this software for any purpose,
+  including commercial applications, and to alter it and redistribute it
+  freely, subject to the following restrictions:
+
+  1. The origin of this software must not be misrepresented; you must not
+     claim that you wrote the original software. If you use this software
+     in a product, an acknowledgment in the product documentation would be
+     appreciated but is not required.
+  2. Altered source versions must be plainly marked as such, and must not be
+     misrepresented as being the original software.
+  3. This notice may not be removed or altered from any source distribution.
+*/
+
+/**
+ *  \file SDL_system.h
+ *
+ *  Include file for platform specific SDL API functions
+ */
+
+#ifndef _SDL_system_h
+#define _SDL_system_h
+
+#include "SDL_stdinc.h"
+#include "SDL_keyboard.h"
+#include "SDL_render.h"
+#include "SDL_video.h"
+
+#include "begin_code.h"
+/* Set up for C function definitions, even when using C++ */
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/* Platform specific functions for Windows */
+#ifdef __WIN32__
+
+/* Returns the D3D9 adapter index that matches the specified display index.
+   This adapter index can be passed to IDirect3D9::CreateDevice and controls
+   on which monitor a full screen application will appear.
+*/
+extern DECLSPEC int SDLCALL SDL_Direct3D9GetAdapterIndex( int displayIndex );
+
+/* Returns the D3D device associated with a renderer, or NULL if it's not a D3D renderer.
+   Once you are done using the device, you should release it to avoid a resource leak.
+ */
+typedef struct IDirect3DDevice9 IDirect3DDevice9;
+extern DECLSPEC IDirect3DDevice9* SDLCALL SDL_RenderGetD3D9Device(SDL_Renderer * renderer);
+
+/* Returns the DXGI Adapter and Output indices for the specified display index. 
+   These can be passed to EnumAdapters and EnumOutputs respectively to get the objects
+   required to create a DX10 or DX11 device and swap chain.
+ */
+extern DECLSPEC void SDLCALL SDL_DXGIGetOutputInfo( int displayIndex, int *adapterIndex, int *outputIndex );
+
+#endif /* __WIN32__ */
+
+
+/* Platform specific functions for iOS */
+#if defined(__IPHONEOS__) && __IPHONEOS__
+
+extern DECLSPEC int SDLCALL SDL_iPhoneSetAnimationCallback(SDL_Window * window, int interval, void (*callback)(void*), void *callbackParam);
+extern DECLSPEC void SDLCALL SDL_iPhoneSetEventPump(SDL_bool enabled);
+
+#endif /* __IPHONEOS__ */
+
+
+/* Platform specific functions for Android */
+#if defined(__ANDROID__) && __ANDROID__
+
+/* Get the JNI environment for the current thread
+   This returns JNIEnv*, but the prototype is void* so we don't need jni.h
+ */
+extern DECLSPEC void * SDLCALL SDL_AndroidGetJNIEnv();
+
+/* Get the SDL Activity object for the application
+   This returns jobject, but the prototype is void* so we don't need jni.h
+   The jobject returned by SDL_AndroidGetActivity is a local reference.
+   It is the caller's responsibility to properly release it
+   (using env->Push/PopLocalFrame or manually with env->DeleteLocalRef)
+ */
+extern DECLSPEC void * SDLCALL SDL_AndroidGetActivity();
+
+/* See the official Android developer guide for more information:
+   http://developer.android.com/guide/topics/data/data-storage.html
+*/
+#define SDL_ANDROID_EXTERNAL_STORAGE_READ   0x01
+#define SDL_ANDROID_EXTERNAL_STORAGE_WRITE  0x02
+
+/* Get the path used for internal storage for this application.
+   This path is unique to your application and cannot be written to
+   by other applications.
+ */
+extern DECLSPEC const char * SDLCALL SDL_AndroidGetInternalStoragePath();
+
+/* Get the current state of external storage, a bitmask of these values:
+    SDL_ANDROID_EXTERNAL_STORAGE_READ
+    SDL_ANDROID_EXTERNAL_STORAGE_WRITE
+   If external storage is currently unavailable, this will return 0.
+*/
+extern DECLSPEC int SDLCALL SDL_AndroidGetExternalStorageState();
+
+/* Get the path used for external storage for this application.
+   This path is unique to your application, but is public and can be
+   written to by other applications.
+ */
+extern DECLSPEC const char * SDLCALL SDL_AndroidGetExternalStoragePath();
+
+#endif /* __ANDROID__ */
+
+/* Platform specific functions for WinRT */
+#if defined(__WINRT__) && __WINRT__
+
+/**
+ *  \brief WinRT / Windows Phone path types
+ */
+typedef enum
+{
+    /** \brief The installed app's root directory.
+        Files here are likely to be read-only. */
+    SDL_WINRT_PATH_INSTALLED_LOCATION,
+
+    /** \brief The app's local data store.  Files may be written here */
+    SDL_WINRT_PATH_LOCAL_FOLDER,
+
+    /** \brief The app's roaming data store.  Unsupported on Windows Phone.
+        Files written here may be copied to other machines via a network
+        connection.
+    */
+    SDL_WINRT_PATH_ROAMING_FOLDER,
+
+    /** \brief The app's temporary data store.  Unsupported on Windows Phone.
+        Files written here may be deleted at any time. */
+    SDL_WINRT_PATH_TEMP_FOLDER
+} SDL_WinRT_Path;
+
+
+/**
+ *  \brief Retrieves a WinRT defined path on the local file system
+ *
+ *  \note Documentation on most app-specific path types on WinRT
+ *      can be found on MSDN, at the URL:
+ *      http://msdn.microsoft.com/en-us/library/windows/apps/hh464917.aspx
+ *
+ *  \param pathType The type of path to retrieve.
+ *  \ret A UCS-2 string (16-bit, wide-char) containing the path, or NULL
+ *      if the path is not available for any reason.  Not all paths are
+ *      available on all versions of Windows.  This is especially true on
+ *      Windows Phone.  Check the documentation for the given
+ *      SDL_WinRT_Path for more information on which path types are
+ *      supported where.
+ */
+extern DECLSPEC const wchar_t * SDLCALL SDL_WinRTGetFSPathUNICODE(SDL_WinRT_Path pathType);
+
+/**
+ *  \brief Retrieves a WinRT defined path on the local file system
+ *
+ *  \note Documentation on most app-specific path types on WinRT
+ *      can be found on MSDN, at the URL:
+ *      http://msdn.microsoft.com/en-us/library/windows/apps/hh464917.aspx
+ *
+ *  \param pathType The type of path to retrieve.
+ *  \ret A UTF-8 string (8-bit, multi-byte) containing the path, or NULL
+ *      if the path is not available for any reason.  Not all paths are
+ *      available on all versions of Windows.  This is especially true on
+ *      Windows Phone.  Check the documentation for the given
+ *      SDL_WinRT_Path for more information on which path types are
+ *      supported where.
+ */
+extern DECLSPEC const char * SDLCALL SDL_WinRTGetFSPathUTF8(SDL_WinRT_Path pathType);
+
+#endif /* __WINRT__ */
+
+
+/* Ends C function definitions when using C++ */
+#ifdef __cplusplus
+}
+#endif
+#include "close_code.h"
+
+#endif /* _SDL_system_h */
+
+/* vi: set ts=4 sw=4 expandtab: */
diff --git a/include/SDL2/SDL_syswm.h b/include/SDL2/SDL_syswm.h
new file mode 100644 (file)
index 0000000..a3fe738
--- /dev/null
@@ -0,0 +1,272 @@
+/*
+  Simple DirectMedia Layer
+  Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
+
+  This software is provided 'as-is', without any express or implied
+  warranty.  In no event will the authors be held liable for any damages
+  arising from the use of this software.
+
+  Permission is granted to anyone to use this software for any purpose,
+  including commercial applications, and to alter it and redistribute it
+  freely, subject to the following restrictions:
+
+  1. The origin of this software must not be misrepresented; you must not
+     claim that you wrote the original software. If you use this software
+     in a product, an acknowledgment in the product documentation would be
+     appreciated but is not required.
+  2. Altered source versions must be plainly marked as such, and must not be
+     misrepresented as being the original software.
+  3. This notice may not be removed or altered from any source distribution.
+*/
+
+/**
+ *  \file SDL_syswm.h
+ *
+ *  Include file for SDL custom system window manager hooks.
+ */
+
+#ifndef _SDL_syswm_h
+#define _SDL_syswm_h
+
+#include "SDL_stdinc.h"
+#include "SDL_error.h"
+#include "SDL_video.h"
+#include "SDL_version.h"
+
+#include "begin_code.h"
+/* Set up for C function definitions, even when using C++ */
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ *  \file SDL_syswm.h
+ *
+ *  Your application has access to a special type of event ::SDL_SYSWMEVENT,
+ *  which contains window-manager specific information and arrives whenever
+ *  an unhandled window event occurs.  This event is ignored by default, but
+ *  you can enable it with SDL_EventState().
+ */
+#ifdef SDL_PROTOTYPES_ONLY
+struct SDL_SysWMinfo;
+#else
+
+#if defined(SDL_VIDEO_DRIVER_WINDOWS)
+#define WIN32_LEAN_AND_MEAN
+#include <windows.h>
+#endif
+
+#if defined(SDL_VIDEO_DRIVER_WINRT)
+#include <Inspectable.h>
+#endif
+
+/* This is the structure for custom window manager events */
+#if defined(SDL_VIDEO_DRIVER_X11)
+#if defined(__APPLE__) && defined(__MACH__)
+/* conflicts with Quickdraw.h */
+#define Cursor X11Cursor
+#endif
+
+#include <X11/Xlib.h>
+#include <X11/Xatom.h>
+
+#if defined(__APPLE__) && defined(__MACH__)
+/* matches the re-define above */
+#undef Cursor
+#endif
+
+#endif /* defined(SDL_VIDEO_DRIVER_X11) */
+
+#if defined(SDL_VIDEO_DRIVER_DIRECTFB)
+#include <directfb.h>
+#endif
+
+#if defined(SDL_VIDEO_DRIVER_COCOA)
+#ifdef __OBJC__
+#include <Cocoa/Cocoa.h>
+#else
+typedef struct _NSWindow NSWindow;
+#endif
+#endif
+
+#if defined(SDL_VIDEO_DRIVER_UIKIT)
+#ifdef __OBJC__
+#include <UIKit/UIKit.h>
+#else
+typedef struct _UIWindow UIWindow;
+typedef struct _UIViewController UIViewController;
+#endif
+#endif
+
+#if defined(SDL_VIDEO_DRIVER_MIR)
+#include <mir_toolkit/mir_client_library.h>
+#endif
+
+
+/**
+ *  These are the various supported windowing subsystems
+ */
+typedef enum
+{
+    SDL_SYSWM_UNKNOWN,
+    SDL_SYSWM_WINDOWS,
+    SDL_SYSWM_X11,
+    SDL_SYSWM_DIRECTFB,
+    SDL_SYSWM_COCOA,
+    SDL_SYSWM_UIKIT,
+    SDL_SYSWM_WAYLAND,
+    SDL_SYSWM_MIR,
+    SDL_SYSWM_WINRT,
+} SDL_SYSWM_TYPE;
+
+/**
+ *  The custom event structure.
+ */
+struct SDL_SysWMmsg
+{
+    SDL_version version;
+    SDL_SYSWM_TYPE subsystem;
+    union
+    {
+#if defined(SDL_VIDEO_DRIVER_WINDOWS)
+        struct {
+            HWND hwnd;                  /**< The window for the message */
+            UINT msg;                   /**< The type of message */
+            WPARAM wParam;              /**< WORD message parameter */
+            LPARAM lParam;              /**< LONG message parameter */
+        } win;
+#endif
+#if defined(SDL_VIDEO_DRIVER_X11)
+        struct {
+            XEvent event;
+        } x11;
+#endif
+#if defined(SDL_VIDEO_DRIVER_DIRECTFB)
+        struct {
+            DFBEvent event;
+        } dfb;
+#endif
+#if defined(SDL_VIDEO_DRIVER_COCOA)
+        struct
+        {
+            /* No Cocoa window events yet */
+        } cocoa;
+#endif
+#if defined(SDL_VIDEO_DRIVER_UIKIT)
+        struct
+        {
+            /* No UIKit window events yet */
+        } uikit;
+#endif
+        /* Can't have an empty union */
+        int dummy;
+    } msg;
+};
+
+/**
+ *  The custom window manager information structure.
+ *
+ *  When this structure is returned, it holds information about which
+ *  low level system it is using, and will be one of SDL_SYSWM_TYPE.
+ */
+struct SDL_SysWMinfo
+{
+    SDL_version version;
+    SDL_SYSWM_TYPE subsystem;
+    union
+    {
+#if defined(SDL_VIDEO_DRIVER_WINDOWS)
+        struct
+        {
+            HWND window;                /**< The window handle */
+        } win;
+#endif
+#if defined(SDL_VIDEO_DRIVER_WINRT)
+        struct
+        {
+            IInspectable * window;      /**< The WinRT CoreWindow */
+        } winrt;
+#endif
+#if defined(SDL_VIDEO_DRIVER_X11)
+        struct
+        {
+            Display *display;           /**< The X11 display */
+            Window window;              /**< The X11 window */
+        } x11;
+#endif
+#if defined(SDL_VIDEO_DRIVER_DIRECTFB)
+        struct
+        {
+            IDirectFB *dfb;             /**< The directfb main interface */
+            IDirectFBWindow *window;    /**< The directfb window handle */
+            IDirectFBSurface *surface;  /**< The directfb client surface */
+        } dfb;
+#endif
+#if defined(SDL_VIDEO_DRIVER_COCOA)
+        struct
+        {
+            NSWindow *window;           /* The Cocoa window */
+        } cocoa;
+#endif
+#if defined(SDL_VIDEO_DRIVER_UIKIT)
+        struct
+        {
+            UIWindow *window;           /* The UIKit window */
+        } uikit;
+#endif
+#if defined(SDL_VIDEO_DRIVER_WAYLAND)
+        struct
+        {
+            struct wl_display *display;            /**< Wayland display */
+            struct wl_surface *surface;            /**< Wayland surface */
+            struct wl_shell_surface *shell_surface; /**< Wayland shell_surface (window manager handle) */
+        } wl;
+#endif
+#if defined(SDL_VIDEO_DRIVER_MIR)
+        struct
+        {
+            MirConnection *connection;  /**< Mir display server connection */
+            MirSurface *surface;  /**< Mir surface */
+        } mir;
+#endif
+
+        /* Can't have an empty union */
+        int dummy;
+    } info;
+};
+
+#endif /* SDL_PROTOTYPES_ONLY */
+
+typedef struct SDL_SysWMinfo SDL_SysWMinfo;
+
+/* Function prototypes */
+/**
+ *  \brief This function allows access to driver-dependent window information.
+ *
+ *  \param window The window about which information is being requested
+ *  \param info This structure must be initialized with the SDL version, and is
+ *              then filled in with information about the given window.
+ *
+ *  \return SDL_TRUE if the function is implemented and the version member of
+ *          the \c info struct is valid, SDL_FALSE otherwise.
+ *
+ *  You typically use this function like this:
+ *  \code
+ *  SDL_SysWMinfo info;
+ *  SDL_VERSION(&info.version);
+ *  if ( SDL_GetWindowWMInfo(window, &info) ) { ... }
+ *  \endcode
+ */
+extern DECLSPEC SDL_bool SDLCALL SDL_GetWindowWMInfo(SDL_Window * window,
+                                                     SDL_SysWMinfo * info);
+
+
+/* Ends C function definitions when using C++ */
+#ifdef __cplusplus
+}
+#endif
+#include "close_code.h"
+
+#endif /* _SDL_syswm_h */
+
+/* vi: set ts=4 sw=4 expandtab: */
diff --git a/include/SDL2/SDL_test.h b/include/SDL2/SDL_test.h
new file mode 100644 (file)
index 0000000..ae649a4
--- /dev/null
@@ -0,0 +1,68 @@
+/*
+  Simple DirectMedia Layer
+  Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
+
+  This software is provided 'as-is', without any express or implied
+  warranty.  In no event will the authors be held liable for any damages
+  arising from the use of this software.
+
+  Permission is granted to anyone to use this software for any purpose,
+  including commercial applications, and to alter it and redistribute it
+  freely, subject to the following restrictions:
+
+  1. The origin of this software must not be misrepresented; you must not
+     claim that you wrote the original software. If you use this software
+     in a product, an acknowledgment in the product documentation would be
+     appreciated but is not required.
+  2. Altered source versions must be plainly marked as such, and must not be
+     misrepresented as being the original software.
+  3. This notice may not be removed or altered from any source distribution.
+*/
+
+/**
+ *  \file SDL_test.h
+ *
+ *  Include file for SDL test framework.
+ *
+ *  This code is a part of the SDL2_test library, not the main SDL library.
+ */
+
+#ifndef _SDL_test_h
+#define _SDL_test_h
+
+#include "SDL.h"
+#include "SDL_test_common.h"
+#include "SDL_test_font.h"
+#include "SDL_test_random.h"
+#include "SDL_test_fuzzer.h"
+#include "SDL_test_crc32.h"
+#include "SDL_test_md5.h"
+#include "SDL_test_log.h"
+#include "SDL_test_assert.h"
+#include "SDL_test_harness.h"
+#include "SDL_test_images.h"
+#include "SDL_test_compare.h"
+
+#include "begin_code.h"
+/* Set up for C function definitions, even when using C++ */
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Global definitions */
+
+/*
+ * Note: Maximum size of SDLTest log message is less than SDLs limit
+ * to ensure we can fit additional information such as the timestamp.
+ */
+#define SDLTEST_MAX_LOGMESSAGE_LENGTH   3584
+
+/* Ends C function definitions when using C++ */
+#ifdef __cplusplus
+}
+#endif
+#include "close_code.h"
+
+#endif /* _SDL_test_h */
+
+/* vi: set ts=4 sw=4 expandtab: */
diff --git a/include/SDL2/SDL_test_assert.h b/include/SDL2/SDL_test_assert.h
new file mode 100644 (file)
index 0000000..79c84d6
--- /dev/null
@@ -0,0 +1,105 @@
+/*
+  Simple DirectMedia Layer
+  Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
+
+  This software is provided 'as-is', without any express or implied
+  warranty.  In no event will the authors be held liable for any damages
+  arising from the use of this software.
+
+  Permission is granted to anyone to use this software for any purpose,
+  including commercial applications, and to alter it and redistribute it
+  freely, subject to the following restrictions:
+
+  1. The origin of this software must not be misrepresented; you must not
+     claim that you wrote the original software. If you use this software
+     in a product, an acknowledgment in the product documentation would be
+     appreciated but is not required.
+  2. Altered source versions must be plainly marked as such, and must not be
+     misrepresented as being the original software.
+  3. This notice may not be removed or altered from any source distribution.
+*/
+
+/**
+ *  \file SDL_test_assert.h
+ *
+ *  Include file for SDL test framework.
+ *
+ *  This code is a part of the SDL2_test library, not the main SDL library.
+ */
+
+/*
+ *
+ * Assert API for test code and test cases
+ *
+ */
+
+#ifndef _SDL_test_assert_h
+#define _SDL_test_assert_h
+
+#include "begin_code.h"
+/* Set up for C function definitions, even when using C++ */
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * \brief Fails the assert.
+ */
+#define ASSERT_FAIL     0
+
+/**
+ * \brief Passes the assert.
+ */
+#define ASSERT_PASS     1
+
+/**
+ * \brief Assert that logs and break execution flow on failures.
+ *
+ * \param assertCondition Evaluated condition or variable to assert; fail (==0) or pass (!=0).
+ * \param assertDescription Message to log with the assert describing it.
+ */
+void SDLTest_Assert(int assertCondition, const char *assertDescription, ...);
+
+/**
+ * \brief Assert for test cases that logs but does not break execution flow on failures. Updates assertion counters.
+ *
+ * \param assertCondition Evaluated condition or variable to assert; fail (==0) or pass (!=0).
+ * \param assertDescription Message to log with the assert describing it.
+ *
+ * \returns Returns the assertCondition so it can be used to externally to break execution flow if desired.
+ */
+int SDLTest_AssertCheck(int assertCondition, const char *assertDescription, ...);
+
+/**
+ * \brief Explicitely pass without checking an assertion condition. Updates assertion counter.
+ *
+ * \param assertDescription Message to log with the assert describing it.
+ */
+void SDLTest_AssertPass(const char *assertDescription, ...);
+
+/**
+ * \brief Resets the assert summary counters to zero.
+ */
+void SDLTest_ResetAssertSummary();
+
+/**
+ * \brief Logs summary of all assertions (total, pass, fail) since last reset as INFO or ERROR.
+ */
+void SDLTest_LogAssertSummary();
+
+
+/**
+ * \brief Converts the current assert summary state to a test result.
+ *
+ * \returns TEST_RESULT_PASSED, TEST_RESULT_FAILED, or TEST_RESULT_NO_ASSERT
+ */
+int SDLTest_AssertSummaryToTestResult();
+
+#ifdef __cplusplus
+}
+#endif
+#include "close_code.h"
+
+#endif /* _SDL_test_assert_h */
+
+/* vi: set ts=4 sw=4 expandtab: */
diff --git a/include/SDL2/SDL_test_common.h b/include/SDL2/SDL_test_common.h
new file mode 100644 (file)
index 0000000..45c9eda
--- /dev/null
@@ -0,0 +1,188 @@
+/*
+  Simple DirectMedia Layer
+  Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
+
+  This software is provided 'as-is', without any express or implied
+  warranty.  In no event will the authors be held liable for any damages
+  arising from the use of this software.
+
+  Permission is granted to anyone to use this software for any purpose,
+  including commercial applications, and to alter it and redistribute it
+  freely, subject to the following restrictions:
+
+  1. The origin of this software must not be misrepresented; you must not
+     claim that you wrote the original software. If you use this software
+     in a product, an acknowledgment in the product documentation would be
+     appreciated but is not required.
+  2. Altered source versions must be plainly marked as such, and must not be
+     misrepresented as being the original software.
+  3. This notice may not be removed or altered from any source distribution.
+*/
+
+/**
+ *  \file SDL_test_common.h
+ *
+ *  Include file for SDL test framework.
+ *
+ *  This code is a part of the SDL2_test library, not the main SDL library.
+ */
+
+/* Ported from original test\common.h file. */
+
+#ifndef _SDL_test_common_h
+#define _SDL_test_common_h
+
+#include "SDL.h"
+
+#if defined(__PSP__)
+#define DEFAULT_WINDOW_WIDTH  480
+#define DEFAULT_WINDOW_HEIGHT 272
+#else
+#define DEFAULT_WINDOW_WIDTH  640
+#define DEFAULT_WINDOW_HEIGHT 480
+#endif
+
+#define VERBOSE_VIDEO   0x00000001
+#define VERBOSE_MODES   0x00000002
+#define VERBOSE_RENDER  0x00000004
+#define VERBOSE_EVENT   0x00000008
+#define VERBOSE_AUDIO   0x00000010
+
+typedef struct
+{
+    /* SDL init flags */
+    char **argv;
+    Uint32 flags;
+    Uint32 verbose;
+
+    /* Video info */
+    const char *videodriver;
+    int display;
+    const char *window_title;
+    const char *window_icon;
+    Uint32 window_flags;
+    int window_x;
+    int window_y;
+    int window_w;
+    int window_h;
+    int window_minW;
+    int window_minH;
+    int window_maxW;
+    int window_maxH;
+    int logical_w;
+    int logical_h;
+    float scale;
+    int depth;
+    int refresh_rate;
+    int num_windows;
+    SDL_Window **windows;
+
+    /* Renderer info */
+    const char *renderdriver;
+    Uint32 render_flags;
+    SDL_bool skip_renderer;
+    SDL_Renderer **renderers;
+    SDL_Texture **targets;
+
+    /* Audio info */
+    const char *audiodriver;
+    SDL_AudioSpec audiospec;
+
+    /* GL settings */
+    int gl_red_size;
+    int gl_green_size;
+    int gl_blue_size;
+    int gl_alpha_size;
+    int gl_buffer_size;
+    int gl_depth_size;
+    int gl_stencil_size;
+    int gl_double_buffer;
+    int gl_accum_red_size;
+    int gl_accum_green_size;
+    int gl_accum_blue_size;
+    int gl_accum_alpha_size;
+    int gl_stereo;
+    int gl_multisamplebuffers;
+    int gl_multisamplesamples;
+    int gl_retained_backing;
+    int gl_accelerated;
+    int gl_major_version;
+    int gl_minor_version;
+    int gl_debug;
+    int gl_profile_mask;
+} SDLTest_CommonState;
+
+#include "begin_code.h"
+/* Set up for C function definitions, even when using C++ */
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Function prototypes */
+
+/**
+ * \brief Parse command line parameters and create common state.
+ *
+ * \param argv Array of command line parameters
+ * \param flags Flags indicating which subsystem to initialize (i.e. SDL_INIT_VIDEO | SDL_INIT_AUDIO)
+ *
+ * \returns Returns a newly allocated common state object.
+ */
+SDLTest_CommonState *SDLTest_CommonCreateState(char **argv, Uint32 flags);
+
+/**
+ * \brief Process one common argument.
+ *
+ * \param state The common state describing the test window to create.
+ * \param index The index of the argument to process in argv[].
+ *
+ * \returns The number of arguments processed (i.e. 1 for --fullscreen, 2 for --video [videodriver], or -1 on error.
+ */
+int SDLTest_CommonArg(SDLTest_CommonState * state, int index);
+
+/**
+ * \brief Returns common usage information
+ *
+ * \param state The common state describing the test window to create.
+ *
+ * \returns String with usage information
+ */
+const char *SDLTest_CommonUsage(SDLTest_CommonState * state);
+
+/**
+ * \brief Open test window.
+ *
+ * \param state The common state describing the test window to create.
+ *
+ * \returns True if initialization succeeded, false otherwise
+ */
+SDL_bool SDLTest_CommonInit(SDLTest_CommonState * state);
+
+/**
+ * \brief Common event handler for test windows.
+ *
+ * \param state The common state used to create test window.
+ * \param event The event to handle.
+ * \param done Flag indicating we are done.
+ *
+ */
+void SDLTest_CommonEvent(SDLTest_CommonState * state, SDL_Event * event, int *done);
+
+/**
+ * \brief Close test window.
+ *
+ * \param state The common state used to create test window.
+ *
+ */
+void SDLTest_CommonQuit(SDLTest_CommonState * state);
+
+
+/* Ends C function definitions when using C++ */
+#ifdef __cplusplus
+}
+#endif
+#include "close_code.h"
+
+#endif /* _SDL_test_common_h */
+
+/* vi: set ts=4 sw=4 expandtab: */
diff --git a/include/SDL2/SDL_test_compare.h b/include/SDL2/SDL_test_compare.h
new file mode 100644 (file)
index 0000000..f1353a8
--- /dev/null
@@ -0,0 +1,69 @@
+/*
+  Simple DirectMedia Layer
+  Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
+
+  This software is provided 'as-is', without any express or implied
+  warranty.  In no event will the authors be held liable for any damages
+  arising from the use of this software.
+
+  Permission is granted to anyone to use this software for any purpose,
+  including commercial applications, and to alter it and redistribute it
+  freely, subject to the following restrictions:
+
+  1. The origin of this software must not be misrepresented; you must not
+     claim that you wrote the original software. If you use this software
+     in a product, an acknowledgment in the product documentation would be
+     appreciated but is not required.
+  2. Altered source versions must be plainly marked as such, and must not be
+     misrepresented as being the original software.
+  3. This notice may not be removed or altered from any source distribution.
+*/
+
+/**
+ *  \file SDL_test_compare.h
+ *
+ *  Include file for SDL test framework.
+ *
+ *  This code is a part of the SDL2_test library, not the main SDL library.
+ */
+
+/*
+
+ Defines comparison functions (i.e. for surfaces).
+
+*/
+
+#ifndef _SDL_test_compare_h
+#define _SDL_test_compare_h
+
+#include "SDL.h"
+
+#include "SDL_test_images.h"
+
+#include "begin_code.h"
+/* Set up for C function definitions, even when using C++ */
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * \brief Compares a surface and with reference image data for equality
+ *
+ * \param surface Surface used in comparison
+ * \param referenceSurface Test Surface used in comparison
+ * \param allowable_error Allowable difference (squared) in blending accuracy.
+ *
+ * \returns 0 if comparison succeeded, >0 (=number of pixels where comparison failed) if comparison failed, -1 if any of the surfaces were NULL, -2 if the surface sizes differ.
+ */
+int SDLTest_CompareSurfaces(SDL_Surface *surface, SDL_Surface *referenceSurface, int allowable_error);
+
+
+/* Ends C function definitions when using C++ */
+#ifdef __cplusplus
+}
+#endif
+#include "close_code.h"
+
+#endif /* _SDL_test_compare_h */
+
+/* vi: set ts=4 sw=4 expandtab: */
diff --git a/include/SDL2/SDL_test_crc32.h b/include/SDL2/SDL_test_crc32.h
new file mode 100644 (file)
index 0000000..a180fe3
--- /dev/null
@@ -0,0 +1,124 @@
+/*
+  Simple DirectMedia Layer
+  Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
+
+  This software is provided 'as-is', without any express or implied
+  warranty.  In no event will the authors be held liable for any damages
+  arising from the use of this software.
+
+  Permission is granted to anyone to use this software for any purpose,
+  including commercial applications, and to alter it and redistribute it
+  freely, subject to the following restrictions:
+
+  1. The origin of this software must not be misrepresented; you must not
+     claim that you wrote the original software. If you use this software
+     in a product, an acknowledgment in the product documentation would be
+     appreciated but is not required.
+  2. Altered source versions must be plainly marked as such, and must not be
+     misrepresented as being the original software.
+  3. This notice may not be removed or altered from any source distribution.
+*/
+
+/**
+ *  \file SDL_test_crc32.h
+ *
+ *  Include file for SDL test framework.
+ *
+ *  This code is a part of the SDL2_test library, not the main SDL library.
+ */
+
+/*
+
+ Implements CRC32 calculations (default output is Perl String::CRC32 compatible).
+
+*/
+
+#ifndef _SDL_test_crc32_h
+#define _SDL_test_crc32_h
+
+#include "begin_code.h"
+/* Set up for C function definitions, even when using C++ */
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/* ------------ Definitions --------- */
+
+/* Definition shared by all CRC routines */
+
+#ifndef CrcUint32
+ #define CrcUint32  unsigned int
+#endif
+#ifndef CrcUint8
+ #define CrcUint8   unsigned char
+#endif
+
+#ifdef ORIGINAL_METHOD
+ #define CRC32_POLY 0x04c11db7   /* AUTODIN II, Ethernet, & FDDI */
+#else
+ #define CRC32_POLY 0xEDB88320   /* Perl String::CRC32 compatible */
+#endif
+
+/**
+ * Data structure for CRC32 (checksum) computation
+ */
+  typedef struct {
+    CrcUint32    crc32_table[256]; /* CRC table */
+  } SDLTest_Crc32Context;
+
+/* ---------- Function Prototypes ------------- */
+
+/**
+ * /brief Initialize the CRC context
+ *
+ * Note: The function initializes the crc table required for all crc calculations.
+ *
+ * /param crcContext        pointer to context variable
+ *
+ * /returns 0 for OK, -1 on error
+ *
+ */
+ int SDLTest_Crc32Init(SDLTest_Crc32Context * crcContext);
+
+
+/**
+ * /brief calculate a crc32 from a data block
+ *
+ * /param crcContext         pointer to context variable
+ * /param inBuf              input buffer to checksum
+ * /param inLen              length of input buffer
+ * /param crc32              pointer to Uint32 to store the final CRC into
+ *
+ * /returns 0 for OK, -1 on error
+ *
+ */
+int SDLTest_crc32Calc(SDLTest_Crc32Context * crcContext, CrcUint8 *inBuf, CrcUint32 inLen, CrcUint32 *crc32);
+
+/* Same routine broken down into three steps */
+int SDLTest_Crc32CalcStart(SDLTest_Crc32Context * crcContext, CrcUint32 *crc32);
+int SDLTest_Crc32CalcEnd(SDLTest_Crc32Context * crcContext, CrcUint32 *crc32);
+int SDLTest_Crc32CalcBuffer(SDLTest_Crc32Context * crcContext, CrcUint8 *inBuf, CrcUint32 inLen, CrcUint32 *crc32);
+
+
+/**
+ * /brief clean up CRC context
+ *
+ * /param crcContext        pointer to context variable
+ *
+ * /returns 0 for OK, -1 on error
+ *
+*/
+
+int SDLTest_Crc32Done(SDLTest_Crc32Context * crcContext);
+
+
+/* Ends C function definitions when using C++ */
+#ifdef __cplusplus
+}
+#endif
+#include "close_code.h"
+
+#endif /* _SDL_test_crc32_h */
+
+/* vi: set ts=4 sw=4 expandtab: */
diff --git a/include/SDL2/SDL_test_font.h b/include/SDL2/SDL_test_font.h
new file mode 100644 (file)
index 0000000..8d51d4a
--- /dev/null
@@ -0,0 +1,76 @@
+/*
+  Simple DirectMedia Layer
+  Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
+
+  This software is provided 'as-is', without any express or implied
+  warranty.  In no event will the authors be held liable for any damages
+  arising from the use of this software.
+
+  Permission is granted to anyone to use this software for any purpose,
+  including commercial applications, and to alter it and redistribute it
+  freely, subject to the following restrictions:
+
+  1. The origin of this software must not be misrepresented; you must not
+     claim that you wrote the original software. If you use this software
+     in a product, an acknowledgment in the product documentation would be
+     appreciated but is not required.
+  2. Altered source versions must be plainly marked as such, and must not be
+     misrepresented as being the original software.
+  3. This notice may not be removed or altered from any source distribution.
+*/
+
+/**
+ *  \file SDL_test_font.h
+ *
+ *  Include file for SDL test framework.
+ *
+ *  This code is a part of the SDL2_test library, not the main SDL library.
+ */
+
+#ifndef _SDL_test_font_h
+#define _SDL_test_font_h
+
+#include "begin_code.h"
+/* Set up for C function definitions, even when using C++ */
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Function prototypes */
+
+#define FONT_CHARACTER_SIZE  8
+
+/**
+ *  \brief Draw a string in the currently set font.
+ *
+ *  \param renderer The renderer to draw on.
+ *  \param x The X coordinate of the upper left corner of the character.
+ *  \param y The Y coordinate of the upper left corner of the character.
+ *  \param c The character to draw.
+ *
+ *  \returns Returns 0 on success, -1 on failure.
+ */
+int SDLTest_DrawCharacter( SDL_Renderer *renderer, int x, int y, char c );
+
+/**
+ *  \brief Draw a string in the currently set font.
+ *
+ *  \param renderer The renderer to draw on.
+ *  \param x The X coordinate of the upper left corner of the string.
+ *  \param y The Y coordinate of the upper left corner of the string.
+ *  \param s The string to draw.
+ *
+ *  \returns Returns 0 on success, -1 on failure.
+ */
+int SDLTest_DrawString( SDL_Renderer * renderer, int x, int y, const char *s );
+
+
+/* Ends C function definitions when using C++ */
+#ifdef __cplusplus
+}
+#endif
+#include "close_code.h"
+
+#endif /* _SDL_test_font_h */
+
+/* vi: set ts=4 sw=4 expandtab: */
diff --git a/include/SDL2/SDL_test_fuzzer.h b/include/SDL2/SDL_test_fuzzer.h
new file mode 100644 (file)
index 0000000..6401803
--- /dev/null
@@ -0,0 +1,384 @@
+/*
+  Simple DirectMedia Layer
+  Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
+
+  This software is provided 'as-is', without any express or implied
+  warranty.  In no event will the authors be held liable for any damages
+  arising from the use of this software.
+
+  Permission is granted to anyone to use this software for any purpose,
+  including commercial applications, and to alter it and redistribute it
+  freely, subject to the following restrictions:
+
+  1. The origin of this software must not be misrepresented; you must not
+     claim that you wrote the original software. If you use this software
+     in a product, an acknowledgment in the product documentation would be
+     appreciated but is not required.
+  2. Altered source versions must be plainly marked as such, and must not be
+     misrepresented as being the original software.
+  3. This notice may not be removed or altered from any source distribution.
+*/
+
+/**
+ *  \file SDL_test_fuzzer.h
+ *
+ *  Include file for SDL test framework.
+ *
+ *  This code is a part of the SDL2_test library, not the main SDL library.
+ */
+
+/*
+
+  Data generators for fuzzing test data in a reproducible way.
+
+*/
+
+#ifndef _SDL_test_fuzzer_h
+#define _SDL_test_fuzzer_h
+
+#include "begin_code.h"
+/* Set up for C function definitions, even when using C++ */
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/*
+  Based on GSOC code by Markus Kauppila <markus.kauppila@gmail.com>
+*/
+
+
+/**
+ * \file
+ * Note: The fuzzer implementation uses a static instance of random context
+ * internally which makes it thread-UNsafe.
+ */
+
+/**
+ * Initializes the fuzzer for a test
+ *
+ * /param execKey Execution "Key" that initializes the random number generator uniquely for the test.
+ *
+ */
+void SDLTest_FuzzerInit(Uint64 execKey);
+
+
+/**
+ * Returns a random Uint8
+ *
+ * \returns Generated integer
+ */
+Uint8 SDLTest_RandomUint8();
+
+/**
+ * Returns a random Sint8
+ *
+ * \returns Generated signed integer
+ */
+Sint8 SDLTest_RandomSint8();
+
+
+/**
+ * Returns a random Uint16
+ *
+ * \returns Generated integer
+ */
+Uint16 SDLTest_RandomUint16();
+
+/**
+ * Returns a random Sint16
+ *
+ * \returns Generated signed integer
+ */
+Sint16 SDLTest_RandomSint16();
+
+
+/**
+ * Returns a random integer
+ *
+ * \returns Generated integer
+ */
+Sint32 SDLTest_RandomSint32();
+
+
+/**
+ * Returns a random positive integer
+ *
+ * \returns Generated integer
+ */
+Uint32 SDLTest_RandomUint32();
+
+/**
+ * Returns random Uint64.
+ *
+ * \returns Generated integer
+ */
+Uint64 SDLTest_RandomUint64();
+
+
+/**
+ * Returns random Sint64.
+ *
+ * \returns Generated signed integer
+ */
+Sint64 SDLTest_RandomSint64();
+
+/**
+ * \returns random float in range [0.0 - 1.0[
+ */
+float SDLTest_RandomUnitFloat();
+
+/**
+ * \returns random double in range [0.0 - 1.0[
+ */
+double SDLTest_RandomUnitDouble();
+
+/**
+ * \returns random float.
+ *
+ */
+float SDLTest_RandomFloat();
+
+/**
+ * \returns random double.
+ *
+ */
+double SDLTest_RandomDouble();
+
+/**
+ * Returns a random boundary value for Uint8 within the given boundaries.
+ * Boundaries are inclusive, see the usage examples below. If validDomain
+ * is true, the function will only return valid boundaries, otherwise non-valid
+ * boundaries are also possible.
+ * If boundary1 > boundary2, the values are swapped
+ *
+ * Usage examples:
+ * RandomUint8BoundaryValue(10, 20, SDL_TRUE) returns 10, 11, 19 or 20
+ * RandomUint8BoundaryValue(1, 20, SDL_FALSE) returns 0 or 21
+ * RandomUint8BoundaryValue(0, 99, SDL_FALSE) returns 100
+ * RandomUint8BoundaryValue(0, 255, SDL_FALSE) returns 0 (error set)
+ *
+ * \param boundary1 Lower boundary limit
+ * \param boundary2 Upper boundary limit
+ * \param validDomain Should the generated boundary be valid (=within the bounds) or not?
+ *
+ * \returns Random boundary value for the given range and domain or 0 with error set
+ */
+Uint8 SDLTest_RandomUint8BoundaryValue(Uint8 boundary1, Uint8 boundary2, SDL_bool validDomain);
+
+/**
+ * Returns a random boundary value for Uint16 within the given boundaries.
+ * Boundaries are inclusive, see the usage examples below. If validDomain
+ * is true, the function will only return valid boundaries, otherwise non-valid
+ * boundaries are also possible.
+ * If boundary1 > boundary2, the values are swapped
+ *
+ * Usage examples:
+ * RandomUint16BoundaryValue(10, 20, SDL_TRUE) returns 10, 11, 19 or 20
+ * RandomUint16BoundaryValue(1, 20, SDL_FALSE) returns 0 or 21
+ * RandomUint16BoundaryValue(0, 99, SDL_FALSE) returns 100
+ * RandomUint16BoundaryValue(0, 0xFFFF, SDL_FALSE) returns 0 (error set)
+ *
+ * \param boundary1 Lower boundary limit
+ * \param boundary2 Upper boundary limit
+ * \param validDomain Should the generated boundary be valid (=within the bounds) or not?
+ *
+ * \returns Random boundary value for the given range and domain or 0 with error set
+ */
+Uint16 SDLTest_RandomUint16BoundaryValue(Uint16 boundary1, Uint16 boundary2, SDL_bool validDomain);
+
+/**
+ * Returns a random boundary value for Uint32 within the given boundaries.
+ * Boundaries are inclusive, see the usage examples below. If validDomain
+ * is true, the function will only return valid boundaries, otherwise non-valid
+ * boundaries are also possible.
+ * If boundary1 > boundary2, the values are swapped
+ *
+ * Usage examples:
+ * RandomUint32BoundaryValue(10, 20, SDL_TRUE) returns 10, 11, 19 or 20
+ * RandomUint32BoundaryValue(1, 20, SDL_FALSE) returns 0 or 21
+ * RandomUint32BoundaryValue(0, 99, SDL_FALSE) returns 100
+ * RandomUint32BoundaryValue(0, 0xFFFFFFFF, SDL_FALSE) returns 0 (with error set)
+ *
+ * \param boundary1 Lower boundary limit
+ * \param boundary2 Upper boundary limit
+ * \param validDomain Should the generated boundary be valid (=within the bounds) or not?
+ *
+ * \returns Random boundary value for the given range and domain or 0 with error set
+ */
+Uint32 SDLTest_RandomUint32BoundaryValue(Uint32 boundary1, Uint32 boundary2, SDL_bool validDomain);
+
+/**
+ * Returns a random boundary value for Uint64 within the given boundaries.
+ * Boundaries are inclusive, see the usage examples below. If validDomain
+ * is true, the function will only return valid boundaries, otherwise non-valid
+ * boundaries are also possible.
+ * If boundary1 > boundary2, the values are swapped
+ *
+ * Usage examples:
+ * RandomUint64BoundaryValue(10, 20, SDL_TRUE) returns 10, 11, 19 or 20
+ * RandomUint64BoundaryValue(1, 20, SDL_FALSE) returns 0 or 21
+ * RandomUint64BoundaryValue(0, 99, SDL_FALSE) returns 100
+ * RandomUint64BoundaryValue(0, 0xFFFFFFFFFFFFFFFF, SDL_FALSE) returns 0 (with error set)
+ *
+ * \param boundary1 Lower boundary limit
+ * \param boundary2 Upper boundary limit
+ * \param validDomain Should the generated boundary be valid (=within the bounds) or not?
+ *
+ * \returns Random boundary value for the given range and domain or 0 with error set
+ */
+Uint64 SDLTest_RandomUint64BoundaryValue(Uint64 boundary1, Uint64 boundary2, SDL_bool validDomain);
+
+/**
+ * Returns a random boundary value for Sint8 within the given boundaries.
+ * Boundaries are inclusive, see the usage examples below. If validDomain
+ * is true, the function will only return valid boundaries, otherwise non-valid
+ * boundaries are also possible.
+ * If boundary1 > boundary2, the values are swapped
+ *
+ * Usage examples:
+ * RandomSint8BoundaryValue(-10, 20, SDL_TRUE) returns -11, -10, 19 or 20
+ * RandomSint8BoundaryValue(-100, -10, SDL_FALSE) returns -101 or -9
+ * RandomSint8BoundaryValue(SINT8_MIN, 99, SDL_FALSE) returns 100
+ * RandomSint8BoundaryValue(SINT8_MIN, SINT8_MAX, SDL_FALSE) returns SINT8_MIN (== error value) with error set
+ *
+ * \param boundary1 Lower boundary limit
+ * \param boundary2 Upper boundary limit
+ * \param validDomain Should the generated boundary be valid (=within the bounds) or not?
+ *
+ * \returns Random boundary value for the given range and domain or SINT8_MIN with error set
+ */
+Sint8 SDLTest_RandomSint8BoundaryValue(Sint8 boundary1, Sint8 boundary2, SDL_bool validDomain);
+
+
+/**
+ * Returns a random boundary value for Sint16 within the given boundaries.
+ * Boundaries are inclusive, see the usage examples below. If validDomain
+ * is true, the function will only return valid boundaries, otherwise non-valid
+ * boundaries are also possible.
+ * If boundary1 > boundary2, the values are swapped
+ *
+ * Usage examples:
+ * RandomSint16BoundaryValue(-10, 20, SDL_TRUE) returns -11, -10, 19 or 20
+ * RandomSint16BoundaryValue(-100, -10, SDL_FALSE) returns -101 or -9
+ * RandomSint16BoundaryValue(SINT16_MIN, 99, SDL_FALSE) returns 100
+ * RandomSint16BoundaryValue(SINT16_MIN, SINT16_MAX, SDL_FALSE) returns SINT16_MIN (== error value) with error set
+ *
+ * \param boundary1 Lower boundary limit
+ * \param boundary2 Upper boundary limit
+ * \param validDomain Should the generated boundary be valid (=within the bounds) or not?
+ *
+ * \returns Random boundary value for the given range and domain or SINT16_MIN with error set
+ */
+Sint16 SDLTest_RandomSint16BoundaryValue(Sint16 boundary1, Sint16 boundary2, SDL_bool validDomain);
+
+/**
+ * Returns a random boundary value for Sint32 within the given boundaries.
+ * Boundaries are inclusive, see the usage examples below. If validDomain
+ * is true, the function will only return valid boundaries, otherwise non-valid
+ * boundaries are also possible.
+ * If boundary1 > boundary2, the values are swapped
+ *
+ * Usage examples:
+ * RandomSint32BoundaryValue(-10, 20, SDL_TRUE) returns -11, -10, 19 or 20
+ * RandomSint32BoundaryValue(-100, -10, SDL_FALSE) returns -101 or -9
+ * RandomSint32BoundaryValue(SINT32_MIN, 99, SDL_FALSE) returns 100
+ * RandomSint32BoundaryValue(SINT32_MIN, SINT32_MAX, SDL_FALSE) returns SINT32_MIN (== error value)
+ *
+ * \param boundary1 Lower boundary limit
+ * \param boundary2 Upper boundary limit
+ * \param validDomain Should the generated boundary be valid (=within the bounds) or not?
+ *
+ * \returns Random boundary value for the given range and domain or SINT32_MIN with error set
+ */
+Sint32 SDLTest_RandomSint32BoundaryValue(Sint32 boundary1, Sint32 boundary2, SDL_bool validDomain);
+
+/**
+ * Returns a random boundary value for Sint64 within the given boundaries.
+ * Boundaries are inclusive, see the usage examples below. If validDomain
+ * is true, the function will only return valid boundaries, otherwise non-valid
+ * boundaries are also possible.
+ * If boundary1 > boundary2, the values are swapped
+ *
+ * Usage examples:
+ * RandomSint64BoundaryValue(-10, 20, SDL_TRUE) returns -11, -10, 19 or 20
+ * RandomSint64BoundaryValue(-100, -10, SDL_FALSE) returns -101 or -9
+ * RandomSint64BoundaryValue(SINT64_MIN, 99, SDL_FALSE) returns 100
+ * RandomSint64BoundaryValue(SINT64_MIN, SINT64_MAX, SDL_FALSE) returns SINT64_MIN (== error value) and error set
+ *
+ * \param boundary1 Lower boundary limit
+ * \param boundary2 Upper boundary limit
+ * \param validDomain Should the generated boundary be valid (=within the bounds) or not?
+ *
+ * \returns Random boundary value for the given range and domain or SINT64_MIN with error set
+ */
+Sint64 SDLTest_RandomSint64BoundaryValue(Sint64 boundary1, Sint64 boundary2, SDL_bool validDomain);
+
+
+/**
+ * Returns integer in range [min, max] (inclusive).
+ * Min and max values can be negative values.
+ * If Max in smaller tham min, then the values are swapped.
+ * Min and max are the same value, that value will be returned.
+ *
+ * \param min Minimum inclusive value of returned random number
+ * \param max Maximum inclusive value of returned random number
+ *
+ * \returns Generated random integer in range
+ */
+Sint32 SDLTest_RandomIntegerInRange(Sint32 min, Sint32 max);
+
+
+/**
+ * Generates random null-terminated string. The minimum length for
+ * the string is 1 character, maximum length for the string is 255
+ * characters and it can contain ASCII characters from 32 to 126.
+ *
+ * Note: Returned string needs to be deallocated.
+ *
+ * \returns Newly allocated random string; or NULL if length was invalid or string could not be allocated.
+ */
+char * SDLTest_RandomAsciiString();
+
+
+/**
+ * Generates random null-terminated string. The maximum length for
+ * the string is defined by the maxLength parameter.
+ * String can contain ASCII characters from 32 to 126.
+ *
+ * Note: Returned string needs to be deallocated.
+ *
+ * \param maxLength The maximum length of the generated string.
+ *
+ * \returns Newly allocated random string; or NULL if maxLength was invalid or string could not be allocated.
+ */
+char * SDLTest_RandomAsciiStringWithMaximumLength(int maxLength);
+
+
+/**
+ * Generates random null-terminated string. The length for
+ * the string is defined by the size parameter.
+ * String can contain ASCII characters from 32 to 126.
+ *
+ * Note: Returned string needs to be deallocated.
+ *
+ * \param size The length of the generated string
+ *
+ * \returns Newly allocated random string; or NULL if size was invalid or string could not be allocated.
+ */
+char * SDLTest_RandomAsciiStringOfSize(int size);
+
+/**
+ * Returns the invocation count for the fuzzer since last ...FuzzerInit.
+ */
+int SDLTest_GetFuzzerInvocationCount();
+
+/* Ends C function definitions when using C++ */
+#ifdef __cplusplus
+}
+#endif
+#include "close_code.h"
+
+#endif /* _SDL_test_fuzzer_h */
+
+/* vi: set ts=4 sw=4 expandtab: */
diff --git a/include/SDL2/SDL_test_harness.h b/include/SDL2/SDL_test_harness.h
new file mode 100644 (file)
index 0000000..2c1e2ad
--- /dev/null
@@ -0,0 +1,123 @@
+/*
+  Simple DirectMedia Layer
+  Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
+
+  This software is provided 'as-is', without any express or implied
+  warranty.  In no event will the authors be held liable for any damages
+  arising from the use of this software.
+
+  Permission is granted to anyone to use this software for any purpose,
+  including commercial applications, and to alter it and redistribute it
+  freely, subject to the following restrictions:
+
+  1. The origin of this software must not be misrepresented; you must not
+     claim that you wrote the original software. If you use this software
+     in a product, an acknowledgment in the product documentation would be
+     appreciated but is not required.
+  2. Altered source versions must be plainly marked as such, and must not be
+     misrepresented as being the original software.
+  3. This notice may not be removed or altered from any source distribution.
+*/
+
+/**
+ *  \file SDL_test_harness.h
+ *
+ *  Include file for SDL test framework.
+ *
+ *  This code is a part of the SDL2_test library, not the main SDL library.
+ */
+
+/*
+  Defines types for test case definitions and the test execution harness API.
+
+  Based on original GSOC code by Markus Kauppila <markus.kauppila@gmail.com>
+*/
+
+#ifndef _SDL_test_harness_h
+#define _SDL_test_harness_h
+
+#include "begin_code.h"
+/* Set up for C function definitions, even when using C++ */
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/* ! Definitions for test case structures */
+#define TEST_ENABLED  1
+#define TEST_DISABLED 0
+
+/* ! Definition of all the possible test return values of the test case method */
+#define TEST_ABORTED        -1
+#define TEST_STARTED         0
+#define TEST_COMPLETED       1
+#define TEST_SKIPPED         2
+
+/* ! Definition of all the possible test results for the harness */
+#define TEST_RESULT_PASSED              0
+#define TEST_RESULT_FAILED              1
+#define TEST_RESULT_NO_ASSERT           2
+#define TEST_RESULT_SKIPPED             3
+#define TEST_RESULT_SETUP_FAILURE       4
+
+/* !< Function pointer to a test case setup function (run before every test) */
+typedef void (*SDLTest_TestCaseSetUpFp)(void *arg);
+
+/* !< Function pointer to a test case function */
+typedef int (*SDLTest_TestCaseFp)(void *arg);
+
+/* !< Function pointer to a test case teardown function (run after every test) */
+typedef void  (*SDLTest_TestCaseTearDownFp)(void *arg);
+
+/**
+ * Holds information about a single test case.
+ */
+typedef struct SDLTest_TestCaseReference {
+    /* !< Func2Stress */
+    SDLTest_TestCaseFp testCase;
+    /* !< Short name (or function name) "Func2Stress" */
+    char *name;
+    /* !< Long name or full description "This test pushes func2() to the limit." */
+    char *description;
+    /* !< Set to TEST_ENABLED or TEST_DISABLED (test won't be run) */
+    int enabled;
+} SDLTest_TestCaseReference;
+
+/**
+ * Holds information about a test suite (multiple test cases).
+ */
+typedef struct SDLTest_TestSuiteReference {
+    /* !< "PlatformSuite" */
+    char *name;
+    /* !< The function that is run before each test. NULL skips. */
+    SDLTest_TestCaseSetUpFp testSetUp;
+    /* !< The test cases that are run as part of the suite. Last item should be NULL. */
+    const SDLTest_TestCaseReference **testCases;
+    /* !< The function that is run after each test. NULL skips. */
+    SDLTest_TestCaseTearDownFp testTearDown;
+} SDLTest_TestSuiteReference;
+
+
+/**
+ * \brief Execute a test suite using the given run seed and execution key.
+ *
+ * \param testSuites Suites containing the test case.
+ * \param userRunSeed Custom run seed provided by user, or NULL to autogenerate one.
+ * \param userExecKey Custom execution key provided by user, or 0 to autogenerate one.
+ * \param filter Filter specification. NULL disables. Case sensitive.
+ * \param testIterations Number of iterations to run each test case.
+ *
+ * \returns Test run result; 0 when all tests passed, 1 if any tests failed.
+ */
+int SDLTest_RunSuites(SDLTest_TestSuiteReference *testSuites[], const char *userRunSeed, Uint64 userExecKey, const char *filter, int testIterations);
+
+
+/* Ends C function definitions when using C++ */
+#ifdef __cplusplus
+}
+#endif
+#include "close_code.h"
+
+#endif /* _SDL_test_harness_h */
+
+/* vi: set ts=4 sw=4 expandtab: */
diff --git a/include/SDL2/SDL_test_images.h b/include/SDL2/SDL_test_images.h
new file mode 100644 (file)
index 0000000..0562799
--- /dev/null
@@ -0,0 +1,78 @@
+/*
+  Simple DirectMedia Layer
+  Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
+
+  This software is provided 'as-is', without any express or implied
+  warranty.  In no event will the authors be held liable for any damages
+  arising from the use of this software.
+
+  Permission is granted to anyone to use this software for any purpose,
+  including commercial applications, and to alter it and redistribute it
+  freely, subject to the following restrictions:
+
+  1. The origin of this software must not be misrepresented; you must not
+     claim that you wrote the original software. If you use this software
+     in a product, an acknowledgment in the product documentation would be
+     appreciated but is not required.
+  2. Altered source versions must be plainly marked as such, and must not be
+     misrepresented as being the original software.
+  3. This notice may not be removed or altered from any source distribution.
+*/
+
+/**
+ *  \file SDL_test_images.h
+ *
+ *  Include file for SDL test framework.
+ *
+ *  This code is a part of the SDL2_test library, not the main SDL library.
+ */
+
+/*
+
+ Defines some images for tests.
+
+*/
+
+#ifndef _SDL_test_images_h
+#define _SDL_test_images_h
+
+#include "SDL.h"
+
+#include "begin_code.h"
+/* Set up for C function definitions, even when using C++ */
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ *Type for test images.
+ */
+typedef struct SDLTest_SurfaceImage_s {
+  int width;
+  int height;
+  unsigned int bytes_per_pixel; /* 3:RGB, 4:RGBA */
+  const char *pixel_data;
+} SDLTest_SurfaceImage_t;
+
+/* Test images */
+SDL_Surface *SDLTest_ImageBlit();
+SDL_Surface *SDLTest_ImageBlitColor();
+SDL_Surface *SDLTest_ImageBlitAlpha();
+SDL_Surface *SDLTest_ImageBlitBlendAdd();
+SDL_Surface *SDLTest_ImageBlitBlend();
+SDL_Surface *SDLTest_ImageBlitBlendMod();
+SDL_Surface *SDLTest_ImageBlitBlendNone();
+SDL_Surface *SDLTest_ImageBlitBlendAll();
+SDL_Surface *SDLTest_ImageFace();
+SDL_Surface *SDLTest_ImagePrimitives();
+SDL_Surface *SDLTest_ImagePrimitivesBlend();
+
+/* Ends C function definitions when using C++ */
+#ifdef __cplusplus
+}
+#endif
+#include "close_code.h"
+
+#endif /* _SDL_test_images_h */
+
+/* vi: set ts=4 sw=4 expandtab: */
diff --git a/include/SDL2/SDL_test_log.h b/include/SDL2/SDL_test_log.h
new file mode 100644 (file)
index 0000000..76ce105
--- /dev/null
@@ -0,0 +1,67 @@
+/*
+  Simple DirectMedia Layer
+  Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
+
+  This software is provided 'as-is', without any express or implied
+  warranty.  In no event will the authors be held liable for any damages
+  arising from the use of this software.
+
+  Permission is granted to anyone to use this software for any purpose,
+  including commercial applications, and to alter it and redistribute it
+  freely, subject to the following restrictions:
+
+  1. The origin of this software must not be misrepresented; you must not
+     claim that you wrote the original software. If you use this software
+     in a product, an acknowledgment in the product documentation would be
+     appreciated but is not required.
+  2. Altered source versions must be plainly marked as such, and must not be
+     misrepresented as being the original software.
+  3. This notice may not be removed or altered from any source distribution.
+*/
+
+/**
+ *  \file SDL_test_log.h
+ *
+ *  Include file for SDL test framework.
+ *
+ *  This code is a part of the SDL2_test library, not the main SDL library.
+ */
+
+/*
+ *
+ *  Wrapper to log in the TEST category
+ *
+ */
+
+#ifndef _SDL_test_log_h
+#define _SDL_test_log_h
+
+#include "begin_code.h"
+/* Set up for C function definitions, even when using C++ */
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * \brief Prints given message with a timestamp in the TEST category and INFO priority.
+ *
+ * \param fmt Message to be logged
+ */
+void SDLTest_Log(const char *fmt, ...);
+
+/**
+ * \brief Prints given message with a timestamp in the TEST category and the ERROR priority.
+ *
+ * \param fmt Message to be logged
+ */
+void SDLTest_LogError(const char *fmt, ...);
+
+/* Ends C function definitions when using C++ */
+#ifdef __cplusplus
+}
+#endif
+#include "close_code.h"
+
+#endif /* _SDL_test_log_h */
+
+/* vi: set ts=4 sw=4 expandtab: */
diff --git a/include/SDL2/SDL_test_md5.h b/include/SDL2/SDL_test_md5.h
new file mode 100644 (file)
index 0000000..029e164
--- /dev/null
@@ -0,0 +1,129 @@
+/*
+  Simple DirectMedia Layer
+  Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
+
+  This software is provided 'as-is', without any express or implied
+  warranty.  In no event will the authors be held liable for any damages
+  arising from the use of this software.
+
+  Permission is granted to anyone to use this software for any purpose,
+  including commercial applications, and to alter it and redistribute it
+  freely, subject to the following restrictions:
+
+  1. The origin of this software must not be misrepresented; you must not
+     claim that you wrote the original software. If you use this software
+     in a product, an acknowledgment in the product documentation would be
+     appreciated but is not required.
+  2. Altered source versions must be plainly marked as such, and must not be
+     misrepresented as being the original software.
+  3. This notice may not be removed or altered from any source distribution.
+*/
+
+/**
+ *  \file SDL_test_md5.h
+ *
+ *  Include file for SDL test framework.
+ *
+ *  This code is a part of the SDL2_test library, not the main SDL library.
+ */
+
+/*
+ ***********************************************************************
+ ** Header file for implementation of MD5                             **
+ ** RSA Data Security, Inc. MD5 Message-Digest Algorithm              **
+ ** Created: 2/17/90 RLR                                              **
+ ** Revised: 12/27/90 SRD,AJ,BSK,JT Reference C version               **
+ ** Revised (for MD5): RLR 4/27/91                                    **
+ **   -- G modified to have y&~z instead of y&z                       **
+ **   -- FF, GG, HH modified to add in last register done             **
+ **   -- Access pattern: round 2 works mod 5, round 3 works mod 3     **
+ **   -- distinct additive constant for each step                     **
+ **   -- round 4 added, working mod 7                                 **
+ ***********************************************************************
+*/
+
+/*
+ ***********************************************************************
+ **  Message-digest routines:                                         **
+ **  To form the message digest for a message M                       **
+ **    (1) Initialize a context buffer mdContext using MD5Init        **
+ **    (2) Call MD5Update on mdContext and M                          **
+ **    (3) Call MD5Final on mdContext                                 **
+ **  The message digest is now in mdContext->digest[0...15]           **
+ ***********************************************************************
+*/
+
+#ifndef _SDL_test_md5_h
+#define _SDL_test_md5_h
+
+#include "begin_code.h"
+/* Set up for C function definitions, even when using C++ */
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* ------------ Definitions --------- */
+
+/* typedef a 32-bit type */
+  typedef unsigned long int MD5UINT4;
+
+/* Data structure for MD5 (Message-Digest) computation */
+  typedef struct {
+    MD5UINT4  i[2];     /* number of _bits_ handled mod 2^64 */
+    MD5UINT4  buf[4];       /* scratch buffer */
+    unsigned char in[64];   /* input buffer */
+    unsigned char digest[16];   /* actual digest after Md5Final call */
+  } SDLTest_Md5Context;
+
+/* ---------- Function Prototypes ------------- */
+
+/**
+ * /brief initialize the context
+ *
+ * /param  mdContext        pointer to context variable
+ *
+ * Note: The function initializes the message-digest context
+ *       mdContext. Call before each new use of the context -
+ *       all fields are set to zero.
+ */
+ void SDLTest_Md5Init(SDLTest_Md5Context * mdContext);
+
+
+/**
+ * /brief update digest from variable length data
+ *
+ * /param  mdContext       pointer to context variable
+ * /param  inBuf           pointer to data array/string
+ * /param  inLen           length of data array/string
+ *
+ * Note: The function updates the message-digest context to account
+ *       for the presence of each of the characters inBuf[0..inLen-1]
+ *       in the message whose digest is being computed.
+*/
+
+ void SDLTest_Md5Update(SDLTest_Md5Context * mdContext, unsigned char *inBuf,
+                 unsigned int inLen);
+
+
+/*
+ * /brief complete digest computation
+ *
+ * /param mdContext     pointer to context variable
+ *
+ * Note: The function terminates the message-digest computation and
+ *       ends with the desired message digest in mdContext.digest[0..15].
+ *       Always call before using the digest[] variable.
+*/
+
+ void SDLTest_Md5Final(SDLTest_Md5Context * mdContext);
+
+
+/* Ends C function definitions when using C++ */
+#ifdef __cplusplus
+}
+#endif
+#include "close_code.h"
+
+#endif /* _SDL_test_md5_h */
+
+/* vi: set ts=4 sw=4 expandtab: */
diff --git a/include/SDL2/SDL_test_random.h b/include/SDL2/SDL_test_random.h
new file mode 100644 (file)
index 0000000..6c5660d
--- /dev/null
@@ -0,0 +1,115 @@
+/*
+  Simple DirectMedia Layer
+  Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
+
+  This software is provided 'as-is', without any express or implied
+  warranty.  In no event will the authors be held liable for any damages
+  arising from the use of this software.
+
+  Permission is granted to anyone to use this software for any purpose,
+  including commercial applications, and to alter it and redistribute it
+  freely, subject to the following restrictions:
+
+  1. The origin of this software must not be misrepresented; you must not
+     claim that you wrote the original software. If you use this software
+     in a product, an acknowledgment in the product documentation would be
+     appreciated but is not required.
+  2. Altered source versions must be plainly marked as such, and must not be
+     misrepresented as being the original software.
+  3. This notice may not be removed or altered from any source distribution.
+*/
+
+/**
+ *  \file SDL_test_random.h
+ *
+ *  Include file for SDL test framework.
+ *
+ *  This code is a part of the SDL2_test library, not the main SDL library.
+ */
+
+/*
+
+ A "32-bit Multiply with carry random number generator. Very fast.
+ Includes a list of recommended multipliers.
+
+ multiply-with-carry generator: x(n) = a*x(n-1) + carry mod 2^32.
+ period: (a*2^31)-1
+
+*/
+
+#ifndef _SDL_test_random_h
+#define _SDL_test_random_h
+
+#include "begin_code.h"
+/* Set up for C function definitions, even when using C++ */
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* --- Definitions */
+
+/*
+ * Macros that return a random number in a specific format.
+ */
+#define SDLTest_RandomInt(c)        ((int)SDLTest_Random(c))
+
+/*
+ * Context structure for the random number generator state.
+ */
+  typedef struct {
+    unsigned int a;
+    unsigned int x;
+    unsigned int c;
+    unsigned int ah;
+    unsigned int al;
+  } SDLTest_RandomContext;
+
+
+/* --- Function prototypes */
+
+/**
+ *  \brief Initialize random number generator with two integers.
+ *
+ *  Note: The random sequence of numbers returned by ...Random() is the
+ *  same for the same two integers and has a period of 2^31.
+ *
+ *  \param rndContext     pointer to context structure
+ *  \param xi         integer that defines the random sequence
+ *  \param ci         integer that defines the random sequence
+ *
+ */
+ void SDLTest_RandomInit(SDLTest_RandomContext * rndContext, unsigned int xi,
+                  unsigned int ci);
+
+/**
+ *  \brief Initialize random number generator based on current system time.
+ *
+ *  \param rndContext     pointer to context structure
+ *
+ */
+ void SDLTest_RandomInitTime(SDLTest_RandomContext *rndContext);
+
+
+/**
+ *  \brief Initialize random number generator based on current system time.
+ *
+ *  Note: ...RandomInit() or ...RandomInitTime() must have been called
+ *  before using this function.
+ *
+ *  \param rndContext     pointer to context structure
+ *
+ *  \returns A random number (32bit unsigned integer)
+ *
+ */
+ unsigned int SDLTest_Random(SDLTest_RandomContext *rndContext);
+
+
+/* Ends C function definitions when using C++ */
+#ifdef __cplusplus
+}
+#endif
+#include "close_code.h"
+
+#endif /* _SDL_test_random_h */
+
+/* vi: set ts=4 sw=4 expandtab: */
diff --git a/include/SDL2/SDL_thread.h b/include/SDL2/SDL_thread.h
new file mode 100644 (file)
index 0000000..4e48cc3
--- /dev/null
@@ -0,0 +1,287 @@
+/*
+  Simple DirectMedia Layer
+  Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
+
+  This software is provided 'as-is', without any express or implied
+  warranty.  In no event will the authors be held liable for any damages
+  arising from the use of this software.
+
+  Permission is granted to anyone to use this software for any purpose,
+  including commercial applications, and to alter it and redistribute it
+  freely, subject to the following restrictions:
+
+  1. The origin of this software must not be misrepresented; you must not
+     claim that you wrote the original software. If you use this software
+     in a product, an acknowledgment in the product documentation would be
+     appreciated but is not required.
+  2. Altered source versions must be plainly marked as such, and must not be
+     misrepresented as being the original software.
+  3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef _SDL_thread_h
+#define _SDL_thread_h
+
+/**
+ *  \file SDL_thread.h
+ *
+ *  Header for the SDL thread management routines.
+ */
+
+#include "SDL_stdinc.h"
+#include "SDL_error.h"
+
+/* Thread synchronization primitives */
+#include "SDL_atomic.h"
+#include "SDL_mutex.h"
+
+#include "begin_code.h"
+/* Set up for C function definitions, even when using C++ */
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* The SDL thread structure, defined in SDL_thread.c */
+struct SDL_Thread;
+typedef struct SDL_Thread SDL_Thread;
+
+/* The SDL thread ID */
+typedef unsigned long SDL_threadID;
+
+/* Thread local storage ID, 0 is the invalid ID */
+typedef unsigned int SDL_TLSID;
+
+/**
+ *  The SDL thread priority.
+ *
+ *  \note On many systems you require special privileges to set high priority.
+ */
+typedef enum {
+    SDL_THREAD_PRIORITY_LOW,
+    SDL_THREAD_PRIORITY_NORMAL,
+    SDL_THREAD_PRIORITY_HIGH
+} SDL_ThreadPriority;
+
+/**
+ *  The function passed to SDL_CreateThread().
+ *  It is passed a void* user context parameter and returns an int.
+ */
+typedef int (SDLCALL * SDL_ThreadFunction) (void *data);
+
+#if defined(__WIN32__) && !defined(HAVE_LIBC)
+/**
+ *  \file SDL_thread.h
+ *
+ *  We compile SDL into a DLL. This means, that it's the DLL which
+ *  creates a new thread for the calling process with the SDL_CreateThread()
+ *  API. There is a problem with this, that only the RTL of the SDL.DLL will
+ *  be initialized for those threads, and not the RTL of the calling
+ *  application!
+ *
+ *  To solve this, we make a little hack here.
+ *
+ *  We'll always use the caller's _beginthread() and _endthread() APIs to
+ *  start a new thread. This way, if it's the SDL.DLL which uses this API,
+ *  then the RTL of SDL.DLL will be used to create the new thread, and if it's
+ *  the application, then the RTL of the application will be used.
+ *
+ *  So, in short:
+ *  Always use the _beginthread() and _endthread() of the calling runtime
+ *  library!
+ */
+#define SDL_PASSED_BEGINTHREAD_ENDTHREAD
+#include <process.h>            /* This has _beginthread() and _endthread() defined! */
+
+typedef uintptr_t(__cdecl * pfnSDL_CurrentBeginThread) (void *, unsigned,
+                                                        unsigned (__stdcall *
+                                                                  func) (void
+                                                                         *),
+                                                        void *arg, unsigned,
+                                                        unsigned *threadID);
+typedef void (__cdecl * pfnSDL_CurrentEndThread) (unsigned code);
+
+/**
+ *  Create a thread.
+ */
+extern DECLSPEC SDL_Thread *SDLCALL
+SDL_CreateThread(SDL_ThreadFunction fn, const char *name, void *data,
+                 pfnSDL_CurrentBeginThread pfnBeginThread,
+                 pfnSDL_CurrentEndThread pfnEndThread);
+
+/**
+ *  Create a thread.
+ */
+#if defined(SDL_CreateThread) && SDL_DYNAMIC_API
+#undef SDL_CreateThread
+#define SDL_CreateThread(fn, name, data) SDL_CreateThread_REAL(fn, name, data, (pfnSDL_CurrentBeginThread)_beginthreadex, (pfnSDL_CurrentEndThread)_endthreadex)
+#else
+#define SDL_CreateThread(fn, name, data) SDL_CreateThread(fn, name, data, (pfnSDL_CurrentBeginThread)_beginthreadex, (pfnSDL_CurrentEndThread)_endthreadex)
+#endif
+
+#else
+
+/**
+ *  Create a thread.
+ *
+ *   Thread naming is a little complicated: Most systems have very small
+ *    limits for the string length (Haiku has 32 bytes, Linux currently has 16,
+ *    Visual C++ 6.0 has nine!), and possibly other arbitrary rules. You'll
+ *    have to see what happens with your system's debugger. The name should be
+ *    UTF-8 (but using the naming limits of C identifiers is a better bet).
+ *   There are no requirements for thread naming conventions, so long as the
+ *    string is null-terminated UTF-8, but these guidelines are helpful in
+ *    choosing a name:
+ *
+ *    http://stackoverflow.com/questions/149932/naming-conventions-for-threads
+ *
+ *   If a system imposes requirements, SDL will try to munge the string for
+ *    it (truncate, etc), but the original string contents will be available
+ *    from SDL_GetThreadName().
+ */
+extern DECLSPEC SDL_Thread *SDLCALL
+SDL_CreateThread(SDL_ThreadFunction fn, const char *name, void *data);
+
+#endif
+
+/**
+ * Get the thread name, as it was specified in SDL_CreateThread().
+ *  This function returns a pointer to a UTF-8 string that names the
+ *  specified thread, or NULL if it doesn't have a name. This is internal
+ *  memory, not to be free()'d by the caller, and remains valid until the
+ *  specified thread is cleaned up by SDL_WaitThread().
+ */
+extern DECLSPEC const char *SDLCALL SDL_GetThreadName(SDL_Thread *thread);
+
+/**
+ *  Get the thread identifier for the current thread.
+ */
+extern DECLSPEC SDL_threadID SDLCALL SDL_ThreadID(void);
+
+/**
+ *  Get the thread identifier for the specified thread.
+ *
+ *  Equivalent to SDL_ThreadID() if the specified thread is NULL.
+ */
+extern DECLSPEC SDL_threadID SDLCALL SDL_GetThreadID(SDL_Thread * thread);
+
+/**
+ *  Set the priority for the current thread
+ */
+extern DECLSPEC int SDLCALL SDL_SetThreadPriority(SDL_ThreadPriority priority);
+
+/**
+ *  Wait for a thread to finish. Threads that haven't been detached will
+ *  remain (as a "zombie") until this function cleans them up. Not doing so
+ *  is a resource leak.
+ *
+ *  Once a thread has been cleaned up through this function, the SDL_Thread
+ *  that references it becomes invalid and should not be referenced again.
+ *  As such, only one thread may call SDL_WaitThread() on another.
+ *
+ *  The return code for the thread function is placed in the area
+ *  pointed to by \c status, if \c status is not NULL.
+ *
+ *  You may not wait on a thread that has been used in a call to
+ *  SDL_DetachThread(). Use either that function or this one, but not
+ *  both, or behavior is undefined.
+ *
+ *  It is safe to pass NULL to this function; it is a no-op.
+ */
+extern DECLSPEC void SDLCALL SDL_WaitThread(SDL_Thread * thread, int *status);
+
+/**
+ *  A thread may be "detached" to signify that it should not remain until
+ *  another thread has called SDL_WaitThread() on it. Detaching a thread
+ *  is useful for long-running threads that nothing needs to synchronize
+ *  with or further manage. When a detached thread is done, it simply
+ *  goes away.
+ *
+ *  There is no way to recover the return code of a detached thread. If you
+ *  need this, don't detach the thread and instead use SDL_WaitThread().
+ *
+ *  Once a thread is detached, you should usually assume the SDL_Thread isn't
+ *  safe to reference again, as it will become invalid immediately upon
+ *  the detached thread's exit, instead of remaining until someone has called
+ *  SDL_WaitThread() to finally clean it up. As such, don't detach the same
+ *  thread more than once.
+ *
+ *  If a thread has already exited when passed to SDL_DetachThread(), it will
+ *  stop waiting for a call to SDL_WaitThread() and clean up immediately.
+ *  It is not safe to detach a thread that might be used with SDL_WaitThread().
+ *
+ *  You may not call SDL_WaitThread() on a thread that has been detached.
+ *  Use either that function or this one, but not both, or behavior is
+ *  undefined.
+ *
+ *  It is safe to pass NULL to this function; it is a no-op.
+ */
+extern DECLSPEC void SDLCALL SDL_DetachThread(SDL_Thread * thread);
+
+/**
+ *  \brief Create an identifier that is globally visible to all threads but refers to data that is thread-specific.
+ *
+ *  \return The newly created thread local storage identifier, or 0 on error
+ *
+ *  \code
+ *  static SDL_SpinLock tls_lock;
+ *  static SDL_TLSID thread_local_storage;
+ * 
+ *  void SetMyThreadData(void *value)
+ *  {
+ *      if (!thread_local_storage) {
+ *          SDL_AtomicLock(&tls_lock);
+ *          if (!thread_local_storage) {
+ *              thread_local_storage = SDL_TLSCreate();
+ *          }
+ *          SDL_AtomicUnLock(&tls_lock);
+ *      }
+ *      SDL_TLSSet(thread_local_storage, value);
+ *  }
+ *  
+ *  void *GetMyThreadData(void)
+ *  {
+ *      return SDL_TLSGet(thread_local_storage);
+ *  }
+ *  \endcode
+ *
+ *  \sa SDL_TLSGet()
+ *  \sa SDL_TLSSet()
+ */
+extern DECLSPEC SDL_TLSID SDLCALL SDL_TLSCreate(void);
+
+/**
+ *  \brief Get the value associated with a thread local storage ID for the current thread.
+ *
+ *  \param id The thread local storage ID
+ *
+ *  \return The value associated with the ID for the current thread, or NULL if no value has been set.
+ *
+ *  \sa SDL_TLSCreate()
+ *  \sa SDL_TLSSet()
+ */
+extern DECLSPEC void * SDLCALL SDL_TLSGet(SDL_TLSID id);
+
+/**
+ *  \brief Set the value associated with a thread local storage ID for the current thread.
+ *
+ *  \param id The thread local storage ID
+ *  \param value The value to associate with the ID for the current thread
+ *  \param destructor A function called when the thread exits, to free the value.
+ *
+ *  \return 0 on success, -1 on error
+ *
+ *  \sa SDL_TLSCreate()
+ *  \sa SDL_TLSGet()
+ */
+extern DECLSPEC int SDLCALL SDL_TLSSet(SDL_TLSID id, const void *value, void (*destructor)(void*));
+
+
+/* Ends C function definitions when using C++ */
+#ifdef __cplusplus
+}
+#endif
+#include "close_code.h"
+
+#endif /* _SDL_thread_h */
+
+/* vi: set ts=4 sw=4 expandtab: */
diff --git a/include/SDL2/SDL_timer.h b/include/SDL2/SDL_timer.h
new file mode 100644 (file)
index 0000000..a48e046
--- /dev/null
@@ -0,0 +1,115 @@
+/*
+  Simple DirectMedia Layer
+  Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
+
+  This software is provided 'as-is', without any express or implied
+  warranty.  In no event will the authors be held liable for any damages
+  arising from the use of this software.
+
+  Permission is granted to anyone to use this software for any purpose,
+  including commercial applications, and to alter it and redistribute it
+  freely, subject to the following restrictions:
+
+  1. The origin of this software must not be misrepresented; you must not
+     claim that you wrote the original software. If you use this software
+     in a product, an acknowledgment in the product documentation would be
+     appreciated but is not required.
+  2. Altered source versions must be plainly marked as such, and must not be
+     misrepresented as being the original software.
+  3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef _SDL_timer_h
+#define _SDL_timer_h
+
+/**
+ *  \file SDL_timer.h
+ *
+ *  Header for the SDL time management routines.
+ */
+
+#include "SDL_stdinc.h"
+#include "SDL_error.h"
+
+#include "begin_code.h"
+/* Set up for C function definitions, even when using C++ */
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * \brief Get the number of milliseconds since the SDL library initialization.
+ *
+ * \note This value wraps if the program runs for more than ~49 days.
+ */
+extern DECLSPEC Uint32 SDLCALL SDL_GetTicks(void);
+
+/**
+ * \brief Compare SDL ticks values, and return true if A has passed B
+ *
+ * e.g. if you want to wait 100 ms, you could do this:
+ *  Uint32 timeout = SDL_GetTicks() + 100;
+ *  while (!SDL_TICKS_PASSED(SDL_GetTicks(), timeout)) {
+ *      ... do work until timeout has elapsed
+ *  }
+ */
+#define SDL_TICKS_PASSED(A, B)  ((Sint32)((B) - (A)) <= 0)
+
+/**
+ * \brief Get the current value of the high resolution counter
+ */
+extern DECLSPEC Uint64 SDLCALL SDL_GetPerformanceCounter(void);
+
+/**
+ * \brief Get the count per second of the high resolution counter
+ */
+extern DECLSPEC Uint64 SDLCALL SDL_GetPerformanceFrequency(void);
+
+/**
+ * \brief Wait a specified number of milliseconds before returning.
+ */
+extern DECLSPEC void SDLCALL SDL_Delay(Uint32 ms);
+
+/**
+ *  Function prototype for the timer callback function.
+ *
+ *  The callback function is passed the current timer interval and returns
+ *  the next timer interval.  If the returned value is the same as the one
+ *  passed in, the periodic alarm continues, otherwise a new alarm is
+ *  scheduled.  If the callback returns 0, the periodic alarm is cancelled.
+ */
+typedef Uint32 (SDLCALL * SDL_TimerCallback) (Uint32 interval, void *param);
+
+/**
+ * Definition of the timer ID type.
+ */
+typedef int SDL_TimerID;
+
+/**
+ * \brief Add a new timer to the pool of timers already running.
+ *
+ * \return A timer ID, or NULL when an error occurs.
+ */
+extern DECLSPEC SDL_TimerID SDLCALL SDL_AddTimer(Uint32 interval,
+                                                 SDL_TimerCallback callback,
+                                                 void *param);
+
+/**
+ * \brief Remove a timer knowing its ID.
+ *
+ * \return A boolean value indicating success or failure.
+ *
+ * \warning It is not safe to remove a timer multiple times.
+ */
+extern DECLSPEC SDL_bool SDLCALL SDL_RemoveTimer(SDL_TimerID id);
+
+
+/* Ends C function definitions when using C++ */
+#ifdef __cplusplus
+}
+#endif
+#include "close_code.h"
+
+#endif /* _SDL_timer_h */
+
+/* vi: set ts=4 sw=4 expandtab: */
diff --git a/include/SDL2/SDL_touch.h b/include/SDL2/SDL_touch.h
new file mode 100644 (file)
index 0000000..017deb2
--- /dev/null
@@ -0,0 +1,86 @@
+/*
+  Simple DirectMedia Layer
+  Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
+
+  This software is provided 'as-is', without any express or implied
+  warranty.  In no event will the authors be held liable for any damages
+  arising from the use of this software.
+
+  Permission is granted to anyone to use this software for any purpose,
+  including commercial applications, and to alter it and redistribute it
+  freely, subject to the following restrictions:
+
+  1. The origin of this software must not be misrepresented; you must not
+     claim that you wrote the original software. If you use this software
+     in a product, an acknowledgment in the product documentation would be
+     appreciated but is not required.
+  2. Altered source versions must be plainly marked as such, and must not be
+     misrepresented as being the original software.
+  3. This notice may not be removed or altered from any source distribution.
+*/
+
+/**
+ *  \file SDL_touch.h
+ *
+ *  Include file for SDL touch event handling.
+ */
+
+#ifndef _SDL_touch_h
+#define _SDL_touch_h
+
+#include "SDL_stdinc.h"
+#include "SDL_error.h"
+#include "SDL_video.h"
+
+#include "begin_code.h"
+/* Set up for C function definitions, even when using C++ */
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef Sint64 SDL_TouchID;
+typedef Sint64 SDL_FingerID;
+
+typedef struct SDL_Finger
+{
+    SDL_FingerID id;
+    float x;
+    float y;
+    float pressure;
+} SDL_Finger;
+
+/* Used as the device ID for mouse events simulated with touch input */
+#define SDL_TOUCH_MOUSEID ((Uint32)-1)
+
+
+/* Function prototypes */
+
+/**
+ *  \brief Get the number of registered touch devices.
+ */
+extern DECLSPEC int SDLCALL SDL_GetNumTouchDevices(void);
+
+/**
+ *  \brief Get the touch ID with the given index, or 0 if the index is invalid.
+ */
+extern DECLSPEC SDL_TouchID SDLCALL SDL_GetTouchDevice(int index);
+
+/**
+ *  \brief Get the number of active fingers for a given touch device.
+ */
+extern DECLSPEC int SDLCALL SDL_GetNumTouchFingers(SDL_TouchID touchID);
+
+/**
+ *  \brief Get the finger object of the given touch, with the given index.
+ */
+extern DECLSPEC SDL_Finger * SDLCALL SDL_GetTouchFinger(SDL_TouchID touchID, int index);
+
+/* Ends C function definitions when using C++ */
+#ifdef __cplusplus
+}
+#endif
+#include "close_code.h"
+
+#endif /* _SDL_touch_h */
+
+/* vi: set ts=4 sw=4 expandtab: */
diff --git a/include/SDL2/SDL_types.h b/include/SDL2/SDL_types.h
new file mode 100644 (file)
index 0000000..cd3ba33
--- /dev/null
@@ -0,0 +1,29 @@
+/*
+  Simple DirectMedia Layer
+  Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
+
+  This software is provided 'as-is', without any express or implied
+  warranty.  In no event will the authors be held liable for any damages
+  arising from the use of this software.
+
+  Permission is granted to anyone to use this software for any purpose,
+  including commercial applications, and to alter it and redistribute it
+  freely, subject to the following restrictions:
+
+  1. The origin of this software must not be misrepresented; you must not
+     claim that you wrote the original software. If you use this software
+     in a product, an acknowledgment in the product documentation would be
+     appreciated but is not required.
+  2. Altered source versions must be plainly marked as such, and must not be
+     misrepresented as being the original software.
+  3. This notice may not be removed or altered from any source distribution.
+*/
+
+/**
+ *  \file SDL_types.h
+ *
+ *  \deprecated
+ */
+
+/* DEPRECATED */
+#include "SDL_stdinc.h"
diff --git a/include/SDL2/SDL_version.h b/include/SDL2/SDL_version.h
new file mode 100644 (file)
index 0000000..d02898b
--- /dev/null
@@ -0,0 +1,162 @@
+/*
+  Simple DirectMedia Layer
+  Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
+
+  This software is provided 'as-is', without any express or implied
+  warranty.  In no event will the authors be held liable for any damages
+  arising from the use of this software.
+
+  Permission is granted to anyone to use this software for any purpose,
+  including commercial applications, and to alter it and redistribute it
+  freely, subject to the following restrictions:
+
+  1. The origin of this software must not be misrepresented; you must not
+     claim that you wrote the original software. If you use this software
+     in a product, an acknowledgment in the product documentation would be
+     appreciated but is not required.
+  2. Altered source versions must be plainly marked as such, and must not be
+     misrepresented as being the original software.
+  3. This notice may not be removed or altered from any source distribution.
+*/
+
+/**
+ *  \file SDL_version.h
+ *
+ *  This header defines the current SDL version.
+ */
+
+#ifndef _SDL_version_h
+#define _SDL_version_h
+
+#include "SDL_stdinc.h"
+
+#include "begin_code.h"
+/* Set up for C function definitions, even when using C++ */
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ *  \brief Information the version of SDL in use.
+ *
+ *  Represents the library's version as three levels: major revision
+ *  (increments with massive changes, additions, and enhancements),
+ *  minor revision (increments with backwards-compatible changes to the
+ *  major revision), and patchlevel (increments with fixes to the minor
+ *  revision).
+ *
+ *  \sa SDL_VERSION
+ *  \sa SDL_GetVersion
+ */
+typedef struct SDL_version
+{
+    Uint8 major;        /**< major version */
+    Uint8 minor;        /**< minor version */
+    Uint8 patch;        /**< update version */
+} SDL_version;
+
+/* Printable format: "%d.%d.%d", MAJOR, MINOR, PATCHLEVEL
+*/
+#define SDL_MAJOR_VERSION   2
+#define SDL_MINOR_VERSION   0
+#define SDL_PATCHLEVEL      3
+
+/**
+ *  \brief Macro to determine SDL version program was compiled against.
+ *
+ *  This macro fills in a SDL_version structure with the version of the
+ *  library you compiled against. This is determined by what header the
+ *  compiler uses. Note that if you dynamically linked the library, you might
+ *  have a slightly newer or older version at runtime. That version can be
+ *  determined with SDL_GetVersion(), which, unlike SDL_VERSION(),
+ *  is not a macro.
+ *
+ *  \param x A pointer to a SDL_version struct to initialize.
+ *
+ *  \sa SDL_version
+ *  \sa SDL_GetVersion
+ */
+#define SDL_VERSION(x)                          \
+{                                   \
+    (x)->major = SDL_MAJOR_VERSION;                 \
+    (x)->minor = SDL_MINOR_VERSION;                 \
+    (x)->patch = SDL_PATCHLEVEL;                    \
+}
+
+/**
+ *  This macro turns the version numbers into a numeric value:
+ *  \verbatim
+    (1,2,3) -> (1203)
+    \endverbatim
+ *
+ *  This assumes that there will never be more than 100 patchlevels.
+ */
+#define SDL_VERSIONNUM(X, Y, Z)                     \
+    ((X)*1000 + (Y)*100 + (Z))
+
+/**
+ *  This is the version number macro for the current SDL version.
+ */
+#define SDL_COMPILEDVERSION \
+    SDL_VERSIONNUM(SDL_MAJOR_VERSION, SDL_MINOR_VERSION, SDL_PATCHLEVEL)
+
+/**
+ *  This macro will evaluate to true if compiled with SDL at least X.Y.Z.
+ */
+#define SDL_VERSION_ATLEAST(X, Y, Z) \
+    (SDL_COMPILEDVERSION >= SDL_VERSIONNUM(X, Y, Z))
+
+/**
+ *  \brief Get the version of SDL that is linked against your program.
+ *
+ *  If you are linking to SDL dynamically, then it is possible that the
+ *  current version will be different than the version you compiled against.
+ *  This function returns the current version, while SDL_VERSION() is a
+ *  macro that tells you what version you compiled with.
+ *
+ *  \code
+ *  SDL_version compiled;
+ *  SDL_version linked;
+ *
+ *  SDL_VERSION(&compiled);
+ *  SDL_GetVersion(&linked);
+ *  printf("We compiled against SDL version %d.%d.%d ...\n",
+ *         compiled.major, compiled.minor, compiled.patch);
+ *  printf("But we linked against SDL version %d.%d.%d.\n",
+ *         linked.major, linked.minor, linked.patch);
+ *  \endcode
+ *
+ *  This function may be called safely at any time, even before SDL_Init().
+ *
+ *  \sa SDL_VERSION
+ */
+extern DECLSPEC void SDLCALL SDL_GetVersion(SDL_version * ver);
+
+/**
+ *  \brief Get the code revision of SDL that is linked against your program.
+ *
+ *  Returns an arbitrary string (a hash value) uniquely identifying the
+ *  exact revision of the SDL library in use, and is only useful in comparing
+ *  against other revisions. It is NOT an incrementing number.
+ */
+extern DECLSPEC const char *SDLCALL SDL_GetRevision(void);
+
+/**
+ *  \brief Get the revision number of SDL that is linked against your program.
+ *
+ *  Returns a number uniquely identifying the exact revision of the SDL
+ *  library in use. It is an incrementing number based on commits to
+ *  hg.libsdl.org.
+ */
+extern DECLSPEC int SDLCALL SDL_GetRevisionNumber(void);
+
+
+/* Ends C function definitions when using C++ */
+#ifdef __cplusplus
+}
+#endif
+#include "close_code.h"
+
+#endif /* _SDL_version_h */
+
+/* vi: set ts=4 sw=4 expandtab: */
diff --git a/include/SDL2/SDL_video.h b/include/SDL2/SDL_video.h
new file mode 100644 (file)
index 0000000..49ea37a
--- /dev/null
@@ -0,0 +1,979 @@
+/*
+  Simple DirectMedia Layer
+  Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
+
+  This software is provided 'as-is', without any express or implied
+  warranty.  In no event will the authors be held liable for any damages
+  arising from the use of this software.
+
+  Permission is granted to anyone to use this software for any purpose,
+  including commercial applications, and to alter it and redistribute it
+  freely, subject to the following restrictions:
+
+  1. The origin of this software must not be misrepresented; you must not
+     claim that you wrote the original software. If you use this software
+     in a product, an acknowledgment in the product documentation would be
+     appreciated but is not required.
+  2. Altered source versions must be plainly marked as such, and must not be
+     misrepresented as being the original software.
+  3. This notice may not be removed or altered from any source distribution.
+*/
+
+/**
+ *  \file SDL_video.h
+ *
+ *  Header file for SDL video functions.
+ */
+
+#ifndef _SDL_video_h
+#define _SDL_video_h
+
+#include "SDL_stdinc.h"
+#include "SDL_pixels.h"
+#include "SDL_rect.h"
+#include "SDL_surface.h"
+
+#include "begin_code.h"
+/* Set up for C function definitions, even when using C++ */
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ *  \brief  The structure that defines a display mode
+ *
+ *  \sa SDL_GetNumDisplayModes()
+ *  \sa SDL_GetDisplayMode()
+ *  \sa SDL_GetDesktopDisplayMode()
+ *  \sa SDL_GetCurrentDisplayMode()
+ *  \sa SDL_GetClosestDisplayMode()
+ *  \sa SDL_SetWindowDisplayMode()
+ *  \sa SDL_GetWindowDisplayMode()
+ */
+typedef struct
+{
+    Uint32 format;              /**< pixel format */
+    int w;                      /**< width */
+    int h;                      /**< height */
+    int refresh_rate;           /**< refresh rate (or zero for unspecified) */
+    void *driverdata;           /**< driver-specific data, initialize to 0 */
+} SDL_DisplayMode;
+
+/**
+ *  \brief The type used to identify a window
+ *
+ *  \sa SDL_CreateWindow()
+ *  \sa SDL_CreateWindowFrom()
+ *  \sa SDL_DestroyWindow()
+ *  \sa SDL_GetWindowData()
+ *  \sa SDL_GetWindowFlags()
+ *  \sa SDL_GetWindowGrab()
+ *  \sa SDL_GetWindowPosition()
+ *  \sa SDL_GetWindowSize()
+ *  \sa SDL_GetWindowTitle()
+ *  \sa SDL_HideWindow()
+ *  \sa SDL_MaximizeWindow()
+ *  \sa SDL_MinimizeWindow()
+ *  \sa SDL_RaiseWindow()
+ *  \sa SDL_RestoreWindow()
+ *  \sa SDL_SetWindowData()
+ *  \sa SDL_SetWindowFullscreen()
+ *  \sa SDL_SetWindowGrab()
+ *  \sa SDL_SetWindowIcon()
+ *  \sa SDL_SetWindowPosition()
+ *  \sa SDL_SetWindowSize()
+ *  \sa SDL_SetWindowBordered()
+ *  \sa SDL_SetWindowTitle()
+ *  \sa SDL_ShowWindow()
+ */
+typedef struct SDL_Window SDL_Window;
+
+/**
+ *  \brief The flags on a window
+ *
+ *  \sa SDL_GetWindowFlags()
+ */
+typedef enum
+{
+    SDL_WINDOW_FULLSCREEN = 0x00000001,         /**< fullscreen window */
+    SDL_WINDOW_OPENGL = 0x00000002,             /**< window usable with OpenGL context */
+    SDL_WINDOW_SHOWN = 0x00000004,              /**< window is visible */
+    SDL_WINDOW_HIDDEN = 0x00000008,             /**< window is not visible */
+    SDL_WINDOW_BORDERLESS = 0x00000010,         /**< no window decoration */
+    SDL_WINDOW_RESIZABLE = 0x00000020,          /**< window can be resized */
+    SDL_WINDOW_MINIMIZED = 0x00000040,          /**< window is minimized */
+    SDL_WINDOW_MAXIMIZED = 0x00000080,          /**< window is maximized */
+    SDL_WINDOW_INPUT_GRABBED = 0x00000100,      /**< window has grabbed input focus */
+    SDL_WINDOW_INPUT_FOCUS = 0x00000200,        /**< window has input focus */
+    SDL_WINDOW_MOUSE_FOCUS = 0x00000400,        /**< window has mouse focus */
+    SDL_WINDOW_FULLSCREEN_DESKTOP = ( SDL_WINDOW_FULLSCREEN | 0x00001000 ),
+    SDL_WINDOW_FOREIGN = 0x00000800,            /**< window not created by SDL */
+    SDL_WINDOW_ALLOW_HIGHDPI = 0x00002000       /**< window should be created in high-DPI mode if supported */
+} SDL_WindowFlags;
+
+/**
+ *  \brief Used to indicate that you don't care what the window position is.
+ */
+#define SDL_WINDOWPOS_UNDEFINED_MASK    0x1FFF0000
+#define SDL_WINDOWPOS_UNDEFINED_DISPLAY(X)  (SDL_WINDOWPOS_UNDEFINED_MASK|(X))
+#define SDL_WINDOWPOS_UNDEFINED         SDL_WINDOWPOS_UNDEFINED_DISPLAY(0)
+#define SDL_WINDOWPOS_ISUNDEFINED(X)    \
+            (((X)&0xFFFF0000) == SDL_WINDOWPOS_UNDEFINED_MASK)
+
+/**
+ *  \brief Used to indicate that the window position should be centered.
+ */
+#define SDL_WINDOWPOS_CENTERED_MASK    0x2FFF0000
+#define SDL_WINDOWPOS_CENTERED_DISPLAY(X)  (SDL_WINDOWPOS_CENTERED_MASK|(X))
+#define SDL_WINDOWPOS_CENTERED         SDL_WINDOWPOS_CENTERED_DISPLAY(0)
+#define SDL_WINDOWPOS_ISCENTERED(X)    \
+            (((X)&0xFFFF0000) == SDL_WINDOWPOS_CENTERED_MASK)
+
+/**
+ *  \brief Event subtype for window events
+ */
+typedef enum
+{
+    SDL_WINDOWEVENT_NONE,           /**< Never used */
+    SDL_WINDOWEVENT_SHOWN,          /**< Window has been shown */
+    SDL_WINDOWEVENT_HIDDEN,         /**< Window has been hidden */
+    SDL_WINDOWEVENT_EXPOSED,        /**< Window has been exposed and should be
+                                         redrawn */
+    SDL_WINDOWEVENT_MOVED,          /**< Window has been moved to data1, data2
+                                     */
+    SDL_WINDOWEVENT_RESIZED,        /**< Window has been resized to data1xdata2 */
+    SDL_WINDOWEVENT_SIZE_CHANGED,   /**< The window size has changed, either as a result of an API call or through the system or user changing the window size. */
+    SDL_WINDOWEVENT_MINIMIZED,      /**< Window has been minimized */
+    SDL_WINDOWEVENT_MAXIMIZED,      /**< Window has been maximized */
+    SDL_WINDOWEVENT_RESTORED,       /**< Window has been restored to normal size
+                                         and position */
+    SDL_WINDOWEVENT_ENTER,          /**< Window has gained mouse focus */
+    SDL_WINDOWEVENT_LEAVE,          /**< Window has lost mouse focus */
+    SDL_WINDOWEVENT_FOCUS_GAINED,   /**< Window has gained keyboard focus */
+    SDL_WINDOWEVENT_FOCUS_LOST,     /**< Window has lost keyboard focus */
+    SDL_WINDOWEVENT_CLOSE           /**< The window manager requests that the
+                                         window be closed */
+} SDL_WindowEventID;
+
+/**
+ *  \brief An opaque handle to an OpenGL context.
+ */
+typedef void *SDL_GLContext;
+
+/**
+ *  \brief OpenGL configuration attributes
+ */
+typedef enum
+{
+    SDL_GL_RED_SIZE,
+    SDL_GL_GREEN_SIZE,
+    SDL_GL_BLUE_SIZE,
+    SDL_GL_ALPHA_SIZE,
+    SDL_GL_BUFFER_SIZE,
+    SDL_GL_DOUBLEBUFFER,
+    SDL_GL_DEPTH_SIZE,
+    SDL_GL_STENCIL_SIZE,
+    SDL_GL_ACCUM_RED_SIZE,
+    SDL_GL_ACCUM_GREEN_SIZE,
+    SDL_GL_ACCUM_BLUE_SIZE,
+    SDL_GL_ACCUM_ALPHA_SIZE,
+    SDL_GL_STEREO,
+    SDL_GL_MULTISAMPLEBUFFERS,
+    SDL_GL_MULTISAMPLESAMPLES,
+    SDL_GL_ACCELERATED_VISUAL,
+    SDL_GL_RETAINED_BACKING,
+    SDL_GL_CONTEXT_MAJOR_VERSION,
+    SDL_GL_CONTEXT_MINOR_VERSION,
+    SDL_GL_CONTEXT_EGL,
+    SDL_GL_CONTEXT_FLAGS,
+    SDL_GL_CONTEXT_PROFILE_MASK,
+    SDL_GL_SHARE_WITH_CURRENT_CONTEXT,
+    SDL_GL_FRAMEBUFFER_SRGB_CAPABLE
+} SDL_GLattr;
+
+typedef enum
+{
+    SDL_GL_CONTEXT_PROFILE_CORE           = 0x0001,
+    SDL_GL_CONTEXT_PROFILE_COMPATIBILITY  = 0x0002,
+    SDL_GL_CONTEXT_PROFILE_ES             = 0x0004 /* GLX_CONTEXT_ES2_PROFILE_BIT_EXT */
+} SDL_GLprofile;
+
+typedef enum
+{
+    SDL_GL_CONTEXT_DEBUG_FLAG              = 0x0001,
+    SDL_GL_CONTEXT_FORWARD_COMPATIBLE_FLAG = 0x0002,
+    SDL_GL_CONTEXT_ROBUST_ACCESS_FLAG      = 0x0004,
+    SDL_GL_CONTEXT_RESET_ISOLATION_FLAG    = 0x0008
+} SDL_GLcontextFlag;
+
+
+/* Function prototypes */
+
+/**
+ *  \brief Get the number of video drivers compiled into SDL
+ *
+ *  \sa SDL_GetVideoDriver()
+ */
+extern DECLSPEC int SDLCALL SDL_GetNumVideoDrivers(void);
+
+/**
+ *  \brief Get the name of a built in video driver.
+ *
+ *  \note The video drivers are presented in the order in which they are
+ *        normally checked during initialization.
+ *
+ *  \sa SDL_GetNumVideoDrivers()
+ */
+extern DECLSPEC const char *SDLCALL SDL_GetVideoDriver(int index);
+
+/**
+ *  \brief Initialize the video subsystem, optionally specifying a video driver.
+ *
+ *  \param driver_name Initialize a specific driver by name, or NULL for the
+ *                     default video driver.
+ *
+ *  \return 0 on success, -1 on error
+ *
+ *  This function initializes the video subsystem; setting up a connection
+ *  to the window manager, etc, and determines the available display modes
+ *  and pixel formats, but does not initialize a window or graphics mode.
+ *
+ *  \sa SDL_VideoQuit()
+ */
+extern DECLSPEC int SDLCALL SDL_VideoInit(const char *driver_name);
+
+/**
+ *  \brief Shuts down the video subsystem.
+ *
+ *  This function closes all windows, and restores the original video mode.
+ *
+ *  \sa SDL_VideoInit()
+ */
+extern DECLSPEC void SDLCALL SDL_VideoQuit(void);
+
+/**
+ *  \brief Returns the name of the currently initialized video driver.
+ *
+ *  \return The name of the current video driver or NULL if no driver
+ *          has been initialized
+ *
+ *  \sa SDL_GetNumVideoDrivers()
+ *  \sa SDL_GetVideoDriver()
+ */
+extern DECLSPEC const char *SDLCALL SDL_GetCurrentVideoDriver(void);
+
+/**
+ *  \brief Returns the number of available video displays.
+ *
+ *  \sa SDL_GetDisplayBounds()
+ */
+extern DECLSPEC int SDLCALL SDL_GetNumVideoDisplays(void);
+
+/**
+ *  \brief Get the name of a display in UTF-8 encoding
+ *
+ *  \return The name of a display, or NULL for an invalid display index.
+ *
+ *  \sa SDL_GetNumVideoDisplays()
+ */
+extern DECLSPEC const char * SDLCALL SDL_GetDisplayName(int displayIndex);
+
+/**
+ *  \brief Get the desktop area represented by a display, with the primary
+ *         display located at 0,0
+ *
+ *  \return 0 on success, or -1 if the index is out of range.
+ *
+ *  \sa SDL_GetNumVideoDisplays()
+ */
+extern DECLSPEC int SDLCALL SDL_GetDisplayBounds(int displayIndex, SDL_Rect * rect);
+
+/**
+ *  \brief Returns the number of available display modes.
+ *
+ *  \sa SDL_GetDisplayMode()
+ */
+extern DECLSPEC int SDLCALL SDL_GetNumDisplayModes(int displayIndex);
+
+/**
+ *  \brief Fill in information about a specific display mode.
+ *
+ *  \note The display modes are sorted in this priority:
+ *        \li bits per pixel -> more colors to fewer colors
+ *        \li width -> largest to smallest
+ *        \li height -> largest to smallest
+ *        \li refresh rate -> highest to lowest
+ *
+ *  \sa SDL_GetNumDisplayModes()
+ */
+extern DECLSPEC int SDLCALL SDL_GetDisplayMode(int displayIndex, int modeIndex,
+                                               SDL_DisplayMode * mode);
+
+/**
+ *  \brief Fill in information about the desktop display mode.
+ */
+extern DECLSPEC int SDLCALL SDL_GetDesktopDisplayMode(int displayIndex, SDL_DisplayMode * mode);
+
+/**
+ *  \brief Fill in information about the current display mode.
+ */
+extern DECLSPEC int SDLCALL SDL_GetCurrentDisplayMode(int displayIndex, SDL_DisplayMode * mode);
+
+
+/**
+ *  \brief Get the closest match to the requested display mode.
+ *
+ *  \param displayIndex The index of display from which mode should be queried.
+ *  \param mode The desired display mode
+ *  \param closest A pointer to a display mode to be filled in with the closest
+ *                 match of the available display modes.
+ *
+ *  \return The passed in value \c closest, or NULL if no matching video mode
+ *          was available.
+ *
+ *  The available display modes are scanned, and \c closest is filled in with the
+ *  closest mode matching the requested mode and returned.  The mode format and
+ *  refresh_rate default to the desktop mode if they are 0.  The modes are
+ *  scanned with size being first priority, format being second priority, and
+ *  finally checking the refresh_rate.  If all the available modes are too
+ *  small, then NULL is returned.
+ *
+ *  \sa SDL_GetNumDisplayModes()
+ *  \sa SDL_GetDisplayMode()
+ */
+extern DECLSPEC SDL_DisplayMode * SDLCALL SDL_GetClosestDisplayMode(int displayIndex, const SDL_DisplayMode * mode, SDL_DisplayMode * closest);
+
+/**
+ *  \brief Get the display index associated with a window.
+ *
+ *  \return the display index of the display containing the center of the
+ *          window, or -1 on error.
+ */
+extern DECLSPEC int SDLCALL SDL_GetWindowDisplayIndex(SDL_Window * window);
+
+/**
+ *  \brief Set the display mode used when a fullscreen window is visible.
+ *
+ *  By default the window's dimensions and the desktop format and refresh rate
+ *  are used.
+ *
+ *  \param window The window for which the display mode should be set.
+ *  \param mode The mode to use, or NULL for the default mode.
+ *
+ *  \return 0 on success, or -1 if setting the display mode failed.
+ *
+ *  \sa SDL_GetWindowDisplayMode()
+ *  \sa SDL_SetWindowFullscreen()
+ */
+extern DECLSPEC int SDLCALL SDL_SetWindowDisplayMode(SDL_Window * window,
+                                                     const SDL_DisplayMode
+                                                         * mode);
+
+/**
+ *  \brief Fill in information about the display mode used when a fullscreen
+ *         window is visible.
+ *
+ *  \sa SDL_SetWindowDisplayMode()
+ *  \sa SDL_SetWindowFullscreen()
+ */
+extern DECLSPEC int SDLCALL SDL_GetWindowDisplayMode(SDL_Window * window,
+                                                     SDL_DisplayMode * mode);
+
+/**
+ *  \brief Get the pixel format associated with the window.
+ */
+extern DECLSPEC Uint32 SDLCALL SDL_GetWindowPixelFormat(SDL_Window * window);
+
+/**
+ *  \brief Create a window with the specified position, dimensions, and flags.
+ *
+ *  \param title The title of the window, in UTF-8 encoding.
+ *  \param x     The x position of the window, ::SDL_WINDOWPOS_CENTERED, or
+ *               ::SDL_WINDOWPOS_UNDEFINED.
+ *  \param y     The y position of the window, ::SDL_WINDOWPOS_CENTERED, or
+ *               ::SDL_WINDOWPOS_UNDEFINED.
+ *  \param w     The width of the window.
+ *  \param h     The height of the window.
+ *  \param flags The flags for the window, a mask of any of the following:
+ *               ::SDL_WINDOW_FULLSCREEN,    ::SDL_WINDOW_OPENGL,
+ *               ::SDL_WINDOW_HIDDEN,        ::SDL_WINDOW_BORDERLESS,
+ *               ::SDL_WINDOW_RESIZABLE,     ::SDL_WINDOW_MAXIMIZED,
+ *               ::SDL_WINDOW_MINIMIZED,     ::SDL_WINDOW_INPUT_GRABBED,
+ *               ::SDL_WINDOW_ALLOW_HIGHDPI.
+ *
+ *  \return The id of the window created, or zero if window creation failed.
+ *
+ *  \sa SDL_DestroyWindow()
+ */
+extern DECLSPEC SDL_Window * SDLCALL SDL_CreateWindow(const char *title,
+                                                      int x, int y, int w,
+                                                      int h, Uint32 flags);
+
+/**
+ *  \brief Create an SDL window from an existing native window.
+ *
+ *  \param data A pointer to driver-dependent window creation data
+ *
+ *  \return The id of the window created, or zero if window creation failed.
+ *
+ *  \sa SDL_DestroyWindow()
+ */
+extern DECLSPEC SDL_Window * SDLCALL SDL_CreateWindowFrom(const void *data);
+
+/**
+ *  \brief Get the numeric ID of a window, for logging purposes.
+ */
+extern DECLSPEC Uint32 SDLCALL SDL_GetWindowID(SDL_Window * window);
+
+/**
+ *  \brief Get a window from a stored ID, or NULL if it doesn't exist.
+ */
+extern DECLSPEC SDL_Window * SDLCALL SDL_GetWindowFromID(Uint32 id);
+
+/**
+ *  \brief Get the window flags.
+ */
+extern DECLSPEC Uint32 SDLCALL SDL_GetWindowFlags(SDL_Window * window);
+
+/**
+ *  \brief Set the title of a window, in UTF-8 format.
+ *
+ *  \sa SDL_GetWindowTitle()
+ */
+extern DECLSPEC void SDLCALL SDL_SetWindowTitle(SDL_Window * window,
+                                                const char *title);
+
+/**
+ *  \brief Get the title of a window, in UTF-8 format.
+ *
+ *  \sa SDL_SetWindowTitle()
+ */
+extern DECLSPEC const char *SDLCALL SDL_GetWindowTitle(SDL_Window * window);
+
+/**
+ *  \brief Set the icon for a window.
+ *
+ *  \param window The window for which the icon should be set.
+ *  \param icon The icon for the window.
+ */
+extern DECLSPEC void SDLCALL SDL_SetWindowIcon(SDL_Window * window,
+                                               SDL_Surface * icon);
+
+/**
+ *  \brief Associate an arbitrary named pointer with a window.
+ *
+ *  \param window   The window to associate with the pointer.
+ *  \param name     The name of the pointer.
+ *  \param userdata The associated pointer.
+ *
+ *  \return The previous value associated with 'name'
+ *
+ *  \note The name is case-sensitive.
+ *
+ *  \sa SDL_GetWindowData()
+ */
+extern DECLSPEC void* SDLCALL SDL_SetWindowData(SDL_Window * window,
+                                                const char *name,
+                                                void *userdata);
+
+/**
+ *  \brief Retrieve the data pointer associated with a window.
+ *
+ *  \param window   The window to query.
+ *  \param name     The name of the pointer.
+ *
+ *  \return The value associated with 'name'
+ *
+ *  \sa SDL_SetWindowData()
+ */
+extern DECLSPEC void *SDLCALL SDL_GetWindowData(SDL_Window * window,
+                                                const char *name);
+
+/**
+ *  \brief Set the position of a window.
+ *
+ *  \param window   The window to reposition.
+ *  \param x        The x coordinate of the window, ::SDL_WINDOWPOS_CENTERED, or
+                    ::SDL_WINDOWPOS_UNDEFINED.
+ *  \param y        The y coordinate of the window, ::SDL_WINDOWPOS_CENTERED, or
+                    ::SDL_WINDOWPOS_UNDEFINED.
+ *
+ *  \note The window coordinate origin is the upper left of the display.
+ *
+ *  \sa SDL_GetWindowPosition()
+ */
+extern DECLSPEC void SDLCALL SDL_SetWindowPosition(SDL_Window * window,
+                                                   int x, int y);
+
+/**
+ *  \brief Get the position of a window.
+ *
+ *  \param window   The window to query.
+ *  \param x        Pointer to variable for storing the x position, may be NULL
+ *  \param y        Pointer to variable for storing the y position, may be NULL
+ *
+ *  \sa SDL_SetWindowPosition()
+ */
+extern DECLSPEC void SDLCALL SDL_GetWindowPosition(SDL_Window * window,
+                                                   int *x, int *y);
+
+/**
+ *  \brief Set the size of a window's client area.
+ *
+ *  \param window   The window to resize.
+ *  \param w        The width of the window, must be >0
+ *  \param h        The height of the window, must be >0
+ *
+ *  \note You can't change the size of a fullscreen window, it automatically
+ *        matches the size of the display mode.
+ *
+ *  \sa SDL_GetWindowSize()
+ */
+extern DECLSPEC void SDLCALL SDL_SetWindowSize(SDL_Window * window, int w,
+                                               int h);
+
+/**
+ *  \brief Get the size of a window's client area.
+ *
+ *  \param window   The window to query.
+ *  \param w        Pointer to variable for storing the width, may be NULL
+ *  \param h        Pointer to variable for storing the height, may be NULL
+ *
+ *  \sa SDL_SetWindowSize()
+ */
+extern DECLSPEC void SDLCALL SDL_GetWindowSize(SDL_Window * window, int *w,
+                                               int *h);
+
+/**
+ *  \brief Set the minimum size of a window's client area.
+ *
+ *  \param window    The window to set a new minimum size.
+ *  \param min_w     The minimum width of the window, must be >0
+ *  \param min_h     The minimum height of the window, must be >0
+ *
+ *  \note You can't change the minimum size of a fullscreen window, it
+ *        automatically matches the size of the display mode.
+ *
+ *  \sa SDL_GetWindowMinimumSize()
+ *  \sa SDL_SetWindowMaximumSize()
+ */
+extern DECLSPEC void SDLCALL SDL_SetWindowMinimumSize(SDL_Window * window,
+                                                      int min_w, int min_h);
+
+/**
+ *  \brief Get the minimum size of a window's client area.
+ *
+ *  \param window   The window to query.
+ *  \param w        Pointer to variable for storing the minimum width, may be NULL
+ *  \param h        Pointer to variable for storing the minimum height, may be NULL
+ *
+ *  \sa SDL_GetWindowMaximumSize()
+ *  \sa SDL_SetWindowMinimumSize()
+ */
+extern DECLSPEC void SDLCALL SDL_GetWindowMinimumSize(SDL_Window * window,
+                                                      int *w, int *h);
+
+/**
+ *  \brief Set the maximum size of a window's client area.
+ *
+ *  \param window    The window to set a new maximum size.
+ *  \param max_w     The maximum width of the window, must be >0
+ *  \param max_h     The maximum height of the window, must be >0
+ *
+ *  \note You can't change the maximum size of a fullscreen window, it
+ *        automatically matches the size of the display mode.
+ *
+ *  \sa SDL_GetWindowMaximumSize()
+ *  \sa SDL_SetWindowMinimumSize()
+ */
+extern DECLSPEC void SDLCALL SDL_SetWindowMaximumSize(SDL_Window * window,
+                                                      int max_w, int max_h);
+
+/**
+ *  \brief Get the maximum size of a window's client area.
+ *
+ *  \param window   The window to query.
+ *  \param w        Pointer to variable for storing the maximum width, may be NULL
+ *  \param h        Pointer to variable for storing the maximum height, may be NULL
+ *
+ *  \sa SDL_GetWindowMinimumSize()
+ *  \sa SDL_SetWindowMaximumSize()
+ */
+extern DECLSPEC void SDLCALL SDL_GetWindowMaximumSize(SDL_Window * window,
+                                                      int *w, int *h);
+
+/**
+ *  \brief Set the border state of a window.
+ *
+ *  This will add or remove the window's SDL_WINDOW_BORDERLESS flag and
+ *  add or remove the border from the actual window. This is a no-op if the
+ *  window's border already matches the requested state.
+ *
+ *  \param window The window of which to change the border state.
+ *  \param bordered SDL_FALSE to remove border, SDL_TRUE to add border.
+ *
+ *  \note You can't change the border state of a fullscreen window.
+ *
+ *  \sa SDL_GetWindowFlags()
+ */
+extern DECLSPEC void SDLCALL SDL_SetWindowBordered(SDL_Window * window,
+                                                   SDL_bool bordered);
+
+/**
+ *  \brief Show a window.
+ *
+ *  \sa SDL_HideWindow()
+ */
+extern DECLSPEC void SDLCALL SDL_ShowWindow(SDL_Window * window);
+
+/**
+ *  \brief Hide a window.
+ *
+ *  \sa SDL_ShowWindow()
+ */
+extern DECLSPEC void SDLCALL SDL_HideWindow(SDL_Window * window);
+
+/**
+ *  \brief Raise a window above other windows and set the input focus.
+ */
+extern DECLSPEC void SDLCALL SDL_RaiseWindow(SDL_Window * window);
+
+/**
+ *  \brief Make a window as large as possible.
+ *
+ *  \sa SDL_RestoreWindow()
+ */
+extern DECLSPEC void SDLCALL SDL_MaximizeWindow(SDL_Window * window);
+
+/**
+ *  \brief Minimize a window to an iconic representation.
+ *
+ *  \sa SDL_RestoreWindow()
+ */
+extern DECLSPEC void SDLCALL SDL_MinimizeWindow(SDL_Window * window);
+
+/**
+ *  \brief Restore the size and position of a minimized or maximized window.
+ *
+ *  \sa SDL_MaximizeWindow()
+ *  \sa SDL_MinimizeWindow()
+ */
+extern DECLSPEC void SDLCALL SDL_RestoreWindow(SDL_Window * window);
+
+/**
+ *  \brief Set a window's fullscreen state.
+ *
+ *  \return 0 on success, or -1 if setting the display mode failed.
+ *
+ *  \sa SDL_SetWindowDisplayMode()
+ *  \sa SDL_GetWindowDisplayMode()
+ */
+extern DECLSPEC int SDLCALL SDL_SetWindowFullscreen(SDL_Window * window,
+                                                    Uint32 flags);
+
+/**
+ *  \brief Get the SDL surface associated with the window.
+ *
+ *  \return The window's framebuffer surface, or NULL on error.
+ *
+ *  A new surface will be created with the optimal format for the window,
+ *  if necessary. This surface will be freed when the window is destroyed.
+ *
+ *  \note You may not combine this with 3D or the rendering API on this window.
+ *
+ *  \sa SDL_UpdateWindowSurface()
+ *  \sa SDL_UpdateWindowSurfaceRects()
+ */
+extern DECLSPEC SDL_Surface * SDLCALL SDL_GetWindowSurface(SDL_Window * window);
+
+/**
+ *  \brief Copy the window surface to the screen.
+ *
+ *  \return 0 on success, or -1 on error.
+ *
+ *  \sa SDL_GetWindowSurface()
+ *  \sa SDL_UpdateWindowSurfaceRects()
+ */
+extern DECLSPEC int SDLCALL SDL_UpdateWindowSurface(SDL_Window * window);
+
+/**
+ *  \brief Copy a number of rectangles on the window surface to the screen.
+ *
+ *  \return 0 on success, or -1 on error.
+ *
+ *  \sa SDL_GetWindowSurface()
+ *  \sa SDL_UpdateWindowSurfaceRect()
+ */
+extern DECLSPEC int SDLCALL SDL_UpdateWindowSurfaceRects(SDL_Window * window,
+                                                         const SDL_Rect * rects,
+                                                         int numrects);
+
+/**
+ *  \brief Set a window's input grab mode.
+ *
+ *  \param window The window for which the input grab mode should be set.
+ *  \param grabbed This is SDL_TRUE to grab input, and SDL_FALSE to release input.
+ *
+ *  \sa SDL_GetWindowGrab()
+ */
+extern DECLSPEC void SDLCALL SDL_SetWindowGrab(SDL_Window * window,
+                                               SDL_bool grabbed);
+
+/**
+ *  \brief Get a window's input grab mode.
+ *
+ *  \return This returns SDL_TRUE if input is grabbed, and SDL_FALSE otherwise.
+ *
+ *  \sa SDL_SetWindowGrab()
+ */
+extern DECLSPEC SDL_bool SDLCALL SDL_GetWindowGrab(SDL_Window * window);
+
+/**
+ *  \brief Set the brightness (gamma correction) for a window.
+ *
+ *  \return 0 on success, or -1 if setting the brightness isn't supported.
+ *
+ *  \sa SDL_GetWindowBrightness()
+ *  \sa SDL_SetWindowGammaRamp()
+ */
+extern DECLSPEC int SDLCALL SDL_SetWindowBrightness(SDL_Window * window, float brightness);
+
+/**
+ *  \brief Get the brightness (gamma correction) for a window.
+ *
+ *  \return The last brightness value passed to SDL_SetWindowBrightness()
+ *
+ *  \sa SDL_SetWindowBrightness()
+ */
+extern DECLSPEC float SDLCALL SDL_GetWindowBrightness(SDL_Window * window);
+
+/**
+ *  \brief Set the gamma ramp for a window.
+ *
+ *  \param window The window for which the gamma ramp should be set.
+ *  \param red The translation table for the red channel, or NULL.
+ *  \param green The translation table for the green channel, or NULL.
+ *  \param blue The translation table for the blue channel, or NULL.
+ *
+ *  \return 0 on success, or -1 if gamma ramps are unsupported.
+ *
+ *  Set the gamma translation table for the red, green, and blue channels
+ *  of the video hardware.  Each table is an array of 256 16-bit quantities,
+ *  representing a mapping between the input and output for that channel.
+ *  The input is the index into the array, and the output is the 16-bit
+ *  gamma value at that index, scaled to the output color precision.
+ *
+ *  \sa SDL_GetWindowGammaRamp()
+ */
+extern DECLSPEC int SDLCALL SDL_SetWindowGammaRamp(SDL_Window * window,
+                                                   const Uint16 * red,
+                                                   const Uint16 * green,
+                                                   const Uint16 * blue);
+
+/**
+ *  \brief Get the gamma ramp for a window.
+ *
+ *  \param window The window from which the gamma ramp should be queried.
+ *  \param red   A pointer to a 256 element array of 16-bit quantities to hold
+ *               the translation table for the red channel, or NULL.
+ *  \param green A pointer to a 256 element array of 16-bit quantities to hold
+ *               the translation table for the green channel, or NULL.
+ *  \param blue  A pointer to a 256 element array of 16-bit quantities to hold
+ *               the translation table for the blue channel, or NULL.
+ *
+ *  \return 0 on success, or -1 if gamma ramps are unsupported.
+ *
+ *  \sa SDL_SetWindowGammaRamp()
+ */
+extern DECLSPEC int SDLCALL SDL_GetWindowGammaRamp(SDL_Window * window,
+                                                   Uint16 * red,
+                                                   Uint16 * green,
+                                                   Uint16 * blue);
+
+/**
+ *  \brief Destroy a window.
+ */
+extern DECLSPEC void SDLCALL SDL_DestroyWindow(SDL_Window * window);
+
+
+/**
+ *  \brief Returns whether the screensaver is currently enabled (default on).
+ *
+ *  \sa SDL_EnableScreenSaver()
+ *  \sa SDL_DisableScreenSaver()
+ */
+extern DECLSPEC SDL_bool SDLCALL SDL_IsScreenSaverEnabled(void);
+
+/**
+ *  \brief Allow the screen to be blanked by a screensaver
+ *
+ *  \sa SDL_IsScreenSaverEnabled()
+ *  \sa SDL_DisableScreenSaver()
+ */
+extern DECLSPEC void SDLCALL SDL_EnableScreenSaver(void);
+
+/**
+ *  \brief Prevent the screen from being blanked by a screensaver
+ *
+ *  \sa SDL_IsScreenSaverEnabled()
+ *  \sa SDL_EnableScreenSaver()
+ */
+extern DECLSPEC void SDLCALL SDL_DisableScreenSaver(void);
+
+
+/**
+ *  \name OpenGL support functions
+ */
+/* @{ */
+
+/**
+ *  \brief Dynamically load an OpenGL library.
+ *
+ *  \param path The platform dependent OpenGL library name, or NULL to open the
+ *              default OpenGL library.
+ *
+ *  \return 0 on success, or -1 if the library couldn't be loaded.
+ *
+ *  This should be done after initializing the video driver, but before
+ *  creating any OpenGL windows.  If no OpenGL library is loaded, the default
+ *  library will be loaded upon creation of the first OpenGL window.
+ *
+ *  \note If you do this, you need to retrieve all of the GL functions used in
+ *        your program from the dynamic library using SDL_GL_GetProcAddress().
+ *
+ *  \sa SDL_GL_GetProcAddress()
+ *  \sa SDL_GL_UnloadLibrary()
+ */
+extern DECLSPEC int SDLCALL SDL_GL_LoadLibrary(const char *path);
+
+/**
+ *  \brief Get the address of an OpenGL function.
+ */
+extern DECLSPEC void *SDLCALL SDL_GL_GetProcAddress(const char *proc);
+
+/**
+ *  \brief Unload the OpenGL library previously loaded by SDL_GL_LoadLibrary().
+ *
+ *  \sa SDL_GL_LoadLibrary()
+ */
+extern DECLSPEC void SDLCALL SDL_GL_UnloadLibrary(void);
+
+/**
+ *  \brief Return true if an OpenGL extension is supported for the current
+ *         context.
+ */
+extern DECLSPEC SDL_bool SDLCALL SDL_GL_ExtensionSupported(const char
+                                                           *extension);
+
+/**
+ *  \brief Reset all previously set OpenGL context attributes to their default values
+ */
+extern DECLSPEC void SDLCALL SDL_GL_ResetAttributes(void);
+
+/**
+ *  \brief Set an OpenGL window attribute before window creation.
+ */
+extern DECLSPEC int SDLCALL SDL_GL_SetAttribute(SDL_GLattr attr, int value);
+
+/**
+ *  \brief Get the actual value for an attribute from the current context.
+ */
+extern DECLSPEC int SDLCALL SDL_GL_GetAttribute(SDL_GLattr attr, int *value);
+
+/**
+ *  \brief Create an OpenGL context for use with an OpenGL window, and make it
+ *         current.
+ *
+ *  \sa SDL_GL_DeleteContext()
+ */
+extern DECLSPEC SDL_GLContext SDLCALL SDL_GL_CreateContext(SDL_Window *
+                                                           window);
+
+/**
+ *  \brief Set up an OpenGL context for rendering into an OpenGL window.
+ *
+ *  \note The context must have been created with a compatible window.
+ */
+extern DECLSPEC int SDLCALL SDL_GL_MakeCurrent(SDL_Window * window,
+                                               SDL_GLContext context);
+
+/**
+ *  \brief Get the currently active OpenGL window.
+ */
+extern DECLSPEC SDL_Window* SDLCALL SDL_GL_GetCurrentWindow(void);
+
+/**
+ *  \brief Get the currently active OpenGL context.
+ */
+extern DECLSPEC SDL_GLContext SDLCALL SDL_GL_GetCurrentContext(void);
+
+/**
+ *  \brief Get the size of a window's underlying drawable (for use with glViewport).
+ *
+ *  \param window   Window from which the drawable size should be queried
+ *  \param w        Pointer to variable for storing the width, may be NULL
+ *  \param h        Pointer to variable for storing the height, may be NULL
+ *
+ * This may differ from SDL_GetWindowSize if we're rendering to a high-DPI
+ * drawable, i.e. the window was created with SDL_WINDOW_ALLOW_HIGHDPI on a
+ * platform with high-DPI support (Apple calls this "Retina"), and not disabled
+ * by the SDL_HINT_VIDEO_HIGHDPI_DISABLED hint.
+ *
+ *  \sa SDL_GetWindowSize()
+ *  \sa SDL_CreateWindow()
+ */
+extern DECLSPEC void SDLCALL SDL_GL_GetDrawableSize(SDL_Window * window, int *w,
+                                                    int *h);
+
+/**
+ *  \brief Set the swap interval for the current OpenGL context.
+ *
+ *  \param interval 0 for immediate updates, 1 for updates synchronized with the
+ *                  vertical retrace. If the system supports it, you may
+ *                  specify -1 to allow late swaps to happen immediately
+ *                  instead of waiting for the next retrace.
+ *
+ *  \return 0 on success, or -1 if setting the swap interval is not supported.
+ *
+ *  \sa SDL_GL_GetSwapInterval()
+ */
+extern DECLSPEC int SDLCALL SDL_GL_SetSwapInterval(int interval);
+
+/**
+ *  \brief Get the swap interval for the current OpenGL context.
+ *
+ *  \return 0 if there is no vertical retrace synchronization, 1 if the buffer
+ *          swap is synchronized with the vertical retrace, and -1 if late
+ *          swaps happen immediately instead of waiting for the next retrace.
+ *          If the system can't determine the swap interval, or there isn't a
+ *          valid current context, this will return 0 as a safe default.
+ *
+ *  \sa SDL_GL_SetSwapInterval()
+ */
+extern DECLSPEC int SDLCALL SDL_GL_GetSwapInterval(void);
+
+/**
+ * \brief Swap the OpenGL buffers for a window, if double-buffering is
+ *        supported.
+ */
+extern DECLSPEC void SDLCALL SDL_GL_SwapWindow(SDL_Window * window);
+
+/**
+ *  \brief Delete an OpenGL context.
+ *
+ *  \sa SDL_GL_CreateContext()
+ */
+extern DECLSPEC void SDLCALL SDL_GL_DeleteContext(SDL_GLContext context);
+
+/* @} *//* OpenGL support functions */
+
+
+/* Ends C function definitions when using C++ */
+#ifdef __cplusplus
+}
+#endif
+#include "close_code.h"
+
+#endif /* _SDL_video_h */
+
+/* vi: set ts=4 sw=4 expandtab: */
diff --git a/include/SDL2/begin_code.h b/include/SDL2/begin_code.h
new file mode 100644 (file)
index 0000000..f37ee36
--- /dev/null
@@ -0,0 +1,140 @@
+/*
+  Simple DirectMedia Layer
+  Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
+
+  This software is provided 'as-is', without any express or implied
+  warranty.  In no event will the authors be held liable for any damages
+  arising from the use of this software.
+
+  Permission is granted to anyone to use this software for any purpose,
+  including commercial applications, and to alter it and redistribute it
+  freely, subject to the following restrictions:
+
+  1. The origin of this software must not be misrepresented; you must not
+     claim that you wrote the original software. If you use this software
+     in a product, an acknowledgment in the product documentation would be
+     appreciated but is not required.
+  2. Altered source versions must be plainly marked as such, and must not be
+     misrepresented as being the original software.
+  3. This notice may not be removed or altered from any source distribution.
+*/
+
+/**
+ *  \file begin_code.h
+ *
+ *  This file sets things up for C dynamic library function definitions,
+ *  static inlined functions, and structures aligned at 4-byte alignment.
+ *  If you don't like ugly C preprocessor code, don't look at this file. :)
+ */
+
+/* This shouldn't be nested -- included it around code only. */
+#ifdef _begin_code_h
+#error Nested inclusion of begin_code.h
+#endif
+#define _begin_code_h
+
+#ifndef SDL_DEPRECATED
+#  if (__GNUC__ >= 4)  /* technically, this arrived in gcc 3.1, but oh well. */
+#    define SDL_DEPRECATED __attribute__((deprecated))
+#  else
+#    define SDL_DEPRECATED
+#  endif
+#endif
+
+/* Some compilers use a special export keyword */
+#ifndef DECLSPEC
+# if defined(__WIN32__) || defined(__WINRT__)
+#  ifdef __BORLANDC__
+#   ifdef BUILD_SDL
+#    define DECLSPEC
+#   else
+#    define DECLSPEC    __declspec(dllimport)
+#   endif
+#  else
+#   define DECLSPEC __declspec(dllexport)
+#  endif
+# else
+#  if defined(__GNUC__) && __GNUC__ >= 4
+#   define DECLSPEC __attribute__ ((visibility("default")))
+#  elif defined(__GNUC__) && __GNUC__ >= 2
+#   define DECLSPEC __declspec(dllexport)
+#  else
+#   define DECLSPEC
+#  endif
+# endif
+#endif
+
+/* By default SDL uses the C calling convention */
+#ifndef SDLCALL
+#if (defined(__WIN32__) || defined(__WINRT__)) && !defined(__GNUC__)
+#define SDLCALL __cdecl
+#else
+#define SDLCALL
+#endif
+#endif /* SDLCALL */
+
+/* Removed DECLSPEC on Symbian OS because SDL cannot be a DLL in EPOC */
+#ifdef __SYMBIAN32__
+#undef DECLSPEC
+#define DECLSPEC
+#endif /* __SYMBIAN32__ */
+
+/* Force structure packing at 4 byte alignment.
+   This is necessary if the header is included in code which has structure
+   packing set to an alternate value, say for loading structures from disk.
+   The packing is reset to the previous value in close_code.h
+ */
+#if defined(_MSC_VER) || defined(__MWERKS__) || defined(__BORLANDC__)
+#ifdef _MSC_VER
+#pragma warning(disable: 4103)
+#endif
+#ifdef __BORLANDC__
+#pragma nopackwarning
+#endif
+#ifdef _M_X64
+/* Use 8-byte alignment on 64-bit architectures, so pointers are aligned */
+#pragma pack(push,8)
+#else
+#pragma pack(push,4)
+#endif
+#endif /* Compiler needs structure packing set */
+
+#ifndef SDL_INLINE
+#if defined(__GNUC__)
+#define SDL_INLINE __inline__
+#elif defined(_MSC_VER) || defined(__BORLANDC__) || \
+      defined(__DMC__) || defined(__SC__) || \
+      defined(__WATCOMC__) || defined(__LCC__) || \
+      defined(__DECC)
+#define SDL_INLINE __inline
+#ifndef __inline__
+#define __inline__ __inline
+#endif
+#else
+#define SDL_INLINE inline
+#ifndef __inline__
+#define __inline__ inline
+#endif
+#endif
+#endif /* SDL_INLINE not defined */
+
+#ifndef SDL_FORCE_INLINE
+#if defined(_MSC_VER)
+#define SDL_FORCE_INLINE __forceinline
+#elif ( (defined(__GNUC__) && (__GNUC__ >= 4)) || defined(__clang__) )
+#define SDL_FORCE_INLINE __attribute__((always_inline)) static __inline__
+#else
+#define SDL_FORCE_INLINE static SDL_INLINE
+#endif
+#endif /* SDL_FORCE_INLINE not defined */
+
+/* Apparently this is needed by several Windows compilers */
+#if !defined(__MACH__)
+#ifndef NULL
+#ifdef __cplusplus
+#define NULL 0
+#else
+#define NULL ((void *)0)
+#endif
+#endif /* NULL */
+#endif /* ! Mac OS X - breaks precompiled headers */
diff --git a/include/SDL2/close_code.h b/include/SDL2/close_code.h
new file mode 100644 (file)
index 0000000..9826f14
--- /dev/null
@@ -0,0 +1,37 @@
+/*
+  Simple DirectMedia Layer
+  Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
+
+  This software is provided 'as-is', without any express or implied
+  warranty.  In no event will the authors be held liable for any damages
+  arising from the use of this software.
+
+  Permission is granted to anyone to use this software for any purpose,
+  including commercial applications, and to alter it and redistribute it
+  freely, subject to the following restrictions:
+
+  1. The origin of this software must not be misrepresented; you must not
+     claim that you wrote the original software. If you use this software
+     in a product, an acknowledgment in the product documentation would be
+     appreciated but is not required.
+  2. Altered source versions must be plainly marked as such, and must not be
+     misrepresented as being the original software.
+  3. This notice may not be removed or altered from any source distribution.
+*/
+
+/**
+ *  \file close_code.h
+ *
+ *  This file reverses the effects of begin_code.h and should be included
+ *  after you finish any function and structure declarations in your headers
+ */
+
+#undef _begin_code_h
+
+/* Reset structure packing at previous byte alignment */
+#if defined(_MSC_VER) || defined(__MWERKS__) || defined(__WATCOMC__)  || defined(__BORLANDC__)
+#ifdef __BORLANDC__
+#pragma nopackwarning
+#endif
+#pragma pack(pop)
+#endif /* Compiler needs structure packing set */
diff --git a/include/assimp/Compiler/poppack1.h b/include/assimp/Compiler/poppack1.h
new file mode 100644 (file)
index 0000000..e033bc1
--- /dev/null
@@ -0,0 +1,22 @@
+
+// ===============================================================================
+// May be included multiple times - resets structure packing to the defaults 
+// for all supported compilers. Reverts the changes made by #include <pushpack1.h> 
+//
+// Currently this works on the following compilers:
+// MSVC 7,8,9
+// GCC
+// BORLAND (complains about 'pack state changed but not reverted', but works)
+// ===============================================================================
+
+#ifndef AI_PUSHPACK_IS_DEFINED
+#      error pushpack1.h must be included after poppack1.h
+#endif
+
+// reset packing to the original value
+#if defined(_MSC_VER) ||  defined(__BORLANDC__) || defined (__BCPLUSPLUS__)
+#      pragma pack( pop )
+#endif
+#undef PACK_STRUCT
+
+#undef AI_PUSHPACK_IS_DEFINED
diff --git a/include/assimp/Compiler/pstdint.h b/include/assimp/Compiler/pstdint.h
new file mode 100644 (file)
index 0000000..5bc322f
--- /dev/null
@@ -0,0 +1,729 @@
+/*  A portable stdint.h
+ ****************************************************************************
+ *  BSD License:
+ ****************************************************************************
+ *
+ *  Copyright (c) 2005-2007 Paul Hsieh
+ *  All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions
+ *  are met:
+ *
+ *  1. Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ *  2. 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.
+ *  3. The name of the author may not be used to endorse or promote products
+ *     derived from this software without specific prior written permission.
+ *
+ *  THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
+ *
+ ****************************************************************************
+ *
+ *  Version 0.1.10
+ *
+ *  The ANSI C standard committee, for the C99 standard, specified the
+ *  inclusion of a new standard include file called stdint.h.  This is
+ *  a very useful and long desired include file which contains several
+ *  very precise definitions for integer scalar types that is
+ *  critically important for making portable several classes of
+ *  applications including cryptography, hashing, variable length
+ *  integer libraries and so on.  But for most developers its likely
+ *  useful just for programming sanity.
+ *
+ *  The problem is that most compiler vendors have decided not to
+ *  implement the C99 standard, and the next C++ language standard
+ *  (which has a lot more mindshare these days) will be a long time in
+ *  coming and its unknown whether or not it will include stdint.h or
+ *  how much adoption it will have.  Either way, it will be a long time
+ *  before all compilers come with a stdint.h and it also does nothing
+ *  for the extremely large number of compilers available today which
+ *  do not include this file, or anything comparable to it.
+ *
+ *  So that's what this file is all about.  Its an attempt to build a
+ *  single universal include file that works on as many platforms as
+ *  possible to deliver what stdint.h is supposed to.  A few things
+ *  that should be noted about this file:
+ *
+ *    1) It is not guaranteed to be portable and/or present an identical
+ *       interface on all platforms.  The extreme variability of the
+ *       ANSI C standard makes this an impossibility right from the
+ *       very get go. Its really only meant to be useful for the vast
+ *       majority of platforms that possess the capability of
+ *       implementing usefully and precisely defined, standard sized
+ *       integer scalars.  Systems which are not intrinsically 2s
+ *       complement may produce invalid constants.
+ *
+ *    2) There is an unavoidable use of non-reserved symbols.
+ *
+ *    3) Other standard include files are invoked.
+ *
+ *    4) This file may come in conflict with future platforms that do
+ *       include stdint.h.  The hope is that one or the other can be
+ *       used with no real difference.
+ *
+ *    5) In the current verison, if your platform can't represent
+ *       int32_t, int16_t and int8_t, it just dumps out with a compiler
+ *       error.
+ *
+ *    6) 64 bit integers may or may not be defined.  Test for their
+ *       presence with the test: #ifdef INT64_MAX or #ifdef UINT64_MAX.
+ *       Note that this is different from the C99 specification which
+ *       requires the existence of 64 bit support in the compiler.  If
+ *       this is not defined for your platform, yet it is capable of
+ *       dealing with 64 bits then it is because this file has not yet
+ *       been extended to cover all of your system's capabilities.
+ *
+ *    7) (u)intptr_t may or may not be defined.  Test for its presence
+ *       with the test: #ifdef PTRDIFF_MAX.  If this is not defined
+ *       for your platform, then it is because this file has not yet
+ *       been extended to cover all of your system's capabilities, not
+ *       because its optional.
+ *
+ *    8) The following might not been defined even if your platform is
+ *       capable of defining it:
+ *
+ *       WCHAR_MIN
+ *       WCHAR_MAX
+ *       (u)int64_t
+ *       PTRDIFF_MIN
+ *       PTRDIFF_MAX
+ *       (u)intptr_t
+ *
+ *    9) The following have not been defined:
+ *
+ *       WINT_MIN
+ *       WINT_MAX
+ *
+ *   10) The criteria for defining (u)int_least(*)_t isn't clear,
+ *       except for systems which don't have a type that precisely
+ *       defined 8, 16, or 32 bit types (which this include file does
+ *       not support anyways). Default definitions have been given.
+ *
+ *   11) The criteria for defining (u)int_fast(*)_t isn't something I
+ *       would trust to any particular compiler vendor or the ANSI C
+ *       committee.  It is well known that "compatible systems" are
+ *       commonly created that have very different performance
+ *       characteristics from the systems they are compatible with,
+ *       especially those whose vendors make both the compiler and the
+ *       system.  Default definitions have been given, but its strongly
+ *       recommended that users never use these definitions for any
+ *       reason (they do *NOT* deliver any serious guarantee of
+ *       improved performance -- not in this file, nor any vendor's
+ *       stdint.h).
+ *
+ *   12) The following macros:
+ *
+ *       PRINTF_INTMAX_MODIFIER
+ *       PRINTF_INT64_MODIFIER
+ *       PRINTF_INT32_MODIFIER
+ *       PRINTF_INT16_MODIFIER
+ *       PRINTF_LEAST64_MODIFIER
+ *       PRINTF_LEAST32_MODIFIER
+ *       PRINTF_LEAST16_MODIFIER
+ *       PRINTF_INTPTR_MODIFIER
+ *
+ *       are strings which have been defined as the modifiers required
+ *       for the "d", "u" and "x" printf formats to correctly output
+ *       (u)intmax_t, (u)int64_t, (u)int32_t, (u)int16_t, (u)least64_t,
+ *       (u)least32_t, (u)least16_t and (u)intptr_t types respectively.
+ *       PRINTF_INTPTR_MODIFIER is not defined for some systems which
+ *       provide their own stdint.h.  PRINTF_INT64_MODIFIER is not
+ *       defined if INT64_MAX is not defined.  These are an extension
+ *       beyond what C99 specifies must be in stdint.h.
+ *
+ *       In addition, the following macros are defined:
+ *
+ *       PRINTF_INTMAX_HEX_WIDTH
+ *       PRINTF_INT64_HEX_WIDTH
+ *       PRINTF_INT32_HEX_WIDTH
+ *       PRINTF_INT16_HEX_WIDTH
+ *       PRINTF_INT8_HEX_WIDTH
+ *       PRINTF_INTMAX_DEC_WIDTH
+ *       PRINTF_INT64_DEC_WIDTH
+ *       PRINTF_INT32_DEC_WIDTH
+ *       PRINTF_INT16_DEC_WIDTH
+ *       PRINTF_INT8_DEC_WIDTH
+ *
+ *       Which specifies the maximum number of characters required to
+ *       print the number of that type in either hexadecimal or decimal.
+ *       These are an extension beyond what C99 specifies must be in
+ *       stdint.h.
+ *
+ *  Compilers tested (all with 0 warnings at their highest respective
+ *  settings): Borland Turbo C 2.0, WATCOM C/C++ 11.0 (16 bits and 32
+ *  bits), Microsoft Visual C++ 6.0 (32 bit), Microsoft Visual Studio
+ *  .net (VC7), Intel C++ 4.0, GNU gcc v3.3.3
+ *
+ *  This file should be considered a work in progress.  Suggestions for
+ *  improvements, especially those which increase coverage are strongly
+ *  encouraged.
+ *
+ *  Acknowledgements
+ *
+ *  The following people have made significant contributions to the
+ *  development and testing of this file:
+ *
+ *  Chris Howie
+ *  John Steele Scott
+ *  Dave Thorup
+ *
+ */
+
+#include <stddef.h>
+#include <limits.h>
+#include <signal.h>
+
+/*
+ *  For gcc with _STDINT_H, fill in the PRINTF_INT*_MODIFIER macros, and
+ *  do nothing else.  On the Mac OS X version of gcc this is _STDINT_H_.
+ */
+
+#if ((defined(__STDC__) && __STDC__ && __STDC_VERSION__ >= 199901L) || (defined (__WATCOMC__) && (defined (_STDINT_H_INCLUDED) || __WATCOMC__ >= 1250)) || (defined(__GNUC__) && (defined(_STDINT_H) || defined(_STDINT_H_)))) && !defined (_PSTDINT_H_INCLUDED) && !defined(_STDINT)
+#include <stdint.h>
+#define _PSTDINT_H_INCLUDED
+# ifndef PRINTF_INT64_MODIFIER
+#  define PRINTF_INT64_MODIFIER "ll"
+# endif
+# ifndef PRINTF_INT32_MODIFIER
+#  define PRINTF_INT32_MODIFIER "l"
+# endif
+# ifndef PRINTF_INT16_MODIFIER
+#  define PRINTF_INT16_MODIFIER "h"
+# endif
+# ifndef PRINTF_INTMAX_MODIFIER
+#  define PRINTF_INTMAX_MODIFIER PRINTF_INT64_MODIFIER
+# endif
+# ifndef PRINTF_INT64_HEX_WIDTH
+#  define PRINTF_INT64_HEX_WIDTH "16"
+# endif
+# ifndef PRINTF_INT32_HEX_WIDTH
+#  define PRINTF_INT32_HEX_WIDTH "8"
+# endif
+# ifndef PRINTF_INT16_HEX_WIDTH
+#  define PRINTF_INT16_HEX_WIDTH "4"
+# endif
+# ifndef PRINTF_INT8_HEX_WIDTH
+#  define PRINTF_INT8_HEX_WIDTH "2"
+# endif
+# ifndef PRINTF_INT64_DEC_WIDTH
+#  define PRINTF_INT64_DEC_WIDTH "20"
+# endif
+# ifndef PRINTF_INT32_DEC_WIDTH
+#  define PRINTF_INT32_DEC_WIDTH "10"
+# endif
+# ifndef PRINTF_INT16_DEC_WIDTH
+#  define PRINTF_INT16_DEC_WIDTH "5"
+# endif
+# ifndef PRINTF_INT8_DEC_WIDTH
+#  define PRINTF_INT8_DEC_WIDTH "3"
+# endif
+# ifndef PRINTF_INTMAX_HEX_WIDTH
+#  define PRINTF_INTMAX_HEX_WIDTH PRINTF_INT64_HEX_WIDTH
+# endif
+# ifndef PRINTF_INTMAX_DEC_WIDTH
+#  define PRINTF_INTMAX_DEC_WIDTH PRINTF_INT64_DEC_WIDTH
+# endif
+
+/*
+ *  Something really weird is going on with Open Watcom.  Just pull some of
+ *  these duplicated definitions from Open Watcom's stdint.h file for now.
+ */
+
+# if defined (__WATCOMC__) && __WATCOMC__ >= 1250
+#  if !defined (INT64_C)
+#   define INT64_C(x)   (x + (INT64_MAX - INT64_MAX))
+#  endif
+#  if !defined (UINT64_C)
+#   define UINT64_C(x)  (x + (UINT64_MAX - UINT64_MAX))
+#  endif
+#  if !defined (INT32_C)
+#   define INT32_C(x)   (x + (INT32_MAX - INT32_MAX))
+#  endif
+#  if !defined (UINT32_C)
+#   define UINT32_C(x)  (x + (UINT32_MAX - UINT32_MAX))
+#  endif
+#  if !defined (INT16_C)
+#   define INT16_C(x)   (x)
+#  endif
+#  if !defined (UINT16_C)
+#   define UINT16_C(x)  (x)
+#  endif
+#  if !defined (INT8_C)
+#   define INT8_C(x)   (x)
+#  endif
+#  if !defined (UINT8_C)
+#   define UINT8_C(x)  (x)
+#  endif
+#  if !defined (UINT64_MAX)
+#   define UINT64_MAX  18446744073709551615ULL
+#  endif
+#  if !defined (INT64_MAX)
+#   define INT64_MAX  9223372036854775807LL
+#  endif
+#  if !defined (UINT32_MAX)
+#   define UINT32_MAX  4294967295UL
+#  endif
+#  if !defined (INT32_MAX)
+#   define INT32_MAX  2147483647L
+#  endif
+#  if !defined (INTMAX_MAX)
+#   define INTMAX_MAX INT64_MAX
+#  endif
+#  if !defined (INTMAX_MIN)
+#   define INTMAX_MIN INT64_MIN
+#  endif
+# endif
+#endif
+
+#ifndef _PSTDINT_H_INCLUDED
+#define _PSTDINT_H_INCLUDED
+
+#ifndef SIZE_MAX
+# define SIZE_MAX (~(size_t)0)
+#endif
+
+/*
+ *  Deduce the type assignments from limits.h under the assumption that
+ *  integer sizes in bits are powers of 2, and follow the ANSI
+ *  definitions.
+ */
+
+#ifndef UINT8_MAX
+# define UINT8_MAX 0xff
+#endif
+#ifndef uint8_t
+# if (UCHAR_MAX == UINT8_MAX) || defined (S_SPLINT_S)
+    typedef unsigned char uint8_t;
+#   define UINT8_C(v) ((uint8_t) v)
+# else
+#   error "Platform not supported"
+# endif
+#endif
+
+#ifndef INT8_MAX
+# define INT8_MAX 0x7f
+#endif
+#ifndef INT8_MIN
+# define INT8_MIN INT8_C(0x80)
+#endif
+#ifndef int8_t
+# if (SCHAR_MAX == INT8_MAX) || defined (S_SPLINT_S)
+    typedef signed char int8_t;
+#   define INT8_C(v) ((int8_t) v)
+# else
+#   error "Platform not supported"
+# endif
+#endif
+
+#ifndef UINT16_MAX
+# define UINT16_MAX 0xffff
+#endif
+#ifndef uint16_t
+#if (UINT_MAX == UINT16_MAX) || defined (S_SPLINT_S)
+  typedef unsigned int uint16_t;
+# ifndef PRINTF_INT16_MODIFIER
+#  define PRINTF_INT16_MODIFIER ""
+# endif
+# define UINT16_C(v) ((uint16_t) (v))
+#elif (USHRT_MAX == UINT16_MAX)
+  typedef unsigned short uint16_t;
+# define UINT16_C(v) ((uint16_t) (v))
+# ifndef PRINTF_INT16_MODIFIER
+#  define PRINTF_INT16_MODIFIER "h"
+# endif
+#else
+#error "Platform not supported"
+#endif
+#endif
+
+#ifndef INT16_MAX
+# define INT16_MAX 0x7fff
+#endif
+#ifndef INT16_MIN
+# define INT16_MIN INT16_C(0x8000)
+#endif
+#ifndef int16_t
+#if (INT_MAX == INT16_MAX) || defined (S_SPLINT_S)
+  typedef signed int int16_t;
+# define INT16_C(v) ((int16_t) (v))
+# ifndef PRINTF_INT16_MODIFIER
+#  define PRINTF_INT16_MODIFIER ""
+# endif
+#elif (SHRT_MAX == INT16_MAX)
+  typedef signed short int16_t;
+# define INT16_C(v) ((int16_t) (v))
+# ifndef PRINTF_INT16_MODIFIER
+#  define PRINTF_INT16_MODIFIER "h"
+# endif
+#else
+#error "Platform not supported"
+#endif
+#endif
+
+#ifndef UINT32_MAX
+# define UINT32_MAX (0xffffffffUL)
+#endif
+#ifndef uint32_t
+#if (ULONG_MAX == UINT32_MAX) || defined (S_SPLINT_S)
+  typedef unsigned long uint32_t;
+# define UINT32_C(v) v ## UL
+# ifndef PRINTF_INT32_MODIFIER
+#  define PRINTF_INT32_MODIFIER "l"
+# endif
+#elif (UINT_MAX == UINT32_MAX)
+  typedef unsigned int uint32_t;
+# ifndef PRINTF_INT32_MODIFIER
+#  define PRINTF_INT32_MODIFIER ""
+# endif
+# define UINT32_C(v) v ## U
+#elif (USHRT_MAX == UINT32_MAX)
+  typedef unsigned short uint32_t;
+# define UINT32_C(v) ((unsigned short) (v))
+# ifndef PRINTF_INT32_MODIFIER
+#  define PRINTF_INT32_MODIFIER ""
+# endif
+#else
+#error "Platform not supported"
+#endif
+#endif
+
+#ifndef INT32_MAX
+# define INT32_MAX (0x7fffffffL)
+#endif
+#ifndef INT32_MIN
+# define INT32_MIN INT32_C(0x80000000)
+#endif
+#ifndef int32_t
+#if (LONG_MAX == INT32_MAX) || defined (S_SPLINT_S)
+  typedef signed long int32_t;
+# define INT32_C(v) v ## L
+# ifndef PRINTF_INT32_MODIFIER
+#  define PRINTF_INT32_MODIFIER "l"
+# endif
+#elif (INT_MAX == INT32_MAX)
+  typedef signed int int32_t;
+# define INT32_C(v) v
+# ifndef PRINTF_INT32_MODIFIER
+#  define PRINTF_INT32_MODIFIER ""
+# endif
+#elif (SHRT_MAX == INT32_MAX)
+  typedef signed short int32_t;
+# define INT32_C(v) ((short) (v))
+# ifndef PRINTF_INT32_MODIFIER
+#  define PRINTF_INT32_MODIFIER ""
+# endif
+#else
+#error "Platform not supported"
+#endif
+#endif
+
+/*
+ *  The macro stdint_int64_defined is temporarily used to record
+ *  whether or not 64 integer support is available.  It must be
+ *  defined for any 64 integer extensions for new platforms that are
+ *  added.
+ */
+
+#undef stdint_int64_defined
+#if (defined(__STDC__) && defined(__STDC_VERSION__)) || defined (S_SPLINT_S)
+# if (__STDC__ && __STDC_VERSION >= 199901L) || defined (S_SPLINT_S)
+#  define stdint_int64_defined
+   typedef long long int64_t;
+   typedef unsigned long long uint64_t;
+#  define UINT64_C(v) v ## ULL
+#  define  INT64_C(v) v ## LL
+#  ifndef PRINTF_INT64_MODIFIER
+#   define PRINTF_INT64_MODIFIER "ll"
+#  endif
+# endif
+#endif
+
+#if !defined (stdint_int64_defined)
+# if defined(__GNUC__)
+#  define stdint_int64_defined
+   __extension__ typedef long long int64_t;
+   __extension__ typedef unsigned long long uint64_t;
+#  define UINT64_C(v) v ## ULL
+#  define  INT64_C(v) v ## LL
+#  ifndef PRINTF_INT64_MODIFIER
+#   define PRINTF_INT64_MODIFIER "ll"
+#  endif
+# elif defined(__MWERKS__) || defined (__SUNPRO_C) || defined (__SUNPRO_CC) || defined (__APPLE_CC__) || defined (_LONG_LONG) || defined (_CRAYC) || defined (S_SPLINT_S)
+#  define stdint_int64_defined
+   typedef long long int64_t;
+   typedef unsigned long long uint64_t;
+#  define UINT64_C(v) v ## ULL
+#  define  INT64_C(v) v ## LL
+#  ifndef PRINTF_INT64_MODIFIER
+#   define PRINTF_INT64_MODIFIER "ll"
+#  endif
+# elif (defined(__WATCOMC__) && defined(__WATCOM_INT64__)) || (defined(_MSC_VER) && _INTEGRAL_MAX_BITS >= 64) || (defined (__BORLANDC__) && __BORLANDC__ > 0x460) || defined (__alpha) || defined (__DECC)
+#  define stdint_int64_defined
+   typedef __int64 int64_t;
+   typedef unsigned __int64 uint64_t;
+#  define UINT64_C(v) v ## UI64
+#  define  INT64_C(v) v ## I64
+#  ifndef PRINTF_INT64_MODIFIER
+#   define PRINTF_INT64_MODIFIER "I64"
+#  endif
+# endif
+#endif
+
+#if !defined (LONG_LONG_MAX) && defined (INT64_C)
+# define LONG_LONG_MAX INT64_C (9223372036854775807)
+#endif
+#ifndef ULONG_LONG_MAX
+# define ULONG_LONG_MAX UINT64_C (18446744073709551615)
+#endif
+
+#if !defined (INT64_MAX) && defined (INT64_C)
+# define INT64_MAX INT64_C (9223372036854775807)
+#endif
+#if !defined (INT64_MIN) && defined (INT64_C)
+# define INT64_MIN INT64_C (-9223372036854775808)
+#endif
+#if !defined (UINT64_MAX) && defined (INT64_C)
+# define UINT64_MAX UINT64_C (18446744073709551615)
+#endif
+
+/*
+ *  Width of hexadecimal for number field.
+ */
+
+#ifndef PRINTF_INT64_HEX_WIDTH
+# define PRINTF_INT64_HEX_WIDTH "16"
+#endif
+#ifndef PRINTF_INT32_HEX_WIDTH
+# define PRINTF_INT32_HEX_WIDTH "8"
+#endif
+#ifndef PRINTF_INT16_HEX_WIDTH
+# define PRINTF_INT16_HEX_WIDTH "4"
+#endif
+#ifndef PRINTF_INT8_HEX_WIDTH
+# define PRINTF_INT8_HEX_WIDTH "2"
+#endif
+
+#ifndef PRINTF_INT64_DEC_WIDTH
+# define PRINTF_INT64_DEC_WIDTH "20"
+#endif
+#ifndef PRINTF_INT32_DEC_WIDTH
+# define PRINTF_INT32_DEC_WIDTH "10"
+#endif
+#ifndef PRINTF_INT16_DEC_WIDTH
+# define PRINTF_INT16_DEC_WIDTH "5"
+#endif
+#ifndef PRINTF_INT8_DEC_WIDTH
+# define PRINTF_INT8_DEC_WIDTH "3"
+#endif
+
+/*
+ *  Ok, lets not worry about 128 bit integers for now.  Moore's law says
+ *  we don't need to worry about that until about 2040 at which point
+ *  we'll have bigger things to worry about.
+ */
+
+#ifdef stdint_int64_defined
+  typedef int64_t intmax_t;
+  typedef uint64_t uintmax_t;
+# define  INTMAX_MAX   INT64_MAX
+# define  INTMAX_MIN   INT64_MIN
+# define UINTMAX_MAX  UINT64_MAX
+# define UINTMAX_C(v) UINT64_C(v)
+# define  INTMAX_C(v)  INT64_C(v)
+# ifndef PRINTF_INTMAX_MODIFIER
+#   define PRINTF_INTMAX_MODIFIER PRINTF_INT64_MODIFIER
+# endif
+# ifndef PRINTF_INTMAX_HEX_WIDTH
+#  define PRINTF_INTMAX_HEX_WIDTH PRINTF_INT64_HEX_WIDTH
+# endif
+# ifndef PRINTF_INTMAX_DEC_WIDTH
+#  define PRINTF_INTMAX_DEC_WIDTH PRINTF_INT64_DEC_WIDTH
+# endif
+#else
+  typedef int32_t intmax_t;
+  typedef uint32_t uintmax_t;
+# define  INTMAX_MAX   INT32_MAX
+# define UINTMAX_MAX  UINT32_MAX
+# define UINTMAX_C(v) UINT32_C(v)
+# define  INTMAX_C(v)  INT32_C(v)
+# ifndef PRINTF_INTMAX_MODIFIER
+#   define PRINTF_INTMAX_MODIFIER PRINTF_INT32_MODIFIER
+# endif
+# ifndef PRINTF_INTMAX_HEX_WIDTH
+#  define PRINTF_INTMAX_HEX_WIDTH PRINTF_INT32_HEX_WIDTH
+# endif
+# ifndef PRINTF_INTMAX_DEC_WIDTH
+#  define PRINTF_INTMAX_DEC_WIDTH PRINTF_INT32_DEC_WIDTH
+# endif
+#endif
+
+/*
+ *  Because this file currently only supports platforms which have
+ *  precise powers of 2 as bit sizes for the default integers, the
+ *  least definitions are all trivial.  Its possible that a future
+ *  version of this file could have different definitions.
+ */
+
+#ifndef stdint_least_defined
+  typedef   int8_t   int_least8_t;
+  typedef  uint8_t  uint_least8_t;
+  typedef  int16_t  int_least16_t;
+  typedef uint16_t uint_least16_t;
+  typedef  int32_t  int_least32_t;
+  typedef uint32_t uint_least32_t;
+# define PRINTF_LEAST32_MODIFIER PRINTF_INT32_MODIFIER
+# define PRINTF_LEAST16_MODIFIER PRINTF_INT16_MODIFIER
+# define  UINT_LEAST8_MAX  UINT8_MAX
+# define   INT_LEAST8_MAX   INT8_MAX
+# define UINT_LEAST16_MAX UINT16_MAX
+# define  INT_LEAST16_MAX  INT16_MAX
+# define UINT_LEAST32_MAX UINT32_MAX
+# define  INT_LEAST32_MAX  INT32_MAX
+# define   INT_LEAST8_MIN   INT8_MIN
+# define  INT_LEAST16_MIN  INT16_MIN
+# define  INT_LEAST32_MIN  INT32_MIN
+# ifdef stdint_int64_defined
+    typedef  int64_t  int_least64_t;
+    typedef uint64_t uint_least64_t;
+#   define PRINTF_LEAST64_MODIFIER PRINTF_INT64_MODIFIER
+#   define UINT_LEAST64_MAX UINT64_MAX
+#   define  INT_LEAST64_MAX  INT64_MAX
+#   define  INT_LEAST64_MIN  INT64_MIN
+# endif
+#endif
+#undef stdint_least_defined
+
+/*
+ *  The ANSI C committee pretending to know or specify anything about
+ *  performance is the epitome of misguided arrogance.  The mandate of
+ *  this file is to *ONLY* ever support that absolute minimum
+ *  definition of the fast integer types, for compatibility purposes.
+ *  No extensions, and no attempt to suggest what may or may not be a
+ *  faster integer type will ever be made in this file.  Developers are
+ *  warned to stay away from these types when using this or any other
+ *  stdint.h.
+ */
+
+typedef   int_least8_t   int_fast8_t;
+typedef  uint_least8_t  uint_fast8_t;
+typedef  int_least16_t  int_fast16_t;
+typedef uint_least16_t uint_fast16_t;
+typedef  int_least32_t  int_fast32_t;
+typedef uint_least32_t uint_fast32_t;
+#define  UINT_FAST8_MAX  UINT_LEAST8_MAX
+#define   INT_FAST8_MAX   INT_LEAST8_MAX
+#define UINT_FAST16_MAX UINT_LEAST16_MAX
+#define  INT_FAST16_MAX  INT_LEAST16_MAX
+#define UINT_FAST32_MAX UINT_LEAST32_MAX
+#define  INT_FAST32_MAX  INT_LEAST32_MAX
+#define   INT_FAST8_MIN   INT_LEAST8_MIN
+#define  INT_FAST16_MIN  INT_LEAST16_MIN
+#define  INT_FAST32_MIN  INT_LEAST32_MIN
+#ifdef stdint_int64_defined
+  typedef  int_least64_t  int_fast64_t;
+  typedef uint_least64_t uint_fast64_t;
+# define UINT_FAST64_MAX UINT_LEAST64_MAX
+# define  INT_FAST64_MAX  INT_LEAST64_MAX
+# define  INT_FAST64_MIN  INT_LEAST64_MIN
+#endif
+
+#undef stdint_int64_defined
+
+/*
+ *  Whatever piecemeal, per compiler thing we can do about the wchar_t
+ *  type limits.
+ */
+
+#if defined(__WATCOMC__) || defined(_MSC_VER) || defined (__GNUC__)
+# include <wchar.h>
+# ifndef WCHAR_MIN
+#  define WCHAR_MIN 0
+# endif
+# ifndef WCHAR_MAX
+#  define WCHAR_MAX ((wchar_t)-1)
+# endif
+#endif
+
+/*
+ *  Whatever piecemeal, per compiler/platform thing we can do about the
+ *  (u)intptr_t types and limits.
+ */
+
+#if defined (_MSC_VER) && defined (_UINTPTR_T_DEFINED)
+# define STDINT_H_UINTPTR_T_DEFINED
+#endif
+
+#ifndef STDINT_H_UINTPTR_T_DEFINED
+# if defined (__alpha__) || defined (__ia64__) || defined (__x86_64__) || defined (_WIN64)
+#  define stdint_intptr_bits 64
+# elif defined (__WATCOMC__) || defined (__TURBOC__)
+#  if defined(__TINY__) || defined(__SMALL__) || defined(__MEDIUM__)
+#    define stdint_intptr_bits 16
+#  else
+#    define stdint_intptr_bits 32
+#  endif
+# elif defined (__i386__) || defined (_WIN32) || defined (WIN32)
+#  define stdint_intptr_bits 32
+# elif defined (__INTEL_COMPILER)
+/* TODO -- what will Intel do about x86-64? */
+# endif
+
+# ifdef stdint_intptr_bits
+#  define stdint_intptr_glue3_i(a,b,c)  a##b##c
+#  define stdint_intptr_glue3(a,b,c)    stdint_intptr_glue3_i(a,b,c)
+#  ifndef PRINTF_INTPTR_MODIFIER
+#    define PRINTF_INTPTR_MODIFIER      stdint_intptr_glue3(PRINTF_INT,stdint_intptr_bits,_MODIFIER)
+#  endif
+#  ifndef PTRDIFF_MAX
+#    define PTRDIFF_MAX                 stdint_intptr_glue3(INT,stdint_intptr_bits,_MAX)
+#  endif
+#  ifndef PTRDIFF_MIN
+#    define PTRDIFF_MIN                 stdint_intptr_glue3(INT,stdint_intptr_bits,_MIN)
+#  endif
+#  ifndef UINTPTR_MAX
+#    define UINTPTR_MAX                 stdint_intptr_glue3(UINT,stdint_intptr_bits,_MAX)
+#  endif
+#  ifndef INTPTR_MAX
+#    define INTPTR_MAX                  stdint_intptr_glue3(INT,stdint_intptr_bits,_MAX)
+#  endif
+#  ifndef INTPTR_MIN
+#    define INTPTR_MIN                  stdint_intptr_glue3(INT,stdint_intptr_bits,_MIN)
+#  endif
+#  ifndef INTPTR_C
+#    define INTPTR_C(x)                 stdint_intptr_glue3(INT,stdint_intptr_bits,_C)(x)
+#  endif
+#  ifndef UINTPTR_C
+#    define UINTPTR_C(x)                stdint_intptr_glue3(UINT,stdint_intptr_bits,_C)(x)
+#  endif
+  typedef stdint_intptr_glue3(uint,stdint_intptr_bits,_t) uintptr_t;
+  typedef stdint_intptr_glue3( int,stdint_intptr_bits,_t)  intptr_t;
+# else
+/* TODO -- This following is likely wrong for some platforms, and does
+   nothing for the definition of uintptr_t. */
+  typedef ptrdiff_t intptr_t;
+# endif
+# define STDINT_H_UINTPTR_T_DEFINED
+#endif
+
+/*
+ *  Assumes sig_atomic_t is signed and we have a 2s complement machine.
+ */
+
+#ifndef SIG_ATOMIC_MAX
+# define SIG_ATOMIC_MAX ((((sig_atomic_t) 1) << (sizeof (sig_atomic_t)*CHAR_BIT-1)) - 1)
+#endif
+
+#endif
+
diff --git a/include/assimp/Compiler/pushpack1.h b/include/assimp/Compiler/pushpack1.h
new file mode 100644 (file)
index 0000000..a04f3ad
--- /dev/null
@@ -0,0 +1,46 @@
+
+
+// ===============================================================================
+// May be included multiple times - sets structure packing to 1 
+// for all supported compilers. #include <poppack1.h> reverts the changes.
+//
+// Currently this works on the following compilers:
+// MSVC 7,8,9
+// GCC
+// BORLAND (complains about 'pack state changed but not reverted', but works)
+// Clang
+//
+//
+// USAGE:
+//
+// struct StructToBePacked {
+// } PACK_STRUCT;
+//
+// ===============================================================================
+
+#ifdef AI_PUSHPACK_IS_DEFINED
+#      error poppack1.h must be included after pushpack1.h
+#endif
+
+#if defined(_MSC_VER) ||  defined(__BORLANDC__) ||     defined (__BCPLUSPLUS__)
+#      pragma pack(push,1)
+#      define PACK_STRUCT
+#elif defined( __GNUC__ )
+#      if defined(__clang__)
+#              define PACK_STRUCT      __attribute__((__packed__))
+#      else
+#              define PACK_STRUCT      __attribute__((gcc_struct, __packed__))
+#      endif
+#else
+#      error Compiler not supported
+#endif
+
+#if defined(_MSC_VER)
+
+// C4103: Packing was changed after the inclusion of the header, propably missing #pragma pop
+#      pragma warning (disable : 4103) 
+#endif
+
+#define AI_PUSHPACK_IS_DEFINED
+
+
diff --git a/include/assimp/DefaultLogger.hpp b/include/assimp/DefaultLogger.hpp
new file mode 100644 (file)
index 0000000..390363d
--- /dev/null
@@ -0,0 +1,190 @@
+/*
+Open Asset Import Library (assimp)
+----------------------------------------------------------------------
+
+Copyright (c) 2006-2012, assimp team
+All rights reserved.
+
+Redistribution and use of this software 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.
+
+* Neither the name of the assimp team, nor the names of its
+  contributors may be used to endorse or promote products
+  derived from this software without specific prior
+  written permission of the assimp team.
+
+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.
+
+----------------------------------------------------------------------
+*/
+/** @file DefaultLogger.h
+*/
+
+#ifndef INCLUDED_AI_DEFAULTLOGGER
+#define INCLUDED_AI_DEFAULTLOGGER
+
+#include "Logger.hpp"
+#include "LogStream.hpp"
+#include "NullLogger.hpp"
+#include <vector>
+
+namespace Assimp       {
+// ------------------------------------------------------------------------------------
+class IOStream;
+struct LogStreamInfo;
+
+/** default name of logfile */
+#define ASSIMP_DEFAULT_LOG_NAME "AssimpLog.txt"
+
+// ------------------------------------------------------------------------------------
+/** @brief CPP-API: Primary logging facility of Assimp. 
+ *
+ *  The library stores its primary #Logger as a static member of this class.
+ *  #get() returns this primary logger. By default the underlying implementation is
+ *  just a #NullLogger which rejects all log messages. By calling #create(), logging
+ *  is turned on. To capture the log output multiple log streams (#LogStream) can be
+ *  attach to the logger. Some default streams for common streaming locations (such as
+ *  a file, std::cout, OutputDebugString()) are also provided.
+ *  
+ *  If you wish to customize the logging at an even deeper level supply your own
+ *  implementation of #Logger to #set().
+ *  @note The whole logging stuff causes a small extra overhead for all imports. */
+class ASSIMP_API DefaultLogger :
+       public Logger   {
+
+public:
+
+       // ----------------------------------------------------------------------
+       /** @brief Creates a logging instance.
+        *  @param name Name for log file. Only valid in combination
+        *    with the aiDefaultLogStream_FILE flag. 
+        *  @param severity     Log severity, VERBOSE turns on debug messages
+        *  @param defStreams  Default log streams to be attached. Any bitwise
+        *    combination of the aiDefaultLogStream enumerated values. 
+        *    If #aiDefaultLogStream_FILE is specified but an empty string is
+        *    passed for 'name', no log file is created at all.
+        *  @param  io IOSystem to be used to open external files (such as the 
+        *   log file). Pass NULL to rely on the default implementation.
+        *  This replaces the default #NullLogger with a #DefaultLogger instance. */
+       static Logger *create(const char* name = ASSIMP_DEFAULT_LOG_NAME,
+               LogSeverity severity    = NORMAL,
+               unsigned int defStreams = aiDefaultLogStream_DEBUGGER | aiDefaultLogStream_FILE,
+               IOSystem* io                = NULL);
+
+       // ----------------------------------------------------------------------
+       /** @brief Setup a custom #Logger implementation.
+        *
+        *  Use this if the provided #DefaultLogger class doesn't fit into
+        *  your needs. If the provided message formatting is OK for you,
+        *  it's much easier to use #create() and to attach your own custom 
+        *  output streams to it.
+        *  @param logger Pass NULL to setup a default NullLogger*/
+       static void set (Logger *logger);
+       
+       // ----------------------------------------------------------------------
+       /** @brief      Getter for singleton instance
+        *       @return Only instance. This is never null, but it could be a 
+        *  NullLogger. Use isNullLogger to check this.*/
+       static Logger *get();
+
+       // ----------------------------------------------------------------------
+       /** @brief  Return whether a #NullLogger is currently active
+        *  @return true if the current logger is a #NullLogger.
+        *  Use create() or set() to setup a logger that does actually do
+        *  something else than just rejecting all log messages. */
+       static bool isNullLogger();
+       
+       // ----------------------------------------------------------------------
+       /** @brief      Kills the current singleton logger and replaces it with a
+        *  #NullLogger instance. */
+       static void kill();
+       
+       // ----------------------------------------------------------------------
+       /**     @copydoc Logger::attachStream   */
+       bool attachStream(LogStream *pStream,
+               unsigned int severity);
+
+       // ----------------------------------------------------------------------
+       /**     @copydoc Logger::detatchStream */
+       bool detatchStream(LogStream *pStream, 
+               unsigned int severity);
+
+
+private:
+
+       // ----------------------------------------------------------------------
+       /** @briefPrivate construction for internal use by create().
+        *  @param severity Logging granularity  */
+       DefaultLogger(LogSeverity severity);
+       
+       // ----------------------------------------------------------------------
+       /**     @briefDestructor        */
+       ~DefaultLogger();
+
+private:
+
+       /**     @brief  Logs debug infos, only been written when severity level VERBOSE is set */
+       void OnDebug(const char* message);
+
+       /**     @brief  Logs an info message */
+       void OnInfo(const char*  message);
+
+       /**     @brief  Logs a warning message */
+       void OnWarn(const char*  message);
+       
+       /**     @brief  Logs an error message */
+       void OnError(const char* message);
+
+       // ----------------------------------------------------------------------
+       /**     @brief Writes a message to all streams */
+       void WriteToStreams(const char* message, ErrorSeverity ErrorSev );
+
+       // ----------------------------------------------------------------------
+       /** @brief Returns the thread id.
+        *      @note This is an OS specific feature, if not supported, a 
+        *    zero will be returned.
+        */
+       unsigned int GetThreadID();
+
+private:
+       //      Aliases for stream container
+       typedef std::vector<LogStreamInfo*>     StreamArray;
+       typedef std::vector<LogStreamInfo*>::iterator StreamIt;
+       typedef std::vector<LogStreamInfo*>::const_iterator ConstStreamIt;
+
+       //!     only logging instance
+       static Logger *m_pLogger;
+       static NullLogger s_pNullLogger;
+
+       //!     Attached streams
+       StreamArray     m_StreamArray;
+
+       bool noRepeatMsg;
+       char lastMsg[MAX_LOG_MESSAGE_LENGTH*2];
+       size_t lastLen;
+};
+// ------------------------------------------------------------------------------------
+
+} // Namespace Assimp
+
+#endif // !! INCLUDED_AI_DEFAULTLOGGER
diff --git a/include/assimp/Exporter.hpp b/include/assimp/Exporter.hpp
new file mode 100644 (file)
index 0000000..55cc068
--- /dev/null
@@ -0,0 +1,315 @@
+/*
+---------------------------------------------------------------------------
+Open Asset Import Library (assimp)
+---------------------------------------------------------------------------
+
+Copyright (c) 2006-2011, assimp team
+
+All rights reserved.
+
+Redistribution and use of this software 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.
+
+* Neither the name of the assimp team, nor the names of its
+contributors may be used to endorse or promote products
+derived from this software without specific prior
+written permission of the assimp team.
+
+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.
+---------------------------------------------------------------------------
+*/
+
+/** @file  export.hpp
+*  @brief Defines the CPP-API for the Assimp export interface
+*/
+#ifndef AI_EXPORT_HPP_INC
+#define AI_EXPORT_HPP_INC
+
+#ifndef ASSIMP_BUILD_NO_EXPORT
+
+#include "cexport.h"
+
+namespace Assimp       {
+       class ExporterPimpl;
+       class IOSystem;
+
+
+// ----------------------------------------------------------------------------------
+/** CPP-API: The Exporter class forms an C++ interface to the export functionality 
+ * of the Open Asset Import Library. Note that the export interface is available
+ * only if Assimp has been built with ASSIMP_BUILD_NO_EXPORT not defined.
+ * 
+ * The interface is modelled after the importer interface and mostly
+ * symmetric. The same rules for threading etc. apply.
+ *
+ * In a nutshell, there are two export interfaces: #Export, which writes the
+ * output file(s) either to the regular file system or to a user-supplied 
+ * #IOSystem, and #ExportToBlob which returns a linked list of memory
+ * buffers (blob), each referring to one output file (in most cases
+ * there will be only one output file of course, but this extra complexity is
+ * needed since Assimp aims at supporting a wide range of file formats). 
+ * 
+ * #ExportToBlob is especially useful if you intend to work 
+ * with the data in-memory. 
+*/
+class ASSIMP_API Exporter
+       // TODO: causes good ol' base class has no dll interface warning
+//#ifdef __cplusplus
+//     : public boost::noncopyable
+//#endif // __cplusplus
+{
+public:
+
+       /** Function pointer type of a Export worker function */
+       typedef void (*fpExportFunc)(const char*,IOSystem*,const aiScene*);
+
+       /** Internal description of an Assimp export format option */
+       struct ExportFormatEntry
+       {
+               /// Public description structure to be returned by aiGetExportFormatDescription()
+               aiExportFormatDesc mDescription;
+
+               // Worker function to do the actual exporting
+               fpExportFunc mExportFunction;
+
+               // Postprocessing steps to be executed PRIOR to invoking mExportFunction
+               unsigned int mEnforcePP;
+
+               // Constructor to fill all entries
+               ExportFormatEntry( const char* pId, const char* pDesc, const char* pExtension, fpExportFunc pFunction, unsigned int pEnforcePP = 0u)
+               {
+                       mDescription.id = pId;
+                       mDescription.description = pDesc;
+                       mDescription.fileExtension = pExtension;
+                       mExportFunction = pFunction;
+                       mEnforcePP = pEnforcePP;
+               }
+
+               ExportFormatEntry() : mExportFunction(), mEnforcePP() {}
+       };
+
+
+public:
+
+       
+       Exporter();
+       ~Exporter();
+
+public:
+
+
+       // -------------------------------------------------------------------
+       /** Supplies a custom IO handler to the exporter to use to open and
+        * access files. 
+        * 
+        * If you need #Export to use custom IO logic to access the files, 
+        * you need to supply a custom implementation of IOSystem and 
+        * IOFile to the exporter. 
+        *
+        * #Exporter takes ownership of the object and will destroy it 
+        * afterwards. The previously assigned handler will be deleted.
+        * Pass NULL to take again ownership of your IOSystem and reset Assimp
+        * to use its default implementation, which uses plain file IO.
+        *
+        * @param pIOHandler The IO handler to be used in all file accesses 
+        *   of the Importer. */
+       void SetIOHandler( IOSystem* pIOHandler);
+
+       // -------------------------------------------------------------------
+       /** Retrieves the IO handler that is currently set.
+        * You can use #IsDefaultIOHandler() to check whether the returned
+        * interface is the default IO handler provided by ASSIMP. The default
+        * handler is active as long the application doesn't supply its own
+        * custom IO handler via #SetIOHandler().
+        * @return A valid IOSystem interface, never NULL. */
+       IOSystem* GetIOHandler() const;
+
+       // -------------------------------------------------------------------
+       /** Checks whether a default IO handler is active 
+        * A default handler is active as long the application doesn't 
+        * supply its own custom IO handler via #SetIOHandler().
+        * @return true by default */
+       bool IsDefaultIOHandler() const;
+
+
+
+       // -------------------------------------------------------------------
+       /** Exports the given scene to a chosen file format. Returns the exported 
+       * data as a binary blob which you can write into a file or something.
+       * When you're done with the data, simply let the #Exporter instance go 
+       * out of scope to have it released automatically.
+       * @param pScene The scene to export. Stays in possession of the caller,
+       *   is not changed by the function.
+       * @param pFormatId ID string to specify to which format you want to 
+       *   export to. Use 
+       * #GetExportFormatCount / #GetExportFormatDescription to learn which 
+       *   export formats are available.
+       * @param pPreprocessing See the documentation for #Export
+       * @return the exported data or NULL in case of error.
+       * @note If the Exporter instance did already hold a blob from
+       *   a previous call to #ExportToBlob, it will be disposed. 
+       *   Any IO handlers set via #SetIOHandler are ignored here.
+       * @note Use aiCopyScene() to get a modifiable copy of a previously
+       *   imported scene. */
+       const aiExportDataBlob* ExportToBlob(  const aiScene* pScene, const char* pFormatId, unsigned int pPreprocessing = 0u );
+       inline const aiExportDataBlob* ExportToBlob(  const aiScene* pScene, const std::string& pFormatId, unsigned int pPreprocessing = 0u );
+
+
+       // -------------------------------------------------------------------
+       /** Convenience function to export directly to a file. Use
+        *  #SetIOSystem to supply a custom IOSystem to gain fine-grained control
+        *  about the output data flow of the export process.
+        * @param pBlob A data blob obtained from a previous call to #aiExportScene. Must not be NULL.
+        * @param pPath Full target file name. Target must be accessible.
+        * @param pPreprocessing Accepts any choice of the #aiPostProcessing enumerated
+        *   flags, but in reality only a subset of them makes sense here. Specifying
+        *   'preprocessing' flags is useful if the input scene does not conform to 
+        *   Assimp's default conventions as specified in the @link data Data Structures Page @endlink. 
+        *   In short, this means the geometry data should use a right-handed coordinate systems, face 
+        *   winding should be counter-clockwise and the UV coordinate origin is assumed to be in
+        *   the upper left. The #aiProcess_MakeLeftHanded, #aiProcess_FlipUVs and 
+        *   #aiProcess_FlipWindingOrder flags are used in the import side to allow users
+        *   to have those defaults automatically adapted to their conventions. Specifying those flags
+        *   for exporting has the opposite effect, respectively. Some other of the
+        *   #aiPostProcessSteps enumerated values may be useful as well, but you'll need
+        *   to try out what their effect on the exported file is. Many formats impose
+        *   their own restrictions on the structure of the geometry stored therein,
+        *   so some preprocessing may have little or no effect at all, or may be
+        *   redundant as exporters would apply them anyhow. A good example 
+        *   is triangulation - whilst you can enforce it by specifying
+        *   the #aiProcess_Triangulate flag, most export formats support only
+        *   triangulate data so they would run the step even if it wasn't requested.
+        *
+        *   If assimp detects that the input scene was directly taken from the importer side of 
+     *   the library (i.e. not copied using aiCopyScene and potetially modified afterwards), 
+     *   any postprocessing steps already applied to the scene will not be applied again, unless
+     *   they show non-idempotent behaviour (#aiProcess_MakeLeftHanded, #aiProcess_FlipUVs and 
+     *   #aiProcess_FlipWindingOrder).
+        * @return AI_SUCCESS if everything was fine. 
+        * @note Use aiCopyScene() to get a modifiable copy of a previously
+        *   imported scene.*/
+       aiReturn Export( const aiScene* pScene, const char* pFormatId, const char* pPath, unsigned int pPreprocessing = 0u);
+       inline aiReturn Export( const aiScene* pScene, const std::string& pFormatId, const std::string& pPath,  unsigned int pPreprocessing = 0u);
+
+
+       // -------------------------------------------------------------------
+       /** Returns an error description of an error that occurred in #Export
+        *    or #ExportToBlob
+        *
+        * Returns an empty string if no error occurred.
+        * @return A description of the last error, an empty string if no 
+        *   error occurred. The string is never NULL.
+        *
+        * @note The returned function remains valid until one of the 
+        * following methods is called: #Export, #ExportToBlob, #FreeBlob */
+       const char* GetErrorString() const;
+
+
+       // -------------------------------------------------------------------
+       /** Return the blob obtained from the last call to #ExportToBlob */
+       const aiExportDataBlob* GetBlob() const;
+
+
+       // -------------------------------------------------------------------
+       /** Orphan the blob from the last call to #ExportToBlob. This means
+        *  the caller takes ownership and is thus responsible for calling
+        *  the C API function #aiReleaseExportBlob to release it. */
+       const aiExportDataBlob* GetOrphanedBlob() const;
+
+
+       // -------------------------------------------------------------------
+       /** Frees the current blob.
+        *
+        *  The function does nothing if no blob has previously been 
+        *  previously produced via #ExportToBlob. #FreeBlob is called
+        *  automatically by the destructor. The only reason to call
+        *  it manually would be to reclain as much storage as possible
+        *  without giving up the #Exporter instance yet. */
+       void FreeBlob( );
+
+
+       // -------------------------------------------------------------------
+       /** Returns the number of export file formats available in the current
+        *  Assimp build. Use #Exporter::GetExportFormatDescription to
+        *  retrieve infos of a specific export format */
+       size_t GetExportFormatCount() const;
+
+
+       // -------------------------------------------------------------------
+       /** Returns a description of the nth export file format. Use #
+        *  #Exporter::GetExportFormatCount to learn how many export 
+        *  formats are supported. 
+        * @param pIndex Index of the export format to retrieve information 
+        *  for. Valid range is 0 to #Exporter::GetExportFormatCount
+        * @return A description of that specific export format. 
+        *  NULL if pIndex is out of range. */
+       const aiExportFormatDesc* GetExportFormatDescription( size_t pIndex ) const;
+
+
+       // -------------------------------------------------------------------
+       /** Register a custom exporter. Custom export formats are limited to
+        *    to the current #Exporter instance and do not affect the
+        *    library globally.
+        *  @param desc Exporter description.
+        *  @return aiReturn_SUCCESS if the export format was successfully
+        *    registered. A common cause that would prevent an exporter
+        *    from being registered is that its format id is already
+        *    occupied by another format. */
+       aiReturn RegisterExporter(const ExportFormatEntry& desc);
+
+
+       // -------------------------------------------------------------------
+       /** Remove an export format previously registered with #RegisterExporter
+        *  from the #Exporter instance (this can also be used to drop
+        *  builtin exporters because those are implicitly registered
+        *  using #RegisterExporter).
+        *  @param id Format id to be unregistered, this refers to the
+        *    'id' field of #aiExportFormatDesc. 
+        *  @note Calling this method on a format description not yet registered
+        *    has no effect.*/
+       void UnregisterExporter(const char* id);
+
+
+protected:
+
+       // Just because we don't want you to know how we're hacking around.
+       ExporterPimpl* pimpl;
+};
+
+
+// ----------------------------------------------------------------------------------
+inline const aiExportDataBlob* Exporter :: ExportToBlob(  const aiScene* pScene, const std::string& pFormatId,unsigned int pPreprocessing ) 
+{
+       return ExportToBlob(pScene,pFormatId.c_str(),pPreprocessing);
+}
+
+// ----------------------------------------------------------------------------------
+inline aiReturn Exporter :: Export( const aiScene* pScene, const std::string& pFormatId, const std::string& pPath, unsigned int pPreprocessing )
+{
+       return Export(pScene,pFormatId.c_str(),pPath.c_str(),pPreprocessing);
+}
+
+} // namespace Assimp
+#endif // ASSIMP_BUILD_NO_EXPORT
+#endif // AI_EXPORT_HPP_INC
+
diff --git a/include/assimp/IOStream.hpp b/include/assimp/IOStream.hpp
new file mode 100644 (file)
index 0000000..a36e650
--- /dev/null
@@ -0,0 +1,138 @@
+/*
+---------------------------------------------------------------------------
+Open Asset Import Library (assimp)
+---------------------------------------------------------------------------
+
+Copyright (c) 2006-2012, assimp team
+
+All rights reserved.
+
+Redistribution and use of this software 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.
+
+* Neither the name of the assimp team, nor the names of its
+  contributors may be used to endorse or promote products
+  derived from this software without specific prior
+  written permission of the assimp team.
+
+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.
+---------------------------------------------------------------------------
+*/
+/** @file IOStream.h
+ *  @brief File I/O wrappers for C++. 
+ */
+
+#ifndef AI_IOSTREAM_H_INC
+#define AI_IOSTREAM_H_INC
+
+#include "types.h"
+
+#ifndef __cplusplus
+#      error This header requires C++ to be used. aiFileIO.h is the \
+       corresponding C interface.
+#endif
+
+namespace Assimp       {
+
+// ----------------------------------------------------------------------------------
+/** @brief CPP-API: Class to handle file I/O for C++
+ *
+ *  Derive an own implementation from this interface to provide custom IO handling
+ *  to the Importer. If you implement this interface, be sure to also provide an
+ *  implementation for IOSystem that creates instances of your custom IO class.
+*/
+class ASSIMP_API IOStream
+#ifndef SWIG
+       : public Intern::AllocateFromAssimpHeap
+#endif
+{
+protected:
+       /** Constructor protected, use IOSystem::Open() to create an instance. */
+       IOStream(void);
+
+public:
+       // -------------------------------------------------------------------
+       /** @brief Destructor. Deleting the object closes the underlying file, 
+        * alternatively you may use IOSystem::Close() to release the file. 
+        */
+       virtual ~IOStream();
+
+       // -------------------------------------------------------------------
+       /** @brief Read from the file
+        *
+        * See fread() for more details
+        * This fails for write-only files */
+    virtual size_t Read(void* pvBuffer, 
+               size_t pSize, 
+               size_t pCount) = 0;
+
+       // -------------------------------------------------------------------
+       /** @brief Write to the file
+       *
+       * See fwrite() for more details
+       * This fails for read-only files */
+    virtual size_t Write(const void* pvBuffer, 
+               size_t pSize,
+               size_t pCount) = 0;
+
+       // -------------------------------------------------------------------
+       /** @brief Set the read/write cursor of the file
+        *
+        * Note that the offset is _negative_ for aiOrigin_END.
+        * See fseek() for more details */
+       virtual aiReturn Seek(size_t pOffset,
+               aiOrigin pOrigin) = 0;
+
+       // -------------------------------------------------------------------
+       /** @brief Get the current position of the read/write cursor
+        *
+        * See ftell() for more details */
+    virtual size_t Tell() const = 0;
+
+       // -------------------------------------------------------------------
+       /**     @brief Returns filesize
+        *      Returns the filesize. */
+       virtual size_t FileSize() const = 0;
+
+       // -------------------------------------------------------------------
+       /**     @brief Flush the contents of the file buffer (for writers) 
+        *      See fflush() for more details.
+        */
+       virtual void Flush() = 0;
+}; //! class IOStream
+
+// ----------------------------------------------------------------------------------
+inline IOStream::IOStream()
+{
+       // empty
+}
+
+// ----------------------------------------------------------------------------------
+inline IOStream::~IOStream()
+{
+       // empty
+}
+// ----------------------------------------------------------------------------------
+} //!namespace Assimp
+
+#endif //!!AI_IOSTREAM_H_INC
diff --git a/include/assimp/IOSystem.hpp b/include/assimp/IOSystem.hpp
new file mode 100644 (file)
index 0000000..dfd90b9
--- /dev/null
@@ -0,0 +1,225 @@
+/*
+---------------------------------------------------------------------------
+Open Asset Import Library (assimp)
+---------------------------------------------------------------------------
+
+Copyright (c) 2006-2012, assimp team
+
+All rights reserved.
+
+Redistribution and use of this software 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.
+
+* Neither the name of the assimp team, nor the names of its
+  contributors may be used to endorse or promote products
+  derived from this software without specific prior
+  written permission of the assimp team.
+
+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.
+---------------------------------------------------------------------------
+*/
+
+/** @file IOSystem.h
+ *  @brief File system wrapper for C++. Inherit this class to supply
+ *  custom file handling logic to the Import library.
+*/
+
+#ifndef AI_IOSYSTEM_H_INC
+#define AI_IOSYSTEM_H_INC
+
+#ifndef __cplusplus
+#      error This header requires C++ to be used. aiFileIO.h is the \
+       corresponding C interface.
+#endif
+
+#include "types.h"
+namespace Assimp       {
+class IOStream;
+
+// ---------------------------------------------------------------------------
+/** @brief CPP-API: Interface to the file system.
+ *
+ *  Derive an own implementation from this interface to supply custom file handling
+ *  to the importer library. If you implement this interface, you also want to
+ *  supply a custom implementation for IOStream.
+ *
+ *  @see Importer::SetIOHandler() */
+class ASSIMP_API IOSystem
+#ifndef SWIG
+       : public Intern::AllocateFromAssimpHeap
+#endif
+{
+public:
+
+       // -------------------------------------------------------------------
+       /** @brief Default constructor.
+        *
+        *  Create an instance of your derived class and assign it to an 
+        *  #Assimp::Importer instance by calling Importer::SetIOHandler().
+        */
+       IOSystem();
+
+       // -------------------------------------------------------------------
+       /** @brief Virtual destructor.
+        *
+        *  It is safe to be called from within DLL Assimp, we're constructed
+        *  on Assimp's heap.
+        */
+       virtual ~IOSystem();
+
+
+public:
+
+       // -------------------------------------------------------------------
+       /** @brief For backward compatibility
+        *  @see Exists(const char*)
+        */
+       AI_FORCE_INLINE bool Exists( const std::string& pFile) const;
+
+       // -------------------------------------------------------------------
+       /** @brief Tests for the existence of a file at the given path. 
+        *
+        * @param pFile Path to the file
+        * @return true if there is a file with this path, else false.
+        */
+
+       virtual bool Exists( const char* pFile) const = 0;
+
+
+
+       // -------------------------------------------------------------------
+       /**     @brief Returns the system specific directory separator
+        *      @return System specific directory separator
+        */
+       virtual char getOsSeparator() const = 0;
+
+
+       // -------------------------------------------------------------------
+       /** @brief Open a new file with a given path.
+        *
+        *  When the access to the file is finished, call Close() to release
+        *  all associated resources (or the virtual dtor of the IOStream).
+        *
+        *  @param pFile Path to the file
+        *  @param pMode Desired file I/O mode. Required are: "wb", "w", "wt",
+        *         "rb", "r", "rt".
+        *
+        *  @return New IOStream interface allowing the lib to access
+        *         the underlying file. 
+        *  @note When implementing this class to provide custom IO handling, 
+        *  you probably have to supply an own implementation of IOStream as well. 
+        */
+       virtual IOStream* Open(const char* pFile,
+               const char* pMode = "rb") = 0;
+
+       // -------------------------------------------------------------------
+       /** @brief For backward compatibility
+        *  @see Open(const char*, const char*)
+        */
+       inline IOStream* Open(const std::string& pFile,
+               const std::string& pMode = std::string("rb"));
+
+
+
+       // -------------------------------------------------------------------
+       /** @brief Closes the given file and releases all resources 
+        *    associated with it.
+        *  @param pFile The file instance previously created by Open().
+        */
+       virtual void Close( IOStream* pFile) = 0;
+
+       // -------------------------------------------------------------------
+       /** @brief Compares two paths and check whether the point to
+        *         identical files.
+        *  
+        * The dummy implementation of this virtual member performs a 
+        * case-insensitive comparison of the given strings. The default IO
+        * system implementation uses OS mechanisms to convert relative into
+        * absolute paths, so the result can be trusted.
+        * @param one First file
+        * @param second Second file
+        * @return true if the paths point to the same file. The file needn't
+        *   be existing, however.
+        */
+       virtual bool ComparePaths (const char* one, 
+               const char* second) const;
+
+       // -------------------------------------------------------------------
+       /** @brief For backward compatibility
+        *  @see ComparePaths(const char*, const char*)
+        */
+       inline bool ComparePaths (const std::string& one, 
+               const std::string& second) const;
+};
+
+// ----------------------------------------------------------------------------
+AI_FORCE_INLINE IOSystem::IOSystem() 
+{
+       // empty
+}
+
+// ----------------------------------------------------------------------------
+AI_FORCE_INLINE IOSystem::~IOSystem() 
+{
+       // empty
+}
+
+// ----------------------------------------------------------------------------
+// For compatibility, the interface of some functions taking a std::string was
+// changed to const char* to avoid crashes between binary incompatible STL 
+// versions. This code her is inlined,  so it shouldn't cause any problems.
+// ----------------------------------------------------------------------------
+
+// ----------------------------------------------------------------------------
+AI_FORCE_INLINE IOStream* IOSystem::Open(const std::string& pFile,
+       const std::string& pMode)
+{
+       // NOTE:
+       // For compatibility, interface was changed to const char* to
+       // avoid crashes between binary incompatible STL versions 
+       return Open(pFile.c_str(),pMode.c_str());
+}
+
+// ----------------------------------------------------------------------------
+AI_FORCE_INLINE bool IOSystem::Exists( const std::string& pFile) const
+{
+       // NOTE:
+       // For compatibility, interface was changed to const char* to
+       // avoid crashes between binary incompatible STL versions 
+       return Exists(pFile.c_str());
+}
+
+// ----------------------------------------------------------------------------
+inline bool IOSystem::ComparePaths (const std::string& one, 
+       const std::string& second) const
+{
+       // NOTE:
+       // For compatibility, interface was changed to const char* to
+       // avoid crashes between binary incompatible STL versions 
+       return ComparePaths(one.c_str(),second.c_str());
+}
+
+// ----------------------------------------------------------------------------
+} //!ns Assimp
+
+#endif //AI_IOSYSTEM_H_INC
diff --git a/include/assimp/Importer.hpp b/include/assimp/Importer.hpp
new file mode 100644 (file)
index 0000000..20af072
--- /dev/null
@@ -0,0 +1,659 @@
+/*
+---------------------------------------------------------------------------
+Open Asset Import Library (assimp)
+---------------------------------------------------------------------------
+
+Copyright (c) 2006-2012, assimp team
+
+All rights reserved.
+
+Redistribution and use of this software 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.
+
+* Neither the name of the assimp team, nor the names of its
+  contributors may be used to endorse or promote products
+  derived from this software without specific prior
+  written permission of the assimp team.
+
+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.
+---------------------------------------------------------------------------
+*/
+
+/** @file  assimp.hpp
+ *  @brief Defines the C++-API to the Open Asset Import Library.
+ */
+#ifndef INCLUDED_AI_ASSIMP_HPP
+#define INCLUDED_AI_ASSIMP_HPP
+
+#ifndef __cplusplus
+#      error This header requires C++ to be used. Use assimp.h for plain C. 
+#endif
+
+// Public ASSIMP data structures
+#include "types.h"
+#include "config.h"
+
+namespace Assimp       {
+       // =======================================================================
+       // Public interface to Assimp 
+       class Importer;
+       class Exporter; // export.hpp
+       class IOStream;
+       class IOSystem;
+       class ProgressHandler;
+
+       // =======================================================================
+       // Plugin development
+       //
+       // Include the following headers for the declarations:
+       // BaseImporter.h
+       // BaseProcess.h
+       class BaseImporter;
+       class BaseProcess;
+       class SharedPostProcessInfo;
+       class BatchLoader; 
+
+       // =======================================================================
+       // Holy stuff, only for members of the high council of the Jedi.
+       class ImporterPimpl;
+       class ExporterPimpl; // export.hpp
+} //! namespace Assimp
+
+#define AI_PROPERTY_WAS_NOT_EXISTING 0xffffffff
+
+struct aiScene;
+
+// importerdesc.h
+struct aiImporterDesc;
+
+/** @namespace Assimp Assimp's CPP-API and all internal APIs */
+namespace Assimp       {
+
+// ----------------------------------------------------------------------------------
+/** CPP-API: The Importer class forms an C++ interface to the functionality of the 
+*   Open Asset Import Library.
+*
+* Create an object of this class and call ReadFile() to import a file. 
+* If the import succeeds, the function returns a pointer to the imported data. 
+* The data remains property of the object, it is intended to be accessed 
+* read-only. The imported data will be destroyed along with the Importer 
+* object. If the import fails, ReadFile() returns a NULL pointer. In this
+* case you can retrieve a human-readable error description be calling 
+* GetErrorString(). You can call ReadFile() multiple times with a single Importer
+* instance. Actually, constructing Importer objects involves quite many
+* allocations and may take some time, so it's better to reuse them as often as
+* possible.
+*
+* If you need the Importer to do custom file handling to access the files,
+* implement IOSystem and IOStream and supply an instance of your custom 
+* IOSystem implementation by calling SetIOHandler() before calling ReadFile().
+* If you do not assign a custion IO handler, a default handler using the 
+* standard C++ IO logic will be used.
+*
+* @note One Importer instance is not thread-safe. If you use multiple
+* threads for loading, each thread should maintain its own Importer instance.
+*/
+class ASSIMP_API Importer      {
+
+public:
+
+       // -------------------------------------------------------------------
+       /** Constructor. Creates an empty importer object. 
+        * 
+        * Call ReadFile() to start the import process. The configuration
+        * property table is initially empty.
+        */
+       Importer();
+
+       // -------------------------------------------------------------------
+       /** Copy constructor.
+        * 
+        * This copies the configuration properties of another Importer.
+        * If this Importer owns a scene it won't be copied.
+        * Call ReadFile() to start the import process.
+        */
+       Importer(const Importer& other);
+
+       // -------------------------------------------------------------------
+       /** Destructor. The object kept ownership of the imported data,
+        * which now will be destroyed along with the object. 
+        */
+       ~Importer();
+
+
+       // -------------------------------------------------------------------
+       /** Registers a new loader.
+        *
+        * @param pImp Importer to be added. The Importer instance takes 
+        *   ownership of the pointer, so it will be automatically deleted
+        *   with the Importer instance.
+        * @return AI_SUCCESS if the loader has been added. The registration
+        *   fails if there is already a loader for a specific file extension.
+        */
+       aiReturn RegisterLoader(BaseImporter* pImp);
+
+       // -------------------------------------------------------------------
+       /** Unregisters a loader.
+        *
+        * @param pImp Importer to be unregistered.
+        * @return AI_SUCCESS if the loader has been removed. The function
+        *   fails if the loader is currently in use (this could happen
+        *   if the #Importer instance is used by more than one thread) or
+        *   if it has not yet been registered.
+        */
+       aiReturn UnregisterLoader(BaseImporter* pImp);
+
+       // -------------------------------------------------------------------
+       /** Registers a new post-process step.
+        *
+        * At the moment, there's a small limitation: new post processing 
+        * steps are added to end of the list, or in other words, executed 
+        * last, after all built-in steps.
+        * @param pImp Post-process step to be added. The Importer instance 
+        *   takes ownership of the pointer, so it will be automatically 
+        *   deleted with the Importer instance.
+        * @return AI_SUCCESS if the step has been added correctly.
+        */
+       aiReturn RegisterPPStep(BaseProcess* pImp);
+
+       // -------------------------------------------------------------------
+       /** Unregisters a post-process step.
+        *
+        * @param pImp Step to be unregistered. 
+        * @return AI_SUCCESS if the step has been removed. The function
+        *   fails if the step is currently in use (this could happen
+        *   if the #Importer instance is used by more than one thread) or
+        *   if it has not yet been registered.
+        */
+       aiReturn UnregisterPPStep(BaseProcess* pImp);
+
+
+       // -------------------------------------------------------------------
+       /** Set an integer configuration property.
+        * @param szName Name of the property. All supported properties
+        *   are defined in the aiConfig.g header (all constants share the
+        *   prefix AI_CONFIG_XXX and are simple strings).
+        * @param iValue New value of the property
+        * @param bWasExisting Optional pointer to receive true if the
+        *   property was set before. The new value replaces the previous value
+        *   in this case.
+        * @note Property of different types (float, int, string ..) are kept
+        *   on different stacks, so calling SetPropertyInteger() for a 
+        *   floating-point property has no effect - the loader will call
+        *   GetPropertyFloat() to read the property, but it won't be there.
+        */
+       void SetPropertyInteger(const char* szName, int iValue, 
+               bool* bWasExisting = NULL);
+
+       // -------------------------------------------------------------------
+       /** Set a boolean configuration property. Boolean properties
+        *  are stored on the integer stack internally so it's possible
+        *  to set them via #SetPropertyBool and query them with
+        *  #GetPropertyBool and vice versa.
+        * @see SetPropertyInteger()
+        */
+       void SetPropertyBool(const char* szName, bool value, bool* bWasExisting = NULL) {
+               SetPropertyInteger(szName,value,bWasExisting);
+       }
+
+       // -------------------------------------------------------------------
+       /** Set a floating-point configuration property.
+        * @see SetPropertyInteger()
+        */
+       void SetPropertyFloat(const char* szName, float fValue, 
+               bool* bWasExisting = NULL);
+
+       // -------------------------------------------------------------------
+       /** Set a string configuration property.
+        * @see SetPropertyInteger()
+        */
+       void SetPropertyString(const char* szName, const std::string& sValue, 
+               bool* bWasExisting = NULL);
+
+       // -------------------------------------------------------------------
+       /** Set a matrix configuration property.
+        * @see SetPropertyInteger()
+        */
+       void SetPropertyMatrix(const char* szName, const aiMatrix4x4& sValue, 
+               bool* bWasExisting = NULL);
+
+       // -------------------------------------------------------------------
+       /** Get a configuration property.
+        * @param szName Name of the property. All supported properties
+        *   are defined in the aiConfig.g header (all constants share the
+        *   prefix AI_CONFIG_XXX).
+        * @param iErrorReturn Value that is returned if the property 
+        *   is not found. 
+        * @return Current value of the property
+        * @note Property of different types (float, int, string ..) are kept
+        *   on different lists, so calling SetPropertyInteger() for a 
+        *   floating-point property has no effect - the loader will call
+        *   GetPropertyFloat() to read the property, but it won't be there.
+        */
+       int GetPropertyInteger(const char* szName, 
+               int iErrorReturn = 0xffffffff) const;
+
+       // -------------------------------------------------------------------
+       /** Get a boolean configuration property. Boolean properties
+        *  are stored on the integer stack internally so it's possible
+        *  to set them via #SetPropertyBool and query them with
+        *  #GetPropertyBool and vice versa.
+        * @see GetPropertyInteger()
+        */
+       bool GetPropertyBool(const char* szName, bool bErrorReturn = false) const {
+               return GetPropertyInteger(szName,bErrorReturn)!=0;
+       }
+
+       // -------------------------------------------------------------------
+       /** Get a floating-point configuration property
+        * @see GetPropertyInteger()
+        */
+       float GetPropertyFloat(const char* szName, 
+               float fErrorReturn = 10e10f) const;
+
+       // -------------------------------------------------------------------
+       /** Get a string configuration property
+        *
+        *  The return value remains valid until the property is modified.
+        * @see GetPropertyInteger()
+        */
+       const std::string GetPropertyString(const char* szName,
+               const std::string& sErrorReturn = "") const;
+
+       // -------------------------------------------------------------------
+       /** Get a matrix configuration property
+        *
+        *  The return value remains valid until the property is modified.
+        * @see GetPropertyInteger()
+        */
+       const aiMatrix4x4 GetPropertyMatrix(const char* szName,
+               const aiMatrix4x4& sErrorReturn = aiMatrix4x4()) const;
+
+       // -------------------------------------------------------------------
+       /** Supplies a custom IO handler to the importer to use to open and
+        * access files. If you need the importer to use custion IO logic to 
+        * access the files, you need to provide a custom implementation of 
+        * IOSystem and IOFile to the importer. Then create an instance of 
+        * your custion IOSystem implementation and supply it by this function.
+        *
+        * The Importer takes ownership of the object and will destroy it 
+        * afterwards. The previously assigned handler will be deleted.
+        * Pass NULL to take again ownership of your IOSystem and reset Assimp
+        * to use its default implementation.
+        *
+        * @param pIOHandler The IO handler to be used in all file accesses 
+        *   of the Importer. 
+        */
+       void SetIOHandler( IOSystem* pIOHandler);
+
+       // -------------------------------------------------------------------
+       /** Retrieves the IO handler that is currently set.
+        * You can use #IsDefaultIOHandler() to check whether the returned
+        * interface is the default IO handler provided by ASSIMP. The default
+        * handler is active as long the application doesn't supply its own
+        * custom IO handler via #SetIOHandler().
+        * @return A valid IOSystem interface, never NULL.
+        */
+       IOSystem* GetIOHandler() const;
+
+       // -------------------------------------------------------------------
+       /** Checks whether a default IO handler is active 
+        * A default handler is active as long the application doesn't 
+        * supply its own custom IO handler via #SetIOHandler().
+        * @return true by default
+        */
+       bool IsDefaultIOHandler() const;
+
+       // -------------------------------------------------------------------
+       /** Supplies a custom progress handler to the importer. This 
+        *  interface exposes a #Update() callback, which is called
+        *  more or less periodically (please don't sue us if it
+        *  isn't as periodically as you'd like it to have ...).
+        *  This can be used to implement progress bars and loading
+        *  timeouts. 
+        *  @param pHandler Progress callback interface. Pass NULL to 
+        *    disable progress reporting. 
+        *  @note Progress handlers can be used to abort the loading
+        *    at almost any time.*/
+       void SetProgressHandler ( ProgressHandler* pHandler );
+
+       // -------------------------------------------------------------------
+       /** Retrieves the progress handler that is currently set. 
+        * You can use #IsDefaultProgressHandler() to check whether the returned
+        * interface is the default handler provided by ASSIMP. The default
+        * handler is active as long the application doesn't supply its own
+        * custom handler via #SetProgressHandler().
+        * @return A valid ProgressHandler interface, never NULL.
+        */
+       ProgressHandler* GetProgressHandler() const;
+
+       // -------------------------------------------------------------------
+       /** Checks whether a default progress handler is active 
+        * A default handler is active as long the application doesn't 
+        * supply its own custom progress handler via #SetProgressHandler().
+        * @return true by default
+        */
+       bool IsDefaultProgressHandler() const;
+
+       // -------------------------------------------------------------------
+       /** @brief Check whether a given set of postprocessing flags
+        *  is supported.
+        *
+        *  Some flags are mutually exclusive, others are probably
+        *  not available because your excluded them from your
+        *  Assimp builds. Calling this function is recommended if 
+        *  you're unsure.
+        *
+        *  @param pFlags Bitwise combination of the aiPostProcess flags.
+        *  @return true if this flag combination is fine.
+        */
+       bool ValidateFlags(unsigned int pFlags) const;
+
+       // -------------------------------------------------------------------
+       /** Reads the given file and returns its contents if successful. 
+        * 
+        * If the call succeeds, the contents of the file are returned as a 
+        * pointer to an aiScene object. The returned data is intended to be 
+        * read-only, the importer object keeps ownership of the data and will
+        * destroy it upon destruction. If the import fails, NULL is returned.
+        * A human-readable error description can be retrieved by calling 
+        * GetErrorString(). The previous scene will be deleted during this call.
+        * @param pFile Path and filename to the file to be imported.
+        * @param pFlags Optional post processing steps to be executed after 
+        *   a successful import. Provide a bitwise combination of the 
+        *   #aiPostProcessSteps flags. If you wish to inspect the imported
+        *   scene first in order to fine-tune your post-processing setup,
+        *   consider to use #ApplyPostProcessing().
+        * @return A pointer to the imported data, NULL if the import failed.
+        *   The pointer to the scene remains in possession of the Importer
+        *   instance. Use GetOrphanedScene() to take ownership of it.
+        *
+        * @note Assimp is able to determine the file format of a file
+        * automatically. 
+        */
+       const aiScene* ReadFile(
+               const char* pFile, 
+               unsigned int pFlags);
+
+       // -------------------------------------------------------------------
+       /** Reads the given file from a memory buffer and returns its
+        *  contents if successful.
+        * 
+        * If the call succeeds, the contents of the file are returned as a 
+        * pointer to an aiScene object. The returned data is intended to be 
+        * read-only, the importer object keeps ownership of the data and will
+        * destroy it upon destruction. If the import fails, NULL is returned.
+        * A human-readable error description can be retrieved by calling 
+        * GetErrorString(). The previous scene will be deleted during this call.
+        * Calling this method doesn't affect the active IOSystem.
+        * @param pBuffer Pointer to the file data
+        * @param pLength Length of pBuffer, in bytes
+        * @param pFlags Optional post processing steps to be executed after 
+        *   a successful import. Provide a bitwise combination of the 
+        *   #aiPostProcessSteps flags. If you wish to inspect the imported
+        *   scene first in order to fine-tune your post-processing setup,
+        *   consider to use #ApplyPostProcessing().
+        * @param pHint An additional hint to the library. If this is a non
+        *   empty string, the library looks for a loader to support 
+        *   the file extension specified by pHint and passes the file to
+        *   the first matching loader. If this loader is unable to completely
+        *   the request, the library continues and tries to determine the
+        *   file format on its own, a task that may or may not be successful.
+        *   Check the return value, and you'll know ...
+        * @return A pointer to the imported data, NULL if the import failed.
+        *   The pointer to the scene remains in possession of the Importer
+        *   instance. Use GetOrphanedScene() to take ownership of it.
+        *
+        * @note This is a straightforward way to decode models from memory
+        * buffers, but it doesn't handle model formats that spread their 
+        * data across multiple files or even directories. Examples include
+        * OBJ or MD3, which outsource parts of their material info into
+        * external scripts. If you need full functionality, provide
+        * a custom IOSystem to make Assimp find these files and use
+        * the regular ReadFile() API.
+        */
+       const aiScene* ReadFileFromMemory( 
+               const void* pBuffer,
+               size_t pLength,
+               unsigned int pFlags,
+               const char* pHint = "");
+
+       // -------------------------------------------------------------------
+       /** Apply post-processing to an already-imported scene.
+        *
+        *  This is strictly equivalent to calling #ReadFile() with the same
+        *  flags. However, you can use this separate function to inspect
+        *  the imported scene first to fine-tune your post-processing setup.
+        *  @param pFlags Provide a bitwise combination of the 
+        *   #aiPostProcessSteps flags.
+        *  @return A pointer to the post-processed data. This is still the
+        *   same as the pointer returned by #ReadFile(). However, if
+        *   post-processing fails, the scene could now be NULL.
+        *   That's quite a rare case, post processing steps are not really
+        *   designed to 'fail'. To be exact, the #aiProcess_ValidateDS
+        *   flag is currently the only post processing step which can actually
+        *   cause the scene to be reset to NULL.
+        *
+        *  @note The method does nothing if no scene is currently bound
+        *    to the #Importer instance.  */
+       const aiScene* ApplyPostProcessing(unsigned int pFlags);
+
+       // -------------------------------------------------------------------
+       /** @brief Reads the given file and returns its contents if successful. 
+        *
+        * This function is provided for backward compatibility.
+        * See the const char* version for detailled docs.
+        * @see ReadFile(const char*, pFlags)  */
+       const aiScene* ReadFile(
+               const std::string& pFile, 
+               unsigned int pFlags);
+
+       // -------------------------------------------------------------------
+       /** Frees the current scene.
+        *
+        *  The function does nothing if no scene has previously been 
+        *  read via ReadFile(). FreeScene() is called automatically by the
+        *  destructor and ReadFile() itself.  */
+       void FreeScene( );
+
+       // -------------------------------------------------------------------
+       /** Returns an error description of an error that occurred in ReadFile(). 
+        *
+        * Returns an empty string if no error occurred.
+        * @return A description of the last error, an empty string if no 
+        *   error occurred. The string is never NULL.
+        *
+        * @note The returned function remains valid until one of the 
+        * following methods is called: #ReadFile(), #FreeScene(). */
+       const char* GetErrorString() const;
+
+       // -------------------------------------------------------------------
+       /** Returns the scene loaded by the last successful call to ReadFile()
+        *
+        * @return Current scene or NULL if there is currently no scene loaded */
+       const aiScene* GetScene() const;
+
+       // -------------------------------------------------------------------
+       /** Returns the scene loaded by the last successful call to ReadFile()
+        *  and releases the scene from the ownership of the Importer 
+        *  instance. The application is now responsible for deleting the
+        *  scene. Any further calls to GetScene() or GetOrphanedScene()
+        *  will return NULL - until a new scene has been loaded via ReadFile().
+        *
+        * @return Current scene or NULL if there is currently no scene loaded
+        * @note Use this method with maximal caution, and only if you have to.
+        *   By design, aiScene's are exclusively maintained, allocated and
+        *   deallocated by Assimp and no one else. The reasoning behind this
+        *   is the golden rule that deallocations should always be done
+        *   by the module that did the original allocation because heaps
+        *   are not necessarily shared. GetOrphanedScene() enforces you
+        *   to delete the returned scene by yourself, but this will only
+        *   be fine if and only if you're using the same heap as assimp.
+        *   On Windows, it's typically fine provided everything is linked
+        *   against the multithreaded-dll version of the runtime library.
+        *   It will work as well for static linkage with Assimp.*/
+       aiScene* GetOrphanedScene();
+
+
+
+
+       // -------------------------------------------------------------------
+       /** Returns whether a given file extension is supported by ASSIMP.
+        *
+        * @param szExtension Extension to be checked.
+        *   Must include a trailing dot '.'. Example: ".3ds", ".md3".
+        *   Cases-insensitive.
+        * @return true if the extension is supported, false otherwise */
+       bool IsExtensionSupported(const char* szExtension) const;
+
+       // -------------------------------------------------------------------
+       /** @brief Returns whether a given file extension is supported by ASSIMP.
+        *
+        * This function is provided for backward compatibility.
+        * See the const char* version for detailed and up-to-date docs.
+        * @see IsExtensionSupported(const char*) */
+       inline bool IsExtensionSupported(const std::string& szExtension) const;
+
+       // -------------------------------------------------------------------
+       /** Get a full list of all file extensions supported by ASSIMP.
+        *
+        * If a file extension is contained in the list this does of course not
+        * mean that ASSIMP is able to load all files with this extension ---
+     * it simply means there is an importer loaded which claims to handle
+        * files with this file extension.
+        * @param szOut String to receive the extension list. 
+        *   Format of the list: "*.3ds;*.obj;*.dae". This is useful for
+        *   use with the WinAPI call GetOpenFileName(Ex). */
+       void GetExtensionList(aiString& szOut) const;
+
+       // -------------------------------------------------------------------
+       /** @brief Get a full list of all file extensions supported by ASSIMP.
+        *
+        * This function is provided for backward compatibility.
+        * See the aiString version for detailed and up-to-date docs.
+        * @see GetExtensionList(aiString&)*/
+       inline void GetExtensionList(std::string& szOut) const;
+
+       // -------------------------------------------------------------------
+       /** Get the number of importrs currently registered with Assimp. */
+       size_t GetImporterCount() const;
+
+       // -------------------------------------------------------------------
+       /** Get meta data for the importer corresponding to a specific index..
+       *
+       *  For the declaration of #aiImporterDesc, include <assimp/importerdesc.h>.
+       *  @param index Index to query, must be within [0,GetImporterCount())
+       *  @return Importer meta data structure, NULL if the index does not
+       *     exist or if the importer doesn't offer meta information (
+       *     importers may do this at the cost of being hated by their peers).*/
+       const aiImporterDesc* GetImporterInfo(size_t index) const;
+
+       // -------------------------------------------------------------------
+       /** Find the importer corresponding to a specific index.
+       *
+       *  @param index Index to query, must be within [0,GetImporterCount())
+       *  @return Importer instance. NULL if the index does not
+       *     exist. */
+       BaseImporter* GetImporter(size_t index) const;
+
+       // -------------------------------------------------------------------
+       /** Find the importer corresponding to a specific file extension.
+       *
+       *  This is quite similar to #IsExtensionSupported except a
+       *  BaseImporter instance is returned.
+       *  @param szExtension Extension to check for. The following formats
+       *    are recognized (BAH being the file extension): "BAH" (comparison
+       *    is case-insensitive), ".bah", "*.bah" (wild card and dot
+       *    characters at the beginning of the extension are skipped).
+       *  @return NULL if no importer is found*/
+       BaseImporter* GetImporter (const char* szExtension) const;
+
+       // -------------------------------------------------------------------
+       /** Find the importer index corresponding to a specific file extension.
+       *
+       *  @param szExtension Extension to check for. The following formats
+       *    are recognized (BAH being the file extension): "BAH" (comparison
+       *    is case-insensitive), ".bah", "*.bah" (wild card and dot
+       *    characters at the beginning of the extension are skipped).
+       *  @return (size_t)-1 if no importer is found */
+       size_t GetImporterIndex (const char* szExtension) const;
+
+
+
+
+       // -------------------------------------------------------------------
+       /** Returns the storage allocated by ASSIMP to hold the scene data
+        * in memory.
+        *
+        * This refers to the currently loaded file, see #ReadFile().
+        * @param in Data structure to be filled. 
+        * @note The returned memory statistics refer to the actual
+        *   size of the use data of the aiScene. Heap-related overhead
+        *   is (naturally) not included.*/
+       void GetMemoryRequirements(aiMemoryInfo& in) const;
+
+       // -------------------------------------------------------------------
+       /** Enables "extra verbose" mode. 
+        *
+        * 'Extra verbose' means the data structure is validated after *every*
+        * single post processing step to make sure everyone modifies the data
+        * structure in a well-defined manner. This is a debug feature and not
+        * intended for use in production environments. */
+       void SetExtraVerbose(bool bDo);
+
+
+       // -------------------------------------------------------------------
+       /** Private, do not use. */
+       ImporterPimpl* Pimpl() { return pimpl; };
+       const ImporterPimpl* Pimpl() const { return pimpl; };
+
+protected:
+
+       // Just because we don't want you to know how we're hacking around.
+       ImporterPimpl* pimpl;
+}; //! class Importer
+
+
+// ----------------------------------------------------------------------------
+// For compatibility, the interface of some functions taking a std::string was
+// changed to const char* to avoid crashes between binary incompatible STL 
+// versions. This code her is inlined,  so it shouldn't cause any problems.
+// ----------------------------------------------------------------------------
+
+// ----------------------------------------------------------------------------
+AI_FORCE_INLINE const aiScene* Importer::ReadFile( const std::string& pFile,unsigned int pFlags){
+       return ReadFile(pFile.c_str(),pFlags);
+}
+// ----------------------------------------------------------------------------
+AI_FORCE_INLINE void Importer::GetExtensionList(std::string& szOut) const      {
+       aiString s;
+       GetExtensionList(s);
+       szOut = s.data;
+}
+// ----------------------------------------------------------------------------
+AI_FORCE_INLINE bool Importer::IsExtensionSupported(const std::string& szExtension) const      {
+       return IsExtensionSupported(szExtension.c_str());
+}
+
+} // !namespace Assimp
+#endif // INCLUDED_AI_ASSIMP_HPP
diff --git a/include/assimp/LogStream.hpp b/include/assimp/LogStream.hpp
new file mode 100644 (file)
index 0000000..2d7731b
--- /dev/null
@@ -0,0 +1,96 @@
+/*
+Open Asset Import Library (assimp)
+----------------------------------------------------------------------
+
+Copyright (c) 2006-2012, assimp team
+All rights reserved.
+
+Redistribution and use of this software 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.
+
+* Neither the name of the assimp team, nor the names of its
+  contributors may be used to endorse or promote products
+  derived from this software without specific prior
+  written permission of the assimp team.
+
+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.
+
+----------------------------------------------------------------------
+*/
+
+/** @file LogStream.h
+ *  @brief Abstract base class 'LogStream', representing an output log stream.
+ */
+#ifndef INCLUDED_AI_LOGSTREAM_H
+#define INCLUDED_AI_LOGSTREAM_H
+#include "types.h"
+namespace Assimp       {
+class IOSystem;
+
+// ------------------------------------------------------------------------------------
+/** @brief CPP-API: Abstract interface for log stream implementations.
+ *
+ *  Several default implementations are provided, see #aiDefaultLogStream for more
+ *  details. Writing your own implementation of LogStream is just necessary if these
+ *  are not enough for your purpose. */
+class ASSIMP_API LogStream
+#ifndef SWIG
+       : public Intern::AllocateFromAssimpHeap
+#endif
+{
+protected:
+       /** @brief      Default constructor     */
+       LogStream() {
+       }
+public:
+       /** @brief      Virtual destructor      */
+       virtual ~LogStream() {
+       }
+
+       // -------------------------------------------------------------------
+       /** @brief      Overwrite this for your own output methods
+        *
+        *  Log messages *may* consist of multiple lines and you shouldn't
+        *  expect a consistent formatting. If you want custom formatting 
+        *  (e.g. generate HTML), supply a custom instance of Logger to
+        *  #DefaultLogger:set(). Usually you can *expect* that a log message
+        *  is exactly one line and terminated with a single \n character.
+        *  @param message Message to be written */
+       virtual void write(const char* message) = 0;
+
+       // -------------------------------------------------------------------
+       /** @brief Creates a default log stream
+        *  @param streams Type of the default stream
+        *  @param name For aiDefaultLogStream_FILE: name of the output file
+        *  @param io For aiDefaultLogStream_FILE: IOSystem to be used to open the output 
+        *   file. Pass NULL for the default implementation.
+        *  @return New LogStream instance.  */
+       static LogStream* createDefaultStream(aiDefaultLogStream stream,
+               const char* name = "AssimpLog.txt",
+               IOSystem* io = NULL);
+
+}; // !class LogStream
+// ------------------------------------------------------------------------------------
+} // Namespace Assimp
+
+#endif
diff --git a/include/assimp/Logger.hpp b/include/assimp/Logger.hpp
new file mode 100644 (file)
index 0000000..38bb117
--- /dev/null
@@ -0,0 +1,265 @@
+/*
+Open Asset Import Library (assimp)
+----------------------------------------------------------------------
+
+Copyright (c) 2006-2012, assimp team
+All rights reserved.
+
+Redistribution and use of this software 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.
+
+* Neither the name of the assimp team, nor the names of its
+  contributors may be used to endorse or promote products
+  derived from this software without specific prior
+  written permission of the assimp team.
+
+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.
+
+----------------------------------------------------------------------
+*/
+
+/** @file Logger.hpp
+ *  @brief Abstract base class 'Logger', base of the logging system. 
+ */
+#ifndef INCLUDED_AI_LOGGER_H
+#define INCLUDED_AI_LOGGER_H
+
+#include "types.h"
+namespace Assimp       {
+class LogStream;
+
+// Maximum length of a log message. Longer messages are rejected.
+#define MAX_LOG_MESSAGE_LENGTH 1024u
+
+// ----------------------------------------------------------------------------------
+/**    @brief CPP-API: Abstract interface for logger implementations.
+ *  Assimp provides a default implementation and uses it for almost all 
+ *  logging stuff ('DefaultLogger'). This class defines just basic logging
+ *  behaviour and is not of interest for you. Instead, take a look at #DefaultLogger. */
+class ASSIMP_API Logger
+#ifndef SWIG
+       : public Intern::AllocateFromAssimpHeap
+#endif
+{
+public:
+
+       // ----------------------------------------------------------------------
+       /**     @enum   LogSeverity
+        *      @brief  Log severity to describe the granularity of logging.
+        */
+       enum LogSeverity
+       {
+               NORMAL,         //!< Normal granularity of logging
+               VERBOSE         //!< Debug infos will be logged, too
+       };
+
+       // ----------------------------------------------------------------------
+       /**     @enum   ErrorSeverity
+        *      @brief  Description for severity of a log message.
+        *
+        *  Every LogStream has a bitwise combination of these flags.
+        *  A LogStream doesn't receive any messages of a specific type
+        *  if it doesn't specify the corresponding ErrorSeverity flag.
+        */
+       enum ErrorSeverity
+       {
+               Debugging       = 1,    //!< Debug log message
+               Info            = 2,    //!< Info log message
+               Warn            = 4,    //!< Warn log message
+               Err                     = 8             //!< Error log message
+       };
+
+public:
+
+       /** @brief      Virtual destructor */
+       virtual ~Logger();
+
+       // ----------------------------------------------------------------------
+       /** @brief      Writes a debug message
+        *       @param message Debug message*/
+       void debug(const char* message);
+       inline void debug(const std::string &message);
+
+       // ----------------------------------------------------------------------
+       /** @brief      Writes a info message
+        *      @param  message Info message*/
+       void info(const char* message);
+       inline void info(const std::string &message);
+
+       // ----------------------------------------------------------------------
+       /** @brief      Writes a warning message
+        *      @param  message Warn message*/
+       void warn(const char* message);
+       inline void warn(const std::string &message);
+
+       // ----------------------------------------------------------------------
+       /** @brief      Writes an error message
+        *      @param  message Error message*/
+       void error(const char* message);
+       inline void error(const std::string &message);
+
+       // ----------------------------------------------------------------------
+       /** @brief      Set a new log severity.
+        *      @param  log_severity New severity for logging*/
+       void setLogSeverity(LogSeverity log_severity);
+
+       // ----------------------------------------------------------------------
+       /** @brief Get the current log severity*/
+       LogSeverity getLogSeverity() const;
+
+       // ----------------------------------------------------------------------
+       /** @brief      Attach a new log-stream
+        *
+        *  The logger takes ownership of the stream and is responsible
+        *  for its destruction (which is done using ::delete when the logger
+        *  itself is destroyed). Call detachStream to detach a stream and to
+        *  gain ownership of it again.
+        *       @param pStream  Log-stream to attach
+        *  @param severity  Message filter, specified which types of log
+        *    messages are dispatched to the stream. Provide a bitwise
+        *    combination of the ErrorSeverity flags.
+        *  @return true if the stream has been attached, false otherwise.*/
+       virtual bool attachStream(LogStream *pStream, 
+               unsigned int severity = Debugging | Err | Warn | Info) = 0;
+
+       // ----------------------------------------------------------------------
+       /** @brief      Detach a still attached stream from the logger (or 
+        *          modify the filter flags bits)
+        *       @param pStream Log-stream instance for detaching
+        *  @param severity Provide a bitwise combination of the ErrorSeverity
+        *    flags. This value is &~ed with the current flags of the stream,
+        *    if the result is 0 the stream is detached from the Logger and
+        *    the caller retakes the possession of the stream.
+        *  @return true if the stream has been detached, false otherwise.*/
+       virtual bool detatchStream(LogStream *pStream, 
+               unsigned int severity = Debugging | Err | Warn | Info) = 0;
+
+protected:
+
+       /** Default constructor */
+       Logger();
+
+       /** Construction with a given log severity */
+       Logger(LogSeverity severity);
+
+       // ----------------------------------------------------------------------
+       /** @brief Called as a request to write a specific debug message
+        *      @param  message Debug message. Never longer than
+        *    MAX_LOG_MESSAGE_LENGTH characters (excluding the '0').
+        *  @note  The message string is only valid until the scope of
+        *    the function is left.
+        */
+       virtual void OnDebug(const char* message)= 0;
+
+       // ----------------------------------------------------------------------
+       /** @brief Called as a request to write a specific info message
+        *      @param  message Info message. Never longer than
+        *    MAX_LOG_MESSAGE_LENGTH characters (ecxluding the '0').
+        *  @note  The message string is only valid until the scope of
+        *    the function is left.
+        */
+       virtual void OnInfo(const char* message) = 0;
+
+       // ----------------------------------------------------------------------
+       /** @brief Called as a request to write a specific warn message
+        *      @param  message Warn message. Never longer than
+        *    MAX_LOG_MESSAGE_LENGTH characters (exluding the '0').
+        *  @note  The message string is only valid until the scope of
+        *    the function is left.
+        */
+       virtual void OnWarn(const char* essage) = 0;
+
+       // ----------------------------------------------------------------------
+       /** @brief Called as a request to write a specific error message
+        *      @param  message Error message. Never longer than
+        *    MAX_LOG_MESSAGE_LENGTH characters (exluding the '0').
+        *  @note  The message string is only valid until the scope of
+        *    the function is left.
+        */
+       virtual void OnError(const char* message) = 0;
+
+protected:
+
+       //!     Logger severity
+       LogSeverity m_Severity;
+};
+
+// ----------------------------------------------------------------------------------
+//     Default constructor
+inline Logger::Logger()        {
+       setLogSeverity(NORMAL);
+}
+
+// ----------------------------------------------------------------------------------
+//     Virtual destructor
+inline  Logger::~Logger()
+{
+}
+
+// ----------------------------------------------------------------------------------
+// Construction with given logging severity
+inline Logger::Logger(LogSeverity severity)    {
+       setLogSeverity(severity);
+}
+
+// ----------------------------------------------------------------------------------
+// Log severity setter
+inline void Logger::setLogSeverity(LogSeverity log_severity){
+       m_Severity = log_severity;
+}
+
+// ----------------------------------------------------------------------------------
+// Log severity getter
+inline Logger::LogSeverity Logger::getLogSeverity() const {
+       return m_Severity;
+}
+
+// ----------------------------------------------------------------------------------
+inline void Logger::debug(const std::string &message)
+{
+       return debug(message.c_str());
+}
+
+// ----------------------------------------------------------------------------------
+inline void Logger::error(const std::string &message)
+{
+       return error(message.c_str());
+}
+
+// ----------------------------------------------------------------------------------
+inline void Logger::warn(const std::string &message)
+{
+       return warn(message.c_str());
+}
+
+// ----------------------------------------------------------------------------------
+inline void Logger::info(const std::string &message)
+{
+       return info(message.c_str());
+}
+
+// ----------------------------------------------------------------------------------
+
+} // Namespace Assimp
+
+#endif // !! INCLUDED_AI_LOGGER_H
diff --git a/include/assimp/NullLogger.hpp b/include/assimp/NullLogger.hpp
new file mode 100644 (file)
index 0000000..e87584a
--- /dev/null
@@ -0,0 +1,95 @@
+/*
+Open Asset Import Library (assimp)
+----------------------------------------------------------------------
+
+Copyright (c) 2006-2012, assimp team
+All rights reserved.
+
+Redistribution and use of this software 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.
+
+* Neither the name of the assimp team, nor the names of its
+  contributors may be used to endorse or promote products
+  derived from this software without specific prior
+  written permission of the assimp team.
+
+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.
+
+----------------------------------------------------------------------
+*/
+
+/** @file  NullLogger.h
+ *  @brief Dummy logger
+*/
+
+#ifndef INCLUDED_AI_NULLLOGGER_H
+#define INCLUDED_AI_NULLLOGGER_H
+
+#include "Logger.hpp"
+namespace Assimp       {
+// ---------------------------------------------------------------------------
+/** @brief CPP-API: Empty logging implementation.
+ *
+ * Does nothing! Used by default if the application hasn't requested a 
+ * custom logger via #DefaultLogger::set() or #DefaultLogger::create(); */
+class ASSIMP_API NullLogger 
+       : public Logger {
+
+public:
+
+       /**     @brief  Logs a debug message */
+       void OnDebug(const char* message) { 
+               (void)message; //this avoids compiler warnings
+       }
+
+       /**     @brief  Logs an info message */
+       void OnInfo(const char* message) { 
+               (void)message; //this avoids compiler warnings
+       }
+
+       /**     @brief  Logs a warning message */
+       void OnWarn(const char* message) { 
+               (void)message; //this avoids compiler warnings
+       }
+       
+       /**     @brief  Logs an error message */
+       void OnError(const char* message) { 
+               (void)message; //this avoids compiler warnings
+       }
+
+       /**     @brief  Detach a still attached stream from logger */
+       bool attachStream(LogStream *pStream, unsigned int severity) {
+               (void)pStream; (void)severity; //this avoids compiler warnings
+               return false;
+       }
+
+       /**     @brief  Detach a still attached stream from logger */
+       bool detatchStream(LogStream *pStream, unsigned int severity) {
+               (void)pStream; (void)severity; //this avoids compiler warnings
+               return false;
+       }
+
+private:
+};
+}
+#endif // !! AI_NULLLOGGER_H_INCLUDED
diff --git a/include/assimp/ProgressHandler.hpp b/include/assimp/ProgressHandler.hpp
new file mode 100644 (file)
index 0000000..a6cddab
--- /dev/null
@@ -0,0 +1,96 @@
+/*
+Open Asset Import Library (assimp)
+----------------------------------------------------------------------
+
+Copyright (c) 2006-2012, assimp team
+All rights reserved.
+
+Redistribution and use of this software 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.
+
+* Neither the name of the assimp team, nor the names of its
+  contributors may be used to endorse or promote products
+  derived from this software without specific prior
+  written permission of the assimp team.
+
+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.
+
+----------------------------------------------------------------------
+*/
+
+/** @file ProgressHandler.h
+ *  @brief Abstract base class 'ProgressHandler'.
+ */
+#ifndef INCLUDED_AI_PROGRESSHANDLER_H
+#define INCLUDED_AI_PROGRESSHANDLER_H
+#include "types.h"
+namespace Assimp       {
+
+// ------------------------------------------------------------------------------------
+/** @brief CPP-API: Abstract interface for custom progress report receivers.
+ *
+ *  Each #Importer instance maintains its own #ProgressHandler. The default 
+ *  implementation provided by Assimp doesn't do anything at all. */
+class ASSIMP_API ProgressHandler
+#ifndef SWIG
+       : public Intern::AllocateFromAssimpHeap
+#endif
+{
+protected:
+       /** @brief      Default constructor     */
+       ProgressHandler () {
+       }
+public:
+       /** @brief      Virtual destructor      */
+       virtual ~ProgressHandler () {
+       }
+
+       // -------------------------------------------------------------------
+       /** @brief Progress callback.
+        *  @param percentage An estimate of the current loading progress,
+        *    in percent. Or -1.f if such an estimate is not available.
+        *
+        *  There are restriction on what you may do from within your 
+        *  implementation of this method: no exceptions may be thrown and no
+        *  non-const #Importer methods may be called. It is 
+        *  not generally possible to predict the number of callbacks 
+        *  fired during a single import.
+        *
+        *  @return Return false to abort loading at the next possible
+        *   occasion (loaders and Assimp are generally allowed to perform
+        *   all needed cleanup tasks prior to returning control to the
+        *   caller). If the loading is aborted, #Importer::ReadFile()
+        *   returns always NULL.
+        *
+        *  @note Currently, percentage is always -1.f because there is 
+        *   no reliable way to compute it.
+        *   */
+       virtual bool Update(float percentage = -1.f) = 0;
+
+
+
+}; // !class ProgressHandler 
+// ------------------------------------------------------------------------------------
+} // Namespace Assimp
+
+#endif
diff --git a/include/assimp/ai_assert.h b/include/assimp/ai_assert.h
new file mode 100644 (file)
index 0000000..f42f909
--- /dev/null
@@ -0,0 +1,14 @@
+/** @file assert.h
+ */
+#ifndef AI_DEBUG_H_INC
+#define AI_DEBUG_H_INC
+
+#ifdef ASSIMP_BUILD_DEBUG  
+#      include <assert.h>
+#      define  ai_assert(expression) assert(expression)
+#else
+#      define  ai_assert(expression)
+#endif
+
+
+#endif
diff --git a/include/assimp/anim.h b/include/assimp/anim.h
new file mode 100644 (file)
index 0000000..2ae1b60
--- /dev/null
@@ -0,0 +1,484 @@
+/*
+---------------------------------------------------------------------------
+Open Asset Import Library (assimp)
+---------------------------------------------------------------------------
+
+Copyright (c) 2006-2012, assimp team
+
+All rights reserved.
+
+Redistribution and use of this software 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.
+
+* Neither the name of the assimp team, nor the names of its
+  contributors may be used to endorse or promote products
+  derived from this software without specific prior
+  written permission of the assimp team.
+
+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.
+---------------------------------------------------------------------------
+*/
+
+/** @file anim.h
+ *  @brief Defines the data structures in which the imported animations
+ *  are returned.
+ */
+#ifndef AI_ANIM_H_INC
+#define AI_ANIM_H_INC
+
+#include "types.h"
+#include "quaternion.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+// ---------------------------------------------------------------------------
+/** A time-value pair specifying a certain 3D vector for the given time. */
+struct aiVectorKey
+{
+       /** The time of this key */
+       double mTime;     
+       
+       /** The value of this key */
+       C_STRUCT aiVector3D mValue; 
+
+#ifdef __cplusplus
+
+       //! Default constructor
+       aiVectorKey(){}
+
+       //! Construction from a given time and key value
+       aiVectorKey(double time, const aiVector3D& value)
+               :       mTime   (time)
+               ,       mValue  (value)
+       {}
+
+
+       typedef aiVector3D elem_type;
+
+       // Comparison operators. For use with std::find();
+       bool operator == (const aiVectorKey& o) const {
+               return o.mValue == this->mValue;
+       }
+       bool operator != (const aiVectorKey& o) const {
+               return o.mValue != this->mValue;
+       }
+
+       // Relational operators. For use with std::sort();
+       bool operator < (const aiVectorKey& o) const {
+               return mTime < o.mTime;
+       }
+       bool operator > (const aiVectorKey& o) const {
+               return mTime > o.mTime;
+       }
+#endif
+};
+
+// ---------------------------------------------------------------------------
+/** A time-value pair specifying a rotation for the given time. 
+ *  Rotations are expressed with quaternions. */
+struct aiQuatKey
+{
+       /** The time of this key */
+       double mTime;     
+
+       /** The value of this key */
+       C_STRUCT aiQuaternion mValue; 
+
+#ifdef __cplusplus
+       aiQuatKey(){
+       }
+
+       /** Construction from a given time and key value */
+       aiQuatKey(double time, const aiQuaternion& value)
+               :       mTime   (time)
+               ,       mValue  (value)
+       {}
+
+       typedef aiQuaternion elem_type;
+
+       // Comparison operators. For use with std::find();
+       bool operator == (const aiQuatKey& o) const {
+               return o.mValue == this->mValue;
+       }
+       bool operator != (const aiQuatKey& o) const {
+               return o.mValue != this->mValue;
+       }
+
+       // Relational operators. For use with std::sort();
+       bool operator < (const aiQuatKey& o) const {
+               return mTime < o.mTime;
+       }
+       bool operator > (const aiQuatKey& o) const {
+               return mTime > o.mTime;
+       }
+#endif
+};
+
+// ---------------------------------------------------------------------------
+/** Binds a anim mesh to a specific point in time. */
+struct aiMeshKey 
+{
+       /** The time of this key */
+       double mTime;
+
+       /** Index into the aiMesh::mAnimMeshes array of the 
+        *  mesh coresponding to the #aiMeshAnim hosting this
+        *  key frame. The referenced anim mesh is evaluated
+        *  according to the rules defined in the docs for #aiAnimMesh.*/
+       unsigned int mValue;
+
+#ifdef __cplusplus
+
+       aiMeshKey() {
+       }
+
+       /** Construction from a given time and key value */
+       aiMeshKey(double time, const unsigned int value)
+               :       mTime   (time)
+               ,       mValue  (value)
+       {}
+
+       typedef unsigned int elem_type;
+
+       // Comparison operators. For use with std::find();
+       bool operator == (const aiMeshKey& o) const {
+               return o.mValue == this->mValue;
+       }
+       bool operator != (const aiMeshKey& o) const {
+               return o.mValue != this->mValue;
+       }
+
+       // Relational operators. For use with std::sort();
+       bool operator < (const aiMeshKey& o) const {
+               return mTime < o.mTime;
+       }
+       bool operator > (const aiMeshKey& o) const {
+               return mTime > o.mTime;
+       }
+
+#endif
+};
+
+// ---------------------------------------------------------------------------
+/** Defines how an animation channel behaves outside the defined time
+ *  range. This corresponds to aiNodeAnim::mPreState and 
+ *  aiNodeAnim::mPostState.*/
+enum aiAnimBehaviour
+{
+       /** The value from the default node transformation is taken*/
+       aiAnimBehaviour_DEFAULT  = 0x0,  
+
+       /** The nearest key value is used without interpolation */
+       aiAnimBehaviour_CONSTANT = 0x1,
+
+       /** The value of the nearest two keys is linearly
+        *  extrapolated for the current time value.*/
+       aiAnimBehaviour_LINEAR   = 0x2,
+
+       /** The animation is repeated.
+        *
+        *  If the animation key go from n to m and the current
+        *  time is t, use the value at (t-n) % (|m-n|).*/
+       aiAnimBehaviour_REPEAT   = 0x3,
+
+
+
+       /** This value is not used, it is just here to force the
+        *  the compiler to map this enum to a 32 Bit integer  */
+#ifndef SWIG
+       _aiAnimBehaviour_Force32Bit = INT_MAX
+#endif
+};
+
+// ---------------------------------------------------------------------------
+/** Describes the animation of a single node. The name specifies the 
+ *  bone/node which is affected by this animation channel. The keyframes
+ *  are given in three separate series of values, one each for position, 
+ *  rotation and scaling. The transformation matrix computed from these
+ *  values replaces the node's original transformation matrix at a
+ *  specific time.
+ *  This means all keys are absolute and not relative to the bone default pose.
+ *  The order in which the transformations are applied is
+ *  - as usual - scaling, rotation, translation.
+ *
+ *  @note All keys are returned in their correct, chronological order.
+ *  Duplicate keys don't pass the validation step. Most likely there
+ *  will be no negative time values, but they are not forbidden also ( so 
+ *  implementations need to cope with them! ) */
+struct aiNodeAnim
+{
+       /** The name of the node affected by this animation. The node 
+        *  must exist and it must be unique.*/
+       C_STRUCT aiString mNodeName;
+
+       /** The number of position keys */
+       unsigned int mNumPositionKeys;
+
+       /** The position keys of this animation channel. Positions are 
+        * specified as 3D vector. The array is mNumPositionKeys in size.
+        *
+        * If there are position keys, there will also be at least one
+        * scaling and one rotation key.*/
+       C_STRUCT aiVectorKey* mPositionKeys;
+
+       /** The number of rotation keys */
+       unsigned int mNumRotationKeys;
+
+       /** The rotation keys of this animation channel. Rotations are 
+        *  given as quaternions,  which are 4D vectors. The array is 
+        *  mNumRotationKeys in size.
+        *
+        * If there are rotation keys, there will also be at least one
+        * scaling and one position key. */
+       C_STRUCT aiQuatKey* mRotationKeys;
+
+
+       /** The number of scaling keys */
+       unsigned int mNumScalingKeys;
+
+       /** The scaling keys of this animation channel. Scalings are 
+        *  specified as 3D vector. The array is mNumScalingKeys in size.
+        *
+        * If there are scaling keys, there will also be at least one
+        * position and one rotation key.*/
+       C_STRUCT aiVectorKey* mScalingKeys;
+
+
+       /** Defines how the animation behaves before the first
+        *  key is encountered.
+        *
+        *  The default value is aiAnimBehaviour_DEFAULT (the original
+        *  transformation matrix of the affected node is used).*/
+       C_ENUM aiAnimBehaviour mPreState;
+
+       /** Defines how the animation behaves after the last 
+        *  key was processed.
+        *
+        *  The default value is aiAnimBehaviour_DEFAULT (the original
+        *  transformation matrix of the affected node is taken).*/
+       C_ENUM aiAnimBehaviour mPostState;
+
+#ifdef __cplusplus
+       aiNodeAnim()
+       {
+               mNumPositionKeys = 0; mPositionKeys = NULL; 
+               mNumRotationKeys = 0; mRotationKeys = NULL; 
+               mNumScalingKeys  = 0; mScalingKeys  = NULL; 
+
+               mPreState = mPostState = aiAnimBehaviour_DEFAULT;
+       }
+
+       ~aiNodeAnim()
+       {
+               delete [] mPositionKeys;
+               delete [] mRotationKeys;
+               delete [] mScalingKeys;
+       }
+#endif // __cplusplus
+};
+
+// ---------------------------------------------------------------------------
+/** Describes vertex-based animations for a single mesh or a group of
+ *  meshes. Meshes carry the animation data for each frame in their
+ *  aiMesh::mAnimMeshes array. The purpose of aiMeshAnim is to 
+ *  define keyframes linking each mesh attachment to a particular
+ *  point in time. */
+struct aiMeshAnim
+{
+       /** Name of the mesh to be animated. An empty string is not allowed,
+        *  animated meshes need to be named (not necessarily uniquely,
+        *  the name can basically serve as wildcard to select a group
+        *  of meshes with similar animation setup)*/
+       C_STRUCT aiString mName;
+
+       /** Size of the #mKeys array. Must be 1, at least. */
+       unsigned int mNumKeys;
+
+       /** Key frames of the animation. May not be NULL. */
+       C_STRUCT aiMeshKey* mKeys;
+
+#ifdef __cplusplus
+
+       aiMeshAnim()
+               : mNumKeys()
+               , mKeys()
+       {}
+
+       ~aiMeshAnim()
+       {
+               delete[] mKeys;
+       }
+
+#endif
+};
+
+// ---------------------------------------------------------------------------
+/** An animation consists of keyframe data for a number of nodes. For 
+ *  each node affected by the animation a separate series of data is given.*/
+struct aiAnimation
+{
+       /** The name of the animation. If the modeling package this data was 
+        *  exported from does support only a single animation channel, this 
+        *  name is usually empty (length is zero). */
+       C_STRUCT aiString mName;
+
+       /** Duration of the animation in ticks.  */
+       double mDuration;
+
+       /** Ticks per second. 0 if not specified in the imported file */
+       double mTicksPerSecond;
+
+       /** The number of bone animation channels. Each channel affects
+        *  a single node. */
+       unsigned int mNumChannels;
+
+       /** The node animation channels. Each channel affects a single node. 
+        *  The array is mNumChannels in size. */
+       C_STRUCT aiNodeAnim** mChannels;
+
+
+       /** The number of mesh animation channels. Each channel affects
+        *  a single mesh and defines vertex-based animation. */
+       unsigned int mNumMeshChannels;
+
+       /** The mesh animation channels. Each channel affects a single mesh. 
+        *  The array is mNumMeshChannels in size. */
+       C_STRUCT aiMeshAnim** mMeshChannels;
+
+#ifdef __cplusplus
+       aiAnimation()
+               : mDuration(-1.)
+               , mTicksPerSecond()
+               , mNumChannels()
+               , mChannels()
+               , mNumMeshChannels()
+               , mMeshChannels()
+       {
+       }
+
+       ~aiAnimation()
+       {
+               // DO NOT REMOVE THIS ADDITIONAL CHECK
+               if (mNumChannels && mChannels)  {
+                       for( unsigned int a = 0; a < mNumChannels; a++) {
+                               delete mChannels[a];
+                       }
+
+               delete [] mChannels;
+               }
+               if (mNumMeshChannels && mMeshChannels)  {
+                       for( unsigned int a = 0; a < mNumMeshChannels; a++) {
+                               delete mMeshChannels[a];
+                       }
+
+               delete [] mMeshChannels;
+               }
+       }
+#endif // __cplusplus
+};
+
+#ifdef __cplusplus
+}
+
+
+// some C++ utilities for inter- and extrapolation
+namespace Assimp {
+
+// ---------------------------------------------------------------------------
+/** @brief CPP-API: Utility class to simplify interpolations of various data types.
+ *
+ *  The type of interpolation is choosen automatically depending on the
+ *  types of the arguments. */
+template <typename T>
+struct Interpolator            
+{      
+       // ------------------------------------------------------------------
+       /** @brief Get the result of the interpolation between a,b.
+        *
+        *  The interpolation algorithm depends on the type of the operands.
+        *  aiQuaternion's and aiQuatKey's SLERP, the rest does a simple
+        *  linear interpolation. */
+       void operator () (T& out,const T& a, const T& b, float d) const {
+               out = a + (b-a)*d;
+       }
+}; // ! Interpolator <T>
+
+//! @cond Never
+
+template <>
+struct Interpolator    <aiQuaternion>  {       
+       void operator () (aiQuaternion& out,const aiQuaternion& a, 
+               const aiQuaternion& b, float d) const
+       {
+               aiQuaternion::Interpolate(out,a,b,d);
+       }
+}; // ! Interpolator <aiQuaternion>
+
+template <>
+struct Interpolator    <unsigned int>  {       
+       void operator () (unsigned int& out,unsigned int a, 
+               unsigned int b, float d) const
+       {
+               out = d>0.5f ? b : a;
+       }
+}; // ! Interpolator <aiQuaternion>
+
+template <>
+struct Interpolator     <aiVectorKey>  {       
+       void operator () (aiVector3D& out,const aiVectorKey& a,
+               const aiVectorKey& b, float d) const    
+       {
+               Interpolator<aiVector3D> ipl;
+               ipl(out,a.mValue,b.mValue,d);
+       }
+}; // ! Interpolator <aiVectorKey>
+
+template <>
+struct Interpolator <aiQuatKey>                {
+       void operator () (aiQuaternion& out, const aiQuatKey& a,
+               const aiQuatKey& b, float d) const
+       {
+               Interpolator<aiQuaternion> ipl;
+               ipl(out,a.mValue,b.mValue,d);
+       }
+}; // ! Interpolator <aiQuatKey>
+
+template <>
+struct Interpolator <aiMeshKey>                {
+       void operator () (unsigned int& out, const aiMeshKey& a,
+               const aiMeshKey& b, float d) const
+       {
+               Interpolator<unsigned int> ipl;
+               ipl(out,a.mValue,b.mValue,d);
+       }
+}; // ! Interpolator <aiQuatKey>
+
+//! @endcond
+} //  ! end namespace Assimp
+
+
+
+#endif // __cplusplus
+#endif // AI_ANIM_H_INC
diff --git a/include/assimp/camera.h b/include/assimp/camera.h
new file mode 100644 (file)
index 0000000..78d3a9e
--- /dev/null
@@ -0,0 +1,223 @@
+/*
+---------------------------------------------------------------------------
+Open Asset Import Library (assimp)
+---------------------------------------------------------------------------
+
+Copyright (c) 2006-2012, assimp team
+
+All rights reserved.
+
+Redistribution and use of this software 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.
+
+* Neither the name of the assimp team, nor the names of its
+  contributors may be used to endorse or promote products
+  derived from this software without specific prior
+  written permission of the assimp team.
+
+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.
+---------------------------------------------------------------------------
+*/
+
+/** @file camera.h
+ *  @brief Defines the aiCamera data structure
+ */
+
+#ifndef AI_CAMERA_H_INC
+#define AI_CAMERA_H_INC
+
+#include "types.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+// ---------------------------------------------------------------------------
+/** Helper structure to describe a virtual camera. 
+ *
+ * Cameras have a representation in the node graph and can be animated.
+ * An important aspect is that the camera itself is also part of the
+ * scenegraph. This means, any values such as the look-at vector are not 
+ * *absolute*, they're <b>relative</b> to the coordinate system defined
+ * by the node which corresponds to the camera. This allows for camera
+ * animations. For static cameras parameters like the 'look-at' or 'up' vectors
+ * are usually specified directly in aiCamera, but beware, they could also
+ * be encoded in the node transformation. The following (pseudo)code sample 
+ * shows how to do it: <br><br>
+ * @code
+ * // Get the camera matrix for a camera at a specific time
+ * // if the node hierarchy for the camera does not contain
+ * // at least one animated node this is a static computation
+ * get-camera-matrix (node sceneRoot, camera cam) : matrix
+ * {
+ *    node   cnd = find-node-for-camera(cam)
+ *    matrix cmt = identity()
+ *
+ *    // as usual - get the absolute camera transformation for this frame
+ *    for each node nd in hierarchy from sceneRoot to cnd
+ *      matrix cur
+ *      if (is-animated(nd))
+ *         cur = eval-animation(nd)
+ *      else cur = nd->mTransformation;
+ *      cmt = mult-matrices( cmt, cur )
+ *    end for
+ *
+ *    // now multiply with the camera's own local transform
+ *    cam = mult-matrices (cam, get-camera-matrix(cmt) )
+ * }
+ * @endcode
+ *
+ * @note some file formats (such as 3DS, ASE) export a "target point" -
+ * the point the camera is looking at (it can even be animated). Assimp
+ * writes the target point as a subnode of the camera's main node,
+ * called "<camName>.Target". However this is just additional information
+ * then the transformation tracks of the camera main node make the
+ * camera already look in the right direction.
+ * 
+*/
+struct aiCamera
+{
+       /** The name of the camera.
+        *
+        *  There must be a node in the scenegraph with the same name.
+        *  This node specifies the position of the camera in the scene
+        *  hierarchy and can be animated.
+        */
+       C_STRUCT aiString mName;
+
+       /** Position of the camera relative to the coordinate space
+        *  defined by the corresponding node.
+        *
+        *  The default value is 0|0|0.
+        */
+       C_STRUCT aiVector3D mPosition;
+
+
+       /** 'Up' - vector of the camera coordinate system relative to
+        *  the coordinate space defined by the corresponding node.
+        *
+        *  The 'right' vector of the camera coordinate system is
+        *  the cross product of  the up and lookAt vectors.
+        *  The default value is 0|1|0. The vector
+        *  may be normalized, but it needn't.
+        */
+       C_STRUCT aiVector3D mUp;
+
+
+       /** 'LookAt' - vector of the camera coordinate system relative to
+        *  the coordinate space defined by the corresponding node.
+        *
+        *  This is the viewing direction of the user.
+        *  The default value is 0|0|1. The vector
+        *  may be normalized, but it needn't.
+        */
+       C_STRUCT aiVector3D mLookAt;
+
+
+       /** Half horizontal field of view angle, in radians. 
+        *
+        *  The field of view angle is the angle between the center
+        *  line of the screen and the left or right border.
+        *  The default value is 1/4PI.
+        */
+       float mHorizontalFOV;
+
+       /** Distance of the near clipping plane from the camera.
+        *
+        * The value may not be 0.f (for arithmetic reasons to prevent
+        * a division through zero). The default value is 0.1f.
+        */
+       float mClipPlaneNear;
+
+       /** Distance of the far clipping plane from the camera.
+        *
+        * The far clipping plane must, of course, be further away than the
+        * near clipping plane. The default value is 1000.f. The ratio
+        * between the near and the far plane should not be too
+        * large (between 1000-10000 should be ok) to avoid floating-point
+        * inaccuracies which could lead to z-fighting.
+        */
+       float mClipPlaneFar;
+
+
+       /** Screen aspect ratio.
+        *
+        * This is the ration between the width and the height of the
+        * screen. Typical values are 4/3, 1/2 or 1/1. This value is
+        * 0 if the aspect ratio is not defined in the source file.
+        * 0 is also the default value.
+        */
+       float mAspect;
+
+#ifdef __cplusplus
+
+       aiCamera()
+               : mUp                           (0.f,1.f,0.f)
+               , mLookAt                       (0.f,0.f,1.f)
+               , mHorizontalFOV        (0.25f * (float)AI_MATH_PI)
+               , mClipPlaneNear        (0.1f)
+               , mClipPlaneFar         (1000.f)
+               , mAspect                       (0.f)
+       {}
+
+       /** @brief Get a *right-handed* camera matrix from me
+        *  @param out Camera matrix to be filled
+        */
+       void GetCameraMatrix (aiMatrix4x4& out) const 
+       {
+               /** todo: test ... should work, but i'm not absolutely sure */
+
+               /** We don't know whether these vectors are already normalized ...*/
+               aiVector3D zaxis = mLookAt;     zaxis.Normalize();
+               aiVector3D yaxis = mUp;         yaxis.Normalize();
+               aiVector3D xaxis = mUp^mLookAt; xaxis.Normalize();
+
+               out.a4 = -(xaxis * mPosition);
+               out.b4 = -(yaxis * mPosition);
+               out.c4 = -(zaxis * mPosition);
+
+               out.a1 = xaxis.x;
+               out.a2 = xaxis.y;
+               out.a3 = xaxis.z;
+               
+               out.b1 = yaxis.x;
+               out.b2 = yaxis.y;
+               out.b3 = yaxis.z;
+
+               out.c1 = zaxis.x;
+               out.c2 = zaxis.y;
+               out.c3 = zaxis.z;
+
+               out.d1 = out.d2 = out.d3 = 0.f;
+               out.d4 = 1.f;
+       }
+
+#endif
+};
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // AI_CAMERA_H_INC
diff --git a/include/assimp/cexport.h b/include/assimp/cexport.h
new file mode 100644 (file)
index 0000000..9041621
--- /dev/null
@@ -0,0 +1,258 @@
+/*
+---------------------------------------------------------------------------
+Open Asset Import Library (assimp)
+---------------------------------------------------------------------------
+
+Copyright (c) 2006-2011, assimp team
+
+All rights reserved.
+
+Redistribution and use of this software 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.
+
+* Neither the name of the assimp team, nor the names of its
+contributors may be used to endorse or promote products
+derived from this software without specific prior
+written permission of the assimp team.
+
+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.
+---------------------------------------------------------------------------
+*/
+
+/** @file  cexport.h
+*  @brief Defines the C-API for the Assimp export interface
+*/
+#ifndef AI_EXPORT_H_INC
+#define AI_EXPORT_H_INC
+
+#ifndef ASSIMP_BUILD_NO_EXPORT
+
+#include "types.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+struct aiScene;  // aiScene.h
+struct aiFileIO; // aiFileIO.h
+
+// --------------------------------------------------------------------------------
+/** Describes an file format which Assimp can export to. Use #aiGetExportFormatCount() to 
+* learn how many export formats the current Assimp build supports and #aiGetExportFormatDescription()
+* to retrieve a description of an export format option.
+*/
+struct aiExportFormatDesc
+{
+       /// a short string ID to uniquely identify the export format. Use this ID string to 
+       /// specify which file format you want to export to when calling #aiExportScene().
+       /// Example: "dae" or "obj"
+       const char* id; 
+
+       /// A short description of the file format to present to users. Useful if you want
+       /// to allow the user to select an export format.
+       const char* description;
+
+       /// Recommended file extension for the exported file in lower case. 
+       const char* fileExtension;
+};
+
+
+// --------------------------------------------------------------------------------
+/** Returns the number of export file formats available in the current Assimp build.
+ * Use aiGetExportFormatDescription() to retrieve infos of a specific export format.
+ */
+ASSIMP_API size_t aiGetExportFormatCount(void);
+
+
+// --------------------------------------------------------------------------------
+/** Returns a description of the nth export file format. Use #aiGetExportFormatCount()
+ * to learn how many export formats are supported. 
+ * @param pIndex Index of the export format to retrieve information for. Valid range is
+ *    0 to #aiGetExportFormatCount()
+ * @return A description of that specific export format. NULL if pIndex is out of range.
+ */
+ASSIMP_API const C_STRUCT aiExportFormatDesc* aiGetExportFormatDescription( size_t pIndex);
+
+
+// --------------------------------------------------------------------------------
+/** Create a modifiable copy of a scene.
+ *  This is useful to import files via Assimp, change their topology and 
+ *  export them again. Since the scene returned by the various importer functions
+ *  is const, a modifiable copy is needed.
+ *  @param pIn Valid scene to be copied
+ *  @param pOut Receives a modifyable copy of the scene. Use aiFreeScene() to
+ *    delete it again.
+ */
+ASSIMP_API void aiCopyScene(const C_STRUCT aiScene* pIn, 
+       C_STRUCT aiScene** pOut);
+
+
+// --------------------------------------------------------------------------------
+/** Frees a scene copy created using aiCopyScene() */
+ASSIMP_API void aiFreeScene(const C_STRUCT aiScene* pIn);
+
+// --------------------------------------------------------------------------------
+/** Exports the given scene to a chosen file format and writes the result file(s) to disk.
+* @param pScene The scene to export. Stays in possession of the caller, is not changed by the function.
+*   The scene is expected to conform to Assimp's Importer output format as specified
+*   in the @link data Data Structures Page @endlink. In short, this means the model data
+*   should use a right-handed coordinate systems, face winding should be counter-clockwise
+*   and the UV coordinate origin is assumed to be in the upper left. If your input data
+*   uses different conventions, have a look at the last parameter.
+* @param pFormatId ID string to specify to which format you want to export to. Use 
+* aiGetExportFormatCount() / aiGetExportFormatDescription() to learn which export formats are available.
+* @param pFileName Output file to write
+* @param pIO custom IO implementation to be used. Use this if you use your own storage methods.
+*   If none is supplied, a default implementation using standard file IO is used. Note that
+*   #aiExportSceneToBlob is provided as convenience function to export to memory buffers.
+* @param pPreprocessing Accepts any choice of the #aiPostProcessing enumerated
+*   flags, but in reality only a subset of them makes sense here. Specifying
+*   'preprocessing' flags is useful if the input scene does not conform to 
+*   Assimp's default conventions as specified in the @link data Data Structures Page @endlink. 
+*   In short, this means the geometry data should use a right-handed coordinate systems, face 
+*   winding should be counter-clockwise and the UV coordinate origin is assumed to be in
+*   the upper left. The #aiProcess_MakeLeftHanded, #aiProcess_FlipUVs and 
+*   #aiProcess_FlipWindingOrder flags are used in the import side to allow users
+*   to have those defaults automatically adapted to their conventions. Specifying those flags
+*   for exporting has the opposite effect, respectively. Some other of the
+*   #aiPostProcessSteps enumerated values may be useful as well, but you'll need
+*   to try out what their effect on the exported file is. Many formats impose
+*   their own restrictions on the structure of the geometry stored therein,
+*   so some preprocessing may have little or no effect at all, or may be
+*   redundant as exporters would apply them anyhow. A good example 
+*   is triangulation - whilst you can enforce it by specifying
+*   the #aiProcess_Triangulate flag, most export formats support only
+*   triangulate data so they would run the step anyway.
+*
+*   If assimp detects that the input scene was directly taken from the importer side of 
+*   the library (i.e. not copied using aiCopyScene and potetially modified afterwards), 
+*   any postprocessing steps already applied to the scene will not be applied again, unless
+*   they show non-idempotent behaviour (#aiProcess_MakeLeftHanded, #aiProcess_FlipUVs and 
+*   #aiProcess_FlipWindingOrder).
+* @return a status code indicating the result of the export
+* @note Use aiCopyScene() to get a modifiable copy of a previously
+*   imported scene.
+*/
+ASSIMP_API aiReturn aiExportScene( const C_STRUCT aiScene* pScene, 
+       const char* pFormatId, 
+       const char* pFileName,  
+       unsigned int pPreprocessing);
+
+
+// --------------------------------------------------------------------------------
+/** Exports the given scene to a chosen file format using custom IO logic supplied by you.
+* @param pScene The scene to export. Stays in possession of the caller, is not changed by the function.
+* @param pFormatId ID string to specify to which format you want to export to. Use 
+* aiGetExportFormatCount() / aiGetExportFormatDescription() to learn which export formats are available.
+* @param pFileName Output file to write
+* @param pIO custom IO implementation to be used. Use this if you use your own storage methods.
+*   If none is supplied, a default implementation using standard file IO is used. Note that
+*   #aiExportSceneToBlob is provided as convenience function to export to memory buffers.
+* @param pPreprocessing Please see the documentation for #aiExportScene
+* @return a status code indicating the result of the export
+* @note Include <aiFileIO.h> for the definition of #aiFileIO.
+* @note Use aiCopyScene() to get a modifiable copy of a previously
+*   imported scene.
+*/
+ASSIMP_API aiReturn aiExportSceneEx( const C_STRUCT aiScene* pScene, 
+       const char* pFormatId, 
+       const char* pFileName, 
+       C_STRUCT aiFileIO* pIO,  
+       unsigned int pPreprocessing );
+
+
+// --------------------------------------------------------------------------------
+/** Describes a blob of exported scene data. Use #aiExportSceneToBlob() to create a blob containing an
+* exported scene. The memory referred by this structure is owned by Assimp. Use #aiReleaseExportedFile()
+* to free its resources. Don't try to free the memory on your side - it will crash for most build configurations
+* due to conflicting heaps.
+*
+* Blobs can be nested - each blob may reference another blob, which may in turn reference another blob and so on.
+* This is used when exporters write more than one output file for a given #aiScene. See the remarks for
+* #aiExportDataBlob::name for more information.
+*/
+struct aiExportDataBlob 
+{
+       /// Size of the data in bytes
+       size_t size;
+
+       /// The data. 
+       void* data;
+
+       /** Name of the blob. An empty string always
+           indicates the first (and primary) blob,
+           which contains the actual file data.
+        Any other blobs are auxiliary files produced
+           by exporters (i.e. material files). Existence
+           of such files depends on the file format. Most
+           formats don't split assets across multiple files.
+
+               If used, blob names usually contain the file
+               extension that should be used when writing 
+               the data to disc.
+        */
+    C_STRUCT aiString name;
+
+       /** Pointer to the next blob in the chain or NULL if there is none. */
+       C_STRUCT aiExportDataBlob * next;
+
+#ifdef __cplusplus
+       /// Default constructor
+       aiExportDataBlob() { size = 0; data = next = NULL; }
+       /// Releases the data
+       ~aiExportDataBlob() { delete [] static_cast<unsigned char*>( data ); delete next; }
+
+private:
+       // no copying
+       aiExportDataBlob(const aiExportDataBlob& );
+       aiExportDataBlob& operator= (const aiExportDataBlob& );
+#endif // __cplusplus
+};
+
+// --------------------------------------------------------------------------------
+/** Exports the given scene to a chosen file format. Returns the exported data as a binary blob which
+* you can write into a file or something. When you're done with the data, use #aiReleaseExportBlob()
+* to free the resources associated with the export. 
+* @param pScene The scene to export. Stays in possession of the caller, is not changed by the function.
+* @param pFormatId ID string to specify to which format you want to export to. Use 
+* #aiGetExportFormatCount() / #aiGetExportFormatDescription() to learn which export formats are available.
+* @param pPreprocessing Please see the documentation for #aiExportScene
+* @return the exported data or NULL in case of error
+*/
+ASSIMP_API const C_STRUCT aiExportDataBlob* aiExportSceneToBlob( const C_STRUCT aiScene* pScene, const char* pFormatId,  unsigned int pPreprocessing );
+
+
+// --------------------------------------------------------------------------------
+/** Releases the memory associated with the given exported data. Use this function to free a data blob
+* returned by aiExportScene(). 
+* @param pData the data blob returned by #aiExportSceneToBlob
+*/
+ASSIMP_API void aiReleaseExportBlob( const C_STRUCT aiExportDataBlob* pData );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // ASSIMP_BUILD_NO_EXPORT
+#endif // AI_EXPORT_H_INC
+
diff --git a/include/assimp/cfileio.h b/include/assimp/cfileio.h
new file mode 100644 (file)
index 0000000..83145e7
--- /dev/null
@@ -0,0 +1,135 @@
+/*
+---------------------------------------------------------------------------
+Open Asset Import Library (assimp)
+---------------------------------------------------------------------------
+
+Copyright (c) 2006-2012, assimp team
+
+All rights reserved.
+
+Redistribution and use of this software 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.
+
+* Neither the name of the assimp team, nor the names of its
+  contributors may be used to endorse or promote products
+  derived from this software without specific prior
+  written permission of the assimp team.
+
+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.
+---------------------------------------------------------------------------
+*/
+
+/** @file aiFileIO.h
+ *  @brief Defines generic C routines to access memory-mapped files
+ */
+#ifndef AI_FILEIO_H_INC
+#define AI_FILEIO_H_INC
+
+#include "types.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+struct aiFileIO;
+struct aiFile;
+
+// aiFile callbacks
+typedef size_t   (*aiFileWriteProc) (C_STRUCT aiFile*,   const char*, size_t, size_t);
+typedef size_t   (*aiFileReadProc)  (C_STRUCT aiFile*,   char*, size_t,size_t);
+typedef size_t   (*aiFileTellProc)  (C_STRUCT aiFile*);
+typedef void     (*aiFileFlushProc) (C_STRUCT aiFile*);
+typedef aiReturn (*aiFileSeek)(C_STRUCT aiFile*, size_t, aiOrigin);
+
+// aiFileIO callbacks
+typedef aiFile* (*aiFileOpenProc)  (C_STRUCT aiFileIO*, const char*, const char*);
+typedef void    (*aiFileCloseProc) (C_STRUCT aiFileIO*, C_STRUCT aiFile*);
+
+// Represents user-defined data
+typedef char* aiUserData;
+
+// ----------------------------------------------------------------------------------
+/** @brief C-API: File system callbacks
+ *
+ *  Provided are functions to open and close files. Supply a custom structure to
+ *  the import function. If you don't, a default implementation is used. Use custom
+ *  file systems to enable reading from other sources, such as ZIPs 
+ *  or memory locations. */
+struct aiFileIO
+{
+       /** Function used to open a new file
+        */
+       aiFileOpenProc OpenProc;
+
+       /** Function used to close an existing file
+        */
+       aiFileCloseProc CloseProc;
+
+       /** User-defined, opaque data */
+       aiUserData UserData;
+};
+
+// ----------------------------------------------------------------------------------
+/** @brief C-API: File callbacks
+ *
+ *  Actually, it's a data structure to wrap a set of fXXXX (e.g fopen) 
+ *  replacement functions.
+ *
+ *  The default implementation of the functions utilizes the fXXX functions from 
+ *  the CRT. However, you can supply a custom implementation to Assimp by
+ *  delivering a custom aiFileIO. Use this to enable reading from other sources, 
+ *  such as ZIP archives or memory locations. */
+struct aiFile
+{
+       /** Callback to read from a file */
+       aiFileReadProc ReadProc;
+
+       /** Callback to write to a file */
+       aiFileWriteProc WriteProc;
+
+       /** Callback to retrieve the current position of 
+        *  the file cursor (ftell())
+        */
+       aiFileTellProc TellProc;
+
+       /** Callback to retrieve the size of the file, 
+        *  in bytes
+        */
+       aiFileTellProc FileSizeProc;
+
+       /** Callback to set the current position
+        * of the file cursor (fseek())
+        */
+       aiFileSeek SeekProc;
+
+       /** Callback to flush the file contents
+        */
+       aiFileFlushProc FlushProc;
+
+       /** User-defined, opaque data
+        */
+       aiUserData UserData;
+};
+
+#ifdef __cplusplus
+}
+#endif
+#endif // AI_FILEIO_H_INC
diff --git a/include/assimp/cimport.h b/include/assimp/cimport.h
new file mode 100644 (file)
index 0000000..bc2c99e
--- /dev/null
@@ -0,0 +1,513 @@
+/*
+---------------------------------------------------------------------------
+Open Asset Import Library (assimp)
+---------------------------------------------------------------------------
+
+Copyright (c) 2006-2012, assimp team
+
+All rights reserved.
+
+Redistribution and use of this software 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.
+
+* Neither the name of the assimp team, nor the names of its
+  contributors may be used to endorse or promote products
+  derived from this software without specific prior
+  written permission of the assimp team.
+
+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.
+---------------------------------------------------------------------------
+*/
+
+/** @file  assimp.h
+ *  @brief Defines the C-API to the Open Asset Import Library. 
+ */
+#ifndef AI_ASSIMP_H_INC
+#define AI_ASSIMP_H_INC
+#include "types.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+struct aiScene;  // aiScene.h
+struct aiFileIO; // aiFileIO.h
+typedef void (*aiLogStreamCallback)(const char* /* message */, char* /* user */);
+
+// --------------------------------------------------------------------------------
+/** C-API: Represents a log stream. A log stream receives all log messages and
+ *  streams them _somewhere_.
+ *  @see aiGetPredefinedLogStream
+ *  @see aiAttachLogStream
+ *  @see aiDetachLogStream */
+// --------------------------------------------------------------------------------
+struct aiLogStream
+{
+       /** callback to be called */
+       aiLogStreamCallback callback;
+
+       /** user data to be passed to the callback */
+       char* user;
+};
+
+
+// --------------------------------------------------------------------------------
+/** C-API: Represents an opaque set of settings to be used during importing.
+ *  @see aiCreatePropertyStore
+ *  @see aiReleasePropertyStore
+ *  @see aiImportFileExWithProperties
+ *  @see aiSetPropertyInteger
+ *  @see aiSetPropertyFloat
+ *  @see aiSetPropertyString
+ *  @see aiSetPropertyMatrix
+ */
+// --------------------------------------------------------------------------------
+struct aiPropertyStore { char sentinel; };
+
+/** Our own C boolean type */
+typedef int aiBool;
+
+#define AI_FALSE 0
+#define AI_TRUE 1
+
+// --------------------------------------------------------------------------------
+/** Reads the given file and returns its content.
+ * 
+ * If the call succeeds, the imported data is returned in an aiScene structure. 
+ * The data is intended to be read-only, it stays property of the ASSIMP 
+ * library and will be stable until aiReleaseImport() is called. After you're 
+ * done with it, call aiReleaseImport() to free the resources associated with 
+ * this file. If the import fails, NULL is returned instead. Call 
+ * aiGetErrorString() to retrieve a human-readable error text.
+ * @param pFile Path and filename of the file to be imported, 
+ *   expected to be a null-terminated c-string. NULL is not a valid value.
+ * @param pFlags Optional post processing steps to be executed after 
+ *   a successful import. Provide a bitwise combination of the 
+ *   #aiPostProcessSteps flags.
+ * @return Pointer to the imported data or NULL if the import failed. 
+ */
+ASSIMP_API const C_STRUCT aiScene* aiImportFile( 
+       const char* pFile, 
+       unsigned int pFlags);
+
+// --------------------------------------------------------------------------------
+/** Reads the given file using user-defined I/O functions and returns 
+ *   its content.
+ * 
+ * If the call succeeds, the imported data is returned in an aiScene structure. 
+ * The data is intended to be read-only, it stays property of the ASSIMP 
+ * library and will be stable until aiReleaseImport() is called. After you're 
+ * done with it, call aiReleaseImport() to free the resources associated with 
+ * this file. If the import fails, NULL is returned instead. Call 
+ * aiGetErrorString() to retrieve a human-readable error text.
+ * @param pFile Path and filename of the file to be imported, 
+ *   expected to be a null-terminated c-string. NULL is not a valid value.
+ * @param pFlags Optional post processing steps to be executed after 
+ *   a successful import. Provide a bitwise combination of the
+ *   #aiPostProcessSteps flags.
+ * @param pFS aiFileIO structure. Will be used to open the model file itself
+ *   and any other files the loader needs to open.  Pass NULL to use the default
+ *   implementation.
+ * @return Pointer to the imported data or NULL if the import failed.  
+ * @note Include <aiFileIO.h> for the definition of #aiFileIO.
+ */
+ASSIMP_API const C_STRUCT aiScene* aiImportFileEx( 
+       const char* pFile,
+       unsigned int pFlags,
+       C_STRUCT aiFileIO* pFS);
+
+// --------------------------------------------------------------------------------
+/** Same as #aiImportFileEx, but adds an extra parameter containing importer settings.
+ *
+ * @param pProps #aiPropertyStore instance containing import settings. 
+ * @see aiImportFileEx
+ */
+ASSIMP_API const C_STRUCT aiScene* aiImportFileExWithProperties( 
+       const char* pFile,
+       unsigned int pFlags,
+       C_STRUCT aiFileIO* pFS,
+       const C_STRUCT aiPropertyStore* pProps);
+
+// --------------------------------------------------------------------------------
+/** Reads the given file from a given memory buffer,
+ * 
+ * If the call succeeds, the contents of the file are returned as a pointer to an
+ * aiScene object. The returned data is intended to be read-only, the importer keeps 
+ * ownership of the data and will destroy it upon destruction. If the import fails, 
+ * NULL is returned.
+ * A human-readable error description can be retrieved by calling aiGetErrorString(). 
+ * @param pBuffer Pointer to the file data
+ * @param pLength Length of pBuffer, in bytes
+ * @param pFlags Optional post processing steps to be executed after 
+ *   a successful import. Provide a bitwise combination of the 
+ *   #aiPostProcessSteps flags. If you wish to inspect the imported
+ *   scene first in order to fine-tune your post-processing setup,
+ *   consider to use #aiApplyPostProcessing().
+ * @param pHint An additional hint to the library. If this is a non empty string,
+ *   the library looks for a loader to support the file extension specified by pHint
+ *   and passes the file to the first matching loader. If this loader is unable to 
+ *   completely the request, the library continues and tries to determine the file
+ *   format on its own, a task that may or may not be successful. 
+ *   Check the return value, and you'll know ...
+ * @return A pointer to the imported data, NULL if the import failed.
+ *
+ * @note This is a straightforward way to decode models from memory
+ * buffers, but it doesn't handle model formats that spread their 
+ * data across multiple files or even directories. Examples include
+ * OBJ or MD3, which outsource parts of their material info into
+ * external scripts. If you need full functionality, provide
+ * a custom IOSystem to make Assimp find these files and use
+ * the regular aiImportFileEx()/aiImportFileExWithProperties() API.
+ */
+ASSIMP_API const C_STRUCT aiScene* aiImportFileFromMemory( 
+       const char* pBuffer,
+       unsigned int pLength,
+       unsigned int pFlags,
+       const char* pHint);
+
+// --------------------------------------------------------------------------------
+/** Same as #aiImportFileFromMemory, but adds an extra parameter containing importer settings.
+ *
+ * @param pProps #aiPropertyStore instance containing import settings. 
+ * @see aiImportFileFromMemory
+ */
+ASSIMP_API const C_STRUCT aiScene* aiImportFileFromMemoryWithProperties( 
+       const char* pBuffer,
+       unsigned int pLength,
+       unsigned int pFlags,
+       const char* pHint,
+       const C_STRUCT aiPropertyStore* pProps);
+
+// --------------------------------------------------------------------------------
+/** Apply post-processing to an already-imported scene.
+ *
+ * This is strictly equivalent to calling #aiImportFile()/#aiImportFileEx with the
+ * same flags. However, you can use this separate function to inspect the imported 
+ * scene first to fine-tune your post-processing setup. 
+ * @param pScene Scene to work on.
+ * @param pFlags Provide a bitwise combination of the #aiPostProcessSteps flags.
+ * @return A pointer to the post-processed data. Post processing is done in-place,
+ *   meaning this is still the same #aiScene which you passed for pScene. However,
+ *   _if_ post-processing failed, the scene could now be NULL. That's quite a rare
+ *   case, post processing steps are not really designed to 'fail'. To be exact, 
+ *   the #aiProcess_ValidateDS flag is currently the only post processing step 
+ *   which can actually cause the scene to be reset to NULL.
+ */
+ASSIMP_API const C_STRUCT aiScene* aiApplyPostProcessing(
+       const C_STRUCT aiScene* pScene,
+       unsigned int pFlags);
+
+// --------------------------------------------------------------------------------
+/** Get one of the predefine log streams. This is the quick'n'easy solution to 
+ *  access Assimp's log system. Attaching a log stream can slightly reduce Assimp's
+ *  overall import performance. 
+ *
+ *  Usage is rather simple (this will stream the log to a file, named log.txt, and
+ *  the stdout stream of the process:
+ *  @code
+ *    struct aiLogStream c;
+ *    c = aiGetPredefinedLogStream(aiDefaultLogStream_FILE,"log.txt");
+ *    aiAttachLogStream(&c);
+ *    c = aiGetPredefinedLogStream(aiDefaultLogStream_STDOUT,NULL);
+ *    aiAttachLogStream(&c);
+ *  @endcode
+ *
+ *  @param pStreams One of the #aiDefaultLogStream enumerated values. 
+ *  @param file Solely for the #aiDefaultLogStream_FILE flag: specifies the file to write to.
+ *    Pass NULL for all other flags.
+ *  @return The log stream. callback is set to NULL if something went wrong.
+ */
+ASSIMP_API C_STRUCT aiLogStream aiGetPredefinedLogStream(
+       C_ENUM aiDefaultLogStream pStreams,
+       const char* file);
+
+// --------------------------------------------------------------------------------
+/** Attach a custom log stream to the libraries' logging system.
+ *
+ *  Attaching a log stream can slightly reduce Assimp's overall import
+ *  performance. Multiple log-streams can be attached. 
+ *  @param stream Describes the new log stream.
+ *  @note To ensure proepr destruction of the logging system, you need to manually
+ *    call aiDetachLogStream() on every single log stream you attach. 
+ *    Alternatively (for the lazy folks) #aiDetachAllLogStreams is provided.
+ */
+ASSIMP_API void aiAttachLogStream(
+       const C_STRUCT aiLogStream* stream);
+
+// --------------------------------------------------------------------------------
+/** Enable verbose logging. Verbose logging includes debug-related stuff and
+ *  detailed import statistics. This can have severe impact on import performance
+ *  and memory consumption. However, it might be useful to find out why a file
+ *  didn't read correctly.
+ *  @param d AI_TRUE or AI_FALSE, your decision.
+ */
+ASSIMP_API void aiEnableVerboseLogging(aiBool d);
+
+// --------------------------------------------------------------------------------
+/** Detach a custom log stream from the libraries' logging system.
+ *
+ *  This is the counterpart of #aiAttachPredefinedLogStream. If you attached a stream,
+ *  don't forget to detach it again.
+ *  @param stream The log stream to be detached.
+ *  @return AI_SUCCESS if the log stream has been detached successfully.
+ *  @see aiDetachAllLogStreams
+ */
+ASSIMP_API C_ENUM aiReturn aiDetachLogStream(
+       const C_STRUCT aiLogStream* stream);
+
+// --------------------------------------------------------------------------------
+/** Detach all active log streams from the libraries' logging system.
+ *  This ensures that the logging system is terminated properly and all
+ *  resources allocated by it are actually freed. If you attached a stream,
+ *  don't forget to detach it again.
+ *  @see aiAttachLogStream
+ *  @see aiDetachLogStream
+ */
+ASSIMP_API void aiDetachAllLogStreams(void);
+
+// --------------------------------------------------------------------------------
+/** Releases all resources associated with the given import process.
+ *
+ * Call this function after you're done with the imported data.
+ * @param pScene The imported data to release. NULL is a valid value.
+ */
+ASSIMP_API void aiReleaseImport( 
+       const C_STRUCT aiScene* pScene);
+
+// --------------------------------------------------------------------------------
+/** Returns the error text of the last failed import process. 
+ *
+ * @return A textual description of the error that occurred at the last
+ * import process. NULL if there was no error. There can't be an error if you
+ * got a non-NULL #aiScene from #aiImportFile/#aiImportFileEx/#aiApplyPostProcessing.
+ */
+ASSIMP_API const char* aiGetErrorString();
+
+// --------------------------------------------------------------------------------
+/** Returns whether a given file extension is supported by ASSIMP
+ *
+ * @param szExtension Extension for which the function queries support for.
+ * Must include a leading dot '.'. Example: ".3ds", ".md3"
+ * @return AI_TRUE if the file extension is supported.
+ */
+ASSIMP_API aiBool aiIsExtensionSupported(
+       const char* szExtension);
+
+// --------------------------------------------------------------------------------
+/** Get a list of all file extensions supported by ASSIMP.
+ *
+ * If a file extension is contained in the list this does, of course, not
+ * mean that ASSIMP is able to load all files with this extension.
+ * @param szOut String to receive the extension list.
+ * Format of the list: "*.3ds;*.obj;*.dae". NULL is not a valid parameter.
+ */
+ASSIMP_API void aiGetExtensionList(
+       C_STRUCT aiString* szOut);
+
+// --------------------------------------------------------------------------------
+/** Get the approximated storage required by an imported asset
+ * @param pIn Input asset.
+ * @param in Data structure to be filled. 
+ */
+ASSIMP_API void aiGetMemoryRequirements(
+       const C_STRUCT aiScene* pIn,
+       C_STRUCT aiMemoryInfo* in);
+
+
+
+// --------------------------------------------------------------------------------
+/** Create an empty property store. Property stores are used to collect import
+ *  settings.
+ * @return New property store. Property stores need to be manually destroyed using
+ *   the #aiReleasePropertyStore API function.
+ */
+ASSIMP_API C_STRUCT aiPropertyStore* aiCreatePropertyStore(void);
+
+// --------------------------------------------------------------------------------
+/** Delete a property store.
+ * @param p Property store to be deleted.
+ */
+ASSIMP_API void aiReleasePropertyStore(C_STRUCT aiPropertyStore* p);
+
+// --------------------------------------------------------------------------------
+/** Set an integer property. 
+ *
+ *  This is the C-version of #Assimp::Importer::SetPropertyInteger(). In the C 
+ *  interface, properties are always shared by all imports. It is not possible to 
+ *  specify them per import.
+ *
+ * @param szName Name of the configuration property to be set. All supported 
+ *   public properties are defined in the config.h header file (#AI_CONFIG_XXX).
+ * @param value New value for the property
+ */
+ASSIMP_API void aiSetImportPropertyInteger(
+       C_STRUCT aiPropertyStore* store,
+       const char* szName, 
+       int value);
+
+// --------------------------------------------------------------------------------
+/** Set a floating-point property. 
+ *
+ *  This is the C-version of #Assimp::Importer::SetPropertyFloat(). In the C 
+ *  interface, properties are always shared by all imports. It is not possible to 
+ *  specify them per import.
+ *
+ * @param szName Name of the configuration property to be set. All supported 
+ *   public properties are defined in the config.h header file (#AI_CONFIG_XXX).
+ * @param value New value for the property
+ */
+ASSIMP_API void aiSetImportPropertyFloat(
+       C_STRUCT aiPropertyStore* store,
+       const char* szName,
+       float value);
+
+// --------------------------------------------------------------------------------
+/** Set a string property. 
+ *
+ *  This is the C-version of #Assimp::Importer::SetPropertyString(). In the C 
+ *  interface, properties are always shared by all imports. It is not possible to 
+ *  specify them per import.
+ *
+ * @param property store to modify. Use #aiCreatePropertyStore to obtain a store.
+ * @param szName Name of the configuration property to be set. All supported 
+ *   public properties are defined in the config.h header file (#AI_CONFIG_XXX).
+ * @param value New value for the property
+ */
+ASSIMP_API void aiSetImportPropertyString(
+       C_STRUCT aiPropertyStore* store,
+       const char* szName,
+       const C_STRUCT aiString* st);
+
+// --------------------------------------------------------------------------------
+/** Set a matrix property. 
+ *
+ *  This is the C-version of #Assimp::Importer::SetPropertyMatrix(). In the C 
+ *  interface, properties are always shared by all imports. It is not possible to 
+ *  specify them per import.
+ *
+ * @param property store to modify. Use #aiCreatePropertyStore to obtain a store.
+ * @param szName Name of the configuration property to be set. All supported 
+ *   public properties are defined in the config.h header file (#AI_CONFIG_XXX).
+ * @param value New value for the property
+ */
+ASSIMP_API void aiSetImportPropertyMatrix(
+       C_STRUCT aiPropertyStore* store,
+       const char* szName,
+       const C_STRUCT aiMatrix4x4* mat);
+
+// --------------------------------------------------------------------------------
+/** Construct a quaternion from a 3x3 rotation matrix.
+ *  @param quat Receives the output quaternion.
+ *  @param mat Matrix to 'quaternionize'.
+ *  @see aiQuaternion(const aiMatrix3x3& pRotMatrix)
+ */
+ASSIMP_API void aiCreateQuaternionFromMatrix(
+       C_STRUCT aiQuaternion* quat,
+       const C_STRUCT aiMatrix3x3* mat);
+
+// --------------------------------------------------------------------------------
+/** Decompose a transformation matrix into its rotational, translational and
+ *  scaling components.
+ * 
+ * @param mat Matrix to decompose
+ * @param scaling Receives the scaling component
+ * @param rotation Receives the rotational component
+ * @param position Receives the translational component.
+ * @see aiMatrix4x4::Decompose (aiVector3D&, aiQuaternion&, aiVector3D&) const;
+ */
+ASSIMP_API void aiDecomposeMatrix(
+       const C_STRUCT aiMatrix4x4* mat,
+       C_STRUCT aiVector3D* scaling, 
+       C_STRUCT aiQuaternion* rotation,
+       C_STRUCT aiVector3D* position);
+
+// --------------------------------------------------------------------------------
+/** Transpose a 4x4 matrix.
+ *  @param mat Pointer to the matrix to be transposed
+ */
+ASSIMP_API void aiTransposeMatrix4(
+       C_STRUCT aiMatrix4x4* mat);
+
+// --------------------------------------------------------------------------------
+/** Transpose a 3x3 matrix.
+ *  @param mat Pointer to the matrix to be transposed
+ */
+ASSIMP_API void aiTransposeMatrix3(
+       C_STRUCT aiMatrix3x3* mat);
+
+// --------------------------------------------------------------------------------
+/** Transform a vector by a 3x3 matrix
+ *  @param vec Vector to be transformed.
+ *  @param mat Matrix to transform the vector with.
+ */
+ASSIMP_API void aiTransformVecByMatrix3(
+       C_STRUCT aiVector3D* vec, 
+       const C_STRUCT aiMatrix3x3* mat);
+
+// --------------------------------------------------------------------------------
+/** Transform a vector by a 4x4 matrix
+ *  @param vec Vector to be transformed.
+ *  @param mat Matrix to transform the vector with.
+ */
+ASSIMP_API void aiTransformVecByMatrix4(
+       C_STRUCT aiVector3D* vec, 
+       const C_STRUCT aiMatrix4x4* mat);
+
+// --------------------------------------------------------------------------------
+/** Multiply two 4x4 matrices.
+ *  @param dst First factor, receives result.
+ *  @param src Matrix to be multiplied with 'dst'.
+ */
+ASSIMP_API void aiMultiplyMatrix4(
+       C_STRUCT aiMatrix4x4* dst, 
+       const C_STRUCT aiMatrix4x4* src);
+
+// --------------------------------------------------------------------------------
+/** Multiply two 3x3 matrices.
+ *  @param dst First factor, receives result.
+ *  @param src Matrix to be multiplied with 'dst'.
+ */
+ASSIMP_API void aiMultiplyMatrix3(
+       C_STRUCT aiMatrix3x3* dst, 
+       const C_STRUCT aiMatrix3x3* src);
+
+// --------------------------------------------------------------------------------
+/** Get a 3x3 identity matrix.
+ *  @param mat Matrix to receive its personal identity
+ */
+ASSIMP_API void aiIdentityMatrix3(
+       C_STRUCT aiMatrix3x3* mat);
+
+// --------------------------------------------------------------------------------
+/** Get a 4x4 identity matrix.
+ *  @param mat Matrix to receive its personal identity
+ */
+ASSIMP_API void aiIdentityMatrix4(
+       C_STRUCT aiMatrix4x4* mat);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // AI_ASSIMP_H_INC
diff --git a/include/assimp/color4.h b/include/assimp/color4.h
new file mode 100644 (file)
index 0000000..52c3c7e
--- /dev/null
@@ -0,0 +1,104 @@
+/*
+---------------------------------------------------------------------------
+Open Asset Import Library (assimp)
+---------------------------------------------------------------------------
+
+Copyright (c) 2006-2012, assimp team
+
+All rights reserved.
+
+Redistribution and use of this software 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.
+
+* Neither the name of the assimp team, nor the names of its
+  contributors may be used to endorse or promote products
+  derived from this software without specific prior
+  written permission of the assimp team.
+
+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.
+---------------------------------------------------------------------------
+*/
+/** @file aiColor4D.h
+ *  @brief RGBA color structure, including operators when compiling in C++
+ */
+#ifndef AI_COLOR4D_H_INC
+#define AI_COLOR4D_H_INC
+
+#include "./Compiler/pushpack1.h"
+
+#ifdef __cplusplus
+
+// ----------------------------------------------------------------------------------
+/** Represents a color in Red-Green-Blue space including an 
+*   alpha component. Color values range from 0 to 1. */
+// ----------------------------------------------------------------------------------
+template <typename TReal>
+class aiColor4t
+{
+public:
+       aiColor4t () : r(), g(), b(), a() {}
+       aiColor4t (TReal _r, TReal _g, TReal _b, TReal _a) 
+               : r(_r), g(_g), b(_b), a(_a) {}
+       aiColor4t (TReal _r) : r(_r), g(_r), b(_r), a(_r) {}
+       aiColor4t (const aiColor4t& o) 
+               : r(o.r), g(o.g), b(o.b), a(o.a) {}
+
+public:
+       // combined operators
+       const aiColor4t& operator += (const aiColor4t& o);
+       const aiColor4t& operator -= (const aiColor4t& o);
+       const aiColor4t& operator *= (TReal f);
+       const aiColor4t& operator /= (TReal f);
+
+public:
+       // comparison
+       bool operator == (const aiColor4t& other) const;
+       bool operator != (const aiColor4t& other) const;
+       bool operator <  (const aiColor4t& other) const;
+
+       // color tuple access, rgba order
+       inline TReal operator[](unsigned int i) const;
+       inline TReal& operator[](unsigned int i);
+
+       /** check whether a color is (close to) black */
+       inline bool IsBlack() const;
+
+public:
+
+       // Red, green, blue and alpha color values 
+       TReal r, g, b, a;
+} PACK_STRUCT;  // !struct aiColor4D
+
+typedef aiColor4t<float> aiColor4D;
+
+#else
+
+struct aiColor4D {
+       float r, g, b, a;
+} PACK_STRUCT;
+
+#endif // __cplusplus
+
+#include "./Compiler/poppack1.h"
+
+#endif // AI_COLOR4D_H_INC
diff --git a/include/assimp/color4.inl b/include/assimp/color4.inl
new file mode 100644 (file)
index 0000000..9a92e14
--- /dev/null
@@ -0,0 +1,182 @@
+/*
+---------------------------------------------------------------------------
+Open Asset Import Library (assimp)
+---------------------------------------------------------------------------
+
+Copyright (c) 2006-2012, assimp team
+
+All rights reserved.
+
+Redistribution and use of this software 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.
+
+* Neither the name of the assimp team, nor the names of its
+  contributors may be used to endorse or promote products
+  derived from this software without specific prior
+  written permission of the assimp team.
+
+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.
+---------------------------------------------------------------------------
+*/
+
+/** @file  aiColor4D.inl
+ *  @brief Inline implementation of aiColor4t<TReal> operators
+ */
+#ifndef AI_COLOR4D_INL_INC
+#define AI_COLOR4D_INL_INC
+
+#ifdef __cplusplus
+#include "color4.h"
+
+// ------------------------------------------------------------------------------------------------
+template <typename TReal>
+AI_FORCE_INLINE const aiColor4t<TReal>& aiColor4t<TReal>::operator += (const aiColor4t<TReal>& o) {
+       r += o.r; g += o.g; b += o.b; a += o.a; 
+       return *this; 
+}
+// ------------------------------------------------------------------------------------------------
+template <typename TReal>
+AI_FORCE_INLINE const aiColor4t<TReal>& aiColor4t<TReal>::operator -= (const aiColor4t<TReal>& o) {
+       r -= o.r; g -= o.g; b -= o.b; a -= o.a; 
+       return *this;
+}
+// ------------------------------------------------------------------------------------------------
+template <typename TReal>
+AI_FORCE_INLINE const aiColor4t<TReal>& aiColor4t<TReal>::operator *= (TReal f) {
+       r *= f; g *= f; b *= f; a *= f; 
+       return *this; 
+}
+// ------------------------------------------------------------------------------------------------
+template <typename TReal>
+AI_FORCE_INLINE const aiColor4t<TReal>& aiColor4t<TReal>::operator /= (TReal f) {
+       r /= f; g /= f; b /= f; a /= f; 
+       return *this; 
+}
+// ------------------------------------------------------------------------------------------------
+template <typename TReal>
+AI_FORCE_INLINE TReal aiColor4t<TReal>::operator[](unsigned int i) const {
+       return *(&r + i);
+}
+// ------------------------------------------------------------------------------------------------
+template <typename TReal>
+AI_FORCE_INLINE TReal& aiColor4t<TReal>::operator[](unsigned int i) {
+       return *(&r + i);
+}
+// ------------------------------------------------------------------------------------------------
+template <typename TReal>
+AI_FORCE_INLINE bool aiColor4t<TReal>::operator== (const aiColor4t<TReal>& other) const {
+       return r == other.r && g == other.g && b == other.b && a == other.a;
+}
+// ------------------------------------------------------------------------------------------------
+template <typename TReal>
+AI_FORCE_INLINE bool aiColor4t<TReal>::operator!= (const aiColor4t<TReal>& other) const {
+       return r != other.r || g != other.g || b != other.b || a != other.a;
+}
+// ------------------------------------------------------------------------------------------------
+template <typename TReal>
+AI_FORCE_INLINE bool aiColor4t<TReal>::operator< (const aiColor4t<TReal>& other) const {
+       return r < other.r || (
+               r == other.r && (
+                       g < other.g || (
+                               g == other.g && (
+                                       b < other.b || (
+                                               b == other.b && (
+                                                       a < other.a
+                                               )
+                                       )
+                               )
+                       )
+               )
+       );
+}
+// ------------------------------------------------------------------------------------------------
+template <typename TReal>
+AI_FORCE_INLINE aiColor4t<TReal> operator + (const aiColor4t<TReal>& v1, const aiColor4t<TReal>& v2)   {
+       return aiColor4t<TReal>( v1.r + v2.r, v1.g + v2.g, v1.b + v2.b, v1.a + v2.a);
+}
+// ------------------------------------------------------------------------------------------------
+template <typename TReal>
+AI_FORCE_INLINE aiColor4t<TReal> operator - (const aiColor4t<TReal>& v1, const aiColor4t<TReal>& v2)   {
+       return aiColor4t<TReal>( v1.r - v2.r, v1.g - v2.g, v1.b - v2.b, v1.a - v2.a);
+}
+// ------------------------------------------------------------------------------------------------
+template <typename TReal>
+AI_FORCE_INLINE aiColor4t<TReal> operator * (const aiColor4t<TReal>& v1, const aiColor4t<TReal>& v2)   {
+       return aiColor4t<TReal>( v1.r * v2.r, v1.g * v2.g, v1.b * v2.b, v1.a * v2.a);
+}
+// ------------------------------------------------------------------------------------------------
+template <typename TReal>
+AI_FORCE_INLINE aiColor4t<TReal> operator / (const aiColor4t<TReal>& v1, const aiColor4t<TReal>& v2)   {
+       return aiColor4t<TReal>( v1.r / v2.r, v1.g / v2.g, v1.b / v2.b, v1.a / v2.a);
+}
+// ------------------------------------------------------------------------------------------------
+template <typename TReal>
+AI_FORCE_INLINE aiColor4t<TReal> operator * ( TReal f, const aiColor4t<TReal>& v)      {
+       return aiColor4t<TReal>( f*v.r, f*v.g, f*v.b, f*v.a);
+}
+// ------------------------------------------------------------------------------------------------
+template <typename TReal>
+AI_FORCE_INLINE  aiColor4t<TReal> operator * ( const aiColor4t<TReal>& v, TReal f)     {
+       return aiColor4t<TReal>( f*v.r, f*v.g, f*v.b, f*v.a);
+}
+// ------------------------------------------------------------------------------------------------
+template <typename TReal>
+AI_FORCE_INLINE  aiColor4t<TReal> operator / ( const aiColor4t<TReal>& v, TReal f)     {
+       return v * (1/f);
+}
+// ------------------------------------------------------------------------------------------------
+template <typename TReal>
+AI_FORCE_INLINE  aiColor4t<TReal> operator / ( TReal f,const aiColor4t<TReal>& v)      {
+       return aiColor4t<TReal>(f,f,f,f)/v;
+}
+// ------------------------------------------------------------------------------------------------
+template <typename TReal>
+AI_FORCE_INLINE  aiColor4t<TReal> operator + ( const aiColor4t<TReal>& v, TReal f)     {
+       return aiColor4t<TReal>( f+v.r, f+v.g, f+v.b, f+v.a);
+}
+// ------------------------------------------------------------------------------------------------
+template <typename TReal>
+AI_FORCE_INLINE  aiColor4t<TReal> operator - ( const aiColor4t<TReal>& v, TReal f)     {
+       return aiColor4t<TReal>( v.r-f, v.g-f, v.b-f, v.a-f);
+}
+// ------------------------------------------------------------------------------------------------
+template <typename TReal>
+AI_FORCE_INLINE  aiColor4t<TReal> operator + ( TReal f, const aiColor4t<TReal>& v)     {
+       return aiColor4t<TReal>( f+v.r, f+v.g, f+v.b, f+v.a);
+}
+// ------------------------------------------------------------------------------------------------
+template <typename TReal>
+AI_FORCE_INLINE  aiColor4t<TReal> operator - ( TReal f, const aiColor4t<TReal>& v)     {
+       return aiColor4t<TReal>( f-v.r, f-v.g, f-v.b, f-v.a);
+}
+
+// ------------------------------------------------------------------------------------------------
+template <typename TReal>
+inline bool aiColor4t<TReal> :: IsBlack() const        {
+       // The alpha component doesn't care here. black is black.
+       static const TReal epsilon = 10e-3f;
+       return fabs( r ) < epsilon && fabs( g ) < epsilon && fabs( b ) < epsilon;
+}
+
+#endif // __cplusplus
+#endif // AI_VECTOR3D_INL_INC
diff --git a/include/assimp/config.h b/include/assimp/config.h
new file mode 100644 (file)
index 0000000..941f3c1
--- /dev/null
@@ -0,0 +1,873 @@
+/*
+---------------------------------------------------------------------------
+Open Asset Import Library (assimp)
+---------------------------------------------------------------------------
+
+Copyright (c) 2006-2012, assimp team
+
+All rights reserved.
+
+Redistribution and use of this software 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.
+
+* Neither the name of the assimp team, nor the names of its
+  contributors may be used to endorse or promote products
+  derived from this software without specific prior
+  written permission of the assimp team.
+
+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.
+---------------------------------------------------------------------------
+*/
+
+/** @file config.h
+ *  @brief Defines constants for configurable properties for the library
+ *
+ *  Typically these properties are set via 
+ *  #Assimp::Importer::SetPropertyFloat,
+ *  #Assimp::Importer::SetPropertyInteger or
+ *  #Assimp::Importer::SetPropertyString, 
+ *  depending on the data type of a property. All properties have a 
+ *  default value. See the doc for the mentioned methods for more details.
+ *
+ *  <br><br>
+ *  The corresponding functions for use with the plain-c API are:
+ *  #aiSetImportPropertyInteger,
+ *  #aiSetImportPropertyFloat,
+ *  #aiSetImportPropertyString
+ */
+#ifndef INCLUDED_AI_CONFIG_H
+#define INCLUDED_AI_CONFIG_H
+
+
+// ###########################################################################
+// LIBRARY SETTINGS
+// General, global settings
+// ###########################################################################
+
+// ---------------------------------------------------------------------------
+/** @brief Enables time measurements.
+ *
+ *  If enabled, measures the time needed for each part of the loading
+ *  process (i.e. IO time, importing, postprocessing, ..) and dumps
+ *  these timings to the DefaultLogger. See the @link perf Performance
+ *  Page@endlink for more information on this topic.
+ * 
+ * Property type: bool. Default value: false.
+ */
+#define AI_CONFIG_GLOB_MEASURE_TIME  \
+       "GLOB_MEASURE_TIME"
+
+
+// ---------------------------------------------------------------------------
+/** @brief Global setting to disable generation of skeleton dummy meshes
+ *
+ * Skeleton dummy meshes are generated as a visualization aid in cases which
+ * the input data contains no geometry, but only animation data.
+ * Property data type: bool. Default value: false
+ */
+// ---------------------------------------------------------------------------
+#define AI_CONFIG_IMPORT_NO_SKELETON_MESHES \
+       "IMPORT_NO_SKELETON_MESHES"
+
+
+
+# if 0 // not implemented yet
+// ---------------------------------------------------------------------------
+/** @brief Set Assimp's multithreading policy.
+ *
+ * This setting is ignored if Assimp was built without boost.thread
+ * support (ASSIMP_BUILD_NO_THREADING, which is implied by ASSIMP_BUILD_BOOST_WORKAROUND).
+ * Possible values are: -1 to let Assimp decide what to do, 0 to disable
+ * multithreading entirely and any number larger than 0 to force a specific
+ * number of threads. Assimp is always free to ignore this settings, which is
+ * merely a hint. Usually, the default value (-1) will be fine. However, if
+ * Assimp is used concurrently from multiple user threads, it might be useful
+ * to limit each Importer instance to a specific number of cores.
+ *
+ * For more information, see the @link threading Threading page@endlink.
+ * Property type: int, default value: -1.
+ */
+#define AI_CONFIG_GLOB_MULTITHREADING  \
+       "GLOB_MULTITHREADING"
+#endif
+
+// ###########################################################################
+// POST PROCESSING SETTINGS
+// Various stuff to fine-tune the behavior of a specific post processing step.
+// ###########################################################################
+
+
+// ---------------------------------------------------------------------------
+/** @brief Maximum bone count per mesh for the SplitbyBoneCount step.
+ *
+ * Meshes are split until the maximum number of bones is reached. The default
+ * value is AI_SBBC_DEFAULT_MAX_BONES, which may be altered at
+ * compile-time.
+ * Property data type: integer.
+ */
+// ---------------------------------------------------------------------------
+#define AI_CONFIG_PP_SBBC_MAX_BONES \
+       "PP_SBBC_MAX_BONES"
+
+
+// default limit for bone count 
+#if (!defined AI_SBBC_DEFAULT_MAX_BONES)
+#      define AI_SBBC_DEFAULT_MAX_BONES                60
+#endif
+
+
+// ---------------------------------------------------------------------------
+/** @brief  Specifies the maximum angle that may be between two vertex tangents
+ *         that their tangents and bi-tangents are smoothed.
+ *
+ * This applies to the CalcTangentSpace-Step. The angle is specified
+ * in degrees. The maximum value is 175.
+ * Property type: float. Default value: 45 degrees
+ */
+#define AI_CONFIG_PP_CT_MAX_SMOOTHING_ANGLE \
+       "PP_CT_MAX_SMOOTHING_ANGLE"
+
+// ---------------------------------------------------------------------------
+/** @brief Source UV channel for tangent space computation.
+ *
+ * The specified channel must exist or an error will be raised. 
+ * Property type: integer. Default value: 0
+ */
+// ---------------------------------------------------------------------------
+#define AI_CONFIG_PP_CT_TEXTURE_CHANNEL_INDEX \
+       "PP_CT_TEXTURE_CHANNEL_INDEX"
+
+// ---------------------------------------------------------------------------
+/** @brief  Specifies the maximum angle that may be between two face normals
+ *          at the same vertex position that their are smoothed together.
+ *
+ * Sometimes referred to as 'crease angle'.
+ * This applies to the GenSmoothNormals-Step. The angle is specified
+ * in degrees, so 180 is PI. The default value is 175 degrees (all vertex 
+ * normals are smoothed). The maximum value is 175, too. Property type: float. 
+ * Warning: setting this option may cause a severe loss of performance. The
+ * performance is unaffected if the #AI_CONFIG_FAVOUR_SPEED flag is set but
+ * the output quality may be reduced.
+ */
+#define AI_CONFIG_PP_GSN_MAX_SMOOTHING_ANGLE \
+       "PP_GSN_MAX_SMOOTHING_ANGLE"
+
+
+// ---------------------------------------------------------------------------
+/** @brief Sets the colormap (= palette) to be used to decode embedded
+ *         textures in MDL (Quake or 3DGS) files.
+ *
+ * This must be a valid path to a file. The file is 768 (256*3) bytes
+ * large and contains RGB triplets for each of the 256 palette entries.
+ * The default value is colormap.lmp. If the file is not found,
+ * a default palette (from Quake 1) is used. 
+ * Property type: string.
+ */
+#define AI_CONFIG_IMPORT_MDL_COLORMAP          \
+       "IMPORT_MDL_COLORMAP"
+
+// ---------------------------------------------------------------------------
+/** @brief Configures the #aiProcess_RemoveRedundantMaterials step to 
+ *  keep materials matching a name in a given list.
+ *
+ * This is a list of 1 to n strings, ' ' serves as delimiter character.
+ * Identifiers containing whitespaces must be enclosed in *single*
+ * quotation marks. For example:<tt>
+ * "keep-me and_me_to anotherMaterialToBeKept \'name with whitespace\'"</tt>.
+ * If a material matches on of these names, it will not be modified or
+ * removed by the postprocessing step nor will other materials be replaced
+ * by a reference to it. <br> 
+ * This option might be useful if you are using some magic material names
+ * to pass additional semantics through the content pipeline. This ensures
+ * they won't be optimized away, but a general optimization is still 
+ * performed for materials not contained in the list.
+ * Property type: String. Default value: n/a
+ * @note Linefeeds, tabs or carriage returns are treated as whitespace.
+ *   Material names are case sensitive.
+ */
+#define AI_CONFIG_PP_RRM_EXCLUDE_LIST  \
+       "PP_RRM_EXCLUDE_LIST"
+
+// ---------------------------------------------------------------------------
+/** @brief Configures the #aiProcess_PretransformVertices step to
+ *  keep the scene hierarchy. Meshes are moved to worldspace, but
+ *  no optimization is performed (read: meshes with equal materials are not 
+ *  joined. The total number of meshes won't change).
+ *
+ * This option could be of use for you if the scene hierarchy contains
+ * important additional information which you intend to parse. 
+ * For rendering, you can still render all meshes in the scene without
+ * any transformations.
+ * Property type: bool. Default value: false.
+ */
+#define AI_CONFIG_PP_PTV_KEEP_HIERARCHY                \
+       "PP_PTV_KEEP_HIERARCHY"
+
+// ---------------------------------------------------------------------------
+/** @brief Configures the #aiProcess_PretransformVertices step to normalize
+ *  all vertex components into the [-1,1] range. That is, a bounding box
+ *  for the whole scene is computed, the maximum component is taken and all
+ *  meshes are scaled appropriately (uniformly of course!).
+ *  This might be useful if you don't know the spatial dimension of the input 
+ *  data*/
+#define AI_CONFIG_PP_PTV_NORMALIZE     \
+       "PP_PTV_NORMALIZE"
+
+// ---------------------------------------------------------------------------
+/** @brief Configures the #aiProcess_PretransformVertices step to use
+ *  a users defined matrix as the scene root node transformation before
+ *  transforming vertices. 
+ *  Property type: bool. Default value: false.
+ */
+#define AI_CONFIG_PP_PTV_ADD_ROOT_TRANSFORMATION       \
+       "PP_PTV_ADD_ROOT_TRANSFORMATION"
+
+// ---------------------------------------------------------------------------
+/** @brief Configures the #aiProcess_PretransformVertices step to use
+ *  a users defined matrix as the scene root node transformation before
+ *  transforming vertices. This property correspond to the 'a1' component
+ *  of the transformation matrix.
+ *  Property type: aiMatrix4x4.
+ */
+#define AI_CONFIG_PP_PTV_ROOT_TRANSFORMATION   \
+       "PP_PTV_ROOT_TRANSFORMATION"
+
+// ---------------------------------------------------------------------------
+/** @brief Configures the #aiProcess_FindDegenerates step to
+ *  remove degenerated primitives from the import - immediately.
+ *
+ * The default behaviour converts degenerated triangles to lines and
+ * degenerated lines to points. See the documentation to the
+ * #aiProcess_FindDegenerates step for a detailed example of the various ways
+ * to get rid of these lines and points if you don't want them.
+ * Property type: bool. Default value: false.
+ */
+#define AI_CONFIG_PP_FD_REMOVE \
+       "PP_FD_REMOVE"
+
+// ---------------------------------------------------------------------------
+/** @brief Configures the #aiProcess_OptimizeGraph step to preserve nodes
+ * matching a name in a given list.
+ *
+ * This is a list of 1 to n strings, ' ' serves as delimiter character.
+ * Identifiers containing whitespaces must be enclosed in *single*
+ * quotation marks. For example:<tt>
+ * "keep-me and_me_to anotherNodeToBeKept \'name with whitespace\'"</tt>.
+ * If a node matches on of these names, it will not be modified or
+ * removed by the postprocessing step.<br> 
+ * This option might be useful if you are using some magic node names
+ * to pass additional semantics through the content pipeline. This ensures
+ * they won't be optimized away, but a general optimization is still 
+ * performed for nodes not contained in the list.
+ * Property type: String. Default value: n/a
+ * @note Linefeeds, tabs or carriage returns are treated as whitespace.
+ *   Node names are case sensitive.
+ */
+#define AI_CONFIG_PP_OG_EXCLUDE_LIST   \
+       "PP_OG_EXCLUDE_LIST"
+
+// ---------------------------------------------------------------------------
+/** @brief  Set the maximum number of triangles in a mesh.
+ *
+ * This is used by the "SplitLargeMeshes" PostProcess-Step to determine
+ * whether a mesh must be split or not.
+ * @note The default value is AI_SLM_DEFAULT_MAX_TRIANGLES
+ * Property type: integer.
+ */
+#define AI_CONFIG_PP_SLM_TRIANGLE_LIMIT        \
+       "PP_SLM_TRIANGLE_LIMIT"
+
+// default value for AI_CONFIG_PP_SLM_TRIANGLE_LIMIT
+#if (!defined AI_SLM_DEFAULT_MAX_TRIANGLES)
+#      define AI_SLM_DEFAULT_MAX_TRIANGLES             1000000
+#endif
+
+// ---------------------------------------------------------------------------
+/** @brief  Set the maximum number of vertices in a mesh.
+ *
+ * This is used by the "SplitLargeMeshes" PostProcess-Step to determine
+ * whether a mesh must be split or not.
+ * @note The default value is AI_SLM_DEFAULT_MAX_VERTICES
+ * Property type: integer. 
+ */
+#define AI_CONFIG_PP_SLM_VERTEX_LIMIT \
+       "PP_SLM_VERTEX_LIMIT"
+
+// default value for AI_CONFIG_PP_SLM_VERTEX_LIMIT
+#if (!defined AI_SLM_DEFAULT_MAX_VERTICES)
+#      define AI_SLM_DEFAULT_MAX_VERTICES              1000000
+#endif
+
+// ---------------------------------------------------------------------------
+/** @brief Set the maximum number of bones affecting a single vertex
+ *
+ * This is used by the #aiProcess_LimitBoneWeights PostProcess-Step.
+ * @note The default value is AI_LBW_MAX_WEIGHTS
+ * Property type: integer.*/
+#define AI_CONFIG_PP_LBW_MAX_WEIGHTS   \
+       "PP_LBW_MAX_WEIGHTS"
+
+// default value for AI_CONFIG_PP_LBW_MAX_WEIGHTS
+#if (!defined AI_LMW_MAX_WEIGHTS)
+#      define AI_LMW_MAX_WEIGHTS       0x4
+#endif // !! AI_LMW_MAX_WEIGHTS
+
+// ---------------------------------------------------------------------------
+/** @brief Lower the deboning threshold in order to remove more bones.
+ *
+ * This is used by the #aiProcess_Debone PostProcess-Step.
+ * @note The default value is AI_DEBONE_THRESHOLD
+ * Property type: float.*/
+#define AI_CONFIG_PP_DB_THRESHOLD \
+       "PP_DB_THRESHOLD"
+
+// default value for AI_CONFIG_PP_LBW_MAX_WEIGHTS
+#if (!defined AI_DEBONE_THRESHOLD)
+#      define AI_DEBONE_THRESHOLD      1.0f
+#endif // !! AI_DEBONE_THRESHOLD
+
+// ---------------------------------------------------------------------------
+/** @brief Require all bones qualify for deboning before removing any
+ *
+ * This is used by the #aiProcess_Debone PostProcess-Step.
+ * @note The default value is 0
+ * Property type: bool.*/
+#define AI_CONFIG_PP_DB_ALL_OR_NONE \
+       "PP_DB_ALL_OR_NONE"
+
+/** @brief Default value for the #AI_CONFIG_PP_ICL_PTCACHE_SIZE property
+ */
+#ifndef PP_ICL_PTCACHE_SIZE
+#      define PP_ICL_PTCACHE_SIZE 12
+#endif
+
+// ---------------------------------------------------------------------------
+/** @brief Set the size of the post-transform vertex cache to optimize the
+ *    vertices for. This configures the #aiProcess_ImproveCacheLocality step.
+ *
+ * The size is given in vertices. Of course you can't know how the vertex
+ * format will exactly look like after the import returns, but you can still
+ * guess what your meshes will probably have.
+ * @note The default value is #PP_ICL_PTCACHE_SIZE. That results in slight
+ * performance improvements for most nVidia/AMD cards since 2002.
+ * Property type: integer.
+ */
+#define AI_CONFIG_PP_ICL_PTCACHE_SIZE  "PP_ICL_PTCACHE_SIZE"
+
+// ---------------------------------------------------------------------------
+/** @brief Enumerates components of the aiScene and aiMesh data structures
+ *  that can be excluded from the import using the #aiPrpcess_RemoveComponent step.
+ *
+ *  See the documentation to #aiProcess_RemoveComponent for more details.
+ */
+enum aiComponent
+{
+       /** Normal vectors */
+#ifdef SWIG
+       aiComponent_NORMALS = 0x2,
+#else
+       aiComponent_NORMALS = 0x2u,
+#endif
+
+       /** Tangents and bitangents go always together ... */
+#ifdef SWIG
+       aiComponent_TANGENTS_AND_BITANGENTS = 0x4,
+#else
+       aiComponent_TANGENTS_AND_BITANGENTS = 0x4u,
+#endif
+
+       /** ALL color sets
+        * Use aiComponent_COLORn(N) to specify the N'th set */
+       aiComponent_COLORS = 0x8,
+
+       /** ALL texture UV sets
+        * aiComponent_TEXCOORDn(N) to specify the N'th set  */
+       aiComponent_TEXCOORDS = 0x10,
+
+       /** Removes all bone weights from all meshes.
+        * The scenegraph nodes corresponding to the bones are NOT removed.
+        * use the #aiProcess_OptimizeGraph step to do this */
+       aiComponent_BONEWEIGHTS = 0x20,
+
+       /** Removes all node animations (aiScene::mAnimations).
+        * The corresponding scenegraph nodes are NOT removed.
+        * use the #aiProcess_OptimizeGraph step to do this */
+       aiComponent_ANIMATIONS = 0x40,
+
+       /** Removes all embedded textures (aiScene::mTextures) */
+       aiComponent_TEXTURES = 0x80,
+
+       /** Removes all light sources (aiScene::mLights).
+        * The corresponding scenegraph nodes are NOT removed.
+        * use the #aiProcess_OptimizeGraph step to do this */
+       aiComponent_LIGHTS = 0x100,
+
+       /** Removes all cameras (aiScene::mCameras).
+        * The corresponding scenegraph nodes are NOT removed.
+        * use the #aiProcess_OptimizeGraph step to do this */
+       aiComponent_CAMERAS = 0x200,
+
+       /** Removes all meshes (aiScene::mMeshes). */
+       aiComponent_MESHES = 0x400,
+
+       /** Removes all materials. One default material will
+        * be generated, so aiScene::mNumMaterials will be 1. */
+       aiComponent_MATERIALS = 0x800,
+
+
+       /** This value is not used. It is just there to force the
+        *  compiler to map this enum to a 32 Bit integer. */
+#ifndef SWIG
+       _aiComponent_Force32Bit = 0x9fffffff
+#endif
+};
+
+// Remove a specific color channel 'n'
+#define aiComponent_COLORSn(n) (1u << (n+20u))
+
+// Remove a specific UV channel 'n'
+#define aiComponent_TEXCOORDSn(n) (1u << (n+25u))
+
+// ---------------------------------------------------------------------------
+/** @brief Input parameter to the #aiProcess_RemoveComponent step:
+ *  Specifies the parts of the data structure to be removed.
+ *
+ * See the documentation to this step for further details. The property
+ * is expected to be an integer, a bitwise combination of the
+ * #aiComponent flags defined above in this header. The default
+ * value is 0. Important: if no valid mesh is remaining after the
+ * step has been executed (e.g you thought it was funny to specify ALL
+ * of the flags defined above) the import FAILS. Mainly because there is
+ * no data to work on anymore ...
+ */
+#define AI_CONFIG_PP_RVC_FLAGS                         \
+       "PP_RVC_FLAGS"
+
+// ---------------------------------------------------------------------------
+/** @brief Input parameter to the #aiProcess_SortByPType step:
+ *  Specifies which primitive types are removed by the step.
+ *
+ *  This is a bitwise combination of the aiPrimitiveType flags.
+ *  Specifying all of them is illegal, of course. A typical use would
+ *  be to exclude all line and point meshes from the import. This
+ *  is an integer property, its default value is 0.
+ */
+#define AI_CONFIG_PP_SBP_REMOVE                                \
+       "PP_SBP_REMOVE"
+
+// ---------------------------------------------------------------------------
+/** @brief Input parameter to the #aiProcess_FindInvalidData step:
+ *  Specifies the floating-point accuracy for animation values. The step
+ *  checks for animation tracks where all frame values are absolutely equal
+ *  and removes them. This tweakable controls the epsilon for floating-point
+ *  comparisons - two keys are considered equal if the invariant 
+ *  abs(n0-n1)>epsilon holds true for all vector respectively quaternion
+ *  components. The default value is 0.f - comparisons are exact then.
+ */
+#define AI_CONFIG_PP_FID_ANIM_ACCURACY                         \
+       "PP_FID_ANIM_ACCURACY"
+
+
+// TransformUVCoords evaluates UV scalings
+#define AI_UVTRAFO_SCALING 0x1
+
+// TransformUVCoords evaluates UV rotations
+#define AI_UVTRAFO_ROTATION 0x2
+
+// TransformUVCoords evaluates UV translation
+#define AI_UVTRAFO_TRANSLATION 0x4
+
+// Everything baked together -> default value
+#define AI_UVTRAFO_ALL (AI_UVTRAFO_SCALING | AI_UVTRAFO_ROTATION | AI_UVTRAFO_TRANSLATION)
+
+// ---------------------------------------------------------------------------
+/** @brief Input parameter to the #aiProcess_TransformUVCoords step:
+ *  Specifies which UV transformations are evaluated.
+ *
+ *  This is a bitwise combination of the AI_UVTRAFO_XXX flags (integer
+ *  property, of course). By default all transformations are enabled 
+ * (AI_UVTRAFO_ALL).
+ */
+#define AI_CONFIG_PP_TUV_EVALUATE                              \
+       "PP_TUV_EVALUATE"
+
+// ---------------------------------------------------------------------------
+/** @brief A hint to assimp to favour speed against import quality.
+ *
+ * Enabling this option may result in faster loading, but it needn't.
+ * It represents just a hint to loaders and post-processing steps to use
+ * faster code paths, if possible. 
+ * This property is expected to be an integer, != 0 stands for true.
+ * The default value is 0.
+ */
+#define AI_CONFIG_FAVOUR_SPEED                         \
+ "FAVOUR_SPEED"
+
+
+// ###########################################################################
+// IMPORTER SETTINGS
+// Various stuff to fine-tune the behaviour of specific importer plugins.
+// ###########################################################################
+
+
+// ---------------------------------------------------------------------------
+/** @brief Set whether the fbx importer will merge all geometry layers present
+ *    in the source file or take only the first.
+ *
+ * The default value is true (1)
+ * Property type: bool
+ */
+#define AI_CONFIG_IMPORT_FBX_READ_ALL_GEOMETRY_LAYERS \
+       "IMPORT_FBX_READ_ALL_GEOMETRY_LAYERS"
+
+// ---------------------------------------------------------------------------
+/** @brief Set whether the fbx importer will read all materials present in the
+ *    source file or take only the referenced materials.
+ *
+ * This is void unless IMPORT_FBX_READ_MATERIALS=1.
+ *
+ * The default value is false (0)
+ * Property type: bool
+ */
+#define AI_CONFIG_IMPORT_FBX_READ_ALL_MATERIALS \
+       "IMPORT_FBX_READ_ALL_MATERIALS"
+
+// ---------------------------------------------------------------------------
+/** @brief Set whether the fbx importer will read materials.
+ *
+ * The default value is true (1)
+ * Property type: bool
+ */
+#define AI_CONFIG_IMPORT_FBX_READ_MATERIALS \
+       "IMPORT_FBX_READ_MATERIALS"
+
+// ---------------------------------------------------------------------------
+/** @brief Set whether the fbx importer will read cameras.
+ *
+ * The default value is true (1)
+ * Property type: bool
+ */
+#define AI_CONFIG_IMPORT_FBX_READ_CAMERAS \
+       "IMPORT_FBX_READ_CAMERAS"
+
+// ---------------------------------------------------------------------------
+/** @brief Set whether the fbx importer will read light sources.
+ *
+ * The default value is true (1)
+ * Property type: bool
+ */
+#define AI_CONFIG_IMPORT_FBX_READ_LIGHTS \
+       "IMPORT_FBX_READ_LIGHTS"
+
+// ---------------------------------------------------------------------------
+/** @brief Set whether the fbx importer will read animations.
+ *
+ * The default value is true (1)
+ * Property type: bool
+ */
+#define AI_CONFIG_IMPORT_FBX_READ_ANIMATIONS \
+       "IMPORT_FBX_READ_ANIMATIONS"
+
+// ---------------------------------------------------------------------------
+/** @brief Set whether the fbx importer will act in strict mode in which only
+ *    FBX 2013 is supported and any other sub formats are rejected. FBX 2013
+ *    is the primary target for the importer, so this format is best
+ *    supported and well-tested.
+ *
+ * The default value is false (0)
+ * Property type: bool
+ */
+#define AI_CONFIG_IMPORT_FBX_STRICT_MODE \
+       "IMPORT_FBX_STRICT_MODE"
+
+// ---------------------------------------------------------------------------
+/** @brief Set whether the fbx importer will preserve pivot points for
+ *    transformations (as extra nodes). If set to false, pivots and offsets
+ *    will be evaluated whenever possible.
+ *
+ * The default value is true (1)
+ * Property type: bool
+ */
+#define AI_CONFIG_IMPORT_FBX_PRESERVE_PIVOTS \
+       "IMPORT_FBX_PRESERVE_PIVOTS"
+
+// ---------------------------------------------------------------------------
+/** @brief Specifies whether the importer will drop empty animation curves or
+ *    animation curves which match the bind pose transformation over their
+ *    entire defined range.
+ *
+ * The default value is true (1)
+ * Property type: bool
+ */
+#define AI_CONFIG_IMPORT_FBX_OPTIMIZE_EMPTY_ANIMATION_CURVES \
+       "IMPORT_FBX_OPTIMIZE_EMPTY_ANIMATION_CURVES"
+
+
+
+// ---------------------------------------------------------------------------
+/** @brief  Set the vertex animation keyframe to be imported
+ *
+ * ASSIMP does not support vertex keyframes (only bone animation is supported).
+ * The library reads only one frame of models with vertex animations.
+ * By default this is the first frame.
+ * \note The default value is 0. This option applies to all importers.
+ *   However, it is also possible to override the global setting
+ *   for a specific loader. You can use the AI_CONFIG_IMPORT_XXX_KEYFRAME
+ *   options (where XXX is a placeholder for the file format for which you
+ *   want to override the global setting).
+ * Property type: integer.
+ */
+#define AI_CONFIG_IMPORT_GLOBAL_KEYFRAME       "IMPORT_GLOBAL_KEYFRAME"
+
+#define AI_CONFIG_IMPORT_MD3_KEYFRAME          "IMPORT_MD3_KEYFRAME"
+#define AI_CONFIG_IMPORT_MD2_KEYFRAME          "IMPORT_MD2_KEYFRAME"
+#define AI_CONFIG_IMPORT_MDL_KEYFRAME          "IMPORT_MDL_KEYFRAME"
+#define AI_CONFIG_IMPORT_MDC_KEYFRAME          "IMPORT_MDC_KEYFRAME"
+#define AI_CONFIG_IMPORT_SMD_KEYFRAME          "IMPORT_SMD_KEYFRAME"
+#define AI_CONFIG_IMPORT_UNREAL_KEYFRAME       "IMPORT_UNREAL_KEYFRAME"
+
+
+// ---------------------------------------------------------------------------
+/** @brief  Configures the AC loader to collect all surfaces which have the
+ *    "Backface cull" flag set in separate meshes. 
+ *
+ *  Property type: bool. Default value: true.
+ */
+#define AI_CONFIG_IMPORT_AC_SEPARATE_BFCULL    \
+       "IMPORT_AC_SEPARATE_BFCULL"
+
+// ---------------------------------------------------------------------------
+/** @brief  Configures whether the AC loader evaluates subdivision surfaces (
+ *  indicated by the presence of the 'subdiv' attribute in the file). By
+ *  default, Assimp performs the subdivision using the standard 
+ *  Catmull-Clark algorithm
+ *
+ * * Property type: bool. Default value: true.
+ */
+#define AI_CONFIG_IMPORT_AC_EVAL_SUBDIVISION   \
+       "IMPORT_AC_EVAL_SUBDIVISION"
+
+// ---------------------------------------------------------------------------
+/** @brief  Configures the UNREAL 3D loader to separate faces with different
+ *    surface flags (e.g. two-sided vs. single-sided).
+ *
+ * * Property type: bool. Default value: true.
+ */
+#define AI_CONFIG_IMPORT_UNREAL_HANDLE_FLAGS \
+       "UNREAL_HANDLE_FLAGS"
+
+// ---------------------------------------------------------------------------
+/** @brief Configures the terragen import plugin to compute uv's for 
+ *  terrains, if not given. Furthermore a default texture is assigned.
+ *
+ * UV coordinates for terrains are so simple to compute that you'll usually
+ * want to compute them on your own, if you need them. This option is intended
+ * for model viewers which want to offer an easy way to apply textures to
+ * terrains.
+ * * Property type: bool. Default value: false.
+ */
+#define AI_CONFIG_IMPORT_TER_MAKE_UVS \
+       "IMPORT_TER_MAKE_UVS"
+
+// ---------------------------------------------------------------------------
+/** @brief  Configures the ASE loader to always reconstruct normal vectors
+ *     basing on the smoothing groups loaded from the file.
+ * 
+ * Some ASE files have carry invalid normals, other don't.
+ * * Property type: bool. Default value: true.
+ */
+#define AI_CONFIG_IMPORT_ASE_RECONSTRUCT_NORMALS       \
+       "IMPORT_ASE_RECONSTRUCT_NORMALS"
+
+// ---------------------------------------------------------------------------
+/** @brief  Configures the M3D loader to detect and process multi-part 
+ *    Quake player models.
+ *
+ * These models usually consist of 3 files, lower.md3, upper.md3 and
+ * head.md3. If this property is set to true, Assimp will try to load and
+ * combine all three files if one of them is loaded. 
+ * Property type: bool. Default value: true.
+ */
+#define AI_CONFIG_IMPORT_MD3_HANDLE_MULTIPART \
+       "IMPORT_MD3_HANDLE_MULTIPART"
+
+// ---------------------------------------------------------------------------
+/** @brief  Tells the MD3 loader which skin files to load.
+ *
+ * When loading MD3 files, Assimp checks whether a file 
+ * <md3_file_name>_<skin_name>.skin is existing. These files are used by
+ * Quake III to be able to assign different skins (e.g. red and blue team) 
+ * to models. 'default', 'red', 'blue' are typical skin names.
+ * Property type: String. Default value: "default".
+ */
+#define AI_CONFIG_IMPORT_MD3_SKIN_NAME \
+       "IMPORT_MD3_SKIN_NAME"
+
+// ---------------------------------------------------------------------------
+/** @brief  Specify the Quake 3 shader file to be used for a particular
+ *  MD3 file. This can also be a search path.
+ *
+ * By default Assimp's behaviour is as follows: If a MD3 file 
+ * <tt><any_path>/models/<any_q3_subdir>/<model_name>/<file_name>.md3</tt> is 
+ * loaded, the library tries to locate the corresponding shader file in
+ * <tt><any_path>/scripts/<model_name>.shader</tt>. This property overrides this
+ * behaviour. It can either specify a full path to the shader to be loaded
+ * or alternatively the path (relative or absolute) to the directory where
+ * the shaders for all MD3s to be loaded reside. Assimp attempts to open 
+ * <tt><dir>/<model_name>.shader</tt> first, <tt><dir>/<file_name>.shader</tt> 
+ * is the fallback file. Note that <dir> should have a terminal (back)slash.
+ * Property type: String. Default value: n/a.
+ */
+#define AI_CONFIG_IMPORT_MD3_SHADER_SRC \
+       "IMPORT_MD3_SHADER_SRC"
+
+// ---------------------------------------------------------------------------
+/** @brief  Configures the LWO loader to load just one layer from the model.
+ * 
+ * LWO files consist of layers and in some cases it could be useful to load
+ * only one of them. This property can be either a string - which specifies
+ * the name of the layer - or an integer - the index of the layer. If the
+ * property is not set the whole LWO model is loaded. Loading fails if the
+ * requested layer is not available. The layer index is zero-based and the
+ * layer name may not be empty.<br>
+ * Property type: Integer. Default value: all layers are loaded.
+ */
+#define AI_CONFIG_IMPORT_LWO_ONE_LAYER_ONLY                    \
+       "IMPORT_LWO_ONE_LAYER_ONLY"
+
+// ---------------------------------------------------------------------------
+/** @brief  Configures the MD5 loader to not load the MD5ANIM file for
+ *  a MD5MESH file automatically.
+ * 
+ * The default strategy is to look for a file with the same name but the
+ * MD5ANIM extension in the same directory. If it is found, it is loaded
+ * and combined with the MD5MESH file. This configuration option can be
+ * used to disable this behaviour.
+ * 
+ * * Property type: bool. Default value: false.
+ */
+#define AI_CONFIG_IMPORT_MD5_NO_ANIM_AUTOLOAD                  \
+       "IMPORT_MD5_NO_ANIM_AUTOLOAD"
+
+// ---------------------------------------------------------------------------
+/** @brief Defines the begin of the time range for which the LWS loader
+ *    evaluates animations and computes aiNodeAnim's.
+ * 
+ * Assimp provides full conversion of LightWave's envelope system, including
+ * pre and post conditions. The loader computes linearly subsampled animation
+ * chanels with the frame rate given in the LWS file. This property defines
+ * the start time. Note: animation channels are only generated if a node
+ * has at least one envelope with more tan one key assigned. This property.
+ * is given in frames, '0' is the first frame. By default, if this property
+ * is not set, the importer takes the animation start from the input LWS
+ * file ('FirstFrame' line)<br>
+ * Property type: Integer. Default value: taken from file.
+ *
+ * @see AI_CONFIG_IMPORT_LWS_ANIM_END - end of the imported time range
+ */
+#define AI_CONFIG_IMPORT_LWS_ANIM_START                        \
+       "IMPORT_LWS_ANIM_START"
+#define AI_CONFIG_IMPORT_LWS_ANIM_END                  \
+       "IMPORT_LWS_ANIM_END"
+
+// ---------------------------------------------------------------------------
+/** @brief Defines the output frame rate of the IRR loader.
+ * 
+ * IRR animations are difficult to convert for Assimp and there will
+ * always be a loss of quality. This setting defines how many keys per second
+ * are returned by the converter.<br>
+ * Property type: integer. Default value: 100
+ */
+#define AI_CONFIG_IMPORT_IRR_ANIM_FPS                          \
+       "IMPORT_IRR_ANIM_FPS"
+
+// ---------------------------------------------------------------------------
+/** @brief Ogre Importer will try to find referenced materials from this file.
+ *
+ * Ogre meshes reference with material names, this does not tell Assimp the file
+ * where it is located in. Assimp will try to find the source file in the following 
+ * order: <material-name>.material, <mesh-filename-base>.material and
+ * lastly the material name defined by this config property.
+ * <br>
+ * Property type: String. Default value: Scene.material.
+ */
+#define AI_CONFIG_IMPORT_OGRE_MATERIAL_FILE    \
+       "IMPORT_OGRE_MATERIAL_FILE"
+
+// ---------------------------------------------------------------------------
+/** @brief Ogre Importer detect the texture usage from its filename.
+ *
+ * Ogre material texture units do not define texture type, the textures usage
+ * depends on the used shader or Ogres fixed pipeline. If this config property
+ * is true Assimp will try to detect the type from the textures filename postfix:
+ * _n, _nrm, _nrml, _normal, _normals and _normalmap for normal map, _s, _spec,
+ * _specular and _specularmap for specular map, _l, _light, _lightmap, _occ 
+ * and _occlusion for light map, _disp and _displacement for displacement map.
+ * The matching is case insensitive. Post fix is taken between last "_" and last ".".
+ * Default behavior is to detect type from lower cased texture unit name by 
+ * matching against: normalmap, specularmap, lightmap and displacementmap.
+ * For both cases if no match is found aiTextureType_DIFFUSE is used.
+ * <br>
+ * Property type: Bool. Default value: false.
+ */
+#define AI_CONFIG_IMPORT_OGRE_TEXTURETYPE_FROM_FILENAME \
+       "IMPORT_OGRE_TEXTURETYPE_FROM_FILENAME"
+
+/** @brief Specifies whether the IFC loader skips over IfcSpace elements.
+ *
+ * IfcSpace elements (and their geometric representations) are used to
+ * represent, well, free space in a building storey.<br>
+ * Property type: Bool. Default value: true.
+ */
+#define AI_CONFIG_IMPORT_IFC_SKIP_SPACE_REPRESENTATIONS "IMPORT_IFC_SKIP_SPACE_REPRESENTATIONS"
+
+
+// ---------------------------------------------------------------------------
+/** @brief Specifies whether the IFC loader skips over 
+ *    shape representations of type 'Curve2D'.
+ *
+ * A lot of files contain both a faceted mesh representation and a outline
+ * with a presentation type of 'Curve2D'. Currently Assimp doesn't convert those,
+ * so turning this option off just clutters the log with errors.<br>
+ * Property type: Bool. Default value: true.
+ */
+#define AI_CONFIG_IMPORT_IFC_SKIP_CURVE_REPRESENTATIONS "IMPORT_IFC_SKIP_CURVE_REPRESENTATIONS"
+
+// ---------------------------------------------------------------------------
+/** @brief Specifies whether the IFC loader will use its own, custom triangulation
+ *   algorithm to triangulate wall and floor meshes.
+ *
+ * If this property is set to false, walls will be either triangulated by
+ * #aiProcess_Triangulate or will be passed through as huge polygons with 
+ * faked holes (i.e. holes that are connected with the outer boundary using
+ * a dummy edge). It is highly recommended to set this property to true
+ * if you want triangulated data because #aiProcess_Triangulate is known to
+ * have problems with the kind of polygons that the IFC loader spits out for
+ * complicated meshes.
+ * Property type: Bool. Default value: true.
+ */
+#define AI_CONFIG_IMPORT_IFC_CUSTOM_TRIANGULATION "IMPORT_IFC_CUSTOM_TRIANGULATION"
+
+#define AI_CONFIG_IMPORT_COLLADA_IGNORE_UP_DIRECTION "IMPORT_COLLADA_IGNORE_UP_DIRECTION"
+
+#endif // !! AI_CONFIG_H_INC
diff --git a/include/assimp/defs.h b/include/assimp/defs.h
new file mode 100644 (file)
index 0000000..b1f0b98
--- /dev/null
@@ -0,0 +1,279 @@
+/*
+---------------------------------------------------------------------------
+Open Asset Import Library (assimp)
+---------------------------------------------------------------------------
+
+Copyright (c) 2006-2012, assimp team
+
+All rights reserved.
+
+Redistribution and use of this software 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.
+
+* Neither the name of the assimp team, nor the names of its
+  contributors may be used to endorse or promote products
+  derived from this software without specific prior
+  written permission of the assimp team.
+
+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.
+---------------------------------------------------------------------------
+*/
+
+/** @file aiDefines.h
+ *  @brief Assimp build configuration setup. See the notes in the comment
+ *  blocks to find out how to customize _your_ Assimp build.
+ */
+
+#ifndef INCLUDED_AI_DEFINES_H
+#define INCLUDED_AI_DEFINES_H
+
+       //////////////////////////////////////////////////////////////////////////
+       /* Define ASSIMP_BUILD_NO_XX_IMPORTER to disable a specific
+        * file format loader. The loader is be excluded from the
+        * build in this case. 'XX' stands for the most common file
+        * extension of the file format. E.g.: 
+        * ASSIMP_BUILD_NO_X_IMPORTER disables the X loader.
+        *
+        * If you're unsure about that, take a look at the implementation of the
+        * import plugin you wish to disable. You'll find the right define in the
+        * first lines of the corresponding unit.
+        *
+        * Other (mixed) configuration switches are listed here:
+        *    ASSIMP_BUILD_NO_COMPRESSED_X 
+        *      - Disable support for compressed X files (zip)
+        *    ASSIMP_BUILD_NO_COMPRESSED_BLEND
+        *      - Disable support for compressed Blender files (zip)
+        *    ASSIMP_BUILD_NO_COMPRESSED_IFC
+        *      - Disable support for IFCZIP files (unzip)
+        */
+       //////////////////////////////////////////////////////////////////////////
+
+#ifndef ASSIMP_BUILD_NO_COMPRESSED_X
+#      define ASSIMP_BUILD_NEED_Z_INFLATE
+#endif
+
+#ifndef ASSIMP_BUILD_NO_COMPRESSED_BLEND
+#      define ASSIMP_BUILD_NEED_Z_INFLATE
+#endif
+
+#ifndef ASSIMP_BUILD_NO_COMPRESSED_IFC
+#      define ASSIMP_BUILD_NEED_Z_INFLATE
+#      define ASSIMP_BUILD_NEED_UNZIP
+#endif
+
+#ifndef ASSIMP_BUILD_NO_Q3BSP_IMPORTER
+#      define ASSIMP_BUILD_NEED_Z_INFLATE
+#      define ASSIMP_BUILD_NEED_UNZIP
+#endif
+
+       //////////////////////////////////////////////////////////////////////////
+       /* Define ASSIMP_BUILD_NO_XX_PROCESS to disable a specific
+        * post processing step. This is the current list of process names ('XX'):
+        * CALCTANGENTS
+        * JOINVERTICES
+        * TRIANGULATE
+        * GENFACENORMALS
+        * GENVERTEXNORMALS
+        * REMOVEVC
+        * SPLITLARGEMESHES
+        * PRETRANSFORMVERTICES
+        * LIMITBONEWEIGHTS
+        * VALIDATEDS
+        * IMPROVECACHELOCALITY
+        * FIXINFACINGNORMALS
+        * REMOVE_REDUNDANTMATERIALS
+        * OPTIMIZEGRAPH
+        * SORTBYPTYPE
+        * FINDINVALIDDATA
+        * TRANSFORMTEXCOORDS
+        * GENUVCOORDS
+        * ENTITYMESHBUILDER
+        * MAKELEFTHANDED
+        * FLIPUVS
+        * FLIPWINDINGORDER
+        * OPTIMIZEMESHES
+        * OPTIMIZEANIMS
+        * OPTIMIZEGRAPH
+        * GENENTITYMESHES
+        * FIXTEXTUREPATHS */
+       //////////////////////////////////////////////////////////////////////////
+
+#ifdef _MSC_VER
+#      undef ASSIMP_API
+
+       //////////////////////////////////////////////////////////////////////////
+       /* Define 'ASSIMP_BUILD_DLL_EXPORT' to build a DLL of the library */
+       //////////////////////////////////////////////////////////////////////////
+#      ifdef ASSIMP_BUILD_DLL_EXPORT
+#              define ASSIMP_API __declspec(dllexport)
+#              define ASSIMP_API_WINONLY __declspec(dllexport)
+#              pragma warning (disable : 4251)
+
+       //////////////////////////////////////////////////////////////////////////
+       /* Define 'ASSIMP_DLL' before including Assimp to link to ASSIMP in
+        * an external DLL under Windows. Default is static linkage. */
+       //////////////////////////////////////////////////////////////////////////
+#      elif (defined ASSIMP_DLL)
+#              define ASSIMP_API __declspec(dllimport)
+#              define ASSIMP_API_WINONLY __declspec(dllimport)
+#      else
+#              define ASSIMP_API 
+#              define ASSIMP_API_WINONLY
+#      endif
+
+       /* Force the compiler to inline a function, if possible
+        */
+#      define AI_FORCE_INLINE __forceinline
+
+       /* Tells the compiler that a function never returns. Used in code analysis
+        * to skip dead paths (e.g. after an assertion evaluated to false). */
+#      define AI_WONT_RETURN __declspec(noreturn)
+
+#elif defined(SWIG)
+
+       /* Do nothing, the relevant defines are all in AssimpSwigPort.i */
+
+#else
+       
+#      define AI_WONT_RETURN
+
+#      define ASSIMP_API __attribute__ ((visibility("default")))
+#      define ASSIMP_API_WINONLY
+#      define AI_FORCE_INLINE inline
+#endif // (defined _MSC_VER)
+
+#ifdef __clang__
+#      define AI_WONT_RETURN_SUFFIX  __attribute__((analyzer_noreturn))
+#else
+#      define AI_WONT_RETURN_SUFFIX
+#endif // (defined __clang__)
+
+#ifdef __cplusplus
+       /* No explicit 'struct' and 'enum' tags for C++, this keeps showing up
+        * in doxydocs.
+        */
+#      define C_STRUCT
+#      define C_ENUM
+#else
+       //////////////////////////////////////////////////////////////////////////
+       /* To build the documentation, make sure ASSIMP_DOXYGEN_BUILD
+        * is defined by Doxygen's preprocessor. The corresponding
+        * entries in the DOXYFILE are: */
+       //////////////////////////////////////////////////////////////////////////
+#if 0
+       ENABLE_PREPROCESSING   = YES
+       MACRO_EXPANSION        = YES
+       EXPAND_ONLY_PREDEF     = YES
+       SEARCH_INCLUDES        = YES
+       INCLUDE_PATH           = 
+       INCLUDE_FILE_PATTERNS  = 
+       PREDEFINED             = ASSIMP_DOXYGEN_BUILD=1
+       EXPAND_AS_DEFINED      = C_STRUCT C_ENUM
+       SKIP_FUNCTION_MACROS   = YES
+#endif
+       //////////////////////////////////////////////////////////////////////////
+       /* Doxygen gets confused if we use c-struct typedefs to avoid
+        * the explicit 'struct' notation. This trick here has the same
+        * effect as the TYPEDEF_HIDES_STRUCT option, but we don't need
+        * to typedef all structs/enums. */
+        //////////////////////////////////////////////////////////////////////////
+#      if (defined ASSIMP_DOXYGEN_BUILD)
+#              define C_STRUCT 
+#              define C_ENUM   
+#      else
+#              define C_STRUCT struct
+#              define C_ENUM   enum
+#      endif
+#endif
+
+#if (defined(__BORLANDC__) || defined (__BCPLUSPLUS__))
+#error Currently, Borland is unsupported. Feel free to port Assimp.
+
+// "W8059 Packgröße der Struktur geändert"
+
+#endif
+       //////////////////////////////////////////////////////////////////////////
+       /* Define 'ASSIMP_BUILD_BOOST_WORKAROUND' to compile assimp
+        * without boost. This is done by using a few workaround
+        * classes and brings some limitations (e.g. some logging won't be done,
+        * the library won't utilize threads or be threadsafe at all). 
+        * This implies the 'ASSIMP_BUILD_SINGLETHREADED' setting. */
+        //////////////////////////////////////////////////////////////////////////
+#ifdef ASSIMP_BUILD_BOOST_WORKAROUND
+
+       // threading support requires boost
+#ifndef ASSIMP_BUILD_SINGLETHREADED
+#      define ASSIMP_BUILD_SINGLETHREADED
+#endif
+
+#endif // !! ASSIMP_BUILD_BOOST_WORKAROUND
+
+       //////////////////////////////////////////////////////////////////////////
+       /* Define ASSIMP_BUILD_SINGLETHREADED to compile assimp
+        * without threading support. The library doesn't utilize
+        * threads then and is itself not threadsafe.
+        * If this flag is specified boost::threads is *not* required. */
+       //////////////////////////////////////////////////////////////////////////
+#ifndef ASSIMP_BUILD_SINGLETHREADED
+#      define ASSIMP_BUILD_SINGLETHREADED
+#endif
+
+#if defined(_DEBUG) || ! defined(NDEBUG)
+#      define ASSIMP_BUILD_DEBUG
+#endif
+
+       //////////////////////////////////////////////////////////////////////////
+       /* Useful constants */
+       //////////////////////////////////////////////////////////////////////////
+
+/* This is PI. Hi PI. */
+#define AI_MATH_PI                     (3.141592653589793238462643383279 )
+#define AI_MATH_TWO_PI         (AI_MATH_PI * 2.0)
+#define AI_MATH_HALF_PI                (AI_MATH_PI * 0.5)
+
+/* And this is to avoid endless casts to float */
+#define AI_MATH_PI_F           (3.1415926538f)
+#define AI_MATH_TWO_PI_F       (AI_MATH_PI_F * 2.0f)
+#define AI_MATH_HALF_PI_F      (AI_MATH_PI_F * 0.5f)
+
+/* Tiny macro to convert from radians to degrees and back */
+#define AI_DEG_TO_RAD(x) (x*0.0174532925f)
+#define AI_RAD_TO_DEG(x) (x*57.2957795f)
+
+/* Support for big-endian builds */
+#if defined(__BYTE_ORDER__)
+#      if (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__) 
+#              if !defined(__BIG_ENDIAN__)
+#                      define __BIG_ENDIAN__
+#              endif
+#      else /* little endian */
+#              if defined (__BIG_ENDIAN__)
+#                      undef __BIG_ENDIAN__
+#              endif
+#      endif
+#endif
+#if defined(__BIG_ENDIAN__)
+#      define AI_BUILD_BIG_ENDIAN
+#endif
+
+#endif // !! INCLUDED_AI_DEFINES_H
diff --git a/include/assimp/importerdesc.h b/include/assimp/importerdesc.h
new file mode 100644 (file)
index 0000000..0d93c3f
--- /dev/null
@@ -0,0 +1,136 @@
+/*
+---------------------------------------------------------------------------
+Open Asset Import Library (assimp)
+---------------------------------------------------------------------------
+
+Copyright (c) 2006-2012, assimp team
+
+All rights reserved.
+
+Redistribution and use of this software 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.
+
+* Neither the name of the assimp team, nor the names of its
+  contributors may be used to endorse or promote products
+  derived from this software without specific prior
+  written permission of the assimp team.
+
+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.
+---------------------------------------------------------------------------
+*/
+
+/** @file importerdesc.h
+ *  @brief #aiImporterFlags, aiImporterDesc implementation.
+ */
+#ifndef INCLUDED_AI_IMPORTER_DESC_H
+#define INCLUDED_AI_IMPORTER_DESC_H
+
+
+/** Mixed set of flags for #aiImporterDesc, indicating some features
+  *  common to many importers*/
+enum aiImporterFlags 
+{
+       /** Indicates that there is a textual encoding of the
+        *  file format; and that it is supported.*/
+       aiImporterFlags_SupportTextFlavour = 0x1,
+
+       /** Indicates that there is a binary encoding of the
+        *  file format; and that it is supported.*/
+       aiImporterFlags_SupportBinaryFlavour = 0x2,
+
+       /** Indicates that there is a compressed encoding of the
+        *  file format; and that it is supported.*/
+       aiImporterFlags_SupportCompressedFlavour = 0x4,
+
+       /** Indicates that the importer reads only a very particular
+         * subset of the file format. This happens commonly for
+         * declarative or procedural formats which cannot easily
+         * be mapped to #aiScene */
+       aiImporterFlags_LimitedSupport = 0x8,
+
+       /** Indicates that the importer is highly experimental and
+         * should be used with care. This only happens for trunk
+         * (i.e. SVN) versions, experimental code is not included
+         * in releases. */
+       aiImporterFlags_Experimental = 0x10,
+};
+
+
+/** Meta information about a particular importer. Importers need to fill
+ *  this structure, but they can freely decide how talkative they are. 
+ *  A common use case for loader meta info is a user interface
+ *  in which the user can choose between various import/export file
+ *  formats. Building such an UI by hand means a lot of maintenance
+ *  as importers/exporters are added to Assimp, so it might be useful
+ *  to have a common mechanism to query some rough importer
+ *  characteristics. */
+struct aiImporterDesc 
+{
+       /** Full name of the importer (i.e. Blender3D importer)*/
+       const char* mName;
+
+       /** Original author (left blank if unknown or whole assimp team) */
+       const char* mAuthor;
+
+       /** Current maintainer, left blank if the author maintains */
+       const char* mMaintainer;
+
+       /** Implementation comments, i.e. unimplemented features*/
+       const char* mComments;
+
+       /** Any combination of the #aiLoaderFlags enumerated values.
+           These flags indicate some characteristics common to many
+               importers. */
+       unsigned int mFlags;
+
+       /** Minimum format version that can be loaded im major.minor format,
+           both are set to 0 if there is either no version scheme 
+               or if the loader doesn't care. */
+       unsigned int mMinMajor;
+       unsigned int mMinMinor;
+
+       /** Maximum format version that can be loaded im major.minor format,
+           both are set to 0 if there is either no version scheme 
+               or if the loader doesn't care. Loaders that expect to be
+               forward-compatible to potential future format versions should 
+               indicate  zero, otherwise they should specify the current
+               maximum version.*/
+       unsigned int mMaxMajor;
+       unsigned int mMaxMinor;
+
+       /** List of file extensions this importer can handle.
+           List entries are separated by space characters.
+               All entries are lower case without a leading dot (i.e.
+               "xml dae" would be a valid value. Note that multiple
+               importers may respond to the same file extension -
+               assimp calls all importers in the order in which they
+               are registered and each importer gets the opportunity
+               to load the file until one importer "claims" the file. Apart
+               from file extension checks, importers typically use
+               other methods to quickly reject files (i.e. magic
+               words) so this does not mean that common or generic
+               file extensions such as XML would be tediously slow. */
+       const char* mFileExtensions;
+};
+
+#endif 
diff --git a/include/assimp/light.h b/include/assimp/light.h
new file mode 100644 (file)
index 0000000..81acecc
--- /dev/null
@@ -0,0 +1,233 @@
+/*
+---------------------------------------------------------------------------
+Open Asset Import Library (assimp)
+---------------------------------------------------------------------------
+
+Copyright (c) 2006-2012, assimp team
+
+All rights reserved.
+
+Redistribution and use of this software 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.
+
+* Neither the name of the assimp team, nor the names of its
+  contributors may be used to endorse or promote products
+  derived from this software without specific prior
+  written permission of the assimp team.
+
+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.
+---------------------------------------------------------------------------
+*/
+
+/** @file light.h
+ *  @brief Defines the aiLight data structure
+ */
+
+#ifndef __AI_LIGHT_H_INC__
+#define __AI_LIGHT_H_INC__
+
+#include "types.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+// ---------------------------------------------------------------------------
+/** Enumerates all supported types of light sources.
+ */
+enum aiLightSourceType
+{
+       aiLightSource_UNDEFINED     = 0x0,
+
+       //! A directional light source has a well-defined direction
+       //! but is infinitely far away. That's quite a good 
+       //! approximation for sun light.
+       aiLightSource_DIRECTIONAL   = 0x1,
+
+       //! A point light source has a well-defined position
+       //! in space but no direction - it emits light in all
+       //! directions. A normal bulb is a point light.
+       aiLightSource_POINT         = 0x2,
+
+       //! A spot light source emits light in a specific 
+       //! angle. It has a position and a direction it is pointing to.
+       //! A good example for a spot light is a light spot in
+       //! sport arenas.
+       aiLightSource_SPOT          = 0x3,
+
+
+       /** This value is not used. It is just there to force the
+        *  compiler to map this enum to a 32 Bit integer.
+        */
+#ifndef SWIG
+       _aiLightSource_Force32Bit = INT_MAX
+#endif
+};
+
+// ---------------------------------------------------------------------------
+/** Helper structure to describe a light source.
+ *
+ *  Assimp supports multiple sorts of light sources, including
+ *  directional, point and spot lights. All of them are defined with just
+ *  a single structure and distinguished by their parameters.
+ *  Note - some file formats (such as 3DS, ASE) export a "target point" -
+ *  the point a spot light is looking at (it can even be animated). Assimp
+ *  writes the target point as a subnode of a spotlights's main node,
+ *  called "<spotName>.Target". However, this is just additional information
+ *  then, the transformation tracks of the main node make the
+ *  spot light already point in the right direction.
+*/
+struct aiLight
+{
+       /** The name of the light source.
+        *
+        *  There must be a node in the scenegraph with the same name.
+        *  This node specifies the position of the light in the scene
+        *  hierarchy and can be animated.
+        */
+       C_STRUCT aiString mName;
+
+       /** The type of the light source.
+        *
+        * aiLightSource_UNDEFINED is not a valid value for this member.
+        */
+       C_ENUM aiLightSourceType mType;
+
+       /** Position of the light source in space. Relative to the
+        *  transformation of the node corresponding to the light.
+        *
+        *  The position is undefined for directional lights.
+        */
+       C_STRUCT aiVector3D mPosition;
+
+       /** Direction of the light source in space. Relative to the
+        *  transformation of the node corresponding to the light.
+        *
+        *  The direction is undefined for point lights. The vector
+        *  may be normalized, but it needn't.
+        */
+       C_STRUCT aiVector3D mDirection;
+
+       /** Constant light attenuation factor. 
+        *
+        *  The intensity of the light source at a given distance 'd' from
+        *  the light's position is
+        *  @code
+        *  Atten = 1/( att0 + att1 * d + att2 * d*d)
+        *  @endcode
+        *  This member corresponds to the att0 variable in the equation.
+        *  Naturally undefined for directional lights.
+        */
+       float mAttenuationConstant;
+
+       /** Linear light attenuation factor. 
+        *
+        *  The intensity of the light source at a given distance 'd' from
+        *  the light's position is
+        *  @code
+        *  Atten = 1/( att0 + att1 * d + att2 * d*d)
+        *  @endcode
+        *  This member corresponds to the att1 variable in the equation.
+        *  Naturally undefined for directional lights.
+        */
+       float mAttenuationLinear;
+
+       /** Quadratic light attenuation factor. 
+        *  
+        *  The intensity of the light source at a given distance 'd' from
+        *  the light's position is
+        *  @code
+        *  Atten = 1/( att0 + att1 * d + att2 * d*d)
+        *  @endcode
+        *  This member corresponds to the att2 variable in the equation.
+        *  Naturally undefined for directional lights.
+        */
+       float mAttenuationQuadratic;
+
+       /** Diffuse color of the light source
+        *
+        *  The diffuse light color is multiplied with the diffuse 
+        *  material color to obtain the final color that contributes
+        *  to the diffuse shading term.
+        */
+       C_STRUCT aiColor3D mColorDiffuse;
+
+       /** Specular color of the light source
+        *
+        *  The specular light color is multiplied with the specular
+        *  material color to obtain the final color that contributes
+        *  to the specular shading term.
+        */
+       C_STRUCT aiColor3D mColorSpecular;
+
+       /** Ambient color of the light source
+        *
+        *  The ambient light color is multiplied with the ambient
+        *  material color to obtain the final color that contributes
+        *  to the ambient shading term. Most renderers will ignore
+        *  this value it, is just a remaining of the fixed-function pipeline
+        *  that is still supported by quite many file formats.
+        */
+       C_STRUCT aiColor3D mColorAmbient;
+
+       /** Inner angle of a spot light's light cone.
+        *
+        *  The spot light has maximum influence on objects inside this
+        *  angle. The angle is given in radians. It is 2PI for point 
+        *  lights and undefined for directional lights.
+        */
+       float mAngleInnerCone;
+
+       /** Outer angle of a spot light's light cone.
+        *
+        *  The spot light does not affect objects outside this angle.
+        *  The angle is given in radians. It is 2PI for point lights and 
+        *  undefined for directional lights. The outer angle must be
+        *  greater than or equal to the inner angle.
+        *  It is assumed that the application uses a smooth
+        *  interpolation between the inner and the outer cone of the
+        *  spot light. 
+        */
+       float mAngleOuterCone;
+
+#ifdef __cplusplus
+
+       aiLight()
+               :       mType                 (aiLightSource_UNDEFINED)
+               ,       mAttenuationConstant  (0.f)
+               ,   mAttenuationLinear    (1.f)
+               ,   mAttenuationQuadratic (0.f)
+               ,       mAngleInnerCone       ((float)AI_MATH_TWO_PI)
+               ,       mAngleOuterCone       ((float)AI_MATH_TWO_PI)
+       {
+       }
+
+#endif
+};
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif // !! __AI_LIGHT_H_INC__
diff --git a/include/assimp/material.h b/include/assimp/material.h
new file mode 100644 (file)
index 0000000..daf6a8e
--- /dev/null
@@ -0,0 +1,1572 @@
+/*
+---------------------------------------------------------------------------
+Open Asset Import Library (assimp)
+---------------------------------------------------------------------------
+
+Copyright (c) 2006-2012, assimp team
+
+All rights reserved.
+
+Redistribution and use of this software 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.
+
+* Neither the name of the assimp team, nor the names of its
+  contributors may be used to endorse or promote products
+  derived from this software without specific prior
+  written permission of the assimp team.
+
+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.
+---------------------------------------------------------------------------
+*/
+
+/** @file material.h
+ *  @brief Defines the material system of the library
+ */
+
+#ifndef AI_MATERIAL_H_INC
+#define AI_MATERIAL_H_INC
+
+#include "types.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+// Name for default materials (2nd is used if meshes have UV coords)
+#define AI_DEFAULT_MATERIAL_NAME          "DefaultMaterial"
+
+// ---------------------------------------------------------------------------
+/** @brief Defines how the Nth texture of a specific type is combined with
+ *  the result of all previous layers.
+ *
+ *  Example (left: key, right: value): <br>
+ *  @code
+ *  DiffColor0     - gray
+ *  DiffTextureOp0 - aiTextureOpMultiply
+ *  DiffTexture0   - tex1.png
+ *  DiffTextureOp0 - aiTextureOpAdd
+ *  DiffTexture1   - tex2.png
+ *  @endcode
+ *  Written as equation, the final diffuse term for a specific pixel would be: 
+ *  @code
+ *  diffFinal = DiffColor0 * sampleTex(DiffTexture0,UV0) + 
+ *     sampleTex(DiffTexture1,UV0) * diffContrib;
+ *  @endcode
+ *  where 'diffContrib' is the intensity of the incoming light for that pixel.
+ */
+enum aiTextureOp
+{
+       /** T = T1 * T2 */
+       aiTextureOp_Multiply = 0x0,
+
+       /** T = T1 + T2 */
+       aiTextureOp_Add = 0x1,
+
+       /** T = T1 - T2 */
+       aiTextureOp_Subtract = 0x2,
+
+       /** T = T1 / T2 */
+       aiTextureOp_Divide = 0x3,
+
+       /** T = (T1 + T2) - (T1 * T2) */
+       aiTextureOp_SmoothAdd = 0x4,
+
+       /** T = T1 + (T2-0.5) */
+       aiTextureOp_SignedAdd = 0x5,
+
+
+       /** @cond never 
+        *  This value is not used. It forces the compiler to use at least
+        *  32 Bit integers to represent this enum.
+        */
+#ifndef SWIG
+       _aiTextureOp_Force32Bit = INT_MAX
+#endif
+       //! @endcond
+};
+
+// ---------------------------------------------------------------------------
+/** @brief Defines how UV coordinates outside the [0...1] range are handled.
+ *
+ *  Commonly refered to as 'wrapping mode'.
+ */
+enum aiTextureMapMode
+{
+    /** A texture coordinate u|v is translated to u%1|v%1 
+     */
+    aiTextureMapMode_Wrap = 0x0,
+
+    /** Texture coordinates outside [0...1]
+     *  are clamped to the nearest valid value.
+     */
+    aiTextureMapMode_Clamp = 0x1,
+
+       /** If the texture coordinates for a pixel are outside [0...1]
+        *  the texture is not applied to that pixel
+     */
+    aiTextureMapMode_Decal = 0x3,
+
+    /** A texture coordinate u|v becomes u%1|v%1 if (u-(u%1))%2 is zero and
+     *  1-(u%1)|1-(v%1) otherwise
+     */
+    aiTextureMapMode_Mirror = 0x2,
+
+        /** @cond never 
+         *  This value is not used. It forces the compiler to use at least
+         *  32 Bit integers to represent this enum.
+         */
+#ifndef SWIG
+       _aiTextureMapMode_Force32Bit = INT_MAX
+#endif
+       //! @endcond
+};
+
+// ---------------------------------------------------------------------------
+/** @brief Defines how the mapping coords for a texture are generated.
+ *
+ *  Real-time applications typically require full UV coordinates, so the use of
+ *  the aiProcess_GenUVCoords step is highly recommended. It generates proper
+ *  UV channels for non-UV mapped objects, as long as an accurate description
+ *  how the mapping should look like (e.g spherical) is given.
+ *  See the #AI_MATKEY_MAPPING property for more details.
+ */
+enum aiTextureMapping
+{
+    /** The mapping coordinates are taken from an UV channel.
+        *
+        *  The #AI_MATKEY_UVWSRC key specifies from which UV channel
+        *  the texture coordinates are to be taken from (remember,
+        *  meshes can have more than one UV channel). 
+    */
+    aiTextureMapping_UV = 0x0,
+
+        /** Spherical mapping */
+    aiTextureMapping_SPHERE = 0x1,
+
+        /** Cylindrical mapping */
+    aiTextureMapping_CYLINDER = 0x2,
+
+        /** Cubic mapping */
+    aiTextureMapping_BOX = 0x3,
+
+        /** Planar mapping */
+    aiTextureMapping_PLANE = 0x4,
+
+        /** Undefined mapping. Have fun. */
+    aiTextureMapping_OTHER = 0x5,
+
+
+        /** @cond never 
+         *  This value is not used. It forces the compiler to use at least
+         *  32 Bit integers to represent this enum.
+         */
+#ifndef SWIG
+       _aiTextureMapping_Force32Bit = INT_MAX
+#endif
+       //! @endcond
+};
+
+// ---------------------------------------------------------------------------
+/** @brief Defines the purpose of a texture 
+ *
+ *  This is a very difficult topic. Different 3D packages support different
+ *  kinds of textures. For very common texture types, such as bumpmaps, the
+ *  rendering results depend on implementation details in the rendering 
+ *  pipelines of these applications. Assimp loads all texture references from
+ *  the model file and tries to determine which of the predefined texture
+ *  types below is the best choice to match the original use of the texture
+ *  as closely as possible.<br>
+ *  
+ *  In content pipelines you'll usually define how textures have to be handled,
+ *  and the artists working on models have to conform to this specification,
+ *  regardless which 3D tool they're using.
+ */
+enum aiTextureType
+{
+       /** Dummy value.
+        *
+        *  No texture, but the value to be used as 'texture semantic' 
+        *  (#aiMaterialProperty::mSemantic) for all material properties 
+        *  *not* related to textures.
+        */
+       aiTextureType_NONE = 0x0,
+
+
+
+    /** The texture is combined with the result of the diffuse
+        *  lighting equation.
+     */
+    aiTextureType_DIFFUSE = 0x1,
+
+       /** The texture is combined with the result of the specular
+        *  lighting equation.
+     */
+    aiTextureType_SPECULAR = 0x2,
+
+       /** The texture is combined with the result of the ambient
+        *  lighting equation.
+     */
+    aiTextureType_AMBIENT = 0x3,
+
+       /** The texture is added to the result of the lighting
+        *  calculation. It isn't influenced by incoming light.
+     */
+    aiTextureType_EMISSIVE = 0x4,
+
+       /** The texture is a height map.
+        *
+        *  By convention, higher gray-scale values stand for
+        *  higher elevations from the base height.
+     */
+    aiTextureType_HEIGHT = 0x5,
+
+       /** The texture is a (tangent space) normal-map.
+        *
+        *  Again, there are several conventions for tangent-space
+        *  normal maps. Assimp does (intentionally) not 
+        *  distinguish here.
+     */
+    aiTextureType_NORMALS = 0x6,
+
+       /** The texture defines the glossiness of the material.
+        *
+        *  The glossiness is in fact the exponent of the specular
+        *  (phong) lighting equation. Usually there is a conversion
+        *  function defined to map the linear color values in the
+        *  texture to a suitable exponent. Have fun.
+    */
+    aiTextureType_SHININESS = 0x7,
+
+       /** The texture defines per-pixel opacity.
+        *
+        *  Usually 'white' means opaque and 'black' means 
+        *  'transparency'. Or quite the opposite. Have fun.
+    */
+    aiTextureType_OPACITY = 0x8,
+
+       /** Displacement texture
+        *
+        *  The exact purpose and format is application-dependent.
+     *  Higher color values stand for higher vertex displacements.
+    */
+    aiTextureType_DISPLACEMENT = 0x9,
+
+       /** Lightmap texture (aka Ambient Occlusion)
+        *
+        *  Both 'Lightmaps' and dedicated 'ambient occlusion maps' are
+        *  covered by this material property. The texture contains a
+        *  scaling value for the final color value of a pixel. Its
+        *  intensity is not affected by incoming light.
+    */
+    aiTextureType_LIGHTMAP = 0xA,
+
+       /** Reflection texture
+        *
+        * Contains the color of a perfect mirror reflection.
+        * Rarely used, almost never for real-time applications.
+    */
+    aiTextureType_REFLECTION = 0xB,
+
+       /** Unknown texture
+        *
+        *  A texture reference that does not match any of the definitions 
+        *  above is considered to be 'unknown'. It is still imported,
+        *  but is excluded from any further postprocessing.
+    */
+    aiTextureType_UNKNOWN = 0xC,
+
+
+        /** @cond never 
+         *  This value is not used. It forces the compiler to use at least
+         *  32 Bit integers to represent this enum.
+         */
+#ifndef SWIG
+       _aiTextureType_Force32Bit = INT_MAX
+#endif
+       //! @endcond
+};
+
+#define AI_TEXTURE_TYPE_MAX  aiTextureType_UNKNOWN
+
+// ---------------------------------------------------------------------------
+/** @brief Defines all shading models supported by the library
+ *
+ *  The list of shading modes has been taken from Blender.
+ *  See Blender documentation for more information. The API does
+ *  not distinguish between "specular" and "diffuse" shaders (thus the
+ *  specular term for diffuse shading models like Oren-Nayar remains
+ *  undefined). <br>
+ *  Again, this value is just a hint. Assimp tries to select the shader whose
+ *  most common implementation matches the original rendering results of the
+ *  3D modeller which wrote a particular model as closely as possible.
+ */
+enum aiShadingMode
+{
+    /** Flat shading. Shading is done on per-face base, 
+     *  diffuse only. Also known as 'faceted shading'.
+     */
+    aiShadingMode_Flat = 0x1,
+
+    /** Simple Gouraud shading. 
+     */
+    aiShadingMode_Gouraud =    0x2,
+
+    /** Phong-Shading -
+     */
+    aiShadingMode_Phong = 0x3,
+
+    /** Phong-Blinn-Shading
+     */
+    aiShadingMode_Blinn        = 0x4,
+
+    /** Toon-Shading per pixel
+     *
+        *  Also known as 'comic' shader.
+     */
+    aiShadingMode_Toon = 0x5,
+
+    /** OrenNayar-Shading per pixel
+     *
+     *  Extension to standard Lambertian shading, taking the
+     *  roughness of the material into account
+     */
+    aiShadingMode_OrenNayar = 0x6,
+
+    /** Minnaert-Shading per pixel
+     *
+     *  Extension to standard Lambertian shading, taking the
+     *  "darkness" of the material into account
+     */
+    aiShadingMode_Minnaert = 0x7,
+
+    /** CookTorrance-Shading per pixel
+        *
+        *  Special shader for metallic surfaces.
+     */
+    aiShadingMode_CookTorrance = 0x8,
+
+    /** No shading at all. Constant light influence of 1.0.
+    */
+    aiShadingMode_NoShading = 0x9,
+
+        /** Fresnel shading
+     */
+    aiShadingMode_Fresnel = 0xa,
+
+
+        /** @cond never 
+         *  This value is not used. It forces the compiler to use at least
+         *  32 Bit integers to represent this enum.
+         */
+#ifndef SWIG
+       _aiShadingMode_Force32Bit = INT_MAX
+#endif
+       //! @endcond
+};
+
+
+// ---------------------------------------------------------------------------
+/** @brief Defines some mixed flags for a particular texture.
+ *
+ *  Usually you'll instruct your cg artists how textures have to look like ...
+ *  and how they will be processed in your application. However, if you use
+ *  Assimp for completely generic loading purposes you might also need to 
+ *  process these flags in order to display as many 'unknown' 3D models as 
+ *  possible correctly.
+ *
+ *  This corresponds to the #AI_MATKEY_TEXFLAGS property.
+*/
+enum aiTextureFlags
+{
+       /** The texture's color values have to be inverted (componentwise 1-n)
+        */
+       aiTextureFlags_Invert = 0x1,
+
+       /** Explicit request to the application to process the alpha channel
+        *  of the texture.
+        *
+        *  Mutually exclusive with #aiTextureFlags_IgnoreAlpha. These
+        *  flags are set if the library can say for sure that the alpha
+        *  channel is used/is not used. If the model format does not
+        *  define this, it is left to the application to decide whether
+        *  the texture alpha channel - if any - is evaluated or not.
+        */
+       aiTextureFlags_UseAlpha = 0x2,
+
+       /** Explicit request to the application to ignore the alpha channel
+        *  of the texture.
+        *
+        *  Mutually exclusive with #aiTextureFlags_UseAlpha. 
+        */
+       aiTextureFlags_IgnoreAlpha = 0x4,
+       
+        /** @cond never 
+         *  This value is not used. It forces the compiler to use at least
+         *  32 Bit integers to represent this enum.
+         */
+#ifndef SWIG
+         _aiTextureFlags_Force32Bit = INT_MAX
+#endif
+       //! @endcond
+};
+
+
+// ---------------------------------------------------------------------------
+/** @brief Defines alpha-blend flags.
+ *
+ *  If you're familiar with OpenGL or D3D, these flags aren't new to you.
+ *  They define *how* the final color value of a pixel is computed, basing
+ *  on the previous color at that pixel and the new color value from the
+ *  material.
+ *  The blend formula is:
+ *  @code
+ *    SourceColor * SourceBlend + DestColor * DestBlend
+ *  @endcode
+ *  where <DestColor> is the previous color in the framebuffer at this
+ *  position and <SourceColor> is the material colro before the transparency
+ *  calculation.<br>
+ *  This corresponds to the #AI_MATKEY_BLEND_FUNC property.
+*/
+enum aiBlendMode
+{
+       /** 
+        *  Formula:
+        *  @code
+        *  SourceColor*SourceAlpha + DestColor*(1-SourceAlpha)
+        *  @endcode
+        */
+       aiBlendMode_Default = 0x0,
+
+       /** Additive blending
+        *
+        *  Formula:
+        *  @code
+        *  SourceColor*1 + DestColor*1
+        *  @endcode
+        */
+       aiBlendMode_Additive = 0x1,
+
+       // we don't need more for the moment, but we might need them
+       // in future versions ...
+
+        /** @cond never 
+         *  This value is not used. It forces the compiler to use at least
+         *  32 Bit integers to represent this enum.
+         */
+#ifndef SWIG
+       _aiBlendMode_Force32Bit = INT_MAX
+#endif
+       //! @endcond
+};
+
+
+#include "./Compiler/pushpack1.h"
+
+// ---------------------------------------------------------------------------
+/** @brief Defines how an UV channel is transformed.
+ *
+ *  This is just a helper structure for the #AI_MATKEY_UVTRANSFORM key.
+ *  See its documentation for more details. 
+ *
+ *  Typically you'll want to build a matrix of this information. However,
+ *  we keep separate scaling/translation/rotation values to make it
+ *  easier to process and optimize UV transformations internally.
+ */
+struct aiUVTransform
+{
+       /** Translation on the u and v axes. 
+        *
+        *  The default value is (0|0).
+        */
+       C_STRUCT aiVector2D mTranslation;
+
+       /** Scaling on the u and v axes. 
+        *
+        *  The default value is (1|1).
+        */
+       C_STRUCT aiVector2D mScaling;
+
+       /** Rotation - in counter-clockwise direction.
+        *
+        *  The rotation angle is specified in radians. The
+        *  rotation center is 0.5f|0.5f. The default value
+     *  0.f.
+        */
+       float mRotation;
+
+
+#ifdef __cplusplus
+       aiUVTransform()
+               :       mScaling        (1.f,1.f)
+               ,       mRotation       (0.f)
+       {
+               // nothing to be done here ...
+       }
+#endif
+
+} PACK_STRUCT;
+
+#include "./Compiler/poppack1.h"
+
+//! @cond AI_DOX_INCLUDE_INTERNAL
+// ---------------------------------------------------------------------------
+/** @brief A very primitive RTTI system for the contents of material 
+ *  properties.
+ */
+enum aiPropertyTypeInfo
+{
+    /** Array of single-precision (32 Bit) floats
+        *
+        *  It is possible to use aiGetMaterialInteger[Array]() (or the C++-API 
+        *  aiMaterial::Get()) to query properties stored in floating-point format. 
+        *  The material system performs the type conversion automatically.
+    */
+    aiPTI_Float   = 0x1,
+
+    /** The material property is an aiString.
+        *
+        *  Arrays of strings aren't possible, aiGetMaterialString() (or the 
+        *  C++-API aiMaterial::Get()) *must* be used to query a string property.
+    */
+    aiPTI_String  = 0x3,
+
+    /** Array of (32 Bit) integers
+        *
+        *  It is possible to use aiGetMaterialFloat[Array]() (or the C++-API 
+        *  aiMaterial::Get()) to query properties stored in integer format. 
+        *  The material system performs the type conversion automatically.
+    */
+    aiPTI_Integer = 0x4,
+
+
+    /** Simple binary buffer, content undefined. Not convertible to anything.
+    */
+    aiPTI_Buffer  = 0x5,
+
+
+        /** This value is not used. It is just there to force the
+        *  compiler to map this enum to a 32 Bit integer.
+        */
+#ifndef SWIG
+        _aiPTI_Force32Bit = INT_MAX
+#endif
+};
+
+// ---------------------------------------------------------------------------
+/** @brief Data structure for a single material property
+ *
+ *  As an user, you'll probably never need to deal with this data structure.
+ *  Just use the provided aiGetMaterialXXX() or aiMaterial::Get() family
+ *  of functions to query material properties easily. Processing them 
+ *  manually is faster, but it is not the recommended way. It isn't worth
+ *  the effort. <br>
+ *  Material property names follow a simple scheme:
+ *  @code
+ *    $<name>
+ *    ?<name>
+ *       A public property, there must be corresponding AI_MATKEY_XXX define
+ *       2nd: Public, but ignored by the #aiProcess_RemoveRedundantMaterials 
+ *       post-processing step.
+ *    ~<name>
+ *       A temporary property for internal use. 
+ *  @endcode
+ *  @see aiMaterial
+ */
+struct aiMaterialProperty
+{
+    /** Specifies the name of the property (key)
+     *  Keys are generally case insensitive. 
+     */
+    C_STRUCT aiString mKey;
+
+       /** Textures: Specifies their exact usage semantic.
+        * For non-texture properties, this member is always 0 
+        * (or, better-said, #aiTextureType_NONE).
+        */
+       unsigned int mSemantic;
+
+       /** Textures: Specifies the index of the texture.
+        *  For non-texture properties, this member is always 0.
+        */
+       unsigned int mIndex;
+
+    /**        Size of the buffer mData is pointing to, in bytes.
+        *  This value may not be 0.
+     */
+    unsigned int mDataLength;
+
+    /** Type information for the property.
+     *
+     * Defines the data layout inside the data buffer. This is used
+        * by the library internally to perform debug checks and to 
+        * utilize proper type conversions. 
+        * (It's probably a hacky solution, but it works.)
+     */
+    C_ENUM aiPropertyTypeInfo mType;
+
+    /**        Binary buffer to hold the property's value.
+     * The size of the buffer is always mDataLength.
+     */
+    char* mData;
+
+#ifdef __cplusplus
+
+       aiMaterialProperty()
+               : mSemantic( 0 )
+               , mIndex( 0 )
+               , mDataLength( 0 )
+               , mType( aiPTI_Float )
+               , mData( NULL )
+       {
+       }
+
+       ~aiMaterialProperty()   {
+               delete[] mData;
+       }
+
+#endif
+};
+//! @endcond
+
+#ifdef __cplusplus
+} // We need to leave the "C" block here to allow template member functions
+#endif
+
+// ---------------------------------------------------------------------------
+/** @brief Data structure for a material
+*
+*  Material data is stored using a key-value structure. A single key-value
+*  pair is called a 'material property'. C++ users should use the provided
+*  member functions of aiMaterial to process material properties, C users
+*  have to stick with the aiMaterialGetXXX family of unbound functions.
+*  The library defines a set of standard keys (AI_MATKEY_XXX).
+*/
+#ifdef __cplusplus
+struct ASSIMP_API aiMaterial
+#else
+struct aiMaterial
+#endif
+{
+
+#ifdef __cplusplus
+
+public:
+
+       aiMaterial();
+       ~aiMaterial();
+
+       // -------------------------------------------------------------------
+    /** @brief Retrieve an array of Type values with a specific key 
+     *  from the material
+     *
+     * @param pKey Key to search for. One of the AI_MATKEY_XXX constants.
+     * @param type .. set by AI_MATKEY_XXX
+     * @param idx .. set by AI_MATKEY_XXX
+     * @param pOut Pointer to a buffer to receive the result. 
+     * @param pMax Specifies the size of the given buffer, in Type's.
+     * Receives the number of values (not bytes!) read. 
+     * NULL is a valid value for this parameter.
+     */
+    template <typename Type>
+    aiReturn Get(const char* pKey,unsigned int type,
+               unsigned int idx, Type* pOut, unsigned int* pMax) const;
+
+       aiReturn Get(const char* pKey,unsigned int type,
+               unsigned int idx, int* pOut, unsigned int* pMax) const;
+
+       aiReturn Get(const char* pKey,unsigned int type,
+               unsigned int idx, float* pOut, unsigned int* pMax) const;
+
+    // -------------------------------------------------------------------
+    /** @brief Retrieve a Type value with a specific key 
+     *  from the material
+        *
+        * @param pKey Key to search for. One of the AI_MATKEY_XXX constants.
+    * @param type Specifies the type of the texture to be retrieved (
+    *    e.g. diffuse, specular, height map ...)
+    * @param idx Index of the texture to be retrieved.
+        * @param pOut Reference to receive the output value
+        */
+       template <typename Type>
+       aiReturn Get(const char* pKey,unsigned int type,
+               unsigned int idx,Type& pOut) const;
+
+
+       aiReturn Get(const char* pKey,unsigned int type,
+               unsigned int idx, int& pOut) const;
+
+       aiReturn Get(const char* pKey,unsigned int type,
+               unsigned int idx, float& pOut) const;
+
+       aiReturn Get(const char* pKey,unsigned int type,
+               unsigned int idx, aiString& pOut) const;
+
+       aiReturn Get(const char* pKey,unsigned int type,
+               unsigned int idx, aiColor3D& pOut) const;
+
+       aiReturn Get(const char* pKey,unsigned int type,
+               unsigned int idx, aiColor4D& pOut) const;
+
+       aiReturn Get(const char* pKey,unsigned int type,
+               unsigned int idx, aiUVTransform& pOut) const;
+
+       // -------------------------------------------------------------------
+       /** Get the number of textures for a particular texture type.
+        *  @param type Texture type to check for
+        *  @return Number of textures for this type.
+        *  @note A texture can be easily queried using #GetTexture() */
+       unsigned int GetTextureCount(aiTextureType type) const;
+
+       // -------------------------------------------------------------------
+       /** Helper function to get all parameters pertaining to a 
+        *  particular texture slot from a material.
+       *
+       *  This function is provided just for convenience, you could also
+       *  read the single material properties manually.
+       *  @param type Specifies the type of the texture to be retrieved (
+       *    e.g. diffuse, specular, height map ...)
+       *  @param index Index of the texture to be retrieved. The function fails
+       *    if there is no texture of that type with this index. 
+       *    #GetTextureCount() can be used to determine the number of textures
+       *    per texture type.
+       *  @param path Receives the path to the texture.
+       *        NULL is a valid value.
+   *  @param mapping The texture mapping.
+   *           NULL is allowed as value.
+       *  @param uvindex Receives the UV index of the texture. 
+       *    NULL is a valid value.
+       *  @param blend Receives the blend factor for the texture
+       *        NULL is a valid value.
+       *  @param op Receives the texture operation to be performed between
+       *        this texture and the previous texture. NULL is allowed as value.
+       *  @param mapmode Receives the mapping modes to be used for the texture.
+       *    The parameter may be NULL but if it is a valid pointer it MUST
+       *    point to an array of 3 aiTextureMapMode's (one for each
+       *    axis: UVW order (=XYZ)). 
+       */
+       // -------------------------------------------------------------------
+       aiReturn GetTexture(aiTextureType type,
+               unsigned int  index,
+               C_STRUCT aiString* path,
+               aiTextureMapping* mapping       = NULL,
+               unsigned int* uvindex           = NULL,
+               float* blend                               = NULL,
+               aiTextureOp* op                         = NULL,
+               aiTextureMapMode* mapmode       = NULL) const; 
+
+
+       // Setters
+
+
+       // ------------------------------------------------------------------------------
+       /** @brief Add a property with a given key and type info to the material
+        *  structure 
+        *
+        *  @param pInput Pointer to input data
+        *  @param pSizeInBytes Size of input data
+        *  @param pKey Key/Usage of the property (AI_MATKEY_XXX)
+        *  @param type Set by the AI_MATKEY_XXX macro
+        *  @param index Set by the AI_MATKEY_XXX macro
+        *  @param pType Type information hint */
+       aiReturn AddBinaryProperty (const void* pInput,
+               unsigned int pSizeInBytes,
+               const char* pKey,
+               unsigned int type ,
+               unsigned int index ,
+               aiPropertyTypeInfo pType);
+
+       // ------------------------------------------------------------------------------
+       /** @brief Add a string property with a given key and type info to the 
+        *  material structure 
+        *
+        *  @param pInput Input string
+        *  @param pKey Key/Usage of the property (AI_MATKEY_XXX)
+        *  @param type Set by the AI_MATKEY_XXX macro
+        *  @param index Set by the AI_MATKEY_XXX macro */
+       aiReturn AddProperty (const aiString* pInput,
+               const char* pKey,
+               unsigned int type  = 0,
+               unsigned int index = 0);
+
+       // ------------------------------------------------------------------------------
+       /** @brief Add a property with a given key to the material structure 
+        *  @param pInput Pointer to the input data
+        *  @param pNumValues Number of values in the array
+        *  @param pKey Key/Usage of the property (AI_MATKEY_XXX)
+        *  @param type Set by the AI_MATKEY_XXX macro
+        *  @param index Set by the AI_MATKEY_XXX macro  */
+       template<class TYPE>
+       aiReturn AddProperty (const TYPE* pInput,
+               unsigned int pNumValues,
+               const char* pKey,
+               unsigned int type  = 0,
+               unsigned int index = 0);
+
+       aiReturn AddProperty (const aiVector3D* pInput,
+               unsigned int pNumValues,
+               const char* pKey,
+               unsigned int type  = 0,
+               unsigned int index = 0);
+
+       aiReturn AddProperty (const aiColor3D* pInput,
+               unsigned int pNumValues,
+               const char* pKey,
+               unsigned int type  = 0,
+               unsigned int index = 0);
+
+       aiReturn AddProperty (const aiColor4D* pInput,
+               unsigned int pNumValues,
+               const char* pKey,
+               unsigned int type  = 0,
+               unsigned int index = 0);
+
+       aiReturn AddProperty (const int* pInput,
+               unsigned int pNumValues,
+               const char* pKey,
+               unsigned int type  = 0,
+               unsigned int index = 0);
+
+       aiReturn AddProperty (const float* pInput,
+               unsigned int pNumValues,
+               const char* pKey,
+               unsigned int type  = 0,
+               unsigned int index = 0);
+
+       aiReturn AddProperty (const aiUVTransform* pInput,
+               unsigned int pNumValues,
+               const char* pKey,
+               unsigned int type  = 0,
+               unsigned int index = 0);
+
+       // ------------------------------------------------------------------------------
+       /** @brief Remove a given key from the list.
+        *
+        *  The function fails if the key isn't found
+        *  @param pKey Key to be deleted */
+       aiReturn RemoveProperty (const char* pKey,
+               unsigned int type  = 0,
+               unsigned int index = 0);
+
+       // ------------------------------------------------------------------------------
+       /** @brief Removes all properties from the material.
+        *
+        *  The data array remains allocated so adding new properties is quite fast.  */
+       void Clear();
+
+       // ------------------------------------------------------------------------------
+       /** Copy the property list of a material
+        *  @param pcDest Destination material
+        *  @param pcSrc Source material
+        */
+       static void CopyPropertyList(aiMaterial* pcDest, 
+               const aiMaterial* pcSrc);
+
+
+#endif
+
+    /** List of all material properties loaded. */
+    C_STRUCT aiMaterialProperty** mProperties;
+
+    /** Number of properties in the data base */
+    unsigned int mNumProperties;
+
+        /** Storage allocated */
+    unsigned int mNumAllocated;
+};
+
+// Go back to extern "C" again
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+// ---------------------------------------------------------------------------
+#define AI_MATKEY_NAME "?mat.name",0,0
+#define AI_MATKEY_TWOSIDED "$mat.twosided",0,0
+#define AI_MATKEY_SHADING_MODEL "$mat.shadingm",0,0
+#define AI_MATKEY_ENABLE_WIREFRAME "$mat.wireframe",0,0
+#define AI_MATKEY_BLEND_FUNC "$mat.blend",0,0
+#define AI_MATKEY_OPACITY "$mat.opacity",0,0
+#define AI_MATKEY_BUMPSCALING "$mat.bumpscaling",0,0
+#define AI_MATKEY_SHININESS "$mat.shininess",0,0
+#define AI_MATKEY_REFLECTIVITY "$mat.reflectivity",0,0
+#define AI_MATKEY_SHININESS_STRENGTH "$mat.shinpercent",0,0
+#define AI_MATKEY_REFRACTI "$mat.refracti",0,0
+#define AI_MATKEY_COLOR_DIFFUSE "$clr.diffuse",0,0
+#define AI_MATKEY_COLOR_AMBIENT "$clr.ambient",0,0
+#define AI_MATKEY_COLOR_SPECULAR "$clr.specular",0,0
+#define AI_MATKEY_COLOR_EMISSIVE "$clr.emissive",0,0
+#define AI_MATKEY_COLOR_TRANSPARENT "$clr.transparent",0,0
+#define AI_MATKEY_COLOR_REFLECTIVE "$clr.reflective",0,0
+#define AI_MATKEY_GLOBAL_BACKGROUND_IMAGE "?bg.global",0,0
+
+// ---------------------------------------------------------------------------
+// Pure key names for all texture-related properties
+//! @cond MATS_DOC_FULL
+#define _AI_MATKEY_TEXTURE_BASE                        "$tex.file"
+#define _AI_MATKEY_UVWSRC_BASE                 "$tex.uvwsrc"
+#define _AI_MATKEY_TEXOP_BASE                  "$tex.op"
+#define _AI_MATKEY_MAPPING_BASE                        "$tex.mapping"
+#define _AI_MATKEY_TEXBLEND_BASE               "$tex.blend"
+#define _AI_MATKEY_MAPPINGMODE_U_BASE  "$tex.mapmodeu"
+#define _AI_MATKEY_MAPPINGMODE_V_BASE  "$tex.mapmodev"
+#define _AI_MATKEY_TEXMAP_AXIS_BASE            "$tex.mapaxis"
+#define _AI_MATKEY_UVTRANSFORM_BASE            "$tex.uvtrafo"
+#define _AI_MATKEY_TEXFLAGS_BASE               "$tex.flags"
+//! @endcond
+
+// ---------------------------------------------------------------------------
+#define AI_MATKEY_TEXTURE(type, N) _AI_MATKEY_TEXTURE_BASE,type,N
+
+// For backward compatibility and simplicity
+//! @cond MATS_DOC_FULL
+#define AI_MATKEY_TEXTURE_DIFFUSE(N)   \
+       AI_MATKEY_TEXTURE(aiTextureType_DIFFUSE,N)
+
+#define AI_MATKEY_TEXTURE_SPECULAR(N)  \
+       AI_MATKEY_TEXTURE(aiTextureType_SPECULAR,N)
+
+#define AI_MATKEY_TEXTURE_AMBIENT(N)   \
+       AI_MATKEY_TEXTURE(aiTextureType_AMBIENT,N)
+
+#define AI_MATKEY_TEXTURE_EMISSIVE(N)  \
+       AI_MATKEY_TEXTURE(aiTextureType_EMISSIVE,N)
+
+#define AI_MATKEY_TEXTURE_NORMALS(N)   \
+       AI_MATKEY_TEXTURE(aiTextureType_NORMALS,N)
+
+#define AI_MATKEY_TEXTURE_HEIGHT(N)    \
+       AI_MATKEY_TEXTURE(aiTextureType_HEIGHT,N)
+
+#define AI_MATKEY_TEXTURE_SHININESS(N) \
+       AI_MATKEY_TEXTURE(aiTextureType_SHININESS,N)
+
+#define AI_MATKEY_TEXTURE_OPACITY(N)   \
+       AI_MATKEY_TEXTURE(aiTextureType_OPACITY,N)
+
+#define AI_MATKEY_TEXTURE_DISPLACEMENT(N)      \
+       AI_MATKEY_TEXTURE(aiTextureType_DISPLACEMENT,N)
+
+#define AI_MATKEY_TEXTURE_LIGHTMAP(N)  \
+       AI_MATKEY_TEXTURE(aiTextureType_LIGHTMAP,N)
+
+#define AI_MATKEY_TEXTURE_REFLECTION(N)        \
+       AI_MATKEY_TEXTURE(aiTextureType_REFLECTION,N)
+
+//! @endcond
+
+// ---------------------------------------------------------------------------
+#define AI_MATKEY_UVWSRC(type, N) _AI_MATKEY_UVWSRC_BASE,type,N
+
+// For backward compatibility and simplicity
+//! @cond MATS_DOC_FULL
+#define AI_MATKEY_UVWSRC_DIFFUSE(N)    \
+       AI_MATKEY_UVWSRC(aiTextureType_DIFFUSE,N)
+
+#define AI_MATKEY_UVWSRC_SPECULAR(N)   \
+       AI_MATKEY_UVWSRC(aiTextureType_SPECULAR,N)
+
+#define AI_MATKEY_UVWSRC_AMBIENT(N)    \
+       AI_MATKEY_UVWSRC(aiTextureType_AMBIENT,N)
+
+#define AI_MATKEY_UVWSRC_EMISSIVE(N)   \
+       AI_MATKEY_UVWSRC(aiTextureType_EMISSIVE,N)
+
+#define AI_MATKEY_UVWSRC_NORMALS(N)    \
+       AI_MATKEY_UVWSRC(aiTextureType_NORMALS,N)
+
+#define AI_MATKEY_UVWSRC_HEIGHT(N)     \
+       AI_MATKEY_UVWSRC(aiTextureType_HEIGHT,N)
+
+#define AI_MATKEY_UVWSRC_SHININESS(N)  \
+       AI_MATKEY_UVWSRC(aiTextureType_SHININESS,N)
+
+#define AI_MATKEY_UVWSRC_OPACITY(N)    \
+       AI_MATKEY_UVWSRC(aiTextureType_OPACITY,N)
+
+#define AI_MATKEY_UVWSRC_DISPLACEMENT(N)       \
+       AI_MATKEY_UVWSRC(aiTextureType_DISPLACEMENT,N)
+
+#define AI_MATKEY_UVWSRC_LIGHTMAP(N)   \
+       AI_MATKEY_UVWSRC(aiTextureType_LIGHTMAP,N)
+
+#define AI_MATKEY_UVWSRC_REFLECTION(N) \
+       AI_MATKEY_UVWSRC(aiTextureType_REFLECTION,N)
+
+//! @endcond
+// ---------------------------------------------------------------------------
+#define AI_MATKEY_TEXOP(type, N) _AI_MATKEY_TEXOP_BASE,type,N
+
+// For backward compatibility and simplicity
+//! @cond MATS_DOC_FULL
+#define AI_MATKEY_TEXOP_DIFFUSE(N)     \
+       AI_MATKEY_TEXOP(aiTextureType_DIFFUSE,N)
+
+#define AI_MATKEY_TEXOP_SPECULAR(N)    \
+       AI_MATKEY_TEXOP(aiTextureType_SPECULAR,N)
+
+#define AI_MATKEY_TEXOP_AMBIENT(N)     \
+       AI_MATKEY_TEXOP(aiTextureType_AMBIENT,N)
+
+#define AI_MATKEY_TEXOP_EMISSIVE(N)    \
+       AI_MATKEY_TEXOP(aiTextureType_EMISSIVE,N)
+
+#define AI_MATKEY_TEXOP_NORMALS(N)     \
+       AI_MATKEY_TEXOP(aiTextureType_NORMALS,N)
+
+#define AI_MATKEY_TEXOP_HEIGHT(N)      \
+       AI_MATKEY_TEXOP(aiTextureType_HEIGHT,N)
+
+#define AI_MATKEY_TEXOP_SHININESS(N)   \
+       AI_MATKEY_TEXOP(aiTextureType_SHININESS,N)
+
+#define AI_MATKEY_TEXOP_OPACITY(N)     \
+       AI_MATKEY_TEXOP(aiTextureType_OPACITY,N)
+
+#define AI_MATKEY_TEXOP_DISPLACEMENT(N)        \
+       AI_MATKEY_TEXOP(aiTextureType_DISPLACEMENT,N)
+
+#define AI_MATKEY_TEXOP_LIGHTMAP(N)    \
+       AI_MATKEY_TEXOP(aiTextureType_LIGHTMAP,N)
+
+#define AI_MATKEY_TEXOP_REFLECTION(N)  \
+       AI_MATKEY_TEXOP(aiTextureType_REFLECTION,N)
+
+//! @endcond
+// ---------------------------------------------------------------------------
+#define AI_MATKEY_MAPPING(type, N) _AI_MATKEY_MAPPING_BASE,type,N
+
+// For backward compatibility and simplicity
+//! @cond MATS_DOC_FULL
+#define AI_MATKEY_MAPPING_DIFFUSE(N)   \
+       AI_MATKEY_MAPPING(aiTextureType_DIFFUSE,N)
+
+#define AI_MATKEY_MAPPING_SPECULAR(N)  \
+       AI_MATKEY_MAPPING(aiTextureType_SPECULAR,N)
+
+#define AI_MATKEY_MAPPING_AMBIENT(N)   \
+       AI_MATKEY_MAPPING(aiTextureType_AMBIENT,N)
+
+#define AI_MATKEY_MAPPING_EMISSIVE(N)  \
+       AI_MATKEY_MAPPING(aiTextureType_EMISSIVE,N)
+
+#define AI_MATKEY_MAPPING_NORMALS(N)   \
+       AI_MATKEY_MAPPING(aiTextureType_NORMALS,N)
+
+#define AI_MATKEY_MAPPING_HEIGHT(N)    \
+       AI_MATKEY_MAPPING(aiTextureType_HEIGHT,N)
+
+#define AI_MATKEY_MAPPING_SHININESS(N) \
+       AI_MATKEY_MAPPING(aiTextureType_SHININESS,N)
+
+#define AI_MATKEY_MAPPING_OPACITY(N)   \
+       AI_MATKEY_MAPPING(aiTextureType_OPACITY,N)
+
+#define AI_MATKEY_MAPPING_DISPLACEMENT(N)      \
+       AI_MATKEY_MAPPING(aiTextureType_DISPLACEMENT,N)
+
+#define AI_MATKEY_MAPPING_LIGHTMAP(N)  \
+       AI_MATKEY_MAPPING(aiTextureType_LIGHTMAP,N)
+
+#define AI_MATKEY_MAPPING_REFLECTION(N)        \
+       AI_MATKEY_MAPPING(aiTextureType_REFLECTION,N)
+
+//! @endcond
+// ---------------------------------------------------------------------------
+#define AI_MATKEY_TEXBLEND(type, N) _AI_MATKEY_TEXBLEND_BASE,type,N
+
+// For backward compatibility and simplicity
+//! @cond MATS_DOC_FULL
+#define AI_MATKEY_TEXBLEND_DIFFUSE(N)  \
+       AI_MATKEY_TEXBLEND(aiTextureType_DIFFUSE,N)
+
+#define AI_MATKEY_TEXBLEND_SPECULAR(N) \
+       AI_MATKEY_TEXBLEND(aiTextureType_SPECULAR,N)
+
+#define AI_MATKEY_TEXBLEND_AMBIENT(N)  \
+       AI_MATKEY_TEXBLEND(aiTextureType_AMBIENT,N)
+
+#define AI_MATKEY_TEXBLEND_EMISSIVE(N) \
+       AI_MATKEY_TEXBLEND(aiTextureType_EMISSIVE,N)
+
+#define AI_MATKEY_TEXBLEND_NORMALS(N)  \
+       AI_MATKEY_TEXBLEND(aiTextureType_NORMALS,N)
+
+#define AI_MATKEY_TEXBLEND_HEIGHT(N)   \
+       AI_MATKEY_TEXBLEND(aiTextureType_HEIGHT,N)
+
+#define AI_MATKEY_TEXBLEND_SHININESS(N)        \
+       AI_MATKEY_TEXBLEND(aiTextureType_SHININESS,N)
+
+#define AI_MATKEY_TEXBLEND_OPACITY(N)  \
+       AI_MATKEY_TEXBLEND(aiTextureType_OPACITY,N)
+
+#define AI_MATKEY_TEXBLEND_DISPLACEMENT(N)     \
+       AI_MATKEY_TEXBLEND(aiTextureType_DISPLACEMENT,N)
+
+#define AI_MATKEY_TEXBLEND_LIGHTMAP(N) \
+       AI_MATKEY_TEXBLEND(aiTextureType_LIGHTMAP,N)
+
+#define AI_MATKEY_TEXBLEND_REFLECTION(N)       \
+       AI_MATKEY_TEXBLEND(aiTextureType_REFLECTION,N)
+
+//! @endcond
+// ---------------------------------------------------------------------------
+#define AI_MATKEY_MAPPINGMODE_U(type, N) _AI_MATKEY_MAPPINGMODE_U_BASE,type,N
+
+// For backward compatibility and simplicity
+//! @cond MATS_DOC_FULL
+#define AI_MATKEY_MAPPINGMODE_U_DIFFUSE(N)     \
+       AI_MATKEY_MAPPINGMODE_U(aiTextureType_DIFFUSE,N)
+
+#define AI_MATKEY_MAPPINGMODE_U_SPECULAR(N)    \
+       AI_MATKEY_MAPPINGMODE_U(aiTextureType_SPECULAR,N)
+
+#define AI_MATKEY_MAPPINGMODE_U_AMBIENT(N)     \
+       AI_MATKEY_MAPPINGMODE_U(aiTextureType_AMBIENT,N)
+
+#define AI_MATKEY_MAPPINGMODE_U_EMISSIVE(N)    \
+       AI_MATKEY_MAPPINGMODE_U(aiTextureType_EMISSIVE,N)
+
+#define AI_MATKEY_MAPPINGMODE_U_NORMALS(N)     \
+       AI_MATKEY_MAPPINGMODE_U(aiTextureType_NORMALS,N)
+
+#define AI_MATKEY_MAPPINGMODE_U_HEIGHT(N)      \
+       AI_MATKEY_MAPPINGMODE_U(aiTextureType_HEIGHT,N)
+
+#define AI_MATKEY_MAPPINGMODE_U_SHININESS(N)   \
+       AI_MATKEY_MAPPINGMODE_U(aiTextureType_SHININESS,N)
+
+#define AI_MATKEY_MAPPINGMODE_U_OPACITY(N)     \
+       AI_MATKEY_MAPPINGMODE_U(aiTextureType_OPACITY,N)
+
+#define AI_MATKEY_MAPPINGMODE_U_DISPLACEMENT(N)        \
+       AI_MATKEY_MAPPINGMODE_U(aiTextureType_DISPLACEMENT,N)
+
+#define AI_MATKEY_MAPPINGMODE_U_LIGHTMAP(N)    \
+       AI_MATKEY_MAPPINGMODE_U(aiTextureType_LIGHTMAP,N)
+
+#define AI_MATKEY_MAPPINGMODE_U_REFLECTION(N)  \
+       AI_MATKEY_MAPPINGMODE_U(aiTextureType_REFLECTION,N)
+
+//! @endcond
+// ---------------------------------------------------------------------------
+#define AI_MATKEY_MAPPINGMODE_V(type, N) _AI_MATKEY_MAPPINGMODE_V_BASE,type,N
+
+// For backward compatibility and simplicity
+//! @cond MATS_DOC_FULL
+#define AI_MATKEY_MAPPINGMODE_V_DIFFUSE(N)     \
+       AI_MATKEY_MAPPINGMODE_V(aiTextureType_DIFFUSE,N)
+
+#define AI_MATKEY_MAPPINGMODE_V_SPECULAR(N)    \
+       AI_MATKEY_MAPPINGMODE_V(aiTextureType_SPECULAR,N)
+
+#define AI_MATKEY_MAPPINGMODE_V_AMBIENT(N)     \
+       AI_MATKEY_MAPPINGMODE_V(aiTextureType_AMBIENT,N)
+
+#define AI_MATKEY_MAPPINGMODE_V_EMISSIVE(N)    \
+       AI_MATKEY_MAPPINGMODE_V(aiTextureType_EMISSIVE,N)
+
+#define AI_MATKEY_MAPPINGMODE_V_NORMALS(N)     \
+       AI_MATKEY_MAPPINGMODE_V(aiTextureType_NORMALS,N)
+
+#define AI_MATKEY_MAPPINGMODE_V_HEIGHT(N)      \
+       AI_MATKEY_MAPPINGMODE_V(aiTextureType_HEIGHT,N)
+
+#define AI_MATKEY_MAPPINGMODE_V_SHININESS(N)   \
+       AI_MATKEY_MAPPINGMODE_V(aiTextureType_SHININESS,N)
+
+#define AI_MATKEY_MAPPINGMODE_V_OPACITY(N)     \
+       AI_MATKEY_MAPPINGMODE_V(aiTextureType_OPACITY,N)
+
+#define AI_MATKEY_MAPPINGMODE_V_DISPLACEMENT(N)        \
+       AI_MATKEY_MAPPINGMODE_V(aiTextureType_DISPLACEMENT,N)
+
+#define AI_MATKEY_MAPPINGMODE_V_LIGHTMAP(N)    \
+       AI_MATKEY_MAPPINGMODE_V(aiTextureType_LIGHTMAP,N)
+
+#define AI_MATKEY_MAPPINGMODE_V_REFLECTION(N)  \
+       AI_MATKEY_MAPPINGMODE_V(aiTextureType_REFLECTION,N)
+
+//! @endcond
+// ---------------------------------------------------------------------------
+#define AI_MATKEY_TEXMAP_AXIS(type, N) _AI_MATKEY_TEXMAP_AXIS_BASE,type,N
+
+// For backward compatibility and simplicity
+//! @cond MATS_DOC_FULL
+#define AI_MATKEY_TEXMAP_AXIS_DIFFUSE(N)       \
+       AI_MATKEY_TEXMAP_AXIS(aiTextureType_DIFFUSE,N)
+
+#define AI_MATKEY_TEXMAP_AXIS_SPECULAR(N)      \
+       AI_MATKEY_TEXMAP_AXIS(aiTextureType_SPECULAR,N)
+
+#define AI_MATKEY_TEXMAP_AXIS_AMBIENT(N)       \
+       AI_MATKEY_TEXMAP_AXIS(aiTextureType_AMBIENT,N)
+
+#define AI_MATKEY_TEXMAP_AXIS_EMISSIVE(N)      \
+       AI_MATKEY_TEXMAP_AXIS(aiTextureType_EMISSIVE,N)
+
+#define AI_MATKEY_TEXMAP_AXIS_NORMALS(N)       \
+       AI_MATKEY_TEXMAP_AXIS(aiTextureType_NORMALS,N)
+
+#define AI_MATKEY_TEXMAP_AXIS_HEIGHT(N)        \
+       AI_MATKEY_TEXMAP_AXIS(aiTextureType_HEIGHT,N)
+
+#define AI_MATKEY_TEXMAP_AXIS_SHININESS(N)     \
+       AI_MATKEY_TEXMAP_AXIS(aiTextureType_SHININESS,N)
+
+#define AI_MATKEY_TEXMAP_AXIS_OPACITY(N)       \
+       AI_MATKEY_TEXMAP_AXIS(aiTextureType_OPACITY,N)
+
+#define AI_MATKEY_TEXMAP_AXIS_DISPLACEMENT(N)  \
+       AI_MATKEY_TEXMAP_AXIS(aiTextureType_DISPLACEMENT,N)
+
+#define AI_MATKEY_TEXMAP_AXIS_LIGHTMAP(N)      \
+       AI_MATKEY_TEXMAP_AXIS(aiTextureType_LIGHTMAP,N)
+
+#define AI_MATKEY_TEXMAP_AXIS_REFLECTION(N)    \
+       AI_MATKEY_TEXMAP_AXIS(aiTextureType_REFLECTION,N)
+
+//! @endcond
+// ---------------------------------------------------------------------------
+#define AI_MATKEY_UVTRANSFORM(type, N) _AI_MATKEY_UVTRANSFORM_BASE,type,N
+
+// For backward compatibility and simplicity
+//! @cond MATS_DOC_FULL
+#define AI_MATKEY_UVTRANSFORM_DIFFUSE(N)       \
+       AI_MATKEY_UVTRANSFORM(aiTextureType_DIFFUSE,N)
+
+#define AI_MATKEY_UVTRANSFORM_SPECULAR(N)      \
+       AI_MATKEY_UVTRANSFORM(aiTextureType_SPECULAR,N)
+
+#define AI_MATKEY_UVTRANSFORM_AMBIENT(N)       \
+       AI_MATKEY_UVTRANSFORM(aiTextureType_AMBIENT,N)
+
+#define AI_MATKEY_UVTRANSFORM_EMISSIVE(N)      \
+       AI_MATKEY_UVTRANSFORM(aiTextureType_EMISSIVE,N)
+
+#define AI_MATKEY_UVTRANSFORM_NORMALS(N)       \
+       AI_MATKEY_UVTRANSFORM(aiTextureType_NORMALS,N)
+
+#define AI_MATKEY_UVTRANSFORM_HEIGHT(N)        \
+       AI_MATKEY_UVTRANSFORM(aiTextureType_HEIGHT,N)
+
+#define AI_MATKEY_UVTRANSFORM_SHININESS(N)     \
+       AI_MATKEY_UVTRANSFORM(aiTextureType_SHININESS,N)
+
+#define AI_MATKEY_UVTRANSFORM_OPACITY(N)       \
+       AI_MATKEY_UVTRANSFORM(aiTextureType_OPACITY,N)
+
+#define AI_MATKEY_UVTRANSFORM_DISPLACEMENT(N)  \
+       AI_MATKEY_UVTRANSFORM(aiTextureType_DISPLACEMENT,N)
+
+#define AI_MATKEY_UVTRANSFORM_LIGHTMAP(N)      \
+       AI_MATKEY_UVTRANSFORM(aiTextureType_LIGHTMAP,N)
+
+#define AI_MATKEY_UVTRANSFORM_REFLECTION(N)    \
+       AI_MATKEY_UVTRANSFORM(aiTextureType_REFLECTION,N)
+
+#define AI_MATKEY_UVTRANSFORM_UNKNOWN(N)       \
+       AI_MATKEY_UVTRANSFORM(aiTextureType_UNKNOWN,N)
+
+//! @endcond
+// ---------------------------------------------------------------------------
+#define AI_MATKEY_TEXFLAGS(type, N) _AI_MATKEY_TEXFLAGS_BASE,type,N
+
+// For backward compatibility and simplicity
+//! @cond MATS_DOC_FULL
+#define AI_MATKEY_TEXFLAGS_DIFFUSE(N)  \
+       AI_MATKEY_TEXFLAGS(aiTextureType_DIFFUSE,N)
+
+#define AI_MATKEY_TEXFLAGS_SPECULAR(N) \
+       AI_MATKEY_TEXFLAGS(aiTextureType_SPECULAR,N)
+
+#define AI_MATKEY_TEXFLAGS_AMBIENT(N)  \
+       AI_MATKEY_TEXFLAGS(aiTextureType_AMBIENT,N)
+
+#define AI_MATKEY_TEXFLAGS_EMISSIVE(N) \
+       AI_MATKEY_TEXFLAGS(aiTextureType_EMISSIVE,N)
+
+#define AI_MATKEY_TEXFLAGS_NORMALS(N)  \
+       AI_MATKEY_TEXFLAGS(aiTextureType_NORMALS,N)
+
+#define AI_MATKEY_TEXFLAGS_HEIGHT(N)   \
+       AI_MATKEY_TEXFLAGS(aiTextureType_HEIGHT,N)
+
+#define AI_MATKEY_TEXFLAGS_SHININESS(N)        \
+       AI_MATKEY_TEXFLAGS(aiTextureType_SHININESS,N)
+
+#define AI_MATKEY_TEXFLAGS_OPACITY(N)  \
+       AI_MATKEY_TEXFLAGS(aiTextureType_OPACITY,N)
+
+#define AI_MATKEY_TEXFLAGS_DISPLACEMENT(N)     \
+       AI_MATKEY_TEXFLAGS(aiTextureType_DISPLACEMENT,N)
+
+#define AI_MATKEY_TEXFLAGS_LIGHTMAP(N) \
+       AI_MATKEY_TEXFLAGS(aiTextureType_LIGHTMAP,N)
+
+#define AI_MATKEY_TEXFLAGS_REFLECTION(N)       \
+       AI_MATKEY_TEXFLAGS(aiTextureType_REFLECTION,N)
+
+#define AI_MATKEY_TEXFLAGS_UNKNOWN(N)  \
+       AI_MATKEY_TEXFLAGS(aiTextureType_UNKNOWN,N)
+
+// ---------------------------------------------------------------------------
+/** @brief Retrieve a material property with a specific key from the material
+ *
+ * @param pMat Pointer to the input material. May not be NULL
+ * @param pKey Key to search for. One of the AI_MATKEY_XXX constants.
+ * @param type Specifies the type of the texture to be retrieved (
+ *    e.g. diffuse, specular, height map ...)
+ * @param index Index of the texture to be retrieved.
+ * @param pPropOut Pointer to receive a pointer to a valid aiMaterialProperty
+ *        structure or NULL if the key has not been found. */
+// ---------------------------------------------------------------------------
+ASSIMP_API C_ENUM aiReturn aiGetMaterialProperty(
+        const C_STRUCT aiMaterial* pMat, 
+    const char* pKey,
+        unsigned int type,
+    unsigned int  index,
+    const C_STRUCT aiMaterialProperty** pPropOut);
+
+// ---------------------------------------------------------------------------
+/** @brief Retrieve an array of float values with a specific key 
+ *  from the material
+ *
+ * Pass one of the AI_MATKEY_XXX constants for the last three parameters (the
+ * example reads the #AI_MATKEY_UVTRANSFORM property of the first diffuse texture)
+ * @code
+ * aiUVTransform trafo;
+ * unsigned int max = sizeof(aiUVTransform);
+ * if (AI_SUCCESS != aiGetMaterialFloatArray(mat, AI_MATKEY_UVTRANSFORM(aiTextureType_DIFFUSE,0),
+ *    (float*)&trafo, &max) || sizeof(aiUVTransform) != max)
+ * {
+ *   // error handling 
+ * }
+ * @endcode
+ *
+ * @param pMat Pointer to the input material. May not be NULL
+ * @param pKey Key to search for. One of the AI_MATKEY_XXX constants.
+ * @param pOut Pointer to a buffer to receive the result. 
+ * @param pMax Specifies the size of the given buffer, in float's.
+ *        Receives the number of values (not bytes!) read. 
+ * @param type (see the code sample above)
+ * @param index (see the code sample above)
+ * @return Specifies whether the key has been found. If not, the output
+ *   arrays remains unmodified and pMax is set to 0.*/
+// ---------------------------------------------------------------------------
+ASSIMP_API C_ENUM aiReturn aiGetMaterialFloatArray(
+        const C_STRUCT aiMaterial* pMat, 
+    const char* pKey,
+        unsigned int type,
+    unsigned int index,
+    float* pOut,
+    unsigned int* pMax);
+
+
+#ifdef __cplusplus
+
+// ---------------------------------------------------------------------------
+/** @brief Retrieve a single float property with a specific key from the material.
+*
+* Pass one of the AI_MATKEY_XXX constants for the last three parameters (the
+* example reads the #AI_MATKEY_SHININESS_STRENGTH property of the first diffuse texture)
+* @code
+* float specStrength = 1.f; // default value, remains unmodified if we fail.
+* aiGetMaterialFloat(mat, AI_MATKEY_SHININESS_STRENGTH,
+*    (float*)&specStrength);
+* @endcode
+*
+* @param pMat Pointer to the input material. May not be NULL
+* @param pKey Key to search for. One of the AI_MATKEY_XXX constants.
+* @param pOut Receives the output float.
+* @param type (see the code sample above)
+* @param index (see the code sample above)
+* @return Specifies whether the key has been found. If not, the output
+*   float remains unmodified.*/
+// ---------------------------------------------------------------------------
+inline aiReturn aiGetMaterialFloat(const aiMaterial* pMat, 
+       const char* pKey,
+       unsigned int type,
+   unsigned int index,
+       float* pOut)
+{
+       return aiGetMaterialFloatArray(pMat,pKey,type,index,pOut,(unsigned int*)0x0);
+}
+
+#else 
+
+// Use our friend, the C preprocessor
+#define aiGetMaterialFloat (pMat, type, index, pKey, pOut) \
+    aiGetMaterialFloatArray(pMat, type, index, pKey, pOut, NULL)
+
+#endif //!__cplusplus
+
+
+// ---------------------------------------------------------------------------
+/** @brief Retrieve an array of integer values with a specific key 
+ *  from a material
+ *
+ * See the sample for aiGetMaterialFloatArray for more information.*/
+ASSIMP_API C_ENUM aiReturn aiGetMaterialIntegerArray(const C_STRUCT aiMaterial* pMat, 
+    const char* pKey,
+        unsigned int  type,
+        unsigned int  index,
+    int* pOut,
+    unsigned int* pMax);
+
+
+#ifdef __cplusplus
+
+// ---------------------------------------------------------------------------
+/** @brief Retrieve an integer property with a specific key from a material
+ *
+ * See the sample for aiGetMaterialFloat for more information.*/
+// ---------------------------------------------------------------------------
+inline aiReturn aiGetMaterialInteger(const C_STRUCT aiMaterial* pMat, 
+       const char* pKey,
+       unsigned int type,
+   unsigned int index,
+       int* pOut)
+{
+       return aiGetMaterialIntegerArray(pMat,pKey,type,index,pOut,(unsigned int*)0x0);
+}
+
+#else 
+
+// use our friend, the C preprocessor
+#define aiGetMaterialInteger (pMat, type, index, pKey, pOut) \
+    aiGetMaterialIntegerArray(pMat, type, index, pKey, pOut, NULL)
+
+#endif //!__cplusplus
+
+
+
+// ---------------------------------------------------------------------------
+/** @brief Retrieve a color value from the material property table
+*
+* See the sample for aiGetMaterialFloat for more information*/
+// ---------------------------------------------------------------------------
+ASSIMP_API C_ENUM aiReturn aiGetMaterialColor(const C_STRUCT aiMaterial* pMat, 
+    const char* pKey,
+        unsigned int type,
+    unsigned int index,
+        C_STRUCT aiColor4D* pOut);
+
+
+// ---------------------------------------------------------------------------
+/** @brief Retrieve a aiUVTransform value from the material property table
+*
+* See the sample for aiGetMaterialFloat for more information*/
+// ---------------------------------------------------------------------------
+ASSIMP_API C_ENUM aiReturn aiGetMaterialUVTransform(const C_STRUCT aiMaterial* pMat, 
+    const char* pKey,
+        unsigned int type,
+    unsigned int index,
+        C_STRUCT aiUVTransform* pOut);
+
+
+// ---------------------------------------------------------------------------
+/** @brief Retrieve a string from the material property table
+*
+* See the sample for aiGetMaterialFloat for more information.*/
+// ---------------------------------------------------------------------------
+ASSIMP_API C_ENUM aiReturn aiGetMaterialString(const C_STRUCT aiMaterial* pMat, 
+    const char* pKey,
+        unsigned int type,
+    unsigned int index,
+    C_STRUCT aiString* pOut);
+
+// ---------------------------------------------------------------------------
+/** Get the number of textures for a particular texture type.
+ *  @param[in] pMat Pointer to the input material. May not be NULL
+ *  @param type Texture type to check for
+ *  @return Number of textures for this type.
+ *  @note A texture can be easily queried using #aiGetMaterialTexture() */
+// ---------------------------------------------------------------------------
+ASSIMP_API unsigned int aiGetMaterialTextureCount(const C_STRUCT aiMaterial* pMat,  
+       C_ENUM aiTextureType type);
+
+// ---------------------------------------------------------------------------
+/** @brief Helper function to get all values pertaining to a particular
+ *  texture slot from a material structure.
+ *
+ *  This function is provided just for convenience. You could also read the
+ *  texture by parsing all of its properties manually. This function bundles
+ *  all of them in a huge function monster.
+ *
+ *  @param[in] mat Pointer to the input material. May not be NULL
+ *  @param[in] type Specifies the texture stack to read from (e.g. diffuse,
+ *     specular, height map ...). 
+ *  @param[in] index Index of the texture. The function fails if the 
+ *     requested index is not available for this texture type. 
+ *     #aiGetMaterialTextureCount() can be used to determine the number of
+ *     textures in a particular texture stack.
+ *  @param[out] path Receives the output path
+ *      This parameter must be non-null.
+ *  @param mapping The texture mapping mode to be used.
+ *      Pass NULL if you're not interested in this information.
+ *  @param[out] uvindex For UV-mapped textures: receives the index of the UV
+ *      source channel. Unmodified otherwise.
+ *      Pass NULL if you're not interested in this information.
+ *  @param[out] blend Receives the blend factor for the texture
+ *      Pass NULL if you're not interested in this information.
+ *  @param[out] op Receives the texture blend operation to be perform between
+ *             this texture and the previous texture.
+ *      Pass NULL if you're not interested in this information.
+ *  @param[out] mapmode Receives the mapping modes to be used for the texture.
+ *      Pass NULL if you're not interested in this information. Otherwise,
+ *      pass a pointer to an array of two aiTextureMapMode's (one for each
+ *      axis, UV order).
+ *  @return AI_SUCCESS on success, otherwise something else. Have fun.*/
+// ---------------------------------------------------------------------------
+#ifdef __cplusplus
+ASSIMP_API aiReturn aiGetMaterialTexture(const C_STRUCT aiMaterial* mat,
+       aiTextureType type,
+    unsigned int  index,
+    aiString* path,
+       aiTextureMapping* mapping       = NULL,
+    unsigned int* uvindex              = NULL,
+    float* blend                               = NULL,
+    aiTextureOp* op                            = NULL,
+       aiTextureMapMode* mapmode       = NULL,
+       unsigned int* flags         = NULL); 
+#else
+C_ENUM aiReturn aiGetMaterialTexture(const C_STRUCT aiMaterial* mat,
+    C_ENUM aiTextureType type,
+    unsigned int  index,
+    C_STRUCT aiString* path,
+       C_ENUM aiTextureMapping* mapping        /*= NULL*/,
+    unsigned int* uvindex                              /*= NULL*/,
+    float* blend                                               /*= NULL*/,
+    C_ENUM aiTextureOp* op                             /*= NULL*/,
+       C_ENUM aiTextureMapMode* mapmode        /*= NULL*/,
+       unsigned int* flags                 /*= NULL*/); 
+#endif // !#ifdef __cplusplus
+
+#ifdef __cplusplus
+}
+
+#include "material.inl"
+
+#endif //!__cplusplus
+#endif //!!AI_MATERIAL_H_INC
diff --git a/include/assimp/material.inl b/include/assimp/material.inl
new file mode 100644 (file)
index 0000000..64d5b74
--- /dev/null
@@ -0,0 +1,350 @@
+/*
+---------------------------------------------------------------------------
+Open Asset Import Library (assimp)
+---------------------------------------------------------------------------
+
+Copyright (c) 2006-2012, assimp team
+
+All rights reserved.
+
+Redistribution and use of this software 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.
+
+* Neither the name of the assimp team, nor the names of its
+  contributors may be used to endorse or promote products
+  derived from this software without specific prior
+  written permission of the assimp team.
+
+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.
+---------------------------------------------------------------------------
+*/
+
+/** @file aiMaterial.inl
+ *  @brief Defines the C++ getters for the material system
+ */
+
+#ifndef AI_MATERIAL_INL_INC
+#define AI_MATERIAL_INL_INC
+
+//! @cond never
+
+// ---------------------------------------------------------------------------
+inline aiReturn aiMaterial::GetTexture( aiTextureType type,
+   unsigned int  index,
+   C_STRUCT aiString* path,
+   aiTextureMapping* mapping   /*= NULL*/,
+   unsigned int* uvindex               /*= NULL*/,
+   float* blend                                   /*= NULL*/,
+   aiTextureOp* op                             /*= NULL*/,
+   aiTextureMapMode* mapmode   /*= NULL*/) const
+{
+       return ::aiGetMaterialTexture(this,type,index,path,mapping,uvindex,blend,op,mapmode);
+}
+
+// ---------------------------------------------------------------------------
+inline unsigned int aiMaterial::GetTextureCount(aiTextureType type) const
+{
+       return ::aiGetMaterialTextureCount(this,type);
+}
+
+// ---------------------------------------------------------------------------
+template <typename Type>
+inline aiReturn aiMaterial::Get(const char* pKey,unsigned int type,
+       unsigned int idx, Type* pOut,
+       unsigned int* pMax) const
+{
+       unsigned int iNum = pMax ? *pMax : 1;
+
+       const aiMaterialProperty* prop;
+       const aiReturn ret = ::aiGetMaterialProperty(this,pKey,type,idx,
+               (const aiMaterialProperty**)&prop);
+       if ( AI_SUCCESS == ret )        {
+
+               if (prop->mDataLength < sizeof(Type)*iNum) {
+                       return AI_FAILURE;
+               }
+
+               if (prop->mType != aiPTI_Buffer) {
+                       return AI_FAILURE;
+               }
+
+               iNum = std::min((size_t)iNum,prop->mDataLength / sizeof(Type));
+               ::memcpy(pOut,prop->mData,iNum * sizeof(Type));
+               if (pMax) {
+                       *pMax = iNum;
+               }
+       }
+       return ret;
+}
+
+// ---------------------------------------------------------------------------
+template <typename Type>
+inline aiReturn aiMaterial::Get(const char* pKey,unsigned int type,
+       unsigned int idx,Type& pOut) const
+{
+       const aiMaterialProperty* prop;
+       const aiReturn ret = ::aiGetMaterialProperty(this,pKey,type,idx,
+               (const aiMaterialProperty**)&prop);
+       if ( AI_SUCCESS == ret )        {
+
+               if (prop->mDataLength < sizeof(Type)) {
+                       return AI_FAILURE;
+               }
+
+               if (prop->mType != aiPTI_Buffer) {
+                       return AI_FAILURE;
+               }
+
+               ::memcpy(&pOut,prop->mData,sizeof(Type));
+       }
+       return ret;
+}
+
+// ---------------------------------------------------------------------------
+inline aiReturn aiMaterial::Get(const char* pKey,unsigned int type,
+       unsigned int idx,float* pOut,
+       unsigned int* pMax) const
+{
+       return ::aiGetMaterialFloatArray(this,pKey,type,idx,pOut,pMax);
+}
+// ---------------------------------------------------------------------------
+inline aiReturn aiMaterial::Get(const char* pKey,unsigned int type,
+       unsigned int idx,int* pOut,
+       unsigned int* pMax) const
+{
+       return ::aiGetMaterialIntegerArray(this,pKey,type,idx,pOut,pMax);
+}
+// ---------------------------------------------------------------------------
+inline aiReturn aiMaterial::Get(const char* pKey,unsigned int type,
+       unsigned int idx,float& pOut) const
+{
+       return aiGetMaterialFloat(this,pKey,type,idx,&pOut);
+}
+// ---------------------------------------------------------------------------
+inline aiReturn aiMaterial::Get(const char* pKey,unsigned int type,
+       unsigned int idx,int& pOut) const
+{
+       return aiGetMaterialInteger(this,pKey,type,idx,&pOut);
+}
+// ---------------------------------------------------------------------------
+inline aiReturn aiMaterial::Get(const char* pKey,unsigned int type,
+       unsigned int idx,aiColor4D& pOut) const
+{
+       return aiGetMaterialColor(this,pKey,type,idx,&pOut);
+}
+// ---------------------------------------------------------------------------
+inline aiReturn aiMaterial::Get(const char* pKey,unsigned int type,
+       unsigned int idx,aiColor3D& pOut) const
+{
+       aiColor4D c;
+       const aiReturn ret = aiGetMaterialColor(this,pKey,type,idx,&c);
+       pOut = aiColor3D(c.r,c.g,c.b);
+       return ret;
+}
+// ---------------------------------------------------------------------------
+inline aiReturn aiMaterial::Get(const char* pKey,unsigned int type,
+       unsigned int idx,aiString& pOut) const
+{
+       return aiGetMaterialString(this,pKey,type,idx,&pOut);
+}
+// ---------------------------------------------------------------------------
+inline aiReturn aiMaterial::Get(const char* pKey,unsigned int type,
+       unsigned int idx,aiUVTransform& pOut) const
+{
+       return aiGetMaterialUVTransform(this,pKey,type,idx,&pOut);
+}
+
+
+// ---------------------------------------------------------------------------
+template<class TYPE>
+aiReturn aiMaterial::AddProperty (const TYPE* pInput,
+       const unsigned int pNumValues,
+       const char* pKey,
+       unsigned int type,
+       unsigned int index)
+{
+       return AddBinaryProperty((const void*)pInput,
+               pNumValues * sizeof(TYPE),
+               pKey,type,index,aiPTI_Buffer);
+}
+
+// ---------------------------------------------------------------------------
+inline aiReturn aiMaterial::AddProperty(const float* pInput,
+       const unsigned int pNumValues,
+       const char* pKey,
+       unsigned int type,
+       unsigned int index)
+{
+       return AddBinaryProperty((const void*)pInput,
+               pNumValues * sizeof(float),
+               pKey,type,index,aiPTI_Float);
+}
+
+// ---------------------------------------------------------------------------
+inline aiReturn aiMaterial::AddProperty(const aiUVTransform* pInput,
+       const unsigned int pNumValues,
+       const char* pKey,
+       unsigned int type,
+       unsigned int index)
+{
+       return AddBinaryProperty((const void*)pInput,
+               pNumValues * sizeof(aiUVTransform),
+               pKey,type,index,aiPTI_Float);
+}
+
+// ---------------------------------------------------------------------------
+inline aiReturn aiMaterial::AddProperty(const aiColor4D* pInput,
+       const unsigned int pNumValues,
+       const char* pKey,
+       unsigned int type,
+       unsigned int index)
+{
+       return AddBinaryProperty((const void*)pInput,
+               pNumValues * sizeof(aiColor4D),
+               pKey,type,index,aiPTI_Float);
+}
+
+// ---------------------------------------------------------------------------
+inline aiReturn aiMaterial::AddProperty(const aiColor3D* pInput,
+       const unsigned int pNumValues,
+       const char* pKey,
+       unsigned int type,
+       unsigned int index)
+{
+       return AddBinaryProperty((const void*)pInput,
+               pNumValues * sizeof(aiColor3D),
+               pKey,type,index,aiPTI_Float);
+}
+
+// ---------------------------------------------------------------------------
+inline aiReturn aiMaterial::AddProperty(const aiVector3D* pInput,
+       const unsigned int pNumValues,
+       const char* pKey,
+       unsigned int type,
+       unsigned int index)
+{
+       return AddBinaryProperty((const void*)pInput,
+               pNumValues * sizeof(aiVector3D),
+               pKey,type,index,aiPTI_Float);
+}
+
+// ---------------------------------------------------------------------------
+inline aiReturn aiMaterial::AddProperty(const int* pInput,
+       const unsigned int pNumValues,
+       const char* pKey,
+       unsigned int type,
+       unsigned int index)
+{
+       return AddBinaryProperty((const void*)pInput,
+               pNumValues * sizeof(int),
+               pKey,type,index,aiPTI_Integer);
+}
+
+
+// ---------------------------------------------------------------------------
+// The template specializations below are for backwards compatibility.
+// The recommended way to add material properties is using the non-template
+// overloads.
+// ---------------------------------------------------------------------------
+
+// ---------------------------------------------------------------------------
+template<>
+inline aiReturn aiMaterial::AddProperty<float>(const float* pInput,
+       const unsigned int pNumValues,
+       const char* pKey,
+       unsigned int type,
+       unsigned int index)
+{
+       return AddBinaryProperty((const void*)pInput,
+               pNumValues * sizeof(float),
+               pKey,type,index,aiPTI_Float);
+}
+
+// ---------------------------------------------------------------------------
+template<>
+inline aiReturn aiMaterial::AddProperty<aiUVTransform>(const aiUVTransform* pInput,
+       const unsigned int pNumValues,
+       const char* pKey,
+       unsigned int type,
+       unsigned int index)
+{
+       return AddBinaryProperty((const void*)pInput,
+               pNumValues * sizeof(aiUVTransform),
+               pKey,type,index,aiPTI_Float);
+}
+
+// ---------------------------------------------------------------------------
+template<>
+inline aiReturn aiMaterial::AddProperty<aiColor4D>(const aiColor4D* pInput,
+       const unsigned int pNumValues,
+       const char* pKey,
+       unsigned int type,
+       unsigned int index)
+{
+       return AddBinaryProperty((const void*)pInput,
+               pNumValues * sizeof(aiColor4D),
+               pKey,type,index,aiPTI_Float);
+}
+
+// ---------------------------------------------------------------------------
+template<>
+inline aiReturn aiMaterial::AddProperty<aiColor3D>(const aiColor3D* pInput,
+       const unsigned int pNumValues,
+       const char* pKey,
+       unsigned int type,
+       unsigned int index)
+{
+       return AddBinaryProperty((const void*)pInput,
+               pNumValues * sizeof(aiColor3D),
+               pKey,type,index,aiPTI_Float);
+}
+
+// ---------------------------------------------------------------------------
+template<>
+inline aiReturn aiMaterial::AddProperty<aiVector3D>(const aiVector3D* pInput,
+       const unsigned int pNumValues,
+       const char* pKey,
+       unsigned int type,
+       unsigned int index)
+{
+       return AddBinaryProperty((const void*)pInput,
+               pNumValues * sizeof(aiVector3D),
+               pKey,type,index,aiPTI_Float);
+}
+
+// ---------------------------------------------------------------------------
+template<>
+inline aiReturn aiMaterial::AddProperty<int>(const int* pInput,
+       const unsigned int pNumValues,
+       const char* pKey,
+       unsigned int type,
+       unsigned int index)
+{
+       return AddBinaryProperty((const void*)pInput,
+               pNumValues * sizeof(int),
+               pKey,type,index,aiPTI_Integer);
+}
+
+//! @endcond
+
+#endif //! AI_MATERIAL_INL_INC
diff --git a/include/assimp/matrix3x3.h b/include/assimp/matrix3x3.h
new file mode 100644 (file)
index 0000000..0cff321
--- /dev/null
@@ -0,0 +1,185 @@
+/*
+---------------------------------------------------------------------------
+Open Asset Import Library (assimp)
+---------------------------------------------------------------------------
+
+Copyright (c) 2006-2012, assimp team
+
+All rights reserved.
+
+Redistribution and use of this software 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.
+
+* Neither the name of the assimp team, nor the names of its
+  contributors may be used to endorse or promote products
+  derived from this software without specific prior
+  written permission of the assimp team.
+
+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.
+---------------------------------------------------------------------------
+*/
+
+/** @file matrix3x3.h
+ *  @brief Definition of a 3x3 matrix, including operators when compiling in C++
+ */
+#ifndef AI_MATRIX3x3_H_INC
+#define AI_MATRIX3x3_H_INC
+
+#include "./Compiler/pushpack1.h"
+
+#ifdef __cplusplus
+
+template <typename T> class aiMatrix4x4t;
+template <typename T> class aiVector2t;
+
+// ---------------------------------------------------------------------------
+/** @brief Represents a row-major 3x3 matrix
+ *
+ *  There's much confusion about matrix layouts (column vs. row order). 
+ *  This is *always* a row-major matrix. Not even with the
+ *  #aiProcess_ConvertToLeftHanded flag, which absolutely does not affect
+ *  matrix order - it just affects the handedness of the coordinate system
+ *  defined thereby.
+ */
+template <typename TReal>
+class aiMatrix3x3t
+{
+public:
+
+       aiMatrix3x3t () :       
+               a1(static_cast<TReal>(1.0f)), a2(), a3(), 
+               b1(), b2(static_cast<TReal>(1.0f)), b3(), 
+               c1(), c2(), c3(static_cast<TReal>(1.0f)) {}
+
+       aiMatrix3x3t (  TReal _a1, TReal _a2, TReal _a3,
+                                       TReal _b1, TReal _b2, TReal _b3,
+                                       TReal _c1, TReal _c2, TReal _c3) :      
+               a1(_a1), a2(_a2), a3(_a3), 
+               b1(_b1), b2(_b2), b3(_b3), 
+               c1(_c1), c2(_c2), c3(_c3)
+       {}
+
+public:
+
+       // matrix multiplication. 
+       aiMatrix3x3t& operator *= (const aiMatrix3x3t& m);
+       aiMatrix3x3t  operator  * (const aiMatrix3x3t& m) const;
+
+       // array access operators
+       TReal* operator[]       (unsigned int p_iIndex);
+       const TReal* operator[] (unsigned int p_iIndex) const;
+
+       // comparison operators
+       bool operator== (const aiMatrix4x4t<TReal>& m) const;
+       bool operator!= (const aiMatrix4x4t<TReal>& m) const;
+
+       bool Equal(const aiMatrix4x4t<TReal>& m, TReal epsilon = 1e-6) const;
+
+       template <typename TOther>
+       operator aiMatrix3x3t<TOther> () const;
+
+public:
+
+       // -------------------------------------------------------------------
+       /** @brief Construction from a 4x4 matrix. The remaining parts 
+        *  of the matrix are ignored.
+        */
+       explicit aiMatrix3x3t( const aiMatrix4x4t<TReal>& pMatrix);
+
+       // -------------------------------------------------------------------
+       /** @brief Transpose the matrix
+        */
+       aiMatrix3x3t& Transpose();
+
+       // -------------------------------------------------------------------
+       /** @brief Invert the matrix.
+        *  If the matrix is not invertible all elements are set to qnan.
+        *  Beware, use (f != f) to check whether a TReal f is qnan.
+        */
+       aiMatrix3x3t& Inverse();
+       TReal Determinant() const;
+
+public:
+       // -------------------------------------------------------------------
+       /** @brief Returns a rotation matrix for a rotation around z
+        *  @param a Rotation angle, in radians
+        *  @param out Receives the output matrix
+        *  @return Reference to the output matrix
+        */
+       static aiMatrix3x3t& RotationZ(TReal a, aiMatrix3x3t& out);
+
+       // -------------------------------------------------------------------
+       /** @brief Returns a rotation matrix for a rotation around
+        *    an arbitrary axis.
+        *
+        *  @param a Rotation angle, in radians
+        *  @param axis Axis to rotate around
+        *  @param out To be filled
+        */
+       static aiMatrix3x3t& Rotation( TReal a, 
+               const aiVector3t<TReal>& axis, aiMatrix3x3t& out);
+
+       // -------------------------------------------------------------------
+       /** @brief Returns a translation matrix 
+        *  @param v Translation vector
+        *  @param out Receives the output matrix
+        *  @return Reference to the output matrix
+        */
+       static aiMatrix3x3t& Translation( const aiVector2t<TReal>& v, aiMatrix3x3t& out);
+
+       // -------------------------------------------------------------------
+       /** @brief A function for creating a rotation matrix that rotates a
+        *  vector called "from" into another vector called "to".
+        * Input : from[3], to[3] which both must be *normalized* non-zero vectors
+        * Output: mtx[3][3] -- a 3x3 matrix in colum-major form
+        * Authors: Tomas Möller, John Hughes
+        *          "Efficiently Building a Matrix to Rotate One Vector to Another"
+        *          Journal of Graphics Tools, 4(4):1-4, 1999
+        */
+       static aiMatrix3x3t& FromToMatrix(const aiVector3t<TReal>& from, 
+               const aiVector3t<TReal>& to, aiMatrix3x3t& out);
+
+public:
+
+
+       TReal a1, a2, a3;
+       TReal b1, b2, b3;
+       TReal c1, c2, c3;
+} PACK_STRUCT;
+
+typedef aiMatrix3x3t<float> aiMatrix3x3;
+
+#else
+
+struct aiMatrix3x3 {
+
+       float a1, a2, a3;
+       float b1, b2, b3;
+       float c1, c2, c3;
+} PACK_STRUCT;
+
+#endif
+
+#include "./Compiler/poppack1.h"
+
+#endif // AI_MATRIX3x3_H_INC
diff --git a/include/assimp/matrix3x3.inl b/include/assimp/matrix3x3.inl
new file mode 100644 (file)
index 0000000..56cac6c
--- /dev/null
@@ -0,0 +1,332 @@
+/*
+---------------------------------------------------------------------------
+Open Asset Import Library (assimp)
+---------------------------------------------------------------------------
+
+Copyright (c) 2006-2012, assimp team
+
+All rights reserved.
+
+Redistribution and use of this software 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.
+
+* Neither the name of the assimp team, nor the names of its
+  contributors may be used to endorse or promote products
+  derived from this software without specific prior
+  written permission of the assimp team.
+
+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.
+---------------------------------------------------------------------------
+*/
+
+/** @file aiMatrix3x3.inl
+ *  @brief Inline implementation of the 3x3 matrix operators
+ */
+#ifndef AI_MATRIX3x3_INL_INC
+#define AI_MATRIX3x3_INL_INC
+
+#ifdef __cplusplus
+#include "matrix3x3.h"
+
+#include "matrix4x4.h"
+#include <algorithm>
+#include <cmath>
+#include <limits>
+
+// ------------------------------------------------------------------------------------------------
+// Construction from a 4x4 matrix. The remaining parts of the matrix are ignored.
+template <typename TReal>
+inline aiMatrix3x3t<TReal>::aiMatrix3x3t( const aiMatrix4x4t<TReal>& pMatrix)
+{
+       a1 = pMatrix.a1; a2 = pMatrix.a2; a3 = pMatrix.a3;
+       b1 = pMatrix.b1; b2 = pMatrix.b2; b3 = pMatrix.b3;
+       c1 = pMatrix.c1; c2 = pMatrix.c2; c3 = pMatrix.c3;
+}
+
+// ------------------------------------------------------------------------------------------------
+template <typename TReal>
+inline aiMatrix3x3t<TReal>& aiMatrix3x3t<TReal>::operator *= (const aiMatrix3x3t<TReal>& m)
+{
+       *this = aiMatrix3x3t<TReal>(m.a1 * a1 + m.b1 * a2 + m.c1 * a3,
+               m.a2 * a1 + m.b2 * a2 + m.c2 * a3,
+               m.a3 * a1 + m.b3 * a2 + m.c3 * a3,
+               m.a1 * b1 + m.b1 * b2 + m.c1 * b3,
+               m.a2 * b1 + m.b2 * b2 + m.c2 * b3,
+               m.a3 * b1 + m.b3 * b2 + m.c3 * b3,
+               m.a1 * c1 + m.b1 * c2 + m.c1 * c3,
+               m.a2 * c1 + m.b2 * c2 + m.c2 * c3,
+               m.a3 * c1 + m.b3 * c2 + m.c3 * c3);
+       return *this;
+}
+
+// ------------------------------------------------------------------------------------------------
+template <typename TReal>
+template <typename TOther>
+aiMatrix3x3t<TReal>::operator aiMatrix3x3t<TOther> () const
+{
+       return aiMatrix3x3t<TOther>(static_cast<TOther>(a1),static_cast<TOther>(a2),static_cast<TOther>(a3),
+               static_cast<TOther>(b1),static_cast<TOther>(b2),static_cast<TOther>(b3),
+               static_cast<TOther>(c1),static_cast<TOther>(c2),static_cast<TOther>(c3));
+}
+
+// ------------------------------------------------------------------------------------------------
+template <typename TReal>
+inline aiMatrix3x3t<TReal> aiMatrix3x3t<TReal>::operator* (const aiMatrix3x3t<TReal>& m) const
+{
+       aiMatrix3x3t<TReal> temp( *this);
+       temp *= m;
+       return temp;
+}
+
+// ------------------------------------------------------------------------------------------------
+template <typename TReal>
+inline TReal* aiMatrix3x3t<TReal>::operator[] (unsigned int p_iIndex)
+{
+       return &this->a1 + p_iIndex * 3;
+}
+
+// ------------------------------------------------------------------------------------------------
+template <typename TReal>
+inline const TReal* aiMatrix3x3t<TReal>::operator[] (unsigned int p_iIndex) const
+{
+       return &this->a1 + p_iIndex * 3;
+}
+
+// ------------------------------------------------------------------------------------------------
+template <typename TReal>
+inline bool aiMatrix3x3t<TReal>::operator== (const aiMatrix4x4t<TReal>& m) const
+{
+       return a1 == m.a1 && a2 == m.a2 && a3 == m.a3 &&
+                  b1 == m.b1 && b2 == m.b2 && b3 == m.b3 &&
+                  c1 == m.c1 && c2 == m.c2 && c3 == m.c3;
+}
+
+// ------------------------------------------------------------------------------------------------
+template <typename TReal>
+inline bool aiMatrix3x3t<TReal>::operator!= (const aiMatrix4x4t<TReal>& m) const
+{
+       return !(*this == m);
+}
+
+// ---------------------------------------------------------------------------
+template<typename TReal>
+inline bool aiMatrix3x3t<TReal>::Equal(const aiMatrix4x4t<TReal>& m, TReal epsilon) const {
+       return
+               std::abs(a1 - m.a1) <= epsilon &&
+               std::abs(a2 - m.a2) <= epsilon &&
+               std::abs(a3 - m.a3) <= epsilon &&
+               std::abs(b1 - m.b1) <= epsilon &&
+               std::abs(b2 - m.b2) <= epsilon &&
+               std::abs(b3 - m.b3) <= epsilon &&
+               std::abs(c1 - m.c1) <= epsilon &&
+               std::abs(c2 - m.c2) <= epsilon &&
+               std::abs(c3 - m.c3) <= epsilon;
+}
+
+// ------------------------------------------------------------------------------------------------
+template <typename TReal>
+inline aiMatrix3x3t<TReal>& aiMatrix3x3t<TReal>::Transpose()
+{
+       // (TReal&) don't remove, GCC complains cause of packed fields
+       std::swap( (TReal&)a2, (TReal&)b1);
+       std::swap( (TReal&)a3, (TReal&)c1);
+       std::swap( (TReal&)b3, (TReal&)c2);
+       return *this;
+}
+
+// ----------------------------------------------------------------------------------------
+template <typename TReal>
+inline TReal aiMatrix3x3t<TReal>::Determinant() const
+{
+       return a1*b2*c3 - a1*b3*c2 + a2*b3*c1 - a2*b1*c3 + a3*b1*c2 - a3*b2*c1;
+}
+
+// ----------------------------------------------------------------------------------------
+template <typename TReal>
+inline aiMatrix3x3t<TReal>& aiMatrix3x3t<TReal>::Inverse()
+{
+       // Compute the reciprocal determinant
+       TReal det = Determinant();
+       if(det == static_cast<TReal>(0.0)) 
+       {
+               // Matrix not invertible. Setting all elements to nan is not really
+               // correct in a mathematical sense; but at least qnans are easy to 
+               // spot. XXX we might throw an exception instead, which would
+               // be even much better to spot :/.
+               const TReal nan = std::numeric_limits<TReal>::quiet_NaN();
+               *this = aiMatrix3x3t<TReal>( nan,nan,nan,nan,nan,nan,nan,nan,nan);
+
+               return *this;
+       }
+
+       TReal invdet = static_cast<TReal>(1.0) / det;
+
+       aiMatrix3x3t<TReal> res;
+       res.a1 = invdet  * (b2 * c3 - b3 * c2);
+       res.a2 = -invdet * (a2 * c3 - a3 * c2);
+       res.a3 = invdet  * (a2 * b3 - a3 * b2);
+       res.b1 = -invdet * (b1 * c3 - b3 * c1);
+       res.b2 = invdet  * (a1 * c3 - a3 * c1);
+       res.b3 = -invdet * (a1 * b3 - a3 * b1);
+       res.c1 = invdet  * (b1 * c2 - b2 * c1);
+       res.c2 = -invdet * (a1 * c2 - a2 * c1);
+       res.c3 = invdet  * (a1 * b2 - a2 * b1);
+       *this = res;
+
+       return *this;
+}
+
+// ------------------------------------------------------------------------------------------------
+template <typename TReal>
+inline aiMatrix3x3t<TReal>& aiMatrix3x3t<TReal>::RotationZ(TReal a, aiMatrix3x3t<TReal>& out)
+{
+       out.a1 = out.b2 = ::cos(a);
+       out.b1 = ::sin(a);
+       out.a2 = - out.b1;
+
+       out.a3 = out.b3 = out.c1 = out.c2 = 0.f;
+       out.c3 = 1.f;
+
+       return out;
+}
+
+// ------------------------------------------------------------------------------------------------
+// Returns a rotation matrix for a rotation around an arbitrary axis.
+template <typename TReal>
+inline aiMatrix3x3t<TReal>& aiMatrix3x3t<TReal>::Rotation( TReal a, const aiVector3t<TReal>& axis, aiMatrix3x3t<TReal>& out)
+{
+  TReal c = cos( a), s = sin( a), t = 1 - c;
+  TReal x = axis.x, y = axis.y, z = axis.z;
+
+  // Many thanks to MathWorld and Wikipedia
+  out.a1 = t*x*x + c;   out.a2 = t*x*y - s*z; out.a3 = t*x*z + s*y;
+  out.b1 = t*x*y + s*z; out.b2 = t*y*y + c;   out.b3 = t*y*z - s*x;
+  out.c1 = t*x*z - s*y; out.c2 = t*y*z + s*x; out.c3 = t*z*z + c;
+
+  return out;
+}
+
+// ------------------------------------------------------------------------------------------------
+template <typename TReal>
+inline aiMatrix3x3t<TReal>& aiMatrix3x3t<TReal>::Translation( const aiVector2t<TReal>& v, aiMatrix3x3t<TReal>& out)
+{
+       out = aiMatrix3x3t<TReal>();
+       out.a3 = v.x;
+       out.b3 = v.y;
+       return out;
+}
+
+// ----------------------------------------------------------------------------------------
+/** A function for creating a rotation matrix that rotates a vector called
+ * "from" into another vector called "to".
+ * Input : from[3], to[3] which both must be *normalized* non-zero vectors
+ * Output: mtx[3][3] -- a 3x3 matrix in colum-major form
+ * Authors: Tomas Möller, John Hughes
+ *          "Efficiently Building a Matrix to Rotate One Vector to Another"
+ *          Journal of Graphics Tools, 4(4):1-4, 1999
+ */
+// ----------------------------------------------------------------------------------------
+template <typename TReal>
+inline aiMatrix3x3t<TReal>& aiMatrix3x3t<TReal>::FromToMatrix(const aiVector3t<TReal>& from, 
+       const aiVector3t<TReal>& to, aiMatrix3x3t<TReal>& mtx)
+{
+       const TReal e = from * to;
+       const TReal f = (e < 0)? -e:e;
+
+       if (f > static_cast<TReal>(1.0) - static_cast<TReal>(0.00001))     /* "from" and "to"-vector almost parallel */
+       {
+               aiVector3D u,v;     /* temporary storage vectors */
+               aiVector3D x;       /* vector most nearly orthogonal to "from" */
+
+               x.x = (from.x > 0.0)? from.x : -from.x;
+               x.y = (from.y > 0.0)? from.y : -from.y;
+               x.z = (from.z > 0.0)? from.z : -from.z;
+
+               if (x.x < x.y)
+               {
+                       if (x.x < x.z)
+                       {
+                               x.x = static_cast<TReal>(1.0); x.y = x.z = static_cast<TReal>(0.0);
+                       }
+                       else
+                       {
+                               x.z = static_cast<TReal>(1.0); x.y = x.z = static_cast<TReal>(0.0);
+                       }
+               }
+               else
+               {
+                       if (x.y < x.z)
+                       {
+                               x.y = static_cast<TReal>(1.0); x.x = x.z = static_cast<TReal>(0.0);
+                       }
+                       else
+                       {
+                               x.z = static_cast<TReal>(1.0); x.x = x.y = static_cast<TReal>(0.0);
+                       }
+               }
+
+               u.x = x.x - from.x; u.y = x.y - from.y; u.z = x.z - from.z;
+               v.x = x.x - to.x;   v.y = x.y - to.y;   v.z = x.z - to.z;
+
+               const TReal c1 = static_cast<TReal>(2.0) / (u * u);
+               const TReal c2 = static_cast<TReal>(2.0) / (v * v);
+               const TReal c3 = c1 * c2  * (u * v);
+
+               for (unsigned int i = 0; i < 3; i++) 
+               {
+                       for (unsigned int j = 0; j < 3; j++) 
+                       {
+                               mtx[i][j] =  - c1 * u[i] * u[j] - c2 * v[i] * v[j]
+                                       + c3 * v[i] * u[j];
+                       }
+                       mtx[i][i] += static_cast<TReal>(1.0);
+               }
+       }
+       else  /* the most common case, unless "from"="to", or "from"=-"to" */
+       {
+               const aiVector3D v = from ^ to;
+               /* ... use this hand optimized version (9 mults less) */
+               const TReal h = static_cast<TReal>(1.0)/(static_cast<TReal>(1.0) + e);      /* optimization by Gottfried Chen */
+               const TReal hvx = h * v.x;
+               const TReal hvz = h * v.z;
+               const TReal hvxy = hvx * v.y;
+               const TReal hvxz = hvx * v.z;
+               const TReal hvyz = hvz * v.y;
+               mtx[0][0] = e + hvx * v.x;
+               mtx[0][1] = hvxy - v.z;
+               mtx[0][2] = hvxz + v.y;
+
+               mtx[1][0] = hvxy + v.z;
+               mtx[1][1] = e + h * v.y * v.y;
+               mtx[1][2] = hvyz - v.x;
+
+               mtx[2][0] = hvxz - v.y;
+               mtx[2][1] = hvyz + v.x;
+               mtx[2][2] = e + hvz * v.z;
+       }
+       return mtx;
+}
+
+
+#endif // __cplusplus
+#endif // AI_MATRIX3x3_INL_INC
diff --git a/include/assimp/matrix4x4.h b/include/assimp/matrix4x4.h
new file mode 100644 (file)
index 0000000..6ed550b
--- /dev/null
@@ -0,0 +1,248 @@
+/*
+---------------------------------------------------------------------------
+Open Asset Import Library (assimp)
+---------------------------------------------------------------------------
+
+Copyright (c) 2006-2012, assimp team
+
+All rights reserved.
+
+Redistribution and use of this software 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.
+
+* Neither the name of the assimp team, nor the names of its
+  contributors may be used to endorse or promote products
+  derived from this software without specific prior
+  written permission of the assimp team.
+
+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.
+---------------------------------------------------------------------------
+*/
+/** @file matrix4x4.h
+ *  @brief 4x4 matrix structure, including operators when compiling in C++
+ */
+#ifndef AI_MATRIX4X4_H_INC
+#define AI_MATRIX4X4_H_INC
+
+#include "./Compiler/pushpack1.h"
+
+#ifdef __cplusplus
+
+template<typename TReal> class aiMatrix3x3t;
+template<typename TReal> class aiQuaterniont;
+
+// ---------------------------------------------------------------------------
+/** @brief Represents a row-major 4x4 matrix, use this for homogeneous
+ *   coordinates.
+ *
+ *  There's much confusion about matrix layouts (column vs. row order). 
+ *  This is *always* a row-major matrix. Not even with the
+ *  #aiProcess_ConvertToLeftHanded flag, which absolutely does not affect
+ *  matrix order - it just affects the handedness of the coordinate system
+ *  defined thereby.
+ */
+template<typename TReal>
+class aiMatrix4x4t
+{
+public:
+       
+       /** set to identity */
+       aiMatrix4x4t ();
+
+       /** construction from single values */
+       aiMatrix4x4t (  TReal _a1, TReal _a2, TReal _a3, TReal _a4,
+                                       TReal _b1, TReal _b2, TReal _b3, TReal _b4,
+                                       TReal _c1, TReal _c2, TReal _c3, TReal _c4,
+                                       TReal _d1, TReal _d2, TReal _d3, TReal _d4);
+
+
+       /** construction from 3x3 matrix, remaining elements are set to identity */
+       explicit aiMatrix4x4t( const aiMatrix3x3t<TReal>& m);
+       
+       /** construction from position, rotation and scaling components
+        * @param scaling The scaling for the x,y,z axes
+        * @param rotation The rotation as a hamilton quaternion 
+        * @param position The position for the x,y,z axes
+        */
+       aiMatrix4x4t(const aiVector3t<TReal>& scaling, const aiQuaterniont<TReal>& rotation,
+               const aiVector3t<TReal>& position);
+
+public:
+
+       // array access operators
+       TReal* operator[]       (unsigned int p_iIndex);
+       const TReal* operator[] (unsigned int p_iIndex) const;
+
+       // comparison operators
+       bool operator== (const aiMatrix4x4t& m) const;
+       bool operator!= (const aiMatrix4x4t& m) const;
+
+       bool Equal(const aiMatrix4x4t& m, TReal epsilon = 1e-6) const;
+
+       // matrix multiplication. 
+       aiMatrix4x4t& operator *= (const aiMatrix4x4t& m);
+       aiMatrix4x4t  operator *  (const aiMatrix4x4t& m) const;
+
+       template <typename TOther>
+       operator aiMatrix4x4t<TOther> () const;
+
+public:
+
+       // -------------------------------------------------------------------
+       /** @brief Transpose the matrix */
+       aiMatrix4x4t& Transpose();
+
+       // -------------------------------------------------------------------
+       /** @brief Invert the matrix.
+        *  If the matrix is not invertible all elements are set to qnan.
+        *  Beware, use (f != f) to check whether a TReal f is qnan.
+        */
+       aiMatrix4x4t& Inverse();
+       TReal Determinant() const;
+
+
+       // -------------------------------------------------------------------
+       /** @brief Returns true of the matrix is the identity matrix.
+        *  The check is performed against a not so small epsilon.
+        */
+       inline bool IsIdentity() const;
+
+       // -------------------------------------------------------------------
+       /** @brief Decompose a trafo matrix into its original components
+        *  @param scaling Receives the output scaling for the x,y,z axes
+        *  @param rotation Receives the output rotation as a hamilton
+        *   quaternion 
+        *  @param position Receives the output position for the x,y,z axes
+        */
+       void Decompose (aiVector3t<TReal>& scaling, aiQuaterniont<TReal>& rotation,
+               aiVector3t<TReal>& position) const;
+
+       // -------------------------------------------------------------------
+       /** @brief Decompose a trafo matrix with no scaling into its 
+        *    original components
+        *  @param rotation Receives the output rotation as a hamilton
+        *    quaternion 
+        *  @param position Receives the output position for the x,y,z axes
+        */
+       void DecomposeNoScaling (aiQuaterniont<TReal>& rotation,
+               aiVector3t<TReal>& position) const;
+
+
+       // -------------------------------------------------------------------
+       /** @brief Creates a trafo matrix from a set of euler angles
+        *  @param x Rotation angle for the x-axis, in radians
+        *  @param y Rotation angle for the y-axis, in radians
+        *  @param z Rotation angle for the z-axis, in radians
+        */
+       aiMatrix4x4t& FromEulerAnglesXYZ(TReal x, TReal y, TReal z);
+       aiMatrix4x4t& FromEulerAnglesXYZ(const aiVector3t<TReal>& blubb);
+
+public:
+       // -------------------------------------------------------------------
+       /** @brief Returns a rotation matrix for a rotation around the x axis
+        *  @param a Rotation angle, in radians
+        *  @param out Receives the output matrix
+        *  @return Reference to the output matrix
+        */
+       static aiMatrix4x4t& RotationX(TReal a, aiMatrix4x4t& out);
+
+       // -------------------------------------------------------------------
+       /** @brief Returns a rotation matrix for a rotation around the y axis
+        *  @param a Rotation angle, in radians
+        *  @param out Receives the output matrix
+        *  @return Reference to the output matrix
+        */
+       static aiMatrix4x4t& RotationY(TReal a, aiMatrix4x4t& out);
+
+       // -------------------------------------------------------------------
+       /** @brief Returns a rotation matrix for a rotation around the z axis
+        *  @param a Rotation angle, in radians
+        *  @param out Receives the output matrix
+        *  @return Reference to the output matrix
+        */
+       static aiMatrix4x4t& RotationZ(TReal a, aiMatrix4x4t& out);
+
+       // -------------------------------------------------------------------
+       /** Returns a rotation matrix for a rotation around an arbitrary axis.
+        *  @param a Rotation angle, in radians
+        *  @param axis Rotation axis, should be a normalized vector.
+        *  @param out Receives the output matrix
+        *  @return Reference to the output matrix
+        */
+       static aiMatrix4x4t& Rotation(TReal a, const aiVector3t<TReal>& axis, 
+               aiMatrix4x4t& out);
+
+       // -------------------------------------------------------------------
+       /** @brief Returns a translation matrix 
+        *  @param v Translation vector
+        *  @param out Receives the output matrix
+        *  @return Reference to the output matrix
+        */
+       static aiMatrix4x4t& Translation( const aiVector3t<TReal>& v, aiMatrix4x4t& out);
+
+       // -------------------------------------------------------------------
+       /** @brief Returns a scaling matrix 
+        *  @param v Scaling vector
+        *  @param out Receives the output matrix
+        *  @return Reference to the output matrix
+        */
+       static aiMatrix4x4t& Scaling( const aiVector3t<TReal>& v, aiMatrix4x4t& out);
+
+       // -------------------------------------------------------------------
+       /** @brief A function for creating a rotation matrix that rotates a
+        *  vector called "from" into another vector called "to".
+        * Input : from[3], to[3] which both must be *normalized* non-zero vectors
+        * Output: mtx[3][3] -- a 3x3 matrix in colum-major form
+        * Authors: Tomas Möller, John Hughes
+        *          "Efficiently Building a Matrix to Rotate One Vector to Another"
+        *          Journal of Graphics Tools, 4(4):1-4, 1999
+        */
+       static aiMatrix4x4t& FromToMatrix(const aiVector3t<TReal>& from, 
+               const aiVector3t<TReal>& to, aiMatrix4x4t& out);
+
+public:
+
+       TReal a1, a2, a3, a4;
+       TReal b1, b2, b3, b4;
+       TReal c1, c2, c3, c4;
+       TReal d1, d2, d3, d4;
+
+} PACK_STRUCT; 
+
+typedef aiMatrix4x4t<float> aiMatrix4x4;
+
+#else
+
+struct aiMatrix4x4 {
+       float a1, a2, a3, a4;
+       float b1, b2, b3, b4;
+       float c1, c2, c3, c4;
+       float d1, d2, d3, d4;
+};
+
+
+#endif // __cplusplus
+
+#include "./Compiler/poppack1.h"
+
+#endif // AI_MATRIX4X4_H_INC
diff --git a/include/assimp/matrix4x4.inl b/include/assimp/matrix4x4.inl
new file mode 100644 (file)
index 0000000..4fb86b1
--- /dev/null
@@ -0,0 +1,540 @@
+/*
+---------------------------------------------------------------------------
+Open Asset Import Library (assimp)
+---------------------------------------------------------------------------
+
+Copyright (c) 2006-2012, assimp team
+
+All rights reserved.
+
+Redistribution and use of this software 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.
+
+* Neither the name of the assimp team, nor the names of its
+  contributors may be used to endorse or promote products
+  derived from this software without specific prior
+  written permission of the assimp team.
+
+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.
+---------------------------------------------------------------------------
+*/
+
+/** @file aiMatrix4x4t<TReal>.inl
+ *  @brief Inline implementation of the 4x4 matrix operators
+ */
+#ifndef AI_MATRIX4x4_INL_INC
+#define AI_MATRIX4x4_INL_INC
+
+#ifdef __cplusplus
+
+#include "matrix4x4.h"
+#include "matrix3x3.h"
+#include "quaternion.h"
+
+#include <algorithm>
+#include <limits>
+
+#ifdef __cplusplus
+#   include <cmath>
+#else
+#   include <math.h>
+#endif
+
+// ----------------------------------------------------------------------------------------
+template <typename TReal>
+aiMatrix4x4t<TReal> ::aiMatrix4x4t () :
+       a1(1.0f), a2(), a3(), a4(),
+       b1(), b2(1.0f), b3(), b4(),
+       c1(), c2(), c3(1.0f), c4(),
+       d1(), d2(), d3(), d4(1.0f)
+{
+
+}
+
+// ----------------------------------------------------------------------------------------
+template <typename TReal>
+aiMatrix4x4t<TReal> ::aiMatrix4x4t (TReal _a1, TReal _a2, TReal _a3, TReal _a4,
+                         TReal _b1, TReal _b2, TReal _b3, TReal _b4,
+                         TReal _c1, TReal _c2, TReal _c3, TReal _c4,
+                         TReal _d1, TReal _d2, TReal _d3, TReal _d4) :
+       a1(_a1), a2(_a2), a3(_a3), a4(_a4),
+       b1(_b1), b2(_b2), b3(_b3), b4(_b4),
+       c1(_c1), c2(_c2), c3(_c3), c4(_c4),
+       d1(_d1), d2(_d2), d3(_d3), d4(_d4)
+{
+
+}
+
+// ------------------------------------------------------------------------------------------------
+template <typename TReal>
+template <typename TOther>
+aiMatrix4x4t<TReal>::operator aiMatrix4x4t<TOther> () const
+{
+       return aiMatrix4x4t<TOther>(static_cast<TOther>(a1),static_cast<TOther>(a2),static_cast<TOther>(a3),static_cast<TOther>(a4),
+               static_cast<TOther>(b1),static_cast<TOther>(b2),static_cast<TOther>(b3),static_cast<TOther>(b4),
+               static_cast<TOther>(c1),static_cast<TOther>(c2),static_cast<TOther>(c3),static_cast<TOther>(c4),
+               static_cast<TOther>(d1),static_cast<TOther>(d2),static_cast<TOther>(d3),static_cast<TOther>(d4));
+}
+
+
+// ----------------------------------------------------------------------------------------
+template <typename TReal>
+inline aiMatrix4x4t<TReal>::aiMatrix4x4t (const aiMatrix3x3t<TReal>& m)
+{
+       a1 = m.a1; a2 = m.a2; a3 = m.a3; a4 = static_cast<TReal>(0.0);
+       b1 = m.b1; b2 = m.b2; b3 = m.b3; b4 = static_cast<TReal>(0.0);
+       c1 = m.c1; c2 = m.c2; c3 = m.c3; c4 = static_cast<TReal>(0.0);
+       d1 = static_cast<TReal>(0.0); d2 = static_cast<TReal>(0.0); d3 = static_cast<TReal>(0.0); d4 = static_cast<TReal>(1.0);
+}
+
+// ----------------------------------------------------------------------------------------
+template <typename TReal>
+inline aiMatrix4x4t<TReal>::aiMatrix4x4t (const aiVector3t<TReal>& scaling, const aiQuaterniont<TReal>& rotation, const aiVector3t<TReal>& position)
+{
+       // build a 3x3 rotation matrix
+       aiMatrix3x3t<TReal> m = rotation.GetMatrix();
+
+       a1 = m.a1 * scaling.x;
+       a2 = m.a2 * scaling.x;
+       a3 = m.a3 * scaling.x;
+       a4 = position.x;
+
+       b1 = m.b1 * scaling.y;
+       b2 = m.b2 * scaling.y;
+       b3 = m.b3 * scaling.y;
+       b4 = position.y;
+       
+       c1 = m.c1 * scaling.z;
+       c2 = m.c2 * scaling.z;
+       c3 = m.c3 * scaling.z;
+       c4= position.z;
+
+       d1 = static_cast<TReal>(0.0);
+       d2 = static_cast<TReal>(0.0);
+       d3 = static_cast<TReal>(0.0);
+       d4 = static_cast<TReal>(1.0);
+}
+
+// ----------------------------------------------------------------------------------------
+template <typename TReal>
+inline aiMatrix4x4t<TReal>& aiMatrix4x4t<TReal>::operator *= (const aiMatrix4x4t<TReal>& m)
+{
+       *this = aiMatrix4x4t<TReal>(
+               m.a1 * a1 + m.b1 * a2 + m.c1 * a3 + m.d1 * a4,
+               m.a2 * a1 + m.b2 * a2 + m.c2 * a3 + m.d2 * a4,
+               m.a3 * a1 + m.b3 * a2 + m.c3 * a3 + m.d3 * a4,
+               m.a4 * a1 + m.b4 * a2 + m.c4 * a3 + m.d4 * a4,
+               m.a1 * b1 + m.b1 * b2 + m.c1 * b3 + m.d1 * b4,
+               m.a2 * b1 + m.b2 * b2 + m.c2 * b3 + m.d2 * b4,
+               m.a3 * b1 + m.b3 * b2 + m.c3 * b3 + m.d3 * b4,
+               m.a4 * b1 + m.b4 * b2 + m.c4 * b3 + m.d4 * b4,
+               m.a1 * c1 + m.b1 * c2 + m.c1 * c3 + m.d1 * c4,
+               m.a2 * c1 + m.b2 * c2 + m.c2 * c3 + m.d2 * c4,
+               m.a3 * c1 + m.b3 * c2 + m.c3 * c3 + m.d3 * c4,
+               m.a4 * c1 + m.b4 * c2 + m.c4 * c3 + m.d4 * c4,
+               m.a1 * d1 + m.b1 * d2 + m.c1 * d3 + m.d1 * d4,
+               m.a2 * d1 + m.b2 * d2 + m.c2 * d3 + m.d2 * d4,
+               m.a3 * d1 + m.b3 * d2 + m.c3 * d3 + m.d3 * d4,
+               m.a4 * d1 + m.b4 * d2 + m.c4 * d3 + m.d4 * d4);
+       return *this;
+}
+
+// ----------------------------------------------------------------------------------------
+template <typename TReal>
+inline aiMatrix4x4t<TReal> aiMatrix4x4t<TReal>::operator* (const aiMatrix4x4t<TReal>& m) const
+{
+       aiMatrix4x4t<TReal> temp( *this);
+       temp *= m;
+       return temp;
+}
+
+
+// ----------------------------------------------------------------------------------------
+template <typename TReal>
+inline aiMatrix4x4t<TReal>& aiMatrix4x4t<TReal>::Transpose()
+{
+       // (TReal&) don't remove, GCC complains cause of packed fields
+       std::swap( (TReal&)b1, (TReal&)a2);
+       std::swap( (TReal&)c1, (TReal&)a3);
+       std::swap( (TReal&)c2, (TReal&)b3);
+       std::swap( (TReal&)d1, (TReal&)a4);
+       std::swap( (TReal&)d2, (TReal&)b4);
+       std::swap( (TReal&)d3, (TReal&)c4);
+       return *this;
+}
+
+
+// ----------------------------------------------------------------------------------------
+template <typename TReal>
+inline TReal aiMatrix4x4t<TReal>::Determinant() const
+{
+       return a1*b2*c3*d4 - a1*b2*c4*d3 + a1*b3*c4*d2 - a1*b3*c2*d4
+               + a1*b4*c2*d3 - a1*b4*c3*d2 - a2*b3*c4*d1 + a2*b3*c1*d4
+               - a2*b4*c1*d3 + a2*b4*c3*d1 - a2*b1*c3*d4 + a2*b1*c4*d3
+               + a3*b4*c1*d2 - a3*b4*c2*d1 + a3*b1*c2*d4 - a3*b1*c4*d2
+               + a3*b2*c4*d1 - a3*b2*c1*d4 - a4*b1*c2*d3 + a4*b1*c3*d2
+               - a4*b2*c3*d1 + a4*b2*c1*d3 - a4*b3*c1*d2 + a4*b3*c2*d1;
+}
+
+// ----------------------------------------------------------------------------------------
+template <typename TReal>
+inline aiMatrix4x4t<TReal>& aiMatrix4x4t<TReal>::Inverse()
+{
+       // Compute the reciprocal determinant
+       const TReal det = Determinant();
+       if(det == static_cast<TReal>(0.0))
+       {
+               // Matrix not invertible. Setting all elements to nan is not really
+               // correct in a mathematical sense but it is easy to debug for the
+               // programmer.
+               const TReal nan = std::numeric_limits<TReal>::quiet_NaN();
+               *this = aiMatrix4x4t<TReal>(
+                       nan,nan,nan,nan,
+                       nan,nan,nan,nan,
+                       nan,nan,nan,nan,
+                       nan,nan,nan,nan);
+
+               return *this;
+       }
+
+       const TReal invdet = static_cast<TReal>(1.0) / det;
+
+       aiMatrix4x4t<TReal> res;
+       res.a1 = invdet  * (b2 * (c3 * d4 - c4 * d3) + b3 * (c4 * d2 - c2 * d4) + b4 * (c2 * d3 - c3 * d2));
+       res.a2 = -invdet * (a2 * (c3 * d4 - c4 * d3) + a3 * (c4 * d2 - c2 * d4) + a4 * (c2 * d3 - c3 * d2));
+       res.a3 = invdet  * (a2 * (b3 * d4 - b4 * d3) + a3 * (b4 * d2 - b2 * d4) + a4 * (b2 * d3 - b3 * d2));
+       res.a4 = -invdet * (a2 * (b3 * c4 - b4 * c3) + a3 * (b4 * c2 - b2 * c4) + a4 * (b2 * c3 - b3 * c2));
+       res.b1 = -invdet * (b1 * (c3 * d4 - c4 * d3) + b3 * (c4 * d1 - c1 * d4) + b4 * (c1 * d3 - c3 * d1));
+       res.b2 = invdet  * (a1 * (c3 * d4 - c4 * d3) + a3 * (c4 * d1 - c1 * d4) + a4 * (c1 * d3 - c3 * d1));
+       res.b3 = -invdet * (a1 * (b3 * d4 - b4 * d3) + a3 * (b4 * d1 - b1 * d4) + a4 * (b1 * d3 - b3 * d1));
+       res.b4 = invdet  * (a1 * (b3 * c4 - b4 * c3) + a3 * (b4 * c1 - b1 * c4) + a4 * (b1 * c3 - b3 * c1));
+       res.c1 = invdet  * (b1 * (c2 * d4 - c4 * d2) + b2 * (c4 * d1 - c1 * d4) + b4 * (c1 * d2 - c2 * d1));
+       res.c2 = -invdet * (a1 * (c2 * d4 - c4 * d2) + a2 * (c4 * d1 - c1 * d4) + a4 * (c1 * d2 - c2 * d1));
+       res.c3 = invdet  * (a1 * (b2 * d4 - b4 * d2) + a2 * (b4 * d1 - b1 * d4) + a4 * (b1 * d2 - b2 * d1));
+       res.c4 = -invdet * (a1 * (b2 * c4 - b4 * c2) + a2 * (b4 * c1 - b1 * c4) + a4 * (b1 * c2 - b2 * c1));
+       res.d1 = -invdet * (b1 * (c2 * d3 - c3 * d2) + b2 * (c3 * d1 - c1 * d3) + b3 * (c1 * d2 - c2 * d1));
+       res.d2 = invdet  * (a1 * (c2 * d3 - c3 * d2) + a2 * (c3 * d1 - c1 * d3) + a3 * (c1 * d2 - c2 * d1));
+       res.d3 = -invdet * (a1 * (b2 * d3 - b3 * d2) + a2 * (b3 * d1 - b1 * d3) + a3 * (b1 * d2 - b2 * d1));
+       res.d4 = invdet  * (a1 * (b2 * c3 - b3 * c2) + a2 * (b3 * c1 - b1 * c3) + a3 * (b1 * c2 - b2 * c1));
+       *this = res;
+
+       return *this;
+}
+
+// ----------------------------------------------------------------------------------------
+template <typename TReal>
+inline TReal* aiMatrix4x4t<TReal>::operator[](unsigned int p_iIndex)
+{
+       // XXX this is UB. Has been for years. The fact that it works now does not make it better.
+       return &this->a1 + p_iIndex * 4;
+}
+
+// ----------------------------------------------------------------------------------------
+template <typename TReal>
+inline const TReal* aiMatrix4x4t<TReal>::operator[](unsigned int p_iIndex) const
+{
+       // XXX same
+       return &this->a1 + p_iIndex * 4;
+}
+
+// ----------------------------------------------------------------------------------------
+template <typename TReal>
+inline bool aiMatrix4x4t<TReal>::operator== (const aiMatrix4x4t<TReal>& m) const
+{
+       return (a1 == m.a1 && a2 == m.a2 && a3 == m.a3 && a4 == m.a4 &&
+                       b1 == m.b1 && b2 == m.b2 && b3 == m.b3 && b4 == m.b4 &&
+                       c1 == m.c1 && c2 == m.c2 && c3 == m.c3 && c4 == m.c4 &&
+                       d1 == m.d1 && d2 == m.d2 && d3 == m.d3 && d4 == m.d4);
+}
+
+// ----------------------------------------------------------------------------------------
+template <typename TReal>
+inline bool aiMatrix4x4t<TReal>::operator!= (const aiMatrix4x4t<TReal>& m) const
+{
+       return !(*this == m);
+}
+
+// ---------------------------------------------------------------------------
+template<typename TReal>
+inline bool aiMatrix4x4t<TReal>::Equal(const aiMatrix4x4t<TReal>& m, TReal epsilon) const {
+       return
+               std::abs(a1 - m.a1) <= epsilon &&
+               std::abs(a2 - m.a2) <= epsilon &&
+               std::abs(a3 - m.a3) <= epsilon &&
+               std::abs(a4 - m.a4) <= epsilon &&
+               std::abs(b1 - m.b1) <= epsilon &&
+               std::abs(b2 - m.b2) <= epsilon &&
+               std::abs(b3 - m.b3) <= epsilon &&
+               std::abs(b4 - m.b4) <= epsilon &&
+               std::abs(c1 - m.c1) <= epsilon &&
+               std::abs(c2 - m.c2) <= epsilon &&
+               std::abs(c3 - m.c3) <= epsilon &&
+               std::abs(c4 - m.c4) <= epsilon &&
+               std::abs(d1 - m.d1) <= epsilon &&
+               std::abs(d2 - m.d2) <= epsilon &&
+               std::abs(d3 - m.d3) <= epsilon &&
+               std::abs(d4 - m.d4) <= epsilon;
+}
+
+// ----------------------------------------------------------------------------------------
+template <typename TReal>
+inline void aiMatrix4x4t<TReal>::Decompose (aiVector3t<TReal>& scaling, aiQuaterniont<TReal>& rotation,
+       aiVector3t<TReal>& position) const
+{
+       const aiMatrix4x4t<TReal>& _this = *this;
+
+       // extract translation
+       position.x = _this[0][3];
+       position.y = _this[1][3];
+       position.z = _this[2][3];
+
+       // extract the rows of the matrix
+       aiVector3t<TReal> vRows[3] = {
+               aiVector3t<TReal>(_this[0][0],_this[1][0],_this[2][0]),
+               aiVector3t<TReal>(_this[0][1],_this[1][1],_this[2][1]),
+               aiVector3t<TReal>(_this[0][2],_this[1][2],_this[2][2])
+       };
+
+       // extract the scaling factors
+       scaling.x = vRows[0].Length();
+       scaling.y = vRows[1].Length();
+       scaling.z = vRows[2].Length();
+
+       // and the sign of the scaling
+       if (Determinant() < 0) {
+               scaling.x = -scaling.x;
+               scaling.y = -scaling.y;
+               scaling.z = -scaling.z;
+       }
+
+       // and remove all scaling from the matrix
+       if(scaling.x)
+       {
+               vRows[0] /= scaling.x;
+       }
+       if(scaling.y)
+       {
+               vRows[1] /= scaling.y;
+       }
+       if(scaling.z)
+       {
+               vRows[2] /= scaling.z;
+       }
+
+       // build a 3x3 rotation matrix
+       aiMatrix3x3t<TReal> m(vRows[0].x,vRows[1].x,vRows[2].x,
+               vRows[0].y,vRows[1].y,vRows[2].y,
+               vRows[0].z,vRows[1].z,vRows[2].z);
+
+       // and generate the rotation quaternion from it
+       rotation = aiQuaterniont<TReal>(m);
+}
+
+// ----------------------------------------------------------------------------------------
+template <typename TReal>
+inline void aiMatrix4x4t<TReal>::DecomposeNoScaling (aiQuaterniont<TReal>& rotation,
+       aiVector3t<TReal>& position) const
+{
+       const aiMatrix4x4t<TReal>& _this = *this;
+
+       // extract translation
+       position.x = _this[0][3];
+       position.y = _this[1][3];
+       position.z = _this[2][3];
+
+       // extract rotation
+       rotation = aiQuaterniont<TReal>((aiMatrix3x3t<TReal>)_this);
+}
+
+// ----------------------------------------------------------------------------------------
+template <typename TReal>
+inline aiMatrix4x4t<TReal>& aiMatrix4x4t<TReal>::FromEulerAnglesXYZ(const aiVector3t<TReal>& blubb)
+{
+       return FromEulerAnglesXYZ(blubb.x,blubb.y,blubb.z);
+}
+
+// ----------------------------------------------------------------------------------------
+template <typename TReal>
+inline aiMatrix4x4t<TReal>& aiMatrix4x4t<TReal>::FromEulerAnglesXYZ(TReal x, TReal y, TReal z)
+{
+       aiMatrix4x4t<TReal>& _this = *this;
+
+       TReal cr = cos( x );
+       TReal sr = sin( x );
+       TReal cp = cos( y );
+       TReal sp = sin( y );
+       TReal cy = cos( z );
+       TReal sy = sin( z );
+
+       _this.a1 = cp*cy ;
+       _this.a2 = cp*sy;
+       _this.a3 = -sp ;
+
+       TReal srsp = sr*sp;
+       TReal crsp = cr*sp;
+
+       _this.b1 = srsp*cy-cr*sy ;
+       _this.b2 = srsp*sy+cr*cy ;
+       _this.b3 = sr*cp ;
+
+       _this.c1 =  crsp*cy+sr*sy ;
+       _this.c2 =  crsp*sy-sr*cy ;
+       _this.c3 = cr*cp ;
+
+       return *this;
+}
+
+// ----------------------------------------------------------------------------------------
+template <typename TReal>
+inline bool aiMatrix4x4t<TReal>::IsIdentity() const
+{
+       // Use a small epsilon to solve floating-point inaccuracies
+       const static TReal epsilon = 10e-3f;
+
+       return (a2 <= epsilon && a2 >= -epsilon &&
+                       a3 <= epsilon && a3 >= -epsilon &&
+                       a4 <= epsilon && a4 >= -epsilon &&
+                       b1 <= epsilon && b1 >= -epsilon &&
+                       b3 <= epsilon && b3 >= -epsilon &&
+                       b4 <= epsilon && b4 >= -epsilon &&
+                       c1 <= epsilon && c1 >= -epsilon &&
+                       c2 <= epsilon && c2 >= -epsilon &&
+                       c4 <= epsilon && c4 >= -epsilon &&
+                       d1 <= epsilon && d1 >= -epsilon &&
+                       d2 <= epsilon && d2 >= -epsilon &&
+                       d3 <= epsilon && d3 >= -epsilon &&
+                       a1 <= 1.f+epsilon && a1 >= 1.f-epsilon &&
+                       b2 <= 1.f+epsilon && b2 >= 1.f-epsilon &&
+                       c3 <= 1.f+epsilon && c3 >= 1.f-epsilon &&
+                       d4 <= 1.f+epsilon && d4 >= 1.f-epsilon);
+}
+
+// ----------------------------------------------------------------------------------------
+template <typename TReal>
+inline aiMatrix4x4t<TReal>& aiMatrix4x4t<TReal>::RotationX(TReal a, aiMatrix4x4t<TReal>& out)
+{
+       /*
+            |  1  0       0       0 |
+     M = |  0  cos(A) -sin(A)  0 |
+         |  0  sin(A)  cos(A)  0 |
+         |  0  0       0       1 |     */
+       out = aiMatrix4x4t<TReal>();
+       out.b2 = out.c3 = cos(a);
+       out.b3 = -(out.c2 = sin(a));
+       return out;
+}
+
+// ----------------------------------------------------------------------------------------
+template <typename TReal>
+inline aiMatrix4x4t<TReal>& aiMatrix4x4t<TReal>::RotationY(TReal a, aiMatrix4x4t<TReal>& out)
+{
+       /*
+            |  cos(A)  0   sin(A)  0 |
+     M = |  0       1   0       0 |
+         | -sin(A)  0   cos(A)  0 |
+         |  0       0   0       1 |
+               */
+       out = aiMatrix4x4t<TReal>();
+       out.a1 = out.c3 = cos(a);
+       out.c1 = -(out.a3 = sin(a));
+       return out;
+}
+
+// ----------------------------------------------------------------------------------------
+template <typename TReal>
+inline aiMatrix4x4t<TReal>& aiMatrix4x4t<TReal>::RotationZ(TReal a, aiMatrix4x4t<TReal>& out)
+{
+       /*
+            |  cos(A)  -sin(A)   0   0 |
+     M = |  sin(A)   cos(A)   0   0 |
+         |  0        0        1   0 |
+         |  0        0        0   1 |  */
+       out = aiMatrix4x4t<TReal>();
+       out.a1 = out.b2 = cos(a);
+       out.a2 = -(out.b1 = sin(a));
+       return out;
+}
+
+// ----------------------------------------------------------------------------------------
+// Returns a rotation matrix for a rotation around an arbitrary axis.
+template <typename TReal>
+inline aiMatrix4x4t<TReal>& aiMatrix4x4t<TReal>::Rotation( TReal a, const aiVector3t<TReal>& axis, aiMatrix4x4t<TReal>& out)
+{
+  TReal c = cos( a), s = sin( a), t = 1 - c;
+  TReal x = axis.x, y = axis.y, z = axis.z;
+
+  // Many thanks to MathWorld and Wikipedia
+  out.a1 = t*x*x + c;   out.a2 = t*x*y - s*z; out.a3 = t*x*z + s*y;
+  out.b1 = t*x*y + s*z; out.b2 = t*y*y + c;   out.b3 = t*y*z - s*x;
+  out.c1 = t*x*z - s*y; out.c2 = t*y*z + s*x; out.c3 = t*z*z + c;
+  out.a4 = out.b4 = out.c4 = static_cast<TReal>(0.0);
+  out.d1 = out.d2 = out.d3 = static_cast<TReal>(0.0);
+  out.d4 = static_cast<TReal>(1.0);
+
+  return out;
+}
+
+// ----------------------------------------------------------------------------------------
+template <typename TReal>
+inline aiMatrix4x4t<TReal>& aiMatrix4x4t<TReal>::Translation( const aiVector3t<TReal>& v, aiMatrix4x4t<TReal>& out)
+{
+       out = aiMatrix4x4t<TReal>();
+       out.a4 = v.x;
+       out.b4 = v.y;
+       out.c4 = v.z;
+       return out;
+}
+
+// ----------------------------------------------------------------------------------------
+template <typename TReal>
+inline aiMatrix4x4t<TReal>& aiMatrix4x4t<TReal>::Scaling( const aiVector3t<TReal>& v, aiMatrix4x4t<TReal>& out)
+{
+       out = aiMatrix4x4t<TReal>();
+       out.a1 = v.x;
+       out.b2 = v.y;
+       out.c3 = v.z;
+       return out;
+}
+
+// ----------------------------------------------------------------------------------------
+/** A function for creating a rotation matrix that rotates a vector called
+ * "from" into another vector called "to".
+ * Input : from[3], to[3] which both must be *normalized* non-zero vectors
+ * Output: mtx[3][3] -- a 3x3 matrix in colum-major form
+ * Authors: Tomas Möller, John Hughes
+ *          "Efficiently Building a Matrix to Rotate One Vector to Another"
+ *          Journal of Graphics Tools, 4(4):1-4, 1999
+ */
+// ----------------------------------------------------------------------------------------
+template <typename TReal>
+inline aiMatrix4x4t<TReal>& aiMatrix4x4t<TReal>::FromToMatrix(const aiVector3t<TReal>& from,
+       const aiVector3t<TReal>& to, aiMatrix4x4t<TReal>& mtx)
+{
+       aiMatrix3x3t<TReal> m3;
+       aiMatrix3x3t<TReal>::FromToMatrix(from,to,m3);
+       mtx = aiMatrix4x4t<TReal>(m3);
+       return mtx;
+}
+
+#endif // __cplusplus
+#endif // AI_MATRIX4x4_INL_INC
diff --git a/include/assimp/mesh.h b/include/assimp/mesh.h
new file mode 100644 (file)
index 0000000..9e82608
--- /dev/null
@@ -0,0 +1,740 @@
+/*
+---------------------------------------------------------------------------
+Open Asset Import Library (assimp)
+---------------------------------------------------------------------------
+
+Copyright (c) 2006-2012, assimp team
+
+All rights reserved.
+
+Redistribution and use of this software 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.
+
+* Neither the name of the assimp team, nor the names of its
+  contributors may be used to endorse or promote products
+  derived from this software without specific prior
+  written permission of the assimp team.
+
+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.
+---------------------------------------------------------------------------
+*/
+
+/** @file mesh.h
+ *  @brief Declares the data structures in which the imported geometry is 
+    returned by ASSIMP: aiMesh, aiFace and aiBone data structures.
+ */
+#ifndef INCLUDED_AI_MESH_H
+#define INCLUDED_AI_MESH_H
+
+#include "types.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+// ---------------------------------------------------------------------------
+// Limits. These values are required to match the settings Assimp was 
+// compiled against. Therfore, do not redefine them unless you build the 
+// library from source using the same definitions.
+// ---------------------------------------------------------------------------
+
+/** @def AI_MAX_FACE_INDICES
+ *  Maximum number of indices per face (polygon). */
+
+#ifndef AI_MAX_FACE_INDICES 
+#      define AI_MAX_FACE_INDICES 0x7fff
+#endif
+
+/** @def AI_MAX_BONE_WEIGHTS
+ *  Maximum number of indices per face (polygon). */
+
+#ifndef AI_MAX_BONE_WEIGHTS
+#      define AI_MAX_BONE_WEIGHTS 0x7fffffff
+#endif
+
+/** @def AI_MAX_VERTICES
+ *  Maximum number of vertices per mesh.  */
+
+#ifndef AI_MAX_VERTICES
+#      define AI_MAX_VERTICES 0x7fffffff
+#endif
+
+/** @def AI_MAX_FACES
+ *  Maximum number of faces per mesh. */
+
+#ifndef AI_MAX_FACES
+#      define AI_MAX_FACES 0x7fffffff
+#endif
+
+/** @def AI_MAX_NUMBER_OF_COLOR_SETS
+ *  Supported number of vertex color sets per mesh. */
+
+#ifndef AI_MAX_NUMBER_OF_COLOR_SETS
+#      define AI_MAX_NUMBER_OF_COLOR_SETS 0x8
+#endif // !! AI_MAX_NUMBER_OF_COLOR_SETS
+
+/** @def AI_MAX_NUMBER_OF_TEXTURECOORDS
+ *  Supported number of texture coord sets (UV(W) channels) per mesh */
+
+#ifndef AI_MAX_NUMBER_OF_TEXTURECOORDS
+#      define AI_MAX_NUMBER_OF_TEXTURECOORDS 0x8
+#endif // !! AI_MAX_NUMBER_OF_TEXTURECOORDS
+
+// ---------------------------------------------------------------------------
+/** @brief A single face in a mesh, referring to multiple vertices. 
+ *
+ * If mNumIndices is 3, we call the face 'triangle', for mNumIndices > 3 
+ * it's called 'polygon' (hey, that's just a definition!).
+ * <br>
+ * aiMesh::mPrimitiveTypes can be queried to quickly examine which types of
+ * primitive are actually present in a mesh. The #aiProcess_SortByPType flag 
+ * executes a special post-processing algorithm which splits meshes with
+ * *different* primitive types mixed up (e.g. lines and triangles) in several
+ * 'clean' submeshes. Furthermore there is a configuration option (
+ * #AI_CONFIG_PP_SBP_REMOVE) to force #aiProcess_SortByPType to remove 
+ * specific kinds of primitives from the imported scene, completely and forever.
+ * In many cases you'll probably want to set this setting to 
+ * @code 
+ * aiPrimitiveType_LINE|aiPrimitiveType_POINT
+ * @endcode
+ * Together with the #aiProcess_Triangulate flag you can then be sure that
+ * #aiFace::mNumIndices is always 3. 
+ * @note Take a look at the @link data Data Structures page @endlink for
+ * more information on the layout and winding order of a face.
+ */
+struct aiFace
+{
+       //! Number of indices defining this face. 
+       //! The maximum value for this member is #AI_MAX_FACE_INDICES.
+       unsigned int mNumIndices; 
+
+       //! Pointer to the indices array. Size of the array is given in numIndices.
+       unsigned int* mIndices;   
+
+#ifdef __cplusplus
+
+       //! Default constructor
+       aiFace()
+      : mNumIndices( 0 )
+      , mIndices( NULL )
+       {
+       }
+
+       //! Default destructor. Delete the index array
+       ~aiFace()
+       {
+               delete [] mIndices;
+       }
+
+       //! Copy constructor. Copy the index array
+       aiFace( const aiFace& o)
+      : mIndices( NULL )
+       {
+               *this = o;
+       }
+
+       //! Assignment operator. Copy the index array
+       aiFace& operator = ( const aiFace& o)
+       {
+               if (&o == this)
+                       return *this;
+
+               delete[] mIndices;
+               mNumIndices = o.mNumIndices;
+               if (mNumIndices) {
+                       mIndices = new unsigned int[mNumIndices];
+                       ::memcpy( mIndices, o.mIndices, mNumIndices * sizeof( unsigned int));
+               }
+               else {
+                       mIndices = NULL;
+               }
+               return *this;
+       }
+
+       //! Comparison operator. Checks whether the index array 
+       //! of two faces is identical
+       bool operator== (const aiFace& o) const
+       {
+               if (mIndices == o.mIndices)return true;
+               else if (mIndices && mNumIndices == o.mNumIndices)
+               {
+                       for (unsigned int i = 0;i < this->mNumIndices;++i)
+                               if (mIndices[i] != o.mIndices[i])return false;
+                       return true;
+               }
+               return false;
+       }
+
+       //! Inverse comparison operator. Checks whether the index 
+       //! array of two faces is NOT identical
+       bool operator != (const aiFace& o) const
+       {
+               return !(*this == o);
+       }
+#endif // __cplusplus
+}; // struct aiFace
+
+
+// ---------------------------------------------------------------------------
+/** @brief A single influence of a bone on a vertex.
+ */
+struct aiVertexWeight
+{
+       //! Index of the vertex which is influenced by the bone.
+       unsigned int mVertexId;
+
+       //! The strength of the influence in the range (0...1).
+       //! The influence from all bones at one vertex amounts to 1.
+       float mWeight;     
+
+#ifdef __cplusplus
+
+       //! Default constructor
+       aiVertexWeight() { }
+
+       //! Initialisation from a given index and vertex weight factor
+       //! \param pID ID
+       //! \param pWeight Vertex weight factor
+       aiVertexWeight( unsigned int pID, float pWeight) 
+               : mVertexId( pID), mWeight( pWeight) 
+       { /* nothing to do here */ }
+
+#endif // __cplusplus
+};
+
+
+// ---------------------------------------------------------------------------
+/** @brief A single bone of a mesh.
+ *
+ *  A bone has a name by which it can be found in the frame hierarchy and by
+ *  which it can be addressed by animations. In addition it has a number of 
+ *  influences on vertices.
+ */
+struct aiBone
+{
+       //! The name of the bone. 
+       C_STRUCT aiString mName;
+
+       //! The number of vertices affected by this bone
+       //! The maximum value for this member is #AI_MAX_BONE_WEIGHTS.
+       unsigned int mNumWeights;
+
+       //! The vertices affected by this bone
+       C_STRUCT aiVertexWeight* mWeights;
+
+       //! Matrix that transforms from mesh space to bone space in bind pose
+       C_STRUCT aiMatrix4x4 mOffsetMatrix;
+
+#ifdef __cplusplus
+
+       //! Default constructor
+       aiBone()
+      : mNumWeights( 0 )
+      , mWeights( NULL )
+       {
+       }
+
+       //! Copy constructor
+       aiBone(const aiBone& other)
+      : mName( other.mName )
+      , mNumWeights( other.mNumWeights )
+      , mOffsetMatrix( other.mOffsetMatrix )
+       {
+               if (other.mWeights && other.mNumWeights)
+               {
+                       mWeights = new aiVertexWeight[mNumWeights];
+                       ::memcpy(mWeights,other.mWeights,mNumWeights * sizeof(aiVertexWeight));
+               }
+       }
+
+       //! Destructor - deletes the array of vertex weights
+       ~aiBone()
+       {
+               delete [] mWeights;
+       }
+#endif // __cplusplus
+};
+
+
+// ---------------------------------------------------------------------------
+/** @brief Enumerates the types of geometric primitives supported by Assimp.
+ *  
+ *  @see aiFace Face data structure
+ *  @see aiProcess_SortByPType Per-primitive sorting of meshes
+ *  @see aiProcess_Triangulate Automatic triangulation
+ *  @see AI_CONFIG_PP_SBP_REMOVE Removal of specific primitive types.
+ */
+enum aiPrimitiveType
+{
+       /** A point primitive. 
+        *
+        * This is just a single vertex in the virtual world, 
+        * #aiFace contains just one index for such a primitive.
+        */
+       aiPrimitiveType_POINT       = 0x1,
+
+       /** A line primitive. 
+        *
+        * This is a line defined through a start and an end position.
+        * #aiFace contains exactly two indices for such a primitive.
+        */
+       aiPrimitiveType_LINE        = 0x2,
+
+       /** A triangular primitive. 
+        *
+        * A triangle consists of three indices.
+        */
+       aiPrimitiveType_TRIANGLE    = 0x4,
+
+       /** A higher-level polygon with more than 3 edges.
+        *
+        * A triangle is a polygon, but polygon in this context means
+        * "all polygons that are not triangles". The "Triangulate"-Step
+        * is provided for your convenience, it splits all polygons in
+        * triangles (which are much easier to handle).
+        */
+       aiPrimitiveType_POLYGON     = 0x8,
+
+
+       /** This value is not used. It is just here to force the
+        *  compiler to map this enum to a 32 Bit integer.
+        */
+#ifndef SWIG
+       _aiPrimitiveType_Force32Bit = INT_MAX
+#endif
+}; //! enum aiPrimitiveType
+
+// Get the #aiPrimitiveType flag for a specific number of face indices
+#define AI_PRIMITIVE_TYPE_FOR_N_INDICES(n) \
+       ((n) > 3 ? aiPrimitiveType_POLYGON : (aiPrimitiveType)(1u << ((n)-1)))
+
+
+
+// ---------------------------------------------------------------------------
+/** @brief NOT CURRENTLY IN USE. An AnimMesh is an attachment to an #aiMesh stores per-vertex 
+ *  animations for a particular frame.
+ *  
+ *  You may think of an #aiAnimMesh as a `patch` for the host mesh, which
+ *  replaces only certain vertex data streams at a particular time. 
+ *  Each mesh stores n attached attached meshes (#aiMesh::mAnimMeshes).
+ *  The actual relationship between the time line and anim meshes is 
+ *  established by #aiMeshAnim, which references singular mesh attachments
+ *  by their ID and binds them to a time offset.
+*/
+struct aiAnimMesh
+{
+       /** Replacement for aiMesh::mVertices. If this array is non-NULL, 
+        *  it *must* contain mNumVertices entries. The corresponding
+        *  array in the host mesh must be non-NULL as well - animation
+        *  meshes may neither add or nor remove vertex components (if
+        *  a replacement array is NULL and the corresponding source
+        *  array is not, the source data is taken instead)*/
+       C_STRUCT aiVector3D* mVertices;
+
+       /** Replacement for aiMesh::mNormals.  */
+       C_STRUCT aiVector3D* mNormals;
+
+       /** Replacement for aiMesh::mTangents. */
+       C_STRUCT aiVector3D* mTangents;
+
+       /** Replacement for aiMesh::mBitangents. */
+       C_STRUCT aiVector3D* mBitangents;
+
+       /** Replacement for aiMesh::mColors */
+       C_STRUCT aiColor4D* mColors[AI_MAX_NUMBER_OF_COLOR_SETS];
+
+       /** Replacement for aiMesh::mTextureCoords */
+       C_STRUCT aiVector3D* mTextureCoords[AI_MAX_NUMBER_OF_TEXTURECOORDS];
+
+       /** The number of vertices in the aiAnimMesh, and thus the length of all
+        * the member arrays.
+        *
+        * This has always the same value as the mNumVertices property in the
+        * corresponding aiMesh. It is duplicated here merely to make the length
+        * of the member arrays accessible even if the aiMesh is not known, e.g.
+        * from language bindings.
+        */
+       unsigned int mNumVertices;
+
+#ifdef __cplusplus
+
+       aiAnimMesh()
+               : mVertices( NULL )
+               , mNormals( NULL )
+               , mTangents( NULL )
+               , mBitangents( NULL )
+               , mNumVertices( 0 )
+       {
+               // fixme consider moving this to the ctor initializer list as well
+               for( unsigned int a = 0; a < AI_MAX_NUMBER_OF_TEXTURECOORDS; a++){
+                       mTextureCoords[a] = NULL;
+               }
+               for( unsigned int a = 0; a < AI_MAX_NUMBER_OF_COLOR_SETS; a++) {
+                       mColors[a] = NULL;
+               }
+       }
+       
+       ~aiAnimMesh()
+       {
+               delete [] mVertices; 
+               delete [] mNormals;
+               delete [] mTangents;
+               delete [] mBitangents;
+               for( unsigned int a = 0; a < AI_MAX_NUMBER_OF_TEXTURECOORDS; a++) {
+                       delete [] mTextureCoords[a];
+               }
+               for( unsigned int a = 0; a < AI_MAX_NUMBER_OF_COLOR_SETS; a++) {
+                       delete [] mColors[a];
+               }
+       }
+
+       /** Check whether the anim mesh overrides the vertex positions 
+        *  of its host mesh*/ 
+       bool HasPositions() const {
+               return mVertices != NULL; 
+       }
+
+       /** Check whether the anim mesh overrides the vertex normals
+        *  of its host mesh*/ 
+       bool HasNormals() const { 
+               return mNormals != NULL; 
+       }
+
+       /** Check whether the anim mesh overrides the vertex tangents
+        *  and bitangents of its host mesh. As for aiMesh,
+        *  tangents and bitangents always go together. */ 
+       bool HasTangentsAndBitangents() const { 
+               return mTangents != NULL; 
+       }
+
+       /** Check whether the anim mesh overrides a particular
+        * set of vertex colors on his host mesh. 
+        *  @param pIndex 0<index<AI_MAX_NUMBER_OF_COLOR_SETS */ 
+       bool HasVertexColors( unsigned int pIndex) const        { 
+               return pIndex >= AI_MAX_NUMBER_OF_COLOR_SETS ? false : mColors[pIndex] != NULL; 
+       }
+
+       /** Check whether the anim mesh overrides a particular
+        * set of texture coordinates on his host mesh. 
+        *  @param pIndex 0<index<AI_MAX_NUMBER_OF_TEXTURECOORDS */ 
+       bool HasTextureCoords( unsigned int pIndex) const       { 
+               return pIndex >= AI_MAX_NUMBER_OF_TEXTURECOORDS ? false : mTextureCoords[pIndex] != NULL; 
+       }
+
+#endif
+};
+
+
+// ---------------------------------------------------------------------------
+/** @brief A mesh represents a geometry or model with a single material. 
+*
+* It usually consists of a number of vertices and a series of primitives/faces 
+* referencing the vertices. In addition there might be a series of bones, each 
+* of them addressing a number of vertices with a certain weight. Vertex data 
+* is presented in channels with each channel containing a single per-vertex 
+* information such as a set of texture coords or a normal vector.
+* If a data pointer is non-null, the corresponding data stream is present.
+* From C++-programs you can also use the comfort functions Has*() to
+* test for the presence of various data streams.
+*
+* A Mesh uses only a single material which is referenced by a material ID.
+* @note The mPositions member is usually not optional. However, vertex positions 
+* *could* be missing if the #AI_SCENE_FLAGS_INCOMPLETE flag is set in 
+* @code
+* aiScene::mFlags
+* @endcode
+*/
+struct aiMesh
+{
+       /** Bitwise combination of the members of the #aiPrimitiveType enum.
+        * This specifies which types of primitives are present in the mesh.
+        * The "SortByPrimitiveType"-Step can be used to make sure the 
+        * output meshes consist of one primitive type each.
+        */
+       unsigned int mPrimitiveTypes;
+
+       /** The number of vertices in this mesh. 
+       * This is also the size of all of the per-vertex data arrays.
+       * The maximum value for this member is #AI_MAX_VERTICES.
+       */
+       unsigned int mNumVertices;
+
+       /** The number of primitives (triangles, polygons, lines) in this  mesh. 
+       * This is also the size of the mFaces array.
+       * The maximum value for this member is #AI_MAX_FACES.
+       */
+       unsigned int mNumFaces;
+
+       /** Vertex positions. 
+       * This array is always present in a mesh. The array is 
+       * mNumVertices in size. 
+       */
+       C_STRUCT aiVector3D* mVertices;
+
+       /** Vertex normals. 
+       * The array contains normalized vectors, NULL if not present. 
+       * The array is mNumVertices in size. Normals are undefined for
+       * point and line primitives. A mesh consisting of points and
+       * lines only may not have normal vectors. Meshes with mixed
+       * primitive types (i.e. lines and triangles) may have normals,
+       * but the normals for vertices that are only referenced by
+       * point or line primitives are undefined and set to QNaN (WARN:
+       * qNaN compares to inequal to *everything*, even to qNaN itself.
+       * Using code like this to check whether a field is qnan is:
+       * @code
+       * #define IS_QNAN(f) (f != f)
+       * @endcode
+       * still dangerous because even 1.f == 1.f could evaluate to false! (
+       * remember the subtleties of IEEE754 artithmetics). Use stuff like
+       * @c fpclassify instead.
+       * @note Normal vectors computed by Assimp are always unit-length.
+       * However, this needn't apply for normals that have been taken
+       *   directly from the model file.
+       */
+       C_STRUCT aiVector3D* mNormals;
+
+       /** Vertex tangents. 
+       * The tangent of a vertex points in the direction of the positive 
+       * X texture axis. The array contains normalized vectors, NULL if
+       * not present. The array is mNumVertices in size. A mesh consisting 
+       * of points and lines only may not have normal vectors. Meshes with 
+       * mixed primitive types (i.e. lines and triangles) may have 
+       * normals, but the normals for vertices that are only referenced by
+       * point or line primitives are undefined and set to qNaN.  See
+       * the #mNormals member for a detailled discussion of qNaNs.
+       * @note If the mesh contains tangents, it automatically also 
+       * contains bitangents.
+       */
+       C_STRUCT aiVector3D* mTangents;
+
+       /** Vertex bitangents. 
+       * The bitangent of a vertex points in the direction of the positive 
+       * Y texture axis. The array contains normalized vectors, NULL if not
+       * present. The array is mNumVertices in size. 
+       * @note If the mesh contains tangents, it automatically also contains
+       * bitangents.  
+       */
+       C_STRUCT aiVector3D* mBitangents;
+
+       /** Vertex color sets. 
+       * A mesh may contain 0 to #AI_MAX_NUMBER_OF_COLOR_SETS vertex 
+       * colors per vertex. NULL if not present. Each array is
+       * mNumVertices in size if present.
+       */
+       C_STRUCT aiColor4D* mColors[AI_MAX_NUMBER_OF_COLOR_SETS];
+
+       /** Vertex texture coords, also known as UV channels.
+       * A mesh may contain 0 to AI_MAX_NUMBER_OF_TEXTURECOORDS per
+       * vertex. NULL if not present. The array is mNumVertices in size. 
+       */
+       C_STRUCT aiVector3D* mTextureCoords[AI_MAX_NUMBER_OF_TEXTURECOORDS];
+
+       /** Specifies the number of components for a given UV channel.
+       * Up to three channels are supported (UVW, for accessing volume
+       * or cube maps). If the value is 2 for a given channel n, the
+       * component p.z of mTextureCoords[n][p] is set to 0.0f.
+       * If the value is 1 for a given channel, p.y is set to 0.0f, too.
+       * @note 4D coords are not supported 
+       */
+       unsigned int mNumUVComponents[AI_MAX_NUMBER_OF_TEXTURECOORDS];
+
+       /** The faces the mesh is constructed from. 
+       * Each face refers to a number of vertices by their indices. 
+       * This array is always present in a mesh, its size is given 
+       * in mNumFaces. If the #AI_SCENE_FLAGS_NON_VERBOSE_FORMAT
+       * is NOT set each face references an unique set of vertices.
+       */
+       C_STRUCT aiFace* mFaces;
+
+       /** The number of bones this mesh contains. 
+       * Can be 0, in which case the mBones array is NULL. 
+       */
+       unsigned int mNumBones;
+
+       /** The bones of this mesh. 
+       * A bone consists of a name by which it can be found in the
+       * frame hierarchy and a set of vertex weights.
+       */
+       C_STRUCT aiBone** mBones;
+
+       /** The material used by this mesh. 
+        * A mesh does use only a single material. If an imported model uses
+        * multiple materials, the import splits up the mesh. Use this value 
+        * as index into the scene's material list.
+        */
+       unsigned int mMaterialIndex;
+
+       /** Name of the mesh. Meshes can be named, but this is not a
+        *  requirement and leaving this field empty is totally fine.
+        *  There are mainly three uses for mesh names: 
+        *   - some formats name nodes and meshes independently.
+        *   - importers tend to split meshes up to meet the
+        *      one-material-per-mesh requirement. Assigning
+        *      the same (dummy) name to each of the result meshes
+        *      aids the caller at recovering the original mesh
+        *      partitioning.
+        *   - Vertex animations refer to meshes by their names.
+        **/
+       C_STRUCT aiString mName;
+
+
+       /** NOT CURRENTLY IN USE. The number of attachment meshes */
+       unsigned int mNumAnimMeshes;
+
+       /** NOT CURRENTLY IN USE. Attachment meshes for this mesh, for vertex-based animation. 
+        *  Attachment meshes carry replacement data for some of the
+        *  mesh'es vertex components (usually positions, normals). */
+       C_STRUCT aiAnimMesh** mAnimMeshes;
+
+
+#ifdef __cplusplus
+
+       //! Default constructor. Initializes all members to 0
+       aiMesh()
+               : mPrimitiveTypes( 0 )
+               , mNumVertices( 0 )
+               , mNumFaces( 0 )
+               , mVertices( NULL )
+               , mNormals( NULL )
+               , mTangents( NULL )
+               , mBitangents( NULL )
+               , mFaces( NULL )
+               , mNumBones( 0 )
+               , mBones( NULL )
+               , mMaterialIndex( 0 )
+               , mNumAnimMeshes( 0 )
+               , mAnimMeshes( NULL )
+       {
+               for( unsigned int a = 0; a < AI_MAX_NUMBER_OF_TEXTURECOORDS; a++)
+               {
+                       mNumUVComponents[a] = 0;
+                       mTextureCoords[a] = NULL;
+               }
+      
+               for( unsigned int a = 0; a < AI_MAX_NUMBER_OF_COLOR_SETS; a++)
+                       mColors[a] = NULL;
+       }
+
+       //! Deletes all storage allocated for the mesh
+       ~aiMesh()
+       {
+               delete [] mVertices; 
+               delete [] mNormals;
+               delete [] mTangents;
+               delete [] mBitangents;
+               for( unsigned int a = 0; a < AI_MAX_NUMBER_OF_TEXTURECOORDS; a++) {
+                       delete [] mTextureCoords[a];
+               }
+               for( unsigned int a = 0; a < AI_MAX_NUMBER_OF_COLOR_SETS; a++) {
+                       delete [] mColors[a];
+               }
+
+               // DO NOT REMOVE THIS ADDITIONAL CHECK
+               if (mNumBones && mBones)        {
+                       for( unsigned int a = 0; a < mNumBones; a++) {
+                               delete mBones[a];
+                       }
+                       delete [] mBones;
+               }
+
+               if (mNumAnimMeshes && mAnimMeshes)      {
+                       for( unsigned int a = 0; a < mNumAnimMeshes; a++) {
+                               delete mAnimMeshes[a];
+                       }
+                       delete [] mAnimMeshes;
+               }
+
+               delete [] mFaces;
+       }
+
+       //! Check whether the mesh contains positions. Provided no special
+       //! scene flags are set (such as #AI_SCENE_FLAGS_ANIM_SKELETON_ONLY), 
+       //! this will always be true 
+       bool HasPositions() const 
+               { return mVertices != NULL && mNumVertices > 0; }
+
+       //! Check whether the mesh contains faces. If no special scene flags
+       //! are set this should always return true
+       bool HasFaces() const 
+               { return mFaces != NULL && mNumFaces > 0; }
+
+       //! Check whether the mesh contains normal vectors
+       bool HasNormals() const 
+               { return mNormals != NULL && mNumVertices > 0; }
+
+       //! Check whether the mesh contains tangent and bitangent vectors
+       //! It is not possible that it contains tangents and no bitangents
+       //! (or the other way round). The existence of one of them
+       //! implies that the second is there, too.
+       bool HasTangentsAndBitangents() const 
+               { return mTangents != NULL && mBitangents != NULL && mNumVertices > 0; }
+
+       //! Check whether the mesh contains a vertex color set
+       //! \param pIndex Index of the vertex color set
+       bool HasVertexColors( unsigned int pIndex) const
+       { 
+               if( pIndex >= AI_MAX_NUMBER_OF_COLOR_SETS) 
+                       return false; 
+               else 
+                       return mColors[pIndex] != NULL && mNumVertices > 0; 
+       }
+
+       //! Check whether the mesh contains a texture coordinate set
+       //! \param pIndex Index of the texture coordinates set
+       bool HasTextureCoords( unsigned int pIndex) const
+       { 
+               if( pIndex >= AI_MAX_NUMBER_OF_TEXTURECOORDS) 
+                       return false; 
+               else 
+                       return mTextureCoords[pIndex] != NULL && mNumVertices > 0; 
+       }
+
+       //! Get the number of UV channels the mesh contains
+       unsigned int GetNumUVChannels() const 
+       {
+               unsigned int n = 0;
+               while (n < AI_MAX_NUMBER_OF_TEXTURECOORDS && mTextureCoords[n])++n;
+               return n;
+       }
+
+       //! Get the number of vertex color channels the mesh contains
+       unsigned int GetNumColorChannels() const 
+       {
+               unsigned int n = 0;
+               while (n < AI_MAX_NUMBER_OF_COLOR_SETS && mColors[n])++n;
+               return n;
+       }
+
+       //! Check whether the mesh contains bones
+       inline bool HasBones() const
+               { return mBones != NULL && mNumBones > 0; }
+
+#endif // __cplusplus
+};
+
+
+#ifdef __cplusplus
+}
+#endif //! extern "C"
+#endif // __AI_MESH_H_INC
+
diff --git a/include/assimp/metadata.h b/include/assimp/metadata.h
new file mode 100644 (file)
index 0000000..16809a5
--- /dev/null
@@ -0,0 +1,247 @@
+/*
+---------------------------------------------------------------------------
+Open Asset Import Library (assimp)
+---------------------------------------------------------------------------
+
+Copyright (c) 2006-2012, assimp team
+
+All rights reserved.
+
+Redistribution and use of this software 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.
+
+* Neither the name of the assimp team, nor the names of its
+  contributors may be used to endorse or promote products
+  derived from this software without specific prior
+  written permission of the assimp team.
+
+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.
+---------------------------------------------------------------------------
+*/
+
+/** @file metadata.h
+ *  @brief Defines the data structures for holding node meta information.
+ */
+#ifndef __AI_METADATA_H_INC__
+#define __AI_METADATA_H_INC__
+
+#include <assert.h>
+
+#if defined(_MSC_VER) && (_MSC_VER <= 1500)
+#include "Compiler/pstdint.h"
+#else
+#include <stdint.h>
+#endif
+
+
+
+// -------------------------------------------------------------------------------
+/**
+  * Enum used to distinguish data types
+  */
+ // -------------------------------------------------------------------------------
+typedef enum aiMetadataType
+{
+       AI_BOOL = 0, 
+       AI_INT = 1, 
+       AI_UINT64 = 2, 
+       AI_FLOAT = 3, 
+       AI_AISTRING = 4,
+       AI_AIVECTOR3D = 5,
+
+#ifndef SWIG
+       FORCE_32BIT = INT_MAX
+#endif
+} aiMetadataType;
+
+
+
+// -------------------------------------------------------------------------------
+/**
+  * Metadata entry
+  *
+  * The type field uniquely identifies the underlying type of the data field
+  */
+ // -------------------------------------------------------------------------------
+struct aiMetadataEntry
+{
+       aiMetadataType mType;
+       void* mData;
+};
+
+
+
+#ifdef __cplusplus
+
+#include <string>
+
+
+
+// -------------------------------------------------------------------------------
+/**
+  * Helper functions to get the aiType enum entry for a type
+  */
+ // -------------------------------------------------------------------------------
+inline aiMetadataType GetAiType( bool ) { return AI_BOOL; }
+inline aiMetadataType GetAiType( int ) { return AI_INT; }
+inline aiMetadataType GetAiType( uint64_t ) { return AI_UINT64; }
+inline aiMetadataType GetAiType( float ) { return AI_FLOAT; }
+inline aiMetadataType GetAiType( aiString ) { return AI_AISTRING; }
+inline aiMetadataType GetAiType( aiVector3D ) { return AI_AIVECTOR3D; }
+
+
+
+#endif
+
+
+
+// -------------------------------------------------------------------------------
+/**
+  * Container for holding metadata.
+  *
+  * Metadata is a key-value store using string keys and values.
+  */
+ // -------------------------------------------------------------------------------
+struct aiMetadata 
+{
+       /** Length of the mKeys and mValues arrays, respectively */
+       unsigned int mNumProperties;
+
+       /** Arrays of keys, may not be NULL. Entries in this array may not be NULL as well. */
+       C_STRUCT aiString* mKeys;
+
+       /** Arrays of values, may not be NULL. Entries in this array may be NULL if the
+         * corresponding property key has no assigned value. */
+       C_STRUCT aiMetadataEntry* mValues;
+
+#ifdef __cplusplus
+
+       /** Constructor */
+       aiMetadata()
+               // set all members to zero by default
+               : mNumProperties(0)
+               , mKeys(NULL)
+               , mValues(NULL)
+       {}
+
+
+       /** Destructor */
+       ~aiMetadata()
+       {
+        delete[] mKeys;
+        mKeys = NULL;
+               if (mValues)
+               {
+                       // Delete each metadata entry
+                       for (unsigned i=0; i<mNumProperties; ++i)
+                       {
+                               void* data = mValues[i].mData;
+                               switch (mValues[i].mType) 
+                               {
+                               case AI_BOOL:
+                                       delete static_cast<bool*>(data);
+                                       break;
+                               case AI_INT:
+                                       delete static_cast<int*>(data);
+                                       break;
+                               case AI_UINT64:
+                                       delete static_cast<uint64_t*>(data);
+                                       break;
+                               case AI_FLOAT:
+                                       delete static_cast<float*>(data);
+                                       break;
+                               case AI_AISTRING:
+                                       delete static_cast<aiString*>(data);
+                                       break;
+                               case AI_AIVECTOR3D:
+                                       delete static_cast<aiVector3D*>(data);
+                                       break;
+                               default:
+                                       assert(false);
+                                       break;
+                               }
+                       }
+
+                       // Delete the metadata array
+                       delete [] mValues;
+            mValues = NULL;
+               }
+       }
+
+
+
+       template<typename T>
+       inline void Set( unsigned index, const std::string& key, const T& value )
+       {
+               // In range assertion
+               assert(index < mNumProperties);
+
+               // Set metadata key
+               mKeys[index] = key;
+
+               // Set metadata type
+               mValues[index].mType = GetAiType(value);
+               // Copy the given value to the dynamic storage
+               mValues[index].mData = new T(value);
+       }
+
+       template<typename T>
+       inline bool Get( unsigned index, T& value )
+       {
+               // In range assertion
+               assert(index < mNumProperties);
+
+               // Return false if the output data type does 
+               // not match the found value's data type
+        if ( GetAiType( value ) != mValues[ index ].mType ) {
+            return false;
+        }
+
+               // Otherwise, output the found value and 
+               // return true
+               value = *static_cast<T*>(mValues[index].mData);
+               return true;
+       }
+
+       template<typename T>
+       inline bool Get( const aiString& key, T& value )
+       {
+               // Search for the given key
+               for (unsigned i=0; i<mNumProperties; ++i)
+                       if (mKeys[i]==key)
+                               return Get(i, value);
+               return false;
+       }
+
+       template<typename T>
+       inline bool Get( const std::string& key, T& value ) {
+        return Get(aiString(key), value); 
+    }
+
+#endif // __cplusplus
+
+};
+
+#endif // __AI_METADATA_H_INC__
+
+
diff --git a/include/assimp/postprocess.h b/include/assimp/postprocess.h
new file mode 100644 (file)
index 0000000..0eb9abe
--- /dev/null
@@ -0,0 +1,633 @@
+/*
+Open Asset Import Library (assimp)
+----------------------------------------------------------------------
+
+Copyright (c) 2006-2012, assimp team
+All rights reserved.
+
+Redistribution and use of this software 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.
+
+* Neither the name of the assimp team, nor the names of its
+  contributors may be used to endorse or promote products
+  derived from this software without specific prior
+  written permission of the assimp team.
+
+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.
+
+----------------------------------------------------------------------
+*/
+
+/** @file postprocess.h
+ *  @brief Definitions for import post processing steps
+ */
+#ifndef AI_POSTPROCESS_H_INC
+#define AI_POSTPROCESS_H_INC
+
+#include "types.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+// -----------------------------------------------------------------------------------
+/** @enum  aiPostProcessSteps
+ *  @brief Defines the flags for all possible post processing steps.
+ *
+ *  @note Some steps are influenced by properties set on the Assimp::Importer itself
+ *
+ *  @see Assimp::Importer::ReadFile()
+ *  @see Assimp::Importer::SetPropertyInteger()
+ *  @see aiImportFile
+ *  @see aiImportFileEx
+ */
+// -----------------------------------------------------------------------------------
+enum aiPostProcessSteps
+{
+
+       // -------------------------------------------------------------------------
+       /** <hr>Calculates the tangents and bitangents for the imported meshes. 
+        *
+        * Does nothing if a mesh does not have normals. You might want this post 
+        * processing step to be executed if you plan to use tangent space calculations 
+        * such as normal mapping  applied to the meshes. There's an importer property,
+        * <tt>#AI_CONFIG_PP_CT_MAX_SMOOTHING_ANGLE</tt>, which allows you to specify
+        * a maximum smoothing angle for the algorithm. However, usually you'll
+        * want to leave it at the default value.
+        */
+       aiProcess_CalcTangentSpace = 0x1,
+
+       // -------------------------------------------------------------------------
+       /** <hr>Identifies and joins identical vertex data sets within all 
+        *  imported meshes. 
+        * 
+        * After this step is run, each mesh contains unique vertices,
+        * so a vertex may be used by multiple faces. You usually want
+        * to use this post processing step. If your application deals with
+        * indexed geometry, this step is compulsory or you'll just waste rendering
+        * time. <b>If this flag is not specified</b>, no vertices are referenced by
+        * more than one face and <b>no index buffer is required</b> for rendering.
+        */
+       aiProcess_JoinIdenticalVertices = 0x2,
+
+       // -------------------------------------------------------------------------
+       /** <hr>Converts all the imported data to a left-handed coordinate space. 
+        *
+        * By default the data is returned in a right-handed coordinate space (which 
+        * OpenGL prefers). In this space, +X points to the right, 
+        * +Z points towards the viewer, and +Y points upwards. In the DirectX 
+     * coordinate space +X points to the right, +Y points upwards, and +Z points 
+     * away from the viewer.
+        *
+        * You'll probably want to consider this flag if you use Direct3D for
+        * rendering. The #aiProcess_ConvertToLeftHanded flag supersedes this
+        * setting and bundles all conversions typically required for D3D-based
+        * applications.
+        */
+       aiProcess_MakeLeftHanded = 0x4,
+
+       // -------------------------------------------------------------------------
+       /** <hr>Triangulates all faces of all meshes. 
+        *
+        * By default the imported mesh data might contain faces with more than 3
+        * indices. For rendering you'll usually want all faces to be triangles. 
+        * This post processing step splits up faces with more than 3 indices into 
+        * triangles. Line and point primitives are *not* modified! If you want
+        * 'triangles only' with no other kinds of primitives, try the following
+        * solution:
+        * <ul>
+        * <li>Specify both #aiProcess_Triangulate and #aiProcess_SortByPType </li>
+        * <li>Ignore all point and line meshes when you process assimp's output</li>
+        * </ul>
+        */
+       aiProcess_Triangulate = 0x8,
+
+       // -------------------------------------------------------------------------
+       /** <hr>Removes some parts of the data structure (animations, materials, 
+        *  light sources, cameras, textures, vertex components).
+        *
+        * The  components to be removed are specified in a separate
+        * importer property, <tt>#AI_CONFIG_PP_RVC_FLAGS</tt>. This is quite useful
+        * if you don't need all parts of the output structure. Vertex colors
+        * are rarely used today for example... Calling this step to remove unneeded
+        * data from the pipeline as early as possible results in increased 
+        * performance and a more optimized output data structure.
+        * This step is also useful if you want to force Assimp to recompute 
+        * normals or tangents. The corresponding steps don't recompute them if 
+        * they're already there (loaded from the source asset). By using this 
+        * step you can make sure they are NOT there.
+        *
+        * This flag is a poor one, mainly because its purpose is usually
+     * misunderstood. Consider the following case: a 3D model has been exported
+        * from a CAD app, and it has per-face vertex colors. Vertex positions can't be
+        * shared, thus the #aiProcess_JoinIdenticalVertices step fails to
+        * optimize the data because of these nasty little vertex colors.
+        * Most apps don't even process them, so it's all for nothing. By using
+        * this step, unneeded components are excluded as early as possible
+        * thus opening more room for internal optimizations. 
+        */
+       aiProcess_RemoveComponent = 0x10,
+
+       // -------------------------------------------------------------------------
+       /** <hr>Generates normals for all faces of all meshes. 
+        *
+        * This is ignored if normals are already there at the time this flag 
+        * is evaluated. Model importers try to load them from the source file, so
+        * they're usually already there. Face normals are shared between all points
+        * of a single face, so a single point can have multiple normals, which
+        * forces the library to duplicate vertices in some cases.
+        * #aiProcess_JoinIdenticalVertices is *senseless* then.
+        *
+        * This flag may not be specified together with #aiProcess_GenSmoothNormals.
+        */
+       aiProcess_GenNormals = 0x20,
+
+       // -------------------------------------------------------------------------
+       /** <hr>Generates smooth normals for all vertices in the mesh.
+       *
+       * This is ignored if normals are already there at the time this flag 
+       * is evaluated. Model importers try to load them from the source file, so
+       * they're usually already there. 
+       *
+       * This flag may not be specified together with 
+       * #aiProcess_GenNormals. There's a importer property, 
+       * <tt>#AI_CONFIG_PP_GSN_MAX_SMOOTHING_ANGLE</tt> which allows you to specify
+       * an angle maximum for the normal smoothing algorithm. Normals exceeding
+       * this limit are not smoothed, resulting in a 'hard' seam between two faces.
+       * Using a decent angle here (e.g. 80 degrees) results in very good visual
+       * appearance.
+       */
+       aiProcess_GenSmoothNormals = 0x40,
+
+       // -------------------------------------------------------------------------
+       /** <hr>Splits large meshes into smaller sub-meshes.
+       *
+       * This is quite useful for real-time rendering, where the number of triangles
+       * which can be maximally processed in a single draw-call is limited 
+       * by the video driver/hardware. The maximum vertex buffer is usually limited
+       * too. Both requirements can be met with this step: you may specify both a 
+       * triangle and vertex limit for a single mesh.
+       *
+       * The split limits can (and should!) be set through the 
+       * <tt>#AI_CONFIG_PP_SLM_VERTEX_LIMIT</tt> and <tt>#AI_CONFIG_PP_SLM_TRIANGLE_LIMIT</tt> 
+       * importer properties. The default values are <tt>#AI_SLM_DEFAULT_MAX_VERTICES</tt> and 
+       * <tt>#AI_SLM_DEFAULT_MAX_TRIANGLES</tt>. 
+       *
+       * Note that splitting is generally a time-consuming task, but only if there's
+       * something to split. The use of this step is recommended for most users.
+       */
+       aiProcess_SplitLargeMeshes = 0x80,
+
+       // -------------------------------------------------------------------------
+       /** <hr>Removes the node graph and pre-transforms all vertices with
+       * the local transformation matrices of their nodes.
+       *
+       * The output scene still contains nodes, however there is only a
+       * root node with children, each one referencing only one mesh,
+       * and each mesh referencing one material. For rendering, you can
+       * simply render all meshes in order - you don't need to pay
+       * attention to local transformations and the node hierarchy.
+       * Animations are removed during this step.
+       * This step is intended for applications without a scenegraph.
+       * The step CAN cause some problems: if e.g. a mesh of the asset
+       * contains normals and another, using the same material index, does not, 
+       * they will be brought together, but the first meshes's part of
+       * the normal list is zeroed. However, these artifacts are rare.
+       * @note The <tt>#AI_CONFIG_PP_PTV_NORMALIZE</tt> configuration property
+       * can be set to normalize the scene's spatial dimension to the -1...1
+       * range. 
+       */
+       aiProcess_PreTransformVertices = 0x100,
+
+       // -------------------------------------------------------------------------
+       /** <hr>Limits the number of bones simultaneously affecting a single vertex
+       *  to a maximum value.
+       *
+       * If any vertex is affected by more than the maximum number of bones, the least 
+       * important vertex weights are removed and the remaining vertex weights are
+       * renormalized so that the weights still sum up to 1.
+       * The default bone weight limit is 4 (defined as <tt>#AI_LMW_MAX_WEIGHTS</tt> in
+       * config.h), but you can use the <tt>#AI_CONFIG_PP_LBW_MAX_WEIGHTS</tt> importer
+       * property to supply your own limit to the post processing step.
+       *
+       * If you intend to perform the skinning in hardware, this post processing 
+       * step might be of interest to you.
+       */
+       aiProcess_LimitBoneWeights = 0x200,
+
+       // -------------------------------------------------------------------------
+       /** <hr>Validates the imported scene data structure.
+        * This makes sure that all indices are valid, all animations and
+        * bones are linked correctly, all material references are correct .. etc.
+        *
+        * It is recommended that you capture Assimp's log output if you use this flag,
+        * so you can easily find out what's wrong if a file fails the
+        * validation. The validator is quite strict and will find *all*
+        * inconsistencies in the data structure... It is recommended that plugin 
+        * developers use it to debug their loaders. There are two types of
+        * validation failures:
+        * <ul>
+        * <li>Error: There's something wrong with the imported data. Further
+        *   postprocessing is not possible and the data is not usable at all.
+        *   The import fails. #Importer::GetErrorString() or #aiGetErrorString()
+        *   carry the error message around.</li>
+        * <li>Warning: There are some minor issues (e.g. 1000000 animation 
+        *   keyframes with the same time), but further postprocessing and use
+        *   of the data structure is still safe. Warning details are written
+        *   to the log file, <tt>#AI_SCENE_FLAGS_VALIDATION_WARNING</tt> is set
+        *   in #aiScene::mFlags</li>
+        * </ul>
+        *
+        * This post-processing step is not time-consuming. Its use is not
+        * compulsory, but recommended. 
+       */
+       aiProcess_ValidateDataStructure = 0x400,
+
+       // -------------------------------------------------------------------------
+       /** <hr>Reorders triangles for better vertex cache locality.
+        *
+        * The step tries to improve the ACMR (average post-transform vertex cache
+        * miss ratio) for all meshes. The implementation runs in O(n) and is 
+        * roughly based on the 'tipsify' algorithm (see <a href="
+        * http://www.cs.princeton.edu/gfx/pubs/Sander_2007_%3ETR/tipsy.pdf">this
+        * paper</a>).
+        *
+        * If you intend to render huge models in hardware, this step might
+        * be of interest to you. The <tt>#AI_CONFIG_PP_ICL_PTCACHE_SIZE</tt>
+        * importer property can be used to fine-tune the cache optimization.
+        */
+       aiProcess_ImproveCacheLocality = 0x800,
+
+       // -------------------------------------------------------------------------
+       /** <hr>Searches for redundant/unreferenced materials and removes them.
+        *
+        * This is especially useful in combination with the 
+        * #aiProcess_PretransformVertices and #aiProcess_OptimizeMeshes flags. 
+        * Both join small meshes with equal characteristics, but they can't do 
+        * their work if two meshes have different materials. Because several
+        * material settings are lost during Assimp's import filters,
+        * (and because many exporters don't check for redundant materials), huge
+        * models often have materials which are are defined several times with
+        * exactly the same settings.
+        *
+        * Several material settings not contributing to the final appearance of
+        * a surface are ignored in all comparisons (e.g. the material name).
+        * So, if you're passing additional information through the
+        * content pipeline (probably using *magic* material names), don't 
+        * specify this flag. Alternatively take a look at the
+        * <tt>#AI_CONFIG_PP_RRM_EXCLUDE_LIST</tt> importer property.
+        */ 
+       aiProcess_RemoveRedundantMaterials = 0x1000,
+
+       // -------------------------------------------------------------------------
+       /** <hr>This step tries to determine which meshes have normal vectors 
+        * that are facing inwards and inverts them.
+        *
+        * The algorithm is simple but effective:
+        * the bounding box of all vertices + their normals is compared against
+        * the volume of the bounding box of all vertices without their normals.
+        * This works well for most objects, problems might occur with planar
+        * surfaces. However, the step tries to filter such cases.
+        * The step inverts all in-facing normals. Generally it is recommended
+        * to enable this step, although the result is not always correct.
+       */
+       aiProcess_FixInfacingNormals = 0x2000,
+
+       // -------------------------------------------------------------------------
+       /** <hr>This step splits meshes with more than one primitive type in 
+        *  homogeneous sub-meshes. 
+        *
+        *  The step is executed after the triangulation step. After the step
+        *  returns, just one bit is set in aiMesh::mPrimitiveTypes. This is 
+        *  especially useful for real-time rendering where point and line
+        *  primitives are often ignored or rendered separately.
+        *  You can use the <tt>#AI_CONFIG_PP_SBP_REMOVE</tt> importer property to
+        *  specify which primitive types you need. This can be used to easily
+        *  exclude lines and points, which are rarely used, from the import.
+       */
+       aiProcess_SortByPType = 0x8000,
+
+       // -------------------------------------------------------------------------
+       /** <hr>This step searches all meshes for degenerate primitives and
+        *  converts them to proper lines or points.
+        *
+        * A face is 'degenerate' if one or more of its points are identical.
+        * To have the degenerate stuff not only detected and collapsed but
+        * removed, try one of the following procedures:
+        * <br><b>1.</b> (if you support lines and points for rendering but don't
+        *    want the degenerates)</br>
+        * <ul>
+        *   <li>Specify the #aiProcess_FindDegenerates flag.
+        *   </li>
+        *   <li>Set the <tt>#AI_CONFIG_PP_FD_REMOVE</tt> importer property to
+        *       1. This will cause the step to remove degenerate triangles from the
+        *       import as soon as they're detected. They won't pass any further
+        *       pipeline steps.
+        *   </li>
+        * </ul>
+        * <br><b>2.</b>(if you don't support lines and points at all)</br>
+        * <ul>
+        *   <li>Specify the #aiProcess_FindDegenerates flag.
+        *   </li>
+        *   <li>Specify the #aiProcess_SortByPType flag. This moves line and
+        *     point primitives to separate meshes.
+        *   </li>
+        *   <li>Set the <tt>#AI_CONFIG_PP_SBP_REMOVE</tt> importer property to 
+        *       @code aiPrimitiveType_POINTS | aiPrimitiveType_LINES
+        *       @endcode to cause SortByPType to reject point
+        *       and line meshes from the scene.
+        *   </li>
+        * </ul>
+        * @note Degenerate polygons are not necessarily evil and that's why
+        * they're not removed by default. There are several file formats which 
+        * don't support lines or points, and some exporters bypass the
+        * format specification and write them as degenerate triangles instead.
+       */
+       aiProcess_FindDegenerates = 0x10000,
+
+       // -------------------------------------------------------------------------
+       /** <hr>This step searches all meshes for invalid data, such as zeroed
+        *  normal vectors or invalid UV coords and removes/fixes them. This is
+        *  intended to get rid of some common exporter errors.
+        *
+        * This is especially useful for normals. If they are invalid, and
+        * the step recognizes this, they will be removed and can later
+        * be recomputed, i.e. by the #aiProcess_GenSmoothNormals flag.<br>
+        * The step will also remove meshes that are infinitely small and reduce
+        * animation tracks consisting of hundreds if redundant keys to a single
+        * key. The <tt>AI_CONFIG_PP_FID_ANIM_ACCURACY</tt> config property decides
+        * the accuracy of the check for duplicate animation tracks.
+       */
+       aiProcess_FindInvalidData = 0x20000,
+
+       // -------------------------------------------------------------------------
+       /** <hr>This step converts non-UV mappings (such as spherical or
+        *  cylindrical mapping) to proper texture coordinate channels.
+        *
+        * Most applications will support UV mapping only, so you will
+        * probably want to specify this step in every case. Note that Assimp is not
+        * always able to match the original mapping implementation of the 
+        * 3D app which produced a model perfectly. It's always better to let the
+        * modelling app compute the UV channels - 3ds max, Maya, Blender, 
+        * LightWave, and Modo do this for example.
+        *
+        * @note If this step is not requested, you'll need to process the
+        * <tt>#AI_MATKEY_MAPPING</tt> material property in order to display all assets
+        * properly.
+        */
+       aiProcess_GenUVCoords = 0x40000,
+
+       // -------------------------------------------------------------------------
+       /** <hr>This step applies per-texture UV transformations and bakes
+        *  them into stand-alone vtexture coordinate channels.
+        *  
+        * UV transformations are specified per-texture - see the 
+        * <tt>#AI_MATKEY_UVTRANSFORM</tt> material key for more information. 
+        * This step processes all textures with 
+        * transformed input UV coordinates and generates a new (pre-transformed) UV channel 
+        * which replaces the old channel. Most applications won't support UV 
+        * transformations, so you will probably want to specify this step.
+     *
+        * @note UV transformations are usually implemented in real-time apps by 
+        * transforming texture coordinates at vertex shader stage with a 3x3
+        * (homogenous) transformation matrix.
+       */
+       aiProcess_TransformUVCoords = 0x80000,
+
+       // -------------------------------------------------------------------------
+       /** <hr>This step searches for duplicate meshes and replaces them
+        *  with references to the first mesh.
+        *
+        *  This step takes a while, so don't use it if speed is a concern.
+        *  Its main purpose is to workaround the fact that many export
+        *  file formats don't support instanced meshes, so exporters need to
+        *  duplicate meshes. This step removes the duplicates again. Please 
+        *  note that Assimp does not currently support per-node material
+        *  assignment to meshes, which means that identical meshes with
+        *  different materials are currently *not* joined, although this is 
+        *  planned for future versions.
+        */
+       aiProcess_FindInstances = 0x100000,
+
+       // -------------------------------------------------------------------------
+       /** <hr>A postprocessing step to reduce the number of meshes.
+        *
+        *  This will, in fact, reduce the number of draw calls.
+        *
+        *  This is a very effective optimization and is recommended to be used
+        *  together with #aiProcess_OptimizeGraph, if possible. The flag is fully
+        *  compatible with both #aiProcess_SplitLargeMeshes and #aiProcess_SortByPType.
+       */
+       aiProcess_OptimizeMeshes  = 0x200000, 
+
+
+       // -------------------------------------------------------------------------
+       /** <hr>A postprocessing step to optimize the scene hierarchy. 
+        *
+        *  Nodes without animations, bones, lights or cameras assigned are 
+        *  collapsed and joined.
+        *
+        *  Node names can be lost during this step. If you use special 'tag nodes'
+        *  to pass additional information through your content pipeline, use the
+        *  <tt>#AI_CONFIG_PP_OG_EXCLUDE_LIST</tt> importer property to specify a
+        *  list of node names you want to be kept. Nodes matching one of the names
+        *  in this list won't be touched or modified.
+        *
+        *  Use this flag with caution. Most simple files will be collapsed to a 
+        *  single node, so complex hierarchies are usually completely lost. This is not
+        *  useful for editor environments, but probably a very effective
+        *  optimization if you just want to get the model data, convert it to your
+        *  own format, and render it as fast as possible. 
+        *
+        *  This flag is designed to be used with #aiProcess_OptimizeMeshes for best
+        *  results.
+        *
+        *  @note 'Crappy' scenes with thousands of extremely small meshes packed
+        *  in deeply nested nodes exist for almost all file formats.
+        *  #aiProcess_OptimizeMeshes in combination with #aiProcess_OptimizeGraph 
+        *  usually fixes them all and makes them renderable. 
+       */
+       aiProcess_OptimizeGraph  = 0x400000, 
+
+       // -------------------------------------------------------------------------
+       /** <hr>This step flips all UV coordinates along the y-axis and adjusts
+        * material settings and bitangents accordingly.
+        *
+        * <b>Output UV coordinate system:</b>
+        * @code
+        * 0y|0y ---------- 1x|0y 
+     * |                 |
+     * |                 |
+     * |                 |
+     * 0x|1y ---------- 1x|1y
+        * @endcode
+        *
+        * You'll probably want to consider this flag if you use Direct3D for
+        * rendering. The #aiProcess_ConvertToLeftHanded flag supersedes this
+        * setting and bundles all conversions typically required for D3D-based
+        * applications.
+       */
+       aiProcess_FlipUVs = 0x800000, 
+
+       // -------------------------------------------------------------------------
+       /** <hr>This step adjusts the output face winding order to be CW.
+        *
+        * The default face winding order is counter clockwise (CCW).
+        *
+        * <b>Output face order:</b>
+        * @code
+        *       x2
+        *           
+        *                         x0
+        *  x1
+        * @endcode
+       */
+       aiProcess_FlipWindingOrder  = 0x1000000,
+
+       // -------------------------------------------------------------------------
+       /** <hr>This step splits meshes with many bones into sub-meshes so that each
+        * su-bmesh has fewer or as many bones as a given limit. 
+    */
+       aiProcess_SplitByBoneCount  = 0x2000000,
+
+       // -------------------------------------------------------------------------
+       /** <hr>This step removes bones losslessly or according to some threshold.
+        *
+        *  In some cases (i.e. formats that require it) exporters are forced to
+        *  assign dummy bone weights to otherwise static meshes assigned to
+        *  animated meshes. Full, weight-based skinning is expensive while
+        *  animating nodes is extremely cheap, so this step is offered to clean up
+        *  the data in that regard. 
+        *                                                                                                                              
+        *  Use <tt>#AI_CONFIG_PP_DB_THRESHOLD</tt> to control this. 
+        *  Use <tt>#AI_CONFIG_PP_DB_ALL_OR_NONE</tt> if you want bones removed if and 
+        *      only if all bones within the scene qualify for removal.
+    */
+       aiProcess_Debone  = 0x4000000
+
+       // aiProcess_GenEntityMeshes = 0x100000,
+       // aiProcess_OptimizeAnimations = 0x200000
+       // aiProcess_FixTexturePaths = 0x200000
+};
+
+
+// ---------------------------------------------------------------------------------------
+/** @def aiProcess_ConvertToLeftHanded
+ *  @brief Shortcut flag for Direct3D-based applications. 
+ *
+ *  Supersedes the #aiProcess_MakeLeftHanded and #aiProcess_FlipUVs and
+ *  #aiProcess_FlipWindingOrder flags.
+ *  The output data matches Direct3D's conventions: left-handed geometry, upper-left
+ *  origin for UV coordinates and finally clockwise face order, suitable for CCW culling.
+ *
+ *  @deprecated 
+ */
+#define aiProcess_ConvertToLeftHanded ( \
+       aiProcess_MakeLeftHanded     | \
+       aiProcess_FlipUVs            | \
+       aiProcess_FlipWindingOrder   | \
+       0 ) 
+
+
+// ---------------------------------------------------------------------------------------
+/** @def aiProcessPreset_TargetRealtimeUse_Fast
+ *  @brief Default postprocess configuration optimizing the data for real-time rendering.
+ *  
+ *  Applications would want to use this preset to load models on end-user PCs,
+ *  maybe for direct use in game.
+ *
+ * If you're using DirectX, don't forget to combine this value with
+ * the #aiProcess_ConvertToLeftHanded step. If you don't support UV transformations
+ * in your application apply the #aiProcess_TransformUVCoords step, too.
+ *  @note Please take the time to read the docs for the steps enabled by this preset. 
+ *  Some of them offer further configurable properties, while some of them might not be of
+ *  use for you so it might be better to not specify them.
+ */
+#define aiProcessPreset_TargetRealtime_Fast ( \
+       aiProcess_CalcTangentSpace              |  \
+       aiProcess_GenNormals                    |  \
+       aiProcess_JoinIdenticalVertices |  \
+       aiProcess_Triangulate                   |  \
+       aiProcess_GenUVCoords           |  \
+       aiProcess_SortByPType           |  \
+       0 )
+
+ // ---------------------------------------------------------------------------------------
+ /** @def aiProcessPreset_TargetRealtime_Quality
+  *  @brief Default postprocess configuration optimizing the data for real-time rendering.
+  *
+  *  Unlike #aiProcessPreset_TargetRealtime_Fast, this configuration
+  *  performs some extra optimizations to improve rendering speed and
+  *  to minimize memory usage. It could be a good choice for a level editor
+  *  environment where import speed is not so important.
+  *  
+  *  If you're using DirectX, don't forget to combine this value with
+  *  the #aiProcess_ConvertToLeftHanded step. If you don't support UV transformations
+  *  in your application apply the #aiProcess_TransformUVCoords step, too.
+  *  @note Please take the time to read the docs for the steps enabled by this preset. 
+  *  Some of them offer further configurable properties, while some of them might not be
+  *  of use for you so it might be better to not specify them.
+  */
+#define aiProcessPreset_TargetRealtime_Quality ( \
+       aiProcess_CalcTangentSpace                              |  \
+       aiProcess_GenSmoothNormals                              |  \
+       aiProcess_JoinIdenticalVertices                 |  \
+       aiProcess_ImproveCacheLocality                  |  \
+       aiProcess_LimitBoneWeights                              |  \
+       aiProcess_RemoveRedundantMaterials      |  \
+       aiProcess_SplitLargeMeshes                              |  \
+       aiProcess_Triangulate                                   |  \
+       aiProcess_GenUVCoords                   |  \
+       aiProcess_SortByPType                   |  \
+       aiProcess_FindDegenerates               |  \
+       aiProcess_FindInvalidData               |  \
+       0 )
+
+ // ---------------------------------------------------------------------------------------
+ /** @def aiProcessPreset_TargetRealtime_MaxQuality
+  *  @brief Default postprocess configuration optimizing the data for real-time rendering.
+  *
+  *  This preset enables almost every optimization step to achieve perfectly
+  *  optimized data. It's your choice for level editor environments where import speed 
+  *  is not important.
+  *  
+  *  If you're using DirectX, don't forget to combine this value with
+  *  the #aiProcess_ConvertToLeftHanded step. If you don't support UV transformations
+  *  in your application, apply the #aiProcess_TransformUVCoords step, too.
+  *  @note Please take the time to read the docs for the steps enabled by this preset. 
+  *  Some of them offer further configurable properties, while some of them might not be
+  *  of use for you so it might be better to not specify them.
+  */
+#define aiProcessPreset_TargetRealtime_MaxQuality ( \
+       aiProcessPreset_TargetRealtime_Quality   |  \
+       aiProcess_FindInstances                  |  \
+       aiProcess_ValidateDataStructure          |  \
+       aiProcess_OptimizeMeshes                 |  \
+       0 )
+
+
+#ifdef __cplusplus
+} // end of extern "C"
+#endif
+
+#endif // AI_POSTPROCESS_H_INC
diff --git a/include/assimp/quaternion.h b/include/assimp/quaternion.h
new file mode 100644 (file)
index 0000000..ad64dd9
--- /dev/null
@@ -0,0 +1,126 @@
+/*
+Open Asset Import Library (assimp)
+----------------------------------------------------------------------
+
+Copyright (c) 2006-2012, assimp team
+All rights reserved.
+
+Redistribution and use of this software 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.
+
+* Neither the name of the assimp team, nor the names of its
+  contributors may be used to endorse or promote products
+  derived from this software without specific prior
+  written permission of the assimp team.
+
+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.
+
+----------------------------------------------------------------------
+*/
+
+/** @file quaternion.h
+ *  @brief Quaternion structure, including operators when compiling in C++
+ */
+#ifndef AI_QUATERNION_H_INC
+#define AI_QUATERNION_H_INC
+
+#ifdef __cplusplus
+
+template <typename TReal> class aiVector3t;
+template <typename TReal> class aiMatrix3x3t;
+
+// ---------------------------------------------------------------------------
+/** Represents a quaternion in a 4D vector. */
+template <typename TReal>
+class aiQuaterniont
+{
+public:
+       aiQuaterniont() : w(1.0), x(), y(), z() {}
+       aiQuaterniont(TReal pw, TReal px, TReal py, TReal pz) 
+               : w(pw), x(px), y(py), z(pz) {}
+
+       /** Construct from rotation matrix. Result is undefined if the matrix is not orthonormal. */
+       aiQuaterniont( const aiMatrix3x3t<TReal>& pRotMatrix);
+
+       /** Construct from euler angles */
+       aiQuaterniont( TReal rotx, TReal roty, TReal rotz);
+
+       /** Construct from an axis-angle pair */
+       aiQuaterniont( aiVector3t<TReal> axis, TReal angle);
+
+       /** Construct from a normalized quaternion stored in a vec3 */
+       aiQuaterniont( aiVector3t<TReal> normalized);
+
+       /** Returns a matrix representation of the quaternion */
+       aiMatrix3x3t<TReal> GetMatrix() const;
+
+public:
+
+       bool operator== (const aiQuaterniont& o) const;
+       bool operator!= (const aiQuaterniont& o) const;
+
+       bool Equal(const aiQuaterniont& o, TReal epsilon = 1e-6) const;
+
+public:
+
+       /** Normalize the quaternion */
+       aiQuaterniont& Normalize();
+
+       /** Compute quaternion conjugate */
+       aiQuaterniont& Conjugate ();
+
+       /** Rotate a point by this quaternion */
+       aiVector3t<TReal> Rotate (const aiVector3t<TReal>& in);
+
+       /** Multiply two quaternions */
+       aiQuaterniont operator* (const aiQuaterniont& two) const;
+
+public:
+
+       /** Performs a spherical interpolation between two quaternions and writes the result into the third.
+        * @param pOut Target object to received the interpolated rotation.
+        * @param pStart Start rotation of the interpolation at factor == 0.
+        * @param pEnd End rotation, factor == 1.
+        * @param pFactor Interpolation factor between 0 and 1. Values outside of this range yield undefined results.
+        */
+       static void Interpolate( aiQuaterniont& pOut, const aiQuaterniont& pStart, 
+               const aiQuaterniont& pEnd, TReal pFactor);
+
+public:
+
+       //! w,x,y,z components of the quaternion
+       TReal w, x, y, z;       
+} ;
+
+typedef aiQuaterniont<float> aiQuaternion;
+
+#else
+
+struct aiQuaternion {
+       float w, x, y, z;       
+};
+
+#endif
+
+
+#endif // AI_QUATERNION_H_INC
diff --git a/include/assimp/quaternion.inl b/include/assimp/quaternion.inl
new file mode 100644 (file)
index 0000000..0230d21
--- /dev/null
@@ -0,0 +1,284 @@
+/*
+---------------------------------------------------------------------------
+Open Asset Import Library (assimp)
+---------------------------------------------------------------------------
+
+Copyright (c) 2006-2012, assimp team
+
+All rights reserved.
+
+Redistribution and use of this software 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.
+
+* Neither the name of the assimp team, nor the names of its
+  contributors may be used to endorse or promote products
+  derived from this software without specific prior
+  written permission of the assimp team.
+
+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.
+---------------------------------------------------------------------------
+*/
+
+/** @file  aiQuaterniont.inl
+ *  @brief Inline implementation of aiQuaterniont<TReal> operators
+ */
+#ifndef AI_QUATERNION_INL_INC
+#define AI_QUATERNION_INL_INC
+
+#ifdef __cplusplus
+#include "quaternion.h"
+
+#include <cmath>
+
+// ---------------------------------------------------------------------------
+template<typename TReal>
+bool aiQuaterniont<TReal>::operator== (const aiQuaterniont& o) const
+{
+       return x == o.x && y == o.y && z == o.z && w == o.w;
+}
+
+// ---------------------------------------------------------------------------
+template<typename TReal>
+bool aiQuaterniont<TReal>::operator!= (const aiQuaterniont& o) const
+{
+       return !(*this == o);
+}
+
+// ---------------------------------------------------------------------------
+template<typename TReal>
+inline bool aiQuaterniont<TReal>::Equal(const aiQuaterniont& o, TReal epsilon) const {
+       return
+               std::abs(x - o.x) <= epsilon &&
+               std::abs(y - o.y) <= epsilon &&
+               std::abs(z - o.z) <= epsilon &&
+               std::abs(w - o.w) <= epsilon;
+}
+
+// ---------------------------------------------------------------------------
+// Constructs a quaternion from a rotation matrix
+template<typename TReal>
+inline aiQuaterniont<TReal>::aiQuaterniont( const aiMatrix3x3t<TReal> &pRotMatrix)
+{
+       TReal t = pRotMatrix.a1 + pRotMatrix.b2 + pRotMatrix.c3;
+
+       // large enough
+       if( t > static_cast<TReal>(0))
+       {
+               TReal s = sqrt(1 + t) * static_cast<TReal>(2.0);
+               x = (pRotMatrix.c2 - pRotMatrix.b3) / s;
+               y = (pRotMatrix.a3 - pRotMatrix.c1) / s;
+               z = (pRotMatrix.b1 - pRotMatrix.a2) / s;
+               w = static_cast<TReal>(0.25) * s;
+       } // else we have to check several cases
+       else if( pRotMatrix.a1 > pRotMatrix.b2 && pRotMatrix.a1 > pRotMatrix.c3 )  
+       {       
+               // Column 0: 
+               TReal s = sqrt( static_cast<TReal>(1.0) + pRotMatrix.a1 - pRotMatrix.b2 - pRotMatrix.c3) * static_cast<TReal>(2.0);
+               x = static_cast<TReal>(0.25) * s;
+               y = (pRotMatrix.b1 + pRotMatrix.a2) / s;
+               z = (pRotMatrix.a3 + pRotMatrix.c1) / s;
+               w = (pRotMatrix.c2 - pRotMatrix.b3) / s;
+       } 
+       else if( pRotMatrix.b2 > pRotMatrix.c3) 
+       { 
+               // Column 1: 
+               TReal s = sqrt( static_cast<TReal>(1.0) + pRotMatrix.b2 - pRotMatrix.a1 - pRotMatrix.c3) * static_cast<TReal>(2.0);
+               x = (pRotMatrix.b1 + pRotMatrix.a2) / s;
+               y = static_cast<TReal>(0.25) * s;
+               z = (pRotMatrix.c2 + pRotMatrix.b3) / s;
+               w = (pRotMatrix.a3 - pRotMatrix.c1) / s;
+       } else 
+       { 
+               // Column 2:
+               TReal s = sqrt( static_cast<TReal>(1.0) + pRotMatrix.c3 - pRotMatrix.a1 - pRotMatrix.b2) * static_cast<TReal>(2.0);
+               x = (pRotMatrix.a3 + pRotMatrix.c1) / s;
+               y = (pRotMatrix.c2 + pRotMatrix.b3) / s;
+               z = static_cast<TReal>(0.25) * s;
+               w = (pRotMatrix.b1 - pRotMatrix.a2) / s;
+       }
+}
+
+// ---------------------------------------------------------------------------
+// Construction from euler angles
+template<typename TReal>
+inline aiQuaterniont<TReal>::aiQuaterniont( TReal fPitch, TReal fYaw, TReal fRoll )
+{
+       const TReal fSinPitch(sin(fPitch*static_cast<TReal>(0.5)));
+       const TReal fCosPitch(cos(fPitch*static_cast<TReal>(0.5)));
+       const TReal fSinYaw(sin(fYaw*static_cast<TReal>(0.5)));
+       const TReal fCosYaw(cos(fYaw*static_cast<TReal>(0.5)));
+       const TReal fSinRoll(sin(fRoll*static_cast<TReal>(0.5)));
+       const TReal fCosRoll(cos(fRoll*static_cast<TReal>(0.5)));
+       const TReal fCosPitchCosYaw(fCosPitch*fCosYaw);
+       const TReal fSinPitchSinYaw(fSinPitch*fSinYaw);
+       x = fSinRoll * fCosPitchCosYaw     - fCosRoll * fSinPitchSinYaw;
+       y = fCosRoll * fSinPitch * fCosYaw + fSinRoll * fCosPitch * fSinYaw;
+       z = fCosRoll * fCosPitch * fSinYaw - fSinRoll * fSinPitch * fCosYaw;
+       w = fCosRoll * fCosPitchCosYaw     + fSinRoll * fSinPitchSinYaw;
+}
+
+// ---------------------------------------------------------------------------
+// Returns a matrix representation of the quaternion
+template<typename TReal>
+inline aiMatrix3x3t<TReal> aiQuaterniont<TReal>::GetMatrix() const
+{
+       aiMatrix3x3t<TReal> resMatrix;
+       resMatrix.a1 = static_cast<TReal>(1.0) - static_cast<TReal>(2.0) * (y * y + z * z);
+       resMatrix.a2 = static_cast<TReal>(2.0) * (x * y - z * w);
+       resMatrix.a3 = static_cast<TReal>(2.0) * (x * z + y * w);
+       resMatrix.b1 = static_cast<TReal>(2.0) * (x * y + z * w);
+       resMatrix.b2 = static_cast<TReal>(1.0) - static_cast<TReal>(2.0) * (x * x + z * z);
+       resMatrix.b3 = static_cast<TReal>(2.0) * (y * z - x * w);
+       resMatrix.c1 = static_cast<TReal>(2.0) * (x * z - y * w);
+       resMatrix.c2 = static_cast<TReal>(2.0) * (y * z + x * w);
+       resMatrix.c3 = static_cast<TReal>(1.0) - static_cast<TReal>(2.0) * (x * x + y * y);
+
+       return resMatrix;
+}
+
+// ---------------------------------------------------------------------------
+// Construction from an axis-angle pair
+template<typename TReal>
+inline aiQuaterniont<TReal>::aiQuaterniont( aiVector3t<TReal> axis, TReal angle)
+{
+       axis.Normalize();
+
+       const TReal sin_a = sin( angle / 2 );
+       const TReal cos_a = cos( angle / 2 );
+       x    = axis.x * sin_a;
+       y    = axis.y * sin_a;
+       z    = axis.z * sin_a;
+       w    = cos_a;
+}
+// ---------------------------------------------------------------------------
+// Construction from am existing, normalized quaternion
+template<typename TReal>
+inline aiQuaterniont<TReal>::aiQuaterniont( aiVector3t<TReal> normalized)
+{
+       x = normalized.x;
+       y = normalized.y;
+       z = normalized.z;
+
+       const TReal t = static_cast<TReal>(1.0) - (x*x) - (y*y) - (z*z);
+
+       if (t < static_cast<TReal>(0.0)) {
+               w = static_cast<TReal>(0.0);
+       }
+       else w = sqrt (t);
+}
+
+// ---------------------------------------------------------------------------
+// Performs a spherical interpolation between two quaternions 
+// Implementation adopted from the gmtl project. All others I found on the net fail in some cases.
+// Congrats, gmtl!
+template<typename TReal>
+inline void aiQuaterniont<TReal>::Interpolate( aiQuaterniont& pOut, const aiQuaterniont& pStart, const aiQuaterniont& pEnd, TReal pFactor)
+{
+       // calc cosine theta
+       TReal cosom = pStart.x * pEnd.x + pStart.y * pEnd.y + pStart.z * pEnd.z + pStart.w * pEnd.w;
+
+       // adjust signs (if necessary)
+       aiQuaterniont end = pEnd;
+       if( cosom < static_cast<TReal>(0.0))
+       {
+               cosom = -cosom;
+               end.x = -end.x;   // Reverse all signs
+               end.y = -end.y;
+               end.z = -end.z;
+               end.w = -end.w;
+       } 
+
+       // Calculate coefficients
+       TReal sclp, sclq;
+       if( (static_cast<TReal>(1.0) - cosom) > static_cast<TReal>(0.0001)) // 0.0001 -> some epsillon
+       {
+               // Standard case (slerp)
+               TReal omega, sinom;
+               omega = acos( cosom); // extract theta from dot product's cos theta
+               sinom = sin( omega);
+               sclp  = sin( (static_cast<TReal>(1.0) - pFactor) * omega) / sinom;
+               sclq  = sin( pFactor * omega) / sinom;
+       } else
+       {
+               // Very close, do linear interp (because it's faster)
+               sclp = static_cast<TReal>(1.0) - pFactor;
+               sclq = pFactor;
+       }
+
+       pOut.x = sclp * pStart.x + sclq * end.x;
+       pOut.y = sclp * pStart.y + sclq * end.y;
+       pOut.z = sclp * pStart.z + sclq * end.z;
+       pOut.w = sclp * pStart.w + sclq * end.w;
+}
+
+// ---------------------------------------------------------------------------
+template<typename TReal>
+inline aiQuaterniont<TReal>& aiQuaterniont<TReal>::Normalize()
+{
+       // compute the magnitude and divide through it
+       const TReal mag = sqrt(x*x + y*y + z*z + w*w);
+       if (mag)
+       {
+               const TReal invMag = static_cast<TReal>(1.0)/mag;
+               x *= invMag;
+               y *= invMag;
+               z *= invMag;
+               w *= invMag;
+       }
+       return *this;
+}
+
+// ---------------------------------------------------------------------------
+template<typename TReal>
+inline aiQuaterniont<TReal> aiQuaterniont<TReal>::operator* (const aiQuaterniont& t) const
+{
+       return aiQuaterniont(w*t.w - x*t.x - y*t.y - z*t.z,
+               w*t.x + x*t.w + y*t.z - z*t.y,
+               w*t.y + y*t.w + z*t.x - x*t.z,
+               w*t.z + z*t.w + x*t.y - y*t.x);
+}
+
+// ---------------------------------------------------------------------------
+template<typename TReal>
+inline aiQuaterniont<TReal>& aiQuaterniont<TReal>::Conjugate ()
+{
+       x = -x;
+       y = -y;
+       z = -z;
+       return *this;
+}
+
+// ---------------------------------------------------------------------------
+template<typename TReal>
+inline aiVector3t<TReal> aiQuaterniont<TReal>::Rotate (const aiVector3t<TReal>& v)
+{
+       aiQuaterniont q2(0.f,v.x,v.y,v.z), q = *this, qinv = q;
+       q.Conjugate();
+
+       q = q*q2*qinv;
+       return aiVector3t<TReal>(q.x,q.y,q.z);
+
+}
+
+#endif
+#endif
diff --git a/include/assimp/scene.h b/include/assimp/scene.h
new file mode 100644 (file)
index 0000000..9196d18
--- /dev/null
@@ -0,0 +1,428 @@
+/*
+---------------------------------------------------------------------------
+Open Asset Import Library (assimp)
+---------------------------------------------------------------------------
+
+Copyright (c) 2006-2012, assimp team
+
+All rights reserved.
+
+Redistribution and use of this software 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.
+
+* Neither the name of the assimp team, nor the names of its
+  contributors may be used to endorse or promote products
+  derived from this software without specific prior
+  written permission of the assimp team.
+
+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.
+---------------------------------------------------------------------------
+*/
+
+/** @file aiScene.h
+ *  @brief Defines the data structures in which the imported scene is returned.
+ */
+#ifndef __AI_SCENE_H_INC__
+#define __AI_SCENE_H_INC__
+
+#include "types.h"
+#include "texture.h"
+#include "mesh.h"
+#include "light.h"
+#include "camera.h"
+#include "material.h"
+#include "anim.h"
+#include "metadata.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+// -------------------------------------------------------------------------------
+/** A node in the imported hierarchy. 
+ *
+ * Each node has name, a parent node (except for the root node), 
+ * a transformation relative to its parent and possibly several child nodes.
+ * Simple file formats don't support hierarchical structures - for these formats 
+ * the imported scene does consist of only a single root node without children.
+ */
+// -------------------------------------------------------------------------------
+struct aiNode
+{
+       /** The name of the node. 
+        *
+        * The name might be empty (length of zero) but all nodes which 
+        * need to be referenced by either bones or animations are named.
+        * Multiple nodes may have the same name, except for nodes which are referenced
+        * by bones (see #aiBone and #aiMesh::mBones). Their names *must* be unique.
+        * 
+        * Cameras and lights reference a specific node by name - if there
+        * are multiple nodes with this name, they are assigned to each of them.
+        * <br>
+        * There are no limitations with regard to the characters contained in
+        * the name string as it is usually taken directly from the source file. 
+        * 
+        * Implementations should be able to handle tokens such as whitespace, tabs,
+        * line feeds, quotation marks, ampersands etc.
+        *
+        * Sometimes assimp introduces new nodes not present in the source file
+        * into the hierarchy (usually out of necessity because sometimes the
+        * source hierarchy format is simply not compatible). Their names are
+        * surrounded by @verbatim <> @endverbatim e.g.
+        *  @verbatim<DummyRootNode> @endverbatim.
+        */
+       C_STRUCT aiString mName;
+
+       /** The transformation relative to the node's parent. */
+       C_STRUCT aiMatrix4x4 mTransformation;
+
+       /** Parent node. NULL if this node is the root node. */
+       C_STRUCT aiNode* mParent;
+
+       /** The number of child nodes of this node. */
+       unsigned int mNumChildren;
+
+       /** The child nodes of this node. NULL if mNumChildren is 0. */
+       C_STRUCT aiNode** mChildren;
+
+       /** The number of meshes of this node. */
+       unsigned int mNumMeshes;
+
+       /** The meshes of this node. Each entry is an index into the mesh */
+       unsigned int* mMeshes;
+
+       /** Metadata associated with this node or NULL if there is no metadata.
+         *  Whether any metadata is generated depends on the source file format. See the
+         * @link importer_notes @endlink page for more information on every source file
+         * format. Importers that don't document any metadata don't write any. 
+         */
+       C_STRUCT aiMetadata* mMetaData;
+
+#ifdef __cplusplus
+       /** Constructor */
+       aiNode() 
+               // set all members to zero by default
+               : mName("")
+               , mParent(NULL)
+               , mNumChildren(0)
+               , mChildren(NULL)
+               , mNumMeshes(0)
+               , mMeshes(NULL)
+               , mMetaData(NULL)
+       {
+       }
+       
+
+       /** Construction from a specific name */
+       aiNode(const std::string& name) 
+               // set all members to zero by default
+               : mName(name)
+               , mParent(NULL)
+               , mNumChildren(0)
+               , mChildren(NULL)
+               , mNumMeshes(0)
+               , mMeshes(NULL)
+               , mMetaData(NULL)
+       {
+       }
+
+       /** Destructor */
+       ~aiNode()
+       {
+               // delete all children recursively
+               // to make sure we won't crash if the data is invalid ...
+               if (mChildren && mNumChildren)  
+               {
+                       for( unsigned int a = 0; a < mNumChildren; a++)
+                               delete mChildren[a];
+               }
+               delete [] mChildren;
+               delete [] mMeshes;
+               delete mMetaData;
+       }
+
+
+       /** Searches for a node with a specific name, beginning at this
+        *  nodes. Normally you will call this method on the root node
+        *  of the scene.
+        * 
+        *  @param name Name to search for
+        *  @return NULL or a valid Node if the search was successful.
+        */
+       inline const aiNode* FindNode(const aiString& name) const
+       {
+               return FindNode(name.data);
+       }
+
+
+       inline aiNode* FindNode(const aiString& name)
+       {
+               return FindNode(name.data);
+       }
+
+
+       /** @override
+        */
+       inline const aiNode* FindNode(const char* name) const
+       {
+               if (!::strcmp( mName.data,name))return this;
+               for (unsigned int i = 0; i < mNumChildren;++i)
+               {
+                       const aiNode* const p = mChildren[i]->FindNode(name);
+                       if (p) {
+                               return p;
+                       }
+               }
+               // there is definitely no sub-node with this name
+               return NULL;
+       }
+
+       inline aiNode* FindNode(const char* name) 
+       {
+               if (!::strcmp( mName.data,name))return this;
+               for (unsigned int i = 0; i < mNumChildren;++i)
+               {
+                       aiNode* const p = mChildren[i]->FindNode(name);
+                       if (p) {
+                               return p;
+                       }
+               }
+               // there is definitely no sub-node with this name
+               return NULL;
+       }
+
+#endif // __cplusplus
+};
+
+
+// -------------------------------------------------------------------------------
+/** @def AI_SCENE_FLAGS_INCOMPLETE
+ * Specifies that the scene data structure that was imported is not complete.
+ * This flag bypasses some internal validations and allows the import 
+ * of animation skeletons, material libraries or camera animation paths 
+ * using Assimp. Most applications won't support such data. 
+ */
+#define AI_SCENE_FLAGS_INCOMPLETE      0x1
+
+/** @def AI_SCENE_FLAGS_VALIDATED
+ * This flag is set by the validation postprocess-step (aiPostProcess_ValidateDS)
+ * if the validation is successful. In a validated scene you can be sure that
+ * any cross references in the data structure (e.g. vertex indices) are valid.
+ */
+#define AI_SCENE_FLAGS_VALIDATED       0x2
+
+/** @def AI_SCENE_FLAGS_VALIDATION_WARNING
+ * This flag is set by the validation postprocess-step (aiPostProcess_ValidateDS)
+ * if the validation is successful but some issues have been found.
+ * This can for example mean that a texture that does not exist is referenced 
+ * by a material or that the bone weights for a vertex don't sum to 1.0 ... .
+ * In most cases you should still be able to use the import. This flag could
+ * be useful for applications which don't capture Assimp's log output.
+ */
+#define AI_SCENE_FLAGS_VALIDATION_WARNING      0x4
+
+/** @def AI_SCENE_FLAGS_NON_VERBOSE_FORMAT
+ * This flag is currently only set by the aiProcess_JoinIdenticalVertices step.
+ * It indicates that the vertices of the output meshes aren't in the internal
+ * verbose format anymore. In the verbose format all vertices are unique,
+ * no vertex is ever referenced by more than one face.
+ */
+#define AI_SCENE_FLAGS_NON_VERBOSE_FORMAT      0x8
+
+ /** @def AI_SCENE_FLAGS_TERRAIN
+ * Denotes pure height-map terrain data. Pure terrains usually consist of quads, 
+ * sometimes triangles, in a regular grid. The x,y coordinates of all vertex 
+ * positions refer to the x,y coordinates on the terrain height map, the z-axis
+ * stores the elevation at a specific point.
+ *
+ * TER (Terragen) and HMP (3D Game Studio) are height map formats.
+ * @note Assimp is probably not the best choice for loading *huge* terrains -
+ * fully triangulated data takes extremely much free store and should be avoided
+ * as long as possible (typically you'll do the triangulation when you actually
+ * need to render it).
+ */
+#define AI_SCENE_FLAGS_TERRAIN 0x10
+
+
+// -------------------------------------------------------------------------------
+/** The root structure of the imported data. 
+ * 
+ *  Everything that was imported from the given file can be accessed from here.
+ *  Objects of this class are generally maintained and owned by Assimp, not
+ *  by the caller. You shouldn't want to instance it, nor should you ever try to
+ *  delete a given scene on your own.
+ */
+// -------------------------------------------------------------------------------
+struct aiScene
+{
+
+       /** Any combination of the AI_SCENE_FLAGS_XXX flags. By default 
+       * this value is 0, no flags are set. Most applications will
+       * want to reject all scenes with the AI_SCENE_FLAGS_INCOMPLETE 
+       * bit set.
+       */
+       unsigned int mFlags;
+
+
+       /** The root node of the hierarchy. 
+       * 
+       * There will always be at least the root node if the import
+       * was successful (and no special flags have been set). 
+       * Presence of further nodes depends on the format and content 
+       * of the imported file.
+       */
+       C_STRUCT aiNode* mRootNode;
+
+
+
+       /** The number of meshes in the scene. */
+       unsigned int mNumMeshes;
+
+       /** The array of meshes. 
+       *
+       * Use the indices given in the aiNode structure to access 
+       * this array. The array is mNumMeshes in size. If the
+       * AI_SCENE_FLAGS_INCOMPLETE flag is not set there will always 
+       * be at least ONE material.
+       */
+       C_STRUCT aiMesh** mMeshes;
+
+
+
+       /** The number of materials in the scene. */
+       unsigned int mNumMaterials;
+
+       /** The array of materials. 
+       * 
+       * Use the index given in each aiMesh structure to access this
+       * array. The array is mNumMaterials in size. If the
+       * AI_SCENE_FLAGS_INCOMPLETE flag is not set there will always 
+       * be at least ONE material.
+       */
+       C_STRUCT aiMaterial** mMaterials;
+
+
+
+       /** The number of animations in the scene. */
+       unsigned int mNumAnimations; 
+
+       /** The array of animations. 
+       *
+       * All animations imported from the given file are listed here.
+       * The array is mNumAnimations in size.
+       */
+       C_STRUCT aiAnimation** mAnimations;
+
+
+
+       /** The number of textures embedded into the file */
+       unsigned int mNumTextures;
+
+       /** The array of embedded textures.
+       * 
+       * Not many file formats embed their textures into the file.
+       * An example is Quake's MDL format (which is also used by
+       * some GameStudio versions)
+       */
+       C_STRUCT aiTexture** mTextures;
+
+
+       /** The number of light sources in the scene. Light sources
+       * are fully optional, in most cases this attribute will be 0 
+        */
+       unsigned int mNumLights;
+
+       /** The array of light sources.
+       * 
+       * All light sources imported from the given file are
+       * listed here. The array is mNumLights in size.
+       */
+       C_STRUCT aiLight** mLights;
+
+
+       /** The number of cameras in the scene. Cameras
+       * are fully optional, in most cases this attribute will be 0 
+        */
+       unsigned int mNumCameras;
+
+       /** The array of cameras.
+       * 
+       * All cameras imported from the given file are listed here.
+       * The array is mNumCameras in size. The first camera in the
+       * array (if existing) is the default camera view into
+       * the scene.
+       */
+       C_STRUCT aiCamera** mCameras;
+
+#ifdef __cplusplus
+
+       //! Default constructor - set everything to 0/NULL
+       ASSIMP_API aiScene();
+
+       //! Destructor
+       ASSIMP_API ~aiScene();
+
+       //! Check whether the scene contains meshes
+       //! Unless no special scene flags are set this will always be true.
+       inline bool HasMeshes() const 
+               { return mMeshes != NULL && mNumMeshes > 0; }
+
+       //! Check whether the scene contains materials
+       //! Unless no special scene flags are set this will always be true.
+       inline bool HasMaterials() const 
+               { return mMaterials != NULL && mNumMaterials > 0; }
+
+       //! Check whether the scene contains lights
+       inline bool HasLights() const 
+               { return mLights != NULL && mNumLights > 0; }
+
+       //! Check whether the scene contains textures
+       inline bool HasTextures() const 
+               { return mTextures != NULL && mNumTextures > 0; }
+
+       //! Check whether the scene contains cameras
+       inline bool HasCameras() const 
+               { return mCameras != NULL && mNumCameras > 0; }
+
+       //! Check whether the scene contains animations
+       inline bool HasAnimations() const 
+               { return mAnimations != NULL && mNumAnimations > 0; }
+
+#endif // __cplusplus
+
+
+       /**  Internal data, do not touch */
+#ifdef __cplusplus
+       void* mPrivate;
+#else
+       char* mPrivate;
+#endif
+
+};
+
+#ifdef __cplusplus
+} //! namespace Assimp
+#endif
+
+#endif // __AI_SCENE_H_INC__
diff --git a/include/assimp/texture.h b/include/assimp/texture.h
new file mode 100644 (file)
index 0000000..27b9318
--- /dev/null
@@ -0,0 +1,197 @@
+/*
+---------------------------------------------------------------------------
+Open Asset Import Library (assimp)
+---------------------------------------------------------------------------
+
+Copyright (c) 2006-2012, assimp team
+
+All rights reserved.
+
+Redistribution and use of this software 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.
+
+* Neither the name of the assimp team, nor the names of its
+  contributors may be used to endorse or promote products
+  derived from this software without specific prior
+  written permission of the assimp team.
+
+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.
+---------------------------------------------------------------------------
+*/
+
+/** @file texture.h
+ *  @brief Defines texture helper structures for the library
+ *
+ * Used for file formats which embed their textures into the model file.
+ * Supported are both normal textures, which are stored as uncompressed
+ * pixels, and "compressed" textures, which are stored in a file format
+ * such as PNG or TGA.
+ */
+
+#ifndef AI_TEXTURE_H_INC
+#define AI_TEXTURE_H_INC
+
+#include "types.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+// --------------------------------------------------------------------------------
+/** @def AI_MAKE_EMBEDDED_TEXNAME
+ *  Used to build the reserved path name used by the material system to 
+ *  reference textures that are embedded into their corresponding
+ *  model files. The parameter specifies the index of the texture
+ *  (zero-based, in the aiScene::mTextures array)
+ */
+#if (!defined AI_MAKE_EMBEDDED_TEXNAME)
+#      define AI_MAKE_EMBEDDED_TEXNAME(_n_) "*" # _n_
+#endif
+
+
+#include "./Compiler/pushpack1.h"
+
+// --------------------------------------------------------------------------------
+/** @brief Helper structure to represent a texel in a ARGB8888 format
+* 
+*  Used by aiTexture.
+*/
+struct aiTexel
+{
+       unsigned char b,g,r,a;
+
+#ifdef __cplusplus
+       //! Comparison operator
+       bool operator== (const aiTexel& other) const
+       {
+               return b == other.b && r == other.r &&
+                          g == other.g && a == other.a;
+       }
+
+       //! Inverse comparison operator
+       bool operator!= (const aiTexel& other) const
+       {
+               return b != other.b || r != other.r ||
+                          g != other.g || a != other.a;
+       }
+
+       //! Conversion to a floating-point 4d color
+       operator aiColor4D() const
+       {
+               return aiColor4D(r/255.f,g/255.f,b/255.f,a/255.f);
+       }
+#endif // __cplusplus
+
+} PACK_STRUCT;
+
+#include "./Compiler/poppack1.h"
+
+// --------------------------------------------------------------------------------
+/** Helper structure to describe an embedded texture
+ * 
+ * Normally textures are contained in external files but some file formats embed
+ * them directly in the model file. There are two types of embedded textures: 
+ * 1. Uncompressed textures. The color data is given in an uncompressed format. 
+ * 2. Compressed textures stored in a file format like png or jpg. The raw file 
+ * bytes are given so the application must utilize an image decoder (e.g. DevIL) to
+ * get access to the actual color data.
+ */
+struct aiTexture
+{
+       /** Width of the texture, in pixels
+        *
+        * If mHeight is zero the texture is compressed in a format
+        * like JPEG. In this case mWidth specifies the size of the
+        * memory area pcData is pointing to, in bytes.
+        */
+       unsigned int mWidth;
+
+       /** Height of the texture, in pixels
+        *
+        * If this value is zero, pcData points to an compressed texture
+        * in any format (e.g. JPEG).
+        */
+       unsigned int mHeight;
+
+       /** A hint from the loader to make it easier for applications
+        *  to determine the type of embedded compressed textures.
+        *
+        * If mHeight != 0 this member is undefined. Otherwise it
+        * is set set to '\\0\\0\\0\\0' if the loader has no additional
+        * information about the texture file format used OR the
+        * file extension of the format without a trailing dot. If there 
+        * are multiple file extensions for a format, the shortest 
+        * extension is chosen (JPEG maps to 'jpg', not to 'jpeg').
+        * E.g. 'dds\\0', 'pcx\\0', 'jpg\\0'.  All characters are lower-case.
+        * The fourth character will always be '\\0'.
+        */
+       char achFormatHint[4];
+
+       /** Data of the texture.
+        *
+        * Points to an array of mWidth * mHeight aiTexel's.
+        * The format of the texture data is always ARGB8888 to
+        * make the implementation for user of the library as easy
+        * as possible. If mHeight = 0 this is a pointer to a memory
+        * buffer of size mWidth containing the compressed texture
+        * data. Good luck, have fun!
+        */
+       C_STRUCT aiTexel* pcData;
+
+#ifdef __cplusplus
+
+       //! For compressed textures (mHeight == 0): compare the
+       //! format hint against a given string.
+       //! @param s Input string. 3 characters are maximally processed.
+       //!        Example values: "jpg", "png"
+       //! @return true if the given string matches the format hint
+       bool CheckFormat(const char* s) const
+       {
+               return (0 == ::strncmp(achFormatHint,s,3));
+       }
+
+       // Construction
+       aiTexture ()
+               : mWidth  (0)
+               , mHeight (0)
+               , pcData  (NULL)
+       {
+               achFormatHint[0] = achFormatHint[1] = 0;
+               achFormatHint[2] = achFormatHint[3] = 0;
+       }
+
+       // Destruction
+       ~aiTexture ()
+       {
+               delete[] pcData;
+       }
+#endif
+};
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // AI_TEXTURE_H_INC
diff --git a/include/assimp/types.h b/include/assimp/types.h
new file mode 100644 (file)
index 0000000..8b35bd3
--- /dev/null
@@ -0,0 +1,512 @@
+/*
+---------------------------------------------------------------------------
+Open Asset Import Library (assimp)
+---------------------------------------------------------------------------
+
+Copyright (c) 2006-2012, assimp team
+
+All rights reserved.
+
+Redistribution and use of this software 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.
+
+* Neither the name of the assimp team, nor the names of its
+  contributors may be used to endorse or promote products
+  derived from this software without specific prior
+  written permission of the assimp team.
+
+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.
+---------------------------------------------------------------------------
+*/
+
+/** @file types.h
+ *  Basic data types and primitives, such as vectors or colors. 
+ */
+#ifndef AI_TYPES_H_INC
+#define AI_TYPES_H_INC
+
+// Some runtime headers
+#include <sys/types.h>
+#include <memory.h>
+#include <math.h>
+#include <stddef.h>
+#include <string.h>
+#include <limits.h>
+
+// Our compile configuration
+#include "defs.h"
+
+// Some types moved to separate header due to size of operators
+#include "vector3.h"
+#include "vector2.h"
+#include "color4.h"
+#include "matrix3x3.h"
+#include "matrix4x4.h"
+#include "quaternion.h"
+
+#ifdef __cplusplus
+#include <cstring>
+#include <new>         // for std::nothrow_t
+#include <string>      // for aiString::Set(const std::string&)
+
+namespace Assimp       {
+       //! @cond never
+namespace Intern               {
+       // --------------------------------------------------------------------
+       /** @brief Internal helper class to utilize our internal new/delete 
+        *    routines for allocating object of this and derived classes.
+        *
+        * By doing this you can safely share class objects between Assimp
+        * and the application - it works even over DLL boundaries. A good
+        * example is the #IOSystem where the application allocates its custom
+        * #IOSystem, then calls #Importer::SetIOSystem(). When the Importer
+        * destructs, Assimp calls operator delete on the stored #IOSystem.
+        * If it lies on a different heap than Assimp is working with,
+        * the application is determined to crash.
+        */
+       // --------------------------------------------------------------------
+#ifndef SWIG
+       struct ASSIMP_API AllocateFromAssimpHeap        {
+               // http://www.gotw.ca/publications/mill15.htm
+
+               // new/delete overload
+               void *operator new    ( size_t num_bytes) /* throw( std::bad_alloc ) */;
+               void *operator new    ( size_t num_bytes, const std::nothrow_t& ) throw();
+               void  operator delete ( void* data);
+
+               // array new/delete overload
+               void *operator new[]    ( size_t num_bytes) /* throw( std::bad_alloc ) */;
+               void *operator new[]    ( size_t num_bytes, const std::nothrow_t& )  throw();
+               void  operator delete[] ( void* data);
+
+       }; // struct AllocateFromAssimpHeap
+#endif
+} // namespace Intern
+       //! @endcond
+} // namespace Assimp
+
+extern "C" {
+#endif
+
+/** Maximum dimension for strings, ASSIMP strings are zero terminated. */
+#ifdef __cplusplus
+const size_t MAXLEN = 1024;
+#else
+#      define MAXLEN 1024
+#endif
+
+#include "./Compiler/pushpack1.h"
+
+// ----------------------------------------------------------------------------------
+/** Represents a plane in a three-dimensional, euclidean space
+*/
+struct aiPlane
+{
+#ifdef __cplusplus
+       aiPlane () : a(0.f), b(0.f), c(0.f), d(0.f) {}
+       aiPlane (float _a, float _b, float _c, float _d) 
+               : a(_a), b(_b), c(_c), d(_d) {}
+
+       aiPlane (const aiPlane& o) : a(o.a), b(o.b), c(o.c), d(o.d) {}
+
+#endif // !__cplusplus
+
+       //! Plane equation
+       float a,b,c,d;
+} PACK_STRUCT; // !struct aiPlane
+
+// ----------------------------------------------------------------------------------
+/** Represents a ray
+*/
+struct aiRay
+{
+#ifdef __cplusplus
+       aiRay () {}
+       aiRay (const aiVector3D& _pos, const aiVector3D& _dir)
+               : pos(_pos), dir(_dir) {}
+
+       aiRay (const aiRay& o) : pos (o.pos), dir (o.dir) {}
+
+#endif // !__cplusplus
+
+       //! Position and direction of the ray
+       C_STRUCT aiVector3D pos, dir;
+} PACK_STRUCT; // !struct aiRay
+
+// ----------------------------------------------------------------------------------
+/** Represents a color in Red-Green-Blue space. 
+*/
+struct aiColor3D
+{
+#ifdef __cplusplus
+       aiColor3D () : r(0.0f), g(0.0f), b(0.0f) {}
+       aiColor3D (float _r, float _g, float _b) : r(_r), g(_g), b(_b) {}
+       aiColor3D (float _r) : r(_r), g(_r), b(_r) {}
+       aiColor3D (const aiColor3D& o) : r(o.r), g(o.g), b(o.b) {}
+       
+       /** Component-wise comparison */
+       // TODO: add epsilon?
+       bool operator == (const aiColor3D& other) const
+               {return r == other.r && g == other.g && b == other.b;}
+
+       /** Component-wise inverse comparison */
+       // TODO: add epsilon?
+       bool operator != (const aiColor3D& other) const
+               {return r != other.r || g != other.g || b != other.b;}
+
+       /** Component-wise comparison */
+       // TODO: add epsilon?
+       bool operator < (const aiColor3D& other) const {
+               return r < other.r || (
+                       r == other.r && (g < other.g ||
+                               (g == other.g && b < other.b)
+                       )
+               );
+       }
+
+       /** Component-wise addition */
+       aiColor3D operator+(const aiColor3D& c) const {
+               return aiColor3D(r+c.r,g+c.g,b+c.b);
+       }
+
+       /** Component-wise subtraction */
+       aiColor3D operator-(const aiColor3D& c) const {
+               return aiColor3D(r-c.r,g-c.g,b-c.b);
+       }
+
+       /** Component-wise multiplication */
+       aiColor3D operator*(const aiColor3D& c) const {
+               return aiColor3D(r*c.r,g*c.g,b*c.b);
+       }
+       
+       /** Multiply with a scalar */
+       aiColor3D operator*(float f) const {
+               return aiColor3D(r*f,g*f,b*f);
+       }
+
+       /** Access a specific color component */
+       float operator[](unsigned int i) const {
+               return *(&r + i);
+       }
+
+       /** Access a specific color component */
+       float& operator[](unsigned int i) {
+               return *(&r + i);
+       }
+
+       /** Check whether a color is black */
+       bool IsBlack() const {
+               static const float epsilon = 10e-3f;
+               return fabs( r ) < epsilon && fabs( g ) < epsilon && fabs( b ) < epsilon;
+       }
+
+#endif // !__cplusplus
+
+       //! Red, green and blue color values
+       float r, g, b;
+} PACK_STRUCT;  // !struct aiColor3D
+#include "./Compiler/poppack1.h"
+
+// ----------------------------------------------------------------------------------
+/** Represents an UTF-8 string, zero byte terminated.
+ *
+ *  The character set of an aiString is explicitly defined to be UTF-8. This Unicode
+ *  transformation was chosen in the belief that most strings in 3d files are limited
+ *  to ASCII, thus the character set needed to be strictly ASCII compatible.
+ *  
+ *  Most text file loaders provide proper Unicode input file handling, special unicode
+ *  characters are correctly transcoded to UTF8 and are kept throughout the libraries'
+ *  import pipeline. 
+ *
+ *  For most applications, it will be absolutely sufficient to interpret the
+ *  aiString as ASCII data and work with it as one would work with a plain char*. 
+ *  Windows users in need of proper support for i.e asian characters can use the
+ *  #MultiByteToWideChar(), #WideCharToMultiByte() WinAPI functionality to convert the
+ *  UTF-8 strings to their working character set (i.e. MBCS, WideChar).
+ *
+ *  We use this representation instead of std::string to be C-compatible. The 
+ *  (binary) length of such a string is limited to MAXLEN characters (including the
+ *  the terminating zero).
+*/
+struct aiString
+{
+#ifdef __cplusplus
+       /** Default constructor, the string is set to have zero length */
+       aiString() :
+               length(0) 
+       {
+               data[0] = '\0';
+
+#ifdef ASSIMP_BUILD_DEBUG
+               // Debug build: overwrite the string on its full length with ESC (27)
+               memset(data+1,27,MAXLEN-1);
+#endif
+       }
+
+       /** Copy constructor */
+       aiString(const aiString& rOther) : 
+               length(rOther.length) 
+       {
+               // Crop the string to the maximum length
+               length = length>=MAXLEN?MAXLEN-1:length;
+               memcpy( data, rOther.data, length);
+               data[length] = '\0';
+       }
+
+       /** Constructor from std::string */
+       explicit aiString(const std::string& pString) : 
+               length(pString.length()) 
+       {
+               length = length>=MAXLEN?MAXLEN-1:length;
+               memcpy( data, pString.c_str(), length);
+               data[length] = '\0';
+       }
+
+       /** Copy a std::string to the aiString */
+       void Set( const std::string& pString) {
+               if( pString.length() > MAXLEN - 1) {
+                       return;
+               }
+               length = pString.length();
+               memcpy( data, pString.c_str(), length);
+               data[length] = 0;
+       }
+
+       /** Copy a const char* to the aiString */
+       void Set( const char* sz) {
+               const size_t len = ::strlen(sz);
+               if( len > MAXLEN - 1) {
+                       return;
+               }
+               length = len;
+               memcpy( data, sz, len);
+               data[len] = 0;
+       }
+
+       /** Assign a const char* to the string */
+       aiString& operator = (const char* sz) {
+               Set(sz);
+               return *this;
+       }
+
+       /** Assign a cstd::string to the string */
+       aiString& operator = ( const std::string& pString) {
+               Set(pString);
+               return *this;
+       }
+
+       /** Comparison operator */
+       bool operator==(const aiString& other) const {
+               return  (length == other.length && 0 == memcmp(data,other.data,length));
+       }
+
+       /** Inverse comparison operator */
+       bool operator!=(const aiString& other) const {
+               return  (length != other.length || 0 != memcmp(data,other.data,length));
+       }
+
+       /** Append a string to the string */
+       void Append (const char* app)   {
+               const size_t len = ::strlen(app);
+               if (!len) {
+                       return;
+               }
+               if (length + len >= MAXLEN) {
+                       return;
+               }
+
+               memcpy(&data[length],app,len+1);
+               length += len;
+       }
+
+       /** Clear the string - reset its length to zero */
+       void Clear ()   {
+               length  = 0;
+               data[0] = '\0';
+
+#ifdef ASSIMP_BUILD_DEBUG
+               // Debug build: overwrite the string on its full length with ESC (27)
+               memset(data+1,27,MAXLEN-1);
+#endif
+       }
+
+       /** Returns a pointer to the underlying zero-terminated array of characters */
+       const char* C_Str() const {
+               return data;
+       }
+
+#endif // !__cplusplus
+
+       /** Binary length of the string excluding the terminal 0. This is NOT the 
+        *  logical length of strings containing UTF-8 multibyte sequences! It's
+        *  the number of bytes from the beginning of the string to its end.*/
+       size_t length;
+
+       /** String buffer. Size limit is MAXLEN */
+       char data[MAXLEN];
+} ;  // !struct aiString
+
+
+// ----------------------------------------------------------------------------------
+/**    Standard return type for some library functions.
+ * Rarely used, and if, mostly in the C API.
+ */
+typedef enum aiReturn
+{
+       /** Indicates that a function was successful */
+       aiReturn_SUCCESS = 0x0,
+
+       /** Indicates that a function failed */
+       aiReturn_FAILURE = -0x1,
+
+       /** Indicates that not enough memory was available
+        * to perform the requested operation 
+        */
+       aiReturn_OUTOFMEMORY = -0x3,
+
+       /** @cond never 
+        *  Force 32-bit size enum
+        */
+       _AI_ENFORCE_ENUM_SIZE = 0x7fffffff 
+} aiReturn;  // !enum aiReturn
+
+// just for backwards compatibility, don't use these constants anymore
+#define AI_SUCCESS     aiReturn_SUCCESS
+#define AI_FAILURE     aiReturn_FAILURE
+#define AI_OUTOFMEMORY aiReturn_OUTOFMEMORY
+
+// ----------------------------------------------------------------------------------
+/** Seek origins (for the virtual file system API).
+ *  Much cooler than using SEEK_SET, SEEK_CUR or SEEK_END.
+ */
+enum aiOrigin
+{
+       /** Beginning of the file */
+       aiOrigin_SET = 0x0,     
+
+       /** Current position of the file pointer */
+       aiOrigin_CUR = 0x1,             
+
+       /** End of the file, offsets must be negative */
+       aiOrigin_END = 0x2,
+
+       /**  @cond never 
+        *   Force 32-bit size enum 
+        */
+       _AI_ORIGIN_ENFORCE_ENUM_SIZE = 0x7fffffff 
+}; // !enum aiOrigin
+
+// ----------------------------------------------------------------------------------
+/** @brief Enumerates predefined log streaming destinations. 
+ *  Logging to these streams can be enabled with a single call to 
+ *   #LogStream::createDefaultStream or #aiAttachPredefinedLogStream(),
+ *   respectively.
+ */
+enum aiDefaultLogStream        
+{
+       /** Stream the log to a file */
+       aiDefaultLogStream_FILE = 0x1,
+
+       /** Stream the log to std::cout */
+       aiDefaultLogStream_STDOUT = 0x2,
+
+       /** Stream the log to std::cerr */
+       aiDefaultLogStream_STDERR = 0x4,
+
+       /** MSVC only: Stream the log the the debugger
+        * (this relies on OutputDebugString from the Win32 SDK)
+        */
+       aiDefaultLogStream_DEBUGGER = 0x8,
+
+       /** @cond never 
+        *  Force 32-bit size enum 
+        */
+       _AI_DLS_ENFORCE_ENUM_SIZE = 0x7fffffff 
+}; // !enum aiDefaultLogStream
+
+// just for backwards compatibility, don't use these constants anymore
+#define DLS_FILE     aiDefaultLogStream_FILE
+#define DLS_STDOUT   aiDefaultLogStream_STDOUT
+#define DLS_STDERR   aiDefaultLogStream_STDERR
+#define DLS_DEBUGGER aiDefaultLogStream_DEBUGGER
+
+// ----------------------------------------------------------------------------------
+/** Stores the memory requirements for different components (e.g. meshes, materials,
+ *  animations) of an import. All sizes are in bytes.
+ *  @see Importer::GetMemoryRequirements()
+*/
+struct aiMemoryInfo
+{
+#ifdef __cplusplus
+
+       /** Default constructor */
+       aiMemoryInfo()
+               : textures   (0)
+               , materials  (0)
+               , meshes     (0)
+               , nodes      (0)
+               , animations (0)
+               , cameras        (0)
+               , lights         (0)
+               , total      (0)
+       {}
+
+#endif
+
+       /** Storage allocated for texture data */
+       unsigned int textures;
+
+       /** Storage allocated for material data  */
+       unsigned int materials;
+
+       /** Storage allocated for mesh data */
+       unsigned int meshes;
+
+       /** Storage allocated for node data */
+       unsigned int nodes;
+
+       /** Storage allocated for animation data */
+       unsigned int animations;
+
+       /** Storage allocated for camera data */
+       unsigned int cameras;
+
+       /** Storage allocated for light data */
+       unsigned int lights;
+
+       /** Total storage allocated for the full import. */
+       unsigned int total;
+}; // !struct aiMemoryInfo 
+
+#ifdef __cplusplus
+}
+#endif //!  __cplusplus
+
+// Include implementation files
+#include "vector2.inl"
+#include "vector3.inl"
+#include "color4.inl"
+#include "quaternion.inl"
+#include "matrix3x3.inl"
+#include "matrix4x4.inl"
+#endif 
diff --git a/include/assimp/vector2.h b/include/assimp/vector2.h
new file mode 100644 (file)
index 0000000..5ec98f4
--- /dev/null
@@ -0,0 +1,113 @@
+/*
+---------------------------------------------------------------------------
+Open Asset Import Library (assimp)
+---------------------------------------------------------------------------
+
+Copyright (c) 2006-2012, assimp team
+
+All rights reserved.
+
+Redistribution and use of this software 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.
+
+* Neither the name of the assimp team, nor the names of its
+  contributors may be used to endorse or promote products
+  derived from this software without specific prior
+  written permission of the assimp team.
+
+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.
+---------------------------------------------------------------------------
+*/
+/** @file aiVector2t.h
+ *  @brief 2D vector structure, including operators when compiling in C++
+ */
+#ifndef AI_VECTOR2D_H_INC
+#define AI_VECTOR2D_H_INC
+
+#ifdef __cplusplus
+#   include <cmath>
+#else
+#   include <math.h>
+#endif
+
+#include "./Compiler/pushpack1.h"
+
+// ----------------------------------------------------------------------------------
+/** Represents a two-dimensional vector. 
+ */
+
+#ifdef __cplusplus
+template <typename TReal>
+class aiVector2t
+{
+public:
+
+       aiVector2t () : x(), y() {}
+       aiVector2t (TReal _x, TReal _y) : x(_x), y(_y) {}
+       explicit aiVector2t (TReal _xyz) : x(_xyz), y(_xyz) {}
+       aiVector2t (const aiVector2t& o) : x(o.x), y(o.y) {}
+
+public:
+
+       void Set( TReal pX, TReal pY);
+       TReal SquareLength() const ;
+       TReal Length() const ;
+       aiVector2t& Normalize();
+
+public:
+
+       const aiVector2t& operator += (const aiVector2t& o);
+       const aiVector2t& operator -= (const aiVector2t& o);
+       const aiVector2t& operator *= (TReal f);
+       const aiVector2t& operator /= (TReal f);
+
+       TReal operator[](unsigned int i) const;
+       TReal& operator[](unsigned int i);
+
+       bool operator== (const aiVector2t& other) const;
+       bool operator!= (const aiVector2t& other) const;
+
+       bool Equal(const aiVector2t& other, TReal epsilon = 1e-6) const;
+
+       aiVector2t& operator= (TReal f);
+       const aiVector2t SymMul(const aiVector2t& o);
+
+       template <typename TOther>
+       operator aiVector2t<TOther> () const;
+
+       TReal x, y;     
+} PACK_STRUCT;
+
+typedef aiVector2t<float> aiVector2D;
+
+#else
+
+struct aiVector2D {
+       float x,y;
+};
+
+#endif // __cplusplus
+
+#include "./Compiler/poppack1.h"
+
+#endif // AI_VECTOR2D_H_INC
diff --git a/include/assimp/vector2.inl b/include/assimp/vector2.inl
new file mode 100644 (file)
index 0000000..eb1b986
--- /dev/null
@@ -0,0 +1,224 @@
+/*
+---------------------------------------------------------------------------
+Open Asset Import Library (assimp)
+---------------------------------------------------------------------------
+
+Copyright (c) 2006-2012, assimp team
+
+All rights reserved.
+
+Redistribution and use of this software 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.
+
+* Neither the name of the assimp team, nor the names of its
+  contributors may be used to endorse or promote products
+  derived from this software without specific prior
+  written permission of the assimp team.
+
+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.
+---------------------------------------------------------------------------
+*/
+
+/** @file  aiVector2D.inl
+ *  @brief Inline implementation of aiVector2t<TReal> operators
+ */
+#ifndef AI_VECTOR2D_INL_INC
+#define AI_VECTOR2D_INL_INC
+
+#ifdef __cplusplus
+#include "vector2.h"
+
+#include <cmath>
+
+// ------------------------------------------------------------------------------------------------
+template <typename TReal>
+template <typename TOther>
+aiVector2t<TReal>::operator aiVector2t<TOther> () const {
+       return aiVector2t<TOther>(static_cast<TOther>(x),static_cast<TOther>(y));
+}
+// ------------------------------------------------------------------------------------------------
+template <typename TReal>
+void aiVector2t<TReal>::Set( TReal pX, TReal pY) { 
+       x = pX; y = pY;
+}
+
+// ------------------------------------------------------------------------------------------------
+template <typename TReal>
+TReal aiVector2t<TReal>::SquareLength() const {
+       return x*x + y*y; 
+}
+
+// ------------------------------------------------------------------------------------------------
+template <typename TReal>
+TReal aiVector2t<TReal>::Length() const {
+       return ::sqrt( SquareLength());
+}
+
+// ------------------------------------------------------------------------------------------------
+template <typename TReal>
+aiVector2t<TReal>& aiVector2t<TReal>::Normalize() { 
+       *this /= Length(); 
+       return *this;
+}
+
+// ------------------------------------------------------------------------------------------------
+template <typename TReal>
+const aiVector2t<TReal>& aiVector2t<TReal>::operator += (const aiVector2t& o) {
+       x += o.x; y += o.y;  
+       return *this; 
+}
+
+// ------------------------------------------------------------------------------------------------
+template <typename TReal>
+const aiVector2t<TReal>& aiVector2t<TReal>::operator -= (const aiVector2t& o) {
+       x -= o.x; y -= o.y;  
+       return *this; 
+}
+
+// ------------------------------------------------------------------------------------------------
+template <typename TReal>
+const aiVector2t<TReal>& aiVector2t<TReal>::operator *= (TReal f) { 
+       x *= f; y *= f;  
+       return *this; 
+}
+
+// ------------------------------------------------------------------------------------------------
+template <typename TReal>
+const aiVector2t<TReal>& aiVector2t<TReal>::operator /= (TReal f) {
+       x /= f; y /= f;  
+       return *this; 
+}
+
+// ------------------------------------------------------------------------------------------------
+template <typename TReal>
+TReal aiVector2t<TReal>::operator[](unsigned int i) const {
+       return *(&x + i);
+}
+
+// ------------------------------------------------------------------------------------------------
+template <typename TReal>
+TReal& aiVector2t<TReal>::operator[](unsigned int i) {
+       return *(&x + i);
+}
+
+// ------------------------------------------------------------------------------------------------
+template <typename TReal>
+bool aiVector2t<TReal>::operator== (const aiVector2t& other) const {
+       return x == other.x && y == other.y;
+}
+
+// ------------------------------------------------------------------------------------------------
+template <typename TReal>
+bool aiVector2t<TReal>::operator!= (const aiVector2t& other) const {
+       return x != other.x || y != other.y;
+}
+
+// ---------------------------------------------------------------------------
+template<typename TReal>
+bool aiVector2t<TReal>::Equal(const aiVector2t& other, TReal epsilon) const {
+       return
+               std::abs(x - other.x) <= epsilon &&
+               std::abs(y - other.y) <= epsilon;
+}
+
+// ------------------------------------------------------------------------------------------------
+template <typename TReal>
+aiVector2t<TReal>& aiVector2t<TReal>::operator= (TReal f)      {
+       x = y = f;
+       return *this;
+}
+
+// ------------------------------------------------------------------------------------------------
+template <typename TReal>
+const aiVector2t<TReal> aiVector2t<TReal>::SymMul(const aiVector2t& o) {
+       return aiVector2t(x*o.x,y*o.y);
+}
+
+
+// ------------------------------------------------------------------------------------------------
+// symmetric addition
+template <typename TReal>
+inline aiVector2t<TReal> operator + (const aiVector2t<TReal>& v1, const aiVector2t<TReal>& v2)
+{
+       return aiVector2t<TReal>( v1.x + v2.x, v1.y + v2.y);
+}
+
+// ------------------------------------------------------------------------------------------------
+// symmetric subtraction
+template <typename TReal>
+inline aiVector2t<TReal> operator - (const aiVector2t<TReal>& v1, const aiVector2t<TReal>& v2)
+{
+       return aiVector2t<TReal>( v1.x - v2.x, v1.y - v2.y);
+}
+
+// ------------------------------------------------------------------------------------------------
+// scalar product
+template <typename TReal>
+inline TReal operator * (const aiVector2t<TReal>& v1, const aiVector2t<TReal>& v2)
+{
+       return v1.x*v2.x + v1.y*v2.y;
+}
+
+// ------------------------------------------------------------------------------------------------
+// scalar multiplication
+template <typename TReal>
+inline aiVector2t<TReal> operator * ( TReal f, const aiVector2t<TReal>& v)
+{
+       return aiVector2t<TReal>( f*v.x, f*v.y);
+}
+
+// ------------------------------------------------------------------------------------------------
+// and the other way around
+template <typename TReal>
+inline aiVector2t<TReal> operator * ( const aiVector2t<TReal>& v, TReal f)
+{
+       return aiVector2t<TReal>( f*v.x, f*v.y);
+}
+
+// ------------------------------------------------------------------------------------------------
+// scalar division
+template <typename TReal>
+inline aiVector2t<TReal> operator / ( const aiVector2t<TReal>& v, TReal f)
+{
+
+       return v * (1/f);
+}
+
+// ------------------------------------------------------------------------------------------------
+// vector division
+template <typename TReal>
+inline aiVector2t<TReal> operator / ( const aiVector2t<TReal>& v, const aiVector2t<TReal>& v2)
+{
+       return aiVector2t<TReal>(v.x / v2.x,v.y / v2.y);
+}
+
+// ------------------------------------------------------------------------------------------------
+// vector negation
+template <typename TReal>
+inline aiVector2t<TReal> operator - ( const aiVector2t<TReal>& v)
+{
+       return aiVector2t<TReal>( -v.x, -v.y);
+}
+
+#endif 
+#endif
diff --git a/include/assimp/vector3.h b/include/assimp/vector3.h
new file mode 100644 (file)
index 0000000..8176f98
--- /dev/null
@@ -0,0 +1,149 @@
+/*
+---------------------------------------------------------------------------
+Open Asset Import Library (assimp)
+---------------------------------------------------------------------------
+
+Copyright (c) 2006-2012, assimp team
+
+All rights reserved.
+
+Redistribution and use of this software 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.
+
+* Neither the name of the assimp team, nor the names of its
+  contributors may be used to endorse or promote products
+  derived from this software without specific prior
+  written permission of the assimp team.
+
+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.
+---------------------------------------------------------------------------
+*/
+/** @file aiVector3D.h
+ *  @brief 3D vector structure, including operators when compiling in C++
+ */
+#ifndef AI_VECTOR3D_H_INC
+#define AI_VECTOR3D_H_INC
+
+#ifdef __cplusplus
+#   include <cmath>
+#else
+#   include <math.h>
+#endif
+
+#include "./Compiler/pushpack1.h"
+
+#ifdef __cplusplus
+
+template<typename TReal> class aiMatrix3x3t;
+template<typename TReal> class aiMatrix4x4t;
+
+// ---------------------------------------------------------------------------
+/** Represents a three-dimensional vector. */
+template <typename TReal>
+class aiVector3t 
+{
+public:
+
+       aiVector3t () : x(), y(), z() {}
+       aiVector3t (TReal _x, TReal _y, TReal _z) : x(_x), y(_y), z(_z) {}
+       explicit aiVector3t (TReal _xyz) : x(_xyz), y(_xyz), z(_xyz) {}
+       aiVector3t (const aiVector3t& o) : x(o.x), y(o.y), z(o.z) {}
+
+public:
+
+       // combined operators
+       const aiVector3t& operator += (const aiVector3t& o);
+       const aiVector3t& operator -= (const aiVector3t& o);
+       const aiVector3t& operator *= (TReal f);
+       const aiVector3t& operator /= (TReal f);
+
+       // transform vector by matrix
+       aiVector3t& operator *= (const aiMatrix3x3t<TReal>& mat);
+       aiVector3t& operator *= (const aiMatrix4x4t<TReal>& mat);
+
+       // access a single element
+       TReal operator[](unsigned int i) const;
+       TReal& operator[](unsigned int i);
+
+       // comparison
+       bool operator== (const aiVector3t& other) const;
+       bool operator!= (const aiVector3t& other) const;
+       bool operator < (const aiVector3t& other) const;
+
+       bool Equal(const aiVector3t& other, TReal epsilon = 1e-6) const;
+
+       template <typename TOther>
+       operator aiVector3t<TOther> () const;
+
+public:
+
+       /** @brief Set the components of a vector
+        *  @param pX X component
+        *  @param pY Y component
+        *  @param pZ Z component  */
+       void Set( TReal pX, TReal pY, TReal pZ);
+
+       /** @brief Get the squared length of the vector
+        *  @return Square length */
+       TReal SquareLength() const;
+
+
+       /** @brief Get the length of the vector
+        *  @return length */
+       TReal Length() const;
+
+
+       /** @brief Normalize the vector */
+       aiVector3t& Normalize();
+
+       
+       /** @brief Componentwise multiplication of two vectors
+        *  
+        *  Note that vec*vec yields the dot product.
+        *  @param o Second factor */
+       const aiVector3t SymMul(const aiVector3t& o);
+
+       TReal x, y, z;  
+} PACK_STRUCT;
+
+
+typedef aiVector3t<float> aiVector3D;
+
+#else
+
+struct aiVector3D {
+
+       float x,y,z;
+} PACK_STRUCT;
+
+#endif // __cplusplus
+
+#include "./Compiler/poppack1.h"
+
+#ifdef __cplusplus
+
+
+
+#endif // __cplusplus
+
+#endif // AI_VECTOR3D_H_INC
diff --git a/include/assimp/vector3.inl b/include/assimp/vector3.inl
new file mode 100644 (file)
index 0000000..01e0b6f
--- /dev/null
@@ -0,0 +1,228 @@
+/*
+---------------------------------------------------------------------------
+Open Asset Import Library (assimp)
+---------------------------------------------------------------------------
+
+Copyright (c) 2006-2012, assimp team
+
+All rights reserved.
+
+Redistribution and use of this software 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.
+
+* Neither the name of the assimp team, nor the names of its
+  contributors may be used to endorse or promote products
+  derived from this software without specific prior
+  written permission of the assimp team.
+
+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.
+---------------------------------------------------------------------------
+*/
+
+/** @file  aiVector3D.inl
+ *  @brief Inline implementation of aiVector3t<TReal> operators
+ */
+#ifndef AI_VECTOR3D_INL_INC
+#define AI_VECTOR3D_INL_INC
+
+#ifdef __cplusplus
+#include "vector3.h"
+
+#include <cmath>
+
+// ------------------------------------------------------------------------------------------------
+/** Transformation of a vector by a 3x3 matrix */
+template <typename TReal>
+inline aiVector3t<TReal> operator * (const aiMatrix3x3t<TReal>& pMatrix, const aiVector3t<TReal>& pVector)
+{
+       aiVector3t<TReal> res;
+       res.x = pMatrix.a1 * pVector.x + pMatrix.a2 * pVector.y + pMatrix.a3 * pVector.z;
+       res.y = pMatrix.b1 * pVector.x + pMatrix.b2 * pVector.y + pMatrix.b3 * pVector.z;
+       res.z = pMatrix.c1 * pVector.x + pMatrix.c2 * pVector.y + pMatrix.c3 * pVector.z;
+       return res;
+}
+
+// ------------------------------------------------------------------------------------------------
+/** Transformation of a vector by a 4x4 matrix */
+template <typename TReal>
+inline aiVector3t<TReal> operator * (const aiMatrix4x4t<TReal>& pMatrix, const aiVector3t<TReal>& pVector)
+{
+       aiVector3t<TReal> res;
+       res.x = pMatrix.a1 * pVector.x + pMatrix.a2 * pVector.y + pMatrix.a3 * pVector.z + pMatrix.a4;
+       res.y = pMatrix.b1 * pVector.x + pMatrix.b2 * pVector.y + pMatrix.b3 * pVector.z + pMatrix.b4;
+       res.z = pMatrix.c1 * pVector.x + pMatrix.c2 * pVector.y + pMatrix.c3 * pVector.z + pMatrix.c4;
+       return res;
+}
+// ------------------------------------------------------------------------------------------------
+template <typename TReal>
+template <typename TOther>
+aiVector3t<TReal>::operator aiVector3t<TOther> () const {
+       return aiVector3t<TOther>(static_cast<TOther>(x),static_cast<TOther>(y),static_cast<TOther>(z));
+}
+// ------------------------------------------------------------------------------------------------
+template <typename TReal>
+AI_FORCE_INLINE void aiVector3t<TReal>::Set( TReal pX, TReal pY, TReal pZ) { 
+       x = pX; y = pY; z = pZ; 
+}
+// ------------------------------------------------------------------------------------------------
+template <typename TReal>
+AI_FORCE_INLINE TReal aiVector3t<TReal>::SquareLength() const {
+       return x*x + y*y + z*z; 
+}
+// ------------------------------------------------------------------------------------------------
+template <typename TReal>
+AI_FORCE_INLINE TReal aiVector3t<TReal>::Length() const {
+       return ::sqrt( SquareLength()); 
+}
+// ------------------------------------------------------------------------------------------------
+template <typename TReal>
+AI_FORCE_INLINE aiVector3t<TReal>& aiVector3t<TReal>::Normalize() { 
+       *this /= Length(); return *this;
+}
+// ------------------------------------------------------------------------------------------------
+template <typename TReal>
+AI_FORCE_INLINE const aiVector3t<TReal>& aiVector3t<TReal>::operator += (const aiVector3t<TReal>& o) {
+       x += o.x; y += o.y; z += o.z; return *this; 
+}
+// ------------------------------------------------------------------------------------------------
+template <typename TReal>
+AI_FORCE_INLINE const aiVector3t<TReal>& aiVector3t<TReal>::operator -= (const aiVector3t<TReal>& o) {
+       x -= o.x; y -= o.y; z -= o.z; return *this;
+}
+// ------------------------------------------------------------------------------------------------
+template <typename TReal>
+AI_FORCE_INLINE const aiVector3t<TReal>& aiVector3t<TReal>::operator *= (TReal f) {
+       x *= f; y *= f; z *= f; return *this; 
+}
+// ------------------------------------------------------------------------------------------------
+template <typename TReal>
+AI_FORCE_INLINE const aiVector3t<TReal>& aiVector3t<TReal>::operator /= (TReal f) {
+       x /= f; y /= f; z /= f; return *this; 
+}
+// ------------------------------------------------------------------------------------------------
+template <typename TReal>
+AI_FORCE_INLINE aiVector3t<TReal>& aiVector3t<TReal>::operator *= (const aiMatrix3x3t<TReal>& mat){
+       return(*this =  mat * (*this));
+}
+// ------------------------------------------------------------------------------------------------
+template <typename TReal>
+AI_FORCE_INLINE aiVector3t<TReal>& aiVector3t<TReal>::operator *= (const aiMatrix4x4t<TReal>& mat){
+       return(*this = mat * (*this));
+}
+// ------------------------------------------------------------------------------------------------
+template <typename TReal>
+AI_FORCE_INLINE TReal aiVector3t<TReal>::operator[](unsigned int i) const {
+       return *(&x + i);
+}
+// ------------------------------------------------------------------------------------------------
+template <typename TReal>
+AI_FORCE_INLINE TReal& aiVector3t<TReal>::operator[](unsigned int i) {
+       return *(&x + i);
+}
+// ------------------------------------------------------------------------------------------------
+template <typename TReal>
+AI_FORCE_INLINE bool aiVector3t<TReal>::operator== (const aiVector3t<TReal>& other) const {
+       return x == other.x && y == other.y && z == other.z;
+}
+// ------------------------------------------------------------------------------------------------
+template <typename TReal>
+AI_FORCE_INLINE bool aiVector3t<TReal>::operator!= (const aiVector3t<TReal>& other) const {
+       return x != other.x || y != other.y || z != other.z;
+}
+// ---------------------------------------------------------------------------
+template<typename TReal>
+AI_FORCE_INLINE bool aiVector3t<TReal>::Equal(const aiVector3t<TReal>& other, TReal epsilon) const {
+       return
+               std::abs(x - other.x) <= epsilon &&
+               std::abs(y - other.y) <= epsilon &&
+               std::abs(z - other.z) <= epsilon;
+}
+// ------------------------------------------------------------------------------------------------
+template <typename TReal>
+AI_FORCE_INLINE bool aiVector3t<TReal>::operator < (const aiVector3t<TReal>& other) const {
+       return x != other.x ? x < other.x : y != other.y ? y < other.y : z < other.z;
+}
+// ------------------------------------------------------------------------------------------------
+template <typename TReal>
+AI_FORCE_INLINE const aiVector3t<TReal> aiVector3t<TReal>::SymMul(const aiVector3t<TReal>& o) {
+       return aiVector3t<TReal>(x*o.x,y*o.y,z*o.z);
+}
+// ------------------------------------------------------------------------------------------------
+// symmetric addition
+template <typename TReal>
+AI_FORCE_INLINE aiVector3t<TReal> operator + (const aiVector3t<TReal>& v1, const aiVector3t<TReal>& v2)        {
+       return aiVector3t<TReal>( v1.x + v2.x, v1.y + v2.y, v1.z + v2.z);
+}
+// ------------------------------------------------------------------------------------------------
+// symmetric subtraction
+template <typename TReal>
+AI_FORCE_INLINE aiVector3t<TReal> operator - (const aiVector3t<TReal>& v1, const aiVector3t<TReal>& v2)        {
+       return aiVector3t<TReal>( v1.x - v2.x, v1.y - v2.y, v1.z - v2.z);
+}
+// ------------------------------------------------------------------------------------------------
+// scalar product
+template <typename TReal>
+AI_FORCE_INLINE TReal operator * (const aiVector3t<TReal>& v1, const aiVector3t<TReal>& v2)    {
+       return v1.x*v2.x + v1.y*v2.y + v1.z*v2.z;
+}
+// ------------------------------------------------------------------------------------------------
+// scalar multiplication
+template <typename TReal>
+AI_FORCE_INLINE aiVector3t<TReal> operator * ( TReal f, const aiVector3t<TReal>& v)    {
+       return aiVector3t<TReal>( f*v.x, f*v.y, f*v.z);
+}
+// ------------------------------------------------------------------------------------------------
+// and the other way around
+template <typename TReal>
+AI_FORCE_INLINE  aiVector3t<TReal> operator * ( const aiVector3t<TReal>& v, TReal f)   {
+       return aiVector3t<TReal>( f*v.x, f*v.y, f*v.z);
+}
+// ------------------------------------------------------------------------------------------------
+// scalar division
+template <typename TReal>
+AI_FORCE_INLINE  aiVector3t<TReal> operator / ( const aiVector3t<TReal>& v, TReal f)   {
+       return v * (1/f);
+}
+// ------------------------------------------------------------------------------------------------
+// vector division
+template <typename TReal>
+AI_FORCE_INLINE  aiVector3t<TReal> operator / ( const aiVector3t<TReal>& v, const aiVector3t<TReal>& v2)       {
+       return aiVector3t<TReal>(v.x / v2.x,v.y / v2.y,v.z / v2.z);
+}
+// ------------------------------------------------------------------------------------------------
+// cross product
+template <typename TReal>
+AI_FORCE_INLINE  aiVector3t<TReal> operator ^ ( const aiVector3t<TReal>& v1, const aiVector3t<TReal>& v2)      {
+       return aiVector3t<TReal>( v1.y*v2.z - v1.z*v2.y, v1.z*v2.x - v1.x*v2.z, v1.x*v2.y - v1.y*v2.x);
+}
+// ------------------------------------------------------------------------------------------------
+// vector negation
+template <typename TReal>
+AI_FORCE_INLINE  aiVector3t<TReal> operator - ( const aiVector3t<TReal>& v)    {
+       return aiVector3t<TReal>( -v.x, -v.y, -v.z);
+}
+
+// ------------------------------------------------------------------------------------------------
+
+#endif // __cplusplus
+#endif // AI_VECTOR3D_INL_INC
diff --git a/include/assimp/version.h b/include/assimp/version.h
new file mode 100644 (file)
index 0000000..db914eb
--- /dev/null
@@ -0,0 +1,103 @@
+/*
+---------------------------------------------------------------------------
+Open Asset Import Library (assimp)
+---------------------------------------------------------------------------
+
+Copyright (c) 2006-2012, assimp team
+
+All rights reserved.
+
+Redistribution and use of this software 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.
+
+* Neither the name of the assimp team, nor the names of its
+  contributors may be used to endorse or promote products
+  derived from this software without specific prior
+  written permission of the assimp team.
+
+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.
+---------------------------------------------------------------------------
+*/
+
+/** @file  aiVersion.h
+ *  @brief Functions to query the version of the Assimp runtime, check
+ *    compile flags, ...
+ */
+#ifndef INCLUDED_AI_VERSION_H
+#define INCLUDED_AI_VERSION_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+// ---------------------------------------------------------------------------
+/** @brief Returns a string with legal copyright and licensing information 
+ *  about Assimp. The string may include multiple lines.
+ *  @return Pointer to static string.
+ */
+ASSIMP_API const char*  aiGetLegalString  (void);
+
+// ---------------------------------------------------------------------------
+/** @brief Returns the current minor version number of Assimp.
+ *  @return Minor version of the Assimp runtime the application was
+ *    linked/built against
+ */
+ASSIMP_API unsigned int aiGetVersionMinor (void);
+
+// ---------------------------------------------------------------------------
+/** @brief Returns the current major version number of Assimp.
+ *  @return Major version of the Assimp runtime the application was
+ *    linked/built against
+ */
+ASSIMP_API unsigned int aiGetVersionMajor (void);
+
+// ---------------------------------------------------------------------------
+/** @brief Returns the repository revision of the Assimp runtime.
+ *  @return SVN Repository revision number of the Assimp runtime the 
+ *          application was linked/built against.
+ */
+ASSIMP_API unsigned int aiGetVersionRevision (void);
+
+//! Assimp was compiled as a shared object (Windows: DLL)
+#define ASSIMP_CFLAGS_SHARED  0x1 
+//! Assimp was compiled against STLport
+#define ASSIMP_CFLAGS_STLPORT 0x2
+//! Assimp was compiled as a debug build
+#define ASSIMP_CFLAGS_DEBUG   0x4
+
+//! Assimp was compiled with ASSIMP_BUILD_BOOST_WORKAROUND defined
+#define ASSIMP_CFLAGS_NOBOOST           0x8
+//! Assimp was compiled with ASSIMP_BUILD_SINGLETHREADED defined
+#define ASSIMP_CFLAGS_SINGLETHREADED    0x10
+
+// ---------------------------------------------------------------------------
+/** @brief Returns assimp's compile flags
+ *  @return Any bitwise combination of the ASSIMP_CFLAGS_xxx constants.
+ */
+ASSIMP_API unsigned int aiGetCompileFlags (void);
+
+#ifdef __cplusplus
+} // end extern "C"
+#endif
+
+#endif // !! #ifndef INCLUDED_AI_VERSION_H
diff --git a/include/freetype2/freetype/config/ftconfig.h b/include/freetype2/freetype/config/ftconfig.h
new file mode 100644 (file)
index 0000000..3b44750
--- /dev/null
@@ -0,0 +1,350 @@
+/* ftconfig.h.  Generated from ftconfig.in by configure.  */
+/***************************************************************************/
+/*                                                                         */
+/*  ftconfig.in                                                            */
+/*                                                                         */
+/*    UNIX-specific configuration file (specification only).               */
+/*                                                                         */
+/*  Copyright 1996-2001, 2002, 2003, 2004, 2006, 2007 by                   */
+/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
+/*                                                                         */
+/*  This file is part of the FreeType project, and may only be used,       */
+/*  modified, and distributed under the terms of the FreeType project      */
+/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
+/*  this file you indicate that you have read the license and              */
+/*  understand and accept it fully.                                        */
+/*                                                                         */
+/***************************************************************************/
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* This header file contains a number of macro definitions that are used */
+  /* by the rest of the engine.  Most of the macros here are automatically */
+  /* determined at compile time, and you should not need to change it to   */
+  /* port FreeType, except to compile the library with a non-ANSI          */
+  /* compiler.                                                             */
+  /*                                                                       */
+  /* Note however that if some specific modifications are needed, we       */
+  /* advise you to place a modified copy in your build directory.          */
+  /*                                                                       */
+  /* The build directory is usually `freetype/builds/<system>', and        */
+  /* contains system-specific files that are always included first when    */
+  /* building the library.                                                 */
+  /*                                                                       */
+  /*************************************************************************/
+
+
+#ifndef __FTCONFIG_H__
+#define __FTCONFIG_H__
+
+#include <ft2build.h>
+#include FT_CONFIG_OPTIONS_H
+#include FT_CONFIG_STANDARD_LIBRARY_H
+
+
+FT_BEGIN_HEADER
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /*               PLATFORM-SPECIFIC CONFIGURATION MACROS                  */
+  /*                                                                       */
+  /* These macros can be toggled to suit a specific system.  The current   */
+  /* ones are defaults used to compile FreeType in an ANSI C environment   */
+  /* (16bit compilers are also supported).  Copy this file to your own     */
+  /* `freetype/builds/<system>' directory, and edit it to port the engine. */
+  /*                                                                       */
+  /*************************************************************************/
+
+
+#define HAVE_UNISTD_H 1
+#define HAVE_FCNTL_H 1
+
+#define SIZEOF_INT 4
+#define SIZEOF_LONG 4
+
+
+#define FT_SIZEOF_INT   SIZEOF_INT
+#define FT_SIZEOF_LONG  SIZEOF_LONG
+
+#define FT_CHAR_BIT  CHAR_BIT
+
+  /* Preferred alignment of data */
+#define FT_ALIGNMENT  8
+
+
+  /* FT_UNUSED is a macro used to indicate that a given parameter is not  */
+  /* used -- this is only used to get rid of unpleasant compiler warnings */
+#ifndef FT_UNUSED
+#define FT_UNUSED( arg )  ( (arg) = (arg) )
+#endif
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /*                     AUTOMATIC CONFIGURATION MACROS                    */
+  /*                                                                       */
+  /* These macros are computed from the ones defined above.  Don't touch   */
+  /* their definition, unless you know precisely what you are doing.  No   */
+  /* porter should need to mess with them.                                 */
+  /*                                                                       */
+  /*************************************************************************/
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* Mac support                                                           */
+  /*                                                                       */
+  /*   This is the only necessary change, so it is defined here instead    */
+  /*   providing a new configuration file.                                 */
+  /*                                                                       */
+#if ( defined( __APPLE__ ) && !defined( DARWIN_NO_CARBON ) ) || \
+    ( defined( __MWERKS__ ) && defined( macintosh )        )
+  /* no Carbon frameworks for 64bit 10.4.x */
+#include "AvailabilityMacros.h"
+#if defined( __LP64__ ) && \
+    ( MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4 )
+#define DARWIN_NO_CARBON 1
+#else
+#define FT_MACINTOSH 1
+#endif
+#endif
+
+
+  /* Fix compiler warning with sgi compiler */
+#if defined( __sgi ) && !defined( __GNUC__ )
+#if defined( _COMPILER_VERSION ) && ( _COMPILER_VERSION >= 730 )
+#pragma set woff 3505
+#endif
+#endif
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* IntN types                                                            */
+  /*                                                                       */
+  /*   Used to guarantee the size of some specific integers.               */
+  /*                                                                       */
+  typedef signed short    FT_Int16;
+  typedef unsigned short  FT_UInt16;
+
+#if FT_SIZEOF_INT == 4
+
+  typedef signed int      FT_Int32;
+  typedef unsigned int    FT_UInt32;
+
+#elif FT_SIZEOF_LONG == 4
+
+  typedef signed long     FT_Int32;
+  typedef unsigned long   FT_UInt32;
+
+#else
+#error "no 32bit type found -- please check your configuration files"
+#endif
+
+
+  /* look up an integer type that is at least 32 bits */
+#if FT_SIZEOF_INT >= 4
+
+  typedef int            FT_Fast;
+  typedef unsigned int   FT_UFast;
+
+#elif FT_SIZEOF_LONG >= 4
+
+  typedef long           FT_Fast;
+  typedef unsigned long  FT_UFast;
+
+#endif
+
+
+  /* determine whether we have a 64-bit int type for platforms without */
+  /* Autoconf                                                          */
+#if FT_SIZEOF_LONG == 8
+
+  /* FT_LONG64 must be defined if a 64-bit type is available */
+#define FT_LONG64
+#define FT_INT64  long
+
+#elif defined( _MSC_VER ) && _MSC_VER >= 900  /* Visual C++ (and Intel C++) */
+
+  /* this compiler provides the __int64 type */
+#define FT_LONG64
+#define FT_INT64  __int64
+
+#elif defined( __BORLANDC__ )  /* Borland C++ */
+
+  /* XXXX: We should probably check the value of __BORLANDC__ in order */
+  /*       to test the compiler version.                               */
+
+  /* this compiler provides the __int64 type */
+#define FT_LONG64
+#define FT_INT64  __int64
+
+#elif defined( __WATCOMC__ )   /* Watcom C++ */
+
+  /* Watcom doesn't provide 64-bit data types */
+
+#elif defined( __MWERKS__ )    /* Metrowerks CodeWarrior */
+
+#define FT_LONG64
+#define FT_INT64  long long int
+
+#elif defined( __GNUC__ )
+
+  /* GCC provides the `long long' type */
+#define FT_LONG64
+#define FT_INT64  long long int
+
+#endif /* FT_SIZEOF_LONG == 8 */
+
+
+#define FT_BEGIN_STMNT  do {
+#define FT_END_STMNT    } while ( 0 )
+#define FT_DUMMY_STMNT  FT_BEGIN_STMNT FT_END_STMNT
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* A 64-bit data type will create compilation problems if you compile    */
+  /* in strict ANSI mode.  To avoid them, we disable their use if          */
+  /* __STDC__ is defined.  You can however ignore this rule by             */
+  /* defining the FT_CONFIG_OPTION_FORCE_INT64 configuration macro.        */
+  /*                                                                       */
+#if defined( FT_LONG64 ) && !defined( FT_CONFIG_OPTION_FORCE_INT64 )
+
+#ifdef __STDC__
+
+  /* Undefine the 64-bit macros in strict ANSI compilation mode.  */
+  /* Since `#undef' doesn't survive in configuration header files */
+  /* we use the postprocessing facility of AC_CONFIG_HEADERS to   */
+  /* replace the leading `/' with `#'.                            */
+#undef FT_LONG64
+#undef FT_INT64
+
+#endif /* __STDC__ */
+
+#endif /* FT_LONG64 && !FT_CONFIG_OPTION_FORCE_INT64 */
+
+
+#ifdef FT_MAKE_OPTION_SINGLE_OBJECT
+
+#define FT_LOCAL( x )      static  x
+#define FT_LOCAL_DEF( x )  static  x
+
+#else
+
+#ifdef __cplusplus
+#define FT_LOCAL( x )      extern "C"  x
+#define FT_LOCAL_DEF( x )  extern "C"  x
+#else
+#define FT_LOCAL( x )      extern  x
+#define FT_LOCAL_DEF( x )  x
+#endif
+
+#endif /* FT_MAKE_OPTION_SINGLE_OBJECT */
+
+
+#ifndef FT_BASE
+
+#ifdef __cplusplus
+#define FT_BASE( x )  extern "C"  x
+#else
+#define FT_BASE( x )  extern  x
+#endif
+
+#endif /* !FT_BASE */
+
+
+#ifndef FT_BASE_DEF
+
+#ifdef __cplusplus
+#define FT_BASE_DEF( x )  x
+#else
+#define FT_BASE_DEF( x )  x
+#endif
+
+#endif /* !FT_BASE_DEF */
+
+
+#ifndef FT_EXPORT
+
+#ifdef __cplusplus
+#define FT_EXPORT( x )  extern "C"  x
+#else
+#define FT_EXPORT( x )  extern  x
+#endif
+
+#endif /* !FT_EXPORT */
+
+
+#ifndef FT_EXPORT_DEF
+
+#ifdef __cplusplus
+#define FT_EXPORT_DEF( x )  extern "C"  x
+#else
+#define FT_EXPORT_DEF( x )  extern  x
+#endif
+
+#endif /* !FT_EXPORT_DEF */
+
+
+#ifndef FT_EXPORT_VAR
+
+#ifdef __cplusplus
+#define FT_EXPORT_VAR( x )  extern "C"  x
+#else
+#define FT_EXPORT_VAR( x )  extern  x
+#endif
+
+#endif /* !FT_EXPORT_VAR */
+
+  /* The following macros are needed to compile the library with a   */
+  /* C++ compiler and with 16bit compilers.                          */
+  /*                                                                 */
+
+  /* This is special.  Within C++, you must specify `extern "C"' for */
+  /* functions which are used via function pointers, and you also    */
+  /* must do that for structures which contain function pointers to  */
+  /* assure C linkage -- it's not possible to have (local) anonymous */
+  /* functions which are accessed by (global) function pointers.     */
+  /*                                                                 */
+  /*                                                                 */
+  /* FT_CALLBACK_DEF is used to _define_ a callback function.        */
+  /*                                                                 */
+  /* FT_CALLBACK_TABLE is used to _declare_ a constant variable that */
+  /* contains pointers to callback functions.                        */
+  /*                                                                 */
+  /* FT_CALLBACK_TABLE_DEF is used to _define_ a constant variable   */
+  /* that contains pointers to callback functions.                   */
+  /*                                                                 */
+  /*                                                                 */
+  /* Some 16bit compilers have to redefine these macros to insert    */
+  /* the infamous `_cdecl' or `__fastcall' declarations.             */
+  /*                                                                 */
+#ifndef FT_CALLBACK_DEF
+#ifdef __cplusplus
+#define FT_CALLBACK_DEF( x )  extern "C"  x
+#else
+#define FT_CALLBACK_DEF( x )  static  x
+#endif
+#endif /* FT_CALLBACK_DEF */
+
+#ifndef FT_CALLBACK_TABLE
+#ifdef __cplusplus
+#define FT_CALLBACK_TABLE      extern "C"
+#define FT_CALLBACK_TABLE_DEF  extern "C"
+#else
+#define FT_CALLBACK_TABLE      extern
+#define FT_CALLBACK_TABLE_DEF  /* nothing */
+#endif
+#endif /* FT_CALLBACK_TABLE */
+
+
+FT_END_HEADER
+
+
+#endif /* __FTCONFIG_H__ */
+
+
+/* END */
diff --git a/include/freetype2/freetype/config/ftheader.h b/include/freetype2/freetype/config/ftheader.h
new file mode 100644 (file)
index 0000000..b957d05
--- /dev/null
@@ -0,0 +1,729 @@
+/***************************************************************************/
+/*                                                                         */
+/*  ftheader.h                                                             */
+/*                                                                         */
+/*    Build macros of the FreeType 2 library.                              */
+/*                                                                         */
+/*  Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007 by             */
+/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
+/*                                                                         */
+/*  This file is part of the FreeType project, and may only be used,       */
+/*  modified, and distributed under the terms of the FreeType project      */
+/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
+/*  this file you indicate that you have read the license and              */
+/*  understand and accept it fully.                                        */
+/*                                                                         */
+/***************************************************************************/
+
+#ifndef __FT_HEADER_H__
+#define __FT_HEADER_H__
+
+
+  /*@***********************************************************************/
+  /*                                                                       */
+  /* <Macro>                                                               */
+  /*    FT_BEGIN_HEADER                                                    */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    This macro is used in association with @FT_END_HEADER in header    */
+  /*    files to ensure that the declarations within are properly          */
+  /*    encapsulated in an `extern "C" { .. }' block when included from a  */
+  /*    C++ compiler.                                                      */
+  /*                                                                       */
+#ifdef __cplusplus
+#define FT_BEGIN_HEADER  extern "C" {
+#else
+#define FT_BEGIN_HEADER  /* nothing */
+#endif
+
+
+  /*@***********************************************************************/
+  /*                                                                       */
+  /* <Macro>                                                               */
+  /*    FT_END_HEADER                                                      */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    This macro is used in association with @FT_BEGIN_HEADER in header  */
+  /*    files to ensure that the declarations within are properly          */
+  /*    encapsulated in an `extern "C" { .. }' block when included from a  */
+  /*    C++ compiler.                                                      */
+  /*                                                                       */
+#ifdef __cplusplus
+#define FT_END_HEADER  }
+#else
+#define FT_END_HEADER  /* nothing */
+#endif
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* Aliases for the FreeType 2 public and configuration files.            */
+  /*                                                                       */
+  /*************************************************************************/
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Section>                                                             */
+  /*    header_file_macros                                                 */
+  /*                                                                       */
+  /* <Title>                                                               */
+  /*    Header File Macros                                                 */
+  /*                                                                       */
+  /* <Abstract>                                                            */
+  /*    Macro definitions used to #include specific header files.          */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    The following macros are defined to the name of specific           */
+  /*    FreeType 2 header files.  They can be used directly in #include    */
+  /*    statements as in:                                                  */
+  /*                                                                       */
+  /*    {                                                                  */
+  /*      #include FT_FREETYPE_H                                           */
+  /*      #include FT_MULTIPLE_MASTERS_H                                   */
+  /*      #include FT_GLYPH_H                                              */
+  /*    }                                                                  */
+  /*                                                                       */
+  /*    There are several reasons why we are now using macros to name      */
+  /*    public header files.  The first one is that such macros are not    */
+  /*    limited to the infamous 8.3 naming rule required by DOS (and       */
+  /*    `FT_MULTIPLE_MASTERS_H' is a lot more meaningful than `ftmm.h').   */
+  /*                                                                       */
+  /*    The second reason is that it allows for more flexibility in the    */
+  /*    way FreeType 2 is installed on a given system.                     */
+  /*                                                                       */
+  /*************************************************************************/
+
+
+  /* configuration files */
+
+  /*************************************************************************
+   *
+   * @macro:
+   *   FT_CONFIG_CONFIG_H
+   *
+   * @description:
+   *   A macro used in #include statements to name the file containing
+   *   FreeType 2 configuration data.
+   *
+   */
+#ifndef FT_CONFIG_CONFIG_H
+#define FT_CONFIG_CONFIG_H  <freetype/config/ftconfig.h>
+#endif
+
+
+  /*************************************************************************
+   *
+   * @macro:
+   *   FT_CONFIG_STANDARD_LIBRARY_H
+   *
+   * @description:
+   *   A macro used in #include statements to name the file containing
+   *   FreeType 2 interface to the standard C library functions.
+   *
+   */
+#ifndef FT_CONFIG_STANDARD_LIBRARY_H
+#define FT_CONFIG_STANDARD_LIBRARY_H  <freetype/config/ftstdlib.h>
+#endif
+
+
+  /*************************************************************************
+   *
+   * @macro:
+   *   FT_CONFIG_OPTIONS_H
+   *
+   * @description:
+   *   A macro used in #include statements to name the file containing
+   *   FreeType 2 project-specific configuration options.
+   *
+   */
+#ifndef FT_CONFIG_OPTIONS_H
+#define FT_CONFIG_OPTIONS_H  <freetype/config/ftoption.h>
+#endif
+
+
+  /*************************************************************************
+   *
+   * @macro:
+   *   FT_CONFIG_MODULES_H
+   *
+   * @description:
+   *   A macro used in #include statements to name the file containing the
+   *   list of FreeType 2 modules that are statically linked to new library
+   *   instances in @FT_Init_FreeType.
+   *
+   */
+#ifndef FT_CONFIG_MODULES_H
+#define FT_CONFIG_MODULES_H  <freetype/config/ftmodule.h>
+#endif
+
+
+  /* public headers */
+
+  /*************************************************************************
+   *
+   * @macro:
+   *   FT_FREETYPE_H
+   *
+   * @description:
+   *   A macro used in #include statements to name the file containing the
+   *   base FreeType 2 API.
+   *
+   */
+#define FT_FREETYPE_H  <freetype/freetype.h>
+
+
+  /*************************************************************************
+   *
+   * @macro:
+   *   FT_ERRORS_H
+   *
+   * @description:
+   *   A macro used in #include statements to name the file containing the
+   *   list of FreeType 2 error codes (and messages).
+   *
+   *   It is included by @FT_FREETYPE_H.
+   *
+   */
+#define FT_ERRORS_H  <freetype/fterrors.h>
+
+
+  /*************************************************************************
+   *
+   * @macro:
+   *   FT_MODULE_ERRORS_H
+   *
+   * @description:
+   *   A macro used in #include statements to name the file containing the
+   *   list of FreeType 2 module error offsets (and messages).
+   *
+   */
+#define FT_MODULE_ERRORS_H  <freetype/ftmoderr.h>
+
+
+  /*************************************************************************
+   *
+   * @macro:
+   *   FT_SYSTEM_H
+   *
+   * @description:
+   *   A macro used in #include statements to name the file containing the
+   *   FreeType 2 interface to low-level operations (i.e., memory management
+   *   and stream i/o).
+   *
+   *   It is included by @FT_FREETYPE_H.
+   *
+   */
+#define FT_SYSTEM_H  <freetype/ftsystem.h>
+
+
+  /*************************************************************************
+   *
+   * @macro:
+   *   FT_IMAGE_H
+   *
+   * @description:
+   *   A macro used in #include statements to name the file containing type
+   *   definitions related to glyph images (i.e., bitmaps, outlines,
+   *   scan-converter parameters).
+   *
+   *   It is included by @FT_FREETYPE_H.
+   *
+   */
+#define FT_IMAGE_H  <freetype/ftimage.h>
+
+
+  /*************************************************************************
+   *
+   * @macro:
+   *   FT_TYPES_H
+   *
+   * @description:
+   *   A macro used in #include statements to name the file containing the
+   *   basic data types defined by FreeType 2.
+   *
+   *   It is included by @FT_FREETYPE_H.
+   *
+   */
+#define FT_TYPES_H  <freetype/fttypes.h>
+
+
+  /*************************************************************************
+   *
+   * @macro:
+   *   FT_LIST_H
+   *
+   * @description:
+   *   A macro used in #include statements to name the file containing the
+   *   list management API of FreeType 2.
+   *
+   *   (Most applications will never need to include this file.)
+   *
+   */
+#define FT_LIST_H  <freetype/ftlist.h>
+
+
+  /*************************************************************************
+   *
+   * @macro:
+   *   FT_OUTLINE_H
+   *
+   * @description:
+   *   A macro used in #include statements to name the file containing the
+   *   scalable outline management API of FreeType 2.
+   *
+   */
+#define FT_OUTLINE_H  <freetype/ftoutln.h>
+
+
+  /*************************************************************************
+   *
+   * @macro:
+   *   FT_SIZES_H
+   *
+   * @description:
+   *   A macro used in #include statements to name the file containing the
+   *   API which manages multiple @FT_Size objects per face.
+   *
+   */
+#define FT_SIZES_H  <freetype/ftsizes.h>
+
+
+  /*************************************************************************
+   *
+   * @macro:
+   *   FT_MODULE_H
+   *
+   * @description:
+   *   A macro used in #include statements to name the file containing the
+   *   module management API of FreeType 2.
+   *
+   */
+#define FT_MODULE_H  <freetype/ftmodapi.h>
+
+
+  /*************************************************************************
+   *
+   * @macro:
+   *   FT_RENDER_H
+   *
+   * @description:
+   *   A macro used in #include statements to name the file containing the
+   *   renderer module management API of FreeType 2.
+   *
+   */
+#define FT_RENDER_H  <freetype/ftrender.h>
+
+
+  /*************************************************************************
+   *
+   * @macro:
+   *   FT_TYPE1_TABLES_H
+   *
+   * @description:
+   *   A macro used in #include statements to name the file containing the
+   *   types and API specific to the Type 1 format.
+   *
+   */
+#define FT_TYPE1_TABLES_H  <freetype/t1tables.h>
+
+
+  /*************************************************************************
+   *
+   * @macro:
+   *   FT_TRUETYPE_IDS_H
+   *
+   * @description:
+   *   A macro used in #include statements to name the file containing the
+   *   enumeration values which identify name strings, languages, encodings,
+   *   etc.  This file really contains a _large_ set of constant macro
+   *   definitions, taken from the TrueType and OpenType specifications.
+   *
+   */
+#define FT_TRUETYPE_IDS_H  <freetype/ttnameid.h>
+
+
+  /*************************************************************************
+   *
+   * @macro:
+   *   FT_TRUETYPE_TABLES_H
+   *
+   * @description:
+   *   A macro used in #include statements to name the file containing the
+   *   types and API specific to the TrueType (as well as OpenType) format.
+   *
+   */
+#define FT_TRUETYPE_TABLES_H  <freetype/tttables.h>
+
+
+  /*************************************************************************
+   *
+   * @macro:
+   *   FT_TRUETYPE_TAGS_H
+   *
+   * @description:
+   *   A macro used in #include statements to name the file containing the
+   *   definitions of TrueType four-byte `tags' which identify blocks in
+   *   SFNT-based font formats (i.e., TrueType and OpenType).
+   *
+   */
+#define FT_TRUETYPE_TAGS_H  <freetype/tttags.h>
+
+
+  /*************************************************************************
+   *
+   * @macro:
+   *   FT_BDF_H
+   *
+   * @description:
+   *   A macro used in #include statements to name the file containing the
+   *   definitions of an API which accesses BDF-specific strings from a
+   *   face.
+   *
+   */
+#define FT_BDF_H  <freetype/ftbdf.h>
+
+
+  /*************************************************************************
+   *
+   * @macro:
+   *   FT_GZIP_H
+   *
+   * @description:
+   *   A macro used in #include statements to name the file containing the
+   *   definitions of an API which supports gzip-compressed files.
+   *
+   */
+#define FT_GZIP_H  <freetype/ftgzip.h>
+
+
+  /*************************************************************************
+   *
+   * @macro:
+   *   FT_LZW_H
+   *
+   * @description:
+   *   A macro used in #include statements to name the file containing the
+   *   definitions of an API which supports LZW-compressed files.
+   *
+   */
+#define FT_LZW_H  <freetype/ftlzw.h>
+
+
+  /*************************************************************************
+   *
+   * @macro:
+   *   FT_WINFONTS_H
+   *
+   * @description:
+   *   A macro used in #include statements to name the file containing the
+   *   definitions of an API which supports Windows FNT files.
+   *
+   */
+#define FT_WINFONTS_H   <freetype/ftwinfnt.h>
+
+
+  /*************************************************************************
+   *
+   * @macro:
+   *   FT_GLYPH_H
+   *
+   * @description:
+   *   A macro used in #include statements to name the file containing the
+   *   API of the optional glyph management component.
+   *
+   */
+#define FT_GLYPH_H  <freetype/ftglyph.h>
+
+
+  /*************************************************************************
+   *
+   * @macro:
+   *   FT_BITMAP_H
+   *
+   * @description:
+   *   A macro used in #include statements to name the file containing the
+   *   API of the optional bitmap conversion component.
+   *
+   */
+#define FT_BITMAP_H  <freetype/ftbitmap.h>
+
+
+  /*************************************************************************
+   *
+   * @macro:
+   *   FT_BBOX_H
+   *
+   * @description:
+   *   A macro used in #include statements to name the file containing the
+   *   API of the optional exact bounding box computation routines.
+   *
+   */
+#define FT_BBOX_H  <freetype/ftbbox.h>
+
+
+  /*************************************************************************
+   *
+   * @macro:
+   *   FT_CACHE_H
+   *
+   * @description:
+   *   A macro used in #include statements to name the file containing the
+   *   API of the optional FreeType 2 cache sub-system.
+   *
+   */
+#define FT_CACHE_H  <freetype/ftcache.h>
+
+
+  /*************************************************************************
+   *
+   * @macro:
+   *   FT_CACHE_IMAGE_H
+   *
+   * @description:
+   *   A macro used in #include statements to name the file containing the
+   *   `glyph image' API of the FreeType 2 cache sub-system.
+   *
+   *   It is used to define a cache for @FT_Glyph elements.  You can also
+   *   use the API defined in @FT_CACHE_SMALL_BITMAPS_H if you only need to
+   *   store small glyph bitmaps, as it will use less memory.
+   *
+   *   This macro is deprecated.  Simply include @FT_CACHE_H to have all
+   *   glyph image-related cache declarations.
+   *
+   */
+#define FT_CACHE_IMAGE_H  FT_CACHE_H
+
+
+  /*************************************************************************
+   *
+   * @macro:
+   *   FT_CACHE_SMALL_BITMAPS_H
+   *
+   * @description:
+   *   A macro used in #include statements to name the file containing the
+   *   `small bitmaps' API of the FreeType 2 cache sub-system.
+   *
+   *   It is used to define a cache for small glyph bitmaps in a relatively
+   *   memory-efficient way.  You can also use the API defined in
+   *   @FT_CACHE_IMAGE_H if you want to cache arbitrary glyph images,
+   *   including scalable outlines.
+   *
+   *   This macro is deprecated.  Simply include @FT_CACHE_H to have all
+   *   small bitmaps-related cache declarations.
+   *
+   */
+#define FT_CACHE_SMALL_BITMAPS_H  FT_CACHE_H
+
+
+  /*************************************************************************
+   *
+   * @macro:
+   *   FT_CACHE_CHARMAP_H
+   *
+   * @description:
+   *   A macro used in #include statements to name the file containing the
+   *   `charmap' API of the FreeType 2 cache sub-system.
+   *
+   *   This macro is deprecated.  Simply include @FT_CACHE_H to have all
+   *   charmap-based cache declarations.
+   *
+   */
+#define FT_CACHE_CHARMAP_H  FT_CACHE_H
+
+
+  /*************************************************************************
+   *
+   * @macro:
+   *   FT_MAC_H
+   *
+   * @description:
+   *   A macro used in #include statements to name the file containing the
+   *   Macintosh-specific FreeType 2 API.  The latter is used to access
+   *   fonts embedded in resource forks.
+   *
+   *   This header file must be explicitly included by client applications
+   *   compiled on the Mac (note that the base API still works though).
+   *
+   */
+#define FT_MAC_H  <freetype/ftmac.h>
+
+
+  /*************************************************************************
+   *
+   * @macro:
+   *   FT_MULTIPLE_MASTERS_H
+   *
+   * @description:
+   *   A macro used in #include statements to name the file containing the
+   *   optional multiple-masters management API of FreeType 2.
+   *
+   */
+#define FT_MULTIPLE_MASTERS_H  <freetype/ftmm.h>
+
+
+  /*************************************************************************
+   *
+   * @macro:
+   *   FT_SFNT_NAMES_H
+   *
+   * @description:
+   *   A macro used in #include statements to name the file containing the
+   *   optional FreeType 2 API which accesses embedded `name' strings in
+   *   SFNT-based font formats (i.e., TrueType and OpenType).
+   *
+   */
+#define FT_SFNT_NAMES_H  <freetype/ftsnames.h>
+
+
+  /*************************************************************************
+   *
+   * @macro:
+   *   FT_OPENTYPE_VALIDATE_H
+   *
+   * @description:
+   *   A macro used in #include statements to name the file containing the
+   *   optional FreeType 2 API which validates OpenType tables (BASE, GDEF,
+   *   GPOS, GSUB, JSTF).
+   *
+   */
+#define FT_OPENTYPE_VALIDATE_H  <freetype/ftotval.h>
+
+
+  /*************************************************************************
+   *
+   * @macro:
+   *   FT_GX_VALIDATE_H
+   *
+   * @description:
+   *   A macro used in #include statements to name the file containing the
+   *   optional FreeType 2 API which validates TrueTypeGX/AAT tables (feat,
+   *   mort, morx, bsln, just, kern, opbd, trak, prop).
+   *
+   */
+#define FT_GX_VALIDATE_H  <freetype/ftgxval.h>
+
+
+  /*************************************************************************
+   *
+   * @macro:
+   *   FT_PFR_H
+   *
+   * @description:
+   *   A macro used in #include statements to name the file containing the
+   *   FreeType 2 API which accesses PFR-specific data.
+   *
+   */
+#define FT_PFR_H  <freetype/ftpfr.h>
+
+
+  /*************************************************************************
+   *
+   * @macro:
+   *   FT_STROKER_H
+   *
+   * @description:
+   *   A macro used in #include statements to name the file containing the
+   *   FreeType 2 API which provides functions to stroke outline paths.
+   */
+#define FT_STROKER_H  <freetype/ftstroke.h>
+
+
+  /*************************************************************************
+   *
+   * @macro:
+   *   FT_SYNTHESIS_H
+   *
+   * @description:
+   *   A macro used in #include statements to name the file containing the
+   *   FreeType 2 API which performs artificial obliquing and emboldening.
+   */
+#define FT_SYNTHESIS_H  <freetype/ftsynth.h>
+
+
+  /*************************************************************************
+   *
+   * @macro:
+   *   FT_XFREE86_H
+   *
+   * @description:
+   *   A macro used in #include statements to name the file containing the
+   *   FreeType 2 API which provides functions specific to the XFree86 and
+   *   X.Org X11 servers.
+   */
+#define FT_XFREE86_H  <freetype/ftxf86.h>
+
+
+  /*************************************************************************
+   *
+   * @macro:
+   *   FT_TRIGONOMETRY_H
+   *
+   * @description:
+   *   A macro used in #include statements to name the file containing the
+   *   FreeType 2 API which performs trigonometric computations (e.g.,
+   *   cosines and arc tangents).
+   */
+#define FT_TRIGONOMETRY_H  <freetype/fttrigon.h>
+
+
+  /*************************************************************************
+   *
+   * @macro:
+   *   FT_LCD_FILTER_H
+   *
+   * @description:
+   *   A macro used in #include statements to name the file containing the
+   *   FreeType 2 API which performs color filtering for subpixel rendering.
+   */
+#define FT_LCD_FILTER_H  <freetype/ftlcdfil.h>
+
+
+  /*************************************************************************
+   *
+   * @macro:
+   *   FT_GASP_H
+   *
+   * @description:
+   *   A macro used in #include statements to name the file containing the
+   *   FreeType 2 API which returns entries from the TrueType GASP table.
+   */
+#define FT_GASP_H  <freetype/ftgasp.h>
+
+
+  /* */
+
+#define FT_ERROR_DEFINITIONS_H  <freetype/fterrdef.h>
+
+
+  /* The internals of the cache sub-system are no longer exposed.  We */
+  /* default to FT_CACHE_H at the moment just in case, but we know of */
+  /* no rogue client that uses them.                                  */
+  /*                                                                  */
+#define FT_CACHE_MANAGER_H           <freetype/ftcache.h>
+#define FT_CACHE_INTERNAL_MRU_H      <freetype/ftcache.h>
+#define FT_CACHE_INTERNAL_MANAGER_H  <freetype/ftcache.h>
+#define FT_CACHE_INTERNAL_CACHE_H    <freetype/ftcache.h>
+#define FT_CACHE_INTERNAL_GLYPH_H    <freetype/ftcache.h>
+#define FT_CACHE_INTERNAL_IMAGE_H    <freetype/ftcache.h>
+#define FT_CACHE_INTERNAL_SBITS_H    <freetype/ftcache.h>
+
+
+#define FT_INCREMENTAL_H          <freetype/ftincrem.h>
+
+#define FT_TRUETYPE_UNPATENTED_H  <freetype/ttunpat.h>
+
+
+  /*
+   * Include internal headers definitions from <freetype/internal/...>
+   * only when building the library.
+   */
+#ifdef FT2_BUILD_LIBRARY
+#define  FT_INTERNAL_INTERNAL_H  <freetype/internal/internal.h>
+#include FT_INTERNAL_INTERNAL_H
+#endif /* FT2_BUILD_LIBRARY */
+
+
+#endif /* __FT2_BUILD_H__ */
+
+
+/* END */
diff --git a/include/freetype2/freetype/config/ftmodule.h b/include/freetype2/freetype/config/ftmodule.h
new file mode 100644 (file)
index 0000000..c28052b
--- /dev/null
@@ -0,0 +1,22 @@
+/* This is a generated file. */
+FT_USE_MODULE(tt_driver_class)
+FT_USE_MODULE(t1_driver_class)
+FT_USE_MODULE(cff_driver_class)
+FT_USE_MODULE(t1cid_driver_class)
+FT_USE_MODULE(pfr_driver_class)
+FT_USE_MODULE(t42_driver_class)
+FT_USE_MODULE(winfnt_driver_class)
+FT_USE_MODULE(pcf_driver_class)
+FT_USE_MODULE(bdf_driver_class)
+FT_USE_MODULE(sfnt_module_class)
+FT_USE_MODULE(autofit_module_class)
+FT_USE_MODULE(pshinter_module_class)
+FT_USE_MODULE(ft_raster1_renderer_class)
+FT_USE_MODULE(ft_smooth_renderer_class)
+FT_USE_MODULE(ft_smooth_lcd_renderer_class)
+FT_USE_MODULE(ft_smooth_lcdv_renderer_class)
+FT_USE_MODULE(gxv_module_class)
+FT_USE_MODULE(otv_module_class)
+FT_USE_MODULE(psaux_module_class)
+FT_USE_MODULE(psnames_module_class)
+/* EOF */
diff --git a/include/freetype2/freetype/config/ftoption.h b/include/freetype2/freetype/config/ftoption.h
new file mode 100644 (file)
index 0000000..0b5c66d
--- /dev/null
@@ -0,0 +1,695 @@
+/***************************************************************************/
+/*                                                                         */
+/*  ftoption.h                                                             */
+/*                                                                         */
+/*    User-selectable configuration macros (specification only).           */
+/*                                                                         */
+/*  Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007 by             */
+/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
+/*                                                                         */
+/*  This file is part of the FreeType project, and may only be used,       */
+/*  modified, and distributed under the terms of the FreeType project      */
+/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
+/*  this file you indicate that you have read the license and              */
+/*  understand and accept it fully.                                        */
+/*                                                                         */
+/***************************************************************************/
+
+
+#ifndef __FTOPTION_H__
+#define __FTOPTION_H__
+
+
+#include <ft2build.h>
+
+
+FT_BEGIN_HEADER
+
+  /*************************************************************************/
+  /*                                                                       */
+  /*                 USER-SELECTABLE CONFIGURATION MACROS                  */
+  /*                                                                       */
+  /* This file contains the default configuration macro definitions for    */
+  /* a standard build of the FreeType library.  There are three ways to    */
+  /* use this file to build project-specific versions of the library:      */
+  /*                                                                       */
+  /*  - You can modify this file by hand, but this is not recommended in   */
+  /*    cases where you would like to build several versions of the        */
+  /*    library from a single source directory.                            */
+  /*                                                                       */
+  /*  - You can put a copy of this file in your build directory, more      */
+  /*    precisely in `$BUILD/freetype/config/ftoption.h', where `$BUILD'   */
+  /*    is the name of a directory that is included _before_ the FreeType  */
+  /*    include path during compilation.                                   */
+  /*                                                                       */
+  /*    The default FreeType Makefiles and Jamfiles use the build          */
+  /*    directory `builds/<system>' by default, but you can easily change  */
+  /*    that for your own projects.                                        */
+  /*                                                                       */
+  /*  - Copy the file <ft2build.h> to `$BUILD/ft2build.h' and modify it    */
+  /*    slightly to pre-define the macro FT_CONFIG_OPTIONS_H used to       */
+  /*    locate this file during the build.  For example,                   */
+  /*                                                                       */
+  /*      #define FT_CONFIG_OPTIONS_H  <myftoptions.h>                     */
+  /*      #include <freetype/config/ftheader.h>                            */
+  /*                                                                       */
+  /*    will use `$BUILD/myftoptions.h' instead of this file for macro     */
+  /*    definitions.                                                       */
+  /*                                                                       */
+  /*    Note also that you can similarly pre-define the macro              */
+  /*    FT_CONFIG_MODULES_H used to locate the file listing of the modules */
+  /*    that are statically linked to the library at compile time.  By     */
+  /*    default, this file is <freetype/config/ftmodule.h>.                */
+  /*                                                                       */
+  /*  We highly recommend using the third method whenever possible.        */
+  /*                                                                       */
+  /*************************************************************************/
+
+
+  /*************************************************************************/
+  /*************************************************************************/
+  /****                                                                 ****/
+  /**** G E N E R A L   F R E E T Y P E   2   C O N F I G U R A T I O N ****/
+  /****                                                                 ****/
+  /*************************************************************************/
+  /*************************************************************************/
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* Uncomment the line below if you want to activate sub-pixel rendering  */
+  /* (a.k.a. LCD rendering, or ClearType) in this build of the library.    */
+  /*                                                                       */
+  /* Note that this feature is covered by several Microsoft patents        */
+  /* and should not be activated in any default build of the library.      */
+  /*                                                                       */
+  /* This macro has no impact on the FreeType API, only on its             */
+  /* _implementation_.  For example, using FT_RENDER_MODE_LCD when calling */
+  /* FT_Render_Glyph still generates a bitmap that is 3 times larger than  */
+  /* the original size; the difference will be that each triplet of        */
+  /* subpixels has R=G=B.                                                  */
+  /*                                                                       */
+  /* This is done to allow FreeType clients to run unmodified, forcing     */
+  /* them to display normal gray-level anti-aliased glyphs.                */
+  /*                                                                       */
+#define FT_CONFIG_OPTION_SUBPIXEL_RENDERING
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* Many compilers provide a non-ANSI 64-bit data type that can be used   */
+  /* by FreeType to speed up some computations.  However, this will create */
+  /* some problems when compiling the library in strict ANSI mode.         */
+  /*                                                                       */
+  /* For this reason, the use of 64-bit integers is normally disabled when */
+  /* the __STDC__ macro is defined.  You can however disable this by       */
+  /* defining the macro FT_CONFIG_OPTION_FORCE_INT64 here.                 */
+  /*                                                                       */
+  /* For most compilers, this will only create compilation warnings when   */
+  /* building the library.                                                 */
+  /*                                                                       */
+  /* ObNote: The compiler-specific 64-bit integers are detected in the     */
+  /*         file `ftconfig.h' either statically or through the            */
+  /*         `configure' script on supported platforms.                    */
+  /*                                                                       */
+#undef  FT_CONFIG_OPTION_FORCE_INT64
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* LZW-compressed file support.                                          */
+  /*                                                                       */
+  /*   FreeType now handles font files that have been compressed with the  */
+  /*   `compress' program.  This is mostly used to parse many of the PCF   */
+  /*   files that come with various X11 distributions.  The implementation */
+  /*   uses NetBSD's `zopen' to partially uncompress the file on the fly   */
+  /*   (see src/lzw/ftgzip.c).                                             */
+  /*                                                                       */
+  /*   Define this macro if you want to enable this `feature'.             */
+  /*                                                                       */
+#define FT_CONFIG_OPTION_USE_LZW
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* Gzip-compressed file support.                                         */
+  /*                                                                       */
+  /*   FreeType now handles font files that have been compressed with the  */
+  /*   `gzip' program.  This is mostly used to parse many of the PCF files */
+  /*   that come with XFree86.  The implementation uses `zlib' to          */
+  /*   partially uncompress the file on the fly (see src/gzip/ftgzip.c).   */
+  /*                                                                       */
+  /*   Define this macro if you want to enable this `feature'.  See also   */
+  /*   the macro FT_CONFIG_OPTION_SYSTEM_ZLIB below.                       */
+  /*                                                                       */
+#define FT_CONFIG_OPTION_USE_ZLIB
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* ZLib library selection                                                */
+  /*                                                                       */
+  /*   This macro is only used when FT_CONFIG_OPTION_USE_ZLIB is defined.  */
+  /*   It allows FreeType's `ftgzip' component to link to the system's     */
+  /*   installation of the ZLib library.  This is useful on systems like   */
+  /*   Unix or VMS where it generally is already available.                */
+  /*                                                                       */
+  /*   If you let it undefined, the component will use its own copy        */
+  /*   of the zlib sources instead.  These have been modified to be        */
+  /*   included directly within the component and *not* export external    */
+  /*   function names.  This allows you to link any program with FreeType  */
+  /*   _and_ ZLib without linking conflicts.                               */
+  /*                                                                       */
+  /*   Do not #undef this macro here since the build system might define   */
+  /*   it for certain configurations only.                                 */
+  /*                                                                       */
+/* #define  FT_CONFIG_OPTION_SYSTEM_ZLIB */
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* DLL export compilation                                                */
+  /*                                                                       */
+  /*   When compiling FreeType as a DLL, some systems/compilers need a     */
+  /*   special keyword in front OR after the return type of function       */
+  /*   declarations.                                                       */
+  /*                                                                       */
+  /*   Two macros are used within the FreeType source code to define       */
+  /*   exported library functions: FT_EXPORT and FT_EXPORT_DEF.            */
+  /*                                                                       */
+  /*     FT_EXPORT( return_type )                                          */
+  /*                                                                       */
+  /*       is used in a function declaration, as in                        */
+  /*                                                                       */
+  /*         FT_EXPORT( FT_Error )                                         */
+  /*         FT_Init_FreeType( FT_Library*  alibrary );                    */
+  /*                                                                       */
+  /*                                                                       */
+  /*     FT_EXPORT_DEF( return_type )                                      */
+  /*                                                                       */
+  /*       is used in a function definition, as in                         */
+  /*                                                                       */
+  /*         FT_EXPORT_DEF( FT_Error )                                     */
+  /*         FT_Init_FreeType( FT_Library*  alibrary )                     */
+  /*         {                                                             */
+  /*           ... some code ...                                           */
+  /*           return FT_Err_Ok;                                           */
+  /*         }                                                             */
+  /*                                                                       */
+  /*   You can provide your own implementation of FT_EXPORT and            */
+  /*   FT_EXPORT_DEF here if you want.  If you leave them undefined, they  */
+  /*   will be later automatically defined as `extern return_type' to      */
+  /*   allow normal compilation.                                           */
+  /*                                                                       */
+  /*   Do not #undef these macros here since the build system might define */
+  /*   them for certain configurations only.                               */
+  /*                                                                       */
+/* #define  FT_EXPORT(x)       extern x */
+/* #define  FT_EXPORT_DEF(x)   x */
+#ifndef __GNUC__
+# define __DLL_IMPORT__  __declspec(dllimport)
+# define __DLL_EXPORT__  __declspec(dllexport)
+#else
+# define __DLL_IMPORT__  __attribute__((dllimport)) extern
+# define __DLL_EXPORT__  __attribute__((dllexport)) extern
+#endif 
+
+#if (defined __WIN32__) || (defined _WIN32)
+# ifdef BUILD_FREETYPE2_DLL
+#  define FREETYPE2_DLL_IMPEXP     __DLL_EXPORT__
+# elif defined(FREETYPE2_STATIC)
+#  define FREETYPE2_DLL_IMPEXP      
+# elif defined (USE_FREETYPE2_DLL)
+#  define FREETYPE2_DLL_IMPEXP     __DLL_IMPORT__
+# elif defined (USE_FREETYPE2_STATIC)
+#  define FREETYPE2_DLL_IMPEXP      
+# else /* assume USE_FREETYPE2_DLL */
+#  define FREETYPE2_DLL_IMPEXP     __DLL_IMPORT__
+# endif
+#else /* __WIN32__ */
+# define FREETYPE2_DLL_IMPEXP  
+#endif
+#define FT_EXPORT(x)    FREETYPE2_DLL_IMPEXP x
+#define FT_BASE(x)      FREETYPE2_DLL_IMPEXP x
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* Glyph Postscript Names handling                                       */
+  /*                                                                       */
+  /*   By default, FreeType 2 is compiled with the `PSNames' module.  This */
+  /*   module is in charge of converting a glyph name string into a        */
+  /*   Unicode value, or return a Macintosh standard glyph name for the    */
+  /*   use with the TrueType `post' table.                                 */
+  /*                                                                       */
+  /*   Undefine this macro if you do not want `PSNames' compiled in your   */
+  /*   build of FreeType.  This has the following effects:                 */
+  /*                                                                       */
+  /*   - The TrueType driver will provide its own set of glyph names,      */
+  /*     if you build it to support postscript names in the TrueType       */
+  /*     `post' table.                                                     */
+  /*                                                                       */
+  /*   - The Type 1 driver will not be able to synthetize a Unicode        */
+  /*     charmap out of the glyphs found in the fonts.                     */
+  /*                                                                       */
+  /*   You would normally undefine this configuration macro when building  */
+  /*   a version of FreeType that doesn't contain a Type 1 or CFF driver.  */
+  /*                                                                       */
+#define FT_CONFIG_OPTION_POSTSCRIPT_NAMES
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* Postscript Names to Unicode Values support                            */
+  /*                                                                       */
+  /*   By default, FreeType 2 is built with the `PSNames' module compiled  */
+  /*   in.  Among other things, the module is used to convert a glyph name */
+  /*   into a Unicode value.  This is especially useful in order to        */
+  /*   synthetize on the fly a Unicode charmap from the CFF/Type 1 driver  */
+  /*   through a big table named the `Adobe Glyph List' (AGL).             */
+  /*                                                                       */
+  /*   Undefine this macro if you do not want the Adobe Glyph List         */
+  /*   compiled in your `PSNames' module.  The Type 1 driver will not be   */
+  /*   able to synthetize a Unicode charmap out of the glyphs found in the */
+  /*   fonts.                                                              */
+  /*                                                                       */
+#define FT_CONFIG_OPTION_ADOBE_GLYPH_LIST
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* Support for Mac fonts                                                 */
+  /*                                                                       */
+  /*   Define this macro if you want support for outline fonts in Mac      */
+  /*   format (mac dfont, mac resource, macbinary containing a mac         */
+  /*   resource) on non-Mac platforms.                                     */
+  /*                                                                       */
+  /*   Note that the `FOND' resource isn't checked.                        */
+  /*                                                                       */
+#define FT_CONFIG_OPTION_MAC_FONTS
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* Guessing methods to access embedded resource forks                    */
+  /*                                                                       */
+  /*   Enable extra Mac fonts support on non-Mac platforms (e.g.           */
+  /*   GNU/Linux).                                                         */
+  /*                                                                       */
+  /*   Resource forks which include fonts data are stored sometimes in     */
+  /*   locations which users or developers don't expected.  In some cases, */
+  /*   resource forks start with some offset from the head of a file.  In  */
+  /*   other cases, the actual resource fork is stored in file different   */
+  /*   from what the user specifies.  If this option is activated,         */
+  /*   FreeType tries to guess whether such offsets or different file      */
+  /*   names must be used.                                                 */
+  /*                                                                       */
+  /*   Note that normal, direct access of resource forks is controlled via */
+  /*   the FT_CONFIG_OPTION_MAC_FONTS option.                              */
+  /*                                                                       */
+#ifdef FT_CONFIG_OPTION_MAC_FONTS
+#define FT_CONFIG_OPTION_GUESSING_EMBEDDED_RFORK
+#endif
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* Allow the use of FT_Incremental_Interface to load typefaces that      */
+  /* contain no glyph data, but supply it via a callback function.         */
+  /* This allows FreeType to be used with the PostScript language, using   */
+  /* the GhostScript interpreter.                                          */
+  /*                                                                       */
+/* #define FT_CONFIG_OPTION_INCREMENTAL */
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* The size in bytes of the render pool used by the scan-line converter  */
+  /* to do all of its work.                                                */
+  /*                                                                       */
+  /* This must be greater than 4KByte if you use FreeType to rasterize     */
+  /* glyphs; otherwise, you may set it to zero to avoid unnecessary        */
+  /* allocation of the render pool.                                        */
+  /*                                                                       */
+#define FT_RENDER_POOL_SIZE  16384L
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* FT_MAX_MODULES                                                        */
+  /*                                                                       */
+  /*   The maximum number of modules that can be registered in a single    */
+  /*   FreeType library object.  32 is the default.                        */
+  /*                                                                       */
+#define FT_MAX_MODULES  32
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* Debug level                                                           */
+  /*                                                                       */
+  /*   FreeType can be compiled in debug or trace mode.  In debug mode,    */
+  /*   errors are reported through the `ftdebug' component.  In trace      */
+  /*   mode, additional messages are sent to the standard output during    */
+  /*   execution.                                                          */
+  /*                                                                       */
+  /*   Define FT_DEBUG_LEVEL_ERROR to build the library in debug mode.     */
+  /*   Define FT_DEBUG_LEVEL_TRACE to build it in trace mode.              */
+  /*                                                                       */
+  /*   Don't define any of these macros to compile in `release' mode!      */
+  /*                                                                       */
+  /*   Do not #undef these macros here since the build system might define */
+  /*   them for certain configurations only.                               */
+  /*                                                                       */
+/* #define FT_DEBUG_LEVEL_ERROR */
+/* #define FT_DEBUG_LEVEL_TRACE */
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* Memory Debugging                                                      */
+  /*                                                                       */
+  /*   FreeType now comes with an integrated memory debugger that is       */
+  /*   capable of detecting simple errors like memory leaks or double      */
+  /*   deletes.  To compile it within your build of the library, you       */
+  /*   should define FT_DEBUG_MEMORY here.                                 */
+  /*                                                                       */
+  /*   Note that the memory debugger is only activated at runtime when     */
+  /*   when the _environment_ variable `FT2_DEBUG_MEMORY' is defined also! */
+  /*                                                                       */
+  /*   Do not #undef this macro here since the build system might define   */
+  /*   it for certain configurations only.                                 */
+  /*                                                                       */
+/* #define FT_DEBUG_MEMORY */
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* Module errors                                                         */
+  /*                                                                       */
+  /*   If this macro is set (which is _not_ the default), the higher byte  */
+  /*   of an error code gives the module in which the error has occurred,  */
+  /*   while the lower byte is the real error code.                        */
+  /*                                                                       */
+  /*   Setting this macro makes sense for debugging purposes only, since   */
+  /*   it would break source compatibility of certain programs that use    */
+  /*   FreeType 2.                                                         */
+  /*                                                                       */
+  /*   More details can be found in the files ftmoderr.h and fterrors.h.   */
+  /*                                                                       */
+#undef FT_CONFIG_OPTION_USE_MODULE_ERRORS
+
+
+
+  /*************************************************************************/
+  /*************************************************************************/
+  /****                                                                 ****/
+  /****        S F N T   D R I V E R    C O N F I G U R A T I O N       ****/
+  /****                                                                 ****/
+  /*************************************************************************/
+  /*************************************************************************/
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* Define TT_CONFIG_OPTION_EMBEDDED_BITMAPS if you want to support       */
+  /* embedded bitmaps in all formats using the SFNT module (namely         */
+  /* TrueType & OpenType).                                                 */
+  /*                                                                       */
+#define TT_CONFIG_OPTION_EMBEDDED_BITMAPS
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* Define TT_CONFIG_OPTION_POSTSCRIPT_NAMES if you want to be able to    */
+  /* load and enumerate the glyph Postscript names in a TrueType or        */
+  /* OpenType file.                                                        */
+  /*                                                                       */
+  /* Note that when you do not compile the `PSNames' module by undefining  */
+  /* the above FT_CONFIG_OPTION_POSTSCRIPT_NAMES, the `sfnt' module will   */
+  /* contain additional code used to read the PS Names table from a font.  */
+  /*                                                                       */
+  /* (By default, the module uses `PSNames' to extract glyph names.)       */
+  /*                                                                       */
+#define TT_CONFIG_OPTION_POSTSCRIPT_NAMES
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* Define TT_CONFIG_OPTION_SFNT_NAMES if your applications need to       */
+  /* access the internal name table in a SFNT-based format like TrueType   */
+  /* or OpenType.  The name table contains various strings used to         */
+  /* describe the font, like family name, copyright, version, etc.  It     */
+  /* does not contain any glyph name though.                               */
+  /*                                                                       */
+  /* Accessing SFNT names is done through the functions declared in        */
+  /* `freetype/ftnames.h'.                                                 */
+  /*                                                                       */
+#define TT_CONFIG_OPTION_SFNT_NAMES
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* TrueType CMap support                                                 */
+  /*                                                                       */
+  /*   Here you can fine-tune which TrueType CMap table format shall be    */
+  /*   supported.                                                          */
+#define TT_CONFIG_CMAP_FORMAT_0
+#define TT_CONFIG_CMAP_FORMAT_2
+#define TT_CONFIG_CMAP_FORMAT_4
+#define TT_CONFIG_CMAP_FORMAT_6
+#define TT_CONFIG_CMAP_FORMAT_8
+#define TT_CONFIG_CMAP_FORMAT_10
+#define TT_CONFIG_CMAP_FORMAT_12
+
+
+  /*************************************************************************/
+  /*************************************************************************/
+  /****                                                                 ****/
+  /****    T R U E T Y P E   D R I V E R    C O N F I G U R A T I O N   ****/
+  /****                                                                 ****/
+  /*************************************************************************/
+  /*************************************************************************/
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* Define TT_CONFIG_OPTION_BYTECODE_INTERPRETER if you want to compile   */
+  /* a bytecode interpreter in the TrueType driver.  Note that there are   */
+  /* important patent issues related to the use of the interpreter.        */
+  /*                                                                       */
+  /* By undefining this, you will only compile the code necessary to load  */
+  /* TrueType glyphs without hinting.                                      */
+  /*                                                                       */
+  /*   Do not #undef this macro here, since the build system might         */
+  /*   define it for certain configurations only.                          */
+  /*                                                                       */
+/* #define TT_CONFIG_OPTION_BYTECODE_INTERPRETER */
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* If you define TT_CONFIG_OPTION_UNPATENTED_HINTING, a special version  */
+  /* of the TrueType bytecode interpreter is used that doesn't implement   */
+  /* any of the patented opcodes and algorithms.  Note that the            */
+  /* the TT_CONFIG_OPTION_UNPATENTED_HINTING macro is *ignored* if you     */
+  /* define TT_CONFIG_OPTION_BYTECODE_INTERPRETER; with other words,       */
+  /* either define TT_CONFIG_OPTION_BYTECODE_INTERPRETER or                */
+  /* TT_CONFIG_OPTION_UNPATENTED_HINTING but not both at the same time.    */
+  /*                                                                       */
+  /* This macro is only useful for a small number of font files (mostly    */
+  /* for Asian scripts) that require bytecode interpretation to properly   */
+  /* load glyphs.  For all other fonts, this produces unpleasant results,  */
+  /* thus the unpatented interpreter is never used to load glyphs from     */
+  /* TrueType fonts unless one of the following two options is used.       */
+  /*                                                                       */
+  /*   - The unpatented interpreter is explicitly activated by the user    */
+  /*     through the FT_PARAM_TAG_UNPATENTED_HINTING parameter tag         */
+  /*     when opening the FT_Face.                                         */
+  /*                                                                       */
+  /*   - FreeType detects that the FT_Face corresponds to one of the       */
+  /*     `trick' fonts (e.g., `Mingliu') it knows about.  The font engine  */
+  /*     contains a hard-coded list of font names and other matching       */
+  /*     parameters (see function `tt_face_init' in file                   */
+  /*     `src/truetype/ttobjs.c').                                         */
+  /*                                                                       */
+  /* Here a sample code snippet for using FT_PARAM_TAG_UNPATENTED_HINTING. */
+  /*                                                                       */
+  /*   {                                                                   */
+  /*     FT_Parameter  parameter;                                          */
+  /*     FT_Open_Args  open_args;                                          */
+  /*                                                                       */
+  /*                                                                       */
+  /*     parameter.tag = FT_PARAM_TAG_UNPATENTED_HINTING;                  */
+  /*                                                                       */
+  /*     open_args.flags      = FT_OPEN_PATHNAME | FT_OPEN_PARAMS;         */
+  /*     open_args.pathname   = my_font_pathname;                          */
+  /*     open_args.num_params = 1;                                         */
+  /*     open_args.params     = &parameter;                                */
+  /*                                                                       */
+  /*     error = FT_Open_Face( library, &open_args, index, &face );        */
+  /*     ...                                                               */
+  /*   }                                                                   */
+  /*                                                                       */
+#define TT_CONFIG_OPTION_UNPATENTED_HINTING
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* Define TT_CONFIG_OPTION_INTERPRETER_SWITCH to compile the TrueType    */
+  /* bytecode interpreter with a huge switch statement, rather than a call */
+  /* table.  This results in smaller and faster code for a number of       */
+  /* architectures.                                                        */
+  /*                                                                       */
+  /* Note however that on some compiler/processor combinations, undefining */
+  /* this macro will generate faster, though larger, code.                 */
+  /*                                                                       */
+#define TT_CONFIG_OPTION_INTERPRETER_SWITCH
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* Define TT_CONFIG_OPTION_COMPONENT_OFFSET_SCALED to compile the        */
+  /* TrueType glyph loader to use Apple's definition of how to handle      */
+  /* component offsets in composite glyphs.                                */
+  /*                                                                       */
+  /* Apple and MS disagree on the default behavior of component offsets    */
+  /* in composites.  Apple says that they should be scaled by the scaling  */
+  /* factors in the transformation matrix (roughly, it's more complex)     */
+  /* while MS says they should not.  OpenType defines two bits in the      */
+  /* composite flags array which can be used to disambiguate, but old      */
+  /* fonts will not have them.                                             */
+  /*                                                                       */
+  /*   http://partners.adobe.com/asn/developer/opentype/glyf.html          */
+  /*   http://fonts.apple.com/TTRefMan/RM06/Chap6glyf.html                 */
+  /*                                                                       */
+#undef TT_CONFIG_OPTION_COMPONENT_OFFSET_SCALED
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* Define TT_CONFIG_OPTION_GX_VAR_SUPPORT if you want to include         */
+  /* support for Apple's distortable font technology (fvar, gvar, cvar,    */
+  /* and avar tables).  This has many similarities to Type 1 Multiple      */
+  /* Masters support.                                                      */
+  /*                                                                       */
+#define TT_CONFIG_OPTION_GX_VAR_SUPPORT
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* Define TT_CONFIG_OPTION_BDF if you want to include support for        */
+  /* an embedded `BDF ' table within SFNT-based bitmap formats.            */
+  /*                                                                       */
+#define TT_CONFIG_OPTION_BDF
+
+
+  /*************************************************************************/
+  /*************************************************************************/
+  /****                                                                 ****/
+  /****      T Y P E 1   D R I V E R    C O N F I G U R A T I O N       ****/
+  /****                                                                 ****/
+  /*************************************************************************/
+  /*************************************************************************/
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* T1_MAX_DICT_DEPTH is the maximal depth of nest dictionaries and       */
+  /* arrays in the Type 1 stream (see t1load.c).  A minimum of 4 is        */
+  /* required.                                                             */
+  /*                                                                       */
+#define T1_MAX_DICT_DEPTH  5
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* T1_MAX_SUBRS_CALLS details the maximum number of nested sub-routine   */
+  /* calls during glyph loading.                                           */
+  /*                                                                       */
+#define T1_MAX_SUBRS_CALLS  16
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* T1_MAX_CHARSTRING_OPERANDS is the charstring stack's capacity.  A     */
+  /* minimum of 16 is required.                                            */
+  /*                                                                       */
+  /* The Chinese font MingTiEG-Medium (CNS 11643 character set) needs 256. */
+  /*                                                                       */
+#define T1_MAX_CHARSTRINGS_OPERANDS  256
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* Define this configuration macro if you want to prevent the            */
+  /* compilation of `t1afm', which is in charge of reading Type 1 AFM      */
+  /* files into an existing face.  Note that if set, the T1 driver will be */
+  /* unable to produce kerning distances.                                  */
+  /*                                                                       */
+#undef T1_CONFIG_OPTION_NO_AFM
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* Define this configuration macro if you want to prevent the            */
+  /* compilation of the Multiple Masters font support in the Type 1        */
+  /* driver.                                                               */
+  /*                                                                       */
+#undef T1_CONFIG_OPTION_NO_MM_SUPPORT
+
+
+  /*************************************************************************/
+  /*************************************************************************/
+  /****                                                                 ****/
+  /****    A U T O F I T   M O D U L E    C O N F I G U R A T I O N     ****/
+  /****                                                                 ****/
+  /*************************************************************************/
+  /*************************************************************************/
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* Compile autofit module with CJK script support.                       */
+  /*                                                                       */
+#define AF_CONFIG_OPTION_CJK
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* Compile autofit module with Indic script support.                     */
+  /*                                                                       */
+#define AF_CONFIG_OPTION_INDIC
+
+  /* */
+
+
+  /*
+   * Define this variable if you want to keep the layout of internal
+   * structures that was used prior to FreeType 2.2.  This also compiles in
+   * a few obsolete functions to avoid linking problems on typical Unix
+   * distributions.
+   *
+   * For embedded systems or building a new distribution from scratch, it
+   * is recommended to disable the macro since it reduces the library's code
+   * size and activates a few memory-saving optimizations as well.
+   */
+/* #define FT_CONFIG_OPTION_OLD_INTERNALS */
+
+
+  /*
+   * This variable is defined if either unpatented or native TrueType
+   * hinting is requested by the definitions above.
+   */
+#ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
+#define  TT_USE_BYTECODE_INTERPRETER
+#elif defined TT_CONFIG_OPTION_UNPATENTED_HINTING
+#define  TT_USE_BYTECODE_INTERPRETER
+#endif
+
+FT_END_HEADER
+
+
+#endif /* __FTOPTION_H__ */
+
+
+/* END */
diff --git a/include/freetype2/freetype/config/ftstdlib.h b/include/freetype2/freetype/config/ftstdlib.h
new file mode 100644 (file)
index 0000000..f923f3e
--- /dev/null
@@ -0,0 +1,180 @@
+/***************************************************************************/
+/*                                                                         */
+/*  ftstdlib.h                                                             */
+/*                                                                         */
+/*    ANSI-specific library and header configuration file (specification   */
+/*    only).                                                               */
+/*                                                                         */
+/*  Copyright 2002, 2003, 2004, 2005, 2006, 2007 by                        */
+/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
+/*                                                                         */
+/*  This file is part of the FreeType project, and may only be used,       */
+/*  modified, and distributed under the terms of the FreeType project      */
+/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
+/*  this file you indicate that you have read the license and              */
+/*  understand and accept it fully.                                        */
+/*                                                                         */
+/***************************************************************************/
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* This file is used to group all #includes to the ANSI C library that   */
+  /* FreeType normally requires.  It also defines macros to rename the     */
+  /* standard functions within the FreeType source code.                   */
+  /*                                                                       */
+  /* Load a file which defines __FTSTDLIB_H__ before this one to override  */
+  /* it.                                                                   */
+  /*                                                                       */
+  /*************************************************************************/
+
+
+#ifndef __FTSTDLIB_H__
+#define __FTSTDLIB_H__
+
+
+#include <stddef.h>
+
+#define ft_ptrdiff_t  ptrdiff_t
+
+
+  /**********************************************************************/
+  /*                                                                    */
+  /*                           integer limits                           */
+  /*                                                                    */
+  /* UINT_MAX and ULONG_MAX are used to automatically compute the size  */
+  /* of `int' and `long' in bytes at compile-time.  So far, this works  */
+  /* for all platforms the library has been tested on.                  */
+  /*                                                                    */
+  /* Note that on the extremely rare platforms that do not provide      */
+  /* integer types that are _exactly_ 16 and 32 bits wide (e.g. some    */
+  /* old Crays where `int' is 36 bits), we do not make any guarantee    */
+  /* about the correct behaviour of FT2 with all fonts.                 */
+  /*                                                                    */
+  /* In these case, `ftconfig.h' will refuse to compile anyway with a   */
+  /* message like `couldn't find 32-bit type' or something similar.     */
+  /*                                                                    */
+  /* IMPORTANT NOTE: We do not define aliases for heap management and   */
+  /*                 i/o routines (i.e. malloc/free/fopen/fread/...)    */
+  /*                 since these functions should all be encapsulated   */
+  /*                 by platform-specific implementations of            */
+  /*                 `ftsystem.c'.                                      */
+  /*                                                                    */
+  /**********************************************************************/
+
+
+#include <limits.h>
+
+#define FT_CHAR_BIT   CHAR_BIT
+#define FT_INT_MAX    INT_MAX
+#define FT_UINT_MAX   UINT_MAX
+#define FT_ULONG_MAX  ULONG_MAX
+
+
+  /**********************************************************************/
+  /*                                                                    */
+  /*                 character and string processing                    */
+  /*                                                                    */
+  /**********************************************************************/
+
+
+#include <string.h>
+
+#define ft_memchr   memchr
+#define ft_memcmp   memcmp
+#define ft_memcpy   memcpy
+#define ft_memmove  memmove
+#define ft_memset   memset
+#define ft_strcat   strcat
+#define ft_strcmp   strcmp
+#define ft_strcpy   strcpy
+#define ft_strlen   strlen
+#define ft_strncmp  strncmp
+#define ft_strncpy  strncpy
+#define ft_strrchr  strrchr
+#define ft_strstr   strstr
+
+
+  /**********************************************************************/
+  /*                                                                    */
+  /*                           file handling                            */
+  /*                                                                    */
+  /**********************************************************************/
+
+
+#include <stdio.h>
+
+#define FT_FILE     FILE
+#define ft_fclose   fclose
+#define ft_fopen    fopen
+#define ft_fread    fread
+#define ft_fseek    fseek
+#define ft_ftell    ftell
+#define ft_sprintf  sprintf
+
+
+  /**********************************************************************/
+  /*                                                                    */
+  /*                             sorting                                */
+  /*                                                                    */
+  /**********************************************************************/
+
+
+#include <stdlib.h>
+
+#define ft_qsort  qsort
+
+#define ft_exit   exit    /* only used to exit from unhandled exceptions */
+
+
+  /**********************************************************************/
+  /*                                                                    */
+  /*                        memory allocation                           */
+  /*                                                                    */
+  /**********************************************************************/
+
+
+#define ft_scalloc   calloc
+#define ft_sfree     free
+#define ft_smalloc   malloc
+#define ft_srealloc  realloc
+
+
+  /**********************************************************************/
+  /*                                                                    */
+  /*                          miscellaneous                             */
+  /*                                                                    */
+  /**********************************************************************/
+
+
+#define ft_atol   atol
+#define ft_labs   labs
+
+
+  /**********************************************************************/
+  /*                                                                    */
+  /*                         execution control                          */
+  /*                                                                    */
+  /**********************************************************************/
+
+
+#include <setjmp.h>
+
+#define ft_jmp_buf     jmp_buf  /* note: this cannot be a typedef since */
+                                /*       jmp_buf is defined as a macro  */
+                                /*       on certain platforms           */
+
+#define ft_longjmp     longjmp
+#define ft_setjmp( b ) setjmp( *(jmp_buf*) &(b) )    /* same thing here */
+
+
+  /* the following is only used for debugging purposes, i.e., if */
+  /* FT_DEBUG_LEVEL_ERROR or FT_DEBUG_LEVEL_TRACE are defined    */
+
+#include <stdarg.h>
+
+
+#endif /* __FTSTDLIB_H__ */
+
+
+/* END */
diff --git a/include/freetype2/freetype/freetype.h b/include/freetype2/freetype/freetype.h
new file mode 100644 (file)
index 0000000..dbca087
--- /dev/null
@@ -0,0 +1,3434 @@
+/***************************************************************************/
+/*                                                                         */
+/*  freetype.h                                                             */
+/*                                                                         */
+/*    FreeType high-level API and common types (specification only).       */
+/*                                                                         */
+/*  Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007 by             */
+/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
+/*                                                                         */
+/*  This file is part of the FreeType project, and may only be used,       */
+/*  modified, and distributed under the terms of the FreeType project      */
+/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
+/*  this file you indicate that you have read the license and              */
+/*  understand and accept it fully.                                        */
+/*                                                                         */
+/***************************************************************************/
+
+
+#ifndef FT_FREETYPE_H
+#error "`ft2build.h' hasn't been included yet!"
+#error "Please always use macros to include FreeType header files."
+#error "Example:"
+#error "  #include <ft2build.h>"
+#error "  #include FT_FREETYPE_H"
+#endif
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* The `raster' component duplicates some of the declarations in         */
+  /* freetype.h for stand-alone use if _FREETYPE_ isn't defined.           */
+  /*                                                                       */
+  /*************************************************************************/
+
+
+#ifndef __FREETYPE_H__
+#define __FREETYPE_H__
+
+
+#include <ft2build.h>
+#include FT_CONFIG_CONFIG_H
+#include FT_ERRORS_H
+#include FT_TYPES_H
+
+
+FT_BEGIN_HEADER
+
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Section>                                                             */
+  /*    user_allocation                                                    */
+  /*                                                                       */
+  /* <Title>                                                               */
+  /*    User allocation                                                    */
+  /*                                                                       */
+  /* <Abstract>                                                            */
+  /*    How client applications should allocate FreeType data structures.  */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    FreeType assumes that structures allocated by the user and passed  */
+  /*    as arguments are zeroed out except for the actual data.  With      */
+  /*    other words, it is recommended to use `calloc' (or variants of it) */
+  /*    instead of `malloc' for allocation.                                */
+  /*                                                                       */
+  /*************************************************************************/
+
+
+
+  /*************************************************************************/
+  /*************************************************************************/
+  /*                                                                       */
+  /*                        B A S I C   T Y P E S                          */
+  /*                                                                       */
+  /*************************************************************************/
+  /*************************************************************************/
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Section>                                                             */
+  /*    base_interface                                                     */
+  /*                                                                       */
+  /* <Title>                                                               */
+  /*    Base Interface                                                     */
+  /*                                                                       */
+  /* <Abstract>                                                            */
+  /*    The FreeType 2 base font interface.                                */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    This section describes the public high-level API of FreeType 2.    */
+  /*                                                                       */
+  /* <Order>                                                               */
+  /*    FT_Library                                                         */
+  /*    FT_Face                                                            */
+  /*    FT_Size                                                            */
+  /*    FT_GlyphSlot                                                       */
+  /*    FT_CharMap                                                         */
+  /*    FT_Encoding                                                        */
+  /*                                                                       */
+  /*    FT_FaceRec                                                         */
+  /*                                                                       */
+  /*    FT_FACE_FLAG_SCALABLE                                              */
+  /*    FT_FACE_FLAG_FIXED_SIZES                                           */
+  /*    FT_FACE_FLAG_FIXED_WIDTH                                           */
+  /*    FT_FACE_FLAG_HORIZONTAL                                            */
+  /*    FT_FACE_FLAG_VERTICAL                                              */
+  /*    FT_FACE_FLAG_SFNT                                                  */
+  /*    FT_FACE_FLAG_KERNING                                               */
+  /*    FT_FACE_FLAG_MULTIPLE_MASTERS                                      */
+  /*    FT_FACE_FLAG_GLYPH_NAMES                                           */
+  /*    FT_FACE_FLAG_EXTERNAL_STREAM                                       */
+  /*    FT_FACE_FLAG_FAST_GLYPHS                                           */
+  /*    FT_FACE_FLAG_HINTER                                                */
+  /*                                                                       */
+  /*    FT_STYLE_FLAG_BOLD                                                 */
+  /*    FT_STYLE_FLAG_ITALIC                                               */
+  /*                                                                       */
+  /*    FT_SizeRec                                                         */
+  /*    FT_Size_Metrics                                                    */
+  /*                                                                       */
+  /*    FT_GlyphSlotRec                                                    */
+  /*    FT_Glyph_Metrics                                                   */
+  /*    FT_SubGlyph                                                        */
+  /*                                                                       */
+  /*    FT_Bitmap_Size                                                     */
+  /*                                                                       */
+  /*    FT_Init_FreeType                                                   */
+  /*    FT_Done_FreeType                                                   */
+  /*                                                                       */
+  /*    FT_New_Face                                                        */
+  /*    FT_Done_Face                                                       */
+  /*    FT_New_Memory_Face                                                 */
+  /*    FT_Open_Face                                                       */
+  /*    FT_Open_Args                                                       */
+  /*    FT_Parameter                                                       */
+  /*    FT_Attach_File                                                     */
+  /*    FT_Attach_Stream                                                   */
+  /*                                                                       */
+  /*    FT_Set_Char_Size                                                   */
+  /*    FT_Set_Pixel_Sizes                                                 */
+  /*    FT_Request_Size                                                    */
+  /*    FT_Select_Size                                                     */
+  /*    FT_Size_Request_Type                                               */
+  /*    FT_Size_Request                                                    */
+  /*    FT_Set_Transform                                                   */
+  /*    FT_Load_Glyph                                                      */
+  /*    FT_Get_Char_Index                                                  */
+  /*    FT_Get_Name_Index                                                  */
+  /*    FT_Load_Char                                                       */
+  /*                                                                       */
+  /*    FT_OPEN_MEMORY                                                     */
+  /*    FT_OPEN_STREAM                                                     */
+  /*    FT_OPEN_PATHNAME                                                   */
+  /*    FT_OPEN_DRIVER                                                     */
+  /*    FT_OPEN_PARAMS                                                     */
+  /*                                                                       */
+  /*    FT_LOAD_DEFAULT                                                    */
+  /*    FT_LOAD_RENDER                                                     */
+  /*    FT_LOAD_MONOCHROME                                                 */
+  /*    FT_LOAD_LINEAR_DESIGN                                              */
+  /*    FT_LOAD_NO_SCALE                                                   */
+  /*    FT_LOAD_NO_HINTING                                                 */
+  /*    FT_LOAD_NO_BITMAP                                                  */
+  /*    FT_LOAD_CROP_BITMAP                                                */
+  /*                                                                       */
+  /*    FT_LOAD_VERTICAL_LAYOUT                                            */
+  /*    FT_LOAD_IGNORE_TRANSFORM                                           */
+  /*    FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH                                */
+  /*    FT_LOAD_FORCE_AUTOHINT                                             */
+  /*    FT_LOAD_NO_RECURSE                                                 */
+  /*    FT_LOAD_PEDANTIC                                                   */
+  /*                                                                       */
+  /*    FT_LOAD_TARGET_NORMAL                                              */
+  /*    FT_LOAD_TARGET_LIGHT                                               */
+  /*    FT_LOAD_TARGET_MONO                                                */
+  /*    FT_LOAD_TARGET_LCD                                                 */
+  /*    FT_LOAD_TARGET_LCD_V                                               */
+  /*                                                                       */
+  /*    FT_Render_Glyph                                                    */
+  /*    FT_Render_Mode                                                     */
+  /*    FT_Get_Kerning                                                     */
+  /*    FT_Kerning_Mode                                                    */
+  /*    FT_Get_Track_Kerning                                               */
+  /*    FT_Get_Glyph_Name                                                  */
+  /*    FT_Get_Postscript_Name                                             */
+  /*                                                                       */
+  /*    FT_CharMapRec                                                      */
+  /*    FT_Select_Charmap                                                  */
+  /*    FT_Set_Charmap                                                     */
+  /*    FT_Get_Charmap_Index                                               */
+  /*                                                                       */
+  /*************************************************************************/
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Struct>                                                              */
+  /*    FT_Glyph_Metrics                                                   */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A structure used to model the metrics of a single glyph.  The      */
+  /*    values are expressed in 26.6 fractional pixel format; if the flag  */
+  /*    @FT_LOAD_NO_SCALE has been used while loading the glyph, values    */
+  /*    are expressed in font units instead.                               */
+  /*                                                                       */
+  /* <Fields>                                                              */
+  /*    width ::                                                           */
+  /*      The glyph's width.                                               */
+  /*                                                                       */
+  /*    height ::                                                          */
+  /*      The glyph's height.                                              */
+  /*                                                                       */
+  /*    horiBearingX ::                                                    */
+  /*      Left side bearing for horizontal layout.                         */
+  /*                                                                       */
+  /*    horiBearingY ::                                                    */
+  /*      Top side bearing for horizontal layout.                          */
+  /*                                                                       */
+  /*    horiAdvance ::                                                     */
+  /*      Advance width for horizontal layout.                             */
+  /*                                                                       */
+  /*    vertBearingX ::                                                    */
+  /*      Left side bearing for vertical layout.                           */
+  /*                                                                       */
+  /*    vertBearingY ::                                                    */
+  /*      Top side bearing for vertical layout.                            */
+  /*                                                                       */
+  /*    vertAdvance ::                                                     */
+  /*      Advance height for vertical layout.                              */
+  /*                                                                       */
+  typedef struct  FT_Glyph_Metrics_
+  {
+    FT_Pos  width;
+    FT_Pos  height;
+
+    FT_Pos  horiBearingX;
+    FT_Pos  horiBearingY;
+    FT_Pos  horiAdvance;
+
+    FT_Pos  vertBearingX;
+    FT_Pos  vertBearingY;
+    FT_Pos  vertAdvance;
+
+  } FT_Glyph_Metrics;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Struct>                                                              */
+  /*    FT_Bitmap_Size                                                     */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    This structure models the metrics of a bitmap strike (i.e., a set  */
+  /*    of glyphs for a given point size and resolution) in a bitmap font. */
+  /*    It is used for the `available_sizes' field of @FT_Face.            */
+  /*                                                                       */
+  /* <Fields>                                                              */
+  /*    height :: The vertical distance, in pixels, between two            */
+  /*              consecutive baselines.  It is always positive.           */
+  /*                                                                       */
+  /*    width  :: The average width, in pixels, of all glyphs in the       */
+  /*              strike.                                                  */
+  /*                                                                       */
+  /*    size   :: The nominal size of the strike in 26.6 fractional        */
+  /*              points.  This field is not very useful.                  */
+  /*                                                                       */
+  /*    x_ppem :: The horizontal ppem (nominal width) in 26.6 fractional   */
+  /*              pixels.                                                  */
+  /*                                                                       */
+  /*    y_ppem :: The vertical ppem (nominal height) in 26.6 fractional    */
+  /*              pixels.                                                  */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    Windows FNT:                                                       */
+  /*      The nominal size given in a FNT font is not reliable.  Thus when */
+  /*      the driver finds it incorrect, it sets `size' to some calculated */
+  /*      values and sets `x_ppem' and `y_ppem' to the pixel width and     */
+  /*      height given in the font, respectively.                          */
+  /*                                                                       */
+  /*    TrueType embedded bitmaps:                                         */
+  /*      `size', `width', and `height' values are not contained in the    */
+  /*      bitmap strike itself.  They are computed from the global font    */
+  /*      parameters.                                                      */
+  /*                                                                       */
+  typedef struct  FT_Bitmap_Size_
+  {
+    FT_Short  height;
+    FT_Short  width;
+
+    FT_Pos    size;
+
+    FT_Pos    x_ppem;
+    FT_Pos    y_ppem;
+
+  } FT_Bitmap_Size;
+
+
+  /*************************************************************************/
+  /*************************************************************************/
+  /*                                                                       */
+  /*                     O B J E C T   C L A S S E S                       */
+  /*                                                                       */
+  /*************************************************************************/
+  /*************************************************************************/
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Type>                                                                */
+  /*    FT_Library                                                         */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A handle to a FreeType library instance.  Each `library' is        */
+  /*    completely independent from the others; it is the `root' of a set  */
+  /*    of objects like fonts, faces, sizes, etc.                          */
+  /*                                                                       */
+  /*    It also embeds a memory manager (see @FT_Memory), as well as a     */
+  /*    scan-line converter object (see @FT_Raster).                       */
+  /*                                                                       */
+  /*    For multi-threading applications each thread should have its own   */
+  /*    FT_Library object.                                                 */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    Library objects are normally created by @FT_Init_FreeType, and     */
+  /*    destroyed with @FT_Done_FreeType.                                  */
+  /*                                                                       */
+  typedef struct FT_LibraryRec_  *FT_Library;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Type>                                                                */
+  /*    FT_Module                                                          */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A handle to a given FreeType module object.  Each module can be a  */
+  /*    font driver, a renderer, or anything else that provides services   */
+  /*    to the formers.                                                    */
+  /*                                                                       */
+  typedef struct FT_ModuleRec_*  FT_Module;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Type>                                                                */
+  /*    FT_Driver                                                          */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A handle to a given FreeType font driver object.  Each font driver */
+  /*    is a special module capable of creating faces from font files.     */
+  /*                                                                       */
+  typedef struct FT_DriverRec_*  FT_Driver;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Type>                                                                */
+  /*    FT_Renderer                                                        */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A handle to a given FreeType renderer.  A renderer is a special    */
+  /*    module in charge of converting a glyph image to a bitmap, when     */
+  /*    necessary.  Each renderer supports a given glyph image format, and */
+  /*    one or more target surface depths.                                 */
+  /*                                                                       */
+  typedef struct FT_RendererRec_*  FT_Renderer;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Type>                                                                */
+  /*    FT_Face                                                            */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A handle to a given typographic face object.  A face object models */
+  /*    a given typeface, in a given style.                                */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    Each face object also owns a single @FT_GlyphSlot object, as well  */
+  /*    as one or more @FT_Size objects.                                   */
+  /*                                                                       */
+  /*    Use @FT_New_Face or @FT_Open_Face to create a new face object from */
+  /*    a given filepathname or a custom input stream.                     */
+  /*                                                                       */
+  /*    Use @FT_Done_Face to destroy it (along with its slot and sizes).   */
+  /*                                                                       */
+  /* <Also>                                                                */
+  /*    The @FT_FaceRec details the publicly accessible fields of a given  */
+  /*    face object.                                                       */
+  /*                                                                       */
+  typedef struct FT_FaceRec_*  FT_Face;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Type>                                                                */
+  /*    FT_Size                                                            */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A handle to an object used to model a face scaled to a given       */
+  /*    character size.                                                    */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    Each @FT_Face has an _active_ @FT_Size object that is used by      */
+  /*    functions like @FT_Load_Glyph to determine the scaling             */
+  /*    transformation which is used to load and hint glyphs and metrics.  */
+  /*                                                                       */
+  /*    You can use @FT_Set_Char_Size, @FT_Set_Pixel_Sizes,                */
+  /*    @FT_Request_Size or even @FT_Select_Size to change the content     */
+  /*    (i.e., the scaling values) of the active @FT_Size.                 */
+  /*                                                                       */
+  /*    You can use @FT_New_Size to create additional size objects for a   */
+  /*    given @FT_Face, but they won't be used by other functions until    */
+  /*    you activate it through @FT_Activate_Size.  Only one size can be   */
+  /*    activated at any given time per face.                              */
+  /*                                                                       */
+  /* <Also>                                                                */
+  /*    The @FT_SizeRec structure details the publicly accessible fields   */
+  /*    of a given size object.                                            */
+  /*                                                                       */
+  typedef struct FT_SizeRec_*  FT_Size;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Type>                                                                */
+  /*    FT_GlyphSlot                                                       */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A handle to a given `glyph slot'.  A slot is a container where it  */
+  /*    is possible to load any one of the glyphs contained in its parent  */
+  /*    face.                                                              */
+  /*                                                                       */
+  /*    In other words, each time you call @FT_Load_Glyph or               */
+  /*    @FT_Load_Char, the slot's content is erased by the new glyph data, */
+  /*    i.e., the glyph's metrics, its image (bitmap or outline), and      */
+  /*    other control information.                                         */
+  /*                                                                       */
+  /* <Also>                                                                */
+  /*    @FT_GlyphSlotRec details the publicly accessible glyph fields.     */
+  /*                                                                       */
+  typedef struct FT_GlyphSlotRec_*  FT_GlyphSlot;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Type>                                                                */
+  /*    FT_CharMap                                                         */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A handle to a given character map.  A charmap is used to translate */
+  /*    character codes in a given encoding into glyph indexes for its     */
+  /*    parent's face.  Some font formats may provide several charmaps per */
+  /*    font.                                                              */
+  /*                                                                       */
+  /*    Each face object owns zero or more charmaps, but only one of them  */
+  /*    can be `active' and used by @FT_Get_Char_Index or @FT_Load_Char.   */
+  /*                                                                       */
+  /*    The list of available charmaps in a face is available through the  */
+  /*    `face->num_charmaps' and `face->charmaps' fields of @FT_FaceRec.   */
+  /*                                                                       */
+  /*    The currently active charmap is available as `face->charmap'.      */
+  /*    You should call @FT_Set_Charmap to change it.                      */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    When a new face is created (either through @FT_New_Face or         */
+  /*    @FT_Open_Face), the library looks for a Unicode charmap within     */
+  /*    the list and automatically activates it.                           */
+  /*                                                                       */
+  /* <Also>                                                                */
+  /*    The @FT_CharMapRec details the publicly accessible fields of a     */
+  /*    given character map.                                               */
+  /*                                                                       */
+  typedef struct FT_CharMapRec_*  FT_CharMap;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Macro>                                                               */
+  /*    FT_ENC_TAG                                                         */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    This macro converts four-letter tags into an unsigned long.  It is */
+  /*    used to define `encoding' identifiers (see @FT_Encoding).          */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    Since many 16bit compilers don't like 32bit enumerations, you      */
+  /*    should redefine this macro in case of problems to something like   */
+  /*    this:                                                              */
+  /*                                                                       */
+  /*    {                                                                  */
+  /*      #define FT_ENC_TAG( value, a, b, c, d )  value                   */
+  /*    }                                                                  */
+  /*                                                                       */
+  /*    to get a simple enumeration without assigning special numbers.     */
+  /*                                                                       */
+
+#ifndef FT_ENC_TAG
+#define FT_ENC_TAG( value, a, b, c, d )         \
+          value = ( ( (FT_UInt32)(a) << 24 ) |  \
+                    ( (FT_UInt32)(b) << 16 ) |  \
+                    ( (FT_UInt32)(c) <<  8 ) |  \
+                      (FT_UInt32)(d)         )
+
+#endif /* FT_ENC_TAG */
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Enum>                                                                */
+  /*    FT_Encoding                                                        */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    An enumeration used to specify character sets supported by         */
+  /*    charmaps.  Used in the @FT_Select_Charmap API function.            */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    Despite the name, this enumeration lists specific character        */
+  /*    repertories (i.e., charsets), and not text encoding methods (e.g., */
+  /*    UTF-8, UTF-16, GB2312_EUC, etc.).                                  */
+  /*                                                                       */
+  /*    Because of 32-bit charcodes defined in Unicode (i.e., surrogates), */
+  /*    all character codes must be expressed as FT_Longs.                 */
+  /*                                                                       */
+  /*    Other encodings might be defined in the future.                    */
+  /*                                                                       */
+  /* <Values>                                                              */
+  /*   FT_ENCODING_NONE ::                                                 */
+  /*     The encoding value 0 is reserved.                                 */
+  /*                                                                       */
+  /*   FT_ENCODING_UNICODE ::                                              */
+  /*     Corresponds to the Unicode character set.  This value covers      */
+  /*     all versions of the Unicode repertoire, including ASCII and       */
+  /*     Latin-1.  Most fonts include a Unicode charmap, but not all       */
+  /*     of them.                                                          */
+  /*                                                                       */
+  /*   FT_ENCODING_MS_SYMBOL ::                                            */
+  /*     Corresponds to the Microsoft Symbol encoding, used to encode      */
+  /*     mathematical symbols in the 32..255 character code range.  For    */
+  /*     more information, see `http://www.ceviz.net/symbol.htm'.          */
+  /*                                                                       */
+  /*   FT_ENCODING_SJIS ::                                                 */
+  /*     Corresponds to Japanese SJIS encoding.  More info at              */
+  /*     at `http://langsupport.japanreference.com/encoding.shtml'.        */
+  /*     See note on multi-byte encodings below.                           */
+  /*                                                                       */
+  /*   FT_ENCODING_GB2312 ::                                               */
+  /*     Corresponds to an encoding system for Simplified Chinese as used  */
+  /*     used in mainland China.                                           */
+  /*                                                                       */
+  /*   FT_ENCODING_BIG5 ::                                                 */
+  /*     Corresponds to an encoding system for Traditional Chinese as used */
+  /*     in Taiwan and Hong Kong.                                          */
+  /*                                                                       */
+  /*   FT_ENCODING_WANSUNG ::                                              */
+  /*     Corresponds to the Korean encoding system known as Wansung.       */
+  /*     For more information see                                          */
+  /*     `http://www.microsoft.com/typography/unicode/949.txt'.            */
+  /*                                                                       */
+  /*   FT_ENCODING_JOHAB ::                                                */
+  /*     The Korean standard character set (KS C-5601-1992), which         */
+  /*     corresponds to MS Windows code page 1361.  This character set     */
+  /*     includes all possible Hangeul character combinations.             */
+  /*                                                                       */
+  /*   FT_ENCODING_ADOBE_LATIN_1 ::                                        */
+  /*     Corresponds to a Latin-1 encoding as defined in a Type 1          */
+  /*     Postscript font.  It is limited to 256 character codes.           */
+  /*                                                                       */
+  /*   FT_ENCODING_ADOBE_STANDARD ::                                       */
+  /*     Corresponds to the Adobe Standard encoding, as found in Type 1,   */
+  /*     CFF, and OpenType/CFF fonts.  It is limited to 256 character      */
+  /*     codes.                                                            */
+  /*                                                                       */
+  /*   FT_ENCODING_ADOBE_EXPERT ::                                         */
+  /*     Corresponds to the Adobe Expert encoding, as found in Type 1,     */
+  /*     CFF, and OpenType/CFF fonts.  It is limited to 256 character      */
+  /*     codes.                                                            */
+  /*                                                                       */
+  /*   FT_ENCODING_ADOBE_CUSTOM ::                                         */
+  /*     Corresponds to a custom encoding, as found in Type 1, CFF, and    */
+  /*     OpenType/CFF fonts.  It is limited to 256 character codes.        */
+  /*                                                                       */
+  /*   FT_ENCODING_APPLE_ROMAN ::                                          */
+  /*     Corresponds to the 8-bit Apple roman encoding.  Many TrueType and */
+  /*     OpenType fonts contain a charmap for this encoding, since older   */
+  /*     versions of Mac OS are able to use it.                            */
+  /*                                                                       */
+  /*   FT_ENCODING_OLD_LATIN_2 ::                                          */
+  /*     This value is deprecated and was never used nor reported by       */
+  /*     FreeType.  Don't use or test for it.                              */
+  /*                                                                       */
+  /*   FT_ENCODING_MS_SJIS ::                                              */
+  /*     Same as FT_ENCODING_SJIS.  Deprecated.                            */
+  /*                                                                       */
+  /*   FT_ENCODING_MS_GB2312 ::                                            */
+  /*     Same as FT_ENCODING_GB2312.  Deprecated.                          */
+  /*                                                                       */
+  /*   FT_ENCODING_MS_BIG5 ::                                              */
+  /*     Same as FT_ENCODING_BIG5.  Deprecated.                            */
+  /*                                                                       */
+  /*   FT_ENCODING_MS_WANSUNG ::                                           */
+  /*     Same as FT_ENCODING_WANSUNG.  Deprecated.                         */
+  /*                                                                       */
+  /*   FT_ENCODING_MS_JOHAB ::                                             */
+  /*     Same as FT_ENCODING_JOHAB.  Deprecated.                           */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*   By default, FreeType automatically synthetizes a Unicode charmap    */
+  /*   for Postscript fonts, using their glyph names dictionaries.         */
+  /*   However, it also reports the encodings defined explicitly in the    */
+  /*   font file, for the cases when they are needed, with the Adobe       */
+  /*   values as well.                                                     */
+  /*                                                                       */
+  /*   FT_ENCODING_NONE is set by the BDF and PCF drivers if the charmap   */
+  /*   is neither Unicode nor ISO-8859-1 (otherwise it is set to           */
+  /*   FT_ENCODING_UNICODE).  Use @FT_Get_BDF_Charset_ID to find out which */
+  /*   encoding is really present.  If, for example, the `cs_registry'     */
+  /*   field is `KOI8' and the `cs_encoding' field is `R', the font is     */
+  /*   encoded in KOI8-R.                                                  */
+  /*                                                                       */
+  /*   FT_ENCODING_NONE is always set (with a single exception) by the     */
+  /*   winfonts driver.  Use @FT_Get_WinFNT_Header and examine the         */
+  /*   `charset' field of the @FT_WinFNT_HeaderRec structure to find out   */
+  /*   which encoding is really present.  For example,                     */
+  /*   @FT_WinFNT_ID_CP1251 (204) means Windows code page 1251 (for        */
+  /*   Russian).                                                           */
+  /*                                                                       */
+  /*   FT_ENCODING_NONE is set if `platform_id' is @TT_PLATFORM_MACINTOSH  */
+  /*   and `encoding_id' is not @TT_MAC_ID_ROMAN (otherwise it is set to   */
+  /*   FT_ENCODING_APPLE_ROMAN).                                           */
+  /*                                                                       */
+  /*   If `platform_id' is @TT_PLATFORM_MACINTOSH, use the function  c     */
+  /*   @FT_Get_CMap_Language_ID  to query the Mac language ID which may be */
+  /*   needed to be able to distinguish Apple encoding variants.  See      */
+  /*                                                                       */
+  /*     http://www.unicode.org/Public/MAPPINGS/VENDORS/APPLE/README.TXT   */
+  /*                                                                       */
+  /*   to get an idea how to do that.  Basically, if the language ID is 0, */
+  /*   don't use it, otherwise subtract 1 from the language ID.  Then      */
+  /*   examine `encoding_id'.  If, for example, `encoding_id' is           */
+  /*   @TT_MAC_ID_ROMAN and the language ID (minus 1) is                   */
+  /*   `TT_MAC_LANGID_GREEK', it is the Greek encoding, not Roman.         */
+  /*   @TT_MAC_ID_ARABIC with `TT_MAC_LANGID_FARSI' means the Farsi        */
+  /*   variant the Arabic encoding.                                        */
+  /*                                                                       */
+  typedef enum  FT_Encoding_
+  {
+    FT_ENC_TAG( FT_ENCODING_NONE, 0, 0, 0, 0 ),
+
+    FT_ENC_TAG( FT_ENCODING_MS_SYMBOL, 's', 'y', 'm', 'b' ),
+    FT_ENC_TAG( FT_ENCODING_UNICODE,   'u', 'n', 'i', 'c' ),
+
+    FT_ENC_TAG( FT_ENCODING_SJIS,    's', 'j', 'i', 's' ),
+    FT_ENC_TAG( FT_ENCODING_GB2312,  'g', 'b', ' ', ' ' ),
+    FT_ENC_TAG( FT_ENCODING_BIG5,    'b', 'i', 'g', '5' ),
+    FT_ENC_TAG( FT_ENCODING_WANSUNG, 'w', 'a', 'n', 's' ),
+    FT_ENC_TAG( FT_ENCODING_JOHAB,   'j', 'o', 'h', 'a' ),
+
+    /* for backwards compatibility */
+    FT_ENCODING_MS_SJIS    = FT_ENCODING_SJIS,
+    FT_ENCODING_MS_GB2312  = FT_ENCODING_GB2312,
+    FT_ENCODING_MS_BIG5    = FT_ENCODING_BIG5,
+    FT_ENCODING_MS_WANSUNG = FT_ENCODING_WANSUNG,
+    FT_ENCODING_MS_JOHAB   = FT_ENCODING_JOHAB,
+
+    FT_ENC_TAG( FT_ENCODING_ADOBE_STANDARD, 'A', 'D', 'O', 'B' ),
+    FT_ENC_TAG( FT_ENCODING_ADOBE_EXPERT,   'A', 'D', 'B', 'E' ),
+    FT_ENC_TAG( FT_ENCODING_ADOBE_CUSTOM,   'A', 'D', 'B', 'C' ),
+    FT_ENC_TAG( FT_ENCODING_ADOBE_LATIN_1,  'l', 'a', 't', '1' ),
+
+    FT_ENC_TAG( FT_ENCODING_OLD_LATIN_2, 'l', 'a', 't', '2' ),
+
+    FT_ENC_TAG( FT_ENCODING_APPLE_ROMAN, 'a', 'r', 'm', 'n' )
+
+  } FT_Encoding;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Enum>                                                                */
+  /*    ft_encoding_xxx                                                    */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    These constants are deprecated; use the corresponding @FT_Encoding */
+  /*    values instead.                                                    */
+  /*                                                                       */
+#define ft_encoding_none            FT_ENCODING_NONE
+#define ft_encoding_unicode         FT_ENCODING_UNICODE
+#define ft_encoding_symbol          FT_ENCODING_MS_SYMBOL
+#define ft_encoding_latin_1         FT_ENCODING_ADOBE_LATIN_1
+#define ft_encoding_latin_2         FT_ENCODING_OLD_LATIN_2
+#define ft_encoding_sjis            FT_ENCODING_SJIS
+#define ft_encoding_gb2312          FT_ENCODING_GB2312
+#define ft_encoding_big5            FT_ENCODING_BIG5
+#define ft_encoding_wansung         FT_ENCODING_WANSUNG
+#define ft_encoding_johab           FT_ENCODING_JOHAB
+
+#define ft_encoding_adobe_standard  FT_ENCODING_ADOBE_STANDARD
+#define ft_encoding_adobe_expert    FT_ENCODING_ADOBE_EXPERT
+#define ft_encoding_adobe_custom    FT_ENCODING_ADOBE_CUSTOM
+#define ft_encoding_apple_roman     FT_ENCODING_APPLE_ROMAN
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Struct>                                                              */
+  /*    FT_CharMapRec                                                      */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    The base charmap structure.                                        */
+  /*                                                                       */
+  /* <Fields>                                                              */
+  /*    face        :: A handle to the parent face object.                 */
+  /*                                                                       */
+  /*    encoding    :: An @FT_Encoding tag identifying the charmap.  Use   */
+  /*                   this with @FT_Select_Charmap.                       */
+  /*                                                                       */
+  /*    platform_id :: An ID number describing the platform for the        */
+  /*                   following encoding ID.  This comes directly from    */
+  /*                   the TrueType specification and should be emulated   */
+  /*                   for other formats.                                  */
+  /*                                                                       */
+  /*    encoding_id :: A platform specific encoding number.  This also     */
+  /*                   comes from the TrueType specification and should be */
+  /*                   emulated similarly.                                 */
+  /*                                                                       */
+  typedef struct  FT_CharMapRec_
+  {
+    FT_Face      face;
+    FT_Encoding  encoding;
+    FT_UShort    platform_id;
+    FT_UShort    encoding_id;
+
+  } FT_CharMapRec;
+
+
+  /*************************************************************************/
+  /*************************************************************************/
+  /*                                                                       */
+  /*                 B A S E   O B J E C T   C L A S S E S                 */
+  /*                                                                       */
+  /*************************************************************************/
+  /*************************************************************************/
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Type>                                                                */
+  /*    FT_Face_Internal                                                   */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    An opaque handle to an `FT_Face_InternalRec' structure, used to    */
+  /*    model private data of a given @FT_Face object.                     */
+  /*                                                                       */
+  /*    This structure might change between releases of FreeType 2 and is  */
+  /*    not generally available to client applications.                    */
+  /*                                                                       */
+  typedef struct FT_Face_InternalRec_*  FT_Face_Internal;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Struct>                                                              */
+  /*    FT_FaceRec                                                         */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    FreeType root face class structure.  A face object models a        */
+  /*    typeface in a font file.                                           */
+  /*                                                                       */
+  /* <Fields>                                                              */
+  /*    num_faces           :: The number of faces in the font file.  Some */
+  /*                           font formats can have multiple faces in     */
+  /*                           a font file.                                */
+  /*                                                                       */
+  /*    face_index          :: The index of the face in the font file.  It */
+  /*                           is set to 0 if there is only one face in    */
+  /*                           the font file.                              */
+  /*                                                                       */
+  /*    face_flags          :: A set of bit flags that give important      */
+  /*                           information about the face; see             */
+  /*                           @FT_FACE_FLAG_XXX for the details.          */
+  /*                                                                       */
+  /*    style_flags         :: A set of bit flags indicating the style of  */
+  /*                           the face; see @FT_STYLE_FLAG_XXX for the    */
+  /*                           details.                                    */
+  /*                                                                       */
+  /*    num_glyphs          :: The number of glyphs in the face.  If the   */
+  /*                           face is scalable and has sbits (see         */
+  /*                           `num_fixed_sizes'), it is set to the number */
+  /*                           of outline glyphs.                          */
+  /*                                                                       */
+  /*    family_name         :: The face's family name.  This is an ASCII   */
+  /*                           string, usually in English, which describes */
+  /*                           the typeface's family (like `Times New      */
+  /*                           Roman', `Bodoni', `Garamond', etc).  This   */
+  /*                           is a least common denominator used to list  */
+  /*                           fonts.  Some formats (TrueType & OpenType)  */
+  /*                           provide localized and Unicode versions of   */
+  /*                           this string.  Applications should use the   */
+  /*                           format specific interface to access them.   */
+  /*                                                                       */
+  /*    style_name          :: The face's style name.  This is an ASCII    */
+  /*                           string, usually in English, which describes */
+  /*                           the typeface's style (like `Italic',        */
+  /*                           `Bold', `Condensed', etc).  Not all font    */
+  /*                           formats provide a style name, so this field */
+  /*                           is optional, and can be set to NULL.  As    */
+  /*                           for `family_name', some formats provide     */
+  /*                           localized and Unicode versions of this      */
+  /*                           string.  Applications should use the format */
+  /*                           specific interface to access them.          */
+  /*                                                                       */
+  /*    num_fixed_sizes     :: The number of bitmap strikes in the face.   */
+  /*                           Even if the face is scalable, there might   */
+  /*                           still be bitmap strikes, which are called   */
+  /*                           `sbits' in that case.                       */
+  /*                                                                       */
+  /*    available_sizes     :: An array of @FT_Bitmap_Size for all bitmap  */
+  /*                           strikes in the face.  It is set to NULL if  */
+  /*                           there is no bitmap strike.                  */
+  /*                                                                       */
+  /*    num_charmaps        :: The number of charmaps in the face.         */
+  /*                                                                       */
+  /*    charmaps            :: An array of the charmaps of the face.       */
+  /*                                                                       */
+  /*    generic             :: A field reserved for client uses.  See the  */
+  /*                           @FT_Generic type description.               */
+  /*                                                                       */
+  /*    bbox                :: The font bounding box.  Coordinates are     */
+  /*                           expressed in font units (see                */
+  /*                           `units_per_EM').  The box is large enough   */
+  /*                           to contain any glyph from the font.  Thus,  */
+  /*                           `bbox.yMax' can be seen as the `maximal     */
+  /*                           ascender', and `bbox.yMin' as the `minimal  */
+  /*                           descender'.  Only relevant for scalable     */
+  /*                           formats.                                    */
+  /*                                                                       */
+  /*    units_per_EM        :: The number of font units per EM square for  */
+  /*                           this face.  This is typically 2048 for      */
+  /*                           TrueType fonts, and 1000 for Type 1 fonts.  */
+  /*                           Only relevant for scalable formats.         */
+  /*                                                                       */
+  /*    ascender            :: The typographic ascender of the face,       */
+  /*                           expressed in font units.  For font formats  */
+  /*                           not having this information, it is set to   */
+  /*                           `bbox.yMax'.  Only relevant for scalable    */
+  /*                           formats.                                    */
+  /*                                                                       */
+  /*    descender           :: The typographic descender of the face,      */
+  /*                           expressed in font units.  For font formats  */
+  /*                           not having this information, it is set to   */
+  /*                           `bbox.yMin'.  Note that this field is       */
+  /*                           usually negative.  Only relevant for        */
+  /*                           scalable formats.                           */
+  /*                                                                       */
+  /*    height              :: The height is the vertical distance         */
+  /*                           between two consecutive baselines,          */
+  /*                           expressed in font units.  It is always      */
+  /*                           positive.  Only relevant for scalable       */
+  /*                           formats.                                    */
+  /*                                                                       */
+  /*    max_advance_width   :: The maximal advance width, in font units,   */
+  /*                           for all glyphs in this face.  This can be   */
+  /*                           used to make word wrapping computations     */
+  /*                           faster.  Only relevant for scalable         */
+  /*                           formats.                                    */
+  /*                                                                       */
+  /*    max_advance_height  :: The maximal advance height, in font units,  */
+  /*                           for all glyphs in this face.  This is only  */
+  /*                           relevant for vertical layouts, and is set   */
+  /*                           to `height' for fonts that do not provide   */
+  /*                           vertical metrics.  Only relevant for        */
+  /*                           scalable formats.                           */
+  /*                                                                       */
+  /*    underline_position  :: The position, in font units, of the         */
+  /*                           underline line for this face.  It's the     */
+  /*                           center of the underlining stem.  Only       */
+  /*                           relevant for scalable formats.              */
+  /*                                                                       */
+  /*    underline_thickness :: The thickness, in font units, of the        */
+  /*                           underline for this face.  Only relevant for */
+  /*                           scalable formats.                           */
+  /*                                                                       */
+  /*    glyph               :: The face's associated glyph slot(s).        */
+  /*                                                                       */
+  /*    size                :: The current active size for this face.      */
+  /*                                                                       */
+  /*    charmap             :: The current active charmap for this face.   */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*   Fields may be changed after a call to @FT_Attach_File or            */
+  /*   @FT_Attach_Stream.                                                  */
+  /*                                                                       */
+  typedef struct  FT_FaceRec_
+  {
+    FT_Long           num_faces;
+    FT_Long           face_index;
+
+    FT_Long           face_flags;
+    FT_Long           style_flags;
+
+    FT_Long           num_glyphs;
+
+    FT_String*        family_name;
+    FT_String*        style_name;
+
+    FT_Int            num_fixed_sizes;
+    FT_Bitmap_Size*   available_sizes;
+
+    FT_Int            num_charmaps;
+    FT_CharMap*       charmaps;
+
+    FT_Generic        generic;
+
+    /*# The following member variables (down to `underline_thickness') */
+    /*# are only relevant to scalable outlines; cf. @FT_Bitmap_Size    */
+    /*# for bitmap fonts.                                              */
+    FT_BBox           bbox;
+
+    FT_UShort         units_per_EM;
+    FT_Short          ascender;
+    FT_Short          descender;
+    FT_Short          height;
+
+    FT_Short          max_advance_width;
+    FT_Short          max_advance_height;
+
+    FT_Short          underline_position;
+    FT_Short          underline_thickness;
+
+    FT_GlyphSlot      glyph;
+    FT_Size           size;
+    FT_CharMap        charmap;
+
+    /*@private begin */
+
+    FT_Driver         driver;
+    FT_Memory         memory;
+    FT_Stream         stream;
+
+    FT_ListRec        sizes_list;
+
+    FT_Generic        autohint;
+    void*             extensions;
+
+    FT_Face_Internal  internal;
+
+    /*@private end */
+
+  } FT_FaceRec;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Enum>                                                                */
+  /*    FT_FACE_FLAG_XXX                                                   */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A list of bit flags used in the `face_flags' field of the          */
+  /*    @FT_FaceRec structure.  They inform client applications of         */
+  /*    properties of the corresponding face.                              */
+  /*                                                                       */
+  /* <Values>                                                              */
+  /*    FT_FACE_FLAG_SCALABLE ::                                           */
+  /*      Indicates that the face contains outline glyphs.  This doesn't   */
+  /*      prevent bitmap strikes, i.e., a face can have both this and      */
+  /*      and @FT_FACE_FLAG_FIXED_SIZES set.                               */
+  /*                                                                       */
+  /*    FT_FACE_FLAG_FIXED_SIZES ::                                        */
+  /*      Indicates that the face contains bitmap strikes.  See also the   */
+  /*      `num_fixed_sizes' and `available_sizes' fields of @FT_FaceRec.   */
+  /*                                                                       */
+  /*    FT_FACE_FLAG_FIXED_WIDTH ::                                        */
+  /*      Indicates that the face contains fixed-width characters (like    */
+  /*      Courier, Lucido, MonoType, etc.).                                */
+  /*                                                                       */
+  /*    FT_FACE_FLAG_SFNT ::                                               */
+  /*      Indicates that the face uses the `sfnt' storage scheme.  For     */
+  /*      now, this means TrueType and OpenType.                           */
+  /*                                                                       */
+  /*    FT_FACE_FLAG_HORIZONTAL ::                                         */
+  /*      Indicates that the face contains horizontal glyph metrics.  This */
+  /*      should be set for all common formats.                            */
+  /*                                                                       */
+  /*    FT_FACE_FLAG_VERTICAL ::                                           */
+  /*      Indicates that the face contains vertical glyph metrics.  This   */
+  /*      is only available in some formats, not all of them.              */
+  /*                                                                       */
+  /*    FT_FACE_FLAG_KERNING ::                                            */
+  /*      Indicates that the face contains kerning information.  If set,   */
+  /*      the kerning distance can be retrieved through the function       */
+  /*      @FT_Get_Kerning.  Otherwise the function always return the       */
+  /*      vector (0,0).  Note that FreeType doesn't handle kerning data    */
+  /*      from the `GPOS' table (as present in some OpenType fonts).       */
+  /*                                                                       */
+  /*    FT_FACE_FLAG_FAST_GLYPHS ::                                        */
+  /*      THIS FLAG IS DEPRECATED.  DO NOT USE OR TEST IT.                 */
+  /*                                                                       */
+  /*    FT_FACE_FLAG_MULTIPLE_MASTERS ::                                   */
+  /*      Indicates that the font contains multiple masters and is capable */
+  /*      of interpolating between them.  See the multiple-masters         */
+  /*      specific API for details.                                        */
+  /*                                                                       */
+  /*    FT_FACE_FLAG_GLYPH_NAMES ::                                        */
+  /*      Indicates that the font contains glyph names that can be         */
+  /*      retrieved through @FT_Get_Glyph_Name.  Note that some TrueType   */
+  /*      fonts contain broken glyph name tables.  Use the function        */
+  /*      @FT_Has_PS_Glyph_Names when needed.                              */
+  /*                                                                       */
+  /*    FT_FACE_FLAG_EXTERNAL_STREAM ::                                    */
+  /*      Used internally by FreeType to indicate that a face's stream was */
+  /*      provided by the client application and should not be destroyed   */
+  /*      when @FT_Done_Face is called.  Don't read or test this flag.     */
+  /*                                                                       */
+  /*    FT_FACE_FLAG_HINTER ::                                             */
+  /*      Set if the font driver has a hinting machine of its own.  For    */
+  /*      example, with TrueType fonts, it makes sense to use data from    */
+  /*      the SFNT `gasp' table only if the native TrueType hinting engine */
+  /*      (with the bytecode interpreter) is available and active.         */
+  /*                                                                       */
+#define FT_FACE_FLAG_SCALABLE          ( 1L <<  0 )
+#define FT_FACE_FLAG_FIXED_SIZES       ( 1L <<  1 )
+#define FT_FACE_FLAG_FIXED_WIDTH       ( 1L <<  2 )
+#define FT_FACE_FLAG_SFNT              ( 1L <<  3 )
+#define FT_FACE_FLAG_HORIZONTAL        ( 1L <<  4 )
+#define FT_FACE_FLAG_VERTICAL          ( 1L <<  5 )
+#define FT_FACE_FLAG_KERNING           ( 1L <<  6 )
+#define FT_FACE_FLAG_FAST_GLYPHS       ( 1L <<  7 )
+#define FT_FACE_FLAG_MULTIPLE_MASTERS  ( 1L <<  8 )
+#define FT_FACE_FLAG_GLYPH_NAMES       ( 1L <<  9 )
+#define FT_FACE_FLAG_EXTERNAL_STREAM   ( 1L << 10 )
+#define FT_FACE_FLAG_HINTER            ( 1L << 11 )
+
+  /* */
+
+
+  /*************************************************************************
+   *
+   * @macro:
+   *   FT_HAS_HORIZONTAL( face )
+   *
+   * @description:
+   *   A macro that returns true whenever a face object contains
+   *   horizontal metrics (this is true for all font formats though).
+   *
+   * @also:
+   *   @FT_HAS_VERTICAL can be used to check for vertical metrics.
+   *
+   */
+#define FT_HAS_HORIZONTAL( face ) \
+          ( face->face_flags & FT_FACE_FLAG_HORIZONTAL )
+
+
+  /*************************************************************************
+   *
+   * @macro:
+   *   FT_HAS_VERTICAL( face )
+   *
+   * @description:
+   *   A macro that returns true whenever a face object contains vertical
+   *   metrics.
+   *
+   */
+#define FT_HAS_VERTICAL( face ) \
+          ( face->face_flags & FT_FACE_FLAG_VERTICAL )
+
+
+  /*************************************************************************
+   *
+   * @macro:
+   *   FT_HAS_KERNING( face )
+   *
+   * @description:
+   *   A macro that returns true whenever a face object contains kerning
+   *   data that can be accessed with @FT_Get_Kerning.
+   *
+   */
+#define FT_HAS_KERNING( face ) \
+          ( face->face_flags & FT_FACE_FLAG_KERNING )
+
+
+  /*************************************************************************
+   *
+   * @macro:
+   *   FT_IS_SCALABLE( face )
+   *
+   * @description:
+   *   A macro that returns true whenever a face object contains a scalable
+   *   font face (true for TrueType, Type 1, Type 42, CID, OpenType/CFF,
+   *   and PFR font formats.
+   *
+   */
+#define FT_IS_SCALABLE( face ) \
+          ( face->face_flags & FT_FACE_FLAG_SCALABLE )
+
+
+  /*************************************************************************
+   *
+   * @macro:
+   *   FT_IS_SFNT( face )
+   *
+   * @description:
+   *   A macro that returns true whenever a face object contains a font
+   *   whose format is based on the SFNT storage scheme.  This usually
+   *   means: TrueType fonts, OpenType fonts, as well as SFNT-based embedded
+   *   bitmap fonts.
+   *
+   *   If this macro is true, all functions defined in @FT_SFNT_NAMES_H and
+   *   @FT_TRUETYPE_TABLES_H are available.
+   *
+   */
+#define FT_IS_SFNT( face ) \
+          ( face->face_flags & FT_FACE_FLAG_SFNT )
+
+
+  /*************************************************************************
+   *
+   * @macro:
+   *   FT_IS_FIXED_WIDTH( face )
+   *
+   * @description:
+   *   A macro that returns true whenever a face object contains a font face
+   *   that contains fixed-width (or `monospace', `fixed-pitch', etc.)
+   *   glyphs.
+   *
+   */
+#define FT_IS_FIXED_WIDTH( face ) \
+          ( face->face_flags & FT_FACE_FLAG_FIXED_WIDTH )
+
+
+  /*************************************************************************
+   *
+   * @macro:
+   *   FT_HAS_FIXED_SIZES( face )
+   *
+   * @description:
+   *   A macro that returns true whenever a face object contains some
+   *   embedded bitmaps.  See the `available_sizes' field of the
+   *   @FT_FaceRec structure.
+   *
+   */
+#define FT_HAS_FIXED_SIZES( face ) \
+          ( face->face_flags & FT_FACE_FLAG_FIXED_SIZES )
+
+  /* */
+
+
+  /*************************************************************************
+   *
+   * @macro:
+   *   FT_HAS_FAST_GLYPHS( face )
+   *
+   * @description:
+   *   Deprecated.
+   *
+   */
+#define FT_HAS_FAST_GLYPHS( face )  0
+
+
+  /*************************************************************************
+   *
+   * @macro:
+   *   FT_HAS_GLYPH_NAMES( face )
+   *
+   * @description:
+   *   A macro that returns true whenever a face object contains some glyph
+   *   names that can be accessed through @FT_Get_Glyph_Name.
+   *
+   */
+#define FT_HAS_GLYPH_NAMES( face ) \
+          ( face->face_flags & FT_FACE_FLAG_GLYPH_NAMES )
+
+
+  /*************************************************************************
+   *
+   * @macro:
+   *   FT_HAS_MULTIPLE_MASTERS( face )
+   *
+   * @description:
+   *   A macro that returns true whenever a face object contains some
+   *   multiple masters.  The functions provided by @FT_MULTIPLE_MASTERS_H
+   *   are then available to choose the exact design you want.
+   *
+   */
+#define FT_HAS_MULTIPLE_MASTERS( face ) \
+          ( face->face_flags & FT_FACE_FLAG_MULTIPLE_MASTERS )
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Constant>                                                            */
+  /*    FT_STYLE_FLAG_XXX                                                  */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A list of bit-flags used to indicate the style of a given face.    */
+  /*    These are used in the `style_flags' field of @FT_FaceRec.          */
+  /*                                                                       */
+  /* <Values>                                                              */
+  /*    FT_STYLE_FLAG_ITALIC ::                                            */
+  /*      Indicates that a given face is italicized.                       */
+  /*                                                                       */
+  /*    FT_STYLE_FLAG_BOLD ::                                              */
+  /*      Indicates that a given face is bold.                             */
+  /*                                                                       */
+#define FT_STYLE_FLAG_ITALIC  ( 1 << 0 )
+#define FT_STYLE_FLAG_BOLD    ( 1 << 1 )
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Type>                                                                */
+  /*    FT_Size_Internal                                                   */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    An opaque handle to an `FT_Size_InternalRec' structure, used to    */
+  /*    model private data of a given FT_Size object.                      */
+  /*                                                                       */
+  typedef struct FT_Size_InternalRec_*  FT_Size_Internal;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Struct>                                                              */
+  /*    FT_Size_Metrics                                                    */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    The size metrics structure gives the metrics of a size object.     */
+  /*                                                                       */
+  /* <Fields>                                                              */
+  /*    x_ppem       :: The width of the scaled EM square in pixels, hence */
+  /*                    the term `ppem' (pixels per EM).  It is also       */
+  /*                    referred to as `nominal width'.                    */
+  /*                                                                       */
+  /*    y_ppem       :: The height of the scaled EM square in pixels,      */
+  /*                    hence the term `ppem' (pixels per EM).  It is also */
+  /*                    referred to as `nominal height'.                   */
+  /*                                                                       */
+  /*    x_scale      :: A 16.16 fractional scaling value used to convert   */
+  /*                    horizontal metrics from font units to 26.6         */
+  /*                    fractional pixels.  Only relevant for scalable     */
+  /*                    font formats.                                      */
+  /*                                                                       */
+  /*    y_scale      :: A 16.16 fractional scaling value used to convert   */
+  /*                    vertical metrics from font units to 26.6           */
+  /*                    fractional pixels.  Only relevant for scalable     */
+  /*                    font formats.                                      */
+  /*                                                                       */
+  /*    ascender     :: The ascender in 26.6 fractional pixels.  See       */
+  /*                    @FT_FaceRec for the details.                       */
+  /*                                                                       */
+  /*    descender    :: The descender in 26.6 fractional pixels.  See      */
+  /*                    @FT_FaceRec for the details.                       */
+  /*                                                                       */
+  /*    height       :: The height in 26.6 fractional pixels.  See         */
+  /*                    @FT_FaceRec for the details.                       */
+  /*                                                                       */
+  /*    max_advance  :: The maximal advance width in 26.6 fractional       */
+  /*                    pixels.  See @FT_FaceRec for the details.          */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    The scaling values, if relevant, are determined first during a     */
+  /*    size changing operation.  The remaining fields are then set by the */
+  /*    driver.  For scalable formats, they are usually set to scaled      */
+  /*    values of the corresponding fields in @FT_FaceRec.                 */
+  /*                                                                       */
+  /*    Note that due to glyph hinting, these values might not be exact    */
+  /*    for certain fonts.  Thus they must be treated as unreliable        */
+  /*    with an error margin of at least one pixel!                        */
+  /*                                                                       */
+  /*    Indeed, the only way to get the exact metrics is to render _all_   */
+  /*    glyphs.  As this would be a definite performance hit, it is up to  */
+  /*    client applications to perform such computations.                  */
+  /*                                                                       */
+  /*    The FT_Size_Metrics structure is valid for bitmap fonts also.      */
+  /*                                                                       */
+  typedef struct  FT_Size_Metrics_
+  {
+    FT_UShort  x_ppem;      /* horizontal pixels per EM               */
+    FT_UShort  y_ppem;      /* vertical pixels per EM                 */
+
+    FT_Fixed   x_scale;     /* scaling values used to convert font    */
+    FT_Fixed   y_scale;     /* units to 26.6 fractional pixels        */
+
+    FT_Pos     ascender;    /* ascender in 26.6 frac. pixels          */
+    FT_Pos     descender;   /* descender in 26.6 frac. pixels         */
+    FT_Pos     height;      /* text height in 26.6 frac. pixels       */
+    FT_Pos     max_advance; /* max horizontal advance, in 26.6 pixels */
+
+  } FT_Size_Metrics;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Struct>                                                              */
+  /*    FT_SizeRec                                                         */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    FreeType root size class structure.  A size object models a face   */
+  /*    object at a given size.                                            */
+  /*                                                                       */
+  /* <Fields>                                                              */
+  /*    face    :: Handle to the parent face object.                       */
+  /*                                                                       */
+  /*    generic :: A typeless pointer, which is unused by the FreeType     */
+  /*               library or any of its drivers.  It can be used by       */
+  /*               client applications to link their own data to each size */
+  /*               object.                                                 */
+  /*                                                                       */
+  /*    metrics :: Metrics for this size object.  This field is read-only. */
+  /*                                                                       */
+  typedef struct  FT_SizeRec_
+  {
+    FT_Face           face;      /* parent face object              */
+    FT_Generic        generic;   /* generic pointer for client uses */
+    FT_Size_Metrics   metrics;   /* size metrics                    */
+    FT_Size_Internal  internal;
+
+  } FT_SizeRec;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Struct>                                                              */
+  /*    FT_SubGlyph                                                        */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    The subglyph structure is an internal object used to describe      */
+  /*    subglyphs (for example, in the case of composites).                */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    The subglyph implementation is not part of the high-level API,     */
+  /*    hence the forward structure declaration.                           */
+  /*                                                                       */
+  /*    You can however retrieve subglyph information with                 */
+  /*    @FT_Get_SubGlyph_Info.                                             */
+  /*                                                                       */
+  typedef struct FT_SubGlyphRec_*  FT_SubGlyph;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Type>                                                                */
+  /*    FT_Slot_Internal                                                   */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    An opaque handle to an `FT_Slot_InternalRec' structure, used to    */
+  /*    model private data of a given FT_GlyphSlot object.                 */
+  /*                                                                       */
+  typedef struct FT_Slot_InternalRec_*  FT_Slot_Internal;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Struct>                                                              */
+  /*    FT_GlyphSlotRec                                                    */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    FreeType root glyph slot class structure.  A glyph slot is a       */
+  /*    container where individual glyphs can be loaded, be they in        */
+  /*    outline or bitmap format.                                          */
+  /*                                                                       */
+  /* <Fields>                                                              */
+  /*    library           :: A handle to the FreeType library instance     */
+  /*                         this slot belongs to.                         */
+  /*                                                                       */
+  /*    face              :: A handle to the parent face object.           */
+  /*                                                                       */
+  /*    next              :: In some cases (like some font tools), several */
+  /*                         glyph slots per face object can be a good     */
+  /*                         thing.  As this is rare, the glyph slots are  */
+  /*                         listed through a direct, single-linked list   */
+  /*                         using its `next' field.                       */
+  /*                                                                       */
+  /*    generic           :: A typeless pointer which is unused by the     */
+  /*                         FreeType library or any of its drivers.  It   */
+  /*                         can be used by client applications to link    */
+  /*                         their own data to each glyph slot object.     */
+  /*                                                                       */
+  /*    metrics           :: The metrics of the last loaded glyph in the   */
+  /*                         slot.  The returned values depend on the last */
+  /*                         load flags (see the @FT_Load_Glyph API        */
+  /*                         function) and can be expressed either in 26.6 */
+  /*                         fractional pixels or font units.              */
+  /*                                                                       */
+  /*                         Note that even when the glyph image is        */
+  /*                         transformed, the metrics are not.             */
+  /*                                                                       */
+  /*    linearHoriAdvance :: The advance width of the unhinted glyph.      */
+  /*                         Its value is expressed in 16.16 fractional    */
+  /*                         pixels, unless @FT_LOAD_LINEAR_DESIGN is set  */
+  /*                         when loading the glyph.  This field can be    */
+  /*                         important to perform correct WYSIWYG layout.  */
+  /*                         Only relevant for outline glyphs.             */
+  /*                                                                       */
+  /*    linearVertAdvance :: The advance height of the unhinted glyph.     */
+  /*                         Its value is expressed in 16.16 fractional    */
+  /*                         pixels, unless @FT_LOAD_LINEAR_DESIGN is set  */
+  /*                         when loading the glyph.  This field can be    */
+  /*                         important to perform correct WYSIWYG layout.  */
+  /*                         Only relevant for outline glyphs.             */
+  /*                                                                       */
+  /*    advance           :: This is the transformed advance width for the */
+  /*                         glyph.                                        */
+  /*                                                                       */
+  /*    format            :: This field indicates the format of the image  */
+  /*                         contained in the glyph slot.  Typically       */
+  /*                         @FT_GLYPH_FORMAT_BITMAP,                      */
+  /*                         @FT_GLYPH_FORMAT_OUTLINE, or                  */
+  /*                         @FT_GLYPH_FORMAT_COMPOSITE, but others are    */
+  /*                         possible.                                     */
+  /*                                                                       */
+  /*    bitmap            :: This field is used as a bitmap descriptor     */
+  /*                         when the slot format is                       */
+  /*                         @FT_GLYPH_FORMAT_BITMAP.  Note that the       */
+  /*                         address and content of the bitmap buffer can  */
+  /*                         change between calls of @FT_Load_Glyph and a  */
+  /*                         few other functions.                          */
+  /*                                                                       */
+  /*    bitmap_left       :: This is the bitmap's left bearing expressed   */
+  /*                         in integer pixels.  Of course, this is only   */
+  /*                         valid if the format is                        */
+  /*                         @FT_GLYPH_FORMAT_BITMAP.                      */
+  /*                                                                       */
+  /*    bitmap_top        :: This is the bitmap's top bearing expressed in */
+  /*                         integer pixels.  Remember that this is the    */
+  /*                         distance from the baseline to the top-most    */
+  /*                         glyph scanline, upwards y-coordinates being   */
+  /*                         *positive*.                                   */
+  /*                                                                       */
+  /*    outline           :: The outline descriptor for the current glyph  */
+  /*                         image if its format is                        */
+  /*                         @FT_GLYPH_FORMAT_OUTLINE.  Once a glyph is    */
+  /*                         loaded, `outline' can be transformed,         */
+  /*                         distorted, embolded, etc.  However, it must   */
+  /*                         not be freed.                                 */
+  /*                                                                       */
+  /*    num_subglyphs     :: The number of subglyphs in a composite glyph. */
+  /*                         This field is only valid for the composite    */
+  /*                         glyph format that should normally only be     */
+  /*                         loaded with the @FT_LOAD_NO_RECURSE flag.     */
+  /*                         For now this is internal to FreeType.         */
+  /*                                                                       */
+  /*    subglyphs         :: An array of subglyph descriptors for          */
+  /*                         composite glyphs.  There are `num_subglyphs'  */
+  /*                         elements in there.  Currently internal to     */
+  /*                         FreeType.                                     */
+  /*                                                                       */
+  /*    control_data      :: Certain font drivers can also return the      */
+  /*                         control data for a given glyph image (e.g.    */
+  /*                         TrueType bytecode, Type 1 charstrings, etc.). */
+  /*                         This field is a pointer to such data.         */
+  /*                                                                       */
+  /*    control_len       :: This is the length in bytes of the control    */
+  /*                         data.                                         */
+  /*                                                                       */
+  /*    other             :: Really wicked formats can use this pointer to */
+  /*                         present their own glyph image to client       */
+  /*                         applications.  Note that the application      */
+  /*                         needs to know about the image format.         */
+  /*                                                                       */
+  /*    lsb_delta         :: The difference between hinted and unhinted    */
+  /*                         left side bearing while autohinting is        */
+  /*                         active.  Zero otherwise.                      */
+  /*                                                                       */
+  /*    rsb_delta         :: The difference between hinted and unhinted    */
+  /*                         right side bearing while autohinting is       */
+  /*                         active.  Zero otherwise.                      */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    If @FT_Load_Glyph is called with default flags (see                */
+  /*    @FT_LOAD_DEFAULT) the glyph image is loaded in the glyph slot in   */
+  /*    its native format (e.g., an outline glyph for TrueType and Type 1  */
+  /*    formats).                                                          */
+  /*                                                                       */
+  /*    This image can later be converted into a bitmap by calling         */
+  /*    @FT_Render_Glyph.  This function finds the current renderer for    */
+  /*    the native image's format then invokes it.                         */
+  /*                                                                       */
+  /*    The renderer is in charge of transforming the native image through */
+  /*    the slot's face transformation fields, then convert it into a      */
+  /*    bitmap that is returned in `slot->bitmap'.                         */
+  /*                                                                       */
+  /*    Note that `slot->bitmap_left' and `slot->bitmap_top' are also used */
+  /*    to specify the position of the bitmap relative to the current pen  */
+  /*    position (e.g., coordinates (0,0) on the baseline).  Of course,    */
+  /*    `slot->format' is also changed to @FT_GLYPH_FORMAT_BITMAP.         */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    Here a small pseudo code fragment which shows how to use           */
+  /*    `lsb_delta' and `rsb_delta':                                       */
+  /*                                                                       */
+  /*    {                                                                  */
+  /*      FT_Pos  origin_x       = 0;                                      */
+  /*      FT_Pos  prev_rsb_delta = 0;                                      */
+  /*                                                                       */
+  /*                                                                       */
+  /*      for all glyphs do                                                */
+  /*        <compute kern between current and previous glyph and add it to */
+  /*         `origin_x'>                                                   */
+  /*                                                                       */
+  /*        <load glyph with `FT_Load_Glyph'>                              */
+  /*                                                                       */
+  /*        if ( prev_rsb_delta - face->glyph->lsb_delta >= 32 )           */
+  /*          origin_x -= 64;                                              */
+  /*        else if ( prev_rsb_delta - face->glyph->lsb_delta < -32 )      */
+  /*          origin_x += 64;                                              */
+  /*                                                                       */
+  /*        prev_rsb_delta = face->glyph->rsb_delta;                       */
+  /*                                                                       */
+  /*        <save glyph image, or render glyph, or ...>                    */
+  /*                                                                       */
+  /*        origin_x += face->glyph->advance.x;                            */
+  /*      endfor                                                           */
+  /*    }                                                                  */
+  /*                                                                       */
+  typedef struct  FT_GlyphSlotRec_
+  {
+    FT_Library        library;
+    FT_Face           face;
+    FT_GlyphSlot      next;
+    FT_UInt           reserved;       /* retained for binary compatibility */
+    FT_Generic        generic;
+
+    FT_Glyph_Metrics  metrics;
+    FT_Fixed          linearHoriAdvance;
+    FT_Fixed          linearVertAdvance;
+    FT_Vector         advance;
+
+    FT_Glyph_Format   format;
+
+    FT_Bitmap         bitmap;
+    FT_Int            bitmap_left;
+    FT_Int            bitmap_top;
+
+    FT_Outline        outline;
+
+    FT_UInt           num_subglyphs;
+    FT_SubGlyph       subglyphs;
+
+    void*             control_data;
+    long              control_len;
+
+    FT_Pos            lsb_delta;
+    FT_Pos            rsb_delta;
+
+    void*             other;
+
+    FT_Slot_Internal  internal;
+
+  } FT_GlyphSlotRec;
+
+
+  /*************************************************************************/
+  /*************************************************************************/
+  /*                                                                       */
+  /*                         F U N C T I O N S                             */
+  /*                                                                       */
+  /*************************************************************************/
+  /*************************************************************************/
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_Init_FreeType                                                   */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Initialize a new FreeType library object.  The set of modules      */
+  /*    that are registered by this function is determined at build time.  */
+  /*                                                                       */
+  /* <Output>                                                              */
+  /*    alibrary :: A handle to a new library object.                      */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  0 means success.                             */
+  /*                                                                       */
+  FT_EXPORT( FT_Error )
+  FT_Init_FreeType( FT_Library  *alibrary );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_Done_FreeType                                                   */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Destroy a given FreeType library object and all of its children,   */
+  /*    including resources, drivers, faces, sizes, etc.                   */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    library :: A handle to the target library object.                  */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  0 means success.                             */
+  /*                                                                       */
+  FT_EXPORT( FT_Error )
+  FT_Done_FreeType( FT_Library  library );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Enum>                                                                */
+  /*    FT_OPEN_XXX                                                        */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A list of bit-field constants used within the `flags' field of the */
+  /*    @FT_Open_Args structure.                                           */
+  /*                                                                       */
+  /* <Values>                                                              */
+  /*    FT_OPEN_MEMORY      :: This is a memory-based stream.              */
+  /*                                                                       */
+  /*    FT_OPEN_STREAM      :: Copy the stream from the `stream' field.    */
+  /*                                                                       */
+  /*    FT_OPEN_PATHNAME    :: Create a new input stream from a C          */
+  /*                           path name.                                  */
+  /*                                                                       */
+  /*    FT_OPEN_DRIVER      :: Use the `driver' field.                     */
+  /*                                                                       */
+  /*    FT_OPEN_PARAMS      :: Use the `num_params' and `params' fields.   */
+  /*                                                                       */
+  /*    ft_open_memory      :: Deprecated; use @FT_OPEN_MEMORY instead.    */
+  /*                                                                       */
+  /*    ft_open_stream      :: Deprecated; use @FT_OPEN_STREAM instead.    */
+  /*                                                                       */
+  /*    ft_open_pathname    :: Deprecated; use @FT_OPEN_PATHNAME instead.  */
+  /*                                                                       */
+  /*    ft_open_driver      :: Deprecated; use @FT_OPEN_DRIVER instead.    */
+  /*                                                                       */
+  /*    ft_open_params      :: Deprecated; use @FT_OPEN_PARAMS instead.    */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    The `FT_OPEN_MEMORY', `FT_OPEN_STREAM', and `FT_OPEN_PATHNAME'     */
+  /*    flags are mutually exclusive.                                      */
+  /*                                                                       */
+#define FT_OPEN_MEMORY    0x1
+#define FT_OPEN_STREAM    0x2
+#define FT_OPEN_PATHNAME  0x4
+#define FT_OPEN_DRIVER    0x8
+#define FT_OPEN_PARAMS    0x10
+
+#define ft_open_memory    FT_OPEN_MEMORY     /* deprecated */
+#define ft_open_stream    FT_OPEN_STREAM     /* deprecated */
+#define ft_open_pathname  FT_OPEN_PATHNAME   /* deprecated */
+#define ft_open_driver    FT_OPEN_DRIVER     /* deprecated */
+#define ft_open_params    FT_OPEN_PARAMS     /* deprecated */
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Struct>                                                              */
+  /*    FT_Parameter                                                       */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A simple structure used to pass more or less generic parameters    */
+  /*    to @FT_Open_Face.                                                  */
+  /*                                                                       */
+  /* <Fields>                                                              */
+  /*    tag  :: A four-byte identification tag.                            */
+  /*                                                                       */
+  /*    data :: A pointer to the parameter data.                           */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    The ID and function of parameters are driver-specific.             */
+  /*                                                                       */
+  typedef struct  FT_Parameter_
+  {
+    FT_ULong    tag;
+    FT_Pointer  data;
+
+  } FT_Parameter;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Struct>                                                              */
+  /*    FT_Open_Args                                                       */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A structure used to indicate how to open a new font file or        */
+  /*    stream.  A pointer to such a structure can be used as a parameter  */
+  /*    for the functions @FT_Open_Face and @FT_Attach_Stream.             */
+  /*                                                                       */
+  /* <Fields>                                                              */
+  /*    flags       :: A set of bit flags indicating how to use the        */
+  /*                   structure.                                          */
+  /*                                                                       */
+  /*    memory_base :: The first byte of the file in memory.               */
+  /*                                                                       */
+  /*    memory_size :: The size in bytes of the file in memory.            */
+  /*                                                                       */
+  /*    pathname    :: A pointer to an 8-bit file pathname.                */
+  /*                                                                       */
+  /*    stream      :: A handle to a source stream object.                 */
+  /*                                                                       */
+  /*    driver      :: This field is exclusively used by @FT_Open_Face;    */
+  /*                   it simply specifies the font driver to use to open  */
+  /*                   the face.  If set to 0, FreeType tries to load the  */
+  /*                   face with each one of the drivers in its list.      */
+  /*                                                                       */
+  /*    num_params  :: The number of extra parameters.                     */
+  /*                                                                       */
+  /*    params      :: Extra parameters passed to the font driver when     */
+  /*                   opening a new face.                                 */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    The stream type is determined by the contents of `flags' which     */
+  /*    are tested in the following order by @FT_Open_Face:                */
+  /*                                                                       */
+  /*    If the `FT_OPEN_MEMORY' bit is set, assume that this is a          */
+  /*    memory file of `memory_size' bytes, located at `memory_address'.   */
+  /*    The data are are not copied, and the client is responsible for     */
+  /*    releasing and destroying them _after_ the corresponding call to    */
+  /*    @FT_Done_Face.                                                     */
+  /*                                                                       */
+  /*    Otherwise, if the `FT_OPEN_STREAM' bit is set, assume that a       */
+  /*    custom input stream `stream' is used.                              */
+  /*                                                                       */
+  /*    Otherwise, if the `FT_OPEN_PATHNAME' bit is set, assume that this  */
+  /*    is a normal file and use `pathname' to open it.                    */
+  /*                                                                       */
+  /*    If the `FT_OPEN_DRIVER' bit is set, @FT_Open_Face only tries to    */
+  /*    open the file with the driver whose handler is in `driver'.        */
+  /*                                                                       */
+  /*    If the `FT_OPEN_PARAMS' bit is set, the parameters given by        */
+  /*    `num_params' and `params' is used.  They are ignored otherwise.    */
+  /*                                                                       */
+  /*    Ideally, both the `pathname' and `params' fields should be tagged  */
+  /*    as `const'; this is missing for API backwards compatibility.  With */
+  /*    other words, applications should treat them as read-only.          */
+  /*                                                                       */
+  typedef struct  FT_Open_Args_
+  {
+    FT_UInt         flags;
+    const FT_Byte*  memory_base;
+    FT_Long         memory_size;
+    FT_String*      pathname;
+    FT_Stream       stream;
+    FT_Module       driver;
+    FT_Int          num_params;
+    FT_Parameter*   params;
+
+  } FT_Open_Args;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_New_Face                                                        */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    This function calls @FT_Open_Face to open a font by its pathname.  */
+  /*                                                                       */
+  /* <InOut>                                                               */
+  /*    library    :: A handle to the library resource.                    */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    pathname   :: A path to the font file.                             */
+  /*                                                                       */
+  /*    face_index :: The index of the face within the font.  The first    */
+  /*                  face has index 0.                                    */
+  /*                                                                       */
+  /* <Output>                                                              */
+  /*    aface      :: A handle to a new face object.  If `face_index' is   */
+  /*                  greater than or equal to zero, it must be non-NULL.  */
+  /*                  See @FT_Open_Face for more details.                  */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  0 means success.                             */
+  /*                                                                       */
+  FT_EXPORT( FT_Error )
+  FT_New_Face( FT_Library   library,
+               const char*  filepathname,
+               FT_Long      face_index,
+               FT_Face     *aface );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_New_Memory_Face                                                 */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    This function calls @FT_Open_Face to open a font which has been    */
+  /*    loaded into memory.                                                */
+  /*                                                                       */
+  /* <InOut>                                                               */
+  /*    library    :: A handle to the library resource.                    */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    file_base  :: A pointer to the beginning of the font data.         */
+  /*                                                                       */
+  /*    file_size  :: The size of the memory chunk used by the font data.  */
+  /*                                                                       */
+  /*    face_index :: The index of the face within the font.  The first    */
+  /*                  face has index 0.                                    */
+  /*                                                                       */
+  /* <Output>                                                              */
+  /*    aface      :: A handle to a new face object.  If `face_index' is   */
+  /*                  greater than or equal to zero, it must be non-NULL.  */
+  /*                  See @FT_Open_Face for more details.                  */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  0 means success.                             */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    You must not deallocate the memory before calling @FT_Done_Face.   */
+  /*                                                                       */
+  FT_EXPORT( FT_Error )
+  FT_New_Memory_Face( FT_Library      library,
+                      const FT_Byte*  file_base,
+                      FT_Long         file_size,
+                      FT_Long         face_index,
+                      FT_Face        *aface );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_Open_Face                                                       */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Create a face object from a given resource described by            */
+  /*    @FT_Open_Args.                                                     */
+  /*                                                                       */
+  /* <InOut>                                                               */
+  /*    library    :: A handle to the library resource.                    */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    args       :: A pointer to an `FT_Open_Args' structure which must  */
+  /*                  be filled by the caller.                             */
+  /*                                                                       */
+  /*    face_index :: The index of the face within the font.  The first    */
+  /*                  face has index 0.                                    */
+  /*                                                                       */
+  /* <Output>                                                              */
+  /*    aface      :: A handle to a new face object.  If `face_index' is   */
+  /*                  greater than or equal to zero, it must be non-NULL.  */
+  /*                  See note below.                                      */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  0 means success.                             */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    Unlike FreeType 1.x, this function automatically creates a glyph   */
+  /*    slot for the face object which can be accessed directly through    */
+  /*    `face->glyph'.                                                     */
+  /*                                                                       */
+  /*    FT_Open_Face can be used to quickly check whether the font         */
+  /*    format of a given font resource is supported by FreeType.  If the  */
+  /*    `face_index' field is negative, the function's return value is 0   */
+  /*    if the font format is recognized, or non-zero otherwise;           */
+  /*    the function returns a more or less empty face handle in `*aface'  */
+  /*    (if `aface' isn't NULL).  The only useful field in this special    */
+  /*    case is `face->num_faces' which gives the number of faces within   */
+  /*    the font file.  After examination, the returned @FT_Face structure */
+  /*    should be deallocated with a call to @FT_Done_Face.                */
+  /*                                                                       */
+  /*    Each new face object created with this function also owns a        */
+  /*    default @FT_Size object, accessible as `face->size'.               */
+  /*                                                                       */
+  FT_EXPORT( FT_Error )
+  FT_Open_Face( FT_Library           library,
+                const FT_Open_Args*  args,
+                FT_Long              face_index,
+                FT_Face             *aface );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_Attach_File                                                     */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    This function calls @FT_Attach_Stream to attach a file.            */
+  /*                                                                       */
+  /* <InOut>                                                               */
+  /*    face         :: The target face object.                            */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    filepathname :: The pathname.                                      */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  0 means success.                             */
+  /*                                                                       */
+  FT_EXPORT( FT_Error )
+  FT_Attach_File( FT_Face      face,
+                  const char*  filepathname );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_Attach_Stream                                                   */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    `Attach' data to a face object.  Normally, this is used to read    */
+  /*    additional information for the face object.  For example, you can  */
+  /*    attach an AFM file that comes with a Type 1 font to get the        */
+  /*    kerning values and other metrics.                                  */
+  /*                                                                       */
+  /* <InOut>                                                               */
+  /*    face       :: The target face object.                              */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    parameters :: A pointer to @FT_Open_Args which must be filled by   */
+  /*                  the caller.                                          */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  0 means success.                             */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    The meaning of the `attach' (i.e., what really happens when the    */
+  /*    new file is read) is not fixed by FreeType itself.  It really      */
+  /*    depends on the font format (and thus the font driver).             */
+  /*                                                                       */
+  /*    Client applications are expected to know what they are doing       */
+  /*    when invoking this function.  Most drivers simply do not implement */
+  /*    file attachments.                                                  */
+  /*                                                                       */
+  FT_EXPORT( FT_Error )
+  FT_Attach_Stream( FT_Face        face,
+                    FT_Open_Args*  parameters );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_Done_Face                                                       */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Discard a given face object, as well as all of its child slots and */
+  /*    sizes.                                                             */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    face :: A handle to a target face object.                          */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  0 means success.                             */
+  /*                                                                       */
+  FT_EXPORT( FT_Error )
+  FT_Done_Face( FT_Face  face );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_Select_Size                                                     */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Select a bitmap strike.                                            */
+  /*                                                                       */
+  /* <InOut>                                                               */
+  /*    face         :: A handle to a target face object.                  */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    strike_index :: The index of the bitmap strike in the              */
+  /*                    `available_sizes' field of @FT_FaceRec structure.  */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  0 means success.                             */
+  /*                                                                       */
+  FT_EXPORT( FT_Error )
+  FT_Select_Size( FT_Face  face,
+                  FT_Int   strike_index );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Enum>                                                                */
+  /*    FT_Size_Request_Type                                               */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    An enumeration type that lists the supported size request types.   */
+  /*                                                                       */
+  /* <Values>                                                              */
+  /*    FT_SIZE_REQUEST_TYPE_NOMINAL ::                                    */
+  /*      The nominal size.  The `units_per_EM' field of @FT_FaceRec is    */
+  /*      used to determine both scaling values.                           */
+  /*                                                                       */
+  /*    FT_SIZE_REQUEST_TYPE_REAL_DIM ::                                   */
+  /*      The real dimension.  The sum of the the `Ascender' and (minus    */
+  /*      of) the `Descender' fields of @FT_FaceRec are used to determine  */
+  /*      both scaling values.                                             */
+  /*                                                                       */
+  /*    FT_SIZE_REQUEST_TYPE_BBOX ::                                       */
+  /*      The font bounding box.  The width and height of the `bbox' field */
+  /*      of @FT_FaceRec are used to determine the horizontal and vertical */
+  /*      scaling value, respectively.                                     */
+  /*                                                                       */
+  /*    FT_SIZE_REQUEST_TYPE_CELL ::                                       */
+  /*      The `max_advance_width' field of @FT_FaceRec is used to          */
+  /*      determine the horizontal scaling value; the vertical scaling     */
+  /*      value is determined the same way as                              */
+  /*      @FT_SIZE_REQUEST_TYPE_REAL_DIM does.  Finally, both scaling      */
+  /*      values are set to the smaller one.  This type is useful if you   */
+  /*      want to specify the font size for, say, a window of a given      */
+  /*      dimension and 80x24 cells.                                       */
+  /*                                                                       */
+  /*    FT_SIZE_REQUEST_TYPE_SCALES ::                                     */
+  /*      Specify the scaling values directly.                             */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    The above descriptions only apply to scalable formats.  For bitmap */
+  /*    formats, the behaviour is up to the driver.                        */
+  /*                                                                       */
+  /*    See the note section of @FT_Size_Metrics if you wonder how size    */
+  /*    requesting relates to scaling values.                              */
+  /*                                                                       */
+  typedef enum  FT_Size_Request_Type_
+  {
+    FT_SIZE_REQUEST_TYPE_NOMINAL,
+    FT_SIZE_REQUEST_TYPE_REAL_DIM,
+    FT_SIZE_REQUEST_TYPE_BBOX,
+    FT_SIZE_REQUEST_TYPE_CELL,
+    FT_SIZE_REQUEST_TYPE_SCALES,
+
+    FT_SIZE_REQUEST_TYPE_MAX
+
+  } FT_Size_Request_Type;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Struct>                                                              */
+  /*    FT_Size_RequestRec                                                 */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A structure used to model a size request.                          */
+  /*                                                                       */
+  /* <Fields>                                                              */
+  /*    type           :: See @FT_Size_Request_Type.                       */
+  /*                                                                       */
+  /*    width          :: The desired width.                               */
+  /*                                                                       */
+  /*    height         :: The desired height.                              */
+  /*                                                                       */
+  /*    horiResolution :: The horizontal resolution.  If set to zero,      */
+  /*                      `width' is treated as a 26.6 fractional pixel    */
+  /*                      value.                                           */
+  /*                                                                       */
+  /*    vertResolution :: The vertical resolution.  If set to zero,        */
+  /*                      `height' is treated as a 26.6 fractional pixel   */
+  /*                      value.                                           */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    If `width' is zero, then the horizontal scaling value is set      */
+  /*    equal to the vertical scaling value, and vice versa.               */
+  /*                                                                       */
+  typedef struct  FT_Size_RequestRec_
+  {
+    FT_Size_Request_Type  type;
+    FT_Long               width;
+    FT_Long               height;
+    FT_UInt               horiResolution;
+    FT_UInt               vertResolution;
+
+  } FT_Size_RequestRec, *FT_Size_Request;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_Request_Size                                                    */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Resize the scale of the active @FT_Size object in a face.          */
+  /*                                                                       */
+  /* <InOut>                                                               */
+  /*    face :: A handle to a target face object.                          */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    req  :: A pointer to a @FT_Size_RequestRec.                        */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  0 means success.                             */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    Although drivers may select the bitmap strike matching the         */
+  /*    request, you should not rely on this if you intend to select a     */
+  /*    particular bitmap strike.  Use @FT_Select_Size instead in that     */
+  /*    case.                                                              */
+  /*                                                                       */
+  FT_EXPORT( FT_Error )
+  FT_Request_Size( FT_Face          face,
+                   FT_Size_Request  req );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_Set_Char_Size                                                   */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    This function calls @FT_Request_Size to request the nominal size   */
+  /*    (in points).                                                       */
+  /*                                                                       */
+  /* <InOut>                                                               */
+  /*    face            :: A handle to a target face object.               */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    char_width      :: The nominal width, in 26.6 fractional points.   */
+  /*                                                                       */
+  /*    char_height     :: The nominal height, in 26.6 fractional points.  */
+  /*                                                                       */
+  /*    horz_resolution :: The horizontal resolution in dpi.               */
+  /*                                                                       */
+  /*    vert_resolution :: The vertical resolution in dpi.                 */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  0 means success.                             */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    If either the character width or height is zero, it is set equal   */
+  /*    to the other value.                                                */
+  /*                                                                       */
+  /*    If either the horizontal or vertical resolution is zero, it is set */
+  /*    equal to the other value.                                          */
+  /*                                                                       */
+  /*    A character width or height smaller than 1pt is set to 1pt; if     */
+  /*    both resolution values are zero, they are set to 72dpi.            */
+  /*                                                                       */
+
+  FT_EXPORT( FT_Error )
+  FT_Set_Char_Size( FT_Face     face,
+                    FT_F26Dot6  char_width,
+                    FT_F26Dot6  char_height,
+                    FT_UInt     horz_resolution,
+                    FT_UInt     vert_resolution );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_Set_Pixel_Sizes                                                 */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    This function calls @FT_Request_Size to request the nominal size   */
+  /*    (in pixels).                                                       */
+  /*                                                                       */
+  /* <InOut>                                                               */
+  /*    face         :: A handle to the target face object.                */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    pixel_width  :: The nominal width, in pixels.                      */
+  /*                                                                       */
+  /*    pixel_height :: The nominal height, in pixels.                     */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  0 means success.                             */
+  /*                                                                       */
+  FT_EXPORT( FT_Error )
+  FT_Set_Pixel_Sizes( FT_Face  face,
+                      FT_UInt  pixel_width,
+                      FT_UInt  pixel_height );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_Load_Glyph                                                      */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A function used to load a single glyph into the glyph slot of a    */
+  /*    face object.                                                       */
+  /*                                                                       */
+  /* <InOut>                                                               */
+  /*    face        :: A handle to the target face object where the glyph  */
+  /*                   is loaded.                                          */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    glyph_index :: The index of the glyph in the font file.  For       */
+  /*                   CID-keyed fonts (either in PS or in CFF format)     */
+  /*                   this argument specifies the CID value.              */
+  /*                                                                       */
+  /*    load_flags  :: A flag indicating what to load for this glyph.  The */
+  /*                   @FT_LOAD_XXX constants can be used to control the   */
+  /*                   glyph loading process (e.g., whether the outline    */
+  /*                   should be scaled, whether to load bitmaps or not,   */
+  /*                   whether to hint the outline, etc).                  */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  0 means success.                             */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    The loaded glyph may be transformed.  See @FT_Set_Transform for    */
+  /*    the details.                                                       */
+  /*                                                                       */
+  FT_EXPORT( FT_Error )
+  FT_Load_Glyph( FT_Face   face,
+                 FT_UInt   glyph_index,
+                 FT_Int32  load_flags );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_Load_Char                                                       */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A function used to load a single glyph into the glyph slot of a    */
+  /*    face object, according to its character code.                      */
+  /*                                                                       */
+  /* <InOut>                                                               */
+  /*    face        :: A handle to a target face object where the glyph    */
+  /*                   is loaded.                                          */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    char_code   :: The glyph's character code, according to the        */
+  /*                   current charmap used in the face.                   */
+  /*                                                                       */
+  /*    load_flags  :: A flag indicating what to load for this glyph.  The */
+  /*                   @FT_LOAD_XXX constants can be used to control the   */
+  /*                   glyph loading process (e.g., whether the outline    */
+  /*                   should be scaled, whether to load bitmaps or not,   */
+  /*                   whether to hint the outline, etc).                  */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  0 means success.                             */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    This function simply calls @FT_Get_Char_Index and @FT_Load_Glyph.  */
+  /*                                                                       */
+  FT_EXPORT( FT_Error )
+  FT_Load_Char( FT_Face   face,
+                FT_ULong  char_code,
+                FT_Int32  load_flags );
+
+
+  /*************************************************************************
+   *
+   * @enum:
+   *   FT_LOAD_XXX
+   *
+   * @description:
+   *   A list of bit-field constants used with @FT_Load_Glyph to indicate
+   *   what kind of operations to perform during glyph loading.
+   *
+   * @values:
+   *   FT_LOAD_DEFAULT ::
+   *     Corresponding to 0, this value is used as the default glyph load
+   *     operation.  In this case, the following happens:
+   *
+   *     1. FreeType looks for a bitmap for the glyph corresponding to the
+   *        face's current size.  If one is found, the function returns.
+   *        The bitmap data can be accessed from the glyph slot (see note
+   *        below).
+   *
+   *     2. If no embedded bitmap is searched or found, FreeType looks for a
+   *        scalable outline.  If one is found, it is loaded from the font
+   *        file, scaled to device pixels, then `hinted' to the pixel grid
+   *        in order to optimize it.  The outline data can be accessed from
+   *        the glyph slot (see note below).
+   *
+   *     Note that by default, the glyph loader doesn't render outlines into
+   *     bitmaps.  The following flags are used to modify this default
+   *     behaviour to more specific and useful cases.
+   *
+   *   FT_LOAD_NO_SCALE ::
+   *     Don't scale the outline glyph loaded, but keep it in font units.
+   *
+   *     This flag implies @FT_LOAD_NO_HINTING and @FT_LOAD_NO_BITMAP, and
+   *     unsets @FT_LOAD_RENDER.
+   *
+   *   FT_LOAD_NO_HINTING ::
+   *     Disable hinting.  This generally generates `blurrier' bitmap glyph
+   *     when the glyph is rendered in any of the anti-aliased modes.  See
+   *     also the note below.
+   *
+   *     This flag is implied by @FT_LOAD_NO_SCALE.
+   *
+   *   FT_LOAD_RENDER ::
+   *     Call @FT_Render_Glyph after the glyph is loaded.  By default, the
+   *     glyph is rendered in @FT_RENDER_MODE_NORMAL mode.  This can be
+   *     overridden by @FT_LOAD_TARGET_XXX or @FT_LOAD_MONOCHROME.
+   *
+   *     This flag is unset by @FT_LOAD_NO_SCALE.
+   *
+   *   FT_LOAD_NO_BITMAP ::
+   *     Ignore bitmap strikes when loading.  Bitmap-only fonts ignore this
+   *     flag.
+   *
+   *     @FT_LOAD_NO_SCALE always sets this flag.
+   *
+   *   FT_LOAD_VERTICAL_LAYOUT ::
+   *     Load the glyph for vertical text layout.  _Don't_ use it as it is
+   *     problematic currently.
+   *
+   *   FT_LOAD_FORCE_AUTOHINT ::
+   *     Indicates that the auto-hinter is preferred over the font's native
+   *     hinter.  See also the note below.
+   *
+   *   FT_LOAD_CROP_BITMAP ::
+   *     Indicates that the font driver should crop the loaded bitmap glyph
+   *     (i.e., remove all space around its black bits).  Not all drivers
+   *     implement this.
+   *
+   *   FT_LOAD_PEDANTIC ::
+   *     Indicates that the font driver should perform pedantic verifications
+   *     during glyph loading.  This is mostly used to detect broken glyphs
+   *     in fonts.  By default, FreeType tries to handle broken fonts also.
+   *
+   *   FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH ::
+   *     Indicates that the font driver should ignore the global advance
+   *     width defined in the font.  By default, that value is used as the
+   *     advance width for all glyphs when the face has
+   *     @FT_FACE_FLAG_FIXED_WIDTH set.
+   *
+   *     This flag exists for historical reasons (to support buggy CJK
+   *     fonts).
+   *
+   *   FT_LOAD_NO_RECURSE ::
+   *     This flag is only used internally.  It merely indicates that the
+   *     font driver should not load composite glyphs recursively.  Instead,
+   *     it should set the `num_subglyph' and `subglyphs' values of the
+   *     glyph slot accordingly, and set `glyph->format' to
+   *     @FT_GLYPH_FORMAT_COMPOSITE.
+   *
+   *     The description of sub-glyphs is not available to client
+   *     applications for now.
+   *
+   *     This flag implies @FT_LOAD_NO_SCALE and @FT_LOAD_IGNORE_TRANSFORM.
+   *
+   *   FT_LOAD_IGNORE_TRANSFORM ::
+   *     Indicates that the transform matrix set by @FT_Set_Transform should
+   *     be ignored.
+   *
+   *   FT_LOAD_MONOCHROME ::
+   *     This flag is used with @FT_LOAD_RENDER to indicate that you want to
+   *     render an outline glyph to a 1-bit monochrome bitmap glyph, with
+   *     8 pixels packed into each byte of the bitmap data.
+   *
+   *     Note that this has no effect on the hinting algorithm used.  You
+   *     should use @FT_LOAD_TARGET_MONO instead so that the
+   *     monochrome-optimized hinting algorithm is used.
+   *
+   *   FT_LOAD_LINEAR_DESIGN ::
+   *     Indicates that the `linearHoriAdvance' and `linearVertAdvance'
+   *     fields of @FT_GlyphSlotRec should be kept in font units.  See
+   *     @FT_GlyphSlotRec for details.
+   *
+   *   FT_LOAD_NO_AUTOHINT ::
+   *     Disable auto-hinter.  See also the note below.
+   *
+   * @note:
+   *   By default, hinting is enabled and the font's native hinter (see
+   *   @FT_FACE_FLAG_HINTER) is preferred over the auto-hinter.  You can
+   *   disable hinting by setting @FT_LOAD_NO_HINTING or change the
+   *   precedence by setting @FT_LOAD_FORCE_AUTOHINT.  You can also set
+   *   @FT_LOAD_NO_AUTOHINT in case you don't want the auto-hinter to be
+   *   used at all.
+   *
+   *   Besides deciding which hinter to use, you can also decide which
+   *   hinting algorithm to use.  See @FT_LOAD_TARGET_XXX for details.
+   */
+#define FT_LOAD_DEFAULT                      0x0
+#define FT_LOAD_NO_SCALE                     0x1
+#define FT_LOAD_NO_HINTING                   0x2
+#define FT_LOAD_RENDER                       0x4
+#define FT_LOAD_NO_BITMAP                    0x8
+#define FT_LOAD_VERTICAL_LAYOUT              0x10
+#define FT_LOAD_FORCE_AUTOHINT               0x20
+#define FT_LOAD_CROP_BITMAP                  0x40
+#define FT_LOAD_PEDANTIC                     0x80
+#define FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH  0x200
+#define FT_LOAD_NO_RECURSE                   0x400
+#define FT_LOAD_IGNORE_TRANSFORM             0x800
+#define FT_LOAD_MONOCHROME                   0x1000
+#define FT_LOAD_LINEAR_DESIGN                0x2000
+
+  /* temporary hack! */
+#define FT_LOAD_SBITS_ONLY                   0x4000
+#define FT_LOAD_NO_AUTOHINT                  0x8000U
+
+  /* */
+
+
+  /**************************************************************************
+   *
+   * @enum:
+   *   FT_LOAD_TARGET_XXX
+   *
+   * @description:
+   *   A list of values that are used to select a specific hinting algorithm
+   *   to use by the hinter.  You should OR one of these values to your
+   *   `load_flags' when calling @FT_Load_Glyph.
+   *
+   *   Note that font's native hinters may ignore the hinting algorithm you
+   *   have specified (e.g., the TrueType bytecode interpreter).  You can set
+   *   @FT_LOAD_FORCE_AUTOHINT to ensure that the auto-hinter is used.
+   *
+   *   Also note that @FT_LOAD_TARGET_LIGHT is an exception, in that it
+   *   always implies @FT_LOAD_FORCE_AUTOHINT.
+   *
+   * @values:
+   *   FT_LOAD_TARGET_NORMAL ::
+   *     This corresponds to the default hinting algorithm, optimized for
+   *     standard gray-level rendering.  For monochrome output, use
+   *     @FT_LOAD_TARGET_MONO instead.
+   *
+   *   FT_LOAD_TARGET_LIGHT ::
+   *     A lighter hinting algorithm for non-monochrome modes.  Many
+   *     generated glyphs are more fuzzy but better resemble its original
+   *     shape.  A bit like rendering on Mac OS X.
+   *
+   *     As a special exception, this target implies @FT_LOAD_FORCE_AUTOHINT.
+   *
+   *   FT_LOAD_TARGET_MONO ::
+   *     Strong hinting algorithm that should only be used for monochrome
+   *     output.  The result is probably unpleasant if the glyph is rendered
+   *     in non-monochrome modes.
+   *
+   *   FT_LOAD_TARGET_LCD ::
+   *     A variant of @FT_LOAD_TARGET_NORMAL optimized for horizontally
+   *     decimated LCD displays.
+   *
+   *   FT_LOAD_TARGET_LCD_V ::
+   *     A variant of @FT_LOAD_TARGET_NORMAL optimized for vertically
+   *     decimated LCD displays.
+   *
+   * @note:
+   *   You should use only _one_ of the FT_LOAD_TARGET_XXX values in your
+   *   `load_flags'.  They can't be ORed.
+   *
+   *   If @FT_LOAD_RENDER is also set, the glyph is rendered in the
+   *   corresponding mode (i.e., the mode which matches the used algorithm
+   *   best) unless @FT_LOAD_MONOCHROME is set.
+   *
+   *   You can use a hinting algorithm that doesn't correspond to the same
+   *   rendering mode.  As an example, it is possible to use the `light'
+   *   hinting algorithm and have the results rendered in horizontal LCD
+   *   pixel mode, with code like
+   *
+   *     {
+   *       FT_Load_Glyph( face, glyph_index,
+   *                      load_flags | FT_LOAD_TARGET_LIGHT );
+   *
+   *       FT_Render_Glyph( face->glyph, FT_RENDER_MODE_LCD );
+   *     }
+   */
+
+#define FT_LOAD_TARGET_( x )      ( (FT_Int32)( (x) & 15 ) << 16 )
+
+#define FT_LOAD_TARGET_NORMAL     FT_LOAD_TARGET_( FT_RENDER_MODE_NORMAL )
+#define FT_LOAD_TARGET_LIGHT      FT_LOAD_TARGET_( FT_RENDER_MODE_LIGHT  )
+#define FT_LOAD_TARGET_MONO       FT_LOAD_TARGET_( FT_RENDER_MODE_MONO   )
+#define FT_LOAD_TARGET_LCD        FT_LOAD_TARGET_( FT_RENDER_MODE_LCD    )
+#define FT_LOAD_TARGET_LCD_V      FT_LOAD_TARGET_( FT_RENDER_MODE_LCD_V  )
+
+
+  /*
+   * @macro:
+   *   FT_LOAD_TARGET_MODE
+   *
+   * @description:
+   *   Return the @FT_Render_Mode corresponding to a given
+   *   @FT_LOAD_TARGET_XXX value.
+   */
+
+#define FT_LOAD_TARGET_MODE( x )  ( (FT_Render_Mode)( ( (x) >> 16 ) & 15 ) )
+
+  /* */
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_Set_Transform                                                   */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A function used to set the transformation that is applied to glyph */
+  /*    images when they are loaded into a glyph slot through              */
+  /*    @FT_Load_Glyph.                                                    */
+  /*                                                                       */
+  /* <InOut>                                                               */
+  /*    face   :: A handle to the source face object.                      */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    matrix :: A pointer to the transformation's 2x2 matrix.  Use 0 for */
+  /*              the identity matrix.                                     */
+  /*    delta  :: A pointer to the translation vector.  Use 0 for the null */
+  /*              vector.                                                  */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    The transformation is only applied to scalable image formats after */
+  /*    the glyph has been loaded.  It means that hinting is unaltered by  */
+  /*    the transformation and is performed on the character size given in */
+  /*    the last call to @FT_Set_Char_Size or @FT_Set_Pixel_Sizes.         */
+  /*                                                                       */
+  /*    Note that this also transforms the `face.glyph.advance' field, but */
+  /*    *not* the values in `face.glyph.metrics'.                          */
+  /*                                                                       */
+  FT_EXPORT( void )
+  FT_Set_Transform( FT_Face     face,
+                    FT_Matrix*  matrix,
+                    FT_Vector*  delta );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Enum>                                                                */
+  /*    FT_Render_Mode                                                     */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    An enumeration type that lists the render modes supported by       */
+  /*    FreeType 2.  Each mode corresponds to a specific type of scanline  */
+  /*    conversion performed on the outline.                               */
+  /*                                                                       */
+  /*    For bitmap fonts the `bitmap->pixel_mode' field in the             */
+  /*    @FT_GlyphSlotRec structure gives the format of the returned        */
+  /*    bitmap.                                                            */
+  /*                                                                       */
+  /* <Values>                                                              */
+  /*    FT_RENDER_MODE_NORMAL ::                                           */
+  /*      This is the default render mode; it corresponds to 8-bit         */
+  /*      anti-aliased bitmaps, using 256 levels of opacity.               */
+  /*                                                                       */
+  /*    FT_RENDER_MODE_LIGHT ::                                            */
+  /*      This is equivalent to @FT_RENDER_MODE_NORMAL.  It is only        */
+  /*      defined as a separate value because render modes are also used   */
+  /*      indirectly to define hinting algorithm selectors.  See           */
+  /*      @FT_LOAD_TARGET_XXX for details.                                 */
+  /*                                                                       */
+  /*    FT_RENDER_MODE_MONO ::                                             */
+  /*      This mode corresponds to 1-bit bitmaps.                          */
+  /*                                                                       */
+  /*    FT_RENDER_MODE_LCD ::                                              */
+  /*      This mode corresponds to horizontal RGB and BGR sub-pixel        */
+  /*      displays, like LCD-screens.  It produces 8-bit bitmaps that are  */
+  /*      3 times the width of the original glyph outline in pixels, and   */
+  /*      which use the @FT_PIXEL_MODE_LCD mode.                           */
+  /*                                                                       */
+  /*    FT_RENDER_MODE_LCD_V ::                                            */
+  /*      This mode corresponds to vertical RGB and BGR sub-pixel displays */
+  /*      (like PDA screens, rotated LCD displays, etc.).  It produces     */
+  /*      8-bit bitmaps that are 3 times the height of the original        */
+  /*      glyph outline in pixels and use the @FT_PIXEL_MODE_LCD_V mode.   */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*   The LCD-optimized glyph bitmaps produced by FT_Render_Glyph are     */
+  /*   _not_ _filtered_ to reduce color-fringes.  It is up to the caller   */
+  /*   to perform this pass.                                               */
+  /*                                                                       */
+  typedef enum  FT_Render_Mode_
+  {
+    FT_RENDER_MODE_NORMAL = 0,
+    FT_RENDER_MODE_LIGHT,
+    FT_RENDER_MODE_MONO,
+    FT_RENDER_MODE_LCD,
+    FT_RENDER_MODE_LCD_V,
+
+    FT_RENDER_MODE_MAX
+
+  } FT_Render_Mode;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Enum>                                                                */
+  /*    ft_render_mode_xxx                                                 */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    These constants are deprecated.  Use the corresponding             */
+  /*    @FT_Render_Mode values instead.                                    */
+  /*                                                                       */
+  /* <Values>                                                              */
+  /*   ft_render_mode_normal :: see @FT_RENDER_MODE_NORMAL                 */
+  /*   ft_render_mode_mono   :: see @FT_RENDER_MODE_MONO                   */
+  /*                                                                       */
+#define ft_render_mode_normal  FT_RENDER_MODE_NORMAL
+#define ft_render_mode_mono    FT_RENDER_MODE_MONO
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_Render_Glyph                                                    */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Convert a given glyph image to a bitmap.  It does so by inspecting */
+  /*    the glyph image format, finding the relevant renderer, and         */
+  /*    invoking it.                                                       */
+  /*                                                                       */
+  /* <InOut>                                                               */
+  /*    slot        :: A handle to the glyph slot containing the image to  */
+  /*                   convert.                                            */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    render_mode :: This is the render mode used to render the glyph    */
+  /*                   image into a bitmap.  See @FT_Render_Mode for a     */
+  /*                   list of possible values.                            */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  0 means success.                             */
+  /*                                                                       */
+  FT_EXPORT( FT_Error )
+  FT_Render_Glyph( FT_GlyphSlot    slot,
+                   FT_Render_Mode  render_mode );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Enum>                                                                */
+  /*    FT_Kerning_Mode                                                    */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    An enumeration used to specify which kerning values to return in   */
+  /*    @FT_Get_Kerning.                                                   */
+  /*                                                                       */
+  /* <Values>                                                              */
+  /*    FT_KERNING_DEFAULT  :: Return scaled and grid-fitted kerning       */
+  /*                           distances (value is 0).                     */
+  /*                                                                       */
+  /*    FT_KERNING_UNFITTED :: Return scaled but un-grid-fitted kerning    */
+  /*                           distances.                                  */
+  /*                                                                       */
+  /*    FT_KERNING_UNSCALED :: Return the kerning vector in original font  */
+  /*                           units.                                      */
+  /*                                                                       */
+  typedef enum  FT_Kerning_Mode_
+  {
+    FT_KERNING_DEFAULT  = 0,
+    FT_KERNING_UNFITTED,
+    FT_KERNING_UNSCALED
+
+  } FT_Kerning_Mode;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Const>                                                               */
+  /*    ft_kerning_default                                                 */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    This constant is deprecated.  Please use @FT_KERNING_DEFAULT       */
+  /*    instead.                                                           */
+  /*                                                                       */
+#define ft_kerning_default   FT_KERNING_DEFAULT
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Const>                                                               */
+  /*    ft_kerning_unfitted                                                */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    This constant is deprecated.  Please use @FT_KERNING_UNFITTED      */
+  /*    instead.                                                           */
+  /*                                                                       */
+#define ft_kerning_unfitted  FT_KERNING_UNFITTED
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Const>                                                               */
+  /*    ft_kerning_unscaled                                                */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    This constant is deprecated.  Please use @FT_KERNING_UNSCALED      */
+  /*    instead.                                                           */
+  /*                                                                       */
+#define ft_kerning_unscaled  FT_KERNING_UNSCALED
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_Get_Kerning                                                     */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Return the kerning vector between two glyphs of a same face.       */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    face        :: A handle to a source face object.                   */
+  /*                                                                       */
+  /*    left_glyph  :: The index of the left glyph in the kern pair.       */
+  /*                                                                       */
+  /*    right_glyph :: The index of the right glyph in the kern pair.      */
+  /*                                                                       */
+  /*    kern_mode   :: See @FT_Kerning_Mode for more information.          */
+  /*                   Determines the scale and dimension of the returned  */
+  /*                   kerning vector.                                     */
+  /*                                                                       */
+  /* <Output>                                                              */
+  /*    akerning    :: The kerning vector.  This is either in font units   */
+  /*                   or in pixels (26.6 format) for scalable formats,    */
+  /*                   and in pixels for fixed-sizes formats.              */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  0 means success.                             */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    Only horizontal layouts (left-to-right & right-to-left) are        */
+  /*    supported by this method.  Other layouts, or more sophisticated    */
+  /*    kernings, are out of the scope of this API function -- they can be */
+  /*    implemented through format-specific interfaces.                    */
+  /*                                                                       */
+  FT_EXPORT( FT_Error )
+  FT_Get_Kerning( FT_Face     face,
+                  FT_UInt     left_glyph,
+                  FT_UInt     right_glyph,
+                  FT_UInt     kern_mode,
+                  FT_Vector  *akerning );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_Get_Track_Kerning                                               */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Return the track kerning for a given face object at a given size.  */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    face        :: A handle to a source face object.                   */
+  /*                                                                       */
+  /*    point_size  :: The point size in 16.16 fractional points.          */
+  /*                                                                       */
+  /*    degree      :: The degree of tightness.                            */
+  /*                                                                       */
+  /* <Output>                                                              */
+  /*    akerning    :: The kerning in 16.16 fractional points.             */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  0 means success.                             */
+  /*                                                                       */
+  FT_EXPORT( FT_Error )
+  FT_Get_Track_Kerning( FT_Face    face,
+                        FT_Fixed   point_size,
+                        FT_Int     degree,
+                        FT_Fixed*  akerning );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_Get_Glyph_Name                                                  */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Retrieve the ASCII name of a given glyph in a face.  This only     */
+  /*    works for those faces where @FT_HAS_GLYPH_NAMES(face) returns 1.   */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    face        :: A handle to a source face object.                   */
+  /*                                                                       */
+  /*    glyph_index :: The glyph index.                                    */
+  /*                                                                       */
+  /*    buffer_max  :: The maximal number of bytes available in the        */
+  /*                   buffer.                                             */
+  /*                                                                       */
+  /* <Output>                                                              */
+  /*    buffer      :: A pointer to a target buffer where the name is      */
+  /*                   copied to.                                          */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  0 means success.                             */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    An error is returned if the face doesn't provide glyph names or if */
+  /*    the glyph index is invalid.  In all cases of failure, the first    */
+  /*    byte of `buffer' is set to 0 to indicate an empty name.            */
+  /*                                                                       */
+  /*    The glyph name is truncated to fit within the buffer if it is too  */
+  /*    long.  The returned string is always zero-terminated.              */
+  /*                                                                       */
+  /*    This function is not compiled within the library if the config     */
+  /*    macro `FT_CONFIG_OPTION_NO_GLYPH_NAMES' is defined in              */
+  /*    `include/freetype/config/ftoptions.h'.                             */
+  /*                                                                       */
+  FT_EXPORT( FT_Error )
+  FT_Get_Glyph_Name( FT_Face     face,
+                     FT_UInt     glyph_index,
+                     FT_Pointer  buffer,
+                     FT_UInt     buffer_max );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_Get_Postscript_Name                                             */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Retrieve the ASCII Postscript name of a given face, if available.  */
+  /*    This only works with Postscript and TrueType fonts.                */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    face :: A handle to the source face object.                        */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    A pointer to the face's Postscript name.  NULL if unavailable.     */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    The returned pointer is owned by the face and is destroyed with    */
+  /*    it.                                                                */
+  /*                                                                       */
+  FT_EXPORT( const char* )
+  FT_Get_Postscript_Name( FT_Face  face );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_Select_Charmap                                                  */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Select a given charmap by its encoding tag (as listed in           */
+  /*    `freetype.h').                                                     */
+  /*                                                                       */
+  /* <InOut>                                                               */
+  /*    face     :: A handle to the source face object.                    */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    encoding :: A handle to the selected encoding.                     */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  0 means success.                             */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    This function returns an error if no charmap in the face           */
+  /*    corresponds to the encoding queried here.                          */
+  /*                                                                       */
+  /*    Because many fonts contain more than a single cmap for Unicode     */
+  /*    encoding, this function has some special code to select the one    */
+  /*    which covers Unicode best.  It is thus preferable to               */
+  /*    @FT_Set_Charmap in this case.                                      */
+  /*                                                                       */
+  FT_EXPORT( FT_Error )
+  FT_Select_Charmap( FT_Face      face,
+                     FT_Encoding  encoding );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_Set_Charmap                                                     */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Select a given charmap for character code to glyph index mapping.  */
+  /*                                                                       */
+  /* <InOut>                                                               */
+  /*    face    :: A handle to the source face object.                     */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    charmap :: A handle to the selected charmap.                       */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  0 means success.                             */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    This function returns an error if the charmap is not part of       */
+  /*    the face (i.e., if it is not listed in the `face->charmaps'        */
+  /*    table).                                                            */
+  /*                                                                       */
+  FT_EXPORT( FT_Error )
+  FT_Set_Charmap( FT_Face     face,
+                  FT_CharMap  charmap );
+
+
+  /*************************************************************************
+   *
+   * @function:
+   *   FT_Get_Charmap_Index
+   *
+   * @description:
+   *   Retrieve index of a given charmap.
+   *
+   * @input:
+   *   charmap ::
+   *     A handle to a charmap.
+   *
+   * @return:
+   *   The index into the array of character maps within the face to which
+   *   `charmap' belongs.
+   *
+   */
+  FT_EXPORT( FT_Int )
+  FT_Get_Charmap_Index( FT_CharMap  charmap );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_Get_Char_Index                                                  */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Return the glyph index of a given character code.  This function   */
+  /*    uses a charmap object to do the mapping.                           */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    face     :: A handle to the source face object.                    */
+  /*                                                                       */
+  /*    charcode :: The character code.                                    */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    The glyph index.  0 means `undefined character code'.              */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    If you use FreeType to manipulate the contents of font files       */
+  /*    directly, be aware that the glyph index returned by this function  */
+  /*    doesn't always correspond to the internal indices used within      */
+  /*    the file.  This is done to ensure that value 0 always corresponds  */
+  /*    to the `missing glyph'.                                            */
+  /*                                                                       */
+  FT_EXPORT( FT_UInt )
+  FT_Get_Char_Index( FT_Face   face,
+                     FT_ULong  charcode );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_Get_First_Char                                                  */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    This function is used to return the first character code in the    */
+  /*    current charmap of a given face.  It also returns the              */
+  /*    corresponding glyph index.                                         */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    face    :: A handle to the source face object.                     */
+  /*                                                                       */
+  /* <Output>                                                              */
+  /*    agindex :: Glyph index of first character code.  0 if charmap is   */
+  /*               empty.                                                  */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    The charmap's first character code.                                */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    You should use this function with @FT_Get_Next_Char to be able to  */
+  /*    parse all character codes available in a given charmap.  The code  */
+  /*    should look like this:                                             */
+  /*                                                                       */
+  /*    {                                                                  */
+  /*      FT_ULong  charcode;                                              */
+  /*      FT_UInt   gindex;                                                */
+  /*                                                                       */
+  /*                                                                       */
+  /*      charcode = FT_Get_First_Char( face, &gindex );                   */
+  /*      while ( gindex != 0 )                                            */
+  /*      {                                                                */
+  /*        ... do something with (charcode,gindex) pair ...               */
+  /*                                                                       */
+  /*        charcode = FT_Get_Next_Char( face, charcode, &gindex );        */
+  /*      }                                                                */
+  /*    }                                                                  */
+  /*                                                                       */
+  /*    Note that `*agindex' is set to 0 if the charmap is empty.  The     */
+  /*    result itself can be 0 in two cases: if the charmap is empty or    */
+  /*    when the value 0 is the first valid character code.                */
+  /*                                                                       */
+  FT_EXPORT( FT_ULong )
+  FT_Get_First_Char( FT_Face   face,
+                     FT_UInt  *agindex );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_Get_Next_Char                                                   */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    This function is used to return the next character code in the     */
+  /*    current charmap of a given face following the value `char_code',   */
+  /*    as well as the corresponding glyph index.                          */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    face      :: A handle to the source face object.                   */
+  /*    char_code :: The starting character code.                          */
+  /*                                                                       */
+  /* <Output>                                                              */
+  /*    agindex   :: Glyph index of first character code.  0 if charmap    */
+  /*                 is empty.                                             */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    The charmap's next character code.                                 */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    You should use this function with @FT_Get_First_Char to walk       */
+  /*    over all character codes available in a given charmap.  See the    */
+  /*    note for this function for a simple code example.                  */
+  /*                                                                       */
+  /*    Note that `*agindex' is set to 0 when there are no more codes in   */
+  /*    the charmap.                                                       */
+  /*                                                                       */
+  FT_EXPORT( FT_ULong )
+  FT_Get_Next_Char( FT_Face    face,
+                    FT_ULong   char_code,
+                    FT_UInt   *agindex );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_Get_Name_Index                                                  */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Return the glyph index of a given glyph name.  This function uses  */
+  /*    driver specific objects to do the translation.                     */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    face       :: A handle to the source face object.                  */
+  /*                                                                       */
+  /*    glyph_name :: The glyph name.                                      */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    The glyph index.  0 means `undefined character code'.              */
+  /*                                                                       */
+  FT_EXPORT( FT_UInt )
+  FT_Get_Name_Index( FT_Face     face,
+                     FT_String*  glyph_name );
+
+
+  /*************************************************************************
+   *
+   * @macro:
+   *   FT_SUBGLYPH_FLAG_XXX
+   *
+   * @description:
+   *   A list of constants used to describe subglyphs.  Please refer to the
+   *   TrueType specification for the meaning of the various flags.
+   *
+   * @values:
+   *   FT_SUBGLYPH_FLAG_ARGS_ARE_WORDS ::
+   *   FT_SUBGLYPH_FLAG_ARGS_ARE_XY_VALUES ::
+   *   FT_SUBGLYPH_FLAG_ROUND_XY_TO_GRID ::
+   *   FT_SUBGLYPH_FLAG_SCALE ::
+   *   FT_SUBGLYPH_FLAG_XY_SCALE ::
+   *   FT_SUBGLYPH_FLAG_2X2 ::
+   *   FT_SUBGLYPH_FLAG_USE_MY_METRICS ::
+   *
+   */
+#define FT_SUBGLYPH_FLAG_ARGS_ARE_WORDS          1
+#define FT_SUBGLYPH_FLAG_ARGS_ARE_XY_VALUES      2
+#define FT_SUBGLYPH_FLAG_ROUND_XY_TO_GRID        4
+#define FT_SUBGLYPH_FLAG_SCALE                   8
+#define FT_SUBGLYPH_FLAG_XY_SCALE             0x40
+#define FT_SUBGLYPH_FLAG_2X2                  0x80
+#define FT_SUBGLYPH_FLAG_USE_MY_METRICS      0x200
+
+
+  /*************************************************************************
+   *
+   * @func:
+   *   FT_Get_SubGlyph_Info
+   *
+   * @description:
+   *   Retrieve a description of a given subglyph.  Only use it if
+   *   `glyph->format' is @FT_GLYPH_FORMAT_COMPOSITE, or an error is
+   *   returned.
+   *
+   * @input:
+   *   glyph ::
+   *     The source glyph slot.
+   *
+   *   sub_index ::
+   *     The index of subglyph.  Must be less than `glyph->num_subglyphs'.
+   *
+   * @output:
+   *   p_index ::
+   *     The glyph index of the subglyph.
+   *
+   *   p_flags ::
+   *     The subglyph flags, see @FT_SUBGLYPH_FLAG_XXX.
+   *
+   *   p_arg1 ::
+   *     The subglyph's first argument (if any).
+   *
+   *   p_arg2 ::
+   *     The subglyph's second argument (if any).
+   *
+   *   p_transform ::
+   *     The subglyph transformation (if any).
+   *
+   * @return:
+   *   FreeType error code.  0 means success.
+   *
+   * @note:
+   *   The values of `*p_arg1', `*p_arg2', and `*p_transform' must be
+   *   interpreted depending on the flags returned in `*p_flags'.  See the
+   *   TrueType specification for details.
+   *
+   */
+  FT_EXPORT( FT_Error )
+  FT_Get_SubGlyph_Info( FT_GlyphSlot  glyph,
+                        FT_UInt       sub_index,
+                        FT_Int       *p_index,
+                        FT_UInt      *p_flags,
+                        FT_Int       *p_arg1,
+                        FT_Int       *p_arg2,
+                        FT_Matrix    *p_transform );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Section>                                                             */
+  /*    computations                                                       */
+  /*                                                                       */
+  /* <Title>                                                               */
+  /*    Computations                                                       */
+  /*                                                                       */
+  /* <Abstract>                                                            */
+  /*    Crunching fixed numbers and vectors.                               */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    This section contains various functions used to perform            */
+  /*    computations on 16.16 fixed-float numbers or 2d vectors.           */
+  /*                                                                       */
+  /* <Order>                                                               */
+  /*    FT_MulDiv                                                          */
+  /*    FT_MulFix                                                          */
+  /*    FT_DivFix                                                          */
+  /*    FT_RoundFix                                                        */
+  /*    FT_CeilFix                                                         */
+  /*    FT_FloorFix                                                        */
+  /*    FT_Vector_Transform                                                */
+  /*    FT_Matrix_Multiply                                                 */
+  /*    FT_Matrix_Invert                                                   */
+  /*                                                                       */
+  /*************************************************************************/
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_MulDiv                                                          */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A very simple function used to perform the computation `(a*b)/c'   */
+  /*    with maximal accuracy (it uses a 64-bit intermediate integer       */
+  /*    whenever necessary).                                               */
+  /*                                                                       */
+  /*    This function isn't necessarily as fast as some processor specific */
+  /*    operations, but is at least completely portable.                   */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    a :: The first multiplier.                                         */
+  /*    b :: The second multiplier.                                        */
+  /*    c :: The divisor.                                                  */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    The result of `(a*b)/c'.  This function never traps when trying to */
+  /*    divide by zero; it simply returns `MaxInt' or `MinInt' depending   */
+  /*    on the signs of `a' and `b'.                                       */
+  /*                                                                       */
+  FT_EXPORT( FT_Long )
+  FT_MulDiv( FT_Long  a,
+             FT_Long  b,
+             FT_Long  c );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_MulFix                                                          */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A very simple function used to perform the computation             */
+  /*    `(a*b)/0x10000' with maximal accuracy.  Most of the time this is   */
+  /*    used to multiply a given value by a 16.16 fixed float factor.      */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    a :: The first multiplier.                                         */
+  /*    b :: The second multiplier.  Use a 16.16 factor here whenever      */
+  /*         possible (see note below).                                    */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    The result of `(a*b)/0x10000'.                                     */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    This function has been optimized for the case where the absolute   */
+  /*    value of `a' is less than 2048, and `b' is a 16.16 scaling factor. */
+  /*    As this happens mainly when scaling from notional units to         */
+  /*    fractional pixels in FreeType, it resulted in noticeable speed     */
+  /*    improvements between versions 2.x and 1.x.                         */
+  /*                                                                       */
+  /*    As a conclusion, always try to place a 16.16 factor as the         */
+  /*    _second_ argument of this function; this can make a great          */
+  /*    difference.                                                        */
+  /*                                                                       */
+  FT_EXPORT( FT_Long )
+  FT_MulFix( FT_Long  a,
+             FT_Long  b );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_DivFix                                                          */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A very simple function used to perform the computation             */
+  /*    `(a*0x10000)/b' with maximal accuracy.  Most of the time, this is  */
+  /*    used to divide a given value by a 16.16 fixed float factor.        */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    a :: The first multiplier.                                         */
+  /*    b :: The second multiplier.  Use a 16.16 factor here whenever      */
+  /*         possible (see note below).                                    */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    The result of `(a*0x10000)/b'.                                     */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    The optimization for FT_DivFix() is simple: If (a << 16) fits in   */
+  /*    32 bits, then the division is computed directly.  Otherwise, we    */
+  /*    use a specialized version of @FT_MulDiv.                           */
+  /*                                                                       */
+  FT_EXPORT( FT_Long )
+  FT_DivFix( FT_Long  a,
+             FT_Long  b );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_RoundFix                                                        */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A very simple function used to round a 16.16 fixed number.         */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    a :: The number to be rounded.                                     */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    The result of `(a + 0x8000) & -0x10000'.                           */
+  /*                                                                       */
+  FT_EXPORT( FT_Fixed )
+  FT_RoundFix( FT_Fixed  a );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_CeilFix                                                         */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A very simple function used to compute the ceiling function of a   */
+  /*    16.16 fixed number.                                                */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    a :: The number for which the ceiling function is to be computed.  */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    The result of `(a + 0x10000 - 1) & -0x10000'.                      */
+  /*                                                                       */
+  FT_EXPORT( FT_Fixed )
+  FT_CeilFix( FT_Fixed  a );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_FloorFix                                                        */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A very simple function used to compute the floor function of a     */
+  /*    16.16 fixed number.                                                */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    a :: The number for which the floor function is to be computed.    */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    The result of `a & -0x10000'.                                      */
+  /*                                                                       */
+  FT_EXPORT( FT_Fixed )
+  FT_FloorFix( FT_Fixed  a );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_Vector_Transform                                                */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Transform a single vector through a 2x2 matrix.                    */
+  /*                                                                       */
+  /* <InOut>                                                               */
+  /*    vector :: The target vector to transform.                          */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    matrix :: A pointer to the source 2x2 matrix.                      */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    The result is undefined if either `vector' or `matrix' is invalid. */
+  /*                                                                       */
+  FT_EXPORT( void )
+  FT_Vector_Transform( FT_Vector*        vec,
+                       const FT_Matrix*  matrix );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Section>                                                             */
+  /*    version                                                            */
+  /*                                                                       */
+  /* <Title>                                                               */
+  /*    FreeType Version                                                   */
+  /*                                                                       */
+  /* <Abstract>                                                            */
+  /*    Functions and macros related to FreeType versions.                 */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Note that those functions and macros are of limited use because    */
+  /*    even a new release of FreeType with only documentation changes     */
+  /*    increases the version number.                                      */
+  /*                                                                       */
+  /*************************************************************************/
+
+
+  /*************************************************************************
+   *
+   *  @enum:
+   *    FREETYPE_XXX
+   *
+   *  @description:
+   *    These three macros identify the FreeType source code version.
+   *    Use @FT_Library_Version to access them at runtime.
+   *
+   *  @values:
+   *    FREETYPE_MAJOR :: The major version number.
+   *    FREETYPE_MINOR :: The minor version number.
+   *    FREETYPE_PATCH :: The patch level.
+   *
+   *  @note:
+   *    The version number of FreeType if built as a dynamic link library
+   *    with the `libtool' package is _not_ controlled by these three
+   *    macros.
+   */
+#define FREETYPE_MAJOR  2
+#define FREETYPE_MINOR  3
+#define FREETYPE_PATCH  5
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_Library_Version                                                 */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Return the version of the FreeType library being used.  This is    */
+  /*    useful when dynamically linking to the library, since one cannot   */
+  /*    use the macros @FREETYPE_MAJOR, @FREETYPE_MINOR, and               */
+  /*    @FREETYPE_PATCH.                                                   */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    library :: A source library handle.                                */
+  /*                                                                       */
+  /* <Output>                                                              */
+  /*    amajor  :: The major version number.                               */
+  /*                                                                       */
+  /*    aminor  :: The minor version number.                               */
+  /*                                                                       */
+  /*    apatch  :: The patch version number.                               */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    The reason why this function takes a `library' argument is because */
+  /*    certain programs implement library initialization in a custom way  */
+  /*    that doesn't use @FT_Init_FreeType.                                */
+  /*                                                                       */
+  /*    In such cases, the library version might not be available before   */
+  /*    the library object has been created.                               */
+  /*                                                                       */
+  FT_EXPORT( void )
+  FT_Library_Version( FT_Library   library,
+                      FT_Int      *amajor,
+                      FT_Int      *aminor,
+                      FT_Int      *apatch );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_Face_CheckTrueTypePatents                                       */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Parse all bytecode instructions of a TrueType font file to check   */
+  /*    whether any of the patented opcodes are used.  This is only useful */
+  /*    if you want to be able to use the unpatented hinter with           */
+  /*    fonts that do *not* use these opcodes.                             */
+  /*                                                                       */
+  /*    Note that this function parses *all* glyph instructions in the     */
+  /*    font file, which may be slow.                                      */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    face :: A face handle.                                             */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    1 if this is a TrueType font that uses one of the patented         */
+  /*    opcodes, 0 otherwise.                                              */
+  /*                                                                       */
+  /* <Since>                                                               */
+  /*    2.3.5                                                              */
+  /*                                                                       */
+  FT_EXPORT( FT_Bool )
+  FT_Face_CheckTrueTypePatents( FT_Face  face );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_Face_SetUnpatentedHinting                                       */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Enable or disable the unpatented hinter for a given face.          */
+  /*    Only enable it if you have determined that the face doesn't        */
+  /*    use any patented opcodes (see @FT_Face_CheckTrueTypePatents).      */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    face  :: A face handle.                                            */
+  /*                                                                       */
+  /*    value :: New boolean setting.                                      */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    The old setting value.  This will always be false if this is not   */
+  /*    a SFNT font, or if the unpatented hinter is not compiled in this   */
+  /*    instance of the library.                                           */
+  /*                                                                       */
+  /* <Since>                                                               */
+  /*    2.3.5                                                              */
+  /*                                                                       */
+  FT_EXPORT( FT_Bool )
+  FT_Face_SetUnpatentedHinting( FT_Face  face,
+                                FT_Bool  value );
+
+  /* */
+
+
+FT_END_HEADER
+
+#endif /* __FREETYPE_H__ */
+
+
+/* END */
diff --git a/include/freetype2/freetype/ftbbox.h b/include/freetype2/freetype/ftbbox.h
new file mode 100644 (file)
index 0000000..5f79c32
--- /dev/null
@@ -0,0 +1,94 @@
+/***************************************************************************/
+/*                                                                         */
+/*  ftbbox.h                                                               */
+/*                                                                         */
+/*    FreeType exact bbox computation (specification).                     */
+/*                                                                         */
+/*  Copyright 1996-2001, 2003 by                                           */
+/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
+/*                                                                         */
+/*  This file is part of the FreeType project, and may only be used,       */
+/*  modified, and distributed under the terms of the FreeType project      */
+/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
+/*  this file you indicate that you have read the license and              */
+/*  understand and accept it fully.                                        */
+/*                                                                         */
+/***************************************************************************/
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* This component has a _single_ role: to compute exact outline bounding */
+  /* boxes.                                                                */
+  /*                                                                       */
+  /* It is separated from the rest of the engine for various technical     */
+  /* reasons.  It may well be integrated in `ftoutln' later.               */
+  /*                                                                       */
+  /*************************************************************************/
+
+
+#ifndef __FTBBOX_H__
+#define __FTBBOX_H__
+
+
+#include <ft2build.h>
+#include FT_FREETYPE_H
+
+#ifdef FREETYPE_H
+#error "freetype.h of FreeType 1 has been loaded!"
+#error "Please fix the directory search order for header files"
+#error "so that freetype.h of FreeType 2 is found first."
+#endif
+
+
+FT_BEGIN_HEADER
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Section>                                                             */
+  /*    outline_processing                                                 */
+  /*                                                                       */
+  /*************************************************************************/
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_Outline_Get_BBox                                                */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Computes the exact bounding box of an outline.  This is slower     */
+  /*    than computing the control box.  However, it uses an advanced      */
+  /*    algorithm which returns _very_ quickly when the two boxes          */
+  /*    coincide.  Otherwise, the outline Bézier arcs are walked over to   */
+  /*    extract their extrema.                                             */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    outline :: A pointer to the source outline.                        */
+  /*                                                                       */
+  /* <Output>                                                              */
+  /*    abbox   :: The outline's exact bounding box.                       */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  0 means success.                             */
+  /*                                                                       */
+  FT_EXPORT( FT_Error )
+  FT_Outline_Get_BBox( FT_Outline*  outline,
+                       FT_BBox     *abbox );
+
+
+  /* */
+
+
+FT_END_HEADER
+
+#endif /* __FTBBOX_H__ */
+
+
+/* END */
+
+
+/* Local Variables: */
+/* coding: utf-8    */
+/* End:             */
diff --git a/include/freetype2/freetype/ftbdf.h b/include/freetype2/freetype/ftbdf.h
new file mode 100644 (file)
index 0000000..9555694
--- /dev/null
@@ -0,0 +1,200 @@
+/***************************************************************************/
+/*                                                                         */
+/*  ftbdf.h                                                                */
+/*                                                                         */
+/*    FreeType API for accessing BDF-specific strings (specification).     */
+/*                                                                         */
+/*  Copyright 2002, 2003, 2004, 2006 by                                    */
+/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
+/*                                                                         */
+/*  This file is part of the FreeType project, and may only be used,       */
+/*  modified, and distributed under the terms of the FreeType project      */
+/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
+/*  this file you indicate that you have read the license and              */
+/*  understand and accept it fully.                                        */
+/*                                                                         */
+/***************************************************************************/
+
+
+#ifndef __FTBDF_H__
+#define __FTBDF_H__
+
+#include <ft2build.h>
+#include FT_FREETYPE_H
+
+#ifdef FREETYPE_H
+#error "freetype.h of FreeType 1 has been loaded!"
+#error "Please fix the directory search order for header files"
+#error "so that freetype.h of FreeType 2 is found first."
+#endif
+
+
+FT_BEGIN_HEADER
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Section>                                                             */
+  /*    bdf_fonts                                                          */
+  /*                                                                       */
+  /* <Title>                                                               */
+  /*    BDF Files                                                          */
+  /*                                                                       */
+  /* <Abstract>                                                            */
+  /*    BDF specific API.                                                  */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    This section contains the declaration of BDF specific functions.   */
+  /*                                                                       */
+  /*************************************************************************/
+
+
+ /**********************************************************************
+  *
+  * @enum:
+  *    FT_PropertyType
+  *
+  * @description:
+  *    A list of BDF property types.
+  *
+  * @values:
+  *    BDF_PROPERTY_TYPE_NONE ::
+  *      Value 0 is used to indicate a missing property.
+  *
+  *    BDF_PROPERTY_TYPE_ATOM ::
+  *      Property is a string atom.
+  *
+  *    BDF_PROPERTY_TYPE_INTEGER ::
+  *      Property is a 32-bit signed integer.
+  *
+  *    BDF_PROPERTY_TYPE_CARDINAL ::
+  *      Property is a 32-bit unsigned integer.
+  */
+  typedef enum  BDF_PropertyType_
+  {
+    BDF_PROPERTY_TYPE_NONE     = 0,
+    BDF_PROPERTY_TYPE_ATOM     = 1,
+    BDF_PROPERTY_TYPE_INTEGER  = 2,
+    BDF_PROPERTY_TYPE_CARDINAL = 3
+
+  } BDF_PropertyType;
+
+
+ /**********************************************************************
+  *
+  * @type:
+  *    BDF_Property
+  *
+  * @description:
+  *    A handle to a @BDF_PropertyRec structure to model a given
+  *    BDF/PCF property.
+  */
+  typedef struct BDF_PropertyRec_*  BDF_Property;
+
+
+ /**********************************************************************
+  *
+  * @struct:
+  *    BDF_PropertyRec
+  *
+  * @description:
+  *    This structure models a given BDF/PCF property.
+  *
+  * @fields:
+  *    type ::
+  *      The property type.
+  *
+  *    u.atom ::
+  *      The atom string, if type is @BDF_PROPERTY_TYPE_ATOM.
+  *
+  *    u.integer ::
+  *      A signed integer, if type is @BDF_PROPERTY_TYPE_INTEGER.
+  *
+  *    u.cardinal ::
+  *      An unsigned integer, if type is @BDF_PROPERTY_TYPE_CARDINAL.
+  */
+  typedef struct  BDF_PropertyRec_
+  {
+    BDF_PropertyType  type;
+    union {
+      const char*     atom;
+      FT_Int32        integer;
+      FT_UInt32       cardinal;
+
+    } u;
+
+  } BDF_PropertyRec;
+
+
+ /**********************************************************************
+  *
+  * @function:
+  *    FT_Get_BDF_Charset_ID
+  *
+  * @description:
+  *    Retrieves a BDF font character set identity, according to
+  *    the BDF specification.
+  *
+  * @input:
+  *    face ::
+  *       A handle to the input face.
+  *
+  * @output:
+  *    acharset_encoding ::
+  *       Charset encoding, as a C string, owned by the face.
+  *
+  *    acharset_registry ::
+  *       Charset registry, as a C string, owned by the face.
+  *
+  * @return:
+  *   FreeType error code.  0 means success.
+  *
+  * @note:
+  *   This function only works with BDF faces, returning an error otherwise.
+  */
+  FT_EXPORT( FT_Error )
+  FT_Get_BDF_Charset_ID( FT_Face       face,
+                         const char*  *acharset_encoding,
+                         const char*  *acharset_registry );
+
+
+ /**********************************************************************
+  *
+  * @function:
+  *    FT_Get_BDF_Property
+  *
+  * @description:
+  *    Retrieves a BDF property from a BDF or PCF font file.
+  *
+  * @input:
+  *    face :: A handle to the input face.
+  *
+  *    name :: The property name.
+  *
+  * @output:
+  *    aproperty :: The property.
+  *
+  * @return:
+  *   FreeType error code.  0 means success.
+  *
+  * @note:
+  *   This function works with BDF _and_ PCF fonts.  It returns an error
+  *   otherwise.  It also returns an error if the property is not in the
+  *   font.
+  *
+  *   In case of error, `aproperty->type' is always set to
+  *   @BDF_PROPERTY_TYPE_NONE.
+  */
+  FT_EXPORT( FT_Error )
+  FT_Get_BDF_Property( FT_Face           face,
+                       const char*       prop_name,
+                       BDF_PropertyRec  *aproperty );
+
+ /* */
+
+FT_END_HEADER
+
+#endif /* __FTBDF_H__ */
+
+
+/* END */
diff --git a/include/freetype2/freetype/ftbitmap.h b/include/freetype2/freetype/ftbitmap.h
new file mode 100644 (file)
index 0000000..337d888
--- /dev/null
@@ -0,0 +1,206 @@
+/***************************************************************************/
+/*                                                                         */
+/*  ftbitmap.h                                                             */
+/*                                                                         */
+/*    FreeType utility functions for converting 1bpp, 2bpp, 4bpp, and 8bpp */
+/*    bitmaps into 8bpp format (specification).                            */
+/*                                                                         */
+/*  Copyright 2004, 2005, 2006 by                                          */
+/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
+/*                                                                         */
+/*  This file is part of the FreeType project, and may only be used,       */
+/*  modified, and distributed under the terms of the FreeType project      */
+/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
+/*  this file you indicate that you have read the license and              */
+/*  understand and accept it fully.                                        */
+/*                                                                         */
+/***************************************************************************/
+
+
+#ifndef __FTBITMAP_H__
+#define __FTBITMAP_H__
+
+
+#include <ft2build.h>
+#include FT_FREETYPE_H
+
+#ifdef FREETYPE_H
+#error "freetype.h of FreeType 1 has been loaded!"
+#error "Please fix the directory search order for header files"
+#error "so that freetype.h of FreeType 2 is found first."
+#endif
+
+
+FT_BEGIN_HEADER
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Section>                                                             */
+  /*    bitmap_handling                                                    */
+  /*                                                                       */
+  /* <Title>                                                               */
+  /*    Bitmap Handling                                                    */
+  /*                                                                       */
+  /* <Abstract>                                                            */
+  /*    Handling FT_Bitmap objects.                                        */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    This section contains functions for converting FT_Bitmap objects.  */
+  /*                                                                       */
+  /*************************************************************************/
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_Bitmap_New                                                      */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Initialize a pointer to an @FT_Bitmap structure.                   */
+  /*                                                                       */
+  /* <InOut>                                                               */
+  /*    abitmap :: A pointer to the bitmap structure.                      */
+  /*                                                                       */
+  FT_EXPORT( void )
+  FT_Bitmap_New( FT_Bitmap  *abitmap );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_Bitmap_Copy                                                     */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Copies an bitmap into another one.                                 */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    library :: A handle to a library object.                           */
+  /*                                                                       */
+  /*    source  :: A handle to the source bitmap.                          */
+  /*                                                                       */
+  /* <Output>                                                              */
+  /*    target  :: A handle to the target bitmap.                          */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  0 means success.                             */
+  /*                                                                       */
+  FT_EXPORT( FT_Error )
+  FT_Bitmap_Copy( FT_Library        library,
+                  const FT_Bitmap  *source,
+                  FT_Bitmap        *target);
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_Bitmap_Embolden                                                 */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Embolden a bitmap.  The new bitmap will be about `xStrength'       */
+  /*    pixels wider and `yStrength' pixels higher.  The left and bottom   */
+  /*    borders are kept unchanged.                                        */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    library   :: A handle to a library object.                         */
+  /*                                                                       */
+  /*    xStrength :: How strong the glyph is emboldened horizontally.      */
+  /*                 Expressed in 26.6 pixel format.                       */
+  /*                                                                       */
+  /*    yStrength :: How strong the glyph is emboldened vertically.        */
+  /*                 Expressed in 26.6 pixel format.                       */
+  /*                                                                       */
+  /* <InOut>                                                               */
+  /*    bitmap    :: A handle to the target bitmap.                        */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  0 means success.                             */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    The current implementation restricts `xStrength' to be less than   */
+  /*    or equal to 8 if bitmap is of pixel_mode @FT_PIXEL_MODE_MONO.      */
+  /*                                                                       */
+  /*    If you want to embolden the bitmap owned by a @FT_GlyphSlotRec,    */
+  /*    you should call `FT_GlyphSlot_Own_Bitmap' on the slot first.       */
+  /*                                                                       */
+  FT_EXPORT( FT_Error )
+  FT_Bitmap_Embolden( FT_Library  library,
+                      FT_Bitmap*  bitmap,
+                      FT_Pos      xStrength,
+                      FT_Pos      yStrength );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_Bitmap_Convert                                                  */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Convert a bitmap object with depth 1bpp, 2bpp, 4bpp, or 8bpp to a  */
+  /*    bitmap object with depth 8bpp, making the number of used bytes per */
+  /*    line (a.k.a. the `pitch') a multiple of `alignment'.               */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    library   :: A handle to a library object.                         */
+  /*                                                                       */
+  /*    source    :: The source bitmap.                                    */
+  /*                                                                       */
+  /*    alignment :: The pitch of the bitmap is a multiple of this         */
+  /*                 parameter.  Common values are 1, 2, or 4.             */
+  /*                                                                       */
+  /* <Output>                                                              */
+  /*    target    :: The target bitmap.                                    */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  0 means success.                             */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    It is possible to call @FT_Bitmap_Convert multiple times without   */
+  /*    calling @FT_Bitmap_Done (the memory is simply reallocated).        */
+  /*                                                                       */
+  /*    Use @FT_Bitmap_Done to finally remove the bitmap object.           */
+  /*                                                                       */
+  /*    The `library' argument is taken to have access to FreeType's       */
+  /*    memory handling functions.                                         */
+  /*                                                                       */
+  FT_EXPORT( FT_Error )
+  FT_Bitmap_Convert( FT_Library        library,
+                     const FT_Bitmap  *source,
+                     FT_Bitmap        *target,
+                     FT_Int            alignment );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_Bitmap_Done                                                     */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Destroy a bitmap object created with @FT_Bitmap_New.               */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    library :: A handle to a library object.                           */
+  /*                                                                       */
+  /*    bitmap  :: The bitmap object to be freed.                          */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  0 means success.                             */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    The `library' argument is taken to have access to FreeType's       */
+  /*    memory handling functions.                                         */
+  /*                                                                       */
+  FT_EXPORT( FT_Error )
+  FT_Bitmap_Done( FT_Library  library,
+                  FT_Bitmap  *bitmap );
+
+
+  /* */
+
+
+FT_END_HEADER
+
+#endif /* __FTBITMAP_H__ */
+
+
+/* END */
diff --git a/include/freetype2/freetype/ftcache.h b/include/freetype2/freetype/ftcache.h
new file mode 100644 (file)
index 0000000..721aa16
--- /dev/null
@@ -0,0 +1,1110 @@
+/***************************************************************************/
+/*                                                                         */
+/*  ftcache.h                                                              */
+/*                                                                         */
+/*    FreeType Cache subsystem (specification).                            */
+/*                                                                         */
+/*  Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007 by             */
+/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
+/*                                                                         */
+/*  This file is part of the FreeType project, and may only be used,       */
+/*  modified, and distributed under the terms of the FreeType project      */
+/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
+/*  this file you indicate that you have read the license and              */
+/*  understand and accept it fully.                                        */
+/*                                                                         */
+/***************************************************************************/
+
+
+#ifndef __FTCACHE_H__
+#define __FTCACHE_H__
+
+
+#include <ft2build.h>
+#include FT_GLYPH_H
+
+
+FT_BEGIN_HEADER
+
+
+  /*************************************************************************
+   *
+   * <Section>
+   *    cache_subsystem
+   *
+   * <Title>
+   *    Cache Sub-System
+   *
+   * <Abstract>
+   *    How to cache face, size, and glyph data with FreeType 2.
+   *
+   * <Description>
+   *   This section describes the FreeType 2 cache sub-system, which is used
+   *   to limit the number of concurrently opened @FT_Face and @FT_Size
+   *   objects, as well as caching information like character maps and glyph
+   *   images while limiting their maximum memory usage.
+   *
+   *   Note that all types and functions begin with the `FTC_' prefix.
+   *
+   *   The cache is highly portable and thus doesn't know anything about the
+   *   fonts installed on your system, or how to access them.  This implies
+   *   the following scheme:
+   *
+   *   First, available or installed font faces are uniquely identified by
+   *   @FTC_FaceID values, provided to the cache by the client.  Note that
+   *   the cache only stores and compares these values, and doesn't try to
+   *   interpret them in any way.
+   *
+   *   Second, the cache calls, only when needed, a client-provided function
+   *   to convert a @FTC_FaceID into a new @FT_Face object.  The latter is
+   *   then completely managed by the cache, including its termination
+   *   through @FT_Done_Face.
+   *
+   *   Clients are free to map face IDs to anything else.  The most simple
+   *   usage is to associate them to a (pathname,face_index) pair that is
+   *   used to call @FT_New_Face.  However, more complex schemes are also
+   *   possible.
+   *
+   *   Note that for the cache to work correctly, the face ID values must be
+   *   *persistent*, which means that the contents they point to should not
+   *   change at runtime, or that their value should not become invalid.
+   *
+   *   If this is unavoidable (e.g., when a font is uninstalled at runtime),
+   *   you should call @FTC_Manager_RemoveFaceID as soon as possible, to let
+   *   the cache get rid of any references to the old @FTC_FaceID it may
+   *   keep internally.  Failure to do so will lead to incorrect behaviour
+   *   or even crashes.
+   *
+   *   To use the cache, start with calling @FTC_Manager_New to create a new
+   *   @FTC_Manager object, which models a single cache instance.  You can
+   *   then look up @FT_Face and @FT_Size objects with
+   *   @FTC_Manager_LookupFace and @FTC_Manager_LookupSize, respectively.
+   *
+   *   If you want to use the charmap caching, call @FTC_CMapCache_New, then
+   *   later use @FTC_CMapCache_Lookup to perform the equivalent of
+   *   @FT_Get_Char_Index, only much faster.
+   *
+   *   If you want to use the @FT_Glyph caching, call @FTC_ImageCache, then
+   *   later use @FTC_ImageCache_Lookup to retrieve the corresponding
+   *   @FT_Glyph objects from the cache.
+   *
+   *   If you need lots of small bitmaps, it is much more memory efficient
+   *   to call @FTC_SBitCache_New followed by @FTC_SBitCache_Lookup.  This
+   *   returns @FTC_SBitRec structures, which are used to store small
+   *   bitmaps directly.  (A small bitmap is one whose metrics and
+   *   dimensions all fit into 8-bit integers).
+   *
+   *   We hope to also provide a kerning cache in the near future.
+   *
+   *
+   * <Order>
+   *   FTC_Manager
+   *   FTC_FaceID
+   *   FTC_Face_Requester
+   *
+   *   FTC_Manager_New
+   *   FTC_Manager_Reset
+   *   FTC_Manager_Done
+   *   FTC_Manager_LookupFace
+   *   FTC_Manager_LookupSize
+   *   FTC_Manager_RemoveFaceID
+   *
+   *   FTC_Node
+   *   FTC_Node_Unref
+   *
+   *   FTC_ImageCache
+   *   FTC_ImageCache_New
+   *   FTC_ImageCache_Lookup
+   *
+   *   FTC_SBit
+   *   FTC_SBitCache
+   *   FTC_SBitCache_New
+   *   FTC_SBitCache_Lookup
+   *
+   *   FTC_CMapCache
+   *   FTC_CMapCache_New
+   *   FTC_CMapCache_Lookup
+   *
+   *************************************************************************/
+
+
+  /*************************************************************************/
+  /*************************************************************************/
+  /*************************************************************************/
+  /*****                                                               *****/
+  /*****                    BASIC TYPE DEFINITIONS                     *****/
+  /*****                                                               *****/
+  /*************************************************************************/
+  /*************************************************************************/
+  /*************************************************************************/
+
+
+  /*************************************************************************
+   *
+   * @type: FTC_FaceID
+   *
+   * @description:
+   *   An opaque pointer type that is used to identity face objects.  The
+   *   contents of such objects is application-dependent.
+   *
+   *   These pointers are typically used to point to a user-defined
+   *   structure containing a font file path, and face index.
+   *
+   * @note:
+   *   Never use NULL as a valid @FTC_FaceID.
+   *
+   *   Face IDs are passed by the client to the cache manager, which calls,
+   *   when needed, the @FTC_Face_Requester to translate them into new
+   *   @FT_Face objects.
+   *
+   *   If the content of a given face ID changes at runtime, or if the value
+   *   becomes invalid (e.g., when uninstalling a font), you should
+   *   immediately call @FTC_Manager_RemoveFaceID before any other cache
+   *   function.
+   *
+   *   Failure to do so will result in incorrect behaviour or even
+   *   memory leaks and crashes.
+   */
+  typedef struct FTC_FaceIDRec_*  FTC_FaceID;
+
+
+  /************************************************************************
+   *
+   * @functype:
+   *   FTC_Face_Requester
+   *
+   * @description:
+   *   A callback function provided by client applications.  It is used by
+   *   the cache manager to translate a given @FTC_FaceID into a new valid
+   *   @FT_Face object, on demand.
+   *
+   * <Input>
+   *   face_id ::
+   *     The face ID to resolve.
+   *
+   *   library ::
+   *     A handle to a FreeType library object.
+   *
+   *   req_data ::
+   *     Application-provided request data (see note below).
+   *
+   * <Output>
+   *   aface ::
+   *     A new @FT_Face handle.
+   *
+   * <Return>
+   *   FreeType error code.  0 means success.
+   *
+   * <Note>
+   *   The third parameter `req_data' is the same as the one passed by the
+   *   client when @FTC_Manager_New is called.
+   *
+   *   The face requester should not perform funny things on the returned
+   *   face object, like creating a new @FT_Size for it, or setting a
+   *   transformation through @FT_Set_Transform!
+   */
+  typedef FT_Error
+  (*FTC_Face_Requester)( FTC_FaceID  face_id,
+                         FT_Library  library,
+                         FT_Pointer  request_data,
+                         FT_Face*    aface );
+
+ /* */
+
+#define FT_POINTER_TO_ULONG( p )  ( (FT_ULong)(FT_Pointer)(p) )
+
+#define FTC_FACE_ID_HASH( i )                                \
+          ((FT_UInt32)(( FT_POINTER_TO_ULONG( i ) >> 3 ) ^   \
+                       ( FT_POINTER_TO_ULONG( i ) << 7 ) ) )
+
+
+  /*************************************************************************/
+  /*************************************************************************/
+  /*************************************************************************/
+  /*****                                                               *****/
+  /*****                      CACHE MANAGER OBJECT                     *****/
+  /*****                                                               *****/
+  /*************************************************************************/
+  /*************************************************************************/
+  /*************************************************************************/
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Type>                                                                */
+  /*    FTC_Manager                                                        */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    This object corresponds to one instance of the cache-subsystem.    */
+  /*    It is used to cache one or more @FT_Face objects, along with       */
+  /*    corresponding @FT_Size objects.                                    */
+  /*                                                                       */
+  /*    The manager intentionally limits the total number of opened        */
+  /*    @FT_Face and @FT_Size objects to control memory usage.  See the    */
+  /*    `max_faces' and `max_sizes' parameters of @FTC_Manager_New.        */
+  /*                                                                       */
+  /*    The manager is also used to cache `nodes' of various types while   */
+  /*    limiting their total memory usage.                                 */
+  /*                                                                       */
+  /*    All limitations are enforced by keeping lists of managed objects   */
+  /*    in most-recently-used order, and flushing old nodes to make room   */
+  /*    for new ones.                                                      */
+  /*                                                                       */
+  typedef struct FTC_ManagerRec_*  FTC_Manager;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Type>                                                                */
+  /*    FTC_Node                                                           */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    An opaque handle to a cache node object.  Each cache node is       */
+  /*    reference-counted.  A node with a count of 0 might be flushed      */
+  /*    out of a full cache whenever a lookup request is performed.        */
+  /*                                                                       */
+  /*    If you lookup nodes, you have the ability to `acquire' them, i.e., */
+  /*    to increment their reference count.  This will prevent the node    */
+  /*    from being flushed out of the cache until you explicitly `release' */
+  /*    it (see @FTC_Node_Unref).                                          */
+  /*                                                                       */
+  /*    See also @FTC_SBitCache_Lookup and @FTC_ImageCache_Lookup.         */
+  /*                                                                       */
+  typedef struct FTC_NodeRec_*  FTC_Node;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FTC_Manager_New                                                    */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Creates a new cache manager.                                       */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    library   :: The parent FreeType library handle to use.            */
+  /*                                                                       */
+  /*    max_faces :: Maximum number of opened @FT_Face objects managed by  */
+  /*                 this cache instance.  Use 0 for defaults.             */
+  /*                                                                       */
+  /*    max_sizes :: Maximum number of opened @FT_Size objects managed by  */
+  /*                 this cache instance.  Use 0 for defaults.             */
+  /*                                                                       */
+  /*    max_bytes :: Maximum number of bytes to use for cached data nodes. */
+  /*                 Use 0 for defaults.  Note that this value does not    */
+  /*                 account for managed @FT_Face and @FT_Size objects.    */
+  /*                                                                       */
+  /*    requester :: An application-provided callback used to translate    */
+  /*                 face IDs into real @FT_Face objects.                  */
+  /*                                                                       */
+  /*    req_data  :: A generic pointer that is passed to the requester     */
+  /*                 each time it is called (see @FTC_Face_Requester).     */
+  /*                                                                       */
+  /* <Output>                                                              */
+  /*    amanager  :: A handle to a new manager object.  0 in case of       */
+  /*                 failure.                                              */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  0 means success.                             */
+  /*                                                                       */
+  FT_EXPORT( FT_Error )
+  FTC_Manager_New( FT_Library          library,
+                   FT_UInt             max_faces,
+                   FT_UInt             max_sizes,
+                   FT_ULong            max_bytes,
+                   FTC_Face_Requester  requester,
+                   FT_Pointer          req_data,
+                   FTC_Manager        *amanager );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FTC_Manager_Reset                                                  */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Empties a given cache manager.  This simply gets rid of all the    */
+  /*    currently cached @FT_Face and @FT_Size objects within the manager. */
+  /*                                                                       */
+  /* <InOut>                                                               */
+  /*    manager :: A handle to the manager.                                */
+  /*                                                                       */
+  FT_EXPORT( void )
+  FTC_Manager_Reset( FTC_Manager  manager );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FTC_Manager_Done                                                   */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Destroys a given manager after emptying it.                        */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    manager :: A handle to the target cache manager object.            */
+  /*                                                                       */
+  FT_EXPORT( void )
+  FTC_Manager_Done( FTC_Manager  manager );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FTC_Manager_LookupFace                                             */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Retrieves the @FT_Face object that corresponds to a given face ID  */
+  /*    through a cache manager.                                           */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    manager :: A handle to the cache manager.                          */
+  /*                                                                       */
+  /*    face_id :: The ID of the face object.                              */
+  /*                                                                       */
+  /* <Output>                                                              */
+  /*    aface   :: A handle to the face object.                            */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  0 means success.                             */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    The returned @FT_Face object is always owned by the manager.  You  */
+  /*    should never try to discard it yourself.                           */
+  /*                                                                       */
+  /*    The @FT_Face object doesn't necessarily have a current size object */
+  /*    (i.e., face->size can be 0).  If you need a specific `font size',  */
+  /*    use @FTC_Manager_LookupSize instead.                               */
+  /*                                                                       */
+  /*    Never change the face's transformation matrix (i.e., never call    */
+  /*    the @FT_Set_Transform function) on a returned face!  If you need   */
+  /*    to transform glyphs, do it yourself after glyph loading.           */
+  /*                                                                       */
+  /*    When you perform a lookup, out-of-memory errors are detected       */
+  /*    _within_ the lookup and force incremental flushes of the cache     */
+  /*    until enough memory is released for the lookup to succeed.         */
+  /*                                                                       */
+  /*    If a lookup fails with `FT_Err_Out_Of_Memory' the cache has        */
+  /*    already been completely flushed, and still no memory was available */
+  /*    for the operation.                                                 */
+  /*                                                                       */
+  FT_EXPORT( FT_Error )
+  FTC_Manager_LookupFace( FTC_Manager  manager,
+                          FTC_FaceID   face_id,
+                          FT_Face     *aface );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Struct>                                                              */
+  /*    FTC_ScalerRec                                                      */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A structure used to describe a given character size in either      */
+  /*    pixels or points to the cache manager.  See                        */
+  /*    @FTC_Manager_LookupSize.                                           */
+  /*                                                                       */
+  /* <Fields>                                                              */
+  /*    face_id :: The source face ID.                                     */
+  /*                                                                       */
+  /*    width   :: The character width.                                    */
+  /*                                                                       */
+  /*    height  :: The character height.                                   */
+  /*                                                                       */
+  /*    pixel   :: A Boolean.  If 1, the `width' and `height' fields are   */
+  /*               interpreted as integer pixel character sizes.           */
+  /*               Otherwise, they are expressed as 1/64th of points.      */
+  /*                                                                       */
+  /*    x_res   :: Only used when `pixel' is value 0 to indicate the       */
+  /*               horizontal resolution in dpi.                           */
+  /*                                                                       */
+  /*    y_res   :: Only used when `pixel' is value 0 to indicate the       */
+  /*               vertical resolution in dpi.                             */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    This type is mainly used to retrieve @FT_Size objects through the  */
+  /*    cache manager.                                                     */
+  /*                                                                       */
+  typedef struct  FTC_ScalerRec_
+  {
+    FTC_FaceID  face_id;
+    FT_UInt     width;
+    FT_UInt     height;
+    FT_Int      pixel;
+    FT_UInt     x_res;
+    FT_UInt     y_res;
+
+  } FTC_ScalerRec, *FTC_Scaler;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FTC_Manager_LookupSize                                             */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Retrieve the @FT_Size object that corresponds to a given           */
+  /*    @FTC_ScalerRec pointer through a cache manager.                    */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    manager :: A handle to the cache manager.                          */
+  /*                                                                       */
+  /*    scaler  :: A scaler handle.                                        */
+  /*                                                                       */
+  /* <Output>                                                              */
+  /*    asize   :: A handle to the size object.                            */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  0 means success.                             */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    The returned @FT_Size object is always owned by the manager.  You  */
+  /*    should never try to discard it by yourself.                        */
+  /*                                                                       */
+  /*    You can access the parent @FT_Face object simply as `size->face'   */
+  /*    if you need it.  Note that this object is also owned by the        */
+  /*    manager.                                                           */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    When you perform a lookup, out-of-memory errors are detected       */
+  /*    _within_ the lookup and force incremental flushes of the cache     */
+  /*    until enough memory is released for the lookup to succeed.         */
+  /*                                                                       */
+  /*    If a lookup fails with `FT_Err_Out_Of_Memory' the cache has        */
+  /*    already been completely flushed, and still no memory is available  */
+  /*    for the operation.                                                 */
+  /*                                                                       */
+  FT_EXPORT( FT_Error )
+  FTC_Manager_LookupSize( FTC_Manager  manager,
+                          FTC_Scaler   scaler,
+                          FT_Size     *asize );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FTC_Node_Unref                                                     */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Decrement a cache node's internal reference count.  When the count */
+  /*    reaches 0, it is not destroyed but becomes eligible for subsequent */
+  /*    cache flushes.                                                     */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    node    :: The cache node handle.                                  */
+  /*                                                                       */
+  /*    manager :: The cache manager handle.                               */
+  /*                                                                       */
+  FT_EXPORT( void )
+  FTC_Node_Unref( FTC_Node     node,
+                  FTC_Manager  manager );
+
+
+  /*************************************************************************
+   *
+   * @function:
+   *   FTC_Manager_RemoveFaceID
+   *
+   * @description:
+   *   A special function used to indicate to the cache manager that
+   *   a given @FTC_FaceID is no longer valid, either because its
+   *   content changed, or because it was deallocated or uninstalled.
+   *
+   * @input:
+   *   manager ::
+   *     The cache manager handle.
+   *
+   *   face_id ::
+   *     The @FTC_FaceID to be removed.
+   *
+   * @note:
+   *   This function flushes all nodes from the cache corresponding to this
+   *   `face_id', with the exception of nodes with a non-null reference
+   *   count.
+   *
+   *   Such nodes are however modified internally so as to never appear
+   *   in later lookups with the same `face_id' value, and to be immediately
+   *   destroyed when released by all their users.
+   *
+   */
+  FT_EXPORT( void )
+  FTC_Manager_RemoveFaceID( FTC_Manager  manager,
+                            FTC_FaceID   face_id );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Section>                                                             */
+  /*    cache_subsystem                                                    */
+  /*                                                                       */
+  /*************************************************************************/
+
+  /*************************************************************************
+   *
+   * @type:
+   *   FTC_CMapCache
+   *
+   * @description:
+   *   An opaque handle used to model a charmap cache.  This cache is to
+   *   hold character codes -> glyph indices mappings.
+   *
+   */
+  typedef struct FTC_CMapCacheRec_*  FTC_CMapCache;
+
+
+  /*************************************************************************
+   *
+   * @function:
+   *   FTC_CMapCache_New
+   *
+   * @description:
+   *   Create a new charmap cache.
+   *
+   * @input:
+   *   manager ::
+   *     A handle to the cache manager.
+   *
+   * @output:
+   *   acache ::
+   *     A new cache handle.  NULL in case of error.
+   *
+   * @return:
+   *   FreeType error code.  0 means success.
+   *
+   * @note:
+   *   Like all other caches, this one will be destroyed with the cache
+   *   manager.
+   *
+   */
+  FT_EXPORT( FT_Error )
+  FTC_CMapCache_New( FTC_Manager     manager,
+                     FTC_CMapCache  *acache );
+
+
+  /************************************************************************
+   *
+   * @function:
+   *   FTC_CMapCache_Lookup
+   *
+   * @description:
+   *   Translate a character code into a glyph index, using the charmap
+   *   cache.
+   *
+   * @input:
+   *   cache ::
+   *     A charmap cache handle.
+   *
+   *   face_id ::
+   *     The source face ID.
+   *
+   *   cmap_index ::
+   *     The index of the charmap in the source face.
+   *
+   *   char_code ::
+   *     The character code (in the corresponding charmap).
+   *
+   * @return:
+   *    Glyph index.  0 means `no glyph'.
+   *
+   */
+  FT_EXPORT( FT_UInt )
+  FTC_CMapCache_Lookup( FTC_CMapCache  cache,
+                        FTC_FaceID     face_id,
+                        FT_Int         cmap_index,
+                        FT_UInt32      char_code );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Section>                                                             */
+  /*    cache_subsystem                                                    */
+  /*                                                                       */
+  /*************************************************************************/
+
+
+  /*************************************************************************/
+  /*************************************************************************/
+  /*************************************************************************/
+  /*****                                                               *****/
+  /*****                       IMAGE CACHE OBJECT                      *****/
+  /*****                                                               *****/
+  /*************************************************************************/
+  /*************************************************************************/
+  /*************************************************************************/
+
+
+  /*************************************************************************
+   *
+   * @struct:
+   *   FTC_ImageTypeRec
+   *
+   * @description:
+   *   A structure used to model the type of images in a glyph cache.
+   *
+   * @fields:
+   *   face_id ::
+   *     The face ID.
+   *
+   *   width ::
+   *     The width in pixels.
+   *
+   *   height ::
+   *     The height in pixels.
+   *
+   *   flags ::
+   *     The load flags, as in @FT_Load_Glyph.
+   *
+   */
+  typedef struct  FTC_ImageTypeRec_
+  {
+    FTC_FaceID  face_id;
+    FT_Int      width;
+    FT_Int      height;
+    FT_Int32    flags;
+
+  } FTC_ImageTypeRec;
+
+
+  /*************************************************************************
+   *
+   * @type:
+   *   FTC_ImageType
+   *
+   * @description:
+   *   A handle to an @FTC_ImageTypeRec structure.
+   *
+   */
+  typedef struct FTC_ImageTypeRec_*  FTC_ImageType;
+
+
+  /* */
+
+
+#define FTC_IMAGE_TYPE_COMPARE( d1, d2 )      \
+          ( (d1)->face_id == (d2)->face_id && \
+            (d1)->width   == (d2)->width   && \
+            (d1)->flags   == (d2)->flags   )
+
+#define FTC_IMAGE_TYPE_HASH( d )                          \
+          (FT_UFast)( FTC_FACE_ID_HASH( (d)->face_id )  ^ \
+                      ( (d)->width << 8 ) ^ (d)->height ^ \
+                      ( (d)->flags << 4 )               )
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Type>                                                                */
+  /*    FTC_ImageCache                                                     */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A handle to an glyph image cache object.  They are designed to     */
+  /*    hold many distinct glyph images while not exceeding a certain      */
+  /*    memory threshold.                                                  */
+  /*                                                                       */
+  typedef struct FTC_ImageCacheRec_*  FTC_ImageCache;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FTC_ImageCache_New                                                 */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Creates a new glyph image cache.                                   */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    manager :: The parent manager for the image cache.                 */
+  /*                                                                       */
+  /* <Output>                                                              */
+  /*    acache  :: A handle to the new glyph image cache object.           */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  0 means success.                             */
+  /*                                                                       */
+  FT_EXPORT( FT_Error )
+  FTC_ImageCache_New( FTC_Manager      manager,
+                      FTC_ImageCache  *acache );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FTC_ImageCache_Lookup                                              */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Retrieves a given glyph image from a glyph image cache.            */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    cache  :: A handle to the source glyph image cache.                */
+  /*                                                                       */
+  /*    type   :: A pointer to a glyph image type descriptor.              */
+  /*                                                                       */
+  /*    gindex :: The glyph index to retrieve.                             */
+  /*                                                                       */
+  /* <Output>                                                              */
+  /*    aglyph :: The corresponding @FT_Glyph object.  0 in case of        */
+  /*              failure.                                                 */
+  /*                                                                       */
+  /*    anode  :: Used to return the address of of the corresponding cache */
+  /*              node after incrementing its reference count (see note    */
+  /*              below).                                                  */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  0 means success.                             */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    The returned glyph is owned and managed by the glyph image cache.  */
+  /*    Never try to transform or discard it manually!  You can however    */
+  /*    create a copy with @FT_Glyph_Copy and modify the new one.          */
+  /*                                                                       */
+  /*    If `anode' is _not_ NULL, it receives the address of the cache     */
+  /*    node containing the glyph image, after increasing its reference    */
+  /*    count.  This ensures that the node (as well as the @FT_Glyph) will */
+  /*    always be kept in the cache until you call @FTC_Node_Unref to      */
+  /*    `release' it.                                                      */
+  /*                                                                       */
+  /*    If `anode' is NULL, the cache node is left unchanged, which means  */
+  /*    that the @FT_Glyph could be flushed out of the cache on the next   */
+  /*    call to one of the caching sub-system APIs.  Don't assume that it  */
+  /*    is persistent!                                                     */
+  /*                                                                       */
+  FT_EXPORT( FT_Error )
+  FTC_ImageCache_Lookup( FTC_ImageCache  cache,
+                         FTC_ImageType   type,
+                         FT_UInt         gindex,
+                         FT_Glyph       *aglyph,
+                         FTC_Node       *anode );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FTC_ImageCache_LookupScaler                                        */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A variant of @FTC_ImageCache_Lookup that uses an @FTC_ScalerRec    */
+  /*    to specify the face ID and its size.                               */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    cache      :: A handle to the source glyph image cache.            */
+  /*                                                                       */
+  /*    scaler     :: A pointer to a scaler descriptor.                    */
+  /*                                                                       */
+  /*    load_flags :: The corresponding load flags.                        */
+  /*                                                                       */
+  /*    gindex     :: The glyph index to retrieve.                         */
+  /*                                                                       */
+  /* <Output>                                                              */
+  /*    aglyph     :: The corresponding @FT_Glyph object.  0 in case of    */
+  /*                  failure.                                             */
+  /*                                                                       */
+  /*    anode      :: Used to return the address of of the corresponding   */
+  /*                  cache node after incrementing its reference count    */
+  /*                  (see note below).                                    */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  0 means success.                             */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    The returned glyph is owned and managed by the glyph image cache.  */
+  /*    Never try to transform or discard it manually!  You can however    */
+  /*    create a copy with @FT_Glyph_Copy and modify the new one.          */
+  /*                                                                       */
+  /*    If `anode' is _not_ NULL, it receives the address of the cache     */
+  /*    node containing the glyph image, after increasing its reference    */
+  /*    count.  This ensures that the node (as well as the @FT_Glyph) will */
+  /*    always be kept in the cache until you call @FTC_Node_Unref to      */
+  /*    `release' it.                                                      */
+  /*                                                                       */
+  /*    If `anode' is NULL, the cache node is left unchanged, which means  */
+  /*    that the @FT_Glyph could be flushed out of the cache on the next   */
+  /*    call to one of the caching sub-system APIs.  Don't assume that it  */
+  /*    is persistent!                                                     */
+  /*                                                                       */
+  FT_EXPORT( FT_Error )
+  FTC_ImageCache_LookupScaler( FTC_ImageCache  cache,
+                               FTC_Scaler      scaler,
+                               FT_ULong        load_flags,
+                               FT_UInt         gindex,
+                               FT_Glyph       *aglyph,
+                               FTC_Node       *anode );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Type>                                                                */
+  /*    FTC_SBit                                                           */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A handle to a small bitmap descriptor.  See the @FTC_SBitRec       */
+  /*    structure for details.                                             */
+  /*                                                                       */
+  typedef struct FTC_SBitRec_*  FTC_SBit;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Struct>                                                              */
+  /*    FTC_SBitRec                                                        */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A very compact structure used to describe a small glyph bitmap.    */
+  /*                                                                       */
+  /* <Fields>                                                              */
+  /*    width     :: The bitmap width in pixels.                           */
+  /*                                                                       */
+  /*    height    :: The bitmap height in pixels.                          */
+  /*                                                                       */
+  /*    left      :: The horizontal distance from the pen position to the  */
+  /*                 left bitmap border (a.k.a. `left side bearing', or    */
+  /*                 `lsb').                                               */
+  /*                                                                       */
+  /*    top       :: The vertical distance from the pen position (on the   */
+  /*                 baseline) to the upper bitmap border (a.k.a. `top     */
+  /*                 side bearing').  The distance is positive for upwards */
+  /*                 Y coordinates.                                        */
+  /*                                                                       */
+  /*    format    :: The format of the glyph bitmap (monochrome or gray).  */
+  /*                                                                       */
+  /*    max_grays :: Maximum gray level value (in the range 1 to 255).     */
+  /*                                                                       */
+  /*    pitch     :: The number of bytes per bitmap line.  May be positive */
+  /*                 or negative.                                          */
+  /*                                                                       */
+  /*    xadvance  :: The horizontal advance width in pixels.               */
+  /*                                                                       */
+  /*    yadvance  :: The vertical advance height in pixels.                */
+  /*                                                                       */
+  /*    buffer    :: A pointer to the bitmap pixels.                       */
+  /*                                                                       */
+  typedef struct  FTC_SBitRec_
+  {
+    FT_Byte   width;
+    FT_Byte   height;
+    FT_Char   left;
+    FT_Char   top;
+
+    FT_Byte   format;
+    FT_Byte   max_grays;
+    FT_Short  pitch;
+    FT_Char   xadvance;
+    FT_Char   yadvance;
+
+    FT_Byte*  buffer;
+
+  } FTC_SBitRec;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Type>                                                                */
+  /*    FTC_SBitCache                                                      */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A handle to a small bitmap cache.  These are special cache objects */
+  /*    used to store small glyph bitmaps (and anti-aliased pixmaps) in a  */
+  /*    much more efficient way than the traditional glyph image cache     */
+  /*    implemented by @FTC_ImageCache.                                    */
+  /*                                                                       */
+  typedef struct FTC_SBitCacheRec_*  FTC_SBitCache;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FTC_SBitCache_New                                                  */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Creates a new cache to store small glyph bitmaps.                  */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    manager :: A handle to the source cache manager.                   */
+  /*                                                                       */
+  /* <Output>                                                              */
+  /*    acache  :: A handle to the new sbit cache.  NULL in case of error. */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  0 means success.                             */
+  /*                                                                       */
+  FT_EXPORT( FT_Error )
+  FTC_SBitCache_New( FTC_Manager     manager,
+                     FTC_SBitCache  *acache );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FTC_SBitCache_Lookup                                               */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Looks up a given small glyph bitmap in a given sbit cache and      */
+  /*    `lock' it to prevent its flushing from the cache until needed.     */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    cache  :: A handle to the source sbit cache.                       */
+  /*                                                                       */
+  /*    type   :: A pointer to the glyph image type descriptor.            */
+  /*                                                                       */
+  /*    gindex :: The glyph index.                                         */
+  /*                                                                       */
+  /* <Output>                                                              */
+  /*    sbit   :: A handle to a small bitmap descriptor.                   */
+  /*                                                                       */
+  /*    anode  :: Used to return the address of of the corresponding cache */
+  /*              node after incrementing its reference count (see note    */
+  /*              below).                                                  */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  0 means success.                             */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    The small bitmap descriptor and its bit buffer are owned by the    */
+  /*    cache and should never be freed by the application.  They might    */
+  /*    as well disappear from memory on the next cache lookup, so don't   */
+  /*    treat them as persistent data.                                     */
+  /*                                                                       */
+  /*    The descriptor's `buffer' field is set to 0 to indicate a missing  */
+  /*    glyph bitmap.                                                      */
+  /*                                                                       */
+  /*    If `anode' is _not_ NULL, it receives the address of the cache     */
+  /*    node containing the bitmap, after increasing its reference count.  */
+  /*    This ensures that the node (as well as the image) will always be   */
+  /*    kept in the cache until you call @FTC_Node_Unref to `release' it.  */
+  /*                                                                       */
+  /*    If `anode' is NULL, the cache node is left unchanged, which means  */
+  /*    that the bitmap could be flushed out of the cache on the next      */
+  /*    call to one of the caching sub-system APIs.  Don't assume that it  */
+  /*    is persistent!                                                     */
+  /*                                                                       */
+  FT_EXPORT( FT_Error )
+  FTC_SBitCache_Lookup( FTC_SBitCache    cache,
+                        FTC_ImageType    type,
+                        FT_UInt          gindex,
+                        FTC_SBit        *sbit,
+                        FTC_Node        *anode );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FTC_SBitCache_LookupScaler                                         */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A variant of @FTC_SBitCache_Lookup that uses an @FTC_ScalerRec     */
+  /*    to specify the face ID and its size.                               */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    cache      :: A handle to the source sbit cache.                   */
+  /*                                                                       */
+  /*    scaler     :: A pointer to the scaler descriptor.                  */
+  /*                                                                       */
+  /*    load_flags :: The corresponding load flags.                        */
+  /*                                                                       */
+  /*    gindex     :: The glyph index.                                     */
+  /*                                                                       */
+  /* <Output>                                                              */
+  /*    sbit       :: A handle to a small bitmap descriptor.               */
+  /*                                                                       */
+  /*    anode      :: Used to return the address of of the corresponding   */
+  /*                  cache node after incrementing its reference count    */
+  /*                  (see note below).                                    */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  0 means success.                             */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    The small bitmap descriptor and its bit buffer are owned by the    */
+  /*    cache and should never be freed by the application.  They might    */
+  /*    as well disappear from memory on the next cache lookup, so don't   */
+  /*    treat them as persistent data.                                     */
+  /*                                                                       */
+  /*    The descriptor's `buffer' field is set to 0 to indicate a missing  */
+  /*    glyph bitmap.                                                      */
+  /*                                                                       */
+  /*    If `anode' is _not_ NULL, it receives the address of the cache     */
+  /*    node containing the bitmap, after increasing its reference count.  */
+  /*    This ensures that the node (as well as the image) will always be   */
+  /*    kept in the cache until you call @FTC_Node_Unref to `release' it.  */
+  /*                                                                       */
+  /*    If `anode' is NULL, the cache node is left unchanged, which means  */
+  /*    that the bitmap could be flushed out of the cache on the next      */
+  /*    call to one of the caching sub-system APIs.  Don't assume that it  */
+  /*    is persistent!                                                     */
+  /*                                                                       */
+  FT_EXPORT( FT_Error )
+  FTC_SBitCache_LookupScaler( FTC_SBitCache  cache,
+                              FTC_Scaler     scaler,
+                              FT_ULong       load_flags,
+                              FT_UInt        gindex,
+                              FTC_SBit      *sbit,
+                              FTC_Node      *anode );
+
+
+ /* */
+
+#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
+
+  /*@***********************************************************************/
+  /*                                                                       */
+  /* <Struct>                                                              */
+  /*    FTC_FontRec                                                        */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A simple structure used to describe a given `font' to the cache    */
+  /*    manager.  Note that a `font' is the combination of a given face    */
+  /*    with a given character size.                                       */
+  /*                                                                       */
+  /* <Fields>                                                              */
+  /*    face_id    :: The ID of the face to use.                           */
+  /*                                                                       */
+  /*    pix_width  :: The character width in integer pixels.               */
+  /*                                                                       */
+  /*    pix_height :: The character height in integer pixels.              */
+  /*                                                                       */
+  typedef struct  FTC_FontRec_
+  {
+    FTC_FaceID  face_id;
+    FT_UShort   pix_width;
+    FT_UShort   pix_height;
+
+  } FTC_FontRec;
+
+
+  /* */
+
+
+#define FTC_FONT_COMPARE( f1, f2 )                  \
+          ( (f1)->face_id    == (f2)->face_id    && \
+            (f1)->pix_width  == (f2)->pix_width  && \
+            (f1)->pix_height == (f2)->pix_height )
+
+#define FTC_FONT_HASH( f )                              \
+          (FT_UInt32)( FTC_FACE_ID_HASH((f)->face_id) ^ \
+                       ((f)->pix_width << 8)          ^ \
+                       ((f)->pix_height)              )
+
+  typedef FTC_FontRec*  FTC_Font;
+
+
+  FT_EXPORT( FT_Error )
+  FTC_Manager_Lookup_Face( FTC_Manager  manager,
+                           FTC_FaceID   face_id,
+                           FT_Face     *aface );
+
+  FT_EXPORT( FT_Error )
+  FTC_Manager_Lookup_Size( FTC_Manager  manager,
+                           FTC_Font     font,
+                           FT_Face     *aface,
+                           FT_Size     *asize );
+
+#endif /* FT_CONFIG_OPTION_OLD_INTERNALS */
+
+
+ /* */
+
+FT_END_HEADER
+
+#endif /* __FTCACHE_H__ */
+
+
+/* END */
diff --git a/include/freetype2/freetype/ftchapters.h b/include/freetype2/freetype/ftchapters.h
new file mode 100644 (file)
index 0000000..bd812c8
--- /dev/null
@@ -0,0 +1,100 @@
+/***************************************************************************/
+/*                                                                         */
+/* This file defines the structure of the FreeType reference.              */
+/* It is used by the python script which generates the HTML files.         */
+/*                                                                         */
+/***************************************************************************/
+
+
+/***************************************************************************/
+/*                                                                         */
+/* <Chapter>                                                               */
+/*    general_remarks                                                      */
+/*                                                                         */
+/* <Title>                                                                 */
+/*    General Remarks                                                      */
+/*                                                                         */
+/* <Sections>                                                              */
+/*    user_allocation                                                      */
+/*                                                                         */
+/***************************************************************************/
+
+
+/***************************************************************************/
+/*                                                                         */
+/* <Chapter>                                                               */
+/*    core_api                                                             */
+/*                                                                         */
+/* <Title>                                                                 */
+/*    Core API                                                             */
+/*                                                                         */
+/* <Sections>                                                              */
+/*    version                                                              */
+/*    basic_types                                                          */
+/*    base_interface                                                       */
+/*    glyph_management                                                     */
+/*    mac_specific                                                         */
+/*    sizes_management                                                     */
+/*    header_file_macros                                                   */
+/*                                                                         */
+/***************************************************************************/
+
+
+/***************************************************************************/
+/*                                                                         */
+/* <Chapter>                                                               */
+/*    format_specific                                                      */
+/*                                                                         */
+/* <Title>                                                                 */
+/*    Format-Specific API                                                  */
+/*                                                                         */
+/* <Sections>                                                              */
+/*    multiple_masters                                                     */
+/*    truetype_tables                                                      */
+/*    type1_tables                                                         */
+/*    sfnt_names                                                           */
+/*    bdf_fonts                                                            */
+/*    pfr_fonts                                                            */
+/*    winfnt_fonts                                                         */
+/*    font_formats                                                         */
+/*    gasp_table                                                           */
+/*                                                                         */
+/***************************************************************************/
+
+
+/***************************************************************************/
+/*                                                                         */
+/* <Chapter>                                                               */
+/*    cache_subsystem                                                      */
+/*                                                                         */
+/* <Title>                                                                 */
+/*    Cache Sub-System                                                     */
+/*                                                                         */
+/* <Sections>                                                              */
+/*    cache_subsystem                                                      */
+/*                                                                         */
+/***************************************************************************/
+
+
+/***************************************************************************/
+/*                                                                         */
+/* <Chapter>                                                               */
+/*    support_api                                                          */
+/*                                                                         */
+/* <Title>                                                                 */
+/*    Support API                                                          */
+/*                                                                         */
+/* <Sections>                                                              */
+/*    computations                                                         */
+/*    list_processing                                                      */
+/*    outline_processing                                                   */
+/*    bitmap_handling                                                      */
+/*    raster                                                               */
+/*    glyph_stroker                                                        */
+/*    system_interface                                                     */
+/*    module_management                                                    */
+/*    gzip                                                                 */
+/*    lzw                                                                  */
+/*    lcd_filtering                                                        */
+/*                                                                         */
+/***************************************************************************/
diff --git a/include/freetype2/freetype/fterrdef.h b/include/freetype2/freetype/fterrdef.h
new file mode 100644 (file)
index 0000000..d7ad256
--- /dev/null
@@ -0,0 +1,239 @@
+/***************************************************************************/
+/*                                                                         */
+/*  fterrdef.h                                                             */
+/*                                                                         */
+/*    FreeType error codes (specification).                                */
+/*                                                                         */
+/*  Copyright 2002, 2004, 2006, 2007 by                                    */
+/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
+/*                                                                         */
+/*  This file is part of the FreeType project, and may only be used,       */
+/*  modified, and distributed under the terms of the FreeType project      */
+/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
+/*  this file you indicate that you have read the license and              */
+/*  understand and accept it fully.                                        */
+/*                                                                         */
+/***************************************************************************/
+
+
+  /*******************************************************************/
+  /*******************************************************************/
+  /*****                                                         *****/
+  /*****                LIST OF ERROR CODES/MESSAGES             *****/
+  /*****                                                         *****/
+  /*******************************************************************/
+  /*******************************************************************/
+
+
+  /* You need to define both FT_ERRORDEF_ and FT_NOERRORDEF_ before */
+  /* including this file.                                           */
+
+
+  /* generic errors */
+
+  FT_NOERRORDEF_( Ok,                                        0x00, \
+                  "no error" )
+
+  FT_ERRORDEF_( Cannot_Open_Resource,                        0x01, \
+                "cannot open resource" )
+  FT_ERRORDEF_( Unknown_File_Format,                         0x02, \
+                "unknown file format" )
+  FT_ERRORDEF_( Invalid_File_Format,                         0x03, \
+                "broken file" )
+  FT_ERRORDEF_( Invalid_Version,                             0x04, \
+                "invalid FreeType version" )
+  FT_ERRORDEF_( Lower_Module_Version,                        0x05, \
+                "module version is too low" )
+  FT_ERRORDEF_( Invalid_Argument,                            0x06, \
+                "invalid argument" )
+  FT_ERRORDEF_( Unimplemented_Feature,                       0x07, \
+                "unimplemented feature" )
+  FT_ERRORDEF_( Invalid_Table,                               0x08, \
+                "broken table" )
+  FT_ERRORDEF_( Invalid_Offset,                              0x09, \
+                "broken offset within table" )
+  FT_ERRORDEF_( Array_Too_Large,                             0x0A, \
+                "array allocation size too large" )
+
+  /* glyph/character errors */
+
+  FT_ERRORDEF_( Invalid_Glyph_Index,                         0x10, \
+                "invalid glyph index" )
+  FT_ERRORDEF_( Invalid_Character_Code,                      0x11, \
+                "invalid character code" )
+  FT_ERRORDEF_( Invalid_Glyph_Format,                        0x12, \
+                "unsupported glyph image format" )
+  FT_ERRORDEF_( Cannot_Render_Glyph,                         0x13, \
+                "cannot render this glyph format" )
+  FT_ERRORDEF_( Invalid_Outline,                             0x14, \
+                "invalid outline" )
+  FT_ERRORDEF_( Invalid_Composite,                           0x15, \
+                "invalid composite glyph" )
+  FT_ERRORDEF_( Too_Many_Hints,                              0x16, \
+                "too many hints" )
+  FT_ERRORDEF_( Invalid_Pixel_Size,                          0x17, \
+                "invalid pixel size" )
+
+  /* handle errors */
+
+  FT_ERRORDEF_( Invalid_Handle,                              0x20, \
+                "invalid object handle" )
+  FT_ERRORDEF_( Invalid_Library_Handle,                      0x21, \
+                "invalid library handle" )
+  FT_ERRORDEF_( Invalid_Driver_Handle,                       0x22, \
+                "invalid module handle" )
+  FT_ERRORDEF_( Invalid_Face_Handle,                         0x23, \
+                "invalid face handle" )
+  FT_ERRORDEF_( Invalid_Size_Handle,                         0x24, \
+                "invalid size handle" )
+  FT_ERRORDEF_( Invalid_Slot_Handle,                         0x25, \
+                "invalid glyph slot handle" )
+  FT_ERRORDEF_( Invalid_CharMap_Handle,                      0x26, \
+                "invalid charmap handle" )
+  FT_ERRORDEF_( Invalid_Cache_Handle,                        0x27, \
+                "invalid cache manager handle" )
+  FT_ERRORDEF_( Invalid_Stream_Handle,                       0x28, \
+                "invalid stream handle" )
+
+  /* driver errors */
+
+  FT_ERRORDEF_( Too_Many_Drivers,                            0x30, \
+                "too many modules" )
+  FT_ERRORDEF_( Too_Many_Extensions,                         0x31, \
+                "too many extensions" )
+
+  /* memory errors */
+
+  FT_ERRORDEF_( Out_Of_Memory,                               0x40, \
+                "out of memory" )
+  FT_ERRORDEF_( Unlisted_Object,                             0x41, \
+                "unlisted object" )
+
+  /* stream errors */
+
+  FT_ERRORDEF_( Cannot_Open_Stream,                          0x51, \
+                "cannot open stream" )
+  FT_ERRORDEF_( Invalid_Stream_Seek,                         0x52, \
+                "invalid stream seek" )
+  FT_ERRORDEF_( Invalid_Stream_Skip,                         0x53, \
+                "invalid stream skip" )
+  FT_ERRORDEF_( Invalid_Stream_Read,                         0x54, \
+                "invalid stream read" )
+  FT_ERRORDEF_( Invalid_Stream_Operation,                    0x55, \
+                "invalid stream operation" )
+  FT_ERRORDEF_( Invalid_Frame_Operation,                     0x56, \
+                "invalid frame operation" )
+  FT_ERRORDEF_( Nested_Frame_Access,                         0x57, \
+                "nested frame access" )
+  FT_ERRORDEF_( Invalid_Frame_Read,                          0x58, \
+                "invalid frame read" )
+
+  /* raster errors */
+
+  FT_ERRORDEF_( Raster_Uninitialized,                        0x60, \
+                "raster uninitialized" )
+  FT_ERRORDEF_( Raster_Corrupted,                            0x61, \
+                "raster corrupted" )
+  FT_ERRORDEF_( Raster_Overflow,                             0x62, \
+                "raster overflow" )
+  FT_ERRORDEF_( Raster_Negative_Height,                      0x63, \
+                "negative height while rastering" )
+
+  /* cache errors */
+
+  FT_ERRORDEF_( Too_Many_Caches,                             0x70, \
+                "too many registered caches" )
+
+  /* TrueType and SFNT errors */
+
+  FT_ERRORDEF_( Invalid_Opcode,                              0x80, \
+                "invalid opcode" )
+  FT_ERRORDEF_( Too_Few_Arguments,                           0x81, \
+                "too few arguments" )
+  FT_ERRORDEF_( Stack_Overflow,                              0x82, \
+                "stack overflow" )
+  FT_ERRORDEF_( Code_Overflow,                               0x83, \
+                "code overflow" )
+  FT_ERRORDEF_( Bad_Argument,                                0x84, \
+                "bad argument" )
+  FT_ERRORDEF_( Divide_By_Zero,                              0x85, \
+                "division by zero" )
+  FT_ERRORDEF_( Invalid_Reference,                           0x86, \
+                "invalid reference" )
+  FT_ERRORDEF_( Debug_OpCode,                                0x87, \
+                "found debug opcode" )
+  FT_ERRORDEF_( ENDF_In_Exec_Stream,                         0x88, \
+                "found ENDF opcode in execution stream" )
+  FT_ERRORDEF_( Nested_DEFS,                                 0x89, \
+                "nested DEFS" )
+  FT_ERRORDEF_( Invalid_CodeRange,                           0x8A, \
+                "invalid code range" )
+  FT_ERRORDEF_( Execution_Too_Long,                          0x8B, \
+                "execution context too long" )
+  FT_ERRORDEF_( Too_Many_Function_Defs,                      0x8C, \
+                "too many function definitions" )
+  FT_ERRORDEF_( Too_Many_Instruction_Defs,                   0x8D, \
+                "too many instruction definitions" )
+  FT_ERRORDEF_( Table_Missing,                               0x8E, \
+                "SFNT font table missing" )
+  FT_ERRORDEF_( Horiz_Header_Missing,                        0x8F, \
+                "horizontal header (hhea) table missing" )
+  FT_ERRORDEF_( Locations_Missing,                           0x90, \
+                "locations (loca) table missing" )
+  FT_ERRORDEF_( Name_Table_Missing,                          0x91, \
+                "name table missing" )
+  FT_ERRORDEF_( CMap_Table_Missing,                          0x92, \
+                "character map (cmap) table missing" )
+  FT_ERRORDEF_( Hmtx_Table_Missing,                          0x93, \
+                "horizontal metrics (hmtx) table missing" )
+  FT_ERRORDEF_( Post_Table_Missing,                          0x94, \
+                "PostScript (post) table missing" )
+  FT_ERRORDEF_( Invalid_Horiz_Metrics,                       0x95, \
+                "invalid horizontal metrics" )
+  FT_ERRORDEF_( Invalid_CharMap_Format,                      0x96, \
+                "invalid character map (cmap) format" )
+  FT_ERRORDEF_( Invalid_PPem,                                0x97, \
+                "invalid ppem value" )
+  FT_ERRORDEF_( Invalid_Vert_Metrics,                        0x98, \
+                "invalid vertical metrics" )
+  FT_ERRORDEF_( Could_Not_Find_Context,                      0x99, \
+                "could not find context" )
+  FT_ERRORDEF_( Invalid_Post_Table_Format,                   0x9A, \
+                "invalid PostScript (post) table format" )
+  FT_ERRORDEF_( Invalid_Post_Table,                          0x9B, \
+                "invalid PostScript (post) table" )
+
+  /* CFF, CID, and Type 1 errors */
+
+  FT_ERRORDEF_( Syntax_Error,                                0xA0, \
+                "opcode syntax error" )
+  FT_ERRORDEF_( Stack_Underflow,                             0xA1, \
+                "argument stack underflow" )
+  FT_ERRORDEF_( Ignore,                                      0xA2, \
+                "ignore" )
+
+  /* BDF errors */
+
+  FT_ERRORDEF_( Missing_Startfont_Field,                     0xB0, \
+                "`STARTFONT' field missing" )
+  FT_ERRORDEF_( Missing_Font_Field,                          0xB1, \
+                "`FONT' field missing" )
+  FT_ERRORDEF_( Missing_Size_Field,                          0xB2, \
+                "`SIZE' field missing" )
+  FT_ERRORDEF_( Missing_Chars_Field,                         0xB3, \
+                "`CHARS' field missing" )
+  FT_ERRORDEF_( Missing_Startchar_Field,                     0xB4, \
+                "`STARTCHAR' field missing" )
+  FT_ERRORDEF_( Missing_Encoding_Field,                      0xB5, \
+                "`ENCODING' field missing" )
+  FT_ERRORDEF_( Missing_Bbx_Field,                           0xB6, \
+                "`BBX' field missing" )
+  FT_ERRORDEF_( Bbx_Too_Big,                                 0xB7, \
+                "`BBX' too big" )
+  FT_ERRORDEF_( Corrupted_Font_Header,                       0xB8, \
+                "Font header corrupted or missing fields" )
+  FT_ERRORDEF_( Corrupted_Font_Glyphs,                       0xB9, \
+                "Font glyphs corrupted or missing fields" )
+
+
+/* END */
diff --git a/include/freetype2/freetype/fterrors.h b/include/freetype2/freetype/fterrors.h
new file mode 100644 (file)
index 0000000..6600dad
--- /dev/null
@@ -0,0 +1,206 @@
+/***************************************************************************/
+/*                                                                         */
+/*  fterrors.h                                                             */
+/*                                                                         */
+/*    FreeType error code handling (specification).                        */
+/*                                                                         */
+/*  Copyright 1996-2001, 2002, 2004, 2007 by                               */
+/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
+/*                                                                         */
+/*  This file is part of the FreeType project, and may only be used,       */
+/*  modified, and distributed under the terms of the FreeType project      */
+/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
+/*  this file you indicate that you have read the license and              */
+/*  understand and accept it fully.                                        */
+/*                                                                         */
+/***************************************************************************/
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* This special header file is used to define the handling of FT2        */
+  /* enumeration constants.  It can also be used to generate error message */
+  /* strings with a small macro trick explained below.                     */
+  /*                                                                       */
+  /* I - Error Formats                                                     */
+  /* -----------------                                                     */
+  /*                                                                       */
+  /*   The configuration macro FT_CONFIG_OPTION_USE_MODULE_ERRORS can be   */
+  /*   defined in ftoption.h in order to make the higher byte indicate     */
+  /*   the module where the error has happened (this is not compatible     */
+  /*   with standard builds of FreeType 2).  You can then use the macro    */
+  /*   FT_ERROR_BASE macro to extract the generic error code from an       */
+  /*   FT_Error value.                                                     */
+  /*                                                                       */
+  /*                                                                       */
+  /* II - Error Message strings                                            */
+  /* --------------------------                                            */
+  /*                                                                       */
+  /*   The error definitions below are made through special macros that    */
+  /*   allow client applications to build a table of error message strings */
+  /*   if they need it.  The strings are not included in a normal build of */
+  /*   FreeType 2 to save space (most client applications do not use       */
+  /*   them).                                                              */
+  /*                                                                       */
+  /*   To do so, you have to define the following macros before including  */
+  /*   this file:                                                          */
+  /*                                                                       */
+  /*   FT_ERROR_START_LIST ::                                              */
+  /*     This macro is called before anything else to define the start of  */
+  /*     the error list.  It is followed by several FT_ERROR_DEF calls     */
+  /*     (see below).                                                      */
+  /*                                                                       */
+  /*   FT_ERROR_DEF( e, v, s ) ::                                          */
+  /*     This macro is called to define one single error.                  */
+  /*     `e' is the error code identifier (e.g. FT_Err_Invalid_Argument).  */
+  /*     `v' is the error numerical value.                                 */
+  /*     `s' is the corresponding error string.                            */
+  /*                                                                       */
+  /*   FT_ERROR_END_LIST ::                                                */
+  /*     This macro ends the list.                                         */
+  /*                                                                       */
+  /*   Additionally, you have to undefine __FTERRORS_H__ before #including */
+  /*   this file.                                                          */
+  /*                                                                       */
+  /*   Here is a simple example:                                           */
+  /*                                                                       */
+  /*     {                                                                 */
+  /*       #undef __FTERRORS_H__                                           */
+  /*       #define FT_ERRORDEF( e, v, s )  { e, s },                       */
+  /*       #define FT_ERROR_START_LIST     {                               */
+  /*       #define FT_ERROR_END_LIST       { 0, 0 } };                     */
+  /*                                                                       */
+  /*       const struct                                                    */
+  /*       {                                                               */
+  /*         int          err_code;                                        */
+  /*         const char*  err_msg;                                         */
+  /*       } ft_errors[] =                                                 */
+  /*                                                                       */
+  /*       #include FT_ERRORS_H                                            */
+  /*     }                                                                 */
+  /*                                                                       */
+  /*************************************************************************/
+
+
+#ifndef __FTERRORS_H__
+#define __FTERRORS_H__
+
+
+  /* include module base error codes */
+#include FT_MODULE_ERRORS_H
+
+
+  /*******************************************************************/
+  /*******************************************************************/
+  /*****                                                         *****/
+  /*****                       SETUP MACROS                      *****/
+  /*****                                                         *****/
+  /*******************************************************************/
+  /*******************************************************************/
+
+
+#undef  FT_NEED_EXTERN_C
+
+#undef  FT_ERR_XCAT
+#undef  FT_ERR_CAT
+
+#define FT_ERR_XCAT( x, y )  x ## y
+#define FT_ERR_CAT( x, y )   FT_ERR_XCAT( x, y )
+
+
+  /* FT_ERR_PREFIX is used as a prefix for error identifiers. */
+  /* By default, we use `FT_Err_'.                            */
+  /*                                                          */
+#ifndef FT_ERR_PREFIX
+#define FT_ERR_PREFIX  FT_Err_
+#endif
+
+
+  /* FT_ERR_BASE is used as the base for module-specific errors. */
+  /*                                                             */
+#ifdef FT_CONFIG_OPTION_USE_MODULE_ERRORS
+
+#ifndef FT_ERR_BASE
+#define FT_ERR_BASE  FT_Mod_Err_Base
+#endif
+
+#else
+
+#undef FT_ERR_BASE
+#define FT_ERR_BASE  0
+
+#endif /* FT_CONFIG_OPTION_USE_MODULE_ERRORS */
+
+
+  /* If FT_ERRORDEF is not defined, we need to define a simple */
+  /* enumeration type.                                         */
+  /*                                                           */
+#ifndef FT_ERRORDEF
+
+#define FT_ERRORDEF( e, v, s )  e = v,
+#define FT_ERROR_START_LIST     enum {
+#define FT_ERROR_END_LIST       FT_ERR_CAT( FT_ERR_PREFIX, Max ) };
+
+#ifdef __cplusplus
+#define FT_NEED_EXTERN_C
+  extern "C" {
+#endif
+
+#endif /* !FT_ERRORDEF */
+
+
+  /* this macro is used to define an error */
+#define FT_ERRORDEF_( e, v, s )   \
+          FT_ERRORDEF( FT_ERR_CAT( FT_ERR_PREFIX, e ), v + FT_ERR_BASE, s )
+
+  /* this is only used for <module>_Err_Ok, which must be 0! */
+#define FT_NOERRORDEF_( e, v, s ) \
+          FT_ERRORDEF( FT_ERR_CAT( FT_ERR_PREFIX, e ), v, s )
+
+
+#ifdef FT_ERROR_START_LIST
+  FT_ERROR_START_LIST
+#endif
+
+
+  /* now include the error codes */
+#include FT_ERROR_DEFINITIONS_H
+
+
+#ifdef FT_ERROR_END_LIST
+  FT_ERROR_END_LIST
+#endif
+
+
+  /*******************************************************************/
+  /*******************************************************************/
+  /*****                                                         *****/
+  /*****                      SIMPLE CLEANUP                     *****/
+  /*****                                                         *****/
+  /*******************************************************************/
+  /*******************************************************************/
+
+#ifdef FT_NEED_EXTERN_C
+  }
+#endif
+
+#undef FT_ERROR_START_LIST
+#undef FT_ERROR_END_LIST
+
+#undef FT_ERRORDEF
+#undef FT_ERRORDEF_
+#undef FT_NOERRORDEF_
+
+#undef FT_NEED_EXTERN_C
+#undef FT_ERR_CONCAT
+#undef FT_ERR_BASE
+
+  /* FT_KEEP_ERR_PREFIX is needed for ftvalid.h */
+#ifndef FT_KEEP_ERR_PREFIX
+#undef FT_ERR_PREFIX
+#endif
+
+#endif /* __FTERRORS_H__ */
+
+
+/* END */
diff --git a/include/freetype2/freetype/ftgasp.h b/include/freetype2/freetype/ftgasp.h
new file mode 100644 (file)
index 0000000..97cd330
--- /dev/null
@@ -0,0 +1,113 @@
+/***************************************************************************/
+/*                                                                         */
+/*  ftgasp.h                                                               */
+/*                                                                         */
+/*    Access of TrueType's `gasp' table (specification).                   */
+/*                                                                         */
+/*  Copyright 2007 by                                                      */
+/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
+/*                                                                         */
+/*  This file is part of the FreeType project, and may only be used,       */
+/*  modified, and distributed under the terms of the FreeType project      */
+/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
+/*  this file you indicate that you have read the license and              */
+/*  understand and accept it fully.                                        */
+/*                                                                         */
+/***************************************************************************/
+
+
+#ifndef _FT_GASP_H_
+#define _FT_GASP_H_
+
+#include <ft2build.h>
+#include FT_FREETYPE_H
+
+  /***************************************************************************
+   *
+   * @section:
+   *   gasp_table
+   *
+   * @title:
+   *   Gasp Table
+   *
+   * @abstract:
+   *   Retrieving TrueType `gasp' table entries
+   *
+   * @description:
+   *   The function @FT_Get_Gasp can be used to query a TrueType or OpenType
+   *   font for specific entries in their `gasp' table, if any.  This is
+   *   mainly useful when implementing native TrueType hinting with the
+   *   bytecode interpreter to duplicate the Windows text rendering results.
+   */
+
+  /*************************************************************************
+   *
+   * @enum:
+   *   FT_GASP_XXX
+   *
+   * @description:
+   *   A list of values and/or bit-flags returned by the @FT_Get_Gasp
+   *   function.
+   *
+   * @values:
+   *   FT_GASP_NO_TABLE ::
+   *     This special value means that there is no GASP table in this face.
+   *     It is up to the client to decide what to do.
+   *
+   *   FT_GASP_DO_GRIDFIT ::
+   *     Grid-fitting and hinting should be performed at the specified ppem.
+   *     This *really* means TrueType bytecode interpretation.
+   *
+   *   FT_GASP_DO_GRAY ::
+   *     Anti-aliased rendering should be performed at the specified ppem.
+   *
+   *   FT_GASP_SYMMETRIC_SMOOTHING ::
+   *     Smoothing along multiple axes must be used with ClearType.
+   *
+   *   FT_GASP_SYMMETRIC_GRIDFIT ::
+   *     Grid-fitting must be used with ClearType's symmetric smoothing.
+   *
+   * @note:
+   *   `ClearType' is Microsoft's implementation of LCD rendering, partly
+   *   protected by patents.
+   *
+   * @since:
+   *   2.3.0
+   */
+#define FT_GASP_NO_TABLE               -1
+#define FT_GASP_DO_GRIDFIT           0x01
+#define FT_GASP_DO_GRAY              0x02
+#define FT_GASP_SYMMETRIC_SMOOTHING  0x08
+#define FT_GASP_SYMMETRIC_GRIDFIT    0x10
+
+
+  /*************************************************************************
+   *
+   * @func:
+   *   FT_Get_Gasp
+   *
+   * @description:
+   *   Read the `gasp' table from a TrueType or OpenType font file and
+   *   return the entry corresponding to a given character pixel size.
+   *
+   * @input:
+   *   face :: The source face handle.
+   *   ppem :: The vertical character pixel size.
+   *
+   * @return:
+   *   Bit flags (see @FT_GASP_XXX), or @FT_GASP_NO_TABLE is there is no
+   *   `gasp' table in the face.
+   *
+   * @since:
+   *   2.3.0
+   */
+  FT_EXPORT( FT_Int )
+  FT_Get_Gasp( FT_Face  face,
+               FT_UInt  ppem );
+
+/* */
+
+#endif /* _FT_GASP_H_ */
+
+
+/* END */
diff --git a/include/freetype2/freetype/ftglyph.h b/include/freetype2/freetype/ftglyph.h
new file mode 100644 (file)
index 0000000..08058da
--- /dev/null
@@ -0,0 +1,575 @@
+/***************************************************************************/
+/*                                                                         */
+/*  ftglyph.h                                                              */
+/*                                                                         */
+/*    FreeType convenience functions to handle glyphs (specification).     */
+/*                                                                         */
+/*  Copyright 1996-2001, 2002, 2003, 2006 by                               */
+/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
+/*                                                                         */
+/*  This file is part of the FreeType project, and may only be used,       */
+/*  modified, and distributed under the terms of the FreeType project      */
+/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
+/*  this file you indicate that you have read the license and              */
+/*  understand and accept it fully.                                        */
+/*                                                                         */
+/***************************************************************************/
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* This file contains the definition of several convenience functions    */
+  /* that can be used by client applications to easily retrieve glyph      */
+  /* bitmaps and outlines from a given face.                               */
+  /*                                                                       */
+  /* These functions should be optional if you are writing a font server   */
+  /* or text layout engine on top of FreeType.  However, they are pretty   */
+  /* handy for many other simple uses of the library.                      */
+  /*                                                                       */
+  /*************************************************************************/
+
+
+#ifndef __FTGLYPH_H__
+#define __FTGLYPH_H__
+
+
+#include <ft2build.h>
+#include FT_FREETYPE_H
+
+#ifdef FREETYPE_H
+#error "freetype.h of FreeType 1 has been loaded!"
+#error "Please fix the directory search order for header files"
+#error "so that freetype.h of FreeType 2 is found first."
+#endif
+
+
+FT_BEGIN_HEADER
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Section>                                                             */
+  /*    glyph_management                                                   */
+  /*                                                                       */
+  /* <Title>                                                               */
+  /*    Glyph Management                                                   */
+  /*                                                                       */
+  /* <Abstract>                                                            */
+  /*    Generic interface to manage individual glyph data.                 */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    This section contains definitions used to manage glyph data        */
+  /*    through generic FT_Glyph objects.  Each of them can contain a      */
+  /*    bitmap, a vector outline, or even images in other formats.         */
+  /*                                                                       */
+  /*************************************************************************/
+
+
+  /* forward declaration to a private type */
+  typedef struct FT_Glyph_Class_  FT_Glyph_Class;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Type>                                                                */
+  /*    FT_Glyph                                                           */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Handle to an object used to model generic glyph images.  It is a   */
+  /*    pointer to the @FT_GlyphRec structure and can contain a glyph      */
+  /*    bitmap or pointer.                                                 */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    Glyph objects are not owned by the library.  You must thus release */
+  /*    them manually (through @FT_Done_Glyph) _before_ calling            */
+  /*    @FT_Done_FreeType.                                                 */
+  /*                                                                       */
+  typedef struct FT_GlyphRec_*  FT_Glyph;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Struct>                                                              */
+  /*    FT_GlyphRec                                                        */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    The root glyph structure contains a given glyph image plus its     */
+  /*    advance width in 16.16 fixed float format.                         */
+  /*                                                                       */
+  /* <Fields>                                                              */
+  /*    library :: A handle to the FreeType library object.                */
+  /*                                                                       */
+  /*    clazz   :: A pointer to the glyph's class.  Private.               */
+  /*                                                                       */
+  /*    format  :: The format of the glyph's image.                        */
+  /*                                                                       */
+  /*    advance :: A 16.16 vector that gives the glyph's advance width.    */
+  /*                                                                       */
+  typedef struct  FT_GlyphRec_
+  {
+    FT_Library             library;
+    const FT_Glyph_Class*  clazz;
+    FT_Glyph_Format        format;
+    FT_Vector              advance;
+
+  } FT_GlyphRec;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Type>                                                                */
+  /*    FT_BitmapGlyph                                                     */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A handle to an object used to model a bitmap glyph image.  This is */
+  /*    a sub-class of @FT_Glyph, and a pointer to @FT_BitmapGlyphRec.     */
+  /*                                                                       */
+  typedef struct FT_BitmapGlyphRec_*  FT_BitmapGlyph;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Struct>                                                              */
+  /*    FT_BitmapGlyphRec                                                  */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A structure used for bitmap glyph images.  This really is a        */
+  /*    `sub-class' of @FT_GlyphRec.                                       */
+  /*                                                                       */
+  /* <Fields>                                                              */
+  /*    root   :: The root @FT_Glyph fields.                               */
+  /*                                                                       */
+  /*    left   :: The left-side bearing, i.e., the horizontal distance     */
+  /*              from the current pen position to the left border of the  */
+  /*              glyph bitmap.                                            */
+  /*                                                                       */
+  /*    top    :: The top-side bearing, i.e., the vertical distance from   */
+  /*              the current pen position to the top border of the glyph  */
+  /*              bitmap.  This distance is positive for upwards-y!        */
+  /*                                                                       */
+  /*    bitmap :: A descriptor for the bitmap.                             */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    You can typecast an @FT_Glyph to @FT_BitmapGlyph if you have       */
+  /*    `glyph->format == FT_GLYPH_FORMAT_BITMAP'.  This lets you access   */
+  /*    the bitmap's contents easily.                                      */
+  /*                                                                       */
+  /*    The corresponding pixel buffer is always owned by @FT_BitmapGlyph  */
+  /*    and is thus created and destroyed with it.                         */
+  /*                                                                       */
+  typedef struct  FT_BitmapGlyphRec_
+  {
+    FT_GlyphRec  root;
+    FT_Int       left;
+    FT_Int       top;
+    FT_Bitmap    bitmap;
+
+  } FT_BitmapGlyphRec;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Type>                                                                */
+  /*    FT_OutlineGlyph                                                    */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A handle to an object used to model an outline glyph image.  This  */
+  /*    is a sub-class of @FT_Glyph, and a pointer to @FT_OutlineGlyphRec. */
+  /*                                                                       */
+  typedef struct FT_OutlineGlyphRec_*  FT_OutlineGlyph;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Struct>                                                              */
+  /*    FT_OutlineGlyphRec                                                 */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A structure used for outline (vectorial) glyph images.  This       */
+  /*    really is a `sub-class' of @FT_GlyphRec.                           */
+  /*                                                                       */
+  /* <Fields>                                                              */
+  /*    root    :: The root @FT_Glyph fields.                              */
+  /*                                                                       */
+  /*    outline :: A descriptor for the outline.                           */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    You can typecast a @FT_Glyph to @FT_OutlineGlyph if you have       */
+  /*    `glyph->format == FT_GLYPH_FORMAT_OUTLINE'.  This lets you access  */
+  /*    the outline's content easily.                                      */
+  /*                                                                       */
+  /*    As the outline is extracted from a glyph slot, its coordinates are */
+  /*    expressed normally in 26.6 pixels, unless the flag                 */
+  /*    @FT_LOAD_NO_SCALE was used in @FT_Load_Glyph() or @FT_Load_Char(). */
+  /*                                                                       */
+  /*    The outline's tables are always owned by the object and are        */
+  /*    destroyed with it.                                                 */
+  /*                                                                       */
+  typedef struct  FT_OutlineGlyphRec_
+  {
+    FT_GlyphRec  root;
+    FT_Outline   outline;
+
+  } FT_OutlineGlyphRec;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_Get_Glyph                                                       */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A function used to extract a glyph image from a slot.              */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    slot   :: A handle to the source glyph slot.                       */
+  /*                                                                       */
+  /* <Output>                                                              */
+  /*    aglyph :: A handle to the glyph object.                            */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  0 means success.                             */
+  /*                                                                       */
+  FT_EXPORT( FT_Error )
+  FT_Get_Glyph( FT_GlyphSlot  slot,
+                FT_Glyph     *aglyph );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_Glyph_Copy                                                      */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A function used to copy a glyph image.  Note that the created      */
+  /*    @FT_Glyph object must be released with @FT_Done_Glyph.             */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    source :: A handle to the source glyph object.                     */
+  /*                                                                       */
+  /* <Output>                                                              */
+  /*    target :: A handle to the target glyph object.  0 in case of       */
+  /*              error.                                                   */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  0 means success.                             */
+  /*                                                                       */
+  FT_EXPORT( FT_Error )
+  FT_Glyph_Copy( FT_Glyph   source,
+                 FT_Glyph  *target );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_Glyph_Transform                                                 */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Transforms a glyph image if its format is scalable.                */
+  /*                                                                       */
+  /* <InOut>                                                               */
+  /*    glyph  :: A handle to the target glyph object.                     */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    matrix :: A pointer to a 2x2 matrix to apply.                      */
+  /*                                                                       */
+  /*    delta  :: A pointer to a 2d vector to apply.  Coordinates are      */
+  /*              expressed in 1/64th of a pixel.                          */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code (if not 0, the glyph format is not scalable).  */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    The 2x2 transformation matrix is also applied to the glyph's       */
+  /*    advance vector.                                                    */
+  /*                                                                       */
+  FT_EXPORT( FT_Error )
+  FT_Glyph_Transform( FT_Glyph    glyph,
+                      FT_Matrix*  matrix,
+                      FT_Vector*  delta );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Enum>                                                                */
+  /*    FT_Glyph_BBox_Mode                                                 */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    The mode how the values of @FT_Glyph_Get_CBox are returned.        */
+  /*                                                                       */
+  /* <Values>                                                              */
+  /*    FT_GLYPH_BBOX_UNSCALED ::                                          */
+  /*      Return unscaled font units.                                      */
+  /*                                                                       */
+  /*    FT_GLYPH_BBOX_SUBPIXELS ::                                         */
+  /*      Return unfitted 26.6 coordinates.                                */
+  /*                                                                       */
+  /*    FT_GLYPH_BBOX_GRIDFIT ::                                           */
+  /*      Return grid-fitted 26.6 coordinates.                             */
+  /*                                                                       */
+  /*    FT_GLYPH_BBOX_TRUNCATE ::                                          */
+  /*      Return coordinates in integer pixels.                            */
+  /*                                                                       */
+  /*    FT_GLYPH_BBOX_PIXELS ::                                            */
+  /*      Return grid-fitted pixel coordinates.                            */
+  /*                                                                       */
+  typedef enum  FT_Glyph_BBox_Mode_
+  {
+    FT_GLYPH_BBOX_UNSCALED  = 0,
+    FT_GLYPH_BBOX_SUBPIXELS = 0,
+    FT_GLYPH_BBOX_GRIDFIT   = 1,
+    FT_GLYPH_BBOX_TRUNCATE  = 2,
+    FT_GLYPH_BBOX_PIXELS    = 3
+
+  } FT_Glyph_BBox_Mode;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Enum>                                                                */
+  /*    ft_glyph_bbox_xxx                                                  */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    These constants are deprecated.  Use the corresponding             */
+  /*    @FT_Glyph_BBox_Mode values instead.                                */
+  /*                                                                       */
+  /* <Values>                                                              */
+  /*   ft_glyph_bbox_unscaled  :: See @FT_GLYPH_BBOX_UNSCALED.             */
+  /*   ft_glyph_bbox_subpixels :: See @FT_GLYPH_BBOX_SUBPIXELS.            */
+  /*   ft_glyph_bbox_gridfit   :: See @FT_GLYPH_BBOX_GRIDFIT.              */
+  /*   ft_glyph_bbox_truncate  :: See @FT_GLYPH_BBOX_TRUNCATE.             */
+  /*   ft_glyph_bbox_pixels    :: See @FT_GLYPH_BBOX_PIXELS.               */
+  /*                                                                       */
+#define ft_glyph_bbox_unscaled   FT_GLYPH_BBOX_UNSCALED
+#define ft_glyph_bbox_subpixels  FT_GLYPH_BBOX_SUBPIXELS
+#define ft_glyph_bbox_gridfit    FT_GLYPH_BBOX_GRIDFIT
+#define ft_glyph_bbox_truncate   FT_GLYPH_BBOX_TRUNCATE
+#define ft_glyph_bbox_pixels     FT_GLYPH_BBOX_PIXELS
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_Glyph_Get_CBox                                                  */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Return a glyph's `control box'.  The control box encloses all the  */
+  /*    outline's points, including Bézier control points.  Though it      */
+  /*    coincides with the exact bounding box for most glyphs, it can be   */
+  /*    slightly larger in some situations (like when rotating an outline  */
+  /*    which contains Bézier outside arcs).                               */
+  /*                                                                       */
+  /*    Computing the control box is very fast, while getting the bounding */
+  /*    box can take much more time as it needs to walk over all segments  */
+  /*    and arcs in the outline.  To get the latter, you can use the       */
+  /*    `ftbbox' component which is dedicated to this single task.         */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    glyph :: A handle to the source glyph object.                      */
+  /*                                                                       */
+  /*    mode  :: The mode which indicates how to interpret the returned    */
+  /*             bounding box values.                                      */
+  /*                                                                       */
+  /* <Output>                                                              */
+  /*    acbox :: The glyph coordinate bounding box.  Coordinates are       */
+  /*             expressed in 1/64th of pixels if it is grid-fitted.       */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    Coordinates are relative to the glyph origin, using the Y-upwards  */
+  /*    convention.                                                        */
+  /*                                                                       */
+  /*    If the glyph has been loaded with @FT_LOAD_NO_SCALE, `bbox_mode'   */
+  /*    must be set to @FT_GLYPH_BBOX_UNSCALED to get unscaled font        */
+  /*    units in 26.6 pixel format.  The value @FT_GLYPH_BBOX_SUBPIXELS    */
+  /*    is another name for this constant.                                 */
+  /*                                                                       */
+  /*    Note that the maximum coordinates are exclusive, which means that  */
+  /*    one can compute the width and height of the glyph image (be it in  */
+  /*    integer or 26.6 pixels) as:                                        */
+  /*                                                                       */
+  /*    {                                                                  */
+  /*      width  = bbox.xMax - bbox.xMin;                                  */
+  /*      height = bbox.yMax - bbox.yMin;                                  */
+  /*    }                                                                  */
+  /*                                                                       */
+  /*    Note also that for 26.6 coordinates, if `bbox_mode' is set to      */
+  /*    @FT_GLYPH_BBOX_GRIDFIT, the coordinates will also be grid-fitted,  */
+  /*    which corresponds to:                                              */
+  /*                                                                       */
+  /*    {                                                                  */
+  /*      bbox.xMin = FLOOR(bbox.xMin);                                    */
+  /*      bbox.yMin = FLOOR(bbox.yMin);                                    */
+  /*      bbox.xMax = CEILING(bbox.xMax);                                  */
+  /*      bbox.yMax = CEILING(bbox.yMax);                                  */
+  /*    }                                                                  */
+  /*                                                                       */
+  /*    To get the bbox in pixel coordinates, set `bbox_mode' to           */
+  /*    @FT_GLYPH_BBOX_TRUNCATE.                                           */
+  /*                                                                       */
+  /*    To get the bbox in grid-fitted pixel coordinates, set `bbox_mode'  */
+  /*    to @FT_GLYPH_BBOX_PIXELS.                                          */
+  /*                                                                       */
+  FT_EXPORT( void )
+  FT_Glyph_Get_CBox( FT_Glyph  glyph,
+                     FT_UInt   bbox_mode,
+                     FT_BBox  *acbox );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_Glyph_To_Bitmap                                                 */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Converts a given glyph object to a bitmap glyph object.            */
+  /*                                                                       */
+  /* <InOut>                                                               */
+  /*    the_glyph   :: A pointer to a handle to the target glyph.          */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    render_mode :: An enumeration that describe how the data is        */
+  /*                   rendered.                                           */
+  /*                                                                       */
+  /*    origin      :: A pointer to a vector used to translate the glyph   */
+  /*                   image before rendering.  Can be 0 (if no            */
+  /*                   translation).  The origin is expressed in           */
+  /*                   26.6 pixels.                                        */
+  /*                                                                       */
+  /*    destroy     :: A boolean that indicates that the original glyph    */
+  /*                   image should be destroyed by this function.  It is  */
+  /*                   never destroyed in case of error.                   */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  0 means success.                             */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    The glyph image is translated with the `origin' vector before      */
+  /*    rendering.                                                         */
+  /*                                                                       */
+  /*    The first parameter is a pointer to an @FT_Glyph handle, that will */
+  /*    be replaced by this function.  Typically, you would use (omitting  */
+  /*    error handling):                                                   */
+  /*                                                                       */
+  /*                                                                       */
+  /*      {                                                                */
+  /*        FT_Glyph        glyph;                                         */
+  /*        FT_BitmapGlyph  glyph_bitmap;                                  */
+  /*                                                                       */
+  /*                                                                       */
+  /*        // load glyph                                                  */
+  /*        error = FT_Load_Char( face, glyph_index, FT_LOAD_DEFAUT );     */
+  /*                                                                       */
+  /*        // extract glyph image                                         */
+  /*        error = FT_Get_Glyph( face->glyph, &glyph );                   */
+  /*                                                                       */
+  /*        // convert to a bitmap (default render mode + destroy old)     */
+  /*        if ( glyph->format != FT_GLYPH_FORMAT_BITMAP )                 */
+  /*        {                                                              */
+  /*          error = FT_Glyph_To_Bitmap( &glyph, FT_RENDER_MODE_DEFAULT,  */
+  /*                                      0, 1 );                          */
+  /*          if ( error ) // glyph unchanged                              */
+  /*            ...                                                        */
+  /*        }                                                              */
+  /*                                                                       */
+  /*        // access bitmap content by typecasting                        */
+  /*        glyph_bitmap = (FT_BitmapGlyph)glyph;                          */
+  /*                                                                       */
+  /*        // do funny stuff with it, like blitting/drawing               */
+  /*        ...                                                            */
+  /*                                                                       */
+  /*        // discard glyph image (bitmap or not)                         */
+  /*        FT_Done_Glyph( glyph );                                        */
+  /*      }                                                                */
+  /*                                                                       */
+  /*                                                                       */
+  /*    This function does nothing if the glyph format isn't scalable.     */
+  /*                                                                       */
+  FT_EXPORT( FT_Error )
+  FT_Glyph_To_Bitmap( FT_Glyph*       the_glyph,
+                      FT_Render_Mode  render_mode,
+                      FT_Vector*      origin,
+                      FT_Bool         destroy );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_Done_Glyph                                                      */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Destroys a given glyph.                                            */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    glyph :: A handle to the target glyph object.                      */
+  /*                                                                       */
+  FT_EXPORT( void )
+  FT_Done_Glyph( FT_Glyph  glyph );
+
+  /* */
+
+
+  /* other helpful functions */
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Section>                                                             */
+  /*    computations                                                       */
+  /*                                                                       */
+  /*************************************************************************/
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_Matrix_Multiply                                                 */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Performs the matrix operation `b = a*b'.                           */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    a :: A pointer to matrix `a'.                                      */
+  /*                                                                       */
+  /* <InOut>                                                               */
+  /*    b :: A pointer to matrix `b'.                                      */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    The result is undefined if either `a' or `b' is zero.              */
+  /*                                                                       */
+  FT_EXPORT( void )
+  FT_Matrix_Multiply( const FT_Matrix*  a,
+                      FT_Matrix*  b );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_Matrix_Invert                                                   */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Inverts a 2x2 matrix.  Returns an error if it can't be inverted.   */
+  /*                                                                       */
+  /* <InOut>                                                               */
+  /*    matrix :: A pointer to the target matrix.  Remains untouched in    */
+  /*              case of error.                                           */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  0 means success.                             */
+  /*                                                                       */
+  FT_EXPORT( FT_Error )
+  FT_Matrix_Invert( FT_Matrix*  matrix );
+
+
+  /* */
+
+
+FT_END_HEADER
+
+#endif /* __FTGLYPH_H__ */
+
+
+/* END */
+
+
+/* Local Variables: */
+/* coding: utf-8    */
+/* End:             */
diff --git a/include/freetype2/freetype/ftgxval.h b/include/freetype2/freetype/ftgxval.h
new file mode 100644 (file)
index 0000000..c7ea861
--- /dev/null
@@ -0,0 +1,358 @@
+/***************************************************************************/
+/*                                                                         */
+/*  ftgxval.h                                                              */
+/*                                                                         */
+/*    FreeType API for validating TrueTypeGX/AAT tables (specification).   */
+/*                                                                         */
+/*  Copyright 2004, 2005, 2006 by                                          */
+/*  Masatake YAMATO, Redhat K.K,                                           */
+/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
+/*                                                                         */
+/*  This file is part of the FreeType project, and may only be used,       */
+/*  modified, and distributed under the terms of the FreeType project      */
+/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
+/*  this file you indicate that you have read the license and              */
+/*  understand and accept it fully.                                        */
+/*                                                                         */
+/***************************************************************************/
+
+/***************************************************************************/
+/*                                                                         */
+/* gxvalid is derived from both gxlayout module and otvalid module.        */
+/* Development of gxlayout is supported by the Information-technology      */
+/* Promotion Agency(IPA), Japan.                                           */
+/*                                                                         */
+/***************************************************************************/
+
+
+#ifndef __FTGXVAL_H__
+#define __FTGXVAL_H__
+
+#include <ft2build.h>
+#include FT_FREETYPE_H
+
+#ifdef FREETYPE_H
+#error "freetype.h of FreeType 1 has been loaded!"
+#error "Please fix the directory search order for header files"
+#error "so that freetype.h of FreeType 2 is found first."
+#endif
+
+
+FT_BEGIN_HEADER
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Section>                                                             */
+  /*    gx_validation                                                      */
+  /*                                                                       */
+  /* <Title>                                                               */
+  /*    TrueTypeGX/AAT Validation                                          */
+  /*                                                                       */
+  /* <Abstract>                                                            */
+  /*    An API to validate TrueTypeGX/AAT tables.                          */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    This section contains the declaration of functions to validate     */
+  /*    some TrueTypeGX tables (feat, mort, morx, bsln, just, kern, opbd,  */
+  /*    trak, prop, lcar).                                                 */
+  /*                                                                       */
+  /*************************************************************************/
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /*                                                                       */
+  /* Warning: Use FT_VALIDATE_XXX to validate a table.                     */
+  /*          Following definitions are for gxvalid developers.            */
+  /*                                                                       */
+  /*                                                                       */
+  /*************************************************************************/
+
+#define FT_VALIDATE_feat_INDEX     0
+#define FT_VALIDATE_mort_INDEX     1
+#define FT_VALIDATE_morx_INDEX     2
+#define FT_VALIDATE_bsln_INDEX     3
+#define FT_VALIDATE_just_INDEX     4
+#define FT_VALIDATE_kern_INDEX     5
+#define FT_VALIDATE_opbd_INDEX     6
+#define FT_VALIDATE_trak_INDEX     7
+#define FT_VALIDATE_prop_INDEX     8
+#define FT_VALIDATE_lcar_INDEX     9
+#define FT_VALIDATE_GX_LAST_INDEX  FT_VALIDATE_lcar_INDEX
+
+
+  /*************************************************************************
+   *
+   * @macro:
+   *   FT_VALIDATE_GX_LENGTH
+   *
+   * @description:
+   *   The number of tables checked in this module.  Use it as a parameter
+   *   for the `table-length' argument of function @FT_TrueTypeGX_Validate.
+   */
+#define FT_VALIDATE_GX_LENGTH     (FT_VALIDATE_GX_LAST_INDEX + 1)
+
+  /* */
+
+  /* Up to 0x1000 is used by otvalid.
+     Ox2xxx is reserved for feature OT extension. */
+#define FT_VALIDATE_GX_START 0x4000
+#define FT_VALIDATE_GX_BITFIELD( tag )                  \
+  ( FT_VALIDATE_GX_START << FT_VALIDATE_##tag##_INDEX )
+
+
+ /**********************************************************************
+  *
+  * @enum:
+  *    FT_VALIDATE_GXXXX
+  *
+  * @description:
+  *    A list of bit-field constants used with @FT_TrueTypeGX_Validate to
+  *    indicate which TrueTypeGX/AAT Type tables should be validated.
+  *
+  * @values:
+  *    FT_VALIDATE_feat ::
+  *      Validate `feat' table.
+  *
+  *    FT_VALIDATE_mort ::
+  *      Validate `mort' table.
+  *
+  *    FT_VALIDATE_morx ::
+  *      Validate `morx' table.
+  *
+  *    FT_VALIDATE_bsln ::
+  *      Validate `bsln' table.
+  *
+  *    FT_VALIDATE_just ::
+  *      Validate `just' table.
+  *
+  *    FT_VALIDATE_kern ::
+  *      Validate `kern' table.
+  *
+  *    FT_VALIDATE_opbd ::
+  *      Validate `opbd' table.
+  *
+  *    FT_VALIDATE_trak ::
+  *      Validate `trak' table.
+  *
+  *    FT_VALIDATE_prop ::
+  *      Validate `prop' table.
+  *
+  *    FT_VALIDATE_lcar ::
+  *      Validate `lcar' table.
+  *
+  *    FT_VALIDATE_GX ::
+  *      Validate all TrueTypeGX tables (feat, mort, morx, bsln, just, kern,
+  *      opbd, trak, prop and lcar).
+  *
+  */
+
+#define FT_VALIDATE_feat  FT_VALIDATE_GX_BITFIELD( feat )
+#define FT_VALIDATE_mort  FT_VALIDATE_GX_BITFIELD( mort )
+#define FT_VALIDATE_morx  FT_VALIDATE_GX_BITFIELD( morx )
+#define FT_VALIDATE_bsln  FT_VALIDATE_GX_BITFIELD( bsln )
+#define FT_VALIDATE_just  FT_VALIDATE_GX_BITFIELD( just )
+#define FT_VALIDATE_kern  FT_VALIDATE_GX_BITFIELD( kern )
+#define FT_VALIDATE_opbd  FT_VALIDATE_GX_BITFIELD( opbd )
+#define FT_VALIDATE_trak  FT_VALIDATE_GX_BITFIELD( trak )
+#define FT_VALIDATE_prop  FT_VALIDATE_GX_BITFIELD( prop )
+#define FT_VALIDATE_lcar  FT_VALIDATE_GX_BITFIELD( lcar )
+
+#define FT_VALIDATE_GX  ( FT_VALIDATE_feat | \
+                          FT_VALIDATE_mort | \
+                          FT_VALIDATE_morx | \
+                          FT_VALIDATE_bsln | \
+                          FT_VALIDATE_just | \
+                          FT_VALIDATE_kern | \
+                          FT_VALIDATE_opbd | \
+                          FT_VALIDATE_trak | \
+                          FT_VALIDATE_prop | \
+                          FT_VALIDATE_lcar )
+
+
+  /* */
+
+ /**********************************************************************
+  *
+  * @function:
+  *    FT_TrueTypeGX_Validate
+  *
+  * @description:
+  *    Validate various TrueTypeGX tables to assure that all offsets and
+  *    indices are valid.  The idea is that a higher-level library which
+  *    actually does the text layout can access those tables without
+  *    error checking (which can be quite time consuming).
+  *
+  * @input:
+  *    face ::
+  *       A handle to the input face.
+  *
+  *    validation_flags ::
+  *       A bit field which specifies the tables to be validated.  See
+  *       @FT_VALIDATE_GXXXX for possible values.
+  *
+  *    table_length ::
+  *       The size of the `tables' array.  Normally, @FT_VALIDATE_GX_LENGTH
+  *       should be passed.
+  *
+  * @output:
+  *    tables ::
+  *       The array where all validated sfnt tables are stored.
+  *       The array itself must be allocated by a client.
+  *
+  * @return:
+  *   FreeType error code.  0 means success.
+  *
+  * @note:
+  *   This function only works with TrueTypeGX fonts, returning an error
+  *   otherwise.
+  *
+  *   After use, the application should deallocate the buffers pointed to by
+  *   each `tables' element, by calling @FT_TrueTypeGX_Free.  A NULL value
+  *   indicates that the table either doesn't exist in the font, the
+  *   application hasn't asked for validation, or the validator doesn't have
+  *   the ability to validate the sfnt table.
+  */
+  FT_EXPORT( FT_Error )
+  FT_TrueTypeGX_Validate( FT_Face   face,
+                          FT_UInt   validation_flags,
+                          FT_Bytes  tables[FT_VALIDATE_GX_LENGTH],
+                          FT_UInt   table_length );
+
+
+  /* */
+
+ /**********************************************************************
+  *
+  * @function:
+  *    FT_TrueTypeGX_Free
+  *
+  * @description:
+  *    Free the buffer allocated by TrueTypeGX validator.
+  *
+  * @input:
+  *    face ::
+  *       A handle to the input face.
+  *
+  *    table ::
+  *       The pointer to the buffer allocated by
+  *       @FT_TrueTypeGX_Validate.
+  *
+  * @note:
+  *   This function must be used to free the buffer allocated by
+  *   @FT_TrueTypeGX_Validate only.
+  */
+  FT_EXPORT( void )
+  FT_TrueTypeGX_Free( FT_Face   face,
+                      FT_Bytes  table );
+
+
+  /* */
+
+ /**********************************************************************
+  *
+  * @enum:
+  *    FT_VALIDATE_CKERNXXX
+  *
+  * @description:
+  *    A list of bit-field constants used with @FT_ClassicKern_Validate
+  *    to indicate the classic kern dialect or dialects.  If the selected
+  *    type doesn't fit, @FT_ClassicKern_Validate regards the table as
+  *    invalid.
+  *
+  * @values:
+  *    FT_VALIDATE_MS ::
+  *      Handle the `kern' table as a classic Microsoft kern table.
+  *
+  *    FT_VALIDATE_APPLE ::
+  *      Handle the `kern' table as a classic Apple kern table.
+  *
+  *    FT_VALIDATE_CKERN ::
+  *      Handle the `kern' as either classic Apple or Microsoft kern table.
+  */
+#define FT_VALIDATE_MS     ( FT_VALIDATE_GX_START << 0 )
+#define FT_VALIDATE_APPLE  ( FT_VALIDATE_GX_START << 1 )
+
+#define FT_VALIDATE_CKERN  ( FT_VALIDATE_MS | FT_VALIDATE_APPLE )
+
+
+  /* */
+
+ /**********************************************************************
+  *
+  * @function:
+  *    FT_ClassicKern_Validate
+  *
+  * @description:
+  *    Validate classic (16bit format) kern table to assure that the offsets
+  *    and indices are valid.  The idea is that a higher-level library which
+  *    actually does the text layout can access those tables without error
+  *    checking (which can be quite time consuming).
+  *
+  *    The `kern' table validator in @FT_TrueTypeGX_Validate deals with both
+  *    the new 32bit format and the classic 16bit format, while
+  *    FT_ClassicKern_Validate only supports the classic 16bit format.
+  *
+  * @input:
+  *    face ::
+  *       A handle to the input face.
+  *
+  *    validation_flags ::
+  *       A bit field which specifies the dialect to be validated.  See
+  *       @FT_VALIDATE_CKERNXXX for possible values.
+  *
+  * @output:
+  *    ckern_table ::
+  *       A pointer to the kern table.
+  *
+  * @return:
+  *   FreeType error code.  0 means success.
+  *
+  * @note:
+  *   After use, the application should deallocate the buffers pointed to by
+  *   `ckern_table', by calling @FT_ClassicKern_Free.  A NULL value
+  *   indicates that the table doesn't exist in the font.
+  */
+  FT_EXPORT( FT_Error )
+  FT_ClassicKern_Validate( FT_Face    face,
+                           FT_UInt    validation_flags,
+                           FT_Bytes  *ckern_table );
+
+
+  /* */
+
+ /**********************************************************************
+  *
+  * @function:
+  *    FT_ClassicKern_Free
+  *
+  * @description:
+  *    Free the buffer allocated by classic Kern validator.
+  *
+  * @input:
+  *    face ::
+  *       A handle to the input face.
+  *
+  *    table ::
+  *       The pointer to the buffer that is allocated by
+  *       @FT_ClassicKern_Validate.
+  *
+  * @note:
+  *   This function must be used to free the buffer allocated by
+  *   @FT_ClassicKern_Validate only.
+  */
+  FT_EXPORT( void )
+  FT_ClassicKern_Free( FT_Face   face,
+                       FT_Bytes  table );
+
+
+ /* */
+
+
+FT_END_HEADER
+
+#endif /* __FTGXVAL_H__ */
+
+
+/* END */
diff --git a/include/freetype2/freetype/ftgzip.h b/include/freetype2/freetype/ftgzip.h
new file mode 100644 (file)
index 0000000..9893437
--- /dev/null
@@ -0,0 +1,102 @@
+/***************************************************************************/
+/*                                                                         */
+/*  ftgzip.h                                                               */
+/*                                                                         */
+/*    Gzip-compressed stream support.                                      */
+/*                                                                         */
+/*  Copyright 2002, 2003, 2004, 2006 by                                    */
+/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
+/*                                                                         */
+/*  This file is part of the FreeType project, and may only be used,       */
+/*  modified, and distributed under the terms of the FreeType project      */
+/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
+/*  this file you indicate that you have read the license and              */
+/*  understand and accept it fully.                                        */
+/*                                                                         */
+/***************************************************************************/
+
+
+#ifndef __FTGZIP_H__
+#define __FTGZIP_H__
+
+#include <ft2build.h>
+#include FT_FREETYPE_H
+
+#ifdef FREETYPE_H
+#error "freetype.h of FreeType 1 has been loaded!"
+#error "Please fix the directory search order for header files"
+#error "so that freetype.h of FreeType 2 is found first."
+#endif
+
+
+FT_BEGIN_HEADER
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Section>                                                             */
+  /*    gzip                                                               */
+  /*                                                                       */
+  /* <Title>                                                               */
+  /*    GZIP Streams                                                       */
+  /*                                                                       */
+  /* <Abstract>                                                            */
+  /*    Using gzip-compressed font files.                                  */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    This section contains the declaration of Gzip-specific functions.  */
+  /*                                                                       */
+  /*************************************************************************/
+
+
+ /************************************************************************
+  *
+  * @function:
+  *   FT_Stream_OpenGzip
+  *
+  * @description:
+  *   Open a new stream to parse gzip-compressed font files.  This is
+  *   mainly used to support the compressed `*.pcf.gz' fonts that come
+  *   with XFree86.
+  *
+  * @input:
+  *   stream ::
+  *     The target embedding stream.
+  *
+  *   source ::
+  *     The source stream.
+  *
+  * @return:
+  *   FreeType error code.  0 means success.
+  *
+  * @note:
+  *   The source stream must be opened _before_ calling this function.
+  *
+  *   Calling the internal function `FT_Stream_Close' on the new stream will
+  *   *not* call `FT_Stream_Close' on the source stream.  None of the stream
+  *   objects will be released to the heap.
+  *
+  *   The stream implementation is very basic and resets the decompression
+  *   process each time seeking backwards is needed within the stream.
+  *
+  *   In certain builds of the library, gzip compression recognition is
+  *   automatically handled when calling @FT_New_Face or @FT_Open_Face.
+  *   This means that if no font driver is capable of handling the raw
+  *   compressed file, the library will try to open a gzipped stream from
+  *   it and re-open the face with it.
+  *
+  *   This function may return `FT_Err_Unimplemented_Feature' if your build
+  *   of FreeType was not compiled with zlib support.
+  */
+  FT_EXPORT( FT_Error )
+  FT_Stream_OpenGzip( FT_Stream  stream,
+                      FT_Stream  source );
+
+ /* */
+
+
+FT_END_HEADER
+
+#endif /* __FTGZIP_H__ */
+
+
+/* END */
diff --git a/include/freetype2/freetype/ftimage.h b/include/freetype2/freetype/ftimage.h
new file mode 100644 (file)
index 0000000..1c428f1
--- /dev/null
@@ -0,0 +1,1237 @@
+/***************************************************************************/
+/*                                                                         */
+/*  ftimage.h                                                              */
+/*                                                                         */
+/*    FreeType glyph image formats and default raster interface            */
+/*    (specification).                                                     */
+/*                                                                         */
+/*  Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007 by             */
+/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
+/*                                                                         */
+/*  This file is part of the FreeType project, and may only be used,       */
+/*  modified, and distributed under the terms of the FreeType project      */
+/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
+/*  this file you indicate that you have read the license and              */
+/*  understand and accept it fully.                                        */
+/*                                                                         */
+/***************************************************************************/
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* Note: A `raster' is simply a scan-line converter, used to render      */
+  /*       FT_Outlines into FT_Bitmaps.                                    */
+  /*                                                                       */
+  /*************************************************************************/
+
+
+#ifndef __FTIMAGE_H__
+#define __FTIMAGE_H__
+
+
+/* _STANDALONE_ is from ftgrays.c */
+#ifndef _STANDALONE_
+#include <ft2build.h>
+#endif
+
+
+FT_BEGIN_HEADER
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Section>                                                             */
+  /*    basic_types                                                        */
+  /*                                                                       */
+  /*************************************************************************/
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Type>                                                                */
+  /*    FT_Pos                                                             */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    The type FT_Pos is a 32-bit integer used to store vectorial        */
+  /*    coordinates.  Depending on the context, these can represent        */
+  /*    distances in integer font units, or 16,16, or 26.6 fixed float     */
+  /*    pixel coordinates.                                                 */
+  /*                                                                       */
+  typedef signed long  FT_Pos;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Struct>                                                              */
+  /*    FT_Vector                                                          */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A simple structure used to store a 2D vector; coordinates are of   */
+  /*    the FT_Pos type.                                                   */
+  /*                                                                       */
+  /* <Fields>                                                              */
+  /*    x :: The horizontal coordinate.                                    */
+  /*    y :: The vertical coordinate.                                      */
+  /*                                                                       */
+  typedef struct  FT_Vector_
+  {
+    FT_Pos  x;
+    FT_Pos  y;
+
+  } FT_Vector;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Struct>                                                              */
+  /*    FT_BBox                                                            */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A structure used to hold an outline's bounding box, i.e., the      */
+  /*    coordinates of its extrema in the horizontal and vertical          */
+  /*    directions.                                                        */
+  /*                                                                       */
+  /* <Fields>                                                              */
+  /*    xMin :: The horizontal minimum (left-most).                        */
+  /*                                                                       */
+  /*    yMin :: The vertical minimum (bottom-most).                        */
+  /*                                                                       */
+  /*    xMax :: The horizontal maximum (right-most).                       */
+  /*                                                                       */
+  /*    yMax :: The vertical maximum (top-most).                           */
+  /*                                                                       */
+  typedef struct  FT_BBox_
+  {
+    FT_Pos  xMin, yMin;
+    FT_Pos  xMax, yMax;
+
+  } FT_BBox;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Enum>                                                                */
+  /*    FT_Pixel_Mode                                                      */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    An enumeration type used to describe the format of pixels in a     */
+  /*    given bitmap.  Note that additional formats may be added in the    */
+  /*    future.                                                            */
+  /*                                                                       */
+  /* <Values>                                                              */
+  /*    FT_PIXEL_MODE_NONE ::                                              */
+  /*      Value 0 is reserved.                                             */
+  /*                                                                       */
+  /*    FT_PIXEL_MODE_MONO ::                                              */
+  /*      A monochrome bitmap, using 1 bit per pixel.  Note that pixels    */
+  /*      are stored in most-significant order (MSB), which means that     */
+  /*      the left-most pixel in a byte has value 128.                     */
+  /*                                                                       */
+  /*    FT_PIXEL_MODE_GRAY ::                                              */
+  /*      An 8-bit bitmap, generally used to represent anti-aliased glyph  */
+  /*      images.  Each pixel is stored in one byte.  Note that the number */
+  /*      of value `gray' levels is stored in the `num_bytes' field of     */
+  /*      the @FT_Bitmap structure (it generally is 256).                  */
+  /*                                                                       */
+  /*    FT_PIXEL_MODE_GRAY2 ::                                             */
+  /*      A 2-bit/pixel bitmap, used to represent embedded anti-aliased    */
+  /*      bitmaps in font files according to the OpenType specification.   */
+  /*      We haven't found a single font using this format, however.       */
+  /*                                                                       */
+  /*    FT_PIXEL_MODE_GRAY4 ::                                             */
+  /*      A 4-bit/pixel bitmap, used to represent embedded anti-aliased    */
+  /*      bitmaps in font files according to the OpenType specification.   */
+  /*      We haven't found a single font using this format, however.       */
+  /*                                                                       */
+  /*    FT_PIXEL_MODE_LCD ::                                               */
+  /*      An 8-bit bitmap, used to represent RGB or BGR decimated glyph    */
+  /*      images used for display on LCD displays; the bitmap is three     */
+  /*      times wider than the original glyph image.  See also             */
+  /*      @FT_RENDER_MODE_LCD.                                             */
+  /*                                                                       */
+  /*    FT_PIXEL_MODE_LCD_V ::                                             */
+  /*      An 8-bit bitmap, used to represent RGB or BGR decimated glyph    */
+  /*      images used for display on rotated LCD displays; the bitmap      */
+  /*      is three times taller than the original glyph image.  See also   */
+  /*      @FT_RENDER_MODE_LCD_V.                                           */
+  /*                                                                       */
+  typedef enum  FT_Pixel_Mode_
+  {
+    FT_PIXEL_MODE_NONE = 0,
+    FT_PIXEL_MODE_MONO,
+    FT_PIXEL_MODE_GRAY,
+    FT_PIXEL_MODE_GRAY2,
+    FT_PIXEL_MODE_GRAY4,
+    FT_PIXEL_MODE_LCD,
+    FT_PIXEL_MODE_LCD_V,
+
+    FT_PIXEL_MODE_MAX      /* do not remove */
+
+  } FT_Pixel_Mode;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Enum>                                                                */
+  /*    ft_pixel_mode_xxx                                                  */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A list of deprecated constants.  Use the corresponding             */
+  /*    @FT_Pixel_Mode values instead.                                     */
+  /*                                                                       */
+  /* <Values>                                                              */
+  /*    ft_pixel_mode_none  :: See @FT_PIXEL_MODE_NONE.                    */
+  /*    ft_pixel_mode_mono  :: See @FT_PIXEL_MODE_MONO.                    */
+  /*    ft_pixel_mode_grays :: See @FT_PIXEL_MODE_GRAY.                    */
+  /*    ft_pixel_mode_pal2  :: See @FT_PIXEL_MODE_GRAY2.                   */
+  /*    ft_pixel_mode_pal4  :: See @FT_PIXEL_MODE_GRAY4.                   */
+  /*                                                                       */
+#define ft_pixel_mode_none   FT_PIXEL_MODE_NONE
+#define ft_pixel_mode_mono   FT_PIXEL_MODE_MONO
+#define ft_pixel_mode_grays  FT_PIXEL_MODE_GRAY
+#define ft_pixel_mode_pal2   FT_PIXEL_MODE_GRAY2
+#define ft_pixel_mode_pal4   FT_PIXEL_MODE_GRAY4
+
+ /* */
+
+#if 0
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Enum>                                                                */
+  /*    FT_Palette_Mode                                                    */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    THIS TYPE IS DEPRECATED.  DO NOT USE IT!                           */
+  /*                                                                       */
+  /*    An enumeration type to describe the format of a bitmap palette,    */
+  /*    used with ft_pixel_mode_pal4 and ft_pixel_mode_pal8.               */
+  /*                                                                       */
+  /* <Fields>                                                              */
+  /*    ft_palette_mode_rgb  :: The palette is an array of 3-bytes RGB     */
+  /*                            records.                                   */
+  /*                                                                       */
+  /*    ft_palette_mode_rgba :: The palette is an array of 4-bytes RGBA    */
+  /*                            records.                                   */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    As ft_pixel_mode_pal2, pal4 and pal8 are currently unused by       */
+  /*    FreeType, these types are not handled by the library itself.       */
+  /*                                                                       */
+  typedef enum  FT_Palette_Mode_
+  {
+    ft_palette_mode_rgb = 0,
+    ft_palette_mode_rgba,
+
+    ft_palettte_mode_max   /* do not remove */
+
+  } FT_Palette_Mode;
+
+  /* */
+
+#endif
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Struct>                                                              */
+  /*    FT_Bitmap                                                          */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A structure used to describe a bitmap or pixmap to the raster.     */
+  /*    Note that we now manage pixmaps of various depths through the      */
+  /*    `pixel_mode' field.                                                */
+  /*                                                                       */
+  /* <Fields>                                                              */
+  /*    rows         :: The number of bitmap rows.                         */
+  /*                                                                       */
+  /*    width        :: The number of pixels in bitmap row.                */
+  /*                                                                       */
+  /*    pitch        :: The pitch's absolute value is the number of bytes  */
+  /*                    taken by one bitmap row, including padding.        */
+  /*                    However, the pitch is positive when the bitmap has */
+  /*                    a `down' flow, and negative when it has an `up'    */
+  /*                    flow.  In all cases, the pitch is an offset to add */
+  /*                    to a bitmap pointer in order to go down one row.   */
+  /*                                                                       */
+  /*    buffer       :: A typeless pointer to the bitmap buffer.  This     */
+  /*                    value should be aligned on 32-bit boundaries in    */
+  /*                    most cases.                                        */
+  /*                                                                       */
+  /*    num_grays    :: This field is only used with                       */
+  /*                    @FT_PIXEL_MODE_GRAY; it gives the number of gray   */
+  /*                    levels used in the bitmap.                         */
+  /*                                                                       */
+  /*    pixel_mode   :: The pixel mode, i.e., how pixel bits are stored.   */
+  /*                    See @FT_Pixel_Mode for possible values.            */
+  /*                                                                       */
+  /*    palette_mode :: This field is intended for paletted pixel modes;   */
+  /*                    it indicates how the palette is stored.  Not       */
+  /*                    used currently.                                    */
+  /*                                                                       */
+  /*    palette      :: A typeless pointer to the bitmap palette; this     */
+  /*                    field is intended for paletted pixel modes.  Not   */
+  /*                    used currently.                                    */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*   For now, the only pixel modes supported by FreeType are mono and    */
+  /*   grays.  However, drivers might be added in the future to support    */
+  /*   more `colorful' options.                                            */
+  /*                                                                       */
+  typedef struct  FT_Bitmap_
+  {
+    int             rows;
+    int             width;
+    int             pitch;
+    unsigned char*  buffer;
+    short           num_grays;
+    char            pixel_mode;
+    char            palette_mode;
+    void*           palette;
+
+  } FT_Bitmap;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Section>                                                             */
+  /*    outline_processing                                                 */
+  /*                                                                       */
+  /*************************************************************************/
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Struct>                                                              */
+  /*    FT_Outline                                                         */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    This structure is used to describe an outline to the scan-line     */
+  /*    converter.                                                         */
+  /*                                                                       */
+  /* <Fields>                                                              */
+  /*    n_contours :: The number of contours in the outline.               */
+  /*                                                                       */
+  /*    n_points   :: The number of points in the outline.                 */
+  /*                                                                       */
+  /*    points     :: A pointer to an array of `n_points' @FT_Vector       */
+  /*                  elements, giving the outline's point coordinates.    */
+  /*                                                                       */
+  /*    tags       :: A pointer to an array of `n_points' chars, giving    */
+  /*                  each outline point's type.  If bit 0 is unset, the   */
+  /*                  point is `off' the curve, i.e., a Bézier control     */
+  /*                  point, while it is `on' when set.                    */
+  /*                                                                       */
+  /*                  Bit 1 is meaningful for `off' points only.  If set,  */
+  /*                  it indicates a third-order Bézier arc control point; */
+  /*                  and a second-order control point if unset.           */
+  /*                                                                       */
+  /*    contours   :: An array of `n_contours' shorts, giving the end      */
+  /*                  point of each contour within the outline.  For       */
+  /*                  example, the first contour is defined by the points  */
+  /*                  `0' to `contours[0]', the second one is defined by   */
+  /*                  the points `contours[0]+1' to `contours[1]', etc.    */
+  /*                                                                       */
+  /*    flags      :: A set of bit flags used to characterize the outline  */
+  /*                  and give hints to the scan-converter and hinter on   */
+  /*                  how to convert/grid-fit it.  See @FT_OUTLINE_FLAGS.  */
+  /*                                                                       */
+  typedef struct  FT_Outline_
+  {
+    short       n_contours;      /* number of contours in glyph        */
+    short       n_points;        /* number of points in the glyph      */
+
+    FT_Vector*  points;          /* the outline's points               */
+    char*       tags;            /* the points flags                   */
+    short*      contours;        /* the contour end points             */
+
+    int         flags;           /* outline masks                      */
+
+  } FT_Outline;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Enum>                                                                */
+  /*   FT_OUTLINE_FLAGS                                                    */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A list of bit-field constants use for the flags in an outline's    */
+  /*    `flags' field.                                                     */
+  /*                                                                       */
+  /* <Values>                                                              */
+  /*    FT_OUTLINE_NONE           :: Value 0 is reserved.                  */
+  /*                                                                       */
+  /*    FT_OUTLINE_OWNER          :: If set, this flag indicates that the  */
+  /*                                 outline's field arrays (i.e.,         */
+  /*                                 `points', `flags' & `contours') are   */
+  /*                                 `owned' by the outline object, and    */
+  /*                                 should thus be freed when it is       */
+  /*                                 destroyed.                            */
+  /*                                                                       */
+  /*   FT_OUTLINE_EVEN_ODD_FILL   :: By default, outlines are filled using */
+  /*                                 the non-zero winding rule.  If set to */
+  /*                                 1, the outline will be filled using   */
+  /*                                 the even-odd fill rule (only works    */
+  /*                                 with the smooth raster).              */
+  /*                                                                       */
+  /*   FT_OUTLINE_REVERSE_FILL    :: By default, outside contours of an    */
+  /*                                 outline are oriented in clock-wise    */
+  /*                                 direction, as defined in the TrueType */
+  /*                                 specification.  This flag is set if   */
+  /*                                 the outline uses the opposite         */
+  /*                                 direction (typically for Type 1       */
+  /*                                 fonts).  This flag is ignored by the  */
+  /*                                 scan-converter.                       */
+  /*                                                                       */
+  /*   FT_OUTLINE_IGNORE_DROPOUTS :: By default, the scan converter will   */
+  /*                                 try to detect drop-outs in an outline */
+  /*                                 and correct the glyph bitmap to       */
+  /*                                 ensure consistent shape continuity.   */
+  /*                                 If set, this flag hints the scan-line */
+  /*                                 converter to ignore such cases.       */
+  /*                                                                       */
+  /*   FT_OUTLINE_HIGH_PRECISION  :: This flag indicates that the          */
+  /*                                 scan-line converter should try to     */
+  /*                                 convert this outline to bitmaps with  */
+  /*                                 the highest possible quality.  It is  */
+  /*                                 typically set for small character     */
+  /*                                 sizes.  Note that this is only a      */
+  /*                                 hint, that might be completely        */
+  /*                                 ignored by a given scan-converter.    */
+  /*                                                                       */
+  /*   FT_OUTLINE_SINGLE_PASS     :: This flag is set to force a given     */
+  /*                                 scan-converter to only use a single   */
+  /*                                 pass over the outline to render a     */
+  /*                                 bitmap glyph image.  Normally, it is  */
+  /*                                 set for very large character sizes.   */
+  /*                                 It is only a hint, that might be      */
+  /*                                 completely ignored by a given         */
+  /*                                 scan-converter.                       */
+  /*                                                                       */
+#define FT_OUTLINE_NONE             0x0
+#define FT_OUTLINE_OWNER            0x1
+#define FT_OUTLINE_EVEN_ODD_FILL    0x2
+#define FT_OUTLINE_REVERSE_FILL     0x4
+#define FT_OUTLINE_IGNORE_DROPOUTS  0x8
+
+#define FT_OUTLINE_HIGH_PRECISION   0x100
+#define FT_OUTLINE_SINGLE_PASS      0x200
+
+
+ /*************************************************************************
+  *
+  * @enum:
+  *   ft_outline_flags
+  *
+  * @description:
+  *   These constants are deprecated.  Please use the corresponding
+  *   @FT_OUTLINE_FLAGS values.
+  *
+  * @values:
+  *   ft_outline_none            :: See @FT_OUTLINE_NONE.
+  *   ft_outline_owner           :: See @FT_OUTLINE_OWNER.
+  *   ft_outline_even_odd_fill   :: See @FT_OUTLINE_EVEN_ODD_FILL.
+  *   ft_outline_reverse_fill    :: See @FT_OUTLINE_REVERSE_FILL.
+  *   ft_outline_ignore_dropouts :: See @FT_OUTLINE_IGNORE_DROPOUTS.
+  *   ft_outline_high_precision  :: See @FT_OUTLINE_HIGH_PRECISION.
+  *   ft_outline_single_pass     :: See @FT_OUTLINE_SINGLE_PASS.
+  */
+#define ft_outline_none             FT_OUTLINE_NONE
+#define ft_outline_owner            FT_OUTLINE_OWNER
+#define ft_outline_even_odd_fill    FT_OUTLINE_EVEN_ODD_FILL
+#define ft_outline_reverse_fill     FT_OUTLINE_REVERSE_FILL
+#define ft_outline_ignore_dropouts  FT_OUTLINE_IGNORE_DROPOUTS
+#define ft_outline_high_precision   FT_OUTLINE_HIGH_PRECISION
+#define ft_outline_single_pass      FT_OUTLINE_SINGLE_PASS
+
+  /* */
+
+#define FT_CURVE_TAG( flag )  ( flag & 3 )
+
+#define FT_CURVE_TAG_ON           1
+#define FT_CURVE_TAG_CONIC        0
+#define FT_CURVE_TAG_CUBIC        2
+
+#define FT_CURVE_TAG_TOUCH_X      8  /* reserved for the TrueType hinter */
+#define FT_CURVE_TAG_TOUCH_Y     16  /* reserved for the TrueType hinter */
+
+#define FT_CURVE_TAG_TOUCH_BOTH  ( FT_CURVE_TAG_TOUCH_X | \
+                                   FT_CURVE_TAG_TOUCH_Y )
+
+#define  FT_Curve_Tag_On       FT_CURVE_TAG_ON
+#define  FT_Curve_Tag_Conic    FT_CURVE_TAG_CONIC
+#define  FT_Curve_Tag_Cubic    FT_CURVE_TAG_CUBIC
+#define  FT_Curve_Tag_Touch_X  FT_CURVE_TAG_TOUCH_X
+#define  FT_Curve_Tag_Touch_Y  FT_CURVE_TAG_TOUCH_Y
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <FuncType>                                                            */
+  /*    FT_Outline_MoveToFunc                                              */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A function pointer type used to describe the signature of a `move  */
+  /*    to' function during outline walking/decomposition.                 */
+  /*                                                                       */
+  /*    A `move to' is emitted to start a new contour in an outline.       */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    to   :: A pointer to the target point of the `move to'.            */
+  /*                                                                       */
+  /*    user :: A typeless pointer which is passed from the caller of the  */
+  /*            decomposition function.                                    */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    Error code.  0 means success.                                      */
+  /*                                                                       */
+  typedef int
+  (*FT_Outline_MoveToFunc)( const FT_Vector*  to,
+                            void*             user );
+
+#define FT_Outline_MoveTo_Func  FT_Outline_MoveToFunc
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <FuncType>                                                            */
+  /*    FT_Outline_LineToFunc                                              */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A function pointer type used to describe the signature of a `line  */
+  /*    to' function during outline walking/decomposition.                 */
+  /*                                                                       */
+  /*    A `line to' is emitted to indicate a segment in the outline.       */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    to   :: A pointer to the target point of the `line to'.            */
+  /*                                                                       */
+  /*    user :: A typeless pointer which is passed from the caller of the  */
+  /*            decomposition function.                                    */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    Error code.  0 means success.                                      */
+  /*                                                                       */
+  typedef int
+  (*FT_Outline_LineToFunc)( const FT_Vector*  to,
+                            void*             user );
+
+#define  FT_Outline_LineTo_Func  FT_Outline_LineToFunc
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <FuncType>                                                            */
+  /*    FT_Outline_ConicToFunc                                             */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A function pointer type use to describe the signature of a `conic  */
+  /*    to' function during outline walking/decomposition.                 */
+  /*                                                                       */
+  /*    A `conic to' is emitted to indicate a second-order Bézier arc in   */
+  /*    the outline.                                                       */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    control :: An intermediate control point between the last position */
+  /*               and the new target in `to'.                             */
+  /*                                                                       */
+  /*    to      :: A pointer to the target end point of the conic arc.     */
+  /*                                                                       */
+  /*    user    :: A typeless pointer which is passed from the caller of   */
+  /*               the decomposition function.                             */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    Error code.  0 means success.                                      */
+  /*                                                                       */
+  typedef int
+  (*FT_Outline_ConicToFunc)( const FT_Vector*  control,
+                             const FT_Vector*  to,
+                             void*             user );
+
+#define  FT_Outline_ConicTo_Func  FT_Outline_ConicToFunc
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <FuncType>                                                            */
+  /*    FT_Outline_CubicToFunc                                             */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A function pointer type used to describe the signature of a `cubic */
+  /*    to' function during outline walking/decomposition.                 */
+  /*                                                                       */
+  /*    A `cubic to' is emitted to indicate a third-order Bézier arc.      */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    control1 :: A pointer to the first Bézier control point.           */
+  /*                                                                       */
+  /*    control2 :: A pointer to the second Bézier control point.          */
+  /*                                                                       */
+  /*    to       :: A pointer to the target end point.                     */
+  /*                                                                       */
+  /*    user     :: A typeless pointer which is passed from the caller of  */
+  /*                the decomposition function.                            */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    Error code.  0 means success.                                      */
+  /*                                                                       */
+  typedef int
+  (*FT_Outline_CubicToFunc)( const FT_Vector*  control1,
+                             const FT_Vector*  control2,
+                             const FT_Vector*  to,
+                             void*             user );
+
+#define  FT_Outline_CubicTo_Func  FT_Outline_CubicToFunc
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Struct>                                                              */
+  /*    FT_Outline_Funcs                                                   */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A structure to hold various function pointers used during outline  */
+  /*    decomposition in order to emit segments, conic, and cubic Béziers, */
+  /*    as well as `move to' and `close to' operations.                    */
+  /*                                                                       */
+  /* <Fields>                                                              */
+  /*    move_to  :: The `move to' emitter.                                 */
+  /*                                                                       */
+  /*    line_to  :: The segment emitter.                                   */
+  /*                                                                       */
+  /*    conic_to :: The second-order Bézier arc emitter.                   */
+  /*                                                                       */
+  /*    cubic_to :: The third-order Bézier arc emitter.                    */
+  /*                                                                       */
+  /*    shift    :: The shift that is applied to coordinates before they   */
+  /*                are sent to the emitter.                               */
+  /*                                                                       */
+  /*    delta    :: The delta that is applied to coordinates before they   */
+  /*                are sent to the emitter, but after the shift.          */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    The point coordinates sent to the emitters are the transformed     */
+  /*    version of the original coordinates (this is important for high    */
+  /*    accuracy during scan-conversion).  The transformation is simple:   */
+  /*                                                                       */
+  /*    {                                                                  */
+  /*      x' = (x << shift) - delta                                        */
+  /*      y' = (x << shift) - delta                                        */
+  /*    }                                                                  */
+  /*                                                                       */
+  /*    Set the value of `shift' and `delta' to 0 to get the original      */
+  /*    point coordinates.                                                 */
+  /*                                                                       */
+  typedef struct  FT_Outline_Funcs_
+  {
+    FT_Outline_MoveToFunc   move_to;
+    FT_Outline_LineToFunc   line_to;
+    FT_Outline_ConicToFunc  conic_to;
+    FT_Outline_CubicToFunc  cubic_to;
+
+    int                     shift;
+    FT_Pos                  delta;
+
+  } FT_Outline_Funcs;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Section>                                                             */
+  /*    basic_types                                                        */
+  /*                                                                       */
+  /*************************************************************************/
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Macro>                                                               */
+  /*    FT_IMAGE_TAG                                                       */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    This macro converts four-letter tags to an unsigned long type.     */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    Since many 16bit compilers don't like 32bit enumerations, you      */
+  /*    should redefine this macro in case of problems to something like   */
+  /*    this:                                                              */
+  /*                                                                       */
+  /*    {                                                                  */
+  /*      #define FT_IMAGE_TAG( value, _x1, _x2, _x3, _x4 )  value         */
+  /*    }                                                                  */
+  /*                                                                       */
+  /*    to get a simple enumeration without assigning special numbers.     */
+  /*                                                                       */
+#ifndef FT_IMAGE_TAG
+#define FT_IMAGE_TAG( value, _x1, _x2, _x3, _x4 )  \
+          value = ( ( (unsigned long)_x1 << 24 ) | \
+                    ( (unsigned long)_x2 << 16 ) | \
+                    ( (unsigned long)_x3 << 8  ) | \
+                      (unsigned long)_x4         )
+#endif /* FT_IMAGE_TAG */
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Enum>                                                                */
+  /*    FT_Glyph_Format                                                    */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    An enumeration type used to describe the format of a given glyph   */
+  /*    image.  Note that this version of FreeType only supports two image */
+  /*    formats, even though future font drivers will be able to register  */
+  /*    their own format.                                                  */
+  /*                                                                       */
+  /* <Values>                                                              */
+  /*    FT_GLYPH_FORMAT_NONE ::                                            */
+  /*      The value 0 is reserved.                                         */
+  /*                                                                       */
+  /*    FT_GLYPH_FORMAT_COMPOSITE ::                                       */
+  /*      The glyph image is a composite of several other images.  This    */
+  /*      format is _only_ used with @FT_LOAD_NO_RECURSE, and is used to   */
+  /*      report compound glyphs (like accented characters).               */
+  /*                                                                       */
+  /*    FT_GLYPH_FORMAT_BITMAP ::                                          */
+  /*      The glyph image is a bitmap, and can be described as an          */
+  /*      @FT_Bitmap.  You generally need to access the `bitmap' field of  */
+  /*      the @FT_GlyphSlotRec structure to read it.                       */
+  /*                                                                       */
+  /*    FT_GLYPH_FORMAT_OUTLINE ::                                         */
+  /*      The glyph image is a vectorial outline made of line segments     */
+  /*      and Bézier arcs; it can be described as an @FT_Outline; you      */
+  /*      generally want to access the `outline' field of the              */
+  /*      @FT_GlyphSlotRec structure to read it.                           */
+  /*                                                                       */
+  /*    FT_GLYPH_FORMAT_PLOTTER ::                                         */
+  /*      The glyph image is a vectorial path with no inside and outside   */
+  /*      contours.  Some Type 1 fonts, like those in the Hershey family,  */
+  /*      contain glyphs in this format.  These are described as           */
+  /*      @FT_Outline, but FreeType isn't currently capable of rendering   */
+  /*      them correctly.                                                  */
+  /*                                                                       */
+  typedef enum  FT_Glyph_Format_
+  {
+    FT_IMAGE_TAG( FT_GLYPH_FORMAT_NONE, 0, 0, 0, 0 ),
+
+    FT_IMAGE_TAG( FT_GLYPH_FORMAT_COMPOSITE, 'c', 'o', 'm', 'p' ),
+    FT_IMAGE_TAG( FT_GLYPH_FORMAT_BITMAP,    'b', 'i', 't', 's' ),
+    FT_IMAGE_TAG( FT_GLYPH_FORMAT_OUTLINE,   'o', 'u', 't', 'l' ),
+    FT_IMAGE_TAG( FT_GLYPH_FORMAT_PLOTTER,   'p', 'l', 'o', 't' )
+
+  } FT_Glyph_Format;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Enum>                                                                */
+  /*    ft_glyph_format_xxx                                                */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A list of deprecated constants.  Use the corresponding             */
+  /*    @FT_Glyph_Format values instead.                                   */
+  /*                                                                       */
+  /* <Values>                                                              */
+  /*    ft_glyph_format_none      :: See @FT_GLYPH_FORMAT_NONE.            */
+  /*    ft_glyph_format_composite :: See @FT_GLYPH_FORMAT_COMPOSITE.       */
+  /*    ft_glyph_format_bitmap    :: See @FT_GLYPH_FORMAT_BITMAP.          */
+  /*    ft_glyph_format_outline   :: See @FT_GLYPH_FORMAT_OUTLINE.         */
+  /*    ft_glyph_format_plotter   :: See @FT_GLYPH_FORMAT_PLOTTER.         */
+  /*                                                                       */
+#define ft_glyph_format_none       FT_GLYPH_FORMAT_NONE
+#define ft_glyph_format_composite  FT_GLYPH_FORMAT_COMPOSITE
+#define ft_glyph_format_bitmap     FT_GLYPH_FORMAT_BITMAP
+#define ft_glyph_format_outline    FT_GLYPH_FORMAT_OUTLINE
+#define ft_glyph_format_plotter    FT_GLYPH_FORMAT_PLOTTER
+
+
+  /*************************************************************************/
+  /*************************************************************************/
+  /*************************************************************************/
+  /*****                                                               *****/
+  /*****            R A S T E R   D E F I N I T I O N S                *****/
+  /*****                                                               *****/
+  /*************************************************************************/
+  /*************************************************************************/
+  /*************************************************************************/
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* A raster is a scan converter, in charge of rendering an outline into  */
+  /* a a bitmap.  This section contains the public API for rasters.        */
+  /*                                                                       */
+  /* Note that in FreeType 2, all rasters are now encapsulated within      */
+  /* specific modules called `renderers'.  See `freetype/ftrender.h' for   */
+  /* more details on renderers.                                            */
+  /*                                                                       */
+  /*************************************************************************/
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Section>                                                             */
+  /*    raster                                                             */
+  /*                                                                       */
+  /* <Title>                                                               */
+  /*    Scanline Converter                                                 */
+  /*                                                                       */
+  /* <Abstract>                                                            */
+  /*    How vectorial outlines are converted into bitmaps and pixmaps.     */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    This section contains technical definitions.                       */
+  /*                                                                       */
+  /*************************************************************************/
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Type>                                                                */
+  /*    FT_Raster                                                          */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A handle (pointer) to a raster object.  Each object can be used    */
+  /*    independently to convert an outline into a bitmap or pixmap.       */
+  /*                                                                       */
+  typedef struct FT_RasterRec_*  FT_Raster;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Struct>                                                              */
+  /*    FT_Span                                                            */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A structure used to model a single span of gray (or black) pixels  */
+  /*    when rendering a monochrome or anti-aliased bitmap.                */
+  /*                                                                       */
+  /* <Fields>                                                              */
+  /*    x        :: The span's horizontal start position.                  */
+  /*                                                                       */
+  /*    len      :: The span's length in pixels.                           */
+  /*                                                                       */
+  /*    coverage :: The span color/coverage, ranging from 0 (background)   */
+  /*                to 255 (foreground).  Only used for anti-aliased       */
+  /*                rendering.                                             */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    This structure is used by the span drawing callback type named     */
+  /*    @FT_SpanFunc which takes the y-coordinate of the span as a         */
+  /*    a parameter.                                                       */
+  /*                                                                       */
+  /*    The coverage value is always between 0 and 255.                    */
+  /*                                                                       */
+  typedef struct  FT_Span_
+  {
+    short           x;
+    unsigned short  len;
+    unsigned char   coverage;
+
+  } FT_Span;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <FuncType>                                                            */
+  /*    FT_SpanFunc                                                        */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A function used as a call-back by the anti-aliased renderer in     */
+  /*    order to let client applications draw themselves the gray pixel    */
+  /*    spans on each scan line.                                           */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    y     :: The scanline's y-coordinate.                              */
+  /*                                                                       */
+  /*    count :: The number of spans to draw on this scanline.             */
+  /*                                                                       */
+  /*    spans :: A table of `count' spans to draw on the scanline.         */
+  /*                                                                       */
+  /*    user  :: User-supplied data that is passed to the callback.        */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    This callback allows client applications to directly render the    */
+  /*    gray spans of the anti-aliased bitmap to any kind of surfaces.     */
+  /*                                                                       */
+  /*    This can be used to write anti-aliased outlines directly to a      */
+  /*    given background bitmap, and even perform translucency.            */
+  /*                                                                       */
+  /*    Note that the `count' field cannot be greater than a fixed value   */
+  /*    defined by the `FT_MAX_GRAY_SPANS' configuration macro in          */
+  /*    `ftoption.h'.  By default, this value is set to 32, which means    */
+  /*    that if there are more than 32 spans on a given scanline, the      */
+  /*    callback is called several times with the same `y' parameter in    */
+  /*    order to draw all callbacks.                                       */
+  /*                                                                       */
+  /*    Otherwise, the callback is only called once per scan-line, and     */
+  /*    only for those scanlines that do have `gray' pixels on them.       */
+  /*                                                                       */
+  typedef void
+  (*FT_SpanFunc)( int             y,
+                  int             count,
+                  const FT_Span*  spans,
+                  void*           user );
+
+#define FT_Raster_Span_Func   FT_SpanFunc
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <FuncType>                                                            */
+  /*    FT_Raster_BitTest_Func                                             */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    THIS TYPE IS DEPRECATED.  DO NOT USE IT.                           */
+  /*                                                                       */
+  /*    A function used as a call-back by the monochrome scan-converter    */
+  /*    to test whether a given target pixel is already set to the drawing */
+  /*    `color'.  These tests are crucial to implement drop-out control    */
+  /*    per-se the TrueType spec.                                          */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    y     :: The pixel's y-coordinate.                                 */
+  /*                                                                       */
+  /*    x     :: The pixel's x-coordinate.                                 */
+  /*                                                                       */
+  /*    user  :: User-supplied data that is passed to the callback.        */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*   1 if the pixel is `set', 0 otherwise.                               */
+  /*                                                                       */
+  typedef int
+  (*FT_Raster_BitTest_Func)( int    y,
+                             int    x,
+                             void*  user );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <FuncType>                                                            */
+  /*    FT_Raster_BitSet_Func                                              */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    THIS TYPE IS DEPRECATED.  DO NOT USE IT.                           */
+  /*                                                                       */
+  /*    A function used as a call-back by the monochrome scan-converter    */
+  /*    to set an individual target pixel.  This is crucial to implement   */
+  /*    drop-out control according to the TrueType specification.          */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    y     :: The pixel's y-coordinate.                                 */
+  /*                                                                       */
+  /*    x     :: The pixel's x-coordinate.                                 */
+  /*                                                                       */
+  /*    user  :: User-supplied data that is passed to the callback.        */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    1 if the pixel is `set', 0 otherwise.                              */
+  /*                                                                       */
+  typedef void
+  (*FT_Raster_BitSet_Func)( int    y,
+                            int    x,
+                            void*  user );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Enum>                                                                */
+  /*    FT_RASTER_FLAG_XXX                                                 */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A list of bit flag constants as used in the `flags' field of a     */
+  /*    @FT_Raster_Params structure.                                       */
+  /*                                                                       */
+  /* <Values>                                                              */
+  /*    FT_RASTER_FLAG_DEFAULT :: This value is 0.                         */
+  /*                                                                       */
+  /*    FT_RASTER_FLAG_AA      :: This flag is set to indicate that an     */
+  /*                              anti-aliased glyph image should be       */
+  /*                              generated.  Otherwise, it will be        */
+  /*                              monochrome (1-bit).                      */
+  /*                                                                       */
+  /*    FT_RASTER_FLAG_DIRECT  :: This flag is set to indicate direct      */
+  /*                              rendering.  In this mode, client         */
+  /*                              applications must provide their own span */
+  /*                              callback.  This lets them directly       */
+  /*                              draw or compose over an existing bitmap. */
+  /*                              If this bit is not set, the target       */
+  /*                              pixmap's buffer _must_ be zeroed before  */
+  /*                              rendering.                               */
+  /*                                                                       */
+  /*                              Note that for now, direct rendering is   */
+  /*                              only possible with anti-aliased glyphs.  */
+  /*                                                                       */
+  /*    FT_RASTER_FLAG_CLIP    :: This flag is only used in direct         */
+  /*                              rendering mode.  If set, the output will */
+  /*                              be clipped to a box specified in the     */
+  /*                              `clip_box' field of the                  */
+  /*                              @FT_Raster_Params structure.             */
+  /*                                                                       */
+  /*                              Note that by default, the glyph bitmap   */
+  /*                              is clipped to the target pixmap, except  */
+  /*                              in direct rendering mode where all spans */
+  /*                              are generated if no clipping box is set. */
+  /*                                                                       */
+#define FT_RASTER_FLAG_DEFAULT  0x0
+#define FT_RASTER_FLAG_AA       0x1
+#define FT_RASTER_FLAG_DIRECT   0x2
+#define FT_RASTER_FLAG_CLIP     0x4
+
+  /* deprecated */
+#define ft_raster_flag_default  FT_RASTER_FLAG_DEFAULT
+#define ft_raster_flag_aa       FT_RASTER_FLAG_AA
+#define ft_raster_flag_direct   FT_RASTER_FLAG_DIRECT
+#define ft_raster_flag_clip     FT_RASTER_FLAG_CLIP
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Struct>                                                              */
+  /*    FT_Raster_Params                                                   */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A structure to hold the arguments used by a raster's render        */
+  /*    function.                                                          */
+  /*                                                                       */
+  /* <Fields>                                                              */
+  /*    target      :: The target bitmap.                                  */
+  /*                                                                       */
+  /*    source      :: A pointer to the source glyph image (e.g., an       */
+  /*                   @FT_Outline).                                       */
+  /*                                                                       */
+  /*    flags       :: The rendering flags.                                */
+  /*                                                                       */
+  /*    gray_spans  :: The gray span drawing callback.                     */
+  /*                                                                       */
+  /*    black_spans :: The black span drawing callback.                    */
+  /*                                                                       */
+  /*    bit_test    :: The bit test callback.  UNIMPLEMENTED!              */
+  /*                                                                       */
+  /*    bit_set     :: The bit set callback.  UNIMPLEMENTED!               */
+  /*                                                                       */
+  /*    user        :: User-supplied data that is passed to each drawing   */
+  /*                   callback.                                           */
+  /*                                                                       */
+  /*    clip_box    :: An optional clipping box.  It is only used in       */
+  /*                   direct rendering mode.  Note that coordinates here  */
+  /*                   should be expressed in _integer_ pixels (and not in */
+  /*                   26.6 fixed-point units).                            */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    An anti-aliased glyph bitmap is drawn if the @FT_RASTER_FLAG_AA    */
+  /*    bit flag is set in the `flags' field, otherwise a monochrome       */
+  /*    bitmap is generated.                                               */
+  /*                                                                       */
+  /*    If the @FT_RASTER_FLAG_DIRECT bit flag is set in `flags', the      */
+  /*    raster will call the `gray_spans' callback to draw gray pixel      */
+  /*    spans, in the case of an aa glyph bitmap, it will call             */
+  /*    `black_spans', and `bit_test' and `bit_set' in the case of a       */
+  /*    monochrome bitmap.  This allows direct composition over a          */
+  /*    pre-existing bitmap through user-provided callbacks to perform the */
+  /*    span drawing/composition.                                          */
+  /*                                                                       */
+  /*    Note that the `bit_test' and `bit_set' callbacks are required when */
+  /*    rendering a monochrome bitmap, as they are crucial to implement    */
+  /*    correct drop-out control as defined in the TrueType specification. */
+  /*                                                                       */
+  typedef struct  FT_Raster_Params_
+  {
+    const FT_Bitmap*        target;
+    const void*             source;
+    int                     flags;
+    FT_SpanFunc             gray_spans;
+    FT_SpanFunc             black_spans;
+    FT_Raster_BitTest_Func  bit_test;     /* doesn't work! */
+    FT_Raster_BitSet_Func   bit_set;      /* doesn't work! */
+    void*                   user;
+    FT_BBox                 clip_box;
+
+  } FT_Raster_Params;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <FuncType>                                                            */
+  /*    FT_Raster_NewFunc                                                  */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A function used to create a new raster object.                     */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    memory :: A handle to the memory allocator.                        */
+  /*                                                                       */
+  /* <Output>                                                              */
+  /*    raster :: A handle to the new raster object.                       */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    Error code.  0 means success.                                      */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    The `memory' parameter is a typeless pointer in order to avoid     */
+  /*    un-wanted dependencies on the rest of the FreeType code.  In       */
+  /*    practice, it is an @FT_Memory object, i.e., a handle to the        */
+  /*    standard FreeType memory allocator.  However, this field can be    */
+  /*    completely ignored by a given raster implementation.               */
+  /*                                                                       */
+  typedef int
+  (*FT_Raster_NewFunc)( void*       memory,
+                        FT_Raster*  raster );
+
+#define  FT_Raster_New_Func    FT_Raster_NewFunc
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <FuncType>                                                            */
+  /*    FT_Raster_DoneFunc                                                 */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A function used to destroy a given raster object.                  */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    raster :: A handle to the raster object.                           */
+  /*                                                                       */
+  typedef void
+  (*FT_Raster_DoneFunc)( FT_Raster  raster );
+
+#define  FT_Raster_Done_Func   FT_Raster_DoneFunc
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <FuncType>                                                            */
+  /*    FT_Raster_ResetFunc                                                */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    FreeType provides an area of memory called the `render pool',      */
+  /*    available to all registered rasters.  This pool can be freely used */
+  /*    during a given scan-conversion but is shared by all rasters.  Its  */
+  /*    content is thus transient.                                         */
+  /*                                                                       */
+  /*    This function is called each time the render pool changes, or just */
+  /*    after a new raster object is created.                              */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    raster    :: A handle to the new raster object.                    */
+  /*                                                                       */
+  /*    pool_base :: The address in memory of the render pool.             */
+  /*                                                                       */
+  /*    pool_size :: The size in bytes of the render pool.                 */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    Rasters can ignore the render pool and rely on dynamic memory      */
+  /*    allocation if they want to (a handle to the memory allocator is    */
+  /*    passed to the raster constructor).  However, this is not           */
+  /*    recommended for efficiency purposes.                               */
+  /*                                                                       */
+  typedef void
+  (*FT_Raster_ResetFunc)( FT_Raster       raster,
+                          unsigned char*  pool_base,
+                          unsigned long   pool_size );
+
+#define  FT_Raster_Reset_Func   FT_Raster_ResetFunc
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <FuncType>                                                            */
+  /*    FT_Raster_SetModeFunc                                              */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    This function is a generic facility to change modes or attributes  */
+  /*    in a given raster.  This can be used for debugging purposes, or    */
+  /*    simply to allow implementation-specific `features' in a given      */
+  /*    raster module.                                                     */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    raster :: A handle to the new raster object.                       */
+  /*                                                                       */
+  /*    mode   :: A 4-byte tag used to name the mode or property.          */
+  /*                                                                       */
+  /*    args   :: A pointer to the new mode/property to use.               */
+  /*                                                                       */
+  typedef int
+  (*FT_Raster_SetModeFunc)( FT_Raster      raster,
+                            unsigned long  mode,
+                            void*          args );
+
+#define  FT_Raster_Set_Mode_Func  FT_Raster_SetModeFunc
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <FuncType>                                                            */
+  /*    FT_Raster_RenderFunc                                               */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*   Invokes a given raster to scan-convert a given glyph image into a   */
+  /*   target bitmap.                                                      */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    raster :: A handle to the raster object.                           */
+  /*                                                                       */
+  /*    params :: A pointer to an @FT_Raster_Params structure used to      */
+  /*              store the rendering parameters.                          */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    Error code.  0 means success.                                      */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    The exact format of the source image depends on the raster's glyph */
+  /*    format defined in its @FT_Raster_Funcs structure.  It can be an    */
+  /*    @FT_Outline or anything else in order to support a large array of  */
+  /*    glyph formats.                                                     */
+  /*                                                                       */
+  /*    Note also that the render function can fail and return a           */
+  /*    `FT_Err_Unimplemented_Feature' error code if the raster used does  */
+  /*    not support direct composition.                                    */
+  /*                                                                       */
+  /*    XXX: For now, the standard raster doesn't support direct           */
+  /*         composition but this should change for the final release (see */
+  /*         the files `demos/src/ftgrays.c' and `demos/src/ftgrays2.c'    */
+  /*         for examples of distinct implementations which support direct */
+  /*         composition).                                                 */
+  /*                                                                       */
+  typedef int
+  (*FT_Raster_RenderFunc)( FT_Raster                raster,
+                           const FT_Raster_Params*  params );
+
+#define  FT_Raster_Render_Func    FT_Raster_RenderFunc
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Struct>                                                              */
+  /*    FT_Raster_Funcs                                                    */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*   A structure used to describe a given raster class to the library.   */
+  /*                                                                       */
+  /* <Fields>                                                              */
+  /*    glyph_format  :: The supported glyph format for this raster.       */
+  /*                                                                       */
+  /*    raster_new    :: The raster constructor.                           */
+  /*                                                                       */
+  /*    raster_reset  :: Used to reset the render pool within the raster.  */
+  /*                                                                       */
+  /*    raster_render :: A function to render a glyph into a given bitmap. */
+  /*                                                                       */
+  /*    raster_done   :: The raster destructor.                            */
+  /*                                                                       */
+  typedef struct  FT_Raster_Funcs_
+  {
+    FT_Glyph_Format         glyph_format;
+    FT_Raster_NewFunc       raster_new;
+    FT_Raster_ResetFunc     raster_reset;
+    FT_Raster_SetModeFunc   raster_set_mode;
+    FT_Raster_RenderFunc    raster_render;
+    FT_Raster_DoneFunc      raster_done;
+
+  } FT_Raster_Funcs;
+
+
+  /* */
+
+
+FT_END_HEADER
+
+#endif /* __FTIMAGE_H__ */
+
+
+/* END */
+
+
+/* Local Variables: */
+/* coding: utf-8    */
+/* End:             */
diff --git a/include/freetype2/freetype/ftincrem.h b/include/freetype2/freetype/ftincrem.h
new file mode 100644 (file)
index 0000000..46bc8bd
--- /dev/null
@@ -0,0 +1,331 @@
+/***************************************************************************/
+/*                                                                         */
+/*  ftincrem.h                                                             */
+/*                                                                         */
+/*    FreeType incremental loading (specification).                        */
+/*                                                                         */
+/*  Copyright 2002, 2003, 2006, 2007 by                                    */
+/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
+/*                                                                         */
+/*  This file is part of the FreeType project, and may only be used,       */
+/*  modified, and distributed under the terms of the FreeType project      */
+/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
+/*  this file you indicate that you have read the license and              */
+/*  understand and accept it fully.                                        */
+/*                                                                         */
+/***************************************************************************/
+
+
+#ifndef __FTINCREM_H__
+#define __FTINCREM_H__
+
+#include <ft2build.h>
+#include FT_FREETYPE_H
+
+#ifdef FREETYPE_H
+#error "freetype.h of FreeType 1 has been loaded!"
+#error "Please fix the directory search order for header files"
+#error "so that freetype.h of FreeType 2 is found first."
+#endif
+
+
+FT_BEGIN_HEADER
+
+ /***************************************************************************
+  *
+  * @section:
+  *    incremental
+  *
+  * @title:
+  *    Incremental Loading
+  *
+  * @abstract:
+  *    Custom Glyph Loading.
+  *
+  * @description:
+  *   This section contains various functions used to perform so-called
+  *   `incremental' glyph loading.  This is a mode where all glyphs loaded
+  *   from a given @FT_Face are provided by the client application,
+  *
+  *   Apart from that, all other tables are loaded normally from the font
+  *   file.  This mode is useful when FreeType is used within another
+  *   engine, e.g., a Postscript Imaging Processor.
+  *
+  *   To enable this mode, you must use @FT_Open_Face, passing an
+  *   @FT_Parameter with the @FT_PARAM_TAG_INCREMENTAL tag and an
+  *   @FT_Incremental_Interface value.  See the comments for
+  *   @FT_Incremental_InterfaceRec for an example.
+  *
+  */
+
+
+ /***************************************************************************
+  *
+  * @type:
+  *   FT_Incremental
+  *
+  * @description:
+  *   An opaque type describing a user-provided object used to implement
+  *   `incremental' glyph loading within FreeType.  This is used to support
+  *   embedded fonts in certain environments (e.g., Postscript interpreters),
+  *   where the glyph data isn't in the font file, or must be overridden by
+  *   different values.
+  *
+  * @note:
+  *   It is up to client applications to create and implement @FT_Incremental
+  *   objects, as long as they provide implementations for the methods
+  *   @FT_Incremental_GetGlyphDataFunc, @FT_Incremental_FreeGlyphDataFunc
+  *   and @FT_Incremental_GetGlyphMetricsFunc.
+  *
+  *   See the description of @FT_Incremental_InterfaceRec to understand how
+  *   to use incremental objects with FreeType.
+  */
+  typedef struct FT_IncrementalRec_*  FT_Incremental;
+
+
+ /***************************************************************************
+  *
+  * @struct:
+  *   FT_Incremental_Metrics
+  *
+  * @description:
+  *   A small structure used to contain the basic glyph metrics returned
+  *   by the @FT_Incremental_GetGlyphMetricsFunc method.
+  *
+  * @fields:
+  *   bearing_x ::
+  *     Left bearing, in font units.
+  *
+  *   bearing_y ::
+  *     Top bearing, in font units.
+  *
+  *   advance ::
+  *     Glyph advance, in font units.
+  *
+  * @note:
+  *   These correspond to horizontal or vertical metrics depending on the
+  *   value of the `vertical' argument to the function
+  *   @FT_Incremental_GetGlyphMetricsFunc.
+  */
+  typedef struct  FT_Incremental_MetricsRec_
+  {
+    FT_Long  bearing_x;
+    FT_Long  bearing_y;
+    FT_Long  advance;
+
+  } FT_Incremental_MetricsRec, *FT_Incremental_Metrics;
+
+
+ /***************************************************************************
+  *
+  * @type:
+  *   FT_Incremental_GetGlyphDataFunc
+  *
+  * @description:
+  *   A function called by FreeType to access a given glyph's data bytes
+  *   during @FT_Load_Glyph or @FT_Load_Char if incremental loading is
+  *   enabled.
+  *
+  *   Note that the format of the glyph's data bytes depends on the font
+  *   file format.  For TrueType, it must correspond to the raw bytes within
+  *   the `glyf' table.  For Postscript formats, it must correspond to the
+  *   *unencrypted* charstring bytes, without any `lenIV' header.  It is
+  *   undefined for any other format.
+  *
+  * @input:
+  *   incremental ::
+  *     Handle to an opaque @FT_Incremental handle provided by the client
+  *     application.
+  *
+  *   glyph_index ::
+  *     Index of relevant glyph.
+  *
+  * @output:
+  *   adata ::
+  *     A structure describing the returned glyph data bytes (which will be
+  *     accessed as a read-only byte block).
+  *
+  * @return:
+  *   FreeType error code.  0 means success.
+  *
+  * @note:
+  *   If this function returns successfully the method
+  *   @FT_Incremental_FreeGlyphDataFunc will be called later to release
+  *   the data bytes.
+  *
+  *   Nested calls to @FT_Incremental_GetGlyphDataFunc can happen for
+  *   compound glyphs.
+  */
+  typedef FT_Error
+  (*FT_Incremental_GetGlyphDataFunc)( FT_Incremental  incremental,
+                                      FT_UInt         glyph_index,
+                                      FT_Data*        adata );
+
+
+ /***************************************************************************
+  *
+  * @type:
+  *   FT_Incremental_FreeGlyphDataFunc
+  *
+  * @description:
+  *   A function used to release the glyph data bytes returned by a
+  *   successful call to @FT_Incremental_GetGlyphDataFunc.
+  *
+  * @input:
+  *   incremental ::
+  *     A handle to an opaque @FT_Incremental handle provided by the client
+  *     application.
+  *
+  *   data ::
+  *     A structure describing the glyph data bytes (which will be accessed
+  *     as a read-only byte block).
+  */
+  typedef void
+  (*FT_Incremental_FreeGlyphDataFunc)( FT_Incremental  incremental,
+                                       FT_Data*        data );
+
+
+ /***************************************************************************
+  *
+  * @type:
+  *   FT_Incremental_GetGlyphMetricsFunc
+  *
+  * @description:
+  *   A function used to retrieve the basic metrics of a given glyph index
+  *   before accessing its data.  This is necessary because, in certain
+  *   formats like TrueType, the metrics are stored in a different place from
+  *   the glyph images proper.
+  *
+  * @input:
+  *   incremental ::
+  *     A handle to an opaque @FT_Incremental handle provided by the client
+  *     application.
+  *
+  *   glyph_index ::
+  *     Index of relevant glyph.
+  *
+  *   vertical ::
+  *     If true, return vertical metrics.
+  *
+  *   ametrics ::
+  *     This parameter is used for both input and output.
+  *     The original glyph metrics, if any, in font units.  If metrics are
+  *     not available all the values must be set to zero.
+  *
+  * @output:
+  *   ametrics ::
+  *     The replacement glyph metrics in font units.
+  *
+  */
+  typedef FT_Error
+  (*FT_Incremental_GetGlyphMetricsFunc)
+                      ( FT_Incremental              incremental,
+                        FT_UInt                     glyph_index,
+                        FT_Bool                     vertical,
+                        FT_Incremental_MetricsRec  *ametrics );
+
+
+  /**************************************************************************
+   *
+   * @struct:
+   *   FT_Incremental_FuncsRec
+   *
+   * @description:
+   *   A table of functions for accessing fonts that load data
+   *   incrementally.  Used in @FT_Incremental_InterfaceRec.
+   *
+   * @fields:
+   *   get_glyph_data ::
+   *     The function to get glyph data.  Must not be null.
+   *
+   *   free_glyph_data ::
+   *     The function to release glyph data.  Must not be null.
+   *
+   *   get_glyph_metrics ::
+   *     The function to get glyph metrics.  May be null if the font does
+   *     not provide overriding glyph metrics.
+   */
+  typedef struct  FT_Incremental_FuncsRec_
+  {
+    FT_Incremental_GetGlyphDataFunc     get_glyph_data;
+    FT_Incremental_FreeGlyphDataFunc    free_glyph_data;
+    FT_Incremental_GetGlyphMetricsFunc  get_glyph_metrics;
+
+  } FT_Incremental_FuncsRec;
+
+
+ /***************************************************************************
+  *
+  * @struct:
+  *   FT_Incremental_InterfaceRec
+  *
+  * @description:
+  *   A structure to be used with @FT_Open_Face to indicate that the user
+  *   wants to support incremental glyph loading.  You should use it with
+  *   @FT_PARAM_TAG_INCREMENTAL as in the following example:
+  *
+  *     {
+  *       FT_Incremental_InterfaceRec  inc_int;
+  *       FT_Parameter                 parameter;
+  *       FT_Open_Args                 open_args;
+  *
+  *
+  *       // set up incremental descriptor
+  *       inc_int.funcs  = my_funcs;
+  *       inc_int.object = my_object;
+  *
+  *       // set up optional parameter
+  *       parameter.tag  = FT_PARAM_TAG_INCREMENTAL;
+  *       parameter.data = &inc_int;
+  *
+  *       // set up FT_Open_Args structure
+  *       open_args.flags      = FT_OPEN_PATHNAME | FT_OPEN_PARAMS;
+  *       open_args.pathname   = my_font_pathname;
+  *       open_args.num_params = 1;
+  *       open_args.params     = &parameter; // we use one optional argument
+  *
+  *       // open the font
+  *       error = FT_Open_Face( library, &open_args, index, &face );
+  *       ...
+  *     }
+  */
+  typedef struct  FT_Incremental_InterfaceRec_
+  {
+    const FT_Incremental_FuncsRec*  funcs;
+    FT_Incremental                  object;
+
+  } FT_Incremental_InterfaceRec;
+
+
+ /***************************************************************************
+  *
+  * @type:
+  *   FT_Incremental_Interface
+  *
+  * @description:
+  *   A pointer to an @FT_Incremental_InterfaceRec structure.
+  *
+  */
+  typedef FT_Incremental_InterfaceRec*   FT_Incremental_Interface;
+
+
+ /***************************************************************************
+  *
+  * @constant:
+  *   FT_PARAM_TAG_INCREMENTAL
+  *
+  * @description:
+  *   A constant used as the tag of @FT_Parameter structures to indicate
+  *   an incremental loading object to be used by FreeType.
+  *
+  */
+#define FT_PARAM_TAG_INCREMENTAL  FT_MAKE_TAG( 'i', 'n', 'c', 'r' )
+
+ /* */
+
+FT_END_HEADER
+
+#endif /* __FTINCREM_H__ */
+
+
+/* END */
diff --git a/include/freetype2/freetype/ftlcdfil.h b/include/freetype2/freetype/ftlcdfil.h
new file mode 100644 (file)
index 0000000..9a61377
--- /dev/null
@@ -0,0 +1,166 @@
+/***************************************************************************/
+/*                                                                         */
+/*  ftlcdfil.h                                                             */
+/*                                                                         */
+/*    FreeType API for color filtering of subpixel bitmap glyphs           */
+/*    (specification).                                                     */
+/*                                                                         */
+/*  Copyright 2006, 2007 by                                                */
+/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
+/*                                                                         */
+/*  This file is part of the FreeType project, and may only be used,       */
+/*  modified, and distributed under the terms of the FreeType project      */
+/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
+/*  this file you indicate that you have read the license and              */
+/*  understand and accept it fully.                                        */
+/*                                                                         */
+/***************************************************************************/
+
+
+#ifndef __FT_LCD_FILTER_H__
+#define __FT_LCD_FILTER_H__
+
+#include <ft2build.h>
+#include FT_FREETYPE_H
+
+
+FT_BEGIN_HEADER
+
+  /***************************************************************************
+   *
+   * @section:
+   *   lcd_filtering
+   *
+   * @title:
+   *   LCD Filtering
+   *
+   * @abstract:
+   *   Reduce color fringes of LCD-optimized bitmaps.
+   *
+   * @description:
+   *   The @FT_Library_SetLcdFilter API can be used to specify a low-pass
+   *   filter which is then applied to LCD-optimized bitmaps generated
+   *   through @FT_Render_Glyph.  This is useful to reduce color fringes
+   *   which would occur with unfiltered rendering.
+   *
+   *   Note that no filter is active by default, and that this function is
+   *   *not* implemented in default builds of the library.  You need to
+   *   #define FT_CONFIG_OPTION_SUBPIXEL_RENDERING in your `ftoption.h' file
+   *   in order to activate it.
+   */
+
+
+  /****************************************************************************
+   *
+   * @func:
+   *   FT_LcdFilter
+   *
+   * @description:
+   *   A list of values to identify various types of LCD filters.
+   *
+   * @values:
+   *   FT_LCD_FILTER_NONE ::
+   *     Do not perform filtering.  When used with subpixel rendering, this
+   *     results in sometimes severe color fringes.
+   *
+   *   FT_LCD_FILTER_DEFAULT ::
+   *     The default filter reduces color fringes considerably, at the cost
+   *     of a slight blurriness in the output.
+   *
+   *   FT_LCD_FILTER_LIGHT ::
+   *     The light filter is a variant that produces less blurriness at the
+   *     cost of slightly more color fringes than the default one.  It might
+   *     be better, depending on taste, your monitor, or your personal vision.
+   *
+   *   FT_LCD_FILTER_LEGACY ::
+   *     This filter corresponds to the original libXft color filter.  It
+   *     provides high contrast output but can exhibit really bad color
+   *     fringes if glyphs are not extremely well hinted to the pixel grid.
+   *     In other words, it only works well if the TrueType bytecode
+   *     interpreter is enabled *and* high-quality hinted fonts are used.
+   *
+   *     This filter is only provided for comparison purposes, and might be
+   *     disabled or stay unsupported in the future.
+   *
+   * @since:
+   *   2.3.0
+   */
+  typedef enum
+  {
+    FT_LCD_FILTER_NONE    = 0,
+    FT_LCD_FILTER_DEFAULT = 1,
+    FT_LCD_FILTER_LIGHT   = 2,
+    FT_LCD_FILTER_LEGACY  = 16,
+
+    FT_LCD_FILTER_MAX   /* do not remove */
+
+  } FT_LcdFilter;
+
+
+  /**************************************************************************
+   *
+   * @func:
+   *   FT_Library_SetLcdFilter
+   *
+   * @description:
+   *   This function is used to apply color filtering to LCD decimated
+   *   bitmaps, like the ones used when calling @FT_Render_Glyph with
+   *   @FT_RENDER_MODE_LCD or @FT_RENDER_MODE_LCD_V.
+   *
+   * @input:
+   *   library ::
+   *     A handle to the target library instance.
+   *
+   *   filter ::
+   *     The filter type.
+   *
+   *     You can use @FT_LCD_FILTER_NONE here to disable this feature, or
+   *     @FT_LCD_FILTER_DEFAULT to use a default filter that should work
+   *     well on most LCD screens.
+   *
+   * @return:
+   *   FreeType error code.  0 means success.
+   *
+   * @note:
+   *   This feature is always disabled by default.  Clients must make an
+   *   explicit call to this function with a `filter' value other than
+   *   @FT_LCD_FILTER_NONE in order to enable it.
+   *
+   *   Due to *PATENTS* covering subpixel rendering, this function doesn't
+   *   do anything except returning `FT_Err_Unimplemented_Feature' if the
+   *   configuration macro FT_CONFIG_OPTION_SUBPIXEL_RENDERING is not
+   *   defined in your build of the library, which should correspond to all
+   *   default builds of FreeType.
+   *
+   *   The filter affects glyph bitmaps rendered through @FT_Render_Glyph,
+   *   @FT_Outline_Get_Bitmap, @FT_Load_Glyph, and @FT_Load_Char.
+   *
+   *   It does _not_ affect the output of @FT_Outline_Render and
+   *   @FT_Outline_Get_Bitmap.
+   *
+   *   If this feature is activated, the dimensions of LCD glyph bitmaps are
+   *   either larger or taller than the dimensions of the corresponding
+   *   outline with regards to the pixel grid.  For example, for
+   *   @FT_RENDER_MODE_LCD, the filter adds up to 3 pixels to the left, and
+   *   up to 3 pixels to the right.
+   *
+   *   The bitmap offset values are adjusted correctly, so clients shouldn't
+   *   need to modify their layout and glyph positioning code when enabling
+   *   the filter.
+   *
+   * @since:
+   *   2.3.0
+   */
+  FT_EXPORT( FT_Error )
+  FT_Library_SetLcdFilter( FT_Library    library,
+                           FT_LcdFilter  filter );
+
+  /* */
+
+
+FT_END_HEADER
+
+#endif /* __FT_LCD_FILTER_H__ */
+
+
+/* END */
diff --git a/include/freetype2/freetype/ftlist.h b/include/freetype2/freetype/ftlist.h
new file mode 100644 (file)
index 0000000..f3223ee
--- /dev/null
@@ -0,0 +1,273 @@
+/***************************************************************************/
+/*                                                                         */
+/*  ftlist.h                                                               */
+/*                                                                         */
+/*    Generic list support for FreeType (specification).                   */
+/*                                                                         */
+/*  Copyright 1996-2001, 2003, 2007 by                                     */
+/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
+/*                                                                         */
+/*  This file is part of the FreeType project, and may only be used,       */
+/*  modified, and distributed under the terms of the FreeType project      */
+/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
+/*  this file you indicate that you have read the license and              */
+/*  understand and accept it fully.                                        */
+/*                                                                         */
+/***************************************************************************/
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /*  This file implements functions relative to list processing.  Its     */
+  /*  data structures are defined in `freetype.h'.                         */
+  /*                                                                       */
+  /*************************************************************************/
+
+
+#ifndef __FTLIST_H__
+#define __FTLIST_H__
+
+
+#include <ft2build.h>
+#include FT_FREETYPE_H
+
+#ifdef FREETYPE_H
+#error "freetype.h of FreeType 1 has been loaded!"
+#error "Please fix the directory search order for header files"
+#error "so that freetype.h of FreeType 2 is found first."
+#endif
+
+
+FT_BEGIN_HEADER
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Section>                                                             */
+  /*    list_processing                                                    */
+  /*                                                                       */
+  /* <Title>                                                               */
+  /*    List Processing                                                    */
+  /*                                                                       */
+  /* <Abstract>                                                            */
+  /*    Simple management of lists.                                        */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    This section contains various definitions related to list          */
+  /*    processing using doubly-linked nodes.                              */
+  /*                                                                       */
+  /* <Order>                                                               */
+  /*    FT_List                                                            */
+  /*    FT_ListNode                                                        */
+  /*    FT_ListRec                                                         */
+  /*    FT_ListNodeRec                                                     */
+  /*                                                                       */
+  /*    FT_List_Add                                                        */
+  /*    FT_List_Insert                                                     */
+  /*    FT_List_Find                                                       */
+  /*    FT_List_Remove                                                     */
+  /*    FT_List_Up                                                         */
+  /*    FT_List_Iterate                                                    */
+  /*    FT_List_Iterator                                                   */
+  /*    FT_List_Finalize                                                   */
+  /*    FT_List_Destructor                                                 */
+  /*                                                                       */
+  /*************************************************************************/
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_List_Find                                                       */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Finds the list node for a given listed object.                     */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    list :: A pointer to the parent list.                              */
+  /*    data :: The address of the listed object.                          */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    List node.  NULL if it wasn't found.                               */
+  /*                                                                       */
+  FT_EXPORT( FT_ListNode )
+  FT_List_Find( FT_List  list,
+                void*    data );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_List_Add                                                        */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Appends an element to the end of a list.                           */
+  /*                                                                       */
+  /* <InOut>                                                               */
+  /*    list :: A pointer to the parent list.                              */
+  /*    node :: The node to append.                                        */
+  /*                                                                       */
+  FT_EXPORT( void )
+  FT_List_Add( FT_List      list,
+               FT_ListNode  node );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_List_Insert                                                     */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Inserts an element at the head of a list.                          */
+  /*                                                                       */
+  /* <InOut>                                                               */
+  /*    list :: A pointer to parent list.                                  */
+  /*    node :: The node to insert.                                        */
+  /*                                                                       */
+  FT_EXPORT( void )
+  FT_List_Insert( FT_List      list,
+                  FT_ListNode  node );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_List_Remove                                                     */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Removes a node from a list.  This function doesn't check whether   */
+  /*    the node is in the list!                                           */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    node :: The node to remove.                                        */
+  /*                                                                       */
+  /* <InOut>                                                               */
+  /*    list :: A pointer to the parent list.                              */
+  /*                                                                       */
+  FT_EXPORT( void )
+  FT_List_Remove( FT_List      list,
+                  FT_ListNode  node );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_List_Up                                                         */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Moves a node to the head/top of a list.  Used to maintain LRU      */
+  /*    lists.                                                             */
+  /*                                                                       */
+  /* <InOut>                                                               */
+  /*    list :: A pointer to the parent list.                              */
+  /*    node :: The node to move.                                          */
+  /*                                                                       */
+  FT_EXPORT( void )
+  FT_List_Up( FT_List      list,
+              FT_ListNode  node );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <FuncType>                                                            */
+  /*    FT_List_Iterator                                                   */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    An FT_List iterator function which is called during a list parse   */
+  /*    by @FT_List_Iterate.                                               */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    node :: The current iteration list node.                           */
+  /*                                                                       */
+  /*    user :: A typeless pointer passed to @FT_List_Iterate.             */
+  /*            Can be used to point to the iteration's state.             */
+  /*                                                                       */
+  typedef FT_Error
+  (*FT_List_Iterator)( FT_ListNode  node,
+                       void*        user );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_List_Iterate                                                    */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Parses a list and calls a given iterator function on each element. */
+  /*    Note that parsing is stopped as soon as one of the iterator calls  */
+  /*    returns a non-zero value.                                          */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    list     :: A handle to the list.                                  */
+  /*    iterator :: An iterator function, called on each node of the list. */
+  /*    user     :: A user-supplied field which is passed as the second    */
+  /*                argument to the iterator.                              */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    The result (a FreeType error code) of the last iterator call.      */
+  /*                                                                       */
+  FT_EXPORT( FT_Error )
+  FT_List_Iterate( FT_List           list,
+                   FT_List_Iterator  iterator,
+                   void*             user );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <FuncType>                                                            */
+  /*    FT_List_Destructor                                                 */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    An @FT_List iterator function which is called during a list        */
+  /*    finalization by @FT_List_Finalize to destroy all elements in a     */
+  /*    given list.                                                        */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    system :: The current system object.                               */
+  /*                                                                       */
+  /*    data   :: The current object to destroy.                           */
+  /*                                                                       */
+  /*    user   :: A typeless pointer passed to @FT_List_Iterate.  It can   */
+  /*              be used to point to the iteration's state.               */
+  /*                                                                       */
+  typedef void
+  (*FT_List_Destructor)( FT_Memory  memory,
+                         void*      data,
+                         void*      user );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_List_Finalize                                                   */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Destroys all elements in the list as well as the list itself.      */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    list    :: A handle to the list.                                   */
+  /*                                                                       */
+  /*    destroy :: A list destructor that will be applied to each element  */
+  /*               of the list.                                            */
+  /*                                                                       */
+  /*    memory  :: The current memory object which handles deallocation.   */
+  /*                                                                       */
+  /*    user    :: A user-supplied field which is passed as the last       */
+  /*               argument to the destructor.                             */
+  /*                                                                       */
+  FT_EXPORT( void )
+  FT_List_Finalize( FT_List             list,
+                    FT_List_Destructor  destroy,
+                    FT_Memory           memory,
+                    void*               user );
+
+
+  /* */
+
+
+FT_END_HEADER
+
+#endif /* __FTLIST_H__ */
+
+
+/* END */
diff --git a/include/freetype2/freetype/ftlzw.h b/include/freetype2/freetype/ftlzw.h
new file mode 100644 (file)
index 0000000..d950653
--- /dev/null
@@ -0,0 +1,99 @@
+/***************************************************************************/
+/*                                                                         */
+/*  ftlzw.h                                                                */
+/*                                                                         */
+/*    LZW-compressed stream support.                                       */
+/*                                                                         */
+/*  Copyright 2004, 2006 by                                                */
+/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
+/*                                                                         */
+/*  This file is part of the FreeType project, and may only be used,       */
+/*  modified, and distributed under the terms of the FreeType project      */
+/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
+/*  this file you indicate that you have read the license and              */
+/*  understand and accept it fully.                                        */
+/*                                                                         */
+/***************************************************************************/
+
+
+#ifndef __FTLZW_H__
+#define __FTLZW_H__
+
+#include <ft2build.h>
+#include FT_FREETYPE_H
+
+#ifdef FREETYPE_H
+#error "freetype.h of FreeType 1 has been loaded!"
+#error "Please fix the directory search order for header files"
+#error "so that freetype.h of FreeType 2 is found first."
+#endif
+
+
+FT_BEGIN_HEADER
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Section>                                                             */
+  /*    lzw                                                                */
+  /*                                                                       */
+  /* <Title>                                                               */
+  /*    LZW Streams                                                        */
+  /*                                                                       */
+  /* <Abstract>                                                            */
+  /*    Using LZW-compressed font files.                                   */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    This section contains the declaration of LZW-specific functions.   */
+  /*                                                                       */
+  /*************************************************************************/
+
+ /************************************************************************
+  *
+  * @function:
+  *   FT_Stream_OpenLZW
+  *
+  * @description:
+  *   Open a new stream to parse LZW-compressed font files.  This is
+  *   mainly used to support the compressed `*.pcf.Z' fonts that come
+  *   with XFree86.
+  *
+  * @input:
+  *   stream :: The target embedding stream.
+  *
+  *   source :: The source stream.
+  *
+  * @return:
+  *   FreeType error code.  0 means success.
+  *
+  * @note:
+  *   The source stream must be opened _before_ calling this function.
+  *
+  *   Calling the internal function `FT_Stream_Close' on the new stream will
+  *   *not* call `FT_Stream_Close' on the source stream.  None of the stream
+  *   objects will be released to the heap.
+  *
+  *   The stream implementation is very basic and resets the decompression
+  *   process each time seeking backwards is needed within the stream
+  *
+  *   In certain builds of the library, LZW compression recognition is
+  *   automatically handled when calling @FT_New_Face or @FT_Open_Face.
+  *   This means that if no font driver is capable of handling the raw
+  *   compressed file, the library will try to open a LZW stream from it
+  *   and re-open the face with it.
+  *
+  *   This function may return `FT_Err_Unimplemented_Feature' if your build
+  *   of FreeType was not compiled with LZW support.
+  */
+  FT_EXPORT( FT_Error )
+  FT_Stream_OpenLZW( FT_Stream  stream,
+                     FT_Stream  source );
+
+ /* */
+
+
+FT_END_HEADER
+
+#endif /* __FTLZW_H__ */
+
+
+/* END */
diff --git a/include/freetype2/freetype/ftmac.h b/include/freetype2/freetype/ftmac.h
new file mode 100644 (file)
index 0000000..3c6fafe
--- /dev/null
@@ -0,0 +1,272 @@
+/***************************************************************************/
+/*                                                                         */
+/*  ftmac.h                                                                */
+/*                                                                         */
+/*    Additional Mac-specific API.                                         */
+/*                                                                         */
+/*  Copyright 1996-2001, 2004, 2006, 2007 by                               */
+/*  Just van Rossum, David Turner, Robert Wilhelm, and Werner Lemberg.     */
+/*                                                                         */
+/*  This file is part of the FreeType project, and may only be used,       */
+/*  modified, and distributed under the terms of the FreeType project      */
+/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
+/*  this file you indicate that you have read the license and              */
+/*  understand and accept it fully.                                        */
+/*                                                                         */
+/***************************************************************************/
+
+
+/***************************************************************************/
+/*                                                                         */
+/* NOTE: Include this file after <freetype/freetype.h> and after the       */
+/*       Mac-specific <Types.h> header (or any other Mac header that       */
+/*       includes <Types.h>); we use Handle type.                          */
+/*                                                                         */
+/***************************************************************************/
+
+
+#ifndef __FTMAC_H__
+#define __FTMAC_H__
+
+
+#include <ft2build.h>
+
+
+FT_BEGIN_HEADER
+
+
+/* gcc-3.4.1 and later can warn about functions tagged as deprecated */
+#ifndef FT_DEPRECATED_ATTRIBUTE
+#if defined(__GNUC__)                                               && \
+    ((__GNUC__ >= 4) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1)))
+#define FT_DEPRECATED_ATTRIBUTE  __attribute__((deprecated))
+#else
+#define FT_DEPRECATED_ATTRIBUTE
+#endif
+#endif
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Section>                                                             */
+  /*    mac_specific                                                       */
+  /*                                                                       */
+  /* <Title>                                                               */
+  /*    Mac Specific Interface                                             */
+  /*                                                                       */
+  /* <Abstract>                                                            */
+  /*    Only available on the Macintosh.                                   */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    The following definitions are only available if FreeType is        */
+  /*    compiled on a Macintosh.                                           */
+  /*                                                                       */
+  /*************************************************************************/
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_New_Face_From_FOND                                              */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Create a new face object from a FOND resource.                     */
+  /*                                                                       */
+  /* <InOut>                                                               */
+  /*    library    :: A handle to the library resource.                    */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    fond       :: A FOND resource.                                     */
+  /*                                                                       */
+  /*    face_index :: Only supported for the -1 `sanity check' special     */
+  /*                  case.                                                */
+  /*                                                                       */
+  /* <Output>                                                              */
+  /*    aface      :: A handle to a new face object.                       */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  0 means success.                             */
+  /*                                                                       */
+  /* <Notes>                                                               */
+  /*    This function can be used to create @FT_Face objects from fonts    */
+  /*    that are installed in the system as follows.                       */
+  /*                                                                       */
+  /*    {                                                                  */
+  /*      fond = GetResource( 'FOND', fontName );                          */
+  /*      error = FT_New_Face_From_FOND( library, fond, 0, &face );        */
+  /*    }                                                                  */
+  /*                                                                       */
+  FT_EXPORT( FT_Error )
+  FT_New_Face_From_FOND( FT_Library  library,
+                         Handle      fond,
+                         FT_Long     face_index,
+                         FT_Face    *aface );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_GetFile_From_Mac_Name                                           */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Return an FSSpec for the disk file containing the named font.      */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    fontName   :: Mac OS name of the font (e.g., Times New Roman       */
+  /*                  Bold).                                               */
+  /*                                                                       */
+  /* <Output>                                                              */
+  /*    pathSpec   :: FSSpec to the file.  For passing to                  */
+  /*                  @FT_New_Face_From_FSSpec.                            */
+  /*                                                                       */
+  /*    face_index :: Index of the face.  For passing to                   */
+  /*                  @FT_New_Face_From_FSSpec.                            */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  0 means success.                             */
+  /*                                                                       */
+  FT_EXPORT( FT_Error )
+  FT_GetFile_From_Mac_Name( const char*  fontName,
+                            FSSpec*      pathSpec,
+                            FT_Long*     face_index )
+                          FT_DEPRECATED_ATTRIBUTE;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_GetFile_From_Mac_ATS_Name                                       */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Return an FSSpec for the disk file containing the named font.      */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    fontName   :: Mac OS name of the font in ATS framework.            */
+  /*                                                                       */
+  /* <Output>                                                              */
+  /*    pathSpec   :: FSSpec to the file. For passing to                   */
+  /*                  @FT_New_Face_From_FSSpec.                            */
+  /*                                                                       */
+  /*    face_index :: Index of the face. For passing to                    */
+  /*                  @FT_New_Face_From_FSSpec.                            */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  0 means success.                             */
+  /*                                                                       */
+  FT_EXPORT( FT_Error )
+  FT_GetFile_From_Mac_ATS_Name( const char*  fontName,
+                                FSSpec*      pathSpec,
+                                FT_Long*     face_index )
+                              FT_DEPRECATED_ATTRIBUTE;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_GetFilePath_From_Mac_ATS_Name                                   */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Return a pathname of the disk file and face index for given font   */
+  /*    name which is handled by ATS framework.                            */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    fontName    :: Mac OS name of the font in ATS framework.           */
+  /*                                                                       */
+  /* <Output>                                                              */
+  /*    path        :: Buffer to store pathname of the file.  For passing  */
+  /*                   to @FT_New_Face.  The client must allocate this     */
+  /*                   buffer before calling this function.                */
+  /*                                                                       */
+  /*    maxPathSize :: Lengths of the buffer `path' that client allocated. */
+  /*                                                                       */
+  /*    face_index  :: Index of the face.  For passing to @FT_New_Face.    */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  0 means success.                             */
+  /*                                                                       */
+  FT_EXPORT( FT_Error )
+  FT_GetFilePath_From_Mac_ATS_Name( const char*  fontName,
+                                    UInt8*       path,
+                                    UInt32       maxPathSize,
+                                    FT_Long*     face_index );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_New_Face_From_FSSpec                                            */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Create a new face object from a given resource and typeface index  */
+  /*    using an FSSpec to the font file.                                  */
+  /*                                                                       */
+  /* <InOut>                                                               */
+  /*    library    :: A handle to the library resource.                    */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    spec       :: FSSpec to the font file.                             */
+  /*                                                                       */
+  /*    face_index :: The index of the face within the resource.  The      */
+  /*                  first face has index 0.                              */
+  /* <Output>                                                              */
+  /*    aface      :: A handle to a new face object.                       */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  0 means success.                             */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    @FT_New_Face_From_FSSpec is identical to @FT_New_Face except       */
+  /*    it accepts an FSSpec instead of a path.                            */
+  /*                                                                       */
+  FT_EXPORT( FT_Error )
+  FT_New_Face_From_FSSpec( FT_Library     library,
+                           const FSSpec  *spec,
+                           FT_Long        face_index,
+                           FT_Face       *aface )
+                         FT_DEPRECATED_ATTRIBUTE;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_New_Face_From_FSRef                                             */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Create a new face object from a given resource and typeface index  */
+  /*    using an FSRef to the font file.                                   */
+  /*                                                                       */
+  /* <InOut>                                                               */
+  /*    library    :: A handle to the library resource.                    */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    spec       :: FSRef to the font file.                              */
+  /*                                                                       */
+  /*    face_index :: The index of the face within the resource.  The      */
+  /*                  first face has index 0.                              */
+  /* <Output>                                                              */
+  /*    aface      :: A handle to a new face object.                       */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  0 means success.                             */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    @FT_New_Face_From_FSRef is identical to @FT_New_Face except        */
+  /*    it accepts an FSRef instead of a path.                             */
+  /*                                                                       */
+  FT_EXPORT( FT_Error )
+  FT_New_Face_From_FSRef( FT_Library    library,
+                          const FSRef  *ref,
+                          FT_Long       face_index,
+                          FT_Face      *aface )
+                        FT_DEPRECATED_ATTRIBUTE;
+
+  /* */
+
+
+FT_END_HEADER
+
+
+#endif /* __FTMAC_H__ */
+
+
+/* END */
diff --git a/include/freetype2/freetype/ftmm.h b/include/freetype2/freetype/ftmm.h
new file mode 100644 (file)
index 0000000..a9ccfe7
--- /dev/null
@@ -0,0 +1,378 @@
+/***************************************************************************/
+/*                                                                         */
+/*  ftmm.h                                                                 */
+/*                                                                         */
+/*    FreeType Multiple Master font interface (specification).             */
+/*                                                                         */
+/*  Copyright 1996-2001, 2003, 2004, 2006 by                               */
+/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
+/*                                                                         */
+/*  This file is part of the FreeType project, and may only be used,       */
+/*  modified, and distributed under the terms of the FreeType project      */
+/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
+/*  this file you indicate that you have read the license and              */
+/*  understand and accept it fully.                                        */
+/*                                                                         */
+/***************************************************************************/
+
+
+#ifndef __FTMM_H__
+#define __FTMM_H__
+
+
+#include <ft2build.h>
+#include FT_TYPE1_TABLES_H
+
+
+FT_BEGIN_HEADER
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Section>                                                             */
+  /*    multiple_masters                                                   */
+  /*                                                                       */
+  /* <Title>                                                               */
+  /*    Multiple Masters                                                   */
+  /*                                                                       */
+  /* <Abstract>                                                            */
+  /*    How to manage Multiple Masters fonts.                              */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    The following types and functions are used to manage Multiple      */
+  /*    Master fonts, i.e., the selection of specific design instances by  */
+  /*    setting design axis coordinates.                                   */
+  /*                                                                       */
+  /*    George Williams has extended this interface to make it work with   */
+  /*    both Type 1 Multiple Masters fonts and GX distortable (var)        */
+  /*    fonts.  Some of these routines only work with MM fonts, others     */
+  /*    will work with both types.  They are similar enough that a         */
+  /*    consistent interface makes sense.                                  */
+  /*                                                                       */
+  /*************************************************************************/
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Struct>                                                              */
+  /*    FT_MM_Axis                                                         */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A simple structure used to model a given axis in design space for  */
+  /*    Multiple Masters fonts.                                            */
+  /*                                                                       */
+  /*    This structure can't be used for GX var fonts.                     */
+  /*                                                                       */
+  /* <Fields>                                                              */
+  /*    name    :: The axis's name.                                        */
+  /*                                                                       */
+  /*    minimum :: The axis's minimum design coordinate.                   */
+  /*                                                                       */
+  /*    maximum :: The axis's maximum design coordinate.                   */
+  /*                                                                       */
+  typedef struct  FT_MM_Axis_
+  {
+    FT_String*  name;
+    FT_Long     minimum;
+    FT_Long     maximum;
+
+  } FT_MM_Axis;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Struct>                                                              */
+  /*    FT_Multi_Master                                                    */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A structure used to model the axes and space of a Multiple Masters */
+  /*    font.                                                              */
+  /*                                                                       */
+  /*    This structure can't be used for GX var fonts.                     */
+  /*                                                                       */
+  /* <Fields>                                                              */
+  /*    num_axis    :: Number of axes.  Cannot exceed 4.                   */
+  /*                                                                       */
+  /*    num_designs :: Number of designs; should be normally 2^num_axis    */
+  /*                   even though the Type 1 specification strangely      */
+  /*                   allows for intermediate designs to be present. This */
+  /*                   number cannot exceed 16.                            */
+  /*                                                                       */
+  /*    axis        :: A table of axis descriptors.                        */
+  /*                                                                       */
+  typedef struct  FT_Multi_Master_
+  {
+    FT_UInt     num_axis;
+    FT_UInt     num_designs;
+    FT_MM_Axis  axis[T1_MAX_MM_AXIS];
+
+  } FT_Multi_Master;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Struct>                                                              */
+  /*    FT_Var_Axis                                                        */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A simple structure used to model a given axis in design space for  */
+  /*    Multiple Masters and GX var fonts.                                 */
+  /*                                                                       */
+  /* <Fields>                                                              */
+  /*    name    :: The axis's name.                                        */
+  /*               Not always meaningful for GX.                           */
+  /*                                                                       */
+  /*    minimum :: The axis's minimum design coordinate.                   */
+  /*                                                                       */
+  /*    def     :: The axis's default design coordinate.                   */
+  /*               FreeType computes meaningful default values for MM; it  */
+  /*               is then an integer value, not in 16.16 format.          */
+  /*                                                                       */
+  /*    maximum :: The axis's maximum design coordinate.                   */
+  /*                                                                       */
+  /*    tag     :: The axis's tag (the GX equivalent to `name').           */
+  /*               FreeType provides default values for MM if possible.    */
+  /*                                                                       */
+  /*    strid   :: The entry in `name' table (another GX version of        */
+  /*               `name').                                                */
+  /*               Not meaningful for MM.                                  */
+  /*                                                                       */
+  typedef struct  FT_Var_Axis_
+  {
+    FT_String*  name;
+
+    FT_Fixed    minimum;
+    FT_Fixed    def;
+    FT_Fixed    maximum;
+
+    FT_ULong    tag;
+    FT_UInt     strid;
+
+  } FT_Var_Axis;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Struct>                                                              */
+  /*    FT_Var_Named_Style                                                 */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A simple structure used to model a named style in a GX var font.   */
+  /*                                                                       */
+  /*    This structure can't be used for MM fonts.                         */
+  /*                                                                       */
+  /* <Fields>                                                              */
+  /*    coords :: The design coordinates for this style.                   */
+  /*              This is an array with one entry for each axis.           */
+  /*                                                                       */
+  /*    strid  :: The entry in `name' table identifying this style.        */
+  /*                                                                       */
+  typedef struct  FT_Var_Named_Style_
+  {
+    FT_Fixed*  coords;
+    FT_UInt    strid;
+
+  } FT_Var_Named_Style;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Struct>                                                              */
+  /*    FT_MM_Var                                                          */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A structure used to model the axes and space of a Multiple Masters */
+  /*    or GX var distortable font.                                        */
+  /*                                                                       */
+  /*    Some fields are specific to one format and not to the other.       */
+  /*                                                                       */
+  /* <Fields>                                                              */
+  /*    num_axis        :: The number of axes.  The maximum value is 4 for */
+  /*                       MM; no limit in GX.                             */
+  /*                                                                       */
+  /*    num_designs     :: The number of designs; should be normally       */
+  /*                       2^num_axis for MM fonts.  Not meaningful for GX */
+  /*                       (where every glyph could have a different       */
+  /*                       number of designs).                             */
+  /*                                                                       */
+  /*    num_namedstyles :: The number of named styles; only meaningful for */
+  /*                       GX which allows certain design coordinates to   */
+  /*                       have a string ID (in the `name' table)          */
+  /*                       associated with them.  The font can tell the    */
+  /*                       user that, for example, Weight=1.5 is `Bold'.   */
+  /*                                                                       */
+  /*    axis            :: A table of axis descriptors.                    */
+  /*                       GX fonts contain slightly more data than MM.    */
+  /*                                                                       */
+  /*    namedstyles     :: A table of named styles.                        */
+  /*                       Only meaningful with GX.                        */
+  /*                                                                       */
+  typedef struct  FT_MM_Var_
+  {
+    FT_UInt              num_axis;
+    FT_UInt              num_designs;
+    FT_UInt              num_namedstyles;
+    FT_Var_Axis*         axis;
+    FT_Var_Named_Style*  namedstyle;
+
+  } FT_MM_Var;
+
+
+  /* */
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_Get_Multi_Master                                                */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Retrieves the Multiple Master descriptor of a given font.          */
+  /*                                                                       */
+  /*    This function can't be used with GX fonts.                         */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    face    :: A handle to the source face.                            */
+  /*                                                                       */
+  /* <Output>                                                              */
+  /*    amaster :: The Multiple Masters descriptor.                        */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  0 means success.                             */
+  /*                                                                       */
+  FT_EXPORT( FT_Error )
+  FT_Get_Multi_Master( FT_Face           face,
+                       FT_Multi_Master  *amaster );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_Get_MM_Var                                                      */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Retrieves the Multiple Master/GX var descriptor of a given font.   */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    face    :: A handle to the source face.                            */
+  /*                                                                       */
+  /* <Output>                                                              */
+  /*    amaster :: The Multiple Masters descriptor.                        */
+  /*               Allocates a data structure, which the user must free    */
+  /*               (a single call to FT_FREE will do it).                  */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  0 means success.                             */
+  /*                                                                       */
+  FT_EXPORT( FT_Error )
+  FT_Get_MM_Var( FT_Face      face,
+                 FT_MM_Var*  *amaster );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_Set_MM_Design_Coordinates                                       */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    For Multiple Masters fonts, choose an interpolated font design     */
+  /*    through design coordinates.                                        */
+  /*                                                                       */
+  /*    This function can't be used with GX fonts.                         */
+  /*                                                                       */
+  /* <InOut>                                                               */
+  /*    face       :: A handle to the source face.                         */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    num_coords :: The number of design coordinates (must be equal to   */
+  /*                  the number of axes in the font).                     */
+  /*                                                                       */
+  /*    coords     :: An array of design coordinates.                      */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  0 means success.                             */
+  /*                                                                       */
+  FT_EXPORT( FT_Error )
+  FT_Set_MM_Design_Coordinates( FT_Face   face,
+                                FT_UInt   num_coords,
+                                FT_Long*  coords );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_Set_Var_Design_Coordinates                                      */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    For Multiple Master or GX Var fonts, choose an interpolated font   */
+  /*    design through design coordinates.                                 */
+  /*                                                                       */
+  /* <InOut>                                                               */
+  /*    face       :: A handle to the source face.                         */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    num_coords :: The number of design coordinates (must be equal to   */
+  /*                  the number of axes in the font).                     */
+  /*                                                                       */
+  /*    coords     :: An array of design coordinates.                      */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  0 means success.                             */
+  /*                                                                       */
+  FT_EXPORT( FT_Error )
+  FT_Set_Var_Design_Coordinates( FT_Face    face,
+                                 FT_UInt    num_coords,
+                                 FT_Fixed*  coords );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_Set_MM_Blend_Coordinates                                        */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    For Multiple Masters and GX var fonts, choose an interpolated font */
+  /*    design through normalized blend coordinates.                       */
+  /*                                                                       */
+  /* <InOut>                                                               */
+  /*    face       :: A handle to the source face.                         */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    num_coords :: The number of design coordinates (must be equal to   */
+  /*                  the number of axes in the font).                     */
+  /*                                                                       */
+  /*    coords     :: The design coordinates array (each element must be   */
+  /*                  between 0 and 1.0).                                  */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  0 means success.                             */
+  /*                                                                       */
+  FT_EXPORT( FT_Error )
+  FT_Set_MM_Blend_Coordinates( FT_Face    face,
+                               FT_UInt    num_coords,
+                               FT_Fixed*  coords );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_Set_Var_Blend_Coordinates                                       */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    This is another name of @FT_Set_MM_Blend_Coordinates.              */
+  /*                                                                       */
+  FT_EXPORT( FT_Error )
+  FT_Set_Var_Blend_Coordinates( FT_Face    face,
+                                FT_UInt    num_coords,
+                                FT_Fixed*  coords );
+
+
+  /* */
+
+
+FT_END_HEADER
+
+#endif /* __FTMM_H__ */
+
+
+/* END */
diff --git a/include/freetype2/freetype/ftmodapi.h b/include/freetype2/freetype/ftmodapi.h
new file mode 100644 (file)
index 0000000..9cc32af
--- /dev/null
@@ -0,0 +1,406 @@
+/***************************************************************************/
+/*                                                                         */
+/*  ftmodapi.h                                                             */
+/*                                                                         */
+/*    FreeType modules public interface (specification).                   */
+/*                                                                         */
+/*  Copyright 1996-2001, 2002, 2003, 2006 by                               */
+/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
+/*                                                                         */
+/*  This file is part of the FreeType project, and may only be used,       */
+/*  modified, and distributed under the terms of the FreeType project      */
+/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
+/*  this file you indicate that you have read the license and              */
+/*  understand and accept it fully.                                        */
+/*                                                                         */
+/***************************************************************************/
+
+
+#ifndef __FTMODAPI_H__
+#define __FTMODAPI_H__
+
+
+#include <ft2build.h>
+#include FT_FREETYPE_H
+
+#ifdef FREETYPE_H
+#error "freetype.h of FreeType 1 has been loaded!"
+#error "Please fix the directory search order for header files"
+#error "so that freetype.h of FreeType 2 is found first."
+#endif
+
+
+FT_BEGIN_HEADER
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Section>                                                             */
+  /*    module_management                                                  */
+  /*                                                                       */
+  /* <Title>                                                               */
+  /*    Module Management                                                  */
+  /*                                                                       */
+  /* <Abstract>                                                            */
+  /*    How to add, upgrade, and remove modules from FreeType.             */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    The definitions below are used to manage modules within FreeType.  */
+  /*    Modules can be added, upgraded, and removed at runtime.            */
+  /*                                                                       */
+  /*************************************************************************/
+
+
+  /* module bit flags */
+#define FT_MODULE_FONT_DRIVER         1  /* this module is a font driver  */
+#define FT_MODULE_RENDERER            2  /* this module is a renderer     */
+#define FT_MODULE_HINTER              4  /* this module is a glyph hinter */
+#define FT_MODULE_STYLER              8  /* this module is a styler       */
+
+#define FT_MODULE_DRIVER_SCALABLE     0x100   /* the driver supports      */
+                                              /* scalable fonts           */
+#define FT_MODULE_DRIVER_NO_OUTLINES  0x200   /* the driver does not      */
+                                              /* support vector outlines  */
+#define FT_MODULE_DRIVER_HAS_HINTER   0x400   /* the driver provides its  */
+                                              /* own hinter               */
+
+
+  /* deprecated values */
+#define ft_module_font_driver         FT_MODULE_FONT_DRIVER
+#define ft_module_renderer            FT_MODULE_RENDERER
+#define ft_module_hinter              FT_MODULE_HINTER
+#define ft_module_styler              FT_MODULE_STYLER
+
+#define ft_module_driver_scalable     FT_MODULE_DRIVER_SCALABLE
+#define ft_module_driver_no_outlines  FT_MODULE_DRIVER_NO_OUTLINES
+#define ft_module_driver_has_hinter   FT_MODULE_DRIVER_HAS_HINTER
+
+
+  typedef FT_Pointer  FT_Module_Interface;
+
+  typedef FT_Error
+  (*FT_Module_Constructor)( FT_Module  module );
+
+  typedef void
+  (*FT_Module_Destructor)( FT_Module  module );
+
+  typedef FT_Module_Interface
+  (*FT_Module_Requester)( FT_Module    module,
+                          const char*  name );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Struct>                                                              */
+  /*    FT_Module_Class                                                    */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    The module class descriptor.                                       */
+  /*                                                                       */
+  /* <Fields>                                                              */
+  /*    module_flags    :: Bit flags describing the module.                */
+  /*                                                                       */
+  /*    module_size     :: The size of one module object/instance in       */
+  /*                       bytes.                                          */
+  /*                                                                       */
+  /*    module_name     :: The name of the module.                         */
+  /*                                                                       */
+  /*    module_version  :: The version, as a 16.16 fixed number            */
+  /*                       (major.minor).                                  */
+  /*                                                                       */
+  /*    module_requires :: The version of FreeType this module requires,   */
+  /*                       as a 16.16 fixed number (major.minor).  Starts  */
+  /*                       at version 2.0, i.e., 0x20000.                  */
+  /*                                                                       */
+  /*    module_init     :: A function used to initialize (not create) a    */
+  /*                       new module object.                              */
+  /*                                                                       */
+  /*    module_done     :: A function used to finalize (not destroy) a     */
+  /*                       given module object                             */
+  /*                                                                       */
+  /*    get_interface   :: Queries a given module for a specific           */
+  /*                       interface by name.                              */
+  /*                                                                       */
+  typedef struct  FT_Module_Class_
+  {
+    FT_ULong               module_flags;
+    FT_Long                module_size;
+    const FT_String*       module_name;
+    FT_Fixed               module_version;
+    FT_Fixed               module_requires;
+
+    const void*            module_interface;
+
+    FT_Module_Constructor  module_init;
+    FT_Module_Destructor   module_done;
+    FT_Module_Requester    get_interface;
+
+  } FT_Module_Class;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_Add_Module                                                      */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Adds a new module to a given library instance.                     */
+  /*                                                                       */
+  /* <InOut>                                                               */
+  /*    library :: A handle to the library object.                         */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    clazz   :: A pointer to class descriptor for the module.           */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  0 means success.                             */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    An error will be returned if a module already exists by that name, */
+  /*    or if the module requires a version of FreeType that is too great. */
+  /*                                                                       */
+  FT_EXPORT( FT_Error )
+  FT_Add_Module( FT_Library              library,
+                 const FT_Module_Class*  clazz );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_Get_Module                                                      */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Finds a module by its name.                                        */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    library     :: A handle to the library object.                     */
+  /*                                                                       */
+  /*    module_name :: The module's name (as an ASCII string).             */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    A module handle.  0 if none was found.                             */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    FreeType's internal modules aren't documented very well, and you   */
+  /*    should look up the source code for details.                        */
+  /*                                                                       */
+  FT_EXPORT( FT_Module )
+  FT_Get_Module( FT_Library   library,
+                 const char*  module_name );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_Remove_Module                                                   */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Removes a given module from a library instance.                    */
+  /*                                                                       */
+  /* <InOut>                                                               */
+  /*    library :: A handle to a library object.                           */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    module  :: A handle to a module object.                            */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  0 means success.                             */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    The module object is destroyed by the function in case of success. */
+  /*                                                                       */
+  FT_EXPORT( FT_Error )
+  FT_Remove_Module( FT_Library  library,
+                    FT_Module   module );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_New_Library                                                     */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    This function is used to create a new FreeType library instance    */
+  /*    from a given memory object.  It is thus possible to use libraries  */
+  /*    with distinct memory allocators within the same program.           */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    memory   :: A handle to the original memory object.                */
+  /*                                                                       */
+  /* <Output>                                                              */
+  /*    alibrary :: A pointer to handle of a new library object.           */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  0 means success.                             */
+  /*                                                                       */
+  FT_EXPORT( FT_Error )
+  FT_New_Library( FT_Memory    memory,
+                  FT_Library  *alibrary );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_Done_Library                                                    */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Discards a given library object.  This closes all drivers and      */
+  /*    discards all resource objects.                                     */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    library :: A handle to the target library.                         */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  0 means success.                             */
+  /*                                                                       */
+  FT_EXPORT( FT_Error )
+  FT_Done_Library( FT_Library  library );
+
+/* */
+
+  typedef void
+  (*FT_DebugHook_Func)( void*  arg );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_Set_Debug_Hook                                                  */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Sets a debug hook function for debugging the interpreter of a font */
+  /*    format.                                                            */
+  /*                                                                       */
+  /* <InOut>                                                               */
+  /*    library    :: A handle to the library object.                      */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    hook_index :: The index of the debug hook.  You should use the     */
+  /*                  values defined in `ftobjs.h', e.g.,                  */
+  /*                  `FT_DEBUG_HOOK_TRUETYPE'.                            */
+  /*                                                                       */
+  /*    debug_hook :: The function used to debug the interpreter.          */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    Currently, four debug hook slots are available, but only two (for  */
+  /*    the TrueType and the Type 1 interpreter) are defined.              */
+  /*                                                                       */
+  /*    Since the internal headers of FreeType are no longer installed,    */
+  /*    the symbol `FT_DEBUG_HOOK_TRUETYPE' isn't available publicly.      */
+  /*    This is a bug and will be fixed in a forthcoming release.          */
+  /*                                                                       */
+  FT_EXPORT( void )
+  FT_Set_Debug_Hook( FT_Library         library,
+                     FT_UInt            hook_index,
+                     FT_DebugHook_Func  debug_hook );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_Add_Default_Modules                                             */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Adds the set of default drivers to a given library object.         */
+  /*    This is only useful when you create a library object with          */
+  /*    @FT_New_Library (usually to plug a custom memory manager).         */
+  /*                                                                       */
+  /* <InOut>                                                               */
+  /*    library :: A handle to a new library object.                       */
+  /*                                                                       */
+  FT_EXPORT( void )
+  FT_Add_Default_Modules( FT_Library  library );
+
+
+
+  /**************************************************************************
+   *
+   * @section:
+   *   truetype_engine
+   *
+   * @title:
+   *   The TrueType Engine
+   *
+   * @abstract:
+   *   TrueType bytecode support.
+   *
+   * @description:
+   *   This section contains a function used to query the level of TrueType
+   *   bytecode support compiled in this version of the library.
+   *
+   */
+
+
+  /**************************************************************************
+   *
+   *  @enum:
+   *     FT_TrueTypeEngineType
+   *
+   *  @description:
+   *     A list of values describing which kind of TrueType bytecode
+   *     engine is implemented in a given FT_Library instance.  It is used
+   *     by the @FT_Get_TrueType_Engine_Type function.
+   *
+   *  @values:
+   *     FT_TRUETYPE_ENGINE_TYPE_NONE ::
+   *       The library doesn't implement any kind of bytecode interpreter.
+   *
+   *     FT_TRUETYPE_ENGINE_TYPE_UNPATENTED ::
+   *       The library implements a bytecode interpreter that doesn't
+   *       support the patented operations of the TrueType virtual machine.
+   *
+   *       Its main use is to load certain Asian fonts which position and
+   *       scale glyph components with bytecode instructions.  It produces
+   *       bad output for most other fonts.
+   *
+   *    FT_TRUETYPE_ENGINE_TYPE_PATENTED ::
+   *       The library implements a bytecode interpreter that covers
+   *       the full instruction set of the TrueType virtual machine.
+   *       See the file `docs/PATENTS' for legal aspects.
+   *
+   *  @since:
+   *       2.2
+   *
+   */
+  typedef enum
+  {
+    FT_TRUETYPE_ENGINE_TYPE_NONE = 0,
+    FT_TRUETYPE_ENGINE_TYPE_UNPATENTED,
+    FT_TRUETYPE_ENGINE_TYPE_PATENTED
+
+  } FT_TrueTypeEngineType;
+
+
+  /**************************************************************************
+   *
+   *  @func:
+   *     FT_Get_TrueType_Engine_Type
+   *
+   *  @description:
+   *     Return a @FT_TrueTypeEngineType value to indicate which level of
+   *     the TrueType virtual machine a given library instance supports.
+   *
+   *  @input:
+   *     library ::
+   *       A library instance.
+   *
+   *  @return:
+   *     A value indicating which level is supported.
+   *
+   *  @since:
+   *     2.2
+   *
+   */
+  FT_EXPORT( FT_TrueTypeEngineType )
+  FT_Get_TrueType_Engine_Type( FT_Library  library );
+
+
+  /* */
+
+
+FT_END_HEADER
+
+#endif /* __FTMODAPI_H__ */
+
+
+/* END */
diff --git a/include/freetype2/freetype/ftmoderr.h b/include/freetype2/freetype/ftmoderr.h
new file mode 100644 (file)
index 0000000..b0115dd
--- /dev/null
@@ -0,0 +1,155 @@
+/***************************************************************************/
+/*                                                                         */
+/*  ftmoderr.h                                                             */
+/*                                                                         */
+/*    FreeType module error offsets (specification).                       */
+/*                                                                         */
+/*  Copyright 2001, 2002, 2003, 2004, 2005 by                              */
+/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
+/*                                                                         */
+/*  This file is part of the FreeType project, and may only be used,       */
+/*  modified, and distributed under the terms of the FreeType project      */
+/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
+/*  this file you indicate that you have read the license and              */
+/*  understand and accept it fully.                                        */
+/*                                                                         */
+/***************************************************************************/
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* This file is used to define the FreeType module error offsets.        */
+  /*                                                                       */
+  /* The lower byte gives the error code, the higher byte gives the        */
+  /* module.  The base module has error offset 0.  For example, the error  */
+  /* `FT_Err_Invalid_File_Format' has value 0x003, the error               */
+  /* `TT_Err_Invalid_File_Format' has value 0x1103, the error              */
+  /* `T1_Err_Invalid_File_Format' has value 0x1203, etc.                   */
+  /*                                                                       */
+  /* Undefine the macro FT_CONFIG_OPTION_USE_MODULE_ERRORS in ftoption.h   */
+  /* to make the higher byte always zero (disabling the module error       */
+  /* mechanism).                                                           */
+  /*                                                                       */
+  /* It can also be used to create a module error message table easily     */
+  /* with something like                                                   */
+  /*                                                                       */
+  /*   {                                                                   */
+  /*     #undef __FTMODERR_H__                                             */
+  /*     #define FT_MODERRDEF( e, v, s )  { FT_Mod_Err_ ## e, s },         */
+  /*     #define FT_MODERR_START_LIST     {                                */
+  /*     #define FT_MODERR_END_LIST       { 0, 0 } };                      */
+  /*                                                                       */
+  /*     const struct                                                      */
+  /*     {                                                                 */
+  /*       int          mod_err_offset;                                    */
+  /*       const char*  mod_err_msg                                        */
+  /*     } ft_mod_errors[] =                                               */
+  /*                                                                       */
+  /*     #include FT_MODULE_ERRORS_H                                       */
+  /*   }                                                                   */
+  /*                                                                       */
+  /* To use such a table, all errors must be ANDed with 0xFF00 to remove   */
+  /* the error code.                                                       */
+  /*                                                                       */
+  /*************************************************************************/
+
+
+#ifndef __FTMODERR_H__
+#define __FTMODERR_H__
+
+
+  /*******************************************************************/
+  /*******************************************************************/
+  /*****                                                         *****/
+  /*****                       SETUP MACROS                      *****/
+  /*****                                                         *****/
+  /*******************************************************************/
+  /*******************************************************************/
+
+
+#undef  FT_NEED_EXTERN_C
+
+#ifndef FT_MODERRDEF
+
+#ifdef FT_CONFIG_OPTION_USE_MODULE_ERRORS
+#define FT_MODERRDEF( e, v, s )  FT_Mod_Err_ ## e = v,
+#else
+#define FT_MODERRDEF( e, v, s )  FT_Mod_Err_ ## e = 0,
+#endif
+
+#define FT_MODERR_START_LIST  enum {
+#define FT_MODERR_END_LIST    FT_Mod_Err_Max };
+
+#ifdef __cplusplus
+#define FT_NEED_EXTERN_C
+  extern "C" {
+#endif
+
+#endif /* !FT_MODERRDEF */
+
+
+  /*******************************************************************/
+  /*******************************************************************/
+  /*****                                                         *****/
+  /*****               LIST MODULE ERROR BASES                   *****/
+  /*****                                                         *****/
+  /*******************************************************************/
+  /*******************************************************************/
+
+
+#ifdef FT_MODERR_START_LIST
+  FT_MODERR_START_LIST
+#endif
+
+
+  FT_MODERRDEF( Base,      0x000, "base module" )
+  FT_MODERRDEF( Autofit,   0x100, "autofitter module" )
+  FT_MODERRDEF( BDF,       0x200, "BDF module" )
+  FT_MODERRDEF( Cache,     0x300, "cache module" )
+  FT_MODERRDEF( CFF,       0x400, "CFF module" )
+  FT_MODERRDEF( CID,       0x500, "CID module" )
+  FT_MODERRDEF( Gzip,      0x600, "Gzip module" )
+  FT_MODERRDEF( LZW,       0x700, "LZW module" )
+  FT_MODERRDEF( OTvalid,   0x800, "OpenType validation module" )
+  FT_MODERRDEF( PCF,       0x900, "PCF module" )
+  FT_MODERRDEF( PFR,       0xA00, "PFR module" )
+  FT_MODERRDEF( PSaux,     0xB00, "PS auxiliary module" )
+  FT_MODERRDEF( PShinter,  0xC00, "PS hinter module" )
+  FT_MODERRDEF( PSnames,   0xD00, "PS names module" )
+  FT_MODERRDEF( Raster,    0xE00, "raster module" )
+  FT_MODERRDEF( SFNT,      0xF00, "SFNT module" )
+  FT_MODERRDEF( Smooth,   0x1000, "smooth raster module" )
+  FT_MODERRDEF( TrueType, 0x1100, "TrueType module" )
+  FT_MODERRDEF( Type1,    0x1200, "Type 1 module" )
+  FT_MODERRDEF( Type42,   0x1300, "Type 42 module" )
+  FT_MODERRDEF( Winfonts, 0x1400, "Windows FON/FNT module" )
+
+
+#ifdef FT_MODERR_END_LIST
+  FT_MODERR_END_LIST
+#endif
+
+
+  /*******************************************************************/
+  /*******************************************************************/
+  /*****                                                         *****/
+  /*****                      CLEANUP                            *****/
+  /*****                                                         *****/
+  /*******************************************************************/
+  /*******************************************************************/
+
+
+#ifdef FT_NEED_EXTERN_C
+  }
+#endif
+
+#undef FT_MODERR_START_LIST
+#undef FT_MODERR_END_LIST
+#undef FT_MODERRDEF
+#undef FT_NEED_EXTERN_C
+
+
+#endif /* __FTMODERR_H__ */
+
+
+/* END */
diff --git a/include/freetype2/freetype/ftotval.h b/include/freetype2/freetype/ftotval.h
new file mode 100644 (file)
index 0000000..7c488fd
--- /dev/null
@@ -0,0 +1,198 @@
+/***************************************************************************/
+/*                                                                         */
+/*  ftotval.h                                                              */
+/*                                                                         */
+/*    FreeType API for validating OpenType tables (specification).         */
+/*                                                                         */
+/*  Copyright 2004, 2005, 2006 by                                          */
+/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
+/*                                                                         */
+/*  This file is part of the FreeType project, and may only be used,       */
+/*  modified, and distributed under the terms of the FreeType project      */
+/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
+/*  this file you indicate that you have read the license and              */
+/*  understand and accept it fully.                                        */
+/*                                                                         */
+/***************************************************************************/
+
+
+/***************************************************************************/
+/*                                                                         */
+/*                                                                         */
+/* Warning: This module might be moved to a different library in the       */
+/*          future to avoid a tight dependency between FreeType and the    */
+/*          OpenType specification.                                        */
+/*                                                                         */
+/*                                                                         */
+/***************************************************************************/
+
+
+#ifndef __FTOTVAL_H__
+#define __FTOTVAL_H__
+
+#include <ft2build.h>
+#include FT_FREETYPE_H
+
+#ifdef FREETYPE_H
+#error "freetype.h of FreeType 1 has been loaded!"
+#error "Please fix the directory search order for header files"
+#error "so that freetype.h of FreeType 2 is found first."
+#endif
+
+
+FT_BEGIN_HEADER
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Section>                                                             */
+  /*    ot_validation                                                      */
+  /*                                                                       */
+  /* <Title>                                                               */
+  /*    OpenType Validation                                                */
+  /*                                                                       */
+  /* <Abstract>                                                            */
+  /*    An API to validate OpenType tables.                                */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    This section contains the declaration of functions to validate     */
+  /*    some OpenType tables (BASE, GDEF, GPOS, GSUB, JSTF).               */
+  /*                                                                       */
+  /*************************************************************************/
+
+
+ /**********************************************************************
+  *
+  * @enum:
+  *    FT_VALIDATE_OTXXX
+  *
+  * @description:
+  *    A list of bit-field constants used with @FT_OpenType_Validate to
+  *    indicate which OpenType tables should be validated.
+  *
+  * @values:
+  *    FT_VALIDATE_BASE ::
+  *      Validate BASE table.
+  *
+  *    FT_VALIDATE_GDEF ::
+  *      Validate GDEF table.
+  *
+  *    FT_VALIDATE_GPOS ::
+  *      Validate GPOS table.
+  *
+  *    FT_VALIDATE_GSUB ::
+  *      Validate GSUB table.
+  *
+  *    FT_VALIDATE_JSTF ::
+  *      Validate JSTF table.
+  *
+  *    FT_VALIDATE_OT ::
+  *      Validate all OpenType tables (BASE, GDEF, GPOS, GSUB, JSTF).
+  *
+  */
+#define FT_VALIDATE_BASE  0x0100
+#define FT_VALIDATE_GDEF  0x0200
+#define FT_VALIDATE_GPOS  0x0400
+#define FT_VALIDATE_GSUB  0x0800
+#define FT_VALIDATE_JSTF  0x1000
+
+#define FT_VALIDATE_OT  FT_VALIDATE_BASE | \
+                        FT_VALIDATE_GDEF | \
+                        FT_VALIDATE_GPOS | \
+                        FT_VALIDATE_GSUB | \
+                        FT_VALIDATE_JSTF
+
+  /* */
+
+ /**********************************************************************
+  *
+  * @function:
+  *    FT_OpenType_Validate
+  *
+  * @description:
+  *    Validate various OpenType tables to assure that all offsets and
+  *    indices are valid.  The idea is that a higher-level library which
+  *    actually does the text layout can access those tables without
+  *    error checking (which can be quite time consuming).
+  *
+  * @input:
+  *    face ::
+  *       A handle to the input face.
+  *
+  *    validation_flags ::
+  *       A bit field which specifies the tables to be validated.  See
+  *       @FT_VALIDATE_OTXXX for possible values.
+  *
+  * @output:
+  *    BASE_table ::
+  *       A pointer to the BASE table.
+  *
+  *    GDEF_table ::
+  *       A pointer to the GDEF table.
+  *
+  *    GPOS_table ::
+  *       A pointer to the GPOS table.
+  *
+  *    GSUB_table ::
+  *       A pointer to the GSUB table.
+  *
+  *    JSTF_table ::
+  *       A pointer to the JSTF table.
+  *
+  * @return:
+  *   FreeType error code.  0 means success.
+  *
+  * @note:
+  *   This function only works with OpenType fonts, returning an error
+  *   otherwise.
+  *
+  *   After use, the application should deallocate the five tables with
+  *   @FT_OpenType_Free.  A NULL value indicates that the table either
+  *   doesn't exist in the font, or the application hasn't asked for
+  *   validation.
+  */
+  FT_EXPORT( FT_Error )
+  FT_OpenType_Validate( FT_Face    face,
+                        FT_UInt    validation_flags,
+                        FT_Bytes  *BASE_table,
+                        FT_Bytes  *GDEF_table,
+                        FT_Bytes  *GPOS_table,
+                        FT_Bytes  *GSUB_table,
+                        FT_Bytes  *JSTF_table );
+
+  /* */
+
+ /**********************************************************************
+  *
+  * @function:
+  *    FT_OpenType_Free
+  *
+  * @description:
+  *    Free the buffer allocated by OpenType validator.
+  *
+  * @input:
+  *    face ::
+  *       A handle to the input face.
+  *
+  *    table ::
+  *       The pointer to the buffer that is allocated by
+  *       @FT_OpenType_Validate.
+  *
+  * @note:
+  *   This function must be used to free the buffer allocated by
+  *   @FT_OpenType_Validate only.
+  */
+  FT_EXPORT( void )
+  FT_OpenType_Free( FT_Face   face,
+                    FT_Bytes  table );
+
+
+ /* */
+
+
+FT_END_HEADER
+
+#endif /* __FTOTVAL_H__ */
+
+
+/* END */
diff --git a/include/freetype2/freetype/ftoutln.h b/include/freetype2/freetype/ftoutln.h
new file mode 100644 (file)
index 0000000..786ae13
--- /dev/null
@@ -0,0 +1,526 @@
+/***************************************************************************/
+/*                                                                         */
+/*  ftoutln.h                                                              */
+/*                                                                         */
+/*    Support for the FT_Outline type used to store glyph shapes of        */
+/*    most scalable font formats (specification).                          */
+/*                                                                         */
+/*  Copyright 1996-2001, 2002, 2003, 2005, 2006, 2007 by                   */
+/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
+/*                                                                         */
+/*  This file is part of the FreeType project, and may only be used,       */
+/*  modified, and distributed under the terms of the FreeType project      */
+/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
+/*  this file you indicate that you have read the license and              */
+/*  understand and accept it fully.                                        */
+/*                                                                         */
+/***************************************************************************/
+
+
+#ifndef __FTOUTLN_H__
+#define __FTOUTLN_H__
+
+
+#include <ft2build.h>
+#include FT_FREETYPE_H
+
+#ifdef FREETYPE_H
+#error "freetype.h of FreeType 1 has been loaded!"
+#error "Please fix the directory search order for header files"
+#error "so that freetype.h of FreeType 2 is found first."
+#endif
+
+
+FT_BEGIN_HEADER
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Section>                                                             */
+  /*    outline_processing                                                 */
+  /*                                                                       */
+  /* <Title>                                                               */
+  /*    Outline Processing                                                 */
+  /*                                                                       */
+  /* <Abstract>                                                            */
+  /*    Functions to create, transform, and render vectorial glyph images. */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    This section contains routines used to create and destroy scalable */
+  /*    glyph images known as `outlines'.  These can also be measured,     */
+  /*    transformed, and converted into bitmaps and pixmaps.               */
+  /*                                                                       */
+  /* <Order>                                                               */
+  /*    FT_Outline                                                         */
+  /*    FT_OUTLINE_FLAGS                                                   */
+  /*    FT_Outline_New                                                     */
+  /*    FT_Outline_Done                                                    */
+  /*    FT_Outline_Copy                                                    */
+  /*    FT_Outline_Translate                                               */
+  /*    FT_Outline_Transform                                               */
+  /*    FT_Outline_Embolden                                                */
+  /*    FT_Outline_Reverse                                                 */
+  /*    FT_Outline_Check                                                   */
+  /*                                                                       */
+  /*    FT_Outline_Get_CBox                                                */
+  /*    FT_Outline_Get_BBox                                                */
+  /*                                                                       */
+  /*    FT_Outline_Get_Bitmap                                              */
+  /*    FT_Outline_Render                                                  */
+  /*                                                                       */
+  /*    FT_Outline_Decompose                                               */
+  /*    FT_Outline_Funcs                                                   */
+  /*    FT_Outline_MoveTo_Func                                             */
+  /*    FT_Outline_LineTo_Func                                             */
+  /*    FT_Outline_ConicTo_Func                                            */
+  /*    FT_Outline_CubicTo_Func                                            */
+  /*                                                                       */
+  /*************************************************************************/
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_Outline_Decompose                                               */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Walks over an outline's structure to decompose it into individual  */
+  /*    segments and Bézier arcs.  This function is also able to emit      */
+  /*    `move to' and `close to' operations to indicate the start and end  */
+  /*    of new contours in the outline.                                    */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    outline        :: A pointer to the source target.                  */
+  /*                                                                       */
+  /*    func_interface :: A table of `emitters', i.e,. function pointers   */
+  /*                      called during decomposition to indicate path     */
+  /*                      operations.                                      */
+  /*                                                                       */
+  /* <InOut>                                                               */
+  /*    user           :: A typeless pointer which is passed to each       */
+  /*                      emitter during the decomposition.  It can be     */
+  /*                      used to store the state during the               */
+  /*                      decomposition.                                   */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  0 means success.                             */
+  /*                                                                       */
+  FT_EXPORT( FT_Error )
+  FT_Outline_Decompose( FT_Outline*              outline,
+                        const FT_Outline_Funcs*  func_interface,
+                        void*                    user );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_Outline_New                                                     */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Creates a new outline of a given size.                             */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    library     :: A handle to the library object from where the       */
+  /*                   outline is allocated.  Note however that the new    */
+  /*                   outline will *not* necessarily be *freed*, when     */
+  /*                   destroying the library, by @FT_Done_FreeType.       */
+  /*                                                                       */
+  /*    numPoints   :: The maximal number of points within the outline.    */
+  /*                                                                       */
+  /*    numContours :: The maximal number of contours within the outline.  */
+  /*                                                                       */
+  /* <Output>                                                              */
+  /*    anoutline   :: A handle to the new outline.  NULL in case of       */
+  /*                   error.                                              */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  0 means success.                             */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    The reason why this function takes a `library' parameter is simply */
+  /*    to use the library's memory allocator.                             */
+  /*                                                                       */
+  FT_EXPORT( FT_Error )
+  FT_Outline_New( FT_Library   library,
+                  FT_UInt      numPoints,
+                  FT_Int       numContours,
+                  FT_Outline  *anoutline );
+
+
+  FT_EXPORT( FT_Error )
+  FT_Outline_New_Internal( FT_Memory    memory,
+                           FT_UInt      numPoints,
+                           FT_Int       numContours,
+                           FT_Outline  *anoutline );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_Outline_Done                                                    */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Destroys an outline created with @FT_Outline_New.                  */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    library :: A handle of the library object used to allocate the     */
+  /*               outline.                                                */
+  /*                                                                       */
+  /*    outline :: A pointer to the outline object to be discarded.        */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  0 means success.                             */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    If the outline's `owner' field is not set, only the outline        */
+  /*    descriptor will be released.                                       */
+  /*                                                                       */
+  /*    The reason why this function takes an `library' parameter is       */
+  /*    simply to use ft_mem_free().                                       */
+  /*                                                                       */
+  FT_EXPORT( FT_Error )
+  FT_Outline_Done( FT_Library   library,
+                   FT_Outline*  outline );
+
+
+  FT_EXPORT( FT_Error )
+  FT_Outline_Done_Internal( FT_Memory    memory,
+                            FT_Outline*  outline );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_Outline_Check                                                   */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Check the contents of an outline descriptor.                       */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    outline :: A handle to a source outline.                           */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  0 means success.                             */
+  /*                                                                       */
+  FT_EXPORT( FT_Error )
+  FT_Outline_Check( FT_Outline*  outline );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_Outline_Get_CBox                                                */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Returns an outline's `control box'.  The control box encloses all  */
+  /*    the outline's points, including Bézier control points.  Though it  */
+  /*    coincides with the exact bounding box for most glyphs, it can be   */
+  /*    slightly larger in some situations (like when rotating an outline  */
+  /*    which contains Bézier outside arcs).                               */
+  /*                                                                       */
+  /*    Computing the control box is very fast, while getting the bounding */
+  /*    box can take much more time as it needs to walk over all segments  */
+  /*    and arcs in the outline.  To get the latter, you can use the       */
+  /*    `ftbbox' component which is dedicated to this single task.         */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    outline :: A pointer to the source outline descriptor.             */
+  /*                                                                       */
+  /* <Output>                                                              */
+  /*    acbox   :: The outline's control box.                              */
+  /*                                                                       */
+  FT_EXPORT( void )
+  FT_Outline_Get_CBox( const FT_Outline*  outline,
+                       FT_BBox           *acbox );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_Outline_Translate                                               */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Applies a simple translation to the points of an outline.          */
+  /*                                                                       */
+  /* <InOut>                                                               */
+  /*    outline :: A pointer to the target outline descriptor.             */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    xOffset :: The horizontal offset.                                  */
+  /*                                                                       */
+  /*    yOffset :: The vertical offset.                                    */
+  /*                                                                       */
+  FT_EXPORT( void )
+  FT_Outline_Translate( const FT_Outline*  outline,
+                        FT_Pos             xOffset,
+                        FT_Pos             yOffset );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_Outline_Copy                                                    */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Copies an outline into another one.  Both objects must have the    */
+  /*    same sizes (number of points & number of contours) when this       */
+  /*    function is called.                                                */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    source :: A handle to the source outline.                          */
+  /*                                                                       */
+  /* <Output>                                                              */
+  /*    target :: A handle to the target outline.                          */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  0 means success.                             */
+  /*                                                                       */
+  FT_EXPORT( FT_Error )
+  FT_Outline_Copy( const FT_Outline*  source,
+                   FT_Outline        *target );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_Outline_Transform                                               */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Applies a simple 2x2 matrix to all of an outline's points.  Useful */
+  /*    for applying rotations, slanting, flipping, etc.                   */
+  /*                                                                       */
+  /* <InOut>                                                               */
+  /*    outline :: A pointer to the target outline descriptor.             */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    matrix  :: A pointer to the transformation matrix.                 */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    You can use @FT_Outline_Translate if you need to translate the     */
+  /*    outline's points.                                                  */
+  /*                                                                       */
+  FT_EXPORT( void )
+  FT_Outline_Transform( const FT_Outline*  outline,
+                        const FT_Matrix*   matrix );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_Outline_Embolden                                                */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Emboldens an outline.  The new outline will be at most 4 times     */
+  /*    `strength' pixels wider and higher.  You may think of the left and */
+  /*    bottom borders as unchanged.                                       */
+  /*                                                                       */
+  /*    Negative `strength' values to reduce the outline thickness are     */
+  /*    possible also.                                                     */
+  /*                                                                       */
+  /* <InOut>                                                               */
+  /*    outline  :: A handle to the target outline.                        */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    strength :: How strong the glyph is emboldened.  Expressed in      */
+  /*                26.6 pixel format.                                     */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  0 means success.                             */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    The used algorithm to increase or decrease the thickness of the    */
+  /*    glyph doesn't change the number of points; this means that certain */
+  /*    situations like acute angles or intersections are sometimes        */
+  /*    handled incorrectly.                                               */
+  /*                                                                       */
+  /*    Example call:                                                      */
+  /*                                                                       */
+  /*    {                                                                  */
+  /*      FT_Load_Glyph( face, index, FT_LOAD_DEFAULT );                   */
+  /*      if ( face->slot->format == FT_GLYPH_FORMAT_OUTLINE )             */
+  /*        FT_Outline_Embolden( &face->slot->outline, strength );         */
+  /*    }                                                                  */
+  /*                                                                       */
+  FT_EXPORT( FT_Error )
+  FT_Outline_Embolden( FT_Outline*  outline,
+                       FT_Pos       strength );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_Outline_Reverse                                                 */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Reverses the drawing direction of an outline.  This is used to     */
+  /*    ensure consistent fill conventions for mirrored glyphs.            */
+  /*                                                                       */
+  /* <InOut>                                                               */
+  /*    outline :: A pointer to the target outline descriptor.             */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    This functions toggles the bit flag @FT_OUTLINE_REVERSE_FILL in    */
+  /*    the outline's `flags' field.                                       */
+  /*                                                                       */
+  /*    It shouldn't be used by a normal client application, unless it     */
+  /*    knows what it is doing.                                            */
+  /*                                                                       */
+  FT_EXPORT( void )
+  FT_Outline_Reverse( FT_Outline*  outline );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_Outline_Get_Bitmap                                              */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Renders an outline within a bitmap.  The outline's image is simply */
+  /*    OR-ed to the target bitmap.                                        */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    library :: A handle to a FreeType library object.                  */
+  /*                                                                       */
+  /*    outline :: A pointer to the source outline descriptor.             */
+  /*                                                                       */
+  /* <InOut>                                                               */
+  /*    abitmap :: A pointer to the target bitmap descriptor.              */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  0 means success.                             */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    This function does NOT CREATE the bitmap, it only renders an       */
+  /*    outline image within the one you pass to it!                       */
+  /*                                                                       */
+  /*    It will use the raster corresponding to the default glyph format.  */
+  /*                                                                       */
+  FT_EXPORT( FT_Error )
+  FT_Outline_Get_Bitmap( FT_Library        library,
+                         FT_Outline*       outline,
+                         const FT_Bitmap  *abitmap );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_Outline_Render                                                  */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Renders an outline within a bitmap using the current scan-convert. */
+  /*    This functions uses an @FT_Raster_Params structure as an argument, */
+  /*    allowing advanced features like direct composition, translucency,  */
+  /*    etc.                                                               */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    library :: A handle to a FreeType library object.                  */
+  /*                                                                       */
+  /*    outline :: A pointer to the source outline descriptor.             */
+  /*                                                                       */
+  /* <InOut>                                                               */
+  /*    params  :: A pointer to an @FT_Raster_Params structure used to     */
+  /*               describe the rendering operation.                       */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  0 means success.                             */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    You should know what you are doing and how @FT_Raster_Params works */
+  /*    to use this function.                                              */
+  /*                                                                       */
+  /*    The field `params.source' will be set to `outline' before the scan */
+  /*    converter is called, which means that the value you give to it is  */
+  /*    actually ignored.                                                  */
+  /*                                                                       */
+  FT_EXPORT( FT_Error )
+  FT_Outline_Render( FT_Library         library,
+                     FT_Outline*        outline,
+                     FT_Raster_Params*  params );
+
+
+ /**************************************************************************
+  *
+  * @enum:
+  *   FT_Orientation
+  *
+  * @description:
+  *   A list of values used to describe an outline's contour orientation.
+  *
+  *   The TrueType and Postscript specifications use different conventions
+  *   to determine whether outline contours should be filled or unfilled.
+  *
+  * @values:
+  *   FT_ORIENTATION_TRUETYPE ::
+  *     According to the TrueType specification, clockwise contours must
+  *     be filled, and counter-clockwise ones must be unfilled.
+  *
+  *   FT_ORIENTATION_POSTSCRIPT ::
+  *     According to the Postscript specification, counter-clockwise contours
+  *     must be filled, and clockwise ones must be unfilled.
+  *
+  *   FT_ORIENTATION_FILL_RIGHT ::
+  *     This is identical to @FT_ORIENTATION_TRUETYPE, but is used to
+  *     remember that in TrueType, everything that is to the right of
+  *     the drawing direction of a contour must be filled.
+  *
+  *   FT_ORIENTATION_FILL_LEFT ::
+  *     This is identical to @FT_ORIENTATION_POSTSCRIPT, but is used to
+  *     remember that in Postscript, everything that is to the left of
+  *     the drawing direction of a contour must be filled.
+  *
+  *   FT_ORIENTATION_NONE ::
+  *     The orientation cannot be determined.  That is, different parts of
+  *     the glyph have different orientation.
+  *
+  */
+  typedef enum
+  {
+    FT_ORIENTATION_TRUETYPE   = 0,
+    FT_ORIENTATION_POSTSCRIPT = 1,
+    FT_ORIENTATION_FILL_RIGHT = FT_ORIENTATION_TRUETYPE,
+    FT_ORIENTATION_FILL_LEFT  = FT_ORIENTATION_POSTSCRIPT,
+    FT_ORIENTATION_NONE
+
+  } FT_Orientation;
+
+
+ /**************************************************************************
+  *
+  * @function:
+  *   FT_Outline_Get_Orientation
+  *
+  * @description:
+  *   This function analyzes a glyph outline and tries to compute its
+  *   fill orientation (see @FT_Orientation).  This is done by computing
+  *   the direction of each global horizontal and/or vertical extrema
+  *   within the outline.
+  *
+  *   Note that this will return @FT_ORIENTATION_TRUETYPE for empty
+  *   outlines.
+  *
+  * @input:
+  *   outline ::
+  *     A handle to the source outline.
+  *
+  * @return:
+  *   The orientation.
+  *
+  */
+  FT_EXPORT( FT_Orientation )
+  FT_Outline_Get_Orientation( FT_Outline*  outline );
+
+
+  /* */
+
+
+FT_END_HEADER
+
+#endif /* __FTOUTLN_H__ */
+
+
+/* END */
+
+
+/* Local Variables: */
+/* coding: utf-8    */
+/* End:             */
diff --git a/include/freetype2/freetype/ftpfr.h b/include/freetype2/freetype/ftpfr.h
new file mode 100644 (file)
index 0000000..e2801fd
--- /dev/null
@@ -0,0 +1,172 @@
+/***************************************************************************/
+/*                                                                         */
+/*  ftpfr.h                                                                */
+/*                                                                         */
+/*    FreeType API for accessing PFR-specific data (specification only).   */
+/*                                                                         */
+/*  Copyright 2002, 2003, 2004, 2006 by                                    */
+/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
+/*                                                                         */
+/*  This file is part of the FreeType project, and may only be used,       */
+/*  modified, and distributed under the terms of the FreeType project      */
+/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
+/*  this file you indicate that you have read the license and              */
+/*  understand and accept it fully.                                        */
+/*                                                                         */
+/***************************************************************************/
+
+
+#ifndef __FTPFR_H__
+#define __FTPFR_H__
+
+#include <ft2build.h>
+#include FT_FREETYPE_H
+
+#ifdef FREETYPE_H
+#error "freetype.h of FreeType 1 has been loaded!"
+#error "Please fix the directory search order for header files"
+#error "so that freetype.h of FreeType 2 is found first."
+#endif
+
+
+FT_BEGIN_HEADER
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Section>                                                             */
+  /*    pfr_fonts                                                          */
+  /*                                                                       */
+  /* <Title>                                                               */
+  /*    PFR Fonts                                                          */
+  /*                                                                       */
+  /* <Abstract>                                                            */
+  /*    PFR/TrueDoc specific API.                                          */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    This section contains the declaration of PFR-specific functions.   */
+  /*                                                                       */
+  /*************************************************************************/
+
+
+ /**********************************************************************
+  *
+  * @function:
+  *    FT_Get_PFR_Metrics
+  *
+  * @description:
+  *    Return the outline and metrics resolutions of a given PFR face.
+  *
+  * @input:
+  *    face :: Handle to the input face.  It can be a non-PFR face.
+  *
+  * @output:
+  *    aoutline_resolution ::
+  *      Outline resolution.  This is equivalent to `face->units_per_EM'.
+  *      Optional (parameter can be NULL).
+  *
+  *    ametrics_resolution ::
+  *      Metrics resolution.  This is equivalent to `outline_resolution'
+  *      for non-PFR fonts.  Optional (parameter can be NULL).
+  *
+  *    ametrics_x_scale ::
+  *      A 16.16 fixed-point number used to scale distance expressed
+  *      in metrics units to device sub-pixels.  This is equivalent to
+  *      `face->size->x_scale', but for metrics only.  Optional (parameter
+  *      can be NULL)
+  *
+  *    ametrics_y_scale ::
+  *      Same as `ametrics_x_scale' but for the vertical direction.
+  *      optional (parameter can be NULL)
+  *
+  * @return:
+  *    FreeType error code.  0 means success.
+  *
+  * @note:
+  *   If the input face is not a PFR, this function will return an error.
+  *   However, in all cases, it will return valid values.
+  */
+  FT_EXPORT( FT_Error )
+  FT_Get_PFR_Metrics( FT_Face    face,
+                      FT_UInt   *aoutline_resolution,
+                      FT_UInt   *ametrics_resolution,
+                      FT_Fixed  *ametrics_x_scale,
+                      FT_Fixed  *ametrics_y_scale );
+
+
+ /**********************************************************************
+  *
+  * @function:
+  *    FT_Get_PFR_Kerning
+  *
+  * @description:
+  *    Return the kerning pair corresponding to two glyphs in a PFR face.
+  *    The distance is expressed in metrics units, unlike the result of
+  *    @FT_Get_Kerning.
+  *
+  * @input:
+  *    face  :: A handle to the input face.
+  *
+  *    left  :: Index of the left glyph.
+  *
+  *    right :: Index of the right glyph.
+  *
+  * @output:
+  *    avector :: A kerning vector.
+  *
+  * @return:
+  *    FreeType error code.  0 means success.
+  *
+  * @note:
+  *    This function always return distances in original PFR metrics
+  *    units.  This is unlike @FT_Get_Kerning with the @FT_KERNING_UNSCALED
+  *    mode, which always returns distances converted to outline units.
+  *
+  *    You can use the value of the `x_scale' and `y_scale' parameters
+  *    returned by @FT_Get_PFR_Metrics to scale these to device sub-pixels.
+  */
+  FT_EXPORT( FT_Error )
+  FT_Get_PFR_Kerning( FT_Face     face,
+                      FT_UInt     left,
+                      FT_UInt     right,
+                      FT_Vector  *avector );
+
+
+ /**********************************************************************
+  *
+  * @function:
+  *    FT_Get_PFR_Advance
+  *
+  * @description:
+  *    Return a given glyph advance, expressed in original metrics units,
+  *    from a PFR font.
+  *
+  * @input:
+  *    face   :: A handle to the input face.
+  *
+  *    gindex :: The glyph index.
+  *
+  * @output:
+  *    aadvance :: The glyph advance in metrics units.
+  *
+  * @return:
+  *    FreeType error code.  0 means success.
+  *
+  * @note:
+  *    You can use the `x_scale' or `y_scale' results of @FT_Get_PFR_Metrics
+  *    to convert the advance to device sub-pixels (i.e., 1/64th of pixels).
+  */
+  FT_EXPORT( FT_Error )
+  FT_Get_PFR_Advance( FT_Face   face,
+                      FT_UInt   gindex,
+                      FT_Pos   *aadvance );
+
+ /* */
+
+
+FT_END_HEADER
+
+#endif /* __FTPFR_H__ */
+
+
+/* END */
diff --git a/include/freetype2/freetype/ftrender.h b/include/freetype2/freetype/ftrender.h
new file mode 100644 (file)
index 0000000..5b07f08
--- /dev/null
@@ -0,0 +1,229 @@
+/***************************************************************************/
+/*                                                                         */
+/*  ftrender.h                                                             */
+/*                                                                         */
+/*    FreeType renderer modules public interface (specification).          */
+/*                                                                         */
+/*  Copyright 1996-2001, 2005, 2006 by                                     */
+/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
+/*                                                                         */
+/*  This file is part of the FreeType project, and may only be used,       */
+/*  modified, and distributed under the terms of the FreeType project      */
+/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
+/*  this file you indicate that you have read the license and              */
+/*  understand and accept it fully.                                        */
+/*                                                                         */
+/***************************************************************************/
+
+
+#ifndef __FTRENDER_H__
+#define __FTRENDER_H__
+
+
+#include <ft2build.h>
+#include FT_MODULE_H
+#include FT_GLYPH_H
+
+
+FT_BEGIN_HEADER
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Section>                                                             */
+  /*    module_management                                                  */
+  /*                                                                       */
+  /*************************************************************************/
+
+
+  /* create a new glyph object */
+  typedef FT_Error
+  (*FT_Glyph_InitFunc)( FT_Glyph      glyph,
+                        FT_GlyphSlot  slot );
+
+  /* destroys a given glyph object */
+  typedef void
+  (*FT_Glyph_DoneFunc)( FT_Glyph  glyph );
+
+  typedef void
+  (*FT_Glyph_TransformFunc)( FT_Glyph          glyph,
+                             const FT_Matrix*  matrix,
+                             const FT_Vector*  delta );
+
+  typedef void
+  (*FT_Glyph_GetBBoxFunc)( FT_Glyph  glyph,
+                           FT_BBox*  abbox );
+
+  typedef FT_Error
+  (*FT_Glyph_CopyFunc)( FT_Glyph   source,
+                        FT_Glyph   target );
+
+  typedef FT_Error
+  (*FT_Glyph_PrepareFunc)( FT_Glyph      glyph,
+                           FT_GlyphSlot  slot );
+
+/* deprecated */
+#define FT_Glyph_Init_Func       FT_Glyph_InitFunc
+#define FT_Glyph_Done_Func       FT_Glyph_DoneFunc
+#define FT_Glyph_Transform_Func  FT_Glyph_TransformFunc
+#define FT_Glyph_BBox_Func       FT_Glyph_GetBBoxFunc
+#define FT_Glyph_Copy_Func       FT_Glyph_CopyFunc
+#define FT_Glyph_Prepare_Func    FT_Glyph_PrepareFunc
+
+
+  struct  FT_Glyph_Class_
+  {
+    FT_Long                 glyph_size;
+    FT_Glyph_Format         glyph_format;
+    FT_Glyph_InitFunc       glyph_init;
+    FT_Glyph_DoneFunc       glyph_done;
+    FT_Glyph_CopyFunc       glyph_copy;
+    FT_Glyph_TransformFunc  glyph_transform;
+    FT_Glyph_GetBBoxFunc    glyph_bbox;
+    FT_Glyph_PrepareFunc    glyph_prepare;
+  };
+
+
+  typedef FT_Error
+  (*FT_Renderer_RenderFunc)( FT_Renderer       renderer,
+                             FT_GlyphSlot      slot,
+                             FT_UInt           mode,
+                             const FT_Vector*  origin );
+
+  typedef FT_Error
+  (*FT_Renderer_TransformFunc)( FT_Renderer       renderer,
+                                FT_GlyphSlot      slot,
+                                const FT_Matrix*  matrix,
+                                const FT_Vector*  delta );
+
+
+  typedef void
+  (*FT_Renderer_GetCBoxFunc)( FT_Renderer   renderer,
+                              FT_GlyphSlot  slot,
+                              FT_BBox*      cbox );
+
+
+  typedef FT_Error
+  (*FT_Renderer_SetModeFunc)( FT_Renderer  renderer,
+                              FT_ULong     mode_tag,
+                              FT_Pointer   mode_ptr );
+
+/* deprecated identifiers */
+#define FTRenderer_render  FT_Renderer_RenderFunc
+#define FTRenderer_transform  FT_Renderer_TransformFunc
+#define FTRenderer_getCBox  FT_Renderer_GetCBoxFunc
+#define FTRenderer_setMode  FT_Renderer_SetModeFunc
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Struct>                                                              */
+  /*    FT_Renderer_Class                                                  */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    The renderer module class descriptor.                              */
+  /*                                                                       */
+  /* <Fields>                                                              */
+  /*    root         :: The root @FT_Module_Class fields.                  */
+  /*                                                                       */
+  /*    glyph_format :: The glyph image format this renderer handles.      */
+  /*                                                                       */
+  /*    render_glyph :: A method used to render the image that is in a     */
+  /*                    given glyph slot into a bitmap.                    */
+  /*                                                                       */
+  /*    set_mode     :: A method used to pass additional parameters.       */
+  /*                                                                       */
+  /*    raster_class :: For @FT_GLYPH_FORMAT_OUTLINE renderers only.  This */
+  /*                    is a pointer to its raster's class.                */
+  /*                                                                       */
+  /*    raster       :: For @FT_GLYPH_FORMAT_OUTLINE renderers only.  This */
+  /*                    is a pointer to the corresponding raster object,   */
+  /*                    if any.                                            */
+  /*                                                                       */
+  typedef struct  FT_Renderer_Class_
+  {
+    FT_Module_Class       root;
+
+    FT_Glyph_Format       glyph_format;
+
+    FT_Renderer_RenderFunc     render_glyph;
+    FT_Renderer_TransformFunc  transform_glyph;
+    FT_Renderer_GetCBoxFunc    get_glyph_cbox;
+    FT_Renderer_SetModeFunc    set_mode;
+
+    FT_Raster_Funcs*           raster_class;
+
+  } FT_Renderer_Class;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_Get_Renderer                                                    */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Retrieves the current renderer for a given glyph format.           */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    library :: A handle to the library object.                         */
+  /*                                                                       */
+  /*    format  :: The glyph format.                                       */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    A renderer handle.  0 if none found.                               */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    An error will be returned if a module already exists by that name, */
+  /*    or if the module requires a version of FreeType that is too great. */
+  /*                                                                       */
+  /*    To add a new renderer, simply use @FT_Add_Module.  To retrieve a   */
+  /*    renderer by its name, use @FT_Get_Module.                          */
+  /*                                                                       */
+  FT_EXPORT( FT_Renderer )
+  FT_Get_Renderer( FT_Library       library,
+                   FT_Glyph_Format  format );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_Set_Renderer                                                    */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Sets the current renderer to use, and set additional mode.         */
+  /*                                                                       */
+  /* <InOut>                                                               */
+  /*    library    :: A handle to the library object.                      */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    renderer   :: A handle to the renderer object.                     */
+  /*                                                                       */
+  /*    num_params :: The number of additional parameters.                 */
+  /*                                                                       */
+  /*    parameters :: Additional parameters.                               */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  0 means success.                             */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    In case of success, the renderer will be used to convert glyph     */
+  /*    images in the renderer's known format into bitmaps.                */
+  /*                                                                       */
+  /*    This doesn't change the current renderer for other formats.        */
+  /*                                                                       */
+  FT_EXPORT( FT_Error )
+  FT_Set_Renderer( FT_Library     library,
+                   FT_Renderer    renderer,
+                   FT_UInt        num_params,
+                   FT_Parameter*  parameters );
+
+
+  /* */
+
+
+FT_END_HEADER
+
+#endif /* __FTRENDER_H__ */
+
+
+/* END */
diff --git a/include/freetype2/freetype/ftsizes.h b/include/freetype2/freetype/ftsizes.h
new file mode 100644 (file)
index 0000000..622df16
--- /dev/null
@@ -0,0 +1,159 @@
+/***************************************************************************/
+/*                                                                         */
+/*  ftsizes.h                                                              */
+/*                                                                         */
+/*    FreeType size objects management (specification).                    */
+/*                                                                         */
+/*  Copyright 1996-2001, 2003, 2004, 2006 by                               */
+/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
+/*                                                                         */
+/*  This file is part of the FreeType project, and may only be used,       */
+/*  modified, and distributed under the terms of the FreeType project      */
+/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
+/*  this file you indicate that you have read the license and              */
+/*  understand and accept it fully.                                        */
+/*                                                                         */
+/***************************************************************************/
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* Typical application would normally not need to use these functions.   */
+  /* However, they have been placed in a public API for the rare cases     */
+  /* where they are needed.                                                */
+  /*                                                                       */
+  /*************************************************************************/
+
+
+#ifndef __FTSIZES_H__
+#define __FTSIZES_H__
+
+
+#include <ft2build.h>
+#include FT_FREETYPE_H
+
+#ifdef FREETYPE_H
+#error "freetype.h of FreeType 1 has been loaded!"
+#error "Please fix the directory search order for header files"
+#error "so that freetype.h of FreeType 2 is found first."
+#endif
+
+
+FT_BEGIN_HEADER
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Section>                                                             */
+  /*    sizes_management                                                   */
+  /*                                                                       */
+  /* <Title>                                                               */
+  /*    Size Management                                                    */
+  /*                                                                       */
+  /* <Abstract>                                                            */
+  /*    Managing multiple sizes per face.                                  */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    When creating a new face object (e.g., with @FT_New_Face), an      */
+  /*    @FT_Size object is automatically created and used to store all     */
+  /*    pixel-size dependent information, available in the `face->size'    */
+  /*    field.                                                             */
+  /*                                                                       */
+  /*    It is however possible to create more sizes for a given face,      */
+  /*    mostly in order to manage several character pixel sizes of the     */
+  /*    same font family and style.  See @FT_New_Size and @FT_Done_Size.   */
+  /*                                                                       */
+  /*    Note that @FT_Set_Pixel_Sizes and @FT_Set_Char_Size only           */
+  /*    modify the contents of the current `active' size; you thus need    */
+  /*    to use @FT_Activate_Size to change it.                             */
+  /*                                                                       */
+  /*    99% of applications won't need the functions provided here,        */
+  /*    especially if they use the caching sub-system, so be cautious      */
+  /*    when using these.                                                  */
+  /*                                                                       */
+  /*************************************************************************/
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_New_Size                                                        */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Create a new size object from a given face object.                 */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    face :: A handle to a parent face object.                          */
+  /*                                                                       */
+  /* <Output>                                                              */
+  /*    asize :: A handle to a new size object.                            */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  0 means success.                             */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    You need to call @FT_Activate_Size in order to select the new size */
+  /*    for upcoming calls to @FT_Set_Pixel_Sizes, @FT_Set_Char_Size,      */
+  /*    @FT_Load_Glyph, @FT_Load_Char, etc.                                */
+  /*                                                                       */
+  FT_EXPORT( FT_Error )
+  FT_New_Size( FT_Face   face,
+               FT_Size*  size );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_Done_Size                                                       */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Discard a given size object.  Note that @FT_Done_Face              */
+  /*    automatically discards all size objects allocated with             */
+  /*    @FT_New_Size.                                                      */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    size :: A handle to a target size object.                          */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  0 means success.                             */
+  /*                                                                       */
+  FT_EXPORT( FT_Error )
+  FT_Done_Size( FT_Size  size );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_Activate_Size                                                   */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Even though it is possible to create several size objects for a    */
+  /*    given face (see @FT_New_Size for details), functions like          */
+  /*    @FT_Load_Glyph or @FT_Load_Char only use the last-created one to   */
+  /*    determine the `current character pixel size'.                      */
+  /*                                                                       */
+  /*    This function can be used to `activate' a previously created size  */
+  /*    object.                                                            */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    size :: A handle to a target size object.                          */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  0 means success.                             */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    If `face' is the size's parent face object, this function changes  */
+  /*    the value of `face->size' to the input size handle.                */
+  /*                                                                       */
+  FT_EXPORT( FT_Error )
+  FT_Activate_Size( FT_Size  size );
+
+  /* */
+
+
+FT_END_HEADER
+
+#endif /* __FTSIZES_H__ */
+
+
+/* END */
diff --git a/include/freetype2/freetype/ftsnames.h b/include/freetype2/freetype/ftsnames.h
new file mode 100644 (file)
index 0000000..003cbcd
--- /dev/null
@@ -0,0 +1,170 @@
+/***************************************************************************/
+/*                                                                         */
+/*  ftsnames.h                                                             */
+/*                                                                         */
+/*    Simple interface to access SFNT name tables (which are used          */
+/*    to hold font names, copyright info, notices, etc.) (specification).  */
+/*                                                                         */
+/*    This is _not_ used to retrieve glyph names!                          */
+/*                                                                         */
+/*  Copyright 1996-2001, 2002, 2003, 2006 by                               */
+/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
+/*                                                                         */
+/*  This file is part of the FreeType project, and may only be used,       */
+/*  modified, and distributed under the terms of the FreeType project      */
+/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
+/*  this file you indicate that you have read the license and              */
+/*  understand and accept it fully.                                        */
+/*                                                                         */
+/***************************************************************************/
+
+
+#ifndef __FT_SFNT_NAMES_H__
+#define __FT_SFNT_NAMES_H__
+
+
+#include <ft2build.h>
+#include FT_FREETYPE_H
+
+#ifdef FREETYPE_H
+#error "freetype.h of FreeType 1 has been loaded!"
+#error "Please fix the directory search order for header files"
+#error "so that freetype.h of FreeType 2 is found first."
+#endif
+
+
+FT_BEGIN_HEADER
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Section>                                                             */
+  /*    sfnt_names                                                         */
+  /*                                                                       */
+  /* <Title>                                                               */
+  /*    SFNT Names                                                         */
+  /*                                                                       */
+  /* <Abstract>                                                            */
+  /*    Access the names embedded in TrueType and OpenType files.          */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    The TrueType and OpenType specification allow the inclusion of     */
+  /*    a special `names table' in font files.  This table contains        */
+  /*    textual (and internationalized) information regarding the font,    */
+  /*    like family name, copyright, version, etc.                         */
+  /*                                                                       */
+  /*    The definitions below are used to access them if available.        */
+  /*                                                                       */
+  /*    Note that this has nothing to do with glyph names!                 */
+  /*                                                                       */
+  /*************************************************************************/
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Struct>                                                              */
+  /*    FT_SfntName                                                        */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A structure used to model an SFNT `name' table entry.              */
+  /*                                                                       */
+  /* <Fields>                                                              */
+  /*    platform_id :: The platform ID for `string'.                       */
+  /*                                                                       */
+  /*    encoding_id :: The encoding ID for `string'.                       */
+  /*                                                                       */
+  /*    language_id :: The language ID for `string'.                       */
+  /*                                                                       */
+  /*    name_id     :: An identifier for `string'.                         */
+  /*                                                                       */
+  /*    string      :: The `name' string.  Note that its format differs    */
+  /*                   depending on the (platform,encoding) pair.  It can  */
+  /*                   be a Pascal String, a UTF-16 one, etc.              */
+  /*                                                                       */
+  /*                   Generally speaking, the string is not               */
+  /*                   zero-terminated.  Please refer to the TrueType      */
+  /*                   specification for details.                          */
+  /*                                                                       */
+  /*    string_len  :: The length of `string' in bytes.                    */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    Possible values for `platform_id', `encoding_id', `language_id',   */
+  /*    and `name_id' are given in the file `ttnameid.h'.  For details     */
+  /*    please refer to the TrueType or OpenType specification.            */
+  /*                                                                       */
+  /*    See also @TT_PLATFORM_XXX, @TT_APPLE_ID_XXX, @TT_MAC_ID_XXX,       */
+  /*    @TT_ISO_ID_XXX, and @TT_MS_ID_XXX.                                 */
+  /*                                                                       */
+  typedef struct  FT_SfntName_
+  {
+    FT_UShort  platform_id;
+    FT_UShort  encoding_id;
+    FT_UShort  language_id;
+    FT_UShort  name_id;
+
+    FT_Byte*   string;      /* this string is *not* null-terminated! */
+    FT_UInt    string_len;  /* in bytes */
+
+  } FT_SfntName;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_Get_Sfnt_Name_Count                                             */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Retrieves the number of name strings in the SFNT `name' table.     */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    face :: A handle to the source face.                               */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    The number of strings in the `name' table.                         */
+  /*                                                                       */
+  FT_EXPORT( FT_UInt )
+  FT_Get_Sfnt_Name_Count( FT_Face  face );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_Get_Sfnt_Name                                                   */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Retrieves a string of the SFNT `name' table for a given index.     */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    face  :: A handle to the source face.                              */
+  /*                                                                       */
+  /*    idx   :: The index of the `name' string.                           */
+  /*                                                                       */
+  /* <Output>                                                              */
+  /*    aname :: The indexed @FT_SfntName structure.                       */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  0 means success.                             */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    The `string' array returned in the `aname' structure is not        */
+  /*    null-terminated.                                                   */
+  /*                                                                       */
+  /*    Use @FT_Get_Sfnt_Name_Count to get the total number of available   */
+  /*    `name' table entries, then do a loop until you get the right       */
+  /*    platform, encoding, and name ID.                                   */
+  /*                                                                       */
+  FT_EXPORT( FT_Error )
+  FT_Get_Sfnt_Name( FT_Face       face,
+                    FT_UInt       idx,
+                    FT_SfntName  *aname );
+
+
+  /* */
+
+
+FT_END_HEADER
+
+#endif /* __FT_SFNT_NAMES_H__ */
+
+
+/* END */
diff --git a/include/freetype2/freetype/ftstroke.h b/include/freetype2/freetype/ftstroke.h
new file mode 100644 (file)
index 0000000..738b43c
--- /dev/null
@@ -0,0 +1,716 @@
+/***************************************************************************/
+/*                                                                         */
+/*  ftstroke.h                                                             */
+/*                                                                         */
+/*    FreeType path stroker (specification).                               */
+/*                                                                         */
+/*  Copyright 2002, 2003, 2004, 2005, 2006 by                              */
+/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
+/*                                                                         */
+/*  This file is part of the FreeType project, and may only be used,       */
+/*  modified, and distributed under the terms of the FreeType project      */
+/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
+/*  this file you indicate that you have read the license and              */
+/*  understand and accept it fully.                                        */
+/*                                                                         */
+/***************************************************************************/
+
+
+#ifndef __FT_STROKE_H__
+#define __FT_STROKE_H__
+
+#include <ft2build.h>
+#include FT_OUTLINE_H
+#include FT_GLYPH_H
+
+
+FT_BEGIN_HEADER
+
+
+ /************************************************************************
+  *
+  * @section:
+  *    glyph_stroker
+  *
+  * @title:
+  *    Glyph Stroker
+  *
+  * @abstract:
+  *    Generating bordered and stroked glyphs.
+  *
+  * @description:
+  *    This component generates stroked outlines of a given vectorial
+  *    glyph.  It also allows you to retrieve the `outside' and/or the
+  *    `inside' borders of the stroke.
+  *
+  *    This can be useful to generate `bordered' glyph, i.e., glyphs
+  *    displayed with a coloured (and anti-aliased) border around their
+  *    shape.
+  */
+
+
+ /**************************************************************
+  *
+  * @type:
+  *   FT_Stroker
+  *
+  * @description:
+  *   Opaque handler to a path stroker object.
+  */
+  typedef struct FT_StrokerRec_*  FT_Stroker;
+
+
+  /**************************************************************
+   *
+   * @enum:
+   *   FT_Stroker_LineJoin
+   *
+   * @description:
+   *   These values determine how two joining lines are rendered
+   *   in a stroker.
+   *
+   * @values:
+   *   FT_STROKER_LINEJOIN_ROUND ::
+   *     Used to render rounded line joins.  Circular arcs are used
+   *     to join two lines smoothly.
+   *
+   *   FT_STROKER_LINEJOIN_BEVEL ::
+   *     Used to render beveled line joins; i.e., the two joining lines
+   *     are extended until they intersect.
+   *
+   *   FT_STROKER_LINEJOIN_MITER ::
+   *     Same as beveled rendering, except that an additional line
+   *     break is added if the angle between the two joining lines
+   *     is too closed (this is useful to avoid unpleasant spikes
+   *     in beveled rendering).
+   */
+  typedef enum
+  {
+    FT_STROKER_LINEJOIN_ROUND = 0,
+    FT_STROKER_LINEJOIN_BEVEL,
+    FT_STROKER_LINEJOIN_MITER
+
+  } FT_Stroker_LineJoin;
+
+
+  /**************************************************************
+   *
+   * @enum:
+   *   FT_Stroker_LineCap
+   *
+   * @description:
+   *   These values determine how the end of opened sub-paths are
+   *   rendered in a stroke.
+   *
+   * @values:
+   *   FT_STROKER_LINECAP_BUTT ::
+   *     The end of lines is rendered as a full stop on the last
+   *     point itself.
+   *
+   *   FT_STROKER_LINECAP_ROUND ::
+   *     The end of lines is rendered as a half-circle around the
+   *     last point.
+   *
+   *   FT_STROKER_LINECAP_SQUARE ::
+   *     The end of lines is rendered as a square around the
+   *     last point.
+   */
+  typedef enum
+  {
+    FT_STROKER_LINECAP_BUTT = 0,
+    FT_STROKER_LINECAP_ROUND,
+    FT_STROKER_LINECAP_SQUARE
+
+  } FT_Stroker_LineCap;
+
+
+  /**************************************************************
+   *
+   * @enum:
+   *   FT_StrokerBorder
+   *
+   * @description:
+   *   These values are used to select a given stroke border
+   *   in @FT_Stroker_GetBorderCounts and @FT_Stroker_ExportBorder.
+   *
+   * @values:
+   *   FT_STROKER_BORDER_LEFT ::
+   *     Select the left border, relative to the drawing direction.
+   *
+   *   FT_STROKER_BORDER_RIGHT ::
+   *     Select the right border, relative to the drawing direction.
+   *
+   * @note:
+   *   Applications are generally interested in the `inside' and `outside'
+   *   borders.  However, there is no direct mapping between these and the
+   *   `left' and `right' ones, since this really depends on the glyph's
+   *   drawing orientation, which varies between font formats.
+   *
+   *   You can however use @FT_Outline_GetInsideBorder and
+   *   @FT_Outline_GetOutsideBorder to get these.
+   */
+  typedef enum
+  {
+    FT_STROKER_BORDER_LEFT = 0,
+    FT_STROKER_BORDER_RIGHT
+
+  } FT_StrokerBorder;
+
+
+  /**************************************************************
+   *
+   * @function:
+   *   FT_Outline_GetInsideBorder
+   *
+   * @description:
+   *   Retrieve the @FT_StrokerBorder value corresponding to the
+   *   `inside' borders of a given outline.
+   *
+   * @input:
+   *   outline ::
+   *     The source outline handle.
+   *
+   * @return:
+   *   The border index.  @FT_STROKER_BORDER_LEFT for empty or invalid
+   *   outlines.
+   */
+  FT_EXPORT( FT_StrokerBorder )
+  FT_Outline_GetInsideBorder( FT_Outline*  outline );
+
+
+  /**************************************************************
+   *
+   * @function:
+   *   FT_Outline_GetOutsideBorder
+   *
+   * @description:
+   *   Retrieve the @FT_StrokerBorder value corresponding to the
+   *   `outside' borders of a given outline.
+   *
+   * @input:
+   *   outline ::
+   *     The source outline handle.
+   *
+   * @return:
+   *   The border index.  @FT_STROKER_BORDER_LEFT for empty or invalid
+   *   outlines.
+   */
+  FT_EXPORT( FT_StrokerBorder )
+  FT_Outline_GetOutsideBorder( FT_Outline*  outline );
+
+
+  /**************************************************************
+   *
+   * @function:
+   *   FT_Stroker_New
+   *
+   * @description:
+   *   Create a new stroker object.
+   *
+   * @input:
+   *   library ::
+   *     FreeType library handle.
+   *
+   * @output:
+   *   astroker ::
+   *     A new stroker object handle.  NULL in case of error.
+   *
+   * @return:
+   *    FreeType error code.  0 means success.
+   */
+  FT_EXPORT( FT_Error )
+  FT_Stroker_New( FT_Library   library,
+                  FT_Stroker  *astroker );
+
+
+  /**************************************************************
+   *
+   * @function:
+   *   FT_Stroker_Set
+   *
+   * @description:
+   *   Reset a stroker object's attributes.
+   *
+   * @input:
+   *   stroker ::
+   *     The target stroker handle.
+   *
+   *   radius ::
+   *     The border radius.
+   *
+   *   line_cap ::
+   *     The line cap style.
+   *
+   *   line_join ::
+   *     The line join style.
+   *
+   *   miter_limit ::
+   *     The miter limit for the FT_STROKER_LINEJOIN_MITER style,
+   *     expressed as 16.16 fixed point value.
+   *
+   * @note:
+   *   The radius is expressed in the same units that the outline
+   *   coordinates.
+   */
+  FT_EXPORT( void )
+  FT_Stroker_Set( FT_Stroker           stroker,
+                  FT_Fixed             radius,
+                  FT_Stroker_LineCap   line_cap,
+                  FT_Stroker_LineJoin  line_join,
+                  FT_Fixed             miter_limit );
+
+
+  /**************************************************************
+   *
+   * @function:
+   *   FT_Stroker_Rewind
+   *
+   * @description:
+   *   Reset a stroker object without changing its attributes.
+   *   You should call this function before beginning a new
+   *   series of calls to @FT_Stroker_BeginSubPath or
+   *   @FT_Stroker_EndSubPath.
+   *
+   * @input:
+   *   stroker ::
+   *     The target stroker handle.
+   */
+  FT_EXPORT( void )
+  FT_Stroker_Rewind( FT_Stroker  stroker );
+
+
+  /**************************************************************
+   *
+   * @function:
+   *   FT_Stroker_ParseOutline
+   *
+   * @description:
+   *   A convenience function used to parse a whole outline with
+   *   the stroker.  The resulting outline(s) can be retrieved
+   *   later by functions like @FT_Stroker_GetCounts and @FT_Stroker_Export.
+   *
+   * @input:
+   *   stroker ::
+   *     The target stroker handle.
+   *
+   *   outline ::
+   *     The source outline.
+   *
+   *   opened ::
+   *     A boolean.  If 1, the outline is treated as an open path instead
+   *     of a closed one.
+   *
+   * @return:
+   *   FreeType error code.  0 means success.
+   *
+   * @note:
+   *   If `opened' is 0 (the default), the outline is treated as a closed
+   *   path, and the stroker will generate two distinct `border' outlines.
+   *
+   *   If `opened' is 1, the outline is processed as an open path, and the
+   *   stroker will generate a single `stroke' outline.
+   *
+   *   This function calls @FT_Stroker_Rewind automatically.
+   */
+  FT_EXPORT( FT_Error )
+  FT_Stroker_ParseOutline( FT_Stroker   stroker,
+                           FT_Outline*  outline,
+                           FT_Bool      opened );
+
+
+  /**************************************************************
+   *
+   * @function:
+   *   FT_Stroker_BeginSubPath
+   *
+   * @description:
+   *   Start a new sub-path in the stroker.
+   *
+   * @input:
+   *   stroker ::
+   *     The target stroker handle.
+   *
+   *   to ::
+   *     A pointer to the start vector.
+   *
+   *   open ::
+   *     A boolean.  If 1, the sub-path is treated as an open one.
+   *
+   * @return:
+   *   FreeType error code.  0 means success.
+   *
+   * @note:
+   *   This function is useful when you need to stroke a path that is
+   *   not stored as an @FT_Outline object.
+   */
+  FT_EXPORT( FT_Error )
+  FT_Stroker_BeginSubPath( FT_Stroker  stroker,
+                           FT_Vector*  to,
+                           FT_Bool     open );
+
+
+  /**************************************************************
+   *
+   * @function:
+   *   FT_Stroker_EndSubPath
+   *
+   * @description:
+   *   Close the current sub-path in the stroker.
+   *
+   * @input:
+   *   stroker ::
+   *     The target stroker handle.
+   *
+   * @return:
+   *   FreeType error code.  0 means success.
+   *
+   * @note:
+   *   You should call this function after @FT_Stroker_BeginSubPath.
+   *   If the subpath was not `opened', this function will `draw' a
+   *   single line segment to the start position when needed.
+   */
+  FT_EXPORT( FT_Error )
+  FT_Stroker_EndSubPath( FT_Stroker  stroker );
+
+
+  /**************************************************************
+   *
+   * @function:
+   *   FT_Stroker_LineTo
+   *
+   * @description:
+   *   `Draw' a single line segment in the stroker's current sub-path,
+   *   from the last position.
+   *
+   * @input:
+   *   stroker ::
+   *     The target stroker handle.
+   *
+   *   to ::
+   *     A pointer to the destination point.
+   *
+   * @return:
+   *   FreeType error code.  0 means success.
+   *
+   * @note:
+   *   You should call this function between @FT_Stroker_BeginSubPath and
+   *   @FT_Stroker_EndSubPath.
+   */
+  FT_EXPORT( FT_Error )
+  FT_Stroker_LineTo( FT_Stroker  stroker,
+                     FT_Vector*  to );
+
+
+  /**************************************************************
+   *
+   * @function:
+   *   FT_Stroker_ConicTo
+   *
+   * @description:
+   *   `Draw' a single quadratic Bézier in the stroker's current sub-path,
+   *   from the last position.
+   *
+   * @input:
+   *   stroker ::
+   *     The target stroker handle.
+   *
+   *   control ::
+   *     A pointer to a Bézier control point.
+   *
+   *   to ::
+   *     A pointer to the destination point.
+   *
+   * @return:
+   *   FreeType error code.  0 means success.
+   *
+   * @note:
+   *   You should call this function between @FT_Stroker_BeginSubPath and
+   *   @FT_Stroker_EndSubPath.
+   */
+  FT_EXPORT( FT_Error )
+  FT_Stroker_ConicTo( FT_Stroker  stroker,
+                      FT_Vector*  control,
+                      FT_Vector*  to );
+
+
+  /**************************************************************
+   *
+   * @function:
+   *   FT_Stroker_CubicTo
+   *
+   * @description:
+   *   `Draw' a single cubic Bézier in the stroker's current sub-path,
+   *   from the last position.
+   *
+   * @input:
+   *   stroker ::
+   *     The target stroker handle.
+   *
+   *   control1 ::
+   *     A pointer to the first Bézier control point.
+   *
+   *   control2 ::
+   *     A pointer to second Bézier control point.
+   *
+   *   to ::
+   *     A pointer to the destination point.
+   *
+   * @return:
+   *   FreeType error code.  0 means success.
+   *
+   * @note:
+   *   You should call this function between @FT_Stroker_BeginSubPath and
+   *   @FT_Stroker_EndSubPath.
+   */
+  FT_EXPORT( FT_Error )
+  FT_Stroker_CubicTo( FT_Stroker  stroker,
+                      FT_Vector*  control1,
+                      FT_Vector*  control2,
+                      FT_Vector*  to );
+
+
+  /**************************************************************
+   *
+   * @function:
+   *   FT_Stroker_GetBorderCounts
+   *
+   * @description:
+   *   Call this function once you have finished parsing your paths
+   *   with the stroker.  It will return the number of points and
+   *   contours necessary to export one of the `border' or `stroke'
+   *   outlines generated by the stroker.
+   *
+   * @input:
+   *   stroker ::
+   *     The target stroker handle.
+   *
+   *   border ::
+   *     The border index.
+   *
+   * @output:
+   *   anum_points ::
+   *     The number of points.
+   *
+   *   anum_contours ::
+   *     The number of contours.
+   *
+   * @return:
+   *   FreeType error code.  0 means success.
+   *
+   * @note:
+   *   When an outline, or a sub-path, is `closed', the stroker generates
+   *   two independent `border' outlines, named `left' and `right'.
+   *
+   *   When the outline, or a sub-path, is `opened', the stroker merges
+   *   the `border' outlines with caps.  The `left' border receives all
+   *   points, while the `right' border becomes empty.
+   *
+   *   Use the function @FT_Stroker_GetCounts instead if you want to
+   *   retrieve the counts associated to both borders.
+   */
+  FT_EXPORT( FT_Error )
+  FT_Stroker_GetBorderCounts( FT_Stroker        stroker,
+                              FT_StrokerBorder  border,
+                              FT_UInt          *anum_points,
+                              FT_UInt          *anum_contours );
+
+
+  /**************************************************************
+   *
+   * @function:
+   *   FT_Stroker_ExportBorder
+   *
+   * @description:
+   *   Call this function after @FT_Stroker_GetBorderCounts to
+   *   export the corresponding border to your own @FT_Outline
+   *   structure.
+   *
+   *   Note that this function will append the border points and
+   *   contours to your outline, but will not try to resize its
+   *   arrays.
+   *
+   * @input:
+   *   stroker ::
+   *     The target stroker handle.
+   *
+   *   border ::
+   *     The border index.
+   *
+   *   outline ::
+   *     The target outline handle.
+   *
+   * @note:
+   *   Always call this function after @FT_Stroker_GetBorderCounts to
+   *   get sure that there is enough room in your @FT_Outline object to
+   *   receive all new data.
+   *
+   *   When an outline, or a sub-path, is `closed', the stroker generates
+   *   two independent `border' outlines, named `left' and `right'
+   *
+   *   When the outline, or a sub-path, is `opened', the stroker merges
+   *   the `border' outlines with caps. The `left' border receives all
+   *   points, while the `right' border becomes empty.
+   *
+   *   Use the function @FT_Stroker_Export instead if you want to
+   *   retrieve all borders at once.
+   */
+  FT_EXPORT( void )
+  FT_Stroker_ExportBorder( FT_Stroker        stroker,
+                           FT_StrokerBorder  border,
+                           FT_Outline*       outline );
+
+
+  /**************************************************************
+   *
+   * @function:
+   *   FT_Stroker_GetCounts
+   *
+   * @description:
+   *   Call this function once you have finished parsing your paths
+   *   with the stroker.  It returns the number of points and
+   *   contours necessary to export all points/borders from the stroked
+   *   outline/path.
+   *
+   * @input:
+   *   stroker ::
+   *     The target stroker handle.
+   *
+   * @output:
+   *   anum_points ::
+   *     The number of points.
+   *
+   *   anum_contours ::
+   *     The number of contours.
+   *
+   * @return:
+   *   FreeType error code.  0 means success.
+   */
+  FT_EXPORT( FT_Error )
+  FT_Stroker_GetCounts( FT_Stroker  stroker,
+                        FT_UInt    *anum_points,
+                        FT_UInt    *anum_contours );
+
+
+  /**************************************************************
+   *
+   * @function:
+   *   FT_Stroker_Export
+   *
+   * @description:
+   *   Call this function after @FT_Stroker_GetBorderCounts to
+   *   export the all borders to your own @FT_Outline structure.
+   *
+   *   Note that this function will append the border points and
+   *   contours to your outline, but will not try to resize its
+   *   arrays.
+   *
+   * @input:
+   *   stroker ::
+   *     The target stroker handle.
+   *
+   *   outline ::
+   *     The target outline handle.
+   */
+  FT_EXPORT( void )
+  FT_Stroker_Export( FT_Stroker   stroker,
+                     FT_Outline*  outline );
+
+
+  /**************************************************************
+   *
+   * @function:
+   *   FT_Stroker_Done
+   *
+   * @description:
+   *   Destroy a stroker object.
+   *
+   * @input:
+   *   stroker ::
+   *     A stroker handle.  Can be NULL.
+   */
+  FT_EXPORT( void )
+  FT_Stroker_Done( FT_Stroker  stroker );
+
+
+  /**************************************************************
+   *
+   * @function:
+   *   FT_Glyph_Stroke
+   *
+   * @description:
+   *   Stroke a given outline glyph object with a given stroker.
+   *
+   * @inout:
+   *   pglyph ::
+   *     Source glyph handle on input, new glyph handle on output.
+   *
+   * @input:
+   *   stroker ::
+   *     A stroker handle.
+   *
+   *   destroy ::
+   *     A Boolean.  If 1, the source glyph object is destroyed
+   *     on success.
+   *
+   * @return:
+   *    FreeType error code.  0 means success.
+   *
+   * @note:
+   *   The source glyph is untouched in case of error.
+   */
+  FT_EXPORT( FT_Error )
+  FT_Glyph_Stroke( FT_Glyph    *pglyph,
+                   FT_Stroker   stroker,
+                   FT_Bool      destroy );
+
+
+  /**************************************************************
+   *
+   * @function:
+   *   FT_Glyph_StrokeBorder
+   *
+   * @description:
+   *   Stroke a given outline glyph object with a given stroker, but
+   *   only return either its inside or outside border.
+   *
+   * @inout:
+   *   pglyph ::
+   *     Source glyph handle on input, new glyph handle on output.
+   *
+   * @input:
+   *   stroker ::
+   *     A stroker handle.
+   *
+   *   inside ::
+   *     A Boolean.  If 1, return the inside border, otherwise
+   *     the outside border.
+   *
+   *   destroy ::
+   *     A Boolean.  If 1, the source glyph object is destroyed
+   *     on success.
+   *
+   * @return:
+   *    FreeType error code.  0 means success.
+   *
+   * @note:
+   *   The source glyph is untouched in case of error.
+   */
+  FT_EXPORT( FT_Error )
+  FT_Glyph_StrokeBorder( FT_Glyph    *pglyph,
+                         FT_Stroker   stroker,
+                         FT_Bool      inside,
+                         FT_Bool      destroy );
+
+ /* */
+
+FT_END_HEADER
+
+#endif /* __FT_STROKE_H__ */
+
+
+/* END */
+
+
+/* Local Variables: */
+/* coding: utf-8    */
+/* End:             */
diff --git a/include/freetype2/freetype/ftsynth.h b/include/freetype2/freetype/ftsynth.h
new file mode 100644 (file)
index 0000000..36984bf
--- /dev/null
@@ -0,0 +1,73 @@
+/***************************************************************************/
+/*                                                                         */
+/*  ftsynth.h                                                              */
+/*                                                                         */
+/*    FreeType synthesizing code for emboldening and slanting              */
+/*    (specification).                                                     */
+/*                                                                         */
+/*  Copyright 2000-2001, 2003, 2006 by                                     */
+/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
+/*                                                                         */
+/*  This file is part of the FreeType project, and may only be used,       */
+/*  modified, and distributed under the terms of the FreeType project      */
+/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
+/*  this file you indicate that you have read the license and              */
+/*  understand and accept it fully.                                        */
+/*                                                                         */
+/***************************************************************************/
+
+
+  /*************************************************************************/
+  /*************************************************************************/
+  /*************************************************************************/
+  /*************************************************************************/
+  /*************************************************************************/
+  /*********                                                       *********/
+  /*********        WARNING, THIS IS ALPHA CODE, THIS API          *********/
+  /*********    IS DUE TO CHANGE UNTIL STRICTLY NOTIFIED BY THE    *********/
+  /*********            FREETYPE DEVELOPMENT TEAM                  *********/
+  /*********                                                       *********/
+  /*************************************************************************/
+  /*************************************************************************/
+  /*************************************************************************/
+  /*************************************************************************/
+  /*************************************************************************/
+
+
+#ifndef __FTSYNTH_H__
+#define __FTSYNTH_H__
+
+
+#include <ft2build.h>
+#include FT_FREETYPE_H
+
+#ifdef FREETYPE_H
+#error "freetype.h of FreeType 1 has been loaded!"
+#error "Please fix the directory search order for header files"
+#error "so that freetype.h of FreeType 2 is found first."
+#endif
+
+
+FT_BEGIN_HEADER
+
+  /* Make sure slot owns slot->bitmap. */
+  FT_EXPORT( FT_Error )
+  FT_GlyphSlot_Own_Bitmap( FT_GlyphSlot  slot );
+
+  /* Do not use this function directly!  Copy the code to */
+  /* your application and modify it to suit your need.    */
+  FT_EXPORT( void )
+  FT_GlyphSlot_Embolden( FT_GlyphSlot  slot );
+
+
+  FT_EXPORT( void )
+  FT_GlyphSlot_Oblique( FT_GlyphSlot  slot );
+
+ /* */
+
+FT_END_HEADER
+
+#endif /* __FTSYNTH_H__ */
+
+
+/* END */
diff --git a/include/freetype2/freetype/ftsystem.h b/include/freetype2/freetype/ftsystem.h
new file mode 100644 (file)
index 0000000..59cd019
--- /dev/null
@@ -0,0 +1,346 @@
+/***************************************************************************/
+/*                                                                         */
+/*  ftsystem.h                                                             */
+/*                                                                         */
+/*    FreeType low-level system interface definition (specification).      */
+/*                                                                         */
+/*  Copyright 1996-2001, 2002, 2005 by                                     */
+/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
+/*                                                                         */
+/*  This file is part of the FreeType project, and may only be used,       */
+/*  modified, and distributed under the terms of the FreeType project      */
+/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
+/*  this file you indicate that you have read the license and              */
+/*  understand and accept it fully.                                        */
+/*                                                                         */
+/***************************************************************************/
+
+
+#ifndef __FTSYSTEM_H__
+#define __FTSYSTEM_H__
+
+
+#include <ft2build.h>
+
+
+FT_BEGIN_HEADER
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Section>                                                             */
+  /*   system_interface                                                    */
+  /*                                                                       */
+  /* <Title>                                                               */
+  /*   System Interface                                                    */
+  /*                                                                       */
+  /* <Abstract>                                                            */
+  /*   How FreeType manages memory and i/o.                                */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*   This section contains various definitions related to memory         */
+  /*   management and i/o access.  You need to understand this             */
+  /*   information if you want to use a custom memory manager or you own   */
+  /*   i/o streams.                                                        */
+  /*                                                                       */
+  /*************************************************************************/
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /*                  M E M O R Y   M A N A G E M E N T                    */
+  /*                                                                       */
+  /*************************************************************************/
+
+
+  /*************************************************************************
+   *
+   * @type:
+   *   FT_Memory
+   *
+   * @description:
+   *   A handle to a given memory manager object, defined with an
+   *   @FT_MemoryRec structure.
+   *
+   */
+  typedef struct FT_MemoryRec_*  FT_Memory;
+
+
+  /*************************************************************************
+   *
+   * @functype:
+   *   FT_Alloc_Func
+   *
+   * @description:
+   *   A function used to allocate `size' bytes from `memory'.
+   *
+   * @input:
+   *   memory ::
+   *     A handle to the source memory manager.
+   *
+   *   size ::
+   *     The size in bytes to allocate.
+   *
+   * @return:
+   *   Address of new memory block.  0 in case of failure.
+   *
+   */
+  typedef void*
+  (*FT_Alloc_Func)( FT_Memory  memory,
+                    long       size );
+
+
+  /*************************************************************************
+   *
+   * @functype:
+   *   FT_Free_Func
+   *
+   * @description:
+   *   A function used to release a given block of memory.
+   *
+   * @input:
+   *   memory ::
+   *     A handle to the source memory manager.
+   *
+   *   block ::
+   *     The address of the target memory block.
+   *
+   */
+  typedef void
+  (*FT_Free_Func)( FT_Memory  memory,
+                   void*      block );
+
+
+  /*************************************************************************
+   *
+   * @functype:
+   *   FT_Realloc_Func
+   *
+   * @description:
+   *   A function used to re-allocate a given block of memory.
+   *
+   * @input:
+   *   memory ::
+   *     A handle to the source memory manager.
+   *
+   *   cur_size ::
+   *     The block's current size in bytes.
+   *
+   *   new_size ::
+   *     The block's requested new size.
+   *
+   *   block ::
+   *     The block's current address.
+   *
+   * @return:
+   *   New block address.  0 in case of memory shortage.
+   *
+   * @note:
+   *   In case of error, the old block must still be available.
+   *
+   */
+  typedef void*
+  (*FT_Realloc_Func)( FT_Memory  memory,
+                      long       cur_size,
+                      long       new_size,
+                      void*      block );
+
+
+  /*************************************************************************
+   *
+   * @struct:
+   *   FT_MemoryRec
+   *
+   * @description:
+   *   A structure used to describe a given memory manager to FreeType 2.
+   *
+   * @fields:
+   *   user ::
+   *     A generic typeless pointer for user data.
+   *
+   *   alloc ::
+   *     A pointer type to an allocation function.
+   *
+   *   free ::
+   *     A pointer type to an memory freeing function.
+   *
+   *   realloc ::
+   *     A pointer type to a reallocation function.
+   *
+   */
+  struct  FT_MemoryRec_
+  {
+    void*            user;
+    FT_Alloc_Func    alloc;
+    FT_Free_Func     free;
+    FT_Realloc_Func  realloc;
+  };
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /*                       I / O   M A N A G E M E N T                     */
+  /*                                                                       */
+  /*************************************************************************/
+
+
+  /*************************************************************************
+   *
+   * @type:
+   *   FT_Stream
+   *
+   * @description:
+   *   A handle to an input stream.
+   *
+   */
+  typedef struct FT_StreamRec_*  FT_Stream;
+
+
+  /*************************************************************************
+   *
+   * @struct:
+   *   FT_StreamDesc
+   *
+   * @description:
+   *   A union type used to store either a long or a pointer.  This is used
+   *   to store a file descriptor or a `FILE*' in an input stream.
+   *
+   */
+  typedef union  FT_StreamDesc_
+  {
+    long   value;
+    void*  pointer;
+
+  } FT_StreamDesc;
+
+
+  /*************************************************************************
+   *
+   * @functype:
+   *   FT_Stream_IoFunc
+   *
+   * @description:
+   *   A function used to seek and read data from a given input stream.
+   *
+   * @input:
+   *   stream ::
+   *     A handle to the source stream.
+   *
+   *   offset ::
+   *     The offset of read in stream (always from start).
+   *
+   *   buffer ::
+   *     The address of the read buffer.
+   *
+   *   count ::
+   *     The number of bytes to read from the stream.
+   *
+   * @return:
+   *   The number of bytes effectively read by the stream.
+   *
+   * @note:
+   *   This function might be called to perform a seek or skip operation
+   *   with a `count' of 0.
+   *
+   */
+  typedef unsigned long
+  (*FT_Stream_IoFunc)( FT_Stream       stream,
+                       unsigned long   offset,
+                       unsigned char*  buffer,
+                       unsigned long   count );
+
+
+  /*************************************************************************
+   *
+   * @functype:
+   *   FT_Stream_CloseFunc
+   *
+   * @description:
+   *   A function used to close a given input stream.
+   *
+   * @input:
+   *  stream ::
+   *     A handle to the target stream.
+   *
+   */
+  typedef void
+  (*FT_Stream_CloseFunc)( FT_Stream  stream );
+
+
+  /*************************************************************************
+   *
+   * @struct:
+   *   FT_StreamRec
+   *
+   * @description:
+   *   A structure used to describe an input stream.
+   *
+   * @input:
+   *   base ::
+   *     For memory-based streams, this is the address of the first stream
+   *     byte in memory.  This field should always be set to NULL for
+   *     disk-based streams.
+   *
+   *   size ::
+   *     The stream size in bytes.
+   *
+   *   pos ::
+   *     The current position within the stream.
+   *
+   *   descriptor ::
+   *     This field is a union that can hold an integer or a pointer.  It is
+   *     used by stream implementations to store file descriptors or `FILE*'
+   *     pointers.
+   *
+   *   pathname ::
+   *     This field is completely ignored by FreeType.  However, it is often
+   *     useful during debugging to use it to store the stream's filename
+   *     (where available).
+   *
+   *   read ::
+   *     The stream's input function.
+   *
+   *   close ::
+   *     The stream;s close function.
+   *
+   *   memory ::
+   *     The memory manager to use to preload frames.  This is set
+   *     internally by FreeType and shouldn't be touched by stream
+   *     implementations.
+   *
+   *   cursor ::
+   *     This field is set and used internally by FreeType when parsing
+   *     frames.
+   *
+   *   limit ::
+   *     This field is set and used internally by FreeType when parsing
+   *     frames.
+   *
+   */
+  typedef struct  FT_StreamRec_
+  {
+    unsigned char*       base;
+    unsigned long        size;
+    unsigned long        pos;
+
+    FT_StreamDesc        descriptor;
+    FT_StreamDesc        pathname;
+    FT_Stream_IoFunc     read;
+    FT_Stream_CloseFunc  close;
+
+    FT_Memory            memory;
+    unsigned char*       cursor;
+    unsigned char*       limit;
+
+  } FT_StreamRec;
+
+
+  /* */
+
+
+FT_END_HEADER
+
+#endif /* __FTSYSTEM_H__ */
+
+
+/* END */
diff --git a/include/freetype2/freetype/fttrigon.h b/include/freetype2/freetype/fttrigon.h
new file mode 100644 (file)
index 0000000..6b77d2e
--- /dev/null
@@ -0,0 +1,350 @@
+/***************************************************************************/
+/*                                                                         */
+/*  fttrigon.h                                                             */
+/*                                                                         */
+/*    FreeType trigonometric functions (specification).                    */
+/*                                                                         */
+/*  Copyright 2001, 2003, 2005, 2007 by                                    */
+/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
+/*                                                                         */
+/*  This file is part of the FreeType project, and may only be used,       */
+/*  modified, and distributed under the terms of the FreeType project      */
+/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
+/*  this file you indicate that you have read the license and              */
+/*  understand and accept it fully.                                        */
+/*                                                                         */
+/***************************************************************************/
+
+
+#ifndef __FTTRIGON_H__
+#define __FTTRIGON_H__
+
+#include FT_FREETYPE_H
+
+#ifdef FREETYPE_H
+#error "freetype.h of FreeType 1 has been loaded!"
+#error "Please fix the directory search order for header files"
+#error "so that freetype.h of FreeType 2 is found first."
+#endif
+
+
+FT_BEGIN_HEADER
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Section>                                                             */
+  /*   computations                                                        */
+  /*                                                                       */
+  /*************************************************************************/
+
+
+  /*************************************************************************
+   *
+   * @type:
+   *   FT_Angle
+   *
+   * @description:
+   *   This type is used to model angle values in FreeType.  Note that the
+   *   angle is a 16.16 fixed float value expressed in degrees.
+   *
+   */
+  typedef FT_Fixed  FT_Angle;
+
+
+  /*************************************************************************
+   *
+   * @macro:
+   *   FT_ANGLE_PI
+   *
+   * @description:
+   *   The angle pi expressed in @FT_Angle units.
+   *
+   */
+#define FT_ANGLE_PI  ( 180L << 16 )
+
+
+  /*************************************************************************
+   *
+   * @macro:
+   *   FT_ANGLE_2PI
+   *
+   * @description:
+   *   The angle 2*pi expressed in @FT_Angle units.
+   *
+   */
+#define FT_ANGLE_2PI  ( FT_ANGLE_PI * 2 )
+
+
+  /*************************************************************************
+   *
+   * @macro:
+   *   FT_ANGLE_PI2
+   *
+   * @description:
+   *   The angle pi/2 expressed in @FT_Angle units.
+   *
+   */
+#define FT_ANGLE_PI2  ( FT_ANGLE_PI / 2 )
+
+
+  /*************************************************************************
+   *
+   * @macro:
+   *   FT_ANGLE_PI4
+   *
+   * @description:
+   *   The angle pi/4 expressed in @FT_Angle units.
+   *
+   */
+#define FT_ANGLE_PI4  ( FT_ANGLE_PI / 4 )
+
+
+  /*************************************************************************
+   *
+   * @function:
+   *   FT_Sin
+   *
+   * @description:
+   *   Return the sinus of a given angle in fixed point format.
+   *
+   * @input:
+   *   angle ::
+   *     The input angle.
+   *
+   * @return:
+   *   The sinus value.
+   *
+   * @note:
+   *   If you need both the sinus and cosinus for a given angle, use the
+   *   function @FT_Vector_Unit.
+   *
+   */
+  FT_EXPORT( FT_Fixed )
+  FT_Sin( FT_Angle  angle );
+
+
+  /*************************************************************************
+   *
+   * @function:
+   *   FT_Cos
+   *
+   * @description:
+   *   Return the cosinus of a given angle in fixed point format.
+   *
+   * @input:
+   *   angle ::
+   *     The input angle.
+   *
+   * @return:
+   *   The cosinus value.
+   *
+   * @note:
+   *   If you need both the sinus and cosinus for a given angle, use the
+   *   function @FT_Vector_Unit.
+   *
+   */
+  FT_EXPORT( FT_Fixed )
+  FT_Cos( FT_Angle  angle );
+
+
+  /*************************************************************************
+   *
+   * @function:
+   *   FT_Tan
+   *
+   * @description:
+   *   Return the tangent of a given angle in fixed point format.
+   *
+   * @input:
+   *   angle ::
+   *     The input angle.
+   *
+   * @return:
+   *   The tangent value.
+   *
+   */
+  FT_EXPORT( FT_Fixed )
+  FT_Tan( FT_Angle  angle );
+
+
+  /*************************************************************************
+   *
+   * @function:
+   *   FT_Atan2
+   *
+   * @description:
+   *   Return the arc-tangent corresponding to a given vector (x,y) in
+   *   the 2d plane.
+   *
+   * @input:
+   *   x ::
+   *     The horizontal vector coordinate.
+   *
+   *   y ::
+   *     The vertical vector coordinate.
+   *
+   * @return:
+   *   The arc-tangent value (i.e. angle).
+   *
+   */
+  FT_EXPORT( FT_Angle )
+  FT_Atan2( FT_Fixed  x,
+            FT_Fixed  y );
+
+
+  /*************************************************************************
+   *
+   * @function:
+   *   FT_Angle_Diff
+   *
+   * @description:
+   *   Return the difference between two angles.  The result is always
+   *   constrained to the ]-PI..PI] interval.
+   *
+   * @input:
+   *   angle1 ::
+   *     First angle.
+   *
+   *   angle2 ::
+   *     Second angle.
+   *
+   * @return:
+   *   Constrained value of `value2-value1'.
+   *
+   */
+  FT_EXPORT( FT_Angle )
+  FT_Angle_Diff( FT_Angle  angle1,
+                 FT_Angle  angle2 );
+
+
+  /*************************************************************************
+   *
+   * @function:
+   *   FT_Vector_Unit
+   *
+   * @description:
+   *   Return the unit vector corresponding to a given angle.  After the
+   *   call, the value of `vec.x' will be `sin(angle)', and the value of
+   *   `vec.y' will be `cos(angle)'.
+   *
+   *   This function is useful to retrieve both the sinus and cosinus of a
+   *   given angle quickly.
+   *
+   * @output:
+   *   vec ::
+   *     The address of target vector.
+   *
+   * @input:
+   *   angle ::
+   *     The address of angle.
+   *
+   */
+  FT_EXPORT( void )
+  FT_Vector_Unit( FT_Vector*  vec,
+                  FT_Angle    angle );
+
+
+  /*************************************************************************
+   *
+   * @function:
+   *   FT_Vector_Rotate
+   *
+   * @description:
+   *   Rotate a vector by a given angle.
+   *
+   * @inout:
+   *   vec ::
+   *     The address of target vector.
+   *
+   * @input:
+   *   angle ::
+   *     The address of angle.
+   *
+   */
+  FT_EXPORT( void )
+  FT_Vector_Rotate( FT_Vector*  vec,
+                    FT_Angle    angle );
+
+
+  /*************************************************************************
+   *
+   * @function:
+   *   FT_Vector_Length
+   *
+   * @description:
+   *   Return the length of a given vector.
+   *
+   * @input:
+   *   vec ::
+   *     The address of target vector.
+   *
+   * @return:
+   *   The vector length, expressed in the same units that the original
+   *   vector coordinates.
+   *
+   */
+  FT_EXPORT( FT_Fixed )
+  FT_Vector_Length( FT_Vector*  vec );
+
+
+  /*************************************************************************
+   *
+   * @function:
+   *   FT_Vector_Polarize
+   *
+   * @description:
+   *   Compute both the length and angle of a given vector.
+   *
+   * @input:
+   *   vec ::
+   *     The address of source vector.
+   *
+   * @output:
+   *   length ::
+   *     The vector length.
+   *
+   *   angle ::
+   *     The vector angle.
+   *
+   */
+  FT_EXPORT( void )
+  FT_Vector_Polarize( FT_Vector*  vec,
+                      FT_Fixed   *length,
+                      FT_Angle   *angle );
+
+
+  /*************************************************************************
+   *
+   * @function:
+   *   FT_Vector_From_Polar
+   *
+   * @description:
+   *   Compute vector coordinates from a length and angle.
+   *
+   * @output:
+   *   vec ::
+   *     The address of source vector.
+   *
+   * @input:
+   *   length ::
+   *     The vector length.
+   *
+   *   angle ::
+   *     The vector angle.
+   *
+   */
+  FT_EXPORT( void )
+  FT_Vector_From_Polar( FT_Vector*  vec,
+                        FT_Fixed    length,
+                        FT_Angle    angle );
+
+  /* */
+
+
+FT_END_HEADER
+
+#endif /* __FTTRIGON_H__ */
+
+
+/* END */
diff --git a/include/freetype2/freetype/fttypes.h b/include/freetype2/freetype/fttypes.h
new file mode 100644 (file)
index 0000000..2340bac
--- /dev/null
@@ -0,0 +1,583 @@
+/***************************************************************************/
+/*                                                                         */
+/*  fttypes.h                                                              */
+/*                                                                         */
+/*    FreeType simple types definitions (specification only).              */
+/*                                                                         */
+/*  Copyright 1996-2001, 2002, 2004, 2006, 2007 by                         */
+/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
+/*                                                                         */
+/*  This file is part of the FreeType project, and may only be used,       */
+/*  modified, and distributed under the terms of the FreeType project      */
+/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
+/*  this file you indicate that you have read the license and              */
+/*  understand and accept it fully.                                        */
+/*                                                                         */
+/***************************************************************************/
+
+
+#ifndef __FTTYPES_H__
+#define __FTTYPES_H__
+
+
+#include <ft2build.h>
+#include FT_CONFIG_CONFIG_H
+#include FT_SYSTEM_H
+#include FT_IMAGE_H
+
+#include <stddef.h>
+
+
+FT_BEGIN_HEADER
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Section>                                                             */
+  /*    basic_types                                                        */
+  /*                                                                       */
+  /* <Title>                                                               */
+  /*    Basic Data Types                                                   */
+  /*                                                                       */
+  /* <Abstract>                                                            */
+  /*    The basic data types defined by the library.                       */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    This section contains the basic data types defined by FreeType 2,  */
+  /*    ranging from simple scalar types to bitmap descriptors.  More      */
+  /*    font-specific structures are defined in a different section.       */
+  /*                                                                       */
+  /* <Order>                                                               */
+  /*    FT_Byte                                                            */
+  /*    FT_Bytes                                                           */
+  /*    FT_Char                                                            */
+  /*    FT_Int                                                             */
+  /*    FT_UInt                                                            */
+  /*    FT_Short                                                           */
+  /*    FT_UShort                                                          */
+  /*    FT_Long                                                            */
+  /*    FT_ULong                                                           */
+  /*    FT_Bool                                                            */
+  /*    FT_Offset                                                          */
+  /*    FT_PtrDist                                                         */
+  /*    FT_String                                                          */
+  /*    FT_Tag                                                             */
+  /*    FT_Error                                                           */
+  /*    FT_Fixed                                                           */
+  /*    FT_Pointer                                                         */
+  /*    FT_Pos                                                             */
+  /*    FT_Vector                                                          */
+  /*    FT_BBox                                                            */
+  /*    FT_Matrix                                                          */
+  /*    FT_FWord                                                           */
+  /*    FT_UFWord                                                          */
+  /*    FT_F2Dot14                                                         */
+  /*    FT_UnitVector                                                      */
+  /*    FT_F26Dot6                                                         */
+  /*                                                                       */
+  /*                                                                       */
+  /*    FT_Generic                                                         */
+  /*    FT_Generic_Finalizer                                               */
+  /*                                                                       */
+  /*    FT_Bitmap                                                          */
+  /*    FT_Pixel_Mode                                                      */
+  /*    FT_Palette_Mode                                                    */
+  /*    FT_Glyph_Format                                                    */
+  /*    FT_IMAGE_TAG                                                       */
+  /*                                                                       */
+  /*************************************************************************/
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Type>                                                                */
+  /*    FT_Bool                                                            */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A typedef of unsigned char, used for simple booleans.  As usual,   */
+  /*    values 1 and 0 represent true and false, respectively.             */
+  /*                                                                       */
+  typedef unsigned char  FT_Bool;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Type>                                                                */
+  /*    FT_FWord                                                           */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A signed 16-bit integer used to store a distance in original font  */
+  /*    units.                                                             */
+  /*                                                                       */
+  typedef signed short  FT_FWord;   /* distance in FUnits */
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Type>                                                                */
+  /*    FT_UFWord                                                          */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    An unsigned 16-bit integer used to store a distance in original    */
+  /*    font units.                                                        */
+  /*                                                                       */
+  typedef unsigned short  FT_UFWord;  /* unsigned distance */
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Type>                                                                */
+  /*    FT_Char                                                            */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A simple typedef for the _signed_ char type.                       */
+  /*                                                                       */
+  typedef signed char  FT_Char;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Type>                                                                */
+  /*    FT_Byte                                                            */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A simple typedef for the _unsigned_ char type.                     */
+  /*                                                                       */
+  typedef unsigned char  FT_Byte;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Type>                                                                */
+  /*    FT_Bytes                                                           */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A typedef for constant memory areas.                               */
+  /*                                                                       */
+  typedef const FT_Byte*  FT_Bytes;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Type>                                                                */
+  /*    FT_Tag                                                             */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A typedef for 32bit tags (as used in the SFNT format).             */
+  /*                                                                       */
+  typedef FT_UInt32  FT_Tag;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Type>                                                                */
+  /*    FT_String                                                          */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A simple typedef for the char type, usually used for strings.      */
+  /*                                                                       */
+  typedef char  FT_String;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Type>                                                                */
+  /*    FT_Short                                                           */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A typedef for signed short.                                        */
+  /*                                                                       */
+  typedef signed short  FT_Short;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Type>                                                                */
+  /*    FT_UShort                                                          */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A typedef for unsigned short.                                      */
+  /*                                                                       */
+  typedef unsigned short  FT_UShort;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Type>                                                                */
+  /*    FT_Int                                                             */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A typedef for the int type.                                        */
+  /*                                                                       */
+  typedef signed int  FT_Int;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Type>                                                                */
+  /*    FT_UInt                                                            */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A typedef for the unsigned int type.                               */
+  /*                                                                       */
+  typedef unsigned int  FT_UInt;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Type>                                                                */
+  /*    FT_Long                                                            */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A typedef for signed long.                                         */
+  /*                                                                       */
+  typedef signed long  FT_Long;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Type>                                                                */
+  /*    FT_ULong                                                           */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A typedef for unsigned long.                                       */
+  /*                                                                       */
+  typedef unsigned long  FT_ULong;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Type>                                                                */
+  /*    FT_F2Dot14                                                         */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A signed 2.14 fixed float type used for unit vectors.              */
+  /*                                                                       */
+  typedef signed short  FT_F2Dot14;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Type>                                                                */
+  /*    FT_F26Dot6                                                         */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A signed 26.6 fixed float type used for vectorial pixel            */
+  /*    coordinates.                                                       */
+  /*                                                                       */
+  typedef signed long  FT_F26Dot6;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Type>                                                                */
+  /*    FT_Fixed                                                           */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    This type is used to store 16.16 fixed float values, like scaling  */
+  /*    values or matrix coefficients.                                     */
+  /*                                                                       */
+  typedef signed long  FT_Fixed;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Type>                                                                */
+  /*    FT_Error                                                           */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    The FreeType error code type.  A value of 0 is always interpreted  */
+  /*    as a successful operation.                                         */
+  /*                                                                       */
+  typedef int  FT_Error;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Type>                                                                */
+  /*    FT_Pointer                                                         */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A simple typedef for a typeless pointer.                           */
+  /*                                                                       */
+  typedef void*  FT_Pointer;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Type>                                                                */
+  /*    FT_Offset                                                          */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    This is equivalent to the ANSI C `size_t' type, i.e., the largest  */
+  /*    _unsigned_ integer type used to express a file size or position,   */
+  /*    or a memory block size.                                            */
+  /*                                                                       */
+  typedef size_t  FT_Offset;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Type>                                                                */
+  /*    FT_PtrDist                                                         */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    This is equivalent to the ANSI C `ptrdiff_t' type, i.e., the       */
+  /*    largest _signed_ integer type used to express the distance         */
+  /*    between two pointers.                                              */
+  /*                                                                       */
+  typedef ft_ptrdiff_t  FT_PtrDist;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Struct>                                                              */
+  /*    FT_UnitVector                                                      */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A simple structure used to store a 2D vector unit vector.  Uses    */
+  /*    FT_F2Dot14 types.                                                  */
+  /*                                                                       */
+  /* <Fields>                                                              */
+  /*    x :: Horizontal coordinate.                                        */
+  /*                                                                       */
+  /*    y :: Vertical coordinate.                                          */
+  /*                                                                       */
+  typedef struct  FT_UnitVector_
+  {
+    FT_F2Dot14  x;
+    FT_F2Dot14  y;
+
+  } FT_UnitVector;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Struct>                                                              */
+  /*    FT_Matrix                                                          */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A simple structure used to store a 2x2 matrix.  Coefficients are   */
+  /*    in 16.16 fixed float format.  The computation performed is:        */
+  /*                                                                       */
+  /*       {                                                               */
+  /*          x' = x*xx + y*xy                                             */
+  /*          y' = x*yx + y*yy                                             */
+  /*       }                                                               */
+  /*                                                                       */
+  /* <Fields>                                                              */
+  /*    xx :: Matrix coefficient.                                          */
+  /*                                                                       */
+  /*    xy :: Matrix coefficient.                                          */
+  /*                                                                       */
+  /*    yx :: Matrix coefficient.                                          */
+  /*                                                                       */
+  /*    yy :: Matrix coefficient.                                          */
+  /*                                                                       */
+  typedef struct  FT_Matrix_
+  {
+    FT_Fixed  xx, xy;
+    FT_Fixed  yx, yy;
+
+  } FT_Matrix;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Struct>                                                              */
+  /*    FT_Data                                                            */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Read-only binary data represented as a pointer and a length.       */
+  /*                                                                       */
+  /* <Fields>                                                              */
+  /*    pointer :: The data.                                               */
+  /*                                                                       */
+  /*    length  :: The length of the data in bytes.                        */
+  /*                                                                       */
+  typedef struct  FT_Data_
+  {
+    const FT_Byte*  pointer;
+    FT_Int          length;
+
+  } FT_Data;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <FuncType>                                                            */
+  /*    FT_Generic_Finalizer                                               */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Describes a function used to destroy the `client' data of any      */
+  /*    FreeType object.  See the description of the @FT_Generic type for  */
+  /*    details of usage.                                                  */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    The address of the FreeType object which is under finalization.    */
+  /*    Its client data is accessed through its `generic' field.           */
+  /*                                                                       */
+  typedef void  (*FT_Generic_Finalizer)(void*  object);
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Struct>                                                              */
+  /*    FT_Generic                                                         */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Client applications often need to associate their own data to a    */
+  /*    variety of FreeType core objects.  For example, a text layout API  */
+  /*    might want to associate a glyph cache to a given size object.      */
+  /*                                                                       */
+  /*    Most FreeType object contains a `generic' field, of type           */
+  /*    FT_Generic, which usage is left to client applications and font    */
+  /*    servers.                                                           */
+  /*                                                                       */
+  /*    It can be used to store a pointer to client-specific data, as well */
+  /*    as the address of a `finalizer' function, which will be called by  */
+  /*    FreeType when the object is destroyed (for example, the previous   */
+  /*    client example would put the address of the glyph cache destructor */
+  /*    in the `finalizer' field).                                         */
+  /*                                                                       */
+  /* <Fields>                                                              */
+  /*    data      :: A typeless pointer to any client-specified data. This */
+  /*                 field is completely ignored by the FreeType library.  */
+  /*                                                                       */
+  /*    finalizer :: A pointer to a `generic finalizer' function, which    */
+  /*                 will be called when the object is destroyed.  If this */
+  /*                 field is set to NULL, no code will be called.         */
+  /*                                                                       */
+  typedef struct  FT_Generic_
+  {
+    void*                 data;
+    FT_Generic_Finalizer  finalizer;
+
+  } FT_Generic;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Macro>                                                               */
+  /*    FT_MAKE_TAG                                                        */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    This macro converts four-letter tags which are used to label       */
+  /*    TrueType tables into an unsigned long to be used within FreeType.  */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    The produced values *must* be 32bit integers.  Don't redefine this */
+  /*    macro.                                                             */
+  /*                                                                       */
+#define FT_MAKE_TAG( _x1, _x2, _x3, _x4 ) \
+          ( ( (FT_ULong)_x1 << 24 ) |     \
+            ( (FT_ULong)_x2 << 16 ) |     \
+            ( (FT_ULong)_x3 <<  8 ) |     \
+              (FT_ULong)_x4         )
+
+
+  /*************************************************************************/
+  /*************************************************************************/
+  /*                                                                       */
+  /*                    L I S T   M A N A G E M E N T                      */
+  /*                                                                       */
+  /*************************************************************************/
+  /*************************************************************************/
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Section>                                                             */
+  /*    list_processing                                                    */
+  /*                                                                       */
+  /*************************************************************************/
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Type>                                                                */
+  /*    FT_ListNode                                                        */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*     Many elements and objects in FreeType are listed through an       */
+  /*     @FT_List record (see @FT_ListRec).  As its name suggests, an      */
+  /*     FT_ListNode is a handle to a single list element.                 */
+  /*                                                                       */
+  typedef struct FT_ListNodeRec_*  FT_ListNode;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Type>                                                                */
+  /*    FT_List                                                            */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A handle to a list record (see @FT_ListRec).                       */
+  /*                                                                       */
+  typedef struct FT_ListRec_*  FT_List;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Struct>                                                              */
+  /*    FT_ListNodeRec                                                     */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A structure used to hold a single list element.                    */
+  /*                                                                       */
+  /* <Fields>                                                              */
+  /*    prev :: The previous element in the list.  NULL if first.          */
+  /*                                                                       */
+  /*    next :: The next element in the list.  NULL if last.               */
+  /*                                                                       */
+  /*    data :: A typeless pointer to the listed object.                   */
+  /*                                                                       */
+  typedef struct  FT_ListNodeRec_
+  {
+    FT_ListNode  prev;
+    FT_ListNode  next;
+    void*        data;
+
+  } FT_ListNodeRec;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Struct>                                                              */
+  /*    FT_ListRec                                                         */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A structure used to hold a simple doubly-linked list.  These are   */
+  /*    used in many parts of FreeType.                                    */
+  /*                                                                       */
+  /* <Fields>                                                              */
+  /*    head :: The head (first element) of doubly-linked list.            */
+  /*                                                                       */
+  /*    tail :: The tail (last element) of doubly-linked list.             */
+  /*                                                                       */
+  typedef struct  FT_ListRec_
+  {
+    FT_ListNode  head;
+    FT_ListNode  tail;
+
+  } FT_ListRec;
+
+
+  /* */
+
+#define FT_IS_EMPTY( list )  ( (list).head == 0 )
+
+  /* return base error code (without module-specific prefix) */
+#define FT_ERROR_BASE( x )    ( (x) & 0xFF )
+
+  /* return module error code */
+#define FT_ERROR_MODULE( x )  ( (x) & 0xFF00U )
+
+#define FT_BOOL( x )  ( (FT_Bool)( x ) )
+
+FT_END_HEADER
+
+#endif /* __FTTYPES_H__ */
+
+
+/* END */
diff --git a/include/freetype2/freetype/ftwinfnt.h b/include/freetype2/freetype/ftwinfnt.h
new file mode 100644 (file)
index 0000000..a0063cc
--- /dev/null
@@ -0,0 +1,263 @@
+/***************************************************************************/
+/*                                                                         */
+/*  ftwinfnt.h                                                             */
+/*                                                                         */
+/*    FreeType API for accessing Windows fnt-specific data.                */
+/*                                                                         */
+/*  Copyright 2003, 2004 by                                                */
+/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
+/*                                                                         */
+/*  This file is part of the FreeType project, and may only be used,       */
+/*  modified, and distributed under the terms of the FreeType project      */
+/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
+/*  this file you indicate that you have read the license and              */
+/*  understand and accept it fully.                                        */
+/*                                                                         */
+/***************************************************************************/
+
+
+#ifndef __FTWINFNT_H__
+#define __FTWINFNT_H__
+
+#include <ft2build.h>
+#include FT_FREETYPE_H
+
+#ifdef FREETYPE_H
+#error "freetype.h of FreeType 1 has been loaded!"
+#error "Please fix the directory search order for header files"
+#error "so that freetype.h of FreeType 2 is found first."
+#endif
+
+
+FT_BEGIN_HEADER
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Section>                                                             */
+  /*    winfnt_fonts                                                       */
+  /*                                                                       */
+  /* <Title>                                                               */
+  /*    Window FNT Files                                                   */
+  /*                                                                       */
+  /* <Abstract>                                                            */
+  /*    Windows FNT specific API.                                          */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    This section contains the declaration of Windows FNT specific      */
+  /*    functions.                                                         */
+  /*                                                                       */
+  /*************************************************************************/
+
+
+  /*************************************************************************
+   *
+   * @enum:
+   *   FT_WinFNT_ID_XXX
+   *
+   * @description:
+   *   A list of valid values for the `charset' byte in
+   *   @FT_WinFNT_HeaderRec.  Exact mapping tables for the various cpXXXX
+   *   encodings (except for cp1361) can be found at ftp://ftp.unicode.org
+   *   in the MAPPINGS/VENDORS/MICSFT/WINDOWS subdirectory.  cp1361 is
+   *   roughly a superset of MAPPINGS/OBSOLETE/EASTASIA/KSC/JOHAB.TXT.
+   *
+   * @values:
+   *   FT_WinFNT_ID_DEFAULT ::
+   *     This is used for font enumeration and font creation as a
+   *     `don't care' value.  Valid font files don't contain this value.
+   *     When querying for information about the character set of the font
+   *     that is currently selected into a specified device context, this
+   *     return value (of the related Windows API) simply denotes failure.
+   *
+   *   FT_WinFNT_ID_SYMBOL ::
+   *     There is no known mapping table available.
+   *
+   *   FT_WinFNT_ID_MAC ::
+   *     Mac Roman encoding.
+   *
+   *   FT_WinFNT_ID_OEM ::
+   *     From Michael Pöttgen <michael@poettgen.de>:
+   *
+   *       The `Windows Font Mapping' article says that FT_WinFNT_ID_OEM
+   *       is used for the charset of vector fonts, like `modern.fon',
+   *       `roman.fon', and `script.fon' on Windows.
+   *
+   *       The `CreateFont' documentation says: The FT_WinFNT_ID_OEM value
+   *       specifies a character set that is operating-system dependent.
+   *
+   *       The `IFIMETRICS' documentation from the `Windows Driver
+   *       Development Kit' says: This font supports an OEM-specific
+   *       character set.  The OEM character set is system dependent.
+   *
+   *       In general OEM, as opposed to ANSI (i.e., cp1252), denotes the
+   *       second default codepage that most international versions of
+   *       Windows have.  It is one of the OEM codepages from
+   *
+   *         http://www.microsoft.com/globaldev/reference/cphome.mspx,
+   *
+   *       and is used for the `DOS boxes', to support legacy applications.
+   *       A German Windows version for example usually uses ANSI codepage
+   *       1252 and OEM codepage 850.
+   *
+   *   FT_WinFNT_ID_CP874 ::
+   *     A superset of Thai TIS 620 and ISO 8859-11.
+   *
+   *   FT_WinFNT_ID_CP932 ::
+   *     A superset of Japanese Shift-JIS (with minor deviations).
+   *
+   *   FT_WinFNT_ID_CP936 ::
+   *     A superset of simplified Chinese GB 2312-1980 (with different
+   *     ordering and minor deviations).
+   *
+   *   FT_WinFNT_ID_CP949 ::
+   *     A superset of Korean Hangul KS C 5601-1987 (with different
+   *     ordering and minor deviations).
+   *
+   *   FT_WinFNT_ID_CP950 ::
+   *     A superset of traditional Chinese Big 5 ETen (with different
+   *     ordering and minor deviations).
+   *
+   *   FT_WinFNT_ID_CP1250 ::
+   *     A superset of East European ISO 8859-2 (with slightly different
+   *     ordering).
+   *
+   *   FT_WinFNT_ID_CP1251 ::
+   *     A superset of Russian ISO 8859-5 (with different ordering).
+   *
+   *   FT_WinFNT_ID_CP1252 ::
+   *     ANSI encoding.  A superset of ISO 8859-1.
+   *
+   *   FT_WinFNT_ID_CP1253 ::
+   *     A superset of Greek ISO 8859-7 (with minor modifications).
+   *
+   *   FT_WinFNT_ID_CP1254 ::
+   *     A superset of Turkish ISO 8859-9.
+   *
+   *   FT_WinFNT_ID_CP1255 ::
+   *     A superset of Hebrew ISO 8859-8 (with some modifications).
+   *
+   *   FT_WinFNT_ID_CP1256 ::
+   *     A superset of Arabic ISO 8859-6 (with different ordering).
+   *
+   *   FT_WinFNT_ID_CP1257 ::
+   *     A superset of Baltic ISO 8859-13 (with some deviations).
+   *
+   *   FT_WinFNT_ID_CP1258 ::
+   *     For Vietnamese.  This encoding doesn't cover all necessary
+   *     characters.
+   *
+   *   FT_WinFNT_ID_CP1361 ::
+   *     Korean (Johab).
+   */
+
+#define FT_WinFNT_ID_CP1252    0
+#define FT_WinFNT_ID_DEFAULT   1
+#define FT_WinFNT_ID_SYMBOL    2
+#define FT_WinFNT_ID_MAC      77
+#define FT_WinFNT_ID_CP932   128
+#define FT_WinFNT_ID_CP949   129
+#define FT_WinFNT_ID_CP1361  130
+#define FT_WinFNT_ID_CP936   134
+#define FT_WinFNT_ID_CP950   136
+#define FT_WinFNT_ID_CP1253  161
+#define FT_WinFNT_ID_CP1254  162
+#define FT_WinFNT_ID_CP1258  163
+#define FT_WinFNT_ID_CP1255  177
+#define FT_WinFNT_ID_CP1256  178
+#define FT_WinFNT_ID_CP1257  186
+#define FT_WinFNT_ID_CP1251  204
+#define FT_WinFNT_ID_CP874   222
+#define FT_WinFNT_ID_CP1250  238
+#define FT_WinFNT_ID_OEM     255
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Struct>                                                              */
+  /*    FT_WinFNT_HeaderRec                                                */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Windows FNT Header info.                                           */
+  /*                                                                       */
+  typedef struct  FT_WinFNT_HeaderRec_
+  {
+    FT_UShort  version;
+    FT_ULong   file_size;
+    FT_Byte    copyright[60];
+    FT_UShort  file_type;
+    FT_UShort  nominal_point_size;
+    FT_UShort  vertical_resolution;
+    FT_UShort  horizontal_resolution;
+    FT_UShort  ascent;
+    FT_UShort  internal_leading;
+    FT_UShort  external_leading;
+    FT_Byte    italic;
+    FT_Byte    underline;
+    FT_Byte    strike_out;
+    FT_UShort  weight;
+    FT_Byte    charset;
+    FT_UShort  pixel_width;
+    FT_UShort  pixel_height;
+    FT_Byte    pitch_and_family;
+    FT_UShort  avg_width;
+    FT_UShort  max_width;
+    FT_Byte    first_char;
+    FT_Byte    last_char;
+    FT_Byte    default_char;
+    FT_Byte    break_char;
+    FT_UShort  bytes_per_row;
+    FT_ULong   device_offset;
+    FT_ULong   face_name_offset;
+    FT_ULong   bits_pointer;
+    FT_ULong   bits_offset;
+    FT_Byte    reserved;
+    FT_ULong   flags;
+    FT_UShort  A_space;
+    FT_UShort  B_space;
+    FT_UShort  C_space;
+    FT_UShort  color_table_offset;
+    FT_ULong   reserved1[4];
+
+  } FT_WinFNT_HeaderRec, *FT_WinFNT_Header;
+
+
+ /**********************************************************************
+  *
+  * @function:
+  *    FT_Get_WinFNT_Header
+  *
+  * @description:
+  *    Retrieve a Windows FNT font info header.
+  *
+  * @input:
+  *    face    :: A handle to the input face.
+  *
+  * @output:
+  *    aheader :: The WinFNT header.
+  *
+  * @return:
+  *   FreeType error code.  0 means success.
+  *
+  * @note:
+  *   This function only works with Windows FNT faces, returning an error
+  *   otherwise.
+  */
+  FT_EXPORT( FT_Error )
+  FT_Get_WinFNT_Header( FT_Face               face,
+                        FT_WinFNT_HeaderRec  *aheader );
+
+
+ /* */
+
+FT_END_HEADER
+
+#endif /* __FTWINFNT_H__ */
+
+
+/* END */
+
+
+/* Local Variables: */
+/* coding: utf-8    */
+/* End:             */
diff --git a/include/freetype2/freetype/ftxf86.h b/include/freetype2/freetype/ftxf86.h
new file mode 100644 (file)
index 0000000..ea82abb
--- /dev/null
@@ -0,0 +1,80 @@
+/***************************************************************************/
+/*                                                                         */
+/*  ftxf86.h                                                               */
+/*                                                                         */
+/*    Support functions for X11.                                           */
+/*                                                                         */
+/*  Copyright 2002, 2003, 2004, 2006, 2007 by                              */
+/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
+/*                                                                         */
+/*  This file is part of the FreeType project, and may only be used,       */
+/*  modified, and distributed under the terms of the FreeType project      */
+/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
+/*  this file you indicate that you have read the license and              */
+/*  understand and accept it fully.                                        */
+/*                                                                         */
+/***************************************************************************/
+
+
+#ifndef __FTXF86_H__
+#define __FTXF86_H__
+
+#include <ft2build.h>
+#include FT_FREETYPE_H
+
+#ifdef FREETYPE_H
+#error "freetype.h of FreeType 1 has been loaded!"
+#error "Please fix the directory search order for header files"
+#error "so that freetype.h of FreeType 2 is found first."
+#endif
+
+
+FT_BEGIN_HEADER
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Section>                                                             */
+  /*   font_formats                                                        */
+  /*                                                                       */
+  /* <Title>                                                               */
+  /*   Font Formats                                                        */
+  /*                                                                       */
+  /* <Abstract>                                                            */
+  /*   Getting the font format.                                            */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*   The single function in this section can be used to get the font     */
+  /*   format.  Note that this information is not needed normally;         */
+  /*   however, there are special cases (like in PDF devices) where it is  */
+  /*   important to differentiate, in spite of FreeType's uniform API.     */
+  /*                                                                       */
+  /*************************************************************************/
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*   FT_Get_X11_Font_Format                                              */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*   Return a string describing the format of a given face, using values */
+  /*   which can be used as an X11 FONT_PROPERTY.  Possible values are     */
+  /*   `TrueType', `Type 1', `BDF', `PCF', `Type 42', `CID Type 1', `CFF', */
+  /*   `PFR', and `Windows FNT'.                                           */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*   face ::                                                             */
+  /*     Input face handle.                                                */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*   Font format string.  NULL in case of error.                         */
+  /*                                                                       */
+  FT_EXPORT( const char* )
+  FT_Get_X11_Font_Format( FT_Face  face );
+
+ /* */
+
+FT_END_HEADER
+
+#endif /* __FTXF86_H__ */
diff --git a/include/freetype2/freetype/t1tables.h b/include/freetype2/freetype/t1tables.h
new file mode 100644 (file)
index 0000000..250629d
--- /dev/null
@@ -0,0 +1,450 @@
+/***************************************************************************/
+/*                                                                         */
+/*  t1tables.h                                                             */
+/*                                                                         */
+/*    Basic Type 1/Type 2 tables definitions and interface (specification  */
+/*    only).                                                               */
+/*                                                                         */
+/*  Copyright 1996-2001, 2002, 2003, 2004, 2006 by                         */
+/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
+/*                                                                         */
+/*  This file is part of the FreeType project, and may only be used,       */
+/*  modified, and distributed under the terms of the FreeType project      */
+/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
+/*  this file you indicate that you have read the license and              */
+/*  understand and accept it fully.                                        */
+/*                                                                         */
+/***************************************************************************/
+
+
+#ifndef __T1TABLES_H__
+#define __T1TABLES_H__
+
+
+#include <ft2build.h>
+#include FT_FREETYPE_H
+
+#ifdef FREETYPE_H
+#error "freetype.h of FreeType 1 has been loaded!"
+#error "Please fix the directory search order for header files"
+#error "so that freetype.h of FreeType 2 is found first."
+#endif
+
+
+FT_BEGIN_HEADER
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Section>                                                             */
+  /*    type1_tables                                                       */
+  /*                                                                       */
+  /* <Title>                                                               */
+  /*    Type 1 Tables                                                      */
+  /*                                                                       */
+  /* <Abstract>                                                            */
+  /*    Type 1 (PostScript) specific font tables.                          */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    This section contains the definition of Type 1-specific tables,    */
+  /*    including structures related to other PostScript font formats.     */
+  /*                                                                       */
+  /*************************************************************************/
+
+
+  /* Note that we separate font data in PS_FontInfoRec and PS_PrivateRec */
+  /* structures in order to support Multiple Master fonts.               */
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Struct>                                                              */
+  /*    PS_FontInfoRec                                                     */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A structure used to model a Type1/Type2 FontInfo dictionary.  Note */
+  /*    that for Multiple Master fonts, each instance has its own          */
+  /*    FontInfo dictionary.                                               */
+  /*                                                                       */
+  typedef struct  PS_FontInfoRec
+  {
+    FT_String*  version;
+    FT_String*  notice;
+    FT_String*  full_name;
+    FT_String*  family_name;
+    FT_String*  weight;
+    FT_Long     italic_angle;
+    FT_Bool     is_fixed_pitch;
+    FT_Short    underline_position;
+    FT_UShort   underline_thickness;
+
+  } PS_FontInfoRec, *PS_FontInfo;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Struct>                                                              */
+  /*    T1_FontInfo                                                        */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    This type is equivalent to @PS_FontInfoRec.  It is deprecated but  */
+  /*    kept to maintain source compatibility between various versions of  */
+  /*    FreeType.                                                          */
+  /*                                                                       */
+  typedef PS_FontInfoRec  T1_FontInfo;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Struct>                                                              */
+  /*    PS_PrivateRec                                                      */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A structure used to model a Type1/Type2 private dictionary.  Note  */
+  /*    that for Multiple Master fonts, each instance has its own Private  */
+  /*    dictionary.                                                        */
+  /*                                                                       */
+  typedef struct  PS_PrivateRec_
+  {
+    FT_Int     unique_id;
+    FT_Int     lenIV;
+
+    FT_Byte    num_blue_values;
+    FT_Byte    num_other_blues;
+    FT_Byte    num_family_blues;
+    FT_Byte    num_family_other_blues;
+
+    FT_Short   blue_values[14];
+    FT_Short   other_blues[10];
+
+    FT_Short   family_blues      [14];
+    FT_Short   family_other_blues[10];
+
+    FT_Fixed   blue_scale;
+    FT_Int     blue_shift;
+    FT_Int     blue_fuzz;
+
+    FT_UShort  standard_width[1];
+    FT_UShort  standard_height[1];
+
+    FT_Byte    num_snap_widths;
+    FT_Byte    num_snap_heights;
+    FT_Bool    force_bold;
+    FT_Bool    round_stem_up;
+
+    FT_Short   snap_widths [13];  /* including std width  */
+    FT_Short   snap_heights[13];  /* including std height */
+
+    FT_Fixed   expansion_factor;
+
+    FT_Long    language_group;
+    FT_Long    password;
+
+    FT_Short   min_feature[2];
+
+  } PS_PrivateRec, *PS_Private;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Struct>                                                              */
+  /*    T1_Private                                                         */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*   This type is equivalent to @PS_PrivateRec.  It is deprecated but    */
+  /*   kept to maintain source compatibility between various versions of   */
+  /*   FreeType.                                                           */
+  /*                                                                       */
+  typedef PS_PrivateRec  T1_Private;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Enum>                                                                */
+  /*    T1_Blend_Flags                                                     */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A set of flags used to indicate which fields are present in a      */
+  /*    given blend dictionary (font info or private).  Used to support    */
+  /*    Multiple Masters fonts.                                            */
+  /*                                                                       */
+  typedef enum
+  {
+    /*# required fields in a FontInfo blend dictionary */
+    T1_BLEND_UNDERLINE_POSITION = 0,
+    T1_BLEND_UNDERLINE_THICKNESS,
+    T1_BLEND_ITALIC_ANGLE,
+
+    /*# required fields in a Private blend dictionary */
+    T1_BLEND_BLUE_VALUES,
+    T1_BLEND_OTHER_BLUES,
+    T1_BLEND_STANDARD_WIDTH,
+    T1_BLEND_STANDARD_HEIGHT,
+    T1_BLEND_STEM_SNAP_WIDTHS,
+    T1_BLEND_STEM_SNAP_HEIGHTS,
+    T1_BLEND_BLUE_SCALE,
+    T1_BLEND_BLUE_SHIFT,
+    T1_BLEND_FAMILY_BLUES,
+    T1_BLEND_FAMILY_OTHER_BLUES,
+    T1_BLEND_FORCE_BOLD,
+
+    /*# never remove */
+    T1_BLEND_MAX
+
+  } T1_Blend_Flags;
+
+  /* */
+
+
+  /*# backwards compatible definitions */
+#define t1_blend_underline_position   T1_BLEND_UNDERLINE_POSITION
+#define t1_blend_underline_thickness  T1_BLEND_UNDERLINE_THICKNESS
+#define t1_blend_italic_angle         T1_BLEND_ITALIC_ANGLE
+#define t1_blend_blue_values          T1_BLEND_BLUE_VALUES
+#define t1_blend_other_blues          T1_BLEND_OTHER_BLUES
+#define t1_blend_standard_widths      T1_BLEND_STANDARD_WIDTH
+#define t1_blend_standard_height      T1_BLEND_STANDARD_HEIGHT
+#define t1_blend_stem_snap_widths     T1_BLEND_STEM_SNAP_WIDTHS
+#define t1_blend_stem_snap_heights    T1_BLEND_STEM_SNAP_HEIGHTS
+#define t1_blend_blue_scale           T1_BLEND_BLUE_SCALE
+#define t1_blend_blue_shift           T1_BLEND_BLUE_SHIFT
+#define t1_blend_family_blues         T1_BLEND_FAMILY_BLUES
+#define t1_blend_family_other_blues   T1_BLEND_FAMILY_OTHER_BLUES
+#define t1_blend_force_bold           T1_BLEND_FORCE_BOLD
+#define t1_blend_max                  T1_BLEND_MAX
+
+
+  /* maximum number of Multiple Masters designs, as defined in the spec */
+#define T1_MAX_MM_DESIGNS     16
+
+  /* maximum number of Multiple Masters axes, as defined in the spec */
+#define T1_MAX_MM_AXIS        4
+
+  /* maximum number of elements in a design map */
+#define T1_MAX_MM_MAP_POINTS  20
+
+
+  /* this structure is used to store the BlendDesignMap entry for an axis */
+  typedef struct  PS_DesignMap_
+  {
+    FT_Byte    num_points;
+    FT_Long*   design_points;
+    FT_Fixed*  blend_points;
+
+  } PS_DesignMapRec, *PS_DesignMap;
+
+  /* backwards-compatible definition */
+  typedef PS_DesignMapRec  T1_DesignMap;
+
+
+  typedef struct  PS_BlendRec_
+  {
+    FT_UInt          num_designs;
+    FT_UInt          num_axis;
+
+    FT_String*       axis_names[T1_MAX_MM_AXIS];
+    FT_Fixed*        design_pos[T1_MAX_MM_DESIGNS];
+    PS_DesignMapRec  design_map[T1_MAX_MM_AXIS];
+
+    FT_Fixed*        weight_vector;
+    FT_Fixed*        default_weight_vector;
+
+    PS_FontInfo      font_infos[T1_MAX_MM_DESIGNS + 1];
+    PS_Private       privates  [T1_MAX_MM_DESIGNS + 1];
+
+    FT_ULong         blend_bitflags;
+
+    FT_BBox*         bboxes    [T1_MAX_MM_DESIGNS + 1];
+
+    /* since 2.3.0 */
+
+    /* undocumented, optional: the default design instance;   */
+    /* corresponds to default_weight_vector --                */
+    /* num_default_design_vector == 0 means it is not present */
+    /* in the font and associated metrics files               */
+    FT_UInt          default_design_vector[T1_MAX_MM_DESIGNS];
+    FT_UInt          num_default_design_vector;
+
+  } PS_BlendRec, *PS_Blend;
+
+
+  /* backwards-compatible definition */
+  typedef PS_BlendRec  T1_Blend;
+
+
+  typedef struct  CID_FaceDictRec_
+  {
+    PS_PrivateRec  private_dict;
+
+    FT_UInt        len_buildchar;
+    FT_Fixed       forcebold_threshold;
+    FT_Pos         stroke_width;
+    FT_Fixed       expansion_factor;
+
+    FT_Byte        paint_type;
+    FT_Byte        font_type;
+    FT_Matrix      font_matrix;
+    FT_Vector      font_offset;
+
+    FT_UInt        num_subrs;
+    FT_ULong       subrmap_offset;
+    FT_Int         sd_bytes;
+
+  } CID_FaceDictRec, *CID_FaceDict;
+
+
+  /* backwards-compatible definition */
+  typedef CID_FaceDictRec  CID_FontDict;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Struct>                                                              */
+  /*    CID_FaceInfoRec                                                    */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A structure used to represent CID Face information.                */
+  /*                                                                       */
+  typedef struct  CID_FaceInfoRec_
+  {
+    FT_String*      cid_font_name;
+    FT_Fixed        cid_version;
+    FT_Int          cid_font_type;
+
+    FT_String*      registry;
+    FT_String*      ordering;
+    FT_Int          supplement;
+
+    PS_FontInfoRec  font_info;
+    FT_BBox         font_bbox;
+    FT_ULong        uid_base;
+
+    FT_Int          num_xuid;
+    FT_ULong        xuid[16];
+
+    FT_ULong        cidmap_offset;
+    FT_Int          fd_bytes;
+    FT_Int          gd_bytes;
+    FT_ULong        cid_count;
+
+    FT_Int          num_dicts;
+    CID_FaceDict    font_dicts;
+
+    FT_ULong        data_offset;
+
+  } CID_FaceInfoRec, *CID_FaceInfo;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Struct>                                                              */
+  /*    CID_Info                                                           */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*   This type is equivalent to @CID_FaceInfoRec.  It is deprecated but  */
+  /*   kept to maintain source compatibility between various versions of   */
+  /*   FreeType.                                                           */
+  /*                                                                       */
+  typedef CID_FaceInfoRec  CID_Info;
+
+  /* */
+
+
+ /************************************************************************
+  *
+  * @function:
+  *    FT_Has_PS_Glyph_Names
+  *
+  * @description:
+  *    Return true if a given face provides reliable Postscript glyph
+  *    names.  This is similar to using the @FT_HAS_GLYPH_NAMES macro,
+  *    except that certain fonts (mostly TrueType) contain incorrect
+  *    glyph name tables.
+  *
+  *    When this function returns true, the caller is sure that the glyph
+  *    names returned by @FT_Get_Glyph_Name are reliable.
+  *
+  * @input:
+  *    face ::
+  *       face handle
+  *
+  * @return:
+  *    Boolean.  True if glyph names are reliable.
+  */
+  FT_EXPORT( FT_Int )
+  FT_Has_PS_Glyph_Names( FT_Face  face );
+
+
+ /************************************************************************
+  *
+  * @function:
+  *    FT_Get_PS_Font_Info
+  *
+  * @description:
+  *    Retrieve the @PS_FontInfoRec structure corresponding to a given
+  *    Postscript font.
+  *
+  * @input:
+  *    face ::
+  *       Postscript face handle.
+  *
+  * @output:
+  *    afont_info ::
+  *       Output font info structure pointer.
+  *
+  * @return:
+  *    FreeType error code.  0 means success.
+  *
+  * @note:
+  *    The string pointers within the font info structure are owned by
+  *    the face and don't need to be freed by the caller.
+  *
+  *    If the font's format is not Postscript-based, this function will
+  *    return the `FT_Err_Invalid_Argument' error code.
+  */
+  FT_EXPORT( FT_Error )
+  FT_Get_PS_Font_Info( FT_Face          face,
+                       PS_FontInfoRec  *afont_info );
+
+
+ /************************************************************************
+  *
+  * @function:
+  *    FT_Get_PS_Font_Private
+  *
+  * @description:
+  *    Retrieve the @PS_PrivateRec structure corresponding to a given
+  *    Postscript font.
+  *
+  * @input:
+  *    face ::
+  *       Postscript face handle.
+  *
+  * @output:
+  *    afont_private ::
+  *       Output private dictionary structure pointer.
+  *
+  * @return:
+  *    FreeType error code.  0 means success.
+  *
+  * @note:
+  *    The string pointers within the font info structure are owned by
+  *    the face and don't need to be freed by the caller.
+  *
+  *    If the font's format is not Postscript-based, this function will
+  *    return the `FT_Err_Invalid_Argument' error code.
+  */
+  FT_EXPORT( FT_Error )
+  FT_Get_PS_Font_Private( FT_Face         face,
+                          PS_PrivateRec  *afont_private );
+
+ /* */
+
+
+
+FT_END_HEADER
+
+#endif /* __T1TABLES_H__ */
+
+
+/* END */
diff --git a/include/freetype2/freetype/ttnameid.h b/include/freetype2/freetype/ttnameid.h
new file mode 100644 (file)
index 0000000..b9acbda
--- /dev/null
@@ -0,0 +1,1132 @@
+/***************************************************************************/
+/*                                                                         */
+/*  ttnameid.h                                                             */
+/*                                                                         */
+/*    TrueType name ID definitions (specification only).                   */
+/*                                                                         */
+/*  Copyright 1996-2002, 2003, 2004, 2006, 2007 by                         */
+/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
+/*                                                                         */
+/*  This file is part of the FreeType project, and may only be used,       */
+/*  modified, and distributed under the terms of the FreeType project      */
+/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
+/*  this file you indicate that you have read the license and              */
+/*  understand and accept it fully.                                        */
+/*                                                                         */
+/***************************************************************************/
+
+
+#ifndef __TTNAMEID_H__
+#define __TTNAMEID_H__
+
+
+#include <ft2build.h>
+
+
+FT_BEGIN_HEADER
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* Possible values for the `platform' identifier code in the name        */
+  /* records of the TTF `name' table.                                      */
+  /*                                                                       */
+  /*************************************************************************/
+
+
+  /***********************************************************************
+   *
+   * @enum:
+   *   TT_PLATFORM_XXX
+   *
+   * @description:
+   *   A list of valid values for the `platform_id' identifier code in
+   *   @FT_CharMapRec and @FT_SfntName structures.
+   *
+   * @values:
+   *   TT_PLATFORM_APPLE_UNICODE ::
+   *     Used by Apple to indicate a Unicode character map and/or name entry.
+   *     See @TT_APPLE_ID_XXX for corresponding `encoding_id' values.  Note
+   *     that name entries in this format are coded as big-endian UCS-2
+   *     character codes _only_.
+   *
+   *   TT_PLATFORM_MACINTOSH ::
+   *     Used by Apple to indicate a MacOS-specific charmap and/or name entry.
+   *     See @TT_MAC_ID_XXX for corresponding `encoding_id' values.  Note that
+   *     most TrueType fonts contain an Apple roman charmap to be usable on
+   *     MacOS systems (even if they contain a Microsoft charmap as well).
+   *
+   *   TT_PLATFORM_ISO ::
+   *     This value was used to specify Unicode charmaps.  It is however
+   *     now deprecated.  See @TT_ISO_ID_XXX for a list of corresponding
+   *     `encoding_id' values.
+   *
+   *   TT_PLATFORM_MICROSOFT ::
+   *     Used by Microsoft to indicate Windows-specific charmaps.  See
+   *     @TT_MS_ID_XXX for a list of corresponding `encoding_id' values.
+   *     Note that most fonts contain a Unicode charmap using
+   *     (TT_PLATFORM_MICROSOFT, @TT_MS_ID_UNICODE_CS).
+   *
+   *   TT_PLATFORM_CUSTOM ::
+   *     Used to indicate application-specific charmaps.
+   *
+   *   TT_PLATFORM_ADOBE ::
+   *     This value isn't part of any font format specification, but is used
+   *     by FreeType to report Adobe-specific charmaps in an @FT_CharMapRec
+   *     structure.  See @TT_ADOBE_ID_XXX.
+   */
+
+#define TT_PLATFORM_APPLE_UNICODE  0
+#define TT_PLATFORM_MACINTOSH      1
+#define TT_PLATFORM_ISO            2 /* deprecated */
+#define TT_PLATFORM_MICROSOFT      3
+#define TT_PLATFORM_CUSTOM         4
+#define TT_PLATFORM_ADOBE          7 /* artificial */
+
+
+  /***********************************************************************
+   *
+   * @enum:
+   *   TT_APPLE_ID_XXX
+   *
+   * @description:
+   *   A list of valid values for the `encoding_id' for
+   *   @TT_PLATFORM_APPLE_UNICODE charmaps and name entries.
+   *
+   * @values:
+   *   TT_APPLE_ID_DEFAULT ::
+   *     Unicode version 1.0.
+   *
+   *   TT_APPLE_ID_UNICODE_1_1 ::
+   *     Unicode 1.1; specifies Hangul characters starting at U+34xx.
+   *
+   *   TT_APPLE_ID_ISO_10646 ::
+   *     Deprecated (identical to preceding).
+   *
+   *   TT_APPLE_ID_UNICODE_2_0 ::
+   *     Unicode 2.0 and beyond (UTF-16 BMP only).
+   *
+   *   TT_APPLE_ID_UNICODE_32 ::
+   *     Unicode 3.1 and beyond, using UTF-32.
+   */
+
+#define TT_APPLE_ID_DEFAULT      0 /* Unicode 1.0 */
+#define TT_APPLE_ID_UNICODE_1_1  1 /* specify Hangul at U+34xx */
+#define TT_APPLE_ID_ISO_10646    2 /* deprecated */
+#define TT_APPLE_ID_UNICODE_2_0  3 /* or later */
+#define TT_APPLE_ID_UNICODE_32   4 /* 2.0 or later, full repertoire */
+
+
+  /***********************************************************************
+   *
+   * @enum:
+   *   TT_MAC_ID_XXX
+   *
+   * @description:
+   *   A list of valid values for the `encoding_id' for
+   *   @TT_PLATFORM_MACINTOSH charmaps and name entries.
+   *
+   * @values:
+   *   TT_MAC_ID_ROMAN ::
+   *   TT_MAC_ID_JAPANESE ::
+   *   TT_MAC_ID_TRADITIONAL_CHINESE ::
+   *   TT_MAC_ID_KOREAN ::
+   *   TT_MAC_ID_ARABIC ::
+   *   TT_MAC_ID_HEBREW ::
+   *   TT_MAC_ID_GREEK ::
+   *   TT_MAC_ID_RUSSIAN ::
+   *   TT_MAC_ID_RSYMBOL ::
+   *   TT_MAC_ID_DEVANAGARI ::
+   *   TT_MAC_ID_GURMUKHI ::
+   *   TT_MAC_ID_GUJARATI ::
+   *   TT_MAC_ID_ORIYA ::
+   *   TT_MAC_ID_BENGALI ::
+   *   TT_MAC_ID_TAMIL ::
+   *   TT_MAC_ID_TELUGU ::
+   *   TT_MAC_ID_KANNADA ::
+   *   TT_MAC_ID_MALAYALAM ::
+   *   TT_MAC_ID_SINHALESE ::
+   *   TT_MAC_ID_BURMESE ::
+   *   TT_MAC_ID_KHMER ::
+   *   TT_MAC_ID_THAI ::
+   *   TT_MAC_ID_LAOTIAN ::
+   *   TT_MAC_ID_GEORGIAN ::
+   *   TT_MAC_ID_ARMENIAN ::
+   *   TT_MAC_ID_MALDIVIAN ::
+   *   TT_MAC_ID_SIMPLIFIED_CHINESE ::
+   *   TT_MAC_ID_TIBETAN ::
+   *   TT_MAC_ID_MONGOLIAN ::
+   *   TT_MAC_ID_GEEZ ::
+   *   TT_MAC_ID_SLAVIC ::
+   *   TT_MAC_ID_VIETNAMESE ::
+   *   TT_MAC_ID_SINDHI ::
+   *   TT_MAC_ID_UNINTERP ::
+   */
+
+#define TT_MAC_ID_ROMAN                 0
+#define TT_MAC_ID_JAPANESE              1
+#define TT_MAC_ID_TRADITIONAL_CHINESE   2
+#define TT_MAC_ID_KOREAN                3
+#define TT_MAC_ID_ARABIC                4
+#define TT_MAC_ID_HEBREW                5
+#define TT_MAC_ID_GREEK                 6
+#define TT_MAC_ID_RUSSIAN               7
+#define TT_MAC_ID_RSYMBOL               8
+#define TT_MAC_ID_DEVANAGARI            9
+#define TT_MAC_ID_GURMUKHI             10
+#define TT_MAC_ID_GUJARATI             11
+#define TT_MAC_ID_ORIYA                12
+#define TT_MAC_ID_BENGALI              13
+#define TT_MAC_ID_TAMIL                14
+#define TT_MAC_ID_TELUGU               15
+#define TT_MAC_ID_KANNADA              16
+#define TT_MAC_ID_MALAYALAM            17
+#define TT_MAC_ID_SINHALESE            18
+#define TT_MAC_ID_BURMESE              19
+#define TT_MAC_ID_KHMER                20
+#define TT_MAC_ID_THAI                 21
+#define TT_MAC_ID_LAOTIAN              22
+#define TT_MAC_ID_GEORGIAN             23
+#define TT_MAC_ID_ARMENIAN             24
+#define TT_MAC_ID_MALDIVIAN            25
+#define TT_MAC_ID_SIMPLIFIED_CHINESE   25
+#define TT_MAC_ID_TIBETAN              26
+#define TT_MAC_ID_MONGOLIAN            27
+#define TT_MAC_ID_GEEZ                 28
+#define TT_MAC_ID_SLAVIC               29
+#define TT_MAC_ID_VIETNAMESE           30
+#define TT_MAC_ID_SINDHI               31
+#define TT_MAC_ID_UNINTERP             32
+
+
+  /***********************************************************************
+   *
+   * @enum:
+   *   TT_ISO_ID_XXX
+   *
+   * @description:
+   *   A list of valid values for the `encoding_id' for
+   *   @TT_PLATFORM_ISO charmaps and name entries.
+   *
+   *   Their use is now deprecated.
+   *
+   * @values:
+   *   TT_ISO_ID_7BIT_ASCII ::
+   *     ASCII.
+   *   TT_ISO_ID_10646 ::
+   *     ISO/10646.
+   *   TT_ISO_ID_8859_1 ::
+   *     Also known as Latin-1.
+   */
+
+#define TT_ISO_ID_7BIT_ASCII  0
+#define TT_ISO_ID_10646       1
+#define TT_ISO_ID_8859_1      2
+
+
+  /***********************************************************************
+   *
+   * @enum:
+   *   TT_MS_ID_XXX
+   *
+   * @description:
+   *   A list of valid values for the `encoding_id' for
+   *   @TT_PLATFORM_MICROSOFT charmaps and name entries.
+   *
+   * @values:
+   *   TT_MS_ID_SYMBOL_CS ::
+   *     Corresponds to Microsoft symbol encoding. See
+   *     @FT_ENCODING_MS_SYMBOL.
+   *
+   *   TT_MS_ID_UNICODE_CS ::
+   *     Corresponds to a Microsoft WGL4 charmap, matching Unicode.  See
+   *     @FT_ENCODING_UNICODE.
+   *
+   *   TT_MS_ID_SJIS ::
+   *     Corresponds to SJIS Japanese encoding.  See @FT_ENCODING_SJIS.
+   *
+   *   TT_MS_ID_GB2312 ::
+   *     Corresponds to Simplified Chinese as used in Mainland China.  See
+   *     @FT_ENCODING_GB2312.
+   *
+   *   TT_MS_ID_BIG_5 ::
+   *     Corresponds to Traditional Chinese as used in Taiwan and Hong Kong.
+   *     See @FT_ENCODING_BIG5.
+   *
+   *   TT_MS_ID_WANSUNG ::
+   *     Corresponds to Korean Wansung encoding.  See @FT_ENCODING_WANSUNG.
+   *
+   *   TT_MS_ID_JOHAB ::
+   *     Corresponds to Johab encoding.  See @FT_ENCODING_JOHAB.
+   *
+   *   TT_MS_ID_UCS_4 ::
+   *     Corresponds to UCS-4 or UTF-32 charmaps.  This has been added to
+   *     the OpenType specification version 1.4 (mid-2001.)
+   */
+
+#define TT_MS_ID_SYMBOL_CS    0
+#define TT_MS_ID_UNICODE_CS   1
+#define TT_MS_ID_SJIS         2
+#define TT_MS_ID_GB2312       3
+#define TT_MS_ID_BIG_5        4
+#define TT_MS_ID_WANSUNG      5
+#define TT_MS_ID_JOHAB        6
+#define TT_MS_ID_UCS_4       10
+
+
+  /***********************************************************************
+   *
+   * @enum:
+   *   TT_ADOBE_ID_XXX
+   *
+   * @description:
+   *   A list of valid values for the `encoding_id' for
+   *   @TT_PLATFORM_ADOBE charmaps.  This is a FreeType-specific extension!
+   *
+   * @values:
+   *   TT_ADOBE_ID_STANDARD ::
+   *     Adobe standard encoding.
+   *   TT_ADOBE_ID_EXPERT ::
+   *     Adobe expert encoding.
+   *   TT_ADOBE_ID_CUSTOM ::
+   *     Adobe custom encoding.
+   */
+
+#define TT_ADOBE_ID_STANDARD  0
+#define TT_ADOBE_ID_EXPERT    1
+#define TT_ADOBE_ID_CUSTOM    2
+#define TT_ADOBE_ID_LATIN_1   3
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* Possible values of the language identifier field in the name records  */
+  /* of the TTF `name' table if the `platform' identifier code is          */
+  /* TT_PLATFORM_MACINTOSH.                                                */
+  /*                                                                       */
+  /* The canonical source for the Apple assigned Language ID's is at       */
+  /*                                                                       */
+  /*   http://fonts.apple.com/TTRefMan/RM06/Chap6name.html                 */
+  /*                                                                       */
+#define TT_MAC_LANGID_ENGLISH                       0
+#define TT_MAC_LANGID_FRENCH                        1
+#define TT_MAC_LANGID_GERMAN                        2
+#define TT_MAC_LANGID_ITALIAN                       3
+#define TT_MAC_LANGID_DUTCH                         4
+#define TT_MAC_LANGID_SWEDISH                       5
+#define TT_MAC_LANGID_SPANISH                       6
+#define TT_MAC_LANGID_DANISH                        7
+#define TT_MAC_LANGID_PORTUGUESE                    8
+#define TT_MAC_LANGID_NORWEGIAN                     9
+#define TT_MAC_LANGID_HEBREW                       10
+#define TT_MAC_LANGID_JAPANESE                     11
+#define TT_MAC_LANGID_ARABIC                       12
+#define TT_MAC_LANGID_FINNISH                      13
+#define TT_MAC_LANGID_GREEK                        14
+#define TT_MAC_LANGID_ICELANDIC                    15
+#define TT_MAC_LANGID_MALTESE                      16
+#define TT_MAC_LANGID_TURKISH                      17
+#define TT_MAC_LANGID_CROATIAN                     18
+#define TT_MAC_LANGID_CHINESE_TRADITIONAL          19
+#define TT_MAC_LANGID_URDU                         20
+#define TT_MAC_LANGID_HINDI                        21
+#define TT_MAC_LANGID_THAI                         22
+#define TT_MAC_LANGID_KOREAN                       23
+#define TT_MAC_LANGID_LITHUANIAN                   24
+#define TT_MAC_LANGID_POLISH                       25
+#define TT_MAC_LANGID_HUNGARIAN                    26
+#define TT_MAC_LANGID_ESTONIAN                     27
+#define TT_MAC_LANGID_LETTISH                      28
+#define TT_MAC_LANGID_SAAMISK                      29
+#define TT_MAC_LANGID_FAEROESE                     30
+#define TT_MAC_LANGID_FARSI                        31
+#define TT_MAC_LANGID_RUSSIAN                      32
+#define TT_MAC_LANGID_CHINESE_SIMPLIFIED           33
+#define TT_MAC_LANGID_FLEMISH                      34
+#define TT_MAC_LANGID_IRISH                        35
+#define TT_MAC_LANGID_ALBANIAN                     36
+#define TT_MAC_LANGID_ROMANIAN                     37
+#define TT_MAC_LANGID_CZECH                        38
+#define TT_MAC_LANGID_SLOVAK                       39
+#define TT_MAC_LANGID_SLOVENIAN                    40
+#define TT_MAC_LANGID_YIDDISH                      41
+#define TT_MAC_LANGID_SERBIAN                      42
+#define TT_MAC_LANGID_MACEDONIAN                   43
+#define TT_MAC_LANGID_BULGARIAN                    44
+#define TT_MAC_LANGID_UKRAINIAN                    45
+#define TT_MAC_LANGID_BYELORUSSIAN                 46
+#define TT_MAC_LANGID_UZBEK                        47
+#define TT_MAC_LANGID_KAZAKH                       48
+#define TT_MAC_LANGID_AZERBAIJANI                  49
+#define TT_MAC_LANGID_AZERBAIJANI_CYRILLIC_SCRIPT  49
+#define TT_MAC_LANGID_AZERBAIJANI_ARABIC_SCRIPT    50
+#define TT_MAC_LANGID_ARMENIAN                     51
+#define TT_MAC_LANGID_GEORGIAN                     52
+#define TT_MAC_LANGID_MOLDAVIAN                    53
+#define TT_MAC_LANGID_KIRGHIZ                      54
+#define TT_MAC_LANGID_TAJIKI                       55
+#define TT_MAC_LANGID_TURKMEN                      56
+#define TT_MAC_LANGID_MONGOLIAN                    57
+#define TT_MAC_LANGID_MONGOLIAN_MONGOLIAN_SCRIPT   57
+#define TT_MAC_LANGID_MONGOLIAN_CYRILLIC_SCRIPT    58
+#define TT_MAC_LANGID_PASHTO                       59
+#define TT_MAC_LANGID_KURDISH                      60
+#define TT_MAC_LANGID_KASHMIRI                     61
+#define TT_MAC_LANGID_SINDHI                       62
+#define TT_MAC_LANGID_TIBETAN                      63
+#define TT_MAC_LANGID_NEPALI                       64
+#define TT_MAC_LANGID_SANSKRIT                     65
+#define TT_MAC_LANGID_MARATHI                      66
+#define TT_MAC_LANGID_BENGALI                      67
+#define TT_MAC_LANGID_ASSAMESE                     68
+#define TT_MAC_LANGID_GUJARATI                     69
+#define TT_MAC_LANGID_PUNJABI                      70
+#define TT_MAC_LANGID_ORIYA                        71
+#define TT_MAC_LANGID_MALAYALAM                    72
+#define TT_MAC_LANGID_KANNADA                      73
+#define TT_MAC_LANGID_TAMIL                        74
+#define TT_MAC_LANGID_TELUGU                       75
+#define TT_MAC_LANGID_SINHALESE                    76
+#define TT_MAC_LANGID_BURMESE                      77
+#define TT_MAC_LANGID_KHMER                        78
+#define TT_MAC_LANGID_LAO                          79
+#define TT_MAC_LANGID_VIETNAMESE                   80
+#define TT_MAC_LANGID_INDONESIAN                   81
+#define TT_MAC_LANGID_TAGALOG                      82
+#define TT_MAC_LANGID_MALAY_ROMAN_SCRIPT           83
+#define TT_MAC_LANGID_MALAY_ARABIC_SCRIPT          84
+#define TT_MAC_LANGID_AMHARIC                      85
+#define TT_MAC_LANGID_TIGRINYA                     86
+#define TT_MAC_LANGID_GALLA                        87
+#define TT_MAC_LANGID_SOMALI                       88
+#define TT_MAC_LANGID_SWAHILI                      89
+#define TT_MAC_LANGID_RUANDA                       90
+#define TT_MAC_LANGID_RUNDI                        91
+#define TT_MAC_LANGID_CHEWA                        92
+#define TT_MAC_LANGID_MALAGASY                     93
+#define TT_MAC_LANGID_ESPERANTO                    94
+#define TT_MAC_LANGID_WELSH                       128
+#define TT_MAC_LANGID_BASQUE                      129
+#define TT_MAC_LANGID_CATALAN                     130
+#define TT_MAC_LANGID_LATIN                       131
+#define TT_MAC_LANGID_QUECHUA                     132
+#define TT_MAC_LANGID_GUARANI                     133
+#define TT_MAC_LANGID_AYMARA                      134
+#define TT_MAC_LANGID_TATAR                       135
+#define TT_MAC_LANGID_UIGHUR                      136
+#define TT_MAC_LANGID_DZONGKHA                    137
+#define TT_MAC_LANGID_JAVANESE                    138
+#define TT_MAC_LANGID_SUNDANESE                   139
+
+
+#if 0  /* these seem to be errors that have been dropped */
+
+#define TT_MAC_LANGID_SCOTTISH_GAELIC             140
+#define TT_MAC_LANGID_IRISH_GAELIC                141
+
+#endif
+
+
+  /* The following codes are new as of 2000-03-10 */
+#define TT_MAC_LANGID_GALICIAN                    140
+#define TT_MAC_LANGID_AFRIKAANS                   141
+#define TT_MAC_LANGID_BRETON                      142
+#define TT_MAC_LANGID_INUKTITUT                   143
+#define TT_MAC_LANGID_SCOTTISH_GAELIC             144
+#define TT_MAC_LANGID_MANX_GAELIC                 145
+#define TT_MAC_LANGID_IRISH_GAELIC                146
+#define TT_MAC_LANGID_TONGAN                      147
+#define TT_MAC_LANGID_GREEK_POLYTONIC             148
+#define TT_MAC_LANGID_GREELANDIC                  149
+#define TT_MAC_LANGID_AZERBAIJANI_ROMAN_SCRIPT    150
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* Possible values of the language identifier field in the name records  */
+  /* of the TTF `name' table if the `platform' identifier code is          */
+  /* TT_PLATFORM_MICROSOFT.                                                */
+  /*                                                                       */
+  /* The canonical source for the MS assigned LCID's (seems to) be at      */
+  /*                                                                       */
+  /*   http://www.microsoft.com/globaldev/reference/lcid-all.mspx          */
+  /*                                                                       */
+  /* It used to be at various places, among them                           */
+  /*                                                                       */
+  /*   http://www.microsoft.com/typography/OTSPEC/lcid-cp.txt              */
+  /*   http://www.microsoft.com/globaldev/reference/loclanghome.asp        */
+  /*   http://support.microsoft.com/support/kb/articles/Q224/8/04.ASP      */
+  /*   http://msdn.microsoft.com/library/en-us/passport25/                 */
+  /*           NET_Passport_VBScript_Documentation/Single_Sign_In/         */
+  /*           Advanced_Single_Sign_In/Localization_and_LCIDs.asp          */
+  /*                                                                       */
+  /* Hopefully, it seems now that the Globaldev site prevails...           */
+  /*                                   (updated by Antoine, 2004-02-17)    */
+
+#define TT_MS_LANGID_ARABIC_GENERAL                    0x0001
+#define TT_MS_LANGID_ARABIC_SAUDI_ARABIA               0x0401
+#define TT_MS_LANGID_ARABIC_IRAQ                       0x0801
+#define TT_MS_LANGID_ARABIC_EGYPT                      0x0c01
+#define TT_MS_LANGID_ARABIC_LIBYA                      0x1001
+#define TT_MS_LANGID_ARABIC_ALGERIA                    0x1401
+#define TT_MS_LANGID_ARABIC_MOROCCO                    0x1801
+#define TT_MS_LANGID_ARABIC_TUNISIA                    0x1c01
+#define TT_MS_LANGID_ARABIC_OMAN                       0x2001
+#define TT_MS_LANGID_ARABIC_YEMEN                      0x2401
+#define TT_MS_LANGID_ARABIC_SYRIA                      0x2801
+#define TT_MS_LANGID_ARABIC_JORDAN                     0x2c01
+#define TT_MS_LANGID_ARABIC_LEBANON                    0x3001
+#define TT_MS_LANGID_ARABIC_KUWAIT                     0x3401
+#define TT_MS_LANGID_ARABIC_UAE                        0x3801
+#define TT_MS_LANGID_ARABIC_BAHRAIN                    0x3c01
+#define TT_MS_LANGID_ARABIC_QATAR                      0x4001
+#define TT_MS_LANGID_BULGARIAN_BULGARIA                0x0402
+#define TT_MS_LANGID_CATALAN_SPAIN                     0x0403
+#define TT_MS_LANGID_CHINESE_GENERAL                   0x0004
+#define TT_MS_LANGID_CHINESE_TAIWAN                    0x0404
+#define TT_MS_LANGID_CHINESE_PRC                       0x0804
+#define TT_MS_LANGID_CHINESE_HONG_KONG                 0x0c04
+#define TT_MS_LANGID_CHINESE_SINGAPORE                 0x1004
+
+#if 1  /* this looks like the correct value */
+#define TT_MS_LANGID_CHINESE_MACAU                     0x1404
+#else  /* but beware, Microsoft may change its mind...
+          the most recent Word reference has the following: */
+#define TT_MS_LANGID_CHINESE_MACAU  TT_MS_LANGID_CHINESE_HONG_KONG
+#endif
+
+#if 0  /* used only with .NET `cultures'; commented out */
+#define TT_MS_LANGID_CHINESE_TRADITIONAL               0x7C04
+#endif
+
+#define TT_MS_LANGID_CZECH_CZECH_REPUBLIC              0x0405
+#define TT_MS_LANGID_DANISH_DENMARK                    0x0406
+#define TT_MS_LANGID_GERMAN_GERMANY                    0x0407
+#define TT_MS_LANGID_GERMAN_SWITZERLAND                0x0807
+#define TT_MS_LANGID_GERMAN_AUSTRIA                    0x0c07
+#define TT_MS_LANGID_GERMAN_LUXEMBOURG                 0x1007
+#define TT_MS_LANGID_GERMAN_LIECHTENSTEI               0x1407
+#define TT_MS_LANGID_GREEK_GREECE                      0x0408
+
+  /* don't ask what this one means... It is commented out currently. */
+#if 0
+#define TT_MS_LANGID_GREEK_GREECE2                     0x2008
+#endif
+
+#define TT_MS_LANGID_ENGLISH_GENERAL                   0x0009
+#define TT_MS_LANGID_ENGLISH_UNITED_STATES             0x0409
+#define TT_MS_LANGID_ENGLISH_UNITED_KINGDOM            0x0809
+#define TT_MS_LANGID_ENGLISH_AUSTRALIA                 0x0c09
+#define TT_MS_LANGID_ENGLISH_CANADA                    0x1009
+#define TT_MS_LANGID_ENGLISH_NEW_ZEALAND               0x1409
+#define TT_MS_LANGID_ENGLISH_IRELAND                   0x1809
+#define TT_MS_LANGID_ENGLISH_SOUTH_AFRICA              0x1c09
+#define TT_MS_LANGID_ENGLISH_JAMAICA                   0x2009
+#define TT_MS_LANGID_ENGLISH_CARIBBEAN                 0x2409
+#define TT_MS_LANGID_ENGLISH_BELIZE                    0x2809
+#define TT_MS_LANGID_ENGLISH_TRINIDAD                  0x2c09
+#define TT_MS_LANGID_ENGLISH_ZIMBABWE                  0x3009
+#define TT_MS_LANGID_ENGLISH_PHILIPPINES               0x3409
+#define TT_MS_LANGID_ENGLISH_INDONESIA                 0x3809
+#define TT_MS_LANGID_ENGLISH_HONG_KONG                 0x3c09
+#define TT_MS_LANGID_ENGLISH_INDIA                     0x4009
+#define TT_MS_LANGID_ENGLISH_MALAYSIA                  0x4409
+#define TT_MS_LANGID_ENGLISH_SINGAPORE                 0x4809
+#define TT_MS_LANGID_SPANISH_SPAIN_TRADITIONAL_SORT    0x040a
+#define TT_MS_LANGID_SPANISH_MEXICO                    0x080a
+#define TT_MS_LANGID_SPANISH_SPAIN_INTERNATIONAL_SORT  0x0c0a
+#define TT_MS_LANGID_SPANISH_GUATEMALA                 0x100a
+#define TT_MS_LANGID_SPANISH_COSTA_RICA                0x140a
+#define TT_MS_LANGID_SPANISH_PANAMA                    0x180a
+#define TT_MS_LANGID_SPANISH_DOMINICAN_REPUBLIC        0x1c0a
+#define TT_MS_LANGID_SPANISH_VENEZUELA                 0x200a
+#define TT_MS_LANGID_SPANISH_COLOMBIA                  0x240a
+#define TT_MS_LANGID_SPANISH_PERU                      0x280a
+#define TT_MS_LANGID_SPANISH_ARGENTINA                 0x2c0a
+#define TT_MS_LANGID_SPANISH_ECUADOR                   0x300a
+#define TT_MS_LANGID_SPANISH_CHILE                     0x340a
+#define TT_MS_LANGID_SPANISH_URUGUAY                   0x380a
+#define TT_MS_LANGID_SPANISH_PARAGUAY                  0x3c0a
+#define TT_MS_LANGID_SPANISH_BOLIVIA                   0x400a
+#define TT_MS_LANGID_SPANISH_EL_SALVADOR               0x440a
+#define TT_MS_LANGID_SPANISH_HONDURAS                  0x480a
+#define TT_MS_LANGID_SPANISH_NICARAGUA                 0x4c0a
+#define TT_MS_LANGID_SPANISH_PUERTO_RICO               0x500a
+#define TT_MS_LANGID_SPANISH_UNITED_STATES             0x540a
+  /* The following ID blatantly violate MS specs by using a */
+  /* sublanguage > 0x1F.                                    */
+#define TT_MS_LANGID_SPANISH_LATIN_AMERICA             0xE40aU
+#define TT_MS_LANGID_FINNISH_FINLAND                   0x040b
+#define TT_MS_LANGID_FRENCH_FRANCE                     0x040c
+#define TT_MS_LANGID_FRENCH_BELGIUM                    0x080c
+#define TT_MS_LANGID_FRENCH_CANADA                     0x0c0c
+#define TT_MS_LANGID_FRENCH_SWITZERLAND                0x100c
+#define TT_MS_LANGID_FRENCH_LUXEMBOURG                 0x140c
+#define TT_MS_LANGID_FRENCH_MONACO                     0x180c
+#define TT_MS_LANGID_FRENCH_WEST_INDIES                0x1c0c
+#define TT_MS_LANGID_FRENCH_REUNION                    0x200c
+#define TT_MS_LANGID_FRENCH_CONGO                      0x240c
+  /* which was formerly: */
+#define TT_MS_LANGID_FRENCH_ZAIRE  TT_MS_LANGID_FRENCH_CONGO
+#define TT_MS_LANGID_FRENCH_SENEGAL                    0x280c
+#define TT_MS_LANGID_FRENCH_CAMEROON                   0x2c0c
+#define TT_MS_LANGID_FRENCH_COTE_D_IVOIRE              0x300c
+#define TT_MS_LANGID_FRENCH_MALI                       0x340c
+#define TT_MS_LANGID_FRENCH_MOROCCO                    0x380c
+#define TT_MS_LANGID_FRENCH_HAITI                      0x3c0c
+  /* and another violation of the spec (see 0xE40aU) */
+#define TT_MS_LANGID_FRENCH_NORTH_AFRICA               0xE40cU
+#define TT_MS_LANGID_HEBREW_ISRAEL                     0x040d
+#define TT_MS_LANGID_HUNGARIAN_HUNGARY                 0x040e
+#define TT_MS_LANGID_ICELANDIC_ICELAND                 0x040f
+#define TT_MS_LANGID_ITALIAN_ITALY                     0x0410
+#define TT_MS_LANGID_ITALIAN_SWITZERLAND               0x0810
+#define TT_MS_LANGID_JAPANESE_JAPAN                    0x0411
+#define TT_MS_LANGID_KOREAN_EXTENDED_WANSUNG_KOREA     0x0412
+#define TT_MS_LANGID_KOREAN_JOHAB_KOREA                0x0812
+#define TT_MS_LANGID_DUTCH_NETHERLANDS                 0x0413
+#define TT_MS_LANGID_DUTCH_BELGIUM                     0x0813
+#define TT_MS_LANGID_NORWEGIAN_NORWAY_BOKMAL           0x0414
+#define TT_MS_LANGID_NORWEGIAN_NORWAY_NYNORSK          0x0814
+#define TT_MS_LANGID_POLISH_POLAND                     0x0415
+#define TT_MS_LANGID_PORTUGUESE_BRAZIL                 0x0416
+#define TT_MS_LANGID_PORTUGUESE_PORTUGAL               0x0816
+#define TT_MS_LANGID_RHAETO_ROMANIC_SWITZERLAND        0x0417
+#define TT_MS_LANGID_ROMANIAN_ROMANIA                  0x0418
+#define TT_MS_LANGID_MOLDAVIAN_MOLDAVIA                0x0818
+#define TT_MS_LANGID_RUSSIAN_RUSSIA                    0x0419
+#define TT_MS_LANGID_RUSSIAN_MOLDAVIA                  0x0819
+#define TT_MS_LANGID_CROATIAN_CROATIA                  0x041a
+#define TT_MS_LANGID_SERBIAN_SERBIA_LATIN              0x081a
+#define TT_MS_LANGID_SERBIAN_SERBIA_CYRILLIC           0x0c1a
+
+#if 0  /* this used to be this value, but it looks like we were wrong */
+#define TT_MS_LANGID_BOSNIAN_BOSNIA_HERZEGOVINA        0x101a
+#else  /* current sources say */
+#define TT_MS_LANGID_CROATIAN_BOSNIA_HERZEGOVINA       0x101a
+#define TT_MS_LANGID_BOSNIAN_BOSNIA_HERZEGOVINA        0x141a
+       /* and XPsp2 Platform SDK added (2004-07-26) */
+       /* Names are shortened to be significant within 40 chars. */
+#define TT_MS_LANGID_SERBIAN_BOSNIA_HERZ_LATIN         0x181a
+#define TT_MS_LANGID_SERBIAN_BOSNIA_HERZ_CYRILLIC      0x181a
+#endif
+
+#define TT_MS_LANGID_SLOVAK_SLOVAKIA                   0x041b
+#define TT_MS_LANGID_ALBANIAN_ALBANIA                  0x041c
+#define TT_MS_LANGID_SWEDISH_SWEDEN                    0x041d
+#define TT_MS_LANGID_SWEDISH_FINLAND                   0x081d
+#define TT_MS_LANGID_THAI_THAILAND                     0x041e
+#define TT_MS_LANGID_TURKISH_TURKEY                    0x041f
+#define TT_MS_LANGID_URDU_PAKISTAN                     0x0420
+#define TT_MS_LANGID_URDU_INDIA                        0x0820
+#define TT_MS_LANGID_INDONESIAN_INDONESIA              0x0421
+#define TT_MS_LANGID_UKRAINIAN_UKRAINE                 0x0422
+#define TT_MS_LANGID_BELARUSIAN_BELARUS                0x0423
+#define TT_MS_LANGID_SLOVENE_SLOVENIA                  0x0424
+#define TT_MS_LANGID_ESTONIAN_ESTONIA                  0x0425
+#define TT_MS_LANGID_LATVIAN_LATVIA                    0x0426
+#define TT_MS_LANGID_LITHUANIAN_LITHUANIA              0x0427
+#define TT_MS_LANGID_CLASSIC_LITHUANIAN_LITHUANIA      0x0827
+#define TT_MS_LANGID_TAJIK_TAJIKISTAN                  0x0428
+#define TT_MS_LANGID_FARSI_IRAN                        0x0429
+#define TT_MS_LANGID_VIETNAMESE_VIET_NAM               0x042a
+#define TT_MS_LANGID_ARMENIAN_ARMENIA                  0x042b
+#define TT_MS_LANGID_AZERI_AZERBAIJAN_LATIN            0x042c
+#define TT_MS_LANGID_AZERI_AZERBAIJAN_CYRILLIC         0x082c
+#define TT_MS_LANGID_BASQUE_SPAIN                      0x042d
+#define TT_MS_LANGID_SORBIAN_GERMANY                   0x042e
+#define TT_MS_LANGID_MACEDONIAN_MACEDONIA              0x042f
+#define TT_MS_LANGID_SUTU_SOUTH_AFRICA                 0x0430
+#define TT_MS_LANGID_TSONGA_SOUTH_AFRICA               0x0431
+#define TT_MS_LANGID_TSWANA_SOUTH_AFRICA               0x0432
+#define TT_MS_LANGID_VENDA_SOUTH_AFRICA                0x0433
+#define TT_MS_LANGID_XHOSA_SOUTH_AFRICA                0x0434
+#define TT_MS_LANGID_ZULU_SOUTH_AFRICA                 0x0435
+#define TT_MS_LANGID_AFRIKAANS_SOUTH_AFRICA            0x0436
+#define TT_MS_LANGID_GEORGIAN_GEORGIA                  0x0437
+#define TT_MS_LANGID_FAEROESE_FAEROE_ISLANDS           0x0438
+#define TT_MS_LANGID_HINDI_INDIA                       0x0439
+#define TT_MS_LANGID_MALTESE_MALTA                     0x043a
+  /* Added by XPsp2 Platform SDK (2004-07-26) */
+#define TT_MS_LANGID_SAMI_NORTHERN_NORWAY              0x043b
+#define TT_MS_LANGID_SAMI_NORTHERN_SWEDEN              0x083b
+#define TT_MS_LANGID_SAMI_NORTHERN_FINLAND             0x0C3b
+#define TT_MS_LANGID_SAMI_LULE_NORWAY                  0x103b
+#define TT_MS_LANGID_SAMI_LULE_SWEDEN                  0x143b
+#define TT_MS_LANGID_SAMI_SOUTHERN_NORWAY              0x183b
+#define TT_MS_LANGID_SAMI_SOUTHERN_SWEDEN              0x1C3b
+#define TT_MS_LANGID_SAMI_SKOLT_FINLAND                0x203b
+#define TT_MS_LANGID_SAMI_INARI_FINLAND                0x243b
+  /* ... and we also keep our old identifier... */
+#define TT_MS_LANGID_SAAMI_LAPONIA                     0x043b
+
+#if 0 /* this seems to be a previous inversion */
+#define TT_MS_LANGID_IRISH_GAELIC_IRELAND              0x043c
+#define TT_MS_LANGID_SCOTTISH_GAELIC_UNITED_KINGDOM    0x083c
+#else
+#define TT_MS_LANGID_SCOTTISH_GAELIC_UNITED_KINGDOM    0x083c
+#define TT_MS_LANGID_IRISH_GAELIC_IRELAND              0x043c
+#endif
+
+#define TT_MS_LANGID_YIDDISH_GERMANY                   0x043d
+#define TT_MS_LANGID_MALAY_MALAYSIA                    0x043e
+#define TT_MS_LANGID_MALAY_BRUNEI_DARUSSALAM           0x083e
+#define TT_MS_LANGID_KAZAK_KAZAKSTAN                   0x043f
+#define TT_MS_LANGID_KIRGHIZ_KIRGHIZSTAN /* Cyrillic*/ 0x0440
+  /* alias declared in Windows 2000 */
+#define TT_MS_LANGID_KIRGHIZ_KIRGHIZ_REPUBLIC \
+          TT_MS_LANGID_KIRGHIZ_KIRGHIZSTAN
+
+#define TT_MS_LANGID_SWAHILI_KENYA                     0x0441
+#define TT_MS_LANGID_TURKMEN_TURKMENISTAN              0x0442
+#define TT_MS_LANGID_UZBEK_UZBEKISTAN_LATIN            0x0443
+#define TT_MS_LANGID_UZBEK_UZBEKISTAN_CYRILLIC         0x0843
+#define TT_MS_LANGID_TATAR_TATARSTAN                   0x0444
+#define TT_MS_LANGID_BENGALI_INDIA                     0x0445
+#define TT_MS_LANGID_BENGALI_BANGLADESH                0x0845
+#define TT_MS_LANGID_PUNJABI_INDIA                     0x0446
+#define TT_MS_LANGID_PUNJABI_ARABIC_PAKISTAN           0x0846
+#define TT_MS_LANGID_GUJARATI_INDIA                    0x0447
+#define TT_MS_LANGID_ORIYA_INDIA                       0x0448
+#define TT_MS_LANGID_TAMIL_INDIA                       0x0449
+#define TT_MS_LANGID_TELUGU_INDIA                      0x044a
+#define TT_MS_LANGID_KANNADA_INDIA                     0x044b
+#define TT_MS_LANGID_MALAYALAM_INDIA                   0x044c
+#define TT_MS_LANGID_ASSAMESE_INDIA                    0x044d
+#define TT_MS_LANGID_MARATHI_INDIA                     0x044e
+#define TT_MS_LANGID_SANSKRIT_INDIA                    0x044f
+#define TT_MS_LANGID_MONGOLIAN_MONGOLIA /* Cyrillic */ 0x0450
+#define TT_MS_LANGID_MONGOLIAN_MONGOLIA_MONGOLIAN      0x0850
+#define TT_MS_LANGID_TIBETAN_CHINA                     0x0451
+  /* Don't use the next constant!  It has            */
+  /*   (1) the wrong spelling (Dzonghka)             */
+  /*   (2) Microsoft doesn't officially define it -- */
+  /*       at least it is not in the List of Local   */
+  /*       ID Values.                                */
+  /*   (3) Dzongkha is not the same language as      */
+  /*       Tibetan, so merging it is wrong anyway.   */
+  /*                                                 */
+  /* TT_MS_LANGID_TIBETAN_BHUTAN is correct, BTW.    */
+#define TT_MS_LANGID_DZONGHKA_BHUTAN                   0x0851
+
+#if 0
+  /* the following used to be defined */
+#define TT_MS_LANGID_TIBETAN_BHUTAN                    0x0451
+  /* ... but it was changed; */
+#else
+  /* So we will continue to #define it, but with the correct value */
+#define TT_MS_LANGID_TIBETAN_BHUTAN   TT_MS_LANGID_DZONGHKA_BHUTAN
+#endif
+
+#define TT_MS_LANGID_WELSH_WALES                       0x0452
+#define TT_MS_LANGID_KHMER_CAMBODIA                    0x0453
+#define TT_MS_LANGID_LAO_LAOS                          0x0454
+#define TT_MS_LANGID_BURMESE_MYANMAR                   0x0455
+#define TT_MS_LANGID_GALICIAN_SPAIN                    0x0456
+#define TT_MS_LANGID_KONKANI_INDIA                     0x0457
+#define TT_MS_LANGID_MANIPURI_INDIA  /* Bengali */     0x0458
+#define TT_MS_LANGID_SINDHI_INDIA /* Arabic */         0x0459
+#define TT_MS_LANGID_SINDHI_PAKISTAN                   0x0859
+  /* Missing a LCID for Sindhi in Devanagari script */
+#define TT_MS_LANGID_SYRIAC_SYRIA                      0x045a
+#define TT_MS_LANGID_SINHALESE_SRI_LANKA               0x045b
+#define TT_MS_LANGID_CHEROKEE_UNITED_STATES            0x045c
+#define TT_MS_LANGID_INUKTITUT_CANADA                  0x045d
+#define TT_MS_LANGID_AMHARIC_ETHIOPIA                  0x045e
+#define TT_MS_LANGID_TAMAZIGHT_MOROCCO /* Arabic */    0x045f
+#define TT_MS_LANGID_TAMAZIGHT_MOROCCO_LATIN           0x085f
+  /* Missing a LCID for Tifinagh script */
+#define TT_MS_LANGID_KASHMIRI_PAKISTAN /* Arabic */    0x0460
+  /* Spelled this way by XPsp2 Platform SDK (2004-07-26) */
+  /* script is yet unclear... might be Arabic, Nagari or Sharada */
+#define TT_MS_LANGID_KASHMIRI_SASIA                    0x0860
+  /* ... and aliased (by MS) for compatibility reasons. */
+#define TT_MS_LANGID_KASHMIRI_INDIA TT_MS_LANGID_KASHMIRI_SASIA
+#define TT_MS_LANGID_NEPALI_NEPAL                      0x0461
+#define TT_MS_LANGID_NEPALI_INDIA                      0x0861
+#define TT_MS_LANGID_FRISIAN_NETHERLANDS               0x0462
+#define TT_MS_LANGID_PASHTO_AFGHANISTAN                0x0463
+#define TT_MS_LANGID_FILIPINO_PHILIPPINES              0x0464
+#define TT_MS_LANGID_DHIVEHI_MALDIVES                  0x0465
+  /* alias declared in Windows 2000 */
+#define TT_MS_LANGID_DIVEHI_MALDIVES  TT_MS_LANGID_DHIVEHI_MALDIVES
+#define TT_MS_LANGID_EDO_NIGERIA                       0x0466
+#define TT_MS_LANGID_FULFULDE_NIGERIA                  0x0467
+#define TT_MS_LANGID_HAUSA_NIGERIA                     0x0468
+#define TT_MS_LANGID_IBIBIO_NIGERIA                    0x0469
+#define TT_MS_LANGID_YORUBA_NIGERIA                    0x046a
+#define TT_MS_LANGID_QUECHUA_BOLIVIA                   0x046b
+#define TT_MS_LANGID_QUECHUA_ECUADOR                   0x086b
+#define TT_MS_LANGID_QUECHUA_PERU                      0x0c6b
+#define TT_MS_LANGID_SEPEDI_SOUTH_AFRICA               0x046c
+  /* Also spelled by XPsp2 Platform SDK (2004-07-26) */
+#define TT_MS_LANGID_SOTHO_SOUTHERN_SOUTH_AFRICA \
+          TT_MS_LANGID_SEPEDI_SOUTH_AFRICA
+  /* language codes 0x046d, 0x046e and 0x046f are (still) unknown. */
+#define TT_MS_LANGID_IGBO_NIGERIA                      0x0470
+#define TT_MS_LANGID_KANURI_NIGERIA                    0x0471
+#define TT_MS_LANGID_OROMO_ETHIOPIA                    0x0472
+#define TT_MS_LANGID_TIGRIGNA_ETHIOPIA                 0x0473
+#define TT_MS_LANGID_TIGRIGNA_ERYTHREA                 0x0873
+  /* also spelled in the `Passport SDK' list as: */
+#define TT_MS_LANGID_TIGRIGNA_ERYTREA  TT_MS_LANGID_TIGRIGNA_ERYTHREA
+#define TT_MS_LANGID_GUARANI_PARAGUAY                  0x0474
+#define TT_MS_LANGID_HAWAIIAN_UNITED_STATES            0x0475
+#define TT_MS_LANGID_LATIN                             0x0476
+#define TT_MS_LANGID_SOMALI_SOMALIA                    0x0477
+  /* Note: Yi does not have a (proper) ISO 639-2 code, since it is mostly */
+  /*       not written (but OTOH the peculiar writing system is worth     */
+  /*       studying).                                                     */
+#define TT_MS_LANGID_YI_CHINA                          0x0478
+#define TT_MS_LANGID_PAPIAMENTU_NETHERLANDS_ANTILLES   0x0479
+  /* language codes from 0x047a to 0x047f are (still) unknown. */
+#define TT_MS_LANGID_UIGHUR_CHINA                      0x0480
+#define TT_MS_LANGID_MAORI_NEW_ZEALAND                 0x0481
+
+#if 0  /* not deemed useful for fonts */
+#define TT_MS_LANGID_HUMAN_INTERFACE_DEVICE            0x04ff
+#endif
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* Possible values of the `name' identifier field in the name records of */
+  /* the TTF `name' table.  These values are platform independent.         */
+  /*                                                                       */
+#define TT_NAME_ID_COPYRIGHT            0
+#define TT_NAME_ID_FONT_FAMILY          1
+#define TT_NAME_ID_FONT_SUBFAMILY       2
+#define TT_NAME_ID_UNIQUE_ID            3
+#define TT_NAME_ID_FULL_NAME            4
+#define TT_NAME_ID_VERSION_STRING       5
+#define TT_NAME_ID_PS_NAME              6
+#define TT_NAME_ID_TRADEMARK            7
+
+  /* the following values are from the OpenType spec */
+#define TT_NAME_ID_MANUFACTURER         8
+#define TT_NAME_ID_DESIGNER             9
+#define TT_NAME_ID_DESCRIPTION          10
+#define TT_NAME_ID_VENDOR_URL           11
+#define TT_NAME_ID_DESIGNER_URL         12
+#define TT_NAME_ID_LICENSE              13
+#define TT_NAME_ID_LICENSE_URL          14
+  /* number 15 is reserved */
+#define TT_NAME_ID_PREFERRED_FAMILY     16
+#define TT_NAME_ID_PREFERRED_SUBFAMILY  17
+#define TT_NAME_ID_MAC_FULL_NAME        18
+
+  /* The following code is new as of 2000-01-21 */
+#define TT_NAME_ID_SAMPLE_TEXT          19
+
+  /* This is new in OpenType 1.3 */
+#define TT_NAME_ID_CID_FINDFONT_NAME    20
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* Bit mask values for the Unicode Ranges from the TTF `OS2 ' table.     */
+  /*                                                                       */
+  /* Updated 02-Jul-2000.                                                  */
+  /*                                                                       */
+
+  /* General Scripts Area */
+
+  /* Bit  0   Basic Latin */
+#define TT_UCR_BASIC_LATIN                     (1L <<  0) /* U+0020-U+007E */
+  /* Bit  1   C1 Controls and Latin-1 Supplement */
+#define TT_UCR_LATIN1_SUPPLEMENT               (1L <<  1) /* U+0080-U+00FF */
+  /* Bit  2   Latin Extended-A */
+#define TT_UCR_LATIN_EXTENDED_A                (1L <<  2) /* U+0100-U+017F */
+  /* Bit  3   Latin Extended-B */
+#define TT_UCR_LATIN_EXTENDED_B                (1L <<  3) /* U+0180-U+024F */
+  /* Bit  4   IPA Extensions */
+#define TT_UCR_IPA_EXTENSIONS                  (1L <<  4) /* U+0250-U+02AF */
+  /* Bit  5   Spacing Modifier Letters */
+#define TT_UCR_SPACING_MODIFIER                (1L <<  5) /* U+02B0-U+02FF */
+  /* Bit  6   Combining Diacritical Marks */
+#define TT_UCR_COMBINING_DIACRITICS            (1L <<  6) /* U+0300-U+036F */
+  /* Bit  7   Greek and Coptic */
+#define TT_UCR_GREEK                           (1L <<  7) /* U+0370-U+03FF */
+  /* Bit  8 is reserved (was: Greek Symbols and Coptic) */
+  /* Bit  9   Cyrillic               + */
+  /*          Cyrillic Supplementary   */
+#define TT_UCR_CYRILLIC                        (1L <<  9) /* U+0400-U+04FF */
+                                                          /* U+0500-U+052F */
+  /* Bit 10   Armenian */
+#define TT_UCR_ARMENIAN                        (1L << 10) /* U+0530-U+058F */
+  /* Bit 11   Hebrew */
+#define TT_UCR_HEBREW                          (1L << 11) /* U+0590-U+05FF */
+  /* Bit 12 is reserved (was: Hebrew Extended) */
+  /* Bit 13   Arabic */
+#define TT_UCR_ARABIC                          (1L << 13) /* U+0600-U+06FF */
+  /* Bit 14 is reserved (was: Arabic Extended) */
+  /* Bit 15   Devanagari */
+#define TT_UCR_DEVANAGARI                      (1L << 15) /* U+0900-U+097F */
+  /* Bit 16   Bengali */
+#define TT_UCR_BENGALI                         (1L << 16) /* U+0980-U+09FF */
+  /* Bit 17   Gurmukhi */
+#define TT_UCR_GURMUKHI                        (1L << 17) /* U+0A00-U+0A7F */
+  /* Bit 18   Gujarati */
+#define TT_UCR_GUJARATI                        (1L << 18) /* U+0A80-U+0AFF */
+  /* Bit 19   Oriya */
+#define TT_UCR_ORIYA                           (1L << 19) /* U+0B00-U+0B7F */
+  /* Bit 20   Tamil */
+#define TT_UCR_TAMIL                           (1L << 20) /* U+0B80-U+0BFF */
+  /* Bit 21   Telugu */
+#define TT_UCR_TELUGU                          (1L << 21) /* U+0C00-U+0C7F */
+  /* Bit 22   Kannada */
+#define TT_UCR_KANNADA                         (1L << 22) /* U+0C80-U+0CFF */
+  /* Bit 23   Malayalam */
+#define TT_UCR_MALAYALAM                       (1L << 23) /* U+0D00-U+0D7F */
+  /* Bit 24   Thai */
+#define TT_UCR_THAI                            (1L << 24) /* U+0E00-U+0E7F */
+  /* Bit 25   Lao */
+#define TT_UCR_LAO                             (1L << 25) /* U+0E80-U+0EFF */
+  /* Bit 26   Georgian */
+#define TT_UCR_GEORGIAN                        (1L << 26) /* U+10A0-U+10FF */
+  /* Bit 27 is reserved (was Georgian Extended) */
+  /* Bit 28   Hangul Jamo */
+#define TT_UCR_HANGUL_JAMO                     (1L << 28) /* U+1100-U+11FF */
+  /* Bit 29   Latin Extended Additional */
+#define TT_UCR_LATIN_EXTENDED_ADDITIONAL       (1L << 29) /* U+1E00-U+1EFF */
+  /* Bit 30   Greek Extended */
+#define TT_UCR_GREEK_EXTENDED                  (1L << 30) /* U+1F00-U+1FFF */
+
+  /* Symbols Area */
+
+  /* Bit 31   General Punctuation */
+#define TT_UCR_GENERAL_PUNCTUATION             (1L << 31) /* U+2000-U+206F */
+  /* Bit 32   Superscripts And Subscripts */
+#define TT_UCR_SUPERSCRIPTS_SUBSCRIPTS         (1L <<  0) /* U+2070-U+209F */
+  /* Bit 33   Currency Symbols */
+#define TT_UCR_CURRENCY_SYMBOLS                (1L <<  1) /* U+20A0-U+20CF */
+  /* Bit 34   Combining Diacritical Marks For Symbols */
+#define TT_UCR_COMBINING_DIACRITICS_SYMB       (1L <<  2) /* U+20D0-U+20FF */
+  /* Bit 35   Letterlike Symbols */
+#define TT_UCR_LETTERLIKE_SYMBOLS              (1L <<  3) /* U+2100-U+214F */
+  /* Bit 36   Number Forms */
+#define TT_UCR_NUMBER_FORMS                    (1L <<  4) /* U+2150-U+218F */
+  /* Bit 37   Arrows                + */
+  /*          Supplemental Arrows-A + */
+  /*          Supplemental Arrows-B   */
+#define TT_UCR_ARROWS                          (1L <<  5) /* U+2190-U+21FF */
+                                                          /* U+27F0-U+27FF */
+                                                          /* U+2900-U+297F */
+  /* Bit 38   Mathematical Operators               + */
+  /*          Supplemental Mathematical Operators  + */
+  /*          Miscellaneous Mathematical Symbols-A + */
+  /*          Miscellaneous Mathematical Symbols-B   */
+#define TT_UCR_MATHEMATICAL_OPERATORS          (1L <<  6) /* U+2200-U+22FF */
+                                                          /* U+2A00-U+2AFF */
+                                                          /* U+27C0-U+27EF */
+                                                          /* U+2980-U+29FF */
+  /* Bit 39 Miscellaneous Technical */
+#define TT_UCR_MISCELLANEOUS_TECHNICAL         (1L <<  7) /* U+2300-U+23FF */
+  /* Bit 40   Control Pictures */
+#define TT_UCR_CONTROL_PICTURES                (1L <<  8) /* U+2400-U+243F */
+  /* Bit 41   Optical Character Recognition */
+#define TT_UCR_OCR                             (1L <<  9) /* U+2440-U+245F */
+  /* Bit 42   Enclosed Alphanumerics */
+#define TT_UCR_ENCLOSED_ALPHANUMERICS          (1L << 10) /* U+2460-U+24FF */
+  /* Bit 43   Box Drawing */
+#define TT_UCR_BOX_DRAWING                     (1L << 11) /* U+2500-U+257F */
+  /* Bit 44   Block Elements */
+#define TT_UCR_BLOCK_ELEMENTS                  (1L << 12) /* U+2580-U+259F */
+  /* Bit 45   Geometric Shapes */
+#define TT_UCR_GEOMETRIC_SHAPES                (1L << 13) /* U+25A0-U+25FF */
+  /* Bit 46   Miscellaneous Symbols */
+#define TT_UCR_MISCELLANEOUS_SYMBOLS           (1L << 14) /* U+2600-U+26FF */
+  /* Bit 47   Dingbats */
+#define TT_UCR_DINGBATS                        (1L << 15) /* U+2700-U+27BF */
+
+  /* CJK Phonetics and Symbols Area */
+
+  /* Bit 48   CJK Symbols and Punctuation */
+#define TT_UCR_CJK_SYMBOLS                     (1L << 16) /* U+3000-U+303F */
+  /* Bit 49   Hiragana */
+#define TT_UCR_HIRAGANA                        (1L << 17) /* U+3040-U+309F */
+  /* Bit 50   Katakana                     + */
+  /*          Katakana Phonetic Extensions   */
+#define TT_UCR_KATAKANA                        (1L << 18) /* U+30A0-U+30FF */
+                                                          /* U+31F0-U+31FF */
+  /* Bit 51   Bopomofo          + */
+  /*          Bopomofo Extended   */
+#define TT_UCR_BOPOMOFO                        (1L << 19) /* U+3100-U+312F */
+                                                          /* U+31A0-U+31BF */
+  /* Bit 52   Hangul Compatibility Jamo */
+#define TT_UCR_HANGUL_COMPATIBILITY_JAMO       (1L << 20) /* U+3130-U+318F */
+  /* Bit 53   Kanbun */
+#define TT_UCR_CJK_MISC                        (1L << 21) /* U+3190-U+319F */
+#define TT_UCR_KANBUN  TT_UCR_CJK_MISC
+  /* Bit 54   Enclosed CJK Letters and Months */
+#define TT_UCR_ENCLOSED_CJK_LETTERS_MONTHS     (1L << 22) /* U+3200-U+32FF */
+  /* Bit 55   CJK Compatibility */
+#define TT_UCR_CJK_COMPATIBILITY               (1L << 23) /* U+3300-U+33FF */
+
+  /* Hangul Syllables Area */
+
+  /* Bit 56   Hangul */
+#define TT_UCR_HANGUL                          (1L << 24) /* U+AC00-U+D7A3 */
+
+  /* Surrogates Area */
+
+  /* Bit 57   High Surrogates             + */
+  /*          High Private Use Surrogates + */
+  /*          Low Surrogates                */
+#define TT_UCR_SURROGATES                      (1L << 25) /* U+D800-U+DB7F */
+                                                          /* U+DB80-U+DBFF */
+                                                          /* U+DC00-U+DFFF */
+  /* According to OpenType specs v.1.3+, setting bit 57 implies that there */
+  /* is at least one codepoint beyond the Basic Multilingual Plane that is */
+  /* supported by this font.  So it really means:            >= U+10000    */
+
+  /* Bit 58 is reserved for Unicode SubRanges */
+
+  /* CJK Ideographs Area */
+
+  /* Bit 59   CJK Unified Ideographs             + */
+  /*          CJK Radicals Supplement            + */
+  /*          Kangxi Radicals                    + */
+  /*          Ideographic Description Characters + */
+  /*          CJK Unified Ideographs Extension A   */
+  /*          CJK Unified Ideographs Extension A + */
+  /*          CJK Unified Ideographs Extension B + */
+  /*          Kanbun                               */
+#define TT_UCR_CJK_UNIFIED_IDEOGRAPHS          (1L << 27) /* U+4E00-U+9FFF */
+                                                          /* U+2E80-U+2EFF */
+                                                          /* U+2F00-U+2FDF */
+                                                          /* U+2FF0-U+2FFF */
+                                                          /* U+3400-U+4DB5 */
+                                                          /*U+20000-U+2A6DF*/
+                                                          /* U+3190-U+319F */
+
+  /* Private Use Area */
+
+  /* Bit 60   Private Use */
+#define TT_UCR_PRIVATE_USE                     (1L << 28) /* U+E000-U+F8FF */
+
+  /* Compatibility Area and Specials */
+
+  /* Bit 61   CJK Compatibility Ideographs            + */
+  /*          CJK Compatibility Ideographs Supplement   */
+#define TT_UCR_CJK_COMPATIBILITY_IDEOGRAPHS    (1L << 29) /* U+F900-U+FAFF */
+                                                          /*U+2F800-U+2FA1F*/
+  /* Bit 62   Alphabetic Presentation Forms */
+#define TT_UCR_ALPHABETIC_PRESENTATION_FORMS   (1L << 30) /* U+FB00-U+FB4F */
+  /* Bit 63   Arabic Presentation Forms-A */
+#define TT_UCR_ARABIC_PRESENTATIONS_A          (1L << 31) /* U+FB50-U+FDFF */
+  /* Bit 64   Combining Half Marks */
+#define TT_UCR_COMBINING_HALF_MARKS            (1L <<  0) /* U+FE20-U+FE2F */
+  /* Bit 65   CJK Compatibility Forms */
+#define TT_UCR_CJK_COMPATIBILITY_FORMS         (1L <<  1) /* U+FE30-U+FE4F */
+  /* Bit 66   Small Form Variants */
+#define TT_UCR_SMALL_FORM_VARIANTS             (1L <<  2) /* U+FE50-U+FE6F */
+  /* Bit 67   Arabic Presentation Forms-B */
+#define TT_UCR_ARABIC_PRESENTATIONS_B          (1L <<  3) /* U+FE70-U+FEFE */
+  /* Bit 68   Halfwidth and Fullwidth Forms */
+#define TT_UCR_HALFWIDTH_FULLWIDTH_FORMS       (1L <<  4) /* U+FF00-U+FFEF */
+  /* Bit 69   Specials */
+#define TT_UCR_SPECIALS                        (1L <<  5) /* U+FFF0-U+FFFD */
+  /* Bit 70   Tibetan */
+#define TT_UCR_TIBETAN                         (1L <<  6) /* U+0F00-U+0FFF */
+  /* Bit 71   Syriac */
+#define TT_UCR_SYRIAC                          (1L <<  7) /* U+0700-U+074F */
+  /* Bit 72   Thaana */
+#define TT_UCR_THAANA                          (1L <<  8) /* U+0780-U+07BF */
+  /* Bit 73   Sinhala */
+#define TT_UCR_SINHALA                         (1L <<  9) /* U+0D80-U+0DFF */
+  /* Bit 74   Myanmar */
+#define TT_UCR_MYANMAR                         (1L << 10) /* U+1000-U+109F */
+  /* Bit 75   Ethiopic */
+#define TT_UCR_ETHIOPIC                        (1L << 11) /* U+1200-U+137F */
+  /* Bit 76   Cherokee */
+#define TT_UCR_CHEROKEE                        (1L << 12) /* U+13A0-U+13FF */
+  /* Bit 77   Unified Canadian Aboriginal Syllabics */
+#define TT_UCR_CANADIAN_ABORIGINAL_SYLLABICS   (1L << 13) /* U+1400-U+167F */
+  /* Bit 78   Ogham */
+#define TT_UCR_OGHAM                           (1L << 14) /* U+1680-U+169F */
+  /* Bit 79   Runic */
+#define TT_UCR_RUNIC                           (1L << 15) /* U+16A0-U+16FF */
+  /* Bit 80   Khmer */
+#define TT_UCR_KHMER                           (1L << 16) /* U+1780-U+17FF */
+  /* Bit 81   Mongolian */
+#define TT_UCR_MONGOLIAN                       (1L << 17) /* U+1800-U+18AF */
+  /* Bit 82   Braille Patterns */
+#define TT_UCR_BRAILLE                         (1L << 18) /* U+2800-U+28FF */
+  /* Bit 83   Yi Syllables + */
+  /*          Yi Radicals    */
+#define TT_UCR_YI                              (1L << 19) /* U+A000-U+A48F */
+                                                          /* U+A490-U+A4CF */
+  /* Bit 84   Tagalog  + */
+  /*          Hanunoo  + */
+  /*          Buhid    + */
+  /*          Tagbanwa   */
+#define TT_UCR_PHILIPPINE                      (1L << 20) /* U+1700-U+171F */
+                                                          /* U+1720-U+173F */
+                                                          /* U+1740-U+175F */
+                                                          /* U+1760-U+177F */
+  /* Bit 85   Old Italic */
+#define TT_UCR_OLD_ITALIC                      (1L << 21) /*U+10300-U+1032F*/
+  /* Bit 86   Gothic */
+#define TT_UCR_GOTHIC                          (1L << 22) /*U+10330-U+1034F*/
+  /* Bit 87   Deseret */
+#define TT_UCR_DESERET                         (1L << 23) /*U+10400-U+1044F*/
+  /* Bit 88   Byzantine Musical Symbols + */
+  /*          Musical Symbols             */
+#define TT_UCR_MUSICAL_SYMBOLS                 (1L << 24) /*U+1D000-U+1D0FF*/
+                                                          /*U+1D100-U+1D1FF*/
+  /* Bit 89   Mathematical Alphanumeric Symbols */
+#define TT_UCR_MATH_ALPHANUMERIC_SYMBOLS       (1L << 25) /*U+1D400-U+1D7FF*/
+  /* Bit 90   Private Use (plane 15) + */
+  /*          Private Use (plane 16)   */
+#define TT_UCR_PRIVATE_USE_SUPPLEMENTARY       (1L << 26) /*U+F0000-U+FFFFD*/
+                                                        /*U+100000-U+10FFFD*/
+  /* Bit 91   Variation Selectors */
+#define TT_UCR_VARIATION_SELECTORS             (1L << 27) /* U+FE00-U+FE0F */
+  /* Bit 92   Tags */
+#define TT_UCR_TAGS                            (1L << 28) /*U+E0000-U+E007F*/
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* Some compilers have a very limited length of identifiers.             */
+  /*                                                                       */
+#if defined( __TURBOC__ ) && __TURBOC__ < 0x0410 || defined( __PACIFIC__ )
+#define HAVE_LIMIT_ON_IDENTS
+#endif
+
+
+#ifndef HAVE_LIMIT_ON_IDENTS
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* Here some alias #defines in order to be clearer.                      */
+  /*                                                                       */
+  /* These are not always #defined to stay within the 31 character limit   */
+  /* which some compilers have.                                            */
+  /*                                                                       */
+  /* Credits go to Dave Hoo <dhoo@flash.net> for pointing out that modern  */
+  /* Borland compilers (read: from BC++ 3.1 on) can increase this limit.   */
+  /* If you get a warning with such a compiler, use the -i40 switch.       */
+  /*                                                                       */
+#define TT_UCR_ARABIC_PRESENTATION_FORMS_A      \
+         TT_UCR_ARABIC_PRESENTATIONS_A
+#define TT_UCR_ARABIC_PRESENTATION_FORMS_B      \
+         TT_UCR_ARABIC_PRESENTATIONS_B
+
+#define TT_UCR_COMBINING_DIACRITICAL_MARKS      \
+         TT_UCR_COMBINING_DIACRITICS
+#define TT_UCR_COMBINING_DIACRITICAL_MARKS_SYMB \
+         TT_UCR_COMBINING_DIACRITICS_SYMB
+
+
+#endif /* !HAVE_LIMIT_ON_IDENTS */
+
+
+FT_END_HEADER
+
+#endif /* __TTNAMEID_H__ */
+
+
+/* END */
diff --git a/include/freetype2/freetype/tttables.h b/include/freetype2/freetype/tttables.h
new file mode 100644 (file)
index 0000000..43eca2e
--- /dev/null
@@ -0,0 +1,756 @@
+/***************************************************************************/
+/*                                                                         */
+/*  tttables.h                                                             */
+/*                                                                         */
+/*    Basic SFNT/TrueType tables definitions and interface                 */
+/*    (specification only).                                                */
+/*                                                                         */
+/*  Copyright 1996-2001, 2002, 2003, 2004, 2005 by                         */
+/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
+/*                                                                         */
+/*  This file is part of the FreeType project, and may only be used,       */
+/*  modified, and distributed under the terms of the FreeType project      */
+/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
+/*  this file you indicate that you have read the license and              */
+/*  understand and accept it fully.                                        */
+/*                                                                         */
+/***************************************************************************/
+
+
+#ifndef __TTTABLES_H__
+#define __TTTABLES_H__
+
+
+#include <ft2build.h>
+#include FT_FREETYPE_H
+
+#ifdef FREETYPE_H
+#error "freetype.h of FreeType 1 has been loaded!"
+#error "Please fix the directory search order for header files"
+#error "so that freetype.h of FreeType 2 is found first."
+#endif
+
+
+FT_BEGIN_HEADER
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Section>                                                             */
+  /*    truetype_tables                                                    */
+  /*                                                                       */
+  /* <Title>                                                               */
+  /*    TrueType Tables                                                    */
+  /*                                                                       */
+  /* <Abstract>                                                            */
+  /*    TrueType specific table types and functions.                       */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    This section contains the definition of TrueType-specific tables   */
+  /*    as well as some routines used to access and process them.          */
+  /*                                                                       */
+  /*************************************************************************/
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Struct>                                                              */
+  /*    TT_Header                                                          */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A structure used to model a TrueType font header table.  All       */
+  /*    fields follow the TrueType specification.                          */
+  /*                                                                       */
+  typedef struct  TT_Header_
+  {
+    FT_Fixed   Table_Version;
+    FT_Fixed   Font_Revision;
+
+    FT_Long    CheckSum_Adjust;
+    FT_Long    Magic_Number;
+
+    FT_UShort  Flags;
+    FT_UShort  Units_Per_EM;
+
+    FT_Long    Created [2];
+    FT_Long    Modified[2];
+
+    FT_Short   xMin;
+    FT_Short   yMin;
+    FT_Short   xMax;
+    FT_Short   yMax;
+
+    FT_UShort  Mac_Style;
+    FT_UShort  Lowest_Rec_PPEM;
+
+    FT_Short   Font_Direction;
+    FT_Short   Index_To_Loc_Format;
+    FT_Short   Glyph_Data_Format;
+
+  } TT_Header;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Struct>                                                              */
+  /*    TT_HoriHeader                                                      */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A structure used to model a TrueType horizontal header, the `hhea' */
+  /*    table, as well as the corresponding horizontal metrics table,      */
+  /*    i.e., the `hmtx' table.                                            */
+  /*                                                                       */
+  /* <Fields>                                                              */
+  /*    Version                :: The table version.                       */
+  /*                                                                       */
+  /*    Ascender               :: The font's ascender, i.e., the distance  */
+  /*                              from the baseline to the top-most of all */
+  /*                              glyph points found in the font.          */
+  /*                                                                       */
+  /*                              This value is invalid in many fonts, as  */
+  /*                              it is usually set by the font designer,  */
+  /*                              and often reflects only a portion of the */
+  /*                              glyphs found in the font (maybe ASCII).  */
+  /*                                                                       */
+  /*                              You should use the `sTypoAscender' field */
+  /*                              of the OS/2 table instead if you want    */
+  /*                              the correct one.                         */
+  /*                                                                       */
+  /*    Descender              :: The font's descender, i.e., the distance */
+  /*                              from the baseline to the bottom-most of  */
+  /*                              all glyph points found in the font.  It  */
+  /*                              is negative.                             */
+  /*                                                                       */
+  /*                              This value is invalid in many fonts, as  */
+  /*                              it is usually set by the font designer,  */
+  /*                              and often reflects only a portion of the */
+  /*                              glyphs found in the font (maybe ASCII).  */
+  /*                                                                       */
+  /*                              You should use the `sTypoDescender'      */
+  /*                              field of the OS/2 table instead if you   */
+  /*                              want the correct one.                    */
+  /*                                                                       */
+  /*    Line_Gap               :: The font's line gap, i.e., the distance  */
+  /*                              to add to the ascender and descender to  */
+  /*                              get the BTB, i.e., the                   */
+  /*                              baseline-to-baseline distance for the    */
+  /*                              font.                                    */
+  /*                                                                       */
+  /*    advance_Width_Max      :: This field is the maximum of all advance */
+  /*                              widths found in the font.  It can be     */
+  /*                              used to compute the maximum width of an  */
+  /*                              arbitrary string of text.                */
+  /*                                                                       */
+  /*    min_Left_Side_Bearing  :: The minimum left side bearing of all     */
+  /*                              glyphs within the font.                  */
+  /*                                                                       */
+  /*    min_Right_Side_Bearing :: The minimum right side bearing of all    */
+  /*                              glyphs within the font.                  */
+  /*                                                                       */
+  /*    xMax_Extent            :: The maximum horizontal extent (i.e., the */
+  /*                              `width' of a glyph's bounding box) for   */
+  /*                              all glyphs in the font.                  */
+  /*                                                                       */
+  /*    caret_Slope_Rise       :: The rise coefficient of the cursor's     */
+  /*                              slope of the cursor (slope=rise/run).    */
+  /*                                                                       */
+  /*    caret_Slope_Run        :: The run coefficient of the cursor's      */
+  /*                              slope.                                   */
+  /*                                                                       */
+  /*    Reserved               :: 10 reserved bytes.                       */
+  /*                                                                       */
+  /*    metric_Data_Format     :: Always 0.                                */
+  /*                                                                       */
+  /*    number_Of_HMetrics     :: Number of HMetrics entries in the `hmtx' */
+  /*                              table -- this value can be smaller than  */
+  /*                              the total number of glyphs in the font.  */
+  /*                                                                       */
+  /*    long_metrics           :: A pointer into the `hmtx' table.         */
+  /*                                                                       */
+  /*    short_metrics          :: A pointer into the `hmtx' table.         */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    IMPORTANT: The TT_HoriHeader and TT_VertHeader structures should   */
+  /*               be identical except for the names of their fields which */
+  /*               are different.                                          */
+  /*                                                                       */
+  /*               This ensures that a single function in the `ttload'     */
+  /*               module is able to read both the horizontal and vertical */
+  /*               headers.                                                */
+  /*                                                                       */
+  typedef struct  TT_HoriHeader_
+  {
+    FT_Fixed   Version;
+    FT_Short   Ascender;
+    FT_Short   Descender;
+    FT_Short   Line_Gap;
+
+    FT_UShort  advance_Width_Max;      /* advance width maximum */
+
+    FT_Short   min_Left_Side_Bearing;  /* minimum left-sb       */
+    FT_Short   min_Right_Side_Bearing; /* minimum right-sb      */
+    FT_Short   xMax_Extent;            /* xmax extents          */
+    FT_Short   caret_Slope_Rise;
+    FT_Short   caret_Slope_Run;
+    FT_Short   caret_Offset;
+
+    FT_Short   Reserved[4];
+
+    FT_Short   metric_Data_Format;
+    FT_UShort  number_Of_HMetrics;
+
+    /* The following fields are not defined by the TrueType specification */
+    /* but they are used to connect the metrics header to the relevant    */
+    /* `HMTX' table.                                                      */
+
+    void*      long_metrics;
+    void*      short_metrics;
+
+  } TT_HoriHeader;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Struct>                                                              */
+  /*    TT_VertHeader                                                      */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A structure used to model a TrueType vertical header, the `vhea'   */
+  /*    table, as well as the corresponding vertical metrics table, i.e.,  */
+  /*    the `vmtx' table.                                                  */
+  /*                                                                       */
+  /* <Fields>                                                              */
+  /*    Version                 :: The table version.                      */
+  /*                                                                       */
+  /*    Ascender                :: The font's ascender, i.e., the distance */
+  /*                               from the baseline to the top-most of    */
+  /*                               all glyph points found in the font.     */
+  /*                                                                       */
+  /*                               This value is invalid in many fonts, as */
+  /*                               it is usually set by the font designer, */
+  /*                               and often reflects only a portion of    */
+  /*                               the glyphs found in the font (maybe     */
+  /*                               ASCII).                                 */
+  /*                                                                       */
+  /*                               You should use the `sTypoAscender'      */
+  /*                               field of the OS/2 table instead if you  */
+  /*                               want the correct one.                   */
+  /*                                                                       */
+  /*    Descender               :: The font's descender, i.e., the         */
+  /*                               distance from the baseline to the       */
+  /*                               bottom-most of all glyph points found   */
+  /*                               in the font.  It is negative.           */
+  /*                                                                       */
+  /*                               This value is invalid in many fonts, as */
+  /*                               it is usually set by the font designer, */
+  /*                               and often reflects only a portion of    */
+  /*                               the glyphs found in the font (maybe     */
+  /*                               ASCII).                                 */
+  /*                                                                       */
+  /*                               You should use the `sTypoDescender'     */
+  /*                               field of the OS/2 table instead if you  */
+  /*                               want the correct one.                   */
+  /*                                                                       */
+  /*    Line_Gap                :: The font's line gap, i.e., the distance */
+  /*                               to add to the ascender and descender to */
+  /*                               get the BTB, i.e., the                  */
+  /*                               baseline-to-baseline distance for the   */
+  /*                               font.                                   */
+  /*                                                                       */
+  /*    advance_Height_Max      :: This field is the maximum of all        */
+  /*                               advance heights found in the font.  It  */
+  /*                               can be used to compute the maximum      */
+  /*                               height of an arbitrary string of text.  */
+  /*                                                                       */
+  /*    min_Top_Side_Bearing    :: The minimum top side bearing of all     */
+  /*                               glyphs within the font.                 */
+  /*                                                                       */
+  /*    min_Bottom_Side_Bearing :: The minimum bottom side bearing of all  */
+  /*                               glyphs within the font.                 */
+  /*                                                                       */
+  /*    yMax_Extent             :: The maximum vertical extent (i.e., the  */
+  /*                               `height' of a glyph's bounding box) for */
+  /*                               all glyphs in the font.                 */
+  /*                                                                       */
+  /*    caret_Slope_Rise        :: The rise coefficient of the cursor's    */
+  /*                               slope of the cursor (slope=rise/run).   */
+  /*                                                                       */
+  /*    caret_Slope_Run         :: The run coefficient of the cursor's     */
+  /*                               slope.                                  */
+  /*                                                                       */
+  /*    caret_Offset            :: The cursor's offset for slanted fonts.  */
+  /*                               This value is `reserved' in vmtx        */
+  /*                               version 1.0.                            */
+  /*                                                                       */
+  /*    Reserved                :: 8 reserved bytes.                       */
+  /*                                                                       */
+  /*    metric_Data_Format      :: Always 0.                               */
+  /*                                                                       */
+  /*    number_Of_HMetrics      :: Number of VMetrics entries in the       */
+  /*                               `vmtx' table -- this value can be       */
+  /*                               smaller than the total number of glyphs */
+  /*                               in the font.                            */
+  /*                                                                       */
+  /*    long_metrics           :: A pointer into the `vmtx' table.         */
+  /*                                                                       */
+  /*    short_metrics          :: A pointer into the `vmtx' table.         */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    IMPORTANT: The TT_HoriHeader and TT_VertHeader structures should   */
+  /*               be identical except for the names of their fields which */
+  /*               are different.                                          */
+  /*                                                                       */
+  /*               This ensures that a single function in the `ttload'     */
+  /*               module is able to read both the horizontal and vertical */
+  /*               headers.                                                */
+  /*                                                                       */
+  typedef struct  TT_VertHeader_
+  {
+    FT_Fixed   Version;
+    FT_Short   Ascender;
+    FT_Short   Descender;
+    FT_Short   Line_Gap;
+
+    FT_UShort  advance_Height_Max;      /* advance height maximum */
+
+    FT_Short   min_Top_Side_Bearing;    /* minimum left-sb or top-sb       */
+    FT_Short   min_Bottom_Side_Bearing; /* minimum right-sb or bottom-sb   */
+    FT_Short   yMax_Extent;             /* xmax or ymax extents            */
+    FT_Short   caret_Slope_Rise;
+    FT_Short   caret_Slope_Run;
+    FT_Short   caret_Offset;
+
+    FT_Short   Reserved[4];
+
+    FT_Short   metric_Data_Format;
+    FT_UShort  number_Of_VMetrics;
+
+    /* The following fields are not defined by the TrueType specification */
+    /* but they're used to connect the metrics header to the relevant     */
+    /* `HMTX' or `VMTX' table.                                            */
+
+    void*      long_metrics;
+    void*      short_metrics;
+
+  } TT_VertHeader;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Struct>                                                              */
+  /*    TT_OS2                                                             */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A structure used to model a TrueType OS/2 table. This is the long  */
+  /*    table version.  All fields comply to the TrueType specification.   */
+  /*                                                                       */
+  /*    Note that we now support old Mac fonts which do not include an     */
+  /*    OS/2 table.  In this case, the `version' field is always set to    */
+  /*    0xFFFF.                                                            */
+  /*                                                                       */
+  typedef struct  TT_OS2_
+  {
+    FT_UShort  version;                /* 0x0001 - more or 0xFFFF */
+    FT_Short   xAvgCharWidth;
+    FT_UShort  usWeightClass;
+    FT_UShort  usWidthClass;
+    FT_Short   fsType;
+    FT_Short   ySubscriptXSize;
+    FT_Short   ySubscriptYSize;
+    FT_Short   ySubscriptXOffset;
+    FT_Short   ySubscriptYOffset;
+    FT_Short   ySuperscriptXSize;
+    FT_Short   ySuperscriptYSize;
+    FT_Short   ySuperscriptXOffset;
+    FT_Short   ySuperscriptYOffset;
+    FT_Short   yStrikeoutSize;
+    FT_Short   yStrikeoutPosition;
+    FT_Short   sFamilyClass;
+
+    FT_Byte    panose[10];
+
+    FT_ULong   ulUnicodeRange1;        /* Bits 0-31   */
+    FT_ULong   ulUnicodeRange2;        /* Bits 32-63  */
+    FT_ULong   ulUnicodeRange3;        /* Bits 64-95  */
+    FT_ULong   ulUnicodeRange4;        /* Bits 96-127 */
+
+    FT_Char    achVendID[4];
+
+    FT_UShort  fsSelection;
+    FT_UShort  usFirstCharIndex;
+    FT_UShort  usLastCharIndex;
+    FT_Short   sTypoAscender;
+    FT_Short   sTypoDescender;
+    FT_Short   sTypoLineGap;
+    FT_UShort  usWinAscent;
+    FT_UShort  usWinDescent;
+
+    /* only version 1 tables: */
+
+    FT_ULong   ulCodePageRange1;       /* Bits 0-31   */
+    FT_ULong   ulCodePageRange2;       /* Bits 32-63  */
+
+    /* only version 2 tables: */
+
+    FT_Short   sxHeight;
+    FT_Short   sCapHeight;
+    FT_UShort  usDefaultChar;
+    FT_UShort  usBreakChar;
+    FT_UShort  usMaxContext;
+
+  } TT_OS2;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Struct>                                                              */
+  /*    TT_Postscript                                                      */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A structure used to model a TrueType Postscript table.  All fields */
+  /*    comply to the TrueType specification.  This structure does not     */
+  /*    reference the Postscript glyph names, which can be nevertheless    */
+  /*    accessed with the `ttpost' module.                                 */
+  /*                                                                       */
+  typedef struct  TT_Postscript_
+  {
+    FT_Fixed  FormatType;
+    FT_Fixed  italicAngle;
+    FT_Short  underlinePosition;
+    FT_Short  underlineThickness;
+    FT_ULong  isFixedPitch;
+    FT_ULong  minMemType42;
+    FT_ULong  maxMemType42;
+    FT_ULong  minMemType1;
+    FT_ULong  maxMemType1;
+
+    /* Glyph names follow in the file, but we don't   */
+    /* load them by default.  See the ttpost.c file.  */
+
+  } TT_Postscript;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Struct>                                                              */
+  /*    TT_PCLT                                                            */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A structure used to model a TrueType PCLT table.  All fields       */
+  /*    comply to the TrueType specification.                              */
+  /*                                                                       */
+  typedef struct  TT_PCLT_
+  {
+    FT_Fixed   Version;
+    FT_ULong   FontNumber;
+    FT_UShort  Pitch;
+    FT_UShort  xHeight;
+    FT_UShort  Style;
+    FT_UShort  TypeFamily;
+    FT_UShort  CapHeight;
+    FT_UShort  SymbolSet;
+    FT_Char    TypeFace[16];
+    FT_Char    CharacterComplement[8];
+    FT_Char    FileName[6];
+    FT_Char    StrokeWeight;
+    FT_Char    WidthType;
+    FT_Byte    SerifStyle;
+    FT_Byte    Reserved;
+
+  } TT_PCLT;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Struct>                                                              */
+  /*    TT_MaxProfile                                                      */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    The maximum profile is a table containing many max values which    */
+  /*    can be used to pre-allocate arrays.  This ensures that no memory   */
+  /*    allocation occurs during a glyph load.                             */
+  /*                                                                       */
+  /* <Fields>                                                              */
+  /*    version               :: The version number.                       */
+  /*                                                                       */
+  /*    numGlyphs             :: The number of glyphs in this TrueType     */
+  /*                             font.                                     */
+  /*                                                                       */
+  /*    maxPoints             :: The maximum number of points in a         */
+  /*                             non-composite TrueType glyph.  See also   */
+  /*                             the structure element                     */
+  /*                             `maxCompositePoints'.                     */
+  /*                                                                       */
+  /*    maxContours           :: The maximum number of contours in a       */
+  /*                             non-composite TrueType glyph.  See also   */
+  /*                             the structure element                     */
+  /*                             `maxCompositeContours'.                   */
+  /*                                                                       */
+  /*    maxCompositePoints    :: The maximum number of points in a         */
+  /*                             composite TrueType glyph.  See also the   */
+  /*                             structure element `maxPoints'.            */
+  /*                                                                       */
+  /*    maxCompositeContours  :: The maximum number of contours in a       */
+  /*                             composite TrueType glyph.  See also the   */
+  /*                             structure element `maxContours'.          */
+  /*                                                                       */
+  /*    maxZones              :: The maximum number of zones used for      */
+  /*                             glyph hinting.                            */
+  /*                                                                       */
+  /*    maxTwilightPoints     :: The maximum number of points in the       */
+  /*                             twilight zone used for glyph hinting.     */
+  /*                                                                       */
+  /*    maxStorage            :: The maximum number of elements in the     */
+  /*                             storage area used for glyph hinting.      */
+  /*                                                                       */
+  /*    maxFunctionDefs       :: The maximum number of function            */
+  /*                             definitions in the TrueType bytecode for  */
+  /*                             this font.                                */
+  /*                                                                       */
+  /*    maxInstructionDefs    :: The maximum number of instruction         */
+  /*                             definitions in the TrueType bytecode for  */
+  /*                             this font.                                */
+  /*                                                                       */
+  /*    maxStackElements      :: The maximum number of stack elements used */
+  /*                             during bytecode interpretation.           */
+  /*                                                                       */
+  /*    maxSizeOfInstructions :: The maximum number of TrueType opcodes    */
+  /*                             used for glyph hinting.                   */
+  /*                                                                       */
+  /*    maxComponentElements  :: The maximum number of simple (i.e., non-  */
+  /*                             composite) glyphs in a composite glyph.   */
+  /*                                                                       */
+  /*    maxComponentDepth     :: The maximum nesting depth of composite    */
+  /*                             glyphs.                                   */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    This structure is only used during font loading.                   */
+  /*                                                                       */
+  typedef struct  TT_MaxProfile_
+  {
+    FT_Fixed   version;
+    FT_UShort  numGlyphs;
+    FT_UShort  maxPoints;
+    FT_UShort  maxContours;
+    FT_UShort  maxCompositePoints;
+    FT_UShort  maxCompositeContours;
+    FT_UShort  maxZones;
+    FT_UShort  maxTwilightPoints;
+    FT_UShort  maxStorage;
+    FT_UShort  maxFunctionDefs;
+    FT_UShort  maxInstructionDefs;
+    FT_UShort  maxStackElements;
+    FT_UShort  maxSizeOfInstructions;
+    FT_UShort  maxComponentElements;
+    FT_UShort  maxComponentDepth;
+
+  } TT_MaxProfile;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Enum>                                                                */
+  /*    FT_Sfnt_Tag                                                        */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    An enumeration used to specify the index of an SFNT table.         */
+  /*    Used in the @FT_Get_Sfnt_Table API function.                       */
+  /*                                                                       */
+  typedef enum
+  {
+    ft_sfnt_head = 0,
+    ft_sfnt_maxp = 1,
+    ft_sfnt_os2  = 2,
+    ft_sfnt_hhea = 3,
+    ft_sfnt_vhea = 4,
+    ft_sfnt_post = 5,
+    ft_sfnt_pclt = 6,
+
+    sfnt_max   /* internal end mark */
+
+  } FT_Sfnt_Tag;
+
+  /* */
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_Get_Sfnt_Table                                                  */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Returns a pointer to a given SFNT table within a face.             */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    face :: A handle to the source.                                    */
+  /*                                                                       */
+  /*    tag  :: The index of the SFNT table.                               */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    A type-less pointer to the table.  This will be 0 in case of       */
+  /*    error, or if the corresponding table was not found *OR* loaded     */
+  /*    from the file.                                                     */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    The table is owned by the face object and disappears with it.      */
+  /*                                                                       */
+  /*    This function is only useful to access SFNT tables that are loaded */
+  /*    by the sfnt, truetype, and opentype drivers.  See @FT_Sfnt_Tag for */
+  /*    a list.                                                            */
+  /*                                                                       */
+  FT_EXPORT( void* )
+  FT_Get_Sfnt_Table( FT_Face      face,
+                     FT_Sfnt_Tag  tag );
+
+
+ /**************************************************************************
+  *
+  * @function:
+  *   FT_Load_Sfnt_Table
+  *
+  * @description:
+  *   Loads any font table into client memory.
+  *
+  * @input:
+  *   face ::
+  *     A handle to the source face.
+  *
+  *   tag ::
+  *     The four-byte tag of the table to load.  Use the value 0 if you want
+  *     to access the whole font file.  Otherwise, you can use one of the
+  *     definitions found in the @FT_TRUETYPE_TAGS_H file, or forge a new
+  *     one with @FT_MAKE_TAG.
+  *
+  *   offset ::
+  *     The starting offset in the table (or file if tag == 0).
+  *
+  * @output:
+  *   buffer ::
+  *     The target buffer address.  The client must ensure that the memory
+  *     array is big enough to hold the data.
+  *
+  * @inout:
+  *   length ::
+  *     If the `length' parameter is NULL, then try to load the whole table.
+  *     Return an error code if it fails.
+  *
+  *     Else, if `*length' is 0, exit immediately while returning the
+  *     table's (or file) full size in it.
+  *
+  *     Else the number of bytes to read from the table or file, from the
+  *     starting offset.
+  *
+  * @return:
+  *   FreeType error code.  0 means success.
+  *
+  * @note:
+  *   If you need to determine the table's length you should first call this
+  *   function with `*length' set to 0, as in the following example:
+  *
+  *     {
+  *       FT_ULong  length = 0;
+  *
+  *
+  *       error = FT_Load_Sfnt_Table( face, tag, 0, NULL, &length );
+  *       if ( error ) { ... table does not exist ... }
+  *
+  *       buffer = malloc( length );
+  *       if ( buffer == NULL ) { ... not enough memory ... }
+  *
+  *       error = FT_Load_Sfnt_Table( face, tag, 0, buffer, &length );
+  *       if ( error ) { ... could not load table ... }
+  *     }
+  */
+  FT_EXPORT( FT_Error )
+  FT_Load_Sfnt_Table( FT_Face    face,
+                      FT_ULong   tag,
+                      FT_Long    offset,
+                      FT_Byte*   buffer,
+                      FT_ULong*  length );
+
+
+ /**************************************************************************
+  *
+  * @function:
+  *   FT_Sfnt_Table_Info
+  *
+  * @description:
+  *   Returns information on an SFNT table.
+  *
+  * @input:
+  *   face ::
+  *     A handle to the source face.
+  *
+  *   table_index ::
+  *     The index of an SFNT table.  The function returns
+  *     FT_Err_Table_Missing for an invalid value.
+  *
+  * @output:
+  *   tag ::
+  *     The name tag of the SFNT table.
+  *
+  *   length ::
+  *     The length of the SFNT table.
+  *
+  * @return:
+  *   FreeType error code.  0 means success.
+  *
+  * @note:
+  *   SFNT tables with length zero are treated as missing by Windows.
+  *
+  */
+  FT_EXPORT( FT_Error )
+  FT_Sfnt_Table_Info( FT_Face    face,
+                      FT_UInt    table_index,
+                      FT_ULong  *tag,
+                      FT_ULong  *length );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_Get_CMap_Language_ID                                            */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Return TrueType/sfnt specific cmap language ID.  Definitions of    */
+  /*    language ID values are in `freetype/ttnameid.h'.                   */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    charmap ::                                                         */
+  /*      The target charmap.                                              */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    The language ID of `charmap'.  If `charmap' doesn't belong to a    */
+  /*    TrueType/sfnt face, just return 0 as the default value.            */
+  /*                                                                       */
+  FT_EXPORT( FT_ULong )
+  FT_Get_CMap_Language_ID( FT_CharMap  charmap );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_Get_CMap_Format                                                 */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Return TrueType/sfnt specific cmap format.                         */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    charmap ::                                                         */
+  /*      The target charmap.                                              */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    The format of `charmap'.  If `charmap' doesn't belong to a         */
+  /*    TrueType/sfnt face, return -1.                                     */
+  /*                                                                       */
+  FT_EXPORT( FT_Long )
+  FT_Get_CMap_Format( FT_CharMap  charmap );
+
+  /* */
+
+
+FT_END_HEADER
+
+#endif /* __TTTABLES_H__ */
+
+
+/* END */
diff --git a/include/freetype2/freetype/tttags.h b/include/freetype2/freetype/tttags.h
new file mode 100644 (file)
index 0000000..e10244c
--- /dev/null
@@ -0,0 +1,99 @@
+/***************************************************************************/
+/*                                                                         */
+/*  tttags.h                                                               */
+/*                                                                         */
+/*    Tags for TrueType and OpenType tables (specification only).          */
+/*                                                                         */
+/*  Copyright 1996-2001, 2004, 2005 by                                     */
+/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
+/*                                                                         */
+/*  This file is part of the FreeType project, and may only be used,       */
+/*  modified, and distributed under the terms of the FreeType project      */
+/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
+/*  this file you indicate that you have read the license and              */
+/*  understand and accept it fully.                                        */
+/*                                                                         */
+/***************************************************************************/
+
+
+#ifndef __TTAGS_H__
+#define __TTAGS_H__
+
+
+#include <ft2build.h>
+#include FT_FREETYPE_H
+
+#ifdef FREETYPE_H
+#error "freetype.h of FreeType 1 has been loaded!"
+#error "Please fix the directory search order for header files"
+#error "so that freetype.h of FreeType 2 is found first."
+#endif
+
+
+FT_BEGIN_HEADER
+
+
+#define TTAG_avar  FT_MAKE_TAG( 'a', 'v', 'a', 'r' )
+#define TTAG_BASE  FT_MAKE_TAG( 'B', 'A', 'S', 'E' )
+#define TTAG_bdat  FT_MAKE_TAG( 'b', 'd', 'a', 't' )
+#define TTAG_BDF   FT_MAKE_TAG( 'B', 'D', 'F', ' ' )
+#define TTAG_bhed  FT_MAKE_TAG( 'b', 'h', 'e', 'd' )
+#define TTAG_bloc  FT_MAKE_TAG( 'b', 'l', 'o', 'c' )
+#define TTAG_bsln  FT_MAKE_TAG( 'b', 's', 'l', 'n' )
+#define TTAG_CFF   FT_MAKE_TAG( 'C', 'F', 'F', ' ' )
+#define TTAG_cmap  FT_MAKE_TAG( 'c', 'm', 'a', 'p' )
+#define TTAG_cvar  FT_MAKE_TAG( 'c', 'v', 'a', 'r' )
+#define TTAG_cvt   FT_MAKE_TAG( 'c', 'v', 't', ' ' )
+#define TTAG_DSIG  FT_MAKE_TAG( 'D', 'S', 'I', 'G' )
+#define TTAG_EBDT  FT_MAKE_TAG( 'E', 'B', 'D', 'T' )
+#define TTAG_EBLC  FT_MAKE_TAG( 'E', 'B', 'L', 'C' )
+#define TTAG_EBSC  FT_MAKE_TAG( 'E', 'B', 'S', 'C' )
+#define TTAG_feat  FT_MAKE_TAG( 'f', 'e', 'a', 't' )
+#define TTAG_fpgm  FT_MAKE_TAG( 'f', 'p', 'g', 'm' )
+#define TTAG_fvar  FT_MAKE_TAG( 'f', 'v', 'a', 'r' )
+#define TTAG_gasp  FT_MAKE_TAG( 'g', 'a', 's', 'p' )
+#define TTAG_GDEF  FT_MAKE_TAG( 'G', 'D', 'E', 'F' )
+#define TTAG_glyf  FT_MAKE_TAG( 'g', 'l', 'y', 'f' )
+#define TTAG_GPOS  FT_MAKE_TAG( 'G', 'P', 'O', 'S' )
+#define TTAG_GSUB  FT_MAKE_TAG( 'G', 'S', 'U', 'B' )
+#define TTAG_gvar  FT_MAKE_TAG( 'g', 'v', 'a', 'r' )
+#define TTAG_hdmx  FT_MAKE_TAG( 'h', 'd', 'm', 'x' )
+#define TTAG_head  FT_MAKE_TAG( 'h', 'e', 'a', 'd' )
+#define TTAG_hhea  FT_MAKE_TAG( 'h', 'h', 'e', 'a' )
+#define TTAG_hmtx  FT_MAKE_TAG( 'h', 'm', 't', 'x' )
+#define TTAG_JSTF  FT_MAKE_TAG( 'J', 'S', 'T', 'F' )
+#define TTAG_just  FT_MAKE_TAG( 'j', 'u', 's', 't' )
+#define TTAG_kern  FT_MAKE_TAG( 'k', 'e', 'r', 'n' )
+#define TTAG_lcar  FT_MAKE_TAG( 'l', 'c', 'a', 'r' )
+#define TTAG_loca  FT_MAKE_TAG( 'l', 'o', 'c', 'a' )
+#define TTAG_LTSH  FT_MAKE_TAG( 'L', 'T', 'S', 'H' )
+#define TTAG_maxp  FT_MAKE_TAG( 'm', 'a', 'x', 'p' )
+#define TTAG_META  FT_MAKE_TAG( 'M', 'E', 'T', 'A' )
+#define TTAG_MMFX  FT_MAKE_TAG( 'M', 'M', 'F', 'X' )
+#define TTAG_MMSD  FT_MAKE_TAG( 'M', 'M', 'S', 'D' )
+#define TTAG_mort  FT_MAKE_TAG( 'm', 'o', 'r', 't' )
+#define TTAG_morx  FT_MAKE_TAG( 'm', 'o', 'r', 'x' )
+#define TTAG_name  FT_MAKE_TAG( 'n', 'a', 'm', 'e' )
+#define TTAG_opbd  FT_MAKE_TAG( 'o', 'p', 'b', 'd' )
+#define TTAG_OS2   FT_MAKE_TAG( 'O', 'S', '/', '2' )
+#define TTAG_OTTO  FT_MAKE_TAG( 'O', 'T', 'T', 'O' )
+#define TTAG_PCLT  FT_MAKE_TAG( 'P', 'C', 'L', 'T' )
+#define TTAG_post  FT_MAKE_TAG( 'p', 'o', 's', 't' )
+#define TTAG_prep  FT_MAKE_TAG( 'p', 'r', 'e', 'p' )
+#define TTAG_prop  FT_MAKE_TAG( 'p', 'r', 'o', 'p' )
+#define TTAG_SING  FT_MAKE_TAG( 'S', 'I', 'N', 'G' )
+#define TTAG_trak  FT_MAKE_TAG( 't', 'r', 'a', 'k' )
+#define TTAG_true  FT_MAKE_TAG( 't', 'r', 'u', 'e' )
+#define TTAG_ttc   FT_MAKE_TAG( 't', 't', 'c', ' ' )
+#define TTAG_ttcf  FT_MAKE_TAG( 't', 't', 'c', 'f' )
+#define TTAG_VDMX  FT_MAKE_TAG( 'V', 'D', 'M', 'X' )
+#define TTAG_vhea  FT_MAKE_TAG( 'v', 'h', 'e', 'a' )
+#define TTAG_vmtx  FT_MAKE_TAG( 'v', 'm', 't', 'x' )
+
+
+FT_END_HEADER
+
+#endif /* __TTAGS_H__ */
+
+
+/* END */
diff --git a/include/freetype2/freetype/ttunpat.h b/include/freetype2/freetype/ttunpat.h
new file mode 100644 (file)
index 0000000..a016275
--- /dev/null
@@ -0,0 +1,59 @@
+/***************************************************************************/
+/*                                                                         */
+/*  ttunpat.h                                                              */
+/*                                                                         */
+/*    Definitions for the unpatented TrueType hinting system               */
+/*                                                                         */
+/*  Copyright 2003, 2006 by                                                */
+/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
+/*                                                                         */
+/*  Written by Graham Asher <graham.asher@btinternet.com>                  */
+/*                                                                         */
+/*  This file is part of the FreeType project, and may only be used,       */
+/*  modified, and distributed under the terms of the FreeType project      */
+/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
+/*  this file you indicate that you have read the license and              */
+/*  understand and accept it fully.                                        */
+/*                                                                         */
+/***************************************************************************/
+
+
+#ifndef __TTUNPAT_H__
+#define __TTUNPAT_H__
+
+
+#include <ft2build.h>
+#include FT_FREETYPE_H
+
+#ifdef FREETYPE_H
+#error "freetype.h of FreeType 1 has been loaded!"
+#error "Please fix the directory search order for header files"
+#error "so that freetype.h of FreeType 2 is found first."
+#endif
+
+
+FT_BEGIN_HEADER
+
+
+ /***************************************************************************
+  *
+  * @constant:
+  *   FT_PARAM_TAG_UNPATENTED_HINTING
+  *
+  * @description:
+  *   A constant used as the tag of an @FT_Parameter structure to indicate
+  *   that unpatented methods only should be used by the TrueType bytecode
+  *   interpreter for a typeface opened by @FT_Open_Face.
+  *
+  */
+#define FT_PARAM_TAG_UNPATENTED_HINTING  FT_MAKE_TAG( 'u', 'n', 'p', 'a' )
+
+ /* */
+
+FT_END_HEADER
+
+
+#endif /* __TTUNPAT_H__ */
+
+
+/* END */
diff --git a/include/ft2build.h b/include/ft2build.h
new file mode 100644 (file)
index 0000000..6a3b8d9
--- /dev/null
@@ -0,0 +1,61 @@
+/***************************************************************************/
+/*                                                                         */
+/*  ft2build.h                                                             */
+/*                                                                         */
+/*    Build macros of the FreeType 2 library.                              */
+/*                                                                         */
+/*  Copyright 1996-2001, 2003, 2006 by                                     */
+/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
+/*                                                                         */
+/*  This file is part of the FreeType project, and may only be used,       */
+/*  modified, and distributed under the terms of the FreeType project      */
+/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
+/*  this file you indicate that you have read the license and              */
+/*  understand and accept it fully.                                        */
+/*                                                                         */
+/***************************************************************************/
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* This is a Unix-specific version of <ft2build.h> that should be used   */
+  /* exclusively *after* installation of the library.                      */
+  /*                                                                       */
+  /* It assumes that `/usr/local/include/freetype2' (or whatever is        */
+  /* returned by the `freetype-config --cflags' or `pkg-config --cflags'   */
+  /* command) is in your compilation include path.                         */
+  /*                                                                       */
+  /* We don't need to do anything special in this release.  However, for   */
+  /* a future FreeType 2 release, the following installation changes will  */
+  /* be performed:                                                         */
+  /*                                                                       */
+  /*   - The contents of `freetype-2.x/include/freetype' will be installed */
+  /*     to `/usr/local/include/freetype2' instead of                      */
+  /*     `/usr/local/include/freetype2/freetype'.                          */
+  /*                                                                       */
+  /*   - This file will #include <freetype2/config/ftheader.h>, instead    */
+  /*     of <freetype/config/ftheader.h>.                                  */
+  /*                                                                       */
+  /*   - The contents of `ftheader.h' will be processed with `sed' to      */
+  /*     replace all `<freetype/xxx>' with `<freetype2/xxx>'.              */
+  /*                                                                       */
+  /*   - Adding `/usr/local/include/freetype2' to your compilation include */
+  /*     path will not be necessary anymore.                               */
+  /*                                                                       */
+  /* These changes will be transparent to client applications which use    */
+  /* freetype-config (or pkg-config).  No modifications will be necessary  */
+  /* to compile with the new scheme.                                       */
+  /*                                                                       */
+  /*************************************************************************/
+
+
+#ifndef __FT2_BUILD_UNIX_H__
+#define __FT2_BUILD_UNIX_H__
+
+  /* `<prefix>/include/freetype2' must be in your current inclusion path */
+#include <freetype/config/ftheader.h>
+
+#endif /* __FT2_BUILD_UNIX_H__ */
+
+
+/* END */
diff --git a/include/glm/CMakeLists.txt b/include/glm/CMakeLists.txt
new file mode 100644 (file)
index 0000000..aaeae62
--- /dev/null
@@ -0,0 +1,43 @@
+set(NAME glm_dummy)
+
+file(GLOB ROOT_SOURCE *.cpp)
+file(GLOB ROOT_INLINE *.inl)
+file(GLOB ROOT_HEADER *.hpp)
+file(GLOB ROOT_TEXT ../*.txt)
+file(GLOB ROOT_NAT ../util/glm.natvis)
+
+file(GLOB_RECURSE CORE_SOURCE ./detail/*.cpp)
+file(GLOB_RECURSE CORE_INLINE ./detail/*.inl)
+file(GLOB_RECURSE CORE_HEADER ./detail/*.hpp)
+
+file(GLOB_RECURSE GTC_SOURCE ./gtc/*.cpp)
+file(GLOB_RECURSE GTC_INLINE ./gtc/*.inl)
+file(GLOB_RECURSE GTC_HEADER ./gtc/*.hpp)
+
+file(GLOB_RECURSE GTX_SOURCE ./gtx/*.cpp)
+file(GLOB_RECURSE GTX_INLINE ./gtx/*.inl)
+file(GLOB_RECURSE GTX_HEADER ./gtx/*.hpp)
+
+source_group("Text Files" FILES ${ROOT_TEXT})
+source_group("Core Files" FILES ${CORE_SOURCE})
+source_group("Core Files" FILES ${CORE_INLINE})
+source_group("Core Files" FILES ${CORE_HEADER})
+source_group("GTC Files" FILES ${GTC_SOURCE})
+source_group("GTC Files" FILES ${GTC_INLINE})
+source_group("GTC Files" FILES ${GTC_HEADER})
+source_group("GTX Files" FILES ${GTX_SOURCE})
+source_group("GTX Files" FILES ${GTX_INLINE})
+source_group("GTX Files" FILES ${GTX_HEADER})
+
+include_directories(${CMAKE_CURRENT_SOURCE_DIR}/..)
+
+if(GLM_TEST_ENABLE)
+       add_executable(${NAME} ${ROOT_TEXT} ${ROOT_NAT}
+               ${ROOT_SOURCE}    ${ROOT_INLINE}    ${ROOT_HEADER}
+               ${CORE_SOURCE}    ${CORE_INLINE}    ${CORE_HEADER}
+               ${GTC_SOURCE}     ${GTC_INLINE}     ${GTC_HEADER}
+               ${GTX_SOURCE}     ${GTX_INLINE}     ${GTX_HEADER})
+endif(GLM_TEST_ENABLE)
+
+#add_library(glm STATIC glm.cpp)
+#add_library(glm_shared SHARED glm.cpp)
diff --git a/include/glm/common.hpp b/include/glm/common.hpp
new file mode 100644 (file)
index 0000000..b2ff9da
--- /dev/null
@@ -0,0 +1,35 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref core
+/// @file glm/common.hpp
+/// @date 2013-12-24 / 2013-12-24
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////
+
+#pragma once
+
+#include "detail/func_common.hpp"
diff --git a/include/glm/detail/_features.hpp b/include/glm/detail/_features.hpp
new file mode 100644 (file)
index 0000000..b0aa303
--- /dev/null
@@ -0,0 +1,428 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref core
+/// @file glm/detail/_features.hpp
+/// @date 2013-02-20 / 2013-02-20
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////
+
+#pragma once
+
+// #define GLM_CXX98_EXCEPTIONS
+// #define GLM_CXX98_RTTI
+
+// #define GLM_CXX11_RVALUE_REFERENCES
+// Rvalue references - GCC 4.3
+// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2118.html
+
+// GLM_CXX11_TRAILING_RETURN
+// Rvalue references for *this - GCC not supported
+// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2439.htm
+
+// GLM_CXX11_NONSTATIC_MEMBER_INIT
+// Initialization of class objects by rvalues - GCC any
+// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2004/n1610.html
+
+// GLM_CXX11_NONSTATIC_MEMBER_INIT
+// Non-static data member initializers - GCC 4.7
+// http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2008/n2756.htm
+
+// #define GLM_CXX11_VARIADIC_TEMPLATE
+// Variadic templates - GCC 4.3
+// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2242.pdf
+
+// 
+// Extending variadic template template parameters - GCC 4.4
+// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2555.pdf
+
+// #define GLM_CXX11_GENERALIZED_INITIALIZERS
+// Initializer lists - GCC 4.4
+// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2672.htm
+
+// #define GLM_CXX11_STATIC_ASSERT 
+// Static assertions - GCC 4.3
+// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2004/n1720.html
+
+// #define GLM_CXX11_AUTO_TYPE
+// auto-typed variables - GCC 4.4
+// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n1984.pdf
+
+// #define GLM_CXX11_AUTO_TYPE
+// Multi-declarator auto - GCC 4.4
+// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2004/n1737.pdf
+
+// #define GLM_CXX11_AUTO_TYPE
+// Removal of auto as a storage-class specifier - GCC 4.4
+// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2546.htm
+
+// #define GLM_CXX11_AUTO_TYPE
+// New function declarator syntax - GCC 4.4
+// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2541.htm
+
+// #define GLM_CXX11_LAMBDAS
+// New wording for C++0x lambdas - GCC 4.5
+// http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2009/n2927.pdf
+
+// #define GLM_CXX11_DECLTYPE
+// Declared type of an expression - GCC 4.3
+// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2343.pdf
+
+// 
+// Right angle brackets - GCC 4.3
+// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1757.html
+
+// 
+// Default template arguments for function templates   DR226   GCC 4.3
+// http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#226
+
+// 
+// Solving the SFINAE problem for expressions  DR339   GCC 4.4
+// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2634.html
+
+// #define GLM_CXX11_ALIAS_TEMPLATE
+// Template aliases    N2258   GCC 4.7
+// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2258.pdf
+
+// 
+// Extern templates    N1987   Yes
+// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n1987.htm
+
+// #define GLM_CXX11_NULLPTR
+// Null pointer constant       N2431   GCC 4.6
+// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2431.pdf
+
+// #define GLM_CXX11_STRONG_ENUMS
+// Strongly-typed enums        N2347   GCC 4.4
+// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2347.pdf
+
+// 
+// Forward declarations for enums      N2764   GCC 4.6
+// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2764.pdf
+
+// 
+// Generalized attributes      N2761   GCC 4.8
+// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2761.pdf
+
+// 
+// Generalized constant expressions    N2235   GCC 4.6
+// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2235.pdf
+
+// 
+// Alignment support   N2341   GCC 4.8
+// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2341.pdf
+
+// #define GLM_CXX11_DELEGATING_CONSTRUCTORS
+// Delegating constructors     N1986   GCC 4.7
+// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n1986.pdf
+
+// 
+// Inheriting constructors     N2540   GCC 4.8
+// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2540.htm
+
+// #define GLM_CXX11_EXPLICIT_CONVERSIONS
+// Explicit conversion operators       N2437   GCC 4.5
+// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2437.pdf
+
+// 
+// New character types N2249   GCC 4.4
+// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2249.html
+
+// 
+// Unicode string literals     N2442   GCC 4.5
+// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2442.htm
+
+// 
+// Raw string literals N2442   GCC 4.5
+// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2442.htm
+
+// 
+// Universal character name literals   N2170   GCC 4.5
+// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2170.html
+
+// #define GLM_CXX11_USER_LITERALS
+// User-defined literals               N2765   GCC 4.7
+// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2765.pdf
+
+// 
+// Standard Layout Types       N2342   GCC 4.5
+// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2342.htm
+
+// #define GLM_CXX11_DEFAULTED_FUNCTIONS
+// #define GLM_CXX11_DELETED_FUNCTIONS
+// Defaulted and deleted functions     N2346   GCC 4.4
+// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2346.htm
+
+// 
+// Extended friend declarations        N1791   GCC 4.7
+// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1791.pdf
+
+// 
+// Extending sizeof    N2253   GCC 4.4
+// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2253.html
+
+// #define GLM_CXX11_INLINE_NAMESPACES
+// Inline namespaces   N2535   GCC 4.4
+// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2535.htm
+
+// #define GLM_CXX11_UNRESTRICTED_UNIONS
+// Unrestricted unions N2544   GCC 4.6
+// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2544.pdf
+
+// #define GLM_CXX11_LOCAL_TYPE_TEMPLATE_ARGS
+// Local and unnamed types as template arguments       N2657   GCC 4.5
+// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2657.htm
+
+// #define GLM_CXX11_RANGE_FOR
+// Range-based for     N2930   GCC 4.6
+// http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2009/n2930.html
+
+// #define GLM_CXX11_OVERRIDE_CONTROL
+// Explicit virtual overrides  N2928 N3206 N3272       GCC 4.7
+// http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2009/n2928.htm
+// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2010/n3206.htm
+// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2011/n3272.htm
+
+// 
+// Minimal support for garbage collection and reachability-based leak detection        N2670   No
+// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2670.htm
+
+// #define GLM_CXX11_NOEXCEPT
+// Allowing move constructors to throw [noexcept]      N3050   GCC 4.6 (core language only)
+// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2010/n3050.html
+
+// 
+// Defining move special member functions      N3053   GCC 4.6
+// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2010/n3053.html
+
+// 
+// Sequence points     N2239   Yes
+// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2239.html
+
+// 
+// Atomic operations   N2427   GCC 4.4
+// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2239.html
+
+// 
+// Strong Compare and Exchange N2748   GCC 4.5
+// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2427.html
+
+// 
+// Bidirectional Fences        N2752   GCC 4.8
+// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2752.htm
+
+// 
+// Memory model        N2429   GCC 4.8
+// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2429.htm
+
+// 
+// Data-dependency ordering: atomics and memory model  N2664   GCC 4.4
+// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2664.htm
+
+// 
+// Propagating exceptions      N2179   GCC 4.4
+// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2179.html
+
+// 
+// Abandoning a process and at_quick_exit      N2440   GCC 4.8
+// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2440.htm
+
+// 
+// Allow atomics use in signal handlers        N2547   Yes
+// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2547.htm
+
+// 
+// Thread-local storage        N2659   GCC 4.8
+// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2659.htm
+
+// 
+// Dynamic initialization and destruction with concurrency     N2660   GCC 4.3
+// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2660.htm
+
+// 
+// __func__ predefined identifier      N2340   GCC 4.3
+// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2340.htm
+
+// 
+// C99 preprocessor    N1653   GCC 4.3
+// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2004/n1653.htm
+
+// 
+// long long   N1811   GCC 4.3
+// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1811.pdf
+
+// 
+// Extended integral types     N1988   Yes
+// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n1988.pdf
+
+#if(GLM_COMPILER & GLM_COMPILER_GCC)
+
+#      if(GLM_COMPILER >= GLM_COMPILER_GCC43)
+#              define GLM_CXX11_STATIC_ASSERT
+#      endif
+
+#elif(GLM_COMPILER & (GLM_COMPILER_APPLE_CLANG | GLM_COMPILER_LLVM))
+#      if(__has_feature(cxx_exceptions))
+#              define GLM_CXX98_EXCEPTIONS
+#      endif
+
+#      if(__has_feature(cxx_rtti))
+#              define GLM_CXX98_RTTI
+#      endif
+
+#      if(__has_feature(cxx_access_control_sfinae))
+#              define GLM_CXX11_ACCESS_CONTROL_SFINAE
+#      endif
+
+#      if(__has_feature(cxx_alias_templates))
+#              define GLM_CXX11_ALIAS_TEMPLATE
+#      endif
+
+#      if(__has_feature(cxx_alignas))
+#              define GLM_CXX11_ALIGNAS
+#      endif
+
+#      if(__has_feature(cxx_attributes))
+#              define GLM_CXX11_ATTRIBUTES
+#      endif
+
+#      if(__has_feature(cxx_constexpr))
+#              define GLM_CXX11_CONSTEXPR
+#      endif
+
+#      if(__has_feature(cxx_decltype))
+#              define GLM_CXX11_DECLTYPE
+#      endif
+
+#      if(__has_feature(cxx_default_function_template_args))
+#              define GLM_CXX11_DEFAULT_FUNCTION_TEMPLATE_ARGS
+#      endif
+
+#      if(__has_feature(cxx_defaulted_functions))
+#              define GLM_CXX11_DEFAULTED_FUNCTIONS
+#      endif
+
+#      if(__has_feature(cxx_delegating_constructors))
+#              define GLM_CXX11_DELEGATING_CONSTRUCTORS
+#      endif
+
+#      if(__has_feature(cxx_deleted_functions))
+#              define GLM_CXX11_DELETED_FUNCTIONS
+#      endif
+
+#      if(__has_feature(cxx_explicit_conversions))
+#              define GLM_CXX11_EXPLICIT_CONVERSIONS
+#      endif
+
+#      if(__has_feature(cxx_generalized_initializers))
+#              define GLM_CXX11_GENERALIZED_INITIALIZERS
+#      endif
+
+#      if(__has_feature(cxx_implicit_moves))
+#              define GLM_CXX11_IMPLICIT_MOVES
+#      endif
+
+#      if(__has_feature(cxx_inheriting_constructors))
+#              define GLM_CXX11_INHERITING_CONSTRUCTORS
+#      endif
+
+#      if(__has_feature(cxx_inline_namespaces))
+#              define GLM_CXX11_INLINE_NAMESPACES
+#      endif
+
+#      if(__has_feature(cxx_lambdas))
+#              define GLM_CXX11_LAMBDAS
+#      endif
+
+#      if(__has_feature(cxx_local_type_template_args))
+#              define GLM_CXX11_LOCAL_TYPE_TEMPLATE_ARGS
+#      endif
+
+#      if(__has_feature(cxx_noexcept))
+#              define GLM_CXX11_NOEXCEPT
+#      endif
+
+#      if(__has_feature(cxx_nonstatic_member_init))
+#              define GLM_CXX11_NONSTATIC_MEMBER_INIT
+#      endif
+
+#      if(__has_feature(cxx_nullptr))
+#              define GLM_CXX11_NULLPTR
+#      endif
+
+#      if(__has_feature(cxx_override_control))
+#              define GLM_CXX11_OVERRIDE_CONTROL
+#      endif
+
+#      if(__has_feature(cxx_reference_qualified_functions))
+#              define GLM_CXX11_REFERENCE_QUALIFIED_FUNCTIONS
+#      endif
+
+#      if(__has_feature(cxx_range_for))
+#              define GLM_CXX11_RANGE_FOR
+#      endif
+
+#      if(__has_feature(cxx_raw_string_literals))
+#              define GLM_CXX11_RAW_STRING_LITERALS
+#      endif
+
+#      if(__has_feature(cxx_rvalue_references))
+#              define GLM_CXX11_RVALUE_REFERENCES
+#      endif
+
+#      if(__has_feature(cxx_static_assert))
+#              define GLM_CXX11_STATIC_ASSERT
+#      endif
+
+#      if(__has_feature(cxx_auto_type))
+#              define GLM_CXX11_AUTO_TYPE
+#      endif
+
+#      if(__has_feature(cxx_strong_enums))
+#              define GLM_CXX11_STRONG_ENUMS
+#      endif
+
+#      if(__has_feature(cxx_trailing_return))
+#              define GLM_CXX11_TRAILING_RETURN
+#      endif
+
+#      if(__has_feature(cxx_unicode_literals))
+#              define GLM_CXX11_UNICODE_LITERALS
+#      endif
+
+#      if(__has_feature(cxx_unrestricted_unions))
+#              define GLM_CXX11_UNRESTRICTED_UNIONS
+#      endif
+
+#      if(__has_feature(cxx_user_literals))
+#              define GLM_CXX11_USER_LITERALS
+#      endif
+
+#      if(__has_feature(cxx_variadic_templates))
+#              define GLM_CXX11_VARIADIC_TEMPLATES
+#      endif
+
+#endif//(GLM_COMPILER & (GLM_COMPILER_APPLE_CLANG | GLM_COMPILER_LLVM))
diff --git a/include/glm/detail/_fixes.hpp b/include/glm/detail/_fixes.hpp
new file mode 100644 (file)
index 0000000..0405f33
--- /dev/null
@@ -0,0 +1,59 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref core
+/// @file glm/detail/_fixes.hpp
+/// @date 2011-02-21 / 2011-11-22
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////
+
+#include <cmath>
+
+//! Workaround for compatibility with other libraries
+#ifdef max
+#undef max
+#endif
+
+//! Workaround for compatibility with other libraries
+#ifdef min
+#undef min
+#endif
+
+//! Workaround for Android
+#ifdef isnan
+#undef isnan
+#endif
+
+//! Workaround for Android
+#ifdef isinf
+#undef isinf
+#endif
+
+//! Workaround for Chrone Native Client
+#ifdef log2
+#undef log2
+#endif
+
diff --git a/include/glm/detail/_noise.hpp b/include/glm/detail/_noise.hpp
new file mode 100644 (file)
index 0000000..e887597
--- /dev/null
@@ -0,0 +1,136 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref core
+/// @file glm/detail/_noise.hpp
+/// @date 2013-12-24 / 2013-12-24
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////
+
+#pragma once
+
+#include "../vec2.hpp"
+#include "../vec3.hpp"
+#include "../vec4.hpp"
+#include "../common.hpp"
+
+namespace glm{
+namespace detail
+{
+       template <typename T>
+       GLM_FUNC_QUALIFIER T mod289(T const & x)
+       {
+               return x - floor(x * static_cast<T>(1.0) / static_cast<T>(289.0)) * static_cast<T>(289.0);
+       }
+
+       template <typename T>
+       GLM_FUNC_QUALIFIER T permute(T const & x)
+       {
+               return mod289(((x * static_cast<T>(34)) + static_cast<T>(1)) * x);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec2<T, P> permute(tvec2<T, P> const & x)
+       {
+               return mod289(((x * static_cast<T>(34)) + static_cast<T>(1)) * x);
+       }
+       
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec3<T, P> permute(tvec3<T, P> const & x)
+       {
+               return mod289(((x * static_cast<T>(34)) + static_cast<T>(1)) * x);
+       }
+       
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec4<T, P> permute(tvec4<T, P> const & x)
+       {
+               return mod289(((x * static_cast<T>(34)) + static_cast<T>(1)) * x);
+       }
+/*
+       template <typename T, precision P, template<typename> class vecType>
+       GLM_FUNC_QUALIFIER vecType<T, P> permute(vecType<T, P> const & x)
+       {
+               return mod289(((x * T(34)) + T(1)) * x);
+       }
+*/
+       template <typename T>
+       GLM_FUNC_QUALIFIER T taylorInvSqrt(T const & r)
+       {
+               return T(1.79284291400159) - T(0.85373472095314) * r;
+       }
+       
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec2<T, P> taylorInvSqrt(tvec2<T, P> const & r)
+       {
+               return T(1.79284291400159) - T(0.85373472095314) * r;
+       }
+       
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec3<T, P> taylorInvSqrt(tvec3<T, P> const & r)
+       {
+               return T(1.79284291400159) - T(0.85373472095314) * r;
+       }
+       
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec4<T, P> taylorInvSqrt(tvec4<T, P> const & r)
+       {
+               return T(1.79284291400159) - T(0.85373472095314) * r;
+       }
+/*
+       template <typename T, precision P, template<typename> class vecType>
+       GLM_FUNC_QUALIFIER vecType<T, P> taylorInvSqrt(vecType<T, P> const & r)
+       {
+               return T(1.79284291400159) - T(0.85373472095314) * r;
+       }
+*/
+       
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec2<T, P> fade(tvec2<T, P> const & t)
+       {
+               return (t * t * t) * (t * (t * T(6) - T(15)) + T(10));
+       }
+       
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec3<T, P> fade(tvec3<T, P> const & t)
+       {
+               return (t * t * t) * (t * (t * T(6) - T(15)) + T(10));
+       }
+       
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec4<T, P> fade(tvec4<T, P> const & t)
+       {
+               return (t * t * t) * (t * (t * T(6) - T(15)) + T(10));
+       }
+/*
+       template <typename T, precision P, template <typename> class vecType>
+       GLM_FUNC_QUALIFIER vecType<T, P> fade(vecType<T, P> const & t)
+       {
+               return (t * t * t) * (t * (t * T(6) - T(15)) + T(10));
+       }
+*/
+}//namespace detail
+}//namespace glm
+
diff --git a/include/glm/detail/_swizzle.hpp b/include/glm/detail/_swizzle.hpp
new file mode 100644 (file)
index 0000000..2f23d0e
--- /dev/null
@@ -0,0 +1,833 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref core
+/// @file glm/detail/_swizzle.hpp
+/// @date 2006-04-20 / 2011-02-16
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////
+
+#pragma once
+
+namespace glm{
+namespace detail
+{
+       // Internal class for implementing swizzle operators
+       template <typename T, int N>
+       struct _swizzle_base0
+       {
+               typedef T       value_type;
+
+       protected:
+               GLM_FUNC_QUALIFIER value_type&         elem   (size_t i)       { return (reinterpret_cast<value_type*>(_buffer))[i]; }
+               GLM_FUNC_QUALIFIER const value_type&   elem   (size_t i) const { return (reinterpret_cast<const value_type*>(_buffer))[i]; }
+
+               // Use an opaque buffer to *ensure* the compiler doesn't call a constructor.
+               // The size 1 buffer is assumed to aligned to the actual members so that the
+               // elem() 
+               char    _buffer[1];
+       };
+
+       template <typename T, precision P, typename V, int E0, int E1, int E2, int E3, int N>
+       struct _swizzle_base1 : public _swizzle_base0<T, N>
+       {
+       };
+
+       template <typename T, precision P, typename V, int E0, int E1>
+       struct _swizzle_base1<T, P, V,E0,E1,-1,-2,2> : public _swizzle_base0<T, 2>
+       {
+               GLM_FUNC_QUALIFIER V operator ()()  const { return V(this->elem(E0), this->elem(E1)); }
+       };
+
+       template <typename T, precision P, typename V, int E0, int E1, int E2>
+       struct _swizzle_base1<T, P, V,E0,E1,E2,-1,3> : public _swizzle_base0<T, 3>
+       {
+               GLM_FUNC_QUALIFIER V operator ()()  const { return V(this->elem(E0), this->elem(E1), this->elem(E2)); }
+       };
+
+       template <typename T, precision P, typename V, int E0, int E1, int E2, int E3>
+       struct _swizzle_base1<T, P, V,E0,E1,E2,E3,4> : public _swizzle_base0<T, 4>
+       { 
+               GLM_FUNC_QUALIFIER V operator ()()  const { return V(this->elem(E0), this->elem(E1), this->elem(E2), this->elem(E3)); }
+       };
+
+       // Internal class for implementing swizzle operators
+       /*
+               Template parameters:
+
+               ValueType = type of scalar values (e.g. float, double)
+               VecType   = class the swizzle is applies to (e.g. tvec3<float>)
+               N         = number of components in the vector (e.g. 3)
+               E0...3    = what index the n-th element of this swizzle refers to in the unswizzled vec
+
+               DUPLICATE_ELEMENTS = 1 if there is a repeated element, 0 otherwise (used to specialize swizzles
+                       containing duplicate elements so that they cannot be used as r-values).            
+       */
+       template <typename ValueType, precision P, typename VecType, int N, int E0, int E1, int E2, int E3, int DUPLICATE_ELEMENTS>
+       struct _swizzle_base2 : public _swizzle_base1<ValueType, P, VecType,E0,E1,E2,E3,N>
+       {
+               typedef VecType vec_type;
+               typedef ValueType value_type;
+
+               GLM_FUNC_QUALIFIER _swizzle_base2& operator= (const ValueType& t)
+               {
+                       for (int i = 0; i < N; ++i)
+                               (*this)[i] = t;
+                       return *this;
+               }
+
+               GLM_FUNC_QUALIFIER _swizzle_base2& operator= (const VecType& that)
+               {
+                       struct op { 
+                               GLM_FUNC_QUALIFIER void operator() (value_type& e, value_type& t) { e = t; } 
+                       };
+                       _apply_op(that, op());
+                       return *this;
+               }
+
+               GLM_FUNC_QUALIFIER void operator -= (const VecType& that)
+               {
+                       struct op { 
+                               GLM_FUNC_QUALIFIER void operator() (value_type& e, value_type& t) { e -= t; } 
+                       };
+                       _apply_op(that, op());
+               }
+
+               GLM_FUNC_QUALIFIER void operator += (const VecType& that)
+               {
+                       struct op { 
+                               GLM_FUNC_QUALIFIER void operator() (value_type& e, value_type& t) { e += t; } 
+                       };
+                       _apply_op(that, op());
+               }
+
+               GLM_FUNC_QUALIFIER void operator *= (const VecType& that)
+               {
+                       struct op { 
+                               GLM_FUNC_QUALIFIER void operator() (value_type& e, value_type& t) { e *= t; } 
+                       };
+                       _apply_op(that, op());
+               }
+
+               GLM_FUNC_QUALIFIER void operator /= (const VecType& that)
+               {
+                       struct op { 
+                               GLM_FUNC_QUALIFIER void operator() (value_type& e, value_type& t) { e /= t; } 
+                       };
+                       _apply_op(that, op());
+               }
+
+               GLM_FUNC_QUALIFIER value_type& operator[]  (size_t i)
+               {
+                       const int offset_dst[4] = { E0, E1, E2, E3 };
+                       return this->elem(offset_dst[i]);
+               }
+               GLM_FUNC_QUALIFIER value_type  operator[]  (size_t i) const
+               {
+                       const int offset_dst[4] = { E0, E1, E2, E3 };
+                       return this->elem(offset_dst[i]);
+               }
+
+       protected:
+               template <typename T>
+               GLM_FUNC_QUALIFIER void _apply_op(const VecType& that, T op)
+               {
+                       // Make a copy of the data in this == &that.
+                       // The copier should optimize out the copy in cases where the function is
+                       // properly inlined and the copy is not necessary.
+                       ValueType t[N];
+                       for (int i = 0; i < N; ++i)
+                               t[i] = that[i];
+                       for (int i = 0; i < N; ++i)
+                               op( (*this)[i], t[i] );
+               }
+       };
+
+       // Specialization for swizzles containing duplicate elements.  These cannot be modified.
+       template <typename ValueType, precision P, typename VecType, int N, int E0, int E1, int E2, int E3>
+       struct _swizzle_base2<ValueType, P, VecType,N,E0,E1,E2,E3,1> : public _swizzle_base1<ValueType, P, VecType,E0,E1,E2,E3,N>
+       {
+               typedef VecType         vec_type;        
+               typedef ValueType       value_type;
+
+               struct Stub {};
+               GLM_FUNC_QUALIFIER _swizzle_base2& operator= (Stub const &) { return *this; }
+
+               GLM_FUNC_QUALIFIER value_type  operator[]  (size_t i) const
+               {
+                       const int offset_dst[4] = { E0, E1, E2, E3 };
+                       return this->elem(offset_dst[i]);
+               }
+       };
+
+       template <int N,typename ValueType, precision P, typename VecType, int E0,int E1,int E2,int E3>
+       struct _swizzle : public _swizzle_base2<ValueType, P, VecType, N, E0, E1, E2, E3, (E0==E1||E0==E2||E0==E3||E1==E2||E1==E3||E2==E3)>
+       {
+               typedef _swizzle_base2<ValueType, P, VecType,N,E0,E1,E2,E3,(E0==E1||E0==E2||E0==E3||E1==E2||E1==E3||E2==E3)> base_type;
+
+               using base_type::operator=;
+
+               GLM_FUNC_QUALIFIER operator VecType () const { return (*this)(); }
+       };
+
+//
+// To prevent the C++ syntax from getting entirely overwhelming, define some alias macros
+//
+#define _GLM_SWIZZLE_TEMPLATE1   template <int N, typename T, precision P, typename V, int E0, int E1, int E2, int E3>
+#define _GLM_SWIZZLE_TEMPLATE2   template <int N, typename T, precision P, typename V, int E0, int E1, int E2, int E3, int F0, int F1, int F2, int F3>
+#define _GLM_SWIZZLE_TYPE1       _swizzle<N, T, P, V, E0, E1, E2, E3>
+#define _GLM_SWIZZLE_TYPE2       _swizzle<N, T, P, V, F0, F1, F2, F3>
+
+//
+// Wrapper for a binary operator (e.g. u.yy + v.zy)
+//
+#define _GLM_SWIZZLE_VECTOR_BINARY_OPERATOR_IMPLEMENTATION(OPERAND)                 \
+       _GLM_SWIZZLE_TEMPLATE2                                                          \
+       GLM_FUNC_QUALIFIER V operator OPERAND ( const _GLM_SWIZZLE_TYPE1& a, const _GLM_SWIZZLE_TYPE2& b)  \
+       {                                                                               \
+               return a() OPERAND b();                                                     \
+       }                                                                               \
+       _GLM_SWIZZLE_TEMPLATE1                                                          \
+       GLM_FUNC_QUALIFIER V operator OPERAND ( const _GLM_SWIZZLE_TYPE1& a, const V& b)                   \
+       {                                                                               \
+               return a() OPERAND b;                                                       \
+       }                                                                               \
+       _GLM_SWIZZLE_TEMPLATE1                                                          \
+       GLM_FUNC_QUALIFIER V operator OPERAND ( const V& a, const _GLM_SWIZZLE_TYPE1& b)                   \
+       {                                                                               \
+               return a OPERAND b();                                                       \
+       }
+
+//
+// Wrapper for a operand between a swizzle and a binary (e.g. 1.0f - u.xyz)
+//
+#define _GLM_SWIZZLE_SCALAR_BINARY_OPERATOR_IMPLEMENTATION(OPERAND)                 \
+       _GLM_SWIZZLE_TEMPLATE1                                                          \
+       GLM_FUNC_QUALIFIER V operator OPERAND ( const _GLM_SWIZZLE_TYPE1& a, const T& b)                   \
+       {                                                                               \
+               return a() OPERAND b;                                                       \
+       }                                                                               \
+       _GLM_SWIZZLE_TEMPLATE1                                                          \
+       GLM_FUNC_QUALIFIER V operator OPERAND ( const T& a, const _GLM_SWIZZLE_TYPE1& b)                   \
+       {                                                                               \
+               return a OPERAND b();                                                       \
+       }
+
+//
+// Macro for wrapping a function taking one argument (e.g. abs())
+//
+#define _GLM_SWIZZLE_FUNCTION_1_ARGS(RETURN_TYPE,FUNCTION)                          \
+       _GLM_SWIZZLE_TEMPLATE1                                                          \
+       GLM_FUNC_QUALIFIER typename _GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const _GLM_SWIZZLE_TYPE1& a)  \
+       {                                                                               \
+               return FUNCTION(a());                                                       \
+       }
+
+//
+// Macro for wrapping a function taking two vector arguments (e.g. dot()).
+//
+#define _GLM_SWIZZLE_FUNCTION_2_ARGS(RETURN_TYPE,FUNCTION)                                                      \
+       _GLM_SWIZZLE_TEMPLATE2                                                                                      \
+       GLM_FUNC_QUALIFIER typename _GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const _GLM_SWIZZLE_TYPE1& a, const _GLM_SWIZZLE_TYPE2& b) \
+       {                                                                                                           \
+               return FUNCTION(a(), b());                                                                              \
+       }                                                                                                           \
+       _GLM_SWIZZLE_TEMPLATE1                                                                                      \
+       GLM_FUNC_QUALIFIER typename _GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const _GLM_SWIZZLE_TYPE1& a, const _GLM_SWIZZLE_TYPE1& b) \
+       {                                                                                                           \
+               return FUNCTION(a(), b());                                                                              \
+       }                                                                                                           \
+       _GLM_SWIZZLE_TEMPLATE1                                                                                      \
+       GLM_FUNC_QUALIFIER typename _GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const _GLM_SWIZZLE_TYPE1& a, const typename V& b)         \
+       {                                                                                                           \
+               return FUNCTION(a(), b);                                                                                \
+       }                                                                                                           \
+       _GLM_SWIZZLE_TEMPLATE1                                                                                      \
+       GLM_FUNC_QUALIFIER typename _GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const V& a, const _GLM_SWIZZLE_TYPE1& b)                  \
+       {                                                                                                           \
+               return FUNCTION(a, b());                                                                                \
+       } 
+
+//
+// Macro for wrapping a function take 2 vec arguments followed by a scalar (e.g. mix()).
+//
+#define _GLM_SWIZZLE_FUNCTION_2_ARGS_SCALAR(RETURN_TYPE,FUNCTION)                                                             \
+       _GLM_SWIZZLE_TEMPLATE2                                                                                                    \
+       GLM_FUNC_QUALIFIER typename _GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const _GLM_SWIZZLE_TYPE1& a, const _GLM_SWIZZLE_TYPE2& b, const T& c)   \
+       {                                                                                                                         \
+               return FUNCTION(a(), b(), c);                                                                                         \
+       }                                                                                                                         \
+       _GLM_SWIZZLE_TEMPLATE1                                                                                                    \
+       GLM_FUNC_QUALIFIER typename _GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const _GLM_SWIZZLE_TYPE1& a, const _GLM_SWIZZLE_TYPE1& b, const T& c)   \
+       {                                                                                                                         \
+               return FUNCTION(a(), b(), c);                                                                                         \
+       }                                                                                                                         \
+       _GLM_SWIZZLE_TEMPLATE1                                                                                                    \
+       GLM_FUNC_QUALIFIER typename _GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const _GLM_SWIZZLE_TYPE1& a, const typename S0::vec_type& b, const T& c)\
+       {                                                                                                                         \
+               return FUNCTION(a(), b, c);                                                                                           \
+       }                                                                                                                         \
+       _GLM_SWIZZLE_TEMPLATE1                                                                                                    \
+       GLM_FUNC_QUALIFIER typename _GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const typename V& a, const _GLM_SWIZZLE_TYPE1& b, const T& c)           \
+       {                                                                                                                         \
+               return FUNCTION(a, b(), c);                                                                                           \
+       } 
+}//namespace detail 
+}//namespace glm
+
+namespace glm
+{
+       namespace detail
+       {
+               _GLM_SWIZZLE_SCALAR_BINARY_OPERATOR_IMPLEMENTATION(-)
+               _GLM_SWIZZLE_SCALAR_BINARY_OPERATOR_IMPLEMENTATION(*)
+               _GLM_SWIZZLE_VECTOR_BINARY_OPERATOR_IMPLEMENTATION(+)
+               _GLM_SWIZZLE_VECTOR_BINARY_OPERATOR_IMPLEMENTATION(-)
+               _GLM_SWIZZLE_VECTOR_BINARY_OPERATOR_IMPLEMENTATION(*)
+               _GLM_SWIZZLE_VECTOR_BINARY_OPERATOR_IMPLEMENTATION(/)
+       }
+
+       //
+       // Swizzles are distinct types from the unswizzled type.  The below macros will
+       // provide template specializations for the swizzle types for the given functions
+       // so that the compiler does not have any ambiguity to choosing how to handle
+       // the function.
+       //
+       // The alternative is to use the operator()() when calling the function in order
+       // to explicitly convert the swizzled type to the unswizzled type.
+       //
+
+       //_GLM_SWIZZLE_FUNCTION_1_ARGS(vec_type,    abs);
+       //_GLM_SWIZZLE_FUNCTION_1_ARGS(vec_type,    acos);
+       //_GLM_SWIZZLE_FUNCTION_1_ARGS(vec_type,    acosh);
+       //_GLM_SWIZZLE_FUNCTION_1_ARGS(vec_type,    all);
+       //_GLM_SWIZZLE_FUNCTION_1_ARGS(vec_type,    any);
+
+       //_GLM_SWIZZLE_FUNCTION_2_ARGS(value_type,  dot);
+       //_GLM_SWIZZLE_FUNCTION_2_ARGS(vec_type,    cross);
+       //_GLM_SWIZZLE_FUNCTION_2_ARGS(vec_type,    step);    
+       //_GLM_SWIZZLE_FUNCTION_2_ARGS_SCALAR(vec_type, mix);
+}
+
+#define _GLM_SWIZZLE2_2_MEMBERS(T, P, V, E0,E1) \
+       struct { detail::_swizzle<2, T, P, V<T, P>, 0,0,-1,-2> E0 ## E0; }; \
+       struct { detail::_swizzle<2, T, P, V<T, P>, 0,1,-1,-2> E0 ## E1; }; \
+       struct { detail::_swizzle<2, T, P, V<T, P>, 1,0,-1,-2> E1 ## E0; }; \
+       struct { detail::_swizzle<2, T, P, V<T, P>, 1,1,-1,-2> E1 ## E1; }; 
+
+#define _GLM_SWIZZLE2_3_MEMBERS(T, P, V, E0,E1) \
+       struct { detail::_swizzle<3,T, P, V<T, P>, 0,0,0,-1> E0 ## E0 ## E0; }; \
+       struct { detail::_swizzle<3,T, P, V<T, P>, 0,0,1,-1> E0 ## E0 ## E1; }; \
+       struct { detail::_swizzle<3,T, P, V<T, P>, 0,1,0,-1> E0 ## E1 ## E0; }; \
+       struct { detail::_swizzle<3,T, P, V<T, P>, 0,1,1,-1> E0 ## E1 ## E1; }; \
+       struct { detail::_swizzle<3,T, P, V<T, P>, 1,0,0,-1> E1 ## E0 ## E0; }; \
+       struct { detail::_swizzle<3,T, P, V<T, P>, 1,0,1,-1> E1 ## E0 ## E1; }; \
+       struct { detail::_swizzle<3,T, P, V<T, P>, 1,1,0,-1> E1 ## E1 ## E0; }; \
+       struct { detail::_swizzle<3,T, P, V<T, P>, 1,1,1,-1> E1 ## E1 ## E1; };  
+
+#define _GLM_SWIZZLE2_4_MEMBERS(T, P, V, E0,E1) \
+       struct { detail::_swizzle<4,T, P, V<T, P>, 0,0,0,0> E0 ## E0 ## E0 ## E0; }; \
+       struct { detail::_swizzle<4,T, P, V<T, P>, 0,0,0,1> E0 ## E0 ## E0 ## E1; }; \
+       struct { detail::_swizzle<4,T, P, V<T, P>, 0,0,1,0> E0 ## E0 ## E1 ## E0; }; \
+       struct { detail::_swizzle<4,T, P, V<T, P>, 0,0,1,1> E0 ## E0 ## E1 ## E1; }; \
+       struct { detail::_swizzle<4,T, P, V<T, P>, 0,1,0,0> E0 ## E1 ## E0 ## E0; }; \
+       struct { detail::_swizzle<4,T, P, V<T, P>, 0,1,0,1> E0 ## E1 ## E0 ## E1; }; \
+       struct { detail::_swizzle<4,T, P, V<T, P>, 0,1,1,0> E0 ## E1 ## E1 ## E0; }; \
+       struct { detail::_swizzle<4,T, P, V<T, P>, 0,1,1,1> E0 ## E1 ## E1 ## E1; }; \
+       struct { detail::_swizzle<4,T, P, V<T, P>, 1,0,0,0> E1 ## E0 ## E0 ## E0; }; \
+       struct { detail::_swizzle<4,T, P, V<T, P>, 1,0,0,1> E1 ## E0 ## E0 ## E1; }; \
+       struct { detail::_swizzle<4,T, P, V<T, P>, 1,0,1,0> E1 ## E0 ## E1 ## E0; }; \
+       struct { detail::_swizzle<4,T, P, V<T, P>, 1,0,1,1> E1 ## E0 ## E1 ## E1; }; \
+       struct { detail::_swizzle<4,T, P, V<T, P>, 1,1,0,0> E1 ## E1 ## E0 ## E0; }; \
+       struct { detail::_swizzle<4,T, P, V<T, P>, 1,1,0,1> E1 ## E1 ## E0 ## E1; }; \
+       struct { detail::_swizzle<4,T, P, V<T, P>, 1,1,1,0> E1 ## E1 ## E1 ## E0; }; \
+       struct { detail::_swizzle<4,T, P, V<T, P>, 1,1,1,1> E1 ## E1 ## E1 ## E1; };  
+
+#define _GLM_SWIZZLE3_2_MEMBERS(T, P, V, E0,E1,E2) \
+       struct { detail::_swizzle<2,T, P, V<T, P>, 0,0,-1,-2> E0 ## E0; }; \
+       struct { detail::_swizzle<2,T, P, V<T, P>, 0,1,-1,-2> E0 ## E1; }; \
+       struct { detail::_swizzle<2,T, P, V<T, P>, 0,2,-1,-2> E0 ## E2; }; \
+       struct { detail::_swizzle<2,T, P, V<T, P>, 1,0,-1,-2> E1 ## E0; }; \
+       struct { detail::_swizzle<2,T, P, V<T, P>, 1,1,-1,-2> E1 ## E1; }; \
+       struct { detail::_swizzle<2,T, P, V<T, P>, 1,2,-1,-2> E1 ## E2; }; \
+       struct { detail::_swizzle<2,T, P, V<T, P>, 2,0,-1,-2> E2 ## E0; }; \
+       struct { detail::_swizzle<2,T, P, V<T, P>, 2,1,-1,-2> E2 ## E1; }; \
+       struct { detail::_swizzle<2,T, P, V<T, P>, 2,2,-1,-2> E2 ## E2; }; 
+
+#define _GLM_SWIZZLE3_3_MEMBERS(T, P, V ,E0,E1,E2) \
+       struct { detail::_swizzle<3,T,P, V<T, P>, 0,0,0,-1> E0 ## E0 ## E0; }; \
+       struct { detail::_swizzle<3,T,P, V<T, P>, 0,0,1,-1> E0 ## E0 ## E1; }; \
+       struct { detail::_swizzle<3,T,P, V<T, P>, 0,0,2,-1> E0 ## E0 ## E2; }; \
+       struct { detail::_swizzle<3,T,P, V<T, P>, 0,1,0,-1> E0 ## E1 ## E0; }; \
+       struct { detail::_swizzle<3,T,P, V<T, P>, 0,1,1,-1> E0 ## E1 ## E1; }; \
+       struct { detail::_swizzle<3,T,P, V<T, P>, 0,1,2,-1> E0 ## E1 ## E2; }; \
+       struct { detail::_swizzle<3,T,P, V<T, P>, 0,2,0,-1> E0 ## E2 ## E0; }; \
+       struct { detail::_swizzle<3,T,P, V<T, P>, 0,2,1,-1> E0 ## E2 ## E1; }; \
+       struct { detail::_swizzle<3,T,P, V<T, P>, 0,2,2,-1> E0 ## E2 ## E2; }; \
+       struct { detail::_swizzle<3,T,P, V<T, P>, 1,0,0,-1> E1 ## E0 ## E0; }; \
+       struct { detail::_swizzle<3,T,P, V<T, P>, 1,0,1,-1> E1 ## E0 ## E1; }; \
+       struct { detail::_swizzle<3,T,P, V<T, P>, 1,0,2,-1> E1 ## E0 ## E2; }; \
+       struct { detail::_swizzle<3,T,P, V<T, P>, 1,1,0,-1> E1 ## E1 ## E0; }; \
+       struct { detail::_swizzle<3,T,P, V<T, P>, 1,1,1,-1> E1 ## E1 ## E1; }; \
+       struct { detail::_swizzle<3,T,P, V<T, P>, 1,1,2,-1> E1 ## E1 ## E2; }; \
+       struct { detail::_swizzle<3,T,P, V<T, P>, 1,2,0,-1> E1 ## E2 ## E0; }; \
+       struct { detail::_swizzle<3,T,P, V<T, P>, 1,2,1,-1> E1 ## E2 ## E1; }; \
+       struct { detail::_swizzle<3,T,P, V<T, P>, 1,2,2,-1> E1 ## E2 ## E2; }; \
+       struct { detail::_swizzle<3,T,P, V<T, P>, 2,0,0,-1> E2 ## E0 ## E0; }; \
+       struct { detail::_swizzle<3,T,P, V<T, P>, 2,0,1,-1> E2 ## E0 ## E1; }; \
+       struct { detail::_swizzle<3,T,P, V<T, P>, 2,0,2,-1> E2 ## E0 ## E2; }; \
+       struct { detail::_swizzle<3,T,P, V<T, P>, 2,1,0,-1> E2 ## E1 ## E0; }; \
+       struct { detail::_swizzle<3,T,P, V<T, P>, 2,1,1,-1> E2 ## E1 ## E1; }; \
+       struct { detail::_swizzle<3,T,P, V<T, P>, 2,1,2,-1> E2 ## E1 ## E2; }; \
+       struct { detail::_swizzle<3,T,P, V<T, P>, 2,2,0,-1> E2 ## E2 ## E0; }; \
+       struct { detail::_swizzle<3,T,P, V<T, P>, 2,2,1,-1> E2 ## E2 ## E1; }; \
+       struct { detail::_swizzle<3,T,P, V<T, P>, 2,2,2,-1> E2 ## E2 ## E2; };
+
+#define _GLM_SWIZZLE3_4_MEMBERS(T, P, V, E0,E1,E2) \
+       struct { detail::_swizzle<4,T, P, V<T, P>, 0,0,0,0> E0 ## E0 ## E0 ## E0; }; \
+       struct { detail::_swizzle<4,T, P, V<T, P>, 0,0,0,1> E0 ## E0 ## E0 ## E1; }; \
+       struct { detail::_swizzle<4,T, P, V<T, P>, 0,0,0,2> E0 ## E0 ## E0 ## E2; }; \
+       struct { detail::_swizzle<4,T, P, V<T, P>, 0,0,1,0> E0 ## E0 ## E1 ## E0; }; \
+       struct { detail::_swizzle<4,T, P, V<T, P>, 0,0,1,1> E0 ## E0 ## E1 ## E1; }; \
+       struct { detail::_swizzle<4,T, P, V<T, P>, 0,0,1,2> E0 ## E0 ## E1 ## E2; }; \
+       struct { detail::_swizzle<4,T, P, V<T, P>, 0,0,2,0> E0 ## E0 ## E2 ## E0; }; \
+       struct { detail::_swizzle<4,T, P, V<T, P>, 0,0,2,1> E0 ## E0 ## E2 ## E1; }; \
+       struct { detail::_swizzle<4,T, P, V<T, P>, 0,0,2,2> E0 ## E0 ## E2 ## E2; }; \
+       struct { detail::_swizzle<4,T, P, V<T, P>, 0,1,0,0> E0 ## E1 ## E0 ## E0; }; \
+       struct { detail::_swizzle<4,T, P, V<T, P>, 0,1,0,1> E0 ## E1 ## E0 ## E1; }; \
+       struct { detail::_swizzle<4,T, P, V<T, P>, 0,1,0,2> E0 ## E1 ## E0 ## E2; }; \
+       struct { detail::_swizzle<4,T, P, V<T, P>, 0,1,1,0> E0 ## E1 ## E1 ## E0; }; \
+       struct { detail::_swizzle<4,T, P, V<T, P>, 0,1,1,1> E0 ## E1 ## E1 ## E1; }; \
+       struct { detail::_swizzle<4,T, P, V<T, P>, 0,1,1,2> E0 ## E1 ## E1 ## E2; }; \
+       struct { detail::_swizzle<4,T, P, V<T, P>, 0,1,2,0> E0 ## E1 ## E2 ## E0; }; \
+       struct { detail::_swizzle<4,T, P, V<T, P>, 0,1,2,1> E0 ## E1 ## E2 ## E1; }; \
+       struct { detail::_swizzle<4,T, P, V<T, P>, 0,1,2,2> E0 ## E1 ## E2 ## E2; }; \
+       struct { detail::_swizzle<4,T, P, V<T, P>, 0,2,0,0> E0 ## E2 ## E0 ## E0; }; \
+       struct { detail::_swizzle<4,T, P, V<T, P>, 0,2,0,1> E0 ## E2 ## E0 ## E1; }; \
+       struct { detail::_swizzle<4,T, P, V<T, P>, 0,2,0,2> E0 ## E2 ## E0 ## E2; }; \
+       struct { detail::_swizzle<4,T, P, V<T, P>, 0,2,1,0> E0 ## E2 ## E1 ## E0; }; \
+       struct { detail::_swizzle<4,T, P, V<T, P>, 0,2,1,1> E0 ## E2 ## E1 ## E1; }; \
+       struct { detail::_swizzle<4,T, P, V<T, P>, 0,2,1,2> E0 ## E2 ## E1 ## E2; }; \
+       struct { detail::_swizzle<4,T, P, V<T, P>, 0,2,2,0> E0 ## E2 ## E2 ## E0; }; \
+       struct { detail::_swizzle<4,T, P, V<T, P>, 0,2,2,1> E0 ## E2 ## E2 ## E1; }; \
+       struct { detail::_swizzle<4,T, P, V<T, P>, 0,2,2,2> E0 ## E2 ## E2 ## E2; }; \
+       struct { detail::_swizzle<4,T, P, V<T, P>, 1,0,0,0> E1 ## E0 ## E0 ## E0; }; \
+       struct { detail::_swizzle<4,T, P, V<T, P>, 1,0,0,1> E1 ## E0 ## E0 ## E1; }; \
+       struct { detail::_swizzle<4,T, P, V<T, P>, 1,0,0,2> E1 ## E0 ## E0 ## E2; }; \
+       struct { detail::_swizzle<4,T, P, V<T, P>, 1,0,1,0> E1 ## E0 ## E1 ## E0; }; \
+       struct { detail::_swizzle<4,T, P, V<T, P>, 1,0,1,1> E1 ## E0 ## E1 ## E1; }; \
+       struct { detail::_swizzle<4,T, P, V<T, P>, 1,0,1,2> E1 ## E0 ## E1 ## E2; }; \
+       struct { detail::_swizzle<4,T, P, V<T, P>, 1,0,2,0> E1 ## E0 ## E2 ## E0; }; \
+       struct { detail::_swizzle<4,T, P, V<T, P>, 1,0,2,1> E1 ## E0 ## E2 ## E1; }; \
+       struct { detail::_swizzle<4,T, P, V<T, P>, 1,0,2,2> E1 ## E0 ## E2 ## E2; }; \
+       struct { detail::_swizzle<4,T, P, V<T, P>, 1,1,0,0> E1 ## E1 ## E0 ## E0; }; \
+       struct { detail::_swizzle<4,T, P, V<T, P>, 1,1,0,1> E1 ## E1 ## E0 ## E1; }; \
+       struct { detail::_swizzle<4,T, P, V<T, P>, 1,1,0,2> E1 ## E1 ## E0 ## E2; }; \
+       struct { detail::_swizzle<4,T, P, V<T, P>, 1,1,1,0> E1 ## E1 ## E1 ## E0; }; \
+       struct { detail::_swizzle<4,T, P, V<T, P>, 1,1,1,1> E1 ## E1 ## E1 ## E1; }; \
+       struct { detail::_swizzle<4,T, P, V<T, P>, 1,1,1,2> E1 ## E1 ## E1 ## E2; }; \
+       struct { detail::_swizzle<4,T, P, V<T, P>, 1,1,2,0> E1 ## E1 ## E2 ## E0; }; \
+       struct { detail::_swizzle<4,T, P, V<T, P>, 1,1,2,1> E1 ## E1 ## E2 ## E1; }; \
+       struct { detail::_swizzle<4,T, P, V<T, P>, 1,1,2,2> E1 ## E1 ## E2 ## E2; }; \
+       struct { detail::_swizzle<4,T, P, V<T, P>, 1,2,0,0> E1 ## E2 ## E0 ## E0; }; \
+       struct { detail::_swizzle<4,T, P, V<T, P>, 1,2,0,1> E1 ## E2 ## E0 ## E1; }; \
+       struct { detail::_swizzle<4,T, P, V<T, P>, 1,2,0,2> E1 ## E2 ## E0 ## E2; }; \
+       struct { detail::_swizzle<4,T, P, V<T, P>, 1,2,1,0> E1 ## E2 ## E1 ## E0; }; \
+       struct { detail::_swizzle<4,T, P, V<T, P>, 1,2,1,1> E1 ## E2 ## E1 ## E1; }; \
+       struct { detail::_swizzle<4,T, P, V<T, P>, 1,2,1,2> E1 ## E2 ## E1 ## E2; }; \
+       struct { detail::_swizzle<4,T, P, V<T, P>, 1,2,2,0> E1 ## E2 ## E2 ## E0; }; \
+       struct { detail::_swizzle<4,T, P, V<T, P>, 1,2,2,1> E1 ## E2 ## E2 ## E1; }; \
+       struct { detail::_swizzle<4,T, P, V<T, P>, 1,2,2,2> E1 ## E2 ## E2 ## E2; }; \
+       struct { detail::_swizzle<4,T, P, V<T, P>, 2,0,0,0> E2 ## E0 ## E0 ## E0; }; \
+       struct { detail::_swizzle<4,T, P, V<T, P>, 2,0,0,1> E2 ## E0 ## E0 ## E1; }; \
+       struct { detail::_swizzle<4,T, P, V<T, P>, 2,0,0,2> E2 ## E0 ## E0 ## E2; }; \
+       struct { detail::_swizzle<4,T, P, V<T, P>, 2,0,1,0> E2 ## E0 ## E1 ## E0; }; \
+       struct { detail::_swizzle<4,T, P, V<T, P>, 2,0,1,1> E2 ## E0 ## E1 ## E1; }; \
+       struct { detail::_swizzle<4,T, P, V<T, P>, 2,0,1,2> E2 ## E0 ## E1 ## E2; }; \
+       struct { detail::_swizzle<4,T, P, V<T, P>, 2,0,2,0> E2 ## E0 ## E2 ## E0; }; \
+       struct { detail::_swizzle<4,T, P, V<T, P>, 2,0,2,1> E2 ## E0 ## E2 ## E1; }; \
+       struct { detail::_swizzle<4,T, P, V<T, P>, 2,0,2,2> E2 ## E0 ## E2 ## E2; }; \
+       struct { detail::_swizzle<4,T, P, V<T, P>, 2,1,0,0> E2 ## E1 ## E0 ## E0; }; \
+       struct { detail::_swizzle<4,T, P, V<T, P>, 2,1,0,1> E2 ## E1 ## E0 ## E1; }; \
+       struct { detail::_swizzle<4,T, P, V<T, P>, 2,1,0,2> E2 ## E1 ## E0 ## E2; }; \
+       struct { detail::_swizzle<4,T, P, V<T, P>, 2,1,1,0> E2 ## E1 ## E1 ## E0; }; \
+       struct { detail::_swizzle<4,T, P, V<T, P>, 2,1,1,1> E2 ## E1 ## E1 ## E1; }; \
+       struct { detail::_swizzle<4,T, P, V<T, P>, 2,1,1,2> E2 ## E1 ## E1 ## E2; }; \
+       struct { detail::_swizzle<4,T, P, V<T, P>, 2,1,2,0> E2 ## E1 ## E2 ## E0; }; \
+       struct { detail::_swizzle<4,T, P, V<T, P>, 2,1,2,1> E2 ## E1 ## E2 ## E1; }; \
+       struct { detail::_swizzle<4,T, P, V<T, P>, 2,1,2,2> E2 ## E1 ## E2 ## E2; }; \
+       struct { detail::_swizzle<4,T, P, V<T, P>, 2,2,0,0> E2 ## E2 ## E0 ## E0; }; \
+       struct { detail::_swizzle<4,T, P, V<T, P>, 2,2,0,1> E2 ## E2 ## E0 ## E1; }; \
+       struct { detail::_swizzle<4,T, P, V<T, P>, 2,2,0,2> E2 ## E2 ## E0 ## E2; }; \
+       struct { detail::_swizzle<4,T, P, V<T, P>, 2,2,1,0> E2 ## E2 ## E1 ## E0; }; \
+       struct { detail::_swizzle<4,T, P, V<T, P>, 2,2,1,1> E2 ## E2 ## E1 ## E1; }; \
+       struct { detail::_swizzle<4,T, P, V<T, P>, 2,2,1,2> E2 ## E2 ## E1 ## E2; }; \
+       struct { detail::_swizzle<4,T, P, V<T, P>, 2,2,2,0> E2 ## E2 ## E2 ## E0; }; \
+       struct { detail::_swizzle<4,T, P, V<T, P>, 2,2,2,1> E2 ## E2 ## E2 ## E1; }; \
+       struct { detail::_swizzle<4,T, P, V<T, P>, 2,2,2,2> E2 ## E2 ## E2 ## E2; }; 
+
+#define _GLM_SWIZZLE4_2_MEMBERS(T, P, V, E0,E1,E2,E3) \
+       struct { detail::_swizzle<2,T, P, V<T, P>, 0,0,-1,-2> E0 ## E0; }; \
+       struct { detail::_swizzle<2,T, P, V<T, P>, 0,1,-1,-2> E0 ## E1; }; \
+       struct { detail::_swizzle<2,T, P, V<T, P>, 0,2,-1,-2> E0 ## E2; }; \
+       struct { detail::_swizzle<2,T, P, V<T, P>, 0,3,-1,-2> E0 ## E3; }; \
+       struct { detail::_swizzle<2,T, P, V<T, P>, 1,0,-1,-2> E1 ## E0; }; \
+       struct { detail::_swizzle<2,T, P, V<T, P>, 1,1,-1,-2> E1 ## E1; }; \
+       struct { detail::_swizzle<2,T, P, V<T, P>, 1,2,-1,-2> E1 ## E2; }; \
+       struct { detail::_swizzle<2,T, P, V<T, P>, 1,3,-1,-2> E1 ## E3; }; \
+       struct { detail::_swizzle<2,T, P, V<T, P>, 2,0,-1,-2> E2 ## E0; }; \
+       struct { detail::_swizzle<2,T, P, V<T, P>, 2,1,-1,-2> E2 ## E1; }; \
+       struct { detail::_swizzle<2,T, P, V<T, P>, 2,2,-1,-2> E2 ## E2; }; \
+       struct { detail::_swizzle<2,T, P, V<T, P>, 2,3,-1,-2> E2 ## E3; }; \
+       struct { detail::_swizzle<2,T, P, V<T, P>, 3,0,-1,-2> E3 ## E0; }; \
+       struct { detail::_swizzle<2,T, P, V<T, P>, 3,1,-1,-2> E3 ## E1; }; \
+       struct { detail::_swizzle<2,T, P, V<T, P>, 3,2,-1,-2> E3 ## E2; }; \
+       struct { detail::_swizzle<2,T, P, V<T, P>, 3,3,-1,-2> E3 ## E3; }; 
+
+#define _GLM_SWIZZLE4_3_MEMBERS(T,P, V, E0,E1,E2,E3) \
+       struct { detail::_swizzle<3,T,P, V<T, P>, 0,0,0,-1> E0 ## E0 ## E0; }; \
+       struct { detail::_swizzle<3,T,P, V<T, P>, 0,0,1,-1> E0 ## E0 ## E1; }; \
+       struct { detail::_swizzle<3,T,P, V<T, P>, 0,0,2,-1> E0 ## E0 ## E2; }; \
+       struct { detail::_swizzle<3,T,P, V<T, P>, 0,0,3,-1> E0 ## E0 ## E3; }; \
+       struct { detail::_swizzle<3,T,P, V<T, P>, 0,1,0,-1> E0 ## E1 ## E0; }; \
+       struct { detail::_swizzle<3,T,P, V<T, P>, 0,1,1,-1> E0 ## E1 ## E1; }; \
+       struct { detail::_swizzle<3,T,P, V<T, P>, 0,1,2,-1> E0 ## E1 ## E2; }; \
+       struct { detail::_swizzle<3,T,P, V<T, P>, 0,1,3,-1> E0 ## E1 ## E3; }; \
+       struct { detail::_swizzle<3,T,P, V<T, P>, 0,2,0,-1> E0 ## E2 ## E0; }; \
+       struct { detail::_swizzle<3,T,P, V<T, P>, 0,2,1,-1> E0 ## E2 ## E1; }; \
+       struct { detail::_swizzle<3,T,P, V<T, P>, 0,2,2,-1> E0 ## E2 ## E2; }; \
+       struct { detail::_swizzle<3,T,P, V<T, P>, 0,2,3,-1> E0 ## E2 ## E3; }; \
+       struct { detail::_swizzle<3,T,P, V<T, P>, 0,3,0,-1> E0 ## E3 ## E0; }; \
+       struct { detail::_swizzle<3,T,P, V<T, P>, 0,3,1,-1> E0 ## E3 ## E1; }; \
+       struct { detail::_swizzle<3,T,P, V<T, P>, 0,3,2,-1> E0 ## E3 ## E2; }; \
+       struct { detail::_swizzle<3,T,P, V<T, P>, 0,3,3,-1> E0 ## E3 ## E3; }; \
+       struct { detail::_swizzle<3,T,P, V<T, P>, 1,0,0,-1> E1 ## E0 ## E0; }; \
+       struct { detail::_swizzle<3,T,P, V<T, P>, 1,0,1,-1> E1 ## E0 ## E1; }; \
+       struct { detail::_swizzle<3,T,P, V<T, P>, 1,0,2,-1> E1 ## E0 ## E2; }; \
+       struct { detail::_swizzle<3,T,P, V<T, P>, 1,0,3,-1> E1 ## E0 ## E3; }; \
+       struct { detail::_swizzle<3,T,P, V<T, P>, 1,1,0,-1> E1 ## E1 ## E0; }; \
+       struct { detail::_swizzle<3,T,P, V<T, P>, 1,1,1,-1> E1 ## E1 ## E1; }; \
+       struct { detail::_swizzle<3,T,P, V<T, P>, 1,1,2,-1> E1 ## E1 ## E2; }; \
+       struct { detail::_swizzle<3,T,P, V<T, P>, 1,1,3,-1> E1 ## E1 ## E3; }; \
+       struct { detail::_swizzle<3,T,P, V<T, P>, 1,2,0,-1> E1 ## E2 ## E0; }; \
+       struct { detail::_swizzle<3,T,P, V<T, P>, 1,2,1,-1> E1 ## E2 ## E1; }; \
+       struct { detail::_swizzle<3,T,P, V<T, P>, 1,2,2,-1> E1 ## E2 ## E2; }; \
+       struct { detail::_swizzle<3,T,P, V<T, P>, 1,2,3,-1> E1 ## E2 ## E3; }; \
+       struct { detail::_swizzle<3,T,P, V<T, P>, 1,3,0,-1> E1 ## E3 ## E0; }; \
+       struct { detail::_swizzle<3,T,P, V<T, P>, 1,3,1,-1> E1 ## E3 ## E1; }; \
+       struct { detail::_swizzle<3,T,P, V<T, P>, 1,3,2,-1> E1 ## E3 ## E2; }; \
+       struct { detail::_swizzle<3,T,P, V<T, P>, 1,3,3,-1> E1 ## E3 ## E3; }; \
+       struct { detail::_swizzle<3,T,P, V<T, P>, 2,0,0,-1> E2 ## E0 ## E0; }; \
+       struct { detail::_swizzle<3,T,P, V<T, P>, 2,0,1,-1> E2 ## E0 ## E1; }; \
+       struct { detail::_swizzle<3,T,P, V<T, P>, 2,0,2,-1> E2 ## E0 ## E2; }; \
+       struct { detail::_swizzle<3,T,P, V<T, P>, 2,0,3,-1> E2 ## E0 ## E3; }; \
+       struct { detail::_swizzle<3,T,P, V<T, P>, 2,1,0,-1> E2 ## E1 ## E0; }; \
+       struct { detail::_swizzle<3,T,P, V<T, P>, 2,1,1,-1> E2 ## E1 ## E1; }; \
+       struct { detail::_swizzle<3,T,P, V<T, P>, 2,1,2,-1> E2 ## E1 ## E2; }; \
+       struct { detail::_swizzle<3,T,P, V<T, P>, 2,1,3,-1> E2 ## E1 ## E3; }; \
+       struct { detail::_swizzle<3,T,P, V<T, P>, 2,2,0,-1> E2 ## E2 ## E0; }; \
+       struct { detail::_swizzle<3,T,P, V<T, P>, 2,2,1,-1> E2 ## E2 ## E1; }; \
+       struct { detail::_swizzle<3,T,P, V<T, P>, 2,2,2,-1> E2 ## E2 ## E2; }; \
+       struct { detail::_swizzle<3,T,P, V<T, P>, 2,2,3,-1> E2 ## E2 ## E3; }; \
+       struct { detail::_swizzle<3,T,P, V<T, P>, 2,3,0,-1> E2 ## E3 ## E0; }; \
+       struct { detail::_swizzle<3,T,P, V<T, P>, 2,3,1,-1> E2 ## E3 ## E1; }; \
+       struct { detail::_swizzle<3,T,P, V<T, P>, 2,3,2,-1> E2 ## E3 ## E2; }; \
+       struct { detail::_swizzle<3,T,P, V<T, P>, 2,3,3,-1> E2 ## E3 ## E3; }; \
+       struct { detail::_swizzle<3,T,P, V<T, P>, 3,0,0,-1> E3 ## E0 ## E0; }; \
+       struct { detail::_swizzle<3,T,P, V<T, P>, 3,0,1,-1> E3 ## E0 ## E1; }; \
+       struct { detail::_swizzle<3,T,P, V<T, P>, 3,0,2,-1> E3 ## E0 ## E2; }; \
+       struct { detail::_swizzle<3,T,P, V<T, P>, 3,0,3,-1> E3 ## E0 ## E3; }; \
+       struct { detail::_swizzle<3,T,P, V<T, P>, 3,1,0,-1> E3 ## E1 ## E0; }; \
+       struct { detail::_swizzle<3,T,P, V<T, P>, 3,1,1,-1> E3 ## E1 ## E1; }; \
+       struct { detail::_swizzle<3,T,P, V<T, P>, 3,1,2,-1> E3 ## E1 ## E2; }; \
+       struct { detail::_swizzle<3,T,P, V<T, P>, 3,1,3,-1> E3 ## E1 ## E3; }; \
+       struct { detail::_swizzle<3,T,P, V<T, P>, 3,2,0,-1> E3 ## E2 ## E0; }; \
+       struct { detail::_swizzle<3,T,P, V<T, P>, 3,2,1,-1> E3 ## E2 ## E1; }; \
+       struct { detail::_swizzle<3,T,P, V<T, P>, 3,2,2,-1> E3 ## E2 ## E2; }; \
+       struct { detail::_swizzle<3,T,P, V<T, P>, 3,2,3,-1> E3 ## E2 ## E3; }; \
+       struct { detail::_swizzle<3,T,P, V<T, P>, 3,3,0,-1> E3 ## E3 ## E0; }; \
+       struct { detail::_swizzle<3,T,P, V<T, P>, 3,3,1,-1> E3 ## E3 ## E1; }; \
+       struct { detail::_swizzle<3,T,P, V<T, P>, 3,3,2,-1> E3 ## E3 ## E2; }; \
+       struct { detail::_swizzle<3,T,P, V<T, P>, 3,3,3,-1> E3 ## E3 ## E3; };  
+
+#define _GLM_SWIZZLE4_4_MEMBERS(T, P, V, E0,E1,E2,E3) \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 0,0,0,0> E0 ## E0 ## E0 ## E0; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 0,0,0,1> E0 ## E0 ## E0 ## E1; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 0,0,0,2> E0 ## E0 ## E0 ## E2; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 0,0,0,3> E0 ## E0 ## E0 ## E3; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 0,0,1,0> E0 ## E0 ## E1 ## E0; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 0,0,1,1> E0 ## E0 ## E1 ## E1; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 0,0,1,2> E0 ## E0 ## E1 ## E2; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 0,0,1,3> E0 ## E0 ## E1 ## E3; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 0,0,2,0> E0 ## E0 ## E2 ## E0; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 0,0,2,1> E0 ## E0 ## E2 ## E1; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 0,0,2,2> E0 ## E0 ## E2 ## E2; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 0,0,2,3> E0 ## E0 ## E2 ## E3; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 0,0,3,0> E0 ## E0 ## E3 ## E0; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 0,0,3,1> E0 ## E0 ## E3 ## E1; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 0,0,3,2> E0 ## E0 ## E3 ## E2; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 0,0,3,3> E0 ## E0 ## E3 ## E3; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 0,1,0,0> E0 ## E1 ## E0 ## E0; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 0,1,0,1> E0 ## E1 ## E0 ## E1; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 0,1,0,2> E0 ## E1 ## E0 ## E2; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 0,1,0,3> E0 ## E1 ## E0 ## E3; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 0,1,1,0> E0 ## E1 ## E1 ## E0; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 0,1,1,1> E0 ## E1 ## E1 ## E1; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 0,1,1,2> E0 ## E1 ## E1 ## E2; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 0,1,1,3> E0 ## E1 ## E1 ## E3; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 0,1,2,0> E0 ## E1 ## E2 ## E0; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 0,1,2,1> E0 ## E1 ## E2 ## E1; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 0,1,2,2> E0 ## E1 ## E2 ## E2; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 0,1,2,3> E0 ## E1 ## E2 ## E3; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 0,1,3,0> E0 ## E1 ## E3 ## E0; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 0,1,3,1> E0 ## E1 ## E3 ## E1; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 0,1,3,2> E0 ## E1 ## E3 ## E2; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 0,1,3,3> E0 ## E1 ## E3 ## E3; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 0,2,0,0> E0 ## E2 ## E0 ## E0; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 0,2,0,1> E0 ## E2 ## E0 ## E1; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 0,2,0,2> E0 ## E2 ## E0 ## E2; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 0,2,0,3> E0 ## E2 ## E0 ## E3; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 0,2,1,0> E0 ## E2 ## E1 ## E0; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 0,2,1,1> E0 ## E2 ## E1 ## E1; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 0,2,1,2> E0 ## E2 ## E1 ## E2; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 0,2,1,3> E0 ## E2 ## E1 ## E3; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 0,2,2,0> E0 ## E2 ## E2 ## E0; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 0,2,2,1> E0 ## E2 ## E2 ## E1; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 0,2,2,2> E0 ## E2 ## E2 ## E2; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 0,2,2,3> E0 ## E2 ## E2 ## E3; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 0,2,3,0> E0 ## E2 ## E3 ## E0; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 0,2,3,1> E0 ## E2 ## E3 ## E1; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 0,2,3,2> E0 ## E2 ## E3 ## E2; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 0,2,3,3> E0 ## E2 ## E3 ## E3; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 0,3,0,0> E0 ## E3 ## E0 ## E0; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 0,3,0,1> E0 ## E3 ## E0 ## E1; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 0,3,0,2> E0 ## E3 ## E0 ## E2; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 0,3,0,3> E0 ## E3 ## E0 ## E3; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 0,3,1,0> E0 ## E3 ## E1 ## E0; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 0,3,1,1> E0 ## E3 ## E1 ## E1; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 0,3,1,2> E0 ## E3 ## E1 ## E2; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 0,3,1,3> E0 ## E3 ## E1 ## E3; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 0,3,2,0> E0 ## E3 ## E2 ## E0; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 0,3,2,1> E0 ## E3 ## E2 ## E1; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 0,3,2,2> E0 ## E3 ## E2 ## E2; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 0,3,2,3> E0 ## E3 ## E2 ## E3; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 0,3,3,0> E0 ## E3 ## E3 ## E0; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 0,3,3,1> E0 ## E3 ## E3 ## E1; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 0,3,3,2> E0 ## E3 ## E3 ## E2; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 0,3,3,3> E0 ## E3 ## E3 ## E3; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 1,0,0,0> E1 ## E0 ## E0 ## E0; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 1,0,0,1> E1 ## E0 ## E0 ## E1; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 1,0,0,2> E1 ## E0 ## E0 ## E2; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 1,0,0,3> E1 ## E0 ## E0 ## E3; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 1,0,1,0> E1 ## E0 ## E1 ## E0; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 1,0,1,1> E1 ## E0 ## E1 ## E1; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 1,0,1,2> E1 ## E0 ## E1 ## E2; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 1,0,1,3> E1 ## E0 ## E1 ## E3; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 1,0,2,0> E1 ## E0 ## E2 ## E0; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 1,0,2,1> E1 ## E0 ## E2 ## E1; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 1,0,2,2> E1 ## E0 ## E2 ## E2; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 1,0,2,3> E1 ## E0 ## E2 ## E3; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 1,0,3,0> E1 ## E0 ## E3 ## E0; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 1,0,3,1> E1 ## E0 ## E3 ## E1; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 1,0,3,2> E1 ## E0 ## E3 ## E2; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 1,0,3,3> E1 ## E0 ## E3 ## E3; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 1,1,0,0> E1 ## E1 ## E0 ## E0; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 1,1,0,1> E1 ## E1 ## E0 ## E1; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 1,1,0,2> E1 ## E1 ## E0 ## E2; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 1,1,0,3> E1 ## E1 ## E0 ## E3; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 1,1,1,0> E1 ## E1 ## E1 ## E0; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 1,1,1,1> E1 ## E1 ## E1 ## E1; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 1,1,1,2> E1 ## E1 ## E1 ## E2; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 1,1,1,3> E1 ## E1 ## E1 ## E3; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 1,1,2,0> E1 ## E1 ## E2 ## E0; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 1,1,2,1> E1 ## E1 ## E2 ## E1; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 1,1,2,2> E1 ## E1 ## E2 ## E2; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 1,1,2,3> E1 ## E1 ## E2 ## E3; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 1,1,3,0> E1 ## E1 ## E3 ## E0; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 1,1,3,1> E1 ## E1 ## E3 ## E1; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 1,1,3,2> E1 ## E1 ## E3 ## E2; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 1,1,3,3> E1 ## E1 ## E3 ## E3; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 1,2,0,0> E1 ## E2 ## E0 ## E0; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 1,2,0,1> E1 ## E2 ## E0 ## E1; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 1,2,0,2> E1 ## E2 ## E0 ## E2; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 1,2,0,3> E1 ## E2 ## E0 ## E3; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 1,2,1,0> E1 ## E2 ## E1 ## E0; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 1,2,1,1> E1 ## E2 ## E1 ## E1; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 1,2,1,2> E1 ## E2 ## E1 ## E2; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 1,2,1,3> E1 ## E2 ## E1 ## E3; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 1,2,2,0> E1 ## E2 ## E2 ## E0; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 1,2,2,1> E1 ## E2 ## E2 ## E1; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 1,2,2,2> E1 ## E2 ## E2 ## E2; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 1,2,2,3> E1 ## E2 ## E2 ## E3; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 1,2,3,0> E1 ## E2 ## E3 ## E0; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 1,2,3,1> E1 ## E2 ## E3 ## E1; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 1,2,3,2> E1 ## E2 ## E3 ## E2; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 1,2,3,3> E1 ## E2 ## E3 ## E3; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 1,3,0,0> E1 ## E3 ## E0 ## E0; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 1,3,0,1> E1 ## E3 ## E0 ## E1; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 1,3,0,2> E1 ## E3 ## E0 ## E2; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 1,3,0,3> E1 ## E3 ## E0 ## E3; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 1,3,1,0> E1 ## E3 ## E1 ## E0; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 1,3,1,1> E1 ## E3 ## E1 ## E1; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 1,3,1,2> E1 ## E3 ## E1 ## E2; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 1,3,1,3> E1 ## E3 ## E1 ## E3; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 1,3,2,0> E1 ## E3 ## E2 ## E0; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 1,3,2,1> E1 ## E3 ## E2 ## E1; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 1,3,2,2> E1 ## E3 ## E2 ## E2; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 1,3,2,3> E1 ## E3 ## E2 ## E3; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 1,3,3,0> E1 ## E3 ## E3 ## E0; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 1,3,3,1> E1 ## E3 ## E3 ## E1; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 1,3,3,2> E1 ## E3 ## E3 ## E2; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 1,3,3,3> E1 ## E3 ## E3 ## E3; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 2,0,0,0> E2 ## E0 ## E0 ## E0; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 2,0,0,1> E2 ## E0 ## E0 ## E1; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 2,0,0,2> E2 ## E0 ## E0 ## E2; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 2,0,0,3> E2 ## E0 ## E0 ## E3; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 2,0,1,0> E2 ## E0 ## E1 ## E0; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 2,0,1,1> E2 ## E0 ## E1 ## E1; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 2,0,1,2> E2 ## E0 ## E1 ## E2; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 2,0,1,3> E2 ## E0 ## E1 ## E3; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 2,0,2,0> E2 ## E0 ## E2 ## E0; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 2,0,2,1> E2 ## E0 ## E2 ## E1; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 2,0,2,2> E2 ## E0 ## E2 ## E2; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 2,0,2,3> E2 ## E0 ## E2 ## E3; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 2,0,3,0> E2 ## E0 ## E3 ## E0; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 2,0,3,1> E2 ## E0 ## E3 ## E1; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 2,0,3,2> E2 ## E0 ## E3 ## E2; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 2,0,3,3> E2 ## E0 ## E3 ## E3; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 2,1,0,0> E2 ## E1 ## E0 ## E0; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 2,1,0,1> E2 ## E1 ## E0 ## E1; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 2,1,0,2> E2 ## E1 ## E0 ## E2; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 2,1,0,3> E2 ## E1 ## E0 ## E3; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 2,1,1,0> E2 ## E1 ## E1 ## E0; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 2,1,1,1> E2 ## E1 ## E1 ## E1; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 2,1,1,2> E2 ## E1 ## E1 ## E2; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 2,1,1,3> E2 ## E1 ## E1 ## E3; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 2,1,2,0> E2 ## E1 ## E2 ## E0; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 2,1,2,1> E2 ## E1 ## E2 ## E1; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 2,1,2,2> E2 ## E1 ## E2 ## E2; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 2,1,2,3> E2 ## E1 ## E2 ## E3; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 2,1,3,0> E2 ## E1 ## E3 ## E0; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 2,1,3,1> E2 ## E1 ## E3 ## E1; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 2,1,3,2> E2 ## E1 ## E3 ## E2; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 2,1,3,3> E2 ## E1 ## E3 ## E3; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 2,2,0,0> E2 ## E2 ## E0 ## E0; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 2,2,0,1> E2 ## E2 ## E0 ## E1; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 2,2,0,2> E2 ## E2 ## E0 ## E2; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 2,2,0,3> E2 ## E2 ## E0 ## E3; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 2,2,1,0> E2 ## E2 ## E1 ## E0; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 2,2,1,1> E2 ## E2 ## E1 ## E1; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 2,2,1,2> E2 ## E2 ## E1 ## E2; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 2,2,1,3> E2 ## E2 ## E1 ## E3; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 2,2,2,0> E2 ## E2 ## E2 ## E0; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 2,2,2,1> E2 ## E2 ## E2 ## E1; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 2,2,2,2> E2 ## E2 ## E2 ## E2; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 2,2,2,3> E2 ## E2 ## E2 ## E3; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 2,2,3,0> E2 ## E2 ## E3 ## E0; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 2,2,3,1> E2 ## E2 ## E3 ## E1; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 2,2,3,2> E2 ## E2 ## E3 ## E2; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 2,2,3,3> E2 ## E2 ## E3 ## E3; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 2,3,0,0> E2 ## E3 ## E0 ## E0; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 2,3,0,1> E2 ## E3 ## E0 ## E1; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 2,3,0,2> E2 ## E3 ## E0 ## E2; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 2,3,0,3> E2 ## E3 ## E0 ## E3; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 2,3,1,0> E2 ## E3 ## E1 ## E0; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 2,3,1,1> E2 ## E3 ## E1 ## E1; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 2,3,1,2> E2 ## E3 ## E1 ## E2; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 2,3,1,3> E2 ## E3 ## E1 ## E3; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 2,3,2,0> E2 ## E3 ## E2 ## E0; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 2,3,2,1> E2 ## E3 ## E2 ## E1; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 2,3,2,2> E2 ## E3 ## E2 ## E2; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 2,3,2,3> E2 ## E3 ## E2 ## E3; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 2,3,3,0> E2 ## E3 ## E3 ## E0; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 2,3,3,1> E2 ## E3 ## E3 ## E1; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 2,3,3,2> E2 ## E3 ## E3 ## E2; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 2,3,3,3> E2 ## E3 ## E3 ## E3; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 3,0,0,0> E3 ## E0 ## E0 ## E0; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 3,0,0,1> E3 ## E0 ## E0 ## E1; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 3,0,0,2> E3 ## E0 ## E0 ## E2; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 3,0,0,3> E3 ## E0 ## E0 ## E3; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 3,0,1,0> E3 ## E0 ## E1 ## E0; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 3,0,1,1> E3 ## E0 ## E1 ## E1; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 3,0,1,2> E3 ## E0 ## E1 ## E2; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 3,0,1,3> E3 ## E0 ## E1 ## E3; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 3,0,2,0> E3 ## E0 ## E2 ## E0; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 3,0,2,1> E3 ## E0 ## E2 ## E1; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 3,0,2,2> E3 ## E0 ## E2 ## E2; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 3,0,2,3> E3 ## E0 ## E2 ## E3; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 3,0,3,0> E3 ## E0 ## E3 ## E0; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 3,0,3,1> E3 ## E0 ## E3 ## E1; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 3,0,3,2> E3 ## E0 ## E3 ## E2; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 3,0,3,3> E3 ## E0 ## E3 ## E3; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 3,1,0,0> E3 ## E1 ## E0 ## E0; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 3,1,0,1> E3 ## E1 ## E0 ## E1; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 3,1,0,2> E3 ## E1 ## E0 ## E2; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 3,1,0,3> E3 ## E1 ## E0 ## E3; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 3,1,1,0> E3 ## E1 ## E1 ## E0; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 3,1,1,1> E3 ## E1 ## E1 ## E1; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 3,1,1,2> E3 ## E1 ## E1 ## E2; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 3,1,1,3> E3 ## E1 ## E1 ## E3; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 3,1,2,0> E3 ## E1 ## E2 ## E0; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 3,1,2,1> E3 ## E1 ## E2 ## E1; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 3,1,2,2> E3 ## E1 ## E2 ## E2; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 3,1,2,3> E3 ## E1 ## E2 ## E3; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 3,1,3,0> E3 ## E1 ## E3 ## E0; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 3,1,3,1> E3 ## E1 ## E3 ## E1; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 3,1,3,2> E3 ## E1 ## E3 ## E2; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 3,1,3,3> E3 ## E1 ## E3 ## E3; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 3,2,0,0> E3 ## E2 ## E0 ## E0; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 3,2,0,1> E3 ## E2 ## E0 ## E1; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 3,2,0,2> E3 ## E2 ## E0 ## E2; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 3,2,0,3> E3 ## E2 ## E0 ## E3; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 3,2,1,0> E3 ## E2 ## E1 ## E0; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 3,2,1,1> E3 ## E2 ## E1 ## E1; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 3,2,1,2> E3 ## E2 ## E1 ## E2; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 3,2,1,3> E3 ## E2 ## E1 ## E3; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 3,2,2,0> E3 ## E2 ## E2 ## E0; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 3,2,2,1> E3 ## E2 ## E2 ## E1; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 3,2,2,2> E3 ## E2 ## E2 ## E2; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 3,2,2,3> E3 ## E2 ## E2 ## E3; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 3,2,3,0> E3 ## E2 ## E3 ## E0; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 3,2,3,1> E3 ## E2 ## E3 ## E1; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 3,2,3,2> E3 ## E2 ## E3 ## E2; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 3,2,3,3> E3 ## E2 ## E3 ## E3; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 3,3,0,0> E3 ## E3 ## E0 ## E0; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 3,3,0,1> E3 ## E3 ## E0 ## E1; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 3,3,0,2> E3 ## E3 ## E0 ## E2; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 3,3,0,3> E3 ## E3 ## E0 ## E3; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 3,3,1,0> E3 ## E3 ## E1 ## E0; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 3,3,1,1> E3 ## E3 ## E1 ## E1; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 3,3,1,2> E3 ## E3 ## E1 ## E2; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 3,3,1,3> E3 ## E3 ## E1 ## E3; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 3,3,2,0> E3 ## E3 ## E2 ## E0; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 3,3,2,1> E3 ## E3 ## E2 ## E1; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 3,3,2,2> E3 ## E3 ## E2 ## E2; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 3,3,2,3> E3 ## E3 ## E2 ## E3; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 3,3,3,0> E3 ## E3 ## E3 ## E0; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 3,3,3,1> E3 ## E3 ## E3 ## E1; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 3,3,3,2> E3 ## E3 ## E3 ## E2; }; \
+       struct { detail::_swizzle<4, T, P, V<T, P>, 3,3,3,3> E3 ## E3 ## E3 ## E3; };
diff --git a/include/glm/detail/_swizzle_func.hpp b/include/glm/detail/_swizzle_func.hpp
new file mode 100644 (file)
index 0000000..464109d
--- /dev/null
@@ -0,0 +1,725 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref core
+/// @file glm/detail/_swizzle_func.hpp
+/// @date 2011-10-16 / 2011-10-16
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////
+
+#pragma once
+
+#define GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, CONST, A, B)       \
+       SWIZZLED_TYPE<TMPL_TYPE, PRECISION> A ## B() CONST                                                                                              \
+       {                                                                                                                                                                                               \
+               return SWIZZLED_TYPE<TMPL_TYPE, PRECISION>(this->A, this->B);                                                           \
+       }
+
+#define GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, CONST, A, B, C)            \
+       SWIZZLED_TYPE<TMPL_TYPE, PRECISION> A ## B ## C() CONST                                                                                         \
+       {                                                                                                                                                                                                       \
+               return SWIZZLED_TYPE<TMPL_TYPE, PRECISION>(this->A, this->B, this->C);                                                  \
+       }
+
+#define GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, CONST, A, B, C, D) \
+       SWIZZLED_TYPE<TMPL_TYPE, PRECISION> A ## B ## C ## D() CONST                                                                            \
+       {                                                                                                                                                                                                       \
+               return SWIZZLED_TYPE<TMPL_TYPE, PRECISION>(this->A, this->B, this->C, this->D);                                 \
+       }
+
+#define GLM_SWIZZLE_GEN_VEC2_ENTRY_DEF(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, CONST, A, B)   \
+       template <typename TMPL_TYPE>                                                                                                                                           \
+       SWIZZLED_TYPE<TMPL_TYPE> CLASS_TYPE<TMPL_TYPE, PRECISION>::A ## B() CONST                                                       \
+       {                                                                                                                                                                                                       \
+               return SWIZZLED_TYPE<TMPL_TYPE, PRECISION>(this->A, this->B);                                                                   \
+       }
+
+#define GLM_SWIZZLE_GEN_VEC3_ENTRY_DEF(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, CONST, A, B, C)                \
+       template <typename TMPL_TYPE>                                                                                                                                                   \
+       SWIZZLED_TYPE<TMPL_TYPE> CLASS_TYPE<TMPL_TYPE, PRECISION>::A ## B ## C() CONST                                                  \
+       {                                                                                                                                                                                                               \
+               return SWIZZLED_TYPE<TMPL_TYPE, PRECISION>(this->A, this->B, this->C);                                                          \
+       }
+
+#define GLM_SWIZZLE_GEN_VEC4_ENTRY_DEF(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, CONST, A, B, C, D)     \
+       template <typename TMPL_TYPE>                                                                                                                                                   \
+       SWIZZLED_TYPE<TMPL_TYPE> CLASS_TYPE<TMPL_TYPE, PRECISION>::A ## B ## C ## D() CONST                                             \
+       {                                                                                                                                                                                                               \
+               return SWIZZLED_TYPE<TMPL_TYPE, PRECISION>(this->A, this->B, this->C, this->D);                                         \
+       }
+
+#define GLM_MUTABLE
+
+#define GLM_SWIZZLE_GEN_REF2_FROM_VEC2_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, A, B) \
+       GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, A, B) \
+       GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, B, A)
+
+#define GLM_SWIZZLE_GEN_REF_FROM_VEC2(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE) \
+       GLM_SWIZZLE_GEN_REF2_FROM_VEC2_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, x, y) \
+       GLM_SWIZZLE_GEN_REF2_FROM_VEC2_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, r, g) \
+       GLM_SWIZZLE_GEN_REF2_FROM_VEC2_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, s, t)
+
+//GLM_SWIZZLE_GEN_REF_FROM_VEC2(valType, detail::vec2, detail::ref2)
+
+#define GLM_SWIZZLE_GEN_REF2_FROM_VEC3_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, A, B, C) \
+       GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, A, B) \
+       GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, A, C) \
+       GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, B, A) \
+       GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, B, C) \
+       GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, C, A) \
+       GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, C, B)
+
+#define GLM_SWIZZLE_GEN_REF3_FROM_VEC3_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, A, B, C) \
+       GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, A, B, C) \
+       GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, A, C, B) \
+       GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, B, A, C) \
+       GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, B, C, A) \
+       GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, C, A, B) \
+       GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, C, B, A)
+
+#define GLM_SWIZZLE_GEN_REF_FROM_VEC3_COMP(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, A, B, C) \
+       GLM_SWIZZLE_GEN_REF3_FROM_VEC3_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC3_TYPE, A, B, C) \
+       GLM_SWIZZLE_GEN_REF2_FROM_VEC3_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, A, B, C)
+
+#define GLM_SWIZZLE_GEN_REF_FROM_VEC3(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE) \
+       GLM_SWIZZLE_GEN_REF_FROM_VEC3_COMP(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, x, y, z) \
+       GLM_SWIZZLE_GEN_REF_FROM_VEC3_COMP(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, r, g, b) \
+       GLM_SWIZZLE_GEN_REF_FROM_VEC3_COMP(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, s, t, p)
+
+//GLM_SWIZZLE_GEN_REF_FROM_VEC3(valType, detail::vec3, detail::ref2, detail::ref3)
+
+#define GLM_SWIZZLE_GEN_REF2_FROM_VEC4_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, A, B, C, D) \
+       GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, A, B) \
+       GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, A, C) \
+       GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, A, D) \
+       GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, B, A) \
+       GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, B, C) \
+       GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, B, D) \
+       GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, C, A) \
+       GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, C, B) \
+       GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, C, D) \
+       GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, D, A) \
+       GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, D, B) \
+       GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, D, C)
+
+#define GLM_SWIZZLE_GEN_REF3_FROM_VEC4_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, A, B, C, D) \
+       GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , A, B, C) \
+       GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , A, B, D) \
+       GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , A, C, B) \
+       GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , A, C, D) \
+       GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , A, D, B) \
+       GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , A, D, C) \
+       GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , B, A, C) \
+       GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , B, A, D) \
+       GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , B, C, A) \
+       GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , B, C, D) \
+       GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , B, D, A) \
+       GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , B, D, C) \
+       GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , C, A, B) \
+       GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , C, A, D) \
+       GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , C, B, A) \
+       GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , C, B, D) \
+       GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , C, D, A) \
+       GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , C, D, B) \
+       GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , D, A, B) \
+       GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , D, A, C) \
+       GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , D, B, A) \
+       GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , D, B, C) \
+       GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , D, C, A) \
+       GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , D, C, B)
+
+#define GLM_SWIZZLE_GEN_REF4_FROM_VEC4_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, A, B, C, D) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , A, C, B, D) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , A, C, D, B) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , A, D, B, C) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , A, D, C, B) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , A, B, D, C) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , A, B, C, D) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , B, C, A, D) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , B, C, D, A) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , B, D, A, C) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , B, D, C, A) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , B, A, D, C) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , B, A, C, D) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , C, B, A, D) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , C, B, D, A) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , C, D, A, B) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , C, D, B, A) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , C, A, D, B) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , C, A, B, D) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , D, C, B, A) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , D, C, A, B) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , D, A, B, C) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , D, A, C, B) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , D, B, A, C) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , D, B, C, A)
+
+#define GLM_SWIZZLE_GEN_REF_FROM_VEC4_COMP(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, A, B, C, D) \
+       GLM_SWIZZLE_GEN_REF2_FROM_VEC4_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, A, B, C, D) \
+       GLM_SWIZZLE_GEN_REF3_FROM_VEC4_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC3_TYPE, A, B, C, D) \
+       GLM_SWIZZLE_GEN_REF4_FROM_VEC4_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC4_TYPE, A, B, C, D)
+
+#define GLM_SWIZZLE_GEN_REF_FROM_VEC4(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE) \
+       GLM_SWIZZLE_GEN_REF_FROM_VEC4_COMP(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, x, y, z, w) \
+       GLM_SWIZZLE_GEN_REF_FROM_VEC4_COMP(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, r, g, b, a) \
+       GLM_SWIZZLE_GEN_REF_FROM_VEC4_COMP(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, s, t, p, q)
+
+//GLM_SWIZZLE_GEN_REF_FROM_VEC4(valType, detail::vec4, detail::ref2, detail::ref3, detail::ref4)
+
+#define GLM_SWIZZLE_GEN_VEC2_FROM_VEC2_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, A, B) \
+       GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A) \
+       GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B) \
+       GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A) \
+       GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B)
+
+#define GLM_SWIZZLE_GEN_VEC3_FROM_VEC2_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, A, B) \
+       GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, A) \
+       GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, B) \
+       GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, A) \
+       GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, B) \
+       GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, A) \
+       GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, B) \
+       GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, A) \
+       GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, B)
+
+#define GLM_SWIZZLE_GEN_VEC4_FROM_VEC2_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, A, B) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, A, A) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, A, B) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, B, A) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, B, B) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, A, A) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, A, B) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, B, A) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, B, B) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, A, A) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, A, B) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, B, A) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, B, B) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, A, A) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, A, B) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, B, A) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, B, B)
+
+#define GLM_SWIZZLE_GEN_VEC_FROM_VEC2_COMP(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, A, B) \
+       GLM_SWIZZLE_GEN_VEC2_FROM_VEC2_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, A, B) \
+       GLM_SWIZZLE_GEN_VEC3_FROM_VEC2_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC3_TYPE, A, B) \
+       GLM_SWIZZLE_GEN_VEC4_FROM_VEC2_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC4_TYPE, A, B)
+
+#define GLM_SWIZZLE_GEN_VEC_FROM_VEC2(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE)                    \
+       GLM_SWIZZLE_GEN_VEC_FROM_VEC2_COMP(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, x, y)  \
+       GLM_SWIZZLE_GEN_VEC_FROM_VEC2_COMP(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, r, g)  \
+       GLM_SWIZZLE_GEN_VEC_FROM_VEC2_COMP(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, s, t)
+
+//GLM_SWIZZLE_GEN_VEC_FROM_VEC2(valType, detail::vec2, detail::vec2, detail::vec3, detail::vec4)
+
+#define GLM_SWIZZLE_GEN_VEC2_FROM_VEC3_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, A, B, C) \
+       GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A) \
+       GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B) \
+       GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C) \
+       GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A) \
+       GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B) \
+       GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C) \
+       GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A) \
+       GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B) \
+       GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C)
+
+#define GLM_SWIZZLE_GEN_VEC3_FROM_VEC3_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, A, B, C) \
+       GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, A) \
+       GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, B) \
+       GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, C) \
+       GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, A) \
+       GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, B) \
+       GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, C) \
+       GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, A) \
+       GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, B) \
+       GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, C) \
+       GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, A) \
+       GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, B) \
+       GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, C) \
+       GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, A) \
+       GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, B) \
+       GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, C) \
+       GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, A) \
+       GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, B) \
+       GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, C) \
+       GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, A) \
+       GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, B) \
+       GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, C) \
+       GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, A) \
+       GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, B) \
+       GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, C) \
+       GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, A) \
+       GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, B) \
+       GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, C)
+
+#define GLM_SWIZZLE_GEN_VEC4_FROM_VEC3_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, A, B, C) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, A, A) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, A, B) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, A, C) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, B, A) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, B, B) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, B, C) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, C, A) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, C, B) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, C, C) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, A, A) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, A, B) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, A, C) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, B, A) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, B, B) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, B, C) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, C, A) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, C, B) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, C, C) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, A, A) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, A, B) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, A, C) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, B, A) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, B, B) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, B, C) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, C, A) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, C, B) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, C, C) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, A, A) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, A, B) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, A, C) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, B, A) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, B, B) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, B, C) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, C, A) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, C, B) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, C, C) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, A, A) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, A, B) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, A, C) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, B, A) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, B, B) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, B, C) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, C, A) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, C, B) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, C, C) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, A, A) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, A, B) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, A, C) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, B, A) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, B, B) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, B, C) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, C, A) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, C, B) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, C, C) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, A, A) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, A, B) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, A, C) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, B, A) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, B, B) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, B, C) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, C, A) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, C, B) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, C, C) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, A, A) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, A, B) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, A, C) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, B, A) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, B, B) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, B, C) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, C, A) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, C, B) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, C, C) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, A, A) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, A, B) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, A, C) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, B, A) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, B, B) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, B, C) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, C, A) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, C, B) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, C, C)
+
+#define GLM_SWIZZLE_GEN_VEC_FROM_VEC3_COMP(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, A, B, C) \
+       GLM_SWIZZLE_GEN_VEC2_FROM_VEC3_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, A, B, C) \
+       GLM_SWIZZLE_GEN_VEC3_FROM_VEC3_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC3_TYPE, A, B, C) \
+       GLM_SWIZZLE_GEN_VEC4_FROM_VEC3_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC4_TYPE, A, B, C)
+
+#define GLM_SWIZZLE_GEN_VEC_FROM_VEC3(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE) \
+       GLM_SWIZZLE_GEN_VEC_FROM_VEC3_COMP(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, x, y, z) \
+       GLM_SWIZZLE_GEN_VEC_FROM_VEC3_COMP(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, r, g, b) \
+       GLM_SWIZZLE_GEN_VEC_FROM_VEC3_COMP(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, s, t, p)
+
+//GLM_SWIZZLE_GEN_VEC_FROM_VEC3(valType, detail::vec3, detail::vec2, detail::vec3, detail::vec4)
+
+#define GLM_SWIZZLE_GEN_VEC2_FROM_VEC4_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, A, B, C, D) \
+       GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A) \
+       GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B) \
+       GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C) \
+       GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, D) \
+       GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A) \
+       GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B) \
+       GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C) \
+       GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, D) \
+       GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A) \
+       GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B) \
+       GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C) \
+       GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, D) \
+       GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, A) \
+       GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, B) \
+       GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, C) \
+       GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, D)
+
+#define GLM_SWIZZLE_GEN_VEC3_FROM_VEC4_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, A, B, C, D) \
+       GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, A) \
+       GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, B) \
+       GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, C) \
+       GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, D) \
+       GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, A) \
+       GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, B) \
+       GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, C) \
+       GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, D) \
+       GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, A) \
+       GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, B) \
+       GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, C) \
+       GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, D) \
+       GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, A) \
+       GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, B) \
+       GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, C) \
+       GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, D) \
+       GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, A) \
+       GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, B) \
+       GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, C) \
+       GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, D) \
+       GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, A) \
+       GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, B) \
+       GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, C) \
+       GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, D) \
+       GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, A) \
+       GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, B) \
+       GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, C) \
+       GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, D) \
+       GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, A) \
+       GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, B) \
+       GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, C) \
+       GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, D) \
+       GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, A) \
+       GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, B) \
+       GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, C) \
+       GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, D) \
+       GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, A) \
+       GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, B) \
+       GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, C) \
+       GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, D) \
+       GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, A) \
+       GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, B) \
+       GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, C) \
+       GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, D) \
+       GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, A) \
+       GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, B) \
+       GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, C) \
+       GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, D) \
+       GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, A) \
+       GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, B) \
+       GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, C) \
+       GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, D) \
+       GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, A) \
+       GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, B) \
+       GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, C) \
+       GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, D) \
+       GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, A) \
+       GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, B) \
+       GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, C) \
+       GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, D) \
+       GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, A) \
+       GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, B) \
+       GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, C) \
+       GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, D)
+
+#define GLM_SWIZZLE_GEN_VEC4_FROM_VEC4_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, A, B, C, D) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, A, A) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, A, B) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, A, C) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, A, D) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, B, A) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, B, B) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, B, C) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, B, D) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, C, A) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, C, B) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, C, C) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, C, D) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, D, A) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, D, B) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, D, C) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, D, D) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, A, A) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, A, B) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, A, C) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, A, D) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, B, A) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, B, B) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, B, C) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, B, D) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, C, A) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, C, B) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, C, C) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, C, D) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, D, A) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, D, B) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, D, C) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, D, D) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, A, A) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, A, B) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, A, C) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, A, D) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, B, A) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, B, B) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, B, C) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, B, D) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, C, A) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, C, B) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, C, C) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, C, D) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, D, A) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, D, B) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, D, C) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, D, D) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, A, A) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, A, B) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, A, C) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, A, D) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, B, A) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, B, B) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, B, C) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, B, D) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, C, A) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, C, B) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, C, C) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, C, D) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, D, A) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, D, B) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, D, C) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, D, D) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, A, A) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, A, B) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, A, C) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, A, D) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, B, A) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, B, B) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, B, C) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, B, D) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, C, A) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, C, B) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, C, C) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, C, D) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, D, A) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, D, B) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, D, C) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, D, D) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, A, A) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, A, B) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, A, C) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, A, D) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, B, A) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, B, B) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, B, C) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, B, D) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, C, A) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, C, B) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, C, C) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, C, D) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, D, A) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, D, B) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, D, C) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, D, D) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, A, A) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, A, B) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, A, C) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, A, D) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, B, A) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, B, B) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, B, C) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, B, D) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, C, A) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, C, B) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, C, C) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, C, D) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, D, A) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, D, B) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, D, C) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, D, D) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, A, A) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, A, B) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, A, C) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, A, D) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, B, A) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, B, B) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, B, C) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, B, D) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, C, A) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, C, B) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, C, C) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, C, D) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, D, A) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, D, B) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, D, C) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, D, D) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, A, A) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, A, B) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, A, C) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, A, D) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, B, A) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, B, B) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, B, C) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, B, D) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, C, A) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, C, B) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, C, C) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, C, D) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, D, A) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, D, B) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, D, C) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, D, D) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, A, A) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, A, B) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, A, C) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, A, D) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, B, A) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, B, B) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, B, C) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, B, D) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, C, A) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, C, B) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, C, C) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, C, D) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, D, A) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, D, B) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, D, C) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, D, D) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, A, A) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, A, B) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, A, C) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, A, D) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, B, A) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, B, B) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, B, C) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, B, D) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, C, A) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, C, B) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, C, C) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, C, D) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, D, A) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, D, B) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, D, C) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, D, D) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, A, A) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, A, B) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, A, C) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, A, D) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, B, A) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, B, B) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, B, C) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, B, D) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, C, A) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, C, B) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, C, C) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, C, D) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, D, A) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, D, B) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, D, C) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, D, D) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, A, A) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, A, B) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, A, C) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, A, D) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, B, A) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, B, B) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, B, C) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, B, D) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, C, A) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, C, B) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, C, C) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, C, D) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, D, A) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, D, B) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, D, C) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, D, D) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, A, A) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, A, B) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, A, C) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, A, D) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, B, A) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, B, B) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, B, C) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, B, D) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, C, A) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, C, B) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, C, C) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, C, D) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, D, A) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, D, B) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, D, C) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, D, D) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, A, A) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, A, B) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, A, C) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, A, D) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, B, A) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, B, B) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, B, C) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, B, D) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, C, A) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, C, B) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, C, C) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, C, D) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, D, A) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, D, B) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, D, C) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, D, D) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, A, A) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, A, B) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, A, C) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, A, D) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, B, A) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, B, B) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, B, C) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, B, D) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, C, A) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, C, B) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, C, C) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, C, D) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, D, A) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, D, B) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, D, C) \
+       GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, D, D)
+
+#define GLM_SWIZZLE_GEN_VEC_FROM_VEC4_COMP(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, A, B, C, D) \
+       GLM_SWIZZLE_GEN_VEC2_FROM_VEC4_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, A, B, C, D) \
+       GLM_SWIZZLE_GEN_VEC3_FROM_VEC4_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC3_TYPE, A, B, C, D) \
+       GLM_SWIZZLE_GEN_VEC4_FROM_VEC4_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC4_TYPE, A, B, C, D)
+
+#define GLM_SWIZZLE_GEN_VEC_FROM_VEC4(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE) \
+       GLM_SWIZZLE_GEN_VEC_FROM_VEC4_COMP(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, x, y, z, w) \
+       GLM_SWIZZLE_GEN_VEC_FROM_VEC4_COMP(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, r, g, b, a) \
+       GLM_SWIZZLE_GEN_VEC_FROM_VEC4_COMP(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, s, t, p, q)
+
+//GLM_SWIZZLE_GEN_VEC_FROM_VEC4(valType, detail::vec4, detail::vec2, detail::vec3, detail::vec4)
diff --git a/include/glm/detail/_vectorize.hpp b/include/glm/detail/_vectorize.hpp
new file mode 100644 (file)
index 0000000..53cf5b3
--- /dev/null
@@ -0,0 +1,160 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref core
+/// @file glm/detail/_vectorize.hpp
+/// @date 2011-10-14 / 2011-10-14
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////
+
+#pragma once
+
+#include "type_vec1.hpp"
+#include "type_vec2.hpp"
+#include "type_vec3.hpp"
+#include "type_vec4.hpp"
+
+namespace glm{
+namespace detail
+{
+       template <typename R, typename T, precision P, template <typename, precision> class vecType>
+       struct functor1{};
+
+       template <typename R, typename T, precision P>
+       struct functor1<R, T, P, tvec1>
+       {
+               GLM_FUNC_QUALIFIER static tvec1<R, P> call(R (*Func) (T x), tvec1<T, P> const & v)
+               {
+                       return tvec1<R, P>(Func(v.x));
+               }
+       };
+
+       template <typename R, typename T, precision P>
+       struct functor1<R, T, P, tvec2>
+       {
+               GLM_FUNC_QUALIFIER static tvec2<R, P> call(R (*Func) (T x), tvec2<T, P> const & v)
+               {
+                       return tvec2<R, P>(Func(v.x), Func(v.y));
+               }
+       };
+
+       template <typename R, typename T, precision P>
+       struct functor1<R, T, P, tvec3>
+       {
+               GLM_FUNC_QUALIFIER static tvec3<R, P> call(R (*Func) (T x), tvec3<T, P> const & v)
+               {
+                       return tvec3<R, P>(Func(v.x), Func(v.y), Func(v.z));
+               }
+       };
+
+       template <typename R, typename T, precision P>
+       struct functor1<R, T, P, tvec4>
+       {
+               GLM_FUNC_QUALIFIER static tvec4<R, P> call(R (*Func) (T x), tvec4<T, P> const & v)
+               {
+                       return tvec4<R, P>(Func(v.x), Func(v.y), Func(v.z), Func(v.w));
+               }
+       };
+
+       template <typename T, precision P, template <typename, precision> class vecType>
+       struct functor2{};
+
+       template <typename T, precision P>
+       struct functor2<T, P, tvec1>
+       {
+               GLM_FUNC_QUALIFIER static tvec1<T, P> call(T (*Func) (T x, T y), tvec1<T, P> const & a, tvec1<T, P> const & b)
+               {
+                       return tvec1<T, P>(Func(a.x, b.x));
+               }
+       };
+
+       template <typename T, precision P>
+       struct functor2<T, P, tvec2>
+       {
+               GLM_FUNC_QUALIFIER static tvec2<T, P> call(T (*Func) (T x, T y), tvec2<T, P> const & a, tvec2<T, P> const & b)
+               {
+                       return tvec2<T, P>(Func(a.x, b.x), Func(a.y, b.y));
+               }
+       };
+
+       template <typename T, precision P>
+       struct functor2<T, P, tvec3>
+       {
+               GLM_FUNC_QUALIFIER static tvec3<T, P> call(T (*Func) (T x, T y), tvec3<T, P> const & a, tvec3<T, P> const & b)
+               {
+                       return tvec3<T, P>(Func(a.x, b.x), Func(a.y, b.y), Func(a.z, b.z));
+               }
+       };
+
+       template <typename T, precision P>
+       struct functor2<T, P, tvec4>
+       {
+               GLM_FUNC_QUALIFIER static tvec4<T, P> call(T (*Func) (T x, T y), tvec4<T, P> const & a, tvec4<T, P> const & b)
+               {
+                       return tvec4<T, P>(Func(a.x, b.x), Func(a.y, b.y), Func(a.z, b.z), Func(a.w, b.w));
+               }
+       };
+
+       template <typename T, precision P, template <typename, precision> class vecType>
+       struct functor2_vec_sca{};
+
+       template <typename T, precision P>
+       struct functor2_vec_sca<T, P, tvec1>
+       {
+               GLM_FUNC_QUALIFIER static tvec1<T, P> call(T (*Func) (T x, T y), tvec1<T, P> const & a, T b)
+               {
+                       return tvec1<T, P>(Func(a.x, b));
+               }
+       };
+
+       template <typename T, precision P>
+       struct functor2_vec_sca<T, P, tvec2>
+       {
+               GLM_FUNC_QUALIFIER static tvec2<T, P> call(T (*Func) (T x, T y), tvec2<T, P> const & a, T b)
+               {
+                       return tvec2<T, P>(Func(a.x, b), Func(a.y, b));
+               }
+       };
+
+       template <typename T, precision P>
+       struct functor2_vec_sca<T, P, tvec3>
+       {
+               GLM_FUNC_QUALIFIER static tvec3<T, P> call(T (*Func) (T x, T y), tvec3<T, P> const & a, T b)
+               {
+                       return tvec3<T, P>(Func(a.x, b), Func(a.y, b), Func(a.z, b));
+               }
+       };
+
+       template <typename T, precision P>
+       struct functor2_vec_sca<T, P, tvec4>
+       {
+               GLM_FUNC_QUALIFIER static tvec4<T, P> call(T (*Func) (T x, T y), tvec4<T, P> const & a, T b)
+               {
+                       return tvec4<T, P>(Func(a.x, b), Func(a.y, b), Func(a.z, b), Func(a.w, b));
+               }
+       };
+}//namespace detail
+}//namespace glm
diff --git a/include/glm/detail/dummy.cpp b/include/glm/detail/dummy.cpp
new file mode 100644 (file)
index 0000000..09a2ae5
--- /dev/null
@@ -0,0 +1,232 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref core
+/// @file glm/core/dummy.cpp
+/// @date 2011-01-19 / 2011-06-15
+/// @author Christophe Riccio
+///
+/// GLM is a header only library. There is nothing to compile. 
+/// dummy.cpp exist only a wordaround for CMake file.
+///////////////////////////////////////////////////////////////////////////////////
+
+#define GLM_MESSAGES
+#include <glm/glm.hpp>
+#include <glm/ext.hpp>
+#include <limits>
+
+struct material
+{
+       glm::vec4 emission; // Ecm
+       glm::vec4 ambient; // Acm
+       glm::vec4 diffuse; // Dcm
+       glm::vec4 specular; // Scm
+       float shininess; // Srm
+};
+
+struct light
+{
+       glm::vec4 ambient; // Acli
+       glm::vec4 diffuse; // Dcli
+       glm::vec4 specular; // Scli
+       glm::vec4 position; // Ppli
+       glm::vec4 halfVector; // Derived: Hi
+       glm::vec3 spotDirection; // Sdli
+       float spotExponent; // Srli
+       float spotCutoff; // Crli
+       // (range: [0.0,90.0], 180.0)
+       float spotCosCutoff; // Derived: cos(Crli)
+       // (range: [1.0,0.0],-1.0)
+       float constantAttenuation; // K0
+       float linearAttenuation; // K1
+       float quadraticAttenuation;// K2
+};
+
+
+// Sample 1
+#include <glm/vec3.hpp>// glm::vec3
+#include <glm/geometric.hpp>// glm::cross, glm::normalize
+
+glm::vec3 computeNormal
+(
+       glm::vec3 const & a,
+       glm::vec3 const & b,
+       glm::vec3 const & c
+)
+{
+       return glm::normalize(glm::cross(c - a, b - a));
+}
+
+typedef unsigned int GLuint;
+#define GL_FALSE 0
+void glUniformMatrix4fv(GLuint, int, int, float*){}
+
+// Sample 2
+#include <glm/vec3.hpp> // glm::vec3
+#include <glm/vec4.hpp> // glm::vec4, glm::ivec4
+#include <glm/mat4x4.hpp> // glm::mat4
+#include <glm/gtc/matrix_transform.hpp> // glm::translate, glm::rotate, glm::scale, glm::perspective
+#include <glm/gtc/type_ptr.hpp> // glm::value_ptr
+void func(GLuint LocationMVP, float Translate, glm::vec2 const & Rotate)
+{
+       glm::mat4 Projection = glm::perspective(45.0f, 4.0f / 3.0f, 0.1f, 100.f);
+       glm::mat4 ViewTranslate = glm::translate(glm::mat4(1.0f), glm::vec3(0.0f, 0.0f, -Translate));
+       glm::mat4 ViewRotateX = glm::rotate(ViewTranslate, Rotate.y, glm::vec3(-1.0f, 0.0f, 0.0f));
+       glm::mat4 View = glm::rotate(ViewRotateX, Rotate.x, glm::vec3(0.0f, 1.0f, 0.0f));
+       glm::mat4 Model = glm::scale(glm::mat4(1.0f), glm::vec3(0.5f));
+       glm::mat4 MVP = Projection * View * Model;
+       glUniformMatrix4fv(LocationMVP, 1, GL_FALSE, glm::value_ptr(MVP));
+}
+
+// Sample 3
+#include <glm/vec2.hpp>// glm::vec2
+#include <glm/packing.hpp>// glm::packUnorm2x16
+#include <glm/integer.hpp>// glm::uint
+#include <glm/gtc/type_precision.hpp>// glm::i8vec2, glm::i32vec2
+std::size_t const VertexCount = 4;
+// Float quad geometry
+std::size_t const PositionSizeF32 = VertexCount * sizeof(glm::vec2);
+glm::vec2 const PositionDataF32[VertexCount] =
+{
+       glm::vec2(-1.0f,-1.0f),
+       glm::vec2( 1.0f,-1.0f),
+       glm::vec2( 1.0f, 1.0f),
+       glm::vec2(-1.0f, 1.0f)
+       };
+// Half-float quad geometry
+std::size_t const PositionSizeF16 = VertexCount * sizeof(glm::uint);
+glm::uint const PositionDataF16[VertexCount] =
+{
+       glm::uint(glm::packUnorm2x16(glm::vec2(-1.0f, -1.0f))),
+       glm::uint(glm::packUnorm2x16(glm::vec2( 1.0f, -1.0f))),
+       glm::uint(glm::packUnorm2x16(glm::vec2( 1.0f, 1.0f))),
+       glm::uint(glm::packUnorm2x16(glm::vec2(-1.0f, 1.0f)))
+};
+// 8 bits signed integer quad geometry
+std::size_t const PositionSizeI8 = VertexCount * sizeof(glm::i8vec2);
+glm::i8vec2 const PositionDataI8[VertexCount] =
+{
+       glm::i8vec2(-1,-1),
+       glm::i8vec2( 1,-1),
+       glm::i8vec2( 1, 1),
+       glm::i8vec2(-1, 1)
+};
+// 32 bits signed integer quad geometry
+std::size_t const PositionSizeI32 = VertexCount * sizeof(glm::i32vec2);
+glm::i32vec2 const PositionDataI32[VertexCount] =
+{
+       glm::i32vec2 (-1,-1),
+       glm::i32vec2 ( 1,-1),
+       glm::i32vec2 ( 1, 1),
+       glm::i32vec2 (-1, 1)
+};
+
+struct intersection
+{
+       glm::vec4 position;
+       glm::vec3 normal;
+};
+
+/*
+// Sample 4
+#include <glm/vec3.hpp>// glm::vec3
+#include <glm/geometric.hpp>// glm::normalize, glm::dot, glm::reflect
+#include <glm/exponential.hpp>// glm::pow
+#include <glm/gtc/random.hpp>// glm::vecRand3
+glm::vec3 lighting
+(
+       intersection const & Intersection,
+       material const & Material,
+       light const & Light,
+       glm::vec3 const & View
+)
+{
+       glm::vec3 Color(0.0f);
+       glm::vec3 LightVertor(glm::normalize(
+               Light.position - Intersection.position +
+               glm::vecRand3(0.0f, Light.inaccuracy));
+
+       if(!shadow(Intersection.position, Light.position, LightVertor))
+       {
+               float Diffuse = glm::dot(Intersection.normal, LightVector);
+               if(Diffuse <= 0.0f)
+                       return Color;
+               if(Material.isDiffuse())
+                       Color += Light.color() * Material.diffuse * Diffuse;
+               if(Material.isSpecular())
+               {
+                       glm::vec3 Reflect(glm::reflect(
+                               glm::normalize(-LightVector),
+                               glm::normalize(Intersection.normal)));
+                       float Dot = glm::dot(Reflect, View);
+                       float Base = Dot > 0.0f ? Dot : 0.0f;
+                       float Specular = glm::pow(Base, Material.exponent);
+                       Color += Material.specular * Specular;
+               }
+       }
+       return Color;
+}
+*/
+
+
+template <typename T, glm::precision P, template<typename, glm::precision> class vecType>
+T normalizeDotA(vecType<T, P> const & x, vecType<T, P> const & y)
+{
+       return glm::dot(x, y) * glm::inversesqrt(glm::dot(x, x) * glm::dot(y, y));
+}
+
+#define GLM_TEMPLATE_GENTYPE typename T, glm::precision P, template<typename, glm::precision> class
+
+template <GLM_TEMPLATE_GENTYPE vecType>
+T normalizeDotB(vecType<T, P> const & x, vecType<T, P> const & y)
+{
+       return glm::dot(x, y) * glm::inversesqrt(glm::dot(x, x) * glm::dot(y, y));
+}
+
+template <typename vecType>
+typename vecType::value_type normalizeDotC(vecType const & a, vecType const & b)
+{
+       return glm::dot(a, b) * glm::inversesqrt(glm::dot(a, a) * glm::dot(b, b));
+}
+
+int main()
+{
+       glm::vec1 o(1);
+       glm::vec2 a(1);
+       glm::vec3 b(1);
+       glm::vec4 c(1);
+
+       glm::quat q;
+       glm::dualquat p;
+
+       glm::mat4 m(1);
+
+       float a0 = normalizeDotA(a, a);
+       float b0 = normalizeDotB(b, b);
+       float c0 = normalizeDotC(c, c);
+
+       return 0;
+}
diff --git a/include/glm/detail/func_common.hpp b/include/glm/detail/func_common.hpp
new file mode 100644 (file)
index 0000000..08b69c8
--- /dev/null
@@ -0,0 +1,456 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref core
+/// @file glm/detail/func_common.hpp
+/// @date 2008-03-08 / 2010-01-26
+/// @author Christophe Riccio
+/// 
+/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
+///
+/// @defgroup core_func_common Common functions
+/// @ingroup core
+/// 
+/// These all operate component-wise. The description is per component.
+///////////////////////////////////////////////////////////////////////////////////
+
+#pragma once
+
+#include "setup.hpp"
+#include "precision.hpp"
+#include "type_int.hpp"
+#include "_fixes.hpp"
+
+namespace glm
+{
+       /// @addtogroup core_func_common
+       /// @{
+
+       /// Returns x if x >= 0; otherwise, it returns -x.
+       /// 
+       /// @tparam genType floating-point or signed integer; scalar or vector types.
+       /// 
+       /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/abs.xml">GLSL abs man page</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
+       template <typename genType>
+       GLM_FUNC_DECL genType abs(genType x);
+
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_DECL vecType<T, P> abs(vecType<T, P> const & x);
+
+       /// Returns 1.0 if x > 0, 0.0 if x == 0, or -1.0 if x < 0. 
+       /// 
+       /// @tparam genType Floating-point or signed integer; scalar or vector types.
+       /// 
+       /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/sign.xml">GLSL sign man page</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_DECL vecType<T, P> sign(vecType<T, P> const & x);
+
+       /// Returns a value equal to the nearest integer that is less then or equal to x. 
+       /// 
+       /// @tparam genType Floating-point scalar or vector types.
+       /// 
+       /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/floor.xml">GLSL floor man page</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_DECL vecType<T, P> floor(vecType<T, P> const & x);
+
+       /// Returns a value equal to the nearest integer to x
+       /// whose absolute value is not larger than the absolute value of x.
+       /// 
+       /// @tparam genType Floating-point scalar or vector types.
+       /// 
+       /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/trunc.xml">GLSL trunc man page</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_DECL vecType<T, P> trunc(vecType<T, P> const & x);
+
+       /// Returns a value equal to the nearest integer to x.
+       /// The fraction 0.5 will round in a direction chosen by the
+       /// implementation, presumably the direction that is fastest.
+       /// This includes the possibility that round(x) returns the
+       /// same value as roundEven(x) for all values of x.
+       /// 
+       /// @tparam genType Floating-point scalar or vector types.
+       /// 
+       /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/round.xml">GLSL round man page</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_DECL vecType<T, P> round(vecType<T, P> const & x);
+
+       /// Returns a value equal to the nearest integer to x.
+       /// A fractional part of 0.5 will round toward the nearest even
+       /// integer. (Both 3.5 and 4.5 for x will return 4.0.)
+       ///
+       /// @tparam genType Floating-point scalar or vector types.
+       /// 
+       /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/roundEven.xml">GLSL roundEven man page</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
+       /// @see <a href="http://developer.amd.com/documentation/articles/pages/New-Round-to-Even-Technique.aspx">New round to even technique</a>
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_DECL vecType<T, P> roundEven(vecType<T, P> const & x);
+
+       /// Returns a value equal to the nearest integer
+       /// that is greater than or equal to x.
+       /// 
+       /// @tparam genType Floating-point scalar or vector types.
+       ///
+       /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/ceil.xml">GLSL ceil man page</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_DECL vecType<T, P> ceil(vecType<T, P> const & x);
+
+       /// Return x - floor(x).
+       /// 
+       /// @tparam genType Floating-point scalar or vector types.
+       ///
+       /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/fract.xml">GLSL fract man page</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
+       template <typename genType>
+       GLM_FUNC_DECL genType fract(genType x);
+
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_DECL vecType<T, P> fract(vecType<T, P> const & x);
+
+       /// Modulus. Returns x - y * floor(x / y)
+       /// for each component in x using the floating point value y.
+       ///
+       /// @tparam genType Floating-point scalar or vector types.
+       ///
+       /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/mod.xml">GLSL mod man page</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
+       template <typename genType>
+       GLM_FUNC_DECL genType mod(genType x, genType y);
+
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_DECL vecType<T, P> mod(vecType<T, P> const & x, T y);
+
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_DECL vecType<T, P> mod(vecType<T, P> const & x, vecType<T, P> const & y);
+
+       /// Returns the fractional part of x and sets i to the integer
+       /// part (as a whole number floating point value). Both the
+       /// return value and the output parameter will have the same
+       /// sign as x.
+       /// 
+       /// @tparam genType Floating-point scalar or vector types.
+       ///
+       /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/modf.xml">GLSL modf man page</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
+       template <typename genType>
+       GLM_FUNC_DECL genType modf(genType x, genType & i);
+
+       /// Returns y if y < x; otherwise, it returns x.
+       ///
+       /// @tparam genType Floating-point or integer; scalar or vector types.
+       /// 
+       /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/min.xml">GLSL min man page</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
+       template <typename genType>
+       GLM_FUNC_DECL genType min(genType x, genType y);
+
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_DECL vecType<T, P> min(vecType<T, P> const & x, T y);
+
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_DECL vecType<T, P> min(vecType<T, P> const & x, vecType<T, P> const & y);
+
+       /// Returns y if x < y; otherwise, it returns x.
+       /// 
+       /// @tparam genType Floating-point or integer; scalar or vector types.
+       /// 
+       /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/max.xml">GLSL max man page</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
+       template <typename genType>
+       GLM_FUNC_DECL genType max(genType x, genType y);
+
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_DECL vecType<T, P> max(vecType<T, P> const & x, T y);
+
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_DECL vecType<T, P> max(vecType<T, P> const & x, vecType<T, P> const & y);
+
+       /// Returns min(max(x, minVal), maxVal) for each component in x 
+       /// using the floating-point values minVal and maxVal.
+       ///
+       /// @tparam genType Floating-point or integer; scalar or vector types.
+       ///
+       /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/clamp.xml">GLSL clamp man page</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
+       template <typename genType>
+       GLM_FUNC_DECL genType clamp(genType x, genType minVal, genType maxVal);
+
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_DECL vecType<T, P> clamp(vecType<T, P> const & x, T minVal, T maxVal);
+
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_DECL vecType<T, P> clamp(vecType<T, P> const & x, vecType<T, P> const & minVal, vecType<T, P> const & maxVal);
+
+       /// If genTypeU is a floating scalar or vector:
+       /// Returns x * (1.0 - a) + y * a, i.e., the linear blend of
+       /// x and y using the floating-point value a.
+       /// The value for a is not restricted to the range [0, 1].
+       /// 
+       /// If genTypeU is a boolean scalar or vector:
+       /// Selects which vector each returned component comes
+       /// from. For a component of <a> that is false, the
+       /// corresponding component of x is returned. For a
+       /// component of a that is true, the corresponding
+       /// component of y is returned. Components of x and y that
+       /// are not selected are allowed to be invalid floating point
+       /// values and will have no effect on the results. Thus, this
+       /// provides different functionality than
+       /// genType mix(genType x, genType y, genType(a))
+       /// where a is a Boolean vector.
+       /// 
+       /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/mix.xml">GLSL mix man page</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
+       /// 
+       /// @param[in]  x Value to interpolate.
+       /// @param[in]  y Value to interpolate.
+       /// @param[in]  a Interpolant.
+       /// 
+       /// @tparam     genTypeT Floating point scalar or vector.
+       /// @tparam genTypeU Floating point or boolean scalar or vector. It can't be a vector if it is the length of genTypeT.
+       /// 
+       /// @code
+       /// #include <glm/glm.hpp>
+       /// ...
+       /// float a;
+       /// bool b;
+       /// glm::dvec3 e;
+       /// glm::dvec3 f;
+       /// glm::vec4 g;
+       /// glm::vec4 h;
+       /// ...
+       /// glm::vec4 r = glm::mix(g, h, a); // Interpolate with a floating-point scalar two vectors. 
+       /// glm::vec4 s = glm::mix(g, h, b); // Teturns g or h;
+       /// glm::dvec3 t = glm::mix(e, f, a); // Types of the third parameter is not required to match with the first and the second.
+       /// glm::vec4 u = glm::mix(g, h, r); // Interpolations can be perform per component with a vector for the last parameter.
+       /// @endcode
+       template <typename T, typename U, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_DECL vecType<T, P> mix(vecType<T, P> const & x, vecType<T, P> const & y, vecType<U, P> const & a);
+
+       template <typename T, typename U, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_DECL vecType<T, P> mix(vecType<T, P> const & x, vecType<T, P> const & y, U a);
+
+       template <typename genTypeT, typename genTypeU>
+       GLM_FUNC_DECL genTypeT mix(genTypeT x, genTypeT y, genTypeU a);
+
+       /// Returns 0.0 if x < edge, otherwise it returns 1.0 for each component of a genType.
+       /// 
+       /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/step.xml">GLSL step man page</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
+       template <typename genType>
+       GLM_FUNC_DECL genType step(genType edge, genType x);
+
+       /// Returns 0.0 if x < edge, otherwise it returns 1.0.
+       /// 
+       /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/step.xml">GLSL step man page</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
+       template <template <typename, precision> class vecType, typename T, precision P>
+       GLM_FUNC_DECL vecType<T, P> step(T edge, vecType<T, P> const & x);
+
+       /// Returns 0.0 if x < edge, otherwise it returns 1.0.
+       /// 
+       /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/step.xml">GLSL step man page</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
+       template <template <typename, precision> class vecType, typename T, precision P>
+       GLM_FUNC_DECL vecType<T, P> step(vecType<T, P> const & edge, vecType<T, P> const & x);
+
+       /// Returns 0.0 if x <= edge0 and 1.0 if x >= edge1 and
+       /// performs smooth Hermite interpolation between 0 and 1
+       /// when edge0 < x < edge1. This is useful in cases where
+       /// you would want a threshold function with a smooth
+       /// transition. This is equivalent to:
+       /// genType t;
+       /// t = clamp ((x - edge0) / (edge1 - edge0), 0, 1);
+       /// return t * t * (3 - 2 * t);
+       /// Results are undefined if edge0 >= edge1.
+       ///
+       /// @tparam genType Floating-point scalar or vector types.
+       /// 
+       /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/smoothstep.xml">GLSL smoothstep man page</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
+       template <typename genType>
+       GLM_FUNC_DECL genType smoothstep(genType edge0, genType edge1, genType x);
+
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_DECL vecType<T, P> smoothstep(T edge0, T edge1, vecType<T, P> const & x);
+
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_DECL vecType<T, P> smoothstep(vecType<T, P> const & edge0, vecType<T, P> const & edge1, vecType<T, P> const & x);
+
+       /// Returns true if x holds a NaN (not a number)
+       /// representation in the underlying implementation's set of
+       /// floating point representations. Returns false otherwise,
+       /// including for implementations with no NaN
+       /// representations.
+       /// 
+       /// /!\ When using compiler fast math, this function may fail.
+       /// 
+       /// @tparam genType Floating-point scalar or vector types.
+       ///
+       /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/isnan.xml">GLSL isnan man page</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_DECL vecType<bool, P> isnan(vecType<T, P> const & x);
+
+       /// Returns true if x holds a positive infinity or negative
+       /// infinity representation in the underlying implementation's
+       /// set of floating point representations. Returns false
+       /// otherwise, including for implementations with no infinity
+       /// representations.
+       /// 
+       /// @tparam genType Floating-point scalar or vector types.
+       /// 
+       /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/isinf.xml">GLSL isinf man page</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_DECL vecType<bool, P> isinf(vecType<T, P> const & x);
+
+       /// Returns a signed integer value representing
+       /// the encoding of a floating-point value. The floating-point
+       /// value's bit-level representation is preserved.
+       /// 
+       /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/floatBitsToInt.xml">GLSL floatBitsToInt man page</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
+       GLM_FUNC_DECL int floatBitsToInt(float const & v);
+
+       /// Returns a signed integer value representing
+       /// the encoding of a floating-point value. The floatingpoint
+       /// value's bit-level representation is preserved.
+       /// 
+       /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/floatBitsToInt.xml">GLSL floatBitsToInt man page</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
+       template <template <typename, precision> class vecType, precision P>
+       GLM_FUNC_DECL vecType<int, P> floatBitsToInt(vecType<float, P> const & v);
+
+       /// Returns a unsigned integer value representing
+       /// the encoding of a floating-point value. The floatingpoint
+       /// value's bit-level representation is preserved.
+       /// 
+       /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/floatBitsToUint.xml">GLSL floatBitsToUint man page</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
+       GLM_FUNC_DECL uint floatBitsToUint(float const & v);
+
+       /// Returns a unsigned integer value representing
+       /// the encoding of a floating-point value. The floatingpoint
+       /// value's bit-level representation is preserved.
+       /// 
+       /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/floatBitsToUint.xml">GLSL floatBitsToUint man page</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
+       template <template <typename, precision> class vecType, precision P>
+       GLM_FUNC_DECL vecType<uint, P> floatBitsToUint(vecType<float, P> const & v);
+
+       /// Returns a floating-point value corresponding to a signed
+       /// integer encoding of a floating-point value.
+       /// If an inf or NaN is passed in, it will not signal, and the
+       /// resulting floating point value is unspecified. Otherwise,
+       /// the bit-level representation is preserved.
+       /// 
+       /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/intBitsToFloat.xml">GLSL intBitsToFloat man page</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
+       GLM_FUNC_DECL float intBitsToFloat(int const & v);
+
+       /// Returns a floating-point value corresponding to a signed
+       /// integer encoding of a floating-point value.
+       /// If an inf or NaN is passed in, it will not signal, and the
+       /// resulting floating point value is unspecified. Otherwise,
+       /// the bit-level representation is preserved.
+       /// 
+       /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/intBitsToFloat.xml">GLSL intBitsToFloat man page</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
+       template <template <typename, precision> class vecType, precision P>
+       GLM_FUNC_DECL vecType<float, P> intBitsToFloat(vecType<int, P> const & v);
+
+       /// Returns a floating-point value corresponding to a
+       /// unsigned integer encoding of a floating-point value.
+       /// If an inf or NaN is passed in, it will not signal, and the
+       /// resulting floating point value is unspecified. Otherwise,
+       /// the bit-level representation is preserved.
+       /// 
+       /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/uintBitsToFloat.xml">GLSL uintBitsToFloat man page</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
+       GLM_FUNC_DECL float uintBitsToFloat(uint const & v);
+
+       /// Returns a floating-point value corresponding to a
+       /// unsigned integer encoding of a floating-point value.
+       /// If an inf or NaN is passed in, it will not signal, and the
+       /// resulting floating point value is unspecified. Otherwise,
+       /// the bit-level representation is preserved.
+       /// 
+       /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/uintBitsToFloat.xml">GLSL uintBitsToFloat man page</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
+       template <template <typename, precision> class vecType, precision P>
+       GLM_FUNC_DECL vecType<float, P> uintBitsToFloat(vecType<uint, P> const & v);
+
+       /// Computes and returns a * b + c.
+       /// 
+       /// @tparam genType Floating-point scalar or vector types.
+       /// 
+       /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/fma.xml">GLSL fma man page</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
+       template <typename genType>
+       GLM_FUNC_DECL genType fma(genType const & a, genType const & b, genType const & c);
+
+       /// Splits x into a floating-point significand in the range
+       /// [0.5, 1.0) and an integral exponent of two, such that:
+       /// x = significand * exp(2, exponent)
+       /// 
+       /// The significand is returned by the function and the
+       /// exponent is returned in the parameter exp. For a
+       /// floating-point value of zero, the significant and exponent
+       /// are both zero. For a floating-point value that is an
+       /// infinity or is not a number, the results are undefined.
+       /// 
+       /// @tparam genType Floating-point scalar or vector types.
+       /// 
+       /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/frexp.xml">GLSL frexp man page</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
+       template <typename genType, typename genIType>
+       GLM_FUNC_DECL genType frexp(genType const & x, genIType & exp);
+
+       /// Builds a floating-point number from x and the
+       /// corresponding integral exponent of two in exp, returning:
+       /// significand * exp(2, exponent)
+       /// 
+       /// If this product is too large to be represented in the
+       /// floating-point type, the result is undefined.
+       /// 
+       /// @tparam genType Floating-point scalar or vector types.
+       ///  
+       /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/ldexp.xml">GLSL ldexp man page</a>; 
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
+       template <typename genType, typename genIType>
+       GLM_FUNC_DECL genType ldexp(genType const & x, genIType const & exp);
+
+       /// @}
+}//namespace glm
+
+#include "func_common.inl"
+
diff --git a/include/glm/detail/func_common.inl b/include/glm/detail/func_common.inl
new file mode 100644 (file)
index 0000000..83252de
--- /dev/null
@@ -0,0 +1,758 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref core
+/// @file glm/detail/func_common.inl
+/// @date 2008-08-03 / 2011-06-15
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////
+
+#include "func_vector_relational.hpp"
+#include "type_vec2.hpp"
+#include "type_vec3.hpp"
+#include "type_vec4.hpp"
+#include "_vectorize.hpp"
+#include <limits>
+
+namespace glm{
+namespace detail
+{
+       template <typename genFIType, bool /*signed*/>
+       struct compute_abs
+       {};
+
+       template <typename genFIType>
+       struct compute_abs<genFIType, true>
+       {
+               GLM_FUNC_QUALIFIER static genFIType call(genFIType x)
+               {
+                       GLM_STATIC_ASSERT(
+                               std::numeric_limits<genFIType>::is_iec559 || std::numeric_limits<genFIType>::is_signed,
+                               "'abs' only accept floating-point and integer scalar or vector inputs");
+
+                       return x >= genFIType(0) ? x : -x;
+                       // TODO, perf comp with: *(((int *) &x) + 1) &= 0x7fffffff;
+               }
+       };
+
+       template <typename genFIType>
+       struct compute_abs<genFIType, false>
+       {
+               GLM_FUNC_QUALIFIER static genFIType call(genFIType x)
+               {
+                       GLM_STATIC_ASSERT(
+                               !std::numeric_limits<genFIType>::is_signed && std::numeric_limits<genFIType>::is_integer,
+                               "'abs' only accept floating-point and integer scalar or vector inputs");
+                       return x;
+               }
+       };
+
+       template <typename T, typename U, precision P, template <class, precision> class vecType>
+       struct compute_mix_vector
+       {
+               GLM_FUNC_QUALIFIER static vecType<T, P> call(vecType<T, P> const & x, vecType<T, P> const & y, vecType<U, P> const & a)
+               {
+                       GLM_STATIC_ASSERT(std::numeric_limits<U>::is_iec559, "'mix' only accept floating-point inputs for the interpolator a");
+
+                       return vecType<T, P>(vecType<U, P>(x) + a * vecType<U, P>(y - x));
+               }
+       };
+
+       template <typename T, precision P, template <class, precision> class vecType>
+       struct compute_mix_vector<T, bool, P, vecType>
+       {
+               GLM_FUNC_QUALIFIER static vecType<T, P> call(vecType<T, P> const & x, vecType<T, P> const & y, vecType<bool, P> const & a)
+               {
+                       vecType<T, P> Result(uninitialize);
+                       for(detail::component_count_t i = 0; i < detail::component_count(x); ++i)
+                               Result[i] = a[i] ? y[i] : x[i];
+                       return Result;
+               }
+       };
+
+       template <typename T, typename U, precision P, template <class, precision> class vecType>
+       struct compute_mix_scalar
+       {
+               GLM_FUNC_QUALIFIER static vecType<T, P> call(vecType<T, P> const & x, vecType<T, P> const & y, U const & a)
+               {
+                       GLM_STATIC_ASSERT(std::numeric_limits<U>::is_iec559, "'mix' only accept floating-point inputs for the interpolator a");
+
+                       return vecType<T, P>(vecType<U, P>(x) + a * vecType<U, P>(y - x));
+               }
+       };
+
+       template <typename T, precision P, template <class, precision> class vecType>
+       struct compute_mix_scalar<T, bool, P, vecType>
+       {
+               GLM_FUNC_QUALIFIER static vecType<T, P> call(vecType<T, P> const & x, vecType<T, P> const & y, bool const & a)
+               {
+                       return a ? y : x;
+               }
+       };
+
+       template <typename T, typename U>
+       struct compute_mix
+       {
+               GLM_FUNC_QUALIFIER static T call(T const & x, T const & y, U const & a)
+               {
+                       GLM_STATIC_ASSERT(std::numeric_limits<U>::is_iec559, "'mix' only accept floating-point inputs for the interpolator a");
+
+                       return static_cast<T>(static_cast<U>(x) + a * static_cast<U>(y - x));
+               }
+       };
+
+       template <typename T>
+       struct compute_mix<T, bool>
+       {
+               GLM_FUNC_QUALIFIER static T call(T const & x, T const & y, bool const & a)
+               {
+                       return a ? y : x;
+               }
+       };
+
+       template <typename T, precision P, template <class, precision> class vecType, bool isFloat = true, bool isSigned = true>
+       struct compute_sign
+       {
+               GLM_FUNC_QUALIFIER static vecType<T, P> call(vecType<T, P> const & x)
+               {
+                       return vecType<T, P>(glm::lessThan(vecType<T, P>(0), x)) - vecType<T, P>(glm::lessThan(x, vecType<T, P>(0)));
+               }
+       };
+
+       template <typename T, precision P, template <class, precision> class vecType>
+       struct compute_sign<T, P, vecType, false, false>
+       {
+               GLM_FUNC_QUALIFIER static vecType<T, P> call(vecType<T, P> const & x)
+               {
+                       return vecType<T, P>(glm::greaterThan(x , vecType<T, P>(0)));
+               }
+       };
+
+       template <typename T, precision P, template <class, precision> class vecType>
+       struct compute_sign<T, P, vecType, false, true>
+       {
+               GLM_FUNC_QUALIFIER static vecType<T, P> call(vecType<T, P> const & x)
+               {
+                       T const Shift(static_cast<T>(sizeof(T) * 8 - 1));
+                       vecType<T, P> const y(vecType<typename make_unsigned<T>::type, P>(-x) >> typename make_unsigned<T>::type(Shift));
+
+                       return (x >> Shift) | y;
+               }
+       };
+
+       template <typename T, precision P, template <class, precision> class vecType, typename genType, bool isFloat = true>
+       struct compute_mod
+       {
+               GLM_FUNC_QUALIFIER static vecType<T, P> call(vecType<T, P> const & a, genType const & b)
+               {
+                       GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'mod' only accept floating-point inputs. Include <glm/gtc/integer.hpp> for integer inputs.");
+                       return a - b * floor(a / b);
+               }
+       };
+}//namespace detail
+
+       // abs
+       template <>
+       GLM_FUNC_QUALIFIER int32 abs(int32 x)
+       {
+               int32 const y = x >> 31;
+               return (x ^ y) - y;
+       }
+
+       template <typename genFIType>
+       GLM_FUNC_QUALIFIER genFIType abs(genFIType x)
+       {
+               return detail::compute_abs<genFIType, std::numeric_limits<genFIType>::is_signed>::call(x);
+       }
+
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_QUALIFIER vecType<T, P> abs(vecType<T, P> const & x)
+       {
+               return detail::functor1<T, T, P, vecType>::call(abs, x);
+       }
+
+       // sign
+       // fast and works for any type
+       template <typename genFIType> 
+       GLM_FUNC_QUALIFIER genFIType sign(genFIType x)
+       {
+               GLM_STATIC_ASSERT(
+                       std::numeric_limits<genFIType>::is_iec559 || (std::numeric_limits<genFIType>::is_signed && std::numeric_limits<genFIType>::is_integer),
+                       "'sign' only accept signed inputs");
+               
+               return detail::compute_sign<genFIType, defaultp, tvec1, std::numeric_limits<genFIType>::is_iec559>::call(tvec1<genFIType>(x)).x;
+       }
+
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_QUALIFIER vecType<T, P> sign(vecType<T, P> const & x)
+       {
+               GLM_STATIC_ASSERT(
+                       std::numeric_limits<T>::is_iec559 || (std::numeric_limits<T>::is_signed && std::numeric_limits<T>::is_integer),
+                       "'sign' only accept signed inputs");
+
+               return detail::compute_sign<T, P, vecType, std::numeric_limits<T>::is_iec559>::call(x);
+       }
+
+       // floor
+       using ::std::floor;
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_QUALIFIER vecType<T, P> floor(vecType<T, P> const & x)
+       {
+               return detail::functor1<T, T, P, vecType>::call(floor, x);
+       }
+
+       // trunc
+#      if GLM_HAS_CXX11_STL
+               using ::std::trunc;
+#      else
+               template <typename genType>
+               GLM_FUNC_QUALIFIER genType trunc(genType x)
+               {
+                       GLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, "'trunc' only accept floating-point inputs");
+
+                       return x < static_cast<genType>(0) ? -floor(-x) : floor(x);
+               }
+#      endif
+
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_QUALIFIER vecType<T, P> trunc(vecType<T, P> const & x)
+       {
+               return detail::functor1<T, T, P, vecType>::call(trunc, x);
+       }
+
+       // round
+#      if GLM_HAS_CXX11_STL
+               using ::std::round;
+#      else
+               template <typename genType>
+               GLM_FUNC_QUALIFIER genType round(genType x)
+               {
+                       GLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, "'round' only accept floating-point inputs");
+
+                       return x < static_cast<genType>(0) ? static_cast<genType>(int(x - static_cast<genType>(0.5))) : static_cast<genType>(int(x + static_cast<genType>(0.5)));
+               }
+#      endif
+
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_QUALIFIER vecType<T, P> round(vecType<T, P> const & x)
+       {
+               return detail::functor1<T, T, P, vecType>::call(round, x);
+       }
+
+/*
+       // roundEven
+       template <typename genType>
+       GLM_FUNC_QUALIFIER genType roundEven(genType const& x)
+       {
+               GLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, "'roundEven' only accept floating-point inputs");
+
+               return genType(int(x + genType(int(x) % 2)));
+       }
+*/
+
+       // roundEven
+       template <typename genType>
+       GLM_FUNC_QUALIFIER genType roundEven(genType x)
+       {
+               GLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, "'roundEven' only accept floating-point inputs");
+               
+               int Integer = static_cast<int>(x);
+               genType IntegerPart = static_cast<genType>(Integer);
+               genType FractionalPart = fract(x);
+
+               if(FractionalPart > static_cast<genType>(0.5) || FractionalPart < static_cast<genType>(0.5))
+               {
+                       return round(x);
+               }
+               else if((Integer % 2) == 0)
+               {
+                       return IntegerPart;
+               }
+               else if(x <= static_cast<genType>(0)) // Work around... 
+               {
+                       return IntegerPart - static_cast<genType>(1);
+               }
+               else
+               {
+                       return IntegerPart + static_cast<genType>(1);
+               }
+               //else // Bug on MinGW 4.5.2
+               //{
+               //      return mix(IntegerPart + genType(-1), IntegerPart + genType(1), x <= genType(0));
+               //}
+       }
+
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_QUALIFIER vecType<T, P> roundEven(vecType<T, P> const & x)
+       {
+               return detail::functor1<T, T, P, vecType>::call(roundEven, x);
+       }
+
+       // ceil
+       using ::std::ceil;
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_QUALIFIER vecType<T, P> ceil(vecType<T, P> const & x)
+       {
+               return detail::functor1<T, T, P, vecType>::call(ceil, x);
+       }
+
+       // fract
+       template <typename genType>
+       GLM_FUNC_QUALIFIER genType fract(genType x)
+       {
+               GLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, "'fract' only accept floating-point inputs");
+
+               return fract(tvec1<genType>(x)).x;
+       }
+
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_QUALIFIER vecType<T, P> fract(vecType<T, P> const & x)
+       {
+               return x - floor(x);
+       }
+
+       // mod
+       template <typename genType>
+       GLM_FUNC_QUALIFIER genType mod(genType x, genType y)
+       {
+               return mod(tvec1<genType>(x), y).x;
+       }
+
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_QUALIFIER vecType<T, P> mod(vecType<T, P> const & x, T y)
+       {
+               return detail::compute_mod<T, P, vecType, T, std::numeric_limits<T>::is_iec559>::call(x, y);
+       }
+
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_QUALIFIER vecType<T, P> mod(vecType<T, P> const & x, vecType<T, P> const & y)
+       {
+               return detail::compute_mod<T, P, vecType, vecType<T, P>, std::numeric_limits<T>::is_iec559>::call(x, y);
+       }
+
+       // modf
+       template <typename genType>
+       GLM_FUNC_QUALIFIER genType modf(genType x, genType & i)
+       {
+               GLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, "'modf' only accept floating-point inputs");
+
+               return std::modf(x, &i);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec1<T, P> modf(tvec1<T, P> const & x, tvec1<T, P> & i)
+       {
+               return tvec1<T, P>(
+                       modf(x.x, i.x));
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec2<T, P> modf(tvec2<T, P> const & x, tvec2<T, P> & i)
+       {
+               return tvec2<T, P>(
+                       modf(x.x, i.x),
+                       modf(x.y, i.y));
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec3<T, P> modf(tvec3<T, P> const & x, tvec3<T, P> & i)
+       {
+               return tvec3<T, P>(
+                       modf(x.x, i.x),
+                       modf(x.y, i.y),
+                       modf(x.z, i.z));
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec4<T, P> modf(tvec4<T, P> const & x, tvec4<T, P> & i)
+       {
+               return tvec4<T, P>(
+                       modf(x.x, i.x),
+                       modf(x.y, i.y),
+                       modf(x.z, i.z),
+                       modf(x.w, i.w));
+       }
+
+       //// Only valid if (INT_MIN <= x-y <= INT_MAX)
+       //// min(x,y)
+       //r = y + ((x - y) & ((x - y) >> (sizeof(int) *
+       //CHAR_BIT - 1)));
+       //// max(x,y)
+       //r = x - ((x - y) & ((x - y) >> (sizeof(int) *
+       //CHAR_BIT - 1)));
+
+       // min
+       template <typename genType>
+       GLM_FUNC_QUALIFIER genType min(genType x, genType y)
+       {
+               GLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559 || std::numeric_limits<genType>::is_integer, "'min' only accept floating-point or integer inputs");
+
+               return x < y ? x : y;
+       }
+
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_QUALIFIER vecType<T, P> min(vecType<T, P> const & a, T b)
+       {
+               return detail::functor2_vec_sca<T, P, vecType>::call(min, a, b);
+       }
+
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_QUALIFIER vecType<T, P> min(vecType<T, P> const & a, vecType<T, P> const & b)
+       {
+               return detail::functor2<T, P, vecType>::call(min, a, b);
+       }
+
+       // max
+       template <typename genType>
+       GLM_FUNC_QUALIFIER genType max(genType x, genType y)
+       {
+               GLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559 || std::numeric_limits<genType>::is_integer, "'max' only accept floating-point or integer inputs");
+
+               return x > y ? x : y;
+       }
+
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_QUALIFIER vecType<T, P> max(vecType<T, P> const & a, T b)
+       {
+               return detail::functor2_vec_sca<T, P, vecType>::call(max, a, b);
+       }
+
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_QUALIFIER vecType<T, P> max(vecType<T, P> const & a, vecType<T, P> const & b)
+       {
+               return detail::functor2<T, P, vecType>::call(max, a, b);
+       }
+
+       // clamp
+       template <typename genType>
+       GLM_FUNC_QUALIFIER genType clamp(genType x, genType minVal, genType maxVal)
+       {
+               GLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559 || std::numeric_limits<genType>::is_integer, "'clamp' only accept floating-point or integer inputs");
+               
+               return min(max(x, minVal), maxVal);
+       }
+
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_QUALIFIER vecType<T, P> clamp(vecType<T, P> const & x, T minVal, T maxVal)
+       {
+               GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559 || std::numeric_limits<T>::is_integer, "'clamp' only accept floating-point or integer inputs");
+
+               return min(max(x, minVal), maxVal);
+       }
+
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_QUALIFIER vecType<T, P> clamp(vecType<T, P> const & x, vecType<T, P> const & minVal, vecType<T, P> const & maxVal)
+       {
+               GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559 || std::numeric_limits<T>::is_integer, "'clamp' only accept floating-point or integer inputs");
+
+               return min(max(x, minVal), maxVal);
+       }
+
+       template <typename genTypeT, typename genTypeU>
+       GLM_FUNC_QUALIFIER genTypeT mix(genTypeT x, genTypeT y, genTypeU a)
+       {
+               return detail::compute_mix<genTypeT, genTypeU>::call(x, y, a);
+       }
+
+       template <typename T, typename U, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_QUALIFIER vecType<T, P> mix(vecType<T, P> const & x, vecType<T, P> const & y, U a)
+       {
+               return detail::compute_mix_scalar<T, U, P, vecType>::call(x, y, a);
+       }
+       
+       template <typename T, typename U, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_QUALIFIER vecType<T, P> mix(vecType<T, P> const & x, vecType<T, P> const & y, vecType<U, P> const & a)
+       {
+               return detail::compute_mix_vector<T, U, P, vecType>::call(x, y, a);
+       }
+
+       // step
+       template <typename genType>
+       GLM_FUNC_QUALIFIER genType step(genType edge, genType x)
+       {
+               return mix(static_cast<genType>(1), static_cast<genType>(0), glm::lessThan(x, edge));
+       }
+
+       template <template <typename, precision> class vecType, typename T, precision P>
+       GLM_FUNC_QUALIFIER vecType<T, P> step(T edge, vecType<T, P> const & x)
+       {
+               GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'step' only accept floating-point inputs");
+
+               return mix(vecType<T, P>(1), vecType<T, P>(0), glm::lessThan(x, vecType<T, P>(edge)));
+       }
+
+       template <template <typename, precision> class vecType, typename T, precision P>
+       GLM_FUNC_QUALIFIER vecType<T, P> step(vecType<T, P> const & edge, vecType<T, P> const & x)
+       {
+               return mix(vecType<T, P>(1), vecType<T, P>(0), glm::lessThan(x, edge));
+       }
+
+       // smoothstep
+       template <typename genType>
+       GLM_FUNC_QUALIFIER genType smoothstep(genType edge0, genType edge1, genType x)
+       {
+               GLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, "'smoothstep' only accept floating-point inputs");
+
+               genType const tmp(clamp((x - edge0) / (edge1 - edge0), genType(0), genType(1)));
+               return tmp * tmp * (genType(3) - genType(2) * tmp);
+       }
+
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_QUALIFIER vecType<T, P> smoothstep(T edge0, T edge1, vecType<T, P> const & x)
+       {
+               GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'smoothstep' only accept floating-point inputs");
+
+               vecType<T, P> const tmp(clamp((x - edge0) / (edge1 - edge0), static_cast<T>(0), static_cast<T>(1)));
+               return tmp * tmp * (static_cast<T>(3) - static_cast<T>(2) * tmp);
+       }
+
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_QUALIFIER vecType<T, P> smoothstep(vecType<T, P> const & edge0, vecType<T, P> const & edge1, vecType<T, P> const & x)
+       {
+               GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'smoothstep' only accept floating-point inputs");
+
+               vecType<T, P> const tmp(clamp((x - edge0) / (edge1 - edge0), static_cast<T>(0), static_cast<T>(1)));
+               return tmp * tmp * (static_cast<T>(3) - static_cast<T>(2) * tmp);
+       }
+
+#      if GLM_HAS_CXX11_STL
+               using std::isnan;
+#      else
+               template <typename genType> 
+               GLM_FUNC_QUALIFIER bool isnan(genType x)
+               {
+                       GLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, "'isnan' only accept floating-point inputs");
+
+#                      if GLM_HAS_CXX11_STL
+                               return std::isnan(x);
+#                      elif GLM_COMPILER & (GLM_COMPILER_VC | GLM_COMPILER_INTEL)
+                               return _isnan(x) != 0;
+#                      elif GLM_COMPILER & (GLM_COMPILER_GCC | (GLM_COMPILER_APPLE_CLANG | GLM_COMPILER_LLVM))
+#                              if GLM_PLATFORM & GLM_PLATFORM_ANDROID && __cplusplus < 201103L
+                                       return _isnan(x) != 0;
+#                              else
+                                       return std::isnan(x);
+#                              endif
+#                      elif GLM_COMPILER & GLM_COMPILER_CUDA
+                               return isnan(x) != 0;
+#                      else
+                               return std::isnan(x);
+#                      endif
+               }
+#      endif
+
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_QUALIFIER vecType<bool, P> isnan(vecType<T, P> const & x)
+       {
+               GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'isnan' only accept floating-point inputs");
+
+               return detail::functor1<bool, T, P, vecType>::call(isnan, x);
+       }
+
+#      if GLM_HAS_CXX11_STL
+               using std::isinf;
+#      else
+               template <typename genType> 
+               GLM_FUNC_QUALIFIER bool isinf(genType x)
+               {
+                       GLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, "'isinf' only accept floating-point inputs");
+
+#                      if GLM_HAS_CXX11_STL
+                               return std::isinf(x);
+#                      elif GLM_COMPILER & (GLM_COMPILER_INTEL | GLM_COMPILER_VC)
+                               return _fpclass(x) == _FPCLASS_NINF || _fpclass(x) == _FPCLASS_PINF;
+#                      elif GLM_COMPILER & (GLM_COMPILER_GCC | (GLM_COMPILER_APPLE_CLANG | GLM_COMPILER_LLVM))
+#                              if(GLM_PLATFORM & GLM_PLATFORM_ANDROID && __cplusplus < 201103L)
+                                       return _isinf(x) != 0;
+#                              else
+                                       return std::isinf(x);
+#                              endif
+#                      elif GLM_COMPILER & GLM_COMPILER_CUDA
+                               // http://developer.download.nvidia.com/compute/cuda/4_2/rel/toolkit/docs/online/group__CUDA__MATH__DOUBLE_g13431dd2b40b51f9139cbb7f50c18fab.html#g13431dd2b40b51f9139cbb7f50c18fab
+                               return isinf(double(x)) != 0;
+#                      else
+                               return std::isinf(x);
+#                      endif
+       }
+#      endif
+
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_QUALIFIER vecType<bool, P> isinf(vecType<T, P> const & x)
+       {
+               GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'isnan' only accept floating-point inputs");
+
+               return detail::functor1<bool, T, P, vecType>::call(isinf, x);
+       }
+
+       GLM_FUNC_QUALIFIER int floatBitsToInt(float const & v)
+       {
+               return reinterpret_cast<int&>(const_cast<float&>(v));
+       }
+
+       template <template <typename, precision> class vecType, precision P>
+       GLM_FUNC_QUALIFIER vecType<int, P> floatBitsToInt(vecType<float, P> const & v)
+       {
+               return reinterpret_cast<vecType<int, P>&>(const_cast<vecType<float, P>&>(v));
+       }
+
+       GLM_FUNC_QUALIFIER uint floatBitsToUint(float const & v)
+       {
+               return reinterpret_cast<uint&>(const_cast<float&>(v));
+       }
+
+       template <template <typename, precision> class vecType, precision P>
+       GLM_FUNC_QUALIFIER vecType<uint, P> floatBitsToUint(vecType<float, P> const & v)
+       {
+               return reinterpret_cast<vecType<uint, P>&>(const_cast<vecType<float, P>&>(v));
+       }
+
+       GLM_FUNC_QUALIFIER float intBitsToFloat(int const & v)
+       {
+               return reinterpret_cast<float&>(const_cast<int&>(v));
+       }
+
+       template <template <typename, precision> class vecType, precision P>
+       GLM_FUNC_QUALIFIER vecType<float, P> intBitsToFloat(vecType<int, P> const & v)
+       {
+               return reinterpret_cast<vecType<float, P>&>(const_cast<vecType<int, P>&>(v));
+       }
+
+       GLM_FUNC_QUALIFIER float uintBitsToFloat(uint const & v)
+       {
+               return reinterpret_cast<float&>(const_cast<uint&>(v));
+       }
+
+       template <template <typename, precision> class vecType, precision P>
+       GLM_FUNC_QUALIFIER vecType<float, P> uintBitsToFloat(vecType<uint, P> const & v)
+       {
+               return reinterpret_cast<vecType<float, P>&>(const_cast<vecType<uint, P>&>(v));
+       }
+       
+       template <typename genType>
+       GLM_FUNC_QUALIFIER genType fma(genType const & a, genType const & b, genType const & c)
+       {
+               return a * b + c;
+       }
+
+       template <typename genType>
+       GLM_FUNC_QUALIFIER genType frexp(genType x, int & exp)
+       {
+               GLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, "'frexp' only accept floating-point inputs");
+
+               return std::frexp(x, exp);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec1<T, P> frexp(tvec1<T, P> const & x, tvec1<int, P> & exp)
+       {
+               GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'frexp' only accept floating-point inputs");
+
+               return tvec1<T, P>(std::frexp(x.x, exp.x));
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec2<T, P> frexp(tvec2<T, P> const & x, tvec2<int, P> & exp)
+       {
+               GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'frexp' only accept floating-point inputs");
+
+               return tvec2<T, P>(
+                       frexp(x.x, exp.x),
+                       frexp(x.y, exp.y));
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec3<T, P> frexp(tvec3<T, P> const & x, tvec3<int, P> & exp)
+       {
+               GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'frexp' only accept floating-point inputs");
+
+               return tvec3<T, P>(
+                       frexp(x.x, exp.x),
+                       frexp(x.y, exp.y),
+                       frexp(x.z, exp.z));
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec4<T, P> frexp(tvec4<T, P> const & x, tvec4<int, P> & exp)
+       {
+               GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'frexp' only accept floating-point inputs");
+
+               return tvec4<T, P>(
+                       frexp(x.x, exp.x),
+                       frexp(x.y, exp.y),
+                       frexp(x.z, exp.z),
+                       frexp(x.w, exp.w));
+       }
+
+       template <typename genType, precision P>
+       GLM_FUNC_QUALIFIER genType ldexp(genType const & x, int const & exp)
+       {
+               GLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, "'ldexp' only accept floating-point inputs");
+
+               return std::ldexp(x, exp);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec1<T, P> ldexp(tvec1<T, P> const & x, tvec1<int, P> const & exp)
+       {
+               GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'ldexp' only accept floating-point inputs");
+
+               return tvec1<T, P>(
+                       ldexp(x.x, exp.x));
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec2<T, P> ldexp(tvec2<T, P> const & x, tvec2<int, P> const & exp)
+       {
+               GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'ldexp' only accept floating-point inputs");
+
+               return tvec2<T, P>(
+                       ldexp(x.x, exp.x),
+                       ldexp(x.y, exp.y));
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec3<T, P> ldexp(tvec3<T, P> const & x, tvec3<int, P> const & exp)
+       {
+               GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'ldexp' only accept floating-point inputs");
+
+               return tvec3<T, P>(
+                       ldexp(x.x, exp.x),
+                       ldexp(x.y, exp.y),
+                       ldexp(x.z, exp.z));
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec4<T, P> ldexp(tvec4<T, P> const & x, tvec4<int, P> const & exp)
+       {
+               GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'ldexp' only accept floating-point inputs");
+
+               return tvec4<T, P>(
+                       ldexp(x.x, exp.x),
+                       ldexp(x.y, exp.y),
+                       ldexp(x.z, exp.z),
+                       ldexp(x.w, exp.w));
+       }
+}//namespace glm
diff --git a/include/glm/detail/func_exponential.hpp b/include/glm/detail/func_exponential.hpp
new file mode 100644 (file)
index 0000000..9277990
--- /dev/null
@@ -0,0 +1,132 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref core
+/// @file glm/detail/func_exponential.hpp
+/// @date 2008-08-08 / 2011-06-14
+/// @author Christophe Riccio
+/// 
+/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.2 Exponential Functions</a>
+///
+/// @defgroup core_func_exponential Exponential functions
+/// @ingroup core
+/// 
+/// These all operate component-wise. The description is per component.
+///////////////////////////////////////////////////////////////////////////////////
+
+#pragma once
+
+#include "type_vec1.hpp"
+#include "type_vec2.hpp"
+#include "type_vec3.hpp"
+#include "type_vec4.hpp"
+#include <cmath>
+
+namespace glm
+{
+       /// @addtogroup core_func_exponential
+       /// @{
+
+       /// Returns 'base' raised to the power 'exponent'. 
+       ///
+       /// @param base Floating point value. pow function is defined for input values of 'base' defined in the range (inf-, inf+) in the limit of the type precision.
+       /// @param exponent Floating point value representing the 'exponent'.
+       /// @tparam genType Floating-point scalar or vector types.
+       ///
+       /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/pow.xml">GLSL pow man page</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.2 Exponential Functions</a>
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_DECL vecType<T, P> pow(vecType<T, P> const & base, vecType<T, P> const & exponent);
+
+       /// Returns the natural exponentiation of x, i.e., e^x.
+       ///
+       /// @param v exp function is defined for input values of v defined in the range (inf-, inf+) in the limit of the type precision.
+       /// @tparam genType Floating-point scalar or vector types.
+       /// 
+       /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/exp.xml">GLSL exp man page</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.2 Exponential Functions</a>
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_DECL vecType<T, P> exp(vecType<T, P> const & v);
+
+       /// Returns the natural logarithm of v, i.e., 
+       /// returns the value y which satisfies the equation x = e^y. 
+       /// Results are undefined if v <= 0.
+       ///
+       /// @param v log function is defined for input values of v defined in the range (0, inf+) in the limit of the type precision.
+       /// @tparam genType Floating-point scalar or vector types.
+       /// 
+       /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/log.xml">GLSL log man page</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.2 Exponential Functions</a>
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_DECL vecType<T, P> log(vecType<T, P> const & v);
+
+       /// Returns 2 raised to the v power.
+       /// 
+       /// @param v exp2 function is defined for input values of v defined in the range (inf-, inf+) in the limit of the type precision.
+       /// @tparam genType Floating-point scalar or vector types.
+       /// 
+       /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/exp2.xml">GLSL exp2 man page</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.2 Exponential Functions</a>
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_DECL vecType<T, P> exp2(vecType<T, P> const & v);
+
+       /// Returns the base 2 log of x, i.e., returns the value y, 
+       /// which satisfies the equation x = 2 ^ y.
+       /// 
+       /// @param v log2 function is defined for input values of v defined in the range (0, inf+) in the limit of the type precision.
+       /// @tparam genType Floating-point scalar or vector types.
+       ///
+       /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/log2.xml">GLSL log2 man page</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.2 Exponential Functions</a>
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_DECL vecType<T, P> log2(vecType<T, P> const & v);
+
+       /// Returns the positive square root of v.
+       /// 
+       /// @param v sqrt function is defined for input values of v defined in the range [0, inf+) in the limit of the type precision.
+       /// @tparam genType Floating-point scalar or vector types.
+       /// 
+       /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/sqrt.xml">GLSL sqrt man page</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.2 Exponential Functions</a>
+       //template <typename genType>
+       //GLM_FUNC_DECL genType sqrt(genType const & x);
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_DECL vecType<T, P> sqrt(vecType<T, P> const & v);
+       
+       /// Returns the reciprocal of the positive square root of v.
+       /// 
+       /// @param v inversesqrt function is defined for input values of v defined in the range [0, inf+) in the limit of the type precision.
+       /// @tparam genType Floating-point scalar or vector types.
+       /// 
+       /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/inversesqrt.xml">GLSL inversesqrt man page</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.2 Exponential Functions</a>
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_DECL vecType<T, P> inversesqrt(vecType<T, P> const & v);
+
+       /// @}
+}//namespace glm
+
+#include "func_exponential.inl"
diff --git a/include/glm/detail/func_exponential.inl b/include/glm/detail/func_exponential.inl
new file mode 100644 (file)
index 0000000..d558392
--- /dev/null
@@ -0,0 +1,161 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref core
+/// @file glm/detail/func_exponential.inl
+/// @date 2008-08-03 / 2011-06-15
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////
+
+#include "func_vector_relational.hpp"
+#include "_vectorize.hpp"
+#include <limits>
+#include <cmath>
+#include <cassert>
+
+namespace glm{
+namespace detail
+{
+#      if GLM_HAS_CXX11_STL
+               using std::log2;
+#      else
+               template <typename genType>
+               genType log2(genType Value)
+               {
+                       return std::log(Value) * static_cast<genType>(1.4426950408889634073599246810019);
+               }
+#      endif
+
+       template <typename T, precision P, template <class, precision> class vecType, bool isFloat = true>
+       struct compute_log2
+       {
+               GLM_FUNC_QUALIFIER static vecType<T, P> call(vecType<T, P> const & vec)
+               {
+                       return detail::functor1<T, T, P, vecType>::call(log2, vec);
+               }
+       };
+
+       template <template <class, precision> class vecType, typename T, precision P>
+       struct compute_inversesqrt
+       {
+               GLM_FUNC_QUALIFIER static vecType<T, P> call(vecType<T, P> const & x)
+               {
+                       return static_cast<T>(1) / sqrt(x);
+               }
+       };
+               
+       template <template <class, precision> class vecType>
+       struct compute_inversesqrt<vecType, float, lowp>
+       {
+               GLM_FUNC_QUALIFIER static vecType<float, lowp> call(vecType<float, lowp> const & x)
+               {
+                       vecType<float, lowp> tmp(x);
+                       vecType<float, lowp> xhalf(tmp * 0.5f);
+                       vecType<uint, lowp>* p = reinterpret_cast<vecType<uint, lowp>*>(const_cast<vecType<float, lowp>*>(&x));
+                       vecType<uint, lowp> i = vecType<uint, lowp>(0x5f375a86) - (*p >> vecType<uint, lowp>(1));
+                       vecType<float, lowp>* ptmp = reinterpret_cast<vecType<float, lowp>*>(&i);
+                       tmp = *ptmp;
+                       tmp = tmp * (1.5f - xhalf * tmp * tmp);
+                       return tmp;
+               }
+       };
+}//namespace detail
+
+       // pow
+       using std::pow;
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_QUALIFIER vecType<T, P> pow(vecType<T, P> const & base, vecType<T, P> const & exponent)
+       {
+               return detail::functor2<T, P, vecType>::call(pow, base, exponent);
+       }
+
+       // exp
+       using std::exp;
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_QUALIFIER vecType<T, P> exp(vecType<T, P> const & x)
+       {
+               return detail::functor1<T, T, P, vecType>::call(exp, x);
+       }
+
+       // log
+       using std::log;
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_QUALIFIER vecType<T, P> log(vecType<T, P> const & x)
+       {
+               return detail::functor1<T, T, P, vecType>::call(log, x);
+       }
+
+       //exp2, ln2 = 0.69314718055994530941723212145818f
+       template <typename genType>
+       GLM_FUNC_QUALIFIER genType exp2(genType x)
+       {
+               GLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, "'exp2' only accept floating-point inputs");
+
+               return std::exp(static_cast<genType>(0.69314718055994530941723212145818) * x);
+       }
+
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_QUALIFIER vecType<T, P> exp2(vecType<T, P> const & x)
+       {
+               return detail::functor1<T, T, P, vecType>::call(exp2, x);
+       }
+
+       // log2, ln2 = 0.69314718055994530941723212145818f
+       template <typename genType>
+       GLM_FUNC_QUALIFIER genType log2(genType x)
+       {
+               return log2(tvec1<genType>(x)).x;
+       }
+
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_QUALIFIER vecType<T, P> log2(vecType<T, P> const & x)
+       {
+               return detail::compute_log2<T, P, vecType, std::numeric_limits<T>::is_iec559>::call(x);
+       }
+
+       // sqrt
+       using std::sqrt;
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_QUALIFIER vecType<T, P> sqrt(vecType<T, P> const & x)
+       {
+               GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'sqrt' only accept floating-point inputs");
+               return detail::functor1<T, T, P, vecType>::call(sqrt, x);
+       }
+
+       // inversesqrt
+       template <typename genType>
+       GLM_FUNC_QUALIFIER genType inversesqrt(genType x)
+       {
+               return static_cast<genType>(1) / sqrt(x);
+       }
+       
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_QUALIFIER vecType<T, P> inversesqrt(vecType<T, P> const & x)
+       {
+               GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'inversesqrt' only accept floating-point inputs");
+               return detail::compute_inversesqrt<vecType, T, P>::call(x);
+       }
+}//namespace glm
diff --git a/include/glm/detail/func_geometric.hpp b/include/glm/detail/func_geometric.hpp
new file mode 100644 (file)
index 0000000..cdbcc7b
--- /dev/null
@@ -0,0 +1,142 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref core
+/// @file glm/detail/func_geometric.hpp
+/// @date 2008-08-03 / 2011-06-14
+/// @author Christophe Riccio
+///
+/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.5 Geometric Functions</a>
+/// 
+/// @defgroup core_func_geometric Geometric functions
+/// @ingroup core
+/// 
+/// These operate on vectors as vectors, not component-wise.
+///////////////////////////////////////////////////////////////////////////////////
+
+#pragma once
+
+#include "type_vec3.hpp"
+
+namespace glm
+{
+       /// @addtogroup core_func_geometric
+       /// @{
+
+       /// Returns the length of x, i.e., sqrt(x * x).
+       /// 
+       /// @tparam genType Floating-point vector types.
+       /// 
+       /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/length.xml">GLSL length man page</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.5 Geometric Functions</a>
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_DECL T length(
+               vecType<T, P> const & x);
+
+       /// Returns the distance betwwen p0 and p1, i.e., length(p0 - p1).
+       ///
+       /// @tparam genType Floating-point vector types.
+       /// 
+       /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/distance.xml">GLSL distance man page</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.5 Geometric Functions</a>
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_DECL T distance(
+               vecType<T, P> const & p0,
+               vecType<T, P> const & p1);
+
+       /// Returns the dot product of x and y, i.e., result = x * y.
+       ///
+       /// @tparam genType Floating-point vector types.
+       /// 
+       /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/dot.xml">GLSL dot man page</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.5 Geometric Functions</a>
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_DECL T dot(
+               vecType<T, P> const & x,
+               vecType<T, P> const & y);
+
+       /// Returns the cross product of x and y.
+       ///
+       /// @tparam valType Floating-point scalar types.
+       /// 
+       /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/cross.xml">GLSL cross man page</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.5 Geometric Functions</a>
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec3<T, P> cross(
+               tvec3<T, P> const & x,
+               tvec3<T, P> const & y);
+
+       /// Returns a vector in the same direction as x but with length of 1.
+       /// According to issue 10 GLSL 1.10 specification, if length(x) == 0 then result is undefined and generate an error.
+       /// 
+       /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/normalize.xml">GLSL normalize man page</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.5 Geometric Functions</a>
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_DECL vecType<T, P> normalize(
+               vecType<T, P> const & x);
+
+       /// If dot(Nref, I) < 0.0, return N, otherwise, return -N.
+       ///
+       /// @tparam genType Floating-point vector types.
+       /// 
+       /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/faceforward.xml">GLSL faceforward man page</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.5 Geometric Functions</a>
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_DECL vecType<T, P> faceforward(
+               vecType<T, P> const & N,
+               vecType<T, P> const & I,
+               vecType<T, P> const & Nref);
+
+       /// For the incident vector I and surface orientation N, 
+       /// returns the reflection direction : result = I - 2.0 * dot(N, I) * N.
+       ///
+       /// @tparam genType Floating-point vector types.
+       /// 
+       /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/reflect.xml">GLSL reflect man page</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.5 Geometric Functions</a>
+       template <typename genType>
+       GLM_FUNC_DECL genType reflect(
+               genType const & I,
+               genType const & N);
+
+       /// For the incident vector I and surface normal N, 
+       /// and the ratio of indices of refraction eta, 
+       /// return the refraction vector.
+       ///
+       /// @tparam genType Floating-point vector types.
+       /// 
+       /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/refract.xml">GLSL refract man page</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.5 Geometric Functions</a>
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_DECL vecType<T, P> refract(
+               vecType<T, P> const & I,
+               vecType<T, P> const & N,
+               T eta);
+
+       /// @}
+}//namespace glm
+
+#include "func_geometric.inl"
diff --git a/include/glm/detail/func_geometric.inl b/include/glm/detail/func_geometric.inl
new file mode 100644 (file)
index 0000000..0673718
--- /dev/null
@@ -0,0 +1,201 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref core
+/// @file glm/detail/func_geometric.inl
+/// @date 2008-08-03 / 2011-06-15
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////
+
+#include "func_exponential.hpp"
+#include "func_common.hpp"
+#include "type_vec2.hpp"
+#include "type_vec4.hpp"
+#include "type_float.hpp"
+
+namespace glm{
+namespace detail
+{
+       template <template <class, precision> class vecType, typename T, precision P>
+       struct compute_dot{};
+
+       template <typename T, precision P>
+       struct compute_dot<tvec1, T, P>
+       {
+               GLM_FUNC_QUALIFIER static T call(tvec1<T, P> const & a, tvec1<T, P> const & b)
+               {
+                       return a.x * b.x;
+               }
+       };
+
+       template <typename T, precision P>
+       struct compute_dot<tvec2, T, P>
+       {
+               GLM_FUNC_QUALIFIER static T call(tvec2<T, P> const & x, tvec2<T, P> const & y)
+               {
+                       tvec2<T, P> tmp(x * y);
+                       return tmp.x + tmp.y;
+               }
+       };
+
+       template <typename T, precision P>
+       struct compute_dot<tvec3, T, P>
+       {
+               GLM_FUNC_QUALIFIER static T call(tvec3<T, P> const & x, tvec3<T, P> const & y)
+               {
+                       tvec3<T, P> tmp(x * y);
+                       return tmp.x + tmp.y + tmp.z;
+               }
+       };
+
+       template <typename T, precision P>
+       struct compute_dot<tvec4, T, P>
+       {
+               GLM_FUNC_QUALIFIER static T call(tvec4<T, P> const & x, tvec4<T, P> const & y)
+               {
+                       tvec4<T, P> tmp(x * y);
+                       return (tmp.x + tmp.y) + (tmp.z + tmp.w);
+               }
+       };
+}//namespace detail
+
+       // length
+       template <typename genType>
+       GLM_FUNC_QUALIFIER genType length(genType x)
+       {
+               GLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, "'length' only accept floating-point inputs");
+
+               return abs(x);
+       }
+
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_QUALIFIER T length(vecType<T, P> const & v)
+       {
+               GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'length' only accept floating-point inputs");
+
+               return sqrt(dot(v, v));
+       }
+
+       // distance
+       template <typename genType>
+       GLM_FUNC_QUALIFIER genType distance(genType const & p0, genType const & p1)
+       {
+               GLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, "'distance' only accept floating-point inputs");
+
+               return length(p1 - p0);
+       }
+
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_QUALIFIER T distance(vecType<T, P> const & p0, vecType<T, P> const & p1)
+       {
+               return length(p1 - p0);
+       }
+
+       // dot
+       template <typename T>
+       GLM_FUNC_QUALIFIER T dot(T x, T y)
+       {
+               GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'dot' only accept floating-point inputs");
+               return x * y;
+       }
+
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_QUALIFIER T dot(vecType<T, P> const & x, vecType<T, P> const & y)
+       {
+               GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'dot' only accept floating-point inputs");
+               return detail::compute_dot<vecType, T, P>::call(x, y);
+       }
+
+       // cross
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec3<T, P> cross(tvec3<T, P> const & x, tvec3<T, P> const & y)
+       {
+               GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'cross' only accept floating-point inputs");
+
+               return tvec3<T, P>(
+                       x.y * y.z - y.y * x.z,
+                       x.z * y.x - y.z * x.x,
+                       x.x * y.y - y.x * x.y);
+       }
+
+       // normalize
+       template <typename genType>
+       GLM_FUNC_QUALIFIER genType normalize(genType const & x)
+       {
+               GLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, "'normalize' only accept floating-point inputs");
+
+               return x < genType(0) ? genType(-1) : genType(1);
+       }
+
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_QUALIFIER vecType<T, P> normalize(vecType<T, P> const & x)
+       {
+               GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'normalize' only accept floating-point inputs");
+
+               return x * inversesqrt(dot(x, x));
+       }
+
+       // faceforward
+       template <typename genType>
+       GLM_FUNC_QUALIFIER genType faceforward(genType const & N, genType const & I, genType const & Nref)
+       {
+               return dot(Nref, I) < static_cast<genType>(0) ? N : -N;
+       }
+
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_QUALIFIER vecType<T, P> faceforward(vecType<T, P> const & N, vecType<T, P> const & I, vecType<T, P> const & Nref)
+       {
+               return dot(Nref, I) < static_cast<T>(0) ? N : -N;
+       }
+
+       // reflect
+       template <typename genType>
+       GLM_FUNC_QUALIFIER genType reflect(genType const & I, genType const & N)
+       {
+               return I - N * dot(N, I) * static_cast<genType>(2);
+       }
+
+       // refract
+       template <typename genType>
+       GLM_FUNC_QUALIFIER genType refract(genType const & I, genType const & N, genType const & eta)
+       {
+               GLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, "'refract' only accept floating-point inputs");
+
+               genType const dotValue(dot(N, I));
+               genType const k(static_cast<genType>(1) - eta * eta * (static_cast<genType>(1) - dotValue * dotValue));
+               return (eta * I - (eta * dotValue + sqrt(k)) * N) * static_cast<genType>(k >= static_cast<genType>(0));
+       }
+
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_QUALIFIER vecType<T, P> refract(vecType<T, P> const & I, vecType<T, P> const & N, T eta)
+       {
+               GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'refract' only accept floating-point inputs");
+
+               T const dotValue(dot(N, I));
+               T const k(static_cast<T>(1) - eta * eta * (static_cast<T>(1) - dotValue * dotValue));
+               return (eta * I - (eta * dotValue + std::sqrt(k)) * N) * static_cast<T>(k >= static_cast<T>(0));
+       }
+}//namespace glm
diff --git a/include/glm/detail/func_integer.hpp b/include/glm/detail/func_integer.hpp
new file mode 100644 (file)
index 0000000..fa32fa1
--- /dev/null
@@ -0,0 +1,232 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref core
+/// @file glm/detail/func_integer.hpp
+/// @date 2010-03-17 / 2011-06-18
+/// @author Christophe Riccio
+///
+/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.8 Integer Functions</a>
+/// 
+/// @defgroup core_func_integer Integer functions
+/// @ingroup core
+/// 
+/// These all operate component-wise. The description is per component. 
+/// The notation [a, b] means the set of bits from bit-number a through bit-number 
+/// b, inclusive. The lowest-order bit is bit 0.
+///////////////////////////////////////////////////////////////////////////////////
+
+#pragma once
+
+#include "setup.hpp"
+#include "precision.hpp"
+#include "func_common.hpp"
+#include "func_vector_relational.hpp"
+
+namespace glm
+{
+       /// @addtogroup core_func_integer
+       /// @{
+
+       /// Adds 32-bit unsigned integer x and y, returning the sum
+       /// modulo pow(2, 32). The value carry is set to 0 if the sum was
+       /// less than pow(2, 32), or to 1 otherwise.
+       ///
+       /// @tparam genUType Unsigned integer scalar or vector types.
+       /// 
+       /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/uaddCarry.xml">GLSL uaddCarry man page</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.8 Integer Functions</a>
+       template <precision P, template <typename, precision> class vecType>
+       GLM_FUNC_DECL vecType<uint, P> uaddCarry(
+               vecType<uint, P> const & x,
+               vecType<uint, P> const & y,
+               vecType<uint, P> & carry);
+
+       /// Subtracts the 32-bit unsigned integer y from x, returning
+       /// the difference if non-negative, or pow(2, 32) plus the difference
+       /// otherwise. The value borrow is set to 0 if x >= y, or to 1 otherwise.
+       ///
+       /// @tparam genUType Unsigned integer scalar or vector types.
+       /// 
+       /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/usubBorrow.xml">GLSL usubBorrow man page</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.8 Integer Functions</a>
+       template <precision P, template <typename, precision> class vecType>
+       GLM_FUNC_DECL vecType<uint, P> usubBorrow(
+               vecType<uint, P> const & x,
+               vecType<uint, P> const & y,
+               vecType<uint, P> & borrow);
+
+       /// Multiplies 32-bit integers x and y, producing a 64-bit
+       /// result. The 32 least-significant bits are returned in lsb.
+       /// The 32 most-significant bits are returned in msb.
+       ///
+       /// @tparam genUType Unsigned integer scalar or vector types.
+       /// 
+       /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/umulExtended.xml">GLSL umulExtended man page</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.8 Integer Functions</a>
+       template <precision P, template <typename, precision> class vecType>
+       GLM_FUNC_DECL void umulExtended(
+               vecType<uint, P> const & x,
+               vecType<uint, P> const & y,
+               vecType<uint, P> & msb,
+               vecType<uint, P> & lsb);
+               
+       /// Multiplies 32-bit integers x and y, producing a 64-bit
+       /// result. The 32 least-significant bits are returned in lsb.
+       /// The 32 most-significant bits are returned in msb.
+       /// 
+       /// @tparam genIType Signed integer scalar or vector types.
+       ///
+       /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/imulExtended.xml">GLSL imulExtended man page</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.8 Integer Functions</a>
+       template <precision P, template <typename, precision> class vecType>
+       GLM_FUNC_DECL void imulExtended(
+               vecType<int, P> const & x,
+               vecType<int, P> const & y,
+               vecType<int, P> & msb,
+               vecType<int, P> & lsb);
+
+       /// Extracts bits [offset, offset + bits - 1] from value,
+       /// returning them in the least significant bits of the result.
+       /// For unsigned data types, the most significant bits of the
+       /// result will be set to zero. For signed data types, the
+       /// most significant bits will be set to the value of bit offset + base - 1.
+       ///
+       /// If bits is zero, the result will be zero. The result will be
+       /// undefined if offset or bits is negative, or if the sum of
+       /// offset and bits is greater than the number of bits used
+       /// to store the operand.
+       ///
+       /// @tparam T Signed or unsigned integer scalar or vector types.
+       /// 
+       /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/bitfieldExtract.xml">GLSL bitfieldExtract man page</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.8 Integer Functions</a>
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_DECL vecType<T, P> bitfieldExtract(
+               vecType<T, P> const & Value,
+               int Offset,
+               int Bits);
+
+       /// Returns the insertion the bits least-significant bits of insert into base.
+       ///
+       /// The result will have bits [offset, offset + bits - 1] taken
+       /// from bits [0, bits - 1] of insert, and all other bits taken
+       /// directly from the corresponding bits of base. If bits is
+       /// zero, the result will simply be base. The result will be
+       /// undefined if offset or bits is negative, or if the sum of
+       /// offset and bits is greater than the number of bits used to
+       /// store the operand.
+       ///
+       /// @tparam T Signed or unsigned integer scalar or vector types.
+       ///
+       /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/bitfieldInsert.xml">GLSL bitfieldInsert man page</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.8 Integer Functions</a>
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_DECL vecType<T, P> bitfieldInsert(
+               vecType<T, P> const & Base,
+               vecType<T, P> const & Insert,
+               int Offset,
+               int Bits);
+
+       /// Returns the reversal of the bits of value. 
+       /// The bit numbered n of the result will be taken from bit (bits - 1) - n of value, 
+       /// where bits is the total number of bits used to represent value.
+       ///
+       /// @tparam T Signed or unsigned integer scalar or vector types.
+       ///
+       /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/bitfieldReverse.xml">GLSL bitfieldReverse man page</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.8 Integer Functions</a>
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_DECL vecType<T, P> bitfieldReverse(vecType<T, P> const & v);
+
+       /// Returns the number of bits set to 1 in the binary representation of value.
+       ///
+       /// @tparam T Signed or unsigned integer scalar or vector types.
+       ///
+       /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/bitCount.xml">GLSL bitCount man page</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.8 Integer Functions</a>
+       template <typename genType>
+       GLM_FUNC_DECL int bitCount(genType v);
+
+       /// Returns the number of bits set to 1 in the binary representation of value.
+       ///
+       /// @tparam T Signed or unsigned integer scalar or vector types.
+       ///
+       /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/bitCount.xml">GLSL bitCount man page</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.8 Integer Functions</a>
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_DECL vecType<int, P> bitCount(vecType<T, P> const & v);
+
+       /// Returns the bit number of the least significant bit set to
+       /// 1 in the binary representation of value. 
+       /// If value is zero, -1 will be returned.
+       ///
+       /// @tparam T Signed or unsigned integer scalar types.
+       ///
+       /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/findLSB.xml">GLSL findLSB man page</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.8 Integer Functions</a>
+       template <typename genIUType>
+       GLM_FUNC_DECL int findLSB(genIUType x);
+
+       /// Returns the bit number of the least significant bit set to
+       /// 1 in the binary representation of value. 
+       /// If value is zero, -1 will be returned.
+       ///
+       /// @tparam T Signed or unsigned integer scalar types.
+       ///
+       /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/findLSB.xml">GLSL findLSB man page</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.8 Integer Functions</a>
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_DECL vecType<int, P> findLSB(vecType<T, P> const & v);
+
+       /// Returns the bit number of the most significant bit in the binary representation of value.
+       /// For positive integers, the result will be the bit number of the most significant bit set to 1. 
+       /// For negative integers, the result will be the bit number of the most significant
+       /// bit set to 0. For a value of zero or negative one, -1 will be returned.
+       ///
+       /// @tparam T Signed or unsigned integer scalar types.
+       ///
+       /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/findMSB.xml">GLSL findMSB man page</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.8 Integer Functions</a>
+       template <typename genIUType>
+       GLM_FUNC_DECL int findMSB(genIUType x);
+
+       /// Returns the bit number of the most significant bit in the binary representation of value.
+       /// For positive integers, the result will be the bit number of the most significant bit set to 1. 
+       /// For negative integers, the result will be the bit number of the most significant
+       /// bit set to 0. For a value of zero or negative one, -1 will be returned.
+       ///
+       /// @tparam T Signed or unsigned integer scalar types.
+       ///
+       /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/findMSB.xml">GLSL findMSB man page</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.8 Integer Functions</a>
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_DECL vecType<int, P> findMSB(vecType<T, P> const & v);
+
+       /// @}
+}//namespace glm
+
+#include "func_integer.inl"
diff --git a/include/glm/detail/func_integer.inl b/include/glm/detail/func_integer.inl
new file mode 100644 (file)
index 0000000..31eddf9
--- /dev/null
@@ -0,0 +1,393 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref core
+/// @file glm/detail/func_integer.inl
+/// @date 2010-03-17 / 2011-06-15
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////
+
+#include "type_vec2.hpp"
+#include "type_vec3.hpp"
+#include "type_vec4.hpp"
+#include "type_int.hpp"
+#include "_vectorize.hpp"
+#if(GLM_ARCH != GLM_ARCH_PURE)
+#if(GLM_COMPILER & GLM_COMPILER_VC)
+#      include <intrin.h>
+#      pragma intrinsic(_BitScanReverse)
+#endif//(GLM_COMPILER & GLM_COMPILER_VC)
+#endif//(GLM_ARCH != GLM_ARCH_PURE)
+#include <limits>
+
+namespace glm{
+namespace detail
+{
+       template <typename T>
+       GLM_FUNC_QUALIFIER T mask(T Bits)
+       {
+               return Bits >= sizeof(T) * 8 ? ~static_cast<T>(0) : (static_cast<T>(1) << Bits) - static_cast<T>(1);
+       }
+
+       template <bool EXEC = false>
+       struct compute_bitfieldReverseStep
+       {
+               template <typename T, glm::precision P, template <class, glm::precision> class vecType>
+               GLM_FUNC_QUALIFIER static vecType<T, P> call(vecType<T, P> const & v, T, T)
+               {
+                       return v;
+               }
+       };
+
+       template <>
+       struct compute_bitfieldReverseStep<true>
+       {
+               template <typename T, glm::precision P, template <class, glm::precision> class vecType>
+               GLM_FUNC_QUALIFIER static vecType<T, P> call(vecType<T, P> const & v, T Mask, T Shift)
+               {
+                       return (v & Mask) << Shift | (v & (~Mask)) >> Shift;
+               }
+       };
+
+       template <bool EXEC = false>
+       struct compute_bitfieldBitCountStep
+       {
+               template <typename T, glm::precision P, template <class, glm::precision> class vecType>
+               GLM_FUNC_QUALIFIER static vecType<T, P> call(vecType<T, P> const & v, T, T)
+               {
+                       return v;
+               }
+       };
+
+       template <>
+       struct compute_bitfieldBitCountStep<true>
+       {
+               template <typename T, glm::precision P, template <class, glm::precision> class vecType>
+               GLM_FUNC_QUALIFIER static vecType<T, P> call(vecType<T, P> const & v, T Mask, T Shift)
+               {
+                       return (v & Mask) + ((v >> Shift) & Mask);
+               }
+       };
+
+       template <typename genIUType, size_t Bits>
+       struct compute_findLSB
+       {
+               GLM_FUNC_QUALIFIER static int call(genIUType Value)
+               {
+                       if(Value == 0)
+                               return -1;
+
+                       return glm::bitCount(~Value & (Value - static_cast<genIUType>(1)));
+               }
+       };
+
+#      if GLM_HAS_BITSCAN_WINDOWS
+               template <typename genIUType>
+               struct compute_findLSB<genIUType, 32>
+               {
+                       GLM_FUNC_QUALIFIER static int call(genIUType Value)
+                       {
+                               unsigned long Result(0);
+                               unsigned char IsNotNull = _BitScanForward(&Result, *reinterpret_cast<unsigned long*>(&Value));
+                               return IsNotNull ? int(Result) : -1;
+                       }
+               };
+
+#              if !((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_MODEL == GLM_MODEL_32))
+               template <typename genIUType>
+               struct compute_findLSB<genIUType, 64>
+               {
+                       GLM_FUNC_QUALIFIER static int call(genIUType Value)
+                       {
+                               unsigned long Result(0);
+                               unsigned char IsNotNull = _BitScanForward64(&Result, *reinterpret_cast<unsigned __int64*>(&Value));
+                               return IsNotNull ? int(Result) : -1;
+                       }
+               };
+#              endif
+#      endif//GLM_HAS_BITSCAN_WINDOWS
+
+       template <typename T, glm::precision P, template <class, glm::precision> class vecType, bool EXEC = true>
+       struct compute_findMSB_step_vec
+       {
+               GLM_FUNC_QUALIFIER static vecType<T, P> call(vecType<T, P> const & x, T Shift)
+               {
+                       return x | (x >> Shift);
+               }
+       };
+
+       template <typename T, glm::precision P, template <typename, glm::precision> class vecType>
+       struct compute_findMSB_step_vec<T, P, vecType, false>
+       {
+               GLM_FUNC_QUALIFIER static vecType<T, P> call(vecType<T, P> const & x, T)
+               {
+                       return x;
+               }
+       };
+
+       template <typename T, glm::precision P, template <typename, glm::precision> class vecType, int>
+       struct compute_findMSB_vec
+       {
+               GLM_FUNC_QUALIFIER static vecType<int, P> call(vecType<T, P> const & vec)
+               {
+                       vecType<T, P> x(vec);
+                       x = compute_findMSB_step_vec<T, P, vecType, sizeof(T) * 8 >=  8>::call(x, static_cast<T>( 1));
+                       x = compute_findMSB_step_vec<T, P, vecType, sizeof(T) * 8 >=  8>::call(x, static_cast<T>( 2));
+                       x = compute_findMSB_step_vec<T, P, vecType, sizeof(T) * 8 >=  8>::call(x, static_cast<T>( 4));
+                       x = compute_findMSB_step_vec<T, P, vecType, sizeof(T) * 8 >= 16>::call(x, static_cast<T>( 8));
+                       x = compute_findMSB_step_vec<T, P, vecType, sizeof(T) * 8 >= 32>::call(x, static_cast<T>(16));
+                       x = compute_findMSB_step_vec<T, P, vecType, sizeof(T) * 8 >= 64>::call(x, static_cast<T>(32));
+                       return vecType<int, P>(sizeof(T) * 8 - 1) - glm::bitCount(~x);
+               }
+       };
+
+#      if GLM_HAS_BITSCAN_WINDOWS
+               template <typename genIUType>
+               GLM_FUNC_QUALIFIER int compute_findMSB_32(genIUType Value)
+               {
+                       unsigned long Result(0);
+                       unsigned char IsNotNull = _BitScanReverse(&Result, *reinterpret_cast<unsigned long*>(&Value));
+                       return IsNotNull ? int(Result) : -1;
+               }
+
+               template <typename T, glm::precision P, template <class, glm::precision> class vecType>
+               struct compute_findMSB_vec<T, P, vecType, 32>
+               {
+                       GLM_FUNC_QUALIFIER static vecType<int, P> call(vecType<T, P> const & x)
+                       {
+                               return detail::functor1<int, T, P, vecType>::call(compute_findMSB_32, x);
+                       }
+               };
+
+#              if !((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_MODEL == GLM_MODEL_32))
+               template <typename genIUType>
+               GLM_FUNC_QUALIFIER int compute_findMSB_64(genIUType Value)
+               {
+                       unsigned long Result(0);
+                       unsigned char IsNotNull = _BitScanReverse64(&Result, *reinterpret_cast<unsigned __int64*>(&Value));
+                       return IsNotNull ? int(Result) : -1;
+               }
+
+               template <typename T, glm::precision P, template <class, glm::precision> class vecType>
+               struct compute_findMSB_vec<T, P, vecType, 64>
+               {
+                       GLM_FUNC_QUALIFIER static vecType<int, P> call(vecType<T, P> const & x)
+                       {
+                               return detail::functor1<int, T, P, vecType>::call(compute_findMSB_64, x);
+                       }
+               };
+#              endif
+#      endif//GLM_HAS_BITSCAN_WINDOWS
+}//namespace detail
+
+       // uaddCarry
+       GLM_FUNC_QUALIFIER uint uaddCarry(uint const & x, uint const & y, uint & Carry)
+       {
+               uint64 const Value64(static_cast<uint64>(x) + static_cast<uint64>(y));
+               uint64 const Max32((static_cast<uint64>(1) << static_cast<uint64>(32)) - static_cast<uint64>(1));
+               Carry = Value64 > Max32 ? 1 : 0;
+               return static_cast<uint32>(Value64 % (Max32 + static_cast<uint64>(1)));
+       }
+
+       template <precision P, template <typename, precision> class vecType>
+       GLM_FUNC_QUALIFIER vecType<uint, P> uaddCarry(vecType<uint, P> const & x, vecType<uint, P> const & y, vecType<uint, P> & Carry)
+       {
+               vecType<uint64, P> Value64(vecType<uint64, P>(x) + vecType<uint64, P>(y));
+               vecType<uint64, P> Max32((static_cast<uint64>(1) << static_cast<uint64>(32)) - static_cast<uint64>(1));
+               Carry = mix(vecType<uint32, P>(0), vecType<uint32, P>(1), greaterThan(Value64, Max32));
+               return vecType<uint32,P>(Value64 % (Max32 + static_cast<uint64>(1)));
+       }
+
+       // usubBorrow
+       GLM_FUNC_QUALIFIER uint usubBorrow(uint const & x, uint const & y, uint & Borrow)
+       {
+               GLM_STATIC_ASSERT(sizeof(uint) == sizeof(uint32), "uint and uint32 size mismatch");
+
+               Borrow = x >= y ? static_cast<uint32>(0) : static_cast<uint32>(1);
+               if(y >= x)
+                       return y - x;
+               else
+                       return static_cast<uint32>((static_cast<int64>(1) << static_cast<int64>(32)) + (static_cast<int64>(y) - static_cast<int64>(x)));
+       }
+
+       template <precision P, template <typename, precision> class vecType>
+       GLM_FUNC_QUALIFIER vecType<uint, P> usubBorrow(vecType<uint, P> const & x, vecType<uint, P> const & y, vecType<uint, P> & Borrow)
+       {
+               Borrow = mix(vecType<uint, P>(1), vecType<uint, P>(0), greaterThanEqual(x, y));
+               vecType<uint, P> const YgeX(y - x);
+               vecType<uint, P> const XgeY(vecType<uint32, P>((static_cast<int64>(1) << static_cast<int64>(32)) + (vecType<int64, P>(y) - vecType<int64, P>(x))));
+               return mix(XgeY, YgeX, greaterThanEqual(y, x));
+       }
+
+       // umulExtended
+       GLM_FUNC_QUALIFIER void umulExtended(uint const & x, uint const & y, uint & msb, uint & lsb)
+       {
+               GLM_STATIC_ASSERT(sizeof(uint) == sizeof(uint32), "uint and uint32 size mismatch");
+
+               uint64 Value64 = static_cast<uint64>(x) * static_cast<uint64>(y);
+               uint32* PointerMSB = (reinterpret_cast<uint32*>(&Value64) + 1);
+               msb = *PointerMSB;
+               uint32* PointerLSB = (reinterpret_cast<uint32*>(&Value64) + 0);
+               lsb = *PointerLSB;
+       }
+
+       template <precision P, template <typename, precision> class vecType>
+       GLM_FUNC_QUALIFIER void umulExtended(vecType<uint, P> const & x, vecType<uint, P> const & y, vecType<uint, P> & msb, vecType<uint, P> & lsb)
+       {
+               GLM_STATIC_ASSERT(sizeof(uint) == sizeof(uint32), "uint and uint32 size mismatch");
+
+               vecType<uint64, P> Value64(vecType<uint64, P>(x) * vecType<uint64, P>(y));
+               msb = vecType<uint32, P>(Value64 >> static_cast<uint64>(32));
+               lsb = vecType<uint32, P>(Value64);
+       }
+
+       // imulExtended
+       GLM_FUNC_QUALIFIER void imulExtended(int x, int y, int & msb, int & lsb)
+       {
+               GLM_STATIC_ASSERT(sizeof(int) == sizeof(int32), "int and int32 size mismatch");
+
+               int64 Value64 = static_cast<int64>(x) * static_cast<int64>(y);
+               int32* PointerMSB = (reinterpret_cast<int32*>(&Value64) + 1);
+               msb = *PointerMSB;
+               int32* PointerLSB = (reinterpret_cast<int32*>(&Value64));
+               lsb = *PointerLSB;
+       }
+
+       template <precision P, template <typename, precision> class vecType>
+       GLM_FUNC_QUALIFIER void imulExtended(vecType<int, P> const & x, vecType<int, P> const & y, vecType<int, P> & msb, vecType<int, P> & lsb)
+       {
+               GLM_STATIC_ASSERT(sizeof(int) == sizeof(int32), "int and int32 size mismatch");
+
+               vecType<int64, P> Value64(vecType<int64, P>(x) * vecType<int64, P>(y));
+               lsb = vecType<int32, P>(Value64 & static_cast<int64>(0xFFFFFFFF));
+               msb = vecType<int32, P>((Value64 >> static_cast<int64>(32)) & static_cast<int64>(0xFFFFFFFF));
+       }
+
+       // bitfieldExtract
+       template <typename genIUType>
+       GLM_FUNC_QUALIFIER genIUType bitfieldExtract(genIUType Value, int Offset, int Bits)
+       {
+               return bitfieldExtract(tvec1<genIUType>(Value), Offset, Bits).x;
+       }
+
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_QUALIFIER vecType<T, P> bitfieldExtract(vecType<T, P> const & Value, int Offset, int Bits)
+       {
+               GLM_STATIC_ASSERT(std::numeric_limits<T>::is_integer, "'bitfieldExtract' only accept integer inputs");
+
+               return (Value >> static_cast<T>(Offset)) & static_cast<T>(detail::mask(Bits));
+       }
+
+       // bitfieldInsert
+       template <typename genIUType>
+       GLM_FUNC_QUALIFIER genIUType bitfieldInsert(genIUType const & Base, genIUType const & Insert, int Offset, int Bits)
+       {
+               return bitfieldInsert(tvec1<genIUType>(Base), tvec1<genIUType>(Insert), Offset, Bits).x;
+       }
+
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_QUALIFIER vecType<T, P> bitfieldInsert(vecType<T, P> const & Base, vecType<T, P> const & Insert, int Offset, int Bits)
+       {
+               GLM_STATIC_ASSERT(std::numeric_limits<T>::is_integer, "'bitfieldInsert' only accept integer values");
+
+               T const Mask = static_cast<T>(detail::mask(Bits) << Offset);
+               return (Base & ~Mask) | (Insert & Mask);
+       }
+
+       // bitfieldReverse
+       template <typename genType>
+       GLM_FUNC_QUALIFIER genType bitfieldReverse(genType x)
+       {
+               return bitfieldReverse(glm::tvec1<genType, glm::defaultp>(x)).x;
+       }
+
+       template <typename T, glm::precision P, template <typename, glm::precision> class vecType>
+       GLM_FUNC_QUALIFIER vecType<T, P> bitfieldReverse(vecType<T, P> const & v)
+       {
+               vecType<T, P> x(v);
+               x = detail::compute_bitfieldReverseStep<sizeof(T) * 8 >=  2>::call(x, T(0x5555555555555555ull), static_cast<T>( 1));
+               x = detail::compute_bitfieldReverseStep<sizeof(T) * 8 >=  4>::call(x, T(0x3333333333333333ull), static_cast<T>( 2));
+               x = detail::compute_bitfieldReverseStep<sizeof(T) * 8 >=  8>::call(x, T(0x0F0F0F0F0F0F0F0Full), static_cast<T>( 4));
+               x = detail::compute_bitfieldReverseStep<sizeof(T) * 8 >= 16>::call(x, T(0x00FF00FF00FF00FFull), static_cast<T>( 8));
+               x = detail::compute_bitfieldReverseStep<sizeof(T) * 8 >= 32>::call(x, T(0x0000FFFF0000FFFFull), static_cast<T>(16));
+               x = detail::compute_bitfieldReverseStep<sizeof(T) * 8 >= 64>::call(x, T(0x00000000FFFFFFFFull), static_cast<T>(32));
+               return x;
+       }
+
+       // bitCount
+       template <typename genType>
+       GLM_FUNC_QUALIFIER int bitCount(genType x)
+       {
+               return bitCount(glm::tvec1<genType, glm::defaultp>(x)).x;
+       }
+
+       template <typename T, glm::precision P, template <typename, glm::precision> class vecType>
+       GLM_FUNC_QUALIFIER vecType<int, P> bitCount(vecType<T, P> const & v)
+       {
+               vecType<typename detail::make_unsigned<T>::type, P> x(*reinterpret_cast<vecType<typename detail::make_unsigned<T>::type, P> const *>(&v));
+               x = detail::compute_bitfieldBitCountStep<sizeof(T) * 8 >=  2>::call(x, typename detail::make_unsigned<T>::type(0x5555555555555555ull), typename detail::make_unsigned<T>::type( 1));
+               x = detail::compute_bitfieldBitCountStep<sizeof(T) * 8 >=  4>::call(x, typename detail::make_unsigned<T>::type(0x3333333333333333ull), typename detail::make_unsigned<T>::type( 2));
+               x = detail::compute_bitfieldBitCountStep<sizeof(T) * 8 >=  8>::call(x, typename detail::make_unsigned<T>::type(0x0F0F0F0F0F0F0F0Full), typename detail::make_unsigned<T>::type( 4));
+               x = detail::compute_bitfieldBitCountStep<sizeof(T) * 8 >= 16>::call(x, typename detail::make_unsigned<T>::type(0x00FF00FF00FF00FFull), typename detail::make_unsigned<T>::type( 8));
+               x = detail::compute_bitfieldBitCountStep<sizeof(T) * 8 >= 32>::call(x, typename detail::make_unsigned<T>::type(0x0000FFFF0000FFFFull), typename detail::make_unsigned<T>::type(16));
+               x = detail::compute_bitfieldBitCountStep<sizeof(T) * 8 >= 64>::call(x, typename detail::make_unsigned<T>::type(0x00000000FFFFFFFFull), typename detail::make_unsigned<T>::type(32));
+               return vecType<int, P>(x);
+       }
+
+       // findLSB
+       template <typename genIUType>
+       GLM_FUNC_QUALIFIER int findLSB(genIUType Value)
+       {
+               GLM_STATIC_ASSERT(std::numeric_limits<genIUType>::is_integer, "'findLSB' only accept integer values");
+
+               return detail::compute_findLSB<genIUType, sizeof(genIUType) * 8>::call(Value);
+       }
+
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_QUALIFIER vecType<int, P> findLSB(vecType<T, P> const & x)
+       {
+               GLM_STATIC_ASSERT(std::numeric_limits<T>::is_integer, "'findLSB' only accept integer values");
+
+               return detail::functor1<int, T, P, vecType>::call(findLSB, x);
+       }
+
+       // findMSB
+       template <typename genIUType>
+       GLM_FUNC_QUALIFIER int findMSB(genIUType x)
+       {
+               GLM_STATIC_ASSERT(std::numeric_limits<genIUType>::is_integer, "'findMSB' only accept integer values");
+
+               return findMSB(tvec1<genIUType>(x)).x;
+       }
+
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_QUALIFIER vecType<int, P> findMSB(vecType<T, P> const & x)
+       {
+               GLM_STATIC_ASSERT(std::numeric_limits<T>::is_integer, "'findMSB' only accept integer values");
+
+               return detail::compute_findMSB_vec<T, P, vecType, sizeof(T) * 8>::call(x);
+       }
+}//namespace glm
diff --git a/include/glm/detail/func_matrix.hpp b/include/glm/detail/func_matrix.hpp
new file mode 100644 (file)
index 0000000..5a9cb11
--- /dev/null
@@ -0,0 +1,178 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref core
+/// @file glm/detail/func_matrix.hpp
+/// @date 2008-08-03 / 2011-06-15
+/// @author Christophe Riccio
+///
+/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.6 Matrix Functions</a>
+/// 
+/// @defgroup core_func_matrix Matrix functions
+/// @ingroup core
+/// 
+/// For each of the following built-in matrix functions, there is both a 
+/// single-precision floating point version, where all arguments and return values 
+/// are single precision, and a double-precision floating version, where all 
+/// arguments and return values are double precision. Only the single-precision 
+/// floating point version is shown.
+///////////////////////////////////////////////////////////////////////////////////
+
+#pragma once
+
+// Dependencies
+#include "../detail/precision.hpp"
+#include "../detail/setup.hpp"
+#include "../detail/type_mat.hpp"
+#include "../vec2.hpp"
+#include "../vec3.hpp"
+#include "../vec4.hpp"
+#include "../mat2x2.hpp"
+#include "../mat2x3.hpp"
+#include "../mat2x4.hpp"
+#include "../mat3x2.hpp"
+#include "../mat3x3.hpp"
+#include "../mat3x4.hpp"
+#include "../mat4x2.hpp"
+#include "../mat4x3.hpp"
+#include "../mat4x4.hpp"
+
+namespace glm{
+namespace detail
+{
+       template <typename T, precision P>
+       struct outerProduct_trait<T, P, tvec2, tvec2>
+       {
+               typedef tmat2x2<T, P> type;
+       };
+
+       template <typename T, precision P>
+       struct outerProduct_trait<T, P, tvec2, tvec3>
+       {
+               typedef tmat2x3<T, P> type;
+       };
+
+       template <typename T, precision P>
+       struct outerProduct_trait<T, P, tvec2, tvec4>
+       {
+               typedef tmat2x4<T, P> type;
+       };
+
+       template <typename T, precision P>
+       struct outerProduct_trait<T, P, tvec3, tvec2>
+       {
+               typedef tmat3x2<T, P> type;
+       };
+
+       template <typename T, precision P>
+       struct outerProduct_trait<T, P, tvec3, tvec3>
+       {
+               typedef tmat3x3<T, P> type;
+       };
+
+       template <typename T, precision P>
+       struct outerProduct_trait<T, P, tvec3, tvec4>
+       {
+               typedef tmat3x4<T, P> type;
+       };
+
+       template <typename T, precision P>
+       struct outerProduct_trait<T, P, tvec4, tvec2>
+       {
+               typedef tmat4x2<T, P> type;
+       };
+
+       template <typename T, precision P>
+       struct outerProduct_trait<T, P, tvec4, tvec3>
+       {
+               typedef tmat4x3<T, P> type;
+       };
+
+       template <typename T, precision P>
+       struct outerProduct_trait<T, P, tvec4, tvec4>
+       {
+               typedef tmat4x4<T, P> type;
+       };
+
+}//namespace detail
+
+       /// @addtogroup core_func_matrix
+       /// @{
+
+       /// Multiply matrix x by matrix y component-wise, i.e., 
+       /// result[i][j] is the scalar product of x[i][j] and y[i][j].
+       /// 
+       /// @tparam matType Floating-point matrix types.
+       ///
+       /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/matrixCompMult.xml">GLSL matrixCompMult man page</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.6 Matrix Functions</a>
+       template <typename T, precision P, template <typename, precision> class matType>
+       GLM_FUNC_DECL matType<T, P> matrixCompMult(matType<T, P> const & x, matType<T, P> const & y);
+
+       /// Treats the first parameter c as a column vector
+       /// and the second parameter r as a row vector
+       /// and does a linear algebraic matrix multiply c * r.
+       /// 
+       /// @tparam matType Floating-point matrix types.
+       ///
+       /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/outerProduct.xml">GLSL outerProduct man page</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.6 Matrix Functions</a>
+       template <typename T, precision P, template <typename, precision> class vecTypeA, template <typename, precision> class vecTypeB>
+       GLM_FUNC_DECL typename detail::outerProduct_trait<T, P, vecTypeA, vecTypeB>::type outerProduct(vecTypeA<T, P> const & c, vecTypeB<T, P> const & r);
+
+       /// Returns the transposed matrix of x
+       /// 
+       /// @tparam matType Floating-point matrix types.
+       ///
+       /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/transpose.xml">GLSL transpose man page</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.6 Matrix Functions</a>
+#      if((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC2012))
+               template <typename T, precision P, template <typename, precision> class matType>
+               GLM_FUNC_DECL typename matType<T, P>::transpose_type transpose(matType<T, P> const & x);
+#      endif
+       
+       /// Return the determinant of a squared matrix.
+       /// 
+       /// @tparam valType Floating-point scalar types.
+       ///
+       /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/determinant.xml">GLSL determinant man page</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.6 Matrix Functions</a>        
+       template <typename T, precision P, template <typename, precision> class matType>
+       GLM_FUNC_DECL T determinant(matType<T, P> const & m);
+
+       /// Return the inverse of a squared matrix.
+       /// 
+       /// @tparam valType Floating-point scalar types.
+       ///
+       /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/inverse.xml">GLSL inverse man page</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.6 Matrix Functions</a>         
+       template <typename T, precision P, template <typename, precision> class matType>
+       GLM_FUNC_DECL matType<T, P> inverse(matType<T, P> const & m);
+
+       /// @}
+}//namespace glm
+
+#include "func_matrix.inl"
diff --git a/include/glm/detail/func_matrix.inl b/include/glm/detail/func_matrix.inl
new file mode 100644 (file)
index 0000000..1ebed1f
--- /dev/null
@@ -0,0 +1,310 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref core
+/// @file glm/detail/func_matrix.inl
+/// @date 2008-03-08 / 2011-06-15
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////
+
+#include "../geometric.hpp"
+#include <limits>
+
+namespace glm{
+namespace detail
+{
+       template <template <class, precision> class matType, typename T, precision P>
+       struct compute_transpose{};
+
+       template <typename T, precision P>
+       struct compute_transpose<tmat2x2, T, P>
+       {
+               GLM_FUNC_QUALIFIER static tmat2x2<T, P> call(tmat2x2<T, P> const & m)
+               {
+                       tmat2x2<T, P> result(uninitialize);
+                       result[0][0] = m[0][0];
+                       result[0][1] = m[1][0];
+                       result[1][0] = m[0][1];
+                       result[1][1] = m[1][1];
+                       return result;
+               }
+       };
+
+       template <typename T, precision P>
+       struct compute_transpose<tmat2x3, T, P>
+       {
+               GLM_FUNC_QUALIFIER static tmat3x2<T, P> call(tmat2x3<T, P> const & m)
+               {
+                       tmat3x2<T, P> result(uninitialize);
+                       result[0][0] = m[0][0];
+                       result[0][1] = m[1][0];
+                       result[1][0] = m[0][1];
+                       result[1][1] = m[1][1];
+                       result[2][0] = m[0][2];
+                       result[2][1] = m[1][2];
+                       return result;
+               }
+       };
+
+       template <typename T, precision P>
+       struct compute_transpose<tmat2x4, T, P>
+       {
+               GLM_FUNC_QUALIFIER static tmat4x2<T, P> call(tmat2x4<T, P> const & m)
+               {
+                       tmat4x2<T, P> result(uninitialize);
+                       result[0][0] = m[0][0];
+                       result[0][1] = m[1][0];
+                       result[1][0] = m[0][1];
+                       result[1][1] = m[1][1];
+                       result[2][0] = m[0][2];
+                       result[2][1] = m[1][2];
+                       result[3][0] = m[0][3];
+                       result[3][1] = m[1][3];
+                       return result;
+               }
+       };
+
+       template <typename T, precision P>
+       struct compute_transpose<tmat3x2, T, P>
+       {
+               GLM_FUNC_QUALIFIER static tmat2x3<T, P> call(tmat3x2<T, P> const & m)
+               {
+                       tmat2x3<T, P> result(uninitialize);
+                       result[0][0] = m[0][0];
+                       result[0][1] = m[1][0];
+                       result[0][2] = m[2][0];
+                       result[1][0] = m[0][1];
+                       result[1][1] = m[1][1];
+                       result[1][2] = m[2][1];
+                       return result;
+               }
+       };
+
+       template <typename T, precision P>
+       struct compute_transpose<tmat3x3, T, P>
+       {
+               GLM_FUNC_QUALIFIER static tmat3x3<T, P> call(tmat3x3<T, P> const & m)
+               {
+                       tmat3x3<T, P> result(uninitialize);
+                       result[0][0] = m[0][0];
+                       result[0][1] = m[1][0];
+                       result[0][2] = m[2][0];
+
+                       result[1][0] = m[0][1];
+                       result[1][1] = m[1][1];
+                       result[1][2] = m[2][1];
+
+                       result[2][0] = m[0][2];
+                       result[2][1] = m[1][2];
+                       result[2][2] = m[2][2];
+                       return result;
+               }
+       };
+
+       template <typename T, precision P>
+       struct compute_transpose<tmat3x4, T, P>
+       {
+               GLM_FUNC_QUALIFIER static tmat4x3<T, P> call(tmat3x4<T, P> const & m)
+               {
+                       tmat4x3<T, P> result(uninitialize);
+                       result[0][0] = m[0][0];
+                       result[0][1] = m[1][0];
+                       result[0][2] = m[2][0];
+                       result[1][0] = m[0][1];
+                       result[1][1] = m[1][1];
+                       result[1][2] = m[2][1];
+                       result[2][0] = m[0][2];
+                       result[2][1] = m[1][2];
+                       result[2][2] = m[2][2];
+                       result[3][0] = m[0][3];
+                       result[3][1] = m[1][3];
+                       result[3][2] = m[2][3];
+                       return result;
+               }
+       };
+
+       template <typename T, precision P>
+       struct compute_transpose<tmat4x2, T, P>
+       {
+               GLM_FUNC_QUALIFIER static tmat2x4<T, P> call(tmat4x2<T, P> const & m)
+               {
+                       tmat2x4<T, P> result(uninitialize);
+                       result[0][0] = m[0][0];
+                       result[0][1] = m[1][0];
+                       result[0][2] = m[2][0];
+                       result[0][3] = m[3][0];
+                       result[1][0] = m[0][1];
+                       result[1][1] = m[1][1];
+                       result[1][2] = m[2][1];
+                       result[1][3] = m[3][1];
+                       return result;
+               }
+       };
+
+       template <typename T, precision P>
+       struct compute_transpose<tmat4x3, T, P>
+       {
+               GLM_FUNC_QUALIFIER static tmat3x4<T, P> call(tmat4x3<T, P> const & m)
+               {
+                       tmat3x4<T, P> result(uninitialize);
+                       result[0][0] = m[0][0];
+                       result[0][1] = m[1][0];
+                       result[0][2] = m[2][0];
+                       result[0][3] = m[3][0];
+                       result[1][0] = m[0][1];
+                       result[1][1] = m[1][1];
+                       result[1][2] = m[2][1];
+                       result[1][3] = m[3][1];
+                       result[2][0] = m[0][2];
+                       result[2][1] = m[1][2];
+                       result[2][2] = m[2][2];
+                       result[2][3] = m[3][2];
+                       return result;
+               }
+       };
+
+       template <typename T, precision P>
+       struct compute_transpose<tmat4x4, T, P>
+       {
+               GLM_FUNC_QUALIFIER static tmat4x4<T, P> call(tmat4x4<T, P> const & m)
+               {
+                       tmat4x4<T, P> result(uninitialize);
+                       result[0][0] = m[0][0];
+                       result[0][1] = m[1][0];
+                       result[0][2] = m[2][0];
+                       result[0][3] = m[3][0];
+
+                       result[1][0] = m[0][1];
+                       result[1][1] = m[1][1];
+                       result[1][2] = m[2][1];
+                       result[1][3] = m[3][1];
+
+                       result[2][0] = m[0][2];
+                       result[2][1] = m[1][2];
+                       result[2][2] = m[2][2];
+                       result[2][3] = m[3][2];
+
+                       result[3][0] = m[0][3];
+                       result[3][1] = m[1][3];
+                       result[3][2] = m[2][3];
+                       result[3][3] = m[3][3];
+                       return result;
+               }
+       };
+
+       template <template <class, precision> class matType, typename T, precision P>
+       struct compute_determinant{};
+
+       template <typename T, precision P>
+       struct compute_determinant<tmat2x2, T, P>
+       {
+               GLM_FUNC_QUALIFIER static T call(tmat2x2<T, P> const & m)
+               {
+                       return m[0][0] * m[1][1] - m[1][0] * m[0][1];
+               }
+       };
+
+       template <typename T, precision P>
+       struct compute_determinant<tmat3x3, T, P>
+       {
+               GLM_FUNC_QUALIFIER static T call(tmat3x3<T, P> const & m)
+               {
+                       return
+                               + m[0][0] * (m[1][1] * m[2][2] - m[2][1] * m[1][2])
+                               - m[1][0] * (m[0][1] * m[2][2] - m[2][1] * m[0][2])
+                               + m[2][0] * (m[0][1] * m[1][2] - m[1][1] * m[0][2]);
+               }
+       };
+
+       template <typename T, precision P>
+       struct compute_determinant<tmat4x4, T, P>
+       {
+               GLM_FUNC_QUALIFIER static T call(tmat4x4<T, P> const & m)
+               {
+                       T SubFactor00 = m[2][2] * m[3][3] - m[3][2] * m[2][3];
+                       T SubFactor01 = m[2][1] * m[3][3] - m[3][1] * m[2][3];
+                       T SubFactor02 = m[2][1] * m[3][2] - m[3][1] * m[2][2];
+                       T SubFactor03 = m[2][0] * m[3][3] - m[3][0] * m[2][3];
+                       T SubFactor04 = m[2][0] * m[3][2] - m[3][0] * m[2][2];
+                       T SubFactor05 = m[2][0] * m[3][1] - m[3][0] * m[2][1];
+
+                       tvec4<T, P> DetCof(
+                               + (m[1][1] * SubFactor00 - m[1][2] * SubFactor01 + m[1][3] * SubFactor02),
+                               - (m[1][0] * SubFactor00 - m[1][2] * SubFactor03 + m[1][3] * SubFactor04),
+                               + (m[1][0] * SubFactor01 - m[1][1] * SubFactor03 + m[1][3] * SubFactor05),
+                               - (m[1][0] * SubFactor02 - m[1][1] * SubFactor04 + m[1][2] * SubFactor05));
+
+                       return
+                               m[0][0] * DetCof[0] + m[0][1] * DetCof[1] +
+                               m[0][2] * DetCof[2] + m[0][3] * DetCof[3];
+               }
+       };
+}//namespace detail
+
+       template <typename T, precision P, template <typename, precision> class matType>
+       GLM_FUNC_QUALIFIER matType<T, P> matrixCompMult(matType<T, P> const & x, matType<T, P> const & y)
+       {
+               GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'matrixCompMult' only accept floating-point inputs");
+
+               matType<T, P> result(uninitialize);
+               for(detail::component_count_t i = 0; i < detail::component_count(result); ++i)
+                       result[i] = x[i] * y[i];
+               return result;
+       }
+
+       template<typename T, precision P, template <typename, precision> class vecTypeA, template <typename, precision> class vecTypeB>
+       GLM_FUNC_QUALIFIER typename detail::outerProduct_trait<T, P, vecTypeA, vecTypeB>::type outerProduct(vecTypeA<T, P> const & c, vecTypeB<T, P> const & r)
+       {
+               GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'outerProduct' only accept floating-point inputs");
+
+               typename detail::outerProduct_trait<T, P, vecTypeA, vecTypeB>::type m(uninitialize);
+               for(detail::component_count_t i = 0; i < detail::component_count(m); ++i)
+                       m[i] = c * r[i];
+               return m;
+       }
+
+       template <typename T, precision P, template <typename, precision> class matType>
+       GLM_FUNC_QUALIFIER typename matType<T, P>::transpose_type transpose(matType<T, P> const & m)
+       {
+               GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'transpose' only accept floating-point inputs");
+               return detail::compute_transpose<matType, T, P>::call(m);
+       }
+
+       template <typename T, precision P, template <typename, precision> class matType>
+       GLM_FUNC_QUALIFIER T determinant(matType<T, P> const & m)
+       {
+               GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'determinant' only accept floating-point inputs");
+               return detail::compute_determinant<matType, T, P>::call(m);
+       }
+
+       template <typename T, precision P, template <typename, precision> class matType>
+       GLM_FUNC_QUALIFIER matType<T, P> inverse(matType<T, P> const & m)
+       {
+               GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'inverse' only accept floating-point inputs");
+               return detail::compute_inverse(m);
+       }
+
+}//namespace glm
diff --git a/include/glm/detail/func_noise.hpp b/include/glm/detail/func_noise.hpp
new file mode 100644 (file)
index 0000000..a827087
--- /dev/null
@@ -0,0 +1,93 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref core
+/// @file glm/detail/func_noise.hpp
+/// @date 2008-08-01 / 2011-06-18
+/// @author Christophe Riccio
+///
+/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.13 Noise Functions</a>
+/// 
+/// @defgroup core_func_noise Noise functions
+/// @ingroup core
+/// 
+/// Noise functions are stochastic functions that can be used to increase visual 
+/// complexity. Values returned by the following noise functions give the 
+/// appearance of randomness, but are not truly random.
+///////////////////////////////////////////////////////////////////////////////////
+
+#pragma once
+
+#include "type_vec1.hpp"
+#include "type_vec2.hpp"
+#include "type_vec3.hpp"
+#include "setup.hpp"
+
+namespace glm
+{
+       /// @addtogroup core_func_noise
+       /// @{
+
+       /// Returns a 1D noise value based on the input value x.
+       ///
+       /// @tparam genType Floating-point scalar or vector types.
+       /// 
+       /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/noise1.xml">GLSL noise1 man page</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.13 Noise Functions</a>
+       template <typename genType>
+       GLM_FUNC_DECL typename genType::value_type noise1(genType const & x);
+
+       /// Returns a 2D noise value based on the input value x.
+       ///
+       /// @tparam genType Floating-point scalar or vector types.
+       /// 
+       /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/noise2.xml">GLSL noise2 man page</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.13 Noise Functions</a>
+       template <typename genType>
+       GLM_FUNC_DECL tvec2<typename genType::value_type, defaultp> noise2(genType const & x);
+
+       /// Returns a 3D noise value based on the input value x.
+       ///
+       /// @tparam genType Floating-point scalar or vector types.
+       /// 
+       /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/noise3.xml">GLSL noise3 man page</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.13 Noise Functions</a>
+       template <typename genType>
+       GLM_FUNC_DECL tvec3<typename genType::value_type, defaultp> noise3(genType const & x);
+
+       /// Returns a 4D noise value based on the input value x.
+       ///
+       /// @tparam genType Floating-point scalar or vector types.
+       /// 
+       /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/noise4.xml">GLSL noise4 man page</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.13 Noise Functions</a>
+       template <typename genType>
+       GLM_FUNC_DECL tvec4<typename genType::value_type, defaultp> noise4(genType const & x);
+
+       /// @}
+}//namespace glm
+
+#include "func_noise.inl"
diff --git a/include/glm/detail/func_noise.inl b/include/glm/detail/func_noise.inl
new file mode 100644 (file)
index 0000000..10901e6
--- /dev/null
@@ -0,0 +1,388 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref core
+/// @file glm/detail/func_noise.inl
+/// @date 2008-08-01 / 2011-09-27
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////
+
+#include "../detail/_noise.hpp"
+#include "./func_common.hpp"
+
+namespace glm{
+namespace detail
+{
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec4<T, P> grad4(T const & j, tvec4<T, P> const & ip)
+       {
+               tvec3<T, P> pXYZ = floor(fract(tvec3<T, P>(j) * tvec3<T, P>(ip)) * T(7)) * ip[2] - T(1);
+               T pW = static_cast<T>(1.5) - dot(abs(pXYZ), tvec3<T, P>(1));
+               tvec4<T, P> s = tvec4<T, P>(lessThan(tvec4<T, P>(pXYZ, pW), tvec4<T, P>(0.0)));
+               pXYZ = pXYZ + (tvec3<T, P>(s) * T(2) - T(1)) * s.w; 
+               return tvec4<T, P>(pXYZ, pW);
+       }
+}//namespace detail
+
+       template <typename T>
+       GLM_FUNC_QUALIFIER T noise1(T const & x)
+       {
+               return noise1(tvec2<T, defaultp>(x, T(0)));
+       }
+
+       template <typename T>
+       GLM_FUNC_QUALIFIER tvec2<T, defaultp> noise2(T const & x)
+       {
+               return tvec2<T, defaultp>(
+                       noise1(x + T(0.0)),
+                       noise1(x + T(1.0)));
+       }
+
+       template <typename T>
+       GLM_FUNC_QUALIFIER tvec3<T, defaultp> noise3(T const & x)
+       {
+               return tvec3<T, defaultp>(
+                       noise1(x - T(1.0)),
+                       noise1(x + T(0.0)),
+                       noise1(x + T(1.0)));
+       }
+
+       template <typename T>
+       GLM_FUNC_QUALIFIER tvec4<T, defaultp> noise4(T const & x)
+       {
+               return tvec4<T, defaultp>(
+                       noise1(x - T(1.0)),
+                       noise1(x + T(0.0)),
+                       noise1(x + T(1.0)),
+                       noise1(x + T(2.0)));
+       }
+       
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER T noise1(tvec2<T, P> const & v)
+       {
+               tvec4<T, P> const C = tvec4<T, P>(
+                       T( 0.211324865405187),          // (3.0 -  sqrt(3.0)) / 6.0
+                       T( 0.366025403784439),          //  0.5 * (sqrt(3.0)  - 1.0)
+                       T(-0.577350269189626),          // -1.0 + 2.0 * C.x
+                       T( 0.024390243902439));         //  1.0 / 41.0
+               
+               // First corner
+               tvec2<T, P> i  = floor(v + dot(v, tvec2<T, P>(C[1])));
+               tvec2<T, P> x0 = v -   i + dot(i, tvec2<T, P>(C[0]));
+               
+               // Other corners
+               //i1.x = step( x0.y, x0.x ); // x0.x > x0.y ? 1.0 : 0.0
+               //i1.y = 1.0 - i1.x;
+               tvec2<T, P> i1 = (x0.x > x0.y) ? tvec2<T, P>(1, 0) : tvec2<T, P>(0, 1);
+
+               // x0 = x0 - 0.0 + 0.0 * C.xx ;
+               // x1 = x0 - i1 + 1.0 * C.xx ;
+               // x2 = x0 - 1.0 + 2.0 * C.xx ;
+               tvec4<T, P> x12 = tvec4<T, P>(x0.x, x0.y, x0.x, x0.y) + tvec4<T, P>(C.x, C.x, C.z, C.z);
+               x12 = tvec4<T, P>(tvec2<T, P>(x12) - i1, x12.z, x12.w);
+               
+               // Permutations
+               i = mod(i, T(289)); // Avoid truncation effects in permutation
+               tvec3<T, P> p = detail::permute(
+                       detail::permute(i.y + tvec3<T, P>(T(0), i1.y, T(1))) + i.x + tvec3<T, P>(T(0), i1.x, T(1)));
+               
+               tvec3<T, P> m = max(T(0.5) - tvec3<T, P>(
+                       dot(x0, x0),
+                       dot(tvec2<T, P>(x12.x, x12.y), tvec2<T, P>(x12.x, x12.y)),
+                       dot(tvec2<T, P>(x12.z, x12.w), tvec2<T, P>(x12.z, x12.w))), T(0));
+               
+               m = m * m;
+               m = m * m;
+               
+               // Gradients: 41 points uniformly over a line, mapped onto a diamond.
+               // The ring size 17*17 = 289 is close to a multiple of 41 (41*7 = 287)
+               
+               tvec3<T, P> x = static_cast<T>(2) * fract(p * C.w) - T(1);
+               tvec3<T, P> h = abs(x) - T(0.5);
+               tvec3<T, P> ox = floor(x + T(0.5));
+               tvec3<T, P> a0 = x - ox;
+               
+               // Normalise gradients implicitly by scaling m
+               // Inlined for speed: m *= taylorInvSqrt( a0*a0 + h*h );
+               m *= static_cast<T>(1.79284291400159) - T(0.85373472095314) * (a0 * a0 + h * h);
+               
+               // Compute final noise value at P
+               tvec3<T, P> g;
+               g.x  = a0.x  * x0.x  + h.x  * x0.y;
+               //g.yz = a0.yz * x12.xz + h.yz * x12.yw;
+               g.y = a0.y * x12.x + h.y * x12.y;
+               g.z = a0.z * x12.z + h.z * x12.w;
+               return T(130) * dot(m, g);
+       }
+       
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER T noise1(tvec3<T, P> const & v)
+       {
+               tvec2<T, P> const C(1.0 / 6.0, 1.0 / 3.0);
+               tvec4<T, P> const D(0.0, 0.5, 1.0, 2.0);
+               
+               // First corner
+               tvec3<T, P> i(floor(v + dot(v, tvec3<T, P>(C.y))));
+               tvec3<T, P> x0(v - i + dot(i, tvec3<T, P>(C.x)));
+               
+               // Other corners
+               tvec3<T, P> g(step(tvec3<T, P>(x0.y, x0.z, x0.x), x0));
+               tvec3<T, P> l(T(1) - g);
+               tvec3<T, P> i1(min(g, tvec3<T, P>(l.z, l.x, l.y)));
+               tvec3<T, P> i2(max(g, tvec3<T, P>(l.z, l.x, l.y)));
+               
+               // x0 = x0 - 0.0 + 0.0 * C.xxx;
+               // x1 = x0 - i1  + 1.0 * C.xxx;
+               // x2 = x0 - i2  + 2.0 * C.xxx;
+               // x3 = x0 - 1.0 + 3.0 * C.xxx;
+               tvec3<T, P> x1(x0 - i1 + C.x);
+               tvec3<T, P> x2(x0 - i2 + C.y);          // 2.0*C.x = 1/3 = C.y
+               tvec3<T, P> x3(x0 - D.y);                       // -1.0+3.0*C.x = -0.5 = -D.y
+               
+               // Permutations
+               i = mod289(i); 
+               tvec4<T, P> p(detail::permute(detail::permute(detail::permute(
+                       i.z + tvec4<T, P>(T(0), i1.z, i2.z, T(1))) +
+                       i.y + tvec4<T, P>(T(0), i1.y, i2.y, T(1))) +
+                       i.x + tvec4<T, P>(T(0), i1.x, i2.x, T(1))));
+               
+               // Gradients: 7x7 points over a square, mapped onto an octahedron.
+               // The ring size 17*17 = 289 is close to a multiple of 49 (49*6 = 294)
+               T n_ = static_cast<T>(0.142857142857); // 1.0/7.0
+               tvec3<T, P> ns(n_ * tvec3<T, P>(D.w, D.y, D.z) - tvec3<T, P>(D.x, D.z, D.x));
+               
+               tvec4<T, P> j(p - T(49) * floor(p * ns.z * ns.z));      // mod(p,7*7)
+               
+               tvec4<T, P> x_(floor(j * ns.z));
+               tvec4<T, P> y_(floor(j - T(7) * x_));                           // mod(j,N)
+               
+               tvec4<T, P> x(x_ * ns.x + ns.y);
+               tvec4<T, P> y(y_ * ns.x + ns.y);
+               tvec4<T, P> h(T(1) - abs(x) - abs(y));
+               
+               tvec4<T, P> b0(x.x, x.y, y.x, y.y);
+               tvec4<T, P> b1(x.z, x.w, y.z, y.w);
+               
+               // vec4 s0 = vec4(lessThan(b0,0.0))*2.0 - 1.0;
+               // vec4 s1 = vec4(lessThan(b1,0.0))*2.0 - 1.0;
+               tvec4<T, P> s0(floor(b0) * T(2) + T(1));
+               tvec4<T, P> s1(floor(b1) * T(2) + T(1));
+               tvec4<T, P> sh(-step(h, tvec4<T, P>(0.0)));
+               
+               tvec4<T, P> a0 = tvec4<T, P>(b0.x, b0.z, b0.y, b0.w) + tvec4<T, P>(s0.x, s0.z, s0.y, s0.w) * tvec4<T, P>(sh.x, sh.x, sh.y, sh.y);
+               tvec4<T, P> a1 = tvec4<T, P>(b1.x, b1.z, b1.y, b1.w) + tvec4<T, P>(s1.x, s1.z, s1.y, s1.w) * tvec4<T, P>(sh.z, sh.z, sh.w, sh.w);
+               
+               tvec3<T, P> p0(a0.x, a0.y, h.x);
+               tvec3<T, P> p1(a0.z, a0.w, h.y);
+               tvec3<T, P> p2(a1.x, a1.y, h.z);
+               tvec3<T, P> p3(a1.z, a1.w, h.w);
+               
+               // Normalise gradients
+               tvec4<T, P> norm = taylorInvSqrt(tvec4<T, P>(dot(p0, p0), dot(p1, p1), dot(p2, p2), dot(p3, p3)));
+               p0 *= norm.x;
+               p1 *= norm.y;
+               p2 *= norm.z;
+               p3 *= norm.w;
+               
+               // Mix final noise value
+               tvec4<T, P> m = max(T(0.6) - tvec4<T, P>(dot(x0, x0), dot(x1, x1), dot(x2, x2), dot(x3, x3)), T(0));
+               m = m * m;
+               return T(42) * dot(m * m, tvec4<T, P>(dot(p0, x0), dot(p1, x1), dot(p2, x2), dot(p3, x3)));
+       }
+       
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER T noise1(tvec4<T, P> const & v)
+       {
+               tvec4<T, P> const C(
+                       0.138196601125011,              // (5 - sqrt(5))/20  G4
+                       0.276393202250021,              // 2 * G4
+                       0.414589803375032,              // 3 * G4
+                       -0.447213595499958);    // -1 + 4 * G4
+               
+               // (sqrt(5) - 1)/4 = F4, used once below
+               T const F4 = static_cast<T>(0.309016994374947451);
+               
+               // First corner
+               tvec4<T, P> i  = floor(v + dot(v, tvec4<T, P>(F4)));
+               tvec4<T, P> x0 = v -   i + dot(i, tvec4<T, P>(C.x));
+               
+               // Other corners
+               
+               // Rank sorting originally contributed by Bill Licea-Kane, AMD (formerly ATI)
+               tvec4<T, P> i0;
+               tvec3<T, P> isX = step(tvec3<T, P>(x0.y, x0.z, x0.w), tvec3<T, P>(x0.x));
+               tvec3<T, P> isYZ = step(tvec3<T, P>(x0.z, x0.w, x0.w), tvec3<T, P>(x0.y, x0.y, x0.z));
+               
+               //  i0.x = dot(isX, vec3(1.0));
+               //i0.x = isX.x + isX.y + isX.z;
+               //i0.yzw = static_cast<T>(1) - isX;
+               i0 = tvec4<T, P>(isX.x + isX.y + isX.z, T(1) - isX);
+               
+               //  i0.y += dot(isYZ.xy, vec2(1.0));
+               i0.y += isYZ.x + isYZ.y;
+               
+               //i0.zw += 1.0 - tvec2<T, P>(isYZ.x, isYZ.y);
+               i0.z += static_cast<T>(1) - isYZ.x;
+               i0.w += static_cast<T>(1) - isYZ.y;
+               i0.z += isYZ.z;
+               i0.w += static_cast<T>(1) - isYZ.z;
+               
+               // i0 now contains the unique values 0,1,2,3 in each channel
+               tvec4<T, P> i3 = clamp(i0, T(0), T(1));
+               tvec4<T, P> i2 = clamp(i0 - T(1), T(0), T(1));
+               tvec4<T, P> i1 = clamp(i0 - T(2), T(0), T(1));
+               
+               //  x0 = x0 - 0.0 + 0.0 * C.xxxx
+               //  x1 = x0 - i1  + 0.0 * C.xxxx
+               //  x2 = x0 - i2  + 0.0 * C.xxxx
+               //  x3 = x0 - i3  + 0.0 * C.xxxx
+               //  x4 = x0 - 1.0 + 4.0 * C.xxxx
+               tvec4<T, P> x1 = x0 - i1 + C.x;
+               tvec4<T, P> x2 = x0 - i2 + C.y;
+               tvec4<T, P> x3 = x0 - i3 + C.z;
+               tvec4<T, P> x4 = x0 + C.w;
+               
+               // Permutations
+               i = mod(i, T(289));
+               T j0 = detail::permute(detail::permute(detail::permute(detail::permute(i.w) + i.z) + i.y) + i.x);
+               tvec4<T, P> j1 = detail::permute(detail::permute(detail::permute(detail::permute(
+                       i.w + tvec4<T, P>(i1.w, i2.w, i3.w, T(1))) +
+                       i.z + tvec4<T, P>(i1.z, i2.z, i3.z, T(1))) +
+                       i.y + tvec4<T, P>(i1.y, i2.y, i3.y, T(1))) +
+                       i.x + tvec4<T, P>(i1.x, i2.x, i3.x, T(1)));
+               
+               // Gradients: 7x7x6 points over a cube, mapped onto a 4-cross polytope
+               // 7*7*6 = 294, which is close to the ring size 17*17 = 289.
+               tvec4<T, P> ip = tvec4<T, P>(T(1) / T(294), T(1) / T(49), T(1) / T(7), T(0));
+               
+               tvec4<T, P> p0 = detail::grad4(j0,   ip);
+               tvec4<T, P> p1 = detail::grad4(j1.x, ip);
+               tvec4<T, P> p2 = detail::grad4(j1.y, ip);
+               tvec4<T, P> p3 = detail::grad4(j1.z, ip);
+               tvec4<T, P> p4 = detail::grad4(j1.w, ip);
+               
+               // Normalise gradients
+               tvec4<T, P> norm = detail::taylorInvSqrt(tvec4<T, P>(dot(p0, p0), dot(p1, p1), dot(p2, p2), dot(p3, p3)));
+               p0 *= norm.x;
+               p1 *= norm.y;
+               p2 *= norm.z;
+               p3 *= norm.w;
+               p4 *= taylorInvSqrt(dot(p4, p4));
+               
+               // Mix contributions from the five corners
+               tvec3<T, P> m0 = max(T(0.6) - tvec3<T, P>(dot(x0, x0), dot(x1, x1), dot(x2, x2)), T(0));
+               tvec2<T, P> m1 = max(T(0.6) - tvec2<T, P>(dot(x3, x3), dot(x4, x4)             ), T(0));
+               m0 = m0 * m0;
+               m1 = m1 * m1;
+               
+               return T(49) * (
+                       dot(m0 * m0, tvec3<T, P>(dot(p0, x0), dot(p1, x1), dot(p2, x2))) +
+                       dot(m1 * m1, tvec2<T, P>(dot(p3, x3), dot(p4, x4))));
+       }
+       
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec2<T, P> noise2(tvec2<T, P> const & x)
+       {
+               return tvec2<T, P>(
+                       noise1(x + tvec2<T, P>(0.0)),
+                       noise1(tvec2<T, P>(0.0) - x));
+       }
+       
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec2<T, P> noise2(tvec3<T, P> const & x)
+       {
+               return tvec2<T, P>(
+                       noise1(x + tvec3<T, P>(0.0)),
+                       noise1(tvec3<T, P>(0.0) - x));
+       }
+       
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec2<T, P> noise2(tvec4<T, P> const & x)
+       {
+               return tvec2<T, P>(
+                       noise1(x + tvec4<T, P>(0)),
+                       noise1(tvec4<T, P>(0) - x));
+       }
+       
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec3<T, P> noise3(tvec2<T, P> const & x)
+       {
+               return tvec3<T, P>(
+                       noise1(x - tvec2<T, P>(1.0)),
+                       noise1(x + tvec2<T, P>(0.0)),
+                       noise1(x + tvec2<T, P>(1.0)));
+       }
+       
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec3<T, P> noise3(tvec3<T, P> const & x)
+       {
+               return tvec3<T, P>(
+                       noise1(x - tvec3<T, P>(1.0)),
+                       noise1(x + tvec3<T, P>(0.0)),
+                       noise1(x + tvec3<T, P>(1.0)));
+       }
+       
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec3<T, P> noise3(tvec4<T, P> const & x)
+       {
+               return tvec3<T, P>(
+                       noise1(x - tvec4<T, P>(1)),
+                       noise1(x + tvec4<T, P>(0)),
+                       noise1(x + tvec4<T, P>(1)));
+       }
+       
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec4<T, P> noise4(tvec2<T, P> const & x)
+       {
+               return tvec4<T, P>(
+                       noise1(x - tvec2<T, P>(1)),
+                       noise1(x + tvec2<T, P>(0)),
+                       noise1(x + tvec2<T, P>(1)),
+                       noise1(x + tvec2<T, P>(2)));
+       }
+
+       
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec4<T, P> noise4(tvec3<T, P> const & x)
+       {
+               return tvec4<T, P>(
+                       noise1(x - tvec3<T, P>(1)),
+                       noise1(x + tvec3<T, P>(0)),
+                       noise1(x + tvec3<T, P>(1)),
+                       noise1(x + tvec3<T, P>(2)));
+       }
+       
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec4<T, P> noise4(tvec4<T, P> const & x)
+       {
+               return tvec4<T, P>(
+                       noise1(x - tvec4<T, P>(1)),
+                       noise1(x + tvec4<T, P>(0)),
+                       noise1(x + tvec4<T, P>(1)),
+                       noise1(x + tvec4<T, P>(2)));
+       }
+       
+}//namespace glm
diff --git a/include/glm/detail/func_packing.hpp b/include/glm/detail/func_packing.hpp
new file mode 100644 (file)
index 0000000..bce0fe5
--- /dev/null
@@ -0,0 +1,197 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref core
+/// @file glm/detail/func_packing.hpp
+/// @date 2010-03-17 / 2011-06-15
+/// @author Christophe Riccio
+///
+/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a>
+/// @see gtc_packing
+/// 
+/// @defgroup core_func_packing Floating-Point Pack and Unpack Functions
+/// @ingroup core
+/// 
+/// These functions do not operate component-wise, rather as described in each case.
+///////////////////////////////////////////////////////////////////////////////////
+
+#pragma once
+
+#include "type_vec2.hpp"
+#include "type_vec4.hpp"
+
+namespace glm
+{
+       /// @addtogroup core_func_packing
+       /// @{
+
+       /// First, converts each component of the normalized floating-point value v into 8- or 16-bit integer values. 
+       /// Then, the results are packed into the returned 32-bit unsigned integer.
+       /// 
+       /// The conversion for component c of v to fixed point is done as follows:
+       /// packUnorm2x16: round(clamp(c, 0, +1) * 65535.0) 
+       /// 
+       /// The first component of the vector will be written to the least significant bits of the output; 
+       /// the last component will be written to the most significant bits.
+       /// 
+       /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/packUnorm2x16.xml">GLSL packUnorm2x16 man page</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a>
+       GLM_FUNC_DECL uint packUnorm2x16(vec2 const & v);
+
+       /// First, converts each component of the normalized floating-point value v into 8- or 16-bit integer values. 
+       /// Then, the results are packed into the returned 32-bit unsigned integer.
+       /// 
+       /// The conversion for component c of v to fixed point is done as follows:
+       /// packSnorm2x16: round(clamp(v, -1, +1) * 32767.0)
+       /// 
+       /// The first component of the vector will be written to the least significant bits of the output; 
+       /// the last component will be written to the most significant bits.
+       /// 
+       /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/packSnorm2x16.xml">GLSL packSnorm2x16 man page</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a>
+       GLM_FUNC_DECL uint packSnorm2x16(vec2 const & v);
+
+       /// First, converts each component of the normalized floating-point value v into 8- or 16-bit integer values. 
+       /// Then, the results are packed into the returned 32-bit unsigned integer.
+       /// 
+       /// The conversion for component c of v to fixed point is done as follows:
+       /// packUnorm4x8:       round(clamp(c, 0, +1) * 255.0)
+       /// 
+       /// The first component of the vector will be written to the least significant bits of the output; 
+       /// the last component will be written to the most significant bits.
+       /// 
+       /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/packUnorm4x8.xml">GLSL packUnorm4x8 man page</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a>
+       GLM_FUNC_DECL uint packUnorm4x8(vec4 const & v);
+
+       /// First, converts each component of the normalized floating-point value v into 8- or 16-bit integer values. 
+       /// Then, the results are packed into the returned 32-bit unsigned integer.
+       /// 
+       /// The conversion for component c of v to fixed point is done as follows:
+       /// packSnorm4x8:       round(clamp(c, -1, +1) * 127.0) 
+       /// 
+       /// The first component of the vector will be written to the least significant bits of the output; 
+       /// the last component will be written to the most significant bits.
+       /// 
+       /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/packSnorm4x8.xml">GLSL packSnorm4x8 man page</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a>
+       GLM_FUNC_DECL uint packSnorm4x8(vec4 const & v);
+
+       /// First, unpacks a single 32-bit unsigned integer p into a pair of 16-bit unsigned integers, four 8-bit unsigned integers, or four 8-bit signed integers. 
+       /// Then, each component is converted to a normalized floating-point value to generate the returned two- or four-component vector.
+       /// 
+       /// The conversion for unpacked fixed-point value f to floating point is done as follows:
+       /// unpackUnorm2x16: f / 65535.0 
+       /// 
+       /// The first component of the returned vector will be extracted from the least significant bits of the input; 
+       /// the last component will be extracted from the most significant bits.
+       /// 
+       /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackUnorm2x16.xml">GLSL unpackUnorm2x16 man page</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a>
+       GLM_FUNC_DECL vec2 unpackUnorm2x16(uint p);
+
+       /// First, unpacks a single 32-bit unsigned integer p into a pair of 16-bit unsigned integers, four 8-bit unsigned integers, or four 8-bit signed integers. 
+       /// Then, each component is converted to a normalized floating-point value to generate the returned two- or four-component vector.
+       /// 
+       /// The conversion for unpacked fixed-point value f to floating point is done as follows:
+       /// unpackSnorm2x16: clamp(f / 32767.0, -1, +1)
+       /// 
+       /// The first component of the returned vector will be extracted from the least significant bits of the input; 
+       /// the last component will be extracted from the most significant bits.
+       /// 
+       /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackSnorm2x16.xml">GLSL unpackSnorm2x16 man page</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a>
+       GLM_FUNC_DECL vec2 unpackSnorm2x16(uint p);
+
+       /// First, unpacks a single 32-bit unsigned integer p into a pair of 16-bit unsigned integers, four 8-bit unsigned integers, or four 8-bit signed integers. 
+       /// Then, each component is converted to a normalized floating-point value to generate the returned two- or four-component vector.
+       /// 
+       /// The conversion for unpacked fixed-point value f to floating point is done as follows:
+       /// unpackUnorm4x8: f / 255.0
+       /// 
+       /// The first component of the returned vector will be extracted from the least significant bits of the input; 
+       /// the last component will be extracted from the most significant bits.
+       /// 
+       /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackUnorm4x8.xml">GLSL unpackUnorm4x8 man page</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a>
+       GLM_FUNC_DECL vec4 unpackUnorm4x8(uint p);
+
+       /// First, unpacks a single 32-bit unsigned integer p into a pair of 16-bit unsigned integers, four 8-bit unsigned integers, or four 8-bit signed integers. 
+       /// Then, each component is converted to a normalized floating-point value to generate the returned two- or four-component vector.
+       /// 
+       /// The conversion for unpacked fixed-point value f to floating point is done as follows:
+       /// unpackSnorm4x8: clamp(f / 127.0, -1, +1)
+       /// 
+       /// The first component of the returned vector will be extracted from the least significant bits of the input; 
+       /// the last component will be extracted from the most significant bits.
+       /// 
+       /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackSnorm4x8.xml">GLSL unpackSnorm4x8 man page</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a>
+       GLM_FUNC_DECL vec4 unpackSnorm4x8(uint p);
+
+       /// Returns a double-precision value obtained by packing the components of v into a 64-bit value. 
+       /// If an IEEE 754 Inf or NaN is created, it will not signal, and the resulting floating point value is unspecified. 
+       /// Otherwise, the bit- level representation of v is preserved. 
+       /// The first vector component specifies the 32 least significant bits; 
+       /// the second component specifies the 32 most significant bits.
+       /// 
+       /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/packDouble2x32.xml">GLSL packDouble2x32 man page</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a>
+       GLM_FUNC_DECL double packDouble2x32(uvec2 const & v);
+
+       /// Returns a two-component unsigned integer vector representation of v. 
+       /// The bit-level representation of v is preserved. 
+       /// The first component of the vector contains the 32 least significant bits of the double; 
+       /// the second component consists the 32 most significant bits.
+       /// 
+       /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackDouble2x32.xml">GLSL unpackDouble2x32 man page</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a>
+       GLM_FUNC_DECL uvec2 unpackDouble2x32(double v);
+
+       /// Returns an unsigned integer obtained by converting the components of a two-component floating-point vector 
+       /// to the 16-bit floating-point representation found in the OpenGL Specification, 
+       /// and then packing these two 16- bit integers into a 32-bit unsigned integer.
+       /// The first vector component specifies the 16 least-significant bits of the result; 
+       /// the second component specifies the 16 most-significant bits.
+       /// 
+       /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/packHalf2x16.xml">GLSL packHalf2x16 man page</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a>
+       GLM_FUNC_DECL uint packHalf2x16(vec2 const & v);
+       
+       /// Returns a two-component floating-point vector with components obtained by unpacking a 32-bit unsigned integer into a pair of 16-bit values, 
+       /// interpreting those values as 16-bit floating-point numbers according to the OpenGL Specification, 
+       /// and converting them to 32-bit floating-point values.
+       /// The first component of the vector is obtained from the 16 least-significant bits of v; 
+       /// the second component is obtained from the 16 most-significant bits of v.
+       /// 
+       /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackHalf2x16.xml">GLSL unpackHalf2x16 man page</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a>
+       GLM_FUNC_DECL vec2 unpackHalf2x16(uint v);
+       
+       /// @}
+}//namespace glm
+
+#include "func_packing.inl"
diff --git a/include/glm/detail/func_packing.inl b/include/glm/detail/func_packing.inl
new file mode 100644 (file)
index 0000000..3132a27
--- /dev/null
@@ -0,0 +1,119 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref core
+/// @file glm/detail/func_packing.inl
+/// @date 2010-03-17 / 2011-06-15
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////
+
+#include "func_common.hpp"
+#include "type_half.hpp"
+#include "../fwd.hpp"
+
+namespace glm
+{
+       GLM_FUNC_QUALIFIER uint packUnorm2x16(vec2 const & v)
+       {
+               u16vec2 const Topack(round(clamp(v, 0.0f, 1.0f) * 65535.0f));
+               return reinterpret_cast<uint const &>(Topack);
+       }
+
+       GLM_FUNC_QUALIFIER vec2 unpackUnorm2x16(uint p)
+       {
+               vec2 Unpack(reinterpret_cast<u16vec2 const &>(p));
+               return Unpack * float(1.5259021896696421759365224689097e-5); // 1.0 / 65535.0
+       }
+
+       GLM_FUNC_QUALIFIER uint packSnorm2x16(vec2 const & v)
+       {
+               i16vec2 const Topack(round(clamp(v ,-1.0f, 1.0f) * 32767.0f));
+               return reinterpret_cast<uint const &>(Topack);
+       }
+
+       GLM_FUNC_QUALIFIER vec2 unpackSnorm2x16(uint p)
+       {
+               vec2 const Unpack(reinterpret_cast<i16vec2 const &>(p));
+               return clamp(
+                       Unpack * 3.0518509475997192297128208258309e-5f, //1.0f / 32767.0f,
+                       -1.0f, 1.0f);
+       }
+
+       GLM_FUNC_QUALIFIER uint packUnorm4x8(vec4 const & v)
+       {
+               u8vec4 const Topack(round(clamp(v, 0.0f, 1.0f) * 255.0f));
+               return reinterpret_cast<uint const &>(Topack);
+       }
+
+       GLM_FUNC_QUALIFIER vec4 unpackUnorm4x8(uint p)
+       {
+               vec4 const Unpack(reinterpret_cast<u8vec4 const&>(p));
+               return Unpack * float(0.0039215686274509803921568627451); // 1 / 255
+       }
+       
+       GLM_FUNC_QUALIFIER uint packSnorm4x8(vec4 const & v)
+       {
+               i8vec4 const Topack(round(clamp(v ,-1.0f, 1.0f) * 127.0f));
+               return reinterpret_cast<uint const &>(Topack);
+       }
+       
+       GLM_FUNC_QUALIFIER glm::vec4 unpackSnorm4x8(uint p)
+       {
+               vec4 const Unpack(reinterpret_cast<i8vec4 const &>(p));
+               return clamp(
+                       Unpack * 0.0078740157480315f, // 1.0f / 127.0f
+                       -1.0f, 1.0f);
+       }
+
+       GLM_FUNC_QUALIFIER double packDouble2x32(uvec2 const & v)
+       {
+               return reinterpret_cast<double const &>(v);
+       }
+
+       GLM_FUNC_QUALIFIER uvec2 unpackDouble2x32(double v)
+       {
+               return reinterpret_cast<uvec2 const &>(v);
+       }
+
+       GLM_FUNC_QUALIFIER uint packHalf2x16(vec2 const & v)
+       {
+               i16vec2 const Unpack(
+                       detail::toFloat16(v.x),
+                       detail::toFloat16(v.y));
+
+               return reinterpret_cast<uint const &>(Unpack);
+       }
+
+       GLM_FUNC_QUALIFIER vec2 unpackHalf2x16(uint v)
+       {
+               i16vec2 const Unpack(reinterpret_cast<i16vec2 const &>(v));
+       
+               return vec2(
+                       detail::toFloat32(Unpack.x), 
+                       detail::toFloat32(Unpack.y));
+       }
+}//namespace glm
+
diff --git a/include/glm/detail/func_trigonometric.hpp b/include/glm/detail/func_trigonometric.hpp
new file mode 100644 (file)
index 0000000..d43961b
--- /dev/null
@@ -0,0 +1,205 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref core
+/// @file glm/detail/func_trigonometric.hpp
+/// @date 2008-08-01 / 2011-06-15
+/// @author Christophe Riccio
+///
+/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a>
+/// 
+/// @defgroup core_func_trigonometric Angle and Trigonometry Functions
+/// @ingroup core
+/// 
+/// Function parameters specified as angle are assumed to be in units of radians. 
+/// In no case will any of these functions result in a divide by zero error. If 
+/// the divisor of a ratio is 0, then results will be undefined.
+/// 
+/// These all operate component-wise. The description is per component.
+///////////////////////////////////////////////////////////////////////////////////
+
+#pragma once
+
+#include "setup.hpp"
+#include "precision.hpp"
+
+namespace glm
+{
+       /// @addtogroup core_func_trigonometric
+       /// @{
+
+       /// Converts degrees to radians and returns the result.
+       ///
+       /// @tparam genType Floating-point scalar or vector types.
+       ///
+       /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/radians.xml">GLSL radians man page</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a>
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_DECL vecType<T, P> radians(vecType<T, P> const & degrees);
+
+       /// Converts radians to degrees and returns the result.
+       ///
+       /// @tparam genType Floating-point scalar or vector types.
+       /// 
+       /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/degrees.xml">GLSL degrees man page</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a>
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_DECL vecType<T, P> degrees(vecType<T, P> const & radians);
+
+       /// The standard trigonometric sine function. 
+       /// The values returned by this function will range from [-1, 1].
+       /// 
+       /// @tparam genType Floating-point scalar or vector types.
+       ///
+       /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/sin.xml">GLSL sin man page</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a>
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_DECL vecType<T, P> sin(vecType<T, P> const & angle);
+
+       /// The standard trigonometric cosine function. 
+       /// The values returned by this function will range from [-1, 1].
+       /// 
+       /// @tparam genType Floating-point scalar or vector types.
+       ///
+       /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/cos.xml">GLSL cos man page</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a>
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_DECL vecType<T, P> cos(vecType<T, P> const & angle);
+
+       /// The standard trigonometric tangent function.
+       ///
+       /// @tparam genType Floating-point scalar or vector types.
+       /// 
+       /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/tan.xml">GLSL tan man page</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a>
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_DECL vecType<T, P> tan(vecType<T, P> const & angle); 
+
+       /// Arc sine. Returns an angle whose sine is x. 
+       /// The range of values returned by this function is [-PI/2, PI/2]. 
+       /// Results are undefined if |x| > 1.
+       ///
+       /// @tparam genType Floating-point scalar or vector types.
+       /// 
+       /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/asin.xml">GLSL asin man page</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a>
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_DECL vecType<T, P> asin(vecType<T, P> const & x);
+
+       /// Arc cosine. Returns an angle whose sine is x. 
+       /// The range of values returned by this function is [0, PI]. 
+       /// Results are undefined if |x| > 1.
+       ///
+       /// @tparam genType Floating-point scalar or vector types.
+       /// 
+       /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/acos.xml">GLSL acos man page</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a>
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_DECL vecType<T, P> acos(vecType<T, P> const & x);
+
+       /// Arc tangent. Returns an angle whose tangent is y/x. 
+       /// The signs of x and y are used to determine what 
+       /// quadrant the angle is in. The range of values returned 
+       /// by this function is [-PI, PI]. Results are undefined 
+       /// if x and y are both 0. 
+       ///
+       /// @tparam genType Floating-point scalar or vector types.
+       /// 
+       /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/atan.xml">GLSL atan man page</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a>
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_DECL vecType<T, P> atan(vecType<T, P> const & y, vecType<T, P> const & x);
+
+       /// Arc tangent. Returns an angle whose tangent is y_over_x. 
+       /// The range of values returned by this function is [-PI/2, PI/2].
+       ///
+       /// @tparam genType Floating-point scalar or vector types.
+       /// 
+       /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/atan.xml">GLSL atan man page</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a>
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_DECL vecType<T, P> atan(vecType<T, P> const & y_over_x);
+
+       /// Returns the hyperbolic sine function, (exp(x) - exp(-x)) / 2
+       ///
+       /// @tparam genType Floating-point scalar or vector types.
+       /// 
+       /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/sinh.xml">GLSL sinh man page</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a>
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_DECL vecType<T, P> sinh(vecType<T, P> const & angle);
+
+       /// Returns the hyperbolic cosine function, (exp(x) + exp(-x)) / 2
+       ///
+       /// @tparam genType Floating-point scalar or vector types.
+       /// 
+       /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/cosh.xml">GLSL cosh man page</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a>
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_DECL vecType<T, P> cosh(vecType<T, P> const & angle);
+
+       /// Returns the hyperbolic tangent function, sinh(angle) / cosh(angle)
+       ///
+       /// @tparam genType Floating-point scalar or vector types.
+       /// 
+       /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/tanh.xml">GLSL tanh man page</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a>
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_DECL vecType<T, P> tanh(vecType<T, P> const & angle);
+
+       /// Arc hyperbolic sine; returns the inverse of sinh.
+       ///
+       /// @tparam genType Floating-point scalar or vector types.
+       /// 
+       /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/asinh.xml">GLSL asinh man page</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a>
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_DECL vecType<T, P> asinh(vecType<T, P> const & x);
+       
+       /// Arc hyperbolic cosine; returns the non-negative inverse
+       /// of cosh. Results are undefined if x < 1.
+       ///
+       /// @tparam genType Floating-point scalar or vector types.
+       /// 
+       /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/acosh.xml">GLSL acosh man page</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a>
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_DECL vecType<T, P> acosh(vecType<T, P> const & x);
+
+       /// Arc hyperbolic tangent; returns the inverse of tanh.
+       /// Results are undefined if abs(x) >= 1.
+       ///
+       /// @tparam genType Floating-point scalar or vector types.
+       ///
+       /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/atanh.xml">GLSL atanh man page</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a>
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_DECL vecType<T, P> atanh(vecType<T, P> const & x);
+
+       /// @}
+}//namespace glm
+
+#include "func_trigonometric.inl"
diff --git a/include/glm/detail/func_trigonometric.inl b/include/glm/detail/func_trigonometric.inl
new file mode 100644 (file)
index 0000000..a710525
--- /dev/null
@@ -0,0 +1,224 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref core
+/// @file glm/detail/func_trigonometric.inl
+/// @date 2008-08-03 / 2011-06-15
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////
+
+#include "_vectorize.hpp"
+#include <cmath>
+#include <limits>
+
+namespace glm
+{
+       // radians
+       template <typename genType>
+       GLM_FUNC_QUALIFIER genType radians(genType degrees)
+       {
+               GLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, "'radians' only accept floating-point input");
+
+               return degrees * static_cast<genType>(0.01745329251994329576923690768489);
+       }
+
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_QUALIFIER vecType<T, P> radians(vecType<T, P> const & v)
+       {
+               return detail::functor1<T, T, P, vecType>::call(radians, v);
+       }
+       
+       // degrees
+       template <typename genType>
+       GLM_FUNC_QUALIFIER genType degrees(genType radians)
+       {
+               GLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, "'degrees' only accept floating-point input");
+
+               return radians * static_cast<genType>(57.295779513082320876798154814105);
+       }
+
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_QUALIFIER vecType<T, P> degrees(vecType<T, P> const & v)
+       {
+               return detail::functor1<T, T, P, vecType>::call(degrees, v);
+       }
+
+       // sin
+       using ::std::sin;
+
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_QUALIFIER vecType<T, P> sin(vecType<T, P> const & v)
+       {
+               return detail::functor1<T, T, P, vecType>::call(sin, v);
+       }
+
+       // cos
+       using std::cos;
+
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_QUALIFIER vecType<T, P> cos(vecType<T, P> const & v)
+       {
+               return detail::functor1<T, T, P, vecType>::call(cos, v);
+       }
+
+       // tan
+       using std::tan;
+
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_QUALIFIER vecType<T, P> tan(vecType<T, P> const & v)
+       {
+               return detail::functor1<T, T, P, vecType>::call(tan, v);
+       }
+
+       // asin
+       using std::asin;
+
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_QUALIFIER vecType<T, P> asin(vecType<T, P> const & v)
+       {
+               return detail::functor1<T, T, P, vecType>::call(asin, v);
+       }
+
+       // acos
+       using std::acos;
+
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_QUALIFIER vecType<T, P> acos(vecType<T, P> const & v)
+       {
+               return detail::functor1<T, T, P, vecType>::call(acos, v);
+       }
+
+       // atan
+       template <typename genType>
+       GLM_FUNC_QUALIFIER genType atan(genType const & y, genType const & x)
+       {
+               GLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, "'atan' only accept floating-point input");
+
+               return ::std::atan2(y, x);
+       }
+
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_QUALIFIER vecType<T, P> atan(vecType<T, P> const & a, vecType<T, P> const & b)
+       {
+               return detail::functor2<T, P, vecType>::call(atan2, a, b);
+       }
+
+       using std::atan;
+
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_QUALIFIER vecType<T, P> atan(vecType<T, P> const & v)
+       {
+               return detail::functor1<T, T, P, vecType>::call(atan, v);
+       }
+
+       // sinh
+       using std::sinh;
+
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_QUALIFIER vecType<T, P> sinh(vecType<T, P> const & v)
+       {
+               return detail::functor1<T, T, P, vecType>::call(sinh, v);
+       }
+
+       // cosh
+       using std::cosh;
+
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_QUALIFIER vecType<T, P> cosh(vecType<T, P> const & v)
+       {
+               return detail::functor1<T, T, P, vecType>::call(cosh, v);
+       }
+
+       // tanh
+       using std::tanh;
+
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_QUALIFIER vecType<T, P> tanh(vecType<T, P> const & v)
+       {
+               return detail::functor1<T, T, P, vecType>::call(tanh, v);
+       }
+
+       // asinh
+#      if GLM_HAS_CXX11_STL
+               using std::asinh;
+#      else
+               template <typename genType> 
+               GLM_FUNC_QUALIFIER genType asinh(genType const & x)
+               {
+                       GLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, "'asinh' only accept floating-point input");
+
+                       return (x < static_cast<genType>(0) ? static_cast<genType>(-1) : (x > static_cast<genType>(0) ? static_cast<genType>(1) : static_cast<genType>(0))) * log(abs(x) + sqrt(static_cast<genType>(1) + x * x));
+               }
+#      endif
+
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_QUALIFIER vecType<T, P> asinh(vecType<T, P> const & v)
+       {
+               return detail::functor1<T, T, P, vecType>::call(asinh, v);
+       }
+
+       // acosh
+#      if GLM_HAS_CXX11_STL
+               using std::acosh;
+#      else
+               template <typename genType> 
+               GLM_FUNC_QUALIFIER genType acosh(genType const & x)
+               {
+                       GLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, "'acosh' only accept floating-point input");
+
+                       if(x < static_cast<genType>(1))
+                               return static_cast<genType>(0);
+                       return log(x + sqrt(x * x - static_cast<genType>(1)));
+               }
+#      endif
+
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_QUALIFIER vecType<T, P> acosh(vecType<T, P> const & v)
+       {
+               return detail::functor1<T, T, P, vecType>::call(acosh, v);
+       }
+
+       // atanh
+#      if GLM_HAS_CXX11_STL
+               using std::atanh;
+#      else
+               template <typename genType>
+               GLM_FUNC_QUALIFIER genType atanh(genType const & x)
+               {
+                       GLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, "'atanh' only accept floating-point input");
+               
+                       if(abs(x) >= static_cast<genType>(1))
+                               return 0;
+                       return static_cast<genType>(0.5) * log((static_cast<genType>(1) + x) / (static_cast<genType>(1) - x));
+               }
+#      endif
+
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_QUALIFIER vecType<T, P> atanh(vecType<T, P> const & v)
+       {
+               return detail::functor1<T, T, P, vecType>::call(atanh, v);
+       }
+}//namespace glm
diff --git a/include/glm/detail/func_vector_relational.hpp b/include/glm/detail/func_vector_relational.hpp
new file mode 100644 (file)
index 0000000..9252fcd
--- /dev/null
@@ -0,0 +1,140 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref core
+/// @file glm/detail/func_vector_relational.hpp
+/// @date 2008-08-03 / 2011-06-15
+/// @author Christophe Riccio
+///
+/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.7 Vector Relational Functions</a>
+/// 
+/// @defgroup core_func_vector_relational Vector Relational Functions
+/// @ingroup core
+/// 
+/// Relational and equality operators (<, <=, >, >=, ==, !=) are defined to 
+/// operate on scalars and produce scalar Boolean results. For vector results, 
+/// use the following built-in functions. 
+/// 
+/// In all cases, the sizes of all the input and return vectors for any particular 
+/// call must match.
+///////////////////////////////////////////////////////////////////////////////////
+
+#pragma once
+
+#include "precision.hpp"
+#include "setup.hpp"
+
+namespace glm
+{
+       /// @addtogroup core_func_vector_relational
+       /// @{
+
+       /// Returns the component-wise comparison result of x < y.
+       /// 
+       /// @tparam vecType Floating-point or integer vector types.
+       ///
+       /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/lessThan.xml">GLSL lessThan man page</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.7 Vector Relational Functions</a>
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_DECL vecType<bool, P> lessThan(vecType<T, P> const & x, vecType<T, P> const & y);
+
+       /// Returns the component-wise comparison of result x <= y.
+       ///
+       /// @tparam vecType Floating-point or integer vector types.
+       ///
+       /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/lessThanEqual.xml">GLSL lessThanEqual man page</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.7 Vector Relational Functions</a>
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_DECL vecType<bool, P> lessThanEqual(vecType<T, P> const & x, vecType<T, P> const & y);
+
+       /// Returns the component-wise comparison of result x > y.
+       ///
+       /// @tparam vecType Floating-point or integer vector types.
+       /// 
+       /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/greaterThan.xml">GLSL greaterThan man page</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.7 Vector Relational Functions</a>
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_DECL vecType<bool, P> greaterThan(vecType<T, P> const & x, vecType<T, P> const & y);
+
+       /// Returns the component-wise comparison of result x >= y.
+       ///
+       /// @tparam vecType Floating-point or integer vector types.
+       /// 
+       /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/greaterThanEqual.xml">GLSL greaterThanEqual man page</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.7 Vector Relational Functions</a>
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_DECL vecType<bool, P> greaterThanEqual(vecType<T, P> const & x, vecType<T, P> const & y);
+
+       /// Returns the component-wise comparison of result x == y.
+       ///
+       /// @tparam vecType Floating-point, integer or boolean vector types.
+       /// 
+       /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/equal.xml">GLSL equal man page</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.7 Vector Relational Functions</a>
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_DECL vecType<bool, P> equal(vecType<T, P> const & x, vecType<T, P> const & y);
+
+       /// Returns the component-wise comparison of result x != y.
+       /// 
+       /// @tparam vecType Floating-point, integer or boolean vector types.
+       ///
+       /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/notEqual.xml">GLSL notEqual man page</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.7 Vector Relational Functions</a>
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_DECL vecType<bool, P> notEqual(vecType<T, P> const & x, vecType<T, P> const & y);
+
+       /// Returns true if any component of x is true.
+       ///
+       /// @tparam vecType Boolean vector types.
+       /// 
+       /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/any.xml">GLSL any man page</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.7 Vector Relational Functions</a>
+       template <precision P, template <typename, precision> class vecType>
+       GLM_FUNC_DECL bool any(vecType<bool, P> const & v);
+
+       /// Returns true if all components of x are true.
+       ///
+       /// @tparam vecType Boolean vector types.
+       ///
+       /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/all.xml">GLSL all man page</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.7 Vector Relational Functions</a>
+       template <precision P, template <typename, precision> class vecType>
+       GLM_FUNC_DECL bool all(vecType<bool, P> const & v);
+
+       /// Returns the component-wise logical complement of x.
+       /// /!\ Because of language incompatibilities between C++ and GLSL, GLM defines the function not but not_ instead.
+       ///
+       /// @tparam vecType Boolean vector types.
+       ///
+       /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/not.xml">GLSL not man page</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.7 Vector Relational Functions</a>
+       template <precision P, template <typename, precision> class vecType>
+       GLM_FUNC_DECL vecType<bool, P> not_(vecType<bool, P> const & v);
+
+       /// @}
+}//namespace glm
+
+#include "func_vector_relational.inl"
diff --git a/include/glm/detail/func_vector_relational.inl b/include/glm/detail/func_vector_relational.inl
new file mode 100644 (file)
index 0000000..72106d6
--- /dev/null
@@ -0,0 +1,131 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref core
+/// @file glm/detail/func_vector_relational.inl
+/// @date 2008-08-03 / 2011-09-09
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////
+
+#include <limits>
+
+namespace glm
+{
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_QUALIFIER vecType<bool, P> lessThan(vecType<T, P> const & x, vecType<T, P> const & y)
+       {
+               assert(detail::component_count(x) == detail::component_count(y));
+
+               vecType<bool, P> Result(uninitialize);
+               for(detail::component_count_t i = 0; i < detail::component_count(x); ++i)
+                       Result[i] = x[i] < y[i];
+
+               return Result;
+       }
+
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_QUALIFIER vecType<bool, P> lessThanEqual(vecType<T, P> const & x, vecType<T, P> const & y)
+       {
+               assert(detail::component_count(x) == detail::component_count(y));
+
+               vecType<bool, P> Result(uninitialize);
+               for(detail::component_count_t i = 0; i < detail::component_count(x); ++i)
+                       Result[i] = x[i] <= y[i];
+               return Result;
+       }
+
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_QUALIFIER vecType<bool, P> greaterThan(vecType<T, P> const & x, vecType<T, P> const & y)
+       {
+               assert(detail::component_count(x) == detail::component_count(y));
+
+               vecType<bool, P> Result(uninitialize);
+               for(detail::component_count_t i = 0; i < detail::component_count(x); ++i)
+                       Result[i] = x[i] > y[i];
+               return Result;
+       }
+
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_QUALIFIER vecType<bool, P> greaterThanEqual(vecType<T, P> const & x, vecType<T, P> const & y)
+       {
+               assert(detail::component_count(x) == detail::component_count(y));
+
+               vecType<bool, P> Result(uninitialize);
+               for(detail::component_count_t i = 0; i < detail::component_count(x); ++i)
+                       Result[i] = x[i] >= y[i];
+               return Result;
+       }
+
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_QUALIFIER vecType<bool, P> equal(vecType<T, P> const & x, vecType<T, P> const & y)
+       {
+               assert(detail::component_count(x) == detail::component_count(y));
+
+               vecType<bool, P> Result(uninitialize);
+               for(detail::component_count_t i = 0; i < detail::component_count(x); ++i)
+                       Result[i] = x[i] == y[i];
+               return Result;
+       }
+
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_QUALIFIER vecType<bool, P> notEqual(vecType<T, P> const & x, vecType<T, P> const & y)
+       {
+               assert(detail::component_count(x) == detail::component_count(y));
+
+               vecType<bool, P> Result(uninitialize);
+               for(detail::component_count_t i = 0; i < detail::component_count(x); ++i)
+                       Result[i] = x[i] != y[i];
+               return Result;
+       }
+
+       template <precision P, template <typename, precision> class vecType>
+       GLM_FUNC_QUALIFIER bool any(vecType<bool, P> const & v)
+       {
+               bool Result = false;
+               for(detail::component_count_t i = 0; i < detail::component_count(v); ++i)
+                       Result = Result || v[i];
+               return Result;
+       }
+
+       template <precision P, template <typename, precision> class vecType>
+       GLM_FUNC_QUALIFIER bool all(vecType<bool, P> const & v)
+       {
+               bool Result = true;
+               for(detail::component_count_t i = 0; i < detail::component_count(v); ++i)
+                       Result = Result && v[i];
+               return Result;
+       }
+
+       template <precision P, template <typename, precision> class vecType>
+       GLM_FUNC_QUALIFIER vecType<bool, P> not_(vecType<bool, P> const & v)
+       {
+               vecType<bool, P> Result(uninitialize);
+               for(detail::component_count_t i = 0; i < detail::component_count(v); ++i)
+                       Result[i] = !v[i];
+               return Result;
+       }
+}//namespace glm
+
diff --git a/include/glm/detail/glm.cpp b/include/glm/detail/glm.cpp
new file mode 100644 (file)
index 0000000..d48b47c
--- /dev/null
@@ -0,0 +1,286 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref core
+/// @file glm/glm.cpp
+/// @date 2013-04-22 / 2013-04-22
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////
+
+#include <glm/glm.hpp>
+#include <glm/gtc/quaternion.hpp>
+#include <glm/gtx/dual_quaternion.hpp>
+
+namespace glm
+{
+// tvec1 type explicit instantiation
+template struct tvec1<uint8, lowp>;
+template struct tvec1<uint16, lowp>;
+template struct tvec1<uint32, lowp>;
+template struct tvec1<uint64, lowp>;
+template struct tvec1<int8, lowp>;
+template struct tvec1<int16, lowp>;
+template struct tvec1<int32, lowp>;
+template struct tvec1<int64, lowp>;
+template struct tvec1<float32, lowp>;
+template struct tvec1<float64, lowp>;
+
+template struct tvec1<uint8, mediump>;
+template struct tvec1<uint16, mediump>;
+template struct tvec1<uint32, mediump>;
+template struct tvec1<uint64, mediump>;
+template struct tvec1<int8, mediump>;
+template struct tvec1<int16, mediump>;
+template struct tvec1<int32, mediump>;
+template struct tvec1<int64, mediump>;
+template struct tvec1<float32, mediump>;
+template struct tvec1<float64, mediump>;
+
+template struct tvec1<uint8, highp>;
+template struct tvec1<uint16, highp>;
+template struct tvec1<uint32, highp>;
+template struct tvec1<uint64, highp>;
+template struct tvec1<int8, highp>;
+template struct tvec1<int16, highp>;
+template struct tvec1<int32, highp>;
+template struct tvec1<int64, highp>;
+template struct tvec1<float32, highp>;
+template struct tvec1<float64, highp>;
+
+// tvec2 type explicit instantiation
+template struct tvec2<uint8, lowp>;
+template struct tvec2<uint16, lowp>;
+template struct tvec2<uint32, lowp>;
+template struct tvec2<uint64, lowp>;
+template struct tvec2<int8, lowp>;
+template struct tvec2<int16, lowp>;
+template struct tvec2<int32, lowp>;
+template struct tvec2<int64, lowp>;
+template struct tvec2<float32, lowp>;
+template struct tvec2<float64, lowp>;
+
+template struct tvec2<uint8, mediump>;
+template struct tvec2<uint16, mediump>;
+template struct tvec2<uint32, mediump>;
+template struct tvec2<uint64, mediump>;
+template struct tvec2<int8, mediump>;
+template struct tvec2<int16, mediump>;
+template struct tvec2<int32, mediump>;
+template struct tvec2<int64, mediump>;
+template struct tvec2<float32, mediump>;
+template struct tvec2<float64, mediump>;
+
+template struct tvec2<uint8, highp>;
+template struct tvec2<uint16, highp>;
+template struct tvec2<uint32, highp>;
+template struct tvec2<uint64, highp>;
+template struct tvec2<int8, highp>;
+template struct tvec2<int16, highp>;
+template struct tvec2<int32, highp>;
+template struct tvec2<int64, highp>;
+template struct tvec2<float32, highp>;
+template struct tvec2<float64, highp>;
+
+// tvec3 type explicit instantiation
+template struct tvec3<uint8, lowp>;
+template struct tvec3<uint16, lowp>;
+template struct tvec3<uint32, lowp>;
+template struct tvec3<uint64, lowp>;
+template struct tvec3<int8, lowp>;
+template struct tvec3<int16, lowp>;
+template struct tvec3<int32, lowp>;
+template struct tvec3<int64, lowp>;
+template struct tvec3<float32, lowp>;
+template struct tvec3<float64, lowp>;
+
+template struct tvec3<uint8, mediump>;
+template struct tvec3<uint16, mediump>;
+template struct tvec3<uint32, mediump>;
+template struct tvec3<uint64, mediump>;
+template struct tvec3<int8, mediump>;
+template struct tvec3<int16, mediump>;
+template struct tvec3<int32, mediump>;
+template struct tvec3<int64, mediump>;
+template struct tvec3<float32, mediump>;
+template struct tvec3<float64, mediump>;
+
+template struct tvec3<uint8, highp>;
+template struct tvec3<uint16, highp>;
+template struct tvec3<uint32, highp>;
+template struct tvec3<uint64, highp>;
+template struct tvec3<int8, highp>;
+template struct tvec3<int16, highp>;
+template struct tvec3<int32, highp>;
+template struct tvec3<int64, highp>;
+template struct tvec3<float32, highp>;
+template struct tvec3<float64, highp>;
+
+// tvec4 type explicit instantiation
+template struct tvec4<uint8, lowp>;
+template struct tvec4<uint16, lowp>;
+template struct tvec4<uint32, lowp>;
+template struct tvec4<uint64, lowp>;
+template struct tvec4<int8, lowp>;
+template struct tvec4<int16, lowp>;
+template struct tvec4<int32, lowp>;
+template struct tvec4<int64, lowp>;
+template struct tvec4<float32, lowp>;
+template struct tvec4<float64, lowp>;
+
+template struct tvec4<uint8, mediump>;
+template struct tvec4<uint16, mediump>;
+template struct tvec4<uint32, mediump>;
+template struct tvec4<uint64, mediump>;
+template struct tvec4<int8, mediump>;
+template struct tvec4<int16, mediump>;
+template struct tvec4<int32, mediump>;
+template struct tvec4<int64, mediump>;
+template struct tvec4<float32, mediump>;
+template struct tvec4<float64, mediump>;
+
+template struct tvec4<uint8, highp>;
+template struct tvec4<uint16, highp>;
+template struct tvec4<uint32, highp>;
+template struct tvec4<uint64, highp>;
+template struct tvec4<int8, highp>;
+template struct tvec4<int16, highp>;
+template struct tvec4<int32, highp>;
+template struct tvec4<int64, highp>;
+template struct tvec4<float32, highp>;
+template struct tvec4<float64, highp>;
+
+// tmat2x2 type explicit instantiation
+template struct tmat2x2<float32, lowp>;
+template struct tmat2x2<float64, lowp>;
+
+template struct tmat2x2<float32, mediump>;
+template struct tmat2x2<float64, mediump>;
+
+template struct tmat2x2<float32, highp>;
+template struct tmat2x2<float64, highp>;
+
+// tmat2x3 type explicit instantiation
+template struct tmat2x3<float32, lowp>;
+template struct tmat2x3<float64, lowp>;
+
+template struct tmat2x3<float32, mediump>;
+template struct tmat2x3<float64, mediump>;
+
+template struct tmat2x3<float32, highp>;
+template struct tmat2x3<float64, highp>;
+
+// tmat2x4 type explicit instantiation
+template struct tmat2x4<float32, lowp>;
+template struct tmat2x4<float64, lowp>;
+
+template struct tmat2x4<float32, mediump>;
+template struct tmat2x4<float64, mediump>;
+
+template struct tmat2x4<float32, highp>;
+template struct tmat2x4<float64, highp>;
+
+// tmat3x2 type explicit instantiation
+template struct tmat3x2<float32, lowp>;
+template struct tmat3x2<float64, lowp>;
+
+template struct tmat3x2<float32, mediump>;
+template struct tmat3x2<float64, mediump>;
+
+template struct tmat3x2<float32, highp>;
+template struct tmat3x2<float64, highp>;
+
+// tmat3x3 type explicit instantiation
+template struct tmat3x3<float32, lowp>;
+template struct tmat3x3<float64, lowp>;
+
+template struct tmat3x3<float32, mediump>;
+template struct tmat3x3<float64, mediump>;
+
+template struct tmat3x3<float32, highp>;
+template struct tmat3x3<float64, highp>;
+
+// tmat3x4 type explicit instantiation
+template struct tmat3x4<float32, lowp>;
+template struct tmat3x4<float64, lowp>;
+
+template struct tmat3x4<float32, mediump>;
+template struct tmat3x4<float64, mediump>;
+
+template struct tmat3x4<float32, highp>;
+template struct tmat3x4<float64, highp>;
+
+// tmat4x2 type explicit instantiation
+template struct tmat4x2<float32, lowp>;
+template struct tmat4x2<float64, lowp>;
+
+template struct tmat4x2<float32, mediump>;
+template struct tmat4x2<float64, mediump>;
+
+template struct tmat4x2<float32, highp>;
+template struct tmat4x2<float64, highp>;
+
+// tmat4x3 type explicit instantiation
+template struct tmat4x3<float32, lowp>;
+template struct tmat4x3<float64, lowp>;
+
+template struct tmat4x3<float32, mediump>;
+template struct tmat4x3<float64, mediump>;
+
+template struct tmat4x3<float32, highp>;
+template struct tmat4x3<float64, highp>;
+
+// tmat4x4 type explicit instantiation
+template struct tmat4x4<float32, lowp>;
+template struct tmat4x4<float64, lowp>;
+
+template struct tmat4x4<float32, mediump>;
+template struct tmat4x4<float64, mediump>;
+
+template struct tmat4x4<float32, highp>;
+template struct tmat4x4<float64, highp>;
+
+// tquat type explicit instantiation
+template struct tquat<float32, lowp>;
+template struct tquat<float64, lowp>;
+
+template struct tquat<float32, mediump>;
+template struct tquat<float64, mediump>;
+
+template struct tquat<float32, highp>;
+template struct tquat<float64, highp>;
+
+//tdualquat type explicit instantiation
+template struct tdualquat<float32, lowp>;
+template struct tdualquat<float64, lowp>;
+
+template struct tdualquat<float32, mediump>;
+template struct tdualquat<float64, mediump>;
+
+template struct tdualquat<float32, highp>;
+template struct tdualquat<float64, highp>;
+
+}//namespace glm
+
diff --git a/include/glm/detail/intrinsic_common.hpp b/include/glm/detail/intrinsic_common.hpp
new file mode 100644 (file)
index 0000000..8cb1a1c
--- /dev/null
@@ -0,0 +1,87 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref core
+/// @file glm/detail/intrinsic_common.hpp
+/// @date 2009-05-11 / 2011-06-15
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////
+
+#pragma once
+
+#include "setup.hpp"
+
+#if(!(GLM_ARCH & GLM_ARCH_SSE2))
+#      error "SSE2 instructions not supported or enabled"
+#else
+
+namespace glm{
+namespace detail
+{
+       __m128 sse_abs_ps(__m128 x);
+
+       __m128 sse_sgn_ps(__m128 x);
+
+       //floor
+       __m128 sse_flr_ps(__m128 v);
+
+       //trunc
+       __m128 sse_trc_ps(__m128 v);
+
+       //round
+       __m128 sse_nd_ps(__m128 v);
+
+       //roundEven
+       __m128 sse_rde_ps(__m128 v);
+
+       __m128 sse_rnd_ps(__m128 x);
+
+       __m128 sse_ceil_ps(__m128 v);
+
+       __m128 sse_frc_ps(__m128 x);
+
+       __m128 sse_mod_ps(__m128 x, __m128 y);
+
+       __m128 sse_modf_ps(__m128 x, __m128i & i);
+
+       //GLM_FUNC_QUALIFIER __m128 sse_min_ps(__m128 x, __m128 y)
+
+       //GLM_FUNC_QUALIFIER __m128 sse_max_ps(__m128 x, __m128 y)
+
+       __m128 sse_clp_ps(__m128 v, __m128 minVal, __m128 maxVal);
+
+       __m128 sse_mix_ps(__m128 v1, __m128 v2, __m128 a);
+
+       __m128 sse_stp_ps(__m128 edge, __m128 x);
+
+       __m128 sse_ssp_ps(__m128 edge0, __m128 edge1, __m128 x);
+
+       __m128 sse_nan_ps(__m128 x);
+
+       __m128 sse_inf_ps(__m128 x);
+
+}//namespace detail
+}//namespace glm
+
+#include "intrinsic_common.inl"
+
+#endif//GLM_ARCH
diff --git a/include/glm/detail/intrinsic_common.inl b/include/glm/detail/intrinsic_common.inl
new file mode 100644 (file)
index 0000000..bd9774b
--- /dev/null
@@ -0,0 +1,313 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref core
+/// @file glm/detail/intrinsic_common.inl
+/// @date 2009-05-08 / 2011-06-15
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////
+
+namespace glm{
+namespace detail{
+
+#if(GLM_COMPILER & GLM_COMPILER_VC)
+#pragma warning(push)
+#pragma warning(disable : 4510 4512 4610)
+#endif
+
+       union ieee754_QNAN
+       {
+               const float f;
+               struct i
+               {
+                       const unsigned int mantissa:23, exp:8, sign:1;
+               };
+
+               ieee754_QNAN() : f(0.0)/*, mantissa(0x7FFFFF), exp(0xFF), sign(0x0)*/ {}
+       };
+
+#if(GLM_COMPILER & GLM_COMPILER_VC)
+#pragma warning(pop)
+#endif
+
+       static const __m128 GLM_VAR_USED zero = _mm_setzero_ps();
+       static const __m128 GLM_VAR_USED one = _mm_set_ps1(1.0f);
+       static const __m128 GLM_VAR_USED minus_one = _mm_set_ps1(-1.0f);
+       static const __m128 GLM_VAR_USED two = _mm_set_ps1(2.0f);
+       static const __m128 GLM_VAR_USED three = _mm_set_ps1(3.0f);
+       static const __m128 GLM_VAR_USED pi = _mm_set_ps1(3.1415926535897932384626433832795f);
+       static const __m128 GLM_VAR_USED hundred_eighty = _mm_set_ps1(180.f);
+       static const __m128 GLM_VAR_USED pi_over_hundred_eighty = _mm_set_ps1(0.017453292519943295769236907684886f);
+       static const __m128 GLM_VAR_USED hundred_eighty_over_pi = _mm_set_ps1(57.295779513082320876798154814105f);
+
+       static const ieee754_QNAN absMask;
+       static const __m128 GLM_VAR_USED abs4Mask = _mm_set_ps1(absMask.f);
+
+       static const __m128 GLM_VAR_USED _epi32_sign_mask = _mm_castsi128_ps(_mm_set1_epi32(static_cast<int>(0x80000000)));
+       //static const __m128 GLM_VAR_USED _epi32_inv_sign_mask = _mm_castsi128_ps(_mm_set1_epi32(0x7FFFFFFF));
+       //static const __m128 GLM_VAR_USED _epi32_mant_mask = _mm_castsi128_ps(_mm_set1_epi32(0x7F800000));
+       //static const __m128 GLM_VAR_USED _epi32_inv_mant_mask = _mm_castsi128_ps(_mm_set1_epi32(0x807FFFFF));
+       //static const __m128 GLM_VAR_USED _epi32_min_norm_pos = _mm_castsi128_ps(_mm_set1_epi32(0x00800000));
+       static const __m128 GLM_VAR_USED _epi32_0 = _mm_set_ps1(0);
+       static const __m128 GLM_VAR_USED _epi32_1 = _mm_set_ps1(1);
+       static const __m128 GLM_VAR_USED _epi32_2 = _mm_set_ps1(2);
+       static const __m128 GLM_VAR_USED _epi32_3 = _mm_set_ps1(3);
+       static const __m128 GLM_VAR_USED _epi32_4 = _mm_set_ps1(4);
+       static const __m128 GLM_VAR_USED _epi32_5 = _mm_set_ps1(5);
+       static const __m128 GLM_VAR_USED _epi32_6 = _mm_set_ps1(6);
+       static const __m128 GLM_VAR_USED _epi32_7 = _mm_set_ps1(7);
+       static const __m128 GLM_VAR_USED _epi32_8 = _mm_set_ps1(8);
+       static const __m128 GLM_VAR_USED _epi32_9 = _mm_set_ps1(9);
+       static const __m128 GLM_VAR_USED _epi32_127 = _mm_set_ps1(127);
+       //static const __m128 GLM_VAR_USED _epi32_ninf = _mm_castsi128_ps(_mm_set1_epi32(0xFF800000));
+       //static const __m128 GLM_VAR_USED _epi32_pinf = _mm_castsi128_ps(_mm_set1_epi32(0x7F800000));
+
+       static const __m128 GLM_VAR_USED _ps_1_3 = _mm_set_ps1(0.33333333333333333333333333333333f);
+       static const __m128 GLM_VAR_USED _ps_0p5 = _mm_set_ps1(0.5f);
+       static const __m128 GLM_VAR_USED _ps_1 = _mm_set_ps1(1.0f);
+       static const __m128 GLM_VAR_USED _ps_m1 = _mm_set_ps1(-1.0f);
+       static const __m128 GLM_VAR_USED _ps_2 = _mm_set_ps1(2.0f);
+       static const __m128 GLM_VAR_USED _ps_3 = _mm_set_ps1(3.0f);
+       static const __m128 GLM_VAR_USED _ps_127 = _mm_set_ps1(127.0f);
+       static const __m128 GLM_VAR_USED _ps_255 = _mm_set_ps1(255.0f);
+       static const __m128 GLM_VAR_USED _ps_2pow23 = _mm_set_ps1(8388608.0f);
+
+       static const __m128 GLM_VAR_USED _ps_1_0_0_0 = _mm_set_ps(1.0f, 0.0f, 0.0f, 0.0f);
+       static const __m128 GLM_VAR_USED _ps_0_1_0_0 = _mm_set_ps(0.0f, 1.0f, 0.0f, 0.0f);
+       static const __m128 GLM_VAR_USED _ps_0_0_1_0 = _mm_set_ps(0.0f, 0.0f, 1.0f, 0.0f);
+       static const __m128 GLM_VAR_USED _ps_0_0_0_1 = _mm_set_ps(0.0f, 0.0f, 0.0f, 1.0f);
+
+       static const __m128 GLM_VAR_USED _ps_pi = _mm_set_ps1(3.1415926535897932384626433832795f);
+       static const __m128 GLM_VAR_USED _ps_pi2 = _mm_set_ps1(6.283185307179586476925286766560f);
+       static const __m128 GLM_VAR_USED _ps_2_pi = _mm_set_ps1(0.63661977236758134307553505349006f);
+       static const __m128 GLM_VAR_USED _ps_pi_2 = _mm_set_ps1(1.5707963267948966192313216916398f);
+       static const __m128 GLM_VAR_USED _ps_4_pi = _mm_set_ps1(1.2732395447351626861510701069801f);
+       static const __m128 GLM_VAR_USED _ps_pi_4 = _mm_set_ps1(0.78539816339744830961566084581988f);
+
+       static const __m128 GLM_VAR_USED _ps_sincos_p0 = _mm_set_ps1(0.15707963267948963959e1f);
+       static const __m128 GLM_VAR_USED _ps_sincos_p1 = _mm_set_ps1(-0.64596409750621907082e0f);
+       static const __m128 GLM_VAR_USED _ps_sincos_p2 = _mm_set_ps1(0.7969262624561800806e-1f);
+       static const __m128 GLM_VAR_USED _ps_sincos_p3 = _mm_set_ps1(-0.468175413106023168e-2f);
+       static const __m128 GLM_VAR_USED _ps_tan_p0 = _mm_set_ps1(-1.79565251976484877988e7f);
+       static const __m128 GLM_VAR_USED _ps_tan_p1 = _mm_set_ps1(1.15351664838587416140e6f);
+       static const __m128 GLM_VAR_USED _ps_tan_p2 = _mm_set_ps1(-1.30936939181383777646e4f);
+       static const __m128 GLM_VAR_USED _ps_tan_q0 = _mm_set_ps1(-5.38695755929454629881e7f);
+       static const __m128 GLM_VAR_USED _ps_tan_q1 = _mm_set_ps1(2.50083801823357915839e7f);
+       static const __m128 GLM_VAR_USED _ps_tan_q2 = _mm_set_ps1(-1.32089234440210967447e6f);
+       static const __m128 GLM_VAR_USED _ps_tan_q3 = _mm_set_ps1(1.36812963470692954678e4f);
+       static const __m128 GLM_VAR_USED _ps_tan_poleval = _mm_set_ps1(3.68935e19f);
+       static const __m128 GLM_VAR_USED _ps_atan_t0 = _mm_set_ps1(-0.91646118527267623468e-1f);
+       static const __m128 GLM_VAR_USED _ps_atan_t1 = _mm_set_ps1(-0.13956945682312098640e1f);
+       static const __m128 GLM_VAR_USED _ps_atan_t2 = _mm_set_ps1(-0.94393926122725531747e2f);
+       static const __m128 GLM_VAR_USED _ps_atan_t3 = _mm_set_ps1(0.12888383034157279340e2f);
+       static const __m128 GLM_VAR_USED _ps_atan_s0 = _mm_set_ps1(0.12797564625607904396e1f);
+       static const __m128 GLM_VAR_USED _ps_atan_s1 = _mm_set_ps1(0.21972168858277355914e1f);
+       static const __m128 GLM_VAR_USED _ps_atan_s2 = _mm_set_ps1(0.68193064729268275701e1f);
+       static const __m128 GLM_VAR_USED _ps_atan_s3 = _mm_set_ps1(0.28205206687035841409e2f);
+
+       static const __m128 GLM_VAR_USED _ps_exp_hi = _mm_set_ps1(88.3762626647949f);
+       static const __m128 GLM_VAR_USED _ps_exp_lo = _mm_set_ps1(-88.3762626647949f);
+       static const __m128 GLM_VAR_USED _ps_exp_rln2 = _mm_set_ps1(1.4426950408889634073599f);
+       static const __m128 GLM_VAR_USED _ps_exp_p0 = _mm_set_ps1(1.26177193074810590878e-4f);
+       static const __m128 GLM_VAR_USED _ps_exp_p1 = _mm_set_ps1(3.02994407707441961300e-2f);
+       static const __m128 GLM_VAR_USED _ps_exp_q0 = _mm_set_ps1(3.00198505138664455042e-6f);
+       static const __m128 GLM_VAR_USED _ps_exp_q1 = _mm_set_ps1(2.52448340349684104192e-3f);
+       static const __m128 GLM_VAR_USED _ps_exp_q2 = _mm_set_ps1(2.27265548208155028766e-1f);
+       static const __m128 GLM_VAR_USED _ps_exp_q3 = _mm_set_ps1(2.00000000000000000009e0f);
+       static const __m128 GLM_VAR_USED _ps_exp_c1 = _mm_set_ps1(6.93145751953125e-1f);
+       static const __m128 GLM_VAR_USED _ps_exp_c2 = _mm_set_ps1(1.42860682030941723212e-6f);
+       static const __m128 GLM_VAR_USED _ps_exp2_hi = _mm_set_ps1(127.4999961853f);
+       static const __m128 GLM_VAR_USED _ps_exp2_lo = _mm_set_ps1(-127.4999961853f);
+       static const __m128 GLM_VAR_USED _ps_exp2_p0 = _mm_set_ps1(2.30933477057345225087e-2f);
+       static const __m128 GLM_VAR_USED _ps_exp2_p1 = _mm_set_ps1(2.02020656693165307700e1f);
+       static const __m128 GLM_VAR_USED _ps_exp2_p2 = _mm_set_ps1(1.51390680115615096133e3f);
+       static const __m128 GLM_VAR_USED _ps_exp2_q0 = _mm_set_ps1(2.33184211722314911771e2f);
+       static const __m128 GLM_VAR_USED _ps_exp2_q1 = _mm_set_ps1(4.36821166879210612817e3f);
+       static const __m128 GLM_VAR_USED _ps_log_p0 = _mm_set_ps1(-7.89580278884799154124e-1f);
+       static const __m128 GLM_VAR_USED _ps_log_p1 = _mm_set_ps1(1.63866645699558079767e1f);
+       static const __m128 GLM_VAR_USED _ps_log_p2 = _mm_set_ps1(-6.41409952958715622951e1f);
+       static const __m128 GLM_VAR_USED _ps_log_q0 = _mm_set_ps1(-3.56722798256324312549e1f);
+       static const __m128 GLM_VAR_USED _ps_log_q1 = _mm_set_ps1(3.12093766372244180303e2f);
+       static const __m128 GLM_VAR_USED _ps_log_q2 = _mm_set_ps1(-7.69691943550460008604e2f);
+       static const __m128 GLM_VAR_USED _ps_log_c0 = _mm_set_ps1(0.693147180559945f);
+       static const __m128 GLM_VAR_USED _ps_log2_c0 = _mm_set_ps1(1.44269504088896340735992f);
+
+GLM_FUNC_QUALIFIER __m128 sse_abs_ps(__m128 x)
+{
+       return _mm_and_ps(glm::detail::abs4Mask, x);
+} 
+
+GLM_FUNC_QUALIFIER __m128 sse_sgn_ps(__m128 x)
+{
+       __m128 Neg = _mm_set1_ps(-1.0f);
+       __m128 Pos = _mm_set1_ps(1.0f);
+
+       __m128 Cmp0 = _mm_cmplt_ps(x, zero);
+       __m128 Cmp1 = _mm_cmpgt_ps(x, zero);
+
+       __m128 And0 = _mm_and_ps(Cmp0, Neg);
+       __m128 And1 = _mm_and_ps(Cmp1, Pos);
+
+       return _mm_or_ps(And0, And1);
+}
+
+//floor
+GLM_FUNC_QUALIFIER __m128 sse_flr_ps(__m128 x)
+{
+       __m128 rnd0 = sse_rnd_ps(x);
+       __m128 cmp0 = _mm_cmplt_ps(x, rnd0);
+       __m128 and0 = _mm_and_ps(cmp0, glm::detail::_ps_1);
+       __m128 sub0 = _mm_sub_ps(rnd0, and0);
+       return sub0;
+}
+
+//trunc
+/*
+GLM_FUNC_QUALIFIER __m128 _mm_trc_ps(__m128 v)
+{
+       return __m128();
+}
+*/
+//round
+GLM_FUNC_QUALIFIER __m128 sse_rnd_ps(__m128 x)
+{
+       __m128 and0 = _mm_and_ps(glm::detail::_epi32_sign_mask, x);
+       __m128 or0 = _mm_or_ps(and0, glm::detail::_ps_2pow23);
+       __m128 add0 = _mm_add_ps(x, or0);
+       __m128 sub0 = _mm_sub_ps(add0, or0);
+       return sub0;
+}
+
+//roundEven
+GLM_FUNC_QUALIFIER __m128 sse_rde_ps(__m128 x)
+{
+       __m128 and0 = _mm_and_ps(glm::detail::_epi32_sign_mask, x);
+       __m128 or0 = _mm_or_ps(and0, glm::detail::_ps_2pow23);
+       __m128 add0 = _mm_add_ps(x, or0);
+       __m128 sub0 = _mm_sub_ps(add0, or0);
+       return sub0;
+}
+
+GLM_FUNC_QUALIFIER __m128 sse_ceil_ps(__m128 x)
+{
+       __m128 rnd0 = sse_rnd_ps(x);
+       __m128 cmp0 = _mm_cmpgt_ps(x, rnd0);
+       __m128 and0 = _mm_and_ps(cmp0, glm::detail::_ps_1);
+       __m128 add0 = _mm_add_ps(rnd0, and0);
+       return add0;
+}
+
+GLM_FUNC_QUALIFIER __m128 sse_frc_ps(__m128 x)
+{
+       __m128 flr0 = sse_flr_ps(x);
+       __m128 sub0 = _mm_sub_ps(x, flr0);
+       return sub0;
+}
+
+GLM_FUNC_QUALIFIER __m128 sse_mod_ps(__m128 x, __m128 y)
+{
+       __m128 div0 = _mm_div_ps(x, y);
+       __m128 flr0 = sse_flr_ps(div0);
+       __m128 mul0 = _mm_mul_ps(y, flr0);
+       __m128 sub0 = _mm_sub_ps(x, mul0);
+       return sub0;
+}
+
+/// TODO
+/*
+GLM_FUNC_QUALIFIER __m128 sse_modf_ps(__m128 x, __m128i & i)
+{
+       __m128 empty;
+       return empty;
+}
+*/
+
+//GLM_FUNC_QUALIFIER __m128 _mm_min_ps(__m128 x, __m128 y)
+
+//GLM_FUNC_QUALIFIER __m128 _mm_max_ps(__m128 x, __m128 y)
+
+GLM_FUNC_QUALIFIER __m128 sse_clp_ps(__m128 v, __m128 minVal, __m128 maxVal)
+{
+       __m128 min0 = _mm_min_ps(v, maxVal);
+       __m128 max0 = _mm_max_ps(min0, minVal);
+       return max0;
+}
+
+GLM_FUNC_QUALIFIER __m128 sse_mix_ps(__m128 v1, __m128 v2, __m128 a)
+{
+       __m128 sub0 = _mm_sub_ps(glm::detail::one, a);
+       __m128 mul0 = _mm_mul_ps(v1, sub0);
+       __m128 mul1 = _mm_mul_ps(v2, a);
+       __m128 add0 = _mm_add_ps(mul0, mul1);
+       return add0;
+}
+
+GLM_FUNC_QUALIFIER __m128 sse_stp_ps(__m128 edge, __m128 x)
+{
+       __m128 cmp = _mm_cmple_ps(x, edge);
+       if(_mm_movemask_ps(cmp) == 0)
+               return glm::detail::one;
+       else
+               return glm::detail::zero;
+}
+
+GLM_FUNC_QUALIFIER __m128 sse_ssp_ps(__m128 edge0, __m128 edge1, __m128 x)
+{
+       __m128 sub0 = _mm_sub_ps(x, edge0);
+       __m128 sub1 = _mm_sub_ps(edge1, edge0);
+       __m128 div0 = _mm_sub_ps(sub0, sub1);
+       __m128 clp0 = sse_clp_ps(div0, glm::detail::zero, glm::detail::one);
+       __m128 mul0 = _mm_mul_ps(glm::detail::two, clp0);
+       __m128 sub2 = _mm_sub_ps(glm::detail::three, mul0);
+       __m128 mul1 = _mm_mul_ps(clp0, clp0);
+       __m128 mul2 = _mm_mul_ps(mul1, sub2);
+       return mul2;
+}
+
+/// \todo
+//GLM_FUNC_QUALIFIER __m128 sse_nan_ps(__m128 x)
+//{
+//     __m128 empty;
+//     return empty;
+//}
+
+/// \todo
+//GLM_FUNC_QUALIFIER __m128 sse_inf_ps(__m128 x)
+//{
+//     __m128 empty;
+//     return empty;
+//}
+
+// SSE scalar reciprocal sqrt using rsqrt op, plus one Newton-Rhaphson iteration
+// By Elan Ruskin, http://assemblyrequired.crashworks.org/
+GLM_FUNC_QUALIFIER __m128 sse_sqrt_wip_ss(__m128 const & x)
+{
+       __m128 const recip = _mm_rsqrt_ss(x);  // "estimate" opcode
+       __m128 const half = _mm_set_ps1(0.5f);
+       __m128 const halfrecip = _mm_mul_ss(half, recip);
+       __m128 const threeminus_xrr = _mm_sub_ss(three, _mm_mul_ss(x, _mm_mul_ss (recip, recip)));
+       return _mm_mul_ss(halfrecip, threeminus_xrr);
+}
+
+}//namespace detail
+}//namespace glms
+
diff --git a/include/glm/detail/intrinsic_exponential.hpp b/include/glm/detail/intrinsic_exponential.hpp
new file mode 100644 (file)
index 0000000..96d0129
--- /dev/null
@@ -0,0 +1,77 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref core
+/// @file glm/detail/intrinsic_exponential.hpp
+/// @date 2009-05-11 / 2011-06-15
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////
+
+#pragma once
+
+#include "setup.hpp"
+
+#if(!(GLM_ARCH & GLM_ARCH_SSE2))
+#      error "SSE2 instructions not supported or enabled"
+#else
+
+namespace glm{
+namespace detail
+{
+/*
+GLM_FUNC_QUALIFIER __m128 sse_rsqrt_nr_ss(__m128 const x)
+{
+       __m128 recip = _mm_rsqrt_ss( x );  // "estimate" opcode
+       const static __m128 three = { 3, 3, 3, 3 }; // aligned consts for fast load
+       const static __m128 half = { 0.5,0.5,0.5,0.5 };
+       __m128 halfrecip = _mm_mul_ss( half, recip );
+       __m128 threeminus_xrr = _mm_sub_ss( three, _mm_mul_ss( x, _mm_mul_ss ( recip, recip ) ) );
+       return _mm_mul_ss( halfrecip, threeminus_xrr );
+}
+GLM_FUNC_QUALIFIER __m128 sse_normalize_fast_ps(  float * RESTRICT vOut, float * RESTRICT vIn )
+{
+        __m128 x = _mm_load_ss(&vIn[0]);
+        __m128 y = _mm_load_ss(&vIn[1]);
+        __m128 z = _mm_load_ss(&vIn[2]);
+        const __m128 l =  // compute x*x + y*y + z*z
+                _mm_add_ss(
+                 _mm_add_ss( _mm_mul_ss(x,x),
+                             _mm_mul_ss(y,y)
+                            ),
+                 _mm_mul_ss( z, z )
+                );
+        const __m128 rsqt = _mm_rsqrt_nr_ss( l );
+        _mm_store_ss( &vOut[0] , _mm_mul_ss( rsqt, x ) );
+        _mm_store_ss( &vOut[1] , _mm_mul_ss( rsqt, y ) );
+        _mm_store_ss( &vOut[2] , _mm_mul_ss( rsqt, z ) );
+        return _mm_mul_ss( l , rsqt );
+}
+*/
+}//namespace detail
+}//namespace glm
+
+#endif//GLM_ARCH
diff --git a/include/glm/detail/intrinsic_exponential.inl b/include/glm/detail/intrinsic_exponential.inl
new file mode 100644 (file)
index 0000000..9dba23c
--- /dev/null
@@ -0,0 +1,27 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref core
+/// @file glm/detail/intrinsic_exponential.inl
+/// @date 2011-06-15 / 2011-06-15
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////
diff --git a/include/glm/detail/intrinsic_geometric.hpp b/include/glm/detail/intrinsic_geometric.hpp
new file mode 100644 (file)
index 0000000..ecfbb03
--- /dev/null
@@ -0,0 +1,74 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref core
+/// @file glm/detail/intrinsic_geometric.hpp
+/// @date 2009-05-08 / 2011-06-15
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////
+
+#pragma once
+
+#include "setup.hpp"
+
+#if(!(GLM_ARCH & GLM_ARCH_SSE2))
+#      error "SSE2 instructions not supported or enabled"
+#else
+
+#include "intrinsic_common.hpp"
+
+namespace glm{
+namespace detail
+{
+       //length
+       __m128 sse_len_ps(__m128 x);
+
+       //distance
+       __m128 sse_dst_ps(__m128 p0, __m128 p1);
+
+       //dot
+       __m128 sse_dot_ps(__m128 v1, __m128 v2);
+
+       // SSE1
+       __m128 sse_dot_ss(__m128 v1, __m128 v2);
+
+       //cross
+       __m128 sse_xpd_ps(__m128 v1, __m128 v2);
+
+       //normalize
+       __m128 sse_nrm_ps(__m128 v);
+
+       //faceforward
+       __m128 sse_ffd_ps(__m128 N, __m128 I, __m128 Nref);
+
+       //reflect
+       __m128 sse_rfe_ps(__m128 I, __m128 N);
+
+       //refract
+       __m128 sse_rfa_ps(__m128 I, __m128 N, __m128 eta);
+
+}//namespace detail
+}//namespace glm
+
+#include "intrinsic_geometric.inl"
+
+#endif//GLM_ARCH
diff --git a/include/glm/detail/intrinsic_geometric.inl b/include/glm/detail/intrinsic_geometric.inl
new file mode 100644 (file)
index 0000000..3a3e4b0
--- /dev/null
@@ -0,0 +1,147 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref core
+/// @file glm/detail/intrinsic_geometric.inl
+/// @date 2009-05-08 / 2011-06-15
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////
+
+namespace glm{
+namespace detail{
+
+//length
+GLM_FUNC_QUALIFIER __m128 sse_len_ps(__m128 x)
+{
+       __m128 dot0 = sse_dot_ps(x, x);
+       __m128 sqt0 = _mm_sqrt_ps(dot0);
+       return sqt0;
+}
+
+//distance
+GLM_FUNC_QUALIFIER __m128 sse_dst_ps(__m128 p0, __m128 p1)
+{
+       __m128 sub0 = _mm_sub_ps(p0, p1);
+       __m128 len0 = sse_len_ps(sub0);
+       return len0;
+}
+
+//dot
+GLM_FUNC_QUALIFIER __m128 sse_dot_ps(__m128 v1, __m128 v2)
+{
+
+#      if(GLM_ARCH & GLM_ARCH_AVX)
+               return _mm_dp_ps(v1, v2, 0xff);
+#      else
+               __m128 mul0 = _mm_mul_ps(v1, v2);
+               __m128 swp0 = _mm_shuffle_ps(mul0, mul0, _MM_SHUFFLE(2, 3, 0, 1));
+               __m128 add0 = _mm_add_ps(mul0, swp0);
+               __m128 swp1 = _mm_shuffle_ps(add0, add0, _MM_SHUFFLE(0, 1, 2, 3));
+               __m128 add1 = _mm_add_ps(add0, swp1);
+               return add1;
+#      endif
+}
+
+// SSE1
+GLM_FUNC_QUALIFIER __m128 sse_dot_ss(__m128 v1, __m128 v2)
+{
+       __m128 mul0 = _mm_mul_ps(v1, v2);
+       __m128 mov0 = _mm_movehl_ps(mul0, mul0);
+       __m128 add0 = _mm_add_ps(mov0, mul0);
+       __m128 swp1 = _mm_shuffle_ps(add0, add0, 1);
+       __m128 add1 = _mm_add_ss(add0, swp1);
+       return add1;
+}
+
+//cross
+GLM_FUNC_QUALIFIER __m128 sse_xpd_ps(__m128 v1, __m128 v2)
+{
+       __m128 swp0 = _mm_shuffle_ps(v1, v1, _MM_SHUFFLE(3, 0, 2, 1));
+       __m128 swp1 = _mm_shuffle_ps(v1, v1, _MM_SHUFFLE(3, 1, 0, 2));
+       __m128 swp2 = _mm_shuffle_ps(v2, v2, _MM_SHUFFLE(3, 0, 2, 1));
+       __m128 swp3 = _mm_shuffle_ps(v2, v2, _MM_SHUFFLE(3, 1, 0, 2));
+       __m128 mul0 = _mm_mul_ps(swp0, swp3);
+       __m128 mul1 = _mm_mul_ps(swp1, swp2);
+       __m128 sub0 = _mm_sub_ps(mul0, mul1);
+       return sub0;
+}
+
+//normalize
+GLM_FUNC_QUALIFIER __m128 sse_nrm_ps(__m128 v)
+{
+       __m128 dot0 = sse_dot_ps(v, v);
+       __m128 isr0 = _mm_rsqrt_ps(dot0);
+       __m128 mul0 = _mm_mul_ps(v, isr0);
+       return mul0;
+}
+
+//faceforward
+GLM_FUNC_QUALIFIER __m128 sse_ffd_ps(__m128 N, __m128 I, __m128 Nref)
+{
+       //__m128 dot0 = _mm_dot_ps(v, v);
+       //__m128 neg0 = _mm_neg_ps(N);
+       //__m128 sgn0 = _mm_sgn_ps(dot0);
+       //__m128 mix0 = _mm_mix_ps(N, neg0, sgn0);
+       //return mix0;
+
+       __m128 dot0 = sse_dot_ps(Nref, I);
+       __m128 sgn0 = sse_sgn_ps(dot0);
+       __m128 mul0 = _mm_mul_ps(sgn0, glm::detail::minus_one);
+       __m128 mul1 = _mm_mul_ps(N, mul0);
+       return mul1;
+}
+
+//reflect
+GLM_FUNC_QUALIFIER __m128 sse_rfe_ps(__m128 I, __m128 N)
+{
+       __m128 dot0 = sse_dot_ps(N, I);
+       __m128 mul0 = _mm_mul_ps(N, dot0);
+       __m128 mul1 = _mm_mul_ps(mul0, glm::detail::two);
+       __m128 sub0 = _mm_sub_ps(I, mul1);
+       return sub0;
+}
+
+//refract
+GLM_FUNC_QUALIFIER __m128 sse_rfa_ps(__m128 I, __m128 N, __m128 eta)
+{
+       __m128 dot0 = sse_dot_ps(N, I);
+       __m128 mul0 = _mm_mul_ps(eta, eta);
+       __m128 mul1 = _mm_mul_ps(dot0, dot0);
+       __m128 sub0 = _mm_sub_ps(glm::detail::one, mul0);
+       __m128 sub1 = _mm_sub_ps(glm::detail::one, mul1);
+       __m128 mul2 = _mm_mul_ps(sub0, sub1);
+       
+       if(_mm_movemask_ps(_mm_cmplt_ss(mul2, glm::detail::zero)) == 0)
+               return glm::detail::zero;
+
+       __m128 sqt0 = _mm_sqrt_ps(mul2);
+       __m128 mul3 = _mm_mul_ps(eta, dot0);
+       __m128 add0 = _mm_add_ps(mul3, sqt0);
+       __m128 mul4 = _mm_mul_ps(add0, N);
+       __m128 mul5 = _mm_mul_ps(eta, I);
+       __m128 sub2 = _mm_sub_ps(mul5, mul4);
+
+       return sub2;
+}
+
+}//namespace detail
+}//namespace glm
diff --git a/include/glm/detail/intrinsic_integer.hpp b/include/glm/detail/intrinsic_integer.hpp
new file mode 100644 (file)
index 0000000..e4f07bc
--- /dev/null
@@ -0,0 +1,48 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net)
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref core
+/// @file glm/detail/intrinsic_integer.hpp
+/// @date 2009-05-11 / 2011-06-15
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////
+
+#pragma once
+
+#include "glm/glm.hpp"
+
+#if(!(GLM_ARCH & GLM_ARCH_SSE2))
+#      error "SSE2 instructions not supported or enabled"
+#else
+
+namespace glm{
+namespace detail
+{
+       __m128i _mm_bit_interleave_si128(__m128i x);
+       __m128i _mm_bit_interleave_si128(__m128i x, __m128i y);
+
+}//namespace detail
+}//namespace glm
+
+#include "intrinsic_integer.inl"
+
+#endif//GLM_ARCH
diff --git a/include/glm/detail/intrinsic_integer.inl b/include/glm/detail/intrinsic_integer.inl
new file mode 100644 (file)
index 0000000..90426e3
--- /dev/null
@@ -0,0 +1,139 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net)
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref core
+/// @file glm/detail/intrinsic_integer.inl
+/// @date 2009-05-08 / 2011-06-15
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////
+
+namespace glm{
+namespace detail
+{
+       inline __m128i _mm_bit_interleave_si128(__m128i x)
+       {
+               __m128i const Mask4 = _mm_set1_epi32(0x0000FFFF);
+               __m128i const Mask3 = _mm_set1_epi32(0x00FF00FF);
+               __m128i const Mask2 = _mm_set1_epi32(0x0F0F0F0F);
+               __m128i const Mask1 = _mm_set1_epi32(0x33333333);
+               __m128i const Mask0 = _mm_set1_epi32(0x55555555);
+
+               __m128i Reg1;
+               __m128i Reg2;
+
+               // REG1 = x;
+               // REG2 = y;
+               //Reg1 = _mm_unpacklo_epi64(x, y);
+               Reg1 = x;
+
+               //REG1 = ((REG1 << 16) | REG1) & glm::uint64(0x0000FFFF0000FFFF);
+               //REG2 = ((REG2 << 16) | REG2) & glm::uint64(0x0000FFFF0000FFFF);
+               Reg2 = _mm_slli_si128(Reg1, 2);
+               Reg1 = _mm_or_si128(Reg2, Reg1);
+               Reg1 = _mm_and_si128(Reg1, Mask4);
+
+               //REG1 = ((REG1 <<  8) | REG1) & glm::uint64(0x00FF00FF00FF00FF);
+               //REG2 = ((REG2 <<  8) | REG2) & glm::uint64(0x00FF00FF00FF00FF);
+               Reg2 = _mm_slli_si128(Reg1, 1);
+               Reg1 = _mm_or_si128(Reg2, Reg1);
+               Reg1 = _mm_and_si128(Reg1, Mask3);
+
+               //REG1 = ((REG1 <<  4) | REG1) & glm::uint64(0x0F0F0F0F0F0F0F0F);
+               //REG2 = ((REG2 <<  4) | REG2) & glm::uint64(0x0F0F0F0F0F0F0F0F);
+               Reg2 = _mm_slli_epi32(Reg1, 4);
+               Reg1 = _mm_or_si128(Reg2, Reg1);
+               Reg1 = _mm_and_si128(Reg1, Mask2);
+
+               //REG1 = ((REG1 <<  2) | REG1) & glm::uint64(0x3333333333333333);
+               //REG2 = ((REG2 <<  2) | REG2) & glm::uint64(0x3333333333333333);
+               Reg2 = _mm_slli_epi32(Reg1, 2);
+               Reg1 = _mm_or_si128(Reg2, Reg1);
+               Reg1 = _mm_and_si128(Reg1, Mask1);
+
+               //REG1 = ((REG1 <<  1) | REG1) & glm::uint64(0x5555555555555555);
+               //REG2 = ((REG2 <<  1) | REG2) & glm::uint64(0x5555555555555555);
+               Reg2 = _mm_slli_epi32(Reg1, 1);
+               Reg1 = _mm_or_si128(Reg2, Reg1);
+               Reg1 = _mm_and_si128(Reg1, Mask0);
+
+               //return REG1 | (REG2 << 1);
+               Reg2 = _mm_slli_epi32(Reg1, 1);
+               Reg2 = _mm_srli_si128(Reg2, 8);
+               Reg1 = _mm_or_si128(Reg1, Reg2);
+       
+               return Reg1;
+       }
+
+       inline __m128i _mm_bit_interleave_si128(__m128i x, __m128i y)
+       {
+               __m128i const Mask4 = _mm_set1_epi32(0x0000FFFF);
+               __m128i const Mask3 = _mm_set1_epi32(0x00FF00FF);
+               __m128i const Mask2 = _mm_set1_epi32(0x0F0F0F0F);
+               __m128i const Mask1 = _mm_set1_epi32(0x33333333);
+               __m128i const Mask0 = _mm_set1_epi32(0x55555555);
+
+               __m128i Reg1;
+               __m128i Reg2;
+
+               // REG1 = x;
+               // REG2 = y;
+               Reg1 = _mm_unpacklo_epi64(x, y);
+
+               //REG1 = ((REG1 << 16) | REG1) & glm::uint64(0x0000FFFF0000FFFF);
+               //REG2 = ((REG2 << 16) | REG2) & glm::uint64(0x0000FFFF0000FFFF);
+               Reg2 = _mm_slli_si128(Reg1, 2);
+               Reg1 = _mm_or_si128(Reg2, Reg1);
+               Reg1 = _mm_and_si128(Reg1, Mask4);
+
+               //REG1 = ((REG1 <<  8) | REG1) & glm::uint64(0x00FF00FF00FF00FF);
+               //REG2 = ((REG2 <<  8) | REG2) & glm::uint64(0x00FF00FF00FF00FF);
+               Reg2 = _mm_slli_si128(Reg1, 1);
+               Reg1 = _mm_or_si128(Reg2, Reg1);
+               Reg1 = _mm_and_si128(Reg1, Mask3);
+
+               //REG1 = ((REG1 <<  4) | REG1) & glm::uint64(0x0F0F0F0F0F0F0F0F);
+               //REG2 = ((REG2 <<  4) | REG2) & glm::uint64(0x0F0F0F0F0F0F0F0F);
+               Reg2 = _mm_slli_epi32(Reg1, 4);
+               Reg1 = _mm_or_si128(Reg2, Reg1);
+               Reg1 = _mm_and_si128(Reg1, Mask2);
+
+               //REG1 = ((REG1 <<  2) | REG1) & glm::uint64(0x3333333333333333);
+               //REG2 = ((REG2 <<  2) | REG2) & glm::uint64(0x3333333333333333);
+               Reg2 = _mm_slli_epi32(Reg1, 2);
+               Reg1 = _mm_or_si128(Reg2, Reg1);
+               Reg1 = _mm_and_si128(Reg1, Mask1);
+
+               //REG1 = ((REG1 <<  1) | REG1) & glm::uint64(0x5555555555555555);
+               //REG2 = ((REG2 <<  1) | REG2) & glm::uint64(0x5555555555555555);
+               Reg2 = _mm_slli_epi32(Reg1, 1);
+               Reg1 = _mm_or_si128(Reg2, Reg1);
+               Reg1 = _mm_and_si128(Reg1, Mask0);
+
+               //return REG1 | (REG2 << 1);
+               Reg2 = _mm_slli_epi32(Reg1, 1);
+               Reg2 = _mm_srli_si128(Reg2, 8);
+               Reg1 = _mm_or_si128(Reg1, Reg2);
+       
+               return Reg1;
+       }
+}//namespace detail
+}//namespace glms
diff --git a/include/glm/detail/intrinsic_matrix.hpp b/include/glm/detail/intrinsic_matrix.hpp
new file mode 100644 (file)
index 0000000..e41b162
--- /dev/null
@@ -0,0 +1,67 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref core
+/// @file glm/detail/intrinsic_common.hpp
+/// @date 2009-06-05 / 2011-06-15
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////
+
+#pragma once
+
+#include "setup.hpp"
+
+#if(!(GLM_ARCH & GLM_ARCH_SSE2))
+#      error "SSE2 instructions not supported or enabled"
+#else
+
+#include "intrinsic_geometric.hpp"
+
+namespace glm{
+namespace detail
+{
+       void sse_add_ps(__m128 in1[4], __m128 in2[4], __m128 out[4]);
+
+       void sse_sub_ps(__m128 in1[4], __m128 in2[4], __m128 out[4]);
+
+       __m128 sse_mul_ps(__m128 m[4], __m128 v);
+
+       __m128 sse_mul_ps(__m128 v, __m128 m[4]);
+
+       void sse_mul_ps(__m128 const in1[4], __m128 const in2[4], __m128 out[4]);
+
+       void sse_transpose_ps(__m128 const in[4], __m128 out[4]);
+
+       void sse_inverse_ps(__m128 const in[4], __m128 out[4]);
+
+       void sse_rotate_ps(__m128 const in[4], float Angle, float const v[3], __m128 out[4]);
+
+       __m128 sse_det_ps(__m128 const m[4]);
+
+       __m128 sse_slow_det_ps(__m128 const m[4]);
+
+}//namespace detail
+}//namespace glm
+
+#include "intrinsic_matrix.inl"
+
+#endif//GLM_ARCH
diff --git a/include/glm/detail/intrinsic_matrix.inl b/include/glm/detail/intrinsic_matrix.inl
new file mode 100644 (file)
index 0000000..380ffe4
--- /dev/null
@@ -0,0 +1,1070 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref core
+/// @file glm/detail/intrinsic_common.inl
+/// @date 2009-06-05 / 2011-06-15
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////
+
+namespace glm{
+namespace detail{
+
+static const __m128 GLM_VAR_USED _m128_rad_ps = _mm_set_ps1(3.141592653589793238462643383279f / 180.f);
+static const __m128 GLM_VAR_USED _m128_deg_ps = _mm_set_ps1(180.f / 3.141592653589793238462643383279f);
+
+template <typename matType>
+GLM_FUNC_QUALIFIER matType sse_comp_mul_ps
+(
+       __m128 const in1[4],
+       __m128 const in2[4],
+       __m128 out[4]
+)
+{
+       out[0] = _mm_mul_ps(in1[0], in2[0]);
+       out[1] = _mm_mul_ps(in1[1], in2[1]);
+       out[2] = _mm_mul_ps(in1[2], in2[2]);
+       out[3] = _mm_mul_ps(in1[3], in2[3]);
+}
+
+GLM_FUNC_QUALIFIER void sse_add_ps(__m128 const in1[4], __m128 const in2[4], __m128 out[4])
+{
+       {
+               out[0] = _mm_add_ps(in1[0], in2[0]);
+               out[1] = _mm_add_ps(in1[1], in2[1]);
+               out[2] = _mm_add_ps(in1[2], in2[2]);
+               out[3] = _mm_add_ps(in1[3], in2[3]);
+       }
+}
+
+GLM_FUNC_QUALIFIER void sse_sub_ps(__m128 const in1[4], __m128 const in2[4], __m128 out[4])
+{
+       {
+               out[0] = _mm_sub_ps(in1[0], in2[0]);
+               out[1] = _mm_sub_ps(in1[1], in2[1]);
+               out[2] = _mm_sub_ps(in1[2], in2[2]);
+               out[3] = _mm_sub_ps(in1[3], in2[3]);
+       }
+}
+
+GLM_FUNC_QUALIFIER __m128 sse_mul_ps(__m128 const m[4], __m128 v)
+{
+       __m128 v0 = _mm_shuffle_ps(v, v, _MM_SHUFFLE(0, 0, 0, 0));
+       __m128 v1 = _mm_shuffle_ps(v, v, _MM_SHUFFLE(1, 1, 1, 1));
+       __m128 v2 = _mm_shuffle_ps(v, v, _MM_SHUFFLE(2, 2, 2, 2));
+       __m128 v3 = _mm_shuffle_ps(v, v, _MM_SHUFFLE(3, 3, 3, 3));
+
+       __m128 m0 = _mm_mul_ps(m[0], v0);
+       __m128 m1 = _mm_mul_ps(m[1], v1);
+       __m128 m2 = _mm_mul_ps(m[2], v2);
+       __m128 m3 = _mm_mul_ps(m[3], v3);
+
+       __m128 a0 = _mm_add_ps(m0, m1);
+       __m128 a1 = _mm_add_ps(m2, m3);
+       __m128 a2 = _mm_add_ps(a0, a1);
+
+       return a2;
+}
+
+GLM_FUNC_QUALIFIER __m128 sse_mul_ps(__m128 v, __m128 const m[4])
+{
+       __m128 i0 = m[0];
+       __m128 i1 = m[1];
+       __m128 i2 = m[2];
+       __m128 i3 = m[3];
+
+       __m128 m0 = _mm_mul_ps(v, i0);
+       __m128 m1 = _mm_mul_ps(v, i1);
+       __m128 m2 = _mm_mul_ps(v, i2);
+       __m128 m3 = _mm_mul_ps(v, i3);
+
+       __m128 u0 = _mm_unpacklo_ps(m0, m1);
+       __m128 u1 = _mm_unpackhi_ps(m0, m1);
+       __m128 a0 = _mm_add_ps(u0, u1);
+
+       __m128 u2 = _mm_unpacklo_ps(m2, m3);
+       __m128 u3 = _mm_unpackhi_ps(m2, m3);
+       __m128 a1 = _mm_add_ps(u2, u3);
+
+       __m128 f0 = _mm_movelh_ps(a0, a1);
+       __m128 f1 = _mm_movehl_ps(a1, a0);
+       __m128 f2 = _mm_add_ps(f0, f1);
+
+       return f2;
+}
+
+GLM_FUNC_QUALIFIER void sse_mul_ps(__m128 const in1[4], __m128 const in2[4], __m128 out[4])
+{
+       {
+               __m128 e0 = _mm_shuffle_ps(in2[0], in2[0], _MM_SHUFFLE(0, 0, 0, 0));
+               __m128 e1 = _mm_shuffle_ps(in2[0], in2[0], _MM_SHUFFLE(1, 1, 1, 1));
+               __m128 e2 = _mm_shuffle_ps(in2[0], in2[0], _MM_SHUFFLE(2, 2, 2, 2));
+               __m128 e3 = _mm_shuffle_ps(in2[0], in2[0], _MM_SHUFFLE(3, 3, 3, 3));
+
+               __m128 m0 = _mm_mul_ps(in1[0], e0);
+               __m128 m1 = _mm_mul_ps(in1[1], e1);
+               __m128 m2 = _mm_mul_ps(in1[2], e2);
+               __m128 m3 = _mm_mul_ps(in1[3], e3);
+
+               __m128 a0 = _mm_add_ps(m0, m1);
+               __m128 a1 = _mm_add_ps(m2, m3);
+               __m128 a2 = _mm_add_ps(a0, a1);
+
+               out[0] = a2;
+       }
+
+       {
+               __m128 e0 = _mm_shuffle_ps(in2[1], in2[1], _MM_SHUFFLE(0, 0, 0, 0));
+               __m128 e1 = _mm_shuffle_ps(in2[1], in2[1], _MM_SHUFFLE(1, 1, 1, 1));
+               __m128 e2 = _mm_shuffle_ps(in2[1], in2[1], _MM_SHUFFLE(2, 2, 2, 2));
+               __m128 e3 = _mm_shuffle_ps(in2[1], in2[1], _MM_SHUFFLE(3, 3, 3, 3));
+
+               __m128 m0 = _mm_mul_ps(in1[0], e0);
+               __m128 m1 = _mm_mul_ps(in1[1], e1);
+               __m128 m2 = _mm_mul_ps(in1[2], e2);
+               __m128 m3 = _mm_mul_ps(in1[3], e3);
+
+               __m128 a0 = _mm_add_ps(m0, m1);
+               __m128 a1 = _mm_add_ps(m2, m3);
+               __m128 a2 = _mm_add_ps(a0, a1);
+
+               out[1] = a2;
+       }
+
+       {
+               __m128 e0 = _mm_shuffle_ps(in2[2], in2[2], _MM_SHUFFLE(0, 0, 0, 0));
+               __m128 e1 = _mm_shuffle_ps(in2[2], in2[2], _MM_SHUFFLE(1, 1, 1, 1));
+               __m128 e2 = _mm_shuffle_ps(in2[2], in2[2], _MM_SHUFFLE(2, 2, 2, 2));
+               __m128 e3 = _mm_shuffle_ps(in2[2], in2[2], _MM_SHUFFLE(3, 3, 3, 3));
+
+               __m128 m0 = _mm_mul_ps(in1[0], e0);
+               __m128 m1 = _mm_mul_ps(in1[1], e1);
+               __m128 m2 = _mm_mul_ps(in1[2], e2);
+               __m128 m3 = _mm_mul_ps(in1[3], e3);
+
+               __m128 a0 = _mm_add_ps(m0, m1);
+               __m128 a1 = _mm_add_ps(m2, m3);
+               __m128 a2 = _mm_add_ps(a0, a1);
+
+               out[2] = a2;
+       }
+
+       {
+               //(__m128&)_mm_shuffle_epi32(__m128i&)in2[0], _MM_SHUFFLE(3, 3, 3, 3))
+               __m128 e0 = _mm_shuffle_ps(in2[3], in2[3], _MM_SHUFFLE(0, 0, 0, 0));
+               __m128 e1 = _mm_shuffle_ps(in2[3], in2[3], _MM_SHUFFLE(1, 1, 1, 1));
+               __m128 e2 = _mm_shuffle_ps(in2[3], in2[3], _MM_SHUFFLE(2, 2, 2, 2));
+               __m128 e3 = _mm_shuffle_ps(in2[3], in2[3], _MM_SHUFFLE(3, 3, 3, 3));
+
+               __m128 m0 = _mm_mul_ps(in1[0], e0);
+               __m128 m1 = _mm_mul_ps(in1[1], e1);
+               __m128 m2 = _mm_mul_ps(in1[2], e2);
+               __m128 m3 = _mm_mul_ps(in1[3], e3);
+
+               __m128 a0 = _mm_add_ps(m0, m1);
+               __m128 a1 = _mm_add_ps(m2, m3);
+               __m128 a2 = _mm_add_ps(a0, a1);
+
+               out[3] = a2;
+       }
+}
+
+GLM_FUNC_QUALIFIER void sse_transpose_ps(__m128 const in[4], __m128 out[4])
+{
+    __m128 tmp0 = _mm_shuffle_ps(in[0], in[1], 0x44);
+    __m128 tmp2 = _mm_shuffle_ps(in[0], in[1], 0xEE);
+    __m128 tmp1 = _mm_shuffle_ps(in[2], in[3], 0x44);
+    __m128 tmp3 = _mm_shuffle_ps(in[2], in[3], 0xEE);
+
+    out[0] = _mm_shuffle_ps(tmp0, tmp1, 0x88);
+    out[1] = _mm_shuffle_ps(tmp0, tmp1, 0xDD);
+    out[2] = _mm_shuffle_ps(tmp2, tmp3, 0x88);
+    out[3] = _mm_shuffle_ps(tmp2, tmp3, 0xDD);
+}
+
+GLM_FUNC_QUALIFIER __m128 sse_slow_det_ps(__m128 const in[4])
+{
+       __m128 Fac0;
+       {
+               //      valType SubFactor00 = m[2][2] * m[3][3] - m[3][2] * m[2][3];
+               //      valType SubFactor00 = m[2][2] * m[3][3] - m[3][2] * m[2][3];
+               //      valType SubFactor06 = m[1][2] * m[3][3] - m[3][2] * m[1][3];
+               //      valType SubFactor13 = m[1][2] * m[2][3] - m[2][2] * m[1][3];
+
+               __m128 Swp0a = _mm_shuffle_ps(in[3], in[2], _MM_SHUFFLE(3, 3, 3, 3));
+               __m128 Swp0b = _mm_shuffle_ps(in[3], in[2], _MM_SHUFFLE(2, 2, 2, 2));
+
+               __m128 Swp00 = _mm_shuffle_ps(in[2], in[1], _MM_SHUFFLE(2, 2, 2, 2));
+               __m128 Swp01 = _mm_shuffle_ps(Swp0a, Swp0a, _MM_SHUFFLE(2, 0, 0, 0));
+               __m128 Swp02 = _mm_shuffle_ps(Swp0b, Swp0b, _MM_SHUFFLE(2, 0, 0, 0));
+               __m128 Swp03 = _mm_shuffle_ps(in[2], in[1], _MM_SHUFFLE(3, 3, 3, 3));
+
+               __m128 Mul00 = _mm_mul_ps(Swp00, Swp01);
+               __m128 Mul01 = _mm_mul_ps(Swp02, Swp03);
+               Fac0 = _mm_sub_ps(Mul00, Mul01);
+       }
+
+       __m128 Fac1;
+       {
+               //      valType SubFactor01 = m[2][1] * m[3][3] - m[3][1] * m[2][3];
+               //      valType SubFactor01 = m[2][1] * m[3][3] - m[3][1] * m[2][3];
+               //      valType SubFactor07 = m[1][1] * m[3][3] - m[3][1] * m[1][3];
+               //      valType SubFactor14 = m[1][1] * m[2][3] - m[2][1] * m[1][3];
+
+               __m128 Swp0a = _mm_shuffle_ps(in[3], in[2], _MM_SHUFFLE(3, 3, 3, 3));
+               __m128 Swp0b = _mm_shuffle_ps(in[3], in[2], _MM_SHUFFLE(1, 1, 1, 1));
+
+               __m128 Swp00 = _mm_shuffle_ps(in[2], in[1], _MM_SHUFFLE(1, 1, 1, 1));
+               __m128 Swp01 = _mm_shuffle_ps(Swp0a, Swp0a, _MM_SHUFFLE(2, 0, 0, 0));
+               __m128 Swp02 = _mm_shuffle_ps(Swp0b, Swp0b, _MM_SHUFFLE(2, 0, 0, 0));
+               __m128 Swp03 = _mm_shuffle_ps(in[2], in[1], _MM_SHUFFLE(3, 3, 3, 3));
+
+               __m128 Mul00 = _mm_mul_ps(Swp00, Swp01);
+               __m128 Mul01 = _mm_mul_ps(Swp02, Swp03);
+               Fac1 = _mm_sub_ps(Mul00, Mul01);
+       }
+
+
+       __m128 Fac2;
+       {
+               //      valType SubFactor02 = m[2][1] * m[3][2] - m[3][1] * m[2][2];
+               //      valType SubFactor02 = m[2][1] * m[3][2] - m[3][1] * m[2][2];
+               //      valType SubFactor08 = m[1][1] * m[3][2] - m[3][1] * m[1][2];
+               //      valType SubFactor15 = m[1][1] * m[2][2] - m[2][1] * m[1][2];
+
+               __m128 Swp0a = _mm_shuffle_ps(in[3], in[2], _MM_SHUFFLE(2, 2, 2, 2));
+               __m128 Swp0b = _mm_shuffle_ps(in[3], in[2], _MM_SHUFFLE(1, 1, 1, 1));
+
+               __m128 Swp00 = _mm_shuffle_ps(in[2], in[1], _MM_SHUFFLE(1, 1, 1, 1));
+               __m128 Swp01 = _mm_shuffle_ps(Swp0a, Swp0a, _MM_SHUFFLE(2, 0, 0, 0));
+               __m128 Swp02 = _mm_shuffle_ps(Swp0b, Swp0b, _MM_SHUFFLE(2, 0, 0, 0));
+               __m128 Swp03 = _mm_shuffle_ps(in[2], in[1], _MM_SHUFFLE(2, 2, 2, 2));
+
+               __m128 Mul00 = _mm_mul_ps(Swp00, Swp01);
+               __m128 Mul01 = _mm_mul_ps(Swp02, Swp03);
+               Fac2 = _mm_sub_ps(Mul00, Mul01);
+       }
+
+       __m128 Fac3;
+       {
+               //      valType SubFactor03 = m[2][0] * m[3][3] - m[3][0] * m[2][3];
+               //      valType SubFactor03 = m[2][0] * m[3][3] - m[3][0] * m[2][3];
+               //      valType SubFactor09 = m[1][0] * m[3][3] - m[3][0] * m[1][3];
+               //      valType SubFactor16 = m[1][0] * m[2][3] - m[2][0] * m[1][3];
+
+               __m128 Swp0a = _mm_shuffle_ps(in[3], in[2], _MM_SHUFFLE(3, 3, 3, 3));
+               __m128 Swp0b = _mm_shuffle_ps(in[3], in[2], _MM_SHUFFLE(0, 0, 0, 0));
+
+               __m128 Swp00 = _mm_shuffle_ps(in[2], in[1], _MM_SHUFFLE(0, 0, 0, 0));
+               __m128 Swp01 = _mm_shuffle_ps(Swp0a, Swp0a, _MM_SHUFFLE(2, 0, 0, 0));
+               __m128 Swp02 = _mm_shuffle_ps(Swp0b, Swp0b, _MM_SHUFFLE(2, 0, 0, 0));
+               __m128 Swp03 = _mm_shuffle_ps(in[2], in[1], _MM_SHUFFLE(3, 3, 3, 3));
+
+               __m128 Mul00 = _mm_mul_ps(Swp00, Swp01);
+               __m128 Mul01 = _mm_mul_ps(Swp02, Swp03);
+               Fac3 = _mm_sub_ps(Mul00, Mul01);
+       }
+
+       __m128 Fac4;
+       {
+               //      valType SubFactor04 = m[2][0] * m[3][2] - m[3][0] * m[2][2];
+               //      valType SubFactor04 = m[2][0] * m[3][2] - m[3][0] * m[2][2];
+               //      valType SubFactor10 = m[1][0] * m[3][2] - m[3][0] * m[1][2];
+               //      valType SubFactor17 = m[1][0] * m[2][2] - m[2][0] * m[1][2];
+
+               __m128 Swp0a = _mm_shuffle_ps(in[3], in[2], _MM_SHUFFLE(2, 2, 2, 2));
+               __m128 Swp0b = _mm_shuffle_ps(in[3], in[2], _MM_SHUFFLE(0, 0, 0, 0));
+
+               __m128 Swp00 = _mm_shuffle_ps(in[2], in[1], _MM_SHUFFLE(0, 0, 0, 0));
+               __m128 Swp01 = _mm_shuffle_ps(Swp0a, Swp0a, _MM_SHUFFLE(2, 0, 0, 0));
+               __m128 Swp02 = _mm_shuffle_ps(Swp0b, Swp0b, _MM_SHUFFLE(2, 0, 0, 0));
+               __m128 Swp03 = _mm_shuffle_ps(in[2], in[1], _MM_SHUFFLE(2, 2, 2, 2));
+
+               __m128 Mul00 = _mm_mul_ps(Swp00, Swp01);
+               __m128 Mul01 = _mm_mul_ps(Swp02, Swp03);
+               Fac4 = _mm_sub_ps(Mul00, Mul01);
+       }
+
+       __m128 Fac5;
+       {
+               //      valType SubFactor05 = m[2][0] * m[3][1] - m[3][0] * m[2][1];
+               //      valType SubFactor05 = m[2][0] * m[3][1] - m[3][0] * m[2][1];
+               //      valType SubFactor12 = m[1][0] * m[3][1] - m[3][0] * m[1][1];
+               //      valType SubFactor18 = m[1][0] * m[2][1] - m[2][0] * m[1][1];
+
+               __m128 Swp0a = _mm_shuffle_ps(in[3], in[2], _MM_SHUFFLE(1, 1, 1, 1));
+               __m128 Swp0b = _mm_shuffle_ps(in[3], in[2], _MM_SHUFFLE(0, 0, 0, 0));
+
+               __m128 Swp00 = _mm_shuffle_ps(in[2], in[1], _MM_SHUFFLE(0, 0, 0, 0));
+               __m128 Swp01 = _mm_shuffle_ps(Swp0a, Swp0a, _MM_SHUFFLE(2, 0, 0, 0));
+               __m128 Swp02 = _mm_shuffle_ps(Swp0b, Swp0b, _MM_SHUFFLE(2, 0, 0, 0));
+               __m128 Swp03 = _mm_shuffle_ps(in[2], in[1], _MM_SHUFFLE(1, 1, 1, 1));
+
+               __m128 Mul00 = _mm_mul_ps(Swp00, Swp01);
+               __m128 Mul01 = _mm_mul_ps(Swp02, Swp03);
+               Fac5 = _mm_sub_ps(Mul00, Mul01);
+       }
+
+       __m128 SignA = _mm_set_ps( 1.0f,-1.0f, 1.0f,-1.0f);
+       __m128 SignB = _mm_set_ps(-1.0f, 1.0f,-1.0f, 1.0f);
+
+       // m[1][0]
+       // m[0][0]
+       // m[0][0]
+       // m[0][0]
+       __m128 Temp0 = _mm_shuffle_ps(in[1], in[0], _MM_SHUFFLE(0, 0, 0, 0));
+       __m128 Vec0 = _mm_shuffle_ps(Temp0, Temp0, _MM_SHUFFLE(2, 2, 2, 0));
+
+       // m[1][1]
+       // m[0][1]
+       // m[0][1]
+       // m[0][1]
+       __m128 Temp1 = _mm_shuffle_ps(in[1], in[0], _MM_SHUFFLE(1, 1, 1, 1));
+       __m128 Vec1 = _mm_shuffle_ps(Temp1, Temp1, _MM_SHUFFLE(2, 2, 2, 0));
+
+       // m[1][2]
+       // m[0][2]
+       // m[0][2]
+       // m[0][2]
+       __m128 Temp2 = _mm_shuffle_ps(in[1], in[0], _MM_SHUFFLE(2, 2, 2, 2));
+       __m128 Vec2 = _mm_shuffle_ps(Temp2, Temp2, _MM_SHUFFLE(2, 2, 2, 0));
+
+       // m[1][3]
+       // m[0][3]
+       // m[0][3]
+       // m[0][3]
+       __m128 Temp3 = _mm_shuffle_ps(in[1], in[0], _MM_SHUFFLE(3, 3, 3, 3));
+       __m128 Vec3 = _mm_shuffle_ps(Temp3, Temp3, _MM_SHUFFLE(2, 2, 2, 0));
+
+       // col0
+       // + (Vec1[0] * Fac0[0] - Vec2[0] * Fac1[0] + Vec3[0] * Fac2[0]),
+       // - (Vec1[1] * Fac0[1] - Vec2[1] * Fac1[1] + Vec3[1] * Fac2[1]),
+       // + (Vec1[2] * Fac0[2] - Vec2[2] * Fac1[2] + Vec3[2] * Fac2[2]),
+       // - (Vec1[3] * Fac0[3] - Vec2[3] * Fac1[3] + Vec3[3] * Fac2[3]),
+       __m128 Mul00 = _mm_mul_ps(Vec1, Fac0);
+       __m128 Mul01 = _mm_mul_ps(Vec2, Fac1);
+       __m128 Mul02 = _mm_mul_ps(Vec3, Fac2);
+       __m128 Sub00 = _mm_sub_ps(Mul00, Mul01);
+       __m128 Add00 = _mm_add_ps(Sub00, Mul02);
+       __m128 Inv0 = _mm_mul_ps(SignB, Add00);
+
+       // col1
+       // - (Vec0[0] * Fac0[0] - Vec2[0] * Fac3[0] + Vec3[0] * Fac4[0]),
+       // + (Vec0[0] * Fac0[1] - Vec2[1] * Fac3[1] + Vec3[1] * Fac4[1]),
+       // - (Vec0[0] * Fac0[2] - Vec2[2] * Fac3[2] + Vec3[2] * Fac4[2]),
+       // + (Vec0[0] * Fac0[3] - Vec2[3] * Fac3[3] + Vec3[3] * Fac4[3]),
+       __m128 Mul03 = _mm_mul_ps(Vec0, Fac0);
+       __m128 Mul04 = _mm_mul_ps(Vec2, Fac3);
+       __m128 Mul05 = _mm_mul_ps(Vec3, Fac4);
+       __m128 Sub01 = _mm_sub_ps(Mul03, Mul04);
+       __m128 Add01 = _mm_add_ps(Sub01, Mul05);
+       __m128 Inv1 = _mm_mul_ps(SignA, Add01);
+
+       // col2
+       // + (Vec0[0] * Fac1[0] - Vec1[0] * Fac3[0] + Vec3[0] * Fac5[0]),
+       // - (Vec0[0] * Fac1[1] - Vec1[1] * Fac3[1] + Vec3[1] * Fac5[1]),
+       // + (Vec0[0] * Fac1[2] - Vec1[2] * Fac3[2] + Vec3[2] * Fac5[2]),
+       // - (Vec0[0] * Fac1[3] - Vec1[3] * Fac3[3] + Vec3[3] * Fac5[3]),
+       __m128 Mul06 = _mm_mul_ps(Vec0, Fac1);
+       __m128 Mul07 = _mm_mul_ps(Vec1, Fac3);
+       __m128 Mul08 = _mm_mul_ps(Vec3, Fac5);
+       __m128 Sub02 = _mm_sub_ps(Mul06, Mul07);
+       __m128 Add02 = _mm_add_ps(Sub02, Mul08);
+       __m128 Inv2 = _mm_mul_ps(SignB, Add02);
+
+       // col3
+       // - (Vec1[0] * Fac2[0] - Vec1[0] * Fac4[0] + Vec2[0] * Fac5[0]),
+       // + (Vec1[0] * Fac2[1] - Vec1[1] * Fac4[1] + Vec2[1] * Fac5[1]),
+       // - (Vec1[0] * Fac2[2] - Vec1[2] * Fac4[2] + Vec2[2] * Fac5[2]),
+       // + (Vec1[0] * Fac2[3] - Vec1[3] * Fac4[3] + Vec2[3] * Fac5[3]));
+       __m128 Mul09 = _mm_mul_ps(Vec0, Fac2);
+       __m128 Mul10 = _mm_mul_ps(Vec1, Fac4);
+       __m128 Mul11 = _mm_mul_ps(Vec2, Fac5);
+       __m128 Sub03 = _mm_sub_ps(Mul09, Mul10);
+       __m128 Add03 = _mm_add_ps(Sub03, Mul11);
+       __m128 Inv3 = _mm_mul_ps(SignA, Add03);
+
+       __m128 Row0 = _mm_shuffle_ps(Inv0, Inv1, _MM_SHUFFLE(0, 0, 0, 0));
+       __m128 Row1 = _mm_shuffle_ps(Inv2, Inv3, _MM_SHUFFLE(0, 0, 0, 0));
+       __m128 Row2 = _mm_shuffle_ps(Row0, Row1, _MM_SHUFFLE(2, 0, 2, 0));
+
+       //      valType Determinant = m[0][0] * Inverse[0][0]
+       //                                              + m[0][1] * Inverse[1][0]
+       //                                              + m[0][2] * Inverse[2][0]
+       //                                              + m[0][3] * Inverse[3][0];
+       __m128 Det0 = sse_dot_ps(in[0], Row2);
+       return Det0;
+}
+
+GLM_FUNC_QUALIFIER __m128 sse_detd_ps
+(
+       __m128 const m[4]
+)
+{
+       // _mm_castsi128_ps(_mm_shuffle_epi32(_mm_castps_si128(
+
+       //T SubFactor00 = m[2][2] * m[3][3] - m[3][2] * m[2][3];
+       //T SubFactor01 = m[2][1] * m[3][3] - m[3][1] * m[2][3];
+       //T SubFactor02 = m[2][1] * m[3][2] - m[3][1] * m[2][2];
+       //T SubFactor03 = m[2][0] * m[3][3] - m[3][0] * m[2][3];
+       //T SubFactor04 = m[2][0] * m[3][2] - m[3][0] * m[2][2];
+       //T SubFactor05 = m[2][0] * m[3][1] - m[3][0] * m[2][1];
+
+       // First 2 columns
+       __m128 Swp2A = _mm_castsi128_ps(_mm_shuffle_epi32(_mm_castps_si128(m[2]), _MM_SHUFFLE(0, 1, 1, 2)));
+       __m128 Swp3A = _mm_castsi128_ps(_mm_shuffle_epi32(_mm_castps_si128(m[3]), _MM_SHUFFLE(3, 2, 3, 3)));
+       __m128 MulA = _mm_mul_ps(Swp2A, Swp3A);
+
+       // Second 2 columns
+       __m128 Swp2B = _mm_castsi128_ps(_mm_shuffle_epi32(_mm_castps_si128(m[2]), _MM_SHUFFLE(3, 2, 3, 3)));
+       __m128 Swp3B = _mm_castsi128_ps(_mm_shuffle_epi32(_mm_castps_si128(m[3]), _MM_SHUFFLE(0, 1, 1, 2)));
+       __m128 MulB = _mm_mul_ps(Swp2B, Swp3B);
+
+       // Columns subtraction
+       __m128 SubE = _mm_sub_ps(MulA, MulB);
+
+       // Last 2 rows
+       __m128 Swp2C = _mm_castsi128_ps(_mm_shuffle_epi32(_mm_castps_si128(m[2]), _MM_SHUFFLE(0, 0, 1, 2)));
+       __m128 Swp3C = _mm_castsi128_ps(_mm_shuffle_epi32(_mm_castps_si128(m[3]), _MM_SHUFFLE(1, 2, 0, 0)));
+       __m128 MulC = _mm_mul_ps(Swp2C, Swp3C);
+       __m128 SubF = _mm_sub_ps(_mm_movehl_ps(MulC, MulC), MulC);
+
+       //tvec4<T, P> DetCof(
+       //      + (m[1][1] * SubFactor00 - m[1][2] * SubFactor01 + m[1][3] * SubFactor02),
+       //      - (m[1][0] * SubFactor00 - m[1][2] * SubFactor03 + m[1][3] * SubFactor04),
+       //      + (m[1][0] * SubFactor01 - m[1][1] * SubFactor03 + m[1][3] * SubFactor05),
+       //      - (m[1][0] * SubFactor02 - m[1][1] * SubFactor04 + m[1][2] * SubFactor05));
+
+       __m128 SubFacA = _mm_castsi128_ps(_mm_shuffle_epi32(_mm_castps_si128(SubE), _MM_SHUFFLE(2, 1, 0, 0)));
+       __m128 SwpFacA = _mm_castsi128_ps(_mm_shuffle_epi32(_mm_castps_si128(m[1]), _MM_SHUFFLE(0, 0, 0, 1)));
+       __m128 MulFacA = _mm_mul_ps(SwpFacA, SubFacA);
+
+       __m128 SubTmpB = _mm_shuffle_ps(SubE, SubF, _MM_SHUFFLE(0, 0, 3, 1));
+       __m128 SubFacB = _mm_castsi128_ps(_mm_shuffle_epi32(_mm_castps_si128(SubTmpB), _MM_SHUFFLE(3, 1, 1, 0)));//SubF[0], SubE[3], SubE[3], SubE[1];
+       __m128 SwpFacB = _mm_castsi128_ps(_mm_shuffle_epi32(_mm_castps_si128(m[1]), _MM_SHUFFLE(1, 1, 2, 2)));
+       __m128 MulFacB = _mm_mul_ps(SwpFacB, SubFacB);
+
+       __m128 SubRes = _mm_sub_ps(MulFacA, MulFacB);
+
+       __m128 SubTmpC = _mm_shuffle_ps(SubE, SubF, _MM_SHUFFLE(1, 0, 2, 2));
+       __m128 SubFacC = _mm_castsi128_ps(_mm_shuffle_epi32(_mm_castps_si128(SubTmpC), _MM_SHUFFLE(3, 3, 2, 0)));
+       __m128 SwpFacC = _mm_castsi128_ps(_mm_shuffle_epi32(_mm_castps_si128(m[1]), _MM_SHUFFLE(2, 3, 3, 3)));
+       __m128 MulFacC = _mm_mul_ps(SwpFacC, SubFacC);
+
+       __m128 AddRes = _mm_add_ps(SubRes, MulFacC);
+       __m128 DetCof = _mm_mul_ps(AddRes, _mm_setr_ps( 1.0f,-1.0f, 1.0f,-1.0f));
+
+       //return m[0][0] * DetCof[0]
+       //       + m[0][1] * DetCof[1]
+       //       + m[0][2] * DetCof[2]
+       //       + m[0][3] * DetCof[3];
+
+       return sse_dot_ps(m[0], DetCof);
+}
+
+GLM_FUNC_QUALIFIER __m128 sse_det_ps
+(
+       __m128 const m[4]
+)
+{
+       // _mm_castsi128_ps(_mm_shuffle_epi32(_mm_castps_si128(add)
+
+       //T SubFactor00 = m[2][2] * m[3][3] - m[3][2] * m[2][3];
+       //T SubFactor01 = m[2][1] * m[3][3] - m[3][1] * m[2][3];
+       //T SubFactor02 = m[2][1] * m[3][2] - m[3][1] * m[2][2];
+       //T SubFactor03 = m[2][0] * m[3][3] - m[3][0] * m[2][3];
+       //T SubFactor04 = m[2][0] * m[3][2] - m[3][0] * m[2][2];
+       //T SubFactor05 = m[2][0] * m[3][1] - m[3][0] * m[2][1];
+
+       // First 2 columns
+       __m128 Swp2A = _mm_shuffle_ps(m[2], m[2], _MM_SHUFFLE(0, 1, 1, 2));
+       __m128 Swp3A = _mm_shuffle_ps(m[3], m[3], _MM_SHUFFLE(3, 2, 3, 3));
+       __m128 MulA = _mm_mul_ps(Swp2A, Swp3A);
+
+       // Second 2 columns
+       __m128 Swp2B = _mm_shuffle_ps(m[2], m[2], _MM_SHUFFLE(3, 2, 3, 3));
+       __m128 Swp3B = _mm_shuffle_ps(m[3], m[3], _MM_SHUFFLE(0, 1, 1, 2));
+       __m128 MulB = _mm_mul_ps(Swp2B, Swp3B);
+
+       // Columns subtraction
+       __m128 SubE = _mm_sub_ps(MulA, MulB);
+
+       // Last 2 rows
+       __m128 Swp2C = _mm_shuffle_ps(m[2], m[2], _MM_SHUFFLE(0, 0, 1, 2));
+       __m128 Swp3C = _mm_shuffle_ps(m[3], m[3], _MM_SHUFFLE(1, 2, 0, 0));
+       __m128 MulC = _mm_mul_ps(Swp2C, Swp3C);
+       __m128 SubF = _mm_sub_ps(_mm_movehl_ps(MulC, MulC), MulC);
+
+       //tvec4<T, P> DetCof(
+       //      + (m[1][1] * SubFactor00 - m[1][2] * SubFactor01 + m[1][3] * SubFactor02),
+       //      - (m[1][0] * SubFactor00 - m[1][2] * SubFactor03 + m[1][3] * SubFactor04),
+       //      + (m[1][0] * SubFactor01 - m[1][1] * SubFactor03 + m[1][3] * SubFactor05),
+       //      - (m[1][0] * SubFactor02 - m[1][1] * SubFactor04 + m[1][2] * SubFactor05));
+
+       __m128 SubFacA = _mm_shuffle_ps(SubE, SubE, _MM_SHUFFLE(2, 1, 0, 0));
+       __m128 SwpFacA = _mm_shuffle_ps(m[1], m[1], _MM_SHUFFLE(0, 0, 0, 1));
+       __m128 MulFacA = _mm_mul_ps(SwpFacA, SubFacA);
+
+       __m128 SubTmpB = _mm_shuffle_ps(SubE, SubF, _MM_SHUFFLE(0, 0, 3, 1));
+       __m128 SubFacB = _mm_shuffle_ps(SubTmpB, SubTmpB, _MM_SHUFFLE(3, 1, 1, 0));//SubF[0], SubE[3], SubE[3], SubE[1];
+       __m128 SwpFacB = _mm_shuffle_ps(m[1], m[1], _MM_SHUFFLE(1, 1, 2, 2));
+       __m128 MulFacB = _mm_mul_ps(SwpFacB, SubFacB);
+
+       __m128 SubRes = _mm_sub_ps(MulFacA, MulFacB);
+
+       __m128 SubTmpC = _mm_shuffle_ps(SubE, SubF, _MM_SHUFFLE(1, 0, 2, 2));
+       __m128 SubFacC = _mm_shuffle_ps(SubTmpC, SubTmpC, _MM_SHUFFLE(3, 3, 2, 0));
+       __m128 SwpFacC = _mm_shuffle_ps(m[1], m[1], _MM_SHUFFLE(2, 3, 3, 3));
+       __m128 MulFacC = _mm_mul_ps(SwpFacC, SubFacC);
+
+       __m128 AddRes = _mm_add_ps(SubRes, MulFacC);
+       __m128 DetCof = _mm_mul_ps(AddRes, _mm_setr_ps( 1.0f,-1.0f, 1.0f,-1.0f));
+
+       //return m[0][0] * DetCof[0]
+       //       + m[0][1] * DetCof[1]
+       //       + m[0][2] * DetCof[2]
+       //       + m[0][3] * DetCof[3];
+
+       return sse_dot_ps(m[0], DetCof);
+}
+
+GLM_FUNC_QUALIFIER void sse_inverse_ps(__m128 const in[4], __m128 out[4])
+{
+       __m128 Fac0;
+       {
+               //      valType SubFactor00 = m[2][2] * m[3][3] - m[3][2] * m[2][3];
+               //      valType SubFactor00 = m[2][2] * m[3][3] - m[3][2] * m[2][3];
+               //      valType SubFactor06 = m[1][2] * m[3][3] - m[3][2] * m[1][3];
+               //      valType SubFactor13 = m[1][2] * m[2][3] - m[2][2] * m[1][3];
+
+               __m128 Swp0a = _mm_shuffle_ps(in[3], in[2], _MM_SHUFFLE(3, 3, 3, 3));
+               __m128 Swp0b = _mm_shuffle_ps(in[3], in[2], _MM_SHUFFLE(2, 2, 2, 2));
+
+               __m128 Swp00 = _mm_shuffle_ps(in[2], in[1], _MM_SHUFFLE(2, 2, 2, 2));
+               __m128 Swp01 = _mm_shuffle_ps(Swp0a, Swp0a, _MM_SHUFFLE(2, 0, 0, 0));
+               __m128 Swp02 = _mm_shuffle_ps(Swp0b, Swp0b, _MM_SHUFFLE(2, 0, 0, 0));
+               __m128 Swp03 = _mm_shuffle_ps(in[2], in[1], _MM_SHUFFLE(3, 3, 3, 3));
+
+               __m128 Mul00 = _mm_mul_ps(Swp00, Swp01);
+               __m128 Mul01 = _mm_mul_ps(Swp02, Swp03);
+               Fac0 = _mm_sub_ps(Mul00, Mul01);
+       }
+
+       __m128 Fac1;
+       {
+               //      valType SubFactor01 = m[2][1] * m[3][3] - m[3][1] * m[2][3];
+               //      valType SubFactor01 = m[2][1] * m[3][3] - m[3][1] * m[2][3];
+               //      valType SubFactor07 = m[1][1] * m[3][3] - m[3][1] * m[1][3];
+               //      valType SubFactor14 = m[1][1] * m[2][3] - m[2][1] * m[1][3];
+
+               __m128 Swp0a = _mm_shuffle_ps(in[3], in[2], _MM_SHUFFLE(3, 3, 3, 3));
+               __m128 Swp0b = _mm_shuffle_ps(in[3], in[2], _MM_SHUFFLE(1, 1, 1, 1));
+
+               __m128 Swp00 = _mm_shuffle_ps(in[2], in[1], _MM_SHUFFLE(1, 1, 1, 1));
+               __m128 Swp01 = _mm_shuffle_ps(Swp0a, Swp0a, _MM_SHUFFLE(2, 0, 0, 0));
+               __m128 Swp02 = _mm_shuffle_ps(Swp0b, Swp0b, _MM_SHUFFLE(2, 0, 0, 0));
+               __m128 Swp03 = _mm_shuffle_ps(in[2], in[1], _MM_SHUFFLE(3, 3, 3, 3));
+
+               __m128 Mul00 = _mm_mul_ps(Swp00, Swp01);
+               __m128 Mul01 = _mm_mul_ps(Swp02, Swp03);
+               Fac1 = _mm_sub_ps(Mul00, Mul01);
+       }
+
+
+       __m128 Fac2;
+       {
+               //      valType SubFactor02 = m[2][1] * m[3][2] - m[3][1] * m[2][2];
+               //      valType SubFactor02 = m[2][1] * m[3][2] - m[3][1] * m[2][2];
+               //      valType SubFactor08 = m[1][1] * m[3][2] - m[3][1] * m[1][2];
+               //      valType SubFactor15 = m[1][1] * m[2][2] - m[2][1] * m[1][2];
+
+               __m128 Swp0a = _mm_shuffle_ps(in[3], in[2], _MM_SHUFFLE(2, 2, 2, 2));
+               __m128 Swp0b = _mm_shuffle_ps(in[3], in[2], _MM_SHUFFLE(1, 1, 1, 1));
+
+               __m128 Swp00 = _mm_shuffle_ps(in[2], in[1], _MM_SHUFFLE(1, 1, 1, 1));
+               __m128 Swp01 = _mm_shuffle_ps(Swp0a, Swp0a, _MM_SHUFFLE(2, 0, 0, 0));
+               __m128 Swp02 = _mm_shuffle_ps(Swp0b, Swp0b, _MM_SHUFFLE(2, 0, 0, 0));
+               __m128 Swp03 = _mm_shuffle_ps(in[2], in[1], _MM_SHUFFLE(2, 2, 2, 2));
+
+               __m128 Mul00 = _mm_mul_ps(Swp00, Swp01);
+               __m128 Mul01 = _mm_mul_ps(Swp02, Swp03);
+               Fac2 = _mm_sub_ps(Mul00, Mul01);
+    }
+
+       __m128 Fac3;
+       {
+               //      valType SubFactor03 = m[2][0] * m[3][3] - m[3][0] * m[2][3];
+               //      valType SubFactor03 = m[2][0] * m[3][3] - m[3][0] * m[2][3];
+               //      valType SubFactor09 = m[1][0] * m[3][3] - m[3][0] * m[1][3];
+               //      valType SubFactor16 = m[1][0] * m[2][3] - m[2][0] * m[1][3];
+
+               __m128 Swp0a = _mm_shuffle_ps(in[3], in[2], _MM_SHUFFLE(3, 3, 3, 3));
+               __m128 Swp0b = _mm_shuffle_ps(in[3], in[2], _MM_SHUFFLE(0, 0, 0, 0));
+
+               __m128 Swp00 = _mm_shuffle_ps(in[2], in[1], _MM_SHUFFLE(0, 0, 0, 0));
+               __m128 Swp01 = _mm_shuffle_ps(Swp0a, Swp0a, _MM_SHUFFLE(2, 0, 0, 0));
+               __m128 Swp02 = _mm_shuffle_ps(Swp0b, Swp0b, _MM_SHUFFLE(2, 0, 0, 0));
+               __m128 Swp03 = _mm_shuffle_ps(in[2], in[1], _MM_SHUFFLE(3, 3, 3, 3));
+
+               __m128 Mul00 = _mm_mul_ps(Swp00, Swp01);
+               __m128 Mul01 = _mm_mul_ps(Swp02, Swp03);
+               Fac3 = _mm_sub_ps(Mul00, Mul01);
+       }
+
+       __m128 Fac4;
+       {
+               //      valType SubFactor04 = m[2][0] * m[3][2] - m[3][0] * m[2][2];
+               //      valType SubFactor04 = m[2][0] * m[3][2] - m[3][0] * m[2][2];
+               //      valType SubFactor10 = m[1][0] * m[3][2] - m[3][0] * m[1][2];
+               //      valType SubFactor17 = m[1][0] * m[2][2] - m[2][0] * m[1][2];
+
+               __m128 Swp0a = _mm_shuffle_ps(in[3], in[2], _MM_SHUFFLE(2, 2, 2, 2));
+               __m128 Swp0b = _mm_shuffle_ps(in[3], in[2], _MM_SHUFFLE(0, 0, 0, 0));
+
+               __m128 Swp00 = _mm_shuffle_ps(in[2], in[1], _MM_SHUFFLE(0, 0, 0, 0));
+               __m128 Swp01 = _mm_shuffle_ps(Swp0a, Swp0a, _MM_SHUFFLE(2, 0, 0, 0));
+               __m128 Swp02 = _mm_shuffle_ps(Swp0b, Swp0b, _MM_SHUFFLE(2, 0, 0, 0));
+               __m128 Swp03 = _mm_shuffle_ps(in[2], in[1], _MM_SHUFFLE(2, 2, 2, 2));
+
+               __m128 Mul00 = _mm_mul_ps(Swp00, Swp01);
+               __m128 Mul01 = _mm_mul_ps(Swp02, Swp03);
+               Fac4 = _mm_sub_ps(Mul00, Mul01);
+       }
+
+       __m128 Fac5;
+       {
+               //      valType SubFactor05 = m[2][0] * m[3][1] - m[3][0] * m[2][1];
+               //      valType SubFactor05 = m[2][0] * m[3][1] - m[3][0] * m[2][1];
+               //      valType SubFactor12 = m[1][0] * m[3][1] - m[3][0] * m[1][1];
+               //      valType SubFactor18 = m[1][0] * m[2][1] - m[2][0] * m[1][1];
+
+               __m128 Swp0a = _mm_shuffle_ps(in[3], in[2], _MM_SHUFFLE(1, 1, 1, 1));
+               __m128 Swp0b = _mm_shuffle_ps(in[3], in[2], _MM_SHUFFLE(0, 0, 0, 0));
+
+               __m128 Swp00 = _mm_shuffle_ps(in[2], in[1], _MM_SHUFFLE(0, 0, 0, 0));
+               __m128 Swp01 = _mm_shuffle_ps(Swp0a, Swp0a, _MM_SHUFFLE(2, 0, 0, 0));
+               __m128 Swp02 = _mm_shuffle_ps(Swp0b, Swp0b, _MM_SHUFFLE(2, 0, 0, 0));
+               __m128 Swp03 = _mm_shuffle_ps(in[2], in[1], _MM_SHUFFLE(1, 1, 1, 1));
+
+               __m128 Mul00 = _mm_mul_ps(Swp00, Swp01);
+               __m128 Mul01 = _mm_mul_ps(Swp02, Swp03);
+               Fac5 = _mm_sub_ps(Mul00, Mul01);
+       }
+
+       __m128 SignA = _mm_set_ps( 1.0f,-1.0f, 1.0f,-1.0f);
+       __m128 SignB = _mm_set_ps(-1.0f, 1.0f,-1.0f, 1.0f);
+
+       // m[1][0]
+       // m[0][0]
+       // m[0][0]
+       // m[0][0]
+       __m128 Temp0 = _mm_shuffle_ps(in[1], in[0], _MM_SHUFFLE(0, 0, 0, 0));
+       __m128 Vec0 = _mm_shuffle_ps(Temp0, Temp0, _MM_SHUFFLE(2, 2, 2, 0));
+
+       // m[1][1]
+       // m[0][1]
+       // m[0][1]
+       // m[0][1]
+       __m128 Temp1 = _mm_shuffle_ps(in[1], in[0], _MM_SHUFFLE(1, 1, 1, 1));
+       __m128 Vec1 = _mm_shuffle_ps(Temp1, Temp1, _MM_SHUFFLE(2, 2, 2, 0));
+
+       // m[1][2]
+       // m[0][2]
+       // m[0][2]
+       // m[0][2]
+       __m128 Temp2 = _mm_shuffle_ps(in[1], in[0], _MM_SHUFFLE(2, 2, 2, 2));
+       __m128 Vec2 = _mm_shuffle_ps(Temp2, Temp2, _MM_SHUFFLE(2, 2, 2, 0));
+
+       // m[1][3]
+       // m[0][3]
+       // m[0][3]
+       // m[0][3]
+       __m128 Temp3 = _mm_shuffle_ps(in[1], in[0], _MM_SHUFFLE(3, 3, 3, 3));
+       __m128 Vec3 = _mm_shuffle_ps(Temp3, Temp3, _MM_SHUFFLE(2, 2, 2, 0));
+
+       // col0
+       // + (Vec1[0] * Fac0[0] - Vec2[0] * Fac1[0] + Vec3[0] * Fac2[0]),
+       // - (Vec1[1] * Fac0[1] - Vec2[1] * Fac1[1] + Vec3[1] * Fac2[1]),
+       // + (Vec1[2] * Fac0[2] - Vec2[2] * Fac1[2] + Vec3[2] * Fac2[2]),
+       // - (Vec1[3] * Fac0[3] - Vec2[3] * Fac1[3] + Vec3[3] * Fac2[3]),
+       __m128 Mul00 = _mm_mul_ps(Vec1, Fac0);
+       __m128 Mul01 = _mm_mul_ps(Vec2, Fac1);
+       __m128 Mul02 = _mm_mul_ps(Vec3, Fac2);
+       __m128 Sub00 = _mm_sub_ps(Mul00, Mul01);
+       __m128 Add00 = _mm_add_ps(Sub00, Mul02);
+       __m128 Inv0 = _mm_mul_ps(SignB, Add00);
+
+       // col1
+       // - (Vec0[0] * Fac0[0] - Vec2[0] * Fac3[0] + Vec3[0] * Fac4[0]),
+       // + (Vec0[0] * Fac0[1] - Vec2[1] * Fac3[1] + Vec3[1] * Fac4[1]),
+       // - (Vec0[0] * Fac0[2] - Vec2[2] * Fac3[2] + Vec3[2] * Fac4[2]),
+       // + (Vec0[0] * Fac0[3] - Vec2[3] * Fac3[3] + Vec3[3] * Fac4[3]),
+       __m128 Mul03 = _mm_mul_ps(Vec0, Fac0);
+       __m128 Mul04 = _mm_mul_ps(Vec2, Fac3);
+       __m128 Mul05 = _mm_mul_ps(Vec3, Fac4);
+       __m128 Sub01 = _mm_sub_ps(Mul03, Mul04);
+       __m128 Add01 = _mm_add_ps(Sub01, Mul05);
+       __m128 Inv1 = _mm_mul_ps(SignA, Add01);
+
+       // col2
+       // + (Vec0[0] * Fac1[0] - Vec1[0] * Fac3[0] + Vec3[0] * Fac5[0]),
+       // - (Vec0[0] * Fac1[1] - Vec1[1] * Fac3[1] + Vec3[1] * Fac5[1]),
+       // + (Vec0[0] * Fac1[2] - Vec1[2] * Fac3[2] + Vec3[2] * Fac5[2]),
+       // - (Vec0[0] * Fac1[3] - Vec1[3] * Fac3[3] + Vec3[3] * Fac5[3]),
+       __m128 Mul06 = _mm_mul_ps(Vec0, Fac1);
+       __m128 Mul07 = _mm_mul_ps(Vec1, Fac3);
+       __m128 Mul08 = _mm_mul_ps(Vec3, Fac5);
+       __m128 Sub02 = _mm_sub_ps(Mul06, Mul07);
+       __m128 Add02 = _mm_add_ps(Sub02, Mul08);
+       __m128 Inv2 = _mm_mul_ps(SignB, Add02);
+
+       // col3
+       // - (Vec1[0] * Fac2[0] - Vec1[0] * Fac4[0] + Vec2[0] * Fac5[0]),
+       // + (Vec1[0] * Fac2[1] - Vec1[1] * Fac4[1] + Vec2[1] * Fac5[1]),
+       // - (Vec1[0] * Fac2[2] - Vec1[2] * Fac4[2] + Vec2[2] * Fac5[2]),
+       // + (Vec1[0] * Fac2[3] - Vec1[3] * Fac4[3] + Vec2[3] * Fac5[3]));
+       __m128 Mul09 = _mm_mul_ps(Vec0, Fac2);
+       __m128 Mul10 = _mm_mul_ps(Vec1, Fac4);
+       __m128 Mul11 = _mm_mul_ps(Vec2, Fac5);
+       __m128 Sub03 = _mm_sub_ps(Mul09, Mul10);
+       __m128 Add03 = _mm_add_ps(Sub03, Mul11);
+       __m128 Inv3 = _mm_mul_ps(SignA, Add03);
+
+       __m128 Row0 = _mm_shuffle_ps(Inv0, Inv1, _MM_SHUFFLE(0, 0, 0, 0));
+       __m128 Row1 = _mm_shuffle_ps(Inv2, Inv3, _MM_SHUFFLE(0, 0, 0, 0));
+       __m128 Row2 = _mm_shuffle_ps(Row0, Row1, _MM_SHUFFLE(2, 0, 2, 0));
+
+       //      valType Determinant = m[0][0] * Inverse[0][0] 
+       //                                              + m[0][1] * Inverse[1][0] 
+       //                                              + m[0][2] * Inverse[2][0] 
+       //                                              + m[0][3] * Inverse[3][0];
+       __m128 Det0 = sse_dot_ps(in[0], Row2);
+       __m128 Rcp0 = _mm_div_ps(one, Det0);
+       //__m128 Rcp0 = _mm_rcp_ps(Det0);
+
+       //      Inverse /= Determinant;
+       out[0] = _mm_mul_ps(Inv0, Rcp0);
+       out[1] = _mm_mul_ps(Inv1, Rcp0);
+       out[2] = _mm_mul_ps(Inv2, Rcp0);
+       out[3] = _mm_mul_ps(Inv3, Rcp0);
+}
+
+GLM_FUNC_QUALIFIER void sse_inverse_fast_ps(__m128 const in[4], __m128 out[4])
+{
+       __m128 Fac0;
+       {
+               //      valType SubFactor00 = m[2][2] * m[3][3] - m[3][2] * m[2][3];
+               //      valType SubFactor00 = m[2][2] * m[3][3] - m[3][2] * m[2][3];
+               //      valType SubFactor06 = m[1][2] * m[3][3] - m[3][2] * m[1][3];
+               //      valType SubFactor13 = m[1][2] * m[2][3] - m[2][2] * m[1][3];
+
+               __m128 Swp0a = _mm_shuffle_ps(in[3], in[2], _MM_SHUFFLE(3, 3, 3, 3));
+               __m128 Swp0b = _mm_shuffle_ps(in[3], in[2], _MM_SHUFFLE(2, 2, 2, 2));
+
+               __m128 Swp00 = _mm_shuffle_ps(in[2], in[1], _MM_SHUFFLE(2, 2, 2, 2));
+               __m128 Swp01 = _mm_shuffle_ps(Swp0a, Swp0a, _MM_SHUFFLE(2, 0, 0, 0));
+               __m128 Swp02 = _mm_shuffle_ps(Swp0b, Swp0b, _MM_SHUFFLE(2, 0, 0, 0));
+               __m128 Swp03 = _mm_shuffle_ps(in[2], in[1], _MM_SHUFFLE(3, 3, 3, 3));
+
+               __m128 Mul00 = _mm_mul_ps(Swp00, Swp01);
+               __m128 Mul01 = _mm_mul_ps(Swp02, Swp03);
+               Fac0 = _mm_sub_ps(Mul00, Mul01);
+       }
+
+       __m128 Fac1;
+       {
+               //      valType SubFactor01 = m[2][1] * m[3][3] - m[3][1] * m[2][3];
+               //      valType SubFactor01 = m[2][1] * m[3][3] - m[3][1] * m[2][3];
+               //      valType SubFactor07 = m[1][1] * m[3][3] - m[3][1] * m[1][3];
+               //      valType SubFactor14 = m[1][1] * m[2][3] - m[2][1] * m[1][3];
+
+               __m128 Swp0a = _mm_shuffle_ps(in[3], in[2], _MM_SHUFFLE(3, 3, 3, 3));
+               __m128 Swp0b = _mm_shuffle_ps(in[3], in[2], _MM_SHUFFLE(1, 1, 1, 1));
+
+               __m128 Swp00 = _mm_shuffle_ps(in[2], in[1], _MM_SHUFFLE(1, 1, 1, 1));
+               __m128 Swp01 = _mm_shuffle_ps(Swp0a, Swp0a, _MM_SHUFFLE(2, 0, 0, 0));
+               __m128 Swp02 = _mm_shuffle_ps(Swp0b, Swp0b, _MM_SHUFFLE(2, 0, 0, 0));
+               __m128 Swp03 = _mm_shuffle_ps(in[2], in[1], _MM_SHUFFLE(3, 3, 3, 3));
+
+               __m128 Mul00 = _mm_mul_ps(Swp00, Swp01);
+               __m128 Mul01 = _mm_mul_ps(Swp02, Swp03);
+               Fac1 = _mm_sub_ps(Mul00, Mul01);
+       }
+
+
+       __m128 Fac2;
+       {
+               //      valType SubFactor02 = m[2][1] * m[3][2] - m[3][1] * m[2][2];
+               //      valType SubFactor02 = m[2][1] * m[3][2] - m[3][1] * m[2][2];
+               //      valType SubFactor08 = m[1][1] * m[3][2] - m[3][1] * m[1][2];
+               //      valType SubFactor15 = m[1][1] * m[2][2] - m[2][1] * m[1][2];
+
+               __m128 Swp0a = _mm_shuffle_ps(in[3], in[2], _MM_SHUFFLE(2, 2, 2, 2));
+               __m128 Swp0b = _mm_shuffle_ps(in[3], in[2], _MM_SHUFFLE(1, 1, 1, 1));
+
+               __m128 Swp00 = _mm_shuffle_ps(in[2], in[1], _MM_SHUFFLE(1, 1, 1, 1));
+               __m128 Swp01 = _mm_shuffle_ps(Swp0a, Swp0a, _MM_SHUFFLE(2, 0, 0, 0));
+               __m128 Swp02 = _mm_shuffle_ps(Swp0b, Swp0b, _MM_SHUFFLE(2, 0, 0, 0));
+               __m128 Swp03 = _mm_shuffle_ps(in[2], in[1], _MM_SHUFFLE(2, 2, 2, 2));
+
+               __m128 Mul00 = _mm_mul_ps(Swp00, Swp01);
+               __m128 Mul01 = _mm_mul_ps(Swp02, Swp03);
+               Fac2 = _mm_sub_ps(Mul00, Mul01);
+       }
+
+       __m128 Fac3;
+       {
+               //      valType SubFactor03 = m[2][0] * m[3][3] - m[3][0] * m[2][3];
+               //      valType SubFactor03 = m[2][0] * m[3][3] - m[3][0] * m[2][3];
+               //      valType SubFactor09 = m[1][0] * m[3][3] - m[3][0] * m[1][3];
+               //      valType SubFactor16 = m[1][0] * m[2][3] - m[2][0] * m[1][3];
+
+               __m128 Swp0a = _mm_shuffle_ps(in[3], in[2], _MM_SHUFFLE(3, 3, 3, 3));
+               __m128 Swp0b = _mm_shuffle_ps(in[3], in[2], _MM_SHUFFLE(0, 0, 0, 0));
+
+               __m128 Swp00 = _mm_shuffle_ps(in[2], in[1], _MM_SHUFFLE(0, 0, 0, 0));
+               __m128 Swp01 = _mm_shuffle_ps(Swp0a, Swp0a, _MM_SHUFFLE(2, 0, 0, 0));
+               __m128 Swp02 = _mm_shuffle_ps(Swp0b, Swp0b, _MM_SHUFFLE(2, 0, 0, 0));
+               __m128 Swp03 = _mm_shuffle_ps(in[2], in[1], _MM_SHUFFLE(3, 3, 3, 3));
+
+               __m128 Mul00 = _mm_mul_ps(Swp00, Swp01);
+               __m128 Mul01 = _mm_mul_ps(Swp02, Swp03);
+               Fac3 = _mm_sub_ps(Mul00, Mul01);
+       }
+
+       __m128 Fac4;
+       {
+               //      valType SubFactor04 = m[2][0] * m[3][2] - m[3][0] * m[2][2];
+               //      valType SubFactor04 = m[2][0] * m[3][2] - m[3][0] * m[2][2];
+               //      valType SubFactor10 = m[1][0] * m[3][2] - m[3][0] * m[1][2];
+               //      valType SubFactor17 = m[1][0] * m[2][2] - m[2][0] * m[1][2];
+
+               __m128 Swp0a = _mm_shuffle_ps(in[3], in[2], _MM_SHUFFLE(2, 2, 2, 2));
+               __m128 Swp0b = _mm_shuffle_ps(in[3], in[2], _MM_SHUFFLE(0, 0, 0, 0));
+
+               __m128 Swp00 = _mm_shuffle_ps(in[2], in[1], _MM_SHUFFLE(0, 0, 0, 0));
+               __m128 Swp01 = _mm_shuffle_ps(Swp0a, Swp0a, _MM_SHUFFLE(2, 0, 0, 0));
+               __m128 Swp02 = _mm_shuffle_ps(Swp0b, Swp0b, _MM_SHUFFLE(2, 0, 0, 0));
+               __m128 Swp03 = _mm_shuffle_ps(in[2], in[1], _MM_SHUFFLE(2, 2, 2, 2));
+
+               __m128 Mul00 = _mm_mul_ps(Swp00, Swp01);
+               __m128 Mul01 = _mm_mul_ps(Swp02, Swp03);
+               Fac4 = _mm_sub_ps(Mul00, Mul01);
+       }
+
+       __m128 Fac5;
+       {
+               //      valType SubFactor05 = m[2][0] * m[3][1] - m[3][0] * m[2][1];
+               //      valType SubFactor05 = m[2][0] * m[3][1] - m[3][0] * m[2][1];
+               //      valType SubFactor12 = m[1][0] * m[3][1] - m[3][0] * m[1][1];
+               //      valType SubFactor18 = m[1][0] * m[2][1] - m[2][0] * m[1][1];
+
+               __m128 Swp0a = _mm_shuffle_ps(in[3], in[2], _MM_SHUFFLE(1, 1, 1, 1));
+               __m128 Swp0b = _mm_shuffle_ps(in[3], in[2], _MM_SHUFFLE(0, 0, 0, 0));
+
+               __m128 Swp00 = _mm_shuffle_ps(in[2], in[1], _MM_SHUFFLE(0, 0, 0, 0));
+               __m128 Swp01 = _mm_shuffle_ps(Swp0a, Swp0a, _MM_SHUFFLE(2, 0, 0, 0));
+               __m128 Swp02 = _mm_shuffle_ps(Swp0b, Swp0b, _MM_SHUFFLE(2, 0, 0, 0));
+               __m128 Swp03 = _mm_shuffle_ps(in[2], in[1], _MM_SHUFFLE(1, 1, 1, 1));
+
+               __m128 Mul00 = _mm_mul_ps(Swp00, Swp01);
+               __m128 Mul01 = _mm_mul_ps(Swp02, Swp03);
+               Fac5 = _mm_sub_ps(Mul00, Mul01);
+       }
+
+       __m128 SignA = _mm_set_ps( 1.0f,-1.0f, 1.0f,-1.0f);
+       __m128 SignB = _mm_set_ps(-1.0f, 1.0f,-1.0f, 1.0f);
+
+       // m[1][0]
+       // m[0][0]
+       // m[0][0]
+       // m[0][0]
+       __m128 Temp0 = _mm_shuffle_ps(in[1], in[0], _MM_SHUFFLE(0, 0, 0, 0));
+       __m128 Vec0 = _mm_shuffle_ps(Temp0, Temp0, _MM_SHUFFLE(2, 2, 2, 0));
+
+       // m[1][1]
+       // m[0][1]
+       // m[0][1]
+       // m[0][1]
+       __m128 Temp1 = _mm_shuffle_ps(in[1], in[0], _MM_SHUFFLE(1, 1, 1, 1));
+       __m128 Vec1 = _mm_shuffle_ps(Temp1, Temp1, _MM_SHUFFLE(2, 2, 2, 0));
+
+       // m[1][2]
+       // m[0][2]
+       // m[0][2]
+       // m[0][2]
+       __m128 Temp2 = _mm_shuffle_ps(in[1], in[0], _MM_SHUFFLE(2, 2, 2, 2));
+       __m128 Vec2 = _mm_shuffle_ps(Temp2, Temp2, _MM_SHUFFLE(2, 2, 2, 0));
+
+       // m[1][3]
+       // m[0][3]
+       // m[0][3]
+       // m[0][3]
+       __m128 Temp3 = _mm_shuffle_ps(in[1], in[0], _MM_SHUFFLE(3, 3, 3, 3));
+       __m128 Vec3 = _mm_shuffle_ps(Temp3, Temp3, _MM_SHUFFLE(2, 2, 2, 0));
+
+       // col0
+       // + (Vec1[0] * Fac0[0] - Vec2[0] * Fac1[0] + Vec3[0] * Fac2[0]),
+       // - (Vec1[1] * Fac0[1] - Vec2[1] * Fac1[1] + Vec3[1] * Fac2[1]),
+       // + (Vec1[2] * Fac0[2] - Vec2[2] * Fac1[2] + Vec3[2] * Fac2[2]),
+       // - (Vec1[3] * Fac0[3] - Vec2[3] * Fac1[3] + Vec3[3] * Fac2[3]),
+       __m128 Mul00 = _mm_mul_ps(Vec1, Fac0);
+       __m128 Mul01 = _mm_mul_ps(Vec2, Fac1);
+       __m128 Mul02 = _mm_mul_ps(Vec3, Fac2);
+       __m128 Sub00 = _mm_sub_ps(Mul00, Mul01);
+       __m128 Add00 = _mm_add_ps(Sub00, Mul02);
+       __m128 Inv0 = _mm_mul_ps(SignB, Add00);
+
+       // col1
+       // - (Vec0[0] * Fac0[0] - Vec2[0] * Fac3[0] + Vec3[0] * Fac4[0]),
+       // + (Vec0[0] * Fac0[1] - Vec2[1] * Fac3[1] + Vec3[1] * Fac4[1]),
+       // - (Vec0[0] * Fac0[2] - Vec2[2] * Fac3[2] + Vec3[2] * Fac4[2]),
+       // + (Vec0[0] * Fac0[3] - Vec2[3] * Fac3[3] + Vec3[3] * Fac4[3]),
+       __m128 Mul03 = _mm_mul_ps(Vec0, Fac0);
+       __m128 Mul04 = _mm_mul_ps(Vec2, Fac3);
+       __m128 Mul05 = _mm_mul_ps(Vec3, Fac4);
+       __m128 Sub01 = _mm_sub_ps(Mul03, Mul04);
+       __m128 Add01 = _mm_add_ps(Sub01, Mul05);
+       __m128 Inv1 = _mm_mul_ps(SignA, Add01);
+
+       // col2
+       // + (Vec0[0] * Fac1[0] - Vec1[0] * Fac3[0] + Vec3[0] * Fac5[0]),
+       // - (Vec0[0] * Fac1[1] - Vec1[1] * Fac3[1] + Vec3[1] * Fac5[1]),
+       // + (Vec0[0] * Fac1[2] - Vec1[2] * Fac3[2] + Vec3[2] * Fac5[2]),
+       // - (Vec0[0] * Fac1[3] - Vec1[3] * Fac3[3] + Vec3[3] * Fac5[3]),
+       __m128 Mul06 = _mm_mul_ps(Vec0, Fac1);
+       __m128 Mul07 = _mm_mul_ps(Vec1, Fac3);
+       __m128 Mul08 = _mm_mul_ps(Vec3, Fac5);
+       __m128 Sub02 = _mm_sub_ps(Mul06, Mul07);
+       __m128 Add02 = _mm_add_ps(Sub02, Mul08);
+       __m128 Inv2 = _mm_mul_ps(SignB, Add02);
+
+       // col3
+       // - (Vec1[0] * Fac2[0] - Vec1[0] * Fac4[0] + Vec2[0] * Fac5[0]),
+       // + (Vec1[0] * Fac2[1] - Vec1[1] * Fac4[1] + Vec2[1] * Fac5[1]),
+       // - (Vec1[0] * Fac2[2] - Vec1[2] * Fac4[2] + Vec2[2] * Fac5[2]),
+       // + (Vec1[0] * Fac2[3] - Vec1[3] * Fac4[3] + Vec2[3] * Fac5[3]));
+       __m128 Mul09 = _mm_mul_ps(Vec0, Fac2);
+       __m128 Mul10 = _mm_mul_ps(Vec1, Fac4);
+       __m128 Mul11 = _mm_mul_ps(Vec2, Fac5);
+       __m128 Sub03 = _mm_sub_ps(Mul09, Mul10);
+       __m128 Add03 = _mm_add_ps(Sub03, Mul11);
+       __m128 Inv3 = _mm_mul_ps(SignA, Add03);
+
+       __m128 Row0 = _mm_shuffle_ps(Inv0, Inv1, _MM_SHUFFLE(0, 0, 0, 0));
+       __m128 Row1 = _mm_shuffle_ps(Inv2, Inv3, _MM_SHUFFLE(0, 0, 0, 0));
+       __m128 Row2 = _mm_shuffle_ps(Row0, Row1, _MM_SHUFFLE(2, 0, 2, 0));
+
+       //      valType Determinant = m[0][0] * Inverse[0][0] 
+       //                                              + m[0][1] * Inverse[1][0] 
+       //                                              + m[0][2] * Inverse[2][0] 
+       //                                              + m[0][3] * Inverse[3][0];
+       __m128 Det0 = sse_dot_ps(in[0], Row2);
+       __m128 Rcp0 = _mm_rcp_ps(Det0);
+       //__m128 Rcp0 = _mm_div_ps(one, Det0);
+       //      Inverse /= Determinant;
+       out[0] = _mm_mul_ps(Inv0, Rcp0);
+       out[1] = _mm_mul_ps(Inv1, Rcp0);
+       out[2] = _mm_mul_ps(Inv2, Rcp0);
+       out[3] = _mm_mul_ps(Inv3, Rcp0);
+}
+/*
+GLM_FUNC_QUALIFIER void sse_rotate_ps(__m128 const in[4], float Angle, float const v[3], __m128 out[4])
+{
+       float a = glm::radians(Angle);
+    float c = cos(a);
+    float s = sin(a);
+
+       glm::vec4 AxisA(v[0], v[1], v[2], float(0));
+       __m128 AxisB = _mm_set_ps(AxisA.w, AxisA.z, AxisA.y, AxisA.x);
+    __m128 AxisC = detail::sse_nrm_ps(AxisB);
+
+       __m128 Cos0 = _mm_set_ss(c);
+       __m128 CosA = _mm_shuffle_ps(Cos0, Cos0, _MM_SHUFFLE(0, 0, 0, 0));
+       __m128 Sin0 = _mm_set_ss(s);
+       __m128 SinA = _mm_shuffle_ps(Sin0, Sin0, _MM_SHUFFLE(0, 0, 0, 0));
+
+       // tvec3<T, P> temp = (valType(1) - c) * axis;
+       __m128 Temp0 = _mm_sub_ps(one, CosA);
+       __m128 Temp1 = _mm_mul_ps(Temp0, AxisC);
+       
+       //Rotate[0][0] = c + temp[0] * axis[0];
+       //Rotate[0][1] = 0 + temp[0] * axis[1] + s * axis[2];
+       //Rotate[0][2] = 0 + temp[0] * axis[2] - s * axis[1];
+       __m128 Axis0 = _mm_shuffle_ps(AxisC, AxisC, _MM_SHUFFLE(0, 0, 0, 0));
+       __m128 TmpA0 = _mm_mul_ps(Axis0, AxisC);
+       __m128 CosA0 = _mm_shuffle_ps(Cos0, Cos0, _MM_SHUFFLE(1, 1, 1, 0));
+       __m128 TmpA1 = _mm_add_ps(CosA0, TmpA0);
+       __m128 SinA0 = SinA;//_mm_set_ps(0.0f, s, -s, 0.0f);
+       __m128 TmpA2 = _mm_shuffle_ps(AxisC, AxisC, _MM_SHUFFLE(3, 1, 2, 3));
+       __m128 TmpA3 = _mm_mul_ps(SinA0, TmpA2);
+       __m128 TmpA4 = _mm_add_ps(TmpA1, TmpA3);
+
+       //Rotate[1][0] = 0 + temp[1] * axis[0] - s * axis[2];
+       //Rotate[1][1] = c + temp[1] * axis[1];
+       //Rotate[1][2] = 0 + temp[1] * axis[2] + s * axis[0];
+       __m128 Axis1 = _mm_shuffle_ps(AxisC, AxisC, _MM_SHUFFLE(1, 1, 1, 1));
+       __m128 TmpB0 = _mm_mul_ps(Axis1, AxisC);
+       __m128 CosA1 = _mm_shuffle_ps(Cos0, Cos0, _MM_SHUFFLE(1, 1, 0, 1));
+       __m128 TmpB1 = _mm_add_ps(CosA1, TmpB0);
+       __m128 SinB0 = SinA;//_mm_set_ps(-s, 0.0f, s, 0.0f);
+       __m128 TmpB2 = _mm_shuffle_ps(AxisC, AxisC, _MM_SHUFFLE(3, 0, 3, 2));
+       __m128 TmpB3 = _mm_mul_ps(SinA0, TmpB2);
+       __m128 TmpB4 = _mm_add_ps(TmpB1, TmpB3);
+
+    //Rotate[2][0] = 0 + temp[2] * axis[0] + s * axis[1];
+    //Rotate[2][1] = 0 + temp[2] * axis[1] - s * axis[0];
+    //Rotate[2][2] = c + temp[2] * axis[2];
+       __m128 Axis2 = _mm_shuffle_ps(AxisC, AxisC, _MM_SHUFFLE(2, 2, 2, 2));
+       __m128 TmpC0 = _mm_mul_ps(Axis2, AxisC);
+       __m128 CosA2 = _mm_shuffle_ps(Cos0, Cos0, _MM_SHUFFLE(1, 0, 1, 1));
+       __m128 TmpC1 = _mm_add_ps(CosA2, TmpC0);
+       __m128 SinC0 = SinA;//_mm_set_ps(s, -s, 0.0f, 0.0f);
+       __m128 TmpC2 = _mm_shuffle_ps(AxisC, AxisC, _MM_SHUFFLE(3, 3, 0, 1));
+       __m128 TmpC3 = _mm_mul_ps(SinA0, TmpC2);
+       __m128 TmpC4 = _mm_add_ps(TmpC1, TmpC3);
+
+       __m128 Result[4];
+       Result[0] = TmpA4;
+       Result[1] = TmpB4;
+       Result[2] = TmpC4;
+       Result[3] = _mm_set_ps(1, 0, 0, 0);
+
+       //tmat4x4<valType> Result(uninitialize);
+       //Result[0] = m[0] * Rotate[0][0] + m[1] * Rotate[0][1] + m[2] * Rotate[0][2];
+       //Result[1] = m[0] * Rotate[1][0] + m[1] * Rotate[1][1] + m[2] * Rotate[1][2];
+       //Result[2] = m[0] * Rotate[2][0] + m[1] * Rotate[2][1] + m[2] * Rotate[2][2];
+       //Result[3] = m[3];
+       //return Result;
+       sse_mul_ps(in, Result, out);
+}
+*/
+GLM_FUNC_QUALIFIER void sse_outer_ps(__m128 const & c, __m128 const & r, __m128 out[4])
+{
+       out[0] = _mm_mul_ps(c, _mm_shuffle_ps(r, r, _MM_SHUFFLE(0, 0, 0, 0)));
+       out[1] = _mm_mul_ps(c, _mm_shuffle_ps(r, r, _MM_SHUFFLE(1, 1, 1, 1)));
+       out[2] = _mm_mul_ps(c, _mm_shuffle_ps(r, r, _MM_SHUFFLE(2, 2, 2, 2)));
+       out[3] = _mm_mul_ps(c, _mm_shuffle_ps(r, r, _MM_SHUFFLE(3, 3, 3, 3)));
+}
+
+}//namespace detail
+}//namespace glm
diff --git a/include/glm/detail/intrinsic_trigonometric.hpp b/include/glm/detail/intrinsic_trigonometric.hpp
new file mode 100644 (file)
index 0000000..bf2c9e2
--- /dev/null
@@ -0,0 +1,46 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref core
+/// @file glm/detail/intrinsic_trigonometric.hpp
+/// @date 2009-06-09 / 2011-06-15
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////
+
+#pragma once
+
+#include "setup.hpp"
+
+#if(!(GLM_ARCH & GLM_ARCH_SSE2))
+#      error "SSE2 instructions not supported or enabled"
+#else
+
+namespace glm{
+namespace detail
+{
+
+}//namespace detail
+}//namespace glm
+
+#include "intrinsic_trigonometric.inl"
+
+#endif//GLM_ARCH
diff --git a/include/glm/detail/intrinsic_trigonometric.inl b/include/glm/detail/intrinsic_trigonometric.inl
new file mode 100644 (file)
index 0000000..5941ca3
--- /dev/null
@@ -0,0 +1,27 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref core
+/// @file glm/detail/intrinsic_trigonometric.inl
+/// @date 2011-06-15 / 2011-06-15
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////
diff --git a/include/glm/detail/intrinsic_vector_relational.hpp b/include/glm/detail/intrinsic_vector_relational.hpp
new file mode 100644 (file)
index 0000000..fe7e902
--- /dev/null
@@ -0,0 +1,46 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref core
+/// @file glm/detail/intrinsic_vector_relational.hpp
+/// @date 2009-06-09 / 2011-06-15
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////
+
+#pragma once
+
+#include "setup.hpp"
+
+#if(!(GLM_ARCH & GLM_ARCH_SSE2))
+#      error "SSE2 instructions not supported or enabled"
+#else
+
+namespace glm{
+namespace detail
+{
+
+}//namespace detail
+}//namespace glm
+
+#include "intrinsic_vector_relational.inl"
+
+#endif//GLM_ARCH
diff --git a/include/glm/detail/intrinsic_vector_relational.inl b/include/glm/detail/intrinsic_vector_relational.inl
new file mode 100644 (file)
index 0000000..e7445ed
--- /dev/null
@@ -0,0 +1,366 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref core
+/// @file glm/detail/intrinsic_vector_relational.inl
+/// @date 2009-06-09 / 2011-06-15
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////
+//
+//// lessThan
+//template <typename valType>
+//GLM_FUNC_QUALIFIER typename tvec2<T, P>::bool_type lessThan
+//(
+//     tvec2<T, P> const & x, 
+//     tvec2<T, P> const & y
+//)
+//{
+//     GLM_STATIC_ASSERT(
+//             detail::type<valType>::is_float || 
+//             detail::type<valType>::is_int || 
+//             detail::type<valType>::is_uint);
+//
+//    return typename tvec2<bool>::bool_type(x.x < y.x, x.y < y.y);
+//}
+//
+//template <typename valType>
+//GLM_FUNC_QUALIFIER typename tvec3<T, P>::bool_type lessThan
+//(
+//     tvec3<T, P> const & x, 
+//     tvec3<T, P> const & y
+//)
+//{
+//     GLM_STATIC_ASSERT(
+//             detail::type<valType>::is_float || 
+//             detail::type<valType>::is_int || 
+//             detail::type<valType>::is_uint);
+//     
+//     return typename tvec3<bool>::bool_type(x.x < y.x, x.y < y.y, x.z < y.z);
+//}
+//
+//template <typename valType>
+//GLM_FUNC_QUALIFIER typename tvec4<T, P>::bool_type lessThan
+//(
+//     tvec4<T, P> const & x, 
+//     tvec4<T, P> const & y
+//)
+//{
+//     GLM_STATIC_ASSERT(
+//             detail::type<valType>::is_float || 
+//             detail::type<valType>::is_int || 
+//             detail::type<valType>::is_uint);
+//
+//     return typename tvec4<bool>::bool_type(x.x < y.x, x.y < y.y, x.z < y.z, x.w < y.w);
+//}
+//
+//// lessThanEqual
+//template <typename valType>
+//GLM_FUNC_QUALIFIER typename tvec2<T, P>::bool_type lessThanEqual
+//(
+//     tvec2<T, P> const & x, 
+//     tvec2<T, P> const & y
+//)
+//{
+//     GLM_STATIC_ASSERT(
+//             detail::type<valType>::is_float || 
+//             detail::type<valType>::is_int || 
+//             detail::type<valType>::is_uint);
+//
+//     return typename tvec2<bool>::bool_type(x.x <= y.x, x.y <= y.y);
+//}
+//
+//template <typename valType>
+//GLM_FUNC_QUALIFIER typename tvec3<T, P>::bool_type lessThanEqual
+//(
+//     tvec3<T, P> const & x, 
+//     tvec3<T, P> const & y
+//)
+//{
+//     GLM_STATIC_ASSERT(
+//             detail::type<valType>::is_float || 
+//             detail::type<valType>::is_int || 
+//             detail::type<valType>::is_uint);
+//     
+//     return typename tvec3<bool>::bool_type(x.x <= y.x, x.y <= y.y, x.z <= y.z);
+//}
+//
+//template <typename valType>
+//GLM_FUNC_QUALIFIER typename tvec4<T, P>::bool_type lessThanEqual
+//(
+//     tvec4<T, P> const & x, 
+//     tvec4<T, P> const & y
+//)
+//{
+//     GLM_STATIC_ASSERT(
+//             detail::type<valType>::is_float || 
+//             detail::type<valType>::is_int || 
+//             detail::type<valType>::is_uint);
+//     
+//     return typename tvec4<bool>::bool_type(x.x <= y.x, x.y <= y.y, x.z <= y.z, x.w <= y.w);
+//}
+//
+//// greaterThan
+//template <typename valType>
+//GLM_FUNC_QUALIFIER typename tvec2<T, P>::bool_type greaterThan
+//(
+//     tvec2<T, P> const & x, 
+//     tvec2<T, P> const & y
+//)
+//{
+//     GLM_STATIC_ASSERT(
+//             detail::type<valType>::is_float || 
+//             detail::type<valType>::is_int || 
+//             detail::type<valType>::is_uint);
+//
+//     return typename tvec2<bool>::bool_type(x.x > y.x, x.y > y.y);
+//}
+//
+//template <typename valType>
+//GLM_FUNC_QUALIFIER typename tvec3<T, P>::bool_type greaterThan
+//(
+//     tvec3<T, P> const & x, 
+//     tvec3<T, P> const & y
+//)
+//{
+//     GLM_STATIC_ASSERT(
+//             detail::type<valType>::is_float || 
+//             detail::type<valType>::is_int || 
+//             detail::type<valType>::is_uint);
+//     
+//     return typename tvec3<bool>::bool_type(x.x > y.x, x.y > y.y, x.z > y.z);
+//}
+//
+//template <typename valType>
+//GLM_FUNC_QUALIFIER typename tvec4<T, P>::bool_type greaterThan
+//(
+//     tvec4<T, P> const & x, 
+//     tvec4<T, P> const & y
+//)
+//{
+//     GLM_STATIC_ASSERT(
+//             detail::type<valType>::is_float || 
+//             detail::type<valType>::is_int || 
+//             detail::type<valType>::is_uint);
+//     
+//     return typename tvec4<bool>::bool_type(x.x > y.x, x.y > y.y, x.z > y.z, x.w > y.w);
+//}
+//
+//// greaterThanEqual
+//template <typename valType>
+//GLM_FUNC_QUALIFIER typename tvec2<T, P>::bool_type greaterThanEqual
+//(
+//     tvec2<T, P> const & x, 
+//     tvec2<T, P> const & y
+//)
+//{
+//     GLM_STATIC_ASSERT(
+//             detail::type<valType>::is_float || 
+//             detail::type<valType>::is_int || 
+//             detail::type<valType>::is_uint);
+//
+//     return typename tvec2<bool>::bool_type(x.x >= y.x, x.y >= y.y);
+//}
+//
+//template <typename valType>
+//GLM_FUNC_QUALIFIER typename tvec3<T, P>::bool_type greaterThanEqual
+//(
+//     tvec3<T, P> const & x, 
+//     tvec3<T, P> const & y
+//)
+//{
+//     GLM_STATIC_ASSERT(
+//             detail::type<valType>::is_float || 
+//             detail::type<valType>::is_int || 
+//             detail::type<valType>::is_uint);
+//
+//     return typename tvec3<bool>::bool_type(x.x >= y.x, x.y >= y.y, x.z >= y.z);
+//}
+//
+//template <typename valType>
+//GLM_FUNC_QUALIFIER typename tvec4<T, P>::bool_type greaterThanEqual
+//(
+//     tvec4<T, P> const & x, 
+//     tvec4<T, P> const & y
+//)
+//{
+//     GLM_STATIC_ASSERT(
+//             detail::type<valType>::is_float || 
+//             detail::type<valType>::is_int || 
+//             detail::type<valType>::is_uint);
+//
+//     return typename tvec4<bool>::bool_type(x.x >= y.x, x.y >= y.y, x.z >= y.z, x.w >= y.w);
+//}
+//
+//// equal
+//template <typename valType>
+//GLM_FUNC_QUALIFIER typename tvec2<T, P>::bool_type equal
+//(
+//     tvec2<T, P> const & x, 
+//     tvec2<T, P> const & y
+//)
+//{
+//     GLM_STATIC_ASSERT(
+//             detail::type<valType>::is_float || 
+//             detail::type<valType>::is_int || 
+//             detail::type<valType>::is_uint || 
+//             detail::type<valType>::is_bool);
+//
+//     return typename tvec2<T, P>::bool_type(x.x == y.x, x.y == y.y);
+//}
+//
+//template <typename valType>
+//GLM_FUNC_QUALIFIER typename tvec3<T, P>::bool_type equal
+//(
+//     tvec3<T, P> const & x, 
+//     tvec3<T, P> const & y
+//)
+//{
+//     GLM_STATIC_ASSERT(
+//             detail::type<valType>::is_float || 
+//             detail::type<valType>::is_int || 
+//             detail::type<valType>::is_uint || 
+//             detail::type<valType>::is_bool);
+//
+//     return typename tvec3<T, P>::bool_type(x.x == y.x, x.y == y.y, x.z == y.z);
+//}
+//
+//template <typename valType>
+//GLM_FUNC_QUALIFIER typename tvec4<T, P>::bool_type equal
+//(
+//     tvec4<T, P> const & x, 
+//     tvec4<T, P> const & y
+//)
+//{
+//     GLM_STATIC_ASSERT(
+//             detail::type<valType>::is_float || 
+//             detail::type<valType>::is_int || 
+//             detail::type<valType>::is_uint || 
+//             detail::type<valType>::is_bool);
+//
+//     return typename tvec4<T, P>::bool_type(x.x == y.x, x.y == y.y, x.z == y.z, x.w == y.w);
+//}
+//
+//// notEqual
+//template <typename valType>
+//GLM_FUNC_QUALIFIER typename tvec2<T, P>::bool_type notEqual
+//(
+//     tvec2<T, P> const & x, 
+//     tvec2<T, P> const & y
+//)
+//{
+//     GLM_STATIC_ASSERT(
+//             detail::type<valType>::is_float || 
+//             detail::type<valType>::is_int || 
+//             detail::type<valType>::is_uint || 
+//             detail::type<valType>::is_bool);
+//
+//     return typename tvec2<T, P>::bool_type(x.x != y.x, x.y != y.y);
+//}
+//
+//template <typename valType>
+//GLM_FUNC_QUALIFIER typename tvec3<T, P>::bool_type notEqual
+//(
+//     tvec3<T, P> const & x, 
+//     tvec3<T, P> const & y
+//)
+//{
+//     GLM_STATIC_ASSERT(
+//             detail::type<valType>::is_float || 
+//             detail::type<valType>::is_int || 
+//             detail::type<valType>::is_uint || 
+//             detail::type<valType>::is_bool);
+//
+//     return typename tvec3<T, P>::bool_type(x.x != y.x, x.y != y.y, x.z != y.z);
+//}
+//
+//template <typename valType>
+//GLM_FUNC_QUALIFIER typename tvec4<T, P>::bool_type notEqual
+//(
+//     tvec4<T, P> const & x, 
+//     tvec4<T, P> const & y
+//)
+//{
+//     GLM_STATIC_ASSERT(
+//             detail::type<valType>::is_float || 
+//             detail::type<valType>::is_int || 
+//             detail::type<valType>::is_uint || 
+//             detail::type<valType>::is_bool);
+//
+//     return typename tvec4<T, P>::bool_type(x.x != y.x, x.y != y.y, x.z != y.z, x.w != y.w);
+//}
+//
+//// any
+//GLM_FUNC_QUALIFIER bool any(tvec2<bool> const & x)
+//{
+//     return x.x || x.y;
+//}
+//
+//GLM_FUNC_QUALIFIER bool any(tvec3<bool> const & x)
+//{
+//    return x.x || x.y || x.z;
+//}
+//
+//GLM_FUNC_QUALIFIER bool any(tvec4<bool> const & x)
+//{
+//    return x.x || x.y || x.z || x.w;
+//}
+//
+//// all
+//GLM_FUNC_QUALIFIER bool all(const tvec2<bool>& x)
+//{
+//    return x.x && x.y;
+//}
+//
+//GLM_FUNC_QUALIFIER bool all(const tvec3<bool>& x)
+//{
+//    return x.x && x.y && x.z;
+//}
+//
+//GLM_FUNC_QUALIFIER bool all(const tvec4<bool>& x)
+//{
+//    return x.x && x.y && x.z && x.w;
+//}
+//
+//// not
+//GLM_FUNC_QUALIFIER tvec2<bool>::bool_type not_
+//(
+//     tvec2<bool> const & v
+//)
+//{
+//    return tvec2<bool>::bool_type(!v.x, !v.y);
+//}
+//
+//GLM_FUNC_QUALIFIER tvec3<bool>::bool_type not_
+//(
+//     tvec3<bool> const & v
+//)
+//{
+//    return tvec3<bool>::bool_type(!v.x, !v.y, !v.z);
+//}
+//
+//GLM_FUNC_QUALIFIER tvec4<bool>::bool_type not_
+//(
+//     tvec4<bool> const & v
+//)
+//{
+//    return tvec4<bool>::bool_type(!v.x, !v.y, !v.z, !v.w);
+//}
\ No newline at end of file
diff --git a/include/glm/detail/precision.hpp b/include/glm/detail/precision.hpp
new file mode 100644 (file)
index 0000000..2be5e23
--- /dev/null
@@ -0,0 +1,44 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+///
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref core
+/// @file glm/detail/precision.hpp
+/// @date 2013-04-01 / 2013-04-01
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////
+
+#pragma once
+
+namespace glm
+{
+       enum precision
+       {
+               highp,
+               mediump,
+               lowp,
+               defaultp = highp
+       };
+}//namespace glm
diff --git a/include/glm/detail/setup.hpp b/include/glm/detail/setup.hpp
new file mode 100644 (file)
index 0000000..969569f
--- /dev/null
@@ -0,0 +1,962 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref core
+/// @file glm/detail/setup.hpp
+/// @date 2006-11-13 / 2014-10-05
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////
+
+#pragma once
+
+#include <cassert>
+#include <cstddef>
+
+///////////////////////////////////////////////////////////////////////////////////
+// Version
+
+#define GLM_VERSION                                    96
+#define GLM_VERSION_MAJOR                      0
+#define GLM_VERSION_MINOR                      9
+#define GLM_VERSION_PATCH                      6
+#define GLM_VERSION_REVISION           3
+
+#if(defined(GLM_MESSAGES) && !defined(GLM_MESSAGE_VERSION_DISPLAYED))
+#      define GLM_MESSAGE_VERSION_DISPLAYED
+#      pragma message ("GLM: version 0.9.6.3")
+#endif//GLM_MESSAGE
+
+///////////////////////////////////////////////////////////////////////////////////
+// Platform
+
+#define GLM_PLATFORM_UNKNOWN           0x00000000
+#define GLM_PLATFORM_WINDOWS           0x00010000
+#define GLM_PLATFORM_LINUX                     0x00020000
+#define GLM_PLATFORM_APPLE                     0x00040000
+//#define GLM_PLATFORM_IOS                     0x00080000
+#define GLM_PLATFORM_ANDROID           0x00100000
+#define GLM_PLATFORM_CHROME_NACL       0x00200000
+#define GLM_PLATFORM_UNIX                      0x00400000
+#define GLM_PLATFORM_QNXNTO                    0x00800000
+#define GLM_PLATFORM_WINCE                     0x01000000
+
+#ifdef GLM_FORCE_PLATFORM_UNKNOWN
+#      define GLM_PLATFORM GLM_PLATFORM_UNKNOWN
+#elif defined(__QNXNTO__)
+#      define GLM_PLATFORM GLM_PLATFORM_QNXNTO
+#elif defined(__APPLE__)
+#      define GLM_PLATFORM GLM_PLATFORM_APPLE
+#elif defined(WINCE)
+#      define GLM_PLATFORM GLM_PLATFORM_WINCE
+#elif defined(_WIN32)
+#      define GLM_PLATFORM GLM_PLATFORM_WINDOWS
+#elif defined(__native_client__)
+#      define GLM_PLATFORM GLM_PLATFORM_CHROME_NACL
+#elif defined(__ANDROID__)
+#      define GLM_PLATFORM GLM_PLATFORM_ANDROID
+#elif defined(__linux)
+#      define GLM_PLATFORM GLM_PLATFORM_LINUX
+#elif defined(__unix)
+#      define GLM_PLATFORM GLM_PLATFORM_UNIX
+#else
+#      define GLM_PLATFORM GLM_PLATFORM_UNKNOWN
+#endif//
+
+// Report platform detection
+#if(defined(GLM_MESSAGES) && !defined(GLM_MESSAGE_PLATFORM_DISPLAYED))
+#      define GLM_MESSAGE_PLATFORM_DISPLAYED
+#      if(GLM_PLATFORM & GLM_PLATFORM_QNXNTO)
+#              pragma message("GLM: QNX platform detected")
+//#    elif(GLM_PLATFORM & GLM_PLATFORM_IOS)
+//#            pragma message("GLM: iOS platform detected")
+#      elif(GLM_PLATFORM & GLM_PLATFORM_APPLE)
+#              pragma message("GLM: Apple platform detected")
+#      elif(GLM_PLATFORM & GLM_PLATFORM_WINCE)
+#              pragma message("GLM: WinCE platform detected")
+#      elif(GLM_PLATFORM & GLM_PLATFORM_WINDOWS)
+#              pragma message("GLM: Windows platform detected")
+#      elif(GLM_PLATFORM & GLM_PLATFORM_CHROME_NACL)
+#              pragma message("GLM: Native Client detected")
+#      elif(GLM_PLATFORM & GLM_PLATFORM_ANDROID)
+#              pragma message("GLM: Android platform detected")
+#      elif(GLM_PLATFORM & GLM_PLATFORM_LINUX)
+#              pragma message("GLM: Linux platform detected")
+#      elif(GLM_PLATFORM & GLM_PLATFORM_UNIX)
+#              pragma message("GLM: UNIX platform detected")
+#      elif(GLM_PLATFORM & GLM_PLATFORM_UNKNOWN)
+#              pragma message("GLM: platform unknown")
+#      else
+#              pragma message("GLM: platform not detected")
+#      endif
+#endif//GLM_MESSAGE
+
+///////////////////////////////////////////////////////////////////////////////////
+// Compiler
+
+// User defines: GLM_FORCE_COMPILER_UNKNOWN
+// TODO ? __llvm__ 
+
+#define GLM_COMPILER_UNKNOWN           0x00000000
+
+// Intel
+#define GLM_COMPILER_INTEL                     0x00100000
+#define GLM_COMPILER_INTEL12           0x00100010
+#define GLM_COMPILER_INTEL12_1         0x00100020
+#define GLM_COMPILER_INTEL13           0x00100030
+#define GLM_COMPILER_INTEL14           0x00100040
+#define GLM_COMPILER_INTEL15           0x00100050
+
+// Visual C++ defines
+#define GLM_COMPILER_VC                                0x01000000
+#define GLM_COMPILER_VC2010                    0x01000090
+#define GLM_COMPILER_VC2012                    0x010000A0
+#define GLM_COMPILER_VC2013                    0x010000B0
+#define GLM_COMPILER_VC2015                    0x010000C0
+
+// GCC defines
+#define GLM_COMPILER_GCC                       0x02000000
+#define GLM_COMPILER_GCC44                     0x020000B0
+#define GLM_COMPILER_GCC45                     0x020000C0
+#define GLM_COMPILER_GCC46                     0x020000D0
+#define GLM_COMPILER_GCC47                     0x020000E0
+#define GLM_COMPILER_GCC48                     0x020000F0
+#define GLM_COMPILER_GCC49                     0x02000100
+#define GLM_COMPILER_GCC50                     0x02000200
+
+// CUDA
+#define GLM_COMPILER_CUDA                      0x10000000
+#define GLM_COMPILER_CUDA40                    0x10000040
+#define GLM_COMPILER_CUDA41                    0x10000050
+#define GLM_COMPILER_CUDA42                    0x10000060
+#define GLM_COMPILER_CUDA50                    0x10000070
+#define GLM_COMPILER_CUDA60                    0x10000080
+#define GLM_COMPILER_CUDA65                    0x10000090
+
+// LLVM
+#define GLM_COMPILER_LLVM                      0x20000000
+#define GLM_COMPILER_LLVM32                    0x20000030
+#define GLM_COMPILER_LLVM33                    0x20000040
+#define GLM_COMPILER_LLVM34                    0x20000050
+#define GLM_COMPILER_LLVM35                    0x20000060
+
+// Apple Clang
+#define GLM_COMPILER_APPLE_CLANG       0x40000000
+#define GLM_COMPILER_APPLE_CLANG40     0x40000010
+#define GLM_COMPILER_APPLE_CLANG41     0x40000020
+#define GLM_COMPILER_APPLE_CLANG42     0x40000030
+#define GLM_COMPILER_APPLE_CLANG50     0x40000040
+#define GLM_COMPILER_APPLE_CLANG51     0x40000050
+#define GLM_COMPILER_APPLE_CLANG60     0x40000060
+
+// Build model
+#define GLM_MODEL_32                           0x00000010
+#define GLM_MODEL_64                           0x00000020
+
+// Force generic C++ compiler
+#ifdef GLM_FORCE_COMPILER_UNKNOWN
+#      define GLM_COMPILER GLM_COMPILER_UNKNOWN
+
+#elif defined(__INTEL_COMPILER)
+#      if __INTEL_COMPILER == 1200
+#              define GLM_COMPILER GLM_COMPILER_INTEL12
+#      elif __INTEL_COMPILER == 1210
+#              define GLM_COMPILER GLM_COMPILER_INTEL12_1
+#      elif __INTEL_COMPILER == 1300
+#              define GLM_COMPILER GLM_COMPILER_INTEL13
+#      elif __INTEL_COMPILER == 1400
+#              define GLM_COMPILER GLM_COMPILER_INTEL14
+#      elif __INTEL_COMPILER >= 1500
+#              define GLM_COMPILER GLM_COMPILER_INTEL15
+#      else
+#              define GLM_COMPILER GLM_COMPILER_INTEL
+#      endif
+
+// CUDA
+#elif defined(__CUDACC__)
+#      if !defined(CUDA_VERSION) && !defined(GLM_FORCE_CUDA)
+#              include <cuda.h>  // make sure version is defined since nvcc does not define it itself! 
+#      endif
+#      if CUDA_VERSION < 3000
+#              error "GLM requires CUDA 3.0 or higher"
+#      else
+#              define GLM_COMPILER GLM_COMPILER_CUDA
+#      endif
+
+// Visual C++
+#elif defined(_MSC_VER)
+#      if _MSC_VER < 1600
+#              error "GLM requires Visual C++ 2010 or higher"
+#      elif _MSC_VER == 1600
+#              define GLM_COMPILER GLM_COMPILER_VC2010
+#      elif _MSC_VER == 1700
+#              define GLM_COMPILER GLM_COMPILER_VC2012
+#      elif _MSC_VER == 1800
+#              define GLM_COMPILER GLM_COMPILER_VC2013
+#      elif _MSC_VER >= 1900
+#              define GLM_COMPILER GLM_COMPILER_VC2015
+#      else//_MSC_VER
+#              define GLM_COMPILER GLM_COMPILER_VC
+#      endif//_MSC_VER
+
+// Clang
+#elif defined(__clang__)
+#      if GLM_PLATFORM & GLM_PLATFORM_APPLE
+#              if __clang_major__ == 4 && __clang_minor__ == 0
+#                      define GLM_COMPILER GLM_COMPILER_APPLE_CLANG40
+#              elif __clang_major__ == 4 && __clang_minor__ == 1
+#                      define GLM_COMPILER GLM_COMPILER_APPLE_CLANG41
+#              elif __clang_major__ == 4 && __clang_minor__ == 2
+#                      define GLM_COMPILER GLM_COMPILER_APPLE_CLANG42
+#              elif __clang_major__ == 5 && __clang_minor__ == 0
+#                      define GLM_COMPILER GLM_COMPILER_APPLE_CLANG50
+#              elif __clang_major__ == 5 && __clang_minor__ == 1
+#                      define GLM_COMPILER GLM_COMPILER_APPLE_CLANG51
+#              elif __clang_major__ >= 6
+#                      define GLM_COMPILER GLM_COMPILER_APPLE_CLANG60
+#              endif
+#      else
+#              if __clang_major__ == 3 && __clang_minor__ == 0
+#                      define GLM_COMPILER GLM_COMPILER_LLVM30
+#              elif __clang_major__ == 3 && __clang_minor__ == 1
+#                      define GLM_COMPILER GLM_COMPILER_LLVM31
+#              elif __clang_major__ == 3 && __clang_minor__ == 2
+#                      define GLM_COMPILER GLM_COMPILER_LLVM32
+#              elif __clang_major__ == 3 && __clang_minor__ == 3
+#                      define GLM_COMPILER GLM_COMPILER_LLVM33
+#              elif __clang_major__ == 3 && __clang_minor__ == 4
+#                      define GLM_COMPILER GLM_COMPILER_LLVM34
+#              elif __clang_major__ == 3 && __clang_minor__ == 5
+#                      define GLM_COMPILER GLM_COMPILER_LLVM35
+#              else
+#                      define GLM_COMPILER GLM_COMPILER_LLVM35
+#              endif
+#      endif
+
+// G++ 
+#elif defined(__GNUC__) || defined(__MINGW32__)
+#      if (__GNUC__ == 4) && (__GNUC_MINOR__ == 2)
+#              define GLM_COMPILER (GLM_COMPILER_GCC42)
+#      elif (__GNUC__ == 4) && (__GNUC_MINOR__ == 3)
+#              define GLM_COMPILER (GLM_COMPILER_GCC43)
+#      elif (__GNUC__ == 4) && (__GNUC_MINOR__ == 4)
+#              define GLM_COMPILER (GLM_COMPILER_GCC44)
+#      elif (__GNUC__ == 4) && (__GNUC_MINOR__ == 5)
+#              define GLM_COMPILER (GLM_COMPILER_GCC45)
+#      elif (__GNUC__ == 4) && (__GNUC_MINOR__ == 6)
+#              define GLM_COMPILER (GLM_COMPILER_GCC46)
+#      elif (__GNUC__ == 4) && (__GNUC_MINOR__ == 7)
+#              define GLM_COMPILER (GLM_COMPILER_GCC47)
+#      elif (__GNUC__ == 4) && (__GNUC_MINOR__ == 8)
+#              define GLM_COMPILER (GLM_COMPILER_GCC48)
+#      elif (__GNUC__ == 4) && (__GNUC_MINOR__ >= 9)
+#              define GLM_COMPILER (GLM_COMPILER_GCC49)
+#      elif (__GNUC__ > 4 )
+#              define GLM_COMPILER (GLM_COMPILER_GCC50)
+#      else
+#              define GLM_COMPILER (GLM_COMPILER_GCC)
+#      endif
+
+#else
+#      define GLM_COMPILER GLM_COMPILER_UNKNOWN
+#endif
+
+#ifndef GLM_COMPILER
+#error "GLM_COMPILER undefined, your compiler may not be supported by GLM. Add #define GLM_COMPILER 0 to ignore this message."
+#endif//GLM_COMPILER
+
+// Report compiler detection
+#if defined(GLM_MESSAGES) && !defined(GLM_MESSAGE_COMPILER_DISPLAYED)
+#      define GLM_MESSAGE_COMPILER_DISPLAYED
+#      if GLM_COMPILER & GLM_COMPILER_CUDA
+#              pragma message("GLM: CUDA compiler detected")
+#      elif GLM_COMPILER & GLM_COMPILER_VC
+#              pragma message("GLM: Visual C++ compiler detected")
+#      elif GLM_COMPILER & GLM_COMPILER_APPLE_CLANG
+#              pragma message("GLM: Clang compiler detected")
+#      elif GLM_COMPILER & GLM_COMPILER_LLVM
+#              pragma message("GLM: LLVM compiler detected")
+#      elif GLM_COMPILER & GLM_COMPILER_INTEL
+#              pragma message("GLM: Intel Compiler detected")
+#      elif GLM_COMPILER & GLM_COMPILER_GCC
+#              pragma message("GLM: GCC compiler detected")
+#      else
+#              pragma message("GLM: Compiler not detected")
+#      endif
+#endif//GLM_MESSAGE
+
+///////////////////////////////////////////////////////////////////////////////////
+// Build model
+
+#if defined(__arch64__) || defined(__LP64__) || defined(_M_X64) || defined(__ppc64__) || defined(__x86_64__)
+#              define GLM_MODEL        GLM_MODEL_64
+#elif defined(__i386__) || defined(__ppc__)
+#      define GLM_MODEL        GLM_MODEL_32
+#else
+#      define GLM_MODEL        GLM_MODEL_32
+#endif//
+
+#if !defined(GLM_MODEL) && GLM_COMPILER != 0
+#      error "GLM_MODEL undefined, your compiler may not be supported by GLM. Add #define GLM_MODEL 0 to ignore this message."
+#endif//GLM_MODEL
+
+#if defined(GLM_MESSAGES) && !defined(GLM_MESSAGE_MODEL_DISPLAYED)
+#      define GLM_MESSAGE_MODEL_DISPLAYED
+#      if(GLM_MODEL == GLM_MODEL_64)
+#              pragma message("GLM: 64 bits model")
+#      elif(GLM_MODEL == GLM_MODEL_32)
+#              pragma message("GLM: 32 bits model")
+#      endif//GLM_MODEL
+#endif//GLM_MESSAGE
+
+///////////////////////////////////////////////////////////////////////////////////
+// C++ Version
+
+// User defines: GLM_FORCE_CXX98, GLM_FORCE_CXX03, GLM_FORCE_CXX11, GLM_FORCE_CXX14
+
+#define GLM_LANG_CXX98_FLAG                    (1 << 1)
+#define GLM_LANG_CXX03_FLAG                    (1 << 2)
+#define GLM_LANG_CXX0X_FLAG                    (1 << 3)
+#define GLM_LANG_CXX11_FLAG                    (1 << 4)
+#define GLM_LANG_CXX1Y_FLAG                    (1 << 5)
+#define GLM_LANG_CXX14_FLAG                    (1 << 6)
+#define GLM_LANG_CXX1Z_FLAG                    (1 << 7)
+#define GLM_LANG_CXXMS_FLAG                    (1 << 8)
+#define GLM_LANG_CXXGNU_FLAG           (1 << 9)
+
+#define GLM_LANG_CXX98                 GLM_LANG_CXX98_FLAG
+#define GLM_LANG_CXX03                 (GLM_LANG_CXX98 | GLM_LANG_CXX03_FLAG)
+#define GLM_LANG_CXX0X                 (GLM_LANG_CXX03 | GLM_LANG_CXX0X_FLAG)
+#define GLM_LANG_CXX11                 (GLM_LANG_CXX0X | GLM_LANG_CXX11_FLAG)
+#define GLM_LANG_CXX1Y                 (GLM_LANG_CXX11 | GLM_LANG_CXX1Y_FLAG)
+#define GLM_LANG_CXX14                 (GLM_LANG_CXX1Y | GLM_LANG_CXX14_FLAG)
+#define GLM_LANG_CXX1Z                 (GLM_LANG_CXX14 | GLM_LANG_CXX1Z_FLAG)
+#define GLM_LANG_CXXMS                 GLM_LANG_CXXMS_FLAG
+#define GLM_LANG_CXXGNU                        GLM_LANG_CXXGNU_FLAG
+
+#if defined(GLM_FORCE_CXX14)
+#      undef GLM_FORCE_CXX11
+#      undef GLM_FORCE_CXX03
+#      undef GLM_FORCE_CXX98
+#      define GLM_LANG GLM_LANG_CXX14
+#elif defined(GLM_FORCE_CXX11)
+#      undef GLM_FORCE_CXX03
+#      undef GLM_FORCE_CXX98
+#      define GLM_LANG GLM_LANG_CXX11
+#elif defined(GLM_FORCE_CXX03)
+#      undef GLM_FORCE_CXX98
+#      define GLM_LANG GLM_LANG_CXX03
+#elif defined(GLM_FORCE_CXX98)
+#      define GLM_LANG GLM_LANG_CXX98
+#else
+#      if GLM_COMPILER & (GLM_COMPILER_APPLE_CLANG | GLM_COMPILER_LLVM)
+#              if __cplusplus >= 201402L // GLM_COMPILER_LLVM34 + -std=c++14
+#                      define GLM_LANG GLM_LANG_CXX14
+#              elif __has_feature(cxx_decltype_auto) && __has_feature(cxx_aggregate_nsdmi) // GLM_COMPILER_LLVM33 + -std=c++1y
+#                      define GLM_LANG GLM_LANG_CXX1Y
+#              elif __cplusplus >= 201103L // GLM_COMPILER_LLVM33 + -std=c++11
+#                      define GLM_LANG GLM_LANG_CXX11
+#              elif __has_feature(cxx_static_assert) // GLM_COMPILER_LLVM29 + -std=c++11
+#                      define GLM_LANG GLM_LANG_CXX0X
+#              elif __cplusplus >= 199711L
+#                      define GLM_LANG GLM_LANG_CXX98
+#              else
+#                      define GLM_LANG GLM_LANG_CXX
+#              endif
+#      elif GLM_COMPILER & GLM_COMPILER_GCC
+#              if __cplusplus >= 201402L
+#                      define GLM_LANG GLM_LANG_CXX14
+#              elif __cplusplus >= 201103L
+#                      define GLM_LANG GLM_LANG_CXX11
+#              elif defined(__GXX_EXPERIMENTAL_CXX0X__)
+#                      define GLM_LANG GLM_LANG_CXX0X
+#              else
+#                      define GLM_LANG GLM_LANG_CXX98
+#              endif
+#      elif GLM_COMPILER & GLM_COMPILER_VC
+#              ifdef _MSC_EXTENSIONS
+#                      if __cplusplus >= 201402L
+#                              define GLM_LANG (GLM_LANG_CXX14 | GLM_LANG_CXXMS_FLAG)
+//#                    elif GLM_COMPILER >= GLM_COMPILER_VC2015
+//#                            define GLM_LANG (GLM_LANG_CXX1Y | GLM_LANG_CXXMS_FLAG)
+#                      elif __cplusplus >= 201103L
+#                              define GLM_LANG (GLM_LANG_CXX11 | GLM_LANG_CXXMS_FLAG)
+#                      elif GLM_COMPILER >= GLM_COMPILER_VC2010
+#                              define GLM_LANG (GLM_LANG_CXX0X | GLM_LANG_CXXMS_FLAG)
+#                      elif __cplusplus >= 199711L
+#                              define GLM_LANG (GLM_LANG_CXX98 | GLM_LANG_CXXMS_FLAG)
+#                      else
+#                              define GLM_LANG (GLM_LANG_CXX | GLM_LANG_CXXMS_FLAG)
+#                      endif
+#              else
+#                      if __cplusplus >= 201402L
+#                              define GLM_LANG GLM_LANG_CXX14
+//#                    elif GLM_COMPILER >= GLM_COMPILER_VC2015
+//#                            define GLM_LANG GLM_LANG_CXX1Y
+#                      elif __cplusplus >= 201103L
+#                              define GLM_LANG GLM_LANG_CXX11
+#                      elif GLM_COMPILER >= GLM_COMPILER_VC2010
+#                              define GLM_LANG GLM_LANG_CXX0X
+#                      elif __cplusplus >= 199711L
+#                              define GLM_LANG GLM_LANG_CXX98
+#                      else
+#                              define GLM_LANG GLM_LANG_CXX
+#                      endif
+#              endif
+#      elif GLM_COMPILER & GLM_COMPILER_INTEL
+#              ifdef _MSC_EXTENSIONS
+#                      if __cplusplus >= 201402L
+#                              define GLM_LANG (GLM_LANG_CXX14 | GLM_LANG_CXXMS_FLAG)
+#                      elif __cplusplus >= 201103L
+#                              define GLM_LANG (GLM_LANG_CXX11 | GLM_LANG_CXXMS_FLAG)
+#                      elif GLM_COMPILER >= GLM_COMPILER_INTEL13
+#                              define GLM_LANG (GLM_LANG_CXX0X | GLM_LANG_CXXMS_FLAG)
+#                      elif __cplusplus >= 199711L
+#                              define GLM_LANG (GLM_LANG_CXX98 | GLM_LANG_CXXMS_FLAG)
+#                      else
+#                              define GLM_LANG (GLM_LANG_CXX | GLM_LANG_CXXMS_FLAG)
+#                      endif
+#              else
+#                      if __cplusplus >= 201402L
+#                              define GLM_LANG (GLM_LANG_CXX14 | GLM_LANG_CXXMS_FLAG)
+#                      elif __cplusplus >= 201103L
+#                              define GLM_LANG (GLM_LANG_CXX11 | GLM_LANG_CXXMS_FLAG)
+#                      elif GLM_COMPILER >= GLM_COMPILER_INTEL13
+#                              define GLM_LANG (GLM_LANG_CXX0X | GLM_LANG_CXXMS_FLAG)
+#                      elif __cplusplus >= 199711L
+#                              define GLM_LANG (GLM_LANG_CXX98 | GLM_LANG_CXXMS_FLAG)
+#                      else
+#                              define GLM_LANG (GLM_LANG_CXX | GLM_LANG_CXXMS_FLAG)
+#                      endif
+#              endif
+#      else // Unkown compiler
+#              if __cplusplus >= 201402L
+#                      define GLM_LANG GLM_LANG_CXX14
+#              elif __cplusplus >= 201103L
+#                      define GLM_LANG GLM_LANG_CXX11
+#              elif __cplusplus >= 199711L
+#                      define GLM_LANG GLM_LANG_CXX98
+#              else
+#                      define GLM_LANG GLM_LANG_CXX // Good luck with that!
+#              endif
+#              ifndef GLM_FORCE_PURE
+#                      define GLM_FORCE_PURE
+#              endif
+#      endif
+#endif
+
+#if defined(GLM_MESSAGES) && !defined(GLM_MESSAGE_LANG_DISPLAYED)
+#      define GLM_MESSAGE_LANG_DISPLAYED
+
+#      if GLM_LANG & GLM_LANG_CXX1Z_FLAG
+#              pragma message("GLM: C++1z")
+#      elif GLM_LANG & GLM_LANG_CXX14_FLAG
+#              pragma message("GLM: C++14")
+#      elif GLM_LANG & GLM_LANG_CXX1Y_FLAG
+#              pragma message("GLM: C++1y")
+#      elif GLM_LANG & GLM_LANG_CXX11_FLAG
+#              pragma message("GLM: C++11")
+#      elif GLM_LANG & GLM_LANG_CXX0X_FLAG
+#              pragma message("GLM: C++0x")
+#      elif GLM_LANG & GLM_LANG_CXX03_FLAG
+#              pragma message("GLM: C++03")
+#      elif GLM_LANG & GLM_LANG_CXX98_FLAG
+#              pragma message("GLM: C++98")
+#      else
+#              pragma message("GLM: C++ language undetected")
+#      endif//GLM_LANG
+
+#      if GLM_LANG & (GLM_LANG_CXXGNU_FLAG | GLM_LANG_CXXMS_FLAG)
+#              pragma message("GLM: Language extensions enabled")
+#      endif//GLM_LANG
+#endif//GLM_MESSAGE
+
+///////////////////////////////////////////////////////////////////////////////////
+// Has of C++ features
+
+// http://clang.llvm.org/cxx_status.html
+// http://gcc.gnu.org/projects/cxx0x.html
+// http://msdn.microsoft.com/en-us/library/vstudio/hh567368(v=vs.120).aspx
+
+#if GLM_PLATFORM == GLM_PLATFORM_ANDROID
+#      define GLM_HAS_CXX11_STL 0
+#elif GLM_COMPILER & (GLM_COMPILER_LLVM | GLM_COMPILER_APPLE_CLANG)
+#      define GLM_HAS_CXX11_STL __has_include(<__config>)
+#else
+#      define GLM_HAS_CXX11_STL ((GLM_LANG & GLM_LANG_CXX0X_FLAG) && \
+               ((GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC48)) || \
+               ((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC2013)))
+#endif
+
+// N1720
+#if GLM_COMPILER & (GLM_COMPILER_LLVM | GLM_COMPILER_APPLE_CLANG)
+#      define GLM_HAS_STATIC_ASSERT __has_feature(cxx_static_assert)
+#elif GLM_LANG & GLM_LANG_CXX11_FLAG
+#      define GLM_HAS_STATIC_ASSERT 1
+#else
+#      define GLM_HAS_STATIC_ASSERT (GLM_LANG & GLM_LANG_CXX0X_FLAG) && (\
+               ((GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC43)) || \
+               ((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC2010)))
+#endif
+
+// N1988
+#if GLM_LANG & GLM_LANG_CXX11_FLAG
+#      define GLM_HAS_EXTENDED_INTEGER_TYPE 1
+#else
+#      define GLM_HAS_EXTENDED_INTEGER_TYPE (\
+               ((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC2012)) || \
+               ((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC43)) || \
+               ((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (GLM_COMPILER & GLM_COMPILER_LLVM) && (GLM_COMPILER >= GLM_COMPILER_LLVM30)) || \
+               ((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (GLM_COMPILER & GLM_COMPILER_APPLE_CLANG) && (GLM_COMPILER >= GLM_COMPILER_APPLE_CLANG40)))
+#endif
+
+// N2235
+#if GLM_COMPILER & (GLM_COMPILER_LLVM | GLM_COMPILER_APPLE_CLANG)
+#      define GLM_HAS_CONSTEXPR __has_feature(cxx_constexpr)
+#      define GLM_HAS_CONSTEXPR_PARTIAL GLM_HAS_CONSTEXPR
+#elif GLM_LANG & GLM_LANG_CXX11_FLAG
+#      define GLM_HAS_CONSTEXPR 1
+#      define GLM_HAS_CONSTEXPR_PARTIAL GLM_HAS_CONSTEXPR
+#else
+#      define GLM_HAS_CONSTEXPR (GLM_LANG & GLM_LANG_CXX0X_FLAG) && (\
+               ((GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC46)))
+#      define GLM_HAS_CONSTEXPR_PARTIAL GLM_HAS_CONSTEXPR || ((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC2015))
+#endif
+
+// N2672
+#if GLM_COMPILER & (GLM_COMPILER_LLVM | GLM_COMPILER_APPLE_CLANG)
+#      define GLM_HAS_INITIALIZER_LISTS __has_feature(cxx_generalized_initializers)
+#elif GLM_LANG & GLM_LANG_CXX11_FLAG
+#      define GLM_HAS_INITIALIZER_LISTS 1
+#else
+#      define GLM_HAS_INITIALIZER_LISTS (GLM_LANG & GLM_LANG_CXX0X_FLAG) && (\
+               ((GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC44)) || \
+               ((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC2013)))
+#endif
+
+// N2544 Unrestricted unions
+#if GLM_COMPILER & (GLM_COMPILER_LLVM | GLM_COMPILER_APPLE_CLANG)
+#      define GLM_HAS_UNRESTRICTED_UNIONS __has_feature(cxx_unrestricted_unions)
+#elif GLM_LANG & (GLM_LANG_CXX11_FLAG | GLM_LANG_CXXMS_FLAG)
+#      define GLM_HAS_UNRESTRICTED_UNIONS 1
+#else
+#      define GLM_HAS_UNRESTRICTED_UNIONS (GLM_LANG & GLM_LANG_CXX0X_FLAG) && (\
+               ((GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC46)))
+#endif
+
+// N2346
+#if GLM_COMPILER & (GLM_COMPILER_LLVM | GLM_COMPILER_APPLE_CLANG)
+#      define GLM_HAS_DEFAULTED_FUNCTIONS __has_feature(cxx_defaulted_functions)
+#elif GLM_LANG & GLM_LANG_CXX11_FLAG
+#      define GLM_HAS_DEFAULTED_FUNCTIONS 1
+#else
+#      define GLM_HAS_DEFAULTED_FUNCTIONS (GLM_LANG & GLM_LANG_CXX0X_FLAG) && (\
+               ((GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC44)) || \
+               ((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC2013)))
+#endif
+
+// N2118
+#if GLM_COMPILER & (GLM_COMPILER_LLVM | GLM_COMPILER_APPLE_CLANG)
+#      define GLM_HAS_RVALUE_REFERENCES __has_feature(cxx_rvalue_references)
+#elif GLM_LANG & GLM_LANG_CXX11_FLAG
+#      define GLM_HAS_RVALUE_REFERENCES 1
+#else
+#      define GLM_HAS_RVALUE_REFERENCES (GLM_LANG & GLM_LANG_CXX0X_FLAG) && (\
+               ((GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC43)) || \
+               ((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC2012)))
+#endif
+
+// N2437 http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2437.pdf
+#if GLM_COMPILER & (GLM_COMPILER_LLVM | GLM_COMPILER_APPLE_CLANG)
+#      define GLM_HAS_EXPLICIT_CONVERSION_OPERATORS __has_feature(cxx_explicit_conversions)
+#elif GLM_LANG & GLM_LANG_CXX11_FLAG
+#      define GLM_HAS_EXPLICIT_CONVERSION_OPERATORS 1
+#else
+#      define GLM_HAS_EXPLICIT_CONVERSION_OPERATORS (GLM_LANG & GLM_LANG_CXX0X_FLAG) && (\
+               ((GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC45)) || \
+               ((GLM_COMPILER & GLM_COMPILER_INTEL) && (GLM_COMPILER >= GLM_COMPILER_INTEL14)) || \
+               ((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC2013)))
+#endif
+
+// N2258 http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2258.pdf
+#if GLM_COMPILER & (GLM_COMPILER_LLVM | GLM_COMPILER_APPLE_CLANG)
+#      define GLM_HAS_TEMPLATE_ALIASES __has_feature(cxx_alias_templates)
+#elif GLM_LANG & GLM_LANG_CXX11_FLAG
+#      define GLM_HAS_TEMPLATE_ALIASES 1
+#else
+#      define GLM_HAS_TEMPLATE_ALIASES (GLM_LANG & GLM_LANG_CXX0X_FLAG) && (\
+               ((GLM_COMPILER & GLM_COMPILER_INTEL) && (GLM_COMPILER >= GLM_COMPILER_INTEL12_1)) || \
+               ((GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC47)) || \
+               ((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC2013)))
+#endif
+
+// N2930 http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2009/n2930.html
+#if GLM_COMPILER & (GLM_COMPILER_LLVM | GLM_COMPILER_APPLE_CLANG)
+#      define GLM_HAS_RANGE_FOR __has_feature(cxx_range_for)
+#elif GLM_LANG & GLM_LANG_CXX11_FLAG
+#      define GLM_HAS_RANGE_FOR 1
+#else
+#      define GLM_HAS_RANGE_FOR (GLM_LANG & GLM_LANG_CXX0X_FLAG) && (\
+               ((GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC46)) || \
+               ((GLM_COMPILER & GLM_COMPILER_INTEL) && (GLM_COMPILER >= GLM_COMPILER_INTEL13)) || \
+               ((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC2012)))
+#endif
+
+// 
+#if GLM_LANG & GLM_LANG_CXX11_FLAG
+#      define GLM_HAS_ASSIGNABLE 1
+#else
+#      define GLM_HAS_ASSIGNABLE (GLM_LANG & GLM_LANG_CXX0X_FLAG) && (\
+               ((GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC49)))
+#endif
+
+// 
+#define GLM_HAS_TRIVIAL_QUERIES 0//( \
+       //((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC2013)))
+
+// 
+#if GLM_LANG & GLM_LANG_CXX11_FLAG
+#      define GLM_HAS_MAKE_SIGNED 1
+#else
+#      define GLM_HAS_MAKE_SIGNED (GLM_LANG & GLM_LANG_CXX0X_FLAG) && (\
+               ((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC2013)))
+#endif
+
+// 
+#if GLM_ARCH == GLM_ARCH_PURE
+#      define GLM_HAS_BITSCAN_WINDOWS 0
+#else
+#      define GLM_HAS_BITSCAN_WINDOWS (GLM_PLATFORM & GLM_PLATFORM_WINDOWS) && (\
+               (GLM_COMPILER & (GLM_COMPILER_VC | GLM_COMPILER_LLVM | GLM_COMPILER_INTEL))
+#endif
+
+// OpenMP
+#ifdef _OPENMP 
+#      if GLM_COMPILER & GLM_COMPILER_GCC
+#              if GLM_COMPILER >= GLM_COMPILER_GCC47
+#                      define GLM_HAS_OPENMP 31
+#              elif GLM_COMPILER >= GLM_COMPILER_GCC44
+#                      define GLM_HAS_OPENMP 30
+#              elif GLM_COMPILER >= GLM_COMPILER_GCC42
+#                      define GLM_HAS_OPENMP 25
+#              endif
+#      endif// GLM_COMPILER & GLM_COMPILER_GCC
+
+#      if GLM_COMPILER & GLM_COMPILER_VC
+#              if GLM_COMPILER >= GLM_COMPILER_VC2010
+#                      define GLM_HAS_OPENMP 20
+#              endif
+#      endif// GLM_COMPILER & GLM_COMPILER_VC
+#endif
+
+// Not standard
+#define GLM_HAS_ANONYMOUS_UNION (GLM_LANG & GLM_LANG_CXXMS_FLAG)
+
+///////////////////////////////////////////////////////////////////////////////////
+// Platform 
+
+// User defines: GLM_FORCE_PURE GLM_FORCE_SSE2 GLM_FORCE_SSE3 GLM_FORCE_AVX GLM_FORCE_AVX2
+
+#define GLM_ARCH_PURE          0x0000
+#define GLM_ARCH_ARM           0x0001
+#define GLM_ARCH_X86           0x0002
+#define GLM_ARCH_SSE2          0x0004
+#define GLM_ARCH_SSE3          0x0008
+#define GLM_ARCH_SSE4          0x0010
+#define GLM_ARCH_AVX           0x0020
+#define GLM_ARCH_AVX2          0x0040
+
+#if defined(GLM_FORCE_PURE)
+#      define GLM_ARCH GLM_ARCH_PURE
+#elif defined(GLM_FORCE_AVX2)
+#      define GLM_ARCH (GLM_ARCH_AVX2 | GLM_ARCH_AVX | GLM_ARCH_SSE4 | GLM_ARCH_SSE3 | GLM_ARCH_SSE2)
+#elif defined(GLM_FORCE_AVX)
+#      define GLM_ARCH (GLM_ARCH_AVX | GLM_ARCH_SSE4 | GLM_ARCH_SSE3 | GLM_ARCH_SSE2)
+#elif defined(GLM_FORCE_SSE4)
+#      define GLM_ARCH (GLM_ARCH_SSE4 | GLM_ARCH_SSE3 | GLM_ARCH_SSE2)
+#elif defined(GLM_FORCE_SSE3)
+#      define GLM_ARCH (GLM_ARCH_SSE3 | GLM_ARCH_SSE2)
+#elif defined(GLM_FORCE_SSE2)
+#      define GLM_ARCH (GLM_ARCH_SSE2)
+#elif (GLM_COMPILER & (GLM_COMPILER_APPLE_CLANG | GLM_COMPILER_LLVM | GLM_COMPILER_GCC)) || ((GLM_COMPILER & GLM_COMPILER_INTEL) && (GLM_PLATFORM & GLM_PLATFORM_LINUX))
+#      if(__AVX2__)
+#              define GLM_ARCH (GLM_ARCH_AVX2 | GLM_ARCH_AVX | GLM_ARCH_SSE3 | GLM_ARCH_SSE2)
+#      elif(__AVX__)
+#              define GLM_ARCH (GLM_ARCH_AVX | GLM_ARCH_SSE3 | GLM_ARCH_SSE2)
+#      elif(__SSE3__)
+#              define GLM_ARCH (GLM_ARCH_SSE3 | GLM_ARCH_SSE2)
+#      elif(__SSE2__)
+#              define GLM_ARCH (GLM_ARCH_SSE2)
+#      else
+#              define GLM_ARCH GLM_ARCH_PURE
+#      endif
+#elif (GLM_COMPILER & GLM_COMPILER_VC) || ((GLM_COMPILER & GLM_COMPILER_INTEL) && (GLM_PLATFORM & GLM_PLATFORM_WINDOWS))
+#      if defined(_M_ARM_FP)
+#              define GLM_ARCH (GLM_ARCH_ARM)
+#      elif defined(__AVX2__)
+#              define GLM_ARCH (GLM_ARCH_AVX2 | GLM_ARCH_AVX | GLM_ARCH_SSE4 | GLM_ARCH_SSE3 | GLM_ARCH_SSE2)
+#      elif defined(__AVX__)
+#              define GLM_ARCH (GLM_ARCH_AVX | GLM_ARCH_SSE4 | GLM_ARCH_SSE3 | GLM_ARCH_SSE2)
+#      elif _M_IX86_FP == 2
+#              define GLM_ARCH (GLM_ARCH_SSE2)
+#      else
+#              define GLM_ARCH (GLM_ARCH_PURE)
+#      endif
+#elif (GLM_COMPILER & GLM_COMPILER_GCC) && (defined(__i386__) || defined(__x86_64__))
+#      if defined(__AVX2__) 
+#              define GLM_ARCH (GLM_ARCH_AVX2 | GLM_ARCH_AVX | GLM_ARCH_SSE4 | GLM_ARCH_SSE3 | GLM_ARCH_SSE2)
+#      elif defined(__AVX__)
+#              define GLM_ARCH (GLM_ARCH_AVX | GLM_ARCH_SSE4 | GLM_ARCH_SSE3 | GLM_ARCH_SSE2)
+#      elif defined(__SSE4_1__ )
+#              define GLM_ARCH (GLM_ARCH_SSE4 | GLM_ARCH_SSE3 | GLM_ARCH_SSE2)
+#      elif defined(__SSE3__)
+#              define GLM_ARCH (GLM_ARCH_SSE3 | GLM_ARCH_SSE2)
+#      elif defined(__SSE2__)
+#              define GLM_ARCH (GLM_ARCH_SSE2)
+#      else
+#              define GLM_ARCH (GLM_ARCH_PURE)
+#      endif
+#else
+#      define GLM_ARCH GLM_ARCH_PURE
+#endif
+
+// With MinGW-W64, including intrinsic headers before intrin.h will produce some errors. The problem is
+// that windows.h (and maybe other headers) will silently include intrin.h, which of course causes problems.
+// To fix, we just explicitly include intrin.h here.
+#if defined(__MINGW64__) && (GLM_ARCH != GLM_ARCH_PURE)
+#      include <intrin.h>
+#endif
+
+#if GLM_ARCH & GLM_ARCH_AVX2
+#      include <immintrin.h>
+#endif//GLM_ARCH
+#if GLM_ARCH & GLM_ARCH_AVX
+#      include <immintrin.h>
+#endif//GLM_ARCH
+#if GLM_ARCH & GLM_ARCH_SSE4
+#      include <smmintrin.h>
+#endif//GLM_ARCH
+#if GLM_ARCH & GLM_ARCH_SSE3
+#      include <pmmintrin.h>
+#endif//GLM_ARCH
+#if GLM_ARCH & GLM_ARCH_SSE2
+#      include <emmintrin.h>
+#      if(GLM_COMPILER == GLM_COMPILER_VC2005) // VC2005 is missing some intrinsics, workaround
+               inline float _mm_cvtss_f32(__m128 A) { return A.m128_f32[0]; }
+               inline __m128 _mm_castpd_ps(__m128d PD) { union { __m128 ps; __m128d pd; } c; c.pd = PD; return c.ps; }
+               inline __m128d _mm_castps_pd(__m128 PS) { union { __m128 ps; __m128d pd; } c; c.ps = PS; return c.pd; }
+               inline __m128i _mm_castps_si128(__m128 PS) { union { __m128 ps; __m128i pi; } c; c.ps = PS; return c.pi; }
+               inline __m128 _mm_castsi128_ps(__m128i PI) { union { __m128 ps; __m128i pi; } c; c.pi = PI; return c.ps; }
+#      endif
+#endif//GLM_ARCH
+
+#if defined(GLM_MESSAGES) && !defined(GLM_MESSAGE_ARCH_DISPLAYED)
+#      define GLM_MESSAGE_ARCH_DISPLAYED
+#      if(GLM_ARCH == GLM_ARCH_PURE)
+#              pragma message("GLM: Platform independent code")
+#      elif(GLM_ARCH & GLM_ARCH_ARM)
+#              pragma message("GLM: ARM instruction set")
+#      elif(GLM_ARCH & GLM_ARCH_AVX2)
+#              pragma message("GLM: AVX2 instruction set")
+#      elif(GLM_ARCH & GLM_ARCH_AVX)
+#              pragma message("GLM: AVX instruction set")
+#      elif(GLM_ARCH & GLM_ARCH_SSE3)
+#              pragma message("GLM: SSE3 instruction set")
+#      elif(GLM_ARCH & GLM_ARCH_SSE2)
+#              pragma message("GLM: SSE2 instruction set")
+#      endif//GLM_ARCH
+#endif//GLM_MESSAGE
+
+///////////////////////////////////////////////////////////////////////////////////
+// Static assert
+
+#if GLM_HAS_STATIC_ASSERT
+#      define GLM_STATIC_ASSERT(x, message) static_assert(x, message)
+#elif defined(BOOST_STATIC_ASSERT)
+#      define GLM_STATIC_ASSERT(x, message) BOOST_STATIC_ASSERT(x)
+#elif GLM_COMPILER & GLM_COMPILER_VC
+#      define GLM_STATIC_ASSERT(x, message) typedef char __CASSERT__##__LINE__[(x) ? 1 : -1]
+#else
+#      define GLM_STATIC_ASSERT(x, message)
+#      define GLM_STATIC_ASSERT_NULL
+#endif//GLM_LANG
+
+///////////////////////////////////////////////////////////////////////////////////
+// Qualifiers
+
+#if GLM_COMPILER & GLM_COMPILER_CUDA
+#      define GLM_CUDA_FUNC_DEF __device__ __host__
+#      define GLM_CUDA_FUNC_DECL __device__ __host__
+#else
+#      define GLM_CUDA_FUNC_DEF
+#      define GLM_CUDA_FUNC_DECL
+#endif
+
+#if GLM_COMPILER & GLM_COMPILER_GCC
+#      define GLM_VAR_USED __attribute__ ((unused))
+#else
+#      define GLM_VAR_USED
+#endif
+
+#if defined(GLM_FORCE_INLINE)
+#      if GLM_COMPILER & GLM_COMPILER_VC
+#              define GLM_INLINE __forceinline
+#              define GLM_NEVER_INLINE __declspec((noinline))
+#      elif GLM_COMPILER & (GLM_COMPILER_GCC | GLM_COMPILER_APPLE_CLANG | GLM_COMPILER_LLVM)
+#              define GLM_INLINE inline __attribute__((__always_inline__))
+#              define GLM_NEVER_INLINE __attribute__((__noinline__))
+#      else
+#              define GLM_INLINE inline
+#              define GLM_NEVER_INLINE
+#      endif//GLM_COMPILER
+#else
+#      define GLM_INLINE inline
+#      define GLM_NEVER_INLINE
+#endif//defined(GLM_FORCE_INLINE)
+
+#define GLM_FUNC_DECL GLM_CUDA_FUNC_DECL
+#define GLM_FUNC_QUALIFIER GLM_CUDA_FUNC_DEF GLM_INLINE
+
+///////////////////////////////////////////////////////////////////////////////////
+// Swizzle operators
+
+// User defines: GLM_SWIZZLE
+
+#if defined(GLM_MESSAGES) && !defined(GLM_MESSAGE_SWIZZLE_DISPLAYED)
+#      define GLM_MESSAGE_SWIZZLE_DISPLAYED
+#      if defined(GLM_SWIZZLE)
+#              pragma message("GLM: Swizzling operators enabled")
+#      else
+#              pragma message("GLM: Swizzling operators disabled, #define GLM_SWIZZLE to enable swizzle operators")
+#      endif
+#endif//GLM_MESSAGE
+
+///////////////////////////////////////////////////////////////////////////////////
+// Qualifiers
+
+#if (GLM_COMPILER & GLM_COMPILER_VC) || ((GLM_COMPILER & GLM_COMPILER_INTEL) && (GLM_PLATFORM & GLM_PLATFORM_WINDOWS))
+#      define GLM_DEPRECATED __declspec(deprecated)
+#      define GLM_ALIGN(x) __declspec(align(x))
+#      define GLM_ALIGNED_STRUCT(x) struct __declspec(align(x))
+#      define GLM_ALIGNED_TYPEDEF(type, name, alignment) typedef __declspec(align(alignment)) type name
+#      define GLM_RESTRICT __declspec(restrict)
+#      define GLM_RESTRICT_VAR __restrict
+#elif GLM_COMPILER & (GLM_COMPILER_GCC | GLM_COMPILER_APPLE_CLANG | GLM_COMPILER_LLVM | GLM_COMPILER_CUDA | GLM_COMPILER_INTEL)
+#      define GLM_DEPRECATED __attribute__((__deprecated__))
+#      define GLM_ALIGN(x) __attribute__((aligned(x)))
+#      define GLM_ALIGNED_STRUCT(x) struct __attribute__((aligned(x)))
+#      define GLM_ALIGNED_TYPEDEF(type, name, alignment) typedef type name __attribute__((aligned(alignment)))
+#      define GLM_RESTRICT __restrict__
+#      define GLM_RESTRICT_VAR __restrict__
+#else
+#      define GLM_DEPRECATED
+#      define GLM_ALIGN
+#      define GLM_ALIGNED_STRUCT(x) struct
+#      define GLM_ALIGNED_TYPEDEF(type, name, alignment) typedef type name
+#      define GLM_RESTRICT
+#      define GLM_RESTRICT_VAR
+#endif//GLM_COMPILER
+
+#if GLM_HAS_CONSTEXPR
+#      define GLM_CONSTEXPR constexpr
+#else
+#      define GLM_CONSTEXPR
+#endif
+
+///////////////////////////////////////////////////////////////////////////////////
+// Length type
+
+// User defines: GLM_FORCE_SIZE_T_LENGTH GLM_FORCE_SIZE_FUNC
+
+namespace glm
+{
+       using std::size_t;
+#      if defined(GLM_FORCE_SIZE_T_LENGTH) || defined(GLM_FORCE_SIZE_FUNC)
+               typedef size_t length_t;
+#      else
+               typedef int length_t;
+#      endif
+
+namespace detail
+{
+#      ifdef GLM_FORCE_SIZE_FUNC
+               typedef size_t component_count_t;
+#      else
+               typedef length_t component_count_t;
+#      endif
+
+       template <typename genType>
+       GLM_FUNC_QUALIFIER GLM_CONSTEXPR component_count_t component_count(genType const & m)
+       {
+#              ifdef GLM_FORCE_SIZE_FUNC
+                       return m.size();
+#              else
+                       return m.length();
+#              endif
+       }
+}//namespace detail
+}//namespace glm
+
+#if defined(GLM_MESSAGES) && !defined(GLM_MESSAGE_FORCE_SIZE_T_LENGTH)
+#      define GLM_MESSAGE_FORCE_SIZE_T_LENGTH
+#      if defined GLM_FORCE_SIZE_FUNC
+#              pragma message("GLM: .length() is replaced by .size() and returns a std::size_t")
+#      elif defined GLM_FORCE_SIZE_T_LENGTH
+#              pragma message("GLM: .length() returns glm::length_t, a typedef of std::size_t")
+#      else
+#              pragma message("GLM: .length() returns glm::length_t, a typedef of int following the GLSL specification")
+#      endif
+#endif//GLM_MESSAGE
+
+///////////////////////////////////////////////////////////////////////////////////
+// countof
+
+#ifndef __has_feature
+#      define __has_feature(x) 0 // Compatibility with non-clang compilers.
+#endif
+
+#if GLM_HAS_CONSTEXPR_PARTIAL
+       namespace glm
+       {
+               template <typename T, std::size_t N>
+               constexpr std::size_t countof(T const (&)[N])
+               {
+                       return N;
+               }
+       }//namespace glm
+#      define GLM_COUNTOF(arr) glm::countof(arr)
+#elif _MSC_VER
+#      define GLM_COUNTOF(arr) _countof(arr)
+#else
+#      define GLM_COUNTOF(arr) sizeof(arr) / sizeof(arr[0])
+#endif
+
+///////////////////////////////////////////////////////////////////////////////////
+// Uninitialize constructors
+
+namespace glm
+{
+       enum ctor{uninitialize};
+}//namespace glm
diff --git a/include/glm/detail/type_float.hpp b/include/glm/detail/type_float.hpp
new file mode 100644 (file)
index 0000000..81d00b6
--- /dev/null
@@ -0,0 +1,96 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref core
+/// @file glm/detail/type_float.hpp
+/// @date 2008-08-22 / 2011-06-15
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////
+
+#pragma once
+
+#include "setup.hpp"
+
+namespace glm{
+namespace detail
+{
+       typedef float                           float32;
+       typedef double                          float64;
+}//namespace detail
+       
+       typedef float                           lowp_float_t;
+       typedef float                           mediump_float_t;
+       typedef double                          highp_float_t;
+
+       /// @addtogroup core_precision
+       /// @{
+
+       /// Low precision floating-point numbers. 
+       /// There is no guarantee on the actual precision.
+       /// 
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.4 Floats</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef lowp_float_t            lowp_float;
+
+       /// Medium precision floating-point numbers.
+       /// There is no guarantee on the actual precision.
+       /// 
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.4 Floats</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef mediump_float_t         mediump_float;
+
+       /// High precision floating-point numbers.
+       /// There is no guarantee on the actual precision.
+       /// 
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.4 Floats</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef highp_float_t           highp_float;
+
+#if(!defined(GLM_PRECISION_HIGHP_FLOAT) && !defined(GLM_PRECISION_MEDIUMP_FLOAT) && !defined(GLM_PRECISION_LOWP_FLOAT))
+       typedef mediump_float           float_t;
+#elif(defined(GLM_PRECISION_HIGHP_FLOAT) && !defined(GLM_PRECISION_MEDIUMP_FLOAT) && !defined(GLM_PRECISION_LOWP_FLOAT))
+       typedef highp_float                     float_t;
+#elif(!defined(GLM_PRECISION_HIGHP_FLOAT) && defined(GLM_PRECISION_MEDIUMP_FLOAT) && !defined(GLM_PRECISION_LOWP_FLOAT))
+       typedef mediump_float           float_t;
+#elif(!defined(GLM_PRECISION_HIGHP_FLOAT) && !defined(GLM_PRECISION_MEDIUMP_FLOAT) && defined(GLM_PRECISION_LOWP_FLOAT))
+       typedef lowp_float                      float_t;
+#else
+#      error "GLM error: multiple default precision requested for floating-point types"
+#endif
+
+       typedef float                           float32;
+       typedef double                          float64;
+
+////////////////////
+// check type sizes
+#ifndef GLM_STATIC_ASSERT_NULL
+       GLM_STATIC_ASSERT(sizeof(glm::float32) == 4, "float32 size isn't 4 bytes on this platform");
+       GLM_STATIC_ASSERT(sizeof(glm::float64) == 8, "float64 size isn't 8 bytes on this platform");
+#endif//GLM_STATIC_ASSERT_NULL
+
+       /// @}
+
+}//namespace glm
diff --git a/include/glm/detail/type_gentype.hpp b/include/glm/detail/type_gentype.hpp
new file mode 100644 (file)
index 0000000..cfa6386
--- /dev/null
@@ -0,0 +1,224 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref core
+/// @file glm/detail/type_gentype.hpp
+/// @date 2008-10-05 / 2011-06-15
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////
+
+#pragma once
+
+namespace glm
+{
+       enum profile
+       {
+               nice,
+               fast,
+               simd
+       };
+
+       typedef std::size_t sizeType;
+       
+namespace detail
+{
+       template
+       <
+               typename VALTYPE, 
+               template <typename> class TYPE
+       >
+       struct genType
+       {
+       public:
+               enum ctor{null};
+
+               typedef VALTYPE value_type;
+               typedef VALTYPE & value_reference;
+               typedef VALTYPE * value_pointer;
+               typedef VALTYPE const * value_const_pointer;
+               typedef TYPE<bool> bool_type;
+
+               typedef sizeType size_type;
+               static bool is_vector();
+               static bool is_matrix();
+               
+               typedef TYPE<VALTYPE> type;
+               typedef TYPE<VALTYPE> * pointer;
+               typedef TYPE<VALTYPE> const * const_pointer;
+               typedef TYPE<VALTYPE> const * const const_pointer_const;
+               typedef TYPE<VALTYPE> * const pointer_const;
+               typedef TYPE<VALTYPE> & reference;
+               typedef TYPE<VALTYPE> const & const_reference;
+               typedef TYPE<VALTYPE> const & param_type;
+
+               //////////////////////////////////////
+               // Address (Implementation details)
+
+               value_const_pointer value_address() const{return value_pointer(this);}
+               value_pointer value_address(){return value_pointer(this);}
+
+       //protected:
+       //      enum kind
+       //      {
+       //              GEN_TYPE,
+       //              VEC_TYPE,
+       //              MAT_TYPE
+       //      };
+
+       //      typedef typename TYPE::kind kind;
+       };
+
+       template
+       <
+               typename VALTYPE, 
+               template <typename> class TYPE
+       >
+       bool genType<VALTYPE, TYPE>::is_vector()
+       {
+               return true;
+       }
+/*
+       template <typename valTypeT, unsigned int colT, unsigned int rowT, profile proT = nice>
+       class base
+       {
+       public:
+               //////////////////////////////////////
+               // Traits
+
+               typedef sizeType                                                        size_type;
+               typedef valTypeT                                                        value_type;
+
+               typedef base<value_type, colT, rowT>            class_type;
+
+               typedef base<bool, colT, rowT>                          bool_type;
+               typedef base<value_type, rowT, 1>                       col_type;
+               typedef base<value_type, colT, 1>                       row_type;
+               typedef base<value_type, rowT, colT>            transpose_type;
+
+               static size_type                                                        col_size();
+               static size_type                                                        row_size();
+               static size_type                                                        value_size();
+               static bool                                                                     is_scalar();
+               static bool                                                                     is_vector();
+               static bool                                                                     is_matrix();
+
+       private:
+               // Data 
+               col_type value[colT];           
+
+       public:
+               //////////////////////////////////////
+               // Constructors
+               base();
+               base(class_type const & m);
+
+               explicit base(T const & x);
+               explicit base(value_type const * const x);
+               explicit base(col_type const * const x);
+
+               //////////////////////////////////////
+               // Conversions
+               template <typename vU, uint cU, uint rU, profile pU>
+               explicit base(base<vU, cU, rU, pU> const & m);
+
+               //////////////////////////////////////
+               // Accesses
+               col_type& operator[](size_type i);
+               col_type const & operator[](size_type i) const;
+
+               //////////////////////////////////////
+               // Unary updatable operators
+               class_type& operator=  (class_type const & x);
+               class_type& operator+= (T const & x);
+               class_type& operator+= (class_type const & x);
+               class_type& operator-= (T const & x);
+               class_type& operator-= (class_type const & x);
+               class_type& operator*= (T const & x);
+               class_type& operator*= (class_type const & x);
+               class_type& operator/= (T const & x);
+               class_type& operator/= (class_type const & x);
+               class_type& operator++ ();
+               class_type& operator-- ();
+       };
+*/
+       
+       //template <typename T>
+       //struct traits
+       //{
+       //      static const bool is_signed = false;
+       //      static const bool is_float = false;
+       //      static const bool is_vector = false;
+       //      static const bool is_matrix = false;
+       //      static const bool is_genType = false;
+       //      static const bool is_genIType = false;
+       //      static const bool is_genUType = false;
+       //};
+       
+       //template <>
+       //struct traits<half>
+       //{
+       //      static const bool is_float = true;
+       //      static const bool is_genType = true;
+       //};
+       
+       //template <>
+       //struct traits<float>
+       //{
+       //      static const bool is_float = true;
+       //      static const bool is_genType = true;
+       //};
+       
+       //template <>
+       //struct traits<double>
+       //{
+       //      static const bool is_float = true;
+       //      static const bool is_genType = true;
+       //};
+       
+       //template <typename genType>
+       //struct desc
+       //{
+       //      typedef genType                                                 type;
+       //      typedef genType *                                               pointer;
+       //      typedef genType const*                                  const_pointer;
+       //      typedef genType const *const                    const_pointer_const;
+       //      typedef genType *const                                  pointer_const;
+       //      typedef genType &                                               reference;
+       //      typedef genType const&                                  const_reference;
+       //      typedef genType const&                                  param_type;
+       
+       //      typedef typename genType::value_type    value_type;
+       //      typedef typename genType::size_type             size_type;
+       //      static const typename size_type                 value_size;
+       //};
+       
+       //template <typename genType>
+       //const typename desc<genType>::size_type desc<genType>::value_size = genType::value_size();
+       
+}//namespace detail
+}//namespace glm
+
+//#include "type_gentype.inl"
diff --git a/include/glm/detail/type_gentype.inl b/include/glm/detail/type_gentype.inl
new file mode 100644 (file)
index 0000000..e46e774
--- /dev/null
@@ -0,0 +1,370 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref core
+/// @file glm/detail/type_gentype.inl
+/// @date 2008-10-05 / 2011-06-15
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////
+
+namespace glm{
+namespace detail{
+
+/////////////////////////////////
+// Static functions
+
+template <typename vT, uint cT, uint rT, profile pT>
+typename base<vT, cT, rT, pT>::size_type base<vT, cT, rT, pT>::col_size()
+{
+       return cT;
+}
+
+template <typename vT, uint cT, uint rT, profile pT>
+typename base<vT, cT, rT, pT>::size_type base<vT, cT, rT, pT>::row_size()
+{
+       return rT;
+}
+
+template <typename vT, uint cT, uint rT, profile pT>
+typename base<vT, cT, rT, pT>::size_type base<vT, cT, rT, pT>::value_size()
+{
+       return rT * cT;
+}
+
+template <typename vT, uint cT, uint rT, profile pT>
+bool base<vT, cT, rT, pT>::is_scalar()
+{
+       return rT == 1 && cT == 1;
+}
+
+template <typename vT, uint cT, uint rT, profile pT>
+bool base<vT, cT, rT, pT>::is_vector()
+{
+       return rT == 1;
+}
+
+template <typename vT, uint cT, uint rT, profile pT>
+bool base<vT, cT, rT, pT>::is_matrix()
+{
+       return rT != 1;
+}
+
+/////////////////////////////////
+// Constructor
+
+template <typename vT, uint cT, uint rT, profile pT>
+base<vT, cT, rT, pT>::base()
+{
+       memset(&this->value, 0, cT * rT * sizeof(vT));
+}
+
+template <typename vT, uint cT, uint rT, profile pT>
+base<vT, cT, rT, pT>::base
+(
+       typename base<vT, cT, rT, pT>::class_type const & m
+)
+{
+       for
+       (
+               typename genType<vT, cT, rT, pT>::size_type i = typename base<vT, cT, rT, pT>::size_type(0);
+               i < base<vT, cT, rT, pT>::col_size();
+               ++i
+       )
+       {
+               this->value[i] = m[i];
+       }
+}
+
+template <typename vT, uint cT, uint rT, profile pT>
+base<vT, cT, rT, pT>::base
+(
+       typename base<vT, cT, rT, pT>::T const & x
+)
+{
+       if(rT == 1) // vector
+       {
+               for
+               (
+                       typename base<vT, cT, rT, pT>::size_type i = typename base<vT, cT, rT, pT>::size_type(0);
+                       i < base<vT, cT, rT, pT>::col_size();
+                       ++i
+               )
+               {
+                       this->value[i][rT] = x;
+               }
+       }
+       else // matrix
+       {
+               memset(&this->value, 0, cT * rT * sizeof(vT));
+
+               typename base<vT, cT, rT, pT>::size_type stop = cT < rT ? cT : rT;
+
+               for
+               (
+                       typename base<vT, cT, rT, pT>::size_type i = typename base<vT, cT, rT, pT>::size_type(0);
+                       i < stop;
+                       ++i
+               )
+               {
+                       this->value[i][i] = x;
+               }
+       }
+}
+
+template <typename vT, uint cT, uint rT, profile pT>
+base<vT, cT, rT, pT>::base
+(
+       typename base<vT, cT, rT, pT>::value_type const * const x
+)
+{
+       memcpy(&this->value, &x.value, cT * rT * sizeof(vT));
+}
+
+template <typename vT, uint cT, uint rT, profile pT>
+base<vT, cT, rT, pT>::base
+(
+       typename base<vT, cT, rT, pT>::col_type const * const x
+)
+{
+       for
+       (
+               typename base<vT, cT, rT, pT>::size_type i = typename base<vT, cT, rT, pT>::size_type(0);
+               i < base<vT, cT, rT, pT>::col_size();
+               ++i
+       )
+       {
+               this->value[i] = x[i];
+       }
+}
+
+template <typename vT, uint cT, uint rT, profile pT>
+template <typename vU, uint cU, uint rU, profile pU>
+base<vT, cT, rT, pT>::base
+(
+       base<vU, cU, rU, pU> const & m
+)
+{
+       for
+       (
+               typename base<vT, cT, rT, pT>::size_type i = typename base<vT, cT, rT, pT>::size_type(0);
+               i < base<vT, cT, rT, pT>::col_size();
+               ++i
+       )
+       {
+               this->value[i] = base<vT, cT, rT, pT>(m[i]);
+       }
+}
+
+//////////////////////////////////////
+// Accesses
+
+template <typename vT, uint cT, uint rT, profile pT>
+typename base<vT, cT, rT, pT>::col_type& base<vT, cT, rT, pT>::operator[]
+(
+       typename base<vT, cT, rT, pT>::size_type i
+)
+{
+       return this->value[i];
+}
+
+template <typename vT, uint cT, uint rT, profile pT>
+typename base<vT, cT, rT, pT>::col_type const & base<vT, cT, rT, pT>::operator[]
+(
+       typename base<vT, cT, rT, pT>::size_type i
+) const
+{
+       return this->value[i];
+}
+
+//////////////////////////////////////
+// Unary updatable operators
+
+template <typename vT, uint cT, uint rT, profile pT>
+typename base<vT, cT, rT, pT>::class_type& base<vT, cT, rT, pT>::operator= 
+(
+       typename base<vT, cT, rT, pT>::class_type const & x
+)
+{
+       memcpy(&this->value, &x.value, cT * rT * sizeof(vT));
+       return *this;
+}
+
+template <typename vT, uint cT, uint rT, profile pT>
+typename base<vT, cT, rT, pT>::class_type& base<vT, cT, rT, pT>::operator+= 
+(
+       typename base<vT, cT, rT, pT>::T const & x
+)
+{
+       typename base<vT, cT, rT, pT>::size_type stop_col = x.col_size();
+       typename base<vT, cT, rT, pT>::size_type stop_row = x.row_size();
+
+       for(typename base<vT, cT, rT, pT>::size_type j = 0; j < stop_col; ++j)
+       for(typename base<vT, cT, rT, pT>::size_type i = 0; i < stop_row; ++i)
+               this->value[j][i] += x;
+
+       return *this;
+}
+
+template <typename vT, uint cT, uint rT, profile pT>
+typename base<vT, cT, rT, pT>::class_type& base<vT, cT, rT, pT>::operator+= 
+(
+       typename base<vT, cT, rT, pT>::class_type const & x
+)
+{
+       typename base<vT, cT, rT, pT>::size_type stop_col = x.col_size();
+       typename base<vT, cT, rT, pT>::size_type stop_row = x.row_size();
+
+       for(typename base<vT, cT, rT, pT>::size_type j = 0; j < stop_col; ++j)
+       for(typename base<vT, cT, rT, pT>::size_type i = 0; i < stop_row; ++i)
+               this->value[j][i] += x[j][i];
+
+       return *this;
+}
+
+template <typename vT, uint cT, uint rT, profile pT>
+typename base<vT, cT, rT, pT>::class_type& base<vT, cT, rT, pT>::operator-= 
+(
+       typename base<vT, cT, rT, pT>::T const & x
+)
+{
+       typename base<vT, cT, rT, pT>::size_type stop_col = x.col_size();
+       typename base<vT, cT, rT, pT>::size_type stop_row = x.row_size();
+
+       for(typename base<vT, cT, rT, pT>::size_type j = 0; j < stop_col; ++j)
+       for(typename base<vT, cT, rT, pT>::size_type i = 0; i < stop_row; ++i)
+               this->value[j][i] -= x;
+
+       return *this;
+}
+
+template <typename vT, uint cT, uint rT, profile pT>
+typename base<vT, cT, rT, pT>::class_type& base<vT, cT, rT, pT>::operator-= 
+(
+       typename base<vT, cT, rT, pT>::class_type const & x
+)
+{
+       typename base<vT, cT, rT, pT>::size_type stop_col = x.col_size();
+       typename base<vT, cT, rT, pT>::size_type stop_row = x.row_size();
+
+       for(typename base<vT, cT, rT, pT>::size_type j = 0; j < stop_col; ++j)
+       for(typename base<vT, cT, rT, pT>::size_type i = 0; i < stop_row; ++i)
+               this->value[j][i] -= x[j][i];
+
+       return *this;
+}
+
+template <typename vT, uint cT, uint rT, profile pT>
+typename base<vT, cT, rT, pT>::class_type& base<vT, cT, rT, pT>::operator*= 
+(
+       typename base<vT, cT, rT, pT>::T const & x
+)
+{
+       typename base<vT, cT, rT, pT>::size_type stop_col = x.col_size();
+       typename base<vT, cT, rT, pT>::size_type stop_row = x.row_size();
+
+       for(typename base<vT, cT, rT, pT>::size_type j = 0; j < stop_col; ++j)
+       for(typename base<vT, cT, rT, pT>::size_type i = 0; i < stop_row; ++i)
+               this->value[j][i] *= x;
+
+       return *this;
+}
+
+template <typename vT, uint cT, uint rT, profile pT>
+typename base<vT, cT, rT, pT>::class_type& base<vT, cT, rT, pT>::operator*= 
+(
+       typename base<vT, cT, rT, pT>::class_type const & x
+)
+{
+       typename base<vT, cT, rT, pT>::size_type stop_col = x.col_size();
+       typename base<vT, cT, rT, pT>::size_type stop_row = x.row_size();
+
+       for(typename base<vT, cT, rT, pT>::size_type j = 0; j < stop_col; ++j)
+       for(typename base<vT, cT, rT, pT>::size_type i = 0; i < stop_row; ++i)
+               this->value[j][i] *= x[j][i];
+
+       return *this;
+}
+
+template <typename vT, uint cT, uint rT, profile pT>
+typename base<vT, cT, rT, pT>::class_type& base<vT, cT, rT, pT>::operator/= 
+(
+       typename base<vT, cT, rT, pT>::T const & x
+)
+{
+       typename base<vT, cT, rT, pT>::size_type stop_col = x.col_size();
+       typename base<vT, cT, rT, pT>::size_type stop_row = x.row_size();
+
+       for(typename base<vT, cT, rT, pT>::size_type j = 0; j < stop_col; ++j)
+       for(typename base<vT, cT, rT, pT>::size_type i = 0; i < stop_row; ++i)
+               this->value[j][i] /= x;
+
+       return *this;
+}
+
+template <typename vT, uint cT, uint rT, profile pT>
+typename base<vT, cT, rT, pT>::class_type& base<vT, cT, rT, pT>::operator/= 
+(
+       typename base<vT, cT, rT, pT>::class_type const & x
+)
+{
+       typename base<vT, cT, rT, pT>::size_type stop_col = x.col_size();
+       typename base<vT, cT, rT, pT>::size_type stop_row = x.row_size();
+
+       for(typename base<vT, cT, rT, pT>::size_type j = 0; j < stop_col; ++j)
+       for(typename base<vT, cT, rT, pT>::size_type i = 0; i < stop_row; ++i)
+               this->value[j][i] /= x[j][i];
+
+       return *this;
+}
+
+template <typename vT, uint cT, uint rT, profile pT>
+typename base<vT, cT, rT, pT>::class_type& base<vT, cT, rT, pT>::operator++ ()
+{
+       typename base<vT, cT, rT, pT>::size_type stop_col = col_size();
+       typename base<vT, cT, rT, pT>::size_type stop_row = row_size();
+
+       for(typename base<vT, cT, rT, pT>::size_type j = 0; j < stop_col; ++j)
+       for(typename base<vT, cT, rT, pT>::size_type i = 0; i < stop_row; ++i)
+               ++this->value[j][i];
+
+       return *this;
+}
+
+template <typename vT, uint cT, uint rT, profile pT>
+typename base<vT, cT, rT, pT>::class_type& base<vT, cT, rT, pT>::operator-- ()
+{
+       typename base<vT, cT, rT, pT>::size_type stop_col = col_size();
+       typename base<vT, cT, rT, pT>::size_type stop_row = row_size();
+
+       for(typename base<vT, cT, rT, pT>::size_type j = 0; j < stop_col; ++j)
+       for(typename base<vT, cT, rT, pT>::size_type i = 0; i < stop_row; ++i)
+               --this->value[j][i];
+
+       return *this;
+}
+
+} //namespace detail
+} //namespace glm
diff --git a/include/glm/detail/type_half.hpp b/include/glm/detail/type_half.hpp
new file mode 100644 (file)
index 0000000..6f6fae2
--- /dev/null
@@ -0,0 +1,48 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref core
+/// @file glm/detail/type_half.hpp
+/// @date 2008-08-17 / 2011-09-20
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////
+
+#pragma once
+
+#include "setup.hpp"
+
+namespace glm{
+namespace detail
+{
+       typedef short hdata;
+
+       GLM_FUNC_DECL float toFloat32(hdata value);
+       GLM_FUNC_DECL hdata toFloat16(float const & value);
+
+}//namespace detail
+}//namespace glm
+
+#include "type_half.inl"
diff --git a/include/glm/detail/type_half.inl b/include/glm/detail/type_half.inl
new file mode 100644 (file)
index 0000000..ff8740c
--- /dev/null
@@ -0,0 +1,277 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+///
+/// This half implementation is based on OpenEXR which is Copyright (c) 2002, 
+/// Industrial Light & Magic, a division of Lucas Digital Ltd. LLC
+///
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref core
+/// @file glm/detail/type_half.inl
+/// @date 2008-08-17 / 2011-06-15
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////
+
+namespace glm{
+namespace detail
+{
+       GLM_FUNC_QUALIFIER float overflow()
+       {
+               volatile float f = 1e10;
+
+               for(int i = 0; i < 10; ++i)     
+                       f *= f; // this will overflow before the for loop terminates
+               return f;
+       }
+
+       union uif32
+       {
+               GLM_FUNC_QUALIFIER uif32() :
+                       i(0)
+               {}
+
+               GLM_FUNC_QUALIFIER uif32(float f) :
+                       f(f)
+               {}
+
+               GLM_FUNC_QUALIFIER uif32(uint32 i) :
+                       i(i)
+               {}
+
+               float f;
+               uint32 i;
+       };
+
+       GLM_FUNC_QUALIFIER float toFloat32(hdata value)
+       {
+               int s = (value >> 15) & 0x00000001;
+               int e = (value >> 10) & 0x0000001f;
+               int m =  value        & 0x000003ff;
+
+               if(e == 0)
+               {
+                       if(m == 0)
+                       {
+                               //
+                               // Plus or minus zero
+                               //
+
+                               detail::uif32 result;
+                               result.i = (unsigned int)(s << 31);
+                               return result.f;
+                       }
+                       else
+                       {
+                               //
+                               // Denormalized number -- renormalize it
+                               //
+
+                               while(!(m & 0x00000400))
+                               {
+                                       m <<= 1;
+                                       e -=  1;
+                               }
+
+                               e += 1;
+                               m &= ~0x00000400;
+                       }
+               }
+               else if(e == 31)
+               {
+                       if(m == 0)
+                       {
+                               //
+                               // Positive or negative infinity
+                               //
+
+                               uif32 result;
+                               result.i = (unsigned int)((s << 31) | 0x7f800000);
+                               return result.f;
+                       }
+                       else
+                       {
+                               //
+                               // Nan -- preserve sign and significand bits
+                               //
+
+                               uif32 result;
+                               result.i = (unsigned int)((s << 31) | 0x7f800000 | (m << 13));
+                               return result.f;
+                       }
+               }
+
+               //
+               // Normalized number
+               //
+
+               e = e + (127 - 15);
+               m = m << 13;
+
+               //
+               // Assemble s, e and m.
+               //
+
+               uif32 Result;
+               Result.i = (unsigned int)((s << 31) | (e << 23) | m);
+               return Result.f;
+       }
+
+       GLM_FUNC_QUALIFIER hdata toFloat16(float const & f)
+       {
+               uif32 Entry;
+               Entry.f = f;
+               int i = (int)Entry.i;
+
+               //
+               // Our floating point number, f, is represented by the bit
+               // pattern in integer i.  Disassemble that bit pattern into
+               // the sign, s, the exponent, e, and the significand, m.
+               // Shift s into the position where it will go in in the
+               // resulting half number.
+               // Adjust e, accounting for the different exponent bias
+               // of float and half (127 versus 15).
+               //
+
+               int s =  (i >> 16) & 0x00008000;
+               int e = ((i >> 23) & 0x000000ff) - (127 - 15);
+               int m =   i        & 0x007fffff;
+
+               //
+               // Now reassemble s, e and m into a half:
+               //
+
+               if(e <= 0)
+               {
+                       if(e < -10)
+                       {
+                               //
+                               // E is less than -10.  The absolute value of f is
+                               // less than half_MIN (f may be a small normalized
+                               // float, a denormalized float or a zero).
+                               //
+                               // We convert f to a half zero.
+                               //
+
+                               return hdata(s);
+                       }
+
+                       //
+                       // E is between -10 and 0.  F is a normalized float,
+                       // whose magnitude is less than __half_NRM_MIN.
+                       //
+                       // We convert f to a denormalized half.
+                       // 
+
+                       m = (m | 0x00800000) >> (1 - e);
+
+                       //
+                       // Round to nearest, round "0.5" up.
+                       //
+                       // Rounding may cause the significand to overflow and make
+                       // our number normalized.  Because of the way a half's bits
+                       // are laid out, we don't have to treat this case separately;
+                       // the code below will handle it correctly.
+                       // 
+
+                       if(m & 0x00001000) 
+                               m += 0x00002000;
+
+                       //
+                       // Assemble the half from s, e (zero) and m.
+                       //
+
+                       return hdata(s | (m >> 13));
+               }
+               else if(e == 0xff - (127 - 15))
+               {
+                       if(m == 0)
+                       {
+                               //
+                               // F is an infinity; convert f to a half
+                               // infinity with the same sign as f.
+                               //
+
+                               return hdata(s | 0x7c00);
+                       }
+                       else
+                       {
+                               //
+                               // F is a NAN; we produce a half NAN that preserves
+                               // the sign bit and the 10 leftmost bits of the
+                               // significand of f, with one exception: If the 10
+                               // leftmost bits are all zero, the NAN would turn 
+                               // into an infinity, so we have to set at least one
+                               // bit in the significand.
+                               //
+
+                               m >>= 13;
+
+                               return hdata(s | 0x7c00 | m | (m == 0));
+                       }
+               }
+               else
+               {
+                       //
+                       // E is greater than zero.  F is a normalized float.
+                       // We try to convert f to a normalized half.
+                       //
+
+                       //
+                       // Round to nearest, round "0.5" up
+                       //
+
+                       if(m &  0x00001000)
+                       {
+                               m += 0x00002000;
+
+                               if(m & 0x00800000)
+                               {
+                                       m =  0;     // overflow in significand,
+                                       e += 1;     // adjust exponent
+                               }
+                       }
+
+                       //
+                       // Handle exponent overflow
+                       //
+
+                       if (e > 30)
+                       {
+                               overflow();        // Cause a hardware floating point overflow;
+
+                               return hdata(s | 0x7c00);
+                               // if this returns, the half becomes an
+                       }   // infinity with the same sign as f.
+
+                       //
+                       // Assemble the half from s, e and m.
+                       //
+
+                       return hdata(s | (e << 10) | (m >> 13));
+               }
+       }
+
+}//namespace detail
+}//namespace glm
diff --git a/include/glm/detail/type_int.hpp b/include/glm/detail/type_int.hpp
new file mode 100644 (file)
index 0000000..6aacdc1
--- /dev/null
@@ -0,0 +1,326 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref core
+/// @file glm/detail/type_int.hpp
+/// @date 2008-08-22 / 2013-03-30
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////
+
+#pragma once
+
+#include "setup.hpp"
+#if GLM_HAS_MAKE_SIGNED
+#      include <type_traits>
+#endif
+
+#if GLM_HAS_EXTENDED_INTEGER_TYPE
+#      include <cstdint>
+#endif
+
+namespace glm{
+namespace detail
+{
+#      if GLM_HAS_EXTENDED_INTEGER_TYPE
+               typedef std::int8_t                                     int8;
+               typedef std::int16_t                            int16;
+               typedef std::int32_t                            int32;
+               typedef std::int64_t                            int64;
+       
+               typedef std::uint8_t                            uint8;
+               typedef std::uint16_t                           uint16;
+               typedef std::uint32_t                           uint32;
+               typedef std::uint64_t                           uint64;
+#      else
+#              if(defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)) // C99 detected, 64 bit types available
+                       typedef int64_t                                 sint64;
+                       typedef uint64_t                                uint64;
+#              elif GLM_COMPILER & GLM_COMPILER_VC
+                       typedef signed __int64                  sint64;
+                       typedef unsigned __int64                uint64;
+#              elif GLM_COMPILER & GLM_COMPILER_GCC
+                       __extension__ typedef signed long long          sint64;
+                       __extension__ typedef unsigned long long        uint64;
+#              else//unknown compiler
+                       typedef signed long     long            sint64;
+                       typedef unsigned long long              uint64;
+#              endif//GLM_COMPILER
+               
+               typedef signed char                                     int8;
+               typedef signed short                            int16;
+               typedef signed int                                      int32;
+               typedef sint64                                          int64;
+       
+               typedef unsigned char                           uint8;
+               typedef unsigned short                          uint16;
+               typedef unsigned int                            uint32;
+               typedef uint64                                          uint64;
+#endif//
+       
+       typedef signed int                                              lowp_int_t;
+       typedef signed int                                              mediump_int_t;
+       typedef signed int                                              highp_int_t;
+       
+       typedef unsigned int                                    lowp_uint_t;
+       typedef unsigned int                                    mediump_uint_t;
+       typedef unsigned int                                    highp_uint_t;
+
+#      if GLM_HAS_MAKE_SIGNED
+               using std::make_signed;
+               using std::make_unsigned;
+
+#      else//GLM_HAS_MAKE_SIGNED
+               template <typename genType>
+               struct make_signed
+               {};
+
+               template <>
+               struct make_signed<char>
+               {
+                       typedef char type;
+               };
+
+               template <>
+               struct make_signed<short>
+               {
+                       typedef short type;
+               };
+
+               template <>
+               struct make_signed<int>
+               {
+                       typedef int type;
+               };
+
+               template <>
+               struct make_signed<long>
+               {
+                       typedef long type;
+               };
+
+               template <>
+               struct make_signed<long long>
+               {
+                       typedef long long type;
+               };
+
+               template <>
+               struct make_signed<unsigned char>
+               {
+                       typedef char type;
+               };
+
+               template <>
+               struct make_signed<unsigned short>
+               {
+                       typedef short type;
+               };
+
+               template <>
+               struct make_signed<unsigned int>
+               {
+                       typedef int type;
+               };
+
+               template <>
+               struct make_signed<unsigned long>
+               {
+                       typedef long type;
+               };
+
+               template <>
+               struct make_signed<unsigned long long>
+               {
+                       typedef long long type;
+               };
+
+               template <typename genType>
+               struct make_unsigned
+               {};
+
+               template <>
+               struct make_unsigned<char>
+               {
+                       typedef unsigned char type;
+               };
+
+               template <>
+               struct make_unsigned<short>
+               {
+                       typedef unsigned short type;
+               };
+
+               template <>
+               struct make_unsigned<int>
+               {
+                       typedef unsigned int type;
+               };
+
+               template <>
+               struct make_unsigned<long>
+               {
+                       typedef unsigned long type;
+               };
+
+               template <>
+               struct make_unsigned<long long>
+               {
+                       typedef unsigned long long type;
+               };
+
+               template <>
+               struct make_unsigned<unsigned char>
+               {
+                       typedef unsigned char type;
+               };
+
+               template <>
+               struct make_unsigned<unsigned short>
+               {
+                       typedef unsigned short type;
+               };
+
+               template <>
+               struct make_unsigned<unsigned int>
+               {
+                       typedef unsigned int type;
+               };
+
+               template <>
+               struct make_unsigned<unsigned long>
+               {
+                       typedef unsigned long type;
+               };
+
+               template <>
+               struct make_unsigned<unsigned long long>
+               {
+                       typedef unsigned long long type;
+               };
+#      endif//GLM_HAS_MAKE_SIGNED
+}//namespace detail
+
+       typedef detail::int8                                    int8;
+       typedef detail::int16                                   int16;
+       typedef detail::int32                                   int32;
+       typedef detail::int64                                   int64;
+       
+       typedef detail::uint8                                   uint8;
+       typedef detail::uint16                                  uint16;
+       typedef detail::uint32                                  uint32;
+       typedef detail::uint64                                  uint64;
+
+       /// @addtogroup core_precision
+       /// @{
+
+       /// Low precision signed integer. 
+       /// There is no guarantee on the actual precision.
+       /// 
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.3 Integers</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef detail::lowp_int_t                              lowp_int;
+
+       /// Medium precision signed integer. 
+       /// There is no guarantee on the actual precision.
+       /// 
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.3 Integers</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef detail::mediump_int_t                   mediump_int;
+
+       /// High precision signed integer.
+       /// There is no guarantee on the actual precision.
+       /// 
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.3 Integers</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef detail::highp_int_t                             highp_int;
+
+       /// Low precision unsigned integer. 
+       /// There is no guarantee on the actual precision.
+       /// 
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.3 Integers</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef detail::lowp_uint_t                             lowp_uint;
+
+       /// Medium precision unsigned integer. 
+       /// There is no guarantee on the actual precision.
+       /// 
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.3 Integers</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef detail::mediump_uint_t                  mediump_uint;
+
+       /// High precision unsigned integer. 
+       /// There is no guarantee on the actual precision.
+       /// 
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.3 Integers</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef detail::highp_uint_t                    highp_uint;
+
+#if(!defined(GLM_PRECISION_HIGHP_INT) && !defined(GLM_PRECISION_MEDIUMP_INT) && !defined(GLM_PRECISION_LOWP_INT))
+       typedef mediump_int                                     int_t;
+#elif(defined(GLM_PRECISION_HIGHP_INT) && !defined(GLM_PRECISION_MEDIUMP_INT) && !defined(GLM_PRECISION_LOWP_INT))
+       typedef highp_int                                       int_t;
+#elif(!defined(GLM_PRECISION_HIGHP_INT) && defined(GLM_PRECISION_MEDIUMP_INT) && !defined(GLM_PRECISION_LOWP_INT))
+       typedef mediump_int                                     int_t;
+#elif(!defined(GLM_PRECISION_HIGHP_INT) && !defined(GLM_PRECISION_MEDIUMP_INT) && defined(GLM_PRECISION_LOWP_INT))
+       typedef lowp_int                                        int_t;
+#else
+#      error "GLM error: multiple default precision requested for signed interger types"
+#endif
+
+#if(!defined(GLM_PRECISION_HIGHP_UINT) && !defined(GLM_PRECISION_MEDIUMP_UINT) && !defined(GLM_PRECISION_LOWP_UINT))
+       typedef mediump_uint                            uint_t;
+#elif(defined(GLM_PRECISION_HIGHP_UINT) && !defined(GLM_PRECISION_MEDIUMP_UINT) && !defined(GLM_PRECISION_LOWP_UINT))
+       typedef highp_uint                                      uint_t;
+#elif(!defined(GLM_PRECISION_HIGHP_UINT) && defined(GLM_PRECISION_MEDIUMP_UINT) && !defined(GLM_PRECISION_LOWP_UINT))
+       typedef mediump_uint                            uint_t;
+#elif(!defined(GLM_PRECISION_HIGHP_UINT) && !defined(GLM_PRECISION_MEDIUMP_UINT) && defined(GLM_PRECISION_LOWP_UINT))
+       typedef lowp_uint                                       uint_t;
+#else
+#      error "GLM error: multiple default precision requested for unsigned interger types"
+#endif
+
+       /// Unsigned integer type.
+       /// 
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.3 Integers</a>
+       typedef unsigned int                            uint;
+
+       /// @}
+
+////////////////////
+// check type sizes
+#ifndef GLM_STATIC_ASSERT_NULL
+       GLM_STATIC_ASSERT(sizeof(glm::int8) == 1, "int8 size isn't 1 byte on this platform");
+       GLM_STATIC_ASSERT(sizeof(glm::int16) == 2, "int16 size isn't 2 bytes on this platform");
+       GLM_STATIC_ASSERT(sizeof(glm::int32) == 4, "int32 size isn't 4 bytes on this platform");
+       GLM_STATIC_ASSERT(sizeof(glm::int64) == 8, "int64 size isn't 8 bytes on this platform");
+
+       GLM_STATIC_ASSERT(sizeof(glm::uint8) == 1, "uint8 size isn't 1 byte on this platform");
+       GLM_STATIC_ASSERT(sizeof(glm::uint16) == 2, "uint16 size isn't 2 bytes on this platform");
+       GLM_STATIC_ASSERT(sizeof(glm::uint32) == 4, "uint32 size isn't 4 bytes on this platform");
+       GLM_STATIC_ASSERT(sizeof(glm::uint64) == 8, "uint64 size isn't 8 bytes on this platform");
+#endif//GLM_STATIC_ASSERT_NULL
+
+}//namespace glm
diff --git a/include/glm/detail/type_mat.hpp b/include/glm/detail/type_mat.hpp
new file mode 100644 (file)
index 0000000..2e4f511
--- /dev/null
@@ -0,0 +1,793 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref core
+/// @file glm/detail/type_mat.hpp
+/// @date 2010-01-26 / 2011-06-15
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////
+
+#pragma once
+
+#include "precision.hpp"
+
+namespace glm{
+namespace detail
+{
+       template <typename T, precision P, template <class, precision> class colType, template <class, precision> class rowType>
+       struct outerProduct_trait{};
+}//namespace detail
+
+       template <typename T, precision P> struct tvec2;
+       template <typename T, precision P> struct tvec3;
+       template <typename T, precision P> struct tvec4;
+       template <typename T, precision P> struct tmat2x2;
+       template <typename T, precision P> struct tmat2x3;
+       template <typename T, precision P> struct tmat2x4;
+       template <typename T, precision P> struct tmat3x2;
+       template <typename T, precision P> struct tmat3x3;
+       template <typename T, precision P> struct tmat3x4;
+       template <typename T, precision P> struct tmat4x2;
+       template <typename T, precision P> struct tmat4x3;
+       template <typename T, precision P> struct tmat4x4;
+
+       /// @addtogroup core_precision
+       /// @{
+       
+       /// 2 columns of 2 components matrix of low precision floating-point numbers.
+       /// There is no guarantee on the actual precision.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tmat2x2<float, lowp>            lowp_mat2;
+       
+       /// 2 columns of 2 components matrix of medium precision floating-point numbers.
+       /// There is no guarantee on the actual precision.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tmat2x2<float, mediump>         mediump_mat2;
+       
+       /// 2 columns of 2 components matrix of high precision floating-point numbers.
+       /// There is no guarantee on the actual precision.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tmat2x2<float, highp>           highp_mat2;
+       
+       /// 2 columns of 2 components matrix of low precision floating-point numbers.
+       /// There is no guarantee on the actual precision.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tmat2x2<float, lowp>            lowp_mat2x2;
+       
+       /// 2 columns of 2 components matrix of medium precision floating-point numbers.
+       /// There is no guarantee on the actual precision.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tmat2x2<float, mediump>         mediump_mat2x2;
+       
+       /// 2 columns of 2 components matrix of high precision floating-point numbers.
+       /// There is no guarantee on the actual precision.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tmat2x2<float, highp>           highp_mat2x2;
+       
+       /// @}
+       
+       /// @addtogroup core_precision
+       /// @{
+       
+       /// 2 columns of 3 components matrix of low precision floating-point numbers.
+       /// There is no guarantee on the actual precision.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tmat2x3<float, lowp>            lowp_mat2x3;
+       
+       /// 2 columns of 3 components matrix of medium precision floating-point numbers.
+       /// There is no guarantee on the actual precision.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tmat2x3<float, mediump>         mediump_mat2x3;
+       
+       /// 2 columns of 3 components matrix of high precision floating-point numbers.
+       /// There is no guarantee on the actual precision.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tmat2x3<float, highp>           highp_mat2x3;
+       
+       /// @}
+       
+       /// @addtogroup core_precision
+       /// @{
+       
+       /// 2 columns of 4 components matrix of low precision floating-point numbers.
+       /// There is no guarantee on the actual precision.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tmat2x4<float, lowp>            lowp_mat2x4;
+       
+       /// 2 columns of 4 components matrix of medium precision floating-point numbers.
+       /// There is no guarantee on the actual precision.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tmat2x4<float, mediump>         mediump_mat2x4;
+       
+       /// 2 columns of 4 components matrix of high precision floating-point numbers.
+       /// There is no guarantee on the actual precision.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tmat2x4<float, highp>           highp_mat2x4;
+       
+       /// @}
+       
+       /// @addtogroup core_precision
+       /// @{
+       
+       /// 3 columns of 2 components matrix of low precision floating-point numbers.
+       /// There is no guarantee on the actual precision.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tmat3x2<float, lowp>            lowp_mat3x2;
+       
+       /// 3 columns of 2 components matrix of medium precision floating-point numbers.
+       /// There is no guarantee on the actual precision.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tmat3x2<float, mediump>         mediump_mat3x2;
+       
+       /// 3 columns of 2 components matrix of high precision floating-point numbers.
+       /// There is no guarantee on the actual precision.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tmat3x2<float, highp>           highp_mat3x2;
+       
+       /// @}
+       
+       /// @addtogroup core_precision
+       /// @{
+       
+       /// 3 columns of 3 components matrix of low precision floating-point numbers.
+       /// There is no guarantee on the actual precision.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tmat3x3<float, lowp>            lowp_mat3;
+       
+       /// 3 columns of 3 components matrix of medium precision floating-point numbers.
+       /// There is no guarantee on the actual precision.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tmat3x3<float, mediump>         mediump_mat3;
+       
+       /// 3 columns of 3 components matrix of high precision floating-point numbers.
+       /// There is no guarantee on the actual precision.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tmat3x3<float, highp>           highp_mat3;
+       
+       /// 3 columns of 3 components matrix of low precision floating-point numbers.
+       /// There is no guarantee on the actual precision.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tmat3x3<float, lowp>            lowp_mat3x3;
+       
+       /// 3 columns of 3 components matrix of medium precision floating-point numbers.
+       /// There is no guarantee on the actual precision.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tmat3x3<float, mediump>         mediump_mat3x3;
+       
+       /// 3 columns of 3 components matrix of high precision floating-point numbers.
+       /// There is no guarantee on the actual precision.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tmat3x3<float, highp>           highp_mat3x3;
+       
+       /// @}
+       
+       /// @addtogroup core_precision
+       /// @{
+       
+       /// 3 columns of 4 components matrix of low precision floating-point numbers.
+       /// There is no guarantee on the actual precision.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tmat3x4<float, lowp>            lowp_mat3x4;
+       
+       /// 3 columns of 4 components matrix of medium precision floating-point numbers.
+       /// There is no guarantee on the actual precision.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tmat3x4<float, mediump>         mediump_mat3x4;
+       
+       /// 3 columns of 4 components matrix of high precision floating-point numbers.
+       /// There is no guarantee on the actual precision.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tmat3x4<float, highp>           highp_mat3x4;
+       
+       /// @}
+       
+       /// @addtogroup core_precision
+       /// @{
+       
+       /// 4 columns of 2 components matrix of low precision floating-point numbers.
+       /// There is no guarantee on the actual precision.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tmat4x2<float, lowp>            lowp_mat4x2;
+       
+       /// 4 columns of 2 components matrix of medium precision floating-point numbers.
+       /// There is no guarantee on the actual precision.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tmat4x2<float, mediump>         mediump_mat4x2;
+       
+       /// 4 columns of 2 components matrix of high precision floating-point numbers.
+       /// There is no guarantee on the actual precision.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tmat4x2<float, highp>           highp_mat4x2;
+       
+       /// @}
+       
+       /// @addtogroup core_precision
+       /// @{
+       
+       /// 4 columns of 3 components matrix of low precision floating-point numbers.
+       /// There is no guarantee on the actual precision.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tmat4x3<float, lowp>            lowp_mat4x3;
+       
+       /// 4 columns of 3 components matrix of medium precision floating-point numbers.
+       /// There is no guarantee on the actual precision.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tmat4x3<float, mediump>         mediump_mat4x3;
+       
+       /// 4 columns of 3 components matrix of high precision floating-point numbers.
+       /// There is no guarantee on the actual precision.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tmat4x3<float, highp>           highp_mat4x3;
+       
+       /// @}
+       
+       
+       /// @addtogroup core_precision
+       /// @{
+       
+       /// 4 columns of 4 components matrix of low precision floating-point numbers.
+       /// There is no guarantee on the actual precision.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tmat4x4<float, lowp>            lowp_mat4;
+       
+       /// 4 columns of 4 components matrix of medium precision floating-point numbers.
+       /// There is no guarantee on the actual precision.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tmat4x4<float, mediump>         mediump_mat4;
+       
+       /// 4 columns of 4 components matrix of high precision floating-point numbers.
+       /// There is no guarantee on the actual precision.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tmat4x4<float, highp>           highp_mat4;
+       
+       /// 4 columns of 4 components matrix of low precision floating-point numbers.
+       /// There is no guarantee on the actual precision.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tmat4x4<float, lowp>            lowp_mat4x4;
+       
+       /// 4 columns of 4 components matrix of medium precision floating-point numbers.
+       /// There is no guarantee on the actual precision.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tmat4x4<float, mediump>         mediump_mat4x4;
+       
+       /// 4 columns of 4 components matrix of high precision floating-point numbers.
+       /// There is no guarantee on the actual precision.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tmat4x4<float, highp>           highp_mat4x4;
+       
+       /// @}
+       
+       /// @addtogroup core_types
+       /// @{
+       
+       //////////////////////////
+       // Float definition
+       
+#if(defined(GLM_PRECISION_LOWP_FLOAT))
+       typedef lowp_mat2x2                     mat2x2;
+       typedef lowp_mat2x3                     mat2x3;
+       typedef lowp_mat2x4                     mat2x4;
+       typedef lowp_mat3x2                     mat3x2;
+       typedef lowp_mat3x3                     mat3x3;
+       typedef lowp_mat3x4                     mat3x4;
+       typedef lowp_mat4x2                     mat4x2;
+       typedef lowp_mat4x3                     mat4x3;
+       typedef lowp_mat4x4                     mat4x4;
+#elif(defined(GLM_PRECISION_MEDIUMP_FLOAT))
+       typedef mediump_mat2x2          mat2x2;
+       typedef mediump_mat2x3          mat2x3;
+       typedef mediump_mat2x4          mat2x4;
+       typedef mediump_mat3x2          mat3x2;
+       typedef mediump_mat3x3          mat3x3;
+       typedef mediump_mat3x4          mat3x4;
+       typedef mediump_mat4x2          mat4x2;
+       typedef mediump_mat4x3          mat4x3;
+       typedef mediump_mat4x4          mat4x4;
+#else  
+       //! 2 columns of 2 components matrix of floating-point numbers.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+       typedef highp_mat2x2                    mat2x2;
+       
+       //! 2 columns of 3 components matrix of floating-point numbers.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+       typedef highp_mat2x3                    mat2x3;
+       
+       //! 2 columns of 4 components matrix of floating-point numbers.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+       typedef highp_mat2x4                    mat2x4;
+       
+       //! 3 columns of 2 components matrix of floating-point numbers.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+       typedef highp_mat3x2                    mat3x2;
+       
+       //! 3 columns of 3 components matrix of floating-point numbers.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+       typedef highp_mat3x3                    mat3x3;
+       
+       //! 3 columns of 4 components matrix of floating-point numbers.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+       typedef highp_mat3x4                    mat3x4;
+       
+       //! 4 columns of 2 components matrix of floating-point numbers.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+       typedef highp_mat4x2                    mat4x2;
+       
+       //! 4 columns of 3 components matrix of floating-point numbers.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+       typedef highp_mat4x3                    mat4x3;
+       
+       //! 4 columns of 4 components matrix of floating-point numbers.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+       typedef highp_mat4x4                    mat4x4;
+       
+#endif//GLM_PRECISION
+       
+       //! 2 columns of 2 components matrix of floating-point numbers.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+       typedef mat2x2                                  mat2;
+       
+       //! 3 columns of 3 components matrix of floating-point numbers.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+       typedef mat3x3                                  mat3;
+       
+       //! 4 columns of 4 components matrix of floating-point numbers.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+       typedef mat4x4                                  mat4;
+               
+       //////////////////////////
+       // Double definition
+       
+       /// @addtogroup core_precision
+       /// @{
+       
+       /// 2 columns of 2 components matrix of low precision floating-point numbers.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tmat2x2<double, lowp>           lowp_dmat2;
+       
+       /// 2 columns of 2 components matrix of medium precision floating-point numbers.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tmat2x2<double, mediump>        mediump_dmat2;
+       
+       /// 2 columns of 2 components matrix of high precision floating-point numbers.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tmat2x2<double, highp>          highp_dmat2;
+       
+       /// 2 columns of 2 components matrix of low precision floating-point numbers.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tmat2x2<double, lowp>           lowp_dmat2x2;
+       
+       /// 2 columns of 2 components matrix of medium precision floating-point numbers.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tmat2x2<double, mediump>        mediump_dmat2x2;
+       
+       /// 2 columns of 2 components matrix of high precision floating-point numbers.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tmat2x2<double, highp>          highp_dmat2x2;
+       
+       /// @}
+       
+       /// @addtogroup core_precision
+       /// @{
+       
+       /// 2 columns of 3 components matrix of low precision floating-point numbers.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tmat2x3<double, lowp>           lowp_dmat2x3;
+       
+       /// 2 columns of 3 components matrix of medium precision floating-point numbers.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tmat2x3<double, mediump>        mediump_dmat2x3;
+       
+       /// 2 columns of 3 components matrix of high precision floating-point numbers.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tmat2x3<double, highp>          highp_dmat2x3;
+       
+       /// @}
+       
+       /// @addtogroup core_precision
+       /// @{
+       
+       /// 2 columns of 4 components matrix of low precision floating-point numbers.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tmat2x4<double, lowp>           lowp_dmat2x4;
+       
+       /// 2 columns of 4 components matrix of medium precision floating-point numbers.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tmat2x4<double, mediump>        mediump_dmat2x4;
+       
+       /// 2 columns of 4 components matrix of high precision floating-point numbers.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tmat2x4<double, highp>          highp_dmat2x4;
+       
+       /// @}
+       
+       /// @addtogroup core_precision
+       /// @{
+       
+       /// 3 columns of 2 components matrix of low precision floating-point numbers.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tmat3x2<double, lowp>           lowp_dmat3x2;
+       
+       /// 3 columns of 2 components matrix of medium precision floating-point numbers.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tmat3x2<double, mediump>        mediump_dmat3x2;
+       
+       /// 3 columns of 2 components matrix of high precision floating-point numbers.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tmat3x2<double, highp>          highp_dmat3x2;
+       
+       /// @}
+       
+       /// @addtogroup core_precision
+       /// @{
+       
+       /// 3 columns of 3 components matrix of low precision floating-point numbers.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tmat3x3<float, lowp>            lowp_dmat3;
+       
+       /// 3 columns of 3 components matrix of medium precision floating-point numbers.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tmat3x3<double, mediump>        mediump_dmat3;
+       
+       /// 3 columns of 3 components matrix of high precision floating-point numbers.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tmat3x3<double, highp>          highp_dmat3;
+       
+       /// 3 columns of 3 components matrix of low precision floating-point numbers.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tmat3x3<double, lowp>           lowp_dmat3x3;
+       
+       /// 3 columns of 3 components matrix of medium precision floating-point numbers.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tmat3x3<double, mediump>        mediump_dmat3x3;
+       
+       /// 3 columns of 3 components matrix of high precision floating-point numbers.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tmat3x3<double, highp>          highp_dmat3x3;
+       
+       /// @}
+       
+       /// @addtogroup core_precision
+       /// @{
+       
+       /// 3 columns of 4 components matrix of low precision floating-point numbers.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tmat3x4<double, lowp>           lowp_dmat3x4;
+       
+       /// 3 columns of 4 components matrix of medium precision floating-point numbers.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tmat3x4<double, mediump>        mediump_dmat3x4;
+       
+       /// 3 columns of 4 components matrix of high precision floating-point numbers.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tmat3x4<double, highp>          highp_dmat3x4;
+       
+       /// @}
+       
+       /// @addtogroup core_precision
+       /// @{
+       
+       /// 4 columns of 2 components matrix of low precision floating-point numbers.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tmat4x2<double, lowp>           lowp_dmat4x2;
+       
+       /// 4 columns of 2 components matrix of medium precision floating-point numbers.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tmat4x2<double, mediump>        mediump_dmat4x2;
+       
+       /// 4 columns of 2 components matrix of high precision floating-point numbers.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tmat4x2<double, highp>          highp_dmat4x2;
+       
+       /// @}
+       
+       /// @addtogroup core_precision
+       /// @{
+       
+       /// 4 columns of 3 components matrix of low precision floating-point numbers.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tmat4x3<double, lowp>           lowp_dmat4x3;
+       
+       /// 4 columns of 3 components matrix of medium precision floating-point numbers.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tmat4x3<double, mediump>        mediump_dmat4x3;
+       
+       /// 4 columns of 3 components matrix of high precision floating-point numbers.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tmat4x3<double, highp>          highp_dmat4x3;
+       
+       /// @}
+       
+       /// @addtogroup core_precision
+       /// @{
+       
+       /// 4 columns of 4 components matrix of low precision floating-point numbers.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tmat4x4<double, lowp>           lowp_dmat4;
+       
+       /// 4 columns of 4 components matrix of medium precision floating-point numbers.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tmat4x4<double, mediump>        mediump_dmat4;
+       
+       /// 4 columns of 4 components matrix of high precision floating-point numbers.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tmat4x4<double, highp>          highp_dmat4;
+       
+       /// 4 columns of 4 components matrix of low precision floating-point numbers.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tmat4x4<double, lowp>           lowp_dmat4x4;
+       
+       /// 4 columns of 4 components matrix of medium precision floating-point numbers.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tmat4x4<double, mediump>        mediump_dmat4x4;
+       
+       /// 4 columns of 4 components matrix of high precision floating-point numbers.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tmat4x4<double, highp>          highp_dmat4x4;
+       
+       /// @}
+       
+#if(defined(GLM_PRECISION_LOWP_DOUBLE))
+       typedef lowp_dmat2x2            dmat2x2;
+       typedef lowp_dmat2x3            dmat2x3;
+       typedef lowp_dmat2x4            dmat2x4;
+       typedef lowp_dmat3x2            dmat3x2;
+       typedef lowp_dmat3x3            dmat3x3;
+       typedef lowp_dmat3x4            dmat3x4;
+       typedef lowp_dmat4x2            dmat4x2;
+       typedef lowp_dmat4x3            dmat4x3;
+       typedef lowp_dmat4x4            dmat4x4;
+#elif(defined(GLM_PRECISION_MEDIUMP_DOUBLE))
+       typedef mediump_dmat2x2         dmat2x2;
+       typedef mediump_dmat2x3         dmat2x3;
+       typedef mediump_dmat2x4         dmat2x4;
+       typedef mediump_dmat3x2         dmat3x2;
+       typedef mediump_dmat3x3         dmat3x3;
+       typedef mediump_dmat3x4         dmat3x4;
+       typedef mediump_dmat4x2         dmat4x2;
+       typedef mediump_dmat4x3         dmat4x3;
+       typedef mediump_dmat4x4         dmat4x4;
+#else //defined(GLM_PRECISION_HIGHP_DOUBLE)
+       
+       //! 2 * 2 matrix of double-precision floating-point numbers.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+       typedef highp_dmat2x2           dmat2;
+       
+       //! 3 * 3 matrix of double-precision floating-point numbers.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+       typedef highp_dmat3x3           dmat3;
+       
+       //! 4 * 4 matrix of double-precision floating-point numbers.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+       typedef highp_dmat4x4           dmat4;
+       
+       //! 2 * 2 matrix of double-precision floating-point numbers.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+       typedef highp_dmat2x2           dmat2x2;
+       
+       //! 2 * 3 matrix of double-precision floating-point numbers.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+       typedef highp_dmat2x3           dmat2x3;
+       
+       //! 2 * 4 matrix of double-precision floating-point numbers.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+       typedef highp_dmat2x4           dmat2x4;
+       
+       //! 3 * 2 matrix of double-precision floating-point numbers.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+       typedef highp_dmat3x2           dmat3x2;
+       
+       /// 3 * 3 matrix of double-precision floating-point numbers.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+       typedef highp_dmat3x3           dmat3x3;
+       
+       /// 3 * 4 matrix of double-precision floating-point numbers.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+       typedef highp_dmat3x4           dmat3x4;
+       
+       /// 4 * 2 matrix of double-precision floating-point numbers.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+       typedef highp_dmat4x2           dmat4x2;
+       
+       /// 4 * 3 matrix of double-precision floating-point numbers.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+       typedef highp_dmat4x3           dmat4x3;
+       
+       /// 4 * 4 matrix of double-precision floating-point numbers.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+       typedef highp_dmat4x4           dmat4x4;
+
+#endif//GLM_PRECISION
+       
+       /// @}
+}//namespace glm
diff --git a/include/glm/detail/type_mat.inl b/include/glm/detail/type_mat.inl
new file mode 100644 (file)
index 0000000..d6f43ab
--- /dev/null
@@ -0,0 +1,32 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref core
+/// @file glm/detail/type_mat.inl
+/// @date 2011-06-15 / 2011-06-15
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////
+
diff --git a/include/glm/detail/type_mat2x2.hpp b/include/glm/detail/type_mat2x2.hpp
new file mode 100644 (file)
index 0000000..046ceac
--- /dev/null
@@ -0,0 +1,223 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref core
+/// @file glm/detail/type_mat2x2.hpp
+/// @date 2005-01-27 / 2011-06-15
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////
+
+#pragma once
+
+#include "../fwd.hpp"
+#include "type_vec2.hpp"
+#include "type_mat.hpp"
+#include <limits>
+#include <cstddef>
+
+namespace glm
+{
+       template <typename T, precision P = defaultp>
+       struct tmat2x2
+       {
+               typedef tvec2<T, P> col_type;
+               typedef tvec2<T, P> row_type;
+               typedef tmat2x2<T, P> type;
+               typedef tmat2x2<T, P> transpose_type;
+               typedef T value_type;
+
+               template <typename U, precision Q>
+               friend tvec2<U, Q> operator/(tmat2x2<U, Q> const & m, tvec2<U, Q> const & v);
+               template <typename U, precision Q>
+               friend tvec2<U, Q> operator/(tvec2<U, Q> const & v, tmat2x2<U, Q> const & m);
+
+       private:
+               /// @cond DETAIL
+               col_type value[2];
+               /// @endcond
+               
+       public:
+               //////////////////////////////////////
+               // Constructors
+               GLM_FUNC_DECL tmat2x2();
+               GLM_FUNC_DECL tmat2x2(tmat2x2<T, P> const & m);
+               template <precision Q>
+               GLM_FUNC_DECL tmat2x2(tmat2x2<T, Q> const & m);
+
+               GLM_FUNC_DECL explicit tmat2x2(ctor);
+               GLM_FUNC_DECL explicit tmat2x2(T const & x);
+               GLM_FUNC_DECL tmat2x2(
+                       T const & x1, T const & y1,
+                       T const & x2, T const & y2);
+               GLM_FUNC_DECL tmat2x2(
+                       col_type const & v1,
+                       col_type const & v2);
+
+               //////////////////////////////////////
+               // Conversions
+               template <typename U, typename V, typename M, typename N>
+               GLM_FUNC_DECL tmat2x2(
+                       U const & x1, V const & y1,
+                       M const & x2, N const & y2);
+
+               template <typename U, typename V>
+               GLM_FUNC_DECL tmat2x2(
+                       tvec2<U, P> const & v1,
+                       tvec2<V, P> const & v2);
+
+               //////////////////////////////////////
+               // Matrix conversions
+
+#              ifdef GLM_FORCE_EXPLICIT_CTOR
+                       template <typename U, precision Q>
+                       GLM_FUNC_DECL explicit tmat2x2(tmat2x2<U, Q> const & m);
+#              else
+                       template <typename U, precision Q>
+                       GLM_FUNC_DECL tmat2x2(tmat2x2<U, Q> const & m);
+#              endif
+
+               GLM_FUNC_DECL explicit tmat2x2(tmat3x3<T, P> const & x);
+               GLM_FUNC_DECL explicit tmat2x2(tmat4x4<T, P> const & x);
+               GLM_FUNC_DECL explicit tmat2x2(tmat2x3<T, P> const & x);
+               GLM_FUNC_DECL explicit tmat2x2(tmat3x2<T, P> const & x);
+               GLM_FUNC_DECL explicit tmat2x2(tmat2x4<T, P> const & x);
+               GLM_FUNC_DECL explicit tmat2x2(tmat4x2<T, P> const & x);
+               GLM_FUNC_DECL explicit tmat2x2(tmat3x4<T, P> const & x);
+               GLM_FUNC_DECL explicit tmat2x2(tmat4x3<T, P> const & x);
+
+               //////////////////////////////////////
+               // Accesses
+
+#              ifdef GLM_FORCE_SIZE_FUNC
+                       typedef size_t size_type;
+                       GLM_FUNC_DECL GLM_CONSTEXPR size_t size() const;
+
+                       GLM_FUNC_DECL col_type & operator[](size_type i);
+                       GLM_FUNC_DECL col_type const & operator[](size_type i) const;
+#              else
+                       typedef length_t length_type;
+                       GLM_FUNC_DECL GLM_CONSTEXPR length_type length() const;
+
+                       GLM_FUNC_DECL col_type & operator[](length_type i);
+                       GLM_FUNC_DECL col_type const & operator[](length_type i) const;
+#              endif//GLM_FORCE_SIZE_FUNC
+
+               //////////////////////////////////////
+               // Unary arithmetic operators
+
+               GLM_FUNC_DECL tmat2x2<T, P> & operator=(tmat2x2<T, P> const & v);
+
+               template <typename U> 
+               GLM_FUNC_DECL tmat2x2<T, P> & operator=(tmat2x2<U, P> const & m);
+               template <typename U> 
+               GLM_FUNC_DECL tmat2x2<T, P> & operator+=(U s);
+               template <typename U> 
+               GLM_FUNC_DECL tmat2x2<T, P> & operator+=(tmat2x2<U, P> const & m);
+               template <typename U> 
+               GLM_FUNC_DECL tmat2x2<T, P> & operator-=(U s);
+               template <typename U> 
+               GLM_FUNC_DECL tmat2x2<T, P> & operator-=(tmat2x2<U, P> const & m);
+               template <typename U> 
+               GLM_FUNC_DECL tmat2x2<T, P> & operator*=(U s);
+               template <typename U> 
+               GLM_FUNC_DECL tmat2x2<T, P> & operator*=(tmat2x2<U, P> const & m);
+               template <typename U> 
+               GLM_FUNC_DECL tmat2x2<T, P> & operator/=(U s);
+               template <typename U> 
+               GLM_FUNC_DECL tmat2x2<T, P> & operator/=(tmat2x2<U, P> const & m);
+
+               //////////////////////////////////////
+               // Increment and decrement operators
+
+               GLM_FUNC_DECL tmat2x2<T, P> & operator++ ();
+               GLM_FUNC_DECL tmat2x2<T, P> & operator-- ();
+               GLM_FUNC_DECL tmat2x2<T, P> operator++(int);
+               GLM_FUNC_DECL tmat2x2<T, P> operator--(int);
+       };
+
+       // Binary operators
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat2x2<T, P> operator+(tmat2x2<T, P> const & m, T const & s);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat2x2<T, P> operator+(T const & s, tmat2x2<T, P> const & m);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat2x2<T, P> operator+(tmat2x2<T, P> const & m1, tmat2x2<T, P> const & m2);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat2x2<T, P> operator-(tmat2x2<T, P> const & m, T const & s);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat2x2<T, P> operator-(T const & s, tmat2x2<T, P> const & m);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat2x2<T, P> operator-(tmat2x2<T, P> const & m1, tmat2x2<T, P> const & m2);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat2x2<T, P> operator*(tmat2x2<T, P> const & m, T const & s);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat2x2<T, P> operator*(T const & s, tmat2x2<T, P> const & m);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL typename tmat2x2<T, P>::col_type operator*(tmat2x2<T, P> const & m, typename tmat2x2<T, P>::row_type const & v);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL typename tmat2x2<T, P>::row_type operator*(typename tmat2x2<T, P>::col_type const & v, tmat2x2<T, P> const & m);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat2x2<T, P> operator*(tmat2x2<T, P> const & m1, tmat2x2<T, P> const & m2);
+               
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat3x2<T, P> operator*(tmat2x2<T, P> const & m1, tmat3x2<T, P> const & m2);
+               
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat4x2<T, P> operator*(tmat2x2<T, P> const & m1, tmat4x2<T, P> const & m2);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat2x2<T, P> operator/(tmat2x2<T, P> const & m, T const & s);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat2x2<T, P> operator/(T const & s, tmat2x2<T, P> const & m);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL typename tmat2x2<T, P>::col_type operator/(tmat2x2<T, P> const & m, typename tmat2x2<T, P>::row_type const & v);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL typename tmat2x2<T, P>::row_type operator/(typename tmat2x2<T, P>::col_type const & v, tmat2x2<T, P> const & m);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat2x2<T, P> operator/(tmat2x2<T, P> const & m1, tmat2x2<T, P> const & m2);
+
+       // Unary constant operators
+       template <typename T, precision P> 
+       GLM_FUNC_DECL tmat2x2<T, P> const operator-(tmat2x2<T, P> const & m);
+} //namespace glm
+
+#ifndef GLM_EXTERNAL_TEMPLATE
+#include "type_mat2x2.inl"
+#endif
diff --git a/include/glm/detail/type_mat2x2.inl b/include/glm/detail/type_mat2x2.inl
new file mode 100644 (file)
index 0000000..779cc09
--- /dev/null
@@ -0,0 +1,548 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref core
+/// @file glm/detail/type_mat2x2.inl
+/// @date 2005-01-16 / 2011-06-15
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////
+
+namespace glm{
+namespace detail
+{
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat2x2<T, P> compute_inverse(tmat2x2<T, P> const & m)
+       {
+               T OneOverDeterminant = static_cast<T>(1) / (
+                       + m[0][0] * m[1][1]
+                       - m[1][0] * m[0][1]);
+
+               tmat2x2<T, P> Inverse(
+                       + m[1][1] * OneOverDeterminant,
+                       - m[0][1] * OneOverDeterminant,
+                       - m[1][0] * OneOverDeterminant,
+                       + m[0][0] * OneOverDeterminant);
+
+               return Inverse;
+       }
+}//namespace detail
+
+       //////////////////////////////////////////////////////////////
+       // Constructors
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat2x2<T, P>::tmat2x2()
+       {
+#              ifndef GLM_FORCE_NO_CTOR_INIT 
+                       this->value[0] = col_type(1, 0);
+                       this->value[1] = col_type(0, 1);
+#              endif
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat2x2<T, P>::tmat2x2(tmat2x2<T, P> const & m)
+       {
+               this->value[0] = m.value[0];
+               this->value[1] = m.value[1];
+       }
+
+       template <typename T, precision P>
+       template <precision Q>
+       GLM_FUNC_QUALIFIER tmat2x2<T, P>::tmat2x2(tmat2x2<T, Q> const & m)
+       {
+               this->value[0] = m.value[0];
+               this->value[1] = m.value[1];
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat2x2<T, P>::tmat2x2(ctor)
+       {}
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat2x2<T, P>::tmat2x2(T const & s)
+       {
+               this->value[0] = col_type(s, 0);
+               this->value[1] = col_type(0, s);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat2x2<T, P>::tmat2x2
+       (
+               T const & x0, T const & y0,
+               T const & x1, T const & y1
+       )
+       {
+               this->value[0] = col_type(x0, y0);
+               this->value[1] = col_type(x1, y1);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat2x2<T, P>::tmat2x2(col_type const & v0, col_type const & v1)
+       {
+               this->value[0] = v0;
+               this->value[1] = v1;
+       }
+
+       //////////////////////////////////////
+       // Conversion constructors
+       template <typename T, precision P>
+       template <typename X1, typename Y1, typename X2, typename Y2>
+       GLM_FUNC_QUALIFIER tmat2x2<T, P>::tmat2x2
+       (
+               X1 const & x1, Y1 const & y1,
+               X2 const & x2, Y2 const & y2
+       )
+       {
+               this->value[0] = col_type(static_cast<T>(x1), value_type(y1));
+               this->value[1] = col_type(static_cast<T>(x2), value_type(y2));
+       }
+       
+       template <typename T, precision P>
+       template <typename V1, typename V2>
+       GLM_FUNC_QUALIFIER tmat2x2<T, P>::tmat2x2(tvec2<V1, P> const & v1, tvec2<V2, P> const & v2)
+       {
+               this->value[0] = col_type(v1);
+               this->value[1] = col_type(v2);
+       }
+
+       //////////////////////////////////////////////////////////////
+       // mat2x2 matrix conversions
+
+       template <typename T, precision P>
+       template <typename U, precision Q>
+       GLM_FUNC_QUALIFIER tmat2x2<T, P>::tmat2x2(tmat2x2<U, Q> const & m)
+       {
+               this->value[0] = col_type(m[0]);
+               this->value[1] = col_type(m[1]);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat2x2<T, P>::tmat2x2(tmat3x3<T, P> const & m)
+       {
+               this->value[0] = col_type(m[0]);
+               this->value[1] = col_type(m[1]);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat2x2<T, P>::tmat2x2(tmat4x4<T, P> const & m)
+       {
+               this->value[0] = col_type(m[0]);
+               this->value[1] = col_type(m[1]);
+       }
+
+       template <typename T, precision P> 
+       GLM_FUNC_QUALIFIER tmat2x2<T, P>::tmat2x2(tmat2x3<T, P> const & m)
+       {
+               this->value[0] = col_type(m[0]);
+               this->value[1] = col_type(m[1]);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat2x2<T, P>::tmat2x2(tmat3x2<T, P> const & m)
+       {
+               this->value[0] = m[0];
+               this->value[1] = m[1];
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat2x2<T, P>::tmat2x2(tmat2x4<T, P> const & m)
+       {
+               this->value[0] = col_type(m[0]);
+               this->value[1] = col_type(m[1]);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat2x2<T, P>::tmat2x2(tmat4x2<T, P> const & m)
+       {
+               this->value[0] = m[0];
+               this->value[1] = m[1];
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat2x2<T, P>::tmat2x2(tmat3x4<T, P> const & m)
+       {
+               this->value[0] = col_type(m[0]);
+               this->value[1] = col_type(m[1]);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat2x2<T, P>::tmat2x2(tmat4x3<T, P> const & m)
+       {
+               this->value[0] = col_type(m[0]);
+               this->value[1] = col_type(m[1]);
+       }
+
+       //////////////////////////////////////
+       // Accesses
+
+#      ifdef GLM_FORCE_SIZE_FUNC
+               template <typename T, precision P>
+               GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tmat2x2<T, P>::size_type tmat2x2<T, P>::size() const
+               {
+                       return 2;
+               }
+
+               template <typename T, precision P>
+               GLM_FUNC_QUALIFIER typename tmat2x2<T, P>::col_type & tmat2x2<T, P>::operator[](typename tmat2x2<T, P>::size_type i)
+               {
+                       assert(i < this->size());
+                       return this->value[i];
+               }
+
+               template <typename T, precision P>
+               GLM_FUNC_QUALIFIER typename tmat2x2<T, P>::col_type const & tmat2x2<T, P>::operator[](typename tmat2x2<T, P>::size_type i) const
+               {
+                       assert(i < this->size());
+                       return this->value[i];
+               }
+#      else
+               template <typename T, precision P>
+               GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tmat2x2<T, P>::length_type tmat2x2<T, P>::length() const
+               {
+                       return 2;
+               }
+
+               template <typename T, precision P>
+               GLM_FUNC_QUALIFIER typename tmat2x2<T, P>::col_type & tmat2x2<T, P>::operator[](typename tmat2x2<T, P>::length_type i)
+               {
+                       assert(i < this->length());
+                       return this->value[i];
+               }
+
+               template <typename T, precision P>
+               GLM_FUNC_QUALIFIER typename tmat2x2<T, P>::col_type const & tmat2x2<T, P>::operator[](typename tmat2x2<T, P>::length_type i) const
+               {
+                       assert(i < this->length());
+                       return this->value[i];
+               }
+#      endif//GLM_FORCE_SIZE_FUNC
+
+       //////////////////////////////////////////////////////////////
+       // Unary updatable operators
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat2x2<T, P>& tmat2x2<T, P>::operator=(tmat2x2<T, P> const & m)
+       {
+               this->value[0] = m[0];
+               this->value[1] = m[1];
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U>
+       GLM_FUNC_QUALIFIER tmat2x2<T, P>& tmat2x2<T, P>::operator=(tmat2x2<U, P> const & m)
+       {
+               this->value[0] = m[0];
+               this->value[1] = m[1];
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U>
+       GLM_FUNC_QUALIFIER tmat2x2<T, P>& tmat2x2<T, P>::operator+=(U s)
+       {
+               this->value[0] += s;
+               this->value[1] += s;
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U>
+       GLM_FUNC_QUALIFIER tmat2x2<T, P>& tmat2x2<T, P>::operator+=(tmat2x2<U, P> const & m)
+       {
+               this->value[0] += m[0];
+               this->value[1] += m[1];
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U>
+       GLM_FUNC_QUALIFIER tmat2x2<T, P>& tmat2x2<T, P>::operator-=(U s)
+       {
+               this->value[0] -= s;
+               this->value[1] -= s;
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U>
+       GLM_FUNC_QUALIFIER tmat2x2<T, P>& tmat2x2<T, P>::operator-=(tmat2x2<U, P> const & m)
+       {
+               this->value[0] -= m[0];
+               this->value[1] -= m[1];
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U>
+       GLM_FUNC_QUALIFIER tmat2x2<T, P>& tmat2x2<T, P>::operator*=(U s)
+       {
+               this->value[0] *= s;
+               this->value[1] *= s;
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U>
+       GLM_FUNC_QUALIFIER tmat2x2<T, P>& tmat2x2<T, P>::operator*=(tmat2x2<U, P> const & m)
+       {
+               return (*this = *this * m);
+       }
+
+       template <typename T, precision P>
+       template <typename U>
+       GLM_FUNC_QUALIFIER tmat2x2<T, P>& tmat2x2<T, P>::operator/=(U s)
+       {
+               this->value[0] /= s;
+               this->value[1] /= s;
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U>
+       GLM_FUNC_QUALIFIER tmat2x2<T, P>& tmat2x2<T, P>::operator/=(tmat2x2<U, P> const & m)
+       {
+               return (*this = *this * detail::compute_inverse<T, P>(m));
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat2x2<T, P>& tmat2x2<T, P>::operator++()
+       {
+               ++this->value[0];
+               ++this->value[1];
+               return *this;
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat2x2<T, P>& tmat2x2<T, P>::operator--()
+       {
+               --this->value[0];
+               --this->value[1];
+               return *this;
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat2x2<T, P> tmat2x2<T, P>::operator++(int)
+       {
+               tmat2x2<T, P> Result(*this);
+               ++*this;
+               return Result;
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat2x2<T, P> tmat2x2<T, P>::operator--(int)
+       {
+               tmat2x2<T, P> Result(*this);
+               --*this;
+               return Result;
+       }
+
+       //////////////////////////////////////////////////////////////
+       // Binary operators
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat2x2<T, P> operator+(tmat2x2<T, P> const & m, T const & s)
+       {
+               return tmat2x2<T, P>(
+                       m[0] + s,
+                       m[1] + s);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat2x2<T, P> operator+(T const & s, tmat2x2<T, P> const & m)
+       {
+               return tmat2x2<T, P>(
+                       m[0] + s,
+                       m[1] + s);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat2x2<T, P> operator+(tmat2x2<T, P> const & m1, tmat2x2<T, P> const & m2)
+       {
+               return tmat2x2<T, P>(
+                       m1[0] + m2[0],
+                       m1[1] + m2[1]);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat2x2<T, P> operator-(tmat2x2<T, P> const & m, T const & s)
+       {
+               return tmat2x2<T, P>(
+                       m[0] - s,
+                       m[1] - s);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat2x2<T, P> operator-(T const & s, tmat2x2<T, P> const & m)
+       {
+               return tmat2x2<T, P>(
+                       s - m[0],
+                       s - m[1]);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat2x2<T, P> operator-(tmat2x2<T, P> const & m1, tmat2x2<T, P> const & m2)
+       {
+               return tmat2x2<T, P>(
+                       m1[0] - m2[0],
+                       m1[1] - m2[1]);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat2x2<T, P> operator*(tmat2x2<T, P> const & m,     T const & s)
+       {
+               return tmat2x2<T, P>(
+                       m[0] * s,
+                       m[1] * s);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat2x2<T, P> operator*(T const & s, tmat2x2<T, P> const & m)
+       {
+               return tmat2x2<T, P>(
+                       m[0] * s,
+                       m[1] * s);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER typename tmat2x2<T, P>::col_type operator*
+       (
+               tmat2x2<T, P> const & m,
+               typename tmat2x2<T, P>::row_type const & v
+       )
+       {
+               return tvec2<T, P>(
+                       m[0][0] * v.x + m[1][0] * v.y,
+                       m[0][1] * v.x + m[1][1] * v.y);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER typename tmat2x2<T, P>::row_type operator*
+       (
+               typename tmat2x2<T, P>::col_type const & v,
+               tmat2x2<T, P> const & m
+       )
+       {
+               return tvec2<T, P>(
+                       v.x * m[0][0] + v.y * m[0][1],
+                       v.x * m[1][0] + v.y * m[1][1]);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat2x2<T, P> operator*(tmat2x2<T, P> const & m1, tmat2x2<T, P> const & m2)
+       {
+               return tmat2x2<T, P>(
+                       m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1],
+                       m1[0][1] * m2[0][0] + m1[1][1] * m2[0][1],
+                       m1[0][0] * m2[1][0] + m1[1][0] * m2[1][1],
+                       m1[0][1] * m2[1][0] + m1[1][1] * m2[1][1]);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat3x2<T, P> operator*(tmat2x2<T, P> const & m1, tmat3x2<T, P> const & m2)
+       {
+               return tmat3x2<T, P>(
+                       m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1],
+                       m1[0][1] * m2[0][0] + m1[1][1] * m2[0][1],
+                       m1[0][0] * m2[1][0] + m1[1][0] * m2[1][1],
+                       m1[0][1] * m2[1][0] + m1[1][1] * m2[1][1],
+                       m1[0][0] * m2[2][0] + m1[1][0] * m2[2][1],
+                       m1[0][1] * m2[2][0] + m1[1][1] * m2[2][1]);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat4x2<T, P> operator*(tmat2x2<T, P> const & m1, tmat4x2<T, P> const & m2)
+       {
+               return tmat4x2<T, P>(
+                       m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1],
+                       m1[0][1] * m2[0][0] + m1[1][1] * m2[0][1],
+                       m1[0][0] * m2[1][0] + m1[1][0] * m2[1][1],
+                       m1[0][1] * m2[1][0] + m1[1][1] * m2[1][1],
+                       m1[0][0] * m2[2][0] + m1[1][0] * m2[2][1],
+                       m1[0][1] * m2[2][0] + m1[1][1] * m2[2][1],
+                       m1[0][0] * m2[3][0] + m1[1][0] * m2[3][1],
+                       m1[0][1] * m2[3][0] + m1[1][1] * m2[3][1]);
+       }
+
+       template <typename T, precision P> 
+       GLM_FUNC_QUALIFIER tmat2x2<T, P> operator/(tmat2x2<T, P> const & m,     T const & s)
+       {
+               return tmat2x2<T, P>(
+                       m[0] / s,
+                       m[1] / s);
+       }
+
+       template <typename T, precision P> 
+       GLM_FUNC_QUALIFIER tmat2x2<T, P> operator/(T const & s, tmat2x2<T, P> const & m)
+       {
+               return tmat2x2<T, P>(
+                       s / m[0],
+                       s / m[1]);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER typename tmat2x2<T, P>::col_type operator/(tmat2x2<T, P> const & m, typename tmat2x2<T, P>::row_type const & v)
+       {
+               return detail::compute_inverse<T, P>(m) * v;
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER typename tmat2x2<T, P>::row_type operator/(typename tmat2x2<T, P>::col_type const & v, tmat2x2<T, P> const & m)
+       {
+               return v * detail::compute_inverse<T, P>(m);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat2x2<T, P> operator/(tmat2x2<T, P> const & m1, tmat2x2<T, P> const & m2)
+       {       
+               tmat2x2<T, P> m1_copy(m1);
+               return m1_copy /= m2;
+       }
+
+       // Unary constant operators
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat2x2<T, P> const operator-(tmat2x2<T, P> const & m)
+       {
+               return tmat2x2<T, P>(
+                       -m[0], 
+                       -m[1]);
+       }
+
+       //////////////////////////////////////
+       // Boolean operators
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER bool operator==(tmat2x2<T, P> const & m1, tmat2x2<T, P> const & m2)
+       {
+               return (m1[0] == m2[0]) && (m1[1] == m2[1]);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER bool operator!=(tmat2x2<T, P> const & m1, tmat2x2<T, P> const & m2)
+       {
+               return (m1[0] != m2[0]) || (m1[1] != m2[1]);
+       }
+} //namespace glm
diff --git a/include/glm/detail/type_mat2x3.hpp b/include/glm/detail/type_mat2x3.hpp
new file mode 100644 (file)
index 0000000..9986e88
--- /dev/null
@@ -0,0 +1,201 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref core
+/// @file glm/detail/type_mat2x3.hpp
+/// @date 2006-10-01 / 2011-06-15
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////
+
+#pragma once
+
+#include "../fwd.hpp"
+#include "type_vec2.hpp"
+#include "type_vec3.hpp"
+#include "type_mat.hpp"
+#include <limits>
+#include <cstddef>
+
+namespace glm
+{
+       template <typename T, precision P = defaultp>
+       struct tmat2x3
+       {
+               typedef tvec3<T, P> col_type;
+               typedef tvec2<T, P> row_type;
+               typedef tmat2x3<T, P> type;
+               typedef tmat3x2<T, P> transpose_type;
+               typedef T value_type;
+
+       private:
+               /// @cond DETAIL 
+               col_type value[2];
+               /// @endcond
+               
+       public:
+               // Constructors
+               GLM_FUNC_DECL tmat2x3();
+               GLM_FUNC_DECL tmat2x3(tmat2x3<T, P> const & m);
+               template <precision Q>
+               GLM_FUNC_DECL tmat2x3(tmat2x3<T, Q> const & m);
+
+               GLM_FUNC_DECL explicit tmat2x3(ctor);
+               GLM_FUNC_DECL explicit tmat2x3(T const & s);
+               GLM_FUNC_DECL tmat2x3(
+                       T const & x0, T const & y0, T const & z0,
+                       T const & x1, T const & y1, T const & z1);
+               GLM_FUNC_DECL tmat2x3(
+                       col_type const & v0,
+                       col_type const & v1);
+
+               //////////////////////////////////////
+               // Conversions
+
+               template <typename X1, typename Y1, typename Z1, typename X2, typename Y2, typename Z2>
+               GLM_FUNC_DECL tmat2x3(
+                       X1 const & x1, Y1 const & y1, Z1 const & z1,
+                       X2 const & x2, Y2 const & y2, Z2 const & z2);
+                       
+               template <typename U, typename V>
+               GLM_FUNC_DECL tmat2x3(
+                       tvec3<U, P> const & v1,
+                       tvec3<V, P> const & v2);
+
+               //////////////////////////////////////
+               // Matrix conversion
+
+#              ifdef GLM_FORCE_EXPLICIT_CTOR
+                       template <typename U, precision Q>
+                       GLM_FUNC_DECL explicit tmat2x3(tmat2x3<U, Q> const & m);
+#              else
+                       template <typename U, precision Q>
+                       GLM_FUNC_DECL tmat2x3(tmat2x3<U, Q> const & m);
+#              endif
+
+               GLM_FUNC_DECL explicit tmat2x3(tmat2x2<T, P> const & x);
+               GLM_FUNC_DECL explicit tmat2x3(tmat3x3<T, P> const & x);
+               GLM_FUNC_DECL explicit tmat2x3(tmat4x4<T, P> const & x);
+               GLM_FUNC_DECL explicit tmat2x3(tmat2x4<T, P> const & x);
+               GLM_FUNC_DECL explicit tmat2x3(tmat3x2<T, P> const & x);
+               GLM_FUNC_DECL explicit tmat2x3(tmat3x4<T, P> const & x);
+               GLM_FUNC_DECL explicit tmat2x3(tmat4x2<T, P> const & x);
+               GLM_FUNC_DECL explicit tmat2x3(tmat4x3<T, P> const & x);
+
+               //////////////////////////////////////
+               // Accesses
+
+#              ifdef GLM_FORCE_SIZE_FUNC
+                       typedef size_t size_type;
+                       GLM_FUNC_DECL GLM_CONSTEXPR size_t size() const;
+
+                       GLM_FUNC_DECL col_type & operator[](size_type i);
+                       GLM_FUNC_DECL col_type const & operator[](size_type i) const;
+#              else
+                       typedef length_t length_type;
+                       GLM_FUNC_DECL GLM_CONSTEXPR length_type length() const;
+
+                       GLM_FUNC_DECL col_type & operator[](length_type i);
+                       GLM_FUNC_DECL col_type const & operator[](length_type i) const;
+#              endif//GLM_FORCE_SIZE_FUNC
+
+               //////////////////////////////////////
+               // Unary arithmetic operators
+
+               GLM_FUNC_DECL tmat2x3<T, P> & operator=(tmat2x3<T, P> const & m);
+
+               template <typename U> 
+               GLM_FUNC_DECL tmat2x3<T, P> & operator=(tmat2x3<U, P> const & m);
+               template <typename U> 
+               GLM_FUNC_DECL tmat2x3<T, P> & operator+=(U s);
+               template <typename U> 
+               GLM_FUNC_DECL tmat2x3<T, P> & operator+=(tmat2x3<U, P> const & m);
+               template <typename U> 
+               GLM_FUNC_DECL tmat2x3<T, P> & operator-=(U s);
+               template <typename U> 
+               GLM_FUNC_DECL tmat2x3<T, P> & operator-=(tmat2x3<U, P> const & m);
+               template <typename U> 
+               GLM_FUNC_DECL tmat2x3<T, P> & operator*=(U s);
+               template <typename U> 
+               GLM_FUNC_DECL tmat2x3<T, P> & operator/=(U s);
+
+               //////////////////////////////////////
+               // Increment and decrement operators
+
+               GLM_FUNC_DECL tmat2x3<T, P> & operator++ ();
+               GLM_FUNC_DECL tmat2x3<T, P> & operator-- ();
+               GLM_FUNC_DECL tmat2x3<T, P> operator++(int);
+               GLM_FUNC_DECL tmat2x3<T, P> operator--(int);
+       };
+
+       // Binary operators
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat2x3<T, P> operator+(tmat2x3<T, P> const & m, T const & s);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat2x3<T, P> operator+(tmat2x3<T, P> const & m1, tmat2x3<T, P> const & m2);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat2x3<T, P> operator-(tmat2x3<T, P> const & m, T const & s);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat2x3<T, P> operator-(tmat2x3<T, P> const & m1, tmat2x3<T, P> const & m2);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat2x3<T, P> operator*(tmat2x3<T, P> const & m, T const & s);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat2x3<T, P> operator*(T const & s, tmat2x3<T, P> const & m);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL typename tmat2x3<T, P>::col_type operator*(tmat2x3<T, P> const & m, typename tmat2x3<T, P>::row_type const & v);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL typename tmat2x3<T, P>::row_type operator*(typename tmat2x3<T, P>::col_type const & v, tmat2x3<T, P> const & m);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat2x3<T, P> operator*(tmat2x3<T, P> const & m1, tmat2x2<T, P> const & m2);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat3x3<T, P> operator*(tmat2x3<T, P> const & m1, tmat3x2<T, P> const & m2);
+               
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat4x3<T, P> operator*(tmat2x3<T, P> const & m1, tmat4x2<T, P> const & m2);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat2x3<T, P> operator/(tmat2x3<T, P> const & m, T const & s);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat2x3<T, P> operator/(T const & s, tmat2x3<T, P> const & m);
+
+       // Unary constant operators
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat2x3<T, P> const operator-(tmat2x3<T, P> const & m);
+}//namespace glm
+
+#ifndef GLM_EXTERNAL_TEMPLATE
+#include "type_mat2x3.inl"
+#endif
diff --git a/include/glm/detail/type_mat2x3.inl b/include/glm/detail/type_mat2x3.inl
new file mode 100644 (file)
index 0000000..32c30fd
--- /dev/null
@@ -0,0 +1,506 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref core
+/// @file glm/detail/type_mat2x3.inl
+/// @date 2006-08-05 / 2011-06-15
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////
+
+namespace glm
+{
+       //////////////////////////////////////////////////////////////
+       // Constructors
+
+       template <typename T, precision P> 
+       GLM_FUNC_QUALIFIER tmat2x3<T, P>::tmat2x3()
+       {
+#              ifndef GLM_FORCE_NO_CTOR_INIT 
+                       this->value[0] = col_type(1, 0, 0);
+                       this->value[1] = col_type(0, 1, 0);
+#              endif
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat2x3<T, P>::tmat2x3(tmat2x3<T, P> const & m)
+       {
+               this->value[0] = m.value[0];
+               this->value[1] = m.value[1];
+       }
+
+       template <typename T, precision P>
+       template <precision Q>
+       GLM_FUNC_QUALIFIER tmat2x3<T, P>::tmat2x3(tmat2x3<T, Q> const & m)
+       {
+               this->value[0] = m.value[0];
+               this->value[1] = m.value[1];
+       }
+
+       template <typename T, precision P> 
+       GLM_FUNC_QUALIFIER tmat2x3<T, P>::tmat2x3(ctor)
+       {}
+
+       template <typename T, precision P> 
+       GLM_FUNC_QUALIFIER tmat2x3<T, P>::tmat2x3(T const & s)
+       {
+               this->value[0] = col_type(s, 0, 0);
+               this->value[1] = col_type(0, s, 0);
+       }
+
+       template <typename T, precision P> 
+       GLM_FUNC_QUALIFIER tmat2x3<T, P>::tmat2x3
+       (
+               T const & x0, T const & y0, T const & z0,
+               T const & x1, T const & y1, T const & z1
+       )
+       {
+               this->value[0] = col_type(x0, y0, z0);
+               this->value[1] = col_type(x1, y1, z1);
+       }
+
+       template <typename T, precision P> 
+       GLM_FUNC_QUALIFIER tmat2x3<T, P>::tmat2x3(col_type const & v0, col_type const & v1)
+       {
+               this->value[0] = v0;
+               this->value[1] = v1;
+       }
+
+       //////////////////////////////////////
+       // Conversion constructors
+       template <typename T, precision P>
+       template <
+               typename X1, typename Y1, typename Z1,
+               typename X2, typename Y2, typename Z2>
+       GLM_FUNC_QUALIFIER tmat2x3<T, P>::tmat2x3
+       (
+               X1 const & x1, Y1 const & y1, Z1 const & z1,
+               X2 const & x2, Y2 const & y2, Z2 const & z2
+       )
+       {
+               this->value[0] = col_type(static_cast<T>(x1), value_type(y1), value_type(z1));
+               this->value[1] = col_type(static_cast<T>(x2), value_type(y2), value_type(z2));
+       }
+       
+       template <typename T, precision P>
+       template <typename V1, typename V2>
+       GLM_FUNC_QUALIFIER tmat2x3<T, P>::tmat2x3(tvec3<V1, P> const & v1, tvec3<V2, P> const & v2)
+       {
+               this->value[0] = col_type(v1);
+               this->value[1] = col_type(v2);
+       }
+
+       //////////////////////////////////////
+       // Matrix conversions
+
+       template <typename T, precision P>
+       template <typename U, precision Q>
+       GLM_FUNC_QUALIFIER tmat2x3<T, P>::tmat2x3(tmat2x3<U, Q> const & m)
+       {
+               this->value[0] = col_type(m[0]);
+               this->value[1] = col_type(m[1]);
+       }
+
+       template <typename T, precision P> 
+       GLM_FUNC_QUALIFIER tmat2x3<T, P>::tmat2x3(tmat2x2<T, P> const & m)
+       {
+               this->value[0] = col_type(m[0], 0);
+               this->value[1] = col_type(m[1], 0);
+       }
+
+       template <typename T, precision P> 
+       GLM_FUNC_QUALIFIER tmat2x3<T, P>::tmat2x3(tmat3x3<T, P> const & m)
+       {
+               this->value[0] = col_type(m[0]);
+               this->value[1] = col_type(m[1]);
+       }
+
+       template <typename T, precision P> 
+       GLM_FUNC_QUALIFIER tmat2x3<T, P>::tmat2x3(tmat4x4<T, P> const & m)
+       {
+               this->value[0] = col_type(m[0]);
+               this->value[1] = col_type(m[1]);
+       }
+
+       template <typename T, precision P> 
+       GLM_FUNC_QUALIFIER tmat2x3<T, P>::tmat2x3(tmat2x4<T, P> const & m)
+       {
+               this->value[0] = col_type(m[0]);
+               this->value[1] = col_type(m[1]);
+       }
+
+       template <typename T, precision P> 
+       GLM_FUNC_QUALIFIER tmat2x3<T, P>::tmat2x3(tmat3x2<T, P> const & m)
+       {
+               this->value[0] = col_type(m[0], 0);
+               this->value[1] = col_type(m[1], 0);
+       }
+
+       template <typename T, precision P> 
+       GLM_FUNC_QUALIFIER tmat2x3<T, P>::tmat2x3(tmat3x4<T, P> const & m)
+       {
+               this->value[0] = col_type(m[0]);
+               this->value[1] = col_type(m[1]);
+       }
+
+       template <typename T, precision P> 
+       GLM_FUNC_QUALIFIER tmat2x3<T, P>::tmat2x3(tmat4x2<T, P> const & m)
+       {
+               this->value[0] = col_type(m[0], 0);
+               this->value[1] = col_type(m[1], 0);
+       }
+
+       template <typename T, precision P> 
+       GLM_FUNC_QUALIFIER tmat2x3<T, P>::tmat2x3(tmat4x3<T, P> const & m)
+       {
+               this->value[0] = m[0];
+               this->value[1] = m[1];
+       }
+
+       //////////////////////////////////////
+       // Accesses
+
+#      ifdef GLM_FORCE_SIZE_FUNC
+               template <typename T, precision P>
+               GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tmat2x3<T, P>::size_type tmat2x3<T, P>::size() const
+               {
+                       return 2;
+               }
+
+               template <typename T, precision P>
+               GLM_FUNC_QUALIFIER typename tmat2x3<T, P>::col_type & tmat2x3<T, P>::operator[](typename tmat2x3<T, P>::size_type i)
+               {
+                       assert(i < this->size());
+                       return this->value[i];
+               }
+
+               template <typename T, precision P>
+               GLM_FUNC_QUALIFIER typename tmat2x3<T, P>::col_type const & tmat2x3<T, P>::operator[](typename tmat2x3<T, P>::size_type i) const
+               {
+                       assert(i < this->size());
+                       return this->value[i];
+               }
+#      else
+               template <typename T, precision P>
+               GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tmat2x3<T, P>::length_type tmat2x3<T, P>::length() const
+               {
+                       return 2;
+               }
+
+               template <typename T, precision P>
+               GLM_FUNC_QUALIFIER typename tmat2x3<T, P>::col_type & tmat2x3<T, P>::operator[](typename tmat2x3<T, P>::length_type i)
+               {
+                       assert(i < this->length());
+                       return this->value[i];
+               }
+
+               template <typename T, precision P>
+               GLM_FUNC_QUALIFIER typename tmat2x3<T, P>::col_type const & tmat2x3<T, P>::operator[](typename tmat2x3<T, P>::length_type i) const
+               {
+                       assert(i < this->length());
+                       return this->value[i];
+               }
+#      endif//GLM_FORCE_SIZE_FUNC
+
+       //////////////////////////////////////////////////////////////
+       // Unary updatable operators
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat2x3<T, P>& tmat2x3<T, P>::operator=(tmat2x3<T, P> const & m)
+       {
+               this->value[0] = m[0];
+               this->value[1] = m[1];
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U>
+       GLM_FUNC_QUALIFIER tmat2x3<T, P>& tmat2x3<T, P>::operator=(tmat2x3<U, P> const & m)
+       {
+               this->value[0] = m[0];
+               this->value[1] = m[1];
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U>
+       GLM_FUNC_QUALIFIER tmat2x3<T, P> & tmat2x3<T, P>::operator+=(U s)
+       {
+               this->value[0] += s;
+               this->value[1] += s;
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U>
+       GLM_FUNC_QUALIFIER tmat2x3<T, P>& tmat2x3<T, P>::operator+=(tmat2x3<U, P> const & m)
+       {
+               this->value[0] += m[0];
+               this->value[1] += m[1];
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U>
+       GLM_FUNC_QUALIFIER tmat2x3<T, P>& tmat2x3<T, P>::operator-=(U s)
+       {
+               this->value[0] -= s;
+               this->value[1] -= s;
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U>
+       GLM_FUNC_QUALIFIER tmat2x3<T, P>& tmat2x3<T, P>::operator-=(tmat2x3<U, P> const & m)
+       {
+               this->value[0] -= m[0];
+               this->value[1] -= m[1];
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U>
+       GLM_FUNC_QUALIFIER tmat2x3<T, P>& tmat2x3<T, P>::operator*=(U s)
+       {
+               this->value[0] *= s;
+               this->value[1] *= s;
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U>
+       GLM_FUNC_QUALIFIER tmat2x3<T, P> & tmat2x3<T, P>::operator/=(U s)
+       {
+               this->value[0] /= s;
+               this->value[1] /= s;
+               return *this;
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat2x3<T, P> & tmat2x3<T, P>::operator++()
+       {
+               ++this->value[0];
+               ++this->value[1];
+               return *this;
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat2x3<T, P> & tmat2x3<T, P>::operator--()
+       {
+               --this->value[0];
+               --this->value[1];
+               return *this;
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat2x3<T, P> tmat2x3<T, P>::operator++(int)
+       {
+               tmat2x3<T, P> Result(*this);
+               ++*this;
+               return Result;
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat2x3<T, P> tmat2x3<T, P>::operator--(int)
+       {
+               tmat2x3<T, P> Result(*this);
+               --*this;
+               return Result;
+       }
+
+       //////////////////////////////////////////////////////////////
+       // Binary operators
+
+       template <typename T, precision P> 
+       GLM_FUNC_QUALIFIER tmat2x3<T, P> operator+(tmat2x3<T, P> const & m, T const & s)
+       {
+               return tmat2x3<T, P>(
+                       m[0] + s,
+                       m[1] + s);
+       }
+
+       template <typename T, precision P> 
+       GLM_FUNC_QUALIFIER tmat2x3<T, P> operator+(tmat2x3<T, P> const & m1, tmat2x3<T, P> const & m2)
+       {
+               return tmat2x3<T, P>(
+                       m1[0] + m2[0],
+                       m1[1] + m2[1]);
+       }
+
+       template <typename T, precision P> 
+       GLM_FUNC_QUALIFIER tmat2x3<T, P> operator-(tmat2x3<T, P> const & m, T const & s)
+       {
+               return tmat2x3<T, P>(
+                       m[0] - s,
+                       m[1] - s);
+       }
+
+       template <typename T, precision P> 
+       GLM_FUNC_QUALIFIER tmat2x3<T, P> operator-(tmat2x3<T, P> const & m1, tmat2x3<T, P> const & m2)
+       {
+               return tmat2x3<T, P>(
+                       m1[0] - m2[0],
+                       m1[1] - m2[1]);
+       }
+
+       template <typename T, precision P> 
+       GLM_FUNC_QUALIFIER tmat2x3<T, P> operator*(tmat2x3<T, P> const & m, T const & s)
+       {
+               return tmat2x3<T, P>(
+                       m[0] * s,
+                       m[1] * s);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat2x3<T, P> operator*(T const & s, tmat2x3<T, P> const & m)
+       {
+               return tmat2x3<T, P>(
+                       m[0] * s,
+                       m[1] * s);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER typename tmat2x3<T, P>::col_type operator*
+       (
+               tmat2x3<T, P> const & m,
+               typename tmat2x3<T, P>::row_type const & v)
+       {
+               return typename tmat2x3<T, P>::col_type(
+                       m[0][0] * v.x + m[1][0] * v.y,
+                       m[0][1] * v.x + m[1][1] * v.y,
+                       m[0][2] * v.x + m[1][2] * v.y);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER typename tmat2x3<T, P>::row_type operator*
+       (
+               typename tmat2x3<T, P>::col_type const & v,
+               tmat2x3<T, P> const & m)
+       {
+               return typename tmat2x3<T, P>::row_type(
+                       v.x * m[0][0] + v.y * m[0][1] + v.z * m[0][2],
+                       v.x * m[1][0] + v.y * m[1][1] + v.z * m[1][2]);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat2x3<T, P> operator*(tmat2x3<T, P> const & m1, tmat2x2<T, P> const & m2)
+       {
+               return tmat2x3<T, P>(
+                       m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1],
+                       m1[0][1] * m2[0][0] + m1[1][1] * m2[0][1],
+                       m1[0][2] * m2[0][0] + m1[1][2] * m2[0][1],
+                       m1[0][0] * m2[1][0] + m1[1][0] * m2[1][1],
+                       m1[0][1] * m2[1][0] + m1[1][1] * m2[1][1],
+                       m1[0][2] * m2[1][0] + m1[1][2] * m2[1][1]);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat3x3<T, P> operator*(tmat2x3<T, P> const & m1, tmat3x2<T, P> const & m2)
+       {
+               T SrcA00 = m1[0][0];
+               T SrcA01 = m1[0][1];
+               T SrcA02 = m1[0][2];
+               T SrcA10 = m1[1][0];
+               T SrcA11 = m1[1][1];
+               T SrcA12 = m1[1][2];
+
+               T SrcB00 = m2[0][0];
+               T SrcB01 = m2[0][1];
+               T SrcB10 = m2[1][0];
+               T SrcB11 = m2[1][1];
+               T SrcB20 = m2[2][0];
+               T SrcB21 = m2[2][1];
+
+               tmat3x3<T, P> Result(uninitialize);
+               Result[0][0] = SrcA00 * SrcB00 + SrcA10 * SrcB01;
+               Result[0][1] = SrcA01 * SrcB00 + SrcA11 * SrcB01;
+               Result[0][2] = SrcA02 * SrcB00 + SrcA12 * SrcB01;
+               Result[1][0] = SrcA00 * SrcB10 + SrcA10 * SrcB11;
+               Result[1][1] = SrcA01 * SrcB10 + SrcA11 * SrcB11;
+               Result[1][2] = SrcA02 * SrcB10 + SrcA12 * SrcB11;
+               Result[2][0] = SrcA00 * SrcB20 + SrcA10 * SrcB21;
+               Result[2][1] = SrcA01 * SrcB20 + SrcA11 * SrcB21;
+               Result[2][2] = SrcA02 * SrcB20 + SrcA12 * SrcB21;
+               return Result;
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat4x3<T, P> operator*(tmat2x3<T, P> const & m1, tmat4x2<T, P> const & m2)
+       {
+               return tmat4x3<T, P>(
+                       m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1],
+                       m1[0][1] * m2[0][0] + m1[1][1] * m2[0][1],
+                       m1[0][2] * m2[0][0] + m1[1][2] * m2[0][1],
+                       m1[0][0] * m2[1][0] + m1[1][0] * m2[1][1],
+                       m1[0][1] * m2[1][0] + m1[1][1] * m2[1][1],
+                       m1[0][2] * m2[1][0] + m1[1][2] * m2[1][1],
+                       m1[0][0] * m2[2][0] + m1[1][0] * m2[2][1],
+                       m1[0][1] * m2[2][0] + m1[1][1] * m2[2][1],
+                       m1[0][2] * m2[2][0] + m1[1][2] * m2[2][1],
+                       m1[0][0] * m2[3][0] + m1[1][0] * m2[3][1],
+                       m1[0][1] * m2[3][0] + m1[1][1] * m2[3][1],
+                       m1[0][2] * m2[3][0] + m1[1][2] * m2[3][1]);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat2x3<T, P> operator/(tmat2x3<T, P> const & m, T const & s)
+       {
+               return tmat2x3<T, P>(
+                       m[0] / s,
+                       m[1] / s);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat2x3<T, P> operator/(T const & s, tmat2x3<T, P> const & m)
+       {
+               return tmat2x3<T, P>(
+                       s / m[0],
+                       s / m[1]);
+       }
+
+       // Unary constant operators
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat2x3<T, P> const operator-(tmat2x3<T, P> const & m)
+       {
+               return tmat2x3<T, P>(
+                       -m[0],
+                       -m[1]);
+       }
+
+       //////////////////////////////////////
+       // Boolean operators
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER bool operator==(tmat2x3<T, P> const & m1, tmat2x3<T, P> const & m2)
+       {
+               return (m1[0] == m2[0]) && (m1[1] == m2[1]);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER bool operator!=(tmat2x3<T, P> const & m1, tmat2x3<T, P> const & m2)
+       {
+               return (m1[0] != m2[0]) || (m1[1] != m2[1]);
+       }
+} //namespace glm
diff --git a/include/glm/detail/type_mat2x4.hpp b/include/glm/detail/type_mat2x4.hpp
new file mode 100644 (file)
index 0000000..9239e9c
--- /dev/null
@@ -0,0 +1,202 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref core
+/// @file glm/detail/type_mat2x4.hpp
+/// @date 2006-08-05 / 2011-06-15
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////
+
+#pragma once
+
+#include "../fwd.hpp"
+#include "type_vec2.hpp"
+#include "type_vec4.hpp"
+#include "type_mat.hpp"
+#include <limits>
+#include <cstddef>
+
+namespace glm
+{
+       template <typename T, precision P = defaultp>
+       struct tmat2x4
+       {
+               typedef tvec4<T, P> col_type;
+               typedef tvec2<T, P> row_type;
+               typedef tmat2x4<T, P> type;
+               typedef tmat4x2<T, P> transpose_type;
+               typedef T value_type;
+
+       private:
+               /// @cond DETAIL
+               col_type value[2];
+               /// @endcond
+               
+       public:
+               // Constructors
+               GLM_FUNC_DECL tmat2x4();
+               GLM_FUNC_DECL tmat2x4(tmat2x4<T, P> const & m);
+               template <precision Q>
+               GLM_FUNC_DECL tmat2x4(tmat2x4<T, Q> const & m);
+
+               GLM_FUNC_DECL explicit tmat2x4(ctor);
+               GLM_FUNC_DECL explicit tmat2x4(T const & s);
+               GLM_FUNC_DECL tmat2x4(
+                       T const & x0, T const & y0, T const & z0, T const & w0,
+                       T const & x1, T const & y1, T const & z1, T const & w1);
+               GLM_FUNC_DECL tmat2x4(
+                       col_type const & v0, 
+                       col_type const & v1);
+
+               //////////////////////////////////////
+               // Conversions
+               template <
+                       typename X1, typename Y1, typename Z1, typename W1,
+                       typename X2, typename Y2, typename Z2, typename W2>
+               GLM_FUNC_DECL tmat2x4(
+                       X1 const & x1, Y1 const & y1, Z1 const & z1, W1 const & w1,
+                       X2 const & x2, Y2 const & y2, Z2 const & z2, W2 const & w2);
+
+               template <typename U, typename V>
+               GLM_FUNC_DECL tmat2x4(
+                       tvec4<U, P> const & v1,
+                       tvec4<V, P> const & v2);
+
+               //////////////////////////////////////
+               // Matrix conversions
+
+#              ifdef GLM_FORCE_EXPLICIT_CTOR
+                       template <typename U, precision Q>
+                       GLM_FUNC_DECL explicit tmat2x4(tmat2x4<U, Q> const & m);
+#              else
+                       template <typename U, precision Q>
+                       GLM_FUNC_DECL tmat2x4(tmat2x4<U, Q> const & m);
+#              endif
+
+               GLM_FUNC_DECL explicit tmat2x4(tmat2x2<T, P> const & x);
+               GLM_FUNC_DECL explicit tmat2x4(tmat3x3<T, P> const & x);
+               GLM_FUNC_DECL explicit tmat2x4(tmat4x4<T, P> const & x);
+               GLM_FUNC_DECL explicit tmat2x4(tmat2x3<T, P> const & x);
+               GLM_FUNC_DECL explicit tmat2x4(tmat3x2<T, P> const & x);
+               GLM_FUNC_DECL explicit tmat2x4(tmat3x4<T, P> const & x);
+               GLM_FUNC_DECL explicit tmat2x4(tmat4x2<T, P> const & x);
+               GLM_FUNC_DECL explicit tmat2x4(tmat4x3<T, P> const & x);
+
+               //////////////////////////////////////
+               // Accesses
+
+#              ifdef GLM_FORCE_SIZE_FUNC
+                       typedef size_t size_type;
+                       GLM_FUNC_DECL GLM_CONSTEXPR size_t size() const;
+
+                       GLM_FUNC_DECL col_type & operator[](size_type i);
+                       GLM_FUNC_DECL col_type const & operator[](size_type i) const;
+#              else
+                       typedef length_t length_type;
+                       GLM_FUNC_DECL GLM_CONSTEXPR length_type length() const;
+
+                       GLM_FUNC_DECL col_type & operator[](length_type i);
+                       GLM_FUNC_DECL col_type const & operator[](length_type i) const;
+#              endif//GLM_FORCE_SIZE_FUNC
+
+               //////////////////////////////////////
+               // Unary arithmetic operators
+
+               GLM_FUNC_DECL tmat2x4<T, P> & operator=(tmat2x4<T, P> const & m);
+
+               template <typename U> 
+               GLM_FUNC_DECL tmat2x4<T, P> & operator=(tmat2x4<U, P> const & m);
+               template <typename U> 
+               GLM_FUNC_DECL tmat2x4<T, P> & operator+=(U s);
+               template <typename U> 
+               GLM_FUNC_DECL tmat2x4<T, P> & operator+=(tmat2x4<U, P> const & m);
+               template <typename U> 
+               GLM_FUNC_DECL tmat2x4<T, P> & operator-=(U s);
+               template <typename U> 
+               GLM_FUNC_DECL tmat2x4<T, P> & operator-=(tmat2x4<U, P> const & m);
+               template <typename U> 
+               GLM_FUNC_DECL tmat2x4<T, P> & operator*=(U s);
+               template <typename U> 
+               GLM_FUNC_DECL tmat2x4<T, P> & operator/=(U s);
+
+               //////////////////////////////////////
+               // Increment and decrement operators
+
+               GLM_FUNC_DECL tmat2x4<T, P> & operator++ ();
+               GLM_FUNC_DECL tmat2x4<T, P> & operator-- ();
+               GLM_FUNC_DECL tmat2x4<T, P> operator++(int);
+               GLM_FUNC_DECL tmat2x4<T, P> operator--(int);
+       };
+
+       // Binary operators
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat2x4<T, P> operator+(tmat2x4<T, P> const & m, T const & s);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat2x4<T, P> operator+(tmat2x4<T, P> const & m1, tmat2x4<T, P> const & m2);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat2x4<T, P> operator-(tmat2x4<T, P> const & m, T const & s);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat2x4<T, P> operator-(tmat2x4<T, P> const & m1, tmat2x4<T, P> const & m2);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat2x4<T, P> operator*(tmat2x4<T, P> const & m, T const & s);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat2x4<T, P> operator*(T const & s, tmat2x4<T, P> const & m);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL typename tmat2x4<T, P>::col_type operator*(tmat2x4<T, P> const & m, typename tmat2x4<T, P>::row_type const & v);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL typename tmat2x4<T, P>::row_type operator*(typename tmat2x4<T, P>::col_type const & v, tmat2x4<T, P> const & m);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat4x4<T, P> operator*(tmat2x4<T, P> const & m1, tmat4x2<T, P> const & m2);
+               
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat2x4<T, P> operator*(tmat2x4<T, P> const & m1, tmat2x2<T, P> const & m2);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat3x4<T, P> operator*(tmat2x4<T, P> const & m1, tmat3x2<T, P> const & m2);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat2x4<T, P> operator/(tmat2x4<T, P> const & m, T s);
+
+       template <typename T, precision P> 
+       GLM_FUNC_DECL tmat2x4<T, P> operator/(T s, tmat2x4<T, P> const & m);
+
+       // Unary constant operators
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat2x4<T, P> const operator-(tmat2x4<T, P> const & m);
+}//namespace glm
+
+#ifndef GLM_EXTERNAL_TEMPLATE
+#include "type_mat2x4.inl"
+#endif
diff --git a/include/glm/detail/type_mat2x4.inl b/include/glm/detail/type_mat2x4.inl
new file mode 100644 (file)
index 0000000..fcf5d31
--- /dev/null
@@ -0,0 +1,515 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref core
+/// @file glm/detail/type_mat2x4.inl
+/// @date 2006-08-05 / 2011-06-15
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////
+
+namespace glm
+{
+       //////////////////////////////////////////////////////////////
+       // Constructors
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat2x4<T, P>::tmat2x4()
+       {
+#              ifndef GLM_FORCE_NO_CTOR_INIT 
+                       this->value[0] = col_type(1, 0, 0, 0);
+                       this->value[1] = col_type(0, 1, 0, 0);
+#              endif
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat2x4<T, P>::tmat2x4(tmat2x4<T, P> const & m)
+       {
+               this->value[0] = m.value[0];
+               this->value[1] = m.value[1];
+       }
+
+       template <typename T, precision P>
+       template <precision Q>
+       GLM_FUNC_QUALIFIER tmat2x4<T, P>::tmat2x4(tmat2x4<T, Q> const & m)
+       {
+               this->value[0] = m.value[0];
+               this->value[1] = m.value[1];
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat2x4<T, P>::tmat2x4(ctor)
+       {}
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat2x4<T, P>::tmat2x4(T const & s)
+       {
+               value_type const Zero(0);
+               this->value[0] = col_type(s, Zero, Zero, Zero);
+               this->value[1] = col_type(Zero, s, Zero, Zero);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat2x4<T, P>::tmat2x4
+       (
+               T const & x0, T const & y0, T const & z0, T const & w0,
+               T const & x1, T const & y1, T const & z1, T const & w1
+       )
+       {
+               this->value[0] = col_type(x0, y0, z0, w0);
+               this->value[1] = col_type(x1, y1, z1, w1);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat2x4<T, P>::tmat2x4(col_type const & v0, col_type const & v1)
+       {
+               this->value[0] = v0;
+               this->value[1] = v1;
+       }
+
+       //////////////////////////////////////
+       // Conversion constructors
+       template <typename T, precision P>
+       template <
+               typename X1, typename Y1, typename Z1, typename W1,
+               typename X2, typename Y2, typename Z2, typename W2>
+       GLM_FUNC_QUALIFIER tmat2x4<T, P>::tmat2x4
+       (
+               X1 const & x1, Y1 const & y1, Z1 const & z1, W1 const & w1,
+               X2 const & x2, Y2 const & y2, Z2 const & z2, W2 const & w2
+       )
+       {
+               this->value[0] = col_type(static_cast<T>(x1), value_type(y1), value_type(z1), value_type(w1));
+               this->value[1] = col_type(static_cast<T>(x2), value_type(y2), value_type(z2), value_type(w2));
+       }
+       
+       template <typename T, precision P>
+       template <typename V1, typename V2>
+       GLM_FUNC_QUALIFIER tmat2x4<T, P>::tmat2x4(tvec4<V1, P> const & v1, tvec4<V2, P> const & v2)
+       {
+               this->value[0] = col_type(v1);
+               this->value[1] = col_type(v2);
+       }
+
+       //////////////////////////////////////
+       // Matrix conversions
+
+       template <typename T, precision P>
+       template <typename U, precision Q>
+       GLM_FUNC_QUALIFIER tmat2x4<T, P>::tmat2x4(tmat2x4<U, Q> const & m)
+       {
+               this->value[0] = col_type(m[0]);
+               this->value[1] = col_type(m[1]);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat2x4<T, P>::tmat2x4(tmat2x2<T, P> const & m)
+       {
+               this->value[0] = col_type(m[0], 0, 0);
+               this->value[1] = col_type(m[1], 0, 0);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat2x4<T, P>::tmat2x4(tmat3x3<T, P> const & m)
+       {
+               this->value[0] = col_type(m[0], 0);
+               this->value[1] = col_type(m[1], 0);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat2x4<T, P>::tmat2x4(tmat4x4<T, P> const & m)
+       {
+               this->value[0] = col_type(m[0]);
+               this->value[1] = col_type(m[1]);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat2x4<T, P>::tmat2x4(tmat2x3<T, P> const & m)
+       {
+               this->value[0] = col_type(m[0], 0);
+               this->value[1] = col_type(m[1], 0);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat2x4<T, P>::tmat2x4(tmat3x2<T, P> const & m)
+       {
+               this->value[0] = col_type(m[0], 0, 0);
+               this->value[1] = col_type(m[1], 0, 0);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat2x4<T, P>::tmat2x4(tmat3x4<T, P> const & m)
+       {
+               this->value[0] = m[0];
+               this->value[1] = m[1];
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat2x4<T, P>::tmat2x4(tmat4x2<T, P> const & m)
+       {
+               this->value[0] = col_type(m[0], 0, 0);
+               this->value[1] = col_type(m[1], 0, 0);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat2x4<T, P>::tmat2x4(tmat4x3<T, P> const & m)
+       {
+               this->value[0] = col_type(m[0], 0);
+               this->value[1] = col_type(m[1], 0);
+       }
+
+       //////////////////////////////////////
+       // Accesses
+
+#      ifdef GLM_FORCE_SIZE_FUNC
+               template <typename T, precision P>
+               GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tmat2x4<T, P>::size_type tmat2x4<T, P>::size() const
+               {
+                       return 2;
+               }
+
+               template <typename T, precision P>
+               GLM_FUNC_QUALIFIER typename tmat2x4<T, P>::col_type & tmat2x4<T, P>::operator[](typename tmat2x4<T, P>::size_type i)
+               {
+                       assert(i < this->size());
+                       return this->value[i];
+               }
+
+               template <typename T, precision P>
+               GLM_FUNC_QUALIFIER typename tmat2x4<T, P>::col_type const & tmat2x4<T, P>::operator[](typename tmat2x4<T, P>::size_type i) const
+               {
+                       assert(i < this->size());
+                       return this->value[i];
+               }
+#      else
+               template <typename T, precision P>
+               GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tmat2x4<T, P>::length_type tmat2x4<T, P>::length() const
+               {
+                       return 2;
+               }
+
+               template <typename T, precision P>
+               GLM_FUNC_QUALIFIER typename tmat2x4<T, P>::col_type & tmat2x4<T, P>::operator[](typename tmat2x4<T, P>::length_type i)
+               {
+                       assert(i < this->length());
+                       return this->value[i];
+               }
+
+               template <typename T, precision P>
+               GLM_FUNC_QUALIFIER typename tmat2x4<T, P>::col_type const & tmat2x4<T, P>::operator[](typename tmat2x4<T, P>::length_type i) const
+               {
+                       assert(i < this->length());
+                       return this->value[i];
+               }
+#      endif//GLM_FORCE_SIZE_FUNC
+
+       //////////////////////////////////////////////////////////////
+       // Unary updatable operators
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat2x4<T, P>& tmat2x4<T, P>::operator=(tmat2x4<T, P> const & m)
+       {
+               this->value[0] = m[0];
+               this->value[1] = m[1];
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U>
+       GLM_FUNC_QUALIFIER tmat2x4<T, P>& tmat2x4<T, P>::operator=(tmat2x4<U, P> const & m)
+       {
+               this->value[0] = m[0];
+               this->value[1] = m[1];
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U>
+       GLM_FUNC_QUALIFIER tmat2x4<T, P>& tmat2x4<T, P>::operator+=(U s)
+       {
+               this->value[0] += s;
+               this->value[1] += s;
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U>
+       GLM_FUNC_QUALIFIER tmat2x4<T, P>& tmat2x4<T, P>::operator+=(tmat2x4<U, P> const & m)
+       {
+               this->value[0] += m[0];
+               this->value[1] += m[1];
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U>
+       GLM_FUNC_QUALIFIER tmat2x4<T, P>& tmat2x4<T, P>::operator-=(U s)
+       {
+               this->value[0] -= s;
+               this->value[1] -= s;
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U>
+       GLM_FUNC_QUALIFIER tmat2x4<T, P>& tmat2x4<T, P>::operator-=(tmat2x4<U, P> const & m)
+       {
+               this->value[0] -= m[0];
+               this->value[1] -= m[1];
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U>
+       GLM_FUNC_QUALIFIER tmat2x4<T, P>& tmat2x4<T, P>::operator*=(U s)
+       {
+               this->value[0] *= s;
+               this->value[1] *= s;
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U>
+       GLM_FUNC_QUALIFIER tmat2x4<T, P> & tmat2x4<T, P>::operator/=(U s)
+       {
+               this->value[0] /= s;
+               this->value[1] /= s;
+               return *this;
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat2x4<T, P>& tmat2x4<T, P>::operator++()
+       {
+               ++this->value[0];
+               ++this->value[1];
+               return *this;
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat2x4<T, P>& tmat2x4<T, P>::operator--()
+       {
+               --this->value[0];
+               --this->value[1];
+               return *this;
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat2x4<T, P> tmat2x4<T, P>::operator++(int)
+       {
+               tmat2x4<T, P> Result(*this);
+               ++*this;
+               return Result;
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat2x4<T, P> tmat2x4<T, P>::operator--(int)
+       {
+               tmat2x4<T, P> Result(*this);
+               --*this;
+               return Result;
+       }
+
+       //////////////////////////////////////////////////////////////
+       // Binary operators
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat2x4<T, P> operator+(tmat2x4<T, P> const & m, T const & s)
+       {
+               return tmat2x4<T, P>(
+                       m[0] + s,
+                       m[1] + s);
+       }
+
+       template <typename T, precision P> 
+       GLM_FUNC_QUALIFIER tmat2x4<T, P> operator+(tmat2x4<T, P> const & m1, tmat2x4<T, P> const & m2)
+       {
+               return tmat2x4<T, P>(
+                       m1[0] + m2[0],
+                       m1[1] + m2[1]);
+       }
+
+       template <typename T, precision P> 
+       GLM_FUNC_QUALIFIER tmat2x4<T, P> operator-(tmat2x4<T, P> const & m, T const & s)
+       {
+               return tmat2x4<T, P>(
+                       m[0] - s,
+                       m[1] - s);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat2x4<T, P> operator-(tmat2x4<T, P> const & m1, tmat2x4<T, P> const & m2)
+       {
+               return tmat2x4<T, P>(
+                       m1[0] - m2[0],
+                       m1[1] - m2[1]);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat2x4<T, P> operator*(tmat2x4<T, P> const & m, T const & s)
+       {
+               return tmat2x4<T, P>(
+                       m[0] * s,
+                       m[1] * s);
+       }
+
+       template <typename T, precision P> 
+       GLM_FUNC_QUALIFIER tmat2x4<T, P> operator*(T const & s, tmat2x4<T, P> const & m)
+       {
+               return tmat2x4<T, P>(
+                       m[0] * s,
+                       m[1] * s);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER typename tmat2x4<T, P>::col_type operator*(tmat2x4<T, P> const & m, typename tmat2x4<T, P>::row_type const & v)
+       {
+               return typename tmat2x4<T, P>::col_type(
+                       m[0][0] * v.x + m[1][0] * v.y,
+                       m[0][1] * v.x + m[1][1] * v.y,
+                       m[0][2] * v.x + m[1][2] * v.y,
+                       m[0][3] * v.x + m[1][3] * v.y);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER typename tmat2x4<T, P>::row_type operator*(typename tmat2x4<T, P>::col_type const & v, tmat2x4<T, P> const & m)
+       {
+               return typename tmat2x4<T, P>::row_type(
+                       v.x * m[0][0] + v.y * m[0][1] + v.z * m[0][2] + v.w * m[0][3],
+                       v.x * m[1][0] + v.y * m[1][1] + v.z * m[1][2] + v.w * m[1][3]);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat4x4<T, P> operator*(tmat2x4<T, P> const & m1, tmat4x2<T, P> const & m2)
+       {
+               T SrcA00 = m1[0][0];
+               T SrcA01 = m1[0][1];
+               T SrcA02 = m1[0][2];
+               T SrcA03 = m1[0][3];
+               T SrcA10 = m1[1][0];
+               T SrcA11 = m1[1][1];
+               T SrcA12 = m1[1][2];
+               T SrcA13 = m1[1][3];
+
+               T SrcB00 = m2[0][0];
+               T SrcB01 = m2[0][1];
+               T SrcB10 = m2[1][0];
+               T SrcB11 = m2[1][1];
+               T SrcB20 = m2[2][0];
+               T SrcB21 = m2[2][1];
+               T SrcB30 = m2[3][0];
+               T SrcB31 = m2[3][1];
+
+               tmat4x4<T, P> Result(uninitialize);
+               Result[0][0] = SrcA00 * SrcB00 + SrcA10 * SrcB01;
+               Result[0][1] = SrcA01 * SrcB00 + SrcA11 * SrcB01;
+               Result[0][2] = SrcA02 * SrcB00 + SrcA12 * SrcB01;
+               Result[0][3] = SrcA03 * SrcB00 + SrcA13 * SrcB01;
+               Result[1][0] = SrcA00 * SrcB10 + SrcA10 * SrcB11;
+               Result[1][1] = SrcA01 * SrcB10 + SrcA11 * SrcB11;
+               Result[1][2] = SrcA02 * SrcB10 + SrcA12 * SrcB11;
+               Result[1][3] = SrcA03 * SrcB10 + SrcA13 * SrcB11;
+               Result[2][0] = SrcA00 * SrcB20 + SrcA10 * SrcB21;
+               Result[2][1] = SrcA01 * SrcB20 + SrcA11 * SrcB21;
+               Result[2][2] = SrcA02 * SrcB20 + SrcA12 * SrcB21;
+               Result[2][3] = SrcA03 * SrcB20 + SrcA13 * SrcB21;
+               Result[3][0] = SrcA00 * SrcB30 + SrcA10 * SrcB31;
+               Result[3][1] = SrcA01 * SrcB30 + SrcA11 * SrcB31;
+               Result[3][2] = SrcA02 * SrcB30 + SrcA12 * SrcB31;
+               Result[3][3] = SrcA03 * SrcB30 + SrcA13 * SrcB31;
+               return Result;
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat2x4<T, P> operator*(tmat2x4<T, P> const & m1, tmat2x2<T, P> const & m2)
+       {
+               return tmat2x4<T, P>(
+                       m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1],
+                       m1[0][1] * m2[0][0] + m1[1][1] * m2[0][1],
+                       m1[0][2] * m2[0][0] + m1[1][2] * m2[0][1],
+                       m1[0][3] * m2[0][0] + m1[1][3] * m2[0][1],
+                       m1[0][0] * m2[1][0] + m1[1][0] * m2[1][1],
+                       m1[0][1] * m2[1][0] + m1[1][1] * m2[1][1],
+                       m1[0][2] * m2[1][0] + m1[1][2] * m2[1][1],
+                       m1[0][3] * m2[1][0] + m1[1][3] * m2[1][1]);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat3x4<T, P> operator*(tmat2x4<T, P> const & m1, tmat3x2<T, P> const & m2)
+       {
+               return tmat3x4<T, P>(
+                       m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1],
+                       m1[0][1] * m2[0][0] + m1[1][1] * m2[0][1],
+                       m1[0][2] * m2[0][0] + m1[1][2] * m2[0][1],
+                       m1[0][3] * m2[0][0] + m1[1][3] * m2[0][1],
+                       m1[0][0] * m2[1][0] + m1[1][0] * m2[1][1],
+                       m1[0][1] * m2[1][0] + m1[1][1] * m2[1][1],
+                       m1[0][2] * m2[1][0] + m1[1][2] * m2[1][1],
+                       m1[0][3] * m2[1][0] + m1[1][3] * m2[1][1],
+                       m1[0][0] * m2[2][0] + m1[1][0] * m2[2][1],
+                       m1[0][1] * m2[2][0] + m1[1][1] * m2[2][1],
+                       m1[0][2] * m2[2][0] + m1[1][2] * m2[2][1],
+                       m1[0][3] * m2[2][0] + m1[1][3] * m2[2][1]);
+       }
+
+       template <typename T, precision P> 
+       GLM_FUNC_QUALIFIER tmat2x4<T, P> operator/(tmat2x4<T, P> const & m, T s)
+       {
+               return tmat2x4<T, P>(
+                       m[0] / s,
+                       m[1] / s);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat2x4<T, P> operator/(T s, tmat2x4<T, P> const & m)
+       {
+               return tmat2x4<T, P>(
+                       s / m[0],
+                       s / m[1]);
+       }
+
+       // Unary constant operators
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat2x4<T, P> const operator-(tmat2x4<T, P> const & m)
+       {
+               return tmat2x4<T, P>(
+                       -m[0], 
+                       -m[1]);
+       }
+
+       //////////////////////////////////////
+       // Boolean operators
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER bool operator==(tmat2x4<T, P> const & m1, tmat2x4<T, P> const & m2)
+       {
+               return (m1[0] == m2[0]) && (m1[1] == m2[1]);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER bool operator!=(tmat2x4<T, P> const & m1, tmat2x4<T, P> const & m2)
+       {
+               return (m1[0] != m2[0]) || (m1[1] != m2[1]);
+       }
+} //namespace glm
diff --git a/include/glm/detail/type_mat3x2.hpp b/include/glm/detail/type_mat3x2.hpp
new file mode 100644 (file)
index 0000000..9fd573f
--- /dev/null
@@ -0,0 +1,207 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref core
+/// @file glm/detail/type_mat3x2.hpp
+/// @date 2006-08-05 / 2011-06-15
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////
+
+#pragma once
+
+#include "../fwd.hpp"
+#include "type_vec2.hpp"
+#include "type_vec3.hpp"
+#include "type_mat.hpp"
+#include <limits>
+#include <cstddef>
+
+namespace glm
+{
+       template <typename T, precision P = defaultp>
+       struct tmat3x2
+       {
+               typedef tvec2<T, P> col_type;
+               typedef tvec3<T, P> row_type;
+               typedef tmat3x2<T, P> type;
+               typedef tmat2x3<T, P> transpose_type;
+               typedef T value_type;
+
+       private:
+               /// @cond DETAIL
+               col_type value[3];
+               /// @endcond
+               
+       public:
+               // Constructors
+               GLM_FUNC_DECL tmat3x2();
+               GLM_FUNC_DECL tmat3x2(tmat3x2<T, P> const & m);
+               template <precision Q>
+               GLM_FUNC_DECL tmat3x2(tmat3x2<T, Q> const & m);
+
+               GLM_FUNC_DECL explicit tmat3x2(ctor);
+               GLM_FUNC_DECL explicit tmat3x2(T const & s);
+               GLM_FUNC_DECL tmat3x2(
+                       T const & x0, T const & y0,
+                       T const & x1, T const & y1,
+                       T const & x2, T const & y2);
+               GLM_FUNC_DECL tmat3x2(
+                       col_type const & v0,
+                       col_type const & v1,
+                       col_type const & v2);
+
+               //////////////////////////////////////
+               // Conversions
+
+               template<
+                       typename X1, typename Y1,
+                       typename X2, typename Y2,
+                       typename X3, typename Y3>
+               GLM_FUNC_DECL tmat3x2(
+                       X1 const & x1, Y1 const & y1,
+                       X2 const & x2, Y2 const & y2,
+                       X3 const & x3, Y3 const & y3);
+                       
+               template <typename V1, typename V2, typename V3>
+               GLM_FUNC_DECL tmat3x2(
+                       tvec2<V1, P> const & v1,
+                       tvec2<V2, P> const & v2,
+                       tvec2<V3, P> const & v3);
+
+               //////////////////////////////////////
+               // Matrix conversions
+
+#              ifdef GLM_FORCE_EXPLICIT_CTOR
+                       template <typename U, precision Q>
+                       GLM_FUNC_DECL explicit tmat3x2(tmat3x2<U, Q> const & m);
+#              else
+                       template <typename U, precision Q>
+                       GLM_FUNC_DECL tmat3x2(tmat3x2<U, Q> const & m);
+#              endif
+
+               GLM_FUNC_DECL explicit tmat3x2(tmat2x2<T, P> const & x);
+               GLM_FUNC_DECL explicit tmat3x2(tmat3x3<T, P> const & x);
+               GLM_FUNC_DECL explicit tmat3x2(tmat4x4<T, P> const & x);
+               GLM_FUNC_DECL explicit tmat3x2(tmat2x3<T, P> const & x);
+               GLM_FUNC_DECL explicit tmat3x2(tmat2x4<T, P> const & x);
+               GLM_FUNC_DECL explicit tmat3x2(tmat3x4<T, P> const & x);
+               GLM_FUNC_DECL explicit tmat3x2(tmat4x2<T, P> const & x);
+               GLM_FUNC_DECL explicit tmat3x2(tmat4x3<T, P> const & x);
+
+               //////////////////////////////////////
+               // Accesses
+
+#              ifdef GLM_FORCE_SIZE_FUNC
+                       typedef size_t size_type;
+                       GLM_FUNC_DECL GLM_CONSTEXPR size_t size() const;
+
+                       GLM_FUNC_DECL col_type & operator[](size_type i);
+                       GLM_FUNC_DECL col_type const & operator[](size_type i) const;
+#              else
+                       typedef length_t length_type;
+                       GLM_FUNC_DECL GLM_CONSTEXPR length_type length() const;
+
+                       GLM_FUNC_DECL col_type & operator[](length_type i);
+                       GLM_FUNC_DECL col_type const & operator[](length_type i) const;
+#              endif//GLM_FORCE_SIZE_FUNC
+
+               //////////////////////////////////////
+               // Unary arithmetic operators
+
+               GLM_FUNC_DECL tmat3x2<T, P> & operator=(tmat3x2<T, P> const & m);
+
+               template <typename U> 
+               GLM_FUNC_DECL tmat3x2<T, P> & operator=(tmat3x2<U, P> const & m);
+               template <typename U> 
+               GLM_FUNC_DECL tmat3x2<T, P> & operator+=(U s);
+               template <typename U> 
+               GLM_FUNC_DECL tmat3x2<T, P> & operator+=(tmat3x2<U, P> const & m);
+               template <typename U> 
+               GLM_FUNC_DECL tmat3x2<T, P> & operator-=(U s);
+               template <typename U> 
+               GLM_FUNC_DECL tmat3x2<T, P> & operator-=(tmat3x2<U, P> const & m);
+               template <typename U> 
+               GLM_FUNC_DECL tmat3x2<T, P> & operator*=(U s);
+               template <typename U> 
+               GLM_FUNC_DECL tmat3x2<T, P> & operator/=(U s);
+
+               //////////////////////////////////////
+               // Increment and decrement operators
+
+               GLM_FUNC_DECL tmat3x2<T, P> & operator++ ();
+               GLM_FUNC_DECL tmat3x2<T, P> & operator-- ();
+               GLM_FUNC_DECL tmat3x2<T, P> operator++(int);
+               GLM_FUNC_DECL tmat3x2<T, P> operator--(int);
+       };
+
+       // Binary operators
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat3x2<T, P> operator+(tmat3x2<T, P> const & m, T const & s);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat3x2<T, P> operator+(tmat3x2<T, P> const & m1, tmat3x2<T, P> const & m2);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat3x2<T, P> operator-(tmat3x2<T, P> const & m, T const & s);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat3x2<T, P> operator-(tmat3x2<T, P> const & m1, tmat3x2<T, P> const & m2);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat3x2<T, P> operator*(tmat3x2<T, P> const & m, T const & s);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat3x2<T, P> operator*(T const & s, tmat3x2<T, P> const & m);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL typename tmat3x2<T, P>::col_type operator*(tmat3x2<T, P> const & m, typename tmat3x2<T, P>::row_type const & v);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL typename tmat3x2<T, P>::row_type operator*(typename tmat3x2<T, P>::col_type const & v, tmat3x2<T, P> const & m);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat2x2<T, P> operator*(tmat3x2<T, P> const & m1, tmat2x3<T, P> const & m2);
+               
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat3x2<T, P> operator*(tmat3x2<T, P> const & m1, tmat3x3<T, P> const & m2);
+               
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat4x2<T, P> operator*(tmat3x2<T, P> const & m1, tmat4x3<T, P> const & m2);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat3x2<T, P> operator/(tmat3x2<T, P> const & m, T const & s);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat3x2<T, P> operator/(T const & s, tmat3x2<T, P> const & m);
+
+       // Unary constant operators
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat3x2<T, P> const operator-(tmat3x2<T, P> const & m);
+}//namespace glm
+
+#ifndef GLM_EXTERNAL_TEMPLATE
+#include "type_mat3x2.inl"
+#endif
diff --git a/include/glm/detail/type_mat3x2.inl b/include/glm/detail/type_mat3x2.inl
new file mode 100644 (file)
index 0000000..d42a9ae
--- /dev/null
@@ -0,0 +1,540 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref core
+/// @file glm/detail/type_mat3x2.inl
+/// @date 2006-08-05 / 2011-06-15
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////
+
+namespace glm
+{
+       //////////////////////////////////////////////////////////////
+       // Constructors
+
+       template <typename T, precision P> 
+       GLM_FUNC_QUALIFIER tmat3x2<T, P>::tmat3x2()
+       {
+#              ifndef GLM_FORCE_NO_CTOR_INIT 
+                       this->value[0] = col_type(1, 0);
+                       this->value[1] = col_type(0, 1);
+                       this->value[2] = col_type(0, 0);
+#              endif
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat3x2<T, P>::tmat3x2(tmat3x2<T, P> const & m)
+       {
+               this->value[0] = m.value[0];
+               this->value[1] = m.value[1];
+               this->value[2] = m.value[2];
+       }
+
+       template <typename T, precision P>
+       template <precision Q>
+       GLM_FUNC_QUALIFIER tmat3x2<T, P>::tmat3x2(tmat3x2<T, Q> const & m)
+       {
+               this->value[0] = m.value[0];
+               this->value[1] = m.value[1];
+               this->value[2] = m.value[2];
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat3x2<T, P>::tmat3x2(ctor)
+       {}
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat3x2<T, P>::tmat3x2(T const & s)
+       {
+               this->value[0] = col_type(s, 0);
+               this->value[1] = col_type(0, s);
+               this->value[2] = col_type(0, 0);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat3x2<T, P>::tmat3x2
+       (
+               T const & x0, T const & y0,
+               T const & x1, T const & y1,
+               T const & x2, T const & y2
+       )
+       {
+               this->value[0] = col_type(x0, y0);
+               this->value[1] = col_type(x1, y1);
+               this->value[2] = col_type(x2, y2);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat3x2<T, P>::tmat3x2
+       (
+               col_type const & v0,
+               col_type const & v1,
+               col_type const & v2
+       )
+       {
+               this->value[0] = v0;
+               this->value[1] = v1;
+               this->value[2] = v2;
+       }
+
+       //////////////////////////////////////
+       // Conversion constructors
+       template <typename T, precision P>
+       template <
+               typename X1, typename Y1,
+               typename X2, typename Y2,
+               typename X3, typename Y3>
+       GLM_FUNC_QUALIFIER tmat3x2<T, P>::tmat3x2
+       (
+               X1 const & x1, Y1 const & y1,
+               X2 const & x2, Y2 const & y2,
+               X3 const & x3, Y3 const & y3
+       )
+       {
+               this->value[0] = col_type(static_cast<T>(x1), value_type(y1));
+               this->value[1] = col_type(static_cast<T>(x2), value_type(y2));
+               this->value[2] = col_type(static_cast<T>(x3), value_type(y3));
+       }
+
+       template <typename T, precision P>
+       template <typename V1, typename V2, typename V3>
+       GLM_FUNC_QUALIFIER tmat3x2<T, P>::tmat3x2
+       (
+               tvec2<V1, P> const & v1,
+               tvec2<V2, P> const & v2,
+               tvec2<V3, P> const & v3
+       )
+       {
+               this->value[0] = col_type(v1);
+               this->value[1] = col_type(v2);
+               this->value[2] = col_type(v3);
+       }
+
+       //////////////////////////////////////////////////////////////
+       // mat3x2 matrix conversions
+
+       template <typename T, precision P>
+       template <typename U, precision Q>
+       GLM_FUNC_QUALIFIER tmat3x2<T, P>::tmat3x2(tmat3x2<U, Q> const & m)
+       {
+               this->value[0] = col_type(m[0]);
+               this->value[1] = col_type(m[1]);
+               this->value[2] = col_type(m[2]);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat3x2<T, P>::tmat3x2(tmat2x2<T, P> const & m)
+       {
+               this->value[0] = m[0];
+               this->value[1] = m[1];
+               this->value[2] = col_type(0);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat3x2<T, P>::tmat3x2(tmat3x3<T, P> const & m)
+       {
+               this->value[0] = col_type(m[0]);
+               this->value[1] = col_type(m[1]);
+               this->value[2] = col_type(m[2]);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat3x2<T, P>::tmat3x2(tmat4x4<T, P> const & m)
+       {
+               this->value[0] = col_type(m[0]);
+               this->value[1] = col_type(m[1]);
+               this->value[2] = col_type(m[2]);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat3x2<T, P>::tmat3x2(tmat2x3<T, P> const & m)
+       {
+               this->value[0] = col_type(m[0]);
+               this->value[1] = col_type(m[1]);
+               this->value[2] = col_type(T(0));
+       }
+
+       template <typename T, precision P> 
+       GLM_FUNC_QUALIFIER tmat3x2<T, P>::tmat3x2(tmat2x4<T, P> const & m)
+       {
+               this->value[0] = col_type(m[0]);
+               this->value[1] = col_type(m[1]);
+               this->value[2] = col_type(T(0));
+       }
+
+       template <typename T, precision P> 
+       GLM_FUNC_QUALIFIER tmat3x2<T, P>::tmat3x2(tmat3x4<T, P> const & m)
+       {
+               this->value[0] = col_type(m[0]);
+               this->value[1] = col_type(m[1]);
+               this->value[2] = col_type(m[2]);
+       }
+
+       template <typename T, precision P> 
+       GLM_FUNC_QUALIFIER tmat3x2<T, P>::tmat3x2(tmat4x2<T, P> const & m)
+       {
+               this->value[0] = m[0];
+               this->value[1] = m[1];
+               this->value[2] = m[2];
+       }
+
+       template <typename T, precision P> 
+       GLM_FUNC_QUALIFIER tmat3x2<T, P>::tmat3x2(tmat4x3<T, P> const & m)
+       {
+               this->value[0] = col_type(m[0]);
+               this->value[1] = col_type(m[1]);
+               this->value[2] = col_type(m[2]);
+       }
+
+       //////////////////////////////////////
+       // Accesses
+
+#      ifdef GLM_FORCE_SIZE_FUNC
+               template <typename T, precision P>
+               GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tmat3x2<T, P>::size_type tmat3x2<T, P>::size() const
+               {
+                       return 3;
+               }
+
+               template <typename T, precision P>
+               GLM_FUNC_QUALIFIER typename tmat3x2<T, P>::col_type & tmat3x2<T, P>::operator[](typename tmat3x2<T, P>::size_type i)
+               {
+                       assert(i < this->size());
+                       return this->value[i];
+               }
+
+               template <typename T, precision P>
+               GLM_FUNC_QUALIFIER typename tmat3x2<T, P>::col_type const & tmat3x2<T, P>::operator[](typename tmat3x2<T, P>::size_type i) const
+               {
+                       assert(i < this->size());
+                       return this->value[i];
+               }
+#      else
+               template <typename T, precision P>
+               GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tmat3x2<T, P>::length_type tmat3x2<T, P>::length() const
+               {
+                       return 3;
+               }
+
+               template <typename T, precision P>
+               GLM_FUNC_QUALIFIER typename tmat3x2<T, P>::col_type & tmat3x2<T, P>::operator[](typename tmat3x2<T, P>::length_type i)
+               {
+                       assert(i < this->length());
+                       return this->value[i];
+               }
+
+               template <typename T, precision P>
+               GLM_FUNC_QUALIFIER typename tmat3x2<T, P>::col_type const & tmat3x2<T, P>::operator[](typename tmat3x2<T, P>::length_type i) const
+               {
+                       assert(i < this->length());
+                       return this->value[i];
+               }
+#      endif//GLM_FORCE_SIZE_FUNC
+
+       //////////////////////////////////////////////////////////////
+       // Unary updatable operators
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat3x2<T, P>& tmat3x2<T, P>::operator=(tmat3x2<T, P> const & m)
+       {
+               this->value[0] = m[0];
+               this->value[1] = m[1];
+               this->value[2] = m[2];
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U>
+       GLM_FUNC_QUALIFIER tmat3x2<T, P>& tmat3x2<T, P>::operator=(tmat3x2<U, P> const & m)
+       {
+               this->value[0] = m[0];
+               this->value[1] = m[1];
+               this->value[2] = m[2];
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U>
+       GLM_FUNC_QUALIFIER tmat3x2<T, P>& tmat3x2<T, P>::operator+=(U s)
+       {
+               this->value[0] += s;
+               this->value[1] += s;
+               this->value[2] += s;
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U>
+       GLM_FUNC_QUALIFIER tmat3x2<T, P>& tmat3x2<T, P>::operator+=(tmat3x2<U, P> const & m)
+       {
+               this->value[0] += m[0];
+               this->value[1] += m[1];
+               this->value[2] += m[2];
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U>
+       GLM_FUNC_QUALIFIER tmat3x2<T, P>& tmat3x2<T, P>::operator-=(U s)
+       {
+               this->value[0] -= s;
+               this->value[1] -= s;
+               this->value[2] -= s;
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U>
+       GLM_FUNC_QUALIFIER tmat3x2<T, P>& tmat3x2<T, P>::operator-=(tmat3x2<U, P> const & m)
+       {
+               this->value[0] -= m[0];
+               this->value[1] -= m[1];
+               this->value[2] -= m[2];
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U>
+       GLM_FUNC_QUALIFIER tmat3x2<T, P>& tmat3x2<T, P>::operator*=(U s)
+       {
+               this->value[0] *= s;
+               this->value[1] *= s;
+               this->value[2] *= s;
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U>
+       GLM_FUNC_QUALIFIER tmat3x2<T, P> & tmat3x2<T, P>::operator/=(U s)
+       {
+               this->value[0] /= s;
+               this->value[1] /= s;
+               this->value[2] /= s;
+               return *this;
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat3x2<T, P>& tmat3x2<T, P>::operator++()
+       {
+               ++this->value[0];
+               ++this->value[1];
+               ++this->value[2];
+               return *this;
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat3x2<T, P>& tmat3x2<T, P>::operator--()
+       {
+               --this->value[0];
+               --this->value[1];
+               --this->value[2];
+               return *this;
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat3x2<T, P> tmat3x2<T, P>::operator++(int)
+       {
+               tmat3x2<T, P> Result(*this);
+               ++*this;
+               return Result;
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat3x2<T, P> tmat3x2<T, P>::operator--(int)
+       {
+               tmat3x2<T, P> Result(*this);
+               --*this;
+               return Result;
+       }
+
+       //////////////////////////////////////////////////////////////
+       // Binary operators
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat3x2<T, P> operator+(tmat3x2<T, P> const & m, T const & s)
+       {
+               return tmat3x2<T, P>(
+                       m[0] + s,
+                       m[1] + s,
+                       m[2] + s);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat3x2<T, P> operator+(tmat3x2<T, P> const & m1, tmat3x2<T, P> const & m2)
+       {
+               return tmat3x2<T, P>(
+                       m1[0] + m2[0],
+                       m1[1] + m2[1],
+                       m1[2] + m2[2]);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat3x2<T, P> operator-(tmat3x2<T, P> const & m, T const & s)
+       {
+               return tmat3x2<T, P>(
+                       m[0] - s,
+                       m[1] - s,
+                       m[2] - s);
+       }
+
+       template <typename T, precision P> 
+       GLM_FUNC_QUALIFIER tmat3x2<T, P> operator-(tmat3x2<T, P> const & m1, tmat3x2<T, P> const & m2)
+       {
+               return tmat3x2<T, P>(
+                       m1[0] - m2[0],
+                       m1[1] - m2[1],
+                       m1[2] - m2[2]);
+       }
+
+       template <typename T, precision P> 
+       GLM_FUNC_QUALIFIER tmat3x2<T, P> operator*(tmat3x2<T, P> const & m, T const & s)
+       {
+               return tmat3x2<T, P>(
+                       m[0] * s,
+                       m[1] * s,
+                       m[2] * s);
+       }
+
+       template <typename T, precision P> 
+       GLM_FUNC_QUALIFIER tmat3x2<T, P> operator*(T const & s, tmat3x2<T, P> const & m)
+       {
+               return tmat3x2<T, P>(
+                       m[0] * s,
+                       m[1] * s,
+                       m[2] * s);
+       }
+   
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER typename tmat3x2<T, P>::col_type operator*(tmat3x2<T, P> const & m, typename tmat3x2<T, P>::row_type const & v)
+       {
+               return typename tmat3x2<T, P>::col_type(
+                       m[0][0] * v.x + m[1][0] * v.y + m[2][0] * v.z,
+                       m[0][1] * v.x + m[1][1] * v.y + m[2][1] * v.z);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER typename tmat3x2<T, P>::row_type operator*(typename tmat3x2<T, P>::col_type const & v, tmat3x2<T, P> const & m)
+       {
+               return typename tmat3x2<T, P>::row_type(
+                       v.x * m[0][0] + v.y * m[0][1],
+                       v.x * m[1][0] + v.y * m[1][1],
+                       v.x * m[2][0] + v.y * m[2][1]);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat2x2<T, P> operator*(tmat3x2<T, P> const & m1, tmat2x3<T, P> const & m2)
+       {
+               const T SrcA00 = m1[0][0];
+               const T SrcA01 = m1[0][1];
+               const T SrcA10 = m1[1][0];
+               const T SrcA11 = m1[1][1];
+               const T SrcA20 = m1[2][0];
+               const T SrcA21 = m1[2][1];
+
+               const T SrcB00 = m2[0][0];
+               const T SrcB01 = m2[0][1];
+               const T SrcB02 = m2[0][2];
+               const T SrcB10 = m2[1][0];
+               const T SrcB11 = m2[1][1];
+               const T SrcB12 = m2[1][2];
+
+               tmat2x2<T, P> Result(uninitialize);
+               Result[0][0] = SrcA00 * SrcB00 + SrcA10 * SrcB01 + SrcA20 * SrcB02;
+               Result[0][1] = SrcA01 * SrcB00 + SrcA11 * SrcB01 + SrcA21 * SrcB02;
+               Result[1][0] = SrcA00 * SrcB10 + SrcA10 * SrcB11 + SrcA20 * SrcB12;
+               Result[1][1] = SrcA01 * SrcB10 + SrcA11 * SrcB11 + SrcA21 * SrcB12;
+               return Result;
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat3x2<T, P> operator*(tmat3x2<T, P> const & m1, tmat3x3<T, P> const & m2)
+       {
+               return tmat3x2<T, P>(
+                       m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2],
+                       m1[0][1] * m2[0][0] + m1[1][1] * m2[0][1] + m1[2][1] * m2[0][2],
+                       m1[0][0] * m2[1][0] + m1[1][0] * m2[1][1] + m1[2][0] * m2[1][2],
+                       m1[0][1] * m2[1][0] + m1[1][1] * m2[1][1] + m1[2][1] * m2[1][2],
+                       m1[0][0] * m2[2][0] + m1[1][0] * m2[2][1] + m1[2][0] * m2[2][2],
+                       m1[0][1] * m2[2][0] + m1[1][1] * m2[2][1] + m1[2][1] * m2[2][2]);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat4x2<T, P> operator*(tmat3x2<T, P> const & m1, tmat4x3<T, P> const & m2)
+       {
+               return tmat4x2<T, P>(
+                       m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2],
+                       m1[0][1] * m2[0][0] + m1[1][1] * m2[0][1] + m1[2][1] * m2[0][2],
+                       m1[0][0] * m2[1][0] + m1[1][0] * m2[1][1] + m1[2][0] * m2[1][2],
+                       m1[0][1] * m2[1][0] + m1[1][1] * m2[1][1] + m1[2][1] * m2[1][2],
+                       m1[0][0] * m2[2][0] + m1[1][0] * m2[2][1] + m1[2][0] * m2[2][2],
+                       m1[0][1] * m2[2][0] + m1[1][1] * m2[2][1] + m1[2][1] * m2[2][2],
+                       m1[0][0] * m2[3][0] + m1[1][0] * m2[3][1] + m1[2][0] * m2[3][2],
+                       m1[0][1] * m2[3][0] + m1[1][1] * m2[3][1] + m1[2][1] * m2[3][2]);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat3x2<T, P> operator/(tmat3x2<T, P> const & m, T const & s)
+       {
+               return tmat3x2<T, P>(
+                       m[0] / s,
+                       m[1] / s,
+                       m[2] / s);
+       }
+
+       template <typename T, precision P> 
+       GLM_FUNC_QUALIFIER tmat3x2<T, P> operator/(T const & s, tmat3x2<T, P> const & m)
+       {
+               return tmat3x2<T, P>(
+                       s / m[0],
+                       s / m[1],
+                       s / m[2]);
+       }
+
+       // Unary constant operators
+       template <typename T, precision P> 
+       GLM_FUNC_QUALIFIER tmat3x2<T, P> const operator-(tmat3x2<T, P> const & m)
+       {
+               return tmat3x2<T, P>(
+                       -m[0],
+                       -m[1],
+                       -m[2]);
+       }
+
+       //////////////////////////////////////
+       // Boolean operators
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER bool operator==(tmat3x2<T, P> const & m1, tmat3x2<T, P> const & m2)
+       {
+               return (m1[0] == m2[0]) && (m1[1] == m2[1]) && (m1[2] == m2[2]);
+       }
+
+       template <typename T, precision P> 
+       GLM_FUNC_QUALIFIER bool operator!=(tmat3x2<T, P> const & m1, tmat3x2<T, P> const & m2)
+       {
+               return (m1[0] != m2[0]) || (m1[1] != m2[1]) || (m1[2] != m2[2]);
+       }
+} //namespace glm
diff --git a/include/glm/detail/type_mat3x3.hpp b/include/glm/detail/type_mat3x3.hpp
new file mode 100644 (file)
index 0000000..dddfc53
--- /dev/null
@@ -0,0 +1,230 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref core
+/// @file glm/detail/type_mat3x3.hpp
+/// @date 2005-01-27 / 2011-06-15
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////
+
+#pragma once
+
+#include "../fwd.hpp"
+#include "type_vec3.hpp"
+#include "type_mat.hpp"
+#include <limits>
+#include <cstddef>
+
+namespace glm
+{
+       template <typename T, precision P = defaultp>
+       struct tmat3x3
+       {
+               typedef tvec3<T, P> col_type;
+               typedef tvec3<T, P> row_type;
+               typedef tmat3x3<T, P> type;
+               typedef tmat3x3<T, P> transpose_type;
+               typedef T value_type;
+
+               template <typename U, precision Q>
+               friend tvec3<U, Q> operator/(tmat3x3<U, Q> const & m, tvec3<U, Q> const & v);
+               template <typename U, precision Q>
+               friend tvec3<U, Q> operator/(tvec3<U, Q> const & v, tmat3x3<U, Q> const & m);
+
+       private:
+               /// @cond DETAIL
+               col_type value[3];
+               /// @endcond
+
+       public:
+               // Constructors
+               GLM_FUNC_DECL tmat3x3();
+               GLM_FUNC_DECL tmat3x3(tmat3x3<T, P> const & m);
+               template <precision Q>
+               GLM_FUNC_DECL tmat3x3(tmat3x3<T, Q> const & m);
+
+               GLM_FUNC_DECL explicit tmat3x3(ctor);
+               GLM_FUNC_DECL explicit tmat3x3(T const & s);
+               GLM_FUNC_DECL tmat3x3(
+                       T const & x0, T const & y0, T const & z0,
+                       T const & x1, T const & y1, T const & z1,
+                       T const & x2, T const & y2, T const & z2);
+               GLM_FUNC_DECL tmat3x3(
+                       col_type const & v0,
+                       col_type const & v1,
+                       col_type const & v2);
+
+               //////////////////////////////////////
+               // Conversions
+
+               template<
+                       typename X1, typename Y1, typename Z1,
+                       typename X2, typename Y2, typename Z2,
+                       typename X3, typename Y3, typename Z3>
+               GLM_FUNC_DECL tmat3x3(
+                       X1 const & x1, Y1 const & y1, Z1 const & z1,
+                       X2 const & x2, Y2 const & y2, Z2 const & z2,
+                       X3 const & x3, Y3 const & y3, Z3 const & z3);
+                       
+               template <typename V1, typename V2, typename V3>
+               GLM_FUNC_DECL tmat3x3(
+                       tvec3<V1, P> const & v1,
+                       tvec3<V2, P> const & v2,
+                       tvec3<V3, P> const & v3);
+
+               //////////////////////////////////////
+               // Matrix conversions
+
+#              ifdef GLM_FORCE_EXPLICIT_CTOR
+                       template <typename U, precision Q>
+                       GLM_FUNC_DECL explicit tmat3x3(tmat3x3<U, Q> const & m);
+#              else
+                       template <typename U, precision Q>
+                       GLM_FUNC_DECL tmat3x3(tmat3x3<U, Q> const & m);
+#              endif
+
+               GLM_FUNC_DECL explicit tmat3x3(tmat2x2<T, P> const & x);
+               GLM_FUNC_DECL explicit tmat3x3(tmat4x4<T, P> const & x);
+               GLM_FUNC_DECL explicit tmat3x3(tmat2x3<T, P> const & x);
+               GLM_FUNC_DECL explicit tmat3x3(tmat3x2<T, P> const & x);
+               GLM_FUNC_DECL explicit tmat3x3(tmat2x4<T, P> const & x);
+               GLM_FUNC_DECL explicit tmat3x3(tmat4x2<T, P> const & x);
+               GLM_FUNC_DECL explicit tmat3x3(tmat3x4<T, P> const & x);
+               GLM_FUNC_DECL explicit tmat3x3(tmat4x3<T, P> const & x);
+
+               //////////////////////////////////////
+               // Accesses
+
+#              ifdef GLM_FORCE_SIZE_FUNC
+                       typedef size_t size_type;
+                       GLM_FUNC_DECL GLM_CONSTEXPR size_t size() const;
+
+                       GLM_FUNC_DECL col_type & operator[](size_type i);
+                       GLM_FUNC_DECL col_type const & operator[](size_type i) const;
+#              else
+                       typedef length_t length_type;
+                       GLM_FUNC_DECL GLM_CONSTEXPR length_type length() const;
+
+                       GLM_FUNC_DECL col_type & operator[](length_type i);
+                       GLM_FUNC_DECL col_type const & operator[](length_type i) const;
+#              endif//GLM_FORCE_SIZE_FUNC
+
+               //////////////////////////////////////
+               // Unary arithmetic operators
+
+               GLM_FUNC_DECL tmat3x3<T, P> & operator=(tmat3x3<T, P> const & m);
+
+               template <typename U>
+               GLM_FUNC_DECL tmat3x3<T, P> & operator=(tmat3x3<U, P> const & m);
+               template <typename U>
+               GLM_FUNC_DECL tmat3x3<T, P> & operator+=(U s);
+               template <typename U>
+               GLM_FUNC_DECL tmat3x3<T, P> & operator+=(tmat3x3<U, P> const & m);
+               template <typename U>
+               GLM_FUNC_DECL tmat3x3<T, P> & operator-=(U s);
+               template <typename U>
+               GLM_FUNC_DECL tmat3x3<T, P> & operator-=(tmat3x3<U, P> const & m);
+               template <typename U>
+               GLM_FUNC_DECL tmat3x3<T, P> & operator*=(U s);
+               template <typename U>
+               GLM_FUNC_DECL tmat3x3<T, P> & operator*=(tmat3x3<U, P> const & m);
+               template <typename U>
+               GLM_FUNC_DECL tmat3x3<T, P> & operator/=(U s);
+               template <typename U>
+               GLM_FUNC_DECL tmat3x3<T, P> & operator/=(tmat3x3<U, P> const & m);
+
+               //////////////////////////////////////
+               // Increment and decrement operators
+
+               GLM_FUNC_DECL tmat3x3<T, P> & operator++();
+               GLM_FUNC_DECL tmat3x3<T, P> & operator--();
+               GLM_FUNC_DECL tmat3x3<T, P> operator++(int);
+               GLM_FUNC_DECL tmat3x3<T, P> operator--(int);
+       };
+
+       // Binary operators
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat3x3<T, P> operator+(tmat3x3<T, P> const & m, T const & s);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat3x3<T, P> operator+(T const & s, tmat3x3<T, P> const & m);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat3x3<T, P> operator+(tmat3x3<T, P> const & m1, tmat3x3<T, P> const & m2);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat3x3<T, P> operator-(tmat3x3<T, P> const & m, T const & s);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat3x3<T, P> operator-(T const & s, tmat3x3<T, P> const & m);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat3x3<T, P> operator-(tmat3x3<T, P> const & m1, tmat3x3<T, P> const & m2);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat3x3<T, P> operator*(tmat3x3<T, P> const & m, T const & s);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat3x3<T, P> operator*(T const & s, tmat3x3<T, P> const & m);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL typename tmat3x3<T, P>::col_type operator*(tmat3x3<T, P> const & m, typename tmat3x3<T, P>::row_type const & v);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL typename tmat3x3<T, P>::row_type operator*(typename tmat3x3<T, P>::col_type const & v, tmat3x3<T, P> const & m);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat3x3<T, P> operator*(tmat3x3<T, P> const & m1, tmat3x3<T, P> const & m2);
+               
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat2x3<T, P> operator*(tmat3x3<T, P> const & m1, tmat2x3<T, P> const & m2);
+               
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat4x3<T, P> operator*(tmat3x3<T, P> const & m1, tmat4x3<T, P> const & m2);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat3x3<T, P> operator/(tmat3x3<T, P> const & m, T const & s);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat3x3<T, P> operator/(T const & s, tmat3x3<T, P> const & m);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL typename tmat3x3<T, P>::col_type operator/(tmat3x3<T, P> const & m, typename tmat3x3<T, P>::row_type const & v);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL typename tmat3x3<T, P>::row_type operator/(typename tmat3x3<T, P>::col_type const & v, tmat3x3<T, P> const & m);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat3x3<T, P> operator/(tmat3x3<T, P> const & m1, tmat3x3<T, P> const & m2);
+
+       // Unary constant operators
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat3x3<T, P> const operator-(tmat3x3<T, P> const & m);
+}//namespace glm
+
+#ifndef GLM_EXTERNAL_TEMPLATE
+#include "type_mat3x3.inl"
+#endif
diff --git a/include/glm/detail/type_mat3x3.inl b/include/glm/detail/type_mat3x3.inl
new file mode 100644 (file)
index 0000000..ad933d3
--- /dev/null
@@ -0,0 +1,631 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref core
+/// @file glm/detail/type_mat3x3.inl
+/// @date 2005-01-27 / 2011-06-15
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////
+
+namespace glm{
+namespace detail
+{
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat3x3<T, P> compute_inverse(tmat3x3<T, P> const & m)
+       {
+               T OneOverDeterminant = static_cast<T>(1) / (
+                       + m[0][0] * (m[1][1] * m[2][2] - m[2][1] * m[1][2])
+                       - m[1][0] * (m[0][1] * m[2][2] - m[2][1] * m[0][2])
+                       + m[2][0] * (m[0][1] * m[1][2] - m[1][1] * m[0][2]));
+
+               tmat3x3<T, P> Inverse(uninitialize);
+               Inverse[0][0] = + (m[1][1] * m[2][2] - m[2][1] * m[1][2]) * OneOverDeterminant;
+               Inverse[1][0] = - (m[1][0] * m[2][2] - m[2][0] * m[1][2]) * OneOverDeterminant;
+               Inverse[2][0] = + (m[1][0] * m[2][1] - m[2][0] * m[1][1]) * OneOverDeterminant;
+               Inverse[0][1] = - (m[0][1] * m[2][2] - m[2][1] * m[0][2]) * OneOverDeterminant;
+               Inverse[1][1] = + (m[0][0] * m[2][2] - m[2][0] * m[0][2]) * OneOverDeterminant;
+               Inverse[2][1] = - (m[0][0] * m[2][1] - m[2][0] * m[0][1]) * OneOverDeterminant;
+               Inverse[0][2] = + (m[0][1] * m[1][2] - m[1][1] * m[0][2]) * OneOverDeterminant;
+               Inverse[1][2] = - (m[0][0] * m[1][2] - m[1][0] * m[0][2]) * OneOverDeterminant;
+               Inverse[2][2] = + (m[0][0] * m[1][1] - m[1][0] * m[0][1]) * OneOverDeterminant;
+
+               return Inverse;
+       }
+}//namespace detail
+
+       //////////////////////////////////////////////////////////////
+       // Constructors
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat3x3<T, P>::tmat3x3()
+       {
+#              ifndef GLM_FORCE_NO_CTOR_INIT 
+                       this->value[0] = col_type(1, 0, 0);
+                       this->value[1] = col_type(0, 1, 0);
+                       this->value[2] = col_type(0, 0, 1);
+#              endif
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat3x3<T, P>::tmat3x3(ctor)
+       {}
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat3x3<T, P>::tmat3x3(tmat3x3<T, P> const & m)
+       {
+               this->value[0] = m.value[0];
+               this->value[1] = m.value[1];
+               this->value[2] = m.value[2];
+       }
+
+       template <typename T, precision P>
+       template <precision Q>
+       GLM_FUNC_QUALIFIER tmat3x3<T, P>::tmat3x3(tmat3x3<T, Q> const & m)
+       {
+               this->value[0] = m.value[0];
+               this->value[1] = m.value[1];
+               this->value[2] = m.value[2];
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat3x3<T, P>::tmat3x3(T const & s)
+       {
+               this->value[0] = col_type(s, 0, 0);
+               this->value[1] = col_type(0, s, 0);
+               this->value[2] = col_type(0, 0, s);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat3x3<T, P>::tmat3x3
+       (
+               T const & x0, T const & y0, T const & z0,
+               T const & x1, T const & y1, T const & z1,
+               T const & x2, T const & y2, T const & z2
+       )
+       {
+               this->value[0] = col_type(x0, y0, z0);
+               this->value[1] = col_type(x1, y1, z1);
+               this->value[2] = col_type(x2, y2, z2);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat3x3<T, P>::tmat3x3
+       (
+               col_type const & v0,
+               col_type const & v1,
+               col_type const & v2
+       )
+       {
+               this->value[0] = v0;
+               this->value[1] = v1;
+               this->value[2] = v2;
+       }
+
+       //////////////////////////////////////
+       // Conversion constructors
+       template <typename T, precision P>
+       template <
+               typename X1, typename Y1, typename Z1,
+               typename X2, typename Y2, typename Z2,
+               typename X3, typename Y3, typename Z3>
+       GLM_FUNC_QUALIFIER tmat3x3<T, P>::tmat3x3
+       (
+               X1 const & x1, Y1 const & y1, Z1 const & z1,
+               X2 const & x2, Y2 const & y2, Z2 const & z2,
+               X3 const & x3, Y3 const & y3, Z3 const & z3
+       )
+       {
+               this->value[0] = col_type(static_cast<T>(x1), value_type(y1), value_type(z1));
+               this->value[1] = col_type(static_cast<T>(x2), value_type(y2), value_type(z2));
+               this->value[2] = col_type(static_cast<T>(x3), value_type(y3), value_type(z3));
+       }
+       
+       template <typename T, precision P>
+       template <typename V1, typename V2, typename V3>
+       GLM_FUNC_QUALIFIER tmat3x3<T, P>::tmat3x3
+       (
+               tvec3<V1, P> const & v1,
+               tvec3<V2, P> const & v2,
+               tvec3<V3, P> const & v3
+       )
+       {
+               this->value[0] = col_type(v1);
+               this->value[1] = col_type(v2);
+               this->value[2] = col_type(v3);
+       }
+
+       //////////////////////////////////////////////////////////////
+       // Conversions
+
+       template <typename T, precision P>
+       template <typename U, precision Q>
+       GLM_FUNC_QUALIFIER tmat3x3<T, P>::tmat3x3(tmat3x3<U, Q> const & m)
+       {
+               this->value[0] = col_type(m[0]);
+               this->value[1] = col_type(m[1]);
+               this->value[2] = col_type(m[2]);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat3x3<T, P>::tmat3x3(tmat2x2<T, P> const & m)
+       {
+               this->value[0] = col_type(m[0], 0);
+               this->value[1] = col_type(m[1], 0);
+               this->value[2] = col_type(0, 0, 1);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat3x3<T, P>::tmat3x3(tmat4x4<T, P> const & m)
+       {
+               this->value[0] = col_type(m[0]);
+               this->value[1] = col_type(m[1]);
+               this->value[2] = col_type(m[2]);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat3x3<T, P>::tmat3x3(tmat2x3<T, P> const & m)
+       {
+               this->value[0] = m[0];
+               this->value[1] = m[1];
+               this->value[2] = col_type(0, 0, 1);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat3x3<T, P>::tmat3x3(tmat3x2<T, P> const & m)
+       {
+               this->value[0] = col_type(m[0], 0);
+               this->value[1] = col_type(m[1], 0);
+               this->value[2] = col_type(m[2], 1);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat3x3<T, P>::tmat3x3(tmat2x4<T, P> const & m)
+       {
+               this->value[0] = col_type(m[0]);
+               this->value[1] = col_type(m[1]);
+               this->value[2] = col_type(0, 0, 1);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat3x3<T, P>::tmat3x3(tmat4x2<T, P> const & m)
+       {
+               this->value[0] = col_type(m[0], 0);
+               this->value[1] = col_type(m[1], 0);
+               this->value[2] = col_type(m[2], 1);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat3x3<T, P>::tmat3x3(tmat3x4<T, P> const & m)
+       {
+               this->value[0] = col_type(m[0]);
+               this->value[1] = col_type(m[1]);
+               this->value[2] = col_type(m[2]);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat3x3<T, P>::tmat3x3(tmat4x3<T, P> const & m)
+       {
+               this->value[0] = m[0];
+               this->value[1] = m[1];
+               this->value[2] = m[2];
+       }
+
+       //////////////////////////////////////
+       // Accesses
+
+#      ifdef GLM_FORCE_SIZE_FUNC
+               template <typename T, precision P>
+               GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tmat3x3<T, P>::size_type tmat3x3<T, P>::size() const
+               {
+                       return 3;
+               }
+
+               template <typename T, precision P>
+               GLM_FUNC_QUALIFIER typename tmat3x3<T, P>::col_type & tmat3x3<T, P>::operator[](typename tmat3x3<T, P>::size_type i)
+               {
+                       assert(i < this->size());
+                       return this->value[i];
+               }
+
+               template <typename T, precision P>
+               GLM_FUNC_QUALIFIER typename tmat3x3<T, P>::col_type const & tmat3x3<T, P>::operator[](typename tmat3x3<T, P>::size_type i) const
+               {
+                       assert(i < this->size());
+                       return this->value[i];
+               }
+#      else
+               template <typename T, precision P>
+               GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tmat3x3<T, P>::length_type tmat3x3<T, P>::length() const
+               {
+                       return 3;
+               }
+
+               template <typename T, precision P>
+               GLM_FUNC_QUALIFIER typename tmat3x3<T, P>::col_type & tmat3x3<T, P>::operator[](typename tmat3x3<T, P>::length_type i)
+               {
+                       assert(i < this->length());
+                       return this->value[i];
+               }
+
+               template <typename T, precision P>
+               GLM_FUNC_QUALIFIER typename tmat3x3<T, P>::col_type const & tmat3x3<T, P>::operator[](typename tmat3x3<T, P>::length_type i) const
+               {
+                       assert(i < this->length());
+                       return this->value[i];
+               }
+#      endif//GLM_FORCE_SIZE_FUNC
+
+       //////////////////////////////////////////////////////////////
+       // Operators
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat3x3<T, P> & tmat3x3<T, P>::operator=(tmat3x3<T, P> const & m)
+       {
+               this->value[0] = m[0];
+               this->value[1] = m[1];
+               this->value[2] = m[2];
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U>
+       GLM_FUNC_QUALIFIER tmat3x3<T, P> & tmat3x3<T, P>::operator=(tmat3x3<U, P> const & m)
+       {
+               this->value[0] = m[0];
+               this->value[1] = m[1];
+               this->value[2] = m[2];
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U>
+       GLM_FUNC_QUALIFIER tmat3x3<T, P> & tmat3x3<T, P>::operator+=(U s)
+       {
+               this->value[0] += s;
+               this->value[1] += s;
+               this->value[2] += s;
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U>
+       GLM_FUNC_QUALIFIER tmat3x3<T, P> & tmat3x3<T, P>::operator+=(tmat3x3<U, P> const & m)
+       {
+               this->value[0] += m[0];
+               this->value[1] += m[1];
+               this->value[2] += m[2];
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U>
+       GLM_FUNC_QUALIFIER tmat3x3<T, P> & tmat3x3<T, P>::operator-=(U s)
+       {
+               this->value[0] -= s;
+               this->value[1] -= s;
+               this->value[2] -= s;
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U>
+       GLM_FUNC_QUALIFIER tmat3x3<T, P> & tmat3x3<T, P>::operator-=(tmat3x3<U, P> const & m)
+       {
+               this->value[0] -= m[0];
+               this->value[1] -= m[1];
+               this->value[2] -= m[2];
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U>
+       GLM_FUNC_QUALIFIER tmat3x3<T, P> & tmat3x3<T, P>::operator*=(U s)
+       {
+               this->value[0] *= s;
+               this->value[1] *= s;
+               this->value[2] *= s;
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U>
+       GLM_FUNC_QUALIFIER tmat3x3<T, P> & tmat3x3<T, P>::operator*=(tmat3x3<U, P> const & m)
+       {
+               return (*this = *this * m);
+       }
+
+       template <typename T, precision P>
+       template <typename U>
+       GLM_FUNC_QUALIFIER tmat3x3<T, P> & tmat3x3<T, P>::operator/=(U s)
+       {
+               this->value[0] /= s;
+               this->value[1] /= s;
+               this->value[2] /= s;
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U>
+       GLM_FUNC_QUALIFIER tmat3x3<T, P> & tmat3x3<T, P>::operator/=(tmat3x3<U, P> const & m)
+       {
+               return (*this = *this * detail::compute_inverse<T, P>(m));
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat3x3<T, P> & tmat3x3<T, P>::operator++()
+       {
+               ++this->value[0];
+               ++this->value[1];
+               ++this->value[2];
+               return *this;
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat3x3<T, P> & tmat3x3<T, P>::operator--()
+       {
+               --this->value[0];
+               --this->value[1];
+               --this->value[2];
+               return *this;
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat3x3<T, P> tmat3x3<T, P>::operator++(int)
+       {
+               tmat3x3<T, P> Result(*this);
+               ++*this;
+               return Result;
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat3x3<T, P> tmat3x3<T, P>::operator--(int)
+       {
+               tmat3x3<T, P> Result(*this);
+               --*this;
+               return Result;
+       }
+
+       //////////////////////////////////////////////////////////////
+       // Binary operators
+
+       template <typename T, precision P> 
+       GLM_FUNC_QUALIFIER tmat3x3<T, P> operator+(tmat3x3<T, P> const & m, T const & s)
+       {
+               return tmat3x3<T, P>(
+                       m[0] + s,
+                       m[1] + s,
+                       m[2] + s);
+       }
+
+       template <typename T, precision P> 
+       GLM_FUNC_QUALIFIER tmat3x3<T, P> operator+(T const & s, tmat3x3<T, P> const & m)
+       {
+               return tmat3x3<T, P>(
+                       m[0] + s,
+                       m[1] + s,
+                       m[2] + s);
+       }
+
+       template <typename T, precision P> 
+       GLM_FUNC_QUALIFIER tmat3x3<T, P> operator+(tmat3x3<T, P> const & m1, tmat3x3<T, P> const & m2)
+       {
+               return tmat3x3<T, P>(
+                       m1[0] + m2[0],
+                       m1[1] + m2[1],
+                       m1[2] + m2[2]);
+       }
+
+       template <typename T, precision P> 
+       GLM_FUNC_QUALIFIER tmat3x3<T, P> operator-(tmat3x3<T, P> const & m, T const & s)
+       {
+               return tmat3x3<T, P>(
+                       m[0] - s,
+                       m[1] - s,
+                       m[2] - s);
+       }
+
+       template <typename T, precision P> 
+       GLM_FUNC_QUALIFIER tmat3x3<T, P> operator-(T const & s, tmat3x3<T, P> const & m)
+       {
+               return tmat3x3<T, P>(
+                       s - m[0],
+                       s - m[1],
+                       s - m[2]);
+       }
+
+       template <typename T, precision P> 
+       GLM_FUNC_QUALIFIER tmat3x3<T, P> operator-(tmat3x3<T, P> const & m1, tmat3x3<T, P> const & m2)
+       {
+               return tmat3x3<T, P>(
+                       m1[0] - m2[0],
+                       m1[1] - m2[1],
+                       m1[2] - m2[2]);
+       }
+
+       template <typename T, precision P> 
+       GLM_FUNC_QUALIFIER tmat3x3<T, P> operator*(tmat3x3<T, P> const & m, T const & s)
+       {
+               return tmat3x3<T, P>(
+                       m[0] * s,
+                       m[1] * s,
+                       m[2] * s);
+       }
+
+       template <typename T, precision P> 
+       GLM_FUNC_QUALIFIER tmat3x3<T, P> operator*(T const & s, tmat3x3<T, P> const & m)
+       {
+               return tmat3x3<T, P>(
+                       m[0] * s,
+                       m[1] * s,
+                       m[2] * s);
+       }
+
+       template <typename T, precision P> 
+       GLM_FUNC_QUALIFIER typename tmat3x3<T, P>::col_type operator*(tmat3x3<T, P> const & m, typename tmat3x3<T, P>::row_type const & v)
+       {
+               return typename tmat3x3<T, P>::col_type(
+                       m[0][0] * v.x + m[1][0] * v.y + m[2][0] * v.z,
+                       m[0][1] * v.x + m[1][1] * v.y + m[2][1] * v.z,
+                       m[0][2] * v.x + m[1][2] * v.y + m[2][2] * v.z);
+       }
+
+       template <typename T, precision P> 
+       GLM_FUNC_QUALIFIER typename tmat3x3<T, P>::row_type operator*(typename tmat3x3<T, P>::col_type const & v, tmat3x3<T, P> const & m)
+       {
+               return typename tmat3x3<T, P>::row_type(
+                       m[0][0] * v.x + m[0][1] * v.y + m[0][2] * v.z,
+                       m[1][0] * v.x + m[1][1] * v.y + m[1][2] * v.z,
+                       m[2][0] * v.x + m[2][1] * v.y + m[2][2] * v.z);
+       }
+
+       template <typename T, precision P> 
+       GLM_FUNC_QUALIFIER tmat3x3<T, P> operator*(tmat3x3<T, P> const & m1, tmat3x3<T, P> const & m2)
+       {
+               T const SrcA00 = m1[0][0];
+               T const SrcA01 = m1[0][1];
+               T const SrcA02 = m1[0][2];
+               T const SrcA10 = m1[1][0];
+               T const SrcA11 = m1[1][1];
+               T const SrcA12 = m1[1][2];
+               T const SrcA20 = m1[2][0];
+               T const SrcA21 = m1[2][1];
+               T const SrcA22 = m1[2][2];
+
+               T const SrcB00 = m2[0][0];
+               T const SrcB01 = m2[0][1];
+               T const SrcB02 = m2[0][2];
+               T const SrcB10 = m2[1][0];
+               T const SrcB11 = m2[1][1];
+               T const SrcB12 = m2[1][2];
+               T const SrcB20 = m2[2][0];
+               T const SrcB21 = m2[2][1];
+               T const SrcB22 = m2[2][2];
+
+               tmat3x3<T, P> Result(uninitialize);
+               Result[0][0] = SrcA00 * SrcB00 + SrcA10 * SrcB01 + SrcA20 * SrcB02;
+               Result[0][1] = SrcA01 * SrcB00 + SrcA11 * SrcB01 + SrcA21 * SrcB02;
+               Result[0][2] = SrcA02 * SrcB00 + SrcA12 * SrcB01 + SrcA22 * SrcB02;
+               Result[1][0] = SrcA00 * SrcB10 + SrcA10 * SrcB11 + SrcA20 * SrcB12;
+               Result[1][1] = SrcA01 * SrcB10 + SrcA11 * SrcB11 + SrcA21 * SrcB12;
+               Result[1][2] = SrcA02 * SrcB10 + SrcA12 * SrcB11 + SrcA22 * SrcB12;
+               Result[2][0] = SrcA00 * SrcB20 + SrcA10 * SrcB21 + SrcA20 * SrcB22;
+               Result[2][1] = SrcA01 * SrcB20 + SrcA11 * SrcB21 + SrcA21 * SrcB22;
+               Result[2][2] = SrcA02 * SrcB20 + SrcA12 * SrcB21 + SrcA22 * SrcB22;
+               return Result;
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat2x3<T, P> operator*(tmat3x3<T, P> const & m1, tmat2x3<T, P> const & m2)
+       {
+               return tmat2x3<T, P>(
+                       m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2],
+                       m1[0][1] * m2[0][0] + m1[1][1] * m2[0][1] + m1[2][1] * m2[0][2],
+                       m1[0][2] * m2[0][0] + m1[1][2] * m2[0][1] + m1[2][2] * m2[0][2],
+                       m1[0][0] * m2[1][0] + m1[1][0] * m2[1][1] + m1[2][0] * m2[1][2],
+                       m1[0][1] * m2[1][0] + m1[1][1] * m2[1][1] + m1[2][1] * m2[1][2],
+                       m1[0][2] * m2[1][0] + m1[1][2] * m2[1][1] + m1[2][2] * m2[1][2]);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat4x3<T, P> operator*(tmat3x3<T, P> const & m1, tmat4x3<T, P> const & m2)
+       {
+               return tmat4x3<T, P>(
+                       m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2],
+                       m1[0][1] * m2[0][0] + m1[1][1] * m2[0][1] + m1[2][1] * m2[0][2],
+                       m1[0][2] * m2[0][0] + m1[1][2] * m2[0][1] + m1[2][2] * m2[0][2],
+                       m1[0][0] * m2[1][0] + m1[1][0] * m2[1][1] + m1[2][0] * m2[1][2],
+                       m1[0][1] * m2[1][0] + m1[1][1] * m2[1][1] + m1[2][1] * m2[1][2],
+                       m1[0][2] * m2[1][0] + m1[1][2] * m2[1][1] + m1[2][2] * m2[1][2],
+                       m1[0][0] * m2[2][0] + m1[1][0] * m2[2][1] + m1[2][0] * m2[2][2],
+                       m1[0][1] * m2[2][0] + m1[1][1] * m2[2][1] + m1[2][1] * m2[2][2],
+                       m1[0][2] * m2[2][0] + m1[1][2] * m2[2][1] + m1[2][2] * m2[2][2],
+                       m1[0][0] * m2[3][0] + m1[1][0] * m2[3][1] + m1[2][0] * m2[3][2],
+                       m1[0][1] * m2[3][0] + m1[1][1] * m2[3][1] + m1[2][1] * m2[3][2],
+                       m1[0][2] * m2[3][0] + m1[1][2] * m2[3][1] + m1[2][2] * m2[3][2]);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat3x3<T, P> operator/(tmat3x3<T, P> const & m,     T const & s)
+       {
+               return tmat3x3<T, P>(
+                       m[0] / s,
+                       m[1] / s,
+                       m[2] / s);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat3x3<T, P> operator/(T const & s, tmat3x3<T, P> const & m)
+       {
+               return tmat3x3<T, P>(
+                       s / m[0],
+                       s / m[1],
+                       s / m[2]);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER typename tmat3x3<T, P>::col_type operator/(tmat3x3<T, P> const & m, typename tmat3x3<T, P>::row_type const & v)
+       {
+               return detail::compute_inverse<T, P>(m) * v;
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER typename tmat3x3<T, P>::row_type operator/(typename tmat3x3<T, P>::col_type const & v, tmat3x3<T, P> const & m)
+       {
+               return v * detail::compute_inverse<T, P>(m);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat3x3<T, P> operator/(tmat3x3<T, P> const & m1, tmat3x3<T, P> const & m2)
+       {
+               tmat3x3<T, P> m1_copy(m1);
+               return m1_copy /= m2;
+       }
+
+       // Unary constant operators
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat3x3<T, P> const operator-(tmat3x3<T, P> const & m)
+       {
+               return tmat3x3<T, P>(
+                       -m[0], 
+                       -m[1],
+                       -m[2]);
+       }
+
+       //////////////////////////////////////
+       // Boolean operators
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER bool operator==(tmat3x3<T, P> const & m1, tmat3x3<T, P> const & m2)
+       {
+               return (m1[0] == m2[0]) && (m1[1] == m2[1]) && (m1[2] == m2[2]);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER bool operator!=(tmat3x3<T, P> const & m1, tmat3x3<T, P> const & m2)
+       {
+               return (m1[0] != m2[0]) || (m1[1] != m2[1]) || (m1[2] != m2[2]);
+       }
+} //namespace glm
diff --git a/include/glm/detail/type_mat3x4.hpp b/include/glm/detail/type_mat3x4.hpp
new file mode 100644 (file)
index 0000000..7814e3f
--- /dev/null
@@ -0,0 +1,206 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref core
+/// @file glm/detail/type_mat3x4.hpp
+/// @date 2006-08-05 / 2011-06-15
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////
+
+#pragma once
+
+#include "../fwd.hpp"
+#include "type_vec3.hpp"
+#include "type_vec4.hpp"
+#include "type_mat.hpp"
+#include <limits>
+#include <cstddef>
+
+namespace glm
+{
+       template <typename T, precision P = defaultp>
+       struct tmat3x4
+       {
+               typedef tvec4<T, P> col_type;
+               typedef tvec3<T, P> row_type;
+               typedef tmat3x4<T, P> type;
+               typedef tmat4x3<T, P> transpose_type;
+               typedef T value_type;
+
+       private:
+               /// @cond DETAIL
+               col_type value[3];
+               /// @endcond
+
+       public:
+               // Constructors
+               GLM_FUNC_DECL tmat3x4();
+               GLM_FUNC_DECL tmat3x4(tmat3x4<T, P> const & m);
+               template <precision Q>
+               GLM_FUNC_DECL tmat3x4(tmat3x4<T, Q> const & m);
+
+               GLM_FUNC_DECL explicit tmat3x4(ctor);
+               GLM_FUNC_DECL explicit tmat3x4(T const & s);
+               GLM_FUNC_DECL tmat3x4(
+                       T const & x0, T const & y0, T const & z0, T const & w0,
+                       T const & x1, T const & y1, T const & z1, T const & w1,
+                       T const & x2, T const & y2, T const & z2, T const & w2);
+               GLM_FUNC_DECL tmat3x4(
+                       col_type const & v0,
+                       col_type const & v1,
+                       col_type const & v2);
+
+               //////////////////////////////////////
+               // Conversions
+               template<
+                       typename X1, typename Y1, typename Z1, typename W1,
+                       typename X2, typename Y2, typename Z2, typename W2,
+                       typename X3, typename Y3, typename Z3, typename W3>
+               GLM_FUNC_DECL tmat3x4(
+                       X1 const & x1, Y1 const & y1, Z1 const & z1, W1 const & w1,
+                       X2 const & x2, Y2 const & y2, Z2 const & z2, W2 const & w2,
+                       X3 const & x3, Y3 const & y3, Z3 const & z3, W3 const & w3);
+                       
+               template <typename V1, typename V2, typename V3>
+               GLM_FUNC_DECL tmat3x4(
+                       tvec4<V1, P> const & v1,
+                       tvec4<V2, P> const & v2,
+                       tvec4<V3, P> const & v3);
+
+               //////////////////////////////////////
+               // Matrix conversion
+
+#              ifdef GLM_FORCE_EXPLICIT_CTOR
+                       template <typename U, precision Q>
+                       GLM_FUNC_DECL explicit tmat3x4(tmat3x4<U, Q> const & m);
+#              else
+                       template <typename U, precision Q>
+                       GLM_FUNC_DECL tmat3x4(tmat3x4<U, Q> const & m);
+#              endif
+
+               GLM_FUNC_DECL explicit tmat3x4(tmat2x2<T, P> const & x);
+               GLM_FUNC_DECL explicit tmat3x4(tmat3x3<T, P> const & x);
+               GLM_FUNC_DECL explicit tmat3x4(tmat4x4<T, P> const & x);
+               GLM_FUNC_DECL explicit tmat3x4(tmat2x3<T, P> const & x);
+               GLM_FUNC_DECL explicit tmat3x4(tmat3x2<T, P> const & x);
+               GLM_FUNC_DECL explicit tmat3x4(tmat2x4<T, P> const & x);
+               GLM_FUNC_DECL explicit tmat3x4(tmat4x2<T, P> const & x);
+               GLM_FUNC_DECL explicit tmat3x4(tmat4x3<T, P> const & x);
+
+               //////////////////////////////////////
+               // Accesses
+
+#              ifdef GLM_FORCE_SIZE_FUNC
+                       typedef size_t size_type;
+                       GLM_FUNC_DECL GLM_CONSTEXPR size_t size() const;
+
+                       GLM_FUNC_DECL col_type & operator[](size_type i);
+                       GLM_FUNC_DECL col_type const & operator[](size_type i) const;
+#              else
+                       typedef length_t length_type;
+                       GLM_FUNC_DECL GLM_CONSTEXPR length_type length() const;
+
+                       GLM_FUNC_DECL col_type & operator[](length_type i);
+                       GLM_FUNC_DECL col_type const & operator[](length_type i) const;
+#              endif//GLM_FORCE_SIZE_FUNC
+
+               //////////////////////////////////////
+               // Unary arithmetic operators
+
+               GLM_FUNC_DECL tmat3x4<T, P> & operator=(tmat3x4<T, P> const & m);
+
+               template <typename U> 
+               GLM_FUNC_DECL tmat3x4<T, P> & operator=(tmat3x4<U, P> const & m);
+               template <typename U> 
+               GLM_FUNC_DECL tmat3x4<T, P> & operator+=(U s);
+               template <typename U> 
+               GLM_FUNC_DECL tmat3x4<T, P> & operator+=(tmat3x4<U, P> const & m);
+               template <typename U> 
+               GLM_FUNC_DECL tmat3x4<T, P> & operator-=(U s);
+               template <typename U> 
+               GLM_FUNC_DECL tmat3x4<T, P> & operator-=(tmat3x4<U, P> const & m);
+               template <typename U> 
+               GLM_FUNC_DECL tmat3x4<T, P> & operator*=(U s);
+               template <typename U> 
+               GLM_FUNC_DECL tmat3x4<T, P> & operator/=(U s);
+
+               //////////////////////////////////////
+               // Increment and decrement operators
+
+               GLM_FUNC_DECL tmat3x4<T, P> & operator++();
+               GLM_FUNC_DECL tmat3x4<T, P> & operator--();
+               GLM_FUNC_DECL tmat3x4<T, P> operator++(int);
+               GLM_FUNC_DECL tmat3x4<T, P> operator--(int);
+       };
+
+       // Binary operators
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat3x4<T, P> operator+(tmat3x4<T, P> const & m, T const & s);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat3x4<T, P> operator+(tmat3x4<T, P> const & m1, tmat3x4<T, P> const & m2);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat3x4<T, P> operator-(tmat3x4<T, P> const & m, T const & s);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat3x4<T, P> operator-(tmat3x4<T, P> const & m1, tmat3x4<T, P> const & m2);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat3x4<T, P> operator*(tmat3x4<T, P> const & m, T const & s);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat3x4<T, P> operator*(T const & s, tmat3x4<T, P> const & m);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL typename tmat3x4<T, P>::col_type operator*(tmat3x4<T, P> const & m, typename tmat3x4<T, P>::row_type const & v);
+
+       template <typename T, precision P> 
+       GLM_FUNC_DECL typename tmat3x4<T, P>::row_type operator*(typename tmat3x4<T, P>::col_type const & v, tmat3x4<T, P> const & m);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat4x4<T, P> operator*(tmat3x4<T, P> const & m1, tmat4x3<T, P> const & m2);
+               
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat2x4<T, P> operator*(tmat3x4<T, P> const & m1, tmat2x3<T, P> const & m2);
+               
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat3x4<T, P> operator*(tmat3x4<T, P> const & m1, tmat3x3<T, P> const & m2);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat3x4<T, P> operator/(tmat3x4<T, P> const & m, T const & s);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat3x4<T, P> operator/(T const & s, tmat3x4<T, P> const & m);
+
+       // Unary constant operators
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat3x4<T, P> const operator-(tmat3x4<T, P> const & m);
+}//namespace glm
+
+#ifndef GLM_EXTERNAL_TEMPLATE
+#include "type_mat3x4.inl"
+#endif
diff --git a/include/glm/detail/type_mat3x4.inl b/include/glm/detail/type_mat3x4.inl
new file mode 100644 (file)
index 0000000..03e0c2c
--- /dev/null
@@ -0,0 +1,579 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref core
+/// @file glm/detail/type_mat3x4.inl
+/// @date 2006-08-05 / 2011-06-15
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////
+
+namespace glm
+{
+       //////////////////////////////////////////////////////////////
+       // Constructors
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat3x4<T, P>::tmat3x4()
+       {
+#              ifndef GLM_FORCE_NO_CTOR_INIT 
+                       this->value[0] = col_type(1, 0, 0, 0);
+                       this->value[1] = col_type(0, 1, 0, 0);
+                       this->value[2] = col_type(0, 0, 1, 0);
+#              endif
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat3x4<T, P>::tmat3x4(tmat3x4<T, P> const & m)
+       {
+               this->value[0] = m.value[0];
+               this->value[1] = m.value[1];
+               this->value[2] = m.value[2];
+       }
+
+       template <typename T, precision P>
+       template <precision Q>
+       GLM_FUNC_QUALIFIER tmat3x4<T, P>::tmat3x4(tmat3x4<T, Q> const & m)
+       {
+               this->value[0] = m.value[0];
+               this->value[1] = m.value[1];
+               this->value[2] = m.value[2];
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat3x4<T, P>::tmat3x4(ctor)
+       {}
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat3x4<T, P>::tmat3x4(T const & s)
+       {
+               value_type const Zero(0);
+               this->value[0] = col_type(s, Zero, Zero, Zero);
+               this->value[1] = col_type(Zero, s, Zero, Zero);
+               this->value[2] = col_type(Zero, Zero, s, Zero);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat3x4<T, P>::tmat3x4
+       (
+               T const & x0, T const & y0, T const & z0, T const & w0,
+               T const & x1, T const & y1, T const & z1, T const & w1,
+               T const & x2, T const & y2, T const & z2, T const & w2
+       )
+       {
+               this->value[0] = col_type(x0, y0, z0, w0);
+               this->value[1] = col_type(x1, y1, z1, w1);
+               this->value[2] = col_type(x2, y2, z2, w2);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat3x4<T, P>::tmat3x4
+       (
+               col_type const & v0,
+               col_type const & v1,
+               col_type const & v2
+       )
+       {
+               this->value[0] = v0;
+               this->value[1] = v1;
+               this->value[2] = v2;
+       }
+
+       //////////////////////////////////////
+       // Conversion constructors
+       template <typename T, precision P>
+       template <
+               typename X1, typename Y1, typename Z1, typename W1,
+               typename X2, typename Y2, typename Z2, typename W2,
+               typename X3, typename Y3, typename Z3, typename W3>
+       GLM_FUNC_QUALIFIER tmat3x4<T, P>::tmat3x4
+       (
+               X1 const & x1, Y1 const & y1, Z1 const & z1, W1 const & w1,
+               X2 const & x2, Y2 const & y2, Z2 const & z2, W2 const & w2,
+               X3 const & x3, Y3 const & y3, Z3 const & z3, W3 const & w3
+       )
+       {
+               this->value[0] = col_type(static_cast<T>(x1), value_type(y1), value_type(z1), value_type(w1));
+               this->value[1] = col_type(static_cast<T>(x2), value_type(y2), value_type(z2), value_type(w2));
+               this->value[2] = col_type(static_cast<T>(x3), value_type(y3), value_type(z3), value_type(w3));
+       }
+       
+       template <typename T, precision P>
+       template <typename V1, typename V2, typename V3>
+       GLM_FUNC_QUALIFIER tmat3x4<T, P>::tmat3x4
+       (
+               tvec4<V1, P> const & v1,
+               tvec4<V2, P> const & v2,
+               tvec4<V3, P> const & v3
+       )
+       {
+               this->value[0] = col_type(v1);
+               this->value[1] = col_type(v2);
+               this->value[2] = col_type(v3);
+       }
+       
+       // Conversion
+       template <typename T, precision P>
+       template <typename U, precision Q>
+       GLM_FUNC_QUALIFIER tmat3x4<T, P>::tmat3x4(tmat3x4<U, Q> const & m)
+       {
+               this->value[0] = col_type(m[0]);
+               this->value[1] = col_type(m[1]);
+               this->value[2] = col_type(m[2]);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat3x4<T, P>::tmat3x4(tmat2x2<T, P> const & m)
+       {
+               this->value[0] = col_type(m[0], 0, 0);
+               this->value[1] = col_type(m[1], 0, 0);
+               this->value[2] = col_type(0, 0, 1, 0);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat3x4<T, P>::tmat3x4(tmat3x3<T, P> const & m)
+       {
+               this->value[0] = col_type(m[0], 0);
+               this->value[1] = col_type(m[1], 0);
+               this->value[2] = col_type(m[2], 0);
+       }
+
+       template <typename T, precision P> 
+       GLM_FUNC_QUALIFIER tmat3x4<T, P>::tmat3x4(tmat4x4<T, P> const & m)
+       {
+               this->value[0] = col_type(m[0]);
+               this->value[1] = col_type(m[1]);
+               this->value[2] = col_type(m[2]);
+       }
+
+       template <typename T, precision P> 
+       GLM_FUNC_QUALIFIER tmat3x4<T, P>::tmat3x4(tmat2x3<T, P> const & m)
+       {
+               this->value[0] = col_type(m[0], 0);
+               this->value[1] = col_type(m[1], 0);
+               this->value[2] = col_type(0, 0, 1, 0);
+       }
+
+       template <typename T, precision P> 
+       GLM_FUNC_QUALIFIER tmat3x4<T, P>::tmat3x4(tmat3x2<T, P> const & m)
+       {
+               this->value[0] = col_type(m[0], 0, 0);
+               this->value[1] = col_type(m[1], 0, 0);
+               this->value[2] = col_type(m[2], 0, 1);
+       }
+
+       template <typename T, precision P> 
+       GLM_FUNC_QUALIFIER tmat3x4<T, P>::tmat3x4(tmat2x4<T, P> const & m)
+       {
+               this->value[0] = col_type(m[0]);
+               this->value[1] = col_type(m[1]);
+               this->value[2] = col_type(0, 0, 1, 0);
+       }
+
+       template <typename T, precision P> 
+       GLM_FUNC_QUALIFIER tmat3x4<T, P>::tmat3x4(tmat4x2<T, P> const & m)
+       {
+               this->value[0] = col_type(m[0], 0, 0);
+               this->value[1] = col_type(m[1], 0, 0);
+               this->value[2] = col_type(m[2], 1, 0);
+       }
+
+       template <typename T, precision P> 
+       GLM_FUNC_QUALIFIER tmat3x4<T, P>::tmat3x4(tmat4x3<T, P> const & m)
+       {
+               this->value[0] = col_type(m[0], 0);
+               this->value[1] = col_type(m[1], 0);
+               this->value[2] = col_type(m[2], 0);
+       }
+
+       //////////////////////////////////////
+       // Accesses
+
+#      ifdef GLM_FORCE_SIZE_FUNC
+               template <typename T, precision P>
+               GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tmat3x4<T, P>::size_type tmat3x4<T, P>::size() const
+               {
+                       return 3;
+               }
+
+               template <typename T, precision P>
+               GLM_FUNC_QUALIFIER typename tmat3x4<T, P>::col_type & tmat3x4<T, P>::operator[](typename tmat3x4<T, P>::size_type i)
+               {
+                       assert(i < this->size());
+                       return this->value[i];
+               }
+
+               template <typename T, precision P>
+               GLM_FUNC_QUALIFIER typename tmat3x4<T, P>::col_type const & tmat3x4<T, P>::operator[](typename tmat3x4<T, P>::size_type i) const
+               {
+                       assert(i < this->size());
+                       return this->value[i];
+               }
+#      else
+               template <typename T, precision P>
+               GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tmat3x4<T, P>::length_type tmat3x4<T, P>::length() const
+               {
+                       return 3;
+               }
+
+               template <typename T, precision P>
+               GLM_FUNC_QUALIFIER typename tmat3x4<T, P>::col_type & tmat3x4<T, P>::operator[](typename tmat3x4<T, P>::length_type i)
+               {
+                       assert(i < this->length());
+                       return this->value[i];
+               }
+
+               template <typename T, precision P>
+               GLM_FUNC_QUALIFIER typename tmat3x4<T, P>::col_type const & tmat3x4<T, P>::operator[](typename tmat3x4<T, P>::length_type i) const
+               {
+                       assert(i < this->length());
+                       return this->value[i];
+               }
+#      endif//GLM_FORCE_SIZE_FUNC
+
+       //////////////////////////////////////////////////////////////
+       // Unary updatable operators
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat3x4<T, P>& tmat3x4<T, P>::operator=(tmat3x4<T, P> const & m)
+       {
+               this->value[0] = m[0];
+               this->value[1] = m[1];
+               this->value[2] = m[2];
+               return *this;
+       }
+
+       template <typename T, precision P> 
+       template <typename U> 
+       GLM_FUNC_QUALIFIER tmat3x4<T, P>& tmat3x4<T, P>::operator=(tmat3x4<U, P> const & m)
+       {
+               this->value[0] = m[0];
+               this->value[1] = m[1];
+               this->value[2] = m[2];
+               return *this;
+       }
+
+       template <typename T, precision P> 
+       template <typename U> 
+       GLM_FUNC_QUALIFIER tmat3x4<T, P>& tmat3x4<T, P>::operator+=(U s)
+       {
+               this->value[0] += s;
+               this->value[1] += s;
+               this->value[2] += s;
+               return *this;
+       }
+
+       template <typename T, precision P> 
+       template <typename U> 
+       GLM_FUNC_QUALIFIER tmat3x4<T, P>& tmat3x4<T, P>::operator+=(tmat3x4<U, P> const & m)
+       {
+               this->value[0] += m[0];
+               this->value[1] += m[1];
+               this->value[2] += m[2];
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U>
+       GLM_FUNC_QUALIFIER tmat3x4<T, P>& tmat3x4<T, P>::operator-=(U s)
+       {
+               this->value[0] -= s;
+               this->value[1] -= s;
+               this->value[2] -= s;
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U>
+       GLM_FUNC_QUALIFIER tmat3x4<T, P>& tmat3x4<T, P>::operator-=(tmat3x4<U, P> const & m)
+       {
+               this->value[0] -= m[0];
+               this->value[1] -= m[1];
+               this->value[2] -= m[2];
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U>
+       GLM_FUNC_QUALIFIER tmat3x4<T, P>& tmat3x4<T, P>::operator*=(U s)
+       {
+               this->value[0] *= s;
+               this->value[1] *= s;
+               this->value[2] *= s;
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U>
+       GLM_FUNC_QUALIFIER tmat3x4<T, P> & tmat3x4<T, P>::operator/=(U s)
+       {
+               this->value[0] /= s;
+               this->value[1] /= s;
+               this->value[2] /= s;
+               return *this;
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat3x4<T, P>& tmat3x4<T, P>::operator++()
+       {
+               ++this->value[0];
+               ++this->value[1];
+               ++this->value[2];
+               return *this;
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat3x4<T, P>& tmat3x4<T, P>::operator--()
+       {
+               --this->value[0];
+               --this->value[1];
+               --this->value[2];
+               return *this;
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat3x4<T, P> tmat3x4<T, P>::operator++(int)
+       {
+               tmat3x4<T, P> Result(*this);
+               ++*this;
+               return Result;
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat3x4<T, P> tmat3x4<T, P>::operator--(int)
+       {
+               tmat3x4<T, P> Result(*this);
+               --*this;
+               return Result;
+       }
+
+       //////////////////////////////////////////////////////////////
+       // Binary operators
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat3x4<T, P> operator+(tmat3x4<T, P> const & m, T const & s)
+       {
+               return tmat3x4<T, P>(
+                       m[0] + s,
+                       m[1] + s,
+                       m[2] + s);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat3x4<T, P> operator+(tmat3x4<T, P> const & m1, tmat3x4<T, P> const & m2)
+       {
+               return tmat3x4<T, P>(
+                       m1[0] + m2[0],
+                       m1[1] + m2[1],
+                       m1[2] + m2[2]);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat3x4<T, P> operator-(tmat3x4<T, P> const & m,     T const & s)
+       {
+               return tmat3x4<T, P>(
+                       m[0] - s,
+                       m[1] - s,
+                       m[2] - s);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat3x4<T, P> operator-(tmat3x4<T, P> const & m1, tmat3x4<T, P> const & m2)
+       {
+               return tmat3x4<T, P>(
+                       m1[0] - m2[0],
+                       m1[1] - m2[1],
+                       m1[2] - m2[2]);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat3x4<T, P> operator*(tmat3x4<T, P> const & m, T const & s)
+       {
+               return tmat3x4<T, P>(
+                       m[0] * s,
+                       m[1] * s,
+                       m[2] * s);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat3x4<T, P> operator*(T const & s, tmat3x4<T, P> const & m)
+       {
+               return tmat3x4<T, P>(
+                       m[0] * s,
+                       m[1] * s,
+                       m[2] * s);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER typename tmat3x4<T, P>::col_type operator*
+       (
+               tmat3x4<T, P> const & m,
+               typename tmat3x4<T, P>::row_type const & v
+       )
+       {
+               return typename tmat3x4<T, P>::col_type(
+                       m[0][0] * v.x + m[1][0] * v.y + m[2][0] * v.z,
+                       m[0][1] * v.x + m[1][1] * v.y + m[2][1] * v.z,
+                       m[0][2] * v.x + m[1][2] * v.y + m[2][2] * v.z,
+                       m[0][3] * v.x + m[1][3] * v.y + m[2][3] * v.z);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER typename tmat3x4<T, P>::row_type operator*
+       (
+               typename tmat3x4<T, P>::col_type const & v,
+               tmat3x4<T, P> const & m
+       )
+       {
+               return typename tmat3x4<T, P>::row_type(
+                       v.x * m[0][0] + v.y * m[0][1] + v.z * m[0][2] + v.w * m[0][3],
+                       v.x * m[1][0] + v.y * m[1][1] + v.z * m[1][2] + v.w * m[1][3],
+                       v.x * m[2][0] + v.y * m[2][1] + v.z * m[2][2] + v.w * m[2][3]);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat4x4<T, P> operator*(tmat3x4<T, P> const & m1, tmat4x3<T, P> const & m2)
+       {
+               const T SrcA00 = m1[0][0];
+               const T SrcA01 = m1[0][1];
+               const T SrcA02 = m1[0][2];
+               const T SrcA03 = m1[0][3];
+               const T SrcA10 = m1[1][0];
+               const T SrcA11 = m1[1][1];
+               const T SrcA12 = m1[1][2];
+               const T SrcA13 = m1[1][3];
+               const T SrcA20 = m1[2][0];
+               const T SrcA21 = m1[2][1];
+               const T SrcA22 = m1[2][2];
+               const T SrcA23 = m1[2][3];
+
+               const T SrcB00 = m2[0][0];
+               const T SrcB01 = m2[0][1];
+               const T SrcB02 = m2[0][2];
+               const T SrcB10 = m2[1][0];
+               const T SrcB11 = m2[1][1];
+               const T SrcB12 = m2[1][2];
+               const T SrcB20 = m2[2][0];
+               const T SrcB21 = m2[2][1];
+               const T SrcB22 = m2[2][2];
+               const T SrcB30 = m2[3][0];
+               const T SrcB31 = m2[3][1];
+               const T SrcB32 = m2[3][2];
+
+               tmat4x4<T, P> Result(uninitialize);
+               Result[0][0] = SrcA00 * SrcB00 + SrcA10 * SrcB01 + SrcA20 * SrcB02;
+               Result[0][1] = SrcA01 * SrcB00 + SrcA11 * SrcB01 + SrcA21 * SrcB02;
+               Result[0][2] = SrcA02 * SrcB00 + SrcA12 * SrcB01 + SrcA22 * SrcB02;
+               Result[0][3] = SrcA03 * SrcB00 + SrcA13 * SrcB01 + SrcA23 * SrcB02;
+               Result[1][0] = SrcA00 * SrcB10 + SrcA10 * SrcB11 + SrcA20 * SrcB12;
+               Result[1][1] = SrcA01 * SrcB10 + SrcA11 * SrcB11 + SrcA21 * SrcB12;
+               Result[1][2] = SrcA02 * SrcB10 + SrcA12 * SrcB11 + SrcA22 * SrcB12;
+               Result[1][3] = SrcA03 * SrcB10 + SrcA13 * SrcB11 + SrcA23 * SrcB12;
+               Result[2][0] = SrcA00 * SrcB20 + SrcA10 * SrcB21 + SrcA20 * SrcB22;
+               Result[2][1] = SrcA01 * SrcB20 + SrcA11 * SrcB21 + SrcA21 * SrcB22;
+               Result[2][2] = SrcA02 * SrcB20 + SrcA12 * SrcB21 + SrcA22 * SrcB22;
+               Result[2][3] = SrcA03 * SrcB20 + SrcA13 * SrcB21 + SrcA23 * SrcB22;
+               Result[3][0] = SrcA00 * SrcB30 + SrcA10 * SrcB31 + SrcA20 * SrcB32;
+               Result[3][1] = SrcA01 * SrcB30 + SrcA11 * SrcB31 + SrcA21 * SrcB32;
+               Result[3][2] = SrcA02 * SrcB30 + SrcA12 * SrcB31 + SrcA22 * SrcB32;
+               Result[3][3] = SrcA03 * SrcB30 + SrcA13 * SrcB31 + SrcA23 * SrcB32;
+               return Result;
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat2x4<T, P> operator*(tmat3x4<T, P> const & m1, tmat2x3<T, P> const & m2)
+       {
+               return tmat2x4<T, P>(
+                       m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2],
+                       m1[0][1] * m2[0][0] + m1[1][1] * m2[0][1] + m1[2][1] * m2[0][2],
+                       m1[0][2] * m2[0][0] + m1[1][2] * m2[0][1] + m1[2][2] * m2[0][2],
+                       m1[0][3] * m2[0][0] + m1[1][3] * m2[0][1] + m1[2][3] * m2[0][2],
+                       m1[0][0] * m2[1][0] + m1[1][0] * m2[1][1] + m1[2][0] * m2[1][2],
+                       m1[0][1] * m2[1][0] + m1[1][1] * m2[1][1] + m1[2][1] * m2[1][2],
+                       m1[0][2] * m2[1][0] + m1[1][2] * m2[1][1] + m1[2][2] * m2[1][2],
+                       m1[0][3] * m2[1][0] + m1[1][3] * m2[1][1] + m1[2][3] * m2[1][2]);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat3x4<T, P> operator*(tmat3x4<T, P> const & m1, tmat3x3<T, P> const & m2)
+       {
+               return tmat3x4<T, P>(
+                       m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2],
+                       m1[0][1] * m2[0][0] + m1[1][1] * m2[0][1] + m1[2][1] * m2[0][2],
+                       m1[0][2] * m2[0][0] + m1[1][2] * m2[0][1] + m1[2][2] * m2[0][2],
+                       m1[0][3] * m2[0][0] + m1[1][3] * m2[0][1] + m1[2][3] * m2[0][2],
+                       m1[0][0] * m2[1][0] + m1[1][0] * m2[1][1] + m1[2][0] * m2[1][2],
+                       m1[0][1] * m2[1][0] + m1[1][1] * m2[1][1] + m1[2][1] * m2[1][2],
+                       m1[0][2] * m2[1][0] + m1[1][2] * m2[1][1] + m1[2][2] * m2[1][2],
+                       m1[0][3] * m2[1][0] + m1[1][3] * m2[1][1] + m1[2][3] * m2[1][2],
+                       m1[0][0] * m2[2][0] + m1[1][0] * m2[2][1] + m1[2][0] * m2[2][2],
+                       m1[0][1] * m2[2][0] + m1[1][1] * m2[2][1] + m1[2][1] * m2[2][2],
+                       m1[0][2] * m2[2][0] + m1[1][2] * m2[2][1] + m1[2][2] * m2[2][2],
+                       m1[0][3] * m2[2][0] + m1[1][3] * m2[2][1] + m1[2][3] * m2[2][2]);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat3x4<T, P> operator/(tmat3x4<T, P> const & m,     T const & s)
+       {
+               return tmat3x4<T, P>(
+                       m[0] / s,
+                       m[1] / s,
+                       m[2] / s);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat3x4<T, P> operator/(T const & s, tmat3x4<T, P> const & m)
+       {
+               return tmat3x4<T, P>(
+                       s / m[0],
+                       s / m[1],
+                       s / m[2]);
+       }
+
+       // Unary constant operators
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat3x4<T, P> const operator-(tmat3x4<T, P> const & m)
+       {
+               return tmat3x4<T, P>(
+                       -m[0],
+                       -m[1],
+                       -m[2]);
+       }
+
+       //////////////////////////////////////
+       // Boolean operators
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER bool operator==(tmat3x4<T, P> const & m1, tmat3x4<T, P> const & m2)
+       {
+               return (m1[0] == m2[0]) && (m1[1] == m2[1]) && (m1[2] == m2[2]);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER bool operator!=(tmat3x4<T, P> const & m1, tmat3x4<T, P> const & m2)
+       {
+               return (m1[0] != m2[0]) || (m1[1] != m2[1]) || (m1[2] != m2[2]);
+       }
+} //namespace glm
diff --git a/include/glm/detail/type_mat4x2.hpp b/include/glm/detail/type_mat4x2.hpp
new file mode 100644 (file)
index 0000000..d529ecb
--- /dev/null
@@ -0,0 +1,212 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref core
+/// @file glm/detail/type_mat4x2.hpp
+/// @date 2006-10-01 / 2011-06-15
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////
+
+#pragma once
+
+#include "../fwd.hpp"
+#include "type_vec2.hpp"
+#include "type_vec4.hpp"
+#include "type_mat.hpp"
+#include <limits>
+#include <cstddef>
+
+namespace glm
+{
+       template <typename T, precision P = defaultp>
+       struct tmat4x2
+       {
+               typedef tvec2<T, P> col_type;
+               typedef tvec4<T, P> row_type;
+               typedef tmat4x2<T, P> type;
+               typedef tmat2x4<T, P> transpose_type;
+               typedef T value_type;
+
+       private:
+               /// @cond DETAIL
+               col_type value[4];
+               /// @endcond
+
+       public:
+               // Constructors
+               GLM_FUNC_DECL tmat4x2();
+               GLM_FUNC_DECL tmat4x2(tmat4x2<T, P> const & m);
+               template <precision Q>
+               GLM_FUNC_DECL tmat4x2(tmat4x2<T, Q> const & m);
+
+               GLM_FUNC_DECL explicit tmat4x2(ctor);
+               GLM_FUNC_DECL explicit tmat4x2(T const & x);
+               GLM_FUNC_DECL tmat4x2(
+                       T const & x0, T const & y0,
+                       T const & x1, T const & y1,
+                       T const & x2, T const & y2,
+                       T const & x3, T const & y3);
+               GLM_FUNC_DECL tmat4x2(
+                       col_type const & v0, 
+                       col_type const & v1,
+                       col_type const & v2,
+                       col_type const & v3);
+
+               //////////////////////////////////////
+               // Conversions
+
+               template <
+                       typename X1, typename Y1,
+                       typename X2, typename Y2,
+                       typename X3, typename Y3,
+                       typename X4, typename Y4>
+               GLM_FUNC_DECL tmat4x2(
+                       X1 const & x1, Y1 const & y1,
+                       X2 const & x2, Y2 const & y2,
+                       X3 const & x3, Y3 const & y3,
+                       X4 const & x4, Y4 const & y4);
+
+               template <typename V1, typename V2, typename V3, typename V4>
+               GLM_FUNC_DECL tmat4x2(
+                       tvec2<V1, P> const & v1,
+                       tvec2<V2, P> const & v2,
+                       tvec2<V3, P> const & v3,
+                       tvec2<V4, P> const & v4);
+
+               //////////////////////////////////////
+               // Matrix conversions
+
+#              ifdef GLM_FORCE_EXPLICIT_CTOR
+                       template <typename U, precision Q>
+                       GLM_FUNC_DECL explicit tmat4x2(tmat4x2<U, Q> const & m);
+#              else
+                       template <typename U, precision Q>
+                       GLM_FUNC_DECL tmat4x2(tmat4x2<U, Q> const & m);
+#              endif
+
+               GLM_FUNC_DECL explicit tmat4x2(tmat2x2<T, P> const & x);
+               GLM_FUNC_DECL explicit tmat4x2(tmat3x3<T, P> const & x);
+               GLM_FUNC_DECL explicit tmat4x2(tmat4x4<T, P> const & x);
+               GLM_FUNC_DECL explicit tmat4x2(tmat2x3<T, P> const & x);
+               GLM_FUNC_DECL explicit tmat4x2(tmat3x2<T, P> const & x);
+               GLM_FUNC_DECL explicit tmat4x2(tmat2x4<T, P> const & x);
+               GLM_FUNC_DECL explicit tmat4x2(tmat4x3<T, P> const & x);
+               GLM_FUNC_DECL explicit tmat4x2(tmat3x4<T, P> const & x);
+
+               //////////////////////////////////////
+               // Accesses
+
+#              ifdef GLM_FORCE_SIZE_FUNC
+                       typedef size_t size_type;
+                       GLM_FUNC_DECL GLM_CONSTEXPR size_t size() const;
+
+                       GLM_FUNC_DECL col_type & operator[](size_type i);
+                       GLM_FUNC_DECL col_type const & operator[](size_type i) const;
+#              else
+                       typedef length_t length_type;
+                       GLM_FUNC_DECL GLM_CONSTEXPR length_type length() const;
+
+                       GLM_FUNC_DECL col_type & operator[](length_type i);
+                       GLM_FUNC_DECL col_type const & operator[](length_type i) const;
+#              endif//GLM_FORCE_SIZE_FUNC
+
+               //////////////////////////////////////
+               // Unary arithmetic operators
+
+               GLM_FUNC_DECL tmat4x2<T, P> & operator=(tmat4x2<T, P> const & m);
+
+               template <typename U> 
+               GLM_FUNC_DECL tmat4x2<T, P> & operator=(tmat4x2<U, P> const & m);
+               template <typename U> 
+               GLM_FUNC_DECL tmat4x2<T, P> & operator+=(U s);
+               template <typename U> 
+               GLM_FUNC_DECL tmat4x2<T, P> & operator+=(tmat4x2<U, P> const & m);
+               template <typename U> 
+               GLM_FUNC_DECL tmat4x2<T, P> & operator-=(U s);
+               template <typename U> 
+               GLM_FUNC_DECL tmat4x2<T, P> & operator-=(tmat4x2<U, P> const & m);
+               template <typename U> 
+               GLM_FUNC_DECL tmat4x2<T, P> & operator*=(U s);
+               template <typename U> 
+               GLM_FUNC_DECL tmat4x2<T, P> & operator/=(U s);
+
+               //////////////////////////////////////
+               // Increment and decrement operators
+
+               GLM_FUNC_DECL tmat4x2<T, P> & operator++ ();
+               GLM_FUNC_DECL tmat4x2<T, P> & operator-- ();
+               GLM_FUNC_DECL tmat4x2<T, P> operator++(int);
+               GLM_FUNC_DECL tmat4x2<T, P> operator--(int);
+       };
+
+       // Binary operators
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat4x2<T, P> operator+(tmat4x2<T, P> const & m, T const & s);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat4x2<T, P> operator+(tmat4x2<T, P> const & m1, tmat4x2<T, P> const & m2);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat4x2<T, P> operator-(tmat4x2<T, P> const & m, T const & s);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat4x2<T, P> operator-(tmat4x2<T, P> const & m1, tmat4x2<T, P> const & m2);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat4x2<T, P> operator*(tmat4x2<T, P> const & m, T const & s);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat4x2<T, P> operator*(T const & s, tmat4x2<T, P> const & m);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL typename tmat4x2<T, P>::col_type operator*(tmat4x2<T, P> const & m, typename tmat4x2<T, P>::row_type const & v);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL typename tmat4x2<T, P>::row_type operator*(typename tmat4x2<T, P>::col_type const & v, tmat4x2<T, P> const & m);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat3x2<T, P> operator*(tmat4x2<T, P> const & m1, tmat3x4<T, P> const & m2);
+               
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat4x2<T, P> operator*(tmat4x2<T, P> const & m1, tmat4x4<T, P> const & m2);
+               
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat2x3<T, P> operator*(tmat4x3<T, P> const & m1, tmat2x4<T, P> const & m2);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat4x2<T, P> operator/(tmat4x2<T, P> const & m, T const & s);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat4x2<T, P> operator/(T const & s, tmat4x2<T, P> const & m);
+
+       // Unary constant operators
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat4x2<T, P> const operator-(tmat4x2<T, P> const & m);
+}//namespace glm
+
+#ifndef GLM_EXTERNAL_TEMPLATE
+#include "type_mat4x2.inl"
+#endif
diff --git a/include/glm/detail/type_mat4x2.inl b/include/glm/detail/type_mat4x2.inl
new file mode 100644 (file)
index 0000000..dac9ff0
--- /dev/null
@@ -0,0 +1,587 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref core
+/// @file glm/detail/type_mat4x2.inl
+/// @date 2006-10-01 / 2011-06-15
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////
+
+namespace glm
+{
+       //////////////////////////////////////////////////////////////
+       // Constructors
+
+       template <typename T, precision P> 
+       GLM_FUNC_QUALIFIER tmat4x2<T, P>::tmat4x2()
+       {
+#              ifndef GLM_FORCE_NO_CTOR_INIT 
+                       this->value[0] = col_type(1, 0);
+                       this->value[1] = col_type(0, 1);
+                       this->value[2] = col_type(0, 0);
+                       this->value[3] = col_type(0, 0);
+#              endif
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat4x2<T, P>::tmat4x2(tmat4x2<T, P> const & m)
+       {
+               this->value[0] = m.value[0];
+               this->value[1] = m.value[1];
+               this->value[2] = m.value[2];
+               this->value[3] = m.value[3];
+       }
+
+       template <typename T, precision P>
+       template <precision Q>
+       GLM_FUNC_QUALIFIER tmat4x2<T, P>::tmat4x2(tmat4x2<T, Q> const & m)
+       {
+               this->value[0] = m.value[0];
+               this->value[1] = m.value[1];
+               this->value[2] = m.value[2];
+               this->value[3] = m.value[3];
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat4x2<T, P>::tmat4x2(ctor)
+       {}
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat4x2<T, P>::tmat4x2(T const & s)
+       {
+               value_type const Zero(0);
+               this->value[0] = col_type(s, Zero);
+               this->value[1] = col_type(Zero, s);
+               this->value[2] = col_type(Zero, Zero);
+               this->value[3] = col_type(Zero, Zero);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat4x2<T, P>::tmat4x2
+       (
+               T const & x0, T const & y0,
+               T const & x1, T const & y1,
+               T const & x2, T const & y2,
+               T const & x3, T const & y3
+       )
+       {
+               this->value[0] = col_type(x0, y0);
+               this->value[1] = col_type(x1, y1);
+               this->value[2] = col_type(x2, y2);
+               this->value[3] = col_type(x3, y3);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat4x2<T, P>::tmat4x2
+       (
+               col_type const & v0,
+               col_type const & v1,
+               col_type const & v2,
+               col_type const & v3
+       )
+       {
+               this->value[0] = v0;
+               this->value[1] = v1;
+               this->value[2] = v2;
+               this->value[3] = v3;
+       }
+
+       //////////////////////////////////////
+       // Conversion constructors
+
+       template <typename T, precision P>
+       template <
+               typename X1, typename Y1,
+               typename X2, typename Y2,
+               typename X3, typename Y3,
+               typename X4, typename Y4>
+       GLM_FUNC_QUALIFIER tmat4x2<T, P>::tmat4x2
+       (
+               X1 const & x1, Y1 const & y1,
+               X2 const & x2, Y2 const & y2,
+               X3 const & x3, Y3 const & y3,
+               X4 const & x4, Y4 const & y4
+       )
+       {
+               this->value[0] = col_type(static_cast<T>(x1), value_type(y1));
+               this->value[1] = col_type(static_cast<T>(x2), value_type(y2));
+               this->value[2] = col_type(static_cast<T>(x3), value_type(y3));
+               this->value[3] = col_type(static_cast<T>(x4), value_type(y4));
+       }
+       
+       template <typename T, precision P>
+       template <typename V1, typename V2, typename V3, typename V4>
+       GLM_FUNC_QUALIFIER tmat4x2<T, P>::tmat4x2
+       (
+               tvec2<V1, P> const & v1,
+               tvec2<V2, P> const & v2,
+               tvec2<V3, P> const & v3,
+               tvec2<V4, P> const & v4
+       )
+       {
+               this->value[0] = col_type(v1);
+               this->value[1] = col_type(v2);
+               this->value[2] = col_type(v3);
+               this->value[3] = col_type(v4);
+       }
+
+       //////////////////////////////////////
+       // Conversion
+       template <typename T, precision P>
+       template <typename U, precision Q>
+       GLM_FUNC_QUALIFIER tmat4x2<T, P>::tmat4x2(tmat4x2<U, Q> const & m)
+       {
+               this->value[0] = col_type(m[0]);
+               this->value[1] = col_type(m[1]);
+               this->value[2] = col_type(m[2]);
+               this->value[3] = col_type(m[3]);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat4x2<T, P>::tmat4x2(tmat2x2<T, P> const & m)
+       {
+               this->value[0] = col_type(m[0]);
+               this->value[1] = col_type(m[1]);
+               this->value[2] = col_type(0);
+               this->value[3] = col_type(0);
+       }
+
+       template <typename T, precision P> 
+       GLM_FUNC_QUALIFIER tmat4x2<T, P>::tmat4x2(tmat3x3<T, P> const & m)
+       {
+               this->value[0] = col_type(m[0]);
+               this->value[1] = col_type(m[1]);
+               this->value[2] = col_type(m[2]);
+               this->value[3] = col_type(0);
+       }
+
+       template <typename T, precision P> 
+       GLM_FUNC_QUALIFIER tmat4x2<T, P>::tmat4x2(tmat4x4<T, P> const & m)
+       {
+               this->value[0] = col_type(m[0]);
+               this->value[1] = col_type(m[1]);
+               this->value[2] = col_type(m[2]);
+               this->value[3] = col_type(m[3]);
+       }
+
+       template <typename T, precision P> 
+       GLM_FUNC_QUALIFIER tmat4x2<T, P>::tmat4x2(tmat2x3<T, P> const & m)
+       {
+               this->value[0] = col_type(m[0]);
+               this->value[1] = col_type(m[1]);
+               this->value[2] = col_type(0);
+               this->value[3] = col_type(0);
+       }
+
+       template <typename T, precision P> 
+       GLM_FUNC_QUALIFIER tmat4x2<T, P>::tmat4x2(tmat3x2<T, P> const & m)
+       {
+               this->value[0] = col_type(m[0]);
+               this->value[1] = col_type(m[1]);
+               this->value[2] = col_type(m[2]);
+               this->value[3] = col_type(0);
+       }
+
+       template <typename T, precision P> 
+       GLM_FUNC_QUALIFIER tmat4x2<T, P>::tmat4x2(tmat2x4<T, P> const & m)
+       {
+               this->value[0] = col_type(m[0]);
+               this->value[1] = col_type(m[1]);
+               this->value[2] = col_type(0);
+               this->value[3] = col_type(0);
+       }
+
+       template <typename T, precision P> 
+       GLM_FUNC_QUALIFIER tmat4x2<T, P>::tmat4x2(tmat4x3<T, P> const & m)
+       {
+               this->value[0] = col_type(m[0]);
+               this->value[1] = col_type(m[1]);
+               this->value[2] = col_type(m[2]);
+               this->value[3] = col_type(m[3]);
+       }
+
+       template <typename T, precision P> 
+       GLM_FUNC_QUALIFIER tmat4x2<T, P>::tmat4x2(tmat3x4<T, P> const & m)
+       {
+               this->value[0] = col_type(m[0]);
+               this->value[1] = col_type(m[1]);
+               this->value[2] = col_type(m[2]);
+               this->value[3] = col_type(0);
+       }
+
+       //////////////////////////////////////
+       // Accesses
+
+#      ifdef GLM_FORCE_SIZE_FUNC
+               template <typename T, precision P>
+               GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tmat4x2<T, P>::size_type tmat4x2<T, P>::size() const
+               {
+                       return 4;
+               }
+
+               template <typename T, precision P>
+               GLM_FUNC_QUALIFIER typename tmat4x2<T, P>::col_type & tmat4x2<T, P>::operator[](typename tmat4x2<T, P>::size_type i)
+               {
+                       assert(i < this->size());
+                       return this->value[i];
+               }
+
+               template <typename T, precision P>
+               GLM_FUNC_QUALIFIER typename tmat4x2<T, P>::col_type const & tmat4x2<T, P>::operator[](typename tmat4x2<T, P>::size_type i) const
+               {
+                       assert(i < this->size());
+                       return this->value[i];
+               }
+#      else
+               template <typename T, precision P>
+               GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tmat4x2<T, P>::length_type tmat4x2<T, P>::length() const
+               {
+                       return 4;
+               }
+
+               template <typename T, precision P>
+               GLM_FUNC_QUALIFIER typename tmat4x2<T, P>::col_type & tmat4x2<T, P>::operator[](typename tmat4x2<T, P>::length_type i)
+               {
+                       assert(i < this->length());
+                       return this->value[i];
+               }
+
+               template <typename T, precision P>
+               GLM_FUNC_QUALIFIER typename tmat4x2<T, P>::col_type const & tmat4x2<T, P>::operator[](typename tmat4x2<T, P>::length_type i) const
+               {
+                       assert(i < this->length());
+                       return this->value[i];
+               }
+#      endif//GLM_FORCE_SIZE_FUNC
+
+       //////////////////////////////////////////////////////////////
+       // Unary updatable operators
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat4x2<T, P>& tmat4x2<T, P>::operator=(tmat4x2<T, P> const & m)
+       {
+               this->value[0] = m[0];
+               this->value[1] = m[1];
+               this->value[2] = m[2];
+               this->value[3] = m[3];
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U>
+       GLM_FUNC_QUALIFIER tmat4x2<T, P>& tmat4x2<T, P>::operator=(tmat4x2<U, P> const & m)
+       {
+               this->value[0] = m[0];
+               this->value[1] = m[1];
+               this->value[2] = m[2];
+               this->value[3] = m[3];
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U>
+       GLM_FUNC_QUALIFIER tmat4x2<T, P> & tmat4x2<T, P>::operator+=(U s)
+       {
+               this->value[0] += s;
+               this->value[1] += s;
+               this->value[2] += s;
+               this->value[3] += s;
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U>
+       GLM_FUNC_QUALIFIER tmat4x2<T, P> & tmat4x2<T, P>::operator+=(tmat4x2<U, P> const & m)
+       {
+               this->value[0] += m[0];
+               this->value[1] += m[1];
+               this->value[2] += m[2];
+               this->value[3] += m[3];
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U>
+       GLM_FUNC_QUALIFIER tmat4x2<T, P> & tmat4x2<T, P>::operator-=(U s)
+       {
+               this->value[0] -= s;
+               this->value[1] -= s;
+               this->value[2] -= s;
+               this->value[3] -= s;
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U>
+       GLM_FUNC_QUALIFIER tmat4x2<T, P> & tmat4x2<T, P>::operator-=(tmat4x2<U, P> const & m)
+       {
+               this->value[0] -= m[0];
+               this->value[1] -= m[1];
+               this->value[2] -= m[2];
+               this->value[3] -= m[3];
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U>
+       GLM_FUNC_QUALIFIER tmat4x2<T, P> & tmat4x2<T, P>::operator*=(U s)
+       {
+               this->value[0] *= s;
+               this->value[1] *= s;
+               this->value[2] *= s;
+               this->value[3] *= s;
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U>
+       GLM_FUNC_QUALIFIER tmat4x2<T, P> & tmat4x2<T, P>::operator/=(U s)
+       {
+               this->value[0] /= s;
+               this->value[1] /= s;
+               this->value[2] /= s;
+               this->value[3] /= s;
+               return *this;
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat4x2<T, P> & tmat4x2<T, P>::operator++()
+       {
+               ++this->value[0];
+               ++this->value[1];
+               ++this->value[2];
+               ++this->value[3];
+               return *this;
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat4x2<T, P> & tmat4x2<T, P>::operator--()
+       {
+               --this->value[0];
+               --this->value[1];
+               --this->value[2];
+               --this->value[3];
+               return *this;
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat4x2<T, P> tmat4x2<T, P>::operator++(int)
+       {
+               tmat4x2<T, P> Result(*this);
+               ++*this;
+               return Result;
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat4x2<T, P> tmat4x2<T, P>::operator--(int)
+       {
+               tmat4x2<T, P> Result(*this);
+               --*this;
+               return Result;
+       }
+
+       //////////////////////////////////////////////////////////////
+       // Binary operators
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat4x2<T, P> operator+(tmat4x2<T, P> const & m, T const & s)
+       {
+               return tmat4x2<T, P>(
+                       m[0] + s,
+                       m[1] + s,
+                       m[2] + s,
+                       m[3] + s);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat4x2<T, P> operator+(tmat4x2<T, P> const & m1, tmat4x2<T, P> const & m2)
+       {
+               return tmat4x2<T, P>(
+                       m1[0] + m2[0],
+                       m1[1] + m2[1],
+                       m1[2] + m2[2],
+                       m1[3] + m2[3]);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat4x2<T, P> operator-(tmat4x2<T, P> const & m, T const & s)
+       {
+               return tmat4x2<T, P>(
+                       m[0] - s,
+                       m[1] - s,
+                       m[2] - s,
+                       m[3] - s);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat4x2<T, P> operator-(tmat4x2<T, P> const & m1, tmat4x2<T, P> const & m2)
+       {
+               return tmat4x2<T, P>(
+                       m1[0] - m2[0],
+                       m1[1] - m2[1],
+                       m1[2] - m2[2],
+                       m1[3] - m2[3]);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat4x2<T, P> operator*(tmat4x2<T, P> const & m, T const & s)
+       {
+               return tmat4x2<T, P>(
+                       m[0] * s,
+                       m[1] * s,
+                       m[2] * s,
+                       m[3] * s);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat4x2<T, P> operator*(T const & s, tmat4x2<T, P> const & m)
+       {
+               return tmat4x2<T, P>(
+                       m[0] * s,
+                       m[1] * s,
+                       m[2] * s,
+                       m[3] * s);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER typename tmat4x2<T, P>::col_type operator*(tmat4x2<T, P> const & m, typename tmat4x2<T, P>::row_type const & v)
+       {
+               return typename tmat4x2<T, P>::col_type(
+                       m[0][0] * v.x + m[1][0] * v.y + m[2][0] * v.z + m[3][0] * v.w,
+                       m[0][1] * v.x + m[1][1] * v.y + m[2][1] * v.z + m[3][1] * v.w);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER typename tmat4x2<T, P>::row_type operator*(typename tmat4x2<T, P>::col_type const & v, tmat4x2<T, P> const & m)
+       {
+               return typename tmat4x2<T, P>::row_type(
+                       v.x * m[0][0] + v.y * m[0][1],
+                       v.x * m[1][0] + v.y * m[1][1],
+                       v.x * m[2][0] + v.y * m[2][1],
+                       v.x * m[3][0] + v.y * m[3][1]);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat2x2<T, P> operator*(tmat4x2<T, P> const & m1, tmat2x4<T, P> const & m2)
+       {
+               T const SrcA00 = m1[0][0];
+               T const SrcA01 = m1[0][1];
+               T const SrcA10 = m1[1][0];
+               T const SrcA11 = m1[1][1];
+               T const SrcA20 = m1[2][0];
+               T const SrcA21 = m1[2][1];
+               T const SrcA30 = m1[3][0];
+               T const SrcA31 = m1[3][1];
+
+               T const SrcB00 = m2[0][0];
+               T const SrcB01 = m2[0][1];
+               T const SrcB02 = m2[0][2];
+               T const SrcB03 = m2[0][3];
+               T const SrcB10 = m2[1][0];
+               T const SrcB11 = m2[1][1];
+               T const SrcB12 = m2[1][2];
+               T const SrcB13 = m2[1][3];
+
+               tmat2x2<T, P> Result(uninitialize);
+               Result[0][0] = SrcA00 * SrcB00 + SrcA10 * SrcB01 + SrcA20 * SrcB02 + SrcA30 * SrcB03;
+               Result[0][1] = SrcA01 * SrcB00 + SrcA11 * SrcB01 + SrcA21 * SrcB02 + SrcA31 * SrcB03;
+               Result[1][0] = SrcA00 * SrcB10 + SrcA10 * SrcB11 + SrcA20 * SrcB12 + SrcA30 * SrcB13;
+               Result[1][1] = SrcA01 * SrcB10 + SrcA11 * SrcB11 + SrcA21 * SrcB12 + SrcA31 * SrcB13;
+               return Result;
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat3x2<T, P> operator*(tmat4x2<T, P> const & m1, tmat3x4<T, P> const & m2)
+       {
+               return tmat3x2<T, P>(
+                       m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2] + m1[3][0] * m2[0][3],
+                       m1[0][1] * m2[0][0] + m1[1][1] * m2[0][1] + m1[2][1] * m2[0][2] + m1[3][1] * m2[0][3],
+                       m1[0][0] * m2[1][0] + m1[1][0] * m2[1][1] + m1[2][0] * m2[1][2] + m1[3][0] * m2[1][3],
+                       m1[0][1] * m2[1][0] + m1[1][1] * m2[1][1] + m1[2][1] * m2[1][2] + m1[3][1] * m2[1][3],
+                       m1[0][0] * m2[2][0] + m1[1][0] * m2[2][1] + m1[2][0] * m2[2][2] + m1[3][0] * m2[2][3],
+                       m1[0][1] * m2[2][0] + m1[1][1] * m2[2][1] + m1[2][1] * m2[2][2] + m1[3][1] * m2[2][3]);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat4x2<T, P> operator*(tmat4x2<T, P> const & m1, tmat4x4<T, P> const & m2)
+       {
+               return tmat4x2<T, P>(
+                       m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2] + m1[3][0] * m2[0][3],
+                       m1[0][1] * m2[0][0] + m1[1][1] * m2[0][1] + m1[2][1] * m2[0][2] + m1[3][1] * m2[0][3],
+                       m1[0][0] * m2[1][0] + m1[1][0] * m2[1][1] + m1[2][0] * m2[1][2] + m1[3][0] * m2[1][3],
+                       m1[0][1] * m2[1][0] + m1[1][1] * m2[1][1] + m1[2][1] * m2[1][2] + m1[3][1] * m2[1][3],
+                       m1[0][0] * m2[2][0] + m1[1][0] * m2[2][1] + m1[2][0] * m2[2][2] + m1[3][0] * m2[2][3],
+                       m1[0][1] * m2[2][0] + m1[1][1] * m2[2][1] + m1[2][1] * m2[2][2] + m1[3][1] * m2[2][3],
+                       m1[0][0] * m2[3][0] + m1[1][0] * m2[3][1] + m1[2][0] * m2[3][2] + m1[3][0] * m2[3][3],
+                       m1[0][1] * m2[3][0] + m1[1][1] * m2[3][1] + m1[2][1] * m2[3][2] + m1[3][1] * m2[3][3]);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat4x2<T, P> operator/(tmat4x2<T, P> const & m, T const & s)
+       {
+               return tmat4x2<T, P>(
+                       m[0] / s,
+                       m[1] / s,
+                       m[2] / s,
+                       m[3] / s);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat4x2<T, P> operator/(T const & s, tmat4x2<T, P> const & m)
+       {
+               return tmat4x2<T, P>(
+                       s / m[0],
+                       s / m[1],
+                       s / m[2],
+                       s / m[3]);
+       }
+
+       // Unary constant operators
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat4x2<T, P> const operator-(tmat4x2<T, P> const & m)
+       {
+               return tmat4x2<T, P>(
+                       -m[0], 
+                       -m[1], 
+                       -m[2], 
+                       -m[3]);
+       }
+
+       //////////////////////////////////////
+       // Boolean operators
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER bool operator==(tmat4x2<T, P> const & m1, tmat4x2<T, P> const & m2)
+       {
+               return (m1[0] == m2[0]) && (m1[1] == m2[1]) && (m1[2] == m2[2]) && (m1[3] == m2[3]);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER bool operator!=(tmat4x2<T, P> const & m1, tmat4x2<T, P> const & m2)
+       {
+               return (m1[0] != m2[0]) || (m1[1] != m2[1]) || (m1[2] != m2[2]) || (m1[3] != m2[3]);
+       }
+} //namespace glm
diff --git a/include/glm/detail/type_mat4x3.hpp b/include/glm/detail/type_mat4x3.hpp
new file mode 100644 (file)
index 0000000..8bde1ac
--- /dev/null
@@ -0,0 +1,211 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref core
+/// @file glm/detail/type_mat4x3.hpp
+/// @date 2006-08-04 / 2011-06-15
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////
+
+#pragma once
+
+#include "../fwd.hpp"
+#include "type_vec3.hpp"
+#include "type_vec4.hpp"
+#include "type_mat.hpp"
+#include <limits>
+#include <cstddef>
+
+namespace glm
+{
+       template <typename T, precision P = defaultp>
+       struct tmat4x3
+       {
+               typedef tvec3<T, P> col_type;
+               typedef tvec4<T, P> row_type;
+               typedef tmat4x3<T, P> type;
+               typedef tmat3x4<T, P> transpose_type;
+               typedef T value_type;
+
+       private:
+               // Data 
+               col_type value[4];
+
+       public:
+               // Constructors
+               GLM_FUNC_DECL tmat4x3();
+               GLM_FUNC_DECL tmat4x3(tmat4x3<T, P> const & m);
+               template <precision Q>
+               GLM_FUNC_DECL tmat4x3(tmat4x3<T, Q> const & m);
+
+               GLM_FUNC_DECL explicit tmat4x3(ctor);
+               GLM_FUNC_DECL explicit tmat4x3(T const & x);
+               GLM_FUNC_DECL tmat4x3(
+                       T const & x0, T const & y0, T const & z0,
+                       T const & x1, T const & y1, T const & z1,
+                       T const & x2, T const & y2, T const & z2,
+                       T const & x3, T const & y3, T const & z3);
+               GLM_FUNC_DECL tmat4x3(
+                       col_type const & v0,
+                       col_type const & v1,
+                       col_type const & v2,
+                       col_type const & v3);
+
+               //////////////////////////////////////
+               // Conversions
+
+               template <
+                       typename X1, typename Y1, typename Z1,
+                       typename X2, typename Y2, typename Z2,
+                       typename X3, typename Y3, typename Z3,
+                       typename X4, typename Y4, typename Z4>
+               GLM_FUNC_DECL tmat4x3(
+                       X1 const & x1, Y1 const & y1, Z1 const & z1,
+                       X2 const & x2, Y2 const & y2, Z2 const & z2,
+                       X3 const & x3, Y3 const & y3, Z3 const & z3,
+                       X4 const & x4, Y4 const & y4, Z4 const & z4);
+                       
+               template <typename V1, typename V2, typename V3, typename V4>
+               GLM_FUNC_DECL tmat4x3(
+                       tvec3<V1, P> const & v1,
+                       tvec3<V2, P> const & v2,
+                       tvec3<V3, P> const & v3,
+                       tvec3<V4, P> const & v4);
+
+               //////////////////////////////////////
+               // Matrix conversions
+
+#              ifdef GLM_FORCE_EXPLICIT_CTOR
+                       template <typename U, precision Q>
+                       GLM_FUNC_DECL explicit tmat4x3(tmat4x3<U, Q> const & m);
+#              else
+                       template <typename U, precision Q>
+                       GLM_FUNC_DECL tmat4x3(tmat4x3<U, Q> const & m);
+#              endif
+
+               GLM_FUNC_DECL explicit tmat4x3(tmat2x2<T, P> const & x);
+               GLM_FUNC_DECL explicit tmat4x3(tmat3x3<T, P> const & x);
+               GLM_FUNC_DECL explicit tmat4x3(tmat4x4<T, P> const & x);
+               GLM_FUNC_DECL explicit tmat4x3(tmat2x3<T, P> const & x);
+               GLM_FUNC_DECL explicit tmat4x3(tmat3x2<T, P> const & x);
+               GLM_FUNC_DECL explicit tmat4x3(tmat2x4<T, P> const & x);
+               GLM_FUNC_DECL explicit tmat4x3(tmat4x2<T, P> const & x);
+               GLM_FUNC_DECL explicit tmat4x3(tmat3x4<T, P> const & x);
+
+               //////////////////////////////////////
+               // Accesses
+
+#              ifdef GLM_FORCE_SIZE_FUNC
+                       typedef size_t size_type;
+                       GLM_FUNC_DECL GLM_CONSTEXPR size_t size() const;
+
+                       GLM_FUNC_DECL col_type & operator[](size_type i);
+                       GLM_FUNC_DECL col_type const & operator[](size_type i) const;
+#              else
+                       typedef length_t length_type;
+                       GLM_FUNC_DECL GLM_CONSTEXPR length_type length() const;
+
+                       GLM_FUNC_DECL col_type & operator[](length_type i);
+                       GLM_FUNC_DECL col_type const & operator[](length_type i) const;
+#              endif//GLM_FORCE_SIZE_FUNC
+
+               //////////////////////////////////////
+               // Unary arithmetic operators
+
+               GLM_FUNC_DECL tmat4x3<T, P> & operator=(tmat4x3<T, P> const & m);
+
+               template <typename U>
+               GLM_FUNC_DECL tmat4x3<T, P> & operator=(tmat4x3<U, P> const & m);
+               template <typename U>
+               GLM_FUNC_DECL tmat4x3<T, P> & operator+=(U s);
+               template <typename U>
+               GLM_FUNC_DECL tmat4x3<T, P> & operator+=(tmat4x3<U, P> const & m);
+               template <typename U>
+               GLM_FUNC_DECL tmat4x3<T, P> & operator-=(U s);
+               template <typename U>
+               GLM_FUNC_DECL tmat4x3<T, P> & operator-=(tmat4x3<U, P> const & m);
+               template <typename U>
+               GLM_FUNC_DECL tmat4x3<T, P> & operator*=(U s);
+               template <typename U>
+               GLM_FUNC_DECL tmat4x3<T, P> & operator/=(U s);
+
+               //////////////////////////////////////
+               // Increment and decrement operators
+
+               GLM_FUNC_DECL tmat4x3<T, P> & operator++();
+               GLM_FUNC_DECL tmat4x3<T, P> & operator--();
+               GLM_FUNC_DECL tmat4x3<T, P> operator++(int);
+               GLM_FUNC_DECL tmat4x3<T, P> operator--(int);
+       };
+
+       // Binary operators
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat4x3<T, P> operator+(tmat4x3<T, P> const & m, T const & s);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat4x3<T, P> operator+(tmat4x3<T, P> const & m1, tmat4x3<T, P> const & m2);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat4x3<T, P> operator-(tmat4x3<T, P> const & m, T const & s);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat4x3<T, P> operator-(tmat4x3<T, P> const & m1, tmat4x3<T, P> const & m2);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat4x3<T, P> operator*(tmat4x3<T, P> const & m, T const & s);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat4x3<T, P> operator*(T const & s, tmat4x3<T, P> const & m);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL typename tmat4x3<T, P>::col_type operator*(tmat4x3<T, P> const & m, typename tmat4x3<T, P>::row_type const & v);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL typename tmat4x3<T, P>::row_type operator*(typename tmat4x3<T, P>::col_type const & v, tmat4x3<T, P> const & m);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat2x3<T, P> operator*(tmat4x3<T, P> const & m1, tmat2x4<T, P> const & m2);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat3x3<T, P> operator*(tmat4x3<T, P> const & m1, tmat3x4<T, P> const & m2);
+               
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat4x3<T, P> operator*(tmat4x3<T, P> const & m1, tmat4x4<T, P> const & m2);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat4x3<T, P> operator/(tmat4x3<T, P> const & m, T const & s);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat4x3<T, P> operator/(T const & s, tmat4x3<T, P> const & m);
+
+       // Unary constant operators
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat4x3<T, P> const operator-(tmat4x3<T, P> const & m);
+}//namespace glm
+
+#ifndef GLM_EXTERNAL_TEMPLATE
+#include "type_mat4x3.inl"
+#endif //GLM_EXTERNAL_TEMPLATE
diff --git a/include/glm/detail/type_mat4x3.inl b/include/glm/detail/type_mat4x3.inl
new file mode 100644 (file)
index 0000000..d5c62c8
--- /dev/null
@@ -0,0 +1,631 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref core
+/// @file glm/detail/type_mat4x3.inl
+/// @date 2006-04-17 / 2011-06-15
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////
+
+namespace glm
+{
+       //////////////////////////////////////////////////////////////
+       // Constructors
+
+       template <typename T, precision P> 
+       GLM_FUNC_QUALIFIER tmat4x3<T, P>::tmat4x3()
+       {
+#              ifndef GLM_FORCE_NO_CTOR_INIT 
+                       this->value[0] = col_type(1, 0, 0);
+                       this->value[1] = col_type(0, 1, 0);
+                       this->value[2] = col_type(0, 0, 1);
+                       this->value[3] = col_type(0, 0, 0);
+#              endif
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat4x3<T, P>::tmat4x3(tmat4x3<T, P> const & m)
+       {
+               this->value[0] = m.value[0];
+               this->value[1] = m.value[1];
+               this->value[2] = m.value[2];
+               this->value[3] = m.value[3];
+       }
+
+       template <typename T, precision P>
+       template <precision Q>
+       GLM_FUNC_QUALIFIER tmat4x3<T, P>::tmat4x3(tmat4x3<T, Q> const & m)
+       {
+               this->value[0] = m.value[0];
+               this->value[1] = m.value[1];
+               this->value[2] = m.value[2];
+               this->value[3] = m.value[3];
+       }
+
+       template <typename T, precision P> 
+       GLM_FUNC_QUALIFIER tmat4x3<T, P>::tmat4x3(ctor)
+       {}
+
+       template <typename T, precision P> 
+       GLM_FUNC_QUALIFIER tmat4x3<T, P>::tmat4x3(T const & s)
+       {
+               this->value[0] = col_type(s, 0, 0);
+               this->value[1] = col_type(0, s, 0);
+               this->value[2] = col_type(0, 0, s);
+               this->value[3] = col_type(0, 0, 0);
+       }
+
+       template <typename T, precision P> 
+       GLM_FUNC_QUALIFIER tmat4x3<T, P>::tmat4x3
+       (
+               T const & x0, T const & y0, T const & z0,
+               T const & x1, T const & y1, T const & z1,
+               T const & x2, T const & y2, T const & z2,
+               T const & x3, T const & y3, T const & z3
+       )
+       {
+               this->value[0] = col_type(x0, y0, z0);
+               this->value[1] = col_type(x1, y1, z1);
+               this->value[2] = col_type(x2, y2, z2);
+               this->value[3] = col_type(x3, y3, z3);
+       }
+
+       template <typename T, precision P> 
+       GLM_FUNC_QUALIFIER tmat4x3<T, P>::tmat4x3
+       (
+               col_type const & v0, 
+               col_type const & v1, 
+               col_type const & v2,
+               col_type const & v3
+       )
+       {
+               this->value[0] = v0;
+               this->value[1] = v1;
+               this->value[2] = v2;
+               this->value[3] = v3;
+       }
+
+       //////////////////////////////////////
+       // Conversion constructors
+
+       template <typename T, precision P> 
+       template <
+               typename X1, typename Y1, typename Z1,
+               typename X2, typename Y2, typename Z2,
+               typename X3, typename Y3, typename Z3,
+               typename X4, typename Y4, typename Z4>
+       GLM_FUNC_QUALIFIER tmat4x3<T, P>::tmat4x3
+       (
+               X1 const & x1, Y1 const & y1, Z1 const & z1,
+               X2 const & x2, Y2 const & y2, Z2 const & z2,
+               X3 const & x3, Y3 const & y3, Z3 const & z3,
+               X4 const & x4, Y4 const & y4, Z4 const & z4
+       )
+       {
+               this->value[0] = col_type(static_cast<T>(x1), value_type(y1), value_type(z1));
+               this->value[1] = col_type(static_cast<T>(x2), value_type(y2), value_type(z2));
+               this->value[2] = col_type(static_cast<T>(x3), value_type(y3), value_type(z3));
+               this->value[3] = col_type(static_cast<T>(x4), value_type(y4), value_type(z4));
+       }
+       
+       template <typename T, precision P>
+       template <typename V1, typename V2, typename V3, typename V4>
+       GLM_FUNC_QUALIFIER tmat4x3<T, P>::tmat4x3
+       (
+               tvec3<V1, P> const & v1,
+               tvec3<V2, P> const & v2,
+               tvec3<V3, P> const & v3,
+               tvec3<V4, P> const & v4
+       )
+       {
+               this->value[0] = col_type(v1);
+               this->value[1] = col_type(v2);
+               this->value[2] = col_type(v3);
+               this->value[3] = col_type(v4);
+       }
+
+       //////////////////////////////////////////////////////////////
+       // Matrix conversions
+
+       template <typename T, precision P>
+       template <typename U, precision Q>
+       GLM_FUNC_QUALIFIER tmat4x3<T, P>::tmat4x3(tmat4x3<U, Q> const & m)
+       {
+               this->value[0] = col_type(m[0]);
+               this->value[1] = col_type(m[1]);
+               this->value[2] = col_type(m[2]);
+               this->value[3] = col_type(m[3]);
+       }
+
+       template <typename T, precision P> 
+       GLM_FUNC_QUALIFIER tmat4x3<T, P>::tmat4x3(tmat2x2<T, P> const & m)
+       {
+               this->value[0] = col_type(m[0], 0);
+               this->value[1] = col_type(m[1], 0);
+               this->value[2] = col_type(m[2], 1);
+               this->value[3] = col_type(0);
+       }
+
+       template <typename T, precision P> 
+       GLM_FUNC_QUALIFIER tmat4x3<T, P>::tmat4x3(tmat3x3<T, P> const & m)
+       {
+               this->value[0] = col_type(m[0]);
+               this->value[1] = col_type(m[1]);
+               this->value[2] = col_type(m[2]);
+               this->value[3] = col_type(0);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat4x3<T, P>::tmat4x3(tmat4x4<T, P> const & m)
+       {
+               this->value[0] = col_type(m[0]);
+               this->value[1] = col_type(m[1]);
+               this->value[2] = col_type(m[2]);
+               this->value[3] = col_type(m[3]);
+       }
+
+       template <typename T, precision P> 
+       GLM_FUNC_QUALIFIER tmat4x3<T, P>::tmat4x3(tmat2x3<T, P> const & m)
+       {
+               this->value[0] = col_type(m[0]);
+               this->value[1] = col_type(m[1]);
+               this->value[2] = col_type(0, 0, 1);
+               this->value[3] = col_type(0);
+       }
+
+       template <typename T, precision P> 
+       GLM_FUNC_QUALIFIER tmat4x3<T, P>::tmat4x3(tmat3x2<T, P> const & m)
+       {
+               this->value[0] = col_type(m[0], 0);
+               this->value[1] = col_type(m[1], 0);
+               this->value[2] = col_type(m[2], 1);
+               this->value[3] = col_type(0);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat4x3<T, P>::tmat4x3(tmat2x4<T, P> const & m)
+       {
+               this->value[0] = col_type(m[0]);
+               this->value[1] = col_type(m[1]);
+               this->value[2] = col_type(0, 0, 1);
+               this->value[3] = col_type(0);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat4x3<T, P>::tmat4x3(tmat4x2<T, P> const & m)
+       {
+               this->value[0] = col_type(m[0], 0);
+               this->value[1] = col_type(m[1], 0);
+               this->value[2] = col_type(m[2], 1);
+               this->value[3] = col_type(m[3], 0);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat4x3<T, P>::tmat4x3(tmat3x4<T, P> const & m)
+       {
+               this->value[0] = col_type(m[0]);
+               this->value[1] = col_type(m[1]);
+               this->value[2] = col_type(m[2]);
+               this->value[3] = col_type(0);
+       }
+
+       //////////////////////////////////////
+       // Accesses
+
+#      ifdef GLM_FORCE_SIZE_FUNC
+               template <typename T, precision P>
+               GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tmat4x3<T, P>::size_type tmat4x3<T, P>::size() const
+               {
+                       return 4;
+               }
+
+               template <typename T, precision P>
+               GLM_FUNC_QUALIFIER typename tmat4x3<T, P>::col_type & tmat4x3<T, P>::operator[](typename tmat4x3<T, P>::size_type i)
+               {
+                       assert(i < this->size());
+                       return this->value[i];
+               }
+
+               template <typename T, precision P>
+               GLM_FUNC_QUALIFIER typename tmat4x3<T, P>::col_type const & tmat4x3<T, P>::operator[](typename tmat4x3<T, P>::size_type i) const
+               {
+                       assert(i < this->size());
+                       return this->value[i];
+               }
+#      else
+               template <typename T, precision P>
+               GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tmat4x3<T, P>::length_type tmat4x3<T, P>::length() const
+               {
+                       return 4;
+               }
+
+               template <typename T, precision P>
+               GLM_FUNC_QUALIFIER typename tmat4x3<T, P>::col_type & tmat4x3<T, P>::operator[](typename tmat4x3<T, P>::length_type i)
+               {
+                       assert(i < this->length());
+                       return this->value[i];
+               }
+
+               template <typename T, precision P>
+               GLM_FUNC_QUALIFIER typename tmat4x3<T, P>::col_type const & tmat4x3<T, P>::operator[](typename tmat4x3<T, P>::length_type i) const
+               {
+                       assert(i < this->length());
+                       return this->value[i];
+               }
+#      endif//GLM_FORCE_SIZE_FUNC
+
+       //////////////////////////////////////////////////////////////
+       // Unary updatable operators
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat4x3<T, P>& tmat4x3<T, P>::operator=(tmat4x3<T, P> const & m)
+       {
+               this->value[0] = m[0];
+               this->value[1] = m[1];
+               this->value[2] = m[2];
+               this->value[3] = m[3];
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U>
+       GLM_FUNC_QUALIFIER tmat4x3<T, P>& tmat4x3<T, P>::operator=(tmat4x3<U, P> const & m)
+       {
+               this->value[0] = m[0];
+               this->value[1] = m[1];
+               this->value[2] = m[2];
+               this->value[3] = m[3];
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U>
+       GLM_FUNC_QUALIFIER tmat4x3<T, P> & tmat4x3<T, P>::operator+=(U s)
+       {
+               this->value[0] += s;
+               this->value[1] += s;
+               this->value[2] += s;
+               this->value[3] += s;
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U>
+       GLM_FUNC_QUALIFIER tmat4x3<T, P> & tmat4x3<T, P>::operator+=(tmat4x3<U, P> const & m)
+       {
+               this->value[0] += m[0];
+               this->value[1] += m[1];
+               this->value[2] += m[2];
+               this->value[3] += m[3];
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U>
+       GLM_FUNC_QUALIFIER tmat4x3<T, P> & tmat4x3<T, P>::operator-=(U s)
+       {
+               this->value[0] -= s;
+               this->value[1] -= s;
+               this->value[2] -= s;
+               this->value[3] -= s;
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U>
+       GLM_FUNC_QUALIFIER tmat4x3<T, P> & tmat4x3<T, P>::operator-=(tmat4x3<U, P> const & m)
+       {
+               this->value[0] -= m[0];
+               this->value[1] -= m[1];
+               this->value[2] -= m[2];
+               this->value[3] -= m[3];
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U>
+       GLM_FUNC_QUALIFIER tmat4x3<T, P> & tmat4x3<T, P>::operator*=(U s)
+       {
+               this->value[0] *= s;
+               this->value[1] *= s;
+               this->value[2] *= s;
+               this->value[3] *= s;
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U>
+       GLM_FUNC_QUALIFIER tmat4x3<T, P> & tmat4x3<T, P>::operator/=(U s)
+       {
+               this->value[0] /= s;
+               this->value[1] /= s;
+               this->value[2] /= s;
+               this->value[3] /= s;
+               return *this;
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat4x3<T, P> & tmat4x3<T, P>::operator++()
+       {
+               ++this->value[0];
+               ++this->value[1];
+               ++this->value[2];
+               ++this->value[3];
+               return *this;
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat4x3<T, P> & tmat4x3<T, P>::operator--()
+       {
+               --this->value[0];
+               --this->value[1];
+               --this->value[2];
+               --this->value[3];
+               return *this;
+       }
+
+       //////////////////////////////////////////////////////////////
+       // Binary operators
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat4x3<T, P> operator+(tmat4x3<T, P> const & m, T const & s)
+       {
+               return tmat4x3<T, P>(
+                       m[0] + s,
+                       m[1] + s,
+                       m[2] + s,
+                       m[3] + s);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat4x3<T, P> operator+(tmat4x3<T, P> const & m1, tmat4x3<T, P> const & m2)
+       {
+               return tmat4x3<T, P>(
+                       m1[0] + m2[0],
+                       m1[1] + m2[1],
+                       m1[2] + m2[2],
+                       m1[3] + m2[3]);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat4x3<T, P> operator-(tmat4x3<T, P> const & m, T const & s)
+       {
+               return tmat4x3<T, P>(
+                       m[0] - s,
+                       m[1] - s,
+                       m[2] - s,
+                       m[3] - s);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat4x3<T, P> operator-(tmat4x3<T, P> const & m1, tmat4x3<T, P> const & m2)
+       {
+               return tmat4x3<T, P>(
+                       m1[0] - m2[0],
+                       m1[1] - m2[1],
+                       m1[2] - m2[2],
+                       m1[3] - m2[3]);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat4x3<T, P> operator*(tmat4x3<T, P> const & m, T const & s)
+       {
+               return tmat4x3<T, P>(
+                       m[0] * s,
+                       m[1] * s,
+                       m[2] * s,
+                       m[3] * s);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat4x3<T, P> operator*(T const & s, tmat4x3<T, P> const & m)
+       {
+               return tmat4x3<T, P>(
+                       m[0] * s,
+                       m[1] * s,
+                       m[2] * s,
+                       m[3] * s);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER typename tmat4x3<T, P>::col_type operator*
+       (
+               tmat4x3<T, P> const & m,
+               typename tmat4x3<T, P>::row_type const & v)
+       {
+               return typename tmat4x3<T, P>::col_type(
+                       m[0][0] * v.x + m[1][0] * v.y + m[2][0] * v.z + m[3][0] * v.w,
+                       m[0][1] * v.x + m[1][1] * v.y + m[2][1] * v.z + m[3][1] * v.w,
+                       m[0][2] * v.x + m[1][2] * v.y + m[2][2] * v.z + m[3][2] * v.w);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER typename tmat4x3<T, P>::row_type operator*
+       (
+               typename tmat4x3<T, P>::col_type const & v,
+               tmat4x3<T, P> const & m)
+       {
+               return typename tmat4x3<T, P>::row_type(
+                       v.x * m[0][0] + v.y * m[0][1] + v.z * m[0][2],
+                       v.x * m[1][0] + v.y * m[1][1] + v.z * m[1][2],
+                       v.x * m[2][0] + v.y * m[2][1] + v.z * m[2][2],
+                       v.x * m[3][0] + v.y * m[3][1] + v.z * m[3][2]);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat2x3<T, P> operator*(tmat4x3<T, P> const & m1, tmat2x4<T, P> const & m2)
+       {
+               return tmat2x3<T, P>(
+                       m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2] + m1[3][0] * m2[0][3],
+                       m1[0][1] * m2[0][0] + m1[1][1] * m2[0][1] + m1[2][1] * m2[0][2] + m1[3][1] * m2[0][3],
+                       m1[0][2] * m2[0][0] + m1[1][2] * m2[0][1] + m1[2][2] * m2[0][2] + m1[3][2] * m2[0][3],
+                       m1[0][0] * m2[1][0] + m1[1][0] * m2[1][1] + m1[2][0] * m2[1][2] + m1[3][0] * m2[1][3],
+                       m1[0][1] * m2[1][0] + m1[1][1] * m2[1][1] + m1[2][1] * m2[1][2] + m1[3][1] * m2[1][3],
+                       m1[0][2] * m2[1][0] + m1[1][2] * m2[1][1] + m1[2][2] * m2[1][2] + m1[3][2] * m2[1][3]);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat3x3<T, P> operator*(tmat4x3<T, P> const & m1, tmat3x4<T, P> const & m2)
+       {
+               T const SrcA00 = m1[0][0];
+               T const SrcA01 = m1[0][1];
+               T const SrcA02 = m1[0][2];
+               T const SrcA10 = m1[1][0];
+               T const SrcA11 = m1[1][1];
+               T const SrcA12 = m1[1][2];
+               T const SrcA20 = m1[2][0];
+               T const SrcA21 = m1[2][1];
+               T const SrcA22 = m1[2][2];
+               T const SrcA30 = m1[3][0];
+               T const SrcA31 = m1[3][1];
+               T const SrcA32 = m1[3][2];
+
+               T const SrcB00 = m2[0][0];
+               T const SrcB01 = m2[0][1];
+               T const SrcB02 = m2[0][2];
+               T const SrcB03 = m2[0][3];
+               T const SrcB10 = m2[1][0];
+               T const SrcB11 = m2[1][1];
+               T const SrcB12 = m2[1][2];
+               T const SrcB13 = m2[1][3];
+               T const SrcB20 = m2[2][0];
+               T const SrcB21 = m2[2][1];
+               T const SrcB22 = m2[2][2];
+               T const SrcB23 = m2[2][3];
+
+               tmat3x3<T, P> Result(uninitialize);
+               Result[0][0] = SrcA00 * SrcB00 + SrcA10 * SrcB01 + SrcA20 * SrcB02 + SrcA30 * SrcB03;
+               Result[0][1] = SrcA01 * SrcB00 + SrcA11 * SrcB01 + SrcA21 * SrcB02 + SrcA31 * SrcB03;
+               Result[0][2] = SrcA02 * SrcB00 + SrcA12 * SrcB01 + SrcA22 * SrcB02 + SrcA32 * SrcB03;
+               Result[1][0] = SrcA00 * SrcB10 + SrcA10 * SrcB11 + SrcA20 * SrcB12 + SrcA30 * SrcB13;
+               Result[1][1] = SrcA01 * SrcB10 + SrcA11 * SrcB11 + SrcA21 * SrcB12 + SrcA31 * SrcB13;
+               Result[1][2] = SrcA02 * SrcB10 + SrcA12 * SrcB11 + SrcA22 * SrcB12 + SrcA32 * SrcB13;
+               Result[2][0] = SrcA00 * SrcB20 + SrcA10 * SrcB21 + SrcA20 * SrcB22 + SrcA30 * SrcB23;
+               Result[2][1] = SrcA01 * SrcB20 + SrcA11 * SrcB21 + SrcA21 * SrcB22 + SrcA31 * SrcB23;
+               Result[2][2] = SrcA02 * SrcB20 + SrcA12 * SrcB21 + SrcA22 * SrcB22 + SrcA32 * SrcB23;
+               return Result;
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat4x3<T, P> operator*(tmat4x3<T, P> const & m1, tmat4x4<T, P> const & m2)
+       {
+               return tmat4x3<T, P>(
+                       m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2] + m1[3][0] * m2[0][3],
+                       m1[0][1] * m2[0][0] + m1[1][1] * m2[0][1] + m1[2][1] * m2[0][2] + m1[3][1] * m2[0][3],
+                       m1[0][2] * m2[0][0] + m1[1][2] * m2[0][1] + m1[2][2] * m2[0][2] + m1[3][2] * m2[0][3],
+                       m1[0][0] * m2[1][0] + m1[1][0] * m2[1][1] + m1[2][0] * m2[1][2] + m1[3][0] * m2[1][3],
+                       m1[0][1] * m2[1][0] + m1[1][1] * m2[1][1] + m1[2][1] * m2[1][2] + m1[3][1] * m2[1][3],
+                       m1[0][2] * m2[1][0] + m1[1][2] * m2[1][1] + m1[2][2] * m2[1][2] + m1[3][2] * m2[1][3],
+                       m1[0][0] * m2[2][0] + m1[1][0] * m2[2][1] + m1[2][0] * m2[2][2] + m1[3][0] * m2[2][3],
+                       m1[0][1] * m2[2][0] + m1[1][1] * m2[2][1] + m1[2][1] * m2[2][2] + m1[3][1] * m2[2][3],
+                       m1[0][2] * m2[2][0] + m1[1][2] * m2[2][1] + m1[2][2] * m2[2][2] + m1[3][2] * m2[2][3],
+                       m1[0][0] * m2[3][0] + m1[1][0] * m2[3][1] + m1[2][0] * m2[3][2] + m1[3][0] * m2[3][3],
+                       m1[0][1] * m2[3][0] + m1[1][1] * m2[3][1] + m1[2][1] * m2[3][2] + m1[3][1] * m2[3][3],
+                       m1[0][2] * m2[3][0] + m1[1][2] * m2[3][1] + m1[2][2] * m2[3][2] + m1[3][2] * m2[3][3]);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat4x3<T, P> operator/(tmat4x3<T, P> const & m, T const & s)
+       {
+               return tmat4x3<T, P>(
+                       m[0] / s,
+                       m[1] / s,
+                       m[2] / s,
+                       m[3] / s);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat4x3<T, P> operator/(T const & s, tmat4x3<T, P> const & m)
+       {
+               return tmat4x3<T, P>(
+                       s / m[0],
+                       s / m[1],
+                       s / m[2],
+                       s / m[3]);
+       }
+
+       // Unary constant operators
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat4x3<T, P> const operator-(tmat4x3<T, P> const & m)
+       {
+               return tmat4x3<T, P>(
+                       -m[0],
+                       -m[1],
+                       -m[2],
+                       -m[3]);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat4x3<T, P> const operator++(tmat4x3<T, P> const & m, int)
+       {
+               return tmat4x3<T, P>(
+                       m[0] + T(1),
+                       m[1] + T(1),
+                       m[2] + T(1),
+                       m[3] + T(1));
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat4x3<T, P> const operator--(tmat4x3<T, P> const & m, int)
+       {
+               return tmat4x3<T, P>(
+                       m[0] - T(1),
+                       m[1] - T(1),
+                       m[2] - T(1),
+                       m[3] - T(1));
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat4x3<T, P> tmat4x3<T, P>::operator++(int)
+       {
+               tmat4x3<T, P> Result(*this);
+               ++*this;
+               return Result;
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat4x3<T, P> tmat4x3<T, P>::operator--(int)
+       {
+               tmat4x3<T, P> Result(*this);
+               --*this;
+               return Result;
+       }
+
+       //////////////////////////////////////
+       // Boolean operators
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER bool operator==(tmat4x3<T, P> const & m1, tmat4x3<T, P> const & m2)
+       {
+               return (m1[0] == m2[0]) && (m1[1] == m2[1]) && (m1[2] == m2[2]) && (m1[3] == m2[3]);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER bool operator!=(tmat4x3<T, P> const & m1, tmat4x3<T, P> const & m2)
+       {
+               return (m1[0] != m2[0]) || (m1[1] != m2[1]) || (m1[2] != m2[2]) || (m1[3] != m2[3]);
+       }
+} //namespace glm
diff --git a/include/glm/detail/type_mat4x4.hpp b/include/glm/detail/type_mat4x4.hpp
new file mode 100644 (file)
index 0000000..dcb7269
--- /dev/null
@@ -0,0 +1,235 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref core
+/// @file glm/detail/type_mat4x4.hpp
+/// @date 2005-01-27 / 2011-06-15
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////
+
+#pragma once
+
+#include "../fwd.hpp"
+#include "type_vec4.hpp"
+#include "type_mat.hpp"
+#include <limits>
+#include <cstddef>
+
+namespace glm
+{
+       template <typename T, precision P = defaultp>
+       struct tmat4x4
+       {
+               typedef tvec4<T, P> col_type;
+               typedef tvec4<T, P> row_type;
+               typedef tmat4x4<T, P> type;
+               typedef tmat4x4<T, P> transpose_type;
+               typedef T value_type;
+
+               template <typename U, precision Q>
+               friend tvec4<U, Q> operator/(tmat4x4<U, Q> const & m, tvec4<U, Q> const & v);
+               template <typename U, precision Q>
+               friend tvec4<U, Q> operator/(tvec4<U, Q> const & v, tmat4x4<U, Q> const & m);
+
+       private:
+               /// @cond DETAIL
+               col_type value[4];
+               /// @endcond
+
+       public:
+               // Constructors
+               GLM_FUNC_DECL tmat4x4();
+               GLM_FUNC_DECL tmat4x4(tmat4x4<T, P> const & m);
+               template <precision Q>
+               GLM_FUNC_DECL tmat4x4(tmat4x4<T, Q> const & m);
+
+               GLM_FUNC_DECL explicit tmat4x4(ctor);
+               GLM_FUNC_DECL explicit tmat4x4(T const & x);
+               GLM_FUNC_DECL tmat4x4(
+                       T const & x0, T const & y0, T const & z0, T const & w0,
+                       T const & x1, T const & y1, T const & z1, T const & w1,
+                       T const & x2, T const & y2, T const & z2, T const & w2,
+                       T const & x3, T const & y3, T const & z3, T const & w3);
+               GLM_FUNC_DECL tmat4x4(
+                       col_type const & v0,
+                       col_type const & v1,
+                       col_type const & v2,
+                       col_type const & v3);
+
+               //////////////////////////////////////
+               // Conversions
+
+               template <
+                       typename X1, typename Y1, typename Z1, typename W1,
+                       typename X2, typename Y2, typename Z2, typename W2,
+                       typename X3, typename Y3, typename Z3, typename W3,
+                       typename X4, typename Y4, typename Z4, typename W4>
+               GLM_FUNC_DECL tmat4x4(
+                       X1 const & x1, Y1 const & y1, Z1 const & z1, W1 const & w1,
+                       X2 const & x2, Y2 const & y2, Z2 const & z2, W2 const & w2,
+                       X3 const & x3, Y3 const & y3, Z3 const & z3, W3 const & w3,
+                       X4 const & x4, Y4 const & y4, Z4 const & z4, W4 const & w4);
+
+               template <typename V1, typename V2, typename V3, typename V4>
+               GLM_FUNC_DECL tmat4x4(
+                       tvec4<V1, P> const & v1,
+                       tvec4<V2, P> const & v2,
+                       tvec4<V3, P> const & v3,
+                       tvec4<V4, P> const & v4);
+
+               //////////////////////////////////////
+               // Matrix conversions
+
+#              ifdef GLM_FORCE_EXPLICIT_CTOR
+                       template <typename U, precision Q>
+                       GLM_FUNC_DECL explicit tmat4x4(tmat4x4<U, Q> const & m);
+#              else
+                       template <typename U, precision Q>
+                       GLM_FUNC_DECL tmat4x4(tmat4x4<U, Q> const & m);
+#              endif
+
+               GLM_FUNC_DECL explicit tmat4x4(tmat2x2<T, P> const & x);
+               GLM_FUNC_DECL explicit tmat4x4(tmat3x3<T, P> const & x);
+               GLM_FUNC_DECL explicit tmat4x4(tmat2x3<T, P> const & x);
+               GLM_FUNC_DECL explicit tmat4x4(tmat3x2<T, P> const & x);
+               GLM_FUNC_DECL explicit tmat4x4(tmat2x4<T, P> const & x);
+               GLM_FUNC_DECL explicit tmat4x4(tmat4x2<T, P> const & x);
+               GLM_FUNC_DECL explicit tmat4x4(tmat3x4<T, P> const & x);
+               GLM_FUNC_DECL explicit tmat4x4(tmat4x3<T, P> const & x);
+
+               //////////////////////////////////////
+               // Accesses
+
+#              ifdef GLM_FORCE_SIZE_FUNC
+                       typedef size_t size_type;
+                       GLM_FUNC_DECL GLM_CONSTEXPR size_t size() const;
+
+                       GLM_FUNC_DECL col_type & operator[](size_type i);
+                       GLM_FUNC_DECL col_type const & operator[](size_type i) const;
+#              else
+                       typedef length_t length_type;
+                       GLM_FUNC_DECL GLM_CONSTEXPR length_type length() const;
+
+                       GLM_FUNC_DECL col_type & operator[](length_type i);
+                       GLM_FUNC_DECL col_type const & operator[](length_type i) const;
+#              endif//GLM_FORCE_SIZE_FUNC
+
+               //////////////////////////////////////
+               // Unary arithmetic operators
+
+               GLM_FUNC_DECL tmat4x4<T, P> & operator=(tmat4x4<T, P> const & m);
+
+               template <typename U>
+               GLM_FUNC_DECL tmat4x4<T, P> & operator=(tmat4x4<U, P> const & m);
+               template <typename U>
+               GLM_FUNC_DECL tmat4x4<T, P> & operator+=(U s);
+               template <typename U>
+               GLM_FUNC_DECL tmat4x4<T, P> & operator+=(tmat4x4<U, P> const & m);
+               template <typename U>
+               GLM_FUNC_DECL tmat4x4<T, P> & operator-=(U s);
+               template <typename U>
+               GLM_FUNC_DECL tmat4x4<T, P> & operator-=(tmat4x4<U, P> const & m);
+               template <typename U>
+               GLM_FUNC_DECL tmat4x4<T, P> & operator*=(U s);
+               template <typename U>
+               GLM_FUNC_DECL tmat4x4<T, P> & operator*=(tmat4x4<U, P> const & m);
+               template <typename U>
+               GLM_FUNC_DECL tmat4x4<T, P> & operator/=(U s);
+               template <typename U>
+               GLM_FUNC_DECL tmat4x4<T, P> & operator/=(tmat4x4<U, P> const & m);
+
+               //////////////////////////////////////
+               // Increment and decrement operators
+
+               GLM_FUNC_DECL tmat4x4<T, P> & operator++();
+               GLM_FUNC_DECL tmat4x4<T, P> & operator--();
+               GLM_FUNC_DECL tmat4x4<T, P> operator++(int);
+               GLM_FUNC_DECL tmat4x4<T, P> operator--(int);
+       };
+
+       // Binary operators
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat4x4<T, P> operator+(tmat4x4<T, P> const & m, T const & s);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat4x4<T, P> operator+(T const & s, tmat4x4<T, P> const & m);
+
+       template <typename T, precision P> 
+       GLM_FUNC_DECL tmat4x4<T, P> operator+(tmat4x4<T, P> const & m1, tmat4x4<T, P> const & m2);
+
+       template <typename T, precision P> 
+       GLM_FUNC_DECL tmat4x4<T, P> operator-(tmat4x4<T, P> const & m, T const & s);
+
+       template <typename T, precision P> 
+       GLM_FUNC_DECL tmat4x4<T, P> operator-(T const & s, tmat4x4<T, P> const & m);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat4x4<T, P> operator-(tmat4x4<T, P> const & m1, tmat4x4<T, P> const & m2);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat4x4<T, P> operator*(tmat4x4<T, P> const & m, T const & s);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat4x4<T, P> operator*(T const & s, tmat4x4<T, P> const & m);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL typename tmat4x4<T, P>::col_type operator*(tmat4x4<T, P> const & m, typename tmat4x4<T, P>::row_type const & v);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL typename tmat4x4<T, P>::row_type operator*(typename tmat4x4<T, P>::col_type const & v, tmat4x4<T, P> const & m);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat2x4<T, P> operator*(tmat4x4<T, P> const & m1, tmat2x4<T, P> const & m2);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat3x4<T, P> operator*(tmat4x4<T, P> const & m1, tmat3x4<T, P> const & m2);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat4x4<T, P> operator*(tmat4x4<T, P> const & m1, tmat4x4<T, P> const & m2);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat4x4<T, P> operator/(tmat4x4<T, P> const & m, T const & s);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat4x4<T, P> operator/(T const & s, tmat4x4<T, P> const & m);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL typename tmat4x4<T, P>::col_type operator/(tmat4x4<T, P> const & m, typename tmat4x4<T, P>::row_type const & v);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL typename tmat4x4<T, P>::row_type operator/(typename tmat4x4<T, P>::col_type & v, tmat4x4<T, P> const & m);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat4x4<T, P> operator/(tmat4x4<T, P> const & m1, tmat4x4<T, P> const & m2);
+
+       // Unary constant operators
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat4x4<T, P> const operator-(tmat4x4<T, P> const & m);
+}//namespace glm
+
+#ifndef GLM_EXTERNAL_TEMPLATE
+#include "type_mat4x4.inl"
+#endif//GLM_EXTERNAL_TEMPLATE
diff --git a/include/glm/detail/type_mat4x4.inl b/include/glm/detail/type_mat4x4.inl
new file mode 100644 (file)
index 0000000..103be5b
--- /dev/null
@@ -0,0 +1,790 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref core
+/// @file glm/detail/type_mat4x4.inl
+/// @date 2005-01-27 / 2011-06-15
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////
+
+namespace glm{
+namespace detail
+{
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat4x4<T, P> compute_inverse(tmat4x4<T, P> const & m)
+       {
+               T Coef00 = m[2][2] * m[3][3] - m[3][2] * m[2][3];
+               T Coef02 = m[1][2] * m[3][3] - m[3][2] * m[1][3];
+               T Coef03 = m[1][2] * m[2][3] - m[2][2] * m[1][3];
+
+               T Coef04 = m[2][1] * m[3][3] - m[3][1] * m[2][3];
+               T Coef06 = m[1][1] * m[3][3] - m[3][1] * m[1][3];
+               T Coef07 = m[1][1] * m[2][3] - m[2][1] * m[1][3];
+
+               T Coef08 = m[2][1] * m[3][2] - m[3][1] * m[2][2];
+               T Coef10 = m[1][1] * m[3][2] - m[3][1] * m[1][2];
+               T Coef11 = m[1][1] * m[2][2] - m[2][1] * m[1][2];
+
+               T Coef12 = m[2][0] * m[3][3] - m[3][0] * m[2][3];
+               T Coef14 = m[1][0] * m[3][3] - m[3][0] * m[1][3];
+               T Coef15 = m[1][0] * m[2][3] - m[2][0] * m[1][3];
+
+               T Coef16 = m[2][0] * m[3][2] - m[3][0] * m[2][2];
+               T Coef18 = m[1][0] * m[3][2] - m[3][0] * m[1][2];
+               T Coef19 = m[1][0] * m[2][2] - m[2][0] * m[1][2];
+
+               T Coef20 = m[2][0] * m[3][1] - m[3][0] * m[2][1];
+               T Coef22 = m[1][0] * m[3][1] - m[3][0] * m[1][1];
+               T Coef23 = m[1][0] * m[2][1] - m[2][0] * m[1][1];
+
+               tvec4<T, P> Fac0(Coef00, Coef00, Coef02, Coef03);
+               tvec4<T, P> Fac1(Coef04, Coef04, Coef06, Coef07);
+               tvec4<T, P> Fac2(Coef08, Coef08, Coef10, Coef11);
+               tvec4<T, P> Fac3(Coef12, Coef12, Coef14, Coef15);
+               tvec4<T, P> Fac4(Coef16, Coef16, Coef18, Coef19);
+               tvec4<T, P> Fac5(Coef20, Coef20, Coef22, Coef23);
+
+               tvec4<T, P> Vec0(m[1][0], m[0][0], m[0][0], m[0][0]);
+               tvec4<T, P> Vec1(m[1][1], m[0][1], m[0][1], m[0][1]);
+               tvec4<T, P> Vec2(m[1][2], m[0][2], m[0][2], m[0][2]);
+               tvec4<T, P> Vec3(m[1][3], m[0][3], m[0][3], m[0][3]);
+
+               tvec4<T, P> Inv0(Vec1 * Fac0 - Vec2 * Fac1 + Vec3 * Fac2);
+               tvec4<T, P> Inv1(Vec0 * Fac0 - Vec2 * Fac3 + Vec3 * Fac4);
+               tvec4<T, P> Inv2(Vec0 * Fac1 - Vec1 * Fac3 + Vec3 * Fac5);
+               tvec4<T, P> Inv3(Vec0 * Fac2 - Vec1 * Fac4 + Vec2 * Fac5);
+
+               tvec4<T, P> SignA(+1, -1, +1, -1);
+               tvec4<T, P> SignB(-1, +1, -1, +1);
+               tmat4x4<T, P> Inverse(Inv0 * SignA, Inv1 * SignB, Inv2 * SignA, Inv3 * SignB);
+
+               tvec4<T, P> Row0(Inverse[0][0], Inverse[1][0], Inverse[2][0], Inverse[3][0]);
+
+               tvec4<T, P> Dot0(m[0] * Row0);
+               T Dot1 = (Dot0.x + Dot0.y) + (Dot0.z + Dot0.w);
+
+               T OneOverDeterminant = static_cast<T>(1) / Dot1;
+
+               return Inverse * OneOverDeterminant;
+       }
+}//namespace detail
+
+       //////////////////////////////////////////////////////////////
+       // Constructors
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat4x4<T, P>::tmat4x4()
+       {
+#              ifndef GLM_FORCE_NO_CTOR_INIT 
+                       this->value[0] = col_type(1, 0, 0, 0);
+                       this->value[1] = col_type(0, 1, 0, 0);
+                       this->value[2] = col_type(0, 0, 1, 0);
+                       this->value[3] = col_type(0, 0, 0, 1);
+#              endif
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat4x4<T, P>::tmat4x4(tmat4x4<T, P> const & m)
+       {
+               this->value[0] = m[0];
+               this->value[1] = m[1];
+               this->value[2] = m[2];
+               this->value[3] = m[3];
+       }
+
+       template <typename T, precision P>
+       template <precision Q>
+       GLM_FUNC_QUALIFIER tmat4x4<T, P>::tmat4x4(tmat4x4<T, Q> const & m)
+       {
+               this->value[0] = m[0];
+               this->value[1] = m[1];
+               this->value[2] = m[2];
+               this->value[3] = m[3];
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat4x4<T, P>::tmat4x4(ctor)
+       {}
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat4x4<T, P>::tmat4x4(T const & s)
+       {
+               this->value[0] = col_type(s, 0, 0, 0);
+               this->value[1] = col_type(0, s, 0, 0);
+               this->value[2] = col_type(0, 0, s, 0);
+               this->value[3] = col_type(0, 0, 0, s);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat4x4<T, P>::tmat4x4
+       (
+               T const & x0, T const & y0, T const & z0, T const & w0,
+               T const & x1, T const & y1, T const & z1, T const & w1,
+               T const & x2, T const & y2, T const & z2, T const & w2,
+               T const & x3, T const & y3, T const & z3, T const & w3
+       )
+       {
+               this->value[0] = col_type(x0, y0, z0, w0);
+               this->value[1] = col_type(x1, y1, z1, w1);
+               this->value[2] = col_type(x2, y2, z2, w2);
+               this->value[3] = col_type(x3, y3, z3, w3);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat4x4<T, P>::tmat4x4
+       (
+               col_type const & v0,
+               col_type const & v1,
+               col_type const & v2,
+               col_type const & v3
+       )
+       {
+               this->value[0] = v0;
+               this->value[1] = v1;
+               this->value[2] = v2;
+               this->value[3] = v3;
+       }
+
+       template <typename T, precision P>
+       template <typename U, precision Q>
+       GLM_FUNC_QUALIFIER tmat4x4<T, P>::tmat4x4
+       (
+               tmat4x4<U, Q> const & m
+       )
+       {
+               this->value[0] = col_type(m[0]);
+               this->value[1] = col_type(m[1]);
+               this->value[2] = col_type(m[2]);
+               this->value[3] = col_type(m[3]);
+       }
+
+       //////////////////////////////////////
+       // Conversion constructors
+       template <typename T, precision P> 
+       template <
+               typename X1, typename Y1, typename Z1, typename W1,
+               typename X2, typename Y2, typename Z2, typename W2,
+               typename X3, typename Y3, typename Z3, typename W3,
+               typename X4, typename Y4, typename Z4, typename W4>
+       GLM_FUNC_QUALIFIER tmat4x4<T, P>::tmat4x4
+       (
+               X1 const & x1, Y1 const & y1, Z1 const & z1, W1 const & w1,
+               X2 const & x2, Y2 const & y2, Z2 const & z2, W2 const & w2,
+               X3 const & x3, Y3 const & y3, Z3 const & z3, W3 const & w3,
+               X4 const & x4, Y4 const & y4, Z4 const & z4, W4 const & w4
+       )
+       {
+               GLM_STATIC_ASSERT(std::numeric_limits<X1>::is_iec559 || std::numeric_limits<X1>::is_integer, "*mat4x4 constructor only takes float and integer types, 1st parameter type invalid.");
+               GLM_STATIC_ASSERT(std::numeric_limits<Y1>::is_iec559 || std::numeric_limits<Y1>::is_integer, "*mat4x4 constructor only takes float and integer types, 2nd parameter type invalid.");
+               GLM_STATIC_ASSERT(std::numeric_limits<Z1>::is_iec559 || std::numeric_limits<Z1>::is_integer, "*mat4x4 constructor only takes float and integer types, 3rd parameter type invalid.");
+               GLM_STATIC_ASSERT(std::numeric_limits<W1>::is_iec559 || std::numeric_limits<W1>::is_integer, "*mat4x4 constructor only takes float and integer types, 4th parameter type invalid.");
+
+               GLM_STATIC_ASSERT(std::numeric_limits<X2>::is_iec559 || std::numeric_limits<X2>::is_integer, "*mat4x4 constructor only takes float and integer types, 5th parameter type invalid.");
+               GLM_STATIC_ASSERT(std::numeric_limits<Y2>::is_iec559 || std::numeric_limits<Y2>::is_integer, "*mat4x4 constructor only takes float and integer types, 6th parameter type invalid.");
+               GLM_STATIC_ASSERT(std::numeric_limits<Z2>::is_iec559 || std::numeric_limits<Z2>::is_integer, "*mat4x4 constructor only takes float and integer types, 7th parameter type invalid.");
+               GLM_STATIC_ASSERT(std::numeric_limits<W2>::is_iec559 || std::numeric_limits<W2>::is_integer, "*mat4x4 constructor only takes float and integer types, 8th parameter type invalid.");
+
+               GLM_STATIC_ASSERT(std::numeric_limits<X3>::is_iec559 || std::numeric_limits<X3>::is_integer, "*mat4x4 constructor only takes float and integer types, 9th parameter type invalid.");
+               GLM_STATIC_ASSERT(std::numeric_limits<Y3>::is_iec559 || std::numeric_limits<Y3>::is_integer, "*mat4x4 constructor only takes float and integer types, 10th parameter type invalid.");
+               GLM_STATIC_ASSERT(std::numeric_limits<Z3>::is_iec559 || std::numeric_limits<Z3>::is_integer, "*mat4x4 constructor only takes float and integer types, 11th parameter type invalid.");
+               GLM_STATIC_ASSERT(std::numeric_limits<W3>::is_iec559 || std::numeric_limits<W3>::is_integer, "*mat4x4 constructor only takes float and integer types, 12th parameter type invalid.");
+
+               GLM_STATIC_ASSERT(std::numeric_limits<X4>::is_iec559 || std::numeric_limits<X4>::is_integer, "*mat4x4 constructor only takes float and integer types, 13th parameter type invalid.");
+               GLM_STATIC_ASSERT(std::numeric_limits<Y4>::is_iec559 || std::numeric_limits<Y4>::is_integer, "*mat4x4 constructor only takes float and integer types, 14th parameter type invalid.");
+               GLM_STATIC_ASSERT(std::numeric_limits<Z4>::is_iec559 || std::numeric_limits<Z4>::is_integer, "*mat4x4 constructor only takes float and integer types, 15th parameter type invalid.");
+               GLM_STATIC_ASSERT(std::numeric_limits<W4>::is_iec559 || std::numeric_limits<W4>::is_integer, "*mat4x4 constructor only takes float and integer types, 16th parameter type invalid.");
+
+               this->value[0] = col_type(static_cast<T>(x1), value_type(y1), value_type(z1), value_type(w1));
+               this->value[1] = col_type(static_cast<T>(x2), value_type(y2), value_type(z2), value_type(w2));
+               this->value[2] = col_type(static_cast<T>(x3), value_type(y3), value_type(z3), value_type(w3));
+               this->value[3] = col_type(static_cast<T>(x4), value_type(y4), value_type(z4), value_type(w4));
+       }
+       
+       template <typename T, precision P>
+       template <typename V1, typename V2, typename V3, typename V4>
+       GLM_FUNC_QUALIFIER tmat4x4<T, P>::tmat4x4
+       (
+               tvec4<V1, P> const & v1,
+               tvec4<V2, P> const & v2,
+               tvec4<V3, P> const & v3,
+               tvec4<V4, P> const & v4
+       )               
+       {
+               GLM_STATIC_ASSERT(std::numeric_limits<V1>::is_iec559 || std::numeric_limits<V1>::is_integer, "*mat4x4 constructor only takes float and integer types, 1st parameter type invalid.");
+               GLM_STATIC_ASSERT(std::numeric_limits<V2>::is_iec559 || std::numeric_limits<V2>::is_integer, "*mat4x4 constructor only takes float and integer types, 2nd parameter type invalid.");
+               GLM_STATIC_ASSERT(std::numeric_limits<V3>::is_iec559 || std::numeric_limits<V3>::is_integer, "*mat4x4 constructor only takes float and integer types, 3rd parameter type invalid.");
+               GLM_STATIC_ASSERT(std::numeric_limits<V4>::is_iec559 || std::numeric_limits<V4>::is_integer, "*mat4x4 constructor only takes float and integer types, 4th parameter type invalid.");
+
+               this->value[0] = col_type(v1);
+               this->value[1] = col_type(v2);
+               this->value[2] = col_type(v3);
+               this->value[3] = col_type(v4);
+       }
+
+       //////////////////////////////////////
+       // Matrix convertion constructors
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat4x4<T, P>::tmat4x4(tmat2x2<T, P> const & m)
+       {
+               this->value[0] = col_type(m[0], 0, 0);
+               this->value[1] = col_type(m[1], 0, 0);
+               this->value[2] = col_type(0);
+               this->value[3] = col_type(0, 0, 0, 1);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat4x4<T, P>::tmat4x4(tmat3x3<T, P> const & m)
+       {
+               this->value[0] = col_type(m[0], 0);
+               this->value[1] = col_type(m[1], 0);
+               this->value[2] = col_type(m[2], 0);
+               this->value[3] = col_type(0, 0, 0, 1);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat4x4<T, P>::tmat4x4(tmat2x3<T, P> const & m)
+       {
+               this->value[0] = col_type(m[0], 0);
+               this->value[1] = col_type(m[1], 0);
+               this->value[2] = col_type(0);
+               this->value[3] = col_type(0, 0, 0, 1);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat4x4<T, P>::tmat4x4(tmat3x2<T, P> const & m)
+       {
+               this->value[0] = col_type(m[0], 0, 0);
+               this->value[1] = col_type(m[1], 0, 0);
+               this->value[2] = col_type(m[2], 0, 0);
+               this->value[3] = col_type(0, 0, 0, 1);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat4x4<T, P>::tmat4x4(tmat2x4<T, P> const & m)
+       {
+               this->value[0] = m[0];
+               this->value[1] = m[1];
+               this->value[2] = col_type(0);
+               this->value[3] = col_type(0, 0, 0, 1);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat4x4<T, P>::tmat4x4(tmat4x2<T, P> const & m)
+       {
+               this->value[0] = col_type(m[0], 0, 0);
+               this->value[1] = col_type(m[1], 0, 0);
+               this->value[2] = col_type(0);
+               this->value[3] = col_type(0, 0, 0, 1);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat4x4<T, P>::tmat4x4(tmat3x4<T, P> const & m)
+       {
+               this->value[0] = m[0];
+               this->value[1] = m[1];
+               this->value[2] = m[2];
+               this->value[3] = col_type(0, 0, 0, 1);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat4x4<T, P>::tmat4x4(tmat4x3<T, P> const & m)
+       {
+               this->value[0] = col_type(m[0], 0);
+               this->value[1] = col_type(m[1], 0);
+               this->value[2] = col_type(m[2], 0);
+               this->value[3] = col_type(m[3], 1);
+       }
+
+       //////////////////////////////////////
+       // Accesses
+
+#      ifdef GLM_FORCE_SIZE_FUNC
+               template <typename T, precision P>
+               GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tmat4x4<T, P>::size_type tmat4x4<T, P>::size() const
+               {
+                       return 4;
+               }
+
+               template <typename T, precision P>
+               GLM_FUNC_QUALIFIER typename tmat4x4<T, P>::col_type & tmat4x4<T, P>::operator[](typename tmat4x4<T, P>::size_type i)
+               {
+                       assert(i < this->size());
+                       return this->value[i];
+               }
+
+               template <typename T, precision P>
+               GLM_FUNC_QUALIFIER typename tmat4x4<T, P>::col_type const & tmat4x4<T, P>::operator[](typename tmat4x4<T, P>::size_type i) const
+               {
+                       assert(i < this->size());
+                       return this->value[i];
+               }
+#      else
+               template <typename T, precision P>
+               GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tmat4x4<T, P>::length_type tmat4x4<T, P>::length() const
+               {
+                       return 4;
+               }
+
+               template <typename T, precision P>
+               GLM_FUNC_QUALIFIER typename tmat4x4<T, P>::col_type & tmat4x4<T, P>::operator[](typename tmat4x4<T, P>::length_type i)
+               {
+                       assert(i < this->length());
+                       return this->value[i];
+               }
+
+               template <typename T, precision P>
+               GLM_FUNC_QUALIFIER typename tmat4x4<T, P>::col_type const & tmat4x4<T, P>::operator[](typename tmat4x4<T, P>::length_type i) const
+               {
+                       assert(i < this->length());
+                       return this->value[i];
+               }
+#      endif//GLM_FORCE_SIZE_FUNC
+
+       //////////////////////////////////////////////////////////////
+       // Operators
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat4x4<T, P>& tmat4x4<T, P>::operator=(tmat4x4<T, P> const & m)
+       {
+               //memcpy could be faster
+               //memcpy(&this->value, &m.value, 16 * sizeof(valType));
+               this->value[0] = m[0];
+               this->value[1] = m[1];
+               this->value[2] = m[2];
+               this->value[3] = m[3];
+               return *this;
+       }
+
+       template <typename T, precision P> 
+       template <typename U> 
+       GLM_FUNC_QUALIFIER tmat4x4<T, P>& tmat4x4<T, P>::operator=(tmat4x4<U, P> const & m)
+       {
+               //memcpy could be faster
+               //memcpy(&this->value, &m.value, 16 * sizeof(valType));
+               this->value[0] = m[0];
+               this->value[1] = m[1];
+               this->value[2] = m[2];
+               this->value[3] = m[3];
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U>
+       GLM_FUNC_QUALIFIER tmat4x4<T, P>& tmat4x4<T, P>::operator+=(U s)
+       {
+               this->value[0] += s;
+               this->value[1] += s;
+               this->value[2] += s;
+               this->value[3] += s;
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U>
+       GLM_FUNC_QUALIFIER tmat4x4<T, P>& tmat4x4<T, P>::operator+=(tmat4x4<U, P> const & m)
+       {
+               this->value[0] += m[0];
+               this->value[1] += m[1];
+               this->value[2] += m[2];
+               this->value[3] += m[3];
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U>
+       GLM_FUNC_QUALIFIER tmat4x4<T, P> & tmat4x4<T, P>::operator-=(U s)
+       {
+               this->value[0] -= s;
+               this->value[1] -= s;
+               this->value[2] -= s;
+               this->value[3] -= s;
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U>
+       GLM_FUNC_QUALIFIER tmat4x4<T, P> & tmat4x4<T, P>::operator-=(tmat4x4<U, P> const & m)
+       {
+               this->value[0] -= m[0];
+               this->value[1] -= m[1];
+               this->value[2] -= m[2];
+               this->value[3] -= m[3];
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U>
+       GLM_FUNC_QUALIFIER tmat4x4<T, P> & tmat4x4<T, P>::operator*=(U s)
+       {
+               this->value[0] *= s;
+               this->value[1] *= s;
+               this->value[2] *= s;
+               this->value[3] *= s;
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U>
+       GLM_FUNC_QUALIFIER tmat4x4<T, P> & tmat4x4<T, P>::operator*=(tmat4x4<U, P> const & m)
+       {
+               return (*this = *this * m);
+       }
+
+       template <typename T, precision P>
+       template <typename U>
+       GLM_FUNC_QUALIFIER tmat4x4<T, P> & tmat4x4<T, P>::operator/=(U s)
+       {
+               this->value[0] /= s;
+               this->value[1] /= s;
+               this->value[2] /= s;
+               this->value[3] /= s;
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U>
+       GLM_FUNC_QUALIFIER tmat4x4<T, P> & tmat4x4<T, P>::operator/=(tmat4x4<U, P> const & m)
+       {
+               return (*this = *this * detail::compute_inverse<T, P>(m));
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat4x4<T, P> & tmat4x4<T, P>::operator++()
+       {
+               ++this->value[0];
+               ++this->value[1];
+               ++this->value[2];
+               ++this->value[3];
+               return *this;
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat4x4<T, P> & tmat4x4<T, P>::operator--()
+       {
+               --this->value[0];
+               --this->value[1];
+               --this->value[2];
+               --this->value[3];
+               return *this;
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat4x4<T, P> tmat4x4<T, P>::operator++(int)
+       {
+               tmat4x4<T, P> Result(*this);
+               ++*this;
+               return Result;
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat4x4<T, P> tmat4x4<T, P>::operator--(int)
+       {
+               tmat4x4<T, P> Result(*this);
+               --*this;
+               return Result;
+       }
+
+       // Binary operators
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat4x4<T, P> operator+(tmat4x4<T, P> const & m, T const & s)
+       {
+               return tmat4x4<T, P>(
+                       m[0] + s,
+                       m[1] + s,
+                       m[2] + s,
+                       m[3] + s);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat4x4<T, P> operator+(T const & s, tmat4x4<T, P> const & m)
+       {
+               return tmat4x4<T, P>(
+                       m[0] + s,
+                       m[1] + s,
+                       m[2] + s,
+                       m[3] + s);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat4x4<T, P> operator+(tmat4x4<T, P> const & m1, tmat4x4<T, P> const & m2)
+       {
+               return tmat4x4<T, P>(
+                       m1[0] + m2[0],
+                       m1[1] + m2[1],
+                       m1[2] + m2[2],
+                       m1[3] + m2[3]);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat4x4<T, P> operator-(tmat4x4<T, P> const & m, T const & s)
+       {
+               return tmat4x4<T, P>(
+                       m[0] - s,
+                       m[1] - s,
+                       m[2] - s,
+                       m[3] - s);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat4x4<T, P> operator-(T const & s, tmat4x4<T, P> const & m)
+       {
+               return tmat4x4<T, P>(
+                       s - m[0],
+                       s - m[1],
+                       s - m[2],
+                       s - m[3]);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat4x4<T, P> operator-(tmat4x4<T, P> const & m1, tmat4x4<T, P> const & m2)
+       {
+               return tmat4x4<T, P>(
+                       m1[0] - m2[0],
+                       m1[1] - m2[1],
+                       m1[2] - m2[2],
+                       m1[3] - m2[3]);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat4x4<T, P> operator*(tmat4x4<T, P> const & m, T const  & s)
+       {
+               return tmat4x4<T, P>(
+                       m[0] * s,
+                       m[1] * s,
+                       m[2] * s,
+                       m[3] * s);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat4x4<T, P> operator*(T const & s, tmat4x4<T, P> const & m)
+       {
+               return tmat4x4<T, P>(
+                       m[0] * s,
+                       m[1] * s,
+                       m[2] * s,
+                       m[3] * s);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER typename tmat4x4<T, P>::col_type operator*
+       (
+               tmat4x4<T, P> const & m,
+               typename tmat4x4<T, P>::row_type const & v
+       )
+       {
+/*
+               __m128 v0 = _mm_shuffle_ps(v.data, v.data, _MM_SHUFFLE(0, 0, 0, 0));
+               __m128 v1 = _mm_shuffle_ps(v.data, v.data, _MM_SHUFFLE(1, 1, 1, 1));
+               __m128 v2 = _mm_shuffle_ps(v.data, v.data, _MM_SHUFFLE(2, 2, 2, 2));
+               __m128 v3 = _mm_shuffle_ps(v.data, v.data, _MM_SHUFFLE(3, 3, 3, 3));
+
+               __m128 m0 = _mm_mul_ps(m[0].data, v0);
+               __m128 m1 = _mm_mul_ps(m[1].data, v1);
+               __m128 a0 = _mm_add_ps(m0, m1);
+
+               __m128 m2 = _mm_mul_ps(m[2].data, v2);
+               __m128 m3 = _mm_mul_ps(m[3].data, v3);
+               __m128 a1 = _mm_add_ps(m2, m3);
+
+               __m128 a2 = _mm_add_ps(a0, a1);
+
+               return typename tmat4x4<T, P>::col_type(a2);
+*/
+
+               typename tmat4x4<T, P>::col_type const Mov0(v[0]);
+               typename tmat4x4<T, P>::col_type const Mov1(v[1]);
+               typename tmat4x4<T, P>::col_type const Mul0 = m[0] * Mov0;
+               typename tmat4x4<T, P>::col_type const Mul1 = m[1] * Mov1;
+               typename tmat4x4<T, P>::col_type const Add0 = Mul0 + Mul1;
+               typename tmat4x4<T, P>::col_type const Mov2(v[2]);
+               typename tmat4x4<T, P>::col_type const Mov3(v[3]);
+               typename tmat4x4<T, P>::col_type const Mul2 = m[2] * Mov2;
+               typename tmat4x4<T, P>::col_type const Mul3 = m[3] * Mov3;
+               typename tmat4x4<T, P>::col_type const Add1 = Mul2 + Mul3;
+               typename tmat4x4<T, P>::col_type const Add2 = Add0 + Add1;
+               return Add2;
+
+/*
+               return typename tmat4x4<T, P>::col_type(
+                       m[0][0] * v[0] + m[1][0] * v[1] + m[2][0] * v[2] + m[3][0] * v[3],
+                       m[0][1] * v[0] + m[1][1] * v[1] + m[2][1] * v[2] + m[3][1] * v[3],
+                       m[0][2] * v[0] + m[1][2] * v[1] + m[2][2] * v[2] + m[3][2] * v[3],
+                       m[0][3] * v[0] + m[1][3] * v[1] + m[2][3] * v[2] + m[3][3] * v[3]);
+*/
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER typename tmat4x4<T, P>::row_type operator*
+       (
+               typename tmat4x4<T, P>::col_type const & v,
+               tmat4x4<T, P> const & m
+       )
+       {
+               return typename tmat4x4<T, P>::row_type(
+                       m[0][0] * v[0] + m[0][1] * v[1] + m[0][2] * v[2] + m[0][3] * v[3],
+                       m[1][0] * v[0] + m[1][1] * v[1] + m[1][2] * v[2] + m[1][3] * v[3],
+                       m[2][0] * v[0] + m[2][1] * v[1] + m[2][2] * v[2] + m[2][3] * v[3],
+                       m[3][0] * v[0] + m[3][1] * v[1] + m[3][2] * v[2] + m[3][3] * v[3]);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat2x4<T, P> operator*(tmat4x4<T, P> const & m1, tmat2x4<T, P> const & m2)
+       {
+               return tmat2x4<T, P>(
+                       m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2] + m1[3][0] * m2[0][3],
+                       m1[0][1] * m2[0][0] + m1[1][1] * m2[0][1] + m1[2][1] * m2[0][2] + m1[3][1] * m2[0][3],
+                       m1[0][2] * m2[0][0] + m1[1][2] * m2[0][1] + m1[2][2] * m2[0][2] + m1[3][2] * m2[0][3],
+                       m1[0][3] * m2[0][0] + m1[1][3] * m2[0][1] + m1[2][3] * m2[0][2] + m1[3][3] * m2[0][3],
+                       m1[0][0] * m2[1][0] + m1[1][0] * m2[1][1] + m1[2][0] * m2[1][2] + m1[3][0] * m2[1][3],
+                       m1[0][1] * m2[1][0] + m1[1][1] * m2[1][1] + m1[2][1] * m2[1][2] + m1[3][1] * m2[1][3],
+                       m1[0][2] * m2[1][0] + m1[1][2] * m2[1][1] + m1[2][2] * m2[1][2] + m1[3][2] * m2[1][3],
+                       m1[0][3] * m2[1][0] + m1[1][3] * m2[1][1] + m1[2][3] * m2[1][2] + m1[3][3] * m2[1][3]);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat3x4<T, P> operator*(tmat4x4<T, P> const & m1, tmat3x4<T, P> const & m2)
+       {
+               return tmat3x4<T, P>(
+                       m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2] + m1[3][0] * m2[0][3],
+                       m1[0][1] * m2[0][0] + m1[1][1] * m2[0][1] + m1[2][1] * m2[0][2] + m1[3][1] * m2[0][3],
+                       m1[0][2] * m2[0][0] + m1[1][2] * m2[0][1] + m1[2][2] * m2[0][2] + m1[3][2] * m2[0][3],
+                       m1[0][3] * m2[0][0] + m1[1][3] * m2[0][1] + m1[2][3] * m2[0][2] + m1[3][3] * m2[0][3],
+                       m1[0][0] * m2[1][0] + m1[1][0] * m2[1][1] + m1[2][0] * m2[1][2] + m1[3][0] * m2[1][3],
+                       m1[0][1] * m2[1][0] + m1[1][1] * m2[1][1] + m1[2][1] * m2[1][2] + m1[3][1] * m2[1][3],
+                       m1[0][2] * m2[1][0] + m1[1][2] * m2[1][1] + m1[2][2] * m2[1][2] + m1[3][2] * m2[1][3],
+                       m1[0][3] * m2[1][0] + m1[1][3] * m2[1][1] + m1[2][3] * m2[1][2] + m1[3][3] * m2[1][3],
+                       m1[0][0] * m2[2][0] + m1[1][0] * m2[2][1] + m1[2][0] * m2[2][2] + m1[3][0] * m2[2][3],
+                       m1[0][1] * m2[2][0] + m1[1][1] * m2[2][1] + m1[2][1] * m2[2][2] + m1[3][1] * m2[2][3],
+                       m1[0][2] * m2[2][0] + m1[1][2] * m2[2][1] + m1[2][2] * m2[2][2] + m1[3][2] * m2[2][3],
+                       m1[0][3] * m2[2][0] + m1[1][3] * m2[2][1] + m1[2][3] * m2[2][2] + m1[3][3] * m2[2][3]);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat4x4<T, P> operator*(tmat4x4<T, P> const & m1, tmat4x4<T, P> const & m2)
+       {
+               typename tmat4x4<T, P>::col_type const SrcA0 = m1[0];
+               typename tmat4x4<T, P>::col_type const SrcA1 = m1[1];
+               typename tmat4x4<T, P>::col_type const SrcA2 = m1[2];
+               typename tmat4x4<T, P>::col_type const SrcA3 = m1[3];
+
+               typename tmat4x4<T, P>::col_type const SrcB0 = m2[0];
+               typename tmat4x4<T, P>::col_type const SrcB1 = m2[1];
+               typename tmat4x4<T, P>::col_type const SrcB2 = m2[2];
+               typename tmat4x4<T, P>::col_type const SrcB3 = m2[3];
+
+               tmat4x4<T, P> Result(uninitialize);
+               Result[0] = SrcA0 * SrcB0[0] + SrcA1 * SrcB0[1] + SrcA2 * SrcB0[2] + SrcA3 * SrcB0[3];
+               Result[1] = SrcA0 * SrcB1[0] + SrcA1 * SrcB1[1] + SrcA2 * SrcB1[2] + SrcA3 * SrcB1[3];
+               Result[2] = SrcA0 * SrcB2[0] + SrcA1 * SrcB2[1] + SrcA2 * SrcB2[2] + SrcA3 * SrcB2[3];
+               Result[3] = SrcA0 * SrcB3[0] + SrcA1 * SrcB3[1] + SrcA2 * SrcB3[2] + SrcA3 * SrcB3[3];
+               return Result;
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat4x4<T, P> operator/(tmat4x4<T, P> const & m, T const & s)
+       {
+               return tmat4x4<T, P>(
+                       m[0] / s,
+                       m[1] / s,
+                       m[2] / s,
+                       m[3] / s);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat4x4<T, P> operator/(T const & s, tmat4x4<T, P> const & m)
+       {
+               return tmat4x4<T, P>(
+                       s / m[0],
+                       s / m[1],
+                       s / m[2],
+                       s / m[3]);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER typename tmat4x4<T, P>::col_type operator/(tmat4x4<T, P> const & m, typename tmat4x4<T, P>::row_type const & v)
+       {
+               return detail::compute_inverse<T, P>(m) * v;
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER typename tmat4x4<T, P>::row_type operator/(typename tmat4x4<T, P>::col_type const & v, tmat4x4<T, P> const & m)
+       {
+               return v * detail::compute_inverse<T, P>(m);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat4x4<T, P> operator/(tmat4x4<T, P> const & m1, tmat4x4<T, P> const & m2)
+       {
+               tmat4x4<T, P> m1_copy(m1);
+               return m1_copy /= m2;
+       }
+
+       // Unary constant operators
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat4x4<T, P> const operator-(tmat4x4<T, P> const & m)
+       {
+               return tmat4x4<T, P>(
+                       -m[0],
+                       -m[1],
+                       -m[2],
+                       -m[3]);
+       }
+
+       template <typename T, precision P> 
+       GLM_FUNC_QUALIFIER tmat4x4<T, P> const operator++(tmat4x4<T, P> const & m, int)
+       {
+               return tmat4x4<T, P>(
+                       m[0] + static_cast<T>(1),
+                       m[1] + static_cast<T>(1),
+                       m[2] + static_cast<T>(1),
+                       m[3] + static_cast<T>(1));
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat4x4<T, P> const operator--(tmat4x4<T, P> const & m, int)
+       {
+               return tmat4x4<T, P>(
+                       m[0] - static_cast<T>(1),
+                       m[1] - static_cast<T>(1),
+                       m[2] - static_cast<T>(1),
+                       m[3] - static_cast<T>(1));
+       }
+
+       //////////////////////////////////////
+       // Boolean operators
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER bool operator==(tmat4x4<T, P> const & m1, tmat4x4<T, P> const & m2)
+       {
+               return (m1[0] == m2[0]) && (m1[1] == m2[1]) && (m1[2] == m2[2]) && (m1[3] == m2[3]);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER bool operator!=(tmat4x4<T, P> const & m1, tmat4x4<T, P> const & m2)
+       {
+               return (m1[0] != m2[0]) || (m1[1] != m2[1]) || (m1[2] != m2[2]) || (m1[3] != m2[3]);
+       }
+}//namespace glm
diff --git a/include/glm/detail/type_vec.hpp b/include/glm/detail/type_vec.hpp
new file mode 100644 (file)
index 0000000..c14f234
--- /dev/null
@@ -0,0 +1,518 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref core
+/// @file glm/detail/type_vec.hpp
+/// @date 2010-01-26 / 2014-10-05
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////
+
+#pragma once
+
+#include "precision.hpp"
+#include "type_int.hpp"
+
+namespace glm
+{
+       template <typename T, precision P> struct tvec1;
+       template <typename T, precision P> struct tvec2;
+       template <typename T, precision P> struct tvec3;
+       template <typename T, precision P> struct tvec4;
+
+       typedef tvec1<float, highp>             highp_vec1_t;
+       typedef tvec1<float, mediump>   mediump_vec1_t;
+       typedef tvec1<float, lowp>              lowp_vec1_t;
+       typedef tvec1<double, highp>    highp_dvec1_t;
+       typedef tvec1<double, mediump>  mediump_dvec1_t;
+       typedef tvec1<double, lowp>             lowp_dvec1_t;
+       typedef tvec1<int, highp>               highp_ivec1_t;
+       typedef tvec1<int, mediump>             mediump_ivec1_t;
+       typedef tvec1<int, lowp>                lowp_ivec1_t;
+       typedef tvec1<uint, highp>              highp_uvec1_t;
+       typedef tvec1<uint, mediump>    mediump_uvec1_t;
+       typedef tvec1<uint, lowp>               lowp_uvec1_t;
+       typedef tvec1<bool, highp>              highp_bvec1_t;
+       typedef tvec1<bool, mediump>    mediump_bvec1_t;
+       typedef tvec1<bool, lowp>               lowp_bvec1_t;
+
+       /// @addtogroup core_precision
+       /// @{
+
+       /// 2 components vector of high single-precision floating-point numbers.
+       /// There is no guarantee on the actual precision.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tvec2<float, highp>             highp_vec2;
+
+       /// 2 components vector of medium single-precision floating-point numbers.
+       /// There is no guarantee on the actual precision.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tvec2<float, mediump>   mediump_vec2;
+
+       /// 2 components vector of low single-precision floating-point numbers.
+       /// There is no guarantee on the actual precision.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tvec2<float, lowp>              lowp_vec2;
+
+       /// 2 components vector of high double-precision floating-point numbers.
+       /// There is no guarantee on the actual precision.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tvec2<double, highp>    highp_dvec2;
+
+       /// 2 components vector of medium double-precision floating-point numbers.
+       /// There is no guarantee on the actual precision.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tvec2<double, mediump>  mediump_dvec2;
+
+       /// 2 components vector of low double-precision floating-point numbers.
+       /// There is no guarantee on the actual precision.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tvec2<double, lowp>             lowp_dvec2;
+
+       /// 2 components vector of high precision signed integer numbers.
+       /// There is no guarantee on the actual precision.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tvec2<int, highp>               highp_ivec2;
+
+       /// 2 components vector of medium precision signed integer numbers.
+       /// There is no guarantee on the actual precision.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tvec2<int, mediump>             mediump_ivec2;
+
+       /// 2 components vector of low precision signed integer numbers.
+       /// There is no guarantee on the actual precision.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tvec2<int, lowp>                lowp_ivec2;
+
+       /// 2 components vector of high precision unsigned integer numbers.
+       /// There is no guarantee on the actual precision.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tvec2<uint, highp>              highp_uvec2;
+
+       /// 2 components vector of medium precision unsigned integer numbers.
+       /// There is no guarantee on the actual precision.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tvec2<uint, mediump>    mediump_uvec2;
+
+       /// 2 components vector of low precision unsigned integer numbers.
+       /// There is no guarantee on the actual precision.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tvec2<uint, lowp>               lowp_uvec2;
+
+       /// 2 components vector of high precision bool numbers.
+       /// There is no guarantee on the actual precision.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tvec2<bool, highp>              highp_bvec2;
+
+       /// 2 components vector of medium precision bool numbers.
+       /// There is no guarantee on the actual precision.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tvec2<bool, mediump>    mediump_bvec2;
+
+       /// 2 components vector of low precision bool numbers.
+       /// There is no guarantee on the actual precision.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tvec2<bool, lowp>               lowp_bvec2;
+
+       /// @}
+
+
+       /// @addtogroup core_precision
+       /// @{
+
+       /// 3 components vector of high single-precision floating-point numbers.
+       /// There is no guarantee on the actual precision.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tvec3<float, highp>             highp_vec3;
+
+       /// 3 components vector of medium single-precision floating-point numbers.
+       /// There is no guarantee on the actual precision.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tvec3<float, mediump>   mediump_vec3;
+
+       /// 3 components vector of low single-precision floating-point numbers.
+       /// There is no guarantee on the actual precision.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tvec3<float, lowp>              lowp_vec3;
+
+       /// 3 components vector of high double-precision floating-point numbers.
+       /// There is no guarantee on the actual precision.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tvec3<double, highp>    highp_dvec3;
+
+       /// 3 components vector of medium double-precision floating-point numbers.
+       /// There is no guarantee on the actual precision.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tvec3<double, mediump>  mediump_dvec3;
+
+       /// 3 components vector of low double-precision floating-point numbers.
+       /// There is no guarantee on the actual precision.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tvec3<double, lowp>             lowp_dvec3;
+
+       /// 3 components vector of high precision signed integer numbers.
+       /// There is no guarantee on the actual precision.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tvec3<int, highp>               highp_ivec3;
+
+       /// 3 components vector of medium precision signed integer numbers.
+       /// There is no guarantee on the actual precision.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tvec3<int, mediump>             mediump_ivec3;
+
+       /// 3 components vector of low precision signed integer numbers.
+       /// There is no guarantee on the actual precision.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tvec3<int, lowp>                lowp_ivec3;
+
+       /// 3 components vector of high precision unsigned integer numbers.
+       /// There is no guarantee on the actual precision.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tvec3<uint, highp>              highp_uvec3;
+
+       /// 3 components vector of medium precision unsigned integer numbers.
+       /// There is no guarantee on the actual precision.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tvec3<uint, mediump>    mediump_uvec3;
+
+       /// 3 components vector of low precision unsigned integer numbers.
+       /// There is no guarantee on the actual precision.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tvec3<uint, lowp>               lowp_uvec3;
+
+       /// 3 components vector of high precision bool numbers.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tvec3<bool, highp>              highp_bvec3;
+
+       /// 3 components vector of medium precision bool numbers.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tvec3<bool, mediump>    mediump_bvec3;
+
+       /// 3 components vector of low precision bool numbers.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tvec3<bool, lowp>               lowp_bvec3;
+
+       /// @}
+
+       /// @addtogroup core_precision
+       /// @{
+
+       /// 4 components vector of high single-precision floating-point numbers.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tvec4<float, highp>             highp_vec4;
+
+       /// 4 components vector of medium single-precision floating-point numbers.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tvec4<float, mediump>   mediump_vec4;
+
+       /// 4 components vector of low single-precision floating-point numbers.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tvec4<float, lowp>              lowp_vec4;
+
+       /// 4 components vector of high double-precision floating-point numbers.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tvec4<double, highp>    highp_dvec4;
+
+       /// 4 components vector of medium double-precision floating-point numbers.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tvec4<double, mediump>  mediump_dvec4;
+
+       /// 4 components vector of low double-precision floating-point numbers.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tvec4<double, lowp>             lowp_dvec4;
+
+       /// 4 components vector of high precision signed integer numbers.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tvec4<int, highp>               highp_ivec4;
+
+       /// 4 components vector of medium precision signed integer numbers.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tvec4<int, mediump>             mediump_ivec4;
+
+       /// 4 components vector of low precision signed integer numbers.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tvec4<int, lowp>                lowp_ivec4;
+
+       /// 4 components vector of high precision unsigned integer numbers.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tvec4<uint, highp>              highp_uvec4;
+
+       /// 4 components vector of medium precision unsigned integer numbers.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tvec4<uint, mediump>    mediump_uvec4;
+
+       /// 4 components vector of low precision unsigned integer numbers.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tvec4<uint, lowp>               lowp_uvec4;
+
+       /// 4 components vector of high precision bool numbers.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tvec4<bool, highp>              highp_bvec4;
+
+       /// 4 components vector of medium precision bool numbers.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tvec4<bool, mediump>    mediump_bvec4;
+
+       /// 4 components vector of low precision bool numbers.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tvec4<bool, lowp>               lowp_bvec4;
+
+       /// @}
+
+       /// @addtogroup core_types
+       /// @{
+
+       //////////////////////////
+       // Default float definition
+
+#if(defined(GLM_PRECISION_LOWP_FLOAT))
+       typedef lowp_vec2                       vec2;
+       typedef lowp_vec3                       vec3;
+       typedef lowp_vec4                       vec4;
+#elif(defined(GLM_PRECISION_MEDIUMP_FLOAT))
+       typedef mediump_vec2            vec2;
+       typedef mediump_vec3            vec3;
+       typedef mediump_vec4            vec4;
+#else //defined(GLM_PRECISION_HIGHP_FLOAT)
+       /// 2 components vector of floating-point numbers.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
+       typedef highp_vec2                      vec2;
+
+       //! 3 components vector of floating-point numbers.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
+       typedef highp_vec3                      vec3;
+
+       //! 4 components vector of floating-point numbers.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
+       typedef highp_vec4                      vec4;
+#endif//GLM_PRECISION
+
+       //////////////////////////
+       // Default double definition
+
+#if(defined(GLM_PRECISION_LOWP_DOUBLE))
+       typedef lowp_dvec2                      dvec2;
+       typedef lowp_dvec3                      dvec3;
+       typedef lowp_dvec4                      dvec4;
+#elif(defined(GLM_PRECISION_MEDIUMP_DOUBLE))
+       typedef mediump_dvec2           dvec2;
+       typedef mediump_dvec3           dvec3;
+       typedef mediump_dvec4           dvec4;
+#else //defined(GLM_PRECISION_HIGHP_DOUBLE)
+       /// 2 components vector of double-precision floating-point numbers.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
+       typedef highp_dvec2                     dvec2;
+       
+       //! 3 components vector of double-precision floating-point numbers.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
+       typedef highp_dvec3                     dvec3;
+       
+       //! 4 components vector of double-precision floating-point numbers.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
+       typedef highp_dvec4                     dvec4;
+#endif//GLM_PRECISION
+       
+       //////////////////////////
+       // Signed integer definition
+       
+#if(defined(GLM_PRECISION_LOWP_INT))
+       typedef lowp_ivec2                      ivec2;
+       typedef lowp_ivec3                      ivec3;
+       typedef lowp_ivec4                      ivec4;
+#elif(defined(GLM_PRECISION_MEDIUMP_INT))
+       typedef mediump_ivec2           ivec2;
+       typedef mediump_ivec3           ivec3;
+       typedef mediump_ivec4           ivec4;
+#else //defined(GLM_PRECISION_HIGHP_INT)
+       //! 2 components vector of signed integer numbers.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
+       typedef highp_ivec2                     ivec2;
+       
+       //! 3 components vector of signed integer numbers.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
+       typedef highp_ivec3                     ivec3;
+       
+       //! 4 components vector of signed integer numbers.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
+       typedef highp_ivec4                     ivec4;
+#endif//GLM_PRECISION
+       
+       //////////////////////////
+       // Unsigned integer definition
+       
+#if(defined(GLM_PRECISION_LOWP_UINT))
+       typedef lowp_uvec2                      uvec2;
+       typedef lowp_uvec3                      uvec3;
+       typedef lowp_uvec4                      uvec4;
+#elif(defined(GLM_PRECISION_MEDIUMP_UINT))
+       typedef mediump_uvec2           uvec2;
+       typedef mediump_uvec3           uvec3;
+       typedef mediump_uvec4           uvec4;
+#else //defined(GLM_PRECISION_HIGHP_UINT)
+       /// 2 components vector of unsigned integer numbers.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
+       typedef highp_uvec2                     uvec2;
+       
+       /// 3 components vector of unsigned integer numbers.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
+       typedef highp_uvec3                     uvec3;
+       
+       /// 4 components vector of unsigned integer numbers.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
+       typedef highp_uvec4                     uvec4;
+#endif//GLM_PRECISION
+       
+       //////////////////////////
+       // Boolean definition
+
+#if(defined(GLM_PRECISION_LOWP_BOOL))
+       typedef lowp_bvec2                      bvec2;
+       typedef lowp_bvec3                      bvec3;
+       typedef lowp_bvec4                      bvec4;
+#elif(defined(GLM_PRECISION_MEDIUMP_BOOL))
+       typedef mediump_bvec2           bvec2;
+       typedef mediump_bvec3           bvec3;
+       typedef mediump_bvec4           bvec4;
+#else //defined(GLM_PRECISION_HIGHP_BOOL)
+       //! 2 components vector of boolean.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
+       typedef highp_bvec2                     bvec2;
+       
+       //! 3 components vector of boolean.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
+       typedef highp_bvec3                     bvec3;
+       
+       //! 4 components vector of boolean.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
+       typedef highp_bvec4                     bvec4;
+#endif//GLM_PRECISION
+       
+       /// @}
+}//namespace glm
diff --git a/include/glm/detail/type_vec.inl b/include/glm/detail/type_vec.inl
new file mode 100644 (file)
index 0000000..2021980
--- /dev/null
@@ -0,0 +1,31 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref core
+/// @file glm/detail/type_vec.inl
+/// @date 2011-06-15 / 2011-06-15
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////
diff --git a/include/glm/detail/type_vec1.hpp b/include/glm/detail/type_vec1.hpp
new file mode 100644 (file)
index 0000000..3550d03
--- /dev/null
@@ -0,0 +1,322 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref core
+/// @file glm/detail/type_vec1.hpp
+/// @date 2008-08-25 / 2011-06-15
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////
+
+#pragma once
+
+#include "../fwd.hpp"
+#include "type_vec.hpp"
+#ifdef GLM_SWIZZLE
+#      if GLM_HAS_ANONYMOUS_UNION
+#              include "_swizzle.hpp"
+#      else
+#              include "_swizzle_func.hpp"
+#      endif
+#endif //GLM_SWIZZLE
+#include <cstddef>
+
+namespace glm
+{
+       template <typename T, precision P = defaultp>
+       struct tvec1
+       {
+               //////////////////////////////////////
+               // Implementation detail
+
+               typedef tvec1<T, P> type;
+               typedef tvec1<bool, P> bool_type;
+               typedef T value_type;
+
+               //////////////////////////////////////
+               // Data
+
+#              if GLM_HAS_ANONYMOUS_UNION
+                       union
+                       {
+                               T x;
+                               T r;
+                               T s;
+/*
+#                              ifdef GLM_SWIZZLE
+                                       _GLM_SWIZZLE1_2_MEMBERS(T, P, tvec2, x)
+                                       _GLM_SWIZZLE1_2_MEMBERS(T, P, tvec2, r)
+                                       _GLM_SWIZZLE1_2_MEMBERS(T, P, tvec2, s)
+                                       _GLM_SWIZZLE1_3_MEMBERS(T, P, tvec3, x)
+                                       _GLM_SWIZZLE1_3_MEMBERS(T, P, tvec3, r)
+                                       _GLM_SWIZZLE1_3_MEMBERS(T, P, tvec3, s)
+                                       _GLM_SWIZZLE1_4_MEMBERS(T, P, tvec4, x)
+                                       _GLM_SWIZZLE1_4_MEMBERS(T, P, tvec4, r)
+                                       _GLM_SWIZZLE1_4_MEMBERS(T, P, tvec4, s)
+#                              endif//GLM_SWIZZLE*/
+                       };
+#              else
+                       union {T x, r, s;};
+/*
+#                      ifdef GLM_SWIZZLE
+                               GLM_SWIZZLE_GEN_VEC_FROM_VEC1(T, P, tvec2, tvec2, tvec3, tvec4)
+#                      endif//GLM_SWIZZLE*/
+#              endif
+
+               //////////////////////////////////////
+               // Accesses
+
+#              ifdef GLM_FORCE_SIZE_FUNC
+                       /// Return the count of components of the vector
+                       typedef size_t size_type;
+                       GLM_FUNC_DECL GLM_CONSTEXPR size_type size() const;
+
+                       GLM_FUNC_DECL T & operator[](size_type i);
+                       GLM_FUNC_DECL T const & operator[](size_type i) const;
+#              else
+                       /// Return the count of components of the vector
+                       typedef length_t length_type;
+                       GLM_FUNC_DECL GLM_CONSTEXPR length_type length() const;
+
+                       GLM_FUNC_DECL T & operator[](length_type i);
+                       GLM_FUNC_DECL T const & operator[](length_type i) const;
+#              endif//GLM_FORCE_SIZE_FUNC
+
+               //////////////////////////////////////
+               // Implicit basic constructors
+
+               GLM_FUNC_DECL tvec1();
+               GLM_FUNC_DECL tvec1(tvec1<T, P> const & v);
+               template <precision Q>
+               GLM_FUNC_DECL tvec1(tvec1<T, Q> const & v);
+
+               //////////////////////////////////////
+               // Explicit basic constructors
+
+               GLM_FUNC_DECL explicit tvec1(ctor);
+               GLM_FUNC_DECL explicit tvec1(T const & s);
+
+               //////////////////////////////////////
+               // Conversion vector constructors
+               
+               //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
+               template <typename U, precision Q>
+               GLM_FUNC_DECL explicit tvec1(tvec2<U, Q> const & v);
+               //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
+               template <typename U, precision Q>
+               GLM_FUNC_DECL explicit tvec1(tvec3<U, Q> const & v);
+               //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
+               template <typename U, precision Q>
+               GLM_FUNC_DECL explicit tvec1(tvec4<U, Q> const & v);
+
+#              ifdef GLM_FORCE_EXPLICIT_CTOR
+                       //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
+                       template <typename U, precision Q>
+                       GLM_FUNC_DECL explicit tvec1(tvec1<U, Q> const & v);
+#              else
+                       //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
+                       template <typename U, precision Q>
+                       GLM_FUNC_DECL tvec1(tvec1<U, Q> const & v);
+#              endif
+
+               //////////////////////////////////////
+               // Swizzle constructors
+
+#              if(GLM_HAS_ANONYMOUS_UNION && defined(GLM_SWIZZLE))
+                       template <int E0>
+                       GLM_FUNC_DECL tvec1(detail::_swizzle<1, T, P, tvec1<T, P>, E0, -1,-2,-3> const & that)
+                       {
+                               *this = that();
+                       }
+#              endif//(GLM_HAS_ANONYMOUS_UNION && defined(GLM_SWIZZLE))
+
+               //////////////////////////////////////
+               // Unary arithmetic operators
+
+               GLM_FUNC_DECL tvec1<T, P> & operator=(tvec1<T, P> const & v);
+
+               template <typename U> 
+               GLM_FUNC_DECL tvec1<T, P> & operator=(tvec1<U, P> const & v);
+               template <typename U> 
+               GLM_FUNC_DECL tvec1<T, P> & operator+=(U const & s);
+               template <typename U> 
+               GLM_FUNC_DECL tvec1<T, P> & operator+=(tvec1<U, P> const & v);
+               template <typename U> 
+               GLM_FUNC_DECL tvec1<T, P> & operator-=(U const & s);
+               template <typename U> 
+               GLM_FUNC_DECL tvec1<T, P> & operator-=(tvec1<U, P> const & v);
+               template <typename U> 
+               GLM_FUNC_DECL tvec1<T, P> & operator*=(U const & s);
+               template <typename U> 
+               GLM_FUNC_DECL tvec1<T, P> & operator*=(tvec1<U, P> const & v);
+               template <typename U> 
+               GLM_FUNC_DECL tvec1<T, P> & operator/=(U const & s);
+               template <typename U> 
+               GLM_FUNC_DECL tvec1<T, P> & operator/=(tvec1<U, P> const & v);
+
+               //////////////////////////////////////
+               // Increment and decrement operators
+
+               GLM_FUNC_DECL tvec1<T, P> & operator++();
+               GLM_FUNC_DECL tvec1<T, P> & operator--();
+               GLM_FUNC_DECL tvec1<T, P> operator++(int);
+               GLM_FUNC_DECL tvec1<T, P> operator--(int);
+
+               //////////////////////////////////////
+               // Unary bit operators
+
+               template <typename U> 
+               GLM_FUNC_DECL tvec1<T, P> & operator%=(U const & s);
+               template <typename U> 
+               GLM_FUNC_DECL tvec1<T, P> & operator%=(tvec1<U, P> const & v);
+               template <typename U> 
+               GLM_FUNC_DECL tvec1<T, P> & operator&=(U const & s);
+               template <typename U> 
+               GLM_FUNC_DECL tvec1<T, P> & operator&=(tvec1<U, P> const & v);
+               template <typename U> 
+               GLM_FUNC_DECL tvec1<T, P> & operator|=(U const & s);
+               template <typename U> 
+               GLM_FUNC_DECL tvec1<T, P> & operator|=(tvec1<U, P> const & v);
+               template <typename U> 
+               GLM_FUNC_DECL tvec1<T, P> & operator^=(U const & s);
+               template <typename U> 
+               GLM_FUNC_DECL tvec1<T, P> & operator^=(tvec1<U, P> const & v);
+               template <typename U> 
+               GLM_FUNC_DECL tvec1<T, P> & operator<<=(U const & s);
+               template <typename U> 
+               GLM_FUNC_DECL tvec1<T, P> & operator<<=(tvec1<U, P> const & v);
+               template <typename U> 
+               GLM_FUNC_DECL tvec1<T, P> & operator>>=(U const & s);
+               template <typename U> 
+               GLM_FUNC_DECL tvec1<T, P> & operator>>=(tvec1<U, P> const & v);
+       };
+
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec1<T, P> operator+(tvec1<T, P> const & v, T const & s);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec1<T, P> operator+(T const & s, tvec1<T, P> const & v);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec1<T, P> operator+(tvec1<T, P> const & v1, tvec1<T, P> const & v2);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec1<T, P> operator-(tvec1<T, P> const & v, T const & s);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec1<T, P> operator-(T const & s, tvec1<T, P> const & v);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec1<T, P> operator-     (tvec1<T, P> const & v1, tvec1<T, P> const & v2);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec1<T, P> operator*(tvec1<T, P> const & v, T const & s);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec1<T, P> operator*(T const & s, tvec1<T, P> const & v);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec1<T, P> operator*(tvec1<T, P> const & v1, tvec1<T, P> const & v2);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec1<T, P> operator/(tvec1<T, P> const & v, T const & s);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec1<T, P> operator/(T const & s, tvec1<T, P> const & v);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec1<T, P> operator/(tvec1<T, P> const & v1, tvec1<T, P> const & v2);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec1<T, P> operator-(tvec1<T, P> const & v);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL bool operator==(tvec1<T, P> const & v1, tvec1<T, P> const & v2);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL bool operator!=(tvec1<T, P> const & v1, tvec1<T, P> const & v2);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec1<T, P> operator%(tvec1<T, P> const & v, T const & s);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec1<T, P> operator%(T const & s, tvec1<T, P> const & v);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec1<T, P> operator%(tvec1<T, P> const & v1, tvec1<T, P> const & v2);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec1<T, P> operator&(tvec1<T, P> const & v, T const & s);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec1<T, P> operator&(T const & s, tvec1<T, P> const & v);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec1<T, P> operator&(tvec1<T, P> const & v1, tvec1<T, P> const & v2);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec1<T, P> operator|(tvec1<T, P> const & v, T const & s);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec1<T, P> operator|(T const & s, tvec1<T, P> const & v);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec1<T, P> operator|(tvec1<T, P> const & v1, tvec1<T, P> const & v2);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec1<T, P> operator^(tvec1<T, P> const & v, T const & s);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec1<T, P> operator^(T const & s, tvec1<T, P> const & v);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec1<T, P> operator^(tvec1<T, P> const & v1, tvec1<T, P> const & v2);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec1<T, P> operator<<(tvec1<T, P> const & v, T const & s);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec1<T, P> operator<<(T const & s, tvec1<T, P> const & v);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec1<T, P> operator<<(tvec1<T, P> const & v1, tvec1<T, P> const & v2);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec1<T, P> operator>>(tvec1<T, P> const & v, T const & s);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec1<T, P> operator>>(T const & s, tvec1<T, P> const & v);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec1<T, P> operator>>(tvec1<T, P> const & v1, tvec1<T, P> const & v2);
+
+       template <typename T, precision P> 
+       GLM_FUNC_DECL tvec1<T, P> operator~(tvec1<T, P> const & v);
+}//namespace glm
+
+#ifndef GLM_EXTERNAL_TEMPLATE
+#include "type_vec1.inl"
+#endif//GLM_EXTERNAL_TEMPLATE
diff --git a/include/glm/detail/type_vec1.inl b/include/glm/detail/type_vec1.inl
new file mode 100644 (file)
index 0000000..bd756cd
--- /dev/null
@@ -0,0 +1,616 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref core
+/// @file glm/detail/type_vec1.inl
+/// @date 2008-08-25 / 2011-06-15
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////
+
+namespace glm
+{
+       //////////////////////////////////////
+       // Implicit basic constructors
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec1<T, P>::tvec1()
+#              ifndef GLM_FORCE_NO_CTOR_INIT
+                       : x(0)
+#              endif
+       {}
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec1<T, P>::tvec1(tvec1<T, P> const & v)
+               : x(v.x)
+       {}
+
+       template <typename T, precision P>
+       template <precision Q>
+       GLM_FUNC_QUALIFIER tvec1<T, P>::tvec1(tvec1<T, Q> const & v)
+               : x(v.x)
+       {}
+
+       //////////////////////////////////////
+       // Explicit basic constructors
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec1<T, P>::tvec1(ctor)
+       {}
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER  tvec1<T, P>::tvec1(T const & s)
+               : x(s)
+       {}
+
+       //////////////////////////////////////
+       // Conversion vector constructors
+
+       template <typename T, precision P>
+       template <typename U, precision Q>
+       GLM_FUNC_QUALIFIER tvec1<T, P>::tvec1(tvec1<U, Q> const & v)
+               : x(static_cast<T>(v.x))
+       {}
+
+       template <typename T, precision P>
+       template <typename U, precision Q>
+       GLM_FUNC_QUALIFIER tvec1<T, P>::tvec1(tvec2<U, Q> const & v)
+               : x(static_cast<T>(v.x))
+       {}
+
+       template <typename T, precision P>
+       template <typename U, precision Q>
+       GLM_FUNC_QUALIFIER tvec1<T, P>::tvec1(tvec3<U, Q> const & v)
+               : x(static_cast<T>(v.x))
+       {}
+
+       template <typename T, precision P>
+       template <typename U, precision Q>
+       GLM_FUNC_QUALIFIER tvec1<T, P>::tvec1(tvec4<U, Q> const & v)
+               : x(static_cast<T>(v.x))
+       {}
+
+       //////////////////////////////////////
+       // Component accesses
+
+#      ifdef GLM_FORCE_SIZE_FUNC
+               template <typename T, precision P>
+               GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tvec1<T, P>::size_type tvec1<T, P>::size() const
+               {
+                       return 1;
+               }
+
+               template <typename T, precision P>
+               GLM_FUNC_QUALIFIER T & tvec1<T, P>::operator[](typename tvec1<T, P>::size_type i)
+               {
+                       assert(i >= 0 && static_cast<detail::component_count_t>(i) < detail::component_count(*this));
+                       return (&x)[i];
+               }
+
+               template <typename T, precision P>
+               GLM_FUNC_QUALIFIER T const & tvec1<T, P>::operator[](typename tvec1<T, P>::size_type i) const
+               {
+                       assert(i >= 0 && static_cast<detail::component_count_t>(i) < detail::component_count(*this));
+                       return (&x)[i];
+               }
+#      else
+               template <typename T, precision P>
+               GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tvec1<T, P>::length_type tvec1<T, P>::length() const
+               {
+                       return 1;
+               }
+
+               template <typename T, precision P>
+               GLM_FUNC_QUALIFIER T & tvec1<T, P>::operator[](typename tvec1<T, P>::length_type i)
+               {
+                       assert(i >= 0 && static_cast<detail::component_count_t>(i) < detail::component_count(*this));
+                       return (&x)[i];
+               }
+
+               template <typename T, precision P>
+               GLM_FUNC_QUALIFIER T const & tvec1<T, P>::operator[](typename tvec1<T, P>::length_type i) const
+               {
+                       assert(i >= 0 && static_cast<detail::component_count_t>(i) < detail::component_count(*this));
+                       return (&x)[i];
+               }
+#      endif//GLM_FORCE_SIZE_FUNC
+
+       //////////////////////////////////////
+       // Unary arithmetic operators
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec1<T, P> & tvec1<T, P>::operator=(tvec1<T, P> const & v)
+       {
+               this->x = v.x;
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U> 
+       GLM_FUNC_QUALIFIER tvec1<T, P> & tvec1<T, P>::operator=(tvec1<U, P> const & v)
+       {
+               this->x = static_cast<T>(v.x);
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U> 
+       GLM_FUNC_QUALIFIER tvec1<T, P> & tvec1<T, P>::operator+=(U const & s)
+       {
+               this->x += static_cast<T>(s);
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U> 
+       GLM_FUNC_QUALIFIER tvec1<T, P> & tvec1<T, P>::operator+=(tvec1<U, P> const & v)
+       {
+               this->x += static_cast<T>(v.x);
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U> 
+       GLM_FUNC_QUALIFIER tvec1<T, P> & tvec1<T, P>::operator-=(U const & s)
+       {
+               this->x -= static_cast<T>(s);
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U> 
+       GLM_FUNC_QUALIFIER tvec1<T, P> & tvec1<T, P>::operator-=(tvec1<U, P> const & v)
+       {
+               this->x -= static_cast<T>(v.x);
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U> 
+       GLM_FUNC_QUALIFIER tvec1<T, P> & tvec1<T, P>::operator*=(U const & s)
+       {
+               this->x *= static_cast<T>(s);
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U> 
+       GLM_FUNC_QUALIFIER tvec1<T, P> & tvec1<T, P>::operator*=(tvec1<U, P> const & v)
+       {
+               this->x *= static_cast<T>(v.x);
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U> 
+       GLM_FUNC_QUALIFIER tvec1<T, P> & tvec1<T, P>::operator/=(U const & s)
+       {
+               this->x /= static_cast<T>(s);
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U> 
+       GLM_FUNC_QUALIFIER tvec1<T, P> & tvec1<T, P>::operator/=(tvec1<U, P> const & v)
+       {
+               this->x /= static_cast<T>(v.x);
+               return *this;
+       }
+
+       //////////////////////////////////////
+       // Increment and decrement operators
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec1<T, P> & tvec1<T, P>::operator++()
+       {
+               ++this->x;
+               return *this;
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec1<T, P> & tvec1<T, P>::operator--()
+       {
+               --this->x;
+               return *this;
+       }
+
+       template <typename T, precision P> 
+       GLM_FUNC_QUALIFIER tvec1<T, P> tvec1<T, P>::operator++(int)
+       {
+               tvec1<T, P> Result(*this);
+               ++*this;
+               return Result;
+       }
+
+       template <typename T, precision P> 
+       GLM_FUNC_QUALIFIER tvec1<T, P> tvec1<T, P>::operator--(int)
+       {
+               tvec1<T, P> Result(*this);
+               --*this;
+               return Result;
+       }
+
+       //////////////////////////////////////
+       // Boolean operators
+
+       template <typename T, precision P> 
+       GLM_FUNC_QUALIFIER bool operator==(tvec1<T, P> const & v1, tvec1<T, P> const & v2)
+       {
+               return (v1.x == v2.x);
+       }
+
+       template <typename T, precision P> 
+       GLM_FUNC_QUALIFIER bool operator!=(tvec1<T, P> const & v1, tvec1<T, P> const & v2)
+       {
+               return (v1.x != v2.x);
+       }
+
+       //////////////////////////////////////
+       // Unary bit operators
+
+       template <typename T, precision P>
+       template <typename U> 
+       GLM_FUNC_QUALIFIER tvec1<T, P> & tvec1<T, P>::operator%=(U const & s)
+       {
+               this->x %= static_cast<T>(s);
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U> 
+       GLM_FUNC_QUALIFIER tvec1<T, P> & tvec1<T, P>::operator%=(tvec1<U, P> const & v)
+       {
+               this->x %= static_cast<T>(v.x);
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U> 
+       GLM_FUNC_QUALIFIER tvec1<T, P> & tvec1<T, P>::operator&=(U const & s)
+       {
+               this->x &= static_cast<T>(s);
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U> 
+       GLM_FUNC_QUALIFIER tvec1<T, P> & tvec1<T, P>::operator&=(tvec1<U, P> const & v)
+       {
+               this->x &= static_cast<T>(v.x);
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U> 
+       GLM_FUNC_QUALIFIER tvec1<T, P> & tvec1<T, P>::operator|=(U const & s)
+       {
+               this->x |= static_cast<T>(s);
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U> 
+       GLM_FUNC_QUALIFIER tvec1<T, P> & tvec1<T, P>::operator|=(tvec1<U, P> const & v)
+       {
+               this->x |= U(v.x);
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U> 
+       GLM_FUNC_QUALIFIER tvec1<T, P> & tvec1<T, P>::operator^=(U const & s)
+       {
+               this->x ^= static_cast<T>(s);
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U> 
+       GLM_FUNC_QUALIFIER tvec1<T, P> & tvec1<T, P>::operator^=(tvec1<U, P> const & v)
+       {
+               this->x ^= static_cast<T>(v.x);
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U> 
+       GLM_FUNC_QUALIFIER tvec1<T, P> & tvec1<T, P>::operator<<=(U const & s)
+       {
+               this->x <<= static_cast<T>(s);
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U> 
+       GLM_FUNC_QUALIFIER tvec1<T, P> & tvec1<T, P>::operator<<=(tvec1<U, P> const & v)
+       {
+               this->x <<= static_cast<T>(v.x);
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U> 
+       GLM_FUNC_QUALIFIER tvec1<T, P> & tvec1<T, P>::operator>>=(U const & s)
+       {
+               this->x >>= static_cast<T>(s);
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U> 
+       GLM_FUNC_QUALIFIER tvec1<T, P> & tvec1<T, P>::operator>>=(tvec1<U, P> const & v)
+       {
+               this->x >>= static_cast<T>(v.x);
+               return *this;
+       }
+
+       //////////////////////////////////////
+       // Binary arithmetic operators
+
+       template <typename T, precision P> 
+       GLM_FUNC_QUALIFIER tvec1<T, P> operator+(tvec1<T, P> const & v, T const & s)
+       {
+               return tvec1<T, P>(
+                       v.x + s);
+       }
+
+       template <typename T, precision P> 
+       GLM_FUNC_QUALIFIER tvec1<T, P> operator+(T const & s, tvec1<T, P> const & v)
+       {
+               return tvec1<T, P>(
+                       s + v.x);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec1<T, P> operator+(tvec1<T, P> const & v1, tvec1<T, P> const & v2)
+       {
+               return tvec1<T, P>(
+                       v1.x + v2.x);
+       }
+
+       //operator-
+       template <typename T, precision P> 
+       GLM_FUNC_QUALIFIER tvec1<T, P> operator-(tvec1<T, P> const & v, T const & s)
+       {
+               return tvec1<T, P>(
+                       v.x - s);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec1<T, P> operator-(T const & s, tvec1<T, P> const & v)
+       {
+               return tvec1<T, P>(
+                       s - v.x);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec1<T, P> operator-(tvec1<T, P> const & v1, tvec1<T, P> const & v2)
+       {
+               return tvec1<T, P>(
+                       v1.x - v2.x);
+       }
+
+       //operator*
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec1<T, P> operator*(tvec1<T, P> const & v, T const & s)
+       {
+               return tvec1<T, P>(
+                       v.x * s);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec1<T, P> operator*(T const & s, tvec1<T, P> const & v)
+       {
+               return tvec1<T, P>(
+                       s * v.x);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec1<T, P> operator*(tvec1<T, P> const & v1, tvec1<T, P> const & v2)
+       {
+               return tvec1<T, P>(
+                       v1.x * v2.x);
+       }
+
+       //operator/
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec1<T, P> operator/(tvec1<T, P> const & v, T const & s)
+       {
+               return tvec1<T, P>(
+                       v.x / s);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec1<T, P> operator/(T const & s, tvec1<T, P> const & v)
+       {
+               return tvec1<T, P>(
+                       s / v.x);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec1<T, P> operator/(tvec1<T, P> const & v1, tvec1<T, P> const & v2)
+       {
+               return tvec1<T, P>(
+                       v1.x / v2.x);
+       }
+
+       // Unary constant operators
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec1<T, P> operator-(tvec1<T, P> const & v)
+       {
+               return tvec1<T, P>(
+                       -v.x);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec1<T, P> operator++(tvec1<T, P> const & v, int)
+       {
+               return tvec1<T, P>(
+                       v.x + T(1));
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec1<T, P> operator--(tvec1<T, P> const & v, int)
+       {
+               return tvec1<T, P>(
+                       v.x - T(1));
+       }
+
+       //////////////////////////////////////
+       // Binary bit operators
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec1<T, P> operator%(tvec1<T, P> const & v, T const & s)
+       {
+               return tvec1<T, P>(
+                       v.x % s);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec1<T, P> operator%(T const & s, tvec1<T, P> const & v)
+       {
+               return tvec1<T, P>(
+                       s % v.x);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec1<T, P> operator%(tvec1<T, P> const & v1, tvec1<T, P> const & v2)
+       {
+               return tvec1<T, P>(
+                       v1.x % v2.x);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec1<T, P> operator&(tvec1<T, P> const & v, T const & s)
+       {
+               return tvec1<T, P>(
+                       v.x & s);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec1<T, P> operator&(T const & s, tvec1<T, P> const & v)
+       {
+               return tvec1<T, P>(
+                       s & v.x);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec1<T, P> operator&(tvec1<T, P> const & v1, tvec1<T, P> const & v2)
+       {
+               return tvec1<T, P>(
+                       v1.x & v2.x);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec1<T, P> operator|(tvec1<T, P> const & v, T const & s)
+       {
+               return tvec1<T, P>(
+                       v.x | s);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec1<T, P> operator|(T const & s, tvec1<T, P> const & v)
+       {
+               return tvec1<T, P>(
+                       s | v.x);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec1<T, P> operator|(tvec1<T, P> const & v1, tvec1<T, P> const & v2)
+       {
+               return tvec1<T, P>(
+                       v1.x | v2.x);
+       }
+               
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec1<T, P> operator^(tvec1<T, P> const & v, T const & s)
+       {
+               return tvec1<T, P>(
+                       v.x ^ s);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec1<T, P> operator^(T const & s, tvec1<T, P> const & v)
+       {
+               return tvec1<T, P>(
+                       s ^ v.x);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec1<T, P> operator^(tvec1<T, P> const & v1, tvec1<T, P> const & v2)
+       {
+               return tvec1<T, P>(
+                       v1.x ^ v2.x);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec1<T, P> operator<<(tvec1<T, P> const & v, T const & s)
+       {
+               return tvec1<T, P>(
+                       v.x << s);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec1<T, P> operator<<(T const & s, tvec1<T, P> const & v)
+       {
+               return tvec1<T, P>(
+                       s << v.x);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec1<T, P> operator<<(tvec1<T, P> const & v1, tvec1<T, P> const & v2)
+       {
+               return tvec1<T, P>(
+                       v1.x << v2.x);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec1<T, P> operator>>(tvec1<T, P> const & v, T const & s)
+       {
+               return tvec1<T, P>(
+                       v.x >> s);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec1<T, P> operator>>(T const & s, tvec1<T, P> const & v)
+       {
+               return tvec1<T, P>(
+                       s >> v.x);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec1<T, P> operator>>(tvec1<T, P> const & v1, tvec1<T, P> const & v2)
+       {
+               return tvec1<T, P>(
+                       v1.x >> v2.x);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec1<T, P> operator~(tvec1<T, P> const & v)
+       {
+               return tvec1<T, P>(
+                       ~v.x);
+       }
+}//namespace glm
diff --git a/include/glm/detail/type_vec2.hpp b/include/glm/detail/type_vec2.hpp
new file mode 100644 (file)
index 0000000..29cfa09
--- /dev/null
@@ -0,0 +1,403 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref core
+/// @file glm/detail/type_vec2.hpp
+/// @date 2008-08-18 / 2013-08-27
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////
+
+#pragma once
+
+//#include "../fwd.hpp"
+#include "type_vec.hpp"
+#ifdef GLM_SWIZZLE
+#      if GLM_HAS_ANONYMOUS_UNION
+#              include "_swizzle.hpp"
+#      else
+#              include "_swizzle_func.hpp"
+#      endif
+#endif //GLM_SWIZZLE
+#include <cstddef>
+
+namespace glm
+{
+       template <typename T, precision P = defaultp>
+       struct tvec2
+       {
+               //////////////////////////////////////
+               // Implementation detail
+
+               typedef tvec2<T, P> type;
+               typedef tvec2<bool, P> bool_type;
+               typedef T value_type;
+
+               //////////////////////////////////////
+               // Data
+
+#              if GLM_HAS_ANONYMOUS_UNION
+                       union
+                       {
+                               struct{ T x, y; };
+                               struct{ T r, g; };
+                               struct{ T s, t; };
+
+#                              ifdef GLM_SWIZZLE
+                                       _GLM_SWIZZLE2_2_MEMBERS(T, P, tvec2, x, y)
+                                       _GLM_SWIZZLE2_2_MEMBERS(T, P, tvec2, r, g)
+                                       _GLM_SWIZZLE2_2_MEMBERS(T, P, tvec2, s, t)
+                                       _GLM_SWIZZLE2_3_MEMBERS(T, P, tvec3, x, y)
+                                       _GLM_SWIZZLE2_3_MEMBERS(T, P, tvec3, r, g)
+                                       _GLM_SWIZZLE2_3_MEMBERS(T, P, tvec3, s, t)
+                                       _GLM_SWIZZLE2_4_MEMBERS(T, P, tvec4, x, y)
+                                       _GLM_SWIZZLE2_4_MEMBERS(T, P, tvec4, r, g)
+                                       _GLM_SWIZZLE2_4_MEMBERS(T, P, tvec4, s, t)
+#                              endif//GLM_SWIZZLE
+                       };
+#              else
+                       union {T x, r, s;};
+                       union {T y, g, t;};
+
+#                      ifdef GLM_SWIZZLE
+                               GLM_SWIZZLE_GEN_VEC_FROM_VEC2(T, P, tvec2, tvec2, tvec3, tvec4)
+#                      endif//GLM_SWIZZLE
+#              endif
+
+               //////////////////////////////////////
+               // Component accesses
+
+#              ifdef GLM_FORCE_SIZE_FUNC
+                       /// Return the count of components of the vector
+                       typedef size_t size_type;
+                       GLM_FUNC_DECL GLM_CONSTEXPR size_type size() const;
+
+                       GLM_FUNC_DECL T & operator[](size_type i);
+                       GLM_FUNC_DECL T const & operator[](size_type i) const;
+#              else
+                       /// Return the count of components of the vector
+                       typedef length_t length_type;
+                       GLM_FUNC_DECL GLM_CONSTEXPR length_type length() const;
+
+                       GLM_FUNC_DECL T & operator[](length_type i);
+                       GLM_FUNC_DECL T const & operator[](length_type i) const;
+#              endif//GLM_FORCE_SIZE_FUNC
+
+               //////////////////////////////////////
+               // Implicit basic constructors
+
+               GLM_FUNC_DECL tvec2();
+               GLM_FUNC_DECL tvec2(tvec2<T, P> const & v);
+               template <precision Q>
+               GLM_FUNC_DECL tvec2(tvec2<T, Q> const & v);
+
+               //////////////////////////////////////
+               // Explicit basic constructors
+
+               GLM_FUNC_DECL explicit tvec2(ctor);
+               GLM_FUNC_DECL explicit tvec2(T const & s);
+               GLM_FUNC_DECL tvec2(T const & s1, T const & s2);
+
+               //////////////////////////////////////
+               // Conversion constructors
+
+               /// Explicit converions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
+               template <typename A, typename B>
+               GLM_FUNC_DECL tvec2(A const & x, B const & y);
+               template <typename A, typename B>
+               GLM_FUNC_DECL tvec2(tvec1<A, P> const & v1, tvec1<B, P> const & v2);
+
+               //////////////////////////////////////
+               // Conversion vector constructors
+
+               //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
+               template <typename U, precision Q>
+               GLM_FUNC_DECL explicit tvec2(tvec3<U, Q> const & v);
+               //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
+               template <typename U, precision Q>
+               GLM_FUNC_DECL explicit tvec2(tvec4<U, Q> const & v);
+
+#              ifdef GLM_FORCE_EXPLICIT_CTOR
+                       //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
+                       template <typename U, precision Q>
+                       GLM_FUNC_DECL explicit tvec2(tvec2<U, Q> const & v);
+#              else
+                       //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
+                       template <typename U, precision Q>
+                       GLM_FUNC_DECL tvec2(tvec2<U, Q> const & v);
+#              endif
+
+               //////////////////////////////////////
+               // Swizzle constructors
+
+#              if GLM_HAS_ANONYMOUS_UNION && defined(GLM_SWIZZLE)
+                       template <int E0, int E1>
+                       GLM_FUNC_DECL tvec2(detail::_swizzle<2, T, P, tvec2<T, P>, E0, E1,-1,-2> const & that)
+                       {
+                               *this = that();
+                       }
+#              endif// GLM_HAS_ANONYMOUS_UNION && defined(GLM_SWIZZLE)
+
+               //////////////////////////////////////
+               // Unary arithmetic operators
+
+               GLM_FUNC_DECL tvec2<T, P>& operator=(tvec2<T, P> const & v);
+
+               template <typename U>
+               GLM_FUNC_DECL tvec2<T, P>& operator=(tvec2<U, P> const & v);
+               template <typename U>
+               GLM_FUNC_DECL tvec2<T, P>& operator+=(U s);
+               template <typename U>
+               GLM_FUNC_DECL tvec2<T, P>& operator+=(tvec1<U, P> const & v);
+               template <typename U>
+               GLM_FUNC_DECL tvec2<T, P>& operator+=(tvec2<U, P> const & v);
+               template <typename U>
+               GLM_FUNC_DECL tvec2<T, P>& operator-=(U s);
+               template <typename U>
+               GLM_FUNC_DECL tvec2<T, P>& operator-=(tvec1<U, P> const & v);
+               template <typename U>
+               GLM_FUNC_DECL tvec2<T, P>& operator-=(tvec2<U, P> const & v);
+               template <typename U>
+               GLM_FUNC_DECL tvec2<T, P>& operator*=(U s);
+               template <typename U>
+               GLM_FUNC_DECL tvec2<T, P>& operator*=(tvec1<U, P> const & v);
+               template <typename U>
+               GLM_FUNC_DECL tvec2<T, P>& operator*=(tvec2<U, P> const & v);
+               template <typename U>
+               GLM_FUNC_DECL tvec2<T, P>& operator/=(U s);
+               template <typename U>
+               GLM_FUNC_DECL tvec2<T, P>& operator/=(tvec1<U, P> const & v);
+               template <typename U>
+               GLM_FUNC_DECL tvec2<T, P>& operator/=(tvec2<U, P> const & v);
+
+               //////////////////////////////////////
+               // Increment and decrement operators
+
+               GLM_FUNC_DECL tvec2<T, P> & operator++();
+               GLM_FUNC_DECL tvec2<T, P> & operator--();
+               GLM_FUNC_DECL tvec2<T, P> operator++(int);
+               GLM_FUNC_DECL tvec2<T, P> operator--(int);
+
+               //////////////////////////////////////
+               // Unary bit operators
+
+               template <typename U> 
+               GLM_FUNC_DECL tvec2<T, P> & operator%=(U s);
+               template <typename U> 
+               GLM_FUNC_DECL tvec2<T, P> & operator%=(tvec1<U, P> const & v);
+               template <typename U> 
+               GLM_FUNC_DECL tvec2<T, P> & operator%=(tvec2<U, P> const & v);
+               template <typename U> 
+               GLM_FUNC_DECL tvec2<T, P> & operator&=(U s);
+               template <typename U> 
+               GLM_FUNC_DECL tvec2<T, P> & operator&=(tvec1<U, P> const & v);
+               template <typename U> 
+               GLM_FUNC_DECL tvec2<T, P> & operator&=(tvec2<U, P> const & v);
+               template <typename U> 
+               GLM_FUNC_DECL tvec2<T, P> & operator|=(U s);
+               template <typename U> 
+               GLM_FUNC_DECL tvec2<T, P> & operator|=(tvec1<U, P> const & v);
+               template <typename U> 
+               GLM_FUNC_DECL tvec2<T, P> & operator|=(tvec2<U, P> const & v);
+               template <typename U> 
+               GLM_FUNC_DECL tvec2<T, P> & operator^=(U s);
+               template <typename U> 
+               GLM_FUNC_DECL tvec2<T, P> & operator^=(tvec1<U, P> const & v);
+               template <typename U> 
+               GLM_FUNC_DECL tvec2<T, P> & operator^=(tvec2<U, P> const & v);
+               template <typename U> 
+               GLM_FUNC_DECL tvec2<T, P> & operator<<=(U s);
+               template <typename U> 
+               GLM_FUNC_DECL tvec2<T, P> & operator<<=(tvec1<U, P> const & v);
+               template <typename U> 
+               GLM_FUNC_DECL tvec2<T, P> & operator<<=(tvec2<U, P> const & v);
+               template <typename U> 
+               GLM_FUNC_DECL tvec2<T, P> & operator>>=(U s);
+               template <typename U> 
+               GLM_FUNC_DECL tvec2<T, P> & operator>>=(tvec1<U, P> const & v);
+               template <typename U> 
+               GLM_FUNC_DECL tvec2<T, P> & operator>>=(tvec2<U, P> const & v);
+       };
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec2<T, P> operator+(tvec2<T, P> const & v, T const & s);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec2<T, P> operator+(tvec2<T, P> const & v1, tvec1<T, P> const & v2);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec2<T, P> operator+(T const & s, tvec2<T, P> const & v);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec2<T, P> operator+(tvec1<T, P> const & v1, tvec2<T, P> const & v2);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec2<T, P> operator+(tvec2<T, P> const & v1, tvec2<T, P> const & v2);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec2<T, P> operator-(tvec2<T, P> const & v, T const & s);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec2<T, P> operator-(tvec2<T, P> const & v1, tvec1<T, P> const & v2);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec2<T, P> operator-(T const & s, tvec2<T, P> const & v);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec2<T, P> operator-(tvec1<T, P> const & v1, tvec2<T, P> const & v2);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec2<T, P> operator-(tvec2<T, P> const & v1, tvec2<T, P> const & v2);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec2<T, P> operator*(tvec2<T, P> const & v, T const & s);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec2<T, P> operator*(tvec2<T, P> const & v1, tvec1<T, P> const & v2);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec2<T, P> operator*(T const & s, tvec2<T, P> const & v);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec2<T, P> operator*(tvec1<T, P> const & v1, tvec2<T, P> const & v2);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec2<T, P> operator*(tvec2<T, P> const & v1, tvec2<T, P> const & v2);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec2<T, P> operator/(tvec2<T, P> const & v, T const & s);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec2<T, P> operator/(tvec2<T, P> const & v1, tvec1<T, P> const & v2);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec2<T, P> operator/(T const & s, tvec2<T, P> const & v);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec2<T, P> operator/(tvec1<T, P> const & v1, tvec2<T, P> const & v2);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec2<T, P> operator/(tvec2<T, P> const & v1, tvec2<T, P> const & v2);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec2<T, P> operator-(tvec2<T, P> const & v);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec2<T, P> operator%(tvec2<T, P> const & v, T const & s);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec2<T, P> operator%(tvec2<T, P> const & v1, tvec1<T, P> const & v2);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec2<T, P> operator%(T const & s, tvec2<T, P> const & v);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec2<T, P> operator%(tvec1<T, P> const & v1, tvec2<T, P> const & v2);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec2<T, P> operator%(tvec2<T, P> const & v1, tvec2<T, P> const & v2);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec2<T, P> operator&(tvec2<T, P> const & v, T const & s);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec2<T, P> operator&(tvec2<T, P> const & v1, tvec1<T, P> const & v2);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec2<T, P> operator&(T const & s, tvec2<T, P> const & v);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec2<T, P> operator&(tvec1<T, P> const & v1, tvec2<T, P> const & v2);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec2<T, P> operator&(tvec2<T, P> const & v1, tvec2<T, P> const & v2);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec2<T, P> operator|(tvec2<T, P> const & v, T const & s);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec2<T, P> operator|(tvec2<T, P> const & v1, tvec1<T, P> const & v2);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec2<T, P> operator|(T const & s, tvec2<T, P> const & v);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec2<T, P> operator|(tvec1<T, P> const & v1, tvec2<T, P> const & v2);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec2<T, P> operator|(tvec2<T, P> const & v1, tvec2<T, P> const & v2);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec2<T, P> operator^(tvec2<T, P> const & v, T const & s);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec2<T, P> operator^(tvec2<T, P> const & v1, tvec1<T, P> const & v2);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec2<T, P> operator^(T const & s, tvec2<T, P> const & v);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec2<T, P> operator^(tvec1<T, P> const & v1, tvec2<T, P> const & v2);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec2<T, P> operator^(tvec2<T, P> const & v1, tvec2<T, P> const & v2);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec2<T, P> operator<<(tvec2<T, P> const & v, T const & s);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec2<T, P> operator<<(tvec2<T, P> const & v1, tvec1<T, P> const & v2);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec2<T, P> operator<<(T const & s, tvec2<T, P> const & v);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec2<T, P> operator<<(tvec1<T, P> const & v1, tvec2<T, P> const & v2);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec2<T, P> operator<<(tvec2<T, P> const & v1, tvec2<T, P> const & v2);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec2<T, P> operator>>(tvec2<T, P> const & v, T const & s);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec2<T, P> operator>>(tvec2<T, P> const & v1, tvec1<T, P> const & v2);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec2<T, P> operator>>(T const & s, tvec2<T, P> const & v);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec2<T, P> operator>>(tvec1<T, P> const & v1, tvec2<T, P> const & v2);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec2<T, P> operator>>(tvec2<T, P> const & v1, tvec2<T, P> const & v2);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec2<T, P> operator~(tvec2<T, P> const & v);
+}//namespace glm
+
+#ifndef GLM_EXTERNAL_TEMPLATE
+#include "type_vec2.inl"
+#endif//GLM_EXTERNAL_TEMPLATE
diff --git a/include/glm/detail/type_vec2.inl b/include/glm/detail/type_vec2.inl
new file mode 100644 (file)
index 0000000..4db2947
--- /dev/null
@@ -0,0 +1,909 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref core
+/// @file glm/core/type_tvec2.inl
+/// @date 2008-08-18 / 2011-06-15
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////
+
+namespace glm
+{
+#ifdef GLM_FORCE_SIZE_FUNC
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER GLM_CONSTEXPR size_t tvec2<T, P>::size() const
+       {
+               return 2;
+       }
+#else
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER GLM_CONSTEXPR length_t tvec2<T, P>::length() const
+       {
+               return 2;
+       }
+#endif
+
+       //////////////////////////////////////
+       // Accesses
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER T & tvec2<T, P>::operator[](length_t i)
+       {
+               assert(i >= 0 && static_cast<detail::component_count_t>(i) < detail::component_count(*this));
+               return (&x)[i];
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER T const & tvec2<T, P>::operator[](length_t i) const
+       {
+               assert(i >= 0 && static_cast<detail::component_count_t>(i) < detail::component_count(*this));
+               return (&x)[i];
+       }
+
+       //////////////////////////////////////
+       // Implicit basic constructors
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec2<T, P>::tvec2()
+#              ifndef GLM_FORCE_NO_CTOR_INIT
+                       : x(0), y(0)
+#              endif
+       {}
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec2<T, P>::tvec2(tvec2<T, P> const & v)
+               : x(v.x), y(v.y)
+       {}
+
+       template <typename T, precision P>
+       template <precision Q>
+       GLM_FUNC_QUALIFIER tvec2<T, P>::tvec2(tvec2<T, Q> const & v)
+               : x(v.x), y(v.y)
+       {}
+
+       //////////////////////////////////////
+       // Explicit basic constructors
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec2<T, P>::tvec2(ctor)
+       {}
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec2<T, P>::tvec2(T const & s)
+               : x(s), y(s)
+       {}
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec2<T, P>::tvec2(T const & s1, T const & s2)
+               : x(s1), y(s2)
+       {}
+
+       //////////////////////////////////////
+       // Conversion scalar constructors
+
+       template <typename T, precision P>
+       template <typename A, typename B>
+       GLM_FUNC_QUALIFIER tvec2<T, P>::tvec2(A const & a, B const & b)
+               : x(static_cast<T>(a))
+               , y(static_cast<T>(b))
+       {}
+
+       template <typename T, precision P>
+       template <typename A, typename B>
+       GLM_FUNC_QUALIFIER tvec2<T, P>::tvec2(tvec1<A, P> const & a, tvec1<B, P> const & b)
+               : x(static_cast<T>(a.x))
+               , y(static_cast<T>(b.x))
+       {}
+
+       //////////////////////////////////////
+       // Conversion vector constructors
+
+       template <typename T, precision P>
+       template <typename U, precision Q>
+       GLM_FUNC_QUALIFIER tvec2<T, P>::tvec2(tvec2<U, Q> const & v)
+               : x(static_cast<T>(v.x))
+               , y(static_cast<T>(v.y))
+       {}
+
+       template <typename T, precision P>
+       template <typename U, precision Q>
+       GLM_FUNC_QUALIFIER tvec2<T, P>::tvec2(tvec3<U, Q> const & v)
+               : x(static_cast<T>(v.x))
+               , y(static_cast<T>(v.y))
+       {}
+
+       template <typename T, precision P>
+       template <typename U, precision Q>
+       GLM_FUNC_QUALIFIER tvec2<T, P>::tvec2(tvec4<U, Q> const & v)
+               : x(static_cast<T>(v.x))
+               , y(static_cast<T>(v.y))
+       {}
+
+       //////////////////////////////////////
+       // Unary arithmetic operators
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec2<T, P> & tvec2<T, P>::operator=(tvec2<T, P> const & v)
+       {
+               this->x = v.x;
+               this->y = v.y;
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U>
+       GLM_FUNC_QUALIFIER tvec2<T, P> & tvec2<T, P>::operator=(tvec2<U, P> const & v)
+       {
+               this->x = static_cast<T>(v.x);
+               this->y = static_cast<T>(v.y);
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U>
+       GLM_FUNC_QUALIFIER tvec2<T, P> & tvec2<T, P>::operator+=(U s)
+       {
+               this->x += static_cast<T>(s);
+               this->y += static_cast<T>(s);
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U>
+       GLM_FUNC_QUALIFIER tvec2<T, P> & tvec2<T, P>::operator+=(tvec1<U, P> const & v)
+       {
+               this->x += static_cast<T>(v.x);
+               this->y += static_cast<T>(v.x);
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U>
+       GLM_FUNC_QUALIFIER tvec2<T, P> & tvec2<T, P>::operator+=(tvec2<U, P> const & v)
+       {
+               this->x += static_cast<T>(v.x);
+               this->y += static_cast<T>(v.y);
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U>
+       GLM_FUNC_QUALIFIER tvec2<T, P> & tvec2<T, P>::operator-=(U s)
+       {
+               this->x -= static_cast<T>(s);
+               this->y -= static_cast<T>(s);
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U>
+       GLM_FUNC_QUALIFIER tvec2<T, P> & tvec2<T, P>::operator-=(tvec1<U, P> const & v)
+       {
+               this->x -= static_cast<T>(v.x);
+               this->y -= static_cast<T>(v.x);
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U>
+       GLM_FUNC_QUALIFIER tvec2<T, P> & tvec2<T, P>::operator-=(tvec2<U, P> const & v)
+       {
+               this->x -= static_cast<T>(v.x);
+               this->y -= static_cast<T>(v.y);
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U>
+       GLM_FUNC_QUALIFIER tvec2<T, P> & tvec2<T, P>::operator*=(U s)
+       {
+               this->x *= static_cast<T>(s);
+               this->y *= static_cast<T>(s);
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U>
+       GLM_FUNC_QUALIFIER tvec2<T, P> & tvec2<T, P>::operator*=(tvec1<U, P> const & v)
+       {
+               this->x *= static_cast<T>(v.x);
+               this->y *= static_cast<T>(v.x);
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U>
+       GLM_FUNC_QUALIFIER tvec2<T, P> & tvec2<T, P>::operator*=(tvec2<U, P> const & v)
+       {
+               this->x *= static_cast<T>(v.x);
+               this->y *= static_cast<T>(v.y);
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U>
+       GLM_FUNC_QUALIFIER tvec2<T, P> & tvec2<T, P>::operator/=(U s)
+       {
+               this->x /= static_cast<T>(s);
+               this->y /= static_cast<T>(s);
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U>
+       GLM_FUNC_QUALIFIER tvec2<T, P> & tvec2<T, P>::operator/=(tvec1<U, P> const & v)
+       {
+               this->x /= static_cast<T>(v.x);
+               this->y /= static_cast<T>(v.x);
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U>
+       GLM_FUNC_QUALIFIER tvec2<T, P> & tvec2<T, P>::operator/=(tvec2<U, P> const & v)
+       {
+               this->x /= static_cast<T>(v.x);
+               this->y /= static_cast<T>(v.y);
+               return *this;
+       }
+
+       //////////////////////////////////////
+       // Increment and decrement operators
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec2<T, P> & tvec2<T, P>::operator++()
+       {
+               ++this->x;
+               ++this->y;
+               return *this;
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec2<T, P> & tvec2<T, P>::operator--()
+       {
+               --this->x;
+               --this->y;
+               return *this;
+       }
+
+       template <typename T, precision P> 
+       GLM_FUNC_QUALIFIER tvec2<T, P> tvec2<T, P>::operator++(int)
+       {
+               tvec2<T, P> Result(*this);
+               ++*this;
+               return Result;
+       }
+
+       template <typename T, precision P> 
+       GLM_FUNC_QUALIFIER tvec2<T, P> tvec2<T, P>::operator--(int)
+       {
+               tvec2<T, P> Result(*this);
+               --*this;
+               return Result;
+       }
+
+       //////////////////////////////////////
+       // Boolean operators
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER bool operator==(tvec2<T, P> const & v1, tvec2<T, P> const & v2)
+       {
+               return (v1.x == v2.x) && (v1.y == v2.y);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER bool operator!=(tvec2<T, P> const & v1, tvec2<T, P> const & v2)
+       {
+               return (v1.x != v2.x) || (v1.y != v2.y);
+       }
+
+       //////////////////////////////////////
+       // Unary bit operators
+
+       template <typename T, precision P>
+       template <typename U>
+       GLM_FUNC_QUALIFIER tvec2<T, P> & tvec2<T, P>::operator%=(U s)
+       {
+               this->x %= static_cast<T>(s);
+               this->y %= static_cast<T>(s);
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U>
+       GLM_FUNC_QUALIFIER tvec2<T, P> & tvec2<T, P>::operator%=(tvec1<U, P> const & v)
+       {
+               this->x %= static_cast<T>(v.x);
+               this->y %= static_cast<T>(v.x);
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U>
+       GLM_FUNC_QUALIFIER tvec2<T, P> & tvec2<T, P>::operator%=(tvec2<U, P> const & v)
+       {
+               this->x %= static_cast<T>(v.x);
+               this->y %= static_cast<T>(v.y);
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U>
+       GLM_FUNC_QUALIFIER tvec2<T, P> & tvec2<T, P>::operator&=(U s)
+       {
+               this->x &= static_cast<T>(s);
+               this->y &= static_cast<T>(s);
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U>
+       GLM_FUNC_QUALIFIER tvec2<T, P> & tvec2<T, P>::operator&=(tvec1<U, P> const & v)
+       {
+               this->x &= static_cast<T>(v.x);
+               this->y &= static_cast<T>(v.x);
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U>
+       GLM_FUNC_QUALIFIER tvec2<T, P> & tvec2<T, P>::operator&=(tvec2<U, P> const & v)
+       {
+               this->x &= static_cast<T>(v.x);
+               this->y &= static_cast<T>(v.y);
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U>
+       GLM_FUNC_QUALIFIER tvec2<T, P> & tvec2<T, P>::operator|=(U s)
+       {
+               this->x |= static_cast<T>(s);
+               this->y |= static_cast<T>(s);
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U>
+       GLM_FUNC_QUALIFIER tvec2<T, P> & tvec2<T, P>::operator|=(tvec1<U, P> const & v)
+       {
+               this->x |= static_cast<T>(v.x);
+               this->y |= static_cast<T>(v.x);
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U>
+       GLM_FUNC_QUALIFIER tvec2<T, P> & tvec2<T, P>::operator|=(tvec2<U, P> const & v)
+       {
+               this->x |= static_cast<T>(v.x);
+               this->y |= static_cast<T>(v.y);
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U>
+       GLM_FUNC_QUALIFIER tvec2<T, P> & tvec2<T, P>::operator^=(U s)
+       {
+               this->x ^= static_cast<T>(s);
+               this->y ^= static_cast<T>(s);
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U>
+       GLM_FUNC_QUALIFIER tvec2<T, P> & tvec2<T, P>::operator^=(tvec1<U, P> const & v)
+       {
+               this->x ^= static_cast<T>(v.x);
+               this->y ^= static_cast<T>(v.x);
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U>
+       GLM_FUNC_QUALIFIER tvec2<T, P> & tvec2<T, P>::operator^=(tvec2<U, P> const & v)
+       {
+               this->x ^= static_cast<T>(v.x);
+               this->y ^= static_cast<T>(v.y);
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U>
+       GLM_FUNC_QUALIFIER tvec2<T, P> & tvec2<T, P>::operator<<=(U s)
+       {
+               this->x <<= static_cast<T>(s);
+               this->y <<= static_cast<T>(s);
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U>
+       GLM_FUNC_QUALIFIER tvec2<T, P> & tvec2<T, P>::operator<<=(tvec1<U, P> const & v)
+       {
+               this->x <<= static_cast<T>(v.x);
+               this->y <<= static_cast<T>(v.x);
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U>
+       GLM_FUNC_QUALIFIER tvec2<T, P> & tvec2<T, P>::operator<<=(tvec2<U, P> const & v)
+       {
+               this->x <<= static_cast<T>(v.x);
+               this->y <<= static_cast<T>(v.y);
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U>
+       GLM_FUNC_QUALIFIER tvec2<T, P> & tvec2<T, P>::operator>>=(U s)
+       {
+               this->x >>= static_cast<T>(s);
+               this->y >>= static_cast<T>(s);
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U>
+       GLM_FUNC_QUALIFIER tvec2<T, P> & tvec2<T, P>::operator>>=(tvec1<U, P> const & v)
+       {
+               this->x >>= static_cast<T>(v.x);
+               this->y >>= static_cast<T>(v.x);
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U>
+       GLM_FUNC_QUALIFIER tvec2<T, P> & tvec2<T, P>::operator>>=(tvec2<U, P> const & v)
+       {
+               this->x >>= static_cast<T>(v.x);
+               this->y >>= static_cast<T>(v.y);
+               return *this;
+       }
+
+       //////////////////////////////////////
+       // Binary arithmetic operators
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec2<T, P> operator+(tvec2<T, P> const & v, T const & s)
+       {
+               return tvec2<T, P>(
+                       v.x + s,
+                       v.y + s);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec2<T, P> operator+(tvec2<T, P> const & v1, tvec1<T, P> const & v2)
+       {
+               return tvec2<T, P>(
+                       v1.x + v2.x,
+                       v1.y + v2.x);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec2<T, P> operator+(T const & s, tvec2<T, P> const & v)
+       {
+               return tvec2<T, P>(
+                       s + v.x,
+                       s + v.y);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec2<T, P> operator+(tvec1<T, P> const & v1, tvec2<T, P> const & v2)
+       {
+               return tvec2<T, P>(
+                       v1.x + v2.x,
+                       v1.x + v2.y);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec2<T, P> operator+(tvec2<T, P> const & v1, tvec2<T, P> const & v2)
+       {
+               return tvec2<T, P>(
+                       v1.x + v2.x,
+                       v1.y + v2.y);
+       }
+
+       //operator-
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec2<T, P> operator-(tvec2<T, P> const & v, T const & s)
+       {
+               return tvec2<T, P>(
+                       v.x - s,
+                       v.y - s);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec2<T, P> operator-(tvec2<T, P> const & v1, tvec1<T, P> const & v2)
+       {
+               return tvec2<T, P>(
+                       v1.x - v2.x,
+                       v1.y - v2.x);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec2<T, P> operator-(T const & s, tvec2<T, P> const & v)
+       {
+               return tvec2<T, P>(
+                       s - v.x,
+                       s - v.y);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec2<T, P> operator-(tvec1<T, P> const & v1, tvec2<T, P> const & v2)
+       {
+               return tvec2<T, P>(
+                       v1.x - v2.x,
+                       v1.x - v2.y);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec2<T, P> operator-(tvec2<T, P> const & v1, tvec2<T, P> const & v2)
+       {
+               return tvec2<T, P>(
+                       v1.x - v2.x,
+                       v1.y - v2.y);
+       }
+
+       //operator*
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec2<T, P> operator*(tvec2<T, P> const & v1, T const & v2)
+       {
+               return tvec2<T, P>(
+                       v1.x * v2,
+                       v1.y * v2);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec2<T, P> operator*(tvec2<T, P> const & v1, tvec1<T, P> const & v2)
+       {
+               return tvec2<T, P>(
+                       v1.x * v2.x,
+                       v1.y * v2.x);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec2<T, P> operator*(T const & s, tvec2<T, P> const & v)
+       {
+               return tvec2<T, P>(
+                       s * v.x,
+                       s * v.y);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec2<T, P> operator*(tvec1<T, P> const & v1, tvec2<T, P> const & v2)
+       {
+               return tvec2<T, P>(
+                       v1.x * v2.x,
+                       v1.x * v2.y);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec2<T, P> operator*(tvec2<T, P> const & v1, tvec2<T, P> const & v2)
+       {
+               return tvec2<T, P>(
+                       v1.x * v2.x,
+                       v1.y * v2.y);
+       }
+
+       //operator/
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec2<T, P> operator/(tvec2<T, P> const & v, T const & s)
+       {
+               return tvec2<T, P>(
+                       v.x / s,
+                       v.y / s);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec2<T, P> operator/(tvec2<T, P> const & v1, tvec1<T, P> const & v2)
+       {
+               return tvec2<T, P>(
+                       v1.x / v2.x,
+                       v1.y / v2.x);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec2<T, P> operator/(T const & s, tvec2<T, P> const & v)
+       {
+               return tvec2<T, P>(
+                       s / v.x,
+                       s / v.y);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec2<T, P> operator/(tvec1<T, P> const & v1, tvec2<T, P> const & v2)
+       {
+               return tvec2<T, P>(
+                       v1.x / v2.x,
+                       v1.x / v2.y);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec2<T, P> operator/(tvec2<T, P> const & v1, tvec2<T, P> const & v2)
+       {
+               return tvec2<T, P>(
+                       v1.x / v2.x,
+                       v1.y / v2.y);
+       }
+
+       // Unary constant operators
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec2<T, P> operator-(tvec2<T, P> const & v)
+       {
+               return tvec2<T, P>(
+                       -v.x, 
+                       -v.y);
+       }
+
+       //////////////////////////////////////
+       // Binary bit operators
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec2<T, P> operator%(tvec2<T, P> const & v, T const & s)
+       {
+               return tvec2<T, P>(
+                       v.x % s,
+                       v.y % s);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec2<T, P> operator%(tvec2<T, P> const & v1, tvec1<T, P> const & v2)
+       {
+               return tvec2<T, P>(
+                       v1.x % v2.x,
+                       v1.y % v2.x);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec2<T, P> operator%(T const & s, tvec2<T, P> const & v)
+       {
+               return tvec2<T, P>(
+                       s % v.x,
+                       s % v.y);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec2<T, P> operator%(tvec1<T, P> const & v1, tvec2<T, P> const & v2)
+       {
+               return tvec2<T, P>(
+                       v1.x % v2.x,
+                       v1.x % v2.y);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec2<T, P> operator%(tvec2<T, P> const & v1, tvec2<T, P> const & v2)
+       {
+               return tvec2<T, P>(
+                       v1.x % v2.x,
+                       v1.y % v2.y);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec2<T, P> operator&(tvec2<T, P> const & v, T const & s)
+       {
+               return tvec2<T, P>(
+                       v.x & s,
+                       v.y & s);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec2<T, P> operator&(tvec2<T, P> const & v1, tvec1<T, P> const & v2)
+       {
+               return tvec2<T, P>(
+                       v1.x & v2.x,
+                       v1.y & v2.x);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec2<T, P> operator&(T const & s, tvec2<T, P> const & v)
+       {
+               return tvec2<T, P>(
+                       s & v.x,
+                       s & v.y);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec2<T, P> operator&(tvec1<T, P> const & v1, tvec2<T, P> const & v2)
+       {
+               return tvec2<T, P>(
+                       v1.x & v2.x,
+                       v1.x & v2.y);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec2<T, P> operator&(tvec2<T, P> const & v1, tvec2<T, P> const & v2)
+       {
+               return tvec2<T, P>(
+                       v1.x & v2.x,
+                       v1.y & v2.y);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec2<T, P> operator|(tvec2<T, P> const & v, T const & s)
+       {
+               return tvec2<T, P>(
+                       v.x | s,
+                       v.y | s);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec2<T, P> operator|(tvec2<T, P> const & v1, tvec1<T, P> const & v2)
+       {
+               return tvec2<T, P>(
+                       v1.x | v2.x,
+                       v1.y | v2.x);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec2<T, P> operator|(T const & s, tvec2<T, P> const & v)
+       {
+               return tvec2<T, P>(
+                       s | v.x,
+                       s | v.y);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec2<T, P> operator|(tvec1<T, P> const & v1, tvec2<T, P> const & v2)
+       {
+               return tvec2<T, P>(
+                       v1.x | v2.x,
+                       v1.x | v2.y);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec2<T, P> operator|(tvec2<T, P> const & v1, tvec2<T, P> const & v2)
+       {
+               return tvec2<T, P>(
+                       v1.x | v2.x,
+                       v1.y | v2.y);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec2<T, P> operator^(tvec2<T, P> const & v, T const & s)
+       {
+               return tvec2<T, P>(
+                       v.x ^ s,
+                       v.y ^ s);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec2<T, P> operator^(tvec2<T, P> const & v1, tvec1<T, P> const & v2)
+       {
+               return tvec2<T, P>(
+                       v1.x ^ v2.x,
+                       v1.y ^ v2.x);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec2<T, P> operator^(T const & s, tvec2<T, P> const & v)
+       {
+               return tvec2<T, P>(
+                       s ^ v.x,
+                       s ^ v.y);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec2<T, P> operator^(tvec1<T, P> const & v1, tvec2<T, P> const & v2)
+       {
+               return tvec2<T, P>(
+                       v1.x ^ v2.x,
+                       v1.x ^ v2.y);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec2<T, P> operator^(tvec2<T, P> const & v1, tvec2<T, P> const & v2)
+       {
+               return tvec2<T, P>(
+                       v1.x ^ v2.x,
+                       v1.y ^ v2.y);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec2<T, P> operator<<(tvec2<T, P> const & v, T const & s)
+       {
+               return tvec2<T, P>(
+                       v.x << s,
+                       v.y << s);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec2<T, P> operator<<(tvec2<T, P> const & v1, tvec1<T, P> const & v2)
+       {
+               return tvec2<T, P>(
+                       v1.x << v2.x,
+                       v1.y << v2.x);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec2<T, P> operator<<(T const & s, tvec2<T, P> const & v)
+       {
+               return tvec2<T, P>(
+                       s << v.x,
+                       s << v.y);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec2<T, P> operator<<(tvec1<T, P> const & v1, tvec2<T, P> const & v2)
+       {
+               return tvec2<T, P>(
+                       v1.x << v2.x,
+                       v1.x << v2.y);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec2<T, P> operator<<(tvec2<T, P> const & v1, tvec2<T, P> const & v2)
+       {
+               return tvec2<T, P>(
+                       v1.x << v2.x,
+                       v1.y << v2.y);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec2<T, P> operator>>(tvec2<T, P> const & v, T const & s)
+       {
+               return tvec2<T, P>(
+                       v.x >> s,
+                       v.y >> s);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec2<T, P> operator>>(tvec2<T, P> const & v1, tvec1<T, P> const & v2)
+       {
+               return tvec2<T, P>(
+                       v1.x >> v2.x,
+                       v1.y >> v2.x);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec2<T, P> operator>>(T const & s, tvec2<T, P> const & v)
+       {
+               return tvec2<T, P>(
+                       s >> v.x,
+                       s >> v.y);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec2<T, P> operator>>(tvec1<T, P> const & v1, tvec2<T, P> const & v2)
+       {
+               return tvec2<T, P>(
+                       v1.x >> v2.x,
+                       v1.x >> v2.y);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec2<T, P> operator>>(tvec2<T, P> const & v1, tvec2<T, P> const & v2)
+       {
+               return tvec2<T, P>(
+                       v1.x >> v2.x,
+                       v1.y >> v2.y);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec2<T, P> operator~(tvec2<T, P> const & v)
+       {
+               return tvec2<T, P>(
+                       ~v.x,
+                       ~v.y);
+       }
+}//namespace glm
diff --git a/include/glm/detail/type_vec3.hpp b/include/glm/detail/type_vec3.hpp
new file mode 100644 (file)
index 0000000..5f0673b
--- /dev/null
@@ -0,0 +1,425 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref core
+/// @file glm/detail/type_vec3.hpp
+/// @date 2008-08-22 / 2011-06-15
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////
+
+#pragma once
+
+//#include "../fwd.hpp"
+#include "type_vec.hpp"
+#ifdef GLM_SWIZZLE
+#      if GLM_HAS_ANONYMOUS_UNION
+#              include "_swizzle.hpp"
+#      else
+#              include "_swizzle_func.hpp"
+#      endif
+#endif //GLM_SWIZZLE
+#include <cstddef>
+
+namespace glm
+{
+       template <typename T, precision P = defaultp>
+       struct tvec3
+       {       
+               //////////////////////////////////////
+               // Implementation detail
+
+               typedef tvec3<T, P> type;
+               typedef tvec3<bool, P> bool_type;
+               typedef T value_type;
+
+               //////////////////////////////////////
+               // Data
+
+#              if GLM_HAS_ANONYMOUS_UNION
+                       union
+                       {
+                               struct{ T x, y, z; };
+                               struct{ T r, g, b; };
+                               struct{ T s, t, p; };
+
+#                              ifdef GLM_SWIZZLE
+                                       _GLM_SWIZZLE3_2_MEMBERS(T, P, tvec2, x, y, z)
+                                       _GLM_SWIZZLE3_2_MEMBERS(T, P, tvec2, r, g, b)
+                                       _GLM_SWIZZLE3_2_MEMBERS(T, P, tvec2, s, t, p)
+                                       _GLM_SWIZZLE3_3_MEMBERS(T, P, tvec3, x, y, z)
+                                       _GLM_SWIZZLE3_3_MEMBERS(T, P, tvec3, r, g, b)
+                                       _GLM_SWIZZLE3_3_MEMBERS(T, P, tvec3, s, t, p)
+                                       _GLM_SWIZZLE3_4_MEMBERS(T, P, tvec4, x, y, z)
+                                       _GLM_SWIZZLE3_4_MEMBERS(T, P, tvec4, r, g, b)
+                                       _GLM_SWIZZLE3_4_MEMBERS(T, P, tvec4, s, t, p)
+#                              endif//GLM_SWIZZLE
+                       };
+#              else
+                       union { T x, r, s; };
+                       union { T y, g, t; };
+                       union { T z, b, p; };
+
+#                      ifdef GLM_SWIZZLE
+                               GLM_SWIZZLE_GEN_VEC_FROM_VEC3(T, P, tvec3, tvec2, tvec3, tvec4)
+#                      endif//GLM_SWIZZLE
+#              endif//GLM_LANG
+
+               //////////////////////////////////////
+               // Component accesses
+
+#              ifdef GLM_FORCE_SIZE_FUNC
+                       /// Return the count of components of the vector
+                       typedef size_t size_type;
+                       GLM_FUNC_DECL GLM_CONSTEXPR size_type size() const;
+
+                       GLM_FUNC_DECL T & operator[](size_type i);
+                       GLM_FUNC_DECL T const & operator[](size_type i) const;
+#              else
+                       /// Return the count of components of the vector
+                       typedef length_t length_type;
+                       GLM_FUNC_DECL GLM_CONSTEXPR length_type length() const;
+
+                       GLM_FUNC_DECL T & operator[](length_type i);
+                       GLM_FUNC_DECL T const & operator[](length_type i) const;
+#              endif//GLM_FORCE_SIZE_FUNC
+
+               //////////////////////////////////////
+               // Implicit basic constructors
+
+               GLM_FUNC_DECL tvec3();
+               GLM_FUNC_DECL tvec3(tvec3<T, P> const & v);
+               template <precision Q>
+               GLM_FUNC_DECL tvec3(tvec3<T, Q> const & v);
+
+               //////////////////////////////////////
+               // Explicit basic constructors
+
+               GLM_FUNC_DECL explicit tvec3(ctor);
+               GLM_FUNC_DECL explicit tvec3(T const & s);
+               GLM_FUNC_DECL tvec3(T const & a, T const & b, T const & c);
+
+               //////////////////////////////////////
+               // Conversion scalar constructors
+
+               /// Explicit converions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
+               template <typename A, typename B, typename C>
+               GLM_FUNC_DECL tvec3(A const & a, B const & b, C const & c);
+               template <typename A, typename B, typename C>
+               GLM_FUNC_DECL tvec3(tvec1<A, P> const & a, tvec1<B, P> const & b, tvec1<C, P> const & c);
+
+               //////////////////////////////////////
+               // Conversion vector constructors
+
+               //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
+               template <typename A, typename B, precision Q>
+               GLM_FUNC_DECL explicit tvec3(tvec2<A, Q> const & a, B const & b);
+               //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
+               template <typename A, typename B, precision Q>
+               GLM_FUNC_DECL explicit tvec3(tvec2<A, Q> const & a, tvec1<B, Q> const & b);
+               //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
+               template <typename A, typename B, precision Q>
+               GLM_FUNC_DECL explicit tvec3(A const & a, tvec2<B, Q> const & b);
+               //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
+               template <typename A, typename B, precision Q>
+               GLM_FUNC_DECL explicit tvec3(tvec1<A, Q> const & a, tvec2<B, Q> const & b);
+               //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
+               template <typename U, precision Q>
+               GLM_FUNC_DECL explicit tvec3(tvec4<U, Q> const & v);
+
+#              ifdef GLM_FORCE_EXPLICIT_CTOR
+                       //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
+                       template <typename U, precision Q>
+                       GLM_FUNC_DECL explicit tvec3(tvec3<U, Q> const & v);
+#              else
+                       //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
+                       template <typename U, precision Q>
+                       GLM_FUNC_DECL tvec3(tvec3<U, Q> const & v);
+#              endif
+
+               //////////////////////////////////////
+               // Swizzle constructors
+
+#              if GLM_HAS_ANONYMOUS_UNION && defined(GLM_SWIZZLE)
+                       template <int E0, int E1, int E2>
+                       GLM_FUNC_DECL tvec3(detail::_swizzle<3, T, P, tvec3<T, P>, E0, E1, E2, -1> const & that)
+                       {
+                               *this = that();
+                       }
+
+                       template <int E0, int E1>
+                       GLM_FUNC_DECL tvec3(detail::_swizzle<2, T, P, tvec2<T, P>, E0, E1, -1, -2> const & v, T const & s)
+                       {
+                               *this = tvec3<T, P>(v(), s);
+                       }
+
+                       template <int E0, int E1>
+                       GLM_FUNC_DECL tvec3(T const & s, detail::_swizzle<2, T, P, tvec2<T, P>, E0, E1, -1, -2> const & v)
+                       {
+                               *this = tvec3<T, P>(s, v());
+                       }
+#              endif// GLM_HAS_ANONYMOUS_UNION && defined(GLM_SWIZZLE)
+
+               //////////////////////////////////////
+               // Unary arithmetic operators
+
+               GLM_FUNC_DECL tvec3<T, P> & operator=(tvec3<T, P> const & v);
+
+               template <typename U>
+               GLM_FUNC_DECL tvec3<T, P> & operator=(tvec3<U, P> const & v);
+               template <typename U>
+               GLM_FUNC_DECL tvec3<T, P> & operator+=(U s);
+               template <typename U>
+               GLM_FUNC_DECL tvec3<T, P> & operator+=(tvec1<U, P> const & v);
+               template <typename U>
+               GLM_FUNC_DECL tvec3<T, P> & operator+=(tvec3<U, P> const & v);
+               template <typename U>
+               GLM_FUNC_DECL tvec3<T, P> & operator-=(U s);
+               template <typename U>
+               GLM_FUNC_DECL tvec3<T, P> & operator-=(tvec1<U, P> const & v);
+               template <typename U>
+               GLM_FUNC_DECL tvec3<T, P> & operator-=(tvec3<U, P> const & v);
+               template <typename U>
+               GLM_FUNC_DECL tvec3<T, P> & operator*=(U s);
+               template <typename U>
+               GLM_FUNC_DECL tvec3<T, P> & operator*=(tvec1<U, P> const & v);
+               template <typename U>
+               GLM_FUNC_DECL tvec3<T, P> & operator*=(tvec3<U, P> const & v);
+               template <typename U>
+               GLM_FUNC_DECL tvec3<T, P> & operator/=(U s);
+               template <typename U>
+               GLM_FUNC_DECL tvec3<T, P> & operator/=(tvec1<U, P> const & v);
+               template <typename U>
+               GLM_FUNC_DECL tvec3<T, P> & operator/=(tvec3<U, P> const & v);
+
+               //////////////////////////////////////
+               // Increment and decrement operators
+
+               GLM_FUNC_DECL tvec3<T, P> & operator++();
+               GLM_FUNC_DECL tvec3<T, P> & operator--();
+               GLM_FUNC_DECL tvec3<T, P> operator++(int);
+               GLM_FUNC_DECL tvec3<T, P> operator--(int);
+
+               //////////////////////////////////////
+               // Unary bit operators
+
+               template <typename U>
+               GLM_FUNC_DECL tvec3<T, P> & operator%=(U s);
+               template <typename U>
+               GLM_FUNC_DECL tvec3<T, P> & operator%=(tvec1<U, P> const & v);
+               template <typename U>
+               GLM_FUNC_DECL tvec3<T, P> & operator%=(tvec3<U, P> const & v);
+               template <typename U>
+               GLM_FUNC_DECL tvec3<T, P> & operator&=(U s);
+               template <typename U>
+               GLM_FUNC_DECL tvec3<T, P> & operator&=(tvec1<U, P> const & v);
+               template <typename U>
+               GLM_FUNC_DECL tvec3<T, P> & operator&=(tvec3<U, P> const & v);
+               template <typename U>
+               GLM_FUNC_DECL tvec3<T, P> & operator|=(U s);
+               template <typename U>
+               GLM_FUNC_DECL tvec3<T, P> & operator|=(tvec1<U, P> const & v);
+               template <typename U>
+               GLM_FUNC_DECL tvec3<T, P> & operator|=(tvec3<U, P> const & v);
+               template <typename U>
+               GLM_FUNC_DECL tvec3<T, P> & operator^=(U s);
+               template <typename U>
+               GLM_FUNC_DECL tvec3<T, P> & operator^=(tvec1<U, P> const & v);
+               template <typename U>
+               GLM_FUNC_DECL tvec3<T, P> & operator^=(tvec3<U, P> const & v);
+               template <typename U>
+               GLM_FUNC_DECL tvec3<T, P> & operator<<=(U s);
+               template <typename U>
+               GLM_FUNC_DECL tvec3<T, P> & operator<<=(tvec1<U, P> const & v);
+               template <typename U>
+               GLM_FUNC_DECL tvec3<T, P> & operator<<=(tvec3<U, P> const & v);
+               template <typename U>
+               GLM_FUNC_DECL tvec3<T, P> & operator>>=(U s);
+               template <typename U>
+               GLM_FUNC_DECL tvec3<T, P> & operator>>=(tvec1<U, P> const & v);
+               template <typename U>
+               GLM_FUNC_DECL tvec3<T, P> & operator>>=(tvec3<U, P> const & v);
+       };
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec3<T, P> operator+(tvec3<T, P> const & v, T const & s);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec3<T, P> operator+(tvec3<T, P> const & v, tvec1<T, P> const & s);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec3<T, P> operator+(T const & s, tvec3<T, P> const & v);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec3<T, P> operator+(tvec1<T, P> const & s, tvec3<T, P> const & v);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec3<T, P> operator+(tvec3<T, P> const & v1, tvec3<T, P> const & v2);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec3<T, P> operator-(tvec3<T, P> const & v, T const & s);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec3<T, P> operator-(tvec3<T, P> const & v, tvec1<T, P> const & s);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec3<T, P> operator-(T const & s, tvec3<T, P> const & v);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec3<T, P> operator-(tvec1<T, P> const & s, tvec3<T, P> const & v);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec3<T, P> operator-(tvec3<T, P> const & v1, tvec3<T, P> const & v2);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec3<T, P> operator*(tvec3<T, P> const & v, T const & s);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec3<T, P> operator*(tvec3<T, P> const & v, tvec1<T, P> const & s);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec3<T, P> operator*(T const & s, tvec3<T, P> const & v);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec3<T, P> operator*(tvec1<T, P> const & s, tvec3<T, P> const & v);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec3<T, P> operator*(tvec3<T, P> const & v1, tvec3<T, P> const & v2);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec3<T, P> operator/(tvec3<T, P> const & v, T const & s);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec3<T, P> operator/(tvec3<T, P> const & v, tvec1<T, P> const & s);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec3<T, P> operator/(T const & s, tvec3<T, P> const & v);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec3<T, P> operator/(tvec1<T, P> const & s, tvec3<T, P> const & v);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec3<T, P> operator/(tvec3<T, P> const & v1, tvec3<T, P> const & v2);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec3<T, P> operator-(tvec3<T, P> const & v);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec3<T, P> operator%(tvec3<T, P> const & v, T const & s);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec3<T, P> operator%(tvec3<T, P> const & v, tvec1<T, P> const & s);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec3<T, P> operator%(T const & s, tvec3<T, P> const & v);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec3<T, P> operator%(tvec1<T, P> const & s, tvec3<T, P> const & v);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec3<T, P> operator%(tvec3<T, P> const & v1, tvec3<T, P> const & v2);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec3<T, P> operator&(tvec3<T, P> const & v, T const & s);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec3<T, P> operator&(tvec3<T, P> const & v, tvec1<T, P> const & s);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec3<T, P> operator&(T const & s, tvec3<T, P> const & v);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec3<T, P> operator&(tvec1<T, P> const & s, tvec3<T, P> const & v);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec3<T, P> operator&(tvec3<T, P> const & v1, tvec3<T, P> const & v2);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec3<T, P> operator|(tvec3<T, P> const & v, T const & s);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec3<T, P> operator|(tvec3<T, P> const & v, tvec1<T, P> const & s);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec3<T, P> operator|(T const & s, tvec3<T, P> const & v);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec3<T, P> operator|(tvec1<T, P> const & s, tvec3<T, P> const & v);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec3<T, P> operator|(tvec3<T, P> const & v1, tvec3<T, P> const & v2);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec3<T, P> operator^(tvec3<T, P> const & v, T const & s);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec3<T, P> operator^(tvec3<T, P> const & v, tvec1<T, P> const & s);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec3<T, P> operator^(T const & s, tvec3<T, P> const & v);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec3<T, P> operator^(tvec1<T, P> const & s, tvec3<T, P> const & v);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec3<T, P> operator^(tvec3<T, P> const & v1, tvec3<T, P> const & v2);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec3<T, P> operator<<(tvec3<T, P> const & v, T const & s);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec3<T, P> operator<<(tvec3<T, P> const & v, tvec1<T, P> const & s);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec3<T, P> operator<<(T const & s, tvec3<T, P> const & v);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec3<T, P> operator<<(tvec1<T, P> const & s, tvec3<T, P> const & v);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec3<T, P> operator<<(tvec3<T, P> const & v1, tvec3<T, P> const & v2);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec3<T, P> operator>>(tvec3<T, P> const & v, T const & s);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec3<T, P> operator>>(tvec3<T, P> const & v, tvec1<T, P> const & s);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec3<T, P> operator>>(T const & s, tvec3<T, P> const & v);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec3<T, P> operator>>(tvec1<T, P> const & s, tvec3<T, P> const & v);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec3<T, P> operator>>(tvec3<T, P> const & v1, tvec3<T, P> const & v2);
+
+       template <typename T, precision P> 
+       GLM_FUNC_DECL tvec3<T, P> operator~(tvec3<T, P> const & v);
+}//namespace glm
+
+#ifndef GLM_EXTERNAL_TEMPLATE
+#include "type_vec3.inl"
+#endif//GLM_EXTERNAL_TEMPLATE
diff --git a/include/glm/detail/type_vec3.inl b/include/glm/detail/type_vec3.inl
new file mode 100644 (file)
index 0000000..b2088d8
--- /dev/null
@@ -0,0 +1,1042 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref core
+/// @file glm/detail/type_tvec3.inl
+/// @date 2008-08-22 / 2011-06-15
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////
+
+namespace glm
+{
+       //////////////////////////////////////
+       // Implicit basic constructors
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec3<T, P>::tvec3()
+#              ifndef GLM_FORCE_NO_CTOR_INIT 
+                       : x(0), y(0), z(0)
+#              endif
+       {}
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec3<T, P>::tvec3(tvec3<T, P> const & v)
+               : x(v.x), y(v.y), z(v.z)
+       {}
+
+       template <typename T, precision P>
+       template <precision Q>
+       GLM_FUNC_QUALIFIER tvec3<T, P>::tvec3(tvec3<T, Q> const & v)
+               : x(v.x), y(v.y), z(v.z)
+       {}
+
+       //////////////////////////////////////
+       // Explicit basic constructors
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec3<T, P>::tvec3(ctor)
+       {}
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec3<T, P>::tvec3(T const & s)
+               : x(s), y(s), z(s)
+       {}
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec3<T, P>::tvec3(T const & a, T const & b, T const & c)
+               : x(a), y(b), z(c)
+       {}
+
+       //////////////////////////////////////
+       // Conversion scalar constructors
+
+       template <typename T, precision P>
+       template <typename A, typename B, typename C>
+       GLM_FUNC_QUALIFIER tvec3<T, P>::tvec3(A const & a, B const & b, C const & c) :
+               x(static_cast<T>(a)),
+               y(static_cast<T>(b)),
+               z(static_cast<T>(c))
+       {}
+
+       template <typename T, precision P>
+       template <typename A, typename B, typename C>
+       GLM_FUNC_QUALIFIER tvec3<T, P>::tvec3(tvec1<A, P> const & a, tvec1<B, P> const & b, tvec1<C, P> const & c) :
+               x(static_cast<T>(a)),
+               y(static_cast<T>(b)),
+               z(static_cast<T>(c))
+       {}
+
+       //////////////////////////////////////
+       // Conversion vector constructors
+
+       template <typename T, precision P>
+       template <typename A, typename B, precision Q>
+       GLM_FUNC_QUALIFIER tvec3<T, P>::tvec3(tvec2<A, Q> const & a, B const & b) :
+               x(static_cast<T>(a.x)),
+               y(static_cast<T>(a.y)),
+               z(static_cast<T>(b))
+       {}
+
+       template <typename T, precision P>
+       template <typename A, typename B, precision Q>
+       GLM_FUNC_QUALIFIER tvec3<T, P>::tvec3(tvec2<A, Q> const & a, tvec1<B, Q> const & b) :
+               x(static_cast<T>(a.x)),
+               y(static_cast<T>(a.y)),
+               z(static_cast<T>(b.x))
+       {}
+
+       template <typename T, precision P>
+       template <typename A, typename B, precision Q>
+       GLM_FUNC_QUALIFIER tvec3<T, P>::tvec3(A const & a, tvec2<B, Q> const & b) :
+               x(static_cast<T>(a)),
+               y(static_cast<T>(b.x)),
+               z(static_cast<T>(b.y))
+       {}
+
+       template <typename T, precision P>
+       template <typename A, typename B, precision Q>
+       GLM_FUNC_QUALIFIER tvec3<T, P>::tvec3(tvec1<A, Q> const & a, tvec2<B, Q> const & b) :
+               x(static_cast<T>(a.x)),
+               y(static_cast<T>(b.x)),
+               z(static_cast<T>(b.y))
+       {}
+
+       template <typename T, precision P>
+       template <typename U, precision Q>
+       GLM_FUNC_QUALIFIER tvec3<T, P>::tvec3(tvec3<U, Q> const & v) :
+               x(static_cast<T>(v.x)),
+               y(static_cast<T>(v.y)),
+               z(static_cast<T>(v.z))
+       {}
+
+       template <typename T, precision P>
+       template <typename U, precision Q>
+       GLM_FUNC_QUALIFIER tvec3<T, P>::tvec3(tvec4<U, Q> const & v) :
+               x(static_cast<T>(v.x)),
+               y(static_cast<T>(v.y)),
+               z(static_cast<T>(v.z))
+       {}
+
+       //////////////////////////////////////
+       // Component accesses
+
+#      ifdef GLM_FORCE_SIZE_FUNC
+               template <typename T, precision P>
+               GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tvec3<T, P>::size_type tvec3<T, P>::size() const
+               {
+                       return 3;
+               }
+
+               template <typename T, precision P>
+               GLM_FUNC_QUALIFIER T & tvec3<T, P>::operator[](typename tvec3<T, P>::size_type i)
+               {
+                       assert(i >= 0 && static_cast<detail::component_count_t>(i) < detail::component_count(*this));
+                       return (&x)[i];
+               }
+
+               template <typename T, precision P>
+               GLM_FUNC_QUALIFIER T const & tvec3<T, P>::operator[](typename tvec3<T, P>::size_type i) const
+               {
+                       assert(i >= 0 && static_cast<detail::component_count_t>(i) < detail::component_count(*this));
+                       return (&x)[i];
+               }
+#      else
+               template <typename T, precision P>
+               GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tvec3<T, P>::length_type tvec3<T, P>::length() const
+               {
+                       return 3;
+               }
+
+               template <typename T, precision P>
+               GLM_FUNC_QUALIFIER T & tvec3<T, P>::operator[](typename tvec3<T, P>::length_type i)
+               {
+                       assert(i >= 0 && static_cast<detail::component_count_t>(i) < detail::component_count(*this));
+                       return (&x)[i];
+               }
+
+               template <typename T, precision P>
+               GLM_FUNC_QUALIFIER T const & tvec3<T, P>::operator[](typename tvec3<T, P>::length_type i) const
+               {
+                       assert(i >= 0 && static_cast<detail::component_count_t>(i) < detail::component_count(*this));
+                       return (&x)[i];
+               }
+#      endif//GLM_FORCE_SIZE_FUNC
+
+       //////////////////////////////////////
+       // Unary arithmetic operators
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec3<T, P>& tvec3<T, P>::operator=(tvec3<T, P> const & v)
+       {
+               this->x = v.x;
+               this->y = v.y;
+               this->z = v.z;
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U>
+       GLM_FUNC_QUALIFIER tvec3<T, P>& tvec3<T, P>::operator=(tvec3<U, P> const & v)
+       {
+               this->x = static_cast<T>(v.x);
+               this->y = static_cast<T>(v.y);
+               this->z = static_cast<T>(v.z);
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U>
+       GLM_FUNC_QUALIFIER tvec3<T, P> & tvec3<T, P>::operator+=(U s)
+       {
+               this->x += static_cast<T>(s);
+               this->y += static_cast<T>(s);
+               this->z += static_cast<T>(s);
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U>
+       GLM_FUNC_QUALIFIER tvec3<T, P> & tvec3<T, P>::operator+=(tvec1<U, P> const & v)
+       {
+               this->x += static_cast<T>(v.x);
+               this->y += static_cast<T>(v.x);
+               this->z += static_cast<T>(v.x);
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U>
+       GLM_FUNC_QUALIFIER tvec3<T, P> & tvec3<T, P>::operator+=(tvec3<U, P> const & v)
+       {
+               this->x += static_cast<T>(v.x);
+               this->y += static_cast<T>(v.y);
+               this->z += static_cast<T>(v.z);
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U>
+       GLM_FUNC_QUALIFIER tvec3<T, P> & tvec3<T, P>::operator-=(U s)
+       {
+               this->x -= static_cast<T>(s);
+               this->y -= static_cast<T>(s);
+               this->z -= static_cast<T>(s);
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U>
+       GLM_FUNC_QUALIFIER tvec3<T, P> & tvec3<T, P>::operator-=(tvec1<U, P> const & v)
+       {
+               this->x -= static_cast<T>(v.x);
+               this->y -= static_cast<T>(v.x);
+               this->z -= static_cast<T>(v.x);
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U>
+       GLM_FUNC_QUALIFIER tvec3<T, P> & tvec3<T, P>::operator-=(tvec3<U, P> const & v)
+       {
+               this->x -= static_cast<T>(v.x);
+               this->y -= static_cast<T>(v.y);
+               this->z -= static_cast<T>(v.z);
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U>
+       GLM_FUNC_QUALIFIER tvec3<T, P> & tvec3<T, P>::operator*=(U s)
+       {
+               this->x *= static_cast<T>(s);
+               this->y *= static_cast<T>(s);
+               this->z *= static_cast<T>(s);
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U>
+       GLM_FUNC_QUALIFIER tvec3<T, P> & tvec3<T, P>::operator*=(tvec1<U, P> const & v)
+       {
+               this->x *= static_cast<T>(v.x);
+               this->y *= static_cast<T>(v.x);
+               this->z *= static_cast<T>(v.x);
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U>
+       GLM_FUNC_QUALIFIER tvec3<T, P> & tvec3<T, P>::operator*=(tvec3<U, P> const & v)
+       {
+               this->x *= static_cast<T>(v.x);
+               this->y *= static_cast<T>(v.y);
+               this->z *= static_cast<T>(v.z);
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U>
+       GLM_FUNC_QUALIFIER tvec3<T, P> & tvec3<T, P>::operator/=(U s)
+       {
+               this->x /= static_cast<T>(s);
+               this->y /= static_cast<T>(s);
+               this->z /= static_cast<T>(s);
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U>
+       GLM_FUNC_QUALIFIER tvec3<T, P> & tvec3<T, P>::operator/=(tvec1<U, P> const & v)
+       {
+               this->x /= static_cast<T>(v.x);
+               this->y /= static_cast<T>(v.x);
+               this->z /= static_cast<T>(v.x);
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U>
+       GLM_FUNC_QUALIFIER tvec3<T, P> & tvec3<T, P>::operator/=(tvec3<U, P> const & v)
+       {
+               this->x /= static_cast<T>(v.x);
+               this->y /= static_cast<T>(v.y);
+               this->z /= static_cast<T>(v.z);
+               return *this;
+       }
+
+       //////////////////////////////////////
+       // Increment and decrement operators
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec3<T, P> & tvec3<T, P>::operator++()
+       {
+               ++this->x;
+               ++this->y;
+               ++this->z;
+               return *this;
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec3<T, P> & tvec3<T, P>::operator--()
+       {
+               --this->x;
+               --this->y;
+               --this->z;
+               return *this;
+       }
+
+       template <typename T, precision P> 
+       GLM_FUNC_QUALIFIER tvec3<T, P> tvec3<T, P>::operator++(int)
+       {
+               tvec3<T, P> Result(*this);
+               ++*this;
+               return Result;
+       }
+
+       template <typename T, precision P> 
+       GLM_FUNC_QUALIFIER tvec3<T, P> tvec3<T, P>::operator--(int)
+       {
+               tvec3<T, P> Result(*this);
+               --*this;
+               return Result;
+       }
+
+       //////////////////////////////////////
+       // Unary bit operators
+
+       template <typename T, precision P>
+       template <typename U>
+       GLM_FUNC_QUALIFIER tvec3<T, P> & tvec3<T, P>::operator%=(U s)
+       {
+               this->x %= s;
+               this->y %= s;
+               this->z %= s;
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U>
+       GLM_FUNC_QUALIFIER tvec3<T, P> & tvec3<T, P>::operator%=(tvec1<U, P> const & v)
+       {
+               this->x %= v.x;
+               this->y %= v.x;
+               this->z %= v.x;
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U>
+       GLM_FUNC_QUALIFIER tvec3<T, P> & tvec3<T, P>::operator%=(tvec3<U, P> const & v)
+       {
+               this->x %= v.x;
+               this->y %= v.y;
+               this->z %= v.z;
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U>
+       GLM_FUNC_QUALIFIER tvec3<T, P> & tvec3<T, P>::operator&=(U s)
+       {
+               this->x &= s;
+               this->y &= s;
+               this->z &= s;
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U>
+       GLM_FUNC_QUALIFIER tvec3<T, P> & tvec3<T, P>::operator&=(tvec1<U, P> const & v)
+       {
+               this->x &= v.x;
+               this->y &= v.x;
+               this->z &= v.x;
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U>
+       GLM_FUNC_QUALIFIER tvec3<T, P> & tvec3<T, P>::operator&=(tvec3<U, P> const & v)
+       {
+               this->x &= v.x;
+               this->y &= v.y;
+               this->z &= v.z;
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U>
+       GLM_FUNC_QUALIFIER tvec3<T, P> & tvec3<T, P>::operator|=(U s)
+       {
+               this->x |= s;
+               this->y |= s;
+               this->z |= s;
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U> 
+       GLM_FUNC_QUALIFIER tvec3<T, P> & tvec3<T, P>::operator|=(tvec1<U, P> const & v)
+       {
+               this->x |= v.x;
+               this->y |= v.x;
+               this->z |= v.x;
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U> 
+       GLM_FUNC_QUALIFIER tvec3<T, P> & tvec3<T, P>::operator|=(tvec3<U, P> const & v)
+       {
+               this->x |= v.x;
+               this->y |= v.y;
+               this->z |= v.z;
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U> 
+       GLM_FUNC_QUALIFIER tvec3<T, P> & tvec3<T, P>::operator^=(U s)
+       {
+               this->x ^= s;
+               this->y ^= s;
+               this->z ^= s;
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U> 
+       GLM_FUNC_QUALIFIER tvec3<T, P> & tvec3<T, P>::operator^=(tvec1<U, P> const & v)
+       {
+               this->x ^= v.x;
+               this->y ^= v.x;
+               this->z ^= v.x;
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U> 
+       GLM_FUNC_QUALIFIER tvec3<T, P> & tvec3<T, P>::operator^=(tvec3<U, P> const & v)
+       {
+               this->x ^= v.x;
+               this->y ^= v.y;
+               this->z ^= v.z;
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U> 
+       GLM_FUNC_QUALIFIER tvec3<T, P> & tvec3<T, P>::operator<<=(U s)
+       {
+               this->x <<= s;
+               this->y <<= s;
+               this->z <<= s;
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U> 
+       GLM_FUNC_QUALIFIER tvec3<T, P> & tvec3<T, P>::operator<<=(tvec1<U, P> const & v)
+       {
+               this->x <<= static_cast<T>(v.x);
+               this->y <<= static_cast<T>(v.x);
+               this->z <<= static_cast<T>(v.x);
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U> 
+       GLM_FUNC_QUALIFIER tvec3<T, P> & tvec3<T, P>::operator<<=(tvec3<U, P> const & v)
+       {
+               this->x <<= static_cast<T>(v.x);
+               this->y <<= static_cast<T>(v.y);
+               this->z <<= static_cast<T>(v.z);
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U> 
+       GLM_FUNC_QUALIFIER tvec3<T, P> & tvec3<T, P>::operator>>=(U s)
+       {
+               this->x >>= static_cast<T>(s);
+               this->y >>= static_cast<T>(s);
+               this->z >>= static_cast<T>(s);
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U> 
+       GLM_FUNC_QUALIFIER tvec3<T, P> & tvec3<T, P>::operator>>=(tvec1<U, P> const & v)
+       {
+               this->x >>= static_cast<T>(v.x);
+               this->y >>= static_cast<T>(v.x);
+               this->z >>= static_cast<T>(v.x);
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U> 
+       GLM_FUNC_QUALIFIER tvec3<T, P> & tvec3<T, P>::operator>>=(tvec3<U, P> const & v)
+       {
+               this->x >>= static_cast<T>(v.x);
+               this->y >>= static_cast<T>(v.y);
+               this->z >>= static_cast<T>(v.z);
+               return *this;
+       }
+
+       //////////////////////////////////////
+       // Boolean operators
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER bool operator==(tvec3<T, P> const & v1, tvec3<T, P> const & v2)
+       {
+               return (v1.x == v2.x) && (v1.y == v2.y) && (v1.z == v2.z);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER bool operator!=(tvec3<T, P> const & v1, tvec3<T, P> const & v2)
+       {
+               return (v1.x != v2.x) || (v1.y != v2.y) || (v1.z != v2.z);
+       }
+
+       //////////////////////////////////////
+       // Binary arithmetic operators
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec3<T, P> operator+(tvec3<T, P> const & v, T const & s)
+       {
+               return tvec3<T, P>(
+                       v.x + s,
+                       v.y + s,
+                       v.z + s);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec3<T, P> operator+(tvec3<T, P> const & v, tvec1<T, P> const & s)
+       {
+               return tvec3<T, P>(
+                       v.x + s.x,
+                       v.y + s.x,
+                       v.z + s.x);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec3<T, P> operator+(T const & s, tvec3<T, P> const & v)
+       {
+               return tvec3<T, P>(
+                       s + v.x,
+                       s + v.y,
+                       s + v.z);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec3<T, P> operator+(tvec1<T, P> const & s, tvec3<T, P> const & v)
+       {
+               return tvec3<T, P>(
+                       s.x + v.x,
+                       s.x + v.y,
+                       s.x + v.z);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec3<T, P> operator+(tvec3<T, P> const & v1, tvec3<T, P> const & v2)
+       {
+               return tvec3<T, P>(
+                       v1.x + v2.x,
+                       v1.y + v2.y,
+                       v1.z + v2.z);
+       }
+
+       //operator-
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec3<T, P> operator-(tvec3<T, P> const & v, T const & s)
+       {
+               return tvec3<T, P>(
+                       v.x - s,
+                       v.y - s,
+                       v.z - s);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec3<T, P> operator-(tvec3<T, P> const & v, tvec1<T, P> const & s)
+       {
+               return tvec3<T, P>(
+                       v.x - s.x,
+                       v.y - s.x,
+                       v.z - s.x);
+       }
+
+       template <typename T, precision P> 
+       GLM_FUNC_QUALIFIER tvec3<T, P> operator-(T const & s, tvec3<T, P> const & v)
+       {
+               return tvec3<T, P>(
+                       s - v.x,
+                       s - v.y,
+                       s - v.z);
+       }
+
+       template <typename T, precision P> 
+       GLM_FUNC_QUALIFIER tvec3<T, P> operator-(tvec1<T, P> const & s, tvec3<T, P> const & v)
+       {
+               return tvec3<T, P>(
+                       s.x - v.x,
+                       s.x - v.y,
+                       s.x - v.z);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec3<T, P> operator-(tvec3<T, P> const & v1, tvec3<T, P> const & v2)
+       {
+               return tvec3<T, P>(
+                       v1.x - v2.x,
+                       v1.y - v2.y,
+                       v1.z - v2.z);
+       }
+
+       //operator*
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec3<T, P> operator*(tvec3<T, P> const & v, T const & s)
+       {
+               return tvec3<T, P>(
+                       v.x * s,
+                       v.y * s,
+                       v.z * s);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec3<T, P> operator*(tvec3<T, P> const & v, tvec1<T, P> const & s)
+       {
+               return tvec3<T, P>(
+                       v.x * s.x,
+                       v.y * s.x,
+                       v.z * s.x);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec3<T, P> operator*(T const & s, tvec3<T, P> const & v)
+       {
+               return tvec3<T, P>(
+                       s * v.x,
+                       s * v.y,
+                       s * v.z);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec3<T, P> operator*(tvec1<T, P> const & s, tvec3<T, P> const & v)
+       {
+               return tvec3<T, P>(
+                       s.x * v.x,
+                       s.x * v.y,
+                       s.x * v.z);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec3<T, P> operator*(tvec3<T, P> const & v1, tvec3<T, P> const & v2)
+       {
+               return tvec3<T, P>(
+                       v1.x * v2.x,
+                       v1.y * v2.y,
+                       v1.z * v2.z);
+       }
+
+       //operator/
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec3<T, P> operator/(tvec3<T, P> const & v, T const & s)
+       {
+               return tvec3<T, P>(
+                       v.x / s,
+                       v.y / s,
+                       v.z / s);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec3<T, P> operator/(tvec3<T, P> const & v, tvec1<T, P> const & s)
+       {
+               return tvec3<T, P>(
+                       v.x / s.x,
+                       v.y / s.x,
+                       v.z / s.x);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec3<T, P> operator/(T const & s, tvec3<T, P> const & v)
+       {
+               return tvec3<T, P>(
+                       s / v.x,
+                       s / v.y,
+                       s / v.z);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec3<T, P> operator/(tvec1<T, P> const & s, tvec3<T, P> const & v)
+       {
+               return tvec3<T, P>(
+                       s.x / v.x,
+                       s.x / v.y,
+                       s.x / v.z);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec3<T, P> operator/(tvec3<T, P> const & v1, tvec3<T, P> const & v2)
+       {
+               return tvec3<T, P>(
+                       v1.x / v2.x,
+                       v1.y / v2.y,
+                       v1.z / v2.z);
+       }
+
+       // Unary constant operators
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec3<T, P> operator-(tvec3<T, P> const & v)
+       {
+               return tvec3<T, P>(
+                       -v.x, 
+                       -v.y, 
+                       -v.z);
+       }
+
+       //////////////////////////////////////
+       // Binary bit operators
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec3<T, P> operator%(tvec3<T, P> const & v, T const & s)
+       {
+               return tvec3<T, P>(
+                       v.x % s,
+                       v.y % s,
+                       v.z % s);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec3<T, P> operator%(tvec3<T, P> const & v, tvec1<T, P> const & s)
+       {
+               return tvec3<T, P>(
+                       v.x % s.x,
+                       v.y % s.x,
+                       v.z % s.x);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec3<T, P> operator%(T const & s, tvec3<T, P> const & v)
+       {
+               return tvec3<T, P>(
+                       s % v.x,
+                       s % v.y,
+                       s % v.z);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec3<T, P> operator%(tvec1<T, P> const & s, tvec3<T, P> const & v)
+       {
+               return tvec3<T, P>(
+                       s.x % v.x,
+                       s.x % v.y,
+                       s.x % v.z);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec3<T, P> operator%(tvec3<T, P> const & v1, tvec3<T, P> const & v2)
+       {
+               return tvec3<T, P>(
+                       v1.x % v2.x,
+                       v1.y % v2.y,
+                       v1.z % v2.z);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec3<T, P> operator&(tvec3<T, P> const & v, T const & s)
+       {
+               return tvec3<T, P>(
+                       v.x & s,
+                       v.y & s,
+                       v.z & s);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec3<T, P> operator&(tvec3<T, P> const & v, tvec1<T, P> const & s)
+       {
+               return tvec3<T, P>(
+                       v.x & s.x,
+                       v.y & s.x,
+                       v.z & s.x);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec3<T, P> operator&(T const & s, tvec3<T, P> const & v)
+       {
+               return tvec3<T, P>(
+                       s & v.x,
+                       s & v.y,
+                       s & v.z);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec3<T, P> operator&(tvec1<T, P> const & s, tvec3<T, P> const & v)
+       {
+               return tvec3<T, P>(
+                       s.x & v.x,
+                       s.x & v.y,
+                       s.x & v.z);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec3<T, P> operator&(tvec3<T, P> const & v1, tvec3<T, P> const & v2)
+       {
+               return tvec3<T, P>(
+                       v1.x & v2.x,
+                       v1.y & v2.y,
+                       v1.z & v2.z);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec3<T, P> operator|(tvec3<T, P> const & v, T const & s)
+       {
+               return tvec3<T, P>(
+                       v.x | s,
+                       v.y | s,
+                       v.z | s);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec3<T, P> operator|(tvec3<T, P> const & v, tvec1<T, P> const & s)
+       {
+               return tvec3<T, P>(
+                       v.x | s.x,
+                       v.y | s.x,
+                       v.z | s.x);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec3<T, P> operator|(T const & s, tvec3<T, P> const & v)
+       {
+               return tvec3<T, P>(
+                       s | v.x,
+                       s | v.y,
+                       s | v.z);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec3<T, P> operator|(tvec1<T, P> const & s, tvec3<T, P> const & v)
+       {
+               return tvec3<T, P>(
+                       s.x | v.x,
+                       s.x | v.y,
+                       s.x | v.z);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec3<T, P> operator|(tvec3<T, P> const & v1, tvec3<T, P> const & v2)
+       {
+               return tvec3<T, P>(
+                       v1.x | v2.x,
+                       v1.y | v2.y,
+                       v1.z | v2.z);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec3<T, P> operator^(tvec3<T, P> const & v, T const & s)
+       {
+               return tvec3<T, P>(
+                       v.x ^ s,
+                       v.y ^ s,
+                       v.z ^ s);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec3<T, P> operator^(tvec3<T, P> const & v, tvec1<T, P> const & s)
+       {
+               return tvec3<T, P>(
+                       v.x ^ s.x,
+                       v.y ^ s.x,
+                       v.z ^ s.x);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec3<T, P> operator^(T const & s, tvec3<T, P> const & v)
+       {
+               return tvec3<T, P>(
+                       s ^ v.x,
+                       s ^ v.y,
+                       s ^ v.z);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec3<T, P> operator^(tvec1<T, P> const & s, tvec3<T, P> const & v)
+       {
+               return tvec3<T, P>(
+                       s.x ^ v.x,
+                       s.x ^ v.y,
+                       s.x ^ v.z);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec3<T, P> operator^(tvec3<T, P> const & v1, tvec3<T, P> const & v2)
+       {
+               return tvec3<T, P>(
+                       v1.x ^ v2.x,
+                       v1.y ^ v2.y,
+                       v1.z ^ v2.z);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec3<T, P> operator<<(tvec3<T, P> const & v, T const & s)
+       {
+               return tvec3<T, P>(
+                       v.x << s,
+                       v.y << s,
+                       v.z << s);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec3<T, P> operator<<(tvec3<T, P> const & v, tvec1<T, P> const & s)
+       {
+               return tvec3<T, P>(
+                       v.x << s.x,
+                       v.y << s.x,
+                       v.z << s.x);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec3<T, P> operator<<(T const & s, tvec3<T, P> const & v)
+       {
+               return tvec3<T, P>(
+                       s << v.x,
+                       s << v.y,
+                       s << v.z);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec3<T, P> operator<<(tvec1<T, P> const & s, tvec3<T, P> const & v)
+       {
+               return tvec3<T, P>(
+                       s.x << v.x,
+                       s.x << v.y,
+                       s.x << v.z);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec3<T, P> operator<<(tvec3<T, P> const & v1, tvec3<T, P> const & v2)
+       {
+               return tvec3<T, P>(
+                       v1.x << v2.x,
+                       v1.y << v2.y,
+                       v1.z << v2.z);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec3<T, P> operator>>(tvec3<T, P> const & v, T const & s)
+       {
+               return tvec3<T, P>(
+                       v.x >> s,
+                       v.y >> s,
+                       v.z >> s);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec3<T, P> operator>>(tvec3<T, P> const & v, tvec1<T, P> const & s)
+       {
+               return tvec3<T, P>(
+                       v.x >> s.x,
+                       v.y >> s.x,
+                       v.z >> s.x);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec3<T, P> operator>>(T const & s, tvec3<T, P> const & v)
+       {
+               return tvec3<T, P>(
+                       s >> v.x,
+                       s >> v.y,
+                       s >> v.z);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec3<T, P> operator>>(tvec1<T, P> const & s, tvec3<T, P> const & v)
+       {
+               return tvec3<T, P>(
+                       s.x >> v.x,
+                       s.x >> v.y,
+                       s.x >> v.z);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec3<T, P> operator>>(tvec3<T, P> const & v1, tvec3<T, P> const & v2)
+       {
+               return tvec3<T, P>(
+                       v1.x >> v2.x,
+                       v1.y >> v2.y,
+                       v1.z >> v2.z);
+       }
+
+       template <typename T, precision P> 
+       GLM_FUNC_QUALIFIER tvec3<T, P> operator~(tvec3<T, P> const & v)
+       {
+               return tvec3<T, P>(
+                       ~v.x,
+                       ~v.y,
+                       ~v.z);
+       }
+}//namespace glm
diff --git a/include/glm/detail/type_vec4.hpp b/include/glm/detail/type_vec4.hpp
new file mode 100644 (file)
index 0000000..8189d6f
--- /dev/null
@@ -0,0 +1,531 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref core
+/// @file glm/detail/type_vec4.hpp
+/// @date 2008-08-22 / 2011-06-15
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////
+
+#pragma once
+
+//#include "../fwd.hpp"
+#include "setup.hpp"
+#include "type_vec.hpp"
+#ifdef GLM_SWIZZLE
+#      if GLM_HAS_ANONYMOUS_UNION
+#              include "_swizzle.hpp"
+#      else
+#              include "_swizzle_func.hpp"
+#      endif
+#endif //GLM_SWIZZLE
+#include <cstddef>
+
+namespace glm{
+namespace detail
+{
+       template <typename T>
+       struct simd
+       {
+               typedef T type[4];
+       };
+
+#      define GLM_NOT_BUGGY_VC32BITS !(GLM_MODEL == GLM_MODEL_32 && GLM_COMPILER & GLM_COMPILER_VC && GLM_COMPILER < GLM_COMPILER_VC2013)
+
+#      if GLM_ARCH & GLM_ARCH_SSE2 && GLM_NOT_BUGGY_VC32BITS
+               template <>
+               struct simd<float>
+               {
+                       typedef __m128 type;
+               };
+
+               template <>
+               struct simd<int>
+               {
+                       typedef __m128i type;
+               };
+
+               template <>
+               struct simd<unsigned int>
+               {
+                       typedef __m128i type;
+               };
+#      endif
+
+#      if GLM_ARCH & GLM_ARCH_AVX && GLM_NOT_BUGGY_VC32BITS
+               template <>
+               struct simd<double>
+               {
+                       typedef __m256d type;
+               };
+#      endif
+
+#      if GLM_ARCH & GLM_ARCH_AVX2 && GLM_NOT_BUGGY_VC32BITS
+               template <>
+               struct simd<int64>
+               {
+                       typedef __m256i type;
+               };
+
+               template <>
+               struct simd<uint64>
+               {
+                       typedef __m256i type;
+               };
+#      endif
+
+}//namespace detail
+
+       template <typename T, precision P = defaultp>
+       struct tvec4
+       {
+               //////////////////////////////////////
+               // Implementation detail
+
+               typedef tvec4<T, P> type;
+               typedef tvec4<bool, P> bool_type;
+               typedef T value_type;
+
+               //////////////////////////////////////
+               // Data
+
+#              if GLM_HAS_ANONYMOUS_UNION
+                       union
+                       {
+                               struct { T x, y, z, w;};
+                               struct { T r, g, b, a; };
+                               struct { T s, t, p, q; };
+
+                               typename detail::simd<T>::type data;
+
+#                              ifdef GLM_SWIZZLE
+                                       _GLM_SWIZZLE4_2_MEMBERS(T, P, tvec2, x, y, z, w)
+                                       _GLM_SWIZZLE4_2_MEMBERS(T, P, tvec2, r, g, b, a)
+                                       _GLM_SWIZZLE4_2_MEMBERS(T, P, tvec2, s, t, p, q)
+                                       _GLM_SWIZZLE4_3_MEMBERS(T, P, tvec3, x, y, z, w)
+                                       _GLM_SWIZZLE4_3_MEMBERS(T, P, tvec3, r, g, b, a)
+                                       _GLM_SWIZZLE4_3_MEMBERS(T, P, tvec3, s, t, p, q)
+                                       _GLM_SWIZZLE4_4_MEMBERS(T, P, tvec4, x, y, z, w)
+                                       _GLM_SWIZZLE4_4_MEMBERS(T, P, tvec4, r, g, b, a)
+                                       _GLM_SWIZZLE4_4_MEMBERS(T, P, tvec4, s, t, p, q)
+#                              endif//GLM_SWIZZLE
+                       };
+#              else
+                       union { T x, r, s; };
+                       union { T y, g, t; };
+                       union { T z, b, p; };
+                       union { T w, a, q; };
+
+#                      ifdef GLM_SWIZZLE
+                               GLM_SWIZZLE_GEN_VEC_FROM_VEC4(T, P, tvec4, tvec2, tvec3, tvec4)
+#                      endif//GLM_SWIZZLE
+#              endif//GLM_LANG
+
+               //////////////////////////////////////
+               // Component accesses
+
+#              ifdef GLM_FORCE_SIZE_FUNC
+                       /// Return the count of components of the vector
+                       typedef size_t size_type;
+                       GLM_FUNC_DECL GLM_CONSTEXPR size_type size() const;
+
+                       GLM_FUNC_DECL T & operator[](size_type i);
+                       GLM_FUNC_DECL T const & operator[](size_type i) const;
+#              else
+                       /// Return the count of components of the vector
+                       typedef length_t length_type;
+                       GLM_FUNC_DECL GLM_CONSTEXPR length_type length() const;
+
+                       GLM_FUNC_DECL T & operator[](length_type i);
+                       GLM_FUNC_DECL T const & operator[](length_type i) const;
+#              endif//GLM_FORCE_SIZE_FUNC
+
+               //////////////////////////////////////
+               // Implicit basic constructors
+
+               GLM_FUNC_DECL tvec4();
+               GLM_FUNC_DECL tvec4(tvec4<T, P> const & v);
+               template <precision Q>
+               GLM_FUNC_DECL tvec4(tvec4<T, Q> const & v);
+
+               //////////////////////////////////////
+               // Explicit basic constructors
+
+               GLM_FUNC_DECL explicit tvec4(ctor);
+               GLM_FUNC_DECL explicit tvec4(T s);
+               GLM_FUNC_DECL tvec4(T a, T b, T c, T d);
+               GLM_FUNC_DECL ~tvec4(){}
+
+               //////////////////////////////////////
+               // Conversion scalar constructors
+
+               /// Explicit converions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
+               template <typename A, typename B, typename C, typename D>
+               GLM_FUNC_DECL tvec4(A a, B b, C c, D d);
+               template <typename A, typename B, typename C, typename D>
+               GLM_FUNC_DECL tvec4(tvec1<A, P> const & a, tvec1<B, P> const & b, tvec1<C, P> const & c, tvec1<D, P> const & d);
+
+               //////////////////////////////////////
+               // Conversion vector constructors
+
+               //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
+               template <typename A, typename B, typename C, precision Q>
+               GLM_FUNC_DECL explicit tvec4(tvec2<A, Q> const & a, B b, C c);
+               //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
+               template <typename A, typename B, typename C, precision Q>
+               GLM_FUNC_DECL explicit tvec4(tvec2<A, Q> const & a, tvec1<B, Q> const & b, tvec1<C, Q> const & c);
+               //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
+               template <typename A, typename B, typename C, precision Q>
+               GLM_FUNC_DECL explicit tvec4(A a, tvec2<B, Q> const & b, C c);
+               //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
+               template <typename A, typename B, typename C, precision Q>
+               GLM_FUNC_DECL explicit tvec4(tvec1<A, Q> const & a, tvec2<B, Q> const & b, tvec1<C, Q> const & c);
+               //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
+               template <typename A, typename B, typename C, precision Q>
+               GLM_FUNC_DECL explicit tvec4(A a, B b, tvec2<C, Q> const & c);
+               //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
+               template <typename A, typename B, typename C, precision Q>
+               GLM_FUNC_DECL explicit tvec4(tvec1<A, Q> const & a, tvec1<B, Q> const & b, tvec2<C, Q> const & c);
+               //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
+               template <typename A, typename B, precision Q>
+               GLM_FUNC_DECL explicit tvec4(tvec3<A, Q> const & a, B b);
+               //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
+               template <typename A, typename B, precision Q>
+               GLM_FUNC_DECL explicit tvec4(tvec3<A, Q> const & a, tvec1<B, Q> const & b);
+               //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
+               template <typename A, typename B, precision Q>
+               GLM_FUNC_DECL explicit tvec4(A a, tvec3<B, Q> const & b);
+               //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
+               template <typename A, typename B, precision Q>
+               GLM_FUNC_DECL explicit tvec4(tvec1<A, Q> const & a, tvec3<B, Q> const & b);
+               //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
+               template <typename A, typename B, precision Q>
+               GLM_FUNC_DECL explicit tvec4(tvec2<A, Q> const & a, tvec2<B, Q> const & b);
+               
+#              ifdef GLM_FORCE_EXPLICIT_CTOR
+                       //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
+                       template <typename U, precision Q>
+                       GLM_FUNC_DECL explicit tvec4(tvec4<U, Q> const & v);
+#              else
+                       //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
+                       template <typename U, precision Q>
+                       GLM_FUNC_DECL tvec4(tvec4<U, Q> const & v);
+#              endif
+
+               //////////////////////////////////////
+               // Swizzle constructors
+
+#              if GLM_HAS_ANONYMOUS_UNION && defined(GLM_SWIZZLE)
+                       template <int E0, int E1, int E2, int E3>
+                       GLM_FUNC_DECL tvec4(detail::_swizzle<4, T, P, tvec4<T, P>, E0, E1, E2, E3> const & that)
+                       {
+                               *this = that();
+                       }
+
+                       template <int E0, int E1, int F0, int F1>
+                       GLM_FUNC_DECL tvec4(detail::_swizzle<2, T, P, tvec2<T, P>, E0, E1, -1, -2> const & v, detail::_swizzle<2, T, P, tvec2<T, P>, F0, F1, -1, -2> const & u)
+                       {
+                               *this = tvec4<T, P>(v(), u());
+                       }
+
+                       template <int E0, int E1>
+                       GLM_FUNC_DECL tvec4(T const & x, T const & y, detail::_swizzle<2, T, P, tvec2<T, P>, E0, E1, -1, -2> const & v)
+                       {
+                               *this = tvec4<T, P>(x, y, v());
+                       }
+
+                       template <int E0, int E1>
+                       GLM_FUNC_DECL tvec4(T const & x, detail::_swizzle<2, T, P, tvec2<T, P>, E0, E1, -1, -2> const & v, T const & w)
+                       {
+                               *this = tvec4<T, P>(x, v(), w);
+                       }
+
+                       template <int E0, int E1>
+                       GLM_FUNC_DECL tvec4(detail::_swizzle<2, T, P, tvec2<T, P>, E0, E1, -1, -2> const & v, T const & z, T const & w)
+                       {
+                               *this = tvec4<T, P>(v(), z, w);
+                       }
+
+                       template <int E0, int E1, int E2>
+                       GLM_FUNC_DECL tvec4(detail::_swizzle<3, T, P, tvec3<T, P>, E0, E1, E2, -1> const & v, T const & w)
+                       {
+                               *this = tvec4<T, P>(v(), w);
+                       }
+
+                       template <int E0, int E1, int E2>
+                       GLM_FUNC_DECL tvec4(T const & x, detail::_swizzle<3, T, P, tvec3<T, P>, E0, E1, E2, -1> const & v)
+                       {
+                               *this = tvec4<T, P>(x, v());
+                       }
+#              endif// GLM_HAS_ANONYMOUS_UNION && defined(GLM_SWIZZLE)
+
+               //////////////////////////////////////
+               // Unary arithmetic operators
+
+               GLM_FUNC_DECL tvec4<T, P> & operator=(tvec4<T, P> const & v);
+
+               template <typename U>
+               GLM_FUNC_DECL tvec4<T, P> & operator=(tvec4<U, P> const & v);
+               template <typename U>
+               GLM_FUNC_DECL tvec4<T, P> & operator+=(U scalar);
+               template <typename U>
+               GLM_FUNC_DECL tvec4<T, P> & operator+=(tvec1<U, P> const & v);
+               template <typename U>
+               GLM_FUNC_DECL tvec4<T, P> & operator+=(tvec4<U, P> const & v);
+               template <typename U>
+               GLM_FUNC_DECL tvec4<T, P> & operator-=(U scalar);
+               template <typename U>
+               GLM_FUNC_DECL tvec4<T, P> & operator-=(tvec1<U, P> const & v);
+               template <typename U>
+               GLM_FUNC_DECL tvec4<T, P> & operator-=(tvec4<U, P> const & v);
+               template <typename U>
+               GLM_FUNC_DECL tvec4<T, P> & operator*=(U scalar);
+               template <typename U>
+               GLM_FUNC_DECL tvec4<T, P> & operator*=(tvec1<U, P> const & v);
+               template <typename U>
+               GLM_FUNC_DECL tvec4<T, P> & operator*=(tvec4<U, P> const & v);
+               template <typename U>
+               GLM_FUNC_DECL tvec4<T, P> & operator/=(U scalar);
+               template <typename U>
+               GLM_FUNC_DECL tvec4<T, P> & operator/=(tvec1<U, P> const & v);
+               template <typename U>
+               GLM_FUNC_DECL tvec4<T, P> & operator/=(tvec4<U, P> const & v);
+
+               //////////////////////////////////////
+               // Increment and decrement operators
+
+               GLM_FUNC_DECL tvec4<T, P> & operator++();
+               GLM_FUNC_DECL tvec4<T, P> & operator--();
+               GLM_FUNC_DECL tvec4<T, P> operator++(int);
+               GLM_FUNC_DECL tvec4<T, P> operator--(int);
+
+               //////////////////////////////////////
+               // Unary bit operators
+
+               template <typename U>
+               GLM_FUNC_DECL tvec4<T, P> & operator%=(U scalar);
+               template <typename U>
+               GLM_FUNC_DECL tvec4<T, P> & operator%=(tvec1<U, P> const & v);
+               template <typename U>
+               GLM_FUNC_DECL tvec4<T, P> & operator%=(tvec4<U, P> const & v);
+               template <typename U>
+               GLM_FUNC_DECL tvec4<T, P> & operator&=(U scalar);
+               template <typename U>
+               GLM_FUNC_DECL tvec4<T, P> & operator&=(tvec1<U, P> const & v);
+               template <typename U>
+               GLM_FUNC_DECL tvec4<T, P> & operator&=(tvec4<U, P> const & v);
+               template <typename U>
+               GLM_FUNC_DECL tvec4<T, P> & operator|=(U scalar);
+               template <typename U>
+               GLM_FUNC_DECL tvec4<T, P> & operator|=(tvec1<U, P> const & v);
+               template <typename U>
+               GLM_FUNC_DECL tvec4<T, P> & operator|=(tvec4<U, P> const & v);
+               template <typename U>
+               GLM_FUNC_DECL tvec4<T, P> & operator^=(U scalar);
+               template <typename U>
+               GLM_FUNC_DECL tvec4<T, P> & operator^=(tvec1<U, P> const & v);
+               template <typename U>
+               GLM_FUNC_DECL tvec4<T, P> & operator^=(tvec4<U, P> const & v);
+               template <typename U>
+               GLM_FUNC_DECL tvec4<T, P> & operator<<=(U scalar);
+               template <typename U>
+               GLM_FUNC_DECL tvec4<T, P> & operator<<=(tvec1<U, P> const & v);
+               template <typename U>
+               GLM_FUNC_DECL tvec4<T, P> & operator<<=(tvec4<U, P> const & v);
+               template <typename U>
+               GLM_FUNC_DECL tvec4<T, P> & operator>>=(U scalar);
+               template <typename U>
+               GLM_FUNC_DECL tvec4<T, P> & operator>>=(tvec1<U, P> const & v);
+               template <typename U>
+               GLM_FUNC_DECL tvec4<T, P> & operator>>=(tvec4<U, P> const & v);
+       };
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec4<T, P> operator+(tvec4<T, P> const & v, T scalar);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec4<T, P> operator+(tvec4<T, P> const & v, tvec1<T, P> const & s);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec4<T, P> operator+(T scalar, tvec4<T, P> const & v);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec4<T, P> operator+(tvec1<T, P> const & s, tvec4<T, P> const & v);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec4<T, P> operator+(tvec4<T, P> const & v1, tvec4<T, P> const & v2);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec4<T, P> operator-(tvec4<T, P> const & v, T scalar);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec4<T, P> operator-(tvec4<T, P> const & v, tvec1<T, P> const & s);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec4<T, P> operator-(T scalar, tvec4<T, P> const & v);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec4<T, P> operator-(tvec1<T, P> const & s, tvec4<T, P> const & v);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec4<T, P> operator-(tvec4<T, P> const & v1, tvec4<T, P> const & v2);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec4<T, P> operator*(tvec4<T, P> const & v, T scalar);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec4<T, P> operator*(tvec4<T, P> const & v, tvec1<T, P> const & s);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec4<T, P> operator*(T scalar, tvec4<T, P> const & v);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec4<T, P> operator*(tvec1<T, P> const & s, tvec4<T, P> const & v);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec4<T, P> operator*(tvec4<T, P> const & v1, tvec4<T, P> const & v2);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec4<T, P> operator/(tvec4<T, P> const & v, T scalar);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec4<T, P> operator/(tvec4<T, P> const & v, tvec1<T, P> const & s);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec4<T, P> operator/(T scalar, tvec4<T, P> const & v);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec4<T, P> operator/(tvec1<T, P> const & s, tvec4<T, P> const & v);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec4<T, P> operator/(tvec4<T, P> const & v1, tvec4<T, P> const & v2);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec4<T, P> operator-(tvec4<T, P> const & v);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL bool operator==(tvec4<T, P> const & v1, tvec4<T, P> const & v2);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL bool operator!=(tvec4<T, P> const & v1, tvec4<T, P> const & v2);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec4<T, P> operator%(tvec4<T, P> const & v, T scalar);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec4<T, P> operator%(tvec4<T, P> const & v, tvec1<T, P> const & s);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec4<T, P> operator%(T scalar, tvec4<T, P> const & v);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec4<T, P> operator%(tvec1<T, P> const & s, tvec4<T, P> const & v);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec4<T, P> operator%(tvec4<T, P> const & v1, tvec4<T, P> const & v2);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec4<T, P> operator&(tvec4<T, P> const & v, T scalar);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec4<T, P> operator&(tvec4<T, P> const & v, tvec1<T, P> const & s);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec4<T, P> operator&(T scalar, tvec4<T, P> const & v);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec4<T, P> operator&(tvec1<T, P> const & s, tvec4<T, P> const & v);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec4<T, P> operator&(tvec4<T, P> const & v1, tvec4<T, P> const & v2);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec4<T, P> operator|(tvec4<T, P> const & v, T scalar);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec4<T, P> operator|(tvec4<T, P> const & v, tvec1<T, P> const & s);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec4<T, P> operator|(T scalar, tvec4<T, P> const & v);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec4<T, P> operator|(tvec1<T, P> const & s, tvec4<T, P> const & v);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec4<T, P> operator|(tvec4<T, P> const & v1, tvec4<T, P> const & v2);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec4<T, P> operator^(tvec4<T, P> const & v, T scalar);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec4<T, P> operator^(tvec4<T, P> const & v, tvec1<T, P> const & s);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec4<T, P> operator^(T scalar, tvec4<T, P> const & v);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec4<T, P> operator^(tvec1<T, P> const & s, tvec4<T, P> const & v);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec4<T, P> operator^(tvec4<T, P> const & v1, tvec4<T, P> const & v2);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec4<T, P> operator<<(tvec4<T, P> const & v, T scalar);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec4<T, P> operator<<(tvec4<T, P> const & v, tvec1<T, P> const & s);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec4<T, P> operator<<(T scalar, tvec4<T, P> const & v);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec4<T, P> operator<<(tvec1<T, P> const & s, tvec4<T, P> const & v);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec4<T, P> operator<<(tvec4<T, P> const & v1, tvec4<T, P> const & v2);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec4<T, P> operator>>(tvec4<T, P> const & v, T scalar);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec4<T, P> operator>>(tvec4<T, P> const & v, tvec1<T, P> const & s);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec4<T, P> operator>>(T scalar, tvec4<T, P> const & v);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec4<T, P> operator>>(tvec1<T, P> const & s, tvec4<T, P> const & v);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec4<T, P> operator>>(tvec4<T, P> const & v1, tvec4<T, P> const & v2);
+
+       template <typename T, precision P> 
+       GLM_FUNC_DECL tvec4<T, P> operator~(tvec4<T, P> const & v);
+}//namespace glm
+
+#ifndef GLM_EXTERNAL_TEMPLATE
+#include "type_vec4.inl"
+#endif//GLM_EXTERNAL_TEMPLATE
diff --git a/include/glm/detail/type_vec4.inl b/include/glm/detail/type_vec4.inl
new file mode 100644 (file)
index 0000000..fbdf51f
--- /dev/null
@@ -0,0 +1,1124 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref core
+/// @file glm/detail/type_tvec4.inl
+/// @date 2008-08-23 / 2011-06-15
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////
+
+namespace glm
+{
+       //////////////////////////////////////
+       // Implicit basic constructors
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec4<T, P>::tvec4()
+#              ifndef GLM_FORCE_NO_CTOR_INIT
+                       : x(0), y(0), z(0), w(0)
+#              endif
+       {}
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec4<T, P>::tvec4(tvec4<T, P> const & v)
+               : x(v.x), y(v.y), z(v.z), w(v.w)
+       {}
+
+       template <typename T, precision P>
+       template <precision Q>
+       GLM_FUNC_QUALIFIER tvec4<T, P>::tvec4(tvec4<T, Q> const & v)
+               : x(v.x), y(v.y), z(v.z), w(v.w)
+       {}
+
+       //////////////////////////////////////
+       // Explicit basic constructors
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec4<T, P>::tvec4(ctor)
+       {}
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec4<T, P>::tvec4(T s)
+               : x(s), y(s), z(s), w(s)
+       {}
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec4<T, P>::tvec4(T a, T b, T c, T d)
+               : x(a), y(b), z(c), w(d)
+       {}
+
+       //////////////////////////////////////
+       // Conversion scalar constructors
+
+       template <typename T, precision P>
+       template <typename A, typename B, typename C, typename D>
+       GLM_FUNC_QUALIFIER tvec4<T, P>::tvec4(A a, B b, C c, D d) :
+               x(static_cast<T>(a)),
+               y(static_cast<T>(b)),
+               z(static_cast<T>(c)),
+               w(static_cast<T>(d))
+       {}
+
+       template <typename T, precision P>
+       template <typename A, typename B, typename C, typename D>
+       GLM_FUNC_QUALIFIER tvec4<T, P>::tvec4(tvec1<A, P> const & a, tvec1<B, P> const & b, tvec1<C, P> const & c, tvec1<D, P> const & d) :
+               x(static_cast<T>(a.x)),
+               y(static_cast<T>(b.x)),
+               z(static_cast<T>(c.x)),
+               w(static_cast<T>(d.x))
+       {}
+
+       //////////////////////////////////////
+       // Conversion vector constructors
+
+       template <typename T, precision P>
+       template <typename A, typename B, typename C, precision Q>
+       GLM_FUNC_QUALIFIER tvec4<T, P>::tvec4(tvec2<A, Q> const & a, B b, C c) :
+               x(static_cast<T>(a.x)),
+               y(static_cast<T>(a.y)),
+               z(static_cast<T>(b)),
+               w(static_cast<T>(c))
+       {}
+
+       template <typename T, precision P>
+       template <typename A, typename B, typename C, precision Q>
+       GLM_FUNC_QUALIFIER tvec4<T, P>::tvec4(tvec2<A, Q> const & a, tvec1<B, Q> const & b, tvec1<C, Q> const & c) :
+               x(static_cast<T>(a.x)),
+               y(static_cast<T>(a.y)),
+               z(static_cast<T>(b.x)),
+               w(static_cast<T>(c.x))
+       {}
+
+       template <typename T, precision P>
+       template <typename A, typename B, typename C, precision Q>
+       GLM_FUNC_QUALIFIER tvec4<T, P>::tvec4(A s1, tvec2<B, Q> const & v, C s2) :
+               x(static_cast<T>(s1)),
+               y(static_cast<T>(v.x)),
+               z(static_cast<T>(v.y)),
+               w(static_cast<T>(s2))
+       {}
+
+       template <typename T, precision P>
+       template <typename A, typename B, typename C, precision Q>
+       GLM_FUNC_QUALIFIER tvec4<T, P>::tvec4(tvec1<A, Q> const & a, tvec2<B, Q> const & b, tvec1<C, Q> const & c) :
+               x(static_cast<T>(a.x)),
+               y(static_cast<T>(b.x)),
+               z(static_cast<T>(b.y)),
+               w(static_cast<T>(c.x))
+       {}
+
+       template <typename T, precision P>
+       template <typename A, typename B, typename C, precision Q>
+       GLM_FUNC_QUALIFIER tvec4<T, P>::tvec4(A s1, B s2, tvec2<C, Q> const & v) :
+               x(static_cast<T>(s1)),
+               y(static_cast<T>(s2)),
+               z(static_cast<T>(v.x)),
+               w(static_cast<T>(v.y))
+       {}
+
+       template <typename T, precision P>
+       template <typename A, typename B, typename C, precision Q>
+       GLM_FUNC_QUALIFIER tvec4<T, P>::tvec4(tvec1<A, Q> const & a, tvec1<B, Q> const & b, tvec2<C, Q> const & c) :
+               x(static_cast<T>(a.x)),
+               y(static_cast<T>(b.x)),
+               z(static_cast<T>(c.x)),
+               w(static_cast<T>(c.y))
+       {}
+
+       template <typename T, precision P>
+       template <typename A, typename B, precision Q>
+       GLM_FUNC_QUALIFIER tvec4<T, P>::tvec4(tvec3<A, Q> const & a, B b) :
+               x(static_cast<T>(a.x)),
+               y(static_cast<T>(a.y)),
+               z(static_cast<T>(a.z)),
+               w(static_cast<T>(b))
+       {}
+
+       template <typename T, precision P>
+       template <typename A, typename B, precision Q>
+       GLM_FUNC_QUALIFIER tvec4<T, P>::tvec4(tvec3<A, Q> const & a, tvec1<B, Q> const & b) :
+               x(static_cast<T>(a.x)),
+               y(static_cast<T>(a.y)),
+               z(static_cast<T>(a.z)),
+               w(static_cast<T>(b.x))
+       {}
+
+       template <typename T, precision P>
+       template <typename A, typename B, precision Q>
+       GLM_FUNC_QUALIFIER tvec4<T, P>::tvec4(A a, tvec3<B, Q> const & b) :
+               x(static_cast<T>(a)),
+               y(static_cast<T>(b.x)),
+               z(static_cast<T>(b.y)),
+               w(static_cast<T>(b.z))
+       {}
+
+       template <typename T, precision P>
+       template <typename A, typename B, precision Q>
+       GLM_FUNC_QUALIFIER tvec4<T, P>::tvec4(tvec1<A, Q> const & a, tvec3<B, Q> const & b) :
+               x(static_cast<T>(a.x)),
+               y(static_cast<T>(b.x)),
+               z(static_cast<T>(b.y)),
+               w(static_cast<T>(b.z))
+       {}
+
+       template <typename T, precision P>
+       template <typename A, typename B, precision Q>
+       GLM_FUNC_QUALIFIER tvec4<T, P>::tvec4(tvec2<A, Q> const & a, tvec2<B, Q> const & b) :
+               x(static_cast<T>(a.x)),
+               y(static_cast<T>(a.y)),
+               z(static_cast<T>(b.x)),
+               w(static_cast<T>(b.y))
+       {}
+
+       template <typename T, precision P>
+       template <typename U, precision Q>
+       GLM_FUNC_QUALIFIER tvec4<T, P>::tvec4(tvec4<U, Q> const & v) :
+               x(static_cast<T>(v.x)),
+               y(static_cast<T>(v.y)),
+               z(static_cast<T>(v.z)),
+               w(static_cast<T>(v.w))
+       {}
+
+       //////////////////////////////////////
+       // Component accesses
+
+#      ifdef GLM_FORCE_SIZE_FUNC
+               template <typename T, precision P>
+               GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tvec4<T, P>::size_type tvec4<T, P>::size() const
+               {
+                       return 4;
+               }
+
+               template <typename T, precision P>
+               GLM_FUNC_QUALIFIER T & tvec4<T, P>::operator[](typename tvec4<T, P>::size_type i)
+               {
+                       assert(i >= 0 && static_cast<detail::component_count_t>(i) < detail::component_count(*this));
+                       return (&x)[i];
+               }
+
+               template <typename T, precision P>
+               GLM_FUNC_QUALIFIER T const & tvec4<T, P>::operator[](typename tvec4<T, P>::size_type i) const
+               {
+                       assert(i >= 0 && static_cast<detail::component_count_t>(i) < detail::component_count(*this));
+                       return (&x)[i];
+               }
+#      else
+               template <typename T, precision P>
+               GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tvec4<T, P>::length_type tvec4<T, P>::length() const
+               {
+                       return 4;
+               }
+
+               template <typename T, precision P>
+               GLM_FUNC_QUALIFIER T & tvec4<T, P>::operator[](typename tvec4<T, P>::length_type i)
+               {
+                       assert(i >= 0 && static_cast<detail::component_count_t>(i) < detail::component_count(*this));
+                       return (&x)[i];
+               }
+
+               template <typename T, precision P>
+               GLM_FUNC_QUALIFIER T const & tvec4<T, P>::operator[](typename tvec4<T, P>::length_type i) const
+               {
+                       assert(i >= 0 && static_cast<detail::component_count_t>(i) < detail::component_count(*this));
+                       return (&x)[i];
+               }
+#      endif//GLM_FORCE_SIZE_FUNC
+
+       //////////////////////////////////////
+       // Unary arithmetic operators
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator=(tvec4<T, P> const & v)
+       {
+               this->x = v.x;
+               this->y = v.y;
+               this->z = v.z;
+               this->w = v.w;
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U>
+       GLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator=(tvec4<U, P> const & v)
+       {
+               this->x = static_cast<T>(v.x);
+               this->y = static_cast<T>(v.y);
+               this->z = static_cast<T>(v.z);
+               this->w = static_cast<T>(v.w);
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U>
+       GLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator+=(U scalar)
+       {
+               this->x += static_cast<T>(scalar);
+               this->y += static_cast<T>(scalar);
+               this->z += static_cast<T>(scalar);
+               this->w += static_cast<T>(scalar);
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U>
+       GLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator+=(tvec1<U, P> const & v)
+       {
+               T const scalar = static_cast<T>(v.x);
+               this->x += scalar;
+               this->y += scalar;
+               this->z += scalar;
+               this->w += scalar;
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U>
+       GLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator+=(tvec4<U, P> const & v)
+       {
+               this->x += static_cast<T>(v.x);
+               this->y += static_cast<T>(v.y);
+               this->z += static_cast<T>(v.z);
+               this->w += static_cast<T>(v.w);
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U>
+       GLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator-=(U scalar)
+       {
+               this->x -= static_cast<T>(scalar);
+               this->y -= static_cast<T>(scalar);
+               this->z -= static_cast<T>(scalar);
+               this->w -= static_cast<T>(scalar);
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U>
+       GLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator-=(tvec1<U, P> const & v)
+       {
+               T const scalar = static_cast<T>(v.x);
+               this->x -= scalar;
+               this->y -= scalar;
+               this->z -= scalar;
+               this->w -= scalar;
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U>
+       GLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator-=(tvec4<U, P> const & v)
+       {
+               this->x -= static_cast<T>(v.x);
+               this->y -= static_cast<T>(v.y);
+               this->z -= static_cast<T>(v.z);
+               this->w -= static_cast<T>(v.w);
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U>
+       GLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator*=(U s)
+       {
+               this->x *= static_cast<T>(s);
+               this->y *= static_cast<T>(s);
+               this->z *= static_cast<T>(s);
+               this->w *= static_cast<T>(s);
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U>
+       GLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator*=(tvec1<U, P> const & v)
+       {
+               this->x *= static_cast<T>(v.x);
+               this->y *= static_cast<T>(v.x);
+               this->z *= static_cast<T>(v.x);
+               this->w *= static_cast<T>(v.x);
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U>
+       GLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator*=(tvec4<U, P> const & v)
+       {
+               this->x *= static_cast<T>(v.x);
+               this->y *= static_cast<T>(v.y);
+               this->z *= static_cast<T>(v.z);
+               this->w *= static_cast<T>(v.w);
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U> 
+       GLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator/=(U s)
+       {
+               this->x /= static_cast<T>(s);
+               this->y /= static_cast<T>(s);
+               this->z /= static_cast<T>(s);
+               this->w /= static_cast<T>(s);
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U> 
+       GLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator/=(tvec1<U, P> const & v)
+       {
+               this->x /= static_cast<T>(v.x);
+               this->y /= static_cast<T>(v.x);
+               this->z /= static_cast<T>(v.x);
+               this->w /= static_cast<T>(v.x);
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U> 
+       GLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator/=(tvec4<U, P> const & v)
+       {
+               this->x /= static_cast<T>(v.x);
+               this->y /= static_cast<T>(v.y);
+               this->z /= static_cast<T>(v.z);
+               this->w /= static_cast<T>(v.w);
+               return *this;
+       }
+
+       //////////////////////////////////////
+       // Increment and decrement operators
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator++()
+       {
+               ++this->x;
+               ++this->y;
+               ++this->z;
+               ++this->w;
+               return *this;
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator--()
+       {
+               --this->x;
+               --this->y;
+               --this->z;
+               --this->w;
+               return *this;
+       }
+
+       template <typename T, precision P> 
+       GLM_FUNC_QUALIFIER tvec4<T, P> tvec4<T, P>::operator++(int)
+       {
+               tvec4<T, P> Result(*this);
+               ++*this;
+               return Result;
+       }
+
+       template <typename T, precision P> 
+       GLM_FUNC_QUALIFIER tvec4<T, P> tvec4<T, P>::operator--(int)
+       {
+               tvec4<T, P> Result(*this);
+               --*this;
+               return Result;
+       }
+
+       //////////////////////////////////////
+       // Unary bit operators
+
+       template <typename T, precision P>
+       template <typename U> 
+       GLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator%=(U scalar)
+       {
+               this->x %= static_cast<T>(scalar);
+               this->y %= static_cast<T>(scalar);
+               this->z %= static_cast<T>(scalar);
+               this->w %= static_cast<T>(scalar);
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U> 
+       GLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator%=(tvec1<U, P> const & v)
+       {
+               this->x %= static_cast<T>(v.x);
+               this->y %= static_cast<T>(v.x);
+               this->z %= static_cast<T>(v.x);
+               this->w %= static_cast<T>(v.x);
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U> 
+       GLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator%=(tvec4<U, P> const & v)
+       {
+               this->x %= static_cast<T>(v.x);
+               this->y %= static_cast<T>(v.y);
+               this->z %= static_cast<T>(v.z);
+               this->w %= static_cast<T>(v.w);
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U> 
+       GLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator&=(U scalar)
+       {
+               this->x &= static_cast<T>(scalar);
+               this->y &= static_cast<T>(scalar);
+               this->z &= static_cast<T>(scalar);
+               this->w &= static_cast<T>(scalar);
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U> 
+       GLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator&=(tvec1<U, P> const & v)
+       {
+               this->x &= static_cast<T>(v.x);
+               this->y &= static_cast<T>(v.x);
+               this->z &= static_cast<T>(v.x);
+               this->w &= static_cast<T>(v.x);
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U> 
+       GLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator&=(tvec4<U, P> const & v)
+       {
+               this->x &= static_cast<T>(v.x);
+               this->y &= static_cast<T>(v.y);
+               this->z &= static_cast<T>(v.z);
+               this->w &= static_cast<T>(v.w);
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U> 
+       GLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator|=(U scalar)
+       {
+               this->x |= static_cast<T>(scalar);
+               this->y |= static_cast<T>(scalar);
+               this->z |= static_cast<T>(scalar);
+               this->w |= static_cast<T>(scalar);
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U> 
+       GLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator|=(tvec1<U, P> const & v)
+       {
+               this->x |= static_cast<T>(v.x);
+               this->y |= static_cast<T>(v.x);
+               this->z |= static_cast<T>(v.x);
+               this->w |= static_cast<T>(v.x);
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U> 
+       GLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator|=(tvec4<U, P> const & v)
+       {
+               this->x |= static_cast<T>(v.x);
+               this->y |= static_cast<T>(v.y);
+               this->z |= static_cast<T>(v.z);
+               this->w |= static_cast<T>(v.w);
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U> 
+       GLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator^=(U scalar)
+       {
+               this->x ^= static_cast<T>(scalar);
+               this->y ^= static_cast<T>(scalar);
+               this->z ^= static_cast<T>(scalar);
+               this->w ^= static_cast<T>(scalar);
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U> 
+       GLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator^=(tvec1<U, P> const & v)
+       {
+               this->x ^= static_cast<T>(v.x);
+               this->y ^= static_cast<T>(v.x);
+               this->z ^= static_cast<T>(v.x);
+               this->w ^= static_cast<T>(v.x);
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U> 
+       GLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator^=(tvec4<U, P> const & v)
+       {
+               this->x ^= static_cast<T>(v.x);
+               this->y ^= static_cast<T>(v.y);
+               this->z ^= static_cast<T>(v.z);
+               this->w ^= static_cast<T>(v.w);
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U> 
+       GLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator<<=(U scalar)
+       {
+               this->x <<= static_cast<T>(scalar);
+               this->y <<= static_cast<T>(scalar);
+               this->z <<= static_cast<T>(scalar);
+               this->w <<= static_cast<T>(scalar);
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U> 
+       GLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator<<=(tvec1<U, P> const & v)
+       {
+               this->x <<= static_cast<T>(v.x);
+               this->y <<= static_cast<T>(v.x);
+               this->z <<= static_cast<T>(v.x);
+               this->w <<= static_cast<T>(v.x);
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U> 
+       GLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator<<=(tvec4<U, P> const & v)
+       {
+               this->x <<= static_cast<T>(v.x);
+               this->y <<= static_cast<T>(v.y);
+               this->z <<= static_cast<T>(v.z);
+               this->w <<= static_cast<T>(v.w);
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U> 
+       GLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator>>=(U scalar)
+       {
+               this->x >>= static_cast<T>(scalar);
+               this->y >>= static_cast<T>(scalar);
+               this->z >>= static_cast<T>(scalar);
+               this->w >>= static_cast<T>(scalar);
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U> 
+       GLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator>>=(tvec1<U, P> const & v)
+       {
+               this->x >>= static_cast<T>(v.x);
+               this->y >>= static_cast<T>(v.y);
+               this->z >>= static_cast<T>(v.z);
+               this->w >>= static_cast<T>(v.w);
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U> 
+       GLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator>>=(tvec4<U, P> const & v)
+       {
+               this->x >>= static_cast<T>(v.x);
+               this->y >>= static_cast<T>(v.y);
+               this->z >>= static_cast<T>(v.z);
+               this->w >>= static_cast<T>(v.w);
+               return *this;
+       }
+
+       //////////////////////////////////////
+       // Boolean operators
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER bool operator==(tvec4<T, P> const & v1, tvec4<T, P> const & v2)
+       {
+               return (v1.x == v2.x) && (v1.y == v2.y) && (v1.z == v2.z) && (v1.w == v2.w);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER bool operator!=(tvec4<T, P> const & v1, tvec4<T, P> const & v2)
+       {
+               return (v1.x != v2.x) || (v1.y != v2.y) || (v1.z != v2.z) || (v1.w != v2.w);
+       }
+
+       //////////////////////////////////////
+       // Binary arithmetic operators
+
+       template <typename T, precision P> 
+       GLM_FUNC_QUALIFIER tvec4<T, P> operator+(tvec4<T, P> const & v, T scalar)
+       {
+               return tvec4<T, P>(
+                       v.x + scalar,
+                       v.y + scalar,
+                       v.z + scalar,
+                       v.w + scalar);
+       }
+
+       template <typename T, precision P> 
+       GLM_FUNC_QUALIFIER tvec4<T, P> operator+(T scalar, tvec4<T, P> const & v)
+       {
+               return tvec4<T, P>(
+                       scalar + v.x,
+                       scalar + v.y,
+                       scalar + v.z,
+                       scalar + v.w);
+       }
+
+       template <typename T, precision P> 
+       GLM_FUNC_QUALIFIER tvec4<T, P> operator+(tvec4<T, P> const & v1, tvec4<T, P> const & v2)
+       {
+               return tvec4<T, P>(
+                       v1.x + v2.x,
+                       v1.y + v2.y,
+                       v1.z + v2.z,
+                       v1.w + v2.w);
+       }
+
+       //operator-
+       template <typename T, precision P> 
+       GLM_FUNC_QUALIFIER tvec4<T, P> operator-(tvec4<T, P> const & v, T scalar)
+       {
+               return tvec4<T, P>(
+                       v.x - scalar,
+                       v.y - scalar,
+                       v.z - scalar,
+                       v.w - scalar);
+       }
+
+       template <typename T, precision P> 
+       GLM_FUNC_QUALIFIER tvec4<T, P> operator-(T scalar, tvec4<T, P> const & v)
+       {
+               return tvec4<T, P>(
+                       scalar - v.x,
+                       scalar - v.y,
+                       scalar - v.z,
+                       scalar - v.w);
+       }
+
+       template <typename T, precision P> 
+       GLM_FUNC_QUALIFIER tvec4<T, P> operator-(tvec4<T, P> const & v1, tvec4<T, P> const & v2)
+       {
+               return tvec4<T, P>(
+                       v1.x - v2.x,
+                       v1.y - v2.y,
+                       v1.z - v2.z,
+                       v1.w - v2.w);
+       }
+
+       //operator*
+       template <typename T, precision P> 
+       GLM_FUNC_QUALIFIER tvec4<T, P> operator*(tvec4<T, P> const & v, T scalar)
+       {
+               return tvec4<T, P>(
+                       v.x * scalar,
+                       v.y * scalar,
+                       v.z * scalar,
+                       v.w * scalar);
+       }
+
+       template <typename T, precision P> 
+       GLM_FUNC_QUALIFIER tvec4<T, P> operator*(T scalar, tvec4<T, P> const & v)
+       {
+               return tvec4<T, P>(
+                       scalar * v.x,
+                       scalar * v.y,
+                       scalar * v.z,
+                       scalar * v.w);
+       }
+
+       template <typename T, precision P> 
+       GLM_FUNC_QUALIFIER tvec4<T, P> operator*(tvec4<T, P> const & v1, tvec4<T, P> const & v2)
+       {
+               return tvec4<T, P>(
+                       v1.x * v2.x,
+                       v1.y * v2.y,
+                       v1.z * v2.z,
+                       v1.w * v2.w);
+       }
+
+       //operator/
+       template <typename T, precision P> 
+       GLM_FUNC_QUALIFIER tvec4<T, P> operator/(tvec4<T, P> const & v, T scalar)
+       {
+               return tvec4<T, P>(
+                       v.x / scalar,
+                       v.y / scalar,
+                       v.z / scalar,
+                       v.w / scalar);
+       }
+
+       template <typename T, precision P> 
+       GLM_FUNC_QUALIFIER tvec4<T, P> operator/(T scalar, tvec4<T, P> const & v)
+       {
+               return tvec4<T, P>(
+                       scalar / v.x,
+                       scalar / v.y,
+                       scalar / v.z,
+                       scalar / v.w);
+       }
+
+       template <typename T, precision P> 
+       GLM_FUNC_QUALIFIER tvec4<T, P> operator/(tvec4<T, P> const & v1, tvec4<T, P> const & v2)
+       {
+               return tvec4<T, P>(
+                       v1.x / v2.x,
+                       v1.y / v2.y,
+                       v1.z / v2.z,
+                       v1.w / v2.w);
+       }
+
+       // Unary constant operators
+       template <typename T, precision P> 
+       GLM_FUNC_QUALIFIER tvec4<T, P> operator-(tvec4<T, P> const & v)
+       {
+               return tvec4<T, P>(
+                       -v.x, 
+                       -v.y, 
+                       -v.z, 
+                       -v.w);
+       }
+
+       //////////////////////////////////////
+       // Binary bit operators
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec4<T, P> operator%(tvec4<T, P> const & v, T s)
+       {
+               return tvec4<T, P>(
+                       v.x % s,
+                       v.y % s,
+                       v.z % s,
+                       v.w % s);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec4<T, P> operator%(tvec4<T, P> const & v, tvec1<T, P> const & s)
+       {
+               return tvec4<T, P>(
+                       v.x % s.x,
+                       v.y % s.x,
+                       v.z % s.x,
+                       v.w % s.x);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec4<T, P> operator%(T s, tvec4<T, P> const & v)
+       {
+               return tvec4<T, P>(
+                       s % v.x,
+                       s % v.y,
+                       s % v.z,
+                       s % v.w);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec4<T, P> operator%(tvec1<T, P> const & s, tvec4<T, P> const & v)
+       {
+               return tvec4<T, P>(
+                       s.x % v.x,
+                       s.x % v.y,
+                       s.x % v.z,
+                       s.x % v.w);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec4<T, P> operator%(tvec4<T, P> const & v1, tvec4<T, P> const & v2)
+       {
+               return tvec4<T, P>(
+                       v1.x % v2.x,
+                       v1.y % v2.y,
+                       v1.z % v2.z,
+                       v1.w % v2.w);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec4<T, P> operator&(tvec4<T, P> const & v, T s)
+       {
+               return tvec4<T, P>(
+                       v.x & s,
+                       v.y & s,
+                       v.z & s,
+                       v.w & s);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec4<T, P> operator&(tvec4<T, P> const & v, tvec1<T, P> const & s)
+       {
+               return tvec4<T, P>(
+                       v.x & s.x,
+                       v.y & s.x,
+                       v.z & s.x,
+                       v.w & s.x);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec4<T, P> operator&(T s, tvec4<T, P> const & v)
+       {
+               return tvec4<T, P>(
+                       s & v.x,
+                       s & v.y,
+                       s & v.z,
+                       s & v.w);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec4<T, P> operator&(tvec1<T, P> const & s, tvec4<T, P> const & v)
+       {
+               return tvec4<T, P>(
+                       s.x & v.x,
+                       s.x & v.y,
+                       s.x & v.z,
+                       s.x & v.w);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec4<T, P> operator&(tvec4<T, P> const & v1, tvec4<T, P> const & v2)
+       {
+               return tvec4<T, P>(
+                       v1.x & v2.x,
+                       v1.y & v2.y,
+                       v1.z & v2.z,
+                       v1.w & v2.w);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec4<T, P> operator|(tvec4<T, P> const & v, T s)
+       {
+               return tvec4<T, P>(
+                       v.x | s,
+                       v.y | s,
+                       v.z | s,
+                       v.w | s);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec4<T, P> operator|(tvec4<T, P> const & v, tvec1<T, P> const & s)
+       {
+               return tvec4<T, P>(
+                       v.x | s.x,
+                       v.y | s.x,
+                       v.z | s.x,
+                       v.w | s.x);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec4<T, P> operator|(T s, tvec4<T, P> const & v)
+       {
+               return tvec4<T, P>(
+                       s | v.x,
+                       s | v.y,
+                       s | v.z,
+                       s | v.w);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec4<T, P> operator|(tvec1<T, P> const & s, tvec4<T, P> const & v)
+       {
+               return tvec4<T, P>(
+                       s.x | v.x,
+                       s.x | v.y,
+                       s.x | v.z,
+                       s.x | v.w);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec4<T, P> operator|(tvec4<T, P> const & v1, tvec4<T, P> const & v2)
+       {
+               return tvec4<T, P>(
+                       v1.x | v2.x,
+                       v1.y | v2.y,
+                       v1.z | v2.z,
+                       v1.w | v2.w);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec4<T, P> operator^(tvec4<T, P> const & v, T s)
+       {
+               return tvec4<T, P>(
+                       v.x ^ s,
+                       v.y ^ s,
+                       v.z ^ s,
+                       v.w ^ s);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec4<T, P> operator^(tvec4<T, P> const & v, tvec1<T, P> const & s)
+       {
+               return tvec4<T, P>(
+                       v.x ^ s.x,
+                       v.y ^ s.x,
+                       v.z ^ s.x,
+                       v.w ^ s.x);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec4<T, P> operator^(T scalar, tvec4<T, P> const & v)
+       {
+               return tvec4<T, P>(
+                       scalar ^ v.x,
+                       scalar ^ v.y,
+                       scalar ^ v.z,
+                       scalar ^ v.w);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec4<T, P> operator^(tvec1<T, P> const & s, tvec4<T, P> const & v)
+       {
+               return tvec4<T, P>(
+                       s.x ^ v.x,
+                       s.x ^ v.y,
+                       s.x ^ v.z,
+                       s.x ^ v.w);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec4<T, P> operator^(tvec4<T, P> const & v1, tvec4<T, P> const & v2)
+       {
+               return tvec4<T, P>(
+                       v1.x ^ v2.x,
+                       v1.y ^ v2.y,
+                       v1.z ^ v2.z,
+                       v1.w ^ v2.w);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec4<T, P> operator<<(tvec4<T, P> const & v, T scalar)
+       {
+               return tvec4<T, P>(
+                       v.x << scalar,
+                       v.y << scalar,
+                       v.z << scalar,
+                       v.w << scalar);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec4<T, P> operator<<(tvec4<T, P> const & v, tvec1<T, P> const & s)
+       {
+               return tvec4<T, P>(
+                       v.x << s.x,
+                       v.y << s.x,
+                       v.z << s.x,
+                       v.w << s.x);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec4<T, P> operator<<(T scalar, tvec4<T, P> const & v)
+       {
+               return tvec4<T, P>(
+                       scalar << v.x,
+                       scalar << v.y,
+                       scalar << v.z,
+                       scalar << v.w);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec4<T, P> operator<<(tvec1<T, P> const & s, tvec4<T, P> const & v)
+       {
+               return tvec4<T, P>(
+                       s.x << v.x,
+                       s.x << v.y,
+                       s.x << v.z,
+                       s.x << v.w);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec4<T, P> operator<<(tvec4<T, P> const & v1, tvec4<T, P> const & v2)
+       {
+               return tvec4<T, P>(
+                       v1.x << v2.x,
+                       v1.y << v2.y,
+                       v1.z << v2.z,
+                       v1.w << v2.w);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec4<T, P> operator>>(tvec4<T, P> const & v, T scalar)
+       {
+               return tvec4<T, P>(
+                       v.x >> scalar,
+                       v.y >> scalar,
+                       v.z >> scalar,
+                       v.w >> scalar);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec4<T, P> operator>>(tvec4<T, P> const & v, tvec1<T, P> const & s)
+       {
+               return tvec4<T, P>(
+                       v.x >> s.x,
+                       v.y >> s.x,
+                       v.z >> s.x,
+                       v.w >> s.x);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec4<T, P> operator>>(T scalar, tvec4<T, P> const & v)
+       {
+               return tvec4<T, P>(
+                       scalar >> v.x,
+                       scalar >> v.y,
+                       scalar >> v.z,
+                       scalar >> v.w);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec4<T, P> operator>>(tvec1<T, P> const & s, tvec4<T, P> const & v)
+       {
+               return tvec4<T, P>(
+                       s.x >> v.x,
+                       s.x >> v.y,
+                       s.x >> v.z,
+                       s.x >> v.w);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec4<T, P> operator>>(tvec4<T, P> const & v1, tvec4<T, P> const & v2)
+       {
+               return tvec4<T, P>(
+                       v1.x >> v2.x,
+                       v1.y >> v2.y,
+                       v1.z >> v2.z,
+                       v1.w >> v2.w);
+       }
+
+       template <typename T, precision P> 
+       GLM_FUNC_QUALIFIER tvec4<T, P> operator~(tvec4<T, P> const & v)
+       {
+               return tvec4<T, P>(
+                       ~v.x,
+                       ~v.y,
+                       ~v.z,
+                       ~v.w);
+       }
+}//namespace glm
+
+#if GLM_HAS_ANONYMOUS_UNION && GLM_NOT_BUGGY_VC32BITS
+#if GLM_ARCH & GLM_ARCH_SSE2
+#      include "type_vec4_sse2.inl"
+#endif
+#if GLM_ARCH & GLM_ARCH_AVX
+#      include "type_vec4_avx.inl"
+#endif
+#if GLM_ARCH & GLM_ARCH_AVX2
+#      include "type_vec4_avx2.inl"
+#endif
+#endif//
diff --git a/include/glm/detail/type_vec4_avx.inl b/include/glm/detail/type_vec4_avx.inl
new file mode 100644 (file)
index 0000000..f2a4439
--- /dev/null
@@ -0,0 +1,41 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref core
+/// @file glm/detail/type_tvec4_avx.inl
+/// @date 2014-12-01 / 2014-12-01
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////
+
+namespace glm{
+namespace detail
+{
+
+}//namespace detail
+
+       
+
+}//namespace glm
diff --git a/include/glm/detail/type_vec4_avx2.inl b/include/glm/detail/type_vec4_avx2.inl
new file mode 100644 (file)
index 0000000..fda75e5
--- /dev/null
@@ -0,0 +1,41 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref core
+/// @file glm/detail/type_tvec4_avx2.inl
+/// @date 2014-12-01 / 2014-12-01
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////
+
+namespace glm{
+namespace detail
+{
+
+}//namespace detail
+
+       
+
+}//namespace glm
diff --git a/include/glm/detail/type_vec4_sse2.inl b/include/glm/detail/type_vec4_sse2.inl
new file mode 100644 (file)
index 0000000..002446f
--- /dev/null
@@ -0,0 +1,120 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref core
+/// @file glm/detail/type_tvec4_sse2.inl
+/// @date 2014-12-01 / 2014-12-01
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////
+
+namespace glm{
+namespace detail
+{
+
+}//namespace detail
+
+       template <>
+       GLM_FUNC_QUALIFIER tvec4<float, lowp>::tvec4()
+#              ifndef GLM_FORCE_NO_CTOR_INIT
+                       : data(_mm_setzero_ps())
+#              endif
+       {}
+       
+       template <>
+       GLM_FUNC_QUALIFIER tvec4<float, mediump>::tvec4()
+#              ifndef GLM_FORCE_NO_CTOR_INIT
+                       : data(_mm_setzero_ps())
+#              endif
+       {}
+
+       template <>
+       GLM_FUNC_QUALIFIER tvec4<float, lowp>::tvec4(float s) :
+               data(_mm_set1_ps(s))
+       {}
+       
+       template <>
+       GLM_FUNC_QUALIFIER tvec4<float, mediump>::tvec4(float s) :
+               data(_mm_set1_ps(s))
+       {}
+
+       template <>
+       GLM_FUNC_QUALIFIER tvec4<float, lowp>::tvec4(float a, float b, float c, float d) :
+               data(_mm_set_ps(d, c, b, a))
+       {}
+       
+       template <>
+       GLM_FUNC_QUALIFIER tvec4<float, mediump>::tvec4(float a, float b, float c, float d) :
+               data(_mm_set_ps(d, c, b, a))
+       {}
+
+       template <>
+       template <typename U>
+       GLM_FUNC_QUALIFIER tvec4<float, lowp> & tvec4<float, lowp>::operator+=(U scalar)
+       {
+               this->data = _mm_add_ps(this->data, _mm_set_ps1(static_cast<float>(scalar)));
+               return *this;
+       }
+
+       template <>
+       template <>
+       GLM_FUNC_QUALIFIER tvec4<float, lowp> & tvec4<float, lowp>::operator+=<float>(float scalar)
+       {
+               this->data = _mm_add_ps(this->data, _mm_set_ps1(scalar));
+               return *this;
+       }
+
+       template <>
+       template <typename U>
+       GLM_FUNC_QUALIFIER tvec4<float, mediump> & tvec4<float, mediump>::operator+=(U scalar)
+       {
+               this->data = _mm_add_ps(this->data, _mm_set_ps1(static_cast<float>(scalar)));
+               return *this;
+       }
+
+       template <>
+       template <>
+       GLM_FUNC_QUALIFIER tvec4<float, mediump> & tvec4<float, mediump>::operator+=<float>(float scalar)
+       {
+               this->data = _mm_add_ps(this->data, _mm_set_ps1(scalar));
+               return *this;
+       }
+
+       template <>
+       template <typename U>
+       GLM_FUNC_QUALIFIER tvec4<float, lowp> & tvec4<float, lowp>::operator+=(tvec1<U, lowp> const & v)
+       {
+               this->data = _mm_add_ps(this->data, _mm_set_ps1(static_cast<float>(v.x)));
+               return *this;
+       }
+
+       template <>
+       template <typename U>
+       GLM_FUNC_QUALIFIER tvec4<float, mediump> & tvec4<float, mediump>::operator+=(tvec1<U, mediump> const & v)
+       {
+               this->data = _mm_add_ps(this->data, _mm_set_ps1(static_cast<float>(v.x)));
+               return *this;
+       }
+}//namespace glm
diff --git a/include/glm/exponential.hpp b/include/glm/exponential.hpp
new file mode 100644 (file)
index 0000000..dfba58a
--- /dev/null
@@ -0,0 +1,35 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref core
+/// @file glm/exponential.hpp
+/// @date 2013-12-24 / 2013-12-24
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////
+
+#pragma once
+
+#include "detail/func_exponential.hpp"
diff --git a/include/glm/ext.hpp b/include/glm/ext.hpp
new file mode 100644 (file)
index 0000000..bdf050a
--- /dev/null
@@ -0,0 +1,143 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @file glm/glm.hpp
+/// @date 2009-05-01 / 2011-05-16
+/// @author Christophe Riccio
+///
+/// @ref core (Dependence)
+/// 
+/// @defgroup gtc GTC Extensions (Stable)
+///
+/// @brief Functions and types that the GLSL specification doesn't define, but useful to have for a C++ program.
+/// 
+/// GTC extensions aim to be stable. 
+/// 
+/// Even if it's highly unrecommended, it's possible to include all the extensions at once by
+/// including <glm/ext.hpp>. Otherwise, each extension needs to be included  a specific file.
+/// 
+/// @defgroup gtx GTX Extensions (Experimental)
+/// 
+/// @brief Functions and types that the GLSL specification doesn't define, but 
+/// useful to have for a C++ program.
+/// 
+/// Experimental extensions are useful functions and types, but the development of
+/// their API and functionality is not necessarily stable. They can change 
+/// substantially between versions. Backwards compatibility is not much of an issue
+/// for them.
+/// 
+/// Even if it's highly unrecommended, it's possible to include all the extensions 
+/// at once by including <glm/ext.hpp>. Otherwise, each extension needs to be 
+/// included  a specific file.
+///////////////////////////////////////////////////////////////////////////////////
+
+#pragma once
+
+#if(defined(GLM_MESSAGES) && !defined(GLM_MESSAGE_EXT_INCLUDED_DISPLAYED))
+#      define GLM_MESSAGE_EXT_INCLUDED_DISPLAYED
+#      pragma message("GLM: All extensions included (not recommanded)")
+#endif//GLM_MESSAGES
+
+#include "./gtc/bitfield.hpp"
+#include "./gtc/constants.hpp"
+#include "./gtc/epsilon.hpp"
+#include "./gtc/integer.hpp"
+#include "./gtc/matrix_access.hpp"
+#include "./gtc/matrix_integer.hpp"
+#include "./gtc/matrix_inverse.hpp"
+#include "./gtc/matrix_transform.hpp"
+#include "./gtc/noise.hpp"
+#include "./gtc/packing.hpp"
+#include "./gtc/quaternion.hpp"
+#include "./gtc/random.hpp"
+#include "./gtc/reciprocal.hpp"
+#include "./gtc/round.hpp"
+#include "./gtc/type_precision.hpp"
+#include "./gtc/type_ptr.hpp"
+#include "./gtc/ulp.hpp"
+#include "./gtc/vec1.hpp"
+
+#include "./gtx/associated_min_max.hpp"
+#include "./gtx/bit.hpp"
+#include "./gtx/closest_point.hpp"
+#include "./gtx/color_space.hpp"
+#include "./gtx/color_space_YCoCg.hpp"
+#include "./gtx/compatibility.hpp"
+#include "./gtx/component_wise.hpp"
+#include "./gtx/dual_quaternion.hpp"
+#include "./gtx/euler_angles.hpp"
+#include "./gtx/extend.hpp"
+#include "./gtx/extented_min_max.hpp"
+#include "./gtx/fast_exponential.hpp"
+#include "./gtx/fast_square_root.hpp"
+#include "./gtx/fast_trigonometry.hpp"
+#include "./gtx/gradient_paint.hpp"
+#include "./gtx/handed_coordinate_space.hpp"
+#include "./gtx/integer.hpp"
+#include "./gtx/intersect.hpp"
+#include "./gtx/log_base.hpp"
+#include "./gtx/matrix_cross_product.hpp"
+#include "./gtx/matrix_interpolation.hpp"
+#include "./gtx/matrix_major_storage.hpp"
+#include "./gtx/matrix_operation.hpp"
+#include "./gtx/matrix_query.hpp"
+#include "./gtx/mixed_product.hpp"
+#include "./gtx/norm.hpp"
+#include "./gtx/normal.hpp"
+#include "./gtx/normalize_dot.hpp"
+#include "./gtx/number_precision.hpp"
+#include "./gtx/optimum_pow.hpp"
+#include "./gtx/orthonormalize.hpp"
+#include "./gtx/perpendicular.hpp"
+#include "./gtx/polar_coordinates.hpp"
+#include "./gtx/projection.hpp"
+#include "./gtx/quaternion.hpp"
+#include "./gtx/raw_data.hpp"
+#include "./gtx/rotate_vector.hpp"
+#include "./gtx/spline.hpp"
+#include "./gtx/std_based_type.hpp"
+#if !(GLM_COMPILER & GLM_COMPILER_CUDA)
+#      include "./gtx/string_cast.hpp"
+#endif
+#include "./gtx/transform.hpp"
+#include "./gtx/transform2.hpp"
+#include "./gtx/type_aligned.hpp"
+#include "./gtx/vector_angle.hpp"
+#include "./gtx/vector_query.hpp"
+#include "./gtx/wrap.hpp"
+
+#if GLM_HAS_TEMPLATE_ALIASES
+#      include "./gtx/scalar_multiplication.hpp"
+#endif
+
+#if GLM_HAS_RANGE_FOR
+#      include "./gtx/range.hpp"
+#endif
+
+#if GLM_ARCH & GLM_ARCH_SSE2
+#      include "./gtx/simd_vec4.hpp"
+#      include "./gtx/simd_mat4.hpp"
+#endif
diff --git a/include/glm/fwd.hpp b/include/glm/fwd.hpp
new file mode 100644 (file)
index 0000000..742474c
--- /dev/null
@@ -0,0 +1,2601 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+///
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref core
+/// @file glm/fwd.hpp
+/// @date 2013-03-30 / 2013-03-31
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////
+
+#pragma once
+
+#include "detail/type_int.hpp"
+#include "detail/type_float.hpp"
+#include "detail/type_vec.hpp"
+#include "detail/type_mat.hpp"
+
+//////////////////////
+// GLM_GTC_quaternion
+namespace glm
+{
+       template <typename T, precision P> struct tquat;
+
+       /// Quaternion of low single-precision floating-point numbers.
+       ///
+       /// @see gtc_quaternion
+       typedef tquat<float, lowp>              lowp_quat;
+
+       /// Quaternion of medium single-precision floating-point numbers.
+       ///
+       /// @see gtc_quaternion
+       typedef tquat<float, mediump>   mediump_quat;
+
+       /// Quaternion of high single-precision floating-point numbers.
+       ///
+       /// @see gtc_quaternion
+       typedef tquat<float, highp>             highp_quat;
+
+#if(defined(GLM_PRECISION_HIGHP_FLOAT) && !defined(GLM_PRECISION_MEDIUMP_FLOAT) && !defined(GLM_PRECISION_LOWP_FLOAT))
+       typedef highp_quat                      quat;
+#elif(!defined(GLM_PRECISION_HIGHP_FLOAT) && defined(GLM_PRECISION_MEDIUMP_FLOAT) && !defined(GLM_PRECISION_LOWP_FLOAT))
+       typedef mediump_quat            quat;
+#elif(!defined(GLM_PRECISION_HIGHP_FLOAT) && !defined(GLM_PRECISION_MEDIUMP_FLOAT) && defined(GLM_PRECISION_LOWP_FLOAT))
+       typedef lowp_quat                       quat;
+#elif(!defined(GLM_PRECISION_HIGHP_FLOAT) && !defined(GLM_PRECISION_MEDIUMP_FLOAT) && !defined(GLM_PRECISION_LOWP_FLOAT))
+       /// Quaternion of default single-precision floating-point numbers.
+       typedef highp_quat                      quat;
+#endif
+
+       /// Quaternion of low single-precision floating-point numbers.
+       ///
+       /// @see gtc_quaternion
+       typedef lowp_quat                       lowp_fquat;
+
+       /// Quaternion of medium single-precision floating-point numbers.
+       ///
+       /// @see gtc_quaternion
+       typedef mediump_quat            mediump_fquat;
+
+       /// Quaternion of high single-precision floating-point numbers.
+       ///
+       /// @see gtc_quaternion
+       typedef highp_quat                      highp_fquat;
+
+       /// Quaternion of default single-precision floating-point numbers.
+       ///
+       /// @see gtc_quaternion
+       typedef quat                            fquat;
+
+
+       /// Quaternion of low double-precision floating-point numbers.
+       ///
+       /// @see gtc_quaternion
+       typedef tquat<double, lowp>             lowp_dquat;
+       
+       /// Quaternion of medium double-precision floating-point numbers.
+       ///
+       /// @see gtc_quaternion
+       typedef tquat<double, mediump>  mediump_dquat;
+       
+       /// Quaternion of high double-precision floating-point numbers.
+       ///
+       /// @see gtc_quaternion
+       typedef tquat<double, highp>    highp_dquat;
+       
+#if(defined(GLM_PRECISION_HIGHP_DOUBLE) && !defined(GLM_PRECISION_MEDIUMP_DOUBLE) && !defined(GLM_PRECISION_LOWP_DOUBLE))
+       typedef highp_dquat                     dquat;
+#elif(!defined(GLM_PRECISION_HIGHP_DOUBLE) && defined(GLM_PRECISION_MEDIUMP_DOUBLE) && !defined(GLM_PRECISION_LOWP_DOUBLE))
+       typedef mediump_dquat           dquat;
+#elif(!defined(GLM_PRECISION_HIGHP_DOUBLE) && !defined(GLM_PRECISION_MEDIUMP_DOUBLE) && defined(GLM_PRECISION_LOWP_DOUBLE))
+       typedef lowp_dquat                      dquat;
+#elif(!defined(GLM_PRECISION_HIGHP_DOUBLE) && !defined(GLM_PRECISION_MEDIUMP_DOUBLE) && !defined(GLM_PRECISION_LOWP_DOUBLE))
+       /// Quaternion of default double-precision floating-point numbers.
+       ///
+       /// @see gtc_quaternion
+       typedef highp_dquat                     dquat;
+#endif
+
+}//namespace glm
+
+//////////////////////
+// GLM_GTC_precision
+namespace glm
+{
+       /// @addtogroup gtc_type_precision
+       /// @{
+
+       /// Low precision 8 bit signed integer type.
+       /// @see gtc_type_precision
+       typedef detail::int8 lowp_int8;
+       
+       /// Low precision 16 bit signed integer type.
+       /// @see gtc_type_precision
+       typedef detail::int16 lowp_int16;
+
+       /// Low precision 32 bit signed integer type.
+       /// @see gtc_type_precision
+       typedef detail::int32 lowp_int32;
+
+       /// Low precision 64 bit signed integer type.
+       /// @see gtc_type_precision
+       typedef detail::int64 lowp_int64;
+
+       /// Low precision 8 bit signed integer type.
+       /// @see gtc_type_precision
+       typedef detail::int8 lowp_int8_t;
+       
+       /// Low precision 16 bit signed integer type.
+       /// @see gtc_type_precision
+       typedef detail::int16 lowp_int16_t;
+
+       /// Low precision 32 bit signed integer type.
+       /// @see gtc_type_precision
+       typedef detail::int32 lowp_int32_t;
+
+       /// Low precision 64 bit signed integer type.
+       /// @see gtc_type_precision
+       typedef detail::int64 lowp_int64_t;
+
+       /// Low precision 8 bit signed integer type.
+       /// @see gtc_type_precision
+       typedef detail::int8 lowp_i8;
+       
+       /// Low precision 16 bit signed integer type.
+       /// @see gtc_type_precision
+       typedef detail::int16 lowp_i16;
+
+       /// Low precision 32 bit signed integer type.
+       /// @see gtc_type_precision
+       typedef detail::int32 lowp_i32;
+
+       /// Low precision 64 bit signed integer type.
+       /// @see gtc_type_precision
+       typedef detail::int64 lowp_i64;
+
+       /// Medium precision 8 bit signed integer type.
+       /// @see gtc_type_precision
+       typedef detail::int8 mediump_int8;
+       
+       /// Medium precision 16 bit signed integer type.
+       /// @see gtc_type_precision
+       typedef detail::int16 mediump_int16;
+
+       /// Medium precision 32 bit signed integer type.
+       /// @see gtc_type_precision
+       typedef detail::int32 mediump_int32;
+
+       /// Medium precision 64 bit signed integer type.
+       /// @see gtc_type_precision
+       typedef detail::int64 mediump_int64;
+
+       /// Medium precision 8 bit signed integer type.
+       /// @see gtc_type_precision
+       typedef detail::int8 mediump_int8_t;
+       
+       /// Medium precision 16 bit signed integer type.
+       /// @see gtc_type_precision
+       typedef detail::int16 mediump_int16_t;
+
+       /// Medium precision 32 bit signed integer type.
+       /// @see gtc_type_precision
+       typedef detail::int32 mediump_int32_t;
+
+       /// Medium precision 64 bit signed integer type.
+       /// @see gtc_type_precision
+       typedef detail::int64 mediump_int64_t;
+
+       /// Medium precision 8 bit signed integer type.
+       /// @see gtc_type_precision
+       typedef detail::int8 mediump_i8;
+       
+       /// Medium precision 16 bit signed integer type.
+       /// @see gtc_type_precision
+       typedef detail::int16 mediump_i16;
+
+       /// Medium precision 32 bit signed integer type.
+       /// @see gtc_type_precision
+       typedef detail::int32 mediump_i32;
+
+       /// Medium precision 64 bit signed integer type.
+       /// @see gtc_type_precision
+       typedef detail::int64 mediump_i64;
+
+       /// High precision 8 bit signed integer type.
+       /// @see gtc_type_precision
+       typedef detail::int8 highp_int8;
+       
+       /// High precision 16 bit signed integer type.
+       /// @see gtc_type_precision
+       typedef detail::int16 highp_int16;
+
+       /// High precision 32 bit signed integer type.
+       /// @see gtc_type_precision
+       typedef detail::int32 highp_int32;
+
+       /// High precision 64 bit signed integer type.
+       /// @see gtc_type_precision
+       typedef detail::int64 highp_int64;
+
+       /// High precision 8 bit signed integer type.
+       /// @see gtc_type_precision
+       typedef detail::int8 highp_int8_t;
+       
+       /// High precision 16 bit signed integer type.
+       /// @see gtc_type_precision
+       typedef detail::int16 highp_int16_t;
+
+       /// 32 bit signed integer type.
+       /// @see gtc_type_precision
+       typedef detail::int32 highp_int32_t;
+
+       /// High precision 64 bit signed integer type.
+       /// @see gtc_type_precision
+       typedef detail::int64 highp_int64_t;
+
+       /// High precision 8 bit signed integer type.
+       /// @see gtc_type_precision
+       typedef detail::int8 highp_i8;
+       
+       /// High precision 16 bit signed integer type.
+       /// @see gtc_type_precision
+       typedef detail::int16 highp_i16;
+
+       /// High precision 32 bit signed integer type.
+       /// @see gtc_type_precision
+       typedef detail::int32 highp_i32;
+
+       /// High precision 64 bit signed integer type.
+       /// @see gtc_type_precision
+       typedef detail::int64 highp_i64;
+       
+
+       /// 8 bit signed integer type.
+       /// @see gtc_type_precision
+       typedef detail::int8 int8;
+       
+       /// 16 bit signed integer type.
+       /// @see gtc_type_precision
+       typedef detail::int16 int16;
+
+       /// 32 bit signed integer type.
+       /// @see gtc_type_precision
+       typedef detail::int32 int32;
+
+       /// 64 bit signed integer type.
+       /// @see gtc_type_precision
+       typedef detail::int64 int64;
+
+
+#if GLM_HAS_EXTENDED_INTEGER_TYPE
+       using std::int8_t;
+       using std::int16_t;
+       using std::int32_t;
+       using std::int64_t;
+#else
+       /// 8 bit signed integer type.
+       /// @see gtc_type_precision
+       typedef detail::int8 int8_t;
+       
+       /// 16 bit signed integer type.
+       /// @see gtc_type_precision
+       typedef detail::int16 int16_t;
+
+       /// 32 bit signed integer type.
+       /// @see gtc_type_precision
+       typedef detail::int32 int32_t;
+
+       /// 64 bit signed integer type.
+       /// @see gtc_type_precision
+       typedef detail::int64 int64_t;
+#endif
+
+       /// 8 bit signed integer type.
+       /// @see gtc_type_precision
+       typedef detail::int8 i8;
+       
+       /// 16 bit signed integer type.
+       /// @see gtc_type_precision
+       typedef detail::int16 i16;
+
+       /// 32 bit signed integer type.
+       /// @see gtc_type_precision
+       typedef detail::int32 i32;
+
+       /// 64 bit signed integer type.
+       /// @see gtc_type_precision
+       typedef detail::int64 i64;
+       
+       
+       
+       /// Low precision 8 bit signed integer scalar type.
+       /// @see gtc_type_precision
+       typedef tvec1<i8, lowp> lowp_i8vec1;
+       
+       /// Low precision 8 bit signed integer vector of 2 components type.
+       /// @see gtc_type_precision
+       typedef tvec2<i8, lowp> lowp_i8vec2;
+       
+       /// Low precision 8 bit signed integer vector of 3 components type.
+       /// @see gtc_type_precision
+       typedef tvec3<i8, lowp> lowp_i8vec3;
+       
+       /// Low precision 8 bit signed integer vector of 4 components type.
+       /// @see gtc_type_precision
+       typedef tvec4<i8, lowp> lowp_i8vec4;
+       
+
+       /// Medium precision 8 bit signed integer scalar type.
+       /// @see gtc_type_precision
+       typedef tvec1<i8, mediump> mediump_i8vec1;
+       
+       /// Medium precision 8 bit signed integer vector of 2 components type.
+       /// @see gtc_type_precision
+       typedef tvec2<i8, mediump> mediump_i8vec2;
+       
+       /// Medium precision 8 bit signed integer vector of 3 components type.
+       /// @see gtc_type_precision
+       typedef tvec3<i8, mediump> mediump_i8vec3;
+       
+       /// Medium precision 8 bit signed integer vector of 4 components type.
+       /// @see gtc_type_precision
+       typedef tvec4<i8, mediump> mediump_i8vec4;
+       
+       
+       /// High precision 8 bit signed integer scalar type.
+       /// @see gtc_type_precision
+       typedef tvec1<i8, highp> highp_i8vec1;
+       
+       /// High precision 8 bit signed integer vector of 2 components type.
+       /// @see gtc_type_precision
+       typedef tvec2<i8, highp> highp_i8vec2;
+       
+       /// High precision 8 bit signed integer vector of 3 components type.
+       /// @see gtc_type_precision
+       typedef tvec3<i8, highp> highp_i8vec3;
+       
+       /// High precision 8 bit signed integer vector of 4 components type.
+       /// @see gtc_type_precision
+       typedef tvec4<i8, highp> highp_i8vec4;
+       
+#if(defined(GLM_PRECISION_LOWP_INT))
+       typedef lowp_i8vec1                             i8vec1;
+       typedef lowp_i8vec2                             i8vec2;
+       typedef lowp_i8vec3                             i8vec3;
+       typedef lowp_i8vec4                             i8vec4;
+#elif(defined(GLM_PRECISION_MEDIUMP_INT))
+       typedef mediump_i8vec1                  i8vec1;
+       typedef mediump_i8vec2                  i8vec2;
+       typedef mediump_i8vec3                  i8vec3;
+       typedef mediump_i8vec4                  i8vec4; 
+#else
+       /// Default precision 8 bit signed integer scalar type.
+       /// @see gtc_type_precision
+       typedef highp_i8vec1                    i8vec1;
+       
+       /// Default precision 8 bit signed integer vector of 2 components type.
+       /// @see gtc_type_precision
+       typedef highp_i8vec2                    i8vec2;
+       
+       /// Default precision 8 bit signed integer vector of 3 components type.
+       /// @see gtc_type_precision
+       typedef highp_i8vec3                    i8vec3;
+       
+       /// Default precision 8 bit signed integer vector of 4 components type.
+       /// @see gtc_type_precision
+       typedef highp_i8vec4                    i8vec4;
+#endif
+       
+       
+       /// Low precision 16 bit signed integer scalar type.
+       /// @see gtc_type_precision
+       typedef tvec1<i16, lowp>                lowp_i16vec1;
+       
+       /// Low precision 16 bit signed integer vector of 2 components type.
+       /// @see gtc_type_precision
+       typedef tvec2<i16, lowp>                lowp_i16vec2;
+       
+       /// Low precision 16 bit signed integer vector of 3 components type.
+       /// @see gtc_type_precision
+       typedef tvec3<i16, lowp>                lowp_i16vec3;
+       
+       /// Low precision 16 bit signed integer vector of 4 components type.
+       /// @see gtc_type_precision
+       typedef tvec4<i16, lowp>                lowp_i16vec4;
+       
+       
+       /// Medium precision 16 bit signed integer scalar type.
+       /// @see gtc_type_precision
+       typedef tvec1<i16, mediump>             mediump_i16vec1;
+       
+       /// Medium precision 16 bit signed integer vector of 2 components type.
+       /// @see gtc_type_precision
+       typedef tvec2<i16, mediump>             mediump_i16vec2;
+       
+       /// Medium precision 16 bit signed integer vector of 3 components type.
+       /// @see gtc_type_precision
+       typedef tvec3<i16, mediump>             mediump_i16vec3;
+       
+       /// Medium precision 16 bit signed integer vector of 4 components type.
+       /// @see gtc_type_precision
+       typedef tvec4<i16, mediump>             mediump_i16vec4;
+       
+       
+       /// High precision 16 bit signed integer scalar type.
+       /// @see gtc_type_precision
+       typedef tvec1<i16, highp>               highp_i16vec1;
+       
+       /// High precision 16 bit signed integer vector of 2 components type.
+       /// @see gtc_type_precision
+       typedef tvec2<i16, highp>               highp_i16vec2;
+       
+       /// High precision 16 bit signed integer vector of 3 components type.
+       /// @see gtc_type_precision
+       typedef tvec3<i16, highp>               highp_i16vec3;
+       
+       /// High precision 16 bit signed integer vector of 4 components type.
+       /// @see gtc_type_precision
+       typedef tvec4<i16, highp>               highp_i16vec4;
+       
+       
+#if(defined(GLM_PRECISION_LOWP_INT))
+       typedef lowp_i16vec1                    i16vec1;
+       typedef lowp_i16vec2                    i16vec2;
+       typedef lowp_i16vec3                    i16vec3;
+       typedef lowp_i16vec4                    i16vec4;
+#elif(defined(GLM_PRECISION_MEDIUMP_INT))
+       typedef mediump_i16vec1                 i16vec1;
+       typedef mediump_i16vec2                 i16vec2;
+       typedef mediump_i16vec3                 i16vec3;
+       typedef mediump_i16vec4                 i16vec4;
+#else
+       /// Default precision 16 bit signed integer scalar type.
+       /// @see gtc_type_precision
+       typedef highp_i16vec1                   i16vec1;
+       
+       /// Default precision 16 bit signed integer vector of 2 components type.
+       /// @see gtc_type_precision
+       typedef highp_i16vec2                   i16vec2;
+       
+       /// Default precision 16 bit signed integer vector of 3 components type.
+       /// @see gtc_type_precision
+       typedef highp_i16vec3                   i16vec3;
+       
+       /// Default precision 16 bit signed integer vector of 4 components type.
+       /// @see gtc_type_precision
+       typedef highp_i16vec4                   i16vec4;
+#endif
+
+
+       /// Low precision 32 bit signed integer scalar type.
+       /// @see gtc_type_precision
+       typedef tvec1<i32, lowp>                lowp_i32vec1;
+       
+       /// Low precision 32 bit signed integer vector of 2 components type.
+       /// @see gtc_type_precision
+       typedef tvec2<i32, lowp>                lowp_i32vec2;
+       
+       /// Low precision 32 bit signed integer vector of 3 components type.
+       /// @see gtc_type_precision
+       typedef tvec3<i32, lowp>                lowp_i32vec3;
+       
+       /// Low precision 32 bit signed integer vector of 4 components type.
+       /// @see gtc_type_precision
+       typedef tvec4<i32, lowp>                lowp_i32vec4;
+       
+       
+       /// Medium precision 32 bit signed integer scalar type.
+       /// @see gtc_type_precision
+       typedef tvec1<i32, mediump>             mediump_i32vec1;
+       
+       /// Medium precision 32 bit signed integer vector of 2 components type.
+       /// @see gtc_type_precision
+       typedef tvec2<i32, mediump>             mediump_i32vec2;
+       
+       /// Medium precision 32 bit signed integer vector of 3 components type.
+       /// @see gtc_type_precision
+       typedef tvec3<i32, mediump>             mediump_i32vec3;
+       
+       /// Medium precision 32 bit signed integer vector of 4 components type.
+       /// @see gtc_type_precision
+       typedef tvec4<i32, mediump>             mediump_i32vec4;
+       
+       
+       /// High precision 32 bit signed integer scalar type.
+       /// @see gtc_type_precision
+       typedef tvec1<i32, highp>               highp_i32vec1;
+       
+       /// High precision 32 bit signed integer vector of 2 components type.
+       /// @see gtc_type_precision
+       typedef tvec2<i32, highp>               highp_i32vec2;
+       
+       /// High precision 32 bit signed integer vector of 3 components type.
+       /// @see gtc_type_precision
+       typedef tvec3<i32, highp>               highp_i32vec3;
+       
+       /// High precision 32 bit signed integer vector of 4 components type.
+       /// @see gtc_type_precision
+       typedef tvec4<i32, highp>               highp_i32vec4;
+       
+#if(defined(GLM_PRECISION_LOWP_INT))
+       typedef lowp_i32vec1                    i32vec1;
+       typedef lowp_i32vec2                    i32vec2;
+       typedef lowp_i32vec3                    i32vec3;
+       typedef lowp_i32vec4                    i32vec4;
+#elif(defined(GLM_PRECISION_MEDIUMP_INT))
+       typedef mediump_i32vec1                 i32vec1;
+       typedef mediump_i32vec2                 i32vec2;
+       typedef mediump_i32vec3                 i32vec3;
+       typedef mediump_i32vec4                 i32vec4;
+#else
+       /// Default precision 32 bit signed integer scalar type.
+       /// @see gtc_type_precision
+       typedef highp_i32vec1                   i32vec1;
+       
+       /// Default precision 32 bit signed integer vector of 2 components type.
+       /// @see gtc_type_precision
+       typedef highp_i32vec2                   i32vec2;
+       
+       /// Default precision 32 bit signed integer vector of 3 components type.
+       /// @see gtc_type_precision
+       typedef highp_i32vec3                   i32vec3;
+       
+       /// Default precision 32 bit signed integer vector of 4 components type.
+       /// @see gtc_type_precision
+       typedef highp_i32vec4                   i32vec4;
+#endif
+
+
+       /// Low precision 32 bit signed integer scalar type.
+       /// @see gtc_type_precision
+       typedef tvec1<i32, lowp>                lowp_i32vec1;
+       
+       /// Low precision 32 bit signed integer vector of 2 components type.
+       /// @see gtc_type_precision
+       typedef tvec2<i32, lowp>                lowp_i32vec2;
+       
+       /// Low precision 32 bit signed integer vector of 3 components type.
+       /// @see gtc_type_precision
+       typedef tvec3<i32, lowp>                lowp_i32vec3;
+       
+       /// Low precision 32 bit signed integer vector of 4 components type.
+       /// @see gtc_type_precision
+       typedef tvec4<i32, lowp>                lowp_i32vec4;
+       
+       
+       /// Medium precision 32 bit signed integer scalar type.
+       /// @see gtc_type_precision
+       typedef tvec1<i32, mediump>             mediump_i32vec1;
+       
+       /// Medium precision 32 bit signed integer vector of 2 components type.
+       /// @see gtc_type_precision
+       typedef tvec2<i32, mediump>             mediump_i32vec2;
+       
+       /// Medium precision 32 bit signed integer vector of 3 components type.
+       /// @see gtc_type_precision
+       typedef tvec3<i32, mediump>             mediump_i32vec3;
+       
+       /// Medium precision 32 bit signed integer vector of 4 components type.
+       /// @see gtc_type_precision
+       typedef tvec4<i32, mediump>             mediump_i32vec4;
+       
+       
+       /// High precision 32 bit signed integer scalar type.
+       /// @see gtc_type_precision
+       typedef tvec1<i32, highp>               highp_i32vec1;
+       
+       /// High precision 32 bit signed integer vector of 2 components type.
+       /// @see gtc_type_precision
+       typedef tvec2<i32, highp>               highp_i32vec2;
+       
+       /// High precision 32 bit signed integer vector of 3 components type.
+       /// @see gtc_type_precision
+       typedef tvec3<i32, highp>               highp_i32vec3;
+       
+       /// High precision 32 bit signed integer vector of 4 components type.
+       /// @see gtc_type_precision
+       typedef tvec4<i32, highp>               highp_i32vec4;
+       
+#if(defined(GLM_PRECISION_LOWP_INT))
+       typedef lowp_i32vec1                    i32vec1;
+       typedef lowp_i32vec2                    i32vec2;
+       typedef lowp_i32vec3                    i32vec3;
+       typedef lowp_i32vec4                    i32vec4;
+#elif(defined(GLM_PRECISION_MEDIUMP_INT))
+       typedef mediump_i32vec1                 i32vec1;
+       typedef mediump_i32vec2                 i32vec2;
+       typedef mediump_i32vec3                 i32vec3;
+       typedef mediump_i32vec4                 i32vec4;
+#else
+       /// Default precision 32 bit signed integer scalar type.
+       /// @see gtc_type_precision
+       typedef highp_i32vec1                   i32vec1;
+
+       /// Default precision 32 bit signed integer vector of 2 components type.
+       /// @see gtc_type_precision
+       typedef highp_i32vec2                   i32vec2;
+       
+       /// Default precision 32 bit signed integer vector of 3 components type.
+       /// @see gtc_type_precision
+       typedef highp_i32vec3                   i32vec3;
+       
+       /// Default precision 32 bit signed integer vector of 4 components type.
+       /// @see gtc_type_precision
+       typedef highp_i32vec4                   i32vec4;
+#endif
+
+
+       
+       /// Low precision 64 bit signed integer scalar type.
+       /// @see gtc_type_precision
+       typedef tvec1<i64, lowp>                lowp_i64vec1;
+       
+       /// Low precision 64 bit signed integer vector of 2 components type.
+       /// @see gtc_type_precision
+       typedef tvec2<i64, lowp>                lowp_i64vec2;
+       
+       /// Low precision 64 bit signed integer vector of 3 components type.
+       /// @see gtc_type_precision
+       typedef tvec3<i64, lowp>                lowp_i64vec3;
+       
+       /// Low precision 64 bit signed integer vector of 4 components type.
+       /// @see gtc_type_precision
+       typedef tvec4<i64, lowp>                lowp_i64vec4;
+       
+       
+       /// Medium precision 64 bit signed integer scalar type.
+       /// @see gtc_type_precision
+       typedef tvec1<i64, mediump>             mediump_i64vec1;
+       
+       /// Medium precision 64 bit signed integer vector of 2 components type.
+       /// @see gtc_type_precision
+       typedef tvec2<i64, mediump>             mediump_i64vec2;
+       
+       /// Medium precision 64 bit signed integer vector of 3 components type.
+       /// @see gtc_type_precision
+       typedef tvec3<i64, mediump>             mediump_i64vec3;
+       
+       /// Medium precision 64 bit signed integer vector of 4 components type.
+       /// @see gtc_type_precision
+       typedef tvec4<i64, mediump>             mediump_i64vec4;
+       
+       
+       /// High precision 64 bit signed integer scalar type.
+       /// @see gtc_type_precision
+       typedef tvec1<i64, highp>               highp_i64vec1;
+       
+       /// High precision 64 bit signed integer vector of 2 components type.
+       /// @see gtc_type_precision
+       typedef tvec2<i64, highp>               highp_i64vec2;
+       
+       /// High precision 64 bit signed integer vector of 3 components type.
+       /// @see gtc_type_precision
+       typedef tvec3<i64, highp>               highp_i64vec3;
+       
+       /// High precision 64 bit signed integer vector of 4 components type.
+       /// @see gtc_type_precision
+       typedef tvec4<i64, highp>               highp_i64vec4;
+       
+#if(defined(GLM_PRECISION_LOWP_INT))
+       typedef lowp_i64vec1                    i64vec1;
+       typedef lowp_i64vec2                    i64vec2;
+       typedef lowp_i64vec3                    i64vec3;
+       typedef lowp_i64vec4                    i64vec4;
+#elif(defined(GLM_PRECISION_MEDIUMP_INT))
+       typedef mediump_i64vec1                 i64vec1;
+       typedef mediump_i64vec2                 i64vec2;
+       typedef mediump_i64vec3                 i64vec3;
+       typedef mediump_i64vec4                 i64vec4;
+#else
+       /// Default precision 64 bit signed integer scalar type.
+       /// @see gtc_type_precision
+       typedef highp_i64vec1                   i64vec1;
+
+       /// Default precision 64 bit signed integer vector of 2 components type.
+       /// @see gtc_type_precision
+       typedef highp_i64vec2                   i64vec2;
+       
+       /// Default precision 64 bit signed integer vector of 3 components type.
+       /// @see gtc_type_precision
+       typedef highp_i64vec3                   i64vec3;
+       
+       /// Default precision 64 bit signed integer vector of 4 components type.
+       /// @see gtc_type_precision
+       typedef highp_i64vec4                   i64vec4;
+#endif
+       
+       
+       /////////////////////////////
+       // Unsigned int vector types
+       
+       /// Low precision 8 bit unsigned integer type.
+       /// @see gtc_type_precision
+       typedef detail::uint8 lowp_uint8;
+       
+       /// Low precision 16 bit unsigned integer type.
+       /// @see gtc_type_precision
+       typedef detail::uint16 lowp_uint16;
+       
+       /// Low precision 32 bit unsigned integer type.
+       /// @see gtc_type_precision
+       typedef detail::uint32 lowp_uint32;
+       
+       /// Low precision 64 bit unsigned integer type.
+       /// @see gtc_type_precision
+       typedef detail::uint64 lowp_uint64;
+       
+       
+       /// Low precision 8 bit unsigned integer type.
+       /// @see gtc_type_precision
+       typedef detail::uint8 lowp_uint8_t;
+       
+       /// Low precision 16 bit unsigned integer type.
+       /// @see gtc_type_precision
+       typedef detail::uint16 lowp_uint16_t;
+       
+       /// Low precision 32 bit unsigned integer type.
+       /// @see gtc_type_precision
+       typedef detail::uint32 lowp_uint32_t;
+       
+       /// Low precision 64 bit unsigned integer type.
+       /// @see gtc_type_precision
+       typedef detail::uint64 lowp_uint64_t;
+       
+       
+       /// Low precision 8 bit unsigned integer type.
+       /// @see gtc_type_precision
+       typedef detail::uint8 lowp_u8;
+       
+       /// Low precision 16 bit unsigned integer type.
+       /// @see gtc_type_precision
+       typedef detail::uint16 lowp_u16;
+       
+       /// Low precision 32 bit unsigned integer type.
+       /// @see gtc_type_precision
+       typedef detail::uint32 lowp_u32;
+       
+       /// Low precision 64 bit unsigned integer type.
+       /// @see gtc_type_precision
+       typedef detail::uint64 lowp_u64;
+       
+       
+       
+       /// Medium precision 8 bit unsigned integer type.
+       /// @see gtc_type_precision
+       typedef detail::uint8 mediump_uint8;
+       
+       /// Medium precision 16 bit unsigned integer type.
+       /// @see gtc_type_precision
+       typedef detail::uint16 mediump_uint16;
+       
+       /// Medium precision 32 bit unsigned integer type.
+       /// @see gtc_type_precision
+       typedef detail::uint32 mediump_uint32;
+       
+       /// Medium precision 64 bit unsigned integer type.
+       /// @see gtc_type_precision
+       typedef detail::uint64 mediump_uint64;
+       
+       /// Medium precision 8 bit unsigned integer type.
+       /// @see gtc_type_precision
+       typedef detail::uint8 mediump_uint8_t;
+       
+       /// Medium precision 16 bit unsigned integer type.
+       /// @see gtc_type_precision
+       typedef detail::uint16 mediump_uint16_t;
+       
+       /// Medium precision 32 bit unsigned integer type.
+       /// @see gtc_type_precision
+       typedef detail::uint32 mediump_uint32_t;
+       
+       /// Medium precision 64 bit unsigned integer type.
+       /// @see gtc_type_precision
+       typedef detail::uint64 mediump_uint64_t;
+       
+       /// Medium precision 8 bit unsigned integer type.
+       /// @see gtc_type_precision
+       typedef detail::uint8 mediump_u8;
+       
+       /// Medium precision 16 bit unsigned integer type.
+       /// @see gtc_type_precision
+       typedef detail::uint16 mediump_u16;
+       
+       /// Medium precision 32 bit unsigned integer type.
+       /// @see gtc_type_precision
+       typedef detail::uint32 mediump_u32;
+       
+       /// Medium precision 64 bit unsigned integer type.
+       /// @see gtc_type_precision
+       typedef detail::uint64 mediump_u64;
+               
+       
+       
+       /// Medium precision 8 bit unsigned integer type.
+       /// @see gtc_type_precision
+       typedef detail::uint8 highp_uint8;
+       
+       /// Medium precision 16 bit unsigned integer type.
+       /// @see gtc_type_precision
+       typedef detail::uint16 highp_uint16;
+       
+       /// Medium precision 32 bit unsigned integer type.
+       /// @see gtc_type_precision
+       typedef detail::uint32 highp_uint32;
+       
+       /// Medium precision 64 bit unsigned integer type.
+       /// @see gtc_type_precision
+       typedef detail::uint64 highp_uint64;
+       
+       /// Medium precision 8 bit unsigned integer type.
+       /// @see gtc_type_precision
+       typedef detail::uint8 highp_uint8_t;
+       
+       /// Medium precision 16 bit unsigned integer type.
+       /// @see gtc_type_precision
+       typedef detail::uint16 highp_uint16_t;
+       
+       /// Medium precision 32 bit unsigned integer type.
+       /// @see gtc_type_precision
+       typedef detail::uint32 highp_uint32_t;
+       
+       /// Medium precision 64 bit unsigned integer type.
+       /// @see gtc_type_precision
+       typedef detail::uint64 highp_uint64_t;
+       
+       /// Medium precision 8 bit unsigned integer type.
+       /// @see gtc_type_precision
+       typedef detail::uint8 highp_u8;
+       
+       /// Medium precision 16 bit unsigned integer type.
+       /// @see gtc_type_precision
+       typedef detail::uint16 highp_u16;
+       
+       /// Medium precision 32 bit unsigned integer type.
+       /// @see gtc_type_precision
+       typedef detail::uint32 highp_u32;
+       
+       /// Medium precision 64 bit unsigned integer type.
+       /// @see gtc_type_precision
+       typedef detail::uint64 highp_u64;
+       
+       
+       
+       /// 8 bit unsigned integer type.
+       /// @see gtc_type_precision
+       typedef detail::uint8 uint8;
+       
+       /// 16 bit unsigned integer type.
+       /// @see gtc_type_precision
+       typedef detail::uint16 uint16;
+       
+       /// 32 bit unsigned integer type.
+       /// @see gtc_type_precision
+       typedef detail::uint32 uint32;
+       
+       /// 64 bit unsigned integer type.
+       /// @see gtc_type_precision
+       typedef detail::uint64 uint64;
+       
+#if GLM_HAS_EXTENDED_INTEGER_TYPE
+       using std::uint8_t;
+       using std::uint16_t;
+       using std::uint32_t;
+       using std::uint64_t;
+#else
+       /// 8 bit unsigned integer type.
+       /// @see gtc_type_precision
+       typedef detail::uint8 uint8_t;
+       
+       /// 16 bit unsigned integer type.
+       /// @see gtc_type_precision
+       typedef detail::uint16 uint16_t;
+       
+       /// 32 bit unsigned integer type.
+       /// @see gtc_type_precision
+       typedef detail::uint32 uint32_t;
+       
+       /// 64 bit unsigned integer type.
+       /// @see gtc_type_precision
+       typedef detail::uint64 uint64_t;
+#endif
+
+       /// 8 bit unsigned integer type.
+       /// @see gtc_type_precision
+       typedef detail::uint8 u8;
+
+       /// 16 bit unsigned integer type.
+       /// @see gtc_type_precision
+       typedef detail::uint16 u16;
+
+       /// 32 bit unsigned integer type.
+       /// @see gtc_type_precision
+       typedef detail::uint32 u32;
+
+       /// 64 bit unsigned integer type.
+       /// @see gtc_type_precision
+       typedef detail::uint64 u64;
+
+
+
+       /// Low precision 8 bit unsigned integer scalar type.
+       /// @see gtc_type_precision
+       typedef tvec1<u8, lowp> lowp_u8vec1;
+       
+       /// Low precision 8 bit unsigned integer vector of 2 components type.
+       /// @see gtc_type_precision
+       typedef tvec2<u8, lowp> lowp_u8vec2;
+       
+       /// Low precision 8 bit unsigned integer vector of 3 components type.
+       /// @see gtc_type_precision
+       typedef tvec3<u8, lowp> lowp_u8vec3;
+       
+       /// Low precision 8 bit unsigned integer vector of 4 components type.
+       /// @see gtc_type_precision
+       typedef tvec4<u8, lowp> lowp_u8vec4;
+       
+
+       /// Medium precision 8 bit unsigned integer scalar type.
+       /// @see gtc_type_precision
+       typedef tvec1<u8, mediump> mediump_u8vec1;
+
+       /// Medium precision 8 bit unsigned integer vector of 2 components type.
+       /// @see gtc_type_precision
+       typedef tvec2<u8, mediump> mediump_u8vec2;
+
+       /// Medium precision 8 bit unsigned integer vector of 3 components type.
+       /// @see gtc_type_precision
+       typedef tvec3<u8, mediump> mediump_u8vec3;
+
+       /// Medium precision 8 bit unsigned integer vector of 4 components type.
+       /// @see gtc_type_precision
+       typedef tvec4<u8, mediump> mediump_u8vec4;
+
+
+       /// High precision 8 bit unsigned integer scalar type.
+       /// @see gtc_type_precision
+       typedef tvec1<u8, highp> highp_u8vec1;
+
+       /// High precision 8 bit unsigned integer vector of 2 components type.
+       /// @see gtc_type_precision
+       typedef tvec2<u8, highp> highp_u8vec2;
+
+       /// High precision 8 bit unsigned integer vector of 3 components type.
+       /// @see gtc_type_precision
+       typedef tvec3<u8, highp> highp_u8vec3;
+
+       /// High precision 8 bit unsigned integer vector of 4 components type.
+       /// @see gtc_type_precision
+       typedef tvec4<u8, highp> highp_u8vec4;
+
+#if(defined(GLM_PRECISION_LOWP_INT))
+       typedef lowp_u8vec1                             u8vec1;
+       typedef lowp_u8vec2                             u8vec2;
+       typedef lowp_u8vec3                             u8vec3;
+       typedef lowp_u8vec4                             u8vec4;
+#elif(defined(GLM_PRECISION_MEDIUMP_INT))
+       typedef mediump_u8vec1                  u8vec1;
+       typedef mediump_u8vec2                  u8vec2;
+       typedef mediump_u8vec3                  u8vec3;
+       typedef mediump_u8vec4                  u8vec4; 
+#else
+       /// Default precision 8 bit unsigned integer scalar type.
+       /// @see gtc_type_precision
+       typedef highp_u8vec1                    u8vec1;
+
+       /// Default precision 8 bit unsigned integer vector of 2 components type.
+       /// @see gtc_type_precision
+       typedef highp_u8vec2                    u8vec2;
+
+       /// Default precision 8 bit unsigned integer vector of 3 components type.
+       /// @see gtc_type_precision
+       typedef highp_u8vec3                    u8vec3;
+
+       /// Default precision 8 bit unsigned integer vector of 4 components type.
+       /// @see gtc_type_precision
+       typedef highp_u8vec4                    u8vec4;
+#endif
+
+
+       /// Low precision 16 bit unsigned integer scalar type.
+       /// @see gtc_type_precision
+       typedef tvec1<u16, lowp>                lowp_u16vec1;
+
+       /// Low precision 16 bit unsigned integer vector of 2 components type.
+       /// @see gtc_type_precision
+       typedef tvec2<u16, lowp>                lowp_u16vec2;
+
+       /// Low precision 16 bit unsigned integer vector of 3 components type.
+       /// @see gtc_type_precision
+       typedef tvec3<u16, lowp>                lowp_u16vec3;
+
+       /// Low precision 16 bit unsigned integer vector of 4 components type.
+       /// @see gtc_type_precision
+       typedef tvec4<u16, lowp>                lowp_u16vec4;
+
+
+       /// Medium precision 16 bit unsigned integer scalar type.
+       /// @see gtc_type_precision
+       typedef tvec1<u16, mediump>             mediump_u16vec1;
+
+       /// Medium precision 16 bit unsigned integer vector of 2 components type.
+       /// @see gtc_type_precision
+       typedef tvec2<u16, mediump>             mediump_u16vec2;
+
+       /// Medium precision 16 bit unsigned integer vector of 3 components type.
+       /// @see gtc_type_precision
+       typedef tvec3<u16, mediump>             mediump_u16vec3;
+
+       /// Medium precision 16 bit unsigned integer vector of 4 components type.
+       /// @see gtc_type_precision
+       typedef tvec4<u16, mediump>             mediump_u16vec4;
+
+
+       /// High precision 16 bit unsigned integer scalar type.
+       /// @see gtc_type_precision
+       typedef tvec1<u16, highp>               highp_u16vec1;
+
+       /// High precision 16 bit unsigned integer vector of 2 components type.
+       /// @see gtc_type_precision
+       typedef tvec2<u16, highp>               highp_u16vec2;
+
+       /// High precision 16 bit unsigned integer vector of 3 components type.
+       /// @see gtc_type_precision
+       typedef tvec3<u16, highp>               highp_u16vec3;
+
+       /// High precision 16 bit unsigned integer vector of 4 components type.
+       /// @see gtc_type_precision
+       typedef tvec4<u16, highp>               highp_u16vec4;
+
+
+#if(defined(GLM_PRECISION_LOWP_INT))
+       typedef lowp_u16vec1                    u16vec1;
+       typedef lowp_u16vec2                    u16vec2;
+       typedef lowp_u16vec3                    u16vec3;
+       typedef lowp_u16vec4                    u16vec4;
+#elif(defined(GLM_PRECISION_MEDIUMP_INT))
+       typedef mediump_u16vec1                 u16vec1;
+       typedef mediump_u16vec2                 u16vec2;
+       typedef mediump_u16vec3                 u16vec3;
+       typedef mediump_u16vec4                 u16vec4;
+#else
+       /// Default precision 16 bit unsigned integer scalar type.
+       /// @see gtc_type_precision
+       typedef highp_u16vec1                   u16vec1;
+
+       /// Default precision 16 bit unsigned integer vector of 2 components type.
+       /// @see gtc_type_precision
+       typedef highp_u16vec2                   u16vec2;
+
+       /// Default precision 16 bit unsigned integer vector of 3 components type.
+       /// @see gtc_type_precision
+       typedef highp_u16vec3                   u16vec3;
+
+       /// Default precision 16 bit unsigned integer vector of 4 components type.
+       /// @see gtc_type_precision
+       typedef highp_u16vec4                   u16vec4;
+#endif
+
+
+       /// Low precision 32 bit unsigned integer scalar type.
+       /// @see gtc_type_precision
+       typedef tvec1<u32, lowp>                lowp_u32vec1;
+
+       /// Low precision 32 bit unsigned integer vector of 2 components type.
+       /// @see gtc_type_precision
+       typedef tvec2<u32, lowp>                lowp_u32vec2;
+
+       /// Low precision 32 bit unsigned integer vector of 3 components type.
+       /// @see gtc_type_precision
+       typedef tvec3<u32, lowp>                lowp_u32vec3;
+
+       /// Low precision 32 bit unsigned integer vector of 4 components type.
+       /// @see gtc_type_precision
+       typedef tvec4<u32, lowp>                lowp_u32vec4;
+
+
+       /// Medium precision 32 bit unsigned integer scalar type.
+       /// @see gtc_type_precision
+       typedef tvec1<u32, mediump>             mediump_u32vec1;
+
+       /// Medium precision 32 bit unsigned integer vector of 2 components type.
+       /// @see gtc_type_precision
+       typedef tvec2<u32, mediump>             mediump_u32vec2;
+
+       /// Medium precision 32 bit unsigned integer vector of 3 components type.
+       /// @see gtc_type_precision
+       typedef tvec3<u32, mediump>             mediump_u32vec3;
+
+       /// Medium precision 32 bit unsigned integer vector of 4 components type.
+       /// @see gtc_type_precision
+       typedef tvec4<u32, mediump>             mediump_u32vec4;
+
+
+       /// High precision 32 bit unsigned integer scalar type.
+       /// @see gtc_type_precision
+       typedef tvec1<u32, highp>               highp_u32vec1;
+
+       /// High precision 32 bit unsigned integer vector of 2 components type.
+       /// @see gtc_type_precision
+       typedef tvec2<u32, highp>               highp_u32vec2;
+
+       /// High precision 32 bit unsigned integer vector of 3 components type.
+       /// @see gtc_type_precision
+       typedef tvec3<u32, highp>               highp_u32vec3;
+
+       /// High precision 32 bit unsigned integer vector of 4 components type.
+       /// @see gtc_type_precision
+       typedef tvec4<u32, highp>               highp_u32vec4;
+
+#if(defined(GLM_PRECISION_LOWP_INT))
+       typedef lowp_u32vec1                    u32vec1;
+       typedef lowp_u32vec2                    u32vec2;
+       typedef lowp_u32vec3                    u32vec3;
+       typedef lowp_u32vec4                    u32vec4;
+#elif(defined(GLM_PRECISION_MEDIUMP_INT))
+       typedef mediump_u32vec1                 u32vec1;
+       typedef mediump_u32vec2                 u32vec2;
+       typedef mediump_u32vec3                 u32vec3;
+       typedef mediump_u32vec4                 u32vec4;
+#else
+       /// Default precision 32 bit unsigned integer scalar type.
+       /// @see gtc_type_precision
+       typedef highp_u32vec1                   u32vec1;
+
+       /// Default precision 32 bit unsigned integer vector of 2 components type.
+       /// @see gtc_type_precision
+       typedef highp_u32vec2                   u32vec2;
+
+       /// Default precision 32 bit unsigned integer vector of 3 components type.
+       /// @see gtc_type_precision
+       typedef highp_u32vec3                   u32vec3;
+
+       /// Default precision 32 bit unsigned integer vector of 4 components type.
+       /// @see gtc_type_precision
+       typedef highp_u32vec4                   u32vec4;
+#endif
+
+
+       /// Low precision 32 bit unsigned integer scalar type.
+       /// @see gtc_type_precision
+       typedef tvec1<u32, lowp>                lowp_u32vec1;
+
+       /// Low precision 32 bit unsigned integer vector of 2 components type.
+       /// @see gtc_type_precision
+       typedef tvec2<u32, lowp>                lowp_u32vec2;
+
+       /// Low precision 32 bit unsigned integer vector of 3 components type.
+       /// @see gtc_type_precision
+       typedef tvec3<u32, lowp>                lowp_u32vec3;
+
+       /// Low precision 32 bit unsigned integer vector of 4 components type.
+       /// @see gtc_type_precision
+       typedef tvec4<u32, lowp>                lowp_u32vec4;
+
+
+       /// Medium precision 32 bit unsigned integer scalar type.
+       /// @see gtc_type_precision
+       typedef tvec1<u32, mediump>             mediump_u32vec1;
+
+       /// Medium precision 32 bit unsigned integer vector of 2 components type.
+       /// @see gtc_type_precision
+       typedef tvec2<u32, mediump>             mediump_u32vec2;
+
+       /// Medium precision 32 bit unsigned integer vector of 3 components type.
+       /// @see gtc_type_precision
+       typedef tvec3<u32, mediump>             mediump_u32vec3;
+
+       /// Medium precision 32 bit unsigned integer vector of 4 components type.
+       /// @see gtc_type_precision
+       typedef tvec4<u32, mediump>             mediump_u32vec4;
+
+
+       /// High precision 32 bit unsigned integer scalar type.
+       /// @see gtc_type_precision
+       typedef tvec1<u32, highp>               highp_u32vec1;
+
+       /// High precision 32 bit unsigned integer vector of 2 components type.
+       /// @see gtc_type_precision
+       typedef tvec2<u32, highp>               highp_u32vec2;
+
+       /// High precision 32 bit unsigned integer vector of 3 components type.
+       /// @see gtc_type_precision
+       typedef tvec3<u32, highp>               highp_u32vec3;
+
+       /// High precision 32 bit unsigned integer vector of 4 components type.
+       /// @see gtc_type_precision
+       typedef tvec4<u32, highp>               highp_u32vec4;
+
+#if(defined(GLM_PRECISION_LOWP_INT))
+       typedef lowp_u32vec1                    u32vec1;
+       typedef lowp_u32vec2                    u32vec2;
+       typedef lowp_u32vec3                    u32vec3;
+       typedef lowp_u32vec4                    u32vec4;
+#elif(defined(GLM_PRECISION_MEDIUMP_INT))
+       typedef mediump_u32vec1                 u32vec1;
+       typedef mediump_u32vec2                 u32vec2;
+       typedef mediump_u32vec3                 u32vec3;
+       typedef mediump_u32vec4                 u32vec4;
+#else
+       /// Default precision 32 bit unsigned integer scalar type.
+       /// @see gtc_type_precision
+       typedef highp_u32vec1                   u32vec1;
+
+       /// Default precision 32 bit unsigned integer vector of 2 components type.
+       /// @see gtc_type_precision
+       typedef highp_u32vec2                   u32vec2;
+       
+       /// Default precision 32 bit unsigned integer vector of 3 components type.
+       /// @see gtc_type_precision
+       typedef highp_u32vec3                   u32vec3;
+       
+       /// Default precision 32 bit unsigned integer vector of 4 components type.
+       /// @see gtc_type_precision
+       typedef highp_u32vec4                   u32vec4;
+#endif
+
+
+       
+       /// Low precision 64 bit unsigned integer scalar type.
+       /// @see gtc_type_precision
+       typedef tvec1<u64, lowp>                lowp_u64vec1;
+
+       /// Low precision 64 bit unsigned integer vector of 2 components type.
+       /// @see gtc_type_precision
+       typedef tvec2<u64, lowp>                lowp_u64vec2;
+
+       /// Low precision 64 bit unsigned integer vector of 3 components type.
+       /// @see gtc_type_precision
+       typedef tvec3<u64, lowp>                lowp_u64vec3;
+
+       /// Low precision 64 bit unsigned integer vector of 4 components type.
+       /// @see gtc_type_precision
+       typedef tvec4<u64, lowp>                lowp_u64vec4;
+
+
+       /// Medium precision 64 bit unsigned integer scalar type.
+       /// @see gtc_type_precision
+       typedef tvec1<u64, mediump>             mediump_u64vec1;
+
+       /// Medium precision 64 bit unsigned integer vector of 2 components type.
+       /// @see gtc_type_precision
+       typedef tvec2<u64, mediump>             mediump_u64vec2;
+
+       /// Medium precision 64 bit unsigned integer vector of 3 components type.
+       /// @see gtc_type_precision
+       typedef tvec3<u64, mediump>             mediump_u64vec3;
+
+       /// Medium precision 64 bit unsigned integer vector of 4 components type.
+       /// @see gtc_type_precision
+       typedef tvec4<u64, mediump>             mediump_u64vec4;
+
+
+       /// High precision 64 bit unsigned integer scalar type.
+       /// @see gtc_type_precision
+       typedef tvec1<u64, highp>               highp_u64vec1;
+
+       /// High precision 64 bit unsigned integer vector of 2 components type.
+       /// @see gtc_type_precision
+       typedef tvec2<u64, highp>               highp_u64vec2;
+
+       /// High precision 64 bit unsigned integer vector of 3 components type.
+       /// @see gtc_type_precision
+       typedef tvec3<u64, highp>               highp_u64vec3;
+
+       /// High precision 64 bit unsigned integer vector of 4 components type.
+       /// @see gtc_type_precision
+       typedef tvec4<u64, highp>               highp_u64vec4;
+
+#if(defined(GLM_PRECISION_LOWP_UINT))
+       typedef lowp_u64vec1                    u64vec1;
+       typedef lowp_u64vec2                    u64vec2;
+       typedef lowp_u64vec3                    u64vec3;
+       typedef lowp_u64vec4                    u64vec4;
+#elif(defined(GLM_PRECISION_MEDIUMP_UINT))
+       typedef mediump_u64vec1                 u64vec1;
+       typedef mediump_u64vec2                 u64vec2;
+       typedef mediump_u64vec3                 u64vec3;
+       typedef mediump_u64vec4                 u64vec4;
+#else
+       /// Default precision 64 bit unsigned integer scalar type.
+       /// @see gtc_type_precision
+       typedef highp_u64vec1                   u64vec1;
+
+       /// Default precision 64 bit unsigned integer vector of 2 components type.
+       /// @see gtc_type_precision
+       typedef highp_u64vec2                   u64vec2;
+       
+       /// Default precision 64 bit unsigned integer vector of 3 components type.
+       /// @see gtc_type_precision
+       typedef highp_u64vec3                   u64vec3;
+       
+       /// Default precision 64 bit unsigned integer vector of 4 components type.
+       /// @see gtc_type_precision
+       typedef highp_u64vec4                   u64vec4;
+#endif
+       
+       
+       //////////////////////
+       // Float vector types
+
+       /// Low 32 bit single-precision floating-point scalar.
+       /// @see gtc_type_precision
+       typedef detail::float32 lowp_float32;
+
+       /// Low 64 bit double-precision floating-point scalar.
+       /// @see gtc_type_precision
+       typedef detail::float64 lowp_float64;
+
+       /// Low 32 bit single-precision floating-point scalar.
+       /// @see gtc_type_precision
+       typedef detail::float32 lowp_float32_t;
+
+       /// Low 64 bit double-precision floating-point scalar.
+       /// @see gtc_type_precision
+       typedef detail::float64 lowp_float64_t;
+
+       /// Low 32 bit single-precision floating-point scalar.
+       /// @see gtc_type_precision
+       typedef float32 lowp_f32;
+
+       /// Low 64 bit double-precision floating-point scalar.
+       /// @see gtc_type_precision
+       typedef float64 lowp_f64;
+
+       /// Low 32 bit single-precision floating-point scalar.
+       /// @see gtc_type_precision
+       typedef detail::float32 lowp_float32;
+
+       /// Low 64 bit double-precision floating-point scalar.
+       /// @see gtc_type_precision
+       typedef detail::float64 lowp_float64;
+
+       /// Low 32 bit single-precision floating-point scalar.
+       /// @see gtc_type_precision
+       typedef detail::float32 lowp_float32_t;
+
+       /// Low 64 bit double-precision floating-point scalar.
+       /// @see gtc_type_precision
+       typedef detail::float64 lowp_float64_t;
+
+       /// Low 32 bit single-precision floating-point scalar.
+       /// @see gtc_type_precision
+       typedef float32 lowp_f32;
+
+       /// Low 64 bit double-precision floating-point scalar.
+       /// @see gtc_type_precision
+       typedef float64 lowp_f64;
+
+
+       /// Low 32 bit single-precision floating-point scalar.
+       /// @see gtc_type_precision
+       typedef detail::float32 lowp_float32;
+
+       /// Low 64 bit double-precision floating-point scalar.
+       /// @see gtc_type_precision
+       typedef detail::float64 lowp_float64;
+
+       /// Low 32 bit single-precision floating-point scalar.
+       /// @see gtc_type_precision
+       typedef detail::float32 lowp_float32_t;
+       
+       /// Low 64 bit double-precision floating-point scalar.
+       /// @see gtc_type_precision
+       typedef detail::float64 lowp_float64_t;
+
+       /// Low 32 bit single-precision floating-point scalar.
+       /// @see gtc_type_precision
+       typedef float32 lowp_f32;
+
+       /// Low 64 bit double-precision floating-point scalar.
+       /// @see gtc_type_precision
+       typedef float64 lowp_f64;
+
+
+       /// Medium 32 bit single-precision floating-point scalar.
+       /// @see gtc_type_precision
+       typedef detail::float32 mediump_float32;
+
+       /// Medium 64 bit double-precision floating-point scalar.
+       /// @see gtc_type_precision
+       typedef detail::float64 mediump_float64;
+
+       /// Medium 32 bit single-precision floating-point scalar.
+       /// @see gtc_type_precision
+       typedef detail::float32 mediump_float32_t;
+
+       /// Medium 64 bit double-precision floating-point scalar.
+       /// @see gtc_type_precision
+       typedef detail::float64 mediump_float64_t;
+
+       /// Medium 32 bit single-precision floating-point scalar.
+       /// @see gtc_type_precision
+       typedef float32 mediump_f32;
+
+       /// Medium 64 bit double-precision floating-point scalar.
+       /// @see gtc_type_precision
+       typedef float64 mediump_f64;
+
+
+       /// High 32 bit single-precision floating-point scalar.
+       /// @see gtc_type_precision
+       typedef detail::float32 highp_float32;
+
+       /// High 64 bit double-precision floating-point scalar.
+       /// @see gtc_type_precision
+       typedef detail::float64 highp_float64;
+
+       /// High 32 bit single-precision floating-point scalar.
+       /// @see gtc_type_precision
+       typedef detail::float32 highp_float32_t;
+
+       /// High 64 bit double-precision floating-point scalar.
+       /// @see gtc_type_precision
+       typedef detail::float64 highp_float64_t;
+
+       /// High 32 bit single-precision floating-point scalar.
+       /// @see gtc_type_precision
+       typedef float32 highp_f32;
+
+       /// High 64 bit double-precision floating-point scalar.
+       /// @see gtc_type_precision
+       typedef float64 highp_f64;
+
+
+#if(defined(GLM_PRECISION_LOWP_FLOAT))
+       /// Default 32 bit single-precision floating-point scalar.
+       /// @see gtc_type_precision
+       typedef lowp_float32 float32;
+
+       /// Default 64 bit double-precision floating-point scalar.
+       /// @see gtc_type_precision
+       typedef lowp_float64 float64;
+
+       /// Default 32 bit single-precision floating-point scalar.
+       /// @see gtc_type_precision
+       typedef lowp_float32_t float32_t;
+
+       /// Default 64 bit double-precision floating-point scalar.
+       /// @see gtc_type_precision
+       typedef lowp_float64_t float64_t;
+
+       /// Default 32 bit single-precision floating-point scalar.
+       /// @see gtc_type_precision
+       typedef lowp_f32 f32;
+
+       /// Default 64 bit double-precision floating-point scalar.
+       /// @see gtc_type_precision
+       typedef lowp_f64 f64;
+
+#elif(defined(GLM_PRECISION_MEDIUMP_FLOAT))
+
+       /// Default 32 bit single-precision floating-point scalar.
+       /// @see gtc_type_precision
+       typedef mediump_float32 float32;
+
+       /// Default 64 bit double-precision floating-point scalar.
+       /// @see gtc_type_precision
+       typedef mediump_float64 float64;
+
+       /// Default 32 bit single-precision floating-point scalar.
+       /// @see gtc_type_precision
+       typedef mediump_float32 float32_t;
+
+       /// Default 64 bit double-precision floating-point scalar.
+       /// @see gtc_type_precision
+       typedef mediump_float64 float64_t;
+
+       /// Default 32 bit single-precision floating-point scalar.
+       /// @see gtc_type_precision
+       typedef mediump_float32 f32;
+
+       /// Default 64 bit double-precision floating-point scalar.
+       /// @see gtc_type_precision
+       typedef mediump_float64 f64;
+
+#else//(defined(GLM_PRECISION_HIGHP_FLOAT))
+
+       /// Default 32 bit single-precision floating-point scalar.
+       /// @see gtc_type_precision
+       typedef highp_float32 float32;
+
+       /// Default 64 bit double-precision floating-point scalar.
+       /// @see gtc_type_precision
+       typedef highp_float64 float64;
+
+       /// Default 32 bit single-precision floating-point scalar.
+       /// @see gtc_type_precision
+       typedef highp_float32_t float32_t;
+
+       /// Default 64 bit double-precision floating-point scalar.
+       /// @see gtc_type_precision
+       typedef highp_float64_t float64_t;
+
+       /// Default 32 bit single-precision floating-point scalar.
+       /// @see gtc_type_precision
+       typedef highp_float32_t f32;
+
+       /// Default 64 bit double-precision floating-point scalar.
+       /// @see gtc_type_precision
+       typedef highp_float64_t f64;
+#endif
+
+
+       /// Low single-precision floating-point vector of 1 component.
+       /// @see gtc_type_precision
+       typedef tvec1<float, lowp> lowp_vec1;
+
+       /// Low single-precision floating-point vector of 2 components.
+       /// @see gtc_type_precision
+       typedef tvec2<float, lowp> lowp_vec2;
+
+       /// Low single-precision floating-point vector of 3 components.
+       /// @see gtc_type_precision
+       typedef tvec3<float, lowp> lowp_vec3;
+
+       /// Low single-precision floating-point vector of 4 components.
+       /// @see gtc_type_precision
+       typedef tvec4<float, lowp> lowp_vec4;
+
+       /// Low single-precision floating-point vector of 1 component.
+       /// @see gtc_type_precision
+       typedef tvec1<float, lowp> lowp_fvec1;
+
+       /// Low single-precision floating-point vector of 2 components.
+       /// @see gtc_type_precision
+       typedef tvec2<float, lowp> lowp_fvec2;
+
+       /// Low single-precision floating-point vector of 3 components.
+       /// @see gtc_type_precision
+       typedef tvec3<float, lowp> lowp_fvec3;
+
+       /// Low single-precision floating-point vector of 4 components.
+       /// @see gtc_type_precision
+       typedef tvec4<float, lowp> lowp_fvec4;
+
+
+       /// Medium single-precision floating-point vector of 1 component.
+       /// @see gtc_type_precision
+       typedef tvec1<float, mediump> mediump_vec1;
+
+       /// Medium Single-precision floating-point vector of 2 components.
+       /// @see gtc_type_precision
+       typedef tvec2<float, mediump> mediump_vec2;
+
+       /// Medium Single-precision floating-point vector of 3 components.
+       /// @see gtc_type_precision
+       typedef tvec3<float, mediump> mediump_vec3;
+
+       /// Medium Single-precision floating-point vector of 4 components.
+       /// @see gtc_type_precision
+       typedef tvec4<float, mediump> mediump_vec4;
+
+       /// Medium single-precision floating-point vector of 1 component.
+       /// @see gtc_type_precision
+       typedef tvec1<float, mediump> mediump_fvec1;
+
+       /// Medium Single-precision floating-point vector of 2 components.
+       /// @see gtc_type_precision
+       typedef tvec2<float, mediump> mediump_fvec2;
+
+       /// Medium Single-precision floating-point vector of 3 components.
+       /// @see gtc_type_precision
+       typedef tvec3<float, mediump> mediump_fvec3;
+
+       /// Medium Single-precision floating-point vector of 4 components.
+       /// @see gtc_type_precision
+       typedef tvec4<float, mediump> mediump_fvec4;
+
+
+       /// High single-precision floating-point vector of 1 component.
+       /// @see gtc_type_precision
+       typedef tvec1<float, highp> highp_vec1;
+
+       /// High Single-precision floating-point vector of 2 components.
+       /// @see gtc_type_precision
+       typedef tvec2<float, highp> highp_vec2;
+
+       /// High Single-precision floating-point vector of 3 components.
+       /// @see gtc_type_precision
+       typedef tvec3<float, highp> highp_vec3;
+
+       /// High Single-precision floating-point vector of 4 components.
+       /// @see gtc_type_precision
+       typedef tvec4<float, highp> highp_vec4;
+
+       /// High single-precision floating-point vector of 1 component.
+       /// @see gtc_type_precision
+       typedef tvec1<float, highp> highp_fvec1;
+
+       /// High Single-precision floating-point vector of 2 components.
+       /// @see gtc_type_precision
+       typedef tvec2<float, highp> highp_fvec2;
+
+       /// High Single-precision floating-point vector of 3 components.
+       /// @see gtc_type_precision
+       typedef tvec3<float, highp> highp_fvec3;
+
+       /// High Single-precision floating-point vector of 4 components.
+       /// @see gtc_type_precision
+       typedef tvec4<float, highp> highp_fvec4;
+
+
+       /// Low single-precision floating-point vector of 1 component.
+       /// @see gtc_type_precision
+       typedef tvec1<f32, lowp> lowp_f32vec1;
+
+       /// Low single-precision floating-point vector of 2 components.
+       /// @see gtc_type_precision
+       typedef tvec2<f32, lowp> lowp_f32vec2;
+
+       /// Low single-precision floating-point vector of 3 components.
+       /// @see gtc_type_precision
+       typedef tvec3<f32, lowp> lowp_f32vec3;
+
+       /// Low single-precision floating-point vector of 4 components.
+       /// @see gtc_type_precision
+       typedef tvec4<f32, lowp> lowp_f32vec4;
+
+       /// Medium single-precision floating-point vector of 1 component.
+       /// @see gtc_type_precision
+       typedef tvec1<f32, mediump> mediump_f32vec1;
+
+       /// Medium single-precision floating-point vector of 2 components.
+       /// @see gtc_type_precision
+       typedef tvec2<f32, mediump> mediump_f32vec2;
+
+       /// Medium single-precision floating-point vector of 3 components.
+       /// @see gtc_type_precision
+       typedef tvec3<f32, mediump> mediump_f32vec3;
+
+       /// Medium single-precision floating-point vector of 4 components.
+       /// @see gtc_type_precision
+       typedef tvec4<f32, mediump> mediump_f32vec4;
+
+       /// High single-precision floating-point vector of 1 component.
+       /// @see gtc_type_precision
+       typedef tvec1<f32, highp> highp_f32vec1;
+
+       /// High single-precision floating-point vector of 2 components.
+       /// @see gtc_type_precision
+       typedef tvec2<f32, highp> highp_f32vec2;
+
+       /// High single-precision floating-point vector of 3 components.
+       /// @see gtc_type_precision
+       typedef tvec3<f32, highp> highp_f32vec3;
+
+       /// High single-precision floating-point vector of 4 components.
+       /// @see gtc_type_precision
+       typedef tvec4<f32, highp> highp_f32vec4;
+
+
+       /// Low double-precision floating-point vector of 1 component.
+       /// @see gtc_type_precision
+       typedef tvec1<f64, lowp> lowp_f64vec1;
+
+       /// Low double-precision floating-point vector of 2 components.
+       /// @see gtc_type_precision
+       typedef tvec2<f64, lowp> lowp_f64vec2;
+
+       /// Low double-precision floating-point vector of 3 components.
+       /// @see gtc_type_precision
+       typedef tvec3<f64, lowp> lowp_f64vec3;
+
+       /// Low double-precision floating-point vector of 4 components.
+       /// @see gtc_type_precision
+       typedef tvec4<f64, lowp> lowp_f64vec4;
+
+       /// Medium double-precision floating-point vector of 1 component.
+       /// @see gtc_type_precision
+       typedef tvec1<f64, mediump> mediump_f64vec1;
+
+       /// Medium double-precision floating-point vector of 2 components.
+       /// @see gtc_type_precision
+       typedef tvec2<f64, mediump> mediump_f64vec2;
+
+       /// Medium double-precision floating-point vector of 3 components.
+       /// @see gtc_type_precision
+       typedef tvec3<f64, mediump> mediump_f64vec3;
+
+       /// Medium double-precision floating-point vector of 4 components.
+       /// @see gtc_type_precision
+       typedef tvec4<f64, mediump> mediump_f64vec4;
+
+       /// High double-precision floating-point vector of 1 component.
+       /// @see gtc_type_precision
+       typedef tvec1<f64, highp> highp_f64vec1;
+
+       /// High double-precision floating-point vector of 2 components.
+       /// @see gtc_type_precision
+       typedef tvec2<f64, highp> highp_f64vec2;
+
+       /// High double-precision floating-point vector of 3 components.
+       /// @see gtc_type_precision
+       typedef tvec3<f64, highp> highp_f64vec3;
+
+       /// High double-precision floating-point vector of 4 components.
+       /// @see gtc_type_precision
+       typedef tvec4<f64, highp> highp_f64vec4;
+
+
+       //////////////////////
+       // Float matrix types
+
+       /// Low single-precision floating-point 1x1 matrix.
+       /// @see gtc_type_precision
+       //typedef lowp_f32 lowp_fmat1x1;
+
+       /// Low single-precision floating-point 2x2 matrix.
+       /// @see gtc_type_precision
+       typedef tmat2x2<f32, lowp> lowp_fmat2x2;
+
+       /// Low single-precision floating-point 2x3 matrix.
+       /// @see gtc_type_precision
+       typedef tmat2x3<f32, lowp> lowp_fmat2x3;
+
+       /// Low single-precision floating-point 2x4 matrix.
+       /// @see gtc_type_precision
+       typedef tmat2x4<f32, lowp> lowp_fmat2x4;
+
+       /// Low single-precision floating-point 3x2 matrix.
+       /// @see gtc_type_precision
+       typedef tmat3x2<f32, lowp> lowp_fmat3x2;
+
+       /// Low single-precision floating-point 3x3 matrix.
+       /// @see gtc_type_precision
+       typedef tmat3x3<f32, lowp> lowp_fmat3x3;
+
+       /// Low single-precision floating-point 3x4 matrix.
+       /// @see gtc_type_precision
+       typedef tmat3x4<f32, lowp> lowp_fmat3x4;
+
+       /// Low single-precision floating-point 4x2 matrix.
+       /// @see gtc_type_precision
+       typedef tmat4x2<f32, lowp> lowp_fmat4x2;
+
+       /// Low single-precision floating-point 4x3 matrix.
+       /// @see gtc_type_precision
+       typedef tmat4x3<f32, lowp> lowp_fmat4x3;
+
+       /// Low single-precision floating-point 4x4 matrix.
+       /// @see gtc_type_precision
+       typedef tmat4x4<f32, lowp> lowp_fmat4x4;
+
+       /// Low single-precision floating-point 1x1 matrix.
+       /// @see gtc_type_precision
+       //typedef lowp_fmat1x1 lowp_fmat1;
+
+       /// Low single-precision floating-point 2x2 matrix.
+       /// @see gtc_type_precision
+       typedef lowp_fmat2x2 lowp_fmat2;
+
+       /// Low single-precision floating-point 3x3 matrix.
+       /// @see gtc_type_precision
+       typedef lowp_fmat3x3 lowp_fmat3;
+
+       /// Low single-precision floating-point 4x4 matrix.
+       /// @see gtc_type_precision
+       typedef lowp_fmat4x4 lowp_fmat4;
+
+
+       /// Medium single-precision floating-point 1x1 matrix.
+       /// @see gtc_type_precision
+       //typedef mediump_f32 mediump_fmat1x1;
+
+       /// Medium single-precision floating-point 2x2 matrix.
+       /// @see gtc_type_precision
+       typedef tmat2x2<f32, mediump> mediump_fmat2x2;
+
+       /// Medium single-precision floating-point 2x3 matrix.
+       /// @see gtc_type_precision
+       typedef tmat2x3<f32, mediump> mediump_fmat2x3;
+
+       /// Medium single-precision floating-point 2x4 matrix.
+       /// @see gtc_type_precision
+       typedef tmat2x4<f32, mediump> mediump_fmat2x4;
+
+       /// Medium single-precision floating-point 3x2 matrix.
+       /// @see gtc_type_precision
+       typedef tmat3x2<f32, mediump> mediump_fmat3x2;
+
+       /// Medium single-precision floating-point 3x3 matrix.
+       /// @see gtc_type_precision
+       typedef tmat3x3<f32, mediump> mediump_fmat3x3;
+
+       /// Medium single-precision floating-point 3x4 matrix.
+       /// @see gtc_type_precision
+       typedef tmat3x4<f32, mediump> mediump_fmat3x4;
+
+       /// Medium single-precision floating-point 4x2 matrix.
+       /// @see gtc_type_precision
+       typedef tmat4x2<f32, mediump> mediump_fmat4x2;
+
+       /// Medium single-precision floating-point 4x3 matrix.
+       /// @see gtc_type_precision
+       typedef tmat4x3<f32, mediump> mediump_fmat4x3;
+
+       /// Medium single-precision floating-point 4x4 matrix.
+       /// @see gtc_type_precision
+       typedef tmat4x4<f32, mediump> mediump_fmat4x4;
+
+       /// Medium single-precision floating-point 1x1 matrix.
+       /// @see gtc_type_precision
+       //typedef mediump_fmat1x1 mediump_fmat1;
+
+       /// Medium single-precision floating-point 2x2 matrix.
+       /// @see gtc_type_precision
+       typedef mediump_fmat2x2 mediump_fmat2;
+
+       /// Medium single-precision floating-point 3x3 matrix.
+       /// @see gtc_type_precision
+       typedef mediump_fmat3x3 mediump_fmat3;
+
+       /// Medium single-precision floating-point 4x4 matrix.
+       /// @see gtc_type_precision
+       typedef mediump_fmat4x4 mediump_fmat4;
+
+
+       /// High single-precision floating-point 1x1 matrix.
+       /// @see gtc_type_precision
+       //typedef highp_f32 highp_fmat1x1;
+
+       /// High single-precision floating-point 2x2 matrix.
+       /// @see gtc_type_precision
+       typedef tmat2x2<f32, highp> highp_fmat2x2;
+
+       /// High single-precision floating-point 2x3 matrix.
+       /// @see gtc_type_precision
+       typedef tmat2x3<f32, highp> highp_fmat2x3;
+
+       /// High single-precision floating-point 2x4 matrix.
+       /// @see gtc_type_precision
+       typedef tmat2x4<f32, highp> highp_fmat2x4;
+
+       /// High single-precision floating-point 3x2 matrix.
+       /// @see gtc_type_precision
+       typedef tmat3x2<f32, highp> highp_fmat3x2;
+
+       /// High single-precision floating-point 3x3 matrix.
+       /// @see gtc_type_precision
+       typedef tmat3x3<f32, highp> highp_fmat3x3;
+
+       /// High single-precision floating-point 3x4 matrix.
+       /// @see gtc_type_precision
+       typedef tmat3x4<f32, highp> highp_fmat3x4;
+
+       /// High single-precision floating-point 4x2 matrix.
+       /// @see gtc_type_precision
+       typedef tmat4x2<f32, highp> highp_fmat4x2;
+
+       /// High single-precision floating-point 4x3 matrix.
+       /// @see gtc_type_precision
+       typedef tmat4x3<f32, highp> highp_fmat4x3;
+
+       /// High single-precision floating-point 4x4 matrix.
+       /// @see gtc_type_precision
+       typedef tmat4x4<f32, highp> highp_fmat4x4;
+
+       /// High single-precision floating-point 1x1 matrix.
+       /// @see gtc_type_precision
+       //typedef highp_fmat1x1 highp_fmat1;
+
+       /// High single-precision floating-point 2x2 matrix.
+       /// @see gtc_type_precision
+       typedef highp_fmat2x2 highp_fmat2;
+
+       /// High single-precision floating-point 3x3 matrix.
+       /// @see gtc_type_precision
+       typedef highp_fmat3x3 highp_fmat3;
+       
+       /// High single-precision floating-point 4x4 matrix.
+       /// @see gtc_type_precision
+       typedef highp_fmat4x4 highp_fmat4;
+
+
+       /// Low single-precision floating-point 1x1 matrix.
+       /// @see gtc_type_precision
+       //typedef f32 lowp_f32mat1x1;
+
+       /// Low single-precision floating-point 2x2 matrix.
+       /// @see gtc_type_precision
+       typedef tmat2x2<f32, lowp> lowp_f32mat2x2;
+
+       /// Low single-precision floating-point 2x3 matrix.
+       /// @see gtc_type_precision
+       typedef tmat2x3<f32, lowp> lowp_f32mat2x3;
+
+       /// Low single-precision floating-point 2x4 matrix.
+       /// @see gtc_type_precision
+       typedef tmat2x4<f32, lowp> lowp_f32mat2x4;
+
+       /// Low single-precision floating-point 3x2 matrix.
+       /// @see gtc_type_precision
+       typedef tmat3x2<f32, lowp> lowp_f32mat3x2;
+
+       /// Low single-precision floating-point 3x3 matrix.
+       /// @see gtc_type_precision
+       typedef tmat3x3<f32, lowp> lowp_f32mat3x3;
+
+       /// Low single-precision floating-point 3x4 matrix.
+       /// @see gtc_type_precision
+       typedef tmat3x4<f32, lowp> lowp_f32mat3x4;
+
+       /// Low single-precision floating-point 4x2 matrix.
+       /// @see gtc_type_precision
+       typedef tmat4x2<f32, lowp> lowp_f32mat4x2;
+
+       /// Low single-precision floating-point 4x3 matrix.
+       /// @see gtc_type_precision
+       typedef tmat4x3<f32, lowp> lowp_f32mat4x3;
+
+       /// Low single-precision floating-point 4x4 matrix.
+       /// @see gtc_type_precision
+       typedef tmat4x4<f32, lowp> lowp_f32mat4x4;
+
+       /// Low single-precision floating-point 1x1 matrix.
+       /// @see gtc_type_precision
+       //typedef detail::tmat1x1<f32, lowp> lowp_f32mat1;
+
+       /// Low single-precision floating-point 2x2 matrix.
+       /// @see gtc_type_precision
+       typedef lowp_f32mat2x2 lowp_f32mat2;
+
+       /// Low single-precision floating-point 3x3 matrix.
+       /// @see gtc_type_precision
+       typedef lowp_f32mat3x3 lowp_f32mat3;
+
+       /// Low single-precision floating-point 4x4 matrix.
+       /// @see gtc_type_precision
+       typedef lowp_f32mat4x4 lowp_f32mat4;
+
+
+       /// High single-precision floating-point 1x1 matrix.
+       /// @see gtc_type_precision
+       //typedef f32 mediump_f32mat1x1;
+
+       /// Low single-precision floating-point 2x2 matrix.
+       /// @see gtc_type_precision
+       typedef tmat2x2<f32, mediump> mediump_f32mat2x2;
+
+       /// Medium single-precision floating-point 2x3 matrix.
+       /// @see gtc_type_precision
+       typedef tmat2x3<f32, mediump> mediump_f32mat2x3;
+
+       /// Medium single-precision floating-point 2x4 matrix.
+       /// @see gtc_type_precision
+       typedef tmat2x4<f32, mediump> mediump_f32mat2x4;
+
+       /// Medium single-precision floating-point 3x2 matrix.
+       /// @see gtc_type_precision
+       typedef tmat3x2<f32, mediump> mediump_f32mat3x2;
+
+       /// Medium single-precision floating-point 3x3 matrix.
+       /// @see gtc_type_precision
+       typedef tmat3x3<f32, mediump> mediump_f32mat3x3;
+
+       /// Medium single-precision floating-point 3x4 matrix.
+       /// @see gtc_type_precision
+       typedef tmat3x4<f32, mediump> mediump_f32mat3x4;
+
+       /// Medium single-precision floating-point 4x2 matrix.
+       /// @see gtc_type_precision
+       typedef tmat4x2<f32, mediump> mediump_f32mat4x2;
+
+       /// Medium single-precision floating-point 4x3 matrix.
+       /// @see gtc_type_precision
+       typedef tmat4x3<f32, mediump> mediump_f32mat4x3;
+
+       /// Medium single-precision floating-point 4x4 matrix.
+       /// @see gtc_type_precision
+       typedef tmat4x4<f32, mediump> mediump_f32mat4x4;
+
+       /// Medium single-precision floating-point 1x1 matrix.
+       /// @see gtc_type_precision
+       //typedef detail::tmat1x1<f32, mediump> f32mat1;
+
+       /// Medium single-precision floating-point 2x2 matrix.
+       /// @see gtc_type_precision
+       typedef mediump_f32mat2x2 mediump_f32mat2;
+
+       /// Medium single-precision floating-point 3x3 matrix.
+       /// @see gtc_type_precision
+       typedef mediump_f32mat3x3 mediump_f32mat3;
+
+       /// Medium single-precision floating-point 4x4 matrix.
+       /// @see gtc_type_precision
+       typedef mediump_f32mat4x4 mediump_f32mat4;
+
+
+       /// High single-precision floating-point 1x1 matrix.
+       /// @see gtc_type_precision
+       //typedef f32 highp_f32mat1x1;
+
+       /// High single-precision floating-point 2x2 matrix.
+       /// @see gtc_type_precision
+       typedef tmat2x2<f32, highp> highp_f32mat2x2;
+
+       /// High single-precision floating-point 2x3 matrix.
+       /// @see gtc_type_precision
+       typedef tmat2x3<f32, highp> highp_f32mat2x3;
+
+       /// High single-precision floating-point 2x4 matrix.
+       /// @see gtc_type_precision
+       typedef tmat2x4<f32, highp> highp_f32mat2x4;
+
+       /// High single-precision floating-point 3x2 matrix.
+       /// @see gtc_type_precision
+       typedef tmat3x2<f32, highp> highp_f32mat3x2;
+
+       /// High single-precision floating-point 3x3 matrix.
+       /// @see gtc_type_precision
+       typedef tmat3x3<f32, highp> highp_f32mat3x3;
+
+       /// High single-precision floating-point 3x4 matrix.
+       /// @see gtc_type_precision
+       typedef tmat3x4<f32, highp> highp_f32mat3x4;
+
+       /// High single-precision floating-point 4x2 matrix.
+       /// @see gtc_type_precision
+       typedef tmat4x2<f32, highp> highp_f32mat4x2;
+
+       /// High single-precision floating-point 4x3 matrix.
+       /// @see gtc_type_precision
+       typedef tmat4x3<f32, highp> highp_f32mat4x3;
+
+       /// High single-precision floating-point 4x4 matrix.
+       /// @see gtc_type_precision
+       typedef tmat4x4<f32, highp> highp_f32mat4x4;
+
+       /// High single-precision floating-point 1x1 matrix.
+       /// @see gtc_type_precision
+       //typedef detail::tmat1x1<f32, highp> f32mat1;
+
+       /// High single-precision floating-point 2x2 matrix.
+       /// @see gtc_type_precision
+       typedef highp_f32mat2x2 highp_f32mat2;
+
+       /// High single-precision floating-point 3x3 matrix.
+       /// @see gtc_type_precision
+       typedef highp_f32mat3x3 highp_f32mat3;
+
+       /// High single-precision floating-point 4x4 matrix.
+       /// @see gtc_type_precision
+       typedef highp_f32mat4x4 highp_f32mat4;
+
+
+       /// Low double-precision floating-point 1x1 matrix.
+       /// @see gtc_type_precision
+       //typedef f64 lowp_f64mat1x1;
+
+       /// Low double-precision floating-point 2x2 matrix.
+       /// @see gtc_type_precision
+       typedef tmat2x2<f64, lowp> lowp_f64mat2x2;
+
+       /// Low double-precision floating-point 2x3 matrix.
+       /// @see gtc_type_precision
+       typedef tmat2x3<f64, lowp> lowp_f64mat2x3;
+
+       /// Low double-precision floating-point 2x4 matrix.
+       /// @see gtc_type_precision
+       typedef tmat2x4<f64, lowp> lowp_f64mat2x4;
+
+       /// Low double-precision floating-point 3x2 matrix.
+       /// @see gtc_type_precision
+       typedef tmat3x2<f64, lowp> lowp_f64mat3x2;
+
+       /// Low double-precision floating-point 3x3 matrix.
+       /// @see gtc_type_precision
+       typedef tmat3x3<f64, lowp> lowp_f64mat3x3;
+
+       /// Low double-precision floating-point 3x4 matrix.
+       /// @see gtc_type_precision
+       typedef tmat3x4<f64, lowp> lowp_f64mat3x4;
+
+       /// Low double-precision floating-point 4x2 matrix.
+       /// @see gtc_type_precision
+       typedef tmat4x2<f64, lowp> lowp_f64mat4x2;
+
+       /// Low double-precision floating-point 4x3 matrix.
+       /// @see gtc_type_precision
+       typedef tmat4x3<f64, lowp> lowp_f64mat4x3;
+       
+       /// Low double-precision floating-point 4x4 matrix.
+       /// @see gtc_type_precision
+       typedef tmat4x4<f64, lowp> lowp_f64mat4x4;
+
+       /// Low double-precision floating-point 1x1 matrix.
+       /// @see gtc_type_precision
+       //typedef lowp_f64mat1x1 lowp_f64mat1;
+
+       /// Low double-precision floating-point 2x2 matrix.
+       /// @see gtc_type_precision
+       typedef lowp_f64mat2x2 lowp_f64mat2;
+
+       /// Low double-precision floating-point 3x3 matrix.
+       /// @see gtc_type_precision
+       typedef lowp_f64mat3x3 lowp_f64mat3;
+
+       /// Low double-precision floating-point 4x4 matrix.
+       /// @see gtc_type_precision
+       typedef lowp_f64mat4x4 lowp_f64mat4;
+
+
+       /// Medium double-precision floating-point 1x1 matrix.
+       /// @see gtc_type_precision
+       //typedef f64 Highp_f64mat1x1;
+
+       /// Medium double-precision floating-point 2x2 matrix.
+       /// @see gtc_type_precision
+       typedef tmat2x2<f64, mediump> mediump_f64mat2x2;
+
+       /// Medium double-precision floating-point 2x3 matrix.
+       /// @see gtc_type_precision
+       typedef tmat2x3<f64, mediump> mediump_f64mat2x3;
+
+       /// Medium double-precision floating-point 2x4 matrix.
+       /// @see gtc_type_precision
+       typedef tmat2x4<f64, mediump> mediump_f64mat2x4;
+
+       /// Medium double-precision floating-point 3x2 matrix.
+       /// @see gtc_type_precision
+       typedef tmat3x2<f64, mediump> mediump_f64mat3x2;
+
+       /// Medium double-precision floating-point 3x3 matrix.
+       /// @see gtc_type_precision
+       typedef tmat3x3<f64, mediump> mediump_f64mat3x3;
+
+       /// Medium double-precision floating-point 3x4 matrix.
+       /// @see gtc_type_precision
+       typedef tmat3x4<f64, mediump> mediump_f64mat3x4;
+
+       /// Medium double-precision floating-point 4x2 matrix.
+       /// @see gtc_type_precision
+       typedef tmat4x2<f64, mediump> mediump_f64mat4x2;
+
+       /// Medium double-precision floating-point 4x3 matrix.
+       /// @see gtc_type_precision
+       typedef tmat4x3<f64, mediump> mediump_f64mat4x3;
+
+       /// Medium double-precision floating-point 4x4 matrix.
+       /// @see gtc_type_precision
+       typedef tmat4x4<f64, mediump> mediump_f64mat4x4;
+
+       /// Medium double-precision floating-point 1x1 matrix.
+       /// @see gtc_type_precision
+       //typedef mediump_f64mat1x1 mediump_f64mat1;
+
+       /// Medium double-precision floating-point 2x2 matrix.
+       /// @see gtc_type_precision
+       typedef mediump_f64mat2x2 mediump_f64mat2;
+
+       /// Medium double-precision floating-point 3x3 matrix.
+       /// @see gtc_type_precision
+       typedef mediump_f64mat3x3 mediump_f64mat3;
+
+       /// Medium double-precision floating-point 4x4 matrix.
+       /// @see gtc_type_precision
+       typedef mediump_f64mat4x4 mediump_f64mat4;
+
+       /// High double-precision floating-point 1x1 matrix.
+       /// @see gtc_type_precision
+       //typedef f64 highp_f64mat1x1;
+
+       /// High double-precision floating-point 2x2 matrix.
+       /// @see gtc_type_precision
+       typedef tmat2x2<f64, highp> highp_f64mat2x2;
+
+       /// High double-precision floating-point 2x3 matrix.
+       /// @see gtc_type_precision
+       typedef tmat2x3<f64, highp> highp_f64mat2x3;
+
+       /// High double-precision floating-point 2x4 matrix.
+       /// @see gtc_type_precision
+       typedef tmat2x4<f64, highp> highp_f64mat2x4;
+
+       /// High double-precision floating-point 3x2 matrix.
+       /// @see gtc_type_precision
+       typedef tmat3x2<f64, highp> highp_f64mat3x2;
+
+       /// High double-precision floating-point 3x3 matrix.
+       /// @see gtc_type_precision
+       typedef tmat3x3<f64, highp> highp_f64mat3x3;
+
+       /// High double-precision floating-point 3x4 matrix.
+       /// @see gtc_type_precision
+       typedef tmat3x4<f64, highp> highp_f64mat3x4;
+
+       /// High double-precision floating-point 4x2 matrix.
+       /// @see gtc_type_precision
+       typedef tmat4x2<f64, highp> highp_f64mat4x2;
+
+       /// High double-precision floating-point 4x3 matrix.
+       /// @see gtc_type_precision
+       typedef tmat4x3<f64, highp> highp_f64mat4x3;
+
+       /// High double-precision floating-point 4x4 matrix.
+       /// @see gtc_type_precision
+       typedef tmat4x4<f64, highp> highp_f64mat4x4;
+
+       /// High double-precision floating-point 1x1 matrix.
+       /// @see gtc_type_precision
+       //typedef highp_f64mat1x1 highp_f64mat1;
+
+       /// High double-precision floating-point 2x2 matrix.
+       /// @see gtc_type_precision
+       typedef highp_f64mat2x2 highp_f64mat2;
+
+       /// High double-precision floating-point 3x3 matrix.
+       /// @see gtc_type_precision
+       typedef highp_f64mat3x3 highp_f64mat3;
+
+       /// High double-precision floating-point 4x4 matrix.
+       /// @see gtc_type_precision
+       typedef highp_f64mat4x4 highp_f64mat4;
+
+       //////////////////////////
+       // Quaternion types
+
+       /// Low single-precision floating-point quaternion.
+       /// @see gtc_type_precision
+       typedef tquat<f32, lowp> lowp_f32quat;
+
+       /// Low double-precision floating-point quaternion.
+       /// @see gtc_type_precision
+       typedef tquat<f64, lowp> lowp_f64quat;
+
+       /// Medium single-precision floating-point quaternion.
+       /// @see gtc_type_precision
+       typedef tquat<f32, mediump> mediump_f32quat;
+
+       /// Medium double-precision floating-point quaternion.
+       /// @see gtc_type_precision
+       typedef tquat<f64, mediump> mediump_f64quat;
+
+       /// High single-precision floating-point quaternion.
+       /// @see gtc_type_precision
+       typedef tquat<f32, highp> highp_f32quat;
+
+       /// High double-precision floating-point quaternion.
+       /// @see gtc_type_precision
+       typedef tquat<f64, highp> highp_f64quat;
+
+
+#if(defined(GLM_PRECISION_LOWP_FLOAT))
+       typedef lowp_f32vec1                    fvec1;
+       typedef lowp_f32vec2                    fvec2;
+       typedef lowp_f32vec3                    fvec3;
+       typedef lowp_f32vec4                    fvec4;
+       typedef lowp_f32mat2                    fmat2;
+       typedef lowp_f32mat3                    fmat3;
+       typedef lowp_f32mat4                    fmat4;
+       typedef lowp_f32mat2x2                  fmat2x2;
+       typedef lowp_f32mat3x2                  fmat3x2;
+       typedef lowp_f32mat4x2                  fmat4x2;
+       typedef lowp_f32mat2x3                  fmat2x3;
+       typedef lowp_f32mat3x3                  fmat3x3;
+       typedef lowp_f32mat4x3                  fmat4x3;
+       typedef lowp_f32mat2x4                  fmat2x4;
+       typedef lowp_f32mat3x4                  fmat3x4;
+       typedef lowp_f32mat4x4                  fmat4x4;
+       typedef lowp_f32quat                    fquat;
+
+       typedef lowp_f32vec1                    f32vec1;
+       typedef lowp_f32vec2                    f32vec2;
+       typedef lowp_f32vec3                    f32vec3;
+       typedef lowp_f32vec4                    f32vec4;
+       typedef lowp_f32mat2                    f32mat2;
+       typedef lowp_f32mat3                    f32mat3;
+       typedef lowp_f32mat4                    f32mat4;
+       typedef lowp_f32mat2x2                  f32mat2x2;
+       typedef lowp_f32mat3x2                  f32mat3x2;
+       typedef lowp_f32mat4x2                  f32mat4x2;
+       typedef lowp_f32mat2x3                  f32mat2x3;
+       typedef lowp_f32mat3x3                  f32mat3x3;
+       typedef lowp_f32mat4x3                  f32mat4x3;
+       typedef lowp_f32mat2x4                  f32mat2x4;
+       typedef lowp_f32mat3x4                  f32mat3x4;
+       typedef lowp_f32mat4x4                  f32mat4x4;
+       typedef lowp_f32quat                    f32quat;
+#elif(defined(GLM_PRECISION_MEDIUMP_FLOAT))
+       typedef mediump_f32vec1                 fvec1;
+       typedef mediump_f32vec2                 fvec2;
+       typedef mediump_f32vec3                 fvec3;
+       typedef mediump_f32vec4                 fvec4;
+       typedef mediump_f32mat2                 fmat2;
+       typedef mediump_f32mat3                 fmat3;
+       typedef mediump_f32mat4                 fmat4;
+       typedef mediump_f32mat2x2               fmat2x2;
+       typedef mediump_f32mat3x2               fmat3x2;
+       typedef mediump_f32mat4x2               fmat4x2;
+       typedef mediump_f32mat2x3               fmat2x3;
+       typedef mediump_f32mat3x3               fmat3x3;
+       typedef mediump_f32mat4x3               fmat4x3;
+       typedef mediump_f32mat2x4               fmat2x4;
+       typedef mediump_f32mat3x4               fmat3x4;
+       typedef mediump_f32mat4x4               fmat4x4;
+       typedef mediump_f32quat                 fquat;
+
+       typedef mediump_f32vec1                 f32vec1;
+       typedef mediump_f32vec2                 f32vec2;
+       typedef mediump_f32vec3                 f32vec3;
+       typedef mediump_f32vec4                 f32vec4;
+       typedef mediump_f32mat2                 f32mat2;
+       typedef mediump_f32mat3                 f32mat3;
+       typedef mediump_f32mat4                 f32mat4;
+       typedef mediump_f32mat2x2               f32mat2x2;
+       typedef mediump_f32mat3x2               f32mat3x2;
+       typedef mediump_f32mat4x2               f32mat4x2;
+       typedef mediump_f32mat2x3               f32mat2x3;
+       typedef mediump_f32mat3x3               f32mat3x3;
+       typedef mediump_f32mat4x3               f32mat4x3;
+       typedef mediump_f32mat2x4               f32mat2x4;
+       typedef mediump_f32mat3x4               f32mat3x4;
+       typedef mediump_f32mat4x4               f32mat4x4;
+       typedef mediump_f32quat                 f32quat;
+#else//if(defined(GLM_PRECISION_HIGHP_FLOAT))
+       /// Default single-precision floating-point vector of 1 components.
+       /// @see gtc_type_precision
+       typedef highp_f32vec1                   fvec1;
+
+       /// Default single-precision floating-point vector of 2 components.
+       /// @see gtc_type_precision
+       typedef highp_f32vec2                   fvec2;
+
+       /// Default single-precision floating-point vector of 3 components.
+       /// @see gtc_type_precision
+       typedef highp_f32vec3                   fvec3;
+
+       /// Default single-precision floating-point vector of 4 components.
+       /// @see gtc_type_precision
+       typedef highp_f32vec4                   fvec4;
+
+       /// Default single-precision floating-point 2x2 matrix.
+       /// @see gtc_type_precision
+       typedef highp_f32mat2x2                 fmat2x2;
+
+       /// Default single-precision floating-point 2x3 matrix.
+       /// @see gtc_type_precision
+       typedef highp_f32mat2x3                 fmat2x3;
+
+       /// Default single-precision floating-point 2x4 matrix.
+       /// @see gtc_type_precision
+       typedef highp_f32mat2x4                 fmat2x4;
+
+       /// Default single-precision floating-point 3x2 matrix.
+       /// @see gtc_type_precision
+       typedef highp_f32mat3x2                 fmat3x2;
+
+       /// Default single-precision floating-point 3x3 matrix.
+       /// @see gtc_type_precision
+       typedef highp_f32mat3x3                 fmat3x3;
+
+       /// Default single-precision floating-point 3x4 matrix.
+       /// @see gtc_type_precision
+       typedef highp_f32mat3x4                 fmat3x4;
+
+       /// Default single-precision floating-point 4x2 matrix.
+       /// @see gtc_type_precision
+       typedef highp_f32mat4x2                 fmat4x2;
+
+       /// Default single-precision floating-point 4x3 matrix.
+       /// @see gtc_type_precision
+       typedef highp_f32mat4x3                 fmat4x3;
+
+       /// Default single-precision floating-point 4x4 matrix.
+       /// @see gtc_type_precision
+       typedef highp_f32mat4x4                 fmat4x4;
+       
+       /// Default single-precision floating-point 2x2 matrix.
+       /// @see gtc_type_precision
+       typedef fmat2x2                                 fmat2;
+
+       /// Default single-precision floating-point 3x3 matrix.
+       /// @see gtc_type_precision
+       typedef fmat3x3                                 fmat3;
+
+       /// Default single-precision floating-point 4x4 matrix.
+       /// @see gtc_type_precision
+       typedef fmat4x4                                 fmat4;
+
+       /// Default single-precision floating-point quaternion.
+       /// @see gtc_type_precision
+       typedef highp_fquat                             fquat;
+       
+
+
+       /// Default single-precision floating-point vector of 1 components.
+       /// @see gtc_type_precision
+       typedef highp_f32vec1                   f32vec1;
+
+       /// Default single-precision floating-point vector of 2 components.
+       /// @see gtc_type_precision
+       typedef highp_f32vec2                   f32vec2;
+
+       /// Default single-precision floating-point vector of 3 components.
+       /// @see gtc_type_precision
+       typedef highp_f32vec3                   f32vec3;
+
+       /// Default single-precision floating-point vector of 4 components.
+       /// @see gtc_type_precision
+       typedef highp_f32vec4                   f32vec4;
+
+       /// Default single-precision floating-point 2x2 matrix.
+       /// @see gtc_type_precision
+       typedef highp_f32mat2x2                 f32mat2x2;
+
+       /// Default single-precision floating-point 2x3 matrix.
+       /// @see gtc_type_precision
+       typedef highp_f32mat2x3                 f32mat2x3;
+
+       /// Default single-precision floating-point 2x4 matrix.
+       /// @see gtc_type_precision
+       typedef highp_f32mat2x4                 f32mat2x4;
+
+       /// Default single-precision floating-point 3x2 matrix.
+       /// @see gtc_type_precision
+       typedef highp_f32mat3x2                 f32mat3x2;
+
+       /// Default single-precision floating-point 3x3 matrix.
+       /// @see gtc_type_precision
+       typedef highp_f32mat3x3                 f32mat3x3;
+
+       /// Default single-precision floating-point 3x4 matrix.
+       /// @see gtc_type_precision
+       typedef highp_f32mat3x4                 f32mat3x4;
+
+       /// Default single-precision floating-point 4x2 matrix.
+       /// @see gtc_type_precision
+       typedef highp_f32mat4x2                 f32mat4x2;
+
+       /// Default single-precision floating-point 4x3 matrix.
+       /// @see gtc_type_precision
+       typedef highp_f32mat4x3                 f32mat4x3;
+
+       /// Default single-precision floating-point 4x4 matrix.
+       /// @see gtc_type_precision
+       typedef highp_f32mat4x4                 f32mat4x4;
+
+       /// Default single-precision floating-point 2x2 matrix.
+       /// @see gtc_type_precision
+       typedef f32mat2x2                               f32mat2;
+
+       /// Default single-precision floating-point 3x3 matrix.
+       /// @see gtc_type_precision
+       typedef f32mat3x3                               f32mat3;
+
+       /// Default single-precision floating-point 4x4 matrix.
+       /// @see gtc_type_precision
+       typedef f32mat4x4                               f32mat4;
+
+       /// Default single-precision floating-point quaternion.
+       /// @see gtc_type_precision
+       typedef highp_f32quat                   f32quat;
+#endif
+
+#if(defined(GLM_PRECISION_LOWP_DOUBLE))
+       typedef lowp_f64vec1                    f64vec1;
+       typedef lowp_f64vec2                    f64vec2;
+       typedef lowp_f64vec3                    f64vec3;
+       typedef lowp_f64vec4                    f64vec4;
+       typedef lowp_f64mat2                    f64mat2;
+       typedef lowp_f64mat3                    f64mat3;
+       typedef lowp_f64mat4                    f64mat4;
+       typedef lowp_f64mat2x2                  f64mat2x2;
+       typedef lowp_f64mat3x2                  f64mat3x2;
+       typedef lowp_f64mat4x2                  f64mat4x2;
+       typedef lowp_f64mat2x3                  f64mat2x3;
+       typedef lowp_f64mat3x3                  f64mat3x3;
+       typedef lowp_f64mat4x3                  f64mat4x3;
+       typedef lowp_f64mat2x4                  f64mat2x4;
+       typedef lowp_f64mat3x4                  f64mat3x4;
+       typedef lowp_f64mat4x4                  f64mat4x4;
+       typedef lowp_f64quat                    f64quat;
+#elif(defined(GLM_PRECISION_MEDIUMP_DOUBLE))
+       typedef mediump_f64vec1                 f64vec1;
+       typedef mediump_f64vec2                 f64vec2;
+       typedef mediump_f64vec3                 f64vec3;
+       typedef mediump_f64vec4                 f64vec4;
+       typedef mediump_f64mat2                 f64mat2;
+       typedef mediump_f64mat3                 f64mat3;
+       typedef mediump_f64mat4                 f64mat4;
+       typedef mediump_f64mat2x2               f64mat2x2;
+       typedef mediump_f64mat3x2               f64mat3x2;
+       typedef mediump_f64mat4x2               f64mat4x2;
+       typedef mediump_f64mat2x3               f64mat2x3;
+       typedef mediump_f64mat3x3               f64mat3x3;
+       typedef mediump_f64mat4x3               f64mat4x3;
+       typedef mediump_f64mat2x4               f64mat2x4;
+       typedef mediump_f64mat3x4               f64mat3x4;
+       typedef mediump_f64mat4x4               f64mat4x4;
+       typedef mediump_f64quat                 f64quat;
+#else
+       /// Default double-precision floating-point vector of 1 components.
+       /// @see gtc_type_precision
+       typedef highp_f64vec1                   f64vec1;
+
+       /// Default double-precision floating-point vector of 2 components.
+       /// @see gtc_type_precision
+       typedef highp_f64vec2                   f64vec2;
+
+       /// Default double-precision floating-point vector of 3 components.
+       /// @see gtc_type_precision
+       typedef highp_f64vec3                   f64vec3;
+
+       /// Default double-precision floating-point vector of 4 components.
+       /// @see gtc_type_precision
+       typedef highp_f64vec4                   f64vec4;
+
+       /// Default double-precision floating-point 2x2 matrix.
+       /// @see gtc_type_precision
+       typedef highp_f64mat2x2                 f64mat2x2;
+
+       /// Default double-precision floating-point 2x3 matrix.
+       /// @see gtc_type_precision
+       typedef highp_f64mat2x3                 f64mat2x3;
+
+       /// Default double-precision floating-point 2x4 matrix.
+       /// @see gtc_type_precision
+       typedef highp_f64mat2x4                 f64mat2x4;
+
+       /// Default double-precision floating-point 3x2 matrix.
+       /// @see gtc_type_precision
+       typedef highp_f64mat3x2                 f64mat3x2;
+
+       /// Default double-precision floating-point 3x3 matrix.
+       /// @see gtc_type_precision
+       typedef highp_f64mat3x3                 f64mat3x3;
+
+       /// Default double-precision floating-point 3x4 matrix.
+       /// @see gtc_type_precision
+       typedef highp_f64mat3x4                 f64mat3x4;
+
+       /// Default double-precision floating-point 4x2 matrix.
+       /// @see gtc_type_precision
+       typedef highp_f64mat4x2                 f64mat4x2;
+
+       /// Default double-precision floating-point 4x3 matrix.
+       /// @see gtc_type_precision
+       typedef highp_f64mat4x3                 f64mat4x3;
+
+       /// Default double-precision floating-point 4x4 matrix.
+       /// @see gtc_type_precision
+       typedef highp_f64mat4x4                 f64mat4x4;
+
+       /// Default double-precision floating-point 2x2 matrix.
+       /// @see gtc_type_precision
+       typedef f64mat2x2                               f64mat2;
+
+       /// Default double-precision floating-point 3x3 matrix.
+       /// @see gtc_type_precision
+       typedef f64mat3x3                               f64mat3;
+
+       /// Default double-precision floating-point 4x4 matrix.
+       /// @see gtc_type_precision
+       typedef f64mat4x4                               f64mat4;
+
+       /// Default double-precision floating-point quaternion.
+       /// @see gtc_type_precision
+       typedef highp_f64quat                   f64quat;
+#endif
+}//namespace glm
diff --git a/include/glm/geometric.hpp b/include/glm/geometric.hpp
new file mode 100644 (file)
index 0000000..12d9f39
--- /dev/null
@@ -0,0 +1,35 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref core
+/// @file glm/geometric.hpp
+/// @date 2013-12-24 / 2013-12-24
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////
+
+#pragma once
+
+#include "detail/func_geometric.hpp"
diff --git a/include/glm/glm.hpp b/include/glm/glm.hpp
new file mode 100644 (file)
index 0000000..98be446
--- /dev/null
@@ -0,0 +1,117 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref core
+/// @file glm/glm.hpp
+/// @date 2005-01-14 / 2011-10-24
+/// @author Christophe Riccio
+///
+/// @defgroup core GLM Core
+///
+/// @brief The core of GLM, which implements exactly and only the GLSL specification to the degree possible.
+///
+/// The GLM core consists of @ref core_types "C++ types that mirror GLSL types" and
+/// C++ functions that mirror the GLSL functions. It also includes 
+/// @ref core_precision "a set of precision-based types" that can be used in the appropriate
+/// functions. The C++ types are all based on a basic set of @ref core_template "template types".
+/// 
+/// The best documentation for GLM Core is the current GLSL specification,
+/// <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.clean.pdf">version 4.2
+/// (pdf file)</a>.
+/// 
+/// GLM core functionnalities require <glm/glm.hpp> to be included to be used.
+/// 
+/// @defgroup core_types Types
+/// 
+/// @brief The standard types defined by the specification.
+/// 
+/// These types are all typedefs of more generalized, template types. To see the definiton
+/// of these template types, go to @ref core_template.
+/// 
+/// @ingroup core
+/// 
+/// @defgroup core_precision Precision types
+/// 
+/// @brief Non-GLSL types that are used to define precision-based types.
+/// 
+/// The GLSL language allows the user to define the precision of a particular variable.
+/// In OpenGL's GLSL, these precision qualifiers have no effect; they are there for compatibility
+/// with OpenGL ES's precision qualifiers, where they @em do have an effect.
+/// 
+/// C++ has no language equivalent to precision qualifiers. So GLM provides the next-best thing:
+/// a number of typedefs of the @ref core_template that use a particular precision.
+/// 
+/// None of these types make any guarantees about the actual precision used.
+/// 
+/// @ingroup core
+/// 
+/// @defgroup core_template Template types
+/// 
+/// @brief The generic template types used as the basis for the core types. 
+/// 
+/// These types are all templates used to define the actual @ref core_types.
+/// These templetes are implementation details of GLM types and should not be used explicitly.
+/// 
+/// @ingroup core
+///////////////////////////////////////////////////////////////////////////////////
+
+#include "detail/_fixes.hpp"
+
+#pragma once
+
+#include <cmath>
+#include <climits>
+#include <cfloat>
+#include <limits>
+#include <cassert>
+#include "fwd.hpp"
+
+#if(defined(GLM_MESSAGES) && !defined(GLM_MESSAGE_CORE_INCLUDED_DISPLAYED))
+#      define GLM_MESSAGE_CORE_INCLUDED_DISPLAYED
+#      pragma message("GLM: Core library included")
+#endif//GLM_MESSAGE
+
+#include "vec2.hpp"
+#include "vec3.hpp"
+#include "vec4.hpp"
+#include "mat2x2.hpp"
+#include "mat2x3.hpp"
+#include "mat2x4.hpp"
+#include "mat3x2.hpp"
+#include "mat3x3.hpp"
+#include "mat3x4.hpp"
+#include "mat4x2.hpp"
+#include "mat4x3.hpp"
+#include "mat4x4.hpp"
+
+#include "trigonometric.hpp"
+#include "exponential.hpp"
+#include "common.hpp"
+#include "packing.hpp"
+#include "geometric.hpp"
+#include "matrix.hpp"
+#include "vector_relational.hpp"
+#include "integer.hpp"
diff --git a/include/glm/gtc/bitfield.hpp b/include/glm/gtc/bitfield.hpp
new file mode 100644 (file)
index 0000000..c875d03
--- /dev/null
@@ -0,0 +1,236 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtc_bitfield
+/// @file glm/gtc/bitfield.hpp
+/// @date 2014-10-25 / 2014-10-25
+/// @author Christophe Riccio
+///
+/// @see core (dependence)
+/// @see gtc_bitfield (dependence)
+///
+/// @defgroup gtc_bitfield GLM_GTC_bitfield
+/// @ingroup gtc
+/// 
+/// @brief Allow to perform bit operations on integer values
+/// 
+/// <glm/gtc/bitfield.hpp> need to be included to use these functionalities.
+///////////////////////////////////////////////////////////////////////////////////
+
+#pragma once
+
+// Dependencies
+#include "../detail/setup.hpp"
+#include "../detail/precision.hpp"
+#include "../detail/type_int.hpp"
+#include "../detail/_vectorize.hpp"
+#include <limits>
+
+#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
+#      pragma message("GLM: GLM_GTC_bitfield extension included")
+#endif
+
+namespace glm
+{
+       /// @addtogroup gtc_bitfield
+       /// @{
+
+       /// Build a mask of 'count' bits
+       ///
+       /// @see gtc_bitfield
+       template <typename genIUType>
+       GLM_FUNC_DECL genIUType mask(genIUType Bits);
+       
+       /// Build a mask of 'count' bits
+       ///
+       /// @see gtc_bitfield
+       template <typename T, precision P, template <typename, precision> class vecIUType>
+       GLM_FUNC_DECL vecIUType<T, P> mask(vecIUType<T, P> const & v);
+
+       /// Rotate all bits to the right. All the bits dropped in the right side are inserted back on the left side.
+       ///
+       /// @see gtc_bitfield
+       template <typename genIUType>
+       GLM_FUNC_DECL genIUType bitfieldRotateRight(genIUType In, int Shift);
+
+       /// Rotate all bits to the right. All the bits dropped in the right side are inserted back on the left side.
+       ///
+       /// @see gtc_bitfield
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_DECL vecType<T, P> bitfieldRotateRight(vecType<T, P> const & In, int Shift);
+
+       /// Rotate all bits to the left. All the bits dropped in the left side are inserted back on the right side.
+       ///
+       /// @see gtc_bitfield
+       template <typename genIUType>
+       GLM_FUNC_DECL genIUType bitfieldRotateLeft(genIUType In, int Shift);
+
+       /// Rotate all bits to the left. All the bits dropped in the left side are inserted back on the right side.
+       ///
+       /// @see gtc_bitfield
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_DECL vecType<T, P> bitfieldRotateLeft(vecType<T, P> const & In, int Shift);
+
+       /// Set to 1 a range of bits.
+       ///
+       /// @see gtc_bitfield
+       template <typename genIUType>
+       GLM_FUNC_DECL genIUType bitfieldFillOne(genIUType Value, int FirstBit, int BitCount);
+
+       /// Set to 1 a range of bits.
+       ///
+       /// @see gtc_bitfield
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_DECL vecType<T, P> bitfieldFillOne(vecType<T, P> const & Value, int FirstBit, int BitCount);
+
+       /// Set to 0 a range of bits.
+       ///
+       /// @see gtc_bitfield
+       template <typename genIUType>
+       GLM_FUNC_DECL genIUType bitfieldFillZero(genIUType Value, int FirstBit, int BitCount);
+
+       /// Set to 0 a range of bits.
+       ///
+       /// @see gtc_bitfield
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_DECL vecType<T, P> bitfieldFillZero(vecType<T, P> const & Value, int FirstBit, int BitCount);
+
+       /// Interleaves the bits of x and y.
+       /// The first bit is the first bit of x followed by the first bit of y.
+       /// The other bits are interleaved following the previous sequence.
+       /// 
+       /// @see gtc_bitfield
+       GLM_FUNC_DECL int16 bitfieldInterleave(int8 x, int8 y);
+
+       /// Interleaves the bits of x and y.
+       /// The first bit is the first bit of x followed by the first bit of y.
+       /// The other bits are interleaved following the previous sequence.
+       /// 
+       /// @see gtc_bitfield
+       GLM_FUNC_DECL uint16 bitfieldInterleave(uint8 x, uint8 y);
+
+       /// Interleaves the bits of x and y.
+       /// The first bit is the first bit of x followed by the first bit of y.
+       /// The other bits are interleaved following the previous sequence.
+       /// 
+       /// @see gtc_bitfield
+       GLM_FUNC_DECL int32 bitfieldInterleave(int16 x, int16 y);
+
+       /// Interleaves the bits of x and y.
+       /// The first bit is the first bit of x followed by the first bit of y.
+       /// The other bits are interleaved following the previous sequence.
+       /// 
+       /// @see gtc_bitfield
+       GLM_FUNC_DECL uint32 bitfieldInterleave(uint16 x, uint16 y);
+
+       /// Interleaves the bits of x and y.
+       /// The first bit is the first bit of x followed by the first bit of y.
+       /// The other bits are interleaved following the previous sequence.
+       /// 
+       /// @see gtc_bitfield
+       GLM_FUNC_DECL int64 bitfieldInterleave(int32 x, int32 y);
+
+       /// Interleaves the bits of x and y.
+       /// The first bit is the first bit of x followed by the first bit of y.
+       /// The other bits are interleaved following the previous sequence.
+       /// 
+       /// @see gtc_bitfield
+       GLM_FUNC_DECL uint64 bitfieldInterleave(uint32 x, uint32 y);
+
+       /// Interleaves the bits of x, y and z.
+       /// The first bit is the first bit of x followed by the first bit of y and the first bit of z.
+       /// The other bits are interleaved following the previous sequence.
+       /// 
+       /// @see gtc_bitfield
+       GLM_FUNC_DECL int32 bitfieldInterleave(int8 x, int8 y, int8 z);
+
+       /// Interleaves the bits of x, y and z.
+       /// The first bit is the first bit of x followed by the first bit of y and the first bit of z.
+       /// The other bits are interleaved following the previous sequence.
+       /// 
+       /// @see gtc_bitfield
+       GLM_FUNC_DECL uint32 bitfieldInterleave(uint8 x, uint8 y, uint8 z);
+
+       /// Interleaves the bits of x, y and z.
+       /// The first bit is the first bit of x followed by the first bit of y and the first bit of z.
+       /// The other bits are interleaved following the previous sequence.
+       /// 
+       /// @see gtc_bitfield
+       GLM_FUNC_DECL int64 bitfieldInterleave(int16 x, int16 y, int16 z);
+
+       /// Interleaves the bits of x, y and z. 
+       /// The first bit is the first bit of x followed by the first bit of y and the first bit of z.
+       /// The other bits are interleaved following the previous sequence.
+       /// 
+       /// @see gtc_bitfield
+       GLM_FUNC_DECL uint64 bitfieldInterleave(uint16 x, uint16 y, uint16 z);
+
+       /// Interleaves the bits of x, y and z. 
+       /// The first bit is the first bit of x followed by the first bit of y and the first bit of z.
+       /// The other bits are interleaved following the previous sequence.
+       /// 
+       /// @see gtc_bitfield
+       GLM_FUNC_DECL int64 bitfieldInterleave(int32 x, int32 y, int32 z);
+
+       /// Interleaves the bits of x, y and z. 
+       /// The first bit is the first bit of x followed by the first bit of y and the first bit of z.
+       /// The other bits are interleaved following the previous sequence.
+       /// 
+       /// @see gtc_bitfield
+       GLM_FUNC_DECL uint64 bitfieldInterleave(uint32 x, uint32 y, uint32 z);
+
+       /// Interleaves the bits of x, y, z and w. 
+       /// The first bit is the first bit of x followed by the first bit of y, the first bit of z and finally the first bit of w.
+       /// The other bits are interleaved following the previous sequence.
+       /// 
+       /// @see gtc_bitfield
+       GLM_FUNC_DECL int32 bitfieldInterleave(int8 x, int8 y, int8 z, int8 w);
+
+       /// Interleaves the bits of x, y, z and w. 
+       /// The first bit is the first bit of x followed by the first bit of y, the first bit of z and finally the first bit of w.
+       /// The other bits are interleaved following the previous sequence.
+       /// 
+       /// @see gtc_bitfield
+       GLM_FUNC_DECL uint32 bitfieldInterleave(uint8 x, uint8 y, uint8 z, uint8 w);
+
+       /// Interleaves the bits of x, y, z and w. 
+       /// The first bit is the first bit of x followed by the first bit of y, the first bit of z and finally the first bit of w.
+       /// The other bits are interleaved following the previous sequence.
+       /// 
+       /// @see gtc_bitfield
+       GLM_FUNC_DECL int64 bitfieldInterleave(int16 x, int16 y, int16 z, int16 w);
+
+       /// Interleaves the bits of x, y, z and w. 
+       /// The first bit is the first bit of x followed by the first bit of y, the first bit of z and finally the first bit of w.
+       /// The other bits are interleaved following the previous sequence.
+       /// 
+       /// @see gtc_bitfield
+       GLM_FUNC_DECL uint64 bitfieldInterleave(uint16 x, uint16 y, uint16 z, uint16 w);
+
+       /// @}
+} //namespace glm
+
+#include "bitfield.inl"
diff --git a/include/glm/gtc/bitfield.inl b/include/glm/gtc/bitfield.inl
new file mode 100644 (file)
index 0000000..1170262
--- /dev/null
@@ -0,0 +1,542 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtc_bitfield
+/// @file glm/gtc/bitfield.inl
+/// @date 2011-10-14 / 2012-01-25
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////
+
+namespace glm{
+namespace detail
+{
+       template <typename PARAM, typename RET>
+       GLM_FUNC_DECL RET bitfieldInterleave(PARAM x, PARAM y);
+
+       template <typename PARAM, typename RET>
+       GLM_FUNC_DECL RET bitfieldInterleave(PARAM x, PARAM y, PARAM z);
+
+       template <typename PARAM, typename RET>
+       GLM_FUNC_DECL RET bitfieldInterleave(PARAM x, PARAM y, PARAM z, PARAM w);
+
+       template <>
+       GLM_FUNC_QUALIFIER glm::uint16 bitfieldInterleave(glm::uint8 x, glm::uint8 y)
+       {
+               glm::uint16 REG1(x);
+               glm::uint16 REG2(y);
+
+               REG1 = ((REG1 <<  4) | REG1) & glm::uint16(0x0F0F);
+               REG2 = ((REG2 <<  4) | REG2) & glm::uint16(0x0F0F);
+
+               REG1 = ((REG1 <<  2) | REG1) & glm::uint16(0x3333);
+               REG2 = ((REG2 <<  2) | REG2) & glm::uint16(0x3333);
+
+               REG1 = ((REG1 <<  1) | REG1) & glm::uint16(0x5555);
+               REG2 = ((REG2 <<  1) | REG2) & glm::uint16(0x5555);
+
+               return REG1 | (REG2 << 1);
+       }
+
+       template <>
+       GLM_FUNC_QUALIFIER glm::uint32 bitfieldInterleave(glm::uint16 x, glm::uint16 y)
+       {
+               glm::uint32 REG1(x);
+               glm::uint32 REG2(y);
+
+               REG1 = ((REG1 <<  8) | REG1) & glm::uint32(0x00FF00FF);
+               REG2 = ((REG2 <<  8) | REG2) & glm::uint32(0x00FF00FF);
+
+               REG1 = ((REG1 <<  4) | REG1) & glm::uint32(0x0F0F0F0F);
+               REG2 = ((REG2 <<  4) | REG2) & glm::uint32(0x0F0F0F0F);
+
+               REG1 = ((REG1 <<  2) | REG1) & glm::uint32(0x33333333);
+               REG2 = ((REG2 <<  2) | REG2) & glm::uint32(0x33333333);
+
+               REG1 = ((REG1 <<  1) | REG1) & glm::uint32(0x55555555);
+               REG2 = ((REG2 <<  1) | REG2) & glm::uint32(0x55555555);
+
+               return REG1 | (REG2 << 1);
+       }
+
+       template <>
+       GLM_FUNC_QUALIFIER glm::uint64 bitfieldInterleave(glm::uint32 x, glm::uint32 y)
+       {
+               glm::uint64 REG1(x);
+               glm::uint64 REG2(y);
+
+               REG1 = ((REG1 << 16) | REG1) & glm::uint64(0x0000FFFF0000FFFF);
+               REG2 = ((REG2 << 16) | REG2) & glm::uint64(0x0000FFFF0000FFFF);
+
+               REG1 = ((REG1 <<  8) | REG1) & glm::uint64(0x00FF00FF00FF00FF);
+               REG2 = ((REG2 <<  8) | REG2) & glm::uint64(0x00FF00FF00FF00FF);
+
+               REG1 = ((REG1 <<  4) | REG1) & glm::uint64(0x0F0F0F0F0F0F0F0F);
+               REG2 = ((REG2 <<  4) | REG2) & glm::uint64(0x0F0F0F0F0F0F0F0F);
+
+               REG1 = ((REG1 <<  2) | REG1) & glm::uint64(0x3333333333333333);
+               REG2 = ((REG2 <<  2) | REG2) & glm::uint64(0x3333333333333333);
+
+               REG1 = ((REG1 <<  1) | REG1) & glm::uint64(0x5555555555555555);
+               REG2 = ((REG2 <<  1) | REG2) & glm::uint64(0x5555555555555555);
+
+               return REG1 | (REG2 << 1);
+       }
+
+       template <>
+       GLM_FUNC_QUALIFIER glm::uint32 bitfieldInterleave(glm::uint8 x, glm::uint8 y, glm::uint8 z)
+       {
+               glm::uint32 REG1(x);
+               glm::uint32 REG2(y);
+               glm::uint32 REG3(z);
+
+               REG1 = ((REG1 << 16) | REG1) & glm::uint32(0x00FF0000FF0000FF);
+               REG2 = ((REG2 << 16) | REG2) & glm::uint32(0x00FF0000FF0000FF);
+               REG3 = ((REG3 << 16) | REG3) & glm::uint32(0x00FF0000FF0000FF);
+
+               REG1 = ((REG1 <<  8) | REG1) & glm::uint32(0xF00F00F00F00F00F);
+               REG2 = ((REG2 <<  8) | REG2) & glm::uint32(0xF00F00F00F00F00F);
+               REG3 = ((REG3 <<  8) | REG3) & glm::uint32(0xF00F00F00F00F00F);
+
+               REG1 = ((REG1 <<  4) | REG1) & glm::uint32(0x30C30C30C30C30C3);
+               REG2 = ((REG2 <<  4) | REG2) & glm::uint32(0x30C30C30C30C30C3);
+               REG3 = ((REG3 <<  4) | REG3) & glm::uint32(0x30C30C30C30C30C3);
+
+               REG1 = ((REG1 <<  2) | REG1) & glm::uint32(0x9249249249249249);
+               REG2 = ((REG2 <<  2) | REG2) & glm::uint32(0x9249249249249249);
+               REG3 = ((REG3 <<  2) | REG3) & glm::uint32(0x9249249249249249);
+
+               return REG1 | (REG2 << 1) | (REG3 << 2);
+       }
+               
+       template <>
+       GLM_FUNC_QUALIFIER glm::uint64 bitfieldInterleave(glm::uint16 x, glm::uint16 y, glm::uint16 z)
+       {
+               glm::uint64 REG1(x);
+               glm::uint64 REG2(y);
+               glm::uint64 REG3(z);
+
+               REG1 = ((REG1 << 32) | REG1) & glm::uint64(0xFFFF00000000FFFF);
+               REG2 = ((REG2 << 32) | REG2) & glm::uint64(0xFFFF00000000FFFF);
+               REG3 = ((REG3 << 32) | REG3) & glm::uint64(0xFFFF00000000FFFF);
+
+               REG1 = ((REG1 << 16) | REG1) & glm::uint64(0x00FF0000FF0000FF);
+               REG2 = ((REG2 << 16) | REG2) & glm::uint64(0x00FF0000FF0000FF);
+               REG3 = ((REG3 << 16) | REG3) & glm::uint64(0x00FF0000FF0000FF);
+
+               REG1 = ((REG1 <<  8) | REG1) & glm::uint64(0xF00F00F00F00F00F);
+               REG2 = ((REG2 <<  8) | REG2) & glm::uint64(0xF00F00F00F00F00F);
+               REG3 = ((REG3 <<  8) | REG3) & glm::uint64(0xF00F00F00F00F00F);
+
+               REG1 = ((REG1 <<  4) | REG1) & glm::uint64(0x30C30C30C30C30C3);
+               REG2 = ((REG2 <<  4) | REG2) & glm::uint64(0x30C30C30C30C30C3);
+               REG3 = ((REG3 <<  4) | REG3) & glm::uint64(0x30C30C30C30C30C3);
+
+               REG1 = ((REG1 <<  2) | REG1) & glm::uint64(0x9249249249249249);
+               REG2 = ((REG2 <<  2) | REG2) & glm::uint64(0x9249249249249249);
+               REG3 = ((REG3 <<  2) | REG3) & glm::uint64(0x9249249249249249);
+
+               return REG1 | (REG2 << 1) | (REG3 << 2);
+       }
+
+       template <>
+       GLM_FUNC_QUALIFIER glm::uint64 bitfieldInterleave(glm::uint32 x, glm::uint32 y, glm::uint32 z)
+       {
+               glm::uint64 REG1(x);
+               glm::uint64 REG2(y);
+               glm::uint64 REG3(z);
+
+               REG1 = ((REG1 << 32) | REG1) & glm::uint64(0xFFFF00000000FFFF);
+               REG2 = ((REG2 << 32) | REG2) & glm::uint64(0xFFFF00000000FFFF);
+               REG3 = ((REG3 << 32) | REG3) & glm::uint64(0xFFFF00000000FFFF);
+
+               REG1 = ((REG1 << 16) | REG1) & glm::uint64(0x00FF0000FF0000FF);
+               REG2 = ((REG2 << 16) | REG2) & glm::uint64(0x00FF0000FF0000FF);
+               REG3 = ((REG3 << 16) | REG3) & glm::uint64(0x00FF0000FF0000FF);
+
+               REG1 = ((REG1 <<  8) | REG1) & glm::uint64(0xF00F00F00F00F00F);
+               REG2 = ((REG2 <<  8) | REG2) & glm::uint64(0xF00F00F00F00F00F);
+               REG3 = ((REG3 <<  8) | REG3) & glm::uint64(0xF00F00F00F00F00F);
+
+               REG1 = ((REG1 <<  4) | REG1) & glm::uint64(0x30C30C30C30C30C3);
+               REG2 = ((REG2 <<  4) | REG2) & glm::uint64(0x30C30C30C30C30C3);
+               REG3 = ((REG3 <<  4) | REG3) & glm::uint64(0x30C30C30C30C30C3);
+
+               REG1 = ((REG1 <<  2) | REG1) & glm::uint64(0x9249249249249249);
+               REG2 = ((REG2 <<  2) | REG2) & glm::uint64(0x9249249249249249);
+               REG3 = ((REG3 <<  2) | REG3) & glm::uint64(0x9249249249249249);
+
+               return REG1 | (REG2 << 1) | (REG3 << 2);
+       }
+
+       template <>
+       GLM_FUNC_QUALIFIER glm::uint32 bitfieldInterleave(glm::uint8 x, glm::uint8 y, glm::uint8 z, glm::uint8 w)
+       {
+               glm::uint32 REG1(x);
+               glm::uint32 REG2(y);
+               glm::uint32 REG3(z);
+               glm::uint32 REG4(w);
+
+               REG1 = ((REG1 << 12) | REG1) & glm::uint32(0x000F000F000F000F);
+               REG2 = ((REG2 << 12) | REG2) & glm::uint32(0x000F000F000F000F);
+               REG3 = ((REG3 << 12) | REG3) & glm::uint32(0x000F000F000F000F);
+               REG4 = ((REG4 << 12) | REG4) & glm::uint32(0x000F000F000F000F);
+
+               REG1 = ((REG1 <<  6) | REG1) & glm::uint32(0x0303030303030303);
+               REG2 = ((REG2 <<  6) | REG2) & glm::uint32(0x0303030303030303);
+               REG3 = ((REG3 <<  6) | REG3) & glm::uint32(0x0303030303030303);
+               REG4 = ((REG4 <<  6) | REG4) & glm::uint32(0x0303030303030303);
+
+               REG1 = ((REG1 <<  3) | REG1) & glm::uint32(0x1111111111111111);
+               REG2 = ((REG2 <<  3) | REG2) & glm::uint32(0x1111111111111111);
+               REG3 = ((REG3 <<  3) | REG3) & glm::uint32(0x1111111111111111);
+               REG4 = ((REG4 <<  3) | REG4) & glm::uint32(0x1111111111111111);
+
+               return REG1 | (REG2 << 1) | (REG3 << 2) | (REG4 << 3);
+       }
+
+       template <>
+       GLM_FUNC_QUALIFIER glm::uint64 bitfieldInterleave(glm::uint16 x, glm::uint16 y, glm::uint16 z, glm::uint16 w)
+       {
+               glm::uint64 REG1(x);
+               glm::uint64 REG2(y);
+               glm::uint64 REG3(z);
+               glm::uint64 REG4(w);
+
+               REG1 = ((REG1 << 24) | REG1) & glm::uint64(0x000000FF000000FF);
+               REG2 = ((REG2 << 24) | REG2) & glm::uint64(0x000000FF000000FF);
+               REG3 = ((REG3 << 24) | REG3) & glm::uint64(0x000000FF000000FF);
+               REG4 = ((REG4 << 24) | REG4) & glm::uint64(0x000000FF000000FF);
+
+               REG1 = ((REG1 << 12) | REG1) & glm::uint64(0x000F000F000F000F);
+               REG2 = ((REG2 << 12) | REG2) & glm::uint64(0x000F000F000F000F);
+               REG3 = ((REG3 << 12) | REG3) & glm::uint64(0x000F000F000F000F);
+               REG4 = ((REG4 << 12) | REG4) & glm::uint64(0x000F000F000F000F);
+
+               REG1 = ((REG1 <<  6) | REG1) & glm::uint64(0x0303030303030303);
+               REG2 = ((REG2 <<  6) | REG2) & glm::uint64(0x0303030303030303);
+               REG3 = ((REG3 <<  6) | REG3) & glm::uint64(0x0303030303030303);
+               REG4 = ((REG4 <<  6) | REG4) & glm::uint64(0x0303030303030303);
+
+               REG1 = ((REG1 <<  3) | REG1) & glm::uint64(0x1111111111111111);
+               REG2 = ((REG2 <<  3) | REG2) & glm::uint64(0x1111111111111111);
+               REG3 = ((REG3 <<  3) | REG3) & glm::uint64(0x1111111111111111);
+               REG4 = ((REG4 <<  3) | REG4) & glm::uint64(0x1111111111111111);
+
+               return REG1 | (REG2 << 1) | (REG3 << 2) | (REG4 << 3);
+       }
+}//namespace detail
+
+       template <typename genIUType>
+       GLM_FUNC_QUALIFIER genIUType mask(genIUType Bits)
+       {
+               GLM_STATIC_ASSERT(std::numeric_limits<genIUType>::is_integer, "'mask' accepts only integer values");
+
+               return Bits >= sizeof(genIUType) * 8 ? ~static_cast<genIUType>(0) : (static_cast<genIUType>(1) << Bits) - static_cast<genIUType>(1);
+       }
+
+       template <typename T, precision P, template <typename, precision> class vecIUType>
+       GLM_FUNC_QUALIFIER vecIUType<T, P> mask(vecIUType<T, P> const & v)
+       {
+               GLM_STATIC_ASSERT(std::numeric_limits<T>::is_integer, "'mask' accepts only integer values");
+
+               return detail::functor1<T, T, P, vecIUType>::call(mask, v);
+       }
+
+       template <typename genIType>
+       GLM_FUNC_QUALIFIER genIType bitfieldRotateRight(genIType In, int Shift)
+       {
+               GLM_STATIC_ASSERT(std::numeric_limits<genIType>::is_integer, "'bitfieldRotateRight' accepts only integer values");
+
+               int const BitSize = static_cast<genIType>(sizeof(genIType) * 8);
+               return (In << static_cast<genIType>(Shift)) | (In >> static_cast<genIType>(BitSize - Shift));
+       }
+
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_QUALIFIER vecType<T, P> bitfieldRotateRight(vecType<T, P> const & In, int Shift)
+       {
+               GLM_STATIC_ASSERT(std::numeric_limits<T>::is_integer, "'bitfieldRotateRight' accepts only integer values");
+
+               int const BitSize = static_cast<int>(sizeof(T) * 8);
+               return (In << static_cast<T>(Shift)) | (In >> static_cast<T>(BitSize - Shift));
+       }
+
+       template <typename genIType>
+       GLM_FUNC_QUALIFIER genIType bitfieldRotateLeft(genIType In, int Shift)
+       {
+               GLM_STATIC_ASSERT(std::numeric_limits<genIType>::is_integer, "'bitfieldRotateLeft' accepts only integer values");
+
+               int const BitSize = static_cast<genIType>(sizeof(genIType) * 8);
+               return (In >> static_cast<genIType>(Shift)) | (In << static_cast<genIType>(BitSize - Shift));
+       }
+
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_QUALIFIER vecType<T, P> bitfieldRotateLeft(vecType<T, P> const & In, int Shift)
+       {
+               GLM_STATIC_ASSERT(std::numeric_limits<T>::is_integer, "'bitfieldRotateLeft' accepts only integer values");
+
+               int const BitSize = static_cast<int>(sizeof(T) * 8);
+               return (In >> static_cast<T>(Shift)) | (In << static_cast<T>(BitSize - Shift));
+       }
+
+       template <typename genIUType>
+       GLM_FUNC_QUALIFIER genIUType bitfieldFillOne(genIUType Value, int FirstBit, int BitCount)
+       {
+               return Value | static_cast<genIUType>(mask(BitCount) << FirstBit);
+       }
+
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_QUALIFIER vecType<T, P> bitfieldFillOne(vecType<T, P> const & Value, int FirstBit, int BitCount)
+       {
+               return Value | static_cast<T>(mask(BitCount) << FirstBit);
+       }
+
+       template <typename genIUType>
+       GLM_FUNC_QUALIFIER genIUType bitfieldFillZero(genIUType Value, int FirstBit, int BitCount)
+       {
+               return Value & static_cast<genIUType>(~(mask(BitCount) << FirstBit));
+       }
+
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_QUALIFIER vecType<T, P> bitfieldFillZero(vecType<T, P> const & Value, int FirstBit, int BitCount)
+       {
+               return Value & static_cast<T>(~(mask(BitCount) << FirstBit));
+       }
+
+       GLM_FUNC_QUALIFIER int16 bitfieldInterleave(int8 x, int8 y)
+       {
+               union sign8
+               {
+                       int8 i;
+                       uint8 u;
+               } sign_x, sign_y;
+
+               union sign16
+               {
+                       int16 i;
+                       uint16 u;
+               } result;
+
+               sign_x.i = x;
+               sign_y.i = y;
+               result.u = bitfieldInterleave(sign_x.u, sign_y.u);
+
+               return result.i;
+       }
+
+       GLM_FUNC_QUALIFIER uint16 bitfieldInterleave(uint8 x, uint8 y)
+       {
+               return detail::bitfieldInterleave<uint8, uint16>(x, y);
+       }
+
+       GLM_FUNC_QUALIFIER int32 bitfieldInterleave(int16 x, int16 y)
+       {
+               union sign16
+               {
+                       int16 i;
+                       uint16 u;
+               } sign_x, sign_y;
+
+               union sign32
+               {
+                       int32 i;
+                       uint32 u;
+               } result;
+
+               sign_x.i = x;
+               sign_y.i = y;
+               result.u = bitfieldInterleave(sign_x.u, sign_y.u);
+
+               return result.i;
+       }
+
+       GLM_FUNC_QUALIFIER uint32 bitfieldInterleave(uint16 x, uint16 y)
+       {
+               return detail::bitfieldInterleave<uint16, uint32>(x, y);
+       }
+
+       GLM_FUNC_QUALIFIER int64 bitfieldInterleave(int32 x, int32 y)
+       {
+               union sign32
+               {
+                       int32 i;
+                       uint32 u;
+               } sign_x, sign_y;
+
+               union sign64
+               {
+                       int64 i;
+                       uint64 u;
+               } result;
+
+               sign_x.i = x;
+               sign_y.i = y;
+               result.u = bitfieldInterleave(sign_x.u, sign_y.u);
+
+               return result.i;
+       }
+
+       GLM_FUNC_QUALIFIER uint64 bitfieldInterleave(uint32 x, uint32 y)
+       {
+               return detail::bitfieldInterleave<uint32, uint64>(x, y);
+       }
+
+       GLM_FUNC_QUALIFIER int32 bitfieldInterleave(int8 x, int8 y, int8 z)
+       {
+               union sign8
+               {
+                       int8 i;
+                       uint8 u;
+               } sign_x, sign_y, sign_z;
+
+               union sign32
+               {
+                       int32 i;
+                       uint32 u;
+               } result;
+
+               sign_x.i = x;
+               sign_y.i = y;
+               sign_z.i = z;
+               result.u = bitfieldInterleave(sign_x.u, sign_y.u, sign_z.u);
+
+               return result.i;
+       }
+
+       GLM_FUNC_QUALIFIER uint32 bitfieldInterleave(uint8 x, uint8 y, uint8 z)
+       {
+               return detail::bitfieldInterleave<uint8, uint32>(x, y, z);
+       }
+
+       GLM_FUNC_QUALIFIER int64 bitfieldInterleave(int16 x, int16 y, int16 z)
+       {
+               union sign16
+               {
+                       int16 i;
+                       uint16 u;
+               } sign_x, sign_y, sign_z;
+
+               union sign64
+               {
+                       int64 i;
+                       uint64 u;
+               } result;
+
+               sign_x.i = x;
+               sign_y.i = y;
+               sign_z.i = z;
+               result.u = bitfieldInterleave(sign_x.u, sign_y.u, sign_z.u);
+
+               return result.i;
+       }
+
+       GLM_FUNC_QUALIFIER uint64 bitfieldInterleave(uint16 x, uint16 y, uint16 z)
+       {
+               return detail::bitfieldInterleave<uint32, uint64>(x, y, z);
+       }
+
+       GLM_FUNC_QUALIFIER int64 bitfieldInterleave(int32 x, int32 y, int32 z)
+       {
+               union sign16
+               {
+                       int32 i;
+                       uint32 u;
+               } sign_x, sign_y, sign_z;
+
+               union sign64
+               {
+                       int64 i;
+                       uint64 u;
+               } result;
+
+               sign_x.i = x;
+               sign_y.i = y;
+               sign_z.i = z;
+               result.u = bitfieldInterleave(sign_x.u, sign_y.u, sign_z.u);
+
+               return result.i;
+       }
+
+       GLM_FUNC_QUALIFIER uint64 bitfieldInterleave(uint32 x, uint32 y, uint32 z)
+       {
+               return detail::bitfieldInterleave<uint32, uint64>(x, y, z);
+       }
+
+       GLM_FUNC_QUALIFIER int32 bitfieldInterleave(int8 x, int8 y, int8 z, int8 w)
+       {
+               union sign8
+               {
+                       int8 i;
+                       uint8 u;
+               } sign_x, sign_y, sign_z, sign_w;
+
+               union sign32
+               {
+                       int32 i;
+                       uint32 u;
+               } result;
+
+               sign_x.i = x;
+               sign_y.i = y;
+               sign_z.i = z;
+               sign_w.i = w;
+               result.u = bitfieldInterleave(sign_x.u, sign_y.u, sign_z.u, sign_w.u);
+
+               return result.i;
+       }
+
+       GLM_FUNC_QUALIFIER uint32 bitfieldInterleave(uint8 x, uint8 y, uint8 z, uint8 w)
+       {
+               return detail::bitfieldInterleave<uint8, uint32>(x, y, z, w);
+       }
+
+       GLM_FUNC_QUALIFIER int64 bitfieldInterleave(int16 x, int16 y, int16 z, int16 w)
+       {
+               union sign16
+               {
+                       int16 i;
+                       uint16 u;
+               } sign_x, sign_y, sign_z, sign_w;
+
+               union sign64
+               {
+                       int64 i;
+                       uint64 u;
+               } result;
+
+               sign_x.i = x;
+               sign_y.i = y;
+               sign_z.i = z;
+               sign_w.i = w;
+               result.u = bitfieldInterleave(sign_x.u, sign_y.u, sign_z.u, sign_w.u);
+
+               return result.i;
+       }
+
+       GLM_FUNC_QUALIFIER uint64 bitfieldInterleave(uint16 x, uint16 y, uint16 z, uint16 w)
+       {
+               return detail::bitfieldInterleave<uint16, uint64>(x, y, z, w);
+       }
+}//namespace glm
diff --git a/include/glm/gtc/constants.hpp b/include/glm/gtc/constants.hpp
new file mode 100644 (file)
index 0000000..ae1fb62
--- /dev/null
@@ -0,0 +1,205 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtc_constants
+/// @file glm/gtc/constants.hpp
+/// @date 2011-09-30 / 2012-01-25
+/// @author Christophe Riccio
+///
+/// @see core (dependence)
+/// @see gtc_half_float (dependence)
+///
+/// @defgroup gtc_constants GLM_GTC_constants
+/// @ingroup gtc
+/// 
+/// @brief Provide a list of constants and precomputed useful values.
+/// 
+/// <glm/gtc/constants.hpp> need to be included to use these features.
+///////////////////////////////////////////////////////////////////////////////////
+
+#pragma once
+
+// Dependencies
+#include "../detail/setup.hpp"
+
+#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
+#      pragma message("GLM: GLM_GTC_constants extension included")
+#endif
+
+namespace glm
+{
+       /// @addtogroup gtc_constants
+       /// @{
+
+       /// Return the epsilon constant for floating point types.
+       /// @see gtc_constants
+       template <typename genType>
+       GLM_FUNC_DECL genType epsilon();
+
+       /// Return 0.
+       /// @see gtc_constants
+       template <typename genType>
+       GLM_FUNC_DECL genType zero();
+
+       /// Return 1.
+       /// @see gtc_constants
+       template <typename genType>
+       GLM_FUNC_DECL genType one();
+
+       /// Return the pi constant.
+       /// @see gtc_constants
+       template <typename genType>
+       GLM_FUNC_DECL genType pi();
+
+       /// Return pi * 2.
+       /// @see gtc_constants
+       template <typename genType>
+       GLM_FUNC_DECL genType two_pi();
+
+       /// Return square root of pi.
+       /// @see gtc_constants
+       template <typename genType>
+       GLM_FUNC_DECL genType root_pi();
+
+       /// Return pi / 2.
+       /// @see gtc_constants
+       template <typename genType>
+       GLM_FUNC_DECL genType half_pi();
+
+       /// Return pi / 2 * 3.
+       /// @see gtc_constants
+       template <typename genType>
+       GLM_FUNC_DECL genType three_over_two_pi();
+
+       /// Return pi / 4.
+       /// @see gtc_constants
+       template <typename genType>
+       GLM_FUNC_DECL genType quarter_pi();
+
+       /// Return 1 / pi.
+       /// @see gtc_constants
+       template <typename genType>
+       GLM_FUNC_DECL genType one_over_pi();
+
+       /// Return 1 / (pi * 2).
+       /// @see gtc_constants
+       template <typename genType>
+       GLM_FUNC_DECL genType one_over_two_pi();
+
+       /// Return 2 / pi.
+       /// @see gtc_constants
+       template <typename genType>
+       GLM_FUNC_DECL genType two_over_pi();
+
+       /// Return 4 / pi.
+       /// @see gtc_constants
+       template <typename genType>
+       GLM_FUNC_DECL genType four_over_pi();
+
+       /// Return 2 / sqrt(pi).
+       /// @see gtc_constants
+       template <typename genType>
+       GLM_FUNC_DECL genType two_over_root_pi();
+
+       /// Return 1 / sqrt(2).
+       /// @see gtc_constants
+       template <typename genType>
+       GLM_FUNC_DECL genType one_over_root_two();
+
+       /// Return sqrt(pi / 2).
+       /// @see gtc_constants
+       template <typename genType>
+       GLM_FUNC_DECL genType root_half_pi();
+
+       /// Return sqrt(2 * pi).
+       /// @see gtc_constants
+       template <typename genType>
+       GLM_FUNC_DECL genType root_two_pi();
+
+       /// Return sqrt(ln(4)).
+       /// @see gtc_constants
+       template <typename genType>
+       GLM_FUNC_DECL genType root_ln_four();
+
+       /// Return e constant.
+       /// @see gtc_constants
+       template <typename genType>
+       GLM_FUNC_DECL genType e();
+
+       /// Return Euler's constant.
+       /// @see gtc_constants
+       template <typename genType>
+       GLM_FUNC_DECL genType euler();
+
+       /// Return sqrt(2).
+       /// @see gtc_constants
+       template <typename genType>
+       GLM_FUNC_DECL genType root_two();
+
+       /// Return sqrt(3).
+       /// @see gtc_constants
+       template <typename genType>
+       GLM_FUNC_DECL genType root_three();
+
+       /// Return sqrt(5).
+       /// @see gtc_constants
+       template <typename genType>
+       GLM_FUNC_DECL genType root_five();
+
+       /// Return ln(2).
+       /// @see gtc_constants
+       template <typename genType>
+       GLM_FUNC_DECL genType ln_two();
+
+       /// Return ln(10).
+       /// @see gtc_constants
+       template <typename genType>
+       GLM_FUNC_DECL genType ln_ten();
+
+       /// Return ln(ln(2)).
+       /// @see gtc_constants
+       template <typename genType>
+       GLM_FUNC_DECL genType ln_ln_two();
+
+       /// Return 1 / 3.
+       /// @see gtc_constants
+       template <typename genType>
+       GLM_FUNC_DECL genType third();
+
+       /// Return 2 / 3.
+       /// @see gtc_constants
+       template <typename genType>
+       GLM_FUNC_DECL genType two_thirds();
+
+       /// Return the golden ratio constant.
+       /// @see gtc_constants
+       template <typename genType>
+       GLM_FUNC_DECL genType golden_ratio();
+
+       /// @}
+} //namespace glm
+
+#include "constants.inl"
diff --git a/include/glm/gtc/constants.inl b/include/glm/gtc/constants.inl
new file mode 100644 (file)
index 0000000..a5de153
--- /dev/null
@@ -0,0 +1,210 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtc_constants
+/// @file glm/gtc/constants.inl
+/// @date 2011-10-14 / 2014-10-25
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////
+
+#include <limits>
+
+namespace glm
+{
+       template <typename genType>
+       GLM_FUNC_QUALIFIER genType epsilon()
+       {
+               return std::numeric_limits<genType>::epsilon();
+       }
+
+       template <typename genType>
+       GLM_FUNC_QUALIFIER genType zero()
+       {
+               return genType(0);
+       }
+
+       template <typename genType>
+       GLM_FUNC_QUALIFIER genType one()
+       {
+               return genType(1);
+       }
+
+       template <typename genType>
+       GLM_FUNC_QUALIFIER genType pi()
+       {
+               return genType(3.14159265358979323846264338327950288);
+       }
+
+       template <typename genType>
+       GLM_FUNC_QUALIFIER genType two_pi()
+       {
+               return genType(6.28318530717958647692528676655900576);
+       }
+
+       template <typename genType>
+       GLM_FUNC_QUALIFIER genType root_pi()
+       {
+               return genType(1.772453850905516027);
+       }
+
+       template <typename genType>
+       GLM_FUNC_QUALIFIER genType half_pi()
+       {
+               return genType(1.57079632679489661923132169163975144);
+       }
+
+       template <typename genType>
+       GLM_FUNC_QUALIFIER genType three_over_two_pi()
+       {
+               return genType(4.71238898038468985769396507491925432);           
+       }
+
+       template <typename genType>
+       GLM_FUNC_QUALIFIER genType quarter_pi()
+       {
+               return genType(0.785398163397448309615660845819875721);
+       }
+
+       template <typename genType>
+       GLM_FUNC_QUALIFIER genType one_over_pi()
+       {
+               return genType(0.318309886183790671537767526745028724);
+       }
+
+       template <typename genType>
+       GLM_FUNC_QUALIFIER genType one_over_two_pi()
+       {
+               return genType(0.159154943091895335768883763372514362);
+       }
+
+       template <typename genType>
+       GLM_FUNC_QUALIFIER genType two_over_pi()
+       {
+               return genType(0.636619772367581343075535053490057448);
+       }
+
+       template <typename genType>
+       GLM_FUNC_QUALIFIER genType four_over_pi()
+       {
+               return genType(1.273239544735162686151070106980114898);
+       }
+
+       template <typename genType>
+       GLM_FUNC_QUALIFIER genType two_over_root_pi()
+       {
+               return genType(1.12837916709551257389615890312154517);
+       }
+
+       template <typename genType>
+       GLM_FUNC_QUALIFIER genType one_over_root_two()
+       {
+               return genType(0.707106781186547524400844362104849039);
+       }
+
+       template <typename genType>
+       GLM_FUNC_QUALIFIER genType root_half_pi()
+       {
+               return genType(1.253314137315500251);
+       }
+
+       template <typename genType>
+       GLM_FUNC_QUALIFIER genType root_two_pi()
+       {
+               return genType(2.506628274631000502);
+       }
+
+       template <typename genType>
+       GLM_FUNC_QUALIFIER genType root_ln_four()
+       {
+               return genType(1.17741002251547469);
+       }
+
+       template <typename genType>
+       GLM_FUNC_QUALIFIER genType e()
+       {
+               return genType(2.71828182845904523536);
+       }
+
+       template <typename genType>
+       GLM_FUNC_QUALIFIER genType euler()
+       {
+               return genType(0.577215664901532860606);
+       }
+
+       template <typename genType>
+       GLM_FUNC_QUALIFIER genType root_two()
+       {
+               return genType(1.41421356237309504880168872420969808);
+       }
+
+       template <typename genType>
+       GLM_FUNC_QUALIFIER genType root_three()
+       {
+               return genType(1.73205080756887729352744634150587236);
+       }
+
+       template <typename genType>
+       GLM_FUNC_QUALIFIER genType root_five()
+       {
+               return genType(2.23606797749978969640917366873127623);
+       }
+
+       template <typename genType>
+       GLM_FUNC_QUALIFIER genType ln_two()
+       {
+               return genType(0.693147180559945309417232121458176568);
+       }
+
+       template <typename genType>
+       GLM_FUNC_QUALIFIER genType ln_ten()
+       {
+               return genType(2.30258509299404568401799145468436421);
+       }
+
+       template <typename genType>
+       GLM_FUNC_QUALIFIER genType ln_ln_two()
+       {
+               return genType(-0.3665129205816643);
+       }
+
+       template <typename genType>
+       GLM_FUNC_QUALIFIER genType third()
+       {
+               return genType(0.3333333333333333333333333333333333333333);
+       }
+
+       template <typename genType>
+       GLM_FUNC_QUALIFIER genType two_thirds()
+       {
+               return genType(0.666666666666666666666666666666666666667);
+       }
+
+       template <typename genType>
+       GLM_FUNC_QUALIFIER genType golden_ratio()
+       {
+               return genType(1.61803398874989484820458683436563811);
+       }
+} //namespace glm
diff --git a/include/glm/gtc/epsilon.hpp b/include/glm/gtc/epsilon.hpp
new file mode 100644 (file)
index 0000000..b69e1a0
--- /dev/null
@@ -0,0 +1,102 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtc_epsilon
+/// @file glm/gtc/epsilon.hpp
+/// @date 2012-04-07 / 2012-04-07
+/// @author Christophe Riccio
+/// 
+/// @see core (dependence)
+/// @see gtc_half_float (dependence)
+/// @see gtc_quaternion (dependence)
+///
+/// @defgroup gtc_epsilon GLM_GTC_epsilon
+/// @ingroup gtc
+/// 
+/// @brief Comparison functions for a user defined epsilon values.
+/// 
+/// <glm/gtc/epsilon.hpp> need to be included to use these functionalities.
+///////////////////////////////////////////////////////////////////////////////////
+
+#pragma once
+
+// Dependencies
+#include "../detail/setup.hpp"
+#include "../detail/precision.hpp"
+
+#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
+#      pragma message("GLM: GLM_GTC_epsilon extension included")
+#endif
+
+namespace glm
+{
+       /// @addtogroup gtc_epsilon
+       /// @{
+
+       /// Returns the component-wise comparison of |x - y| < epsilon.
+       /// True if this expression is satisfied.
+       ///
+       /// @see gtc_epsilon
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_DECL vecType<bool, P> epsilonEqual(
+               vecType<T, P> const & x,
+               vecType<T, P> const & y,
+               T const & epsilon);
+
+       /// Returns the component-wise comparison of |x - y| < epsilon.
+       /// True if this expression is satisfied.
+       ///
+       /// @see gtc_epsilon
+       template <typename genType>
+       GLM_FUNC_DECL bool epsilonEqual(
+               genType const & x,
+               genType const & y,
+               genType const & epsilon);
+
+       /// Returns the component-wise comparison of |x - y| < epsilon.
+       /// True if this expression is not satisfied.
+       ///
+       /// @see gtc_epsilon
+       template <typename genType>
+       GLM_FUNC_DECL typename genType::boolType epsilonNotEqual(
+               genType const & x,
+               genType const & y,
+               typename genType::value_type const & epsilon);
+
+       /// Returns the component-wise comparison of |x - y| >= epsilon.
+       /// True if this expression is not satisfied.
+       ///
+       /// @see gtc_epsilon
+       template <typename genType>
+       GLM_FUNC_DECL bool epsilonNotEqual(
+               genType const & x,
+               genType const & y,
+               genType const & epsilon);
+
+       /// @}
+}//namespace glm
+
+#include "epsilon.inl"
diff --git a/include/glm/gtc/epsilon.inl b/include/glm/gtc/epsilon.inl
new file mode 100644 (file)
index 0000000..8e65e97
--- /dev/null
@@ -0,0 +1,154 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtc_epsilon
+/// @file glm/gtc/epsilon.inl
+/// @date 2012-04-07 / 2012-04-07
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////
+
+// Dependency:
+#include "quaternion.hpp"
+#include "../vector_relational.hpp"
+#include "../common.hpp"
+#include "../vec2.hpp"
+#include "../vec3.hpp"
+#include "../vec4.hpp"
+
+namespace glm
+{
+       template <>
+       GLM_FUNC_QUALIFIER bool epsilonEqual
+       (
+               float const & x,
+               float const & y,
+               float const & epsilon
+       )
+       {
+               return abs(x - y) < epsilon;
+       }
+
+       template <>
+       GLM_FUNC_QUALIFIER bool epsilonEqual
+       (
+               double const & x,
+               double const & y,
+               double const & epsilon
+       )
+       {
+               return abs(x - y) < epsilon;
+       }
+
+       template <>
+       GLM_FUNC_QUALIFIER bool epsilonNotEqual
+       (
+               float const & x,
+               float const & y,
+               float const & epsilon
+       )
+       {
+               return abs(x - y) >= epsilon;
+       }
+
+       template <>
+       GLM_FUNC_QUALIFIER bool epsilonNotEqual
+       (
+               double const & x,
+               double const & y,
+               double const & epsilon
+       )
+       {
+               return abs(x - y) >= epsilon;
+       }
+
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_QUALIFIER vecType<bool, P> epsilonEqual
+       (
+               vecType<T, P> const & x,
+               vecType<T, P> const & y,
+               T const & epsilon
+       )
+       {
+               return lessThan(abs(x - y), vecType<T, P>(epsilon));
+       }
+
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_QUALIFIER vecType<bool, P> epsilonEqual
+       (
+               vecType<T, P> const & x,
+               vecType<T, P> const & y,
+               vecType<T, P> const & epsilon
+       )
+       {
+               return lessThan(abs(x - y), vecType<T, P>(epsilon));
+       }
+
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_QUALIFIER vecType<bool, P> epsilonNotEqual
+       (
+               vecType<T, P> const & x,
+               vecType<T, P> const & y,
+               T const & epsilon
+       )
+       {
+               return greaterThanEqual(abs(x - y), vecType<T, P>(epsilon));
+       }
+
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_QUALIFIER vecType<bool, P> epsilonNotEqual
+       (
+               vecType<T, P> const & x,
+               vecType<T, P> const & y,
+               vecType<T, P> const & epsilon
+       )
+       {
+               return greaterThanEqual(abs(x - y), vecType<T, P>(epsilon));
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec4<bool, P> epsilonEqual
+       (
+               tquat<T, P> const & x,
+               tquat<T, P> const & y,
+               T const & epsilon
+       )
+       {
+               tvec4<T, P> v(x.x - y.x, x.y - y.y, x.z - y.z, x.w - y.w);
+               return lessThan(abs(v), tvec4<T, P>(epsilon));
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec4<bool, P> epsilonNotEqual
+       (
+               tquat<T, P> const & x,
+               tquat<T, P> const & y,
+               T const & epsilon
+       )
+       {
+               tvec4<T, P> v(x.x - y.x, x.y - y.y, x.z - y.z, x.w - y.w);
+               return greaterThanEqual(abs(v), tvec4<T, P>(epsilon));
+       }
+}//namespace glm
diff --git a/include/glm/gtc/integer.hpp b/include/glm/gtc/integer.hpp
new file mode 100644 (file)
index 0000000..96c1934
--- /dev/null
@@ -0,0 +1,105 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtc_integer
+/// @file glm/gtc/integer.hpp
+/// @date 2014-11-17 / 2014-11-17
+/// @author Christophe Riccio
+///
+/// @see core (dependence)
+/// @see gtc_integer (dependence)
+///
+/// @defgroup gtc_integer GLM_GTC_integer
+/// @ingroup gtc
+/// 
+/// @brief Allow to perform bit operations on integer values
+/// 
+/// <glm/gtc/integer.hpp> need to be included to use these functionalities.
+///////////////////////////////////////////////////////////////////////////////////
+
+#pragma once
+
+// Dependencies
+#include "../detail/setup.hpp"
+#include "../detail/precision.hpp"
+#include "../detail/func_common.hpp"
+#include "../detail/func_integer.hpp"
+#include "../detail/func_exponential.hpp"
+#include <limits>
+
+#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
+#      pragma message("GLM: GLM_GTC_integer extension included")
+#endif
+
+namespace glm
+{
+       /// @addtogroup gtc_integer
+       /// @{
+
+       /// Returns the log2 of x for integer values. Can be reliably using to compute mipmap count from the texture size.
+       /// @see gtc_integer
+       template <typename genIUType>
+       GLM_FUNC_DECL genIUType log2(genIUType x);
+
+       /// Modulus. Returns x % y
+       /// for each component in x using the floating point value y.
+       ///
+       /// @tparam genIUType Integer-point scalar or vector types.
+       ///
+       /// @see gtc_integer
+       /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/mod.xml">GLSL mod man page</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
+       template <typename genIUType>
+       GLM_FUNC_DECL genIUType mod(genIUType x, genIUType y);
+
+       /// Modulus. Returns x % y
+       /// for each component in x using the floating point value y.
+       ///
+       /// @tparam T Integer scalar types.
+       /// @tparam vecType vector types.
+       ///
+       /// @see gtc_integer
+       /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/mod.xml">GLSL mod man page</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_DECL vecType<T, P> mod(vecType<T, P> const & x, T y);
+
+       /// Modulus. Returns x % y
+       /// for each component in x using the floating point value y.
+       ///
+       /// @tparam T Integer scalar types.
+       /// @tparam vecType vector types.
+       ///
+       /// @see gtc_integer
+       /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/mod.xml">GLSL mod man page</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_DECL vecType<T, P> mod(vecType<T, P> const & x, vecType<T, P> const & y);
+
+       /// @}
+} //namespace glm
+
+#include "integer.inl"
diff --git a/include/glm/gtc/integer.inl b/include/glm/gtc/integer.inl
new file mode 100644 (file)
index 0000000..e893328
--- /dev/null
@@ -0,0 +1,74 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtc_integer
+/// @file glm/gtc/integer.inl
+/// @date 2014-11-17 / 2014-11-17
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////
+
+namespace glm{
+namespace detail
+{
+       template <typename T, precision P, template <class, precision> class vecType>
+       struct compute_log2<T, P, vecType, false>
+       {
+               GLM_FUNC_QUALIFIER static vecType<T, P> call(vecType<T, P> const & vec)
+               {
+                       //Equivalent to return findMSB(vec); but save one function call in ASM with VC
+                       //return findMSB(vec);
+                       return vecType<T, P>(detail::compute_findMSB_vec<T, P, vecType, sizeof(T) * 8>::call(vec));
+               }
+       };
+
+#      if GLM_HAS_BITSCAN_WINDOWS
+               template <precision P>
+               struct compute_log2<int, P, tvec4, false>
+               {
+                       GLM_FUNC_QUALIFIER static tvec4<int, P> call(tvec4<int, P> const & vec)
+                       {
+                               tvec4<int, P> Result(glm::uninitialize);
+
+                               _BitScanReverse(reinterpret_cast<unsigned long*>(&Result.x), vec.x);
+                               _BitScanReverse(reinterpret_cast<unsigned long*>(&Result.y), vec.y);
+                               _BitScanReverse(reinterpret_cast<unsigned long*>(&Result.z), vec.z);
+                               _BitScanReverse(reinterpret_cast<unsigned long*>(&Result.w), vec.w);
+
+                               return Result;
+                       }
+               };
+#      endif//GLM_HAS_BITSCAN_WINDOWS
+
+       template <typename T, precision P, template <class, precision> class vecType, typename genType>
+       struct compute_mod<T, P, vecType, genType, false>
+       {
+               GLM_FUNC_QUALIFIER static vecType<T, P> call(vecType<T, P> const & a, genType const & b)
+               {
+                       return a % b;
+               }
+       };
+}//namespace detail
+}//namespace glm
diff --git a/include/glm/gtc/matrix_access.hpp b/include/glm/gtc/matrix_access.hpp
new file mode 100644 (file)
index 0000000..6a68441
--- /dev/null
@@ -0,0 +1,88 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+/// 
+/// @ref gtc_matrix_access
+/// @file glm/gtc/matrix_access.hpp
+/// @date 2005-12-27 / 2011-05-16
+/// @author Christophe Riccio
+/// 
+/// @see core (dependence)
+/// 
+/// @defgroup gtc_matrix_access GLM_GTC_matrix_access
+/// @ingroup gtc
+/// 
+/// Defines functions to access rows or columns of a matrix easily.
+/// <glm/gtc/matrix_access.hpp> need to be included to use these functionalities.
+///////////////////////////////////////////////////////////////////////////////////
+
+#pragma once
+
+// Dependency:
+#include "../detail/setup.hpp"
+
+#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
+#      pragma message("GLM: GLM_GTC_matrix_access extension included")
+#endif
+
+namespace glm
+{
+       /// @addtogroup gtc_matrix_access
+       /// @{
+
+       /// Get a specific row of a matrix.
+       /// @see gtc_matrix_access
+       template <typename genType>
+       GLM_FUNC_DECL typename genType::row_type row(
+               genType const & m,
+               length_t index);
+
+       /// Set a specific row to a matrix.
+       /// @see gtc_matrix_access
+       template <typename genType>
+       GLM_FUNC_DECL genType row(
+               genType const & m,
+               length_t index,
+               typename genType::row_type const & x);
+
+       /// Get a specific column of a matrix.
+       /// @see gtc_matrix_access
+       template <typename genType>
+       GLM_FUNC_DECL typename genType::col_type column(
+               genType const & m,
+               length_t index);
+
+       /// Set a specific column to a matrix.
+       /// @see gtc_matrix_access
+       template <typename genType>
+       GLM_FUNC_DECL genType column(
+               genType const & m,
+               length_t index,
+               typename genType::col_type const & x);
+
+       /// @}
+}//namespace glm
+
+#include "matrix_access.inl"
diff --git a/include/glm/gtc/matrix_access.inl b/include/glm/gtc/matrix_access.inl
new file mode 100644 (file)
index 0000000..c0c2faa
--- /dev/null
@@ -0,0 +1,92 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtc_matrix_access
+/// @file glm/gtc/matrix_access.inl
+/// @date 2005-12-27 / 2011-06-05
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////
+
+namespace glm
+{
+       template <typename genType>
+       GLM_FUNC_QUALIFIER genType row
+       (
+               genType const & m,
+               length_t index,
+               typename genType::row_type const & x
+       )
+       {
+               assert(index >= 0 && static_cast<detail::component_count_t>(index) < detail::component_count(m[0]));
+
+               genType Result = m;
+               for(detail::component_count_t i = 0; i < detail::component_count(m); ++i)
+                       Result[i][index] = x[i];
+               return Result;
+       }
+
+       template <typename genType>
+       GLM_FUNC_QUALIFIER typename genType::row_type row
+       (
+               genType const & m,
+               length_t index
+       )
+       {
+               assert(index >= 0 && static_cast<detail::component_count_t>(index) < detail::component_count(m[0]));
+
+               typename genType::row_type Result;
+               for(detail::component_count_t i = 0; i < detail::component_count(m); ++i)
+                       Result[i] = m[i][index];
+               return Result;
+       }
+
+       template <typename genType>
+       GLM_FUNC_QUALIFIER genType column
+       (
+               genType const & m,
+               length_t index,
+               typename genType::col_type const & x
+       )
+       {
+               assert(index >= 0 && static_cast<detail::component_count_t>(index) < detail::component_count(m));
+
+               genType Result = m;
+               Result[index] = x;
+               return Result;
+       }
+
+       template <typename genType>
+       GLM_FUNC_QUALIFIER typename genType::col_type column
+       (
+               genType const & m,
+               length_t index
+       )
+       {
+               assert(index >= 0 && static_cast<detail::component_count_t>(index) < detail::component_count(m));
+
+               return m[index];
+       }
+}//namespace glm
diff --git a/include/glm/gtc/matrix_integer.hpp b/include/glm/gtc/matrix_integer.hpp
new file mode 100644 (file)
index 0000000..13fc378
--- /dev/null
@@ -0,0 +1,515 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtc_matrix_integer
+/// @file glm/gtc/matrix_integer.hpp
+/// @date 2011-01-20 / 2011-06-05
+/// @author Christophe Riccio
+///
+/// @see core (dependence)
+///
+/// @defgroup gtc_matrix_integer GLM_GTC_matrix_integer
+/// @ingroup gtc
+/// 
+/// Defines a number of matrices with integer types.
+/// <glm/gtc/matrix_integer.hpp> need to be included to use these functionalities.
+///////////////////////////////////////////////////////////////////////////////////
+
+#pragma once
+
+// Dependency:
+#include "../mat2x2.hpp"
+#include "../mat2x3.hpp"
+#include "../mat2x4.hpp"
+#include "../mat3x2.hpp"
+#include "../mat3x3.hpp"
+#include "../mat3x4.hpp"
+#include "../mat4x2.hpp"
+#include "../mat4x3.hpp"
+#include "../mat4x4.hpp"
+
+#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
+#      pragma message("GLM: GLM_GTC_matrix_integer extension included")
+#endif
+
+namespace glm
+{
+       /// @addtogroup gtc_matrix_integer
+       /// @{
+
+       /// High-precision signed integer 2x2 matrix.
+       /// @see gtc_matrix_integer
+       typedef tmat2x2<int, highp>                             highp_imat2;
+
+       /// High-precision signed integer 3x3 matrix.
+       /// @see gtc_matrix_integer
+       typedef tmat3x3<int, highp>                             highp_imat3;
+
+       /// High-precision signed integer 4x4 matrix.
+       /// @see gtc_matrix_integer
+       typedef tmat4x4<int, highp>                             highp_imat4;
+
+       /// High-precision signed integer 2x2 matrix.
+       /// @see gtc_matrix_integer
+       typedef tmat2x2<int, highp>                             highp_imat2x2;
+
+       /// High-precision signed integer 2x3 matrix.
+       /// @see gtc_matrix_integer
+       typedef tmat2x3<int, highp>                             highp_imat2x3;
+
+       /// High-precision signed integer 2x4 matrix.
+       /// @see gtc_matrix_integer
+       typedef tmat2x4<int, highp>                             highp_imat2x4;
+
+       /// High-precision signed integer 3x2 matrix.
+       /// @see gtc_matrix_integer
+       typedef tmat3x2<int, highp>                             highp_imat3x2;
+
+       /// High-precision signed integer 3x3 matrix.
+       /// @see gtc_matrix_integer
+       typedef tmat3x3<int, highp>                             highp_imat3x3;
+
+       /// High-precision signed integer 3x4 matrix.
+       /// @see gtc_matrix_integer
+       typedef tmat3x4<int, highp>                             highp_imat3x4;
+
+       /// High-precision signed integer 4x2 matrix.
+       /// @see gtc_matrix_integer
+       typedef tmat4x2<int, highp>                             highp_imat4x2;
+
+       /// High-precision signed integer 4x3 matrix.
+       /// @see gtc_matrix_integer
+       typedef tmat4x3<int, highp>                             highp_imat4x3;
+
+       /// High-precision signed integer 4x4 matrix.
+       /// @see gtc_matrix_integer
+       typedef tmat4x4<int, highp>                             highp_imat4x4;
+
+
+       /// Medium-precision signed integer 2x2 matrix.
+       /// @see gtc_matrix_integer
+       typedef tmat2x2<int, mediump>                   mediump_imat2;
+
+       /// Medium-precision signed integer 3x3 matrix.
+       /// @see gtc_matrix_integer
+       typedef tmat3x3<int, mediump>                   mediump_imat3;
+
+       /// Medium-precision signed integer 4x4 matrix.
+       /// @see gtc_matrix_integer
+       typedef tmat4x4<int, mediump>                   mediump_imat4;
+
+
+       /// Medium-precision signed integer 2x2 matrix.
+       /// @see gtc_matrix_integer
+       typedef tmat2x2<int, mediump>                   mediump_imat2x2;
+
+       /// Medium-precision signed integer 2x3 matrix.
+       /// @see gtc_matrix_integer
+       typedef tmat2x3<int, mediump>                   mediump_imat2x3;
+
+       /// Medium-precision signed integer 2x4 matrix.
+       /// @see gtc_matrix_integer
+       typedef tmat2x4<int, mediump>                   mediump_imat2x4;
+
+       /// Medium-precision signed integer 3x2 matrix.
+       /// @see gtc_matrix_integer
+       typedef tmat3x2<int, mediump>                   mediump_imat3x2;
+
+       /// Medium-precision signed integer 3x3 matrix.
+       /// @see gtc_matrix_integer
+       typedef tmat3x3<int, mediump>                   mediump_imat3x3;
+
+       /// Medium-precision signed integer 3x4 matrix.
+       /// @see gtc_matrix_integer
+       typedef tmat3x4<int, mediump>                   mediump_imat3x4;
+
+       /// Medium-precision signed integer 4x2 matrix.
+       /// @see gtc_matrix_integer
+       typedef tmat4x2<int, mediump>                   mediump_imat4x2;
+
+       /// Medium-precision signed integer 4x3 matrix.
+       /// @see gtc_matrix_integer
+       typedef tmat4x3<int, mediump>                   mediump_imat4x3;
+
+       /// Medium-precision signed integer 4x4 matrix.
+       /// @see gtc_matrix_integer
+       typedef tmat4x4<int, mediump>                   mediump_imat4x4;
+
+
+       /// Low-precision signed integer 2x2 matrix.
+       /// @see gtc_matrix_integer
+       typedef tmat2x2<int, lowp>                              lowp_imat2;
+       
+       /// Low-precision signed integer 3x3 matrix.
+       /// @see gtc_matrix_integer
+       typedef tmat3x3<int, lowp>                              lowp_imat3;
+
+       /// Low-precision signed integer 4x4 matrix.
+       /// @see gtc_matrix_integer
+       typedef tmat4x4<int, lowp>                              lowp_imat4;
+
+
+       /// Low-precision signed integer 2x2 matrix.
+       /// @see gtc_matrix_integer
+       typedef tmat2x2<int, lowp>                              lowp_imat2x2;
+
+       /// Low-precision signed integer 2x3 matrix.
+       /// @see gtc_matrix_integer
+       typedef tmat2x3<int, lowp>                              lowp_imat2x3;
+
+       /// Low-precision signed integer 2x4 matrix.
+       /// @see gtc_matrix_integer
+       typedef tmat2x4<int, lowp>                              lowp_imat2x4;
+
+       /// Low-precision signed integer 3x2 matrix.
+       /// @see gtc_matrix_integer
+       typedef tmat3x2<int, lowp>                              lowp_imat3x2;
+
+       /// Low-precision signed integer 3x3 matrix.
+       /// @see gtc_matrix_integer
+       typedef tmat3x3<int, lowp>                              lowp_imat3x3;
+
+       /// Low-precision signed integer 3x4 matrix.
+       /// @see gtc_matrix_integer
+       typedef tmat3x4<int, lowp>                              lowp_imat3x4;
+
+       /// Low-precision signed integer 4x2 matrix.
+       /// @see gtc_matrix_integer
+       typedef tmat4x2<int, lowp>                              lowp_imat4x2;
+
+       /// Low-precision signed integer 4x3 matrix.
+       /// @see gtc_matrix_integer
+       typedef tmat4x3<int, lowp>                              lowp_imat4x3;
+
+       /// Low-precision signed integer 4x4 matrix.
+       /// @see gtc_matrix_integer
+       typedef tmat4x4<int, lowp>                              lowp_imat4x4;
+
+
+       /// High-precision unsigned integer 2x2 matrix.
+       /// @see gtc_matrix_integer
+       typedef tmat2x2<uint, highp>                            highp_umat2;    
+
+       /// High-precision unsigned integer 3x3 matrix.
+       /// @see gtc_matrix_integer
+       typedef tmat3x3<uint, highp>                            highp_umat3;
+
+       /// High-precision unsigned integer 4x4 matrix.
+       /// @see gtc_matrix_integer
+       typedef tmat4x4<uint, highp>                            highp_umat4;
+
+       /// High-precision unsigned integer 2x2 matrix.
+       /// @see gtc_matrix_integer
+       typedef tmat2x2<uint, highp>                            highp_umat2x2;
+
+       /// High-precision unsigned integer 2x3 matrix.
+       /// @see gtc_matrix_integer
+       typedef tmat2x3<uint, highp>                            highp_umat2x3;
+
+       /// High-precision unsigned integer 2x4 matrix.
+       /// @see gtc_matrix_integer
+       typedef tmat2x4<uint, highp>                            highp_umat2x4;
+
+       /// High-precision unsigned integer 3x2 matrix.
+       /// @see gtc_matrix_integer
+       typedef tmat3x2<uint, highp>                            highp_umat3x2;
+
+       /// High-precision unsigned integer 3x3 matrix.
+       /// @see gtc_matrix_integer
+       typedef tmat3x3<uint, highp>                            highp_umat3x3;
+
+       /// High-precision unsigned integer 3x4 matrix.
+       /// @see gtc_matrix_integer
+       typedef tmat3x4<uint, highp>                            highp_umat3x4;
+
+       /// High-precision unsigned integer 4x2 matrix.
+       /// @see gtc_matrix_integer
+       typedef tmat4x2<uint, highp>                            highp_umat4x2;
+
+       /// High-precision unsigned integer 4x3 matrix.
+       /// @see gtc_matrix_integer
+       typedef tmat4x3<uint, highp>                            highp_umat4x3;
+
+       /// High-precision unsigned integer 4x4 matrix.
+       /// @see gtc_matrix_integer
+       typedef tmat4x4<uint, highp>                            highp_umat4x4;
+
+
+       /// Medium-precision unsigned integer 2x2 matrix.
+       /// @see gtc_matrix_integer
+       typedef tmat2x2<uint, mediump>                  mediump_umat2;
+
+       /// Medium-precision unsigned integer 3x3 matrix.
+       /// @see gtc_matrix_integer
+       typedef tmat3x3<uint, mediump>                  mediump_umat3;
+
+       /// Medium-precision unsigned integer 4x4 matrix.
+       /// @see gtc_matrix_integer
+       typedef tmat4x4<uint, mediump>                  mediump_umat4;
+
+
+       /// Medium-precision unsigned integer 2x2 matrix.
+       /// @see gtc_matrix_integer
+       typedef tmat2x2<uint, mediump>                  mediump_umat2x2;
+
+       /// Medium-precision unsigned integer 2x3 matrix.
+       /// @see gtc_matrix_integer
+       typedef tmat2x3<uint, mediump>                  mediump_umat2x3;
+
+       /// Medium-precision unsigned integer 2x4 matrix.
+       /// @see gtc_matrix_integer
+       typedef tmat2x4<uint, mediump>                  mediump_umat2x4;
+
+       /// Medium-precision unsigned integer 3x2 matrix.
+       /// @see gtc_matrix_integer
+       typedef tmat3x2<uint, mediump>                  mediump_umat3x2;
+
+       /// Medium-precision unsigned integer 3x3 matrix.
+       /// @see gtc_matrix_integer
+       typedef tmat3x3<uint, mediump>                  mediump_umat3x3;
+
+       /// Medium-precision unsigned integer 3x4 matrix.
+       /// @see gtc_matrix_integer
+       typedef tmat3x4<uint, mediump>                  mediump_umat3x4;
+
+       /// Medium-precision unsigned integer 4x2 matrix.
+       /// @see gtc_matrix_integer
+       typedef tmat4x2<uint, mediump>                  mediump_umat4x2;
+
+       /// Medium-precision unsigned integer 4x3 matrix.
+       /// @see gtc_matrix_integer
+       typedef tmat4x3<uint, mediump>                  mediump_umat4x3;
+
+       /// Medium-precision unsigned integer 4x4 matrix.
+       /// @see gtc_matrix_integer
+       typedef tmat4x4<uint, mediump>                  mediump_umat4x4;
+
+
+       /// Low-precision unsigned integer 2x2 matrix.
+       /// @see gtc_matrix_integer
+       typedef tmat2x2<uint, lowp>                             lowp_umat2;
+       
+       /// Low-precision unsigned integer 3x3 matrix.
+       /// @see gtc_matrix_integer
+       typedef tmat3x3<uint, lowp>                             lowp_umat3;
+
+       /// Low-precision unsigned integer 4x4 matrix.
+       /// @see gtc_matrix_integer
+       typedef tmat4x4<uint, lowp>                             lowp_umat4;
+
+
+       /// Low-precision unsigned integer 2x2 matrix.
+       /// @see gtc_matrix_integer
+       typedef tmat2x2<uint, lowp>                             lowp_umat2x2;
+
+       /// Low-precision unsigned integer 2x3 matrix.
+       /// @see gtc_matrix_integer
+       typedef tmat2x3<uint, lowp>                             lowp_umat2x3;
+
+       /// Low-precision unsigned integer 2x4 matrix.
+       /// @see gtc_matrix_integer
+       typedef tmat2x4<uint, lowp>                             lowp_umat2x4;
+
+       /// Low-precision unsigned integer 3x2 matrix.
+       /// @see gtc_matrix_integer
+       typedef tmat3x2<uint, lowp>                             lowp_umat3x2;
+
+       /// Low-precision unsigned integer 3x3 matrix.
+       /// @see gtc_matrix_integer
+       typedef tmat3x3<uint, lowp>                             lowp_umat3x3;
+
+       /// Low-precision unsigned integer 3x4 matrix.
+       /// @see gtc_matrix_integer
+       typedef tmat3x4<uint, lowp>                             lowp_umat3x4;
+
+       /// Low-precision unsigned integer 4x2 matrix.
+       /// @see gtc_matrix_integer
+       typedef tmat4x2<uint, lowp>                             lowp_umat4x2;
+
+       /// Low-precision unsigned integer 4x3 matrix.
+       /// @see gtc_matrix_integer
+       typedef tmat4x3<uint, lowp>                             lowp_umat4x3;
+
+       /// Low-precision unsigned integer 4x4 matrix.
+       /// @see gtc_matrix_integer
+       typedef tmat4x4<uint, lowp>                             lowp_umat4x4;
+
+#if(defined(GLM_PRECISION_HIGHP_INT))
+       typedef highp_imat2                                                             imat2;
+       typedef highp_imat3                                                             imat3;
+       typedef highp_imat4                                                             imat4;
+       typedef highp_imat2x2                                                   imat2x2;
+       typedef highp_imat2x3                                                   imat2x3;
+       typedef highp_imat2x4                                                   imat2x4;
+       typedef highp_imat3x2                                                   imat3x2;
+       typedef highp_imat3x3                                                   imat3x3;
+       typedef highp_imat3x4                                                   imat3x4;
+       typedef highp_imat4x2                                                   imat4x2;
+       typedef highp_imat4x3                                                   imat4x3;
+       typedef highp_imat4x4                                                   imat4x4;
+#elif(defined(GLM_PRECISION_LOWP_INT))
+       typedef lowp_imat2                                                              imat2;
+       typedef lowp_imat3                                                              imat3;
+       typedef lowp_imat4                                                              imat4;
+       typedef lowp_imat2x2                                                    imat2x2;
+       typedef lowp_imat2x3                                                    imat2x3;
+       typedef lowp_imat2x4                                                    imat2x4;
+       typedef lowp_imat3x2                                                    imat3x2;
+       typedef lowp_imat3x3                                                    imat3x3;
+       typedef lowp_imat3x4                                                    imat3x4;
+       typedef lowp_imat4x2                                                    imat4x2;
+       typedef lowp_imat4x3                                                    imat4x3;
+       typedef lowp_imat4x4                                                    imat4x4;
+#else //if(defined(GLM_PRECISION_MEDIUMP_INT))
+
+       /// Signed integer 2x2 matrix.
+       /// @see gtc_matrix_integer
+       typedef mediump_imat2                                                   imat2;
+
+       /// Signed integer 3x3 matrix.
+       /// @see gtc_matrix_integer
+       typedef mediump_imat3                                                   imat3;
+
+       /// Signed integer 4x4 matrix.
+       /// @see gtc_matrix_integer
+       typedef mediump_imat4                                                   imat4;
+
+       /// Signed integer 2x2 matrix.
+       /// @see gtc_matrix_integer
+       typedef mediump_imat2x2                                                 imat2x2;
+
+       /// Signed integer 2x3 matrix.
+       /// @see gtc_matrix_integer
+       typedef mediump_imat2x3                                                 imat2x3;
+
+       /// Signed integer 2x4 matrix.
+       /// @see gtc_matrix_integer
+       typedef mediump_imat2x4                                                 imat2x4;
+
+       /// Signed integer 3x2 matrix.
+       /// @see gtc_matrix_integer
+       typedef mediump_imat3x2                                                 imat3x2;
+
+       /// Signed integer 3x3 matrix.
+       /// @see gtc_matrix_integer
+       typedef mediump_imat3x3                                                 imat3x3;
+
+       /// Signed integer 3x4 matrix.
+       /// @see gtc_matrix_integer
+       typedef mediump_imat3x4                                                 imat3x4;
+
+       /// Signed integer 4x2 matrix.
+       /// @see gtc_matrix_integer
+       typedef mediump_imat4x2                                                 imat4x2;
+
+       /// Signed integer 4x3 matrix.
+       /// @see gtc_matrix_integer
+       typedef mediump_imat4x3                                                 imat4x3;
+
+       /// Signed integer 4x4 matrix.
+       /// @see gtc_matrix_integer
+       typedef mediump_imat4x4                                                 imat4x4;
+#endif//GLM_PRECISION
+
+#if(defined(GLM_PRECISION_HIGHP_UINT))
+       typedef highp_umat2                                                             umat2;
+       typedef highp_umat3                                                             umat3;
+       typedef highp_umat4                                                             umat4;
+       typedef highp_umat2x2                                                   umat2x2;
+       typedef highp_umat2x3                                                   umat2x3;
+       typedef highp_umat2x4                                                   umat2x4;
+       typedef highp_umat3x2                                                   umat3x2;
+       typedef highp_umat3x3                                                   umat3x3;
+       typedef highp_umat3x4                                                   umat3x4;
+       typedef highp_umat4x2                                                   umat4x2;
+       typedef highp_umat4x3                                                   umat4x3;
+       typedef highp_umat4x4                                                   umat4x4;
+#elif(defined(GLM_PRECISION_LOWP_UINT))
+       typedef lowp_umat2                                                              umat2;
+       typedef lowp_umat3                                                              umat3;
+       typedef lowp_umat4                                                              umat4;
+       typedef lowp_umat2x2                                                    umat2x2;
+       typedef lowp_umat2x3                                                    umat2x3;
+       typedef lowp_umat2x4                                                    umat2x4;
+       typedef lowp_umat3x2                                                    umat3x2;
+       typedef lowp_umat3x3                                                    umat3x3;
+       typedef lowp_umat3x4                                                    umat3x4;
+       typedef lowp_umat4x2                                                    umat4x2;
+       typedef lowp_umat4x3                                                    umat4x3;
+       typedef lowp_umat4x4                                                    umat4x4;
+#else //if(defined(GLM_PRECISION_MEDIUMP_UINT))
+       
+       /// Unsigned integer 2x2 matrix.
+       /// @see gtc_matrix_integer
+       typedef mediump_umat2                                                   umat2;
+
+       /// Unsigned integer 3x3 matrix.
+       /// @see gtc_matrix_integer
+       typedef mediump_umat3                                                   umat3;
+
+       /// Unsigned integer 4x4 matrix.
+       /// @see gtc_matrix_integer
+       typedef mediump_umat4                                                   umat4;
+
+       /// Unsigned integer 2x2 matrix.
+       /// @see gtc_matrix_integer
+       typedef mediump_umat2x2                                                 umat2x2;
+
+       /// Unsigned integer 2x3 matrix.
+       /// @see gtc_matrix_integer
+       typedef mediump_umat2x3                                                 umat2x3;
+
+       /// Unsigned integer 2x4 matrix.
+       /// @see gtc_matrix_integer
+       typedef mediump_umat2x4                                                 umat2x4;
+
+       /// Unsigned integer 3x2 matrix.
+       /// @see gtc_matrix_integer
+       typedef mediump_umat3x2                                                 umat3x2;
+
+       /// Unsigned integer 3x3 matrix.
+       /// @see gtc_matrix_integer
+       typedef mediump_umat3x3                                                 umat3x3;
+
+       /// Unsigned integer 3x4 matrix.
+       /// @see gtc_matrix_integer
+       typedef mediump_umat3x4                                                 umat3x4;
+
+       /// Unsigned integer 4x2 matrix.
+       /// @see gtc_matrix_integer
+       typedef mediump_umat4x2                                                 umat4x2;
+
+       /// Unsigned integer 4x3 matrix.
+       /// @see gtc_matrix_integer
+       typedef mediump_umat4x3                                                 umat4x3;
+
+       /// Unsigned integer 4x4 matrix.
+       /// @see gtc_matrix_integer
+       typedef mediump_umat4x4                                                 umat4x4;
+#endif//GLM_PRECISION
+
+       /// @}
+}//namespace glm
diff --git a/include/glm/gtc/matrix_inverse.hpp b/include/glm/gtc/matrix_inverse.hpp
new file mode 100644 (file)
index 0000000..9d9bd84
--- /dev/null
@@ -0,0 +1,78 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtc_matrix_inverse
+/// @file glm/gtc/matrix_inverse.hpp
+/// @date 2005-12-21 / 2011-06-05
+/// @author Christophe Riccio
+///
+/// @see core (dependence)
+/// 
+/// @defgroup gtc_matrix_inverse GLM_GTC_matrix_inverse
+/// @ingroup gtc
+/// 
+/// Defines additional matrix inverting functions.
+/// <glm/gtc/matrix_inverse.hpp> need to be included to use these functionalities.
+///////////////////////////////////////////////////////////////////////////////////
+
+#pragma once
+
+// Dependencies
+#include "../detail/setup.hpp"
+#include "../matrix.hpp"
+#include "../mat2x2.hpp"
+#include "../mat3x3.hpp"
+#include "../mat4x4.hpp"
+
+#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
+#      pragma message("GLM: GLM_GTC_matrix_inverse extension included")
+#endif
+
+namespace glm
+{
+       /// @addtogroup gtc_matrix_inverse
+       /// @{
+
+       /// Fast matrix inverse for affine matrix.
+       /// 
+       /// @param m Input matrix to invert.
+       /// @tparam genType Squared floating-point matrix: half, float or double. Inverse of matrix based of half-precision floating point value is highly innacurate.
+       /// @see gtc_matrix_inverse
+       template <typename genType> 
+       GLM_FUNC_DECL genType affineInverse(genType const & m);
+
+       /// Compute the inverse transpose of a matrix.
+       /// 
+       /// @param m Input matrix to invert transpose.
+       /// @tparam genType Squared floating-point matrix: half, float or double. Inverse of matrix based of half-precision floating point value is highly innacurate.
+       /// @see gtc_matrix_inverse
+       template <typename genType>
+       GLM_FUNC_DECL genType inverseTranspose(genType const & m);
+
+       /// @}
+}//namespace glm
+
+#include "matrix_inverse.inl"
diff --git a/include/glm/gtc/matrix_inverse.inl b/include/glm/gtc/matrix_inverse.inl
new file mode 100644 (file)
index 0000000..d88a331
--- /dev/null
@@ -0,0 +1,148 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtc_matrix_inverse
+/// @file glm/gtc/matrix_inverse.inl
+/// @date 2005-12-21 / 2011-06-15
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////
+
+namespace glm
+{
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat3x3<T, P> affineInverse(tmat3x3<T, P> const & m)
+       {
+               tmat3x3<T, P> Result(m);
+               Result[2] = tvec3<T, P>(0, 0, 1);
+               Result = transpose(Result);
+               tvec3<T, P> Translation = Result * tvec3<T, P>(-tvec2<T, P>(m[2]), m[2][2]);
+               Result[2] = Translation;
+               return Result;
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat4x4<T, P> affineInverse(tmat4x4<T, P> const & m)
+       {
+               tmat4x4<T, P> Result(m);
+               Result[3] = tvec4<T, P>(0, 0, 0, 1);
+               Result = transpose(Result);
+               tvec4<T, P> Translation = Result * tvec4<T, P>(-tvec3<T, P>(m[3]), m[3][3]);
+               Result[3] = Translation;
+               return Result;
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat2x2<T, P> inverseTranspose(tmat2x2<T, P> const & m)
+       {
+               T Determinant = m[0][0] * m[1][1] - m[1][0] * m[0][1];
+
+               tmat2x2<T, P> Inverse(
+                       + m[1][1] / Determinant,
+                       - m[0][1] / Determinant,
+                       - m[1][0] / Determinant,
+                       + m[0][0] / Determinant);
+
+               return Inverse;
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat3x3<T, P> inverseTranspose(tmat3x3<T, P> const & m)
+       {
+               T Determinant =
+                       + m[0][0] * (m[1][1] * m[2][2] - m[1][2] * m[2][1])
+                       - m[0][1] * (m[1][0] * m[2][2] - m[1][2] * m[2][0])
+                       + m[0][2] * (m[1][0] * m[2][1] - m[1][1] * m[2][0]);
+
+               tmat3x3<T, P> Inverse(uninitialize);
+               Inverse[0][0] = + (m[1][1] * m[2][2] - m[2][1] * m[1][2]);
+               Inverse[0][1] = - (m[1][0] * m[2][2] - m[2][0] * m[1][2]);
+               Inverse[0][2] = + (m[1][0] * m[2][1] - m[2][0] * m[1][1]);
+               Inverse[1][0] = - (m[0][1] * m[2][2] - m[2][1] * m[0][2]);
+               Inverse[1][1] = + (m[0][0] * m[2][2] - m[2][0] * m[0][2]);
+               Inverse[1][2] = - (m[0][0] * m[2][1] - m[2][0] * m[0][1]);
+               Inverse[2][0] = + (m[0][1] * m[1][2] - m[1][1] * m[0][2]);
+               Inverse[2][1] = - (m[0][0] * m[1][2] - m[1][0] * m[0][2]);
+               Inverse[2][2] = + (m[0][0] * m[1][1] - m[1][0] * m[0][1]);
+               Inverse /= Determinant;
+
+               return Inverse;
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat4x4<T, P> inverseTranspose(tmat4x4<T, P> const & m)
+       {
+               T SubFactor00 = m[2][2] * m[3][3] - m[3][2] * m[2][3];
+               T SubFactor01 = m[2][1] * m[3][3] - m[3][1] * m[2][3];
+               T SubFactor02 = m[2][1] * m[3][2] - m[3][1] * m[2][2];
+               T SubFactor03 = m[2][0] * m[3][3] - m[3][0] * m[2][3];
+               T SubFactor04 = m[2][0] * m[3][2] - m[3][0] * m[2][2];
+               T SubFactor05 = m[2][0] * m[3][1] - m[3][0] * m[2][1];
+               T SubFactor06 = m[1][2] * m[3][3] - m[3][2] * m[1][3];
+               T SubFactor07 = m[1][1] * m[3][3] - m[3][1] * m[1][3];
+               T SubFactor08 = m[1][1] * m[3][2] - m[3][1] * m[1][2];
+               T SubFactor09 = m[1][0] * m[3][3] - m[3][0] * m[1][3];
+               T SubFactor10 = m[1][0] * m[3][2] - m[3][0] * m[1][2];
+               T SubFactor11 = m[1][1] * m[3][3] - m[3][1] * m[1][3];
+               T SubFactor12 = m[1][0] * m[3][1] - m[3][0] * m[1][1];
+               T SubFactor13 = m[1][2] * m[2][3] - m[2][2] * m[1][3];
+               T SubFactor14 = m[1][1] * m[2][3] - m[2][1] * m[1][3];
+               T SubFactor15 = m[1][1] * m[2][2] - m[2][1] * m[1][2];
+               T SubFactor16 = m[1][0] * m[2][3] - m[2][0] * m[1][3];
+               T SubFactor17 = m[1][0] * m[2][2] - m[2][0] * m[1][2];
+               T SubFactor18 = m[1][0] * m[2][1] - m[2][0] * m[1][1];
+
+               tmat4x4<T, P> Inverse(uninitialize);
+               Inverse[0][0] = + (m[1][1] * SubFactor00 - m[1][2] * SubFactor01 + m[1][3] * SubFactor02);
+               Inverse[0][1] = - (m[1][0] * SubFactor00 - m[1][2] * SubFactor03 + m[1][3] * SubFactor04);
+               Inverse[0][2] = + (m[1][0] * SubFactor01 - m[1][1] * SubFactor03 + m[1][3] * SubFactor05);
+               Inverse[0][3] = - (m[1][0] * SubFactor02 - m[1][1] * SubFactor04 + m[1][2] * SubFactor05);
+
+               Inverse[1][0] = - (m[0][1] * SubFactor00 - m[0][2] * SubFactor01 + m[0][3] * SubFactor02);
+               Inverse[1][1] = + (m[0][0] * SubFactor00 - m[0][2] * SubFactor03 + m[0][3] * SubFactor04);
+               Inverse[1][2] = - (m[0][0] * SubFactor01 - m[0][1] * SubFactor03 + m[0][3] * SubFactor05);
+               Inverse[1][3] = + (m[0][0] * SubFactor02 - m[0][1] * SubFactor04 + m[0][2] * SubFactor05);
+
+               Inverse[2][0] = + (m[0][1] * SubFactor06 - m[0][2] * SubFactor07 + m[0][3] * SubFactor08);
+               Inverse[2][1] = - (m[0][0] * SubFactor06 - m[0][2] * SubFactor09 + m[0][3] * SubFactor10);
+               Inverse[2][2] = + (m[0][0] * SubFactor11 - m[0][1] * SubFactor09 + m[0][3] * SubFactor12);
+               Inverse[2][3] = - (m[0][0] * SubFactor08 - m[0][1] * SubFactor10 + m[0][2] * SubFactor12);
+
+               Inverse[3][0] = - (m[0][1] * SubFactor13 - m[0][2] * SubFactor14 + m[0][3] * SubFactor15);
+               Inverse[3][1] = + (m[0][0] * SubFactor13 - m[0][2] * SubFactor16 + m[0][3] * SubFactor17);
+               Inverse[3][2] = - (m[0][0] * SubFactor14 - m[0][1] * SubFactor16 + m[0][3] * SubFactor18);
+               Inverse[3][3] = + (m[0][0] * SubFactor15 - m[0][1] * SubFactor17 + m[0][2] * SubFactor18);
+
+               T Determinant =
+                       + m[0][0] * Inverse[0][0]
+                       + m[0][1] * Inverse[0][1]
+                       + m[0][2] * Inverse[0][2]
+                       + m[0][3] * Inverse[0][3];
+
+               Inverse /= Determinant;
+
+               return Inverse;
+       }
+}//namespace glm
diff --git a/include/glm/gtc/matrix_transform.hpp b/include/glm/gtc/matrix_transform.hpp
new file mode 100644 (file)
index 0000000..e2fc72a
--- /dev/null
@@ -0,0 +1,304 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtc_matrix_transform
+/// @file glm/gtc/matrix_transform.hpp
+/// @date 2009-04-29 / 2011-05-16
+/// @author Christophe Riccio
+///
+/// @see core (dependence)
+/// @see gtx_transform
+/// @see gtx_transform2
+/// 
+/// @defgroup gtc_matrix_transform GLM_GTC_matrix_transform
+/// @ingroup gtc
+/// 
+/// @brief Defines functions that generate common transformation matrices.
+/// 
+/// The matrices generated by this extension use standard OpenGL fixed-function
+/// conventions. For example, the lookAt function generates a transform from world
+/// space into the specific eye space that the projective matrix functions 
+/// (perspective, ortho, etc) are designed to expect. The OpenGL compatibility
+/// specifications defines the particular layout of this eye space.
+/// 
+/// <glm/gtc/matrix_transform.hpp> need to be included to use these functionalities.
+///////////////////////////////////////////////////////////////////////////////////
+
+#pragma once
+
+// Dependencies
+#include "../mat4x4.hpp"
+#include "../vec2.hpp"
+#include "../vec3.hpp"
+#include "../vec4.hpp"
+#include "../gtc/constants.hpp"
+
+#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
+#      pragma message("GLM: GLM_GTC_matrix_transform extension included")
+#endif
+
+namespace glm
+{
+       /// @addtogroup gtc_matrix_transform
+       /// @{
+
+       /// Builds a translation 4 * 4 matrix created from a vector of 3 components.
+       /// 
+       /// @param m Input matrix multiplied by this translation matrix.
+       /// @param v Coordinates of a translation vector.
+       /// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double.
+       /// @code
+       /// #include <glm/glm.hpp>
+       /// #include <glm/gtc/matrix_transform.hpp>
+       /// ...
+       /// glm::mat4 m = glm::translate(glm::mat4(1.0f), glm::vec3(1.0f));
+       /// // m[0][0] == 1.0f, m[0][1] == 0.0f, m[0][2] == 0.0f, m[0][3] == 0.0f
+       /// // m[1][0] == 0.0f, m[1][1] == 1.0f, m[1][2] == 0.0f, m[1][3] == 0.0f
+       /// // m[2][0] == 0.0f, m[2][1] == 0.0f, m[2][2] == 1.0f, m[2][3] == 0.0f
+       /// // m[3][0] == 1.0f, m[3][1] == 1.0f, m[3][2] == 1.0f, m[3][3] == 1.0f
+       /// @endcode
+       /// @see gtc_matrix_transform
+       /// @see - translate(tmat4x4<T, P> const & m, T x, T y, T z)
+       /// @see - translate(tvec3<T, P> const & v)
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat4x4<T, P> translate(
+               tmat4x4<T, P> const & m,
+               tvec3<T, P> const & v);
+               
+       /// Builds a rotation 4 * 4 matrix created from an axis vector and an angle. 
+       /// 
+       /// @param m Input matrix multiplied by this rotation matrix.
+       /// @param angle Rotation angle expressed in radians.
+       /// @param axis Rotation axis, recommanded to be normalized.
+       /// @tparam T Value type used to build the matrix. Supported: half, float or double.
+       /// @see gtc_matrix_transform
+       /// @see - rotate(tmat4x4<T, P> const & m, T angle, T x, T y, T z) 
+       /// @see - rotate(T angle, tvec3<T, P> const & v) 
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat4x4<T, P> rotate(
+               tmat4x4<T, P> const & m,
+               T angle,
+               tvec3<T, P> const & axis);
+
+       /// Builds a scale 4 * 4 matrix created from 3 scalars. 
+       /// 
+       /// @param m Input matrix multiplied by this scale matrix.
+       /// @param v Ratio of scaling for each axis.
+       /// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double.
+       /// @see gtc_matrix_transform
+       /// @see - scale(tmat4x4<T, P> const & m, T x, T y, T z)
+       /// @see - scale(tvec3<T, P> const & v)
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat4x4<T, P> scale(
+               tmat4x4<T, P> const & m,
+               tvec3<T, P> const & v);
+
+       /// Creates a matrix for an orthographic parallel viewing volume.
+       /// 
+       /// @param left 
+       /// @param right 
+       /// @param bottom 
+       /// @param top 
+       /// @param zNear 
+       /// @param zFar 
+       /// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double.
+       /// @see gtc_matrix_transform
+       /// @see - glm::ortho(T const & left, T const & right, T const & bottom, T const & top)
+       template <typename T>
+       GLM_FUNC_DECL tmat4x4<T, defaultp> ortho(
+               T left,
+               T right,
+               T bottom,
+               T top,
+               T zNear,
+               T zFar);
+
+       /// Creates a matrix for projecting two-dimensional coordinates onto the screen.
+       /// 
+       /// @param left 
+       /// @param right 
+       /// @param bottom 
+       /// @param top 
+       /// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double.
+       /// @see gtc_matrix_transform
+       /// @see - glm::ortho(T const & left, T const & right, T const & bottom, T const & top, T const & zNear, T const & zFar)
+       template <typename T>
+       GLM_FUNC_DECL tmat4x4<T, defaultp> ortho(
+               T left,
+               T right,
+               T bottom,
+               T top);
+
+       /// Creates a frustum matrix.
+       /// 
+       /// @param left 
+       /// @param right 
+       /// @param bottom 
+       /// @param top 
+       /// @param near 
+       /// @param far 
+       /// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double.
+       /// @see gtc_matrix_transform
+       template <typename T>
+       GLM_FUNC_DECL tmat4x4<T, defaultp> frustum(
+               T left,
+               T right,
+               T bottom,
+               T top,
+               T near,
+               T far);
+
+       /// Creates a matrix for a symetric perspective-view frustum.
+       /// 
+       /// @param fovy Specifies the field of view angle, in degrees, in the y direction. Expressed in radians.
+       /// @param aspect Specifies the aspect ratio that determines the field of view in the x direction. The aspect ratio is the ratio of x (width) to y (height).
+       /// @param near Specifies the distance from the viewer to the near clipping plane (always positive).
+       /// @param far Specifies the distance from the viewer to the far clipping plane (always positive).
+       /// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double.
+       /// @see gtc_matrix_transform
+       template <typename T>
+       GLM_FUNC_DECL tmat4x4<T, defaultp> perspective(
+               T fovy,
+               T aspect,
+               T near,
+               T far);
+
+       /// Builds a perspective projection matrix based on a field of view.
+       /// 
+       /// @param fov Expressed in radians.
+       /// @param width 
+       /// @param height 
+       /// @param near Specifies the distance from the viewer to the near clipping plane (always positive).
+       /// @param far Specifies the distance from the viewer to the far clipping plane (always positive).
+       /// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double.
+       /// @see gtc_matrix_transform
+       template <typename T>
+       GLM_FUNC_DECL tmat4x4<T, defaultp> perspectiveFov(
+               T fov,
+               T width,
+               T height,
+               T near,
+               T far);
+
+       /// Creates a matrix for a symmetric perspective-view frustum with far plane at infinite.
+       /// 
+       /// @param fovy Specifies the field of view angle, in degrees, in the y direction. Expressed in radians.
+       /// @param aspect Specifies the aspect ratio that determines the field of view in the x direction. The aspect ratio is the ratio of x (width) to y (height).
+       /// @param near Specifies the distance from the viewer to the near clipping plane (always positive).
+       /// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double.
+       /// @see gtc_matrix_transform
+       template <typename T>
+       GLM_FUNC_DECL tmat4x4<T, defaultp> infinitePerspective(
+               T fovy, T aspect, T near);
+
+       /// Creates a matrix for a symmetric perspective-view frustum with far plane at infinite for graphics hardware that doesn't support depth clamping.
+       /// 
+       /// @param fovy Specifies the field of view angle, in degrees, in the y direction. Expressed in radians.
+       /// @param aspect Specifies the aspect ratio that determines the field of view in the x direction. The aspect ratio is the ratio of x (width) to y (height).
+       /// @param near Specifies the distance from the viewer to the near clipping plane (always positive).
+       /// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double.
+       /// @see gtc_matrix_transform
+       template <typename T>
+       GLM_FUNC_DECL tmat4x4<T, defaultp> tweakedInfinitePerspective(
+               T fovy, T aspect, T near);
+
+       /// Creates a matrix for a symmetric perspective-view frustum with far plane at infinite for graphics hardware that doesn't support depth clamping.
+       /// 
+       /// @param fovy Specifies the field of view angle, in degrees, in the y direction. Expressed in radians.
+       /// @param aspect Specifies the aspect ratio that determines the field of view in the x direction. The aspect ratio is the ratio of x (width) to y (height).
+       /// @param near Specifies the distance from the viewer to the near clipping plane (always positive).
+       /// @param ep 
+       /// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double.
+       /// @see gtc_matrix_transform
+       template <typename T>
+       GLM_FUNC_DECL tmat4x4<T, defaultp> tweakedInfinitePerspective(
+               T fovy, T aspect, T near, T ep);
+
+       /// Map the specified object coordinates (obj.x, obj.y, obj.z) into window coordinates.
+       /// 
+       /// @param obj Specify the object coordinates.
+       /// @param model Specifies the current modelview matrix
+       /// @param proj Specifies the current projection matrix
+       /// @param viewport Specifies the current viewport
+       /// @return Return the computed window coordinates.
+       /// @tparam T Native type used for the computation. Currently supported: half (not recommanded), float or double.
+       /// @tparam U Currently supported: Floating-point types and integer types.
+       /// @see gtc_matrix_transform
+       template <typename T, typename U, precision P>
+       GLM_FUNC_DECL tvec3<T, P> project(
+               tvec3<T, P> const & obj,
+               tmat4x4<T, P> const & model,
+               tmat4x4<T, P> const & proj,
+               tvec4<U, P> const & viewport);
+
+       /// Map the specified window coordinates (win.x, win.y, win.z) into object coordinates.
+       ///
+       /// @param win Specify the window coordinates to be mapped.
+       /// @param model Specifies the modelview matrix
+       /// @param proj Specifies the projection matrix
+       /// @param viewport Specifies the viewport
+       /// @return Returns the computed object coordinates.
+       /// @tparam T Native type used for the computation. Currently supported: half (not recommanded), float or double.
+       /// @tparam U Currently supported: Floating-point types and integer types.
+       /// @see gtc_matrix_transform
+       template <typename T, typename U, precision P>
+       GLM_FUNC_DECL tvec3<T, P> unProject(
+               tvec3<T, P> const & win,
+               tmat4x4<T, P> const & model,
+               tmat4x4<T, P> const & proj,
+               tvec4<U, P> const & viewport);
+
+       /// Define a picking region
+       ///
+       /// @param center
+       /// @param delta
+       /// @param viewport
+       /// @tparam T Native type used for the computation. Currently supported: half (not recommanded), float or double.
+       /// @tparam U Currently supported: Floating-point types and integer types.
+       /// @see gtc_matrix_transform
+       template <typename T, precision P, typename U>
+       GLM_FUNC_DECL tmat4x4<T, P> pickMatrix(
+               tvec2<T, P> const & center,
+               tvec2<T, P> const & delta,
+               tvec4<U, P> const & viewport);
+
+       /// Build a look at view matrix.
+       ///
+       /// @param eye Position of the camera
+       /// @param center Position where the camera is looking at
+       /// @param up Normalized up vector, how the camera is oriented. Typically (0, 0, 1)
+       /// @see gtc_matrix_transform
+       /// @see - frustum(T const & left, T const & right, T const & bottom, T const & top, T const & nearVal, T const & farVal) frustum(T const & left, T const & right, T const & bottom, T const & top, T const & nearVal, T const & farVal)
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat4x4<T, P> lookAt(
+               tvec3<T, P> const & eye,
+               tvec3<T, P> const & center,
+               tvec3<T, P> const & up);
+
+       /// @}
+}//namespace glm
+
+#include "matrix_transform.inl"
diff --git a/include/glm/gtc/matrix_transform.inl b/include/glm/gtc/matrix_transform.inl
new file mode 100644 (file)
index 0000000..25df2e3
--- /dev/null
@@ -0,0 +1,413 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtc_matrix_transform
+/// @file glm/gtc/matrix_transform.inl
+/// @date 2009-04-29 / 2011-06-15
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////
+
+#include "../geometric.hpp"
+#include "../trigonometric.hpp"
+#include "../matrix.hpp"
+
+namespace glm
+{
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat4x4<T, P> translate
+       (
+               tmat4x4<T, P> const & m,
+               tvec3<T, P> const & v
+       )
+       {
+               tmat4x4<T, P> Result(m);
+               Result[3] = m[0] * v[0] + m[1] * v[1] + m[2] * v[2] + m[3];
+               return Result;
+       }
+       
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat4x4<T, P> rotate
+       (
+               tmat4x4<T, P> const & m,
+               T angle,
+               tvec3<T, P> const & v
+       )
+       {
+               T const a = angle;
+               T const c = cos(a);
+               T const s = sin(a);
+
+               tvec3<T, P> axis(normalize(v));
+               tvec3<T, P> temp((T(1) - c) * axis);
+
+               tmat4x4<T, P> Rotate(uninitialize);
+               Rotate[0][0] = c + temp[0] * axis[0];
+               Rotate[0][1] = 0 + temp[0] * axis[1] + s * axis[2];
+               Rotate[0][2] = 0 + temp[0] * axis[2] - s * axis[1];
+
+               Rotate[1][0] = 0 + temp[1] * axis[0] - s * axis[2];
+               Rotate[1][1] = c + temp[1] * axis[1];
+               Rotate[1][2] = 0 + temp[1] * axis[2] + s * axis[0];
+
+               Rotate[2][0] = 0 + temp[2] * axis[0] + s * axis[1];
+               Rotate[2][1] = 0 + temp[2] * axis[1] - s * axis[0];
+               Rotate[2][2] = c + temp[2] * axis[2];
+
+               tmat4x4<T, P> Result(uninitialize);
+               Result[0] = m[0] * Rotate[0][0] + m[1] * Rotate[0][1] + m[2] * Rotate[0][2];
+               Result[1] = m[0] * Rotate[1][0] + m[1] * Rotate[1][1] + m[2] * Rotate[1][2];
+               Result[2] = m[0] * Rotate[2][0] + m[1] * Rotate[2][1] + m[2] * Rotate[2][2];
+               Result[3] = m[3];
+               return Result;
+       }
+               
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat4x4<T, P> rotate_slow
+       (
+               tmat4x4<T, P> const & m,
+               T angle, 
+               tvec3<T, P> const & v
+       )
+       {
+               T const a = angle;
+               T const c = cos(a);
+               T const s = sin(a);
+               tmat4x4<T, P> Result;
+
+               tvec3<T, P> axis = normalize(v);
+
+               Result[0][0] = c + (1 - c)      * axis.x     * axis.x;
+               Result[0][1] = (1 - c) * axis.x * axis.y + s * axis.z;
+               Result[0][2] = (1 - c) * axis.x * axis.z - s * axis.y;
+               Result[0][3] = 0;
+
+               Result[1][0] = (1 - c) * axis.y * axis.x - s * axis.z;
+               Result[1][1] = c + (1 - c) * axis.y * axis.y;
+               Result[1][2] = (1 - c) * axis.y * axis.z + s * axis.x;
+               Result[1][3] = 0;
+
+               Result[2][0] = (1 - c) * axis.z * axis.x + s * axis.y;
+               Result[2][1] = (1 - c) * axis.z * axis.y - s * axis.x;
+               Result[2][2] = c + (1 - c) * axis.z * axis.z;
+               Result[2][3] = 0;
+
+               Result[3] = tvec4<T, P>(0, 0, 0, 1);
+               return m * Result;
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat4x4<T, P> scale
+       (
+               tmat4x4<T, P> const & m,
+               tvec3<T, P> const & v
+       )
+       {
+               tmat4x4<T, P> Result(uninitialize);
+               Result[0] = m[0] * v[0];
+               Result[1] = m[1] * v[1];
+               Result[2] = m[2] * v[2];
+               Result[3] = m[3];
+               return Result;
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat4x4<T, P> scale_slow
+       (
+               tmat4x4<T, P> const & m,
+               tvec3<T, P> const & v
+       )
+       {
+               tmat4x4<T, P> Result(T(1));
+               Result[0][0] = v.x;
+               Result[1][1] = v.y;
+               Result[2][2] = v.z;
+               return m * Result;
+       }
+
+       template <typename T>
+       GLM_FUNC_QUALIFIER tmat4x4<T, defaultp> ortho
+       (
+               T left,
+               T right,
+               T bottom,
+               T top,
+               T zNear,
+               T zFar
+       )
+       {
+               tmat4x4<T, defaultp> Result(1);
+               Result[0][0] = static_cast<T>(2) / (right - left);
+               Result[1][1] = static_cast<T>(2) / (top - bottom);
+               Result[2][2] = - static_cast<T>(2) / (zFar - zNear);
+               Result[3][0] = - (right + left) / (right - left);
+               Result[3][1] = - (top + bottom) / (top - bottom);
+               Result[3][2] = - (zFar + zNear) / (zFar - zNear);
+               return Result;
+       }
+
+       template <typename T>
+       GLM_FUNC_QUALIFIER tmat4x4<T, defaultp> ortho
+       (
+               T left,
+               T right,
+               T bottom,
+               T top
+       )
+       {
+               tmat4x4<T, defaultp> Result(1);
+               Result[0][0] = static_cast<T>(2) / (right - left);
+               Result[1][1] = static_cast<T>(2) / (top - bottom);
+               Result[2][2] = - static_cast<T>(1);
+               Result[3][0] = - (right + left) / (right - left);
+               Result[3][1] = - (top + bottom) / (top - bottom);
+               return Result;
+       }
+
+       template <typename T>
+       GLM_FUNC_QUALIFIER tmat4x4<T, defaultp> frustum
+       (
+               T left,
+               T right,
+               T bottom,
+               T top,
+               T nearVal,
+               T farVal
+       )
+       {
+               tmat4x4<T, defaultp> Result(0);
+               Result[0][0] = (static_cast<T>(2) * nearVal) / (right - left);
+               Result[1][1] = (static_cast<T>(2) * nearVal) / (top - bottom);
+               Result[2][0] = (right + left) / (right - left);
+               Result[2][1] = (top + bottom) / (top - bottom);
+               Result[2][2] = -(farVal + nearVal) / (farVal - nearVal);
+               Result[2][3] = static_cast<T>(-1);
+               Result[3][2] = -(static_cast<T>(2) * farVal * nearVal) / (farVal - nearVal);
+               return Result;
+       }
+
+       template <typename T>
+       GLM_FUNC_QUALIFIER tmat4x4<T, defaultp> perspective
+       (
+               T fovy,
+               T aspect,
+               T zNear,
+               T zFar
+       )
+       {
+               assert(abs(aspect - std::numeric_limits<T>::epsilon()) > static_cast<T>(0));
+
+               T const tanHalfFovy = tan(fovy / static_cast<T>(2));
+
+               tmat4x4<T, defaultp> Result(static_cast<T>(0));
+               Result[0][0] = static_cast<T>(1) / (aspect * tanHalfFovy);
+               Result[1][1] = static_cast<T>(1) / (tanHalfFovy);
+               Result[2][2] = - (zFar + zNear) / (zFar - zNear);
+               Result[2][3] = - static_cast<T>(1);
+               Result[3][2] = - (static_cast<T>(2) * zFar * zNear) / (zFar - zNear);
+               return Result;
+       }
+       
+       template <typename T>
+       GLM_FUNC_QUALIFIER tmat4x4<T, defaultp> perspectiveFov
+       (
+               T fov,
+               T width,
+               T height,
+               T zNear,
+               T zFar
+       )
+       {
+               assert(width > static_cast<T>(0));
+               assert(height > static_cast<T>(0));
+               assert(fov > static_cast<T>(0));
+       
+               T const rad = fov;
+               T const h = glm::cos(static_cast<T>(0.5) * rad) / glm::sin(static_cast<T>(0.5) * rad);
+               T const w = h * height / width; ///todo max(width , Height) / min(width , Height)?
+
+               tmat4x4<T, defaultp> Result(static_cast<T>(0));
+               Result[0][0] = w;
+               Result[1][1] = h;
+               Result[2][2] = - (zFar + zNear) / (zFar - zNear);
+               Result[2][3] = - static_cast<T>(1);
+               Result[3][2] = - (static_cast<T>(2) * zFar * zNear) / (zFar - zNear);
+               return Result;
+       }
+
+       template <typename T>
+       GLM_FUNC_QUALIFIER tmat4x4<T, defaultp> infinitePerspective
+       (
+               T fovy,
+               T aspect,
+               T zNear
+       )
+       {
+               T const range = tan(fovy / T(2)) * zNear;
+               T const left = -range * aspect;
+               T const right = range * aspect;
+               T const bottom = -range;
+               T const top = range;
+
+               tmat4x4<T, defaultp> Result(T(0));
+               Result[0][0] = (T(2) * zNear) / (right - left);
+               Result[1][1] = (T(2) * zNear) / (top - bottom);
+               Result[2][2] = - T(1);
+               Result[2][3] = - T(1);
+               Result[3][2] = - T(2) * zNear;
+               return Result;
+       }
+
+       // Infinite projection matrix: http://www.terathon.com/gdc07_lengyel.pdf
+       template <typename T>
+       GLM_FUNC_QUALIFIER tmat4x4<T, defaultp> tweakedInfinitePerspective
+       (
+               T fovy,
+               T aspect,
+               T zNear,
+               T ep
+       )
+       {
+               T const range = tan(fovy / T(2)) * zNear;       
+               T const left = -range * aspect;
+               T const right = range * aspect;
+               T const bottom = -range;
+               T const top = range;
+
+               tmat4x4<T, defaultp> Result(T(0));
+               Result[0][0] = (static_cast<T>(2) * zNear) / (right - left);
+               Result[1][1] = (static_cast<T>(2) * zNear) / (top - bottom);
+               Result[2][2] = ep - static_cast<T>(1);
+               Result[2][3] = static_cast<T>(-1);
+               Result[3][2] = (ep - static_cast<T>(2)) * zNear;
+               return Result;
+       }
+
+       template <typename T>
+       GLM_FUNC_QUALIFIER tmat4x4<T, defaultp> tweakedInfinitePerspective
+       (
+               T fovy,
+               T aspect,
+               T zNear
+       )
+       {
+               return tweakedInfinitePerspective(fovy, aspect, zNear, epsilon<T>());
+       }
+
+       template <typename T, typename U, precision P>
+       GLM_FUNC_QUALIFIER tvec3<T, P> project
+       (
+               tvec3<T, P> const & obj,
+               tmat4x4<T, P> const & model,
+               tmat4x4<T, P> const & proj,
+               tvec4<U, P> const & viewport
+       )
+       {
+               tvec4<T, P> tmp = tvec4<T, P>(obj, T(1));
+               tmp = model * tmp;
+               tmp = proj * tmp;
+
+               tmp /= tmp.w;
+               tmp = tmp * T(0.5) + T(0.5);
+               tmp[0] = tmp[0] * T(viewport[2]) + T(viewport[0]);
+               tmp[1] = tmp[1] * T(viewport[3]) + T(viewport[1]);
+
+               return tvec3<T, P>(tmp);
+       }
+
+       template <typename T, typename U, precision P>
+       GLM_FUNC_QUALIFIER tvec3<T, P> unProject
+       (
+               tvec3<T, P> const & win,
+               tmat4x4<T, P> const & model,
+               tmat4x4<T, P> const & proj,
+               tvec4<U, P> const & viewport
+       )
+       {
+               tmat4x4<T, P> Inverse = inverse(proj * model);
+
+               tvec4<T, P> tmp = tvec4<T, P>(win, T(1));
+               tmp.x = (tmp.x - T(viewport[0])) / T(viewport[2]);
+               tmp.y = (tmp.y - T(viewport[1])) / T(viewport[3]);
+               tmp = tmp * T(2) - T(1);
+
+               tvec4<T, P> obj = Inverse * tmp;
+               obj /= obj.w;
+
+               return tvec3<T, P>(obj);
+       }
+
+       template <typename T, precision P, typename U>
+       GLM_FUNC_QUALIFIER tmat4x4<T, P> pickMatrix
+       (
+               tvec2<T, P> const & center,
+               tvec2<T, P> const & delta,
+               tvec4<U, P> const & viewport
+       )
+       {
+               assert(delta.x > T(0) && delta.y > T(0));
+               tmat4x4<T, P> Result(1.0f);
+
+               if(!(delta.x > T(0) && delta.y > T(0)))
+                       return Result; // Error
+
+               tvec3<T, P> Temp(
+                       (T(viewport[2]) - T(2) * (center.x - T(viewport[0]))) / delta.x,
+                       (T(viewport[3]) - T(2) * (center.y - T(viewport[1]))) / delta.y,
+                       T(0));
+
+               // Translate and scale the picked region to the entire window
+               Result = translate(Result, Temp);
+               return scale(Result, tvec3<T, P>(T(viewport[2]) / delta.x, T(viewport[3]) / delta.y, T(1)));
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat4x4<T, P> lookAt
+       (
+               tvec3<T, P> const & eye,
+               tvec3<T, P> const & center,
+               tvec3<T, P> const & up
+       )
+       {
+               tvec3<T, P> const f(normalize(center - eye));
+               tvec3<T, P> const s(normalize(cross(f, up)));
+               tvec3<T, P> const u(cross(s, f));
+
+               tmat4x4<T, P> Result(1);
+               Result[0][0] = s.x;
+               Result[1][0] = s.y;
+               Result[2][0] = s.z;
+               Result[0][1] = u.x;
+               Result[1][1] = u.y;
+               Result[2][1] = u.z;
+               Result[0][2] =-f.x;
+               Result[1][2] =-f.y;
+               Result[2][2] =-f.z;
+               Result[3][0] =-dot(s, eye);
+               Result[3][1] =-dot(u, eye);
+               Result[3][2] = dot(f, eye);
+               return Result;
+       }
+}//namespace glm
diff --git a/include/glm/gtc/noise.hpp b/include/glm/gtc/noise.hpp
new file mode 100644 (file)
index 0000000..9bab7ba
--- /dev/null
@@ -0,0 +1,89 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtc_noise
+/// @file glm/gtc/noise.hpp
+/// @date 2011-04-21 / 2011-09-27
+/// @author Christophe Riccio
+///
+/// @see core (dependence)
+///
+/// @defgroup gtc_noise GLM_GTC_noise
+/// @ingroup gtc
+/// 
+/// Defines 2D, 3D and 4D procedural noise functions 
+/// Based on the work of Stefan Gustavson and Ashima Arts on "webgl-noise": 
+/// https://github.com/ashima/webgl-noise 
+/// Following Stefan Gustavson's paper "Simplex noise demystified": 
+/// http://www.itn.liu.se/~stegu/simplexnoise/simplexnoise.pdf
+/// <glm/gtc/noise.hpp> need to be included to use these functionalities.
+///////////////////////////////////////////////////////////////////////////////////
+
+#pragma once
+
+// Dependencies
+#include "../detail/setup.hpp"
+#include "../detail/precision.hpp"
+#include "../detail/_noise.hpp"
+#include "../geometric.hpp"
+#include "../common.hpp"
+#include "../vector_relational.hpp"
+#include "../vec2.hpp"
+#include "../vec3.hpp"
+#include "../vec4.hpp"
+
+#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
+#      pragma message("GLM: GLM_GTC_noise extension included")
+#endif
+
+namespace glm
+{
+       /// @addtogroup gtc_noise
+       /// @{
+
+       /// Classic perlin noise.
+       /// @see gtc_noise
+       template <typename T, precision P, template<typename, precision> class vecType>
+       GLM_FUNC_DECL T perlin(
+               vecType<T, P> const & p);
+               
+       /// Periodic perlin noise.
+       /// @see gtc_noise
+       template <typename T, precision P, template<typename, precision> class vecType>
+       GLM_FUNC_DECL T perlin(
+               vecType<T, P> const & p,
+               vecType<T, P> const & rep);
+
+       /// Simplex noise.
+       /// @see gtc_noise
+       template <typename T, precision P, template<typename, precision> class vecType>
+       GLM_FUNC_DECL T simplex(
+               vecType<T, P> const & p);
+
+       /// @}
+}//namespace glm
+
+#include "noise.inl"
diff --git a/include/glm/gtc/noise.inl b/include/glm/gtc/noise.inl
new file mode 100644 (file)
index 0000000..126c7dc
--- /dev/null
@@ -0,0 +1,837 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtc_noise
+/// @file glm/gtc/noise.inl
+/// @date 2011-04-21 / 2012-04-07
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////
+// Based on the work of Stefan Gustavson and Ashima Arts on "webgl-noise": 
+// https://github.com/ashima/webgl-noise 
+// Following Stefan Gustavson's paper "Simplex noise demystified": 
+// http://www.itn.liu.se/~stegu/simplexnoise/simplexnoise.pdf
+///////////////////////////////////////////////////////////////////////////////////
+
+namespace glm{
+namespace gtc
+{
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec4<T, P> grad4(T const & j, tvec4<T, P> const & ip)
+       {
+               tvec3<T, P> pXYZ = floor(fract(tvec3<T, P>(j) * tvec3<T, P>(ip)) * T(7)) * ip[2] - T(1);
+               T pW = static_cast<T>(1.5) - dot(abs(pXYZ), tvec3<T, P>(1));
+               tvec4<T, P> s = tvec4<T, P>(lessThan(tvec4<T, P>(pXYZ, pW), tvec4<T, P>(0.0)));
+               pXYZ = pXYZ + (tvec3<T, P>(s) * T(2) - T(1)) * s.w; 
+               return tvec4<T, P>(pXYZ, pW);
+       }
+}//namespace gtc
+
+       // Classic Perlin noise
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER T perlin(tvec2<T, P> const & Position)
+       {
+               tvec4<T, P> Pi = glm::floor(tvec4<T, P>(Position.x, Position.y, Position.x, Position.y)) + tvec4<T, P>(0.0, 0.0, 1.0, 1.0);
+               tvec4<T, P> Pf = glm::fract(tvec4<T, P>(Position.x, Position.y, Position.x, Position.y)) - tvec4<T, P>(0.0, 0.0, 1.0, 1.0);
+               Pi = mod(Pi, tvec4<T, P>(289)); // To avoid truncation effects in permutation
+               tvec4<T, P> ix(Pi.x, Pi.z, Pi.x, Pi.z);
+               tvec4<T, P> iy(Pi.y, Pi.y, Pi.w, Pi.w);
+               tvec4<T, P> fx(Pf.x, Pf.z, Pf.x, Pf.z);
+               tvec4<T, P> fy(Pf.y, Pf.y, Pf.w, Pf.w);
+
+               tvec4<T, P> i = detail::permute(detail::permute(ix) + iy);
+
+               tvec4<T, P> gx = static_cast<T>(2) * glm::fract(i / T(41)) - T(1);
+               tvec4<T, P> gy = glm::abs(gx) - T(0.5);
+               tvec4<T, P> tx = glm::floor(gx + T(0.5));
+               gx = gx - tx;
+
+               tvec2<T, P> g00(gx.x, gy.x);
+               tvec2<T, P> g10(gx.y, gy.y);
+               tvec2<T, P> g01(gx.z, gy.z);
+               tvec2<T, P> g11(gx.w, gy.w);
+
+               tvec4<T, P> norm = detail::taylorInvSqrt(tvec4<T, P>(dot(g00, g00), dot(g01, g01), dot(g10, g10), dot(g11, g11)));
+               g00 *= norm.x;
+               g01 *= norm.y;
+               g10 *= norm.z;
+               g11 *= norm.w;
+
+               T n00 = dot(g00, tvec2<T, P>(fx.x, fy.x));
+               T n10 = dot(g10, tvec2<T, P>(fx.y, fy.y));
+               T n01 = dot(g01, tvec2<T, P>(fx.z, fy.z));
+               T n11 = dot(g11, tvec2<T, P>(fx.w, fy.w));
+
+               tvec2<T, P> fade_xy = detail::fade(tvec2<T, P>(Pf.x, Pf.y));
+               tvec2<T, P> n_x = mix(tvec2<T, P>(n00, n01), tvec2<T, P>(n10, n11), fade_xy.x);
+               T n_xy = mix(n_x.x, n_x.y, fade_xy.y);
+               return T(2.3) * n_xy;
+       }
+
+       // Classic Perlin noise
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER T perlin(tvec3<T, P> const & Position)
+       {
+               tvec3<T, P> Pi0 = floor(Position); // Integer part for indexing
+               tvec3<T, P> Pi1 = Pi0 + T(1); // Integer part + 1
+               Pi0 = detail::mod289(Pi0);
+               Pi1 = detail::mod289(Pi1);
+               tvec3<T, P> Pf0 = fract(Position); // Fractional part for interpolation
+               tvec3<T, P> Pf1 = Pf0 - T(1); // Fractional part - 1.0
+               tvec4<T, P> ix(Pi0.x, Pi1.x, Pi0.x, Pi1.x);
+               tvec4<T, P> iy = tvec4<T, P>(tvec2<T, P>(Pi0.y), tvec2<T, P>(Pi1.y));
+               tvec4<T, P> iz0(Pi0.z);
+               tvec4<T, P> iz1(Pi1.z);
+
+               tvec4<T, P> ixy = detail::permute(detail::permute(ix) + iy);
+               tvec4<T, P> ixy0 = detail::permute(ixy + iz0);
+               tvec4<T, P> ixy1 = detail::permute(ixy + iz1);
+
+               tvec4<T, P> gx0 = ixy0 * T(1.0 / 7.0);
+               tvec4<T, P> gy0 = fract(floor(gx0) * T(1.0 / 7.0)) - T(0.5);
+               gx0 = fract(gx0);
+               tvec4<T, P> gz0 = tvec4<T, P>(0.5) - abs(gx0) - abs(gy0);
+               tvec4<T, P> sz0 = step(gz0, tvec4<T, P>(0.0));
+               gx0 -= sz0 * (step(T(0), gx0) - T(0.5));
+               gy0 -= sz0 * (step(T(0), gy0) - T(0.5));
+
+               tvec4<T, P> gx1 = ixy1 * T(1.0 / 7.0);
+               tvec4<T, P> gy1 = fract(floor(gx1) * T(1.0 / 7.0)) - T(0.5);
+               gx1 = fract(gx1);
+               tvec4<T, P> gz1 = tvec4<T, P>(0.5) - abs(gx1) - abs(gy1);
+               tvec4<T, P> sz1 = step(gz1, tvec4<T, P>(0.0));
+               gx1 -= sz1 * (step(T(0), gx1) - T(0.5));
+               gy1 -= sz1 * (step(T(0), gy1) - T(0.5));
+
+               tvec3<T, P> g000(gx0.x, gy0.x, gz0.x);
+               tvec3<T, P> g100(gx0.y, gy0.y, gz0.y);
+               tvec3<T, P> g010(gx0.z, gy0.z, gz0.z);
+               tvec3<T, P> g110(gx0.w, gy0.w, gz0.w);
+               tvec3<T, P> g001(gx1.x, gy1.x, gz1.x);
+               tvec3<T, P> g101(gx1.y, gy1.y, gz1.y);
+               tvec3<T, P> g011(gx1.z, gy1.z, gz1.z);
+               tvec3<T, P> g111(gx1.w, gy1.w, gz1.w);
+
+               tvec4<T, P> norm0 = detail::taylorInvSqrt(tvec4<T, P>(dot(g000, g000), dot(g010, g010), dot(g100, g100), dot(g110, g110)));
+               g000 *= norm0.x;
+               g010 *= norm0.y;
+               g100 *= norm0.z;
+               g110 *= norm0.w;
+               tvec4<T, P> norm1 = detail::taylorInvSqrt(tvec4<T, P>(dot(g001, g001), dot(g011, g011), dot(g101, g101), dot(g111, g111)));
+               g001 *= norm1.x;
+               g011 *= norm1.y;
+               g101 *= norm1.z;
+               g111 *= norm1.w;
+
+               T n000 = dot(g000, Pf0);
+               T n100 = dot(g100, tvec3<T, P>(Pf1.x, Pf0.y, Pf0.z));
+               T n010 = dot(g010, tvec3<T, P>(Pf0.x, Pf1.y, Pf0.z));
+               T n110 = dot(g110, tvec3<T, P>(Pf1.x, Pf1.y, Pf0.z));
+               T n001 = dot(g001, tvec3<T, P>(Pf0.x, Pf0.y, Pf1.z));
+               T n101 = dot(g101, tvec3<T, P>(Pf1.x, Pf0.y, Pf1.z));
+               T n011 = dot(g011, tvec3<T, P>(Pf0.x, Pf1.y, Pf1.z));
+               T n111 = dot(g111, Pf1);
+
+               tvec3<T, P> fade_xyz = detail::fade(Pf0);
+               tvec4<T, P> n_z = mix(tvec4<T, P>(n000, n100, n010, n110), tvec4<T, P>(n001, n101, n011, n111), fade_xyz.z);
+               tvec2<T, P> n_yz = mix(tvec2<T, P>(n_z.x, n_z.y), tvec2<T, P>(n_z.z, n_z.w), fade_xyz.y);
+               T n_xyz = mix(n_yz.x, n_yz.y, fade_xyz.x); 
+               return T(2.2) * n_xyz;
+       }
+       /*
+       // Classic Perlin noise
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER T perlin(tvec3<T, P> const & P)
+       {
+               tvec3<T, P> Pi0 = floor(P); // Integer part for indexing
+               tvec3<T, P> Pi1 = Pi0 + T(1); // Integer part + 1
+               Pi0 = mod(Pi0, T(289));
+               Pi1 = mod(Pi1, T(289));
+               tvec3<T, P> Pf0 = fract(P); // Fractional part for interpolation
+               tvec3<T, P> Pf1 = Pf0 - T(1); // Fractional part - 1.0
+               tvec4<T, P> ix(Pi0.x, Pi1.x, Pi0.x, Pi1.x);
+               tvec4<T, P> iy(Pi0.y, Pi0.y, Pi1.y, Pi1.y);
+               tvec4<T, P> iz0(Pi0.z);
+               tvec4<T, P> iz1(Pi1.z);
+
+               tvec4<T, P> ixy = permute(permute(ix) + iy);
+               tvec4<T, P> ixy0 = permute(ixy + iz0);
+               tvec4<T, P> ixy1 = permute(ixy + iz1);
+
+               tvec4<T, P> gx0 = ixy0 / T(7);
+               tvec4<T, P> gy0 = fract(floor(gx0) / T(7)) - T(0.5);
+               gx0 = fract(gx0);
+               tvec4<T, P> gz0 = tvec4<T, P>(0.5) - abs(gx0) - abs(gy0);
+               tvec4<T, P> sz0 = step(gz0, tvec4<T, P>(0.0));
+               gx0 -= sz0 * (step(0.0, gx0) - T(0.5));
+               gy0 -= sz0 * (step(0.0, gy0) - T(0.5));
+
+               tvec4<T, P> gx1 = ixy1 / T(7);
+               tvec4<T, P> gy1 = fract(floor(gx1) / T(7)) - T(0.5);
+               gx1 = fract(gx1);
+               tvec4<T, P> gz1 = tvec4<T, P>(0.5) - abs(gx1) - abs(gy1);
+               tvec4<T, P> sz1 = step(gz1, tvec4<T, P>(0.0));
+               gx1 -= sz1 * (step(T(0), gx1) - T(0.5));
+               gy1 -= sz1 * (step(T(0), gy1) - T(0.5));
+
+               tvec3<T, P> g000(gx0.x, gy0.x, gz0.x);
+               tvec3<T, P> g100(gx0.y, gy0.y, gz0.y);
+               tvec3<T, P> g010(gx0.z, gy0.z, gz0.z);
+               tvec3<T, P> g110(gx0.w, gy0.w, gz0.w);
+               tvec3<T, P> g001(gx1.x, gy1.x, gz1.x);
+               tvec3<T, P> g101(gx1.y, gy1.y, gz1.y);
+               tvec3<T, P> g011(gx1.z, gy1.z, gz1.z);
+               tvec3<T, P> g111(gx1.w, gy1.w, gz1.w);
+
+               tvec4<T, P> norm0 = taylorInvSqrt(tvec4<T, P>(dot(g000, g000), dot(g010, g010), dot(g100, g100), dot(g110, g110)));
+               g000 *= norm0.x;
+               g010 *= norm0.y;
+               g100 *= norm0.z;
+               g110 *= norm0.w;
+               tvec4<T, P> norm1 = taylorInvSqrt(tvec4<T, P>(dot(g001, g001), dot(g011, g011), dot(g101, g101), dot(g111, g111)));
+               g001 *= norm1.x;
+               g011 *= norm1.y;
+               g101 *= norm1.z;
+               g111 *= norm1.w;
+
+               T n000 = dot(g000, Pf0);
+               T n100 = dot(g100, tvec3<T, P>(Pf1.x, Pf0.y, Pf0.z));
+               T n010 = dot(g010, tvec3<T, P>(Pf0.x, Pf1.y, Pf0.z));
+               T n110 = dot(g110, tvec3<T, P>(Pf1.x, Pf1.y, Pf0.z));
+               T n001 = dot(g001, tvec3<T, P>(Pf0.x, Pf0.y, Pf1.z));
+               T n101 = dot(g101, tvec3<T, P>(Pf1.x, Pf0.y, Pf1.z));
+               T n011 = dot(g011, tvec3<T, P>(Pf0.x, Pf1.y, Pf1.z));
+               T n111 = dot(g111, Pf1);
+
+               tvec3<T, P> fade_xyz = fade(Pf0);
+               tvec4<T, P> n_z = mix(tvec4<T, P>(n000, n100, n010, n110), tvec4<T, P>(n001, n101, n011, n111), fade_xyz.z);
+               tvec2<T, P> n_yz = mix(
+                       tvec2<T, P>(n_z.x, n_z.y), 
+                       tvec2<T, P>(n_z.z, n_z.w), fade_xyz.y);
+               T n_xyz = mix(n_yz.x, n_yz.y, fade_xyz.x); 
+               return T(2.2) * n_xyz;
+       }
+       */
+       // Classic Perlin noise
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER T perlin(tvec4<T, P> const & Position)
+       {
+               tvec4<T, P> Pi0 = floor(Position);      // Integer part for indexing
+               tvec4<T, P> Pi1 = Pi0 + T(1);           // Integer part + 1
+               Pi0 = mod(Pi0, tvec4<T, P>(289));
+               Pi1 = mod(Pi1, tvec4<T, P>(289));
+               tvec4<T, P> Pf0 = fract(Position);      // Fractional part for interpolation
+               tvec4<T, P> Pf1 = Pf0 - T(1);           // Fractional part - 1.0
+               tvec4<T, P> ix(Pi0.x, Pi1.x, Pi0.x, Pi1.x);
+               tvec4<T, P> iy(Pi0.y, Pi0.y, Pi1.y, Pi1.y);
+               tvec4<T, P> iz0(Pi0.z);
+               tvec4<T, P> iz1(Pi1.z);
+               tvec4<T, P> iw0(Pi0.w);
+               tvec4<T, P> iw1(Pi1.w);
+
+               tvec4<T, P> ixy = detail::permute(detail::permute(ix) + iy);
+               tvec4<T, P> ixy0 = detail::permute(ixy + iz0);
+               tvec4<T, P> ixy1 = detail::permute(ixy + iz1);
+               tvec4<T, P> ixy00 = detail::permute(ixy0 + iw0);
+               tvec4<T, P> ixy01 = detail::permute(ixy0 + iw1);
+               tvec4<T, P> ixy10 = detail::permute(ixy1 + iw0);
+               tvec4<T, P> ixy11 = detail::permute(ixy1 + iw1);
+
+               tvec4<T, P> gx00 = ixy00 / T(7);
+               tvec4<T, P> gy00 = floor(gx00) / T(7);
+               tvec4<T, P> gz00 = floor(gy00) / T(6);
+               gx00 = fract(gx00) - T(0.5);
+               gy00 = fract(gy00) - T(0.5);
+               gz00 = fract(gz00) - T(0.5);
+               tvec4<T, P> gw00 = tvec4<T, P>(0.75) - abs(gx00) - abs(gy00) - abs(gz00);
+               tvec4<T, P> sw00 = step(gw00, tvec4<T, P>(0.0));
+               gx00 -= sw00 * (step(T(0), gx00) - T(0.5));
+               gy00 -= sw00 * (step(T(0), gy00) - T(0.5));
+
+               tvec4<T, P> gx01 = ixy01 / T(7);
+               tvec4<T, P> gy01 = floor(gx01) / T(7);
+               tvec4<T, P> gz01 = floor(gy01) / T(6);
+               gx01 = fract(gx01) - T(0.5);
+               gy01 = fract(gy01) - T(0.5);
+               gz01 = fract(gz01) - T(0.5);
+               tvec4<T, P> gw01 = tvec4<T, P>(0.75) - abs(gx01) - abs(gy01) - abs(gz01);
+               tvec4<T, P> sw01 = step(gw01, tvec4<T, P>(0.0));
+               gx01 -= sw01 * (step(T(0), gx01) - T(0.5));
+               gy01 -= sw01 * (step(T(0), gy01) - T(0.5));
+
+               tvec4<T, P> gx10 = ixy10 / T(7);
+               tvec4<T, P> gy10 = floor(gx10) / T(7);
+               tvec4<T, P> gz10 = floor(gy10) / T(6);
+               gx10 = fract(gx10) - T(0.5);
+               gy10 = fract(gy10) - T(0.5);
+               gz10 = fract(gz10) - T(0.5);
+               tvec4<T, P> gw10 = tvec4<T, P>(0.75) - abs(gx10) - abs(gy10) - abs(gz10);
+               tvec4<T, P> sw10 = step(gw10, tvec4<T, P>(0));
+               gx10 -= sw10 * (step(T(0), gx10) - T(0.5));
+               gy10 -= sw10 * (step(T(0), gy10) - T(0.5));
+
+               tvec4<T, P> gx11 = ixy11 / T(7);
+               tvec4<T, P> gy11 = floor(gx11) / T(7);
+               tvec4<T, P> gz11 = floor(gy11) / T(6);
+               gx11 = fract(gx11) - T(0.5);
+               gy11 = fract(gy11) - T(0.5);
+               gz11 = fract(gz11) - T(0.5);
+               tvec4<T, P> gw11 = tvec4<T, P>(0.75) - abs(gx11) - abs(gy11) - abs(gz11);
+               tvec4<T, P> sw11 = step(gw11, tvec4<T, P>(0.0));
+               gx11 -= sw11 * (step(T(0), gx11) - T(0.5));
+               gy11 -= sw11 * (step(T(0), gy11) - T(0.5));
+
+               tvec4<T, P> g0000(gx00.x, gy00.x, gz00.x, gw00.x);
+               tvec4<T, P> g1000(gx00.y, gy00.y, gz00.y, gw00.y);
+               tvec4<T, P> g0100(gx00.z, gy00.z, gz00.z, gw00.z);
+               tvec4<T, P> g1100(gx00.w, gy00.w, gz00.w, gw00.w);
+               tvec4<T, P> g0010(gx10.x, gy10.x, gz10.x, gw10.x);
+               tvec4<T, P> g1010(gx10.y, gy10.y, gz10.y, gw10.y);
+               tvec4<T, P> g0110(gx10.z, gy10.z, gz10.z, gw10.z);
+               tvec4<T, P> g1110(gx10.w, gy10.w, gz10.w, gw10.w);
+               tvec4<T, P> g0001(gx01.x, gy01.x, gz01.x, gw01.x);
+               tvec4<T, P> g1001(gx01.y, gy01.y, gz01.y, gw01.y);
+               tvec4<T, P> g0101(gx01.z, gy01.z, gz01.z, gw01.z);
+               tvec4<T, P> g1101(gx01.w, gy01.w, gz01.w, gw01.w);
+               tvec4<T, P> g0011(gx11.x, gy11.x, gz11.x, gw11.x);
+               tvec4<T, P> g1011(gx11.y, gy11.y, gz11.y, gw11.y);
+               tvec4<T, P> g0111(gx11.z, gy11.z, gz11.z, gw11.z);
+               tvec4<T, P> g1111(gx11.w, gy11.w, gz11.w, gw11.w);
+
+               tvec4<T, P> norm00 = detail::taylorInvSqrt(tvec4<T, P>(dot(g0000, g0000), dot(g0100, g0100), dot(g1000, g1000), dot(g1100, g1100)));
+               g0000 *= norm00.x;
+               g0100 *= norm00.y;
+               g1000 *= norm00.z;
+               g1100 *= norm00.w;
+
+               tvec4<T, P> norm01 = detail::taylorInvSqrt(tvec4<T, P>(dot(g0001, g0001), dot(g0101, g0101), dot(g1001, g1001), dot(g1101, g1101)));
+               g0001 *= norm01.x;
+               g0101 *= norm01.y;
+               g1001 *= norm01.z;
+               g1101 *= norm01.w;
+
+               tvec4<T, P> norm10 = detail::taylorInvSqrt(tvec4<T, P>(dot(g0010, g0010), dot(g0110, g0110), dot(g1010, g1010), dot(g1110, g1110)));
+               g0010 *= norm10.x;
+               g0110 *= norm10.y;
+               g1010 *= norm10.z;
+               g1110 *= norm10.w;
+
+               tvec4<T, P> norm11 = detail::taylorInvSqrt(tvec4<T, P>(dot(g0011, g0011), dot(g0111, g0111), dot(g1011, g1011), dot(g1111, g1111)));
+               g0011 *= norm11.x;
+               g0111 *= norm11.y;
+               g1011 *= norm11.z;
+               g1111 *= norm11.w;
+
+               T n0000 = dot(g0000, Pf0);
+               T n1000 = dot(g1000, tvec4<T, P>(Pf1.x, Pf0.y, Pf0.z, Pf0.w));
+               T n0100 = dot(g0100, tvec4<T, P>(Pf0.x, Pf1.y, Pf0.z, Pf0.w));
+               T n1100 = dot(g1100, tvec4<T, P>(Pf1.x, Pf1.y, Pf0.z, Pf0.w));
+               T n0010 = dot(g0010, tvec4<T, P>(Pf0.x, Pf0.y, Pf1.z, Pf0.w));
+               T n1010 = dot(g1010, tvec4<T, P>(Pf1.x, Pf0.y, Pf1.z, Pf0.w));
+               T n0110 = dot(g0110, tvec4<T, P>(Pf0.x, Pf1.y, Pf1.z, Pf0.w));
+               T n1110 = dot(g1110, tvec4<T, P>(Pf1.x, Pf1.y, Pf1.z, Pf0.w));
+               T n0001 = dot(g0001, tvec4<T, P>(Pf0.x, Pf0.y, Pf0.z, Pf1.w));
+               T n1001 = dot(g1001, tvec4<T, P>(Pf1.x, Pf0.y, Pf0.z, Pf1.w));
+               T n0101 = dot(g0101, tvec4<T, P>(Pf0.x, Pf1.y, Pf0.z, Pf1.w));
+               T n1101 = dot(g1101, tvec4<T, P>(Pf1.x, Pf1.y, Pf0.z, Pf1.w));
+               T n0011 = dot(g0011, tvec4<T, P>(Pf0.x, Pf0.y, Pf1.z, Pf1.w));
+               T n1011 = dot(g1011, tvec4<T, P>(Pf1.x, Pf0.y, Pf1.z, Pf1.w));
+               T n0111 = dot(g0111, tvec4<T, P>(Pf0.x, Pf1.y, Pf1.z, Pf1.w));
+               T n1111 = dot(g1111, Pf1);
+
+               tvec4<T, P> fade_xyzw = detail::fade(Pf0);
+               tvec4<T, P> n_0w = mix(tvec4<T, P>(n0000, n1000, n0100, n1100), tvec4<T, P>(n0001, n1001, n0101, n1101), fade_xyzw.w);
+               tvec4<T, P> n_1w = mix(tvec4<T, P>(n0010, n1010, n0110, n1110), tvec4<T, P>(n0011, n1011, n0111, n1111), fade_xyzw.w);
+               tvec4<T, P> n_zw = mix(n_0w, n_1w, fade_xyzw.z);
+               tvec2<T, P> n_yzw = mix(tvec2<T, P>(n_zw.x, n_zw.y), tvec2<T, P>(n_zw.z, n_zw.w), fade_xyzw.y);
+               T n_xyzw = mix(n_yzw.x, n_yzw.y, fade_xyzw.x);
+               return T(2.2) * n_xyzw;
+       }
+
+       // Classic Perlin noise, periodic variant
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER T perlin(tvec2<T, P> const & Position, tvec2<T, P> const & rep)
+       {
+               tvec4<T, P> Pi = floor(tvec4<T, P>(Position.x, Position.y, Position.x, Position.y)) + tvec4<T, P>(0.0, 0.0, 1.0, 1.0);
+               tvec4<T, P> Pf = fract(tvec4<T, P>(Position.x, Position.y, Position.x, Position.y)) - tvec4<T, P>(0.0, 0.0, 1.0, 1.0);
+               Pi = mod(Pi, tvec4<T, P>(rep.x, rep.y, rep.x, rep.y)); // To create noise with explicit period
+               Pi = mod(Pi, tvec4<T, P>(289)); // To avoid truncation effects in permutation
+               tvec4<T, P> ix(Pi.x, Pi.z, Pi.x, Pi.z);
+               tvec4<T, P> iy(Pi.y, Pi.y, Pi.w, Pi.w);
+               tvec4<T, P> fx(Pf.x, Pf.z, Pf.x, Pf.z);
+               tvec4<T, P> fy(Pf.y, Pf.y, Pf.w, Pf.w);
+
+               tvec4<T, P> i = detail::permute(detail::permute(ix) + iy);
+
+               tvec4<T, P> gx = static_cast<T>(2) * fract(i / T(41)) - T(1);
+               tvec4<T, P> gy = abs(gx) - T(0.5);
+               tvec4<T, P> tx = floor(gx + T(0.5));
+               gx = gx - tx;
+
+               tvec2<T, P> g00(gx.x, gy.x);
+               tvec2<T, P> g10(gx.y, gy.y);
+               tvec2<T, P> g01(gx.z, gy.z);
+               tvec2<T, P> g11(gx.w, gy.w);
+
+               tvec4<T, P> norm = detail::taylorInvSqrt(tvec4<T, P>(dot(g00, g00), dot(g01, g01), dot(g10, g10), dot(g11, g11)));
+               g00 *= norm.x;
+               g01 *= norm.y;
+               g10 *= norm.z;
+               g11 *= norm.w;
+
+               T n00 = dot(g00, tvec2<T, P>(fx.x, fy.x));
+               T n10 = dot(g10, tvec2<T, P>(fx.y, fy.y));
+               T n01 = dot(g01, tvec2<T, P>(fx.z, fy.z));
+               T n11 = dot(g11, tvec2<T, P>(fx.w, fy.w));
+
+               tvec2<T, P> fade_xy = detail::fade(tvec2<T, P>(Pf.x, Pf.y));
+               tvec2<T, P> n_x = mix(tvec2<T, P>(n00, n01), tvec2<T, P>(n10, n11), fade_xy.x);
+               T n_xy = mix(n_x.x, n_x.y, fade_xy.y);
+               return T(2.3) * n_xy;
+       }
+
+       // Classic Perlin noise, periodic variant
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER T perlin(tvec3<T, P> const & Position, tvec3<T, P> const & rep)
+       {
+               tvec3<T, P> Pi0 = mod(floor(Position), rep); // Integer part, modulo period
+               tvec3<T, P> Pi1 = mod(Pi0 + tvec3<T, P>(T(1)), rep); // Integer part + 1, mod period
+               Pi0 = mod(Pi0, tvec3<T, P>(289));
+               Pi1 = mod(Pi1, tvec3<T, P>(289));
+               tvec3<T, P> Pf0 = fract(Position); // Fractional part for interpolation
+               tvec3<T, P> Pf1 = Pf0 - tvec3<T, P>(T(1)); // Fractional part - 1.0
+               tvec4<T, P> ix = tvec4<T, P>(Pi0.x, Pi1.x, Pi0.x, Pi1.x);
+               tvec4<T, P> iy = tvec4<T, P>(Pi0.y, Pi0.y, Pi1.y, Pi1.y);
+               tvec4<T, P> iz0(Pi0.z);
+               tvec4<T, P> iz1(Pi1.z);
+
+               tvec4<T, P> ixy = detail::permute(detail::permute(ix) + iy);
+               tvec4<T, P> ixy0 = detail::permute(ixy + iz0);
+               tvec4<T, P> ixy1 = detail::permute(ixy + iz1);
+
+               tvec4<T, P> gx0 = ixy0 / T(7);
+               tvec4<T, P> gy0 = fract(floor(gx0) / T(7)) - T(0.5);
+               gx0 = fract(gx0);
+               tvec4<T, P> gz0 = tvec4<T, P>(0.5) - abs(gx0) - abs(gy0);
+               tvec4<T, P> sz0 = step(gz0, tvec4<T, P>(0));
+               gx0 -= sz0 * (step(T(0), gx0) - T(0.5));
+               gy0 -= sz0 * (step(T(0), gy0) - T(0.5));
+
+               tvec4<T, P> gx1 = ixy1 / T(7);
+               tvec4<T, P> gy1 = fract(floor(gx1) / T(7)) - T(0.5);
+               gx1 = fract(gx1);
+               tvec4<T, P> gz1 = tvec4<T, P>(0.5) - abs(gx1) - abs(gy1);
+               tvec4<T, P> sz1 = step(gz1, tvec4<T, P>(T(0)));
+               gx1 -= sz1 * (step(T(0), gx1) - T(0.5));
+               gy1 -= sz1 * (step(T(0), gy1) - T(0.5));
+
+               tvec3<T, P> g000 = tvec3<T, P>(gx0.x, gy0.x, gz0.x);
+               tvec3<T, P> g100 = tvec3<T, P>(gx0.y, gy0.y, gz0.y);
+               tvec3<T, P> g010 = tvec3<T, P>(gx0.z, gy0.z, gz0.z);
+               tvec3<T, P> g110 = tvec3<T, P>(gx0.w, gy0.w, gz0.w);
+               tvec3<T, P> g001 = tvec3<T, P>(gx1.x, gy1.x, gz1.x);
+               tvec3<T, P> g101 = tvec3<T, P>(gx1.y, gy1.y, gz1.y);
+               tvec3<T, P> g011 = tvec3<T, P>(gx1.z, gy1.z, gz1.z);
+               tvec3<T, P> g111 = tvec3<T, P>(gx1.w, gy1.w, gz1.w);
+
+               tvec4<T, P> norm0 = detail::taylorInvSqrt(tvec4<T, P>(dot(g000, g000), dot(g010, g010), dot(g100, g100), dot(g110, g110)));
+               g000 *= norm0.x;
+               g010 *= norm0.y;
+               g100 *= norm0.z;
+               g110 *= norm0.w;
+               tvec4<T, P> norm1 = detail::taylorInvSqrt(tvec4<T, P>(dot(g001, g001), dot(g011, g011), dot(g101, g101), dot(g111, g111)));
+               g001 *= norm1.x;
+               g011 *= norm1.y;
+               g101 *= norm1.z;
+               g111 *= norm1.w;
+
+               T n000 = dot(g000, Pf0);
+               T n100 = dot(g100, tvec3<T, P>(Pf1.x, Pf0.y, Pf0.z));
+               T n010 = dot(g010, tvec3<T, P>(Pf0.x, Pf1.y, Pf0.z));
+               T n110 = dot(g110, tvec3<T, P>(Pf1.x, Pf1.y, Pf0.z));
+               T n001 = dot(g001, tvec3<T, P>(Pf0.x, Pf0.y, Pf1.z));
+               T n101 = dot(g101, tvec3<T, P>(Pf1.x, Pf0.y, Pf1.z));
+               T n011 = dot(g011, tvec3<T, P>(Pf0.x, Pf1.y, Pf1.z));
+               T n111 = dot(g111, Pf1);
+
+               tvec3<T, P> fade_xyz = detail::fade(Pf0);
+               tvec4<T, P> n_z = mix(tvec4<T, P>(n000, n100, n010, n110), tvec4<T, P>(n001, n101, n011, n111), fade_xyz.z);
+               tvec2<T, P> n_yz = mix(tvec2<T, P>(n_z.x, n_z.y), tvec2<T, P>(n_z.z, n_z.w), fade_xyz.y);
+               T n_xyz = mix(n_yz.x, n_yz.y, fade_xyz.x);
+               return T(2.2) * n_xyz;
+       }
+
+       // Classic Perlin noise, periodic version
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER T perlin(tvec4<T, P> const & Position, tvec4<T, P> const & rep)
+       {
+               tvec4<T, P> Pi0 = mod(floor(Position), rep); // Integer part modulo rep
+               tvec4<T, P> Pi1 = mod(Pi0 + T(1), rep); // Integer part + 1 mod rep
+               tvec4<T, P> Pf0 = fract(Position); // Fractional part for interpolation
+               tvec4<T, P> Pf1 = Pf0 - T(1); // Fractional part - 1.0
+               tvec4<T, P> ix = tvec4<T, P>(Pi0.x, Pi1.x, Pi0.x, Pi1.x);
+               tvec4<T, P> iy = tvec4<T, P>(Pi0.y, Pi0.y, Pi1.y, Pi1.y);
+               tvec4<T, P> iz0(Pi0.z);
+               tvec4<T, P> iz1(Pi1.z);
+               tvec4<T, P> iw0(Pi0.w);
+               tvec4<T, P> iw1(Pi1.w);
+
+               tvec4<T, P> ixy = detail::permute(detail::permute(ix) + iy);
+               tvec4<T, P> ixy0 = detail::permute(ixy + iz0);
+               tvec4<T, P> ixy1 = detail::permute(ixy + iz1);
+               tvec4<T, P> ixy00 = detail::permute(ixy0 + iw0);
+               tvec4<T, P> ixy01 = detail::permute(ixy0 + iw1);
+               tvec4<T, P> ixy10 = detail::permute(ixy1 + iw0);
+               tvec4<T, P> ixy11 = detail::permute(ixy1 + iw1);
+
+               tvec4<T, P> gx00 = ixy00 / T(7);
+               tvec4<T, P> gy00 = floor(gx00) / T(7);
+               tvec4<T, P> gz00 = floor(gy00) / T(6);
+               gx00 = fract(gx00) - T(0.5);
+               gy00 = fract(gy00) - T(0.5);
+               gz00 = fract(gz00) - T(0.5);
+               tvec4<T, P> gw00 = tvec4<T, P>(0.75) - abs(gx00) - abs(gy00) - abs(gz00);
+               tvec4<T, P> sw00 = step(gw00, tvec4<T, P>(0));
+               gx00 -= sw00 * (step(T(0), gx00) - T(0.5));
+               gy00 -= sw00 * (step(T(0), gy00) - T(0.5));
+
+               tvec4<T, P> gx01 = ixy01 / T(7);
+               tvec4<T, P> gy01 = floor(gx01) / T(7);
+               tvec4<T, P> gz01 = floor(gy01) / T(6);
+               gx01 = fract(gx01) - T(0.5);
+               gy01 = fract(gy01) - T(0.5);
+               gz01 = fract(gz01) - T(0.5);
+               tvec4<T, P> gw01 = tvec4<T, P>(0.75) - abs(gx01) - abs(gy01) - abs(gz01);
+               tvec4<T, P> sw01 = step(gw01, tvec4<T, P>(0.0));
+               gx01 -= sw01 * (step(T(0), gx01) - T(0.5));
+               gy01 -= sw01 * (step(T(0), gy01) - T(0.5));
+
+               tvec4<T, P> gx10 = ixy10 / T(7);
+               tvec4<T, P> gy10 = floor(gx10) / T(7);
+               tvec4<T, P> gz10 = floor(gy10) / T(6);
+               gx10 = fract(gx10) - T(0.5);
+               gy10 = fract(gy10) - T(0.5);
+               gz10 = fract(gz10) - T(0.5);
+               tvec4<T, P> gw10 = tvec4<T, P>(0.75) - abs(gx10) - abs(gy10) - abs(gz10);
+               tvec4<T, P> sw10 = step(gw10, tvec4<T, P>(0.0));
+               gx10 -= sw10 * (step(T(0), gx10) - T(0.5));
+               gy10 -= sw10 * (step(T(0), gy10) - T(0.5));
+
+               tvec4<T, P> gx11 = ixy11 / T(7);
+               tvec4<T, P> gy11 = floor(gx11) / T(7);
+               tvec4<T, P> gz11 = floor(gy11) / T(6);
+               gx11 = fract(gx11) - T(0.5);
+               gy11 = fract(gy11) - T(0.5);
+               gz11 = fract(gz11) - T(0.5);
+               tvec4<T, P> gw11 = tvec4<T, P>(0.75) - abs(gx11) - abs(gy11) - abs(gz11);
+               tvec4<T, P> sw11 = step(gw11, tvec4<T, P>(T(0)));
+               gx11 -= sw11 * (step(T(0), gx11) - T(0.5));
+               gy11 -= sw11 * (step(T(0), gy11) - T(0.5));
+
+               tvec4<T, P> g0000(gx00.x, gy00.x, gz00.x, gw00.x);
+               tvec4<T, P> g1000(gx00.y, gy00.y, gz00.y, gw00.y);
+               tvec4<T, P> g0100(gx00.z, gy00.z, gz00.z, gw00.z);
+               tvec4<T, P> g1100(gx00.w, gy00.w, gz00.w, gw00.w);
+               tvec4<T, P> g0010(gx10.x, gy10.x, gz10.x, gw10.x);
+               tvec4<T, P> g1010(gx10.y, gy10.y, gz10.y, gw10.y);
+               tvec4<T, P> g0110(gx10.z, gy10.z, gz10.z, gw10.z);
+               tvec4<T, P> g1110(gx10.w, gy10.w, gz10.w, gw10.w);
+               tvec4<T, P> g0001(gx01.x, gy01.x, gz01.x, gw01.x);
+               tvec4<T, P> g1001(gx01.y, gy01.y, gz01.y, gw01.y);
+               tvec4<T, P> g0101(gx01.z, gy01.z, gz01.z, gw01.z);
+               tvec4<T, P> g1101(gx01.w, gy01.w, gz01.w, gw01.w);
+               tvec4<T, P> g0011(gx11.x, gy11.x, gz11.x, gw11.x);
+               tvec4<T, P> g1011(gx11.y, gy11.y, gz11.y, gw11.y);
+               tvec4<T, P> g0111(gx11.z, gy11.z, gz11.z, gw11.z);
+               tvec4<T, P> g1111(gx11.w, gy11.w, gz11.w, gw11.w);
+
+               tvec4<T, P> norm00 = detail::taylorInvSqrt(tvec4<T, P>(dot(g0000, g0000), dot(g0100, g0100), dot(g1000, g1000), dot(g1100, g1100)));
+               g0000 *= norm00.x;
+               g0100 *= norm00.y;
+               g1000 *= norm00.z;
+               g1100 *= norm00.w;
+
+               tvec4<T, P> norm01 = detail::taylorInvSqrt(tvec4<T, P>(dot(g0001, g0001), dot(g0101, g0101), dot(g1001, g1001), dot(g1101, g1101)));
+               g0001 *= norm01.x;
+               g0101 *= norm01.y;
+               g1001 *= norm01.z;
+               g1101 *= norm01.w;
+
+               tvec4<T, P> norm10 = detail::taylorInvSqrt(tvec4<T, P>(dot(g0010, g0010), dot(g0110, g0110), dot(g1010, g1010), dot(g1110, g1110)));
+               g0010 *= norm10.x;
+               g0110 *= norm10.y;
+               g1010 *= norm10.z;
+               g1110 *= norm10.w;
+
+               tvec4<T, P> norm11 = detail::taylorInvSqrt(tvec4<T, P>(dot(g0011, g0011), dot(g0111, g0111), dot(g1011, g1011), dot(g1111, g1111)));
+               g0011 *= norm11.x;
+               g0111 *= norm11.y;
+               g1011 *= norm11.z;
+               g1111 *= norm11.w;
+
+               T n0000 = dot(g0000, Pf0);
+               T n1000 = dot(g1000, tvec4<T, P>(Pf1.x, Pf0.y, Pf0.z, Pf0.w));
+               T n0100 = dot(g0100, tvec4<T, P>(Pf0.x, Pf1.y, Pf0.z, Pf0.w));
+               T n1100 = dot(g1100, tvec4<T, P>(Pf1.x, Pf1.y, Pf0.z, Pf0.w));
+               T n0010 = dot(g0010, tvec4<T, P>(Pf0.x, Pf0.y, Pf1.z, Pf0.w));
+               T n1010 = dot(g1010, tvec4<T, P>(Pf1.x, Pf0.y, Pf1.z, Pf0.w));
+               T n0110 = dot(g0110, tvec4<T, P>(Pf0.x, Pf1.y, Pf1.z, Pf0.w));
+               T n1110 = dot(g1110, tvec4<T, P>(Pf1.x, Pf1.y, Pf1.z, Pf0.w));
+               T n0001 = dot(g0001, tvec4<T, P>(Pf0.x, Pf0.y, Pf0.z, Pf1.w));
+               T n1001 = dot(g1001, tvec4<T, P>(Pf1.x, Pf0.y, Pf0.z, Pf1.w));
+               T n0101 = dot(g0101, tvec4<T, P>(Pf0.x, Pf1.y, Pf0.z, Pf1.w));
+               T n1101 = dot(g1101, tvec4<T, P>(Pf1.x, Pf1.y, Pf0.z, Pf1.w));
+               T n0011 = dot(g0011, tvec4<T, P>(Pf0.x, Pf0.y, Pf1.z, Pf1.w));
+               T n1011 = dot(g1011, tvec4<T, P>(Pf1.x, Pf0.y, Pf1.z, Pf1.w));
+               T n0111 = dot(g0111, tvec4<T, P>(Pf0.x, Pf1.y, Pf1.z, Pf1.w));
+               T n1111 = dot(g1111, Pf1);
+
+               tvec4<T, P> fade_xyzw = detail::fade(Pf0);
+               tvec4<T, P> n_0w = mix(tvec4<T, P>(n0000, n1000, n0100, n1100), tvec4<T, P>(n0001, n1001, n0101, n1101), fade_xyzw.w);
+               tvec4<T, P> n_1w = mix(tvec4<T, P>(n0010, n1010, n0110, n1110), tvec4<T, P>(n0011, n1011, n0111, n1111), fade_xyzw.w);
+               tvec4<T, P> n_zw = mix(n_0w, n_1w, fade_xyzw.z);
+               tvec2<T, P> n_yzw = mix(tvec2<T, P>(n_zw.x, n_zw.y), tvec2<T, P>(n_zw.z, n_zw.w), fade_xyzw.y);
+               T n_xyzw = mix(n_yzw.x, n_yzw.y, fade_xyzw.x);
+               return T(2.2) * n_xyzw;
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER T simplex(glm::tvec2<T, P> const & v)
+       {
+               tvec4<T, P> const C = tvec4<T, P>(
+                       T( 0.211324865405187),  // (3.0 -  sqrt(3.0)) / 6.0
+                       T( 0.366025403784439),  //  0.5 * (sqrt(3.0)  - 1.0)
+                       T(-0.577350269189626),  // -1.0 + 2.0 * C.x
+                       T( 0.024390243902439)); //  1.0 / 41.0
+
+               // First corner
+               tvec2<T, P> i  = floor(v + dot(v, tvec2<T, P>(C[1])));
+               tvec2<T, P> x0 = v -   i + dot(i, tvec2<T, P>(C[0]));
+
+               // Other corners
+               //i1.x = step( x0.y, x0.x ); // x0.x > x0.y ? 1.0 : 0.0
+               //i1.y = 1.0 - i1.x;
+               tvec2<T, P> i1 = (x0.x > x0.y) ? tvec2<T, P>(1, 0) : tvec2<T, P>(0, 1);
+               // x0 = x0 - 0.0 + 0.0 * C.xx ;
+               // x1 = x0 - i1 + 1.0 * C.xx ;
+               // x2 = x0 - 1.0 + 2.0 * C.xx ;
+               tvec4<T, P> x12 = tvec4<T, P>(x0.x, x0.y, x0.x, x0.y) + tvec4<T, P>(C.x, C.x, C.z, C.z);
+               x12 = tvec4<T, P>(tvec2<T, P>(x12) - i1, x12.z, x12.w);
+
+               // Permutations
+               i = mod(i, tvec2<T, P>(289)); // Avoid truncation effects in permutation
+               tvec3<T, P> p = detail::permute(
+                       detail::permute(i.y + tvec3<T, P>(T(0), i1.y, T(1)))
+                       + i.x + tvec3<T, P>(T(0), i1.x, T(1)));
+
+               tvec3<T, P> m = max(tvec3<T, P>(0.5) - tvec3<T, P>(
+                       dot(x0, x0),
+                       dot(tvec2<T, P>(x12.x, x12.y), tvec2<T, P>(x12.x, x12.y)), 
+                       dot(tvec2<T, P>(x12.z, x12.w), tvec2<T, P>(x12.z, x12.w))), tvec3<T, P>(0));
+               m = m * m ;
+               m = m * m ;
+
+               // Gradients: 41 points uniformly over a line, mapped onto a diamond.
+               // The ring size 17*17 = 289 is close to a multiple of 41 (41*7 = 287)
+
+               tvec3<T, P> x = static_cast<T>(2) * fract(p * C.w) - T(1);
+               tvec3<T, P> h = abs(x) - T(0.5);
+               tvec3<T, P> ox = floor(x + T(0.5));
+               tvec3<T, P> a0 = x - ox;
+
+               // Normalise gradients implicitly by scaling m
+               // Inlined for speed: m *= taylorInvSqrt( a0*a0 + h*h );
+               m *= static_cast<T>(1.79284291400159) - T(0.85373472095314) * (a0 * a0 + h * h);
+
+               // Compute final noise value at P
+               tvec3<T, P> g;
+               g.x  = a0.x  * x0.x  + h.x  * x0.y;
+               //g.yz = a0.yz * x12.xz + h.yz * x12.yw;
+               g.y = a0.y * x12.x + h.y * x12.y;
+               g.z = a0.z * x12.z + h.z * x12.w;
+               return T(130) * dot(m, g);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER T simplex(tvec3<T, P> const & v)
+       {
+               tvec2<T, P> const C(1.0 / 6.0, 1.0 / 3.0);
+               tvec4<T, P> const D(0.0, 0.5, 1.0, 2.0);
+
+               // First corner
+               tvec3<T, P> i(floor(v + dot(v, tvec3<T, P>(C.y))));
+               tvec3<T, P> x0(v - i + dot(i, tvec3<T, P>(C.x)));
+
+               // Other corners
+               tvec3<T, P> g(step(tvec3<T, P>(x0.y, x0.z, x0.x), x0));
+               tvec3<T, P> l(T(1) - g);
+               tvec3<T, P> i1(min(g, tvec3<T, P>(l.z, l.x, l.y)));
+               tvec3<T, P> i2(max(g, tvec3<T, P>(l.z, l.x, l.y)));
+
+               //   x0 = x0 - 0.0 + 0.0 * C.xxx;
+               //   x1 = x0 - i1  + 1.0 * C.xxx;
+               //   x2 = x0 - i2  + 2.0 * C.xxx;
+               //   x3 = x0 - 1.0 + 3.0 * C.xxx;
+               tvec3<T, P> x1(x0 - i1 + C.x);
+               tvec3<T, P> x2(x0 - i2 + C.y); // 2.0*C.x = 1/3 = C.y
+               tvec3<T, P> x3(x0 - D.y);      // -1.0+3.0*C.x = -0.5 = -D.y
+
+               // Permutations
+               i = detail::mod289(i);
+               tvec4<T, P> p(detail::permute(detail::permute(detail::permute(
+                       i.z + tvec4<T, P>(T(0), i1.z, i2.z, T(1))) +
+                       i.y + tvec4<T, P>(T(0), i1.y, i2.y, T(1))) +
+                       i.x + tvec4<T, P>(T(0), i1.x, i2.x, T(1))));
+
+               // Gradients: 7x7 points over a square, mapped onto an octahedron.
+               // The ring size 17*17 = 289 is close to a multiple of 49 (49*6 = 294)
+               T n_ = static_cast<T>(0.142857142857); // 1.0/7.0
+               tvec3<T, P> ns(n_ * tvec3<T, P>(D.w, D.y, D.z) - tvec3<T, P>(D.x, D.z, D.x));
+
+               tvec4<T, P> j(p - T(49) * floor(p * ns.z * ns.z));  //  mod(p,7*7)
+
+               tvec4<T, P> x_(floor(j * ns.z));
+               tvec4<T, P> y_(floor(j - T(7) * x_));    // mod(j,N)
+
+               tvec4<T, P> x(x_ * ns.x + ns.y);
+               tvec4<T, P> y(y_ * ns.x + ns.y);
+               tvec4<T, P> h(T(1) - abs(x) - abs(y));
+
+               tvec4<T, P> b0(x.x, x.y, y.x, y.y);
+               tvec4<T, P> b1(x.z, x.w, y.z, y.w);
+
+               // vec4 s0 = vec4(lessThan(b0,0.0))*2.0 - 1.0;
+               // vec4 s1 = vec4(lessThan(b1,0.0))*2.0 - 1.0;
+               tvec4<T, P> s0(floor(b0) * T(2) + T(1));
+               tvec4<T, P> s1(floor(b1) * T(2) + T(1));
+               tvec4<T, P> sh(-step(h, tvec4<T, P>(0.0)));
+
+               tvec4<T, P> a0 = tvec4<T, P>(b0.x, b0.z, b0.y, b0.w) + tvec4<T, P>(s0.x, s0.z, s0.y, s0.w) * tvec4<T, P>(sh.x, sh.x, sh.y, sh.y);
+               tvec4<T, P> a1 = tvec4<T, P>(b1.x, b1.z, b1.y, b1.w) + tvec4<T, P>(s1.x, s1.z, s1.y, s1.w) * tvec4<T, P>(sh.z, sh.z, sh.w, sh.w);
+
+               tvec3<T, P> p0(a0.x, a0.y, h.x);
+               tvec3<T, P> p1(a0.z, a0.w, h.y);
+               tvec3<T, P> p2(a1.x, a1.y, h.z);
+               tvec3<T, P> p3(a1.z, a1.w, h.w);
+
+               // Normalise gradients
+               tvec4<T, P> norm = detail::taylorInvSqrt(tvec4<T, P>(dot(p0, p0), dot(p1, p1), dot(p2, p2), dot(p3, p3)));
+               p0 *= norm.x;
+               p1 *= norm.y;
+               p2 *= norm.z;
+               p3 *= norm.w;
+
+               // Mix final noise value
+               tvec4<T, P> m = max(T(0.6) - tvec4<T, P>(dot(x0, x0), dot(x1, x1), dot(x2, x2), dot(x3, x3)), tvec4<T, P>(0));
+               m = m * m;
+               return T(42) * dot(m * m, tvec4<T, P>(dot(p0, x0), dot(p1, x1), dot(p2, x2), dot(p3, x3)));
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER T simplex(tvec4<T, P> const & v)
+       {
+               tvec4<T, P> const C(
+                       0.138196601125011,  // (5 - sqrt(5))/20  G4
+                       0.276393202250021,  // 2 * G4
+                       0.414589803375032,  // 3 * G4
+                       -0.447213595499958); // -1 + 4 * G4
+
+               // (sqrt(5) - 1)/4 = F4, used once below
+               T const F4 = static_cast<T>(0.309016994374947451);
+
+               // First corner
+               tvec4<T, P> i  = floor(v + dot(v, vec4(F4)));
+               tvec4<T, P> x0 = v -   i + dot(i, vec4(C.x));
+
+               // Other corners
+
+               // Rank sorting originally contributed by Bill Licea-Kane, AMD (formerly ATI)
+               tvec4<T, P> i0;
+               tvec3<T, P> isX = step(tvec3<T, P>(x0.y, x0.z, x0.w), tvec3<T, P>(x0.x));
+               tvec3<T, P> isYZ = step(tvec3<T, P>(x0.z, x0.w, x0.w), tvec3<T, P>(x0.y, x0.y, x0.z));
+               //  i0.x = dot(isX, vec3(1.0));
+               //i0.x = isX.x + isX.y + isX.z;
+               //i0.yzw = static_cast<T>(1) - isX;
+               i0 = tvec4<T, P>(isX.x + isX.y + isX.z, T(1) - isX);
+               //  i0.y += dot(isYZ.xy, vec2(1.0));
+               i0.y += isYZ.x + isYZ.y;
+               //i0.zw += 1.0 - tvec2<T, P>(isYZ.x, isYZ.y);
+               i0.z += static_cast<T>(1) - isYZ.x;
+               i0.w += static_cast<T>(1) - isYZ.y;
+               i0.z += isYZ.z;
+               i0.w += static_cast<T>(1) - isYZ.z;
+
+               // i0 now contains the unique values 0,1,2,3 in each channel
+               tvec4<T, P> i3 = clamp(i0, T(0), T(1));
+               tvec4<T, P> i2 = clamp(i0 - T(1), T(0), T(1));
+               tvec4<T, P> i1 = clamp(i0 - T(2), T(0), T(1));
+
+               //  x0 = x0 - 0.0 + 0.0 * C.xxxx
+               //  x1 = x0 - i1  + 0.0 * C.xxxx
+               //  x2 = x0 - i2  + 0.0 * C.xxxx
+               //  x3 = x0 - i3  + 0.0 * C.xxxx
+               //  x4 = x0 - 1.0 + 4.0 * C.xxxx
+               tvec4<T, P> x1 = x0 - i1 + C.x;
+               tvec4<T, P> x2 = x0 - i2 + C.y;
+               tvec4<T, P> x3 = x0 - i3 + C.z;
+               tvec4<T, P> x4 = x0 + C.w;
+
+               // Permutations
+               i = mod(i, tvec4<T, P>(289)); 
+               T j0 = detail::permute(detail::permute(detail::permute(detail::permute(i.w) + i.z) + i.y) + i.x);
+               tvec4<T, P> j1 = detail::permute(detail::permute(detail::permute(detail::permute(
+                       i.w + tvec4<T, P>(i1.w, i2.w, i3.w, T(1))) +
+                       i.z + tvec4<T, P>(i1.z, i2.z, i3.z, T(1))) +
+                       i.y + tvec4<T, P>(i1.y, i2.y, i3.y, T(1))) +
+                       i.x + tvec4<T, P>(i1.x, i2.x, i3.x, T(1)));
+
+               // Gradients: 7x7x6 points over a cube, mapped onto a 4-cross polytope
+               // 7*7*6 = 294, which is close to the ring size 17*17 = 289.
+               tvec4<T, P> ip = tvec4<T, P>(T(1) / T(294), T(1) / T(49), T(1) / T(7), T(0));
+
+               tvec4<T, P> p0 = gtc::grad4(j0,   ip);
+               tvec4<T, P> p1 = gtc::grad4(j1.x, ip);
+               tvec4<T, P> p2 = gtc::grad4(j1.y, ip);
+               tvec4<T, P> p3 = gtc::grad4(j1.z, ip);
+               tvec4<T, P> p4 = gtc::grad4(j1.w, ip);
+
+               // Normalise gradients
+               tvec4<T, P> norm = detail::taylorInvSqrt(tvec4<T, P>(dot(p0, p0), dot(p1, p1), dot(p2, p2), dot(p3, p3)));
+               p0 *= norm.x;
+               p1 *= norm.y;
+               p2 *= norm.z;
+               p3 *= norm.w;
+               p4 *= detail::taylorInvSqrt(dot(p4, p4));
+
+               // Mix contributions from the five corners
+               tvec3<T, P> m0 = max(T(0.6) - tvec3<T, P>(dot(x0, x0), dot(x1, x1), dot(x2, x2)), tvec3<T, P>(0));
+               tvec2<T, P> m1 = max(T(0.6) - tvec2<T, P>(dot(x3, x3), dot(x4, x4)             ), tvec2<T, P>(0));
+               m0 = m0 * m0;
+               m1 = m1 * m1;
+               return T(49) * 
+                       (dot(m0 * m0, tvec3<T, P>(dot(p0, x0), dot(p1, x1), dot(p2, x2))) + 
+                       dot(m1 * m1, tvec2<T, P>(dot(p3, x3), dot(p4, x4))));
+       }
+}//namespace glm
diff --git a/include/glm/gtc/packing.hpp b/include/glm/gtc/packing.hpp
new file mode 100644 (file)
index 0000000..8808aa4
--- /dev/null
@@ -0,0 +1,478 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtc_packing
+/// @file glm/gtc/packing.hpp
+/// @date 2013-08-08 / 2013-08-08
+/// @author Christophe Riccio
+///
+/// @see core (dependence)
+///
+/// @defgroup gtc_packing GLM_GTC_packing
+/// @ingroup gtc
+/// 
+/// @brief This extension provides a set of function to convert vertors to packed
+/// formats.
+/// 
+/// <glm/gtc/packing.hpp> need to be included to use these features.
+///////////////////////////////////////////////////////////////////////////////////
+
+#pragma once
+
+// Dependency:
+#include "type_precision.hpp"
+
+#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
+#      pragma message("GLM: GLM_GTC_packing extension included")
+#endif
+
+namespace glm
+{
+       /// @addtogroup gtc_packing
+       /// @{
+
+       /// First, converts the normalized floating-point value v into a 8-bit integer value.
+       /// Then, the results are packed into the returned 8-bit unsigned integer.
+       ///
+       /// The conversion for component c of v to fixed point is done as follows:
+       /// packUnorm1x8:       round(clamp(c, 0, +1) * 255.0)
+       ///
+       /// @see gtc_packing
+       /// @see uint16 packUnorm2x8(vec2 const & v)
+       /// @see uint32 packUnorm4x8(vec4 const & v)
+       /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/packUnorm4x8.xml">GLSL packUnorm4x8 man page</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a>
+       GLM_FUNC_DECL uint8 packUnorm1x8(float v);
+
+       /// Convert a single 8-bit integer to a normalized floating-point value.
+       /// 
+       /// The conversion for unpacked fixed-point value f to floating point is done as follows:
+       /// unpackUnorm4x8: f / 255.0
+       /// 
+       /// @see gtc_packing
+       /// @see vec2 unpackUnorm2x8(uint16 p)
+       /// @see vec4 unpackUnorm4x8(uint32 p)
+       /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackUnorm4x8.xml">GLSL unpackUnorm4x8 man page</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a>
+       GLM_FUNC_DECL float unpackUnorm1x8(uint8 p);
+
+       /// First, converts each component of the normalized floating-point value v into 8-bit integer values.
+       /// Then, the results are packed into the returned 16-bit unsigned integer.
+       ///
+       /// The conversion for component c of v to fixed point is done as follows:
+       /// packUnorm2x8:       round(clamp(c, 0, +1) * 255.0)
+       ///
+       /// The first component of the vector will be written to the least significant bits of the output;
+       /// the last component will be written to the most significant bits.
+       ///
+       /// @see gtc_packing
+       /// @see uint8 packUnorm1x8(float const & v)
+       /// @see uint32 packUnorm4x8(vec4 const & v)
+       /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/packUnorm4x8.xml">GLSL packUnorm4x8 man page</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a>
+       GLM_FUNC_DECL uint16 packUnorm2x8(vec2 const & v);
+
+       /// First, unpacks a single 16-bit unsigned integer p into a pair of 8-bit unsigned integers. 
+       /// Then, each component is converted to a normalized floating-point value to generate the returned two-component vector.
+       /// 
+       /// The conversion for unpacked fixed-point value f to floating point is done as follows:
+       /// unpackUnorm4x8: f / 255.0
+       /// 
+       /// The first component of the returned vector will be extracted from the least significant bits of the input; 
+       /// the last component will be extracted from the most significant bits.
+       /// 
+       /// @see gtc_packing
+       /// @see float unpackUnorm1x8(uint8 v)
+       /// @see vec4 unpackUnorm4x8(uint32 p)
+       /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackUnorm4x8.xml">GLSL unpackUnorm4x8 man page</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a>
+       GLM_FUNC_DECL vec2 unpackUnorm2x8(uint16 p);
+       
+       /// First, converts the normalized floating-point value v into 8-bit integer value.
+       /// Then, the results are packed into the returned 8-bit unsigned integer.
+       ///
+       /// The conversion to fixed point is done as follows:
+       /// packSnorm1x8:       round(clamp(s, -1, +1) * 127.0)
+       ///
+       /// @see gtc_packing
+       /// @see uint16 packSnorm2x8(vec2 const & v)
+       /// @see uint32 packSnorm4x8(vec4 const & v)
+       /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/packSnorm4x8.xml">GLSL packSnorm4x8 man page</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a>
+       GLM_FUNC_DECL uint8 packSnorm1x8(float s);
+
+       /// First, unpacks a single 8-bit unsigned integer p into a single 8-bit signed integers. 
+       /// Then, the value is converted to a normalized floating-point value to generate the returned scalar.
+       /// 
+       /// The conversion for unpacked fixed-point value f to floating point is done as follows:
+       /// unpackSnorm1x8: clamp(f / 127.0, -1, +1)
+       /// 
+       /// @see gtc_packing
+       /// @see vec2 unpackSnorm2x8(uint16 p)
+       /// @see vec4 unpackSnorm4x8(uint32 p)
+       /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackSnorm4x8.xml">GLSL unpackSnorm4x8 man page</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a>
+       GLM_FUNC_DECL float unpackSnorm1x8(uint8 p);
+       
+       /// First, converts each component of the normalized floating-point value v into 8-bit integer values.
+       /// Then, the results are packed into the returned 16-bit unsigned integer.
+       ///
+       /// The conversion for component c of v to fixed point is done as follows:
+       /// packSnorm2x8:       round(clamp(c, -1, +1) * 127.0)
+       ///
+       /// The first component of the vector will be written to the least significant bits of the output;
+       /// the last component will be written to the most significant bits.
+       ///
+       /// @see gtc_packing
+       /// @see uint8 packSnorm1x8(float const & v)
+       /// @see uint32 packSnorm4x8(vec4 const & v)
+       /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/packSnorm4x8.xml">GLSL packSnorm4x8 man page</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a>
+       GLM_FUNC_DECL uint16 packSnorm2x8(vec2 const & v);
+
+       /// First, unpacks a single 16-bit unsigned integer p into a pair of 8-bit signed integers. 
+       /// Then, each component is converted to a normalized floating-point value to generate the returned two-component vector.
+       /// 
+       /// The conversion for unpacked fixed-point value f to floating point is done as follows:
+       /// unpackSnorm2x8: clamp(f / 127.0, -1, +1)
+       /// 
+       /// The first component of the returned vector will be extracted from the least significant bits of the input; 
+       /// the last component will be extracted from the most significant bits.
+       /// 
+       /// @see gtc_packing
+       /// @see float unpackSnorm1x8(uint8 p)
+       /// @see vec4 unpackSnorm4x8(uint32 p)
+       /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackSnorm4x8.xml">GLSL unpackSnorm4x8 man page</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a>
+       GLM_FUNC_DECL vec2 unpackSnorm2x8(uint16 p);
+       
+       /// First, converts the normalized floating-point value v into a 16-bit integer value.
+       /// Then, the results are packed into the returned 16-bit unsigned integer.
+       ///
+       /// The conversion for component c of v to fixed point is done as follows:
+       /// packUnorm1x16:      round(clamp(c, 0, +1) * 65535.0)
+       ///
+       /// @see gtc_packing
+       /// @see uint16 packSnorm1x16(float const & v)
+       /// @see uint64 packSnorm4x16(vec4 const & v)
+       /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/packUnorm4x8.xml">GLSL packUnorm4x8 man page</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a>
+       GLM_FUNC_DECL uint16 packUnorm1x16(float v);
+
+       /// First, unpacks a single 16-bit unsigned integer p into a of 16-bit unsigned integers. 
+       /// Then, the value is converted to a normalized floating-point value to generate the returned scalar.
+       /// 
+       /// The conversion for unpacked fixed-point value f to floating point is done as follows:
+       /// unpackUnorm1x16: f / 65535.0 
+       /// 
+       /// @see gtc_packing
+       /// @see vec2 unpackUnorm2x16(uint32 p)
+       /// @see vec4 unpackUnorm4x16(uint64 p)
+       /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackUnorm2x16.xml">GLSL unpackUnorm2x16 man page</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a>
+       GLM_FUNC_DECL float unpackUnorm1x16(uint16 p);
+
+       /// First, converts each component of the normalized floating-point value v into 16-bit integer values.
+       /// Then, the results are packed into the returned 64-bit unsigned integer.
+       ///
+       /// The conversion for component c of v to fixed point is done as follows:
+       /// packUnorm4x16:      round(clamp(c, 0, +1) * 65535.0)
+       ///
+       /// The first component of the vector will be written to the least significant bits of the output;
+       /// the last component will be written to the most significant bits.
+       ///
+       /// @see gtc_packing
+       /// @see uint16 packUnorm1x16(float const & v)
+       /// @see uint32 packUnorm2x16(vec2 const & v)
+       /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/packUnorm4x8.xml">GLSL packUnorm4x8 man page</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a>
+       GLM_FUNC_DECL uint64 packUnorm4x16(vec4 const & v);
+
+       /// First, unpacks a single 64-bit unsigned integer p into four 16-bit unsigned integers. 
+       /// Then, each component is converted to a normalized floating-point value to generate the returned four-component vector.
+       /// 
+       /// The conversion for unpacked fixed-point value f to floating point is done as follows:
+       /// unpackUnormx4x16: f / 65535.0 
+       /// 
+       /// The first component of the returned vector will be extracted from the least significant bits of the input; 
+       /// the last component will be extracted from the most significant bits.
+       /// 
+       /// @see gtc_packing
+       /// @see float unpackUnorm1x16(uint16 p)
+       /// @see vec2 unpackUnorm2x16(uint32 p)
+       /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackUnorm2x16.xml">GLSL unpackUnorm2x16 man page</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a>
+       GLM_FUNC_DECL vec4 unpackUnorm4x16(uint64 p);
+
+       /// First, converts the normalized floating-point value v into 16-bit integer value.
+       /// Then, the results are packed into the returned 16-bit unsigned integer.
+       ///
+       /// The conversion to fixed point is done as follows:
+       /// packSnorm1x8:       round(clamp(s, -1, +1) * 32767.0)
+       ///
+       /// @see gtc_packing
+       /// @see uint32 packSnorm2x16(vec2 const & v)
+       /// @see uint64 packSnorm4x16(vec4 const & v)
+       /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/packSnorm4x8.xml">GLSL packSnorm4x8 man page</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a>
+       GLM_FUNC_DECL uint16 packSnorm1x16(float v);
+
+       /// First, unpacks a single 16-bit unsigned integer p into a single 16-bit signed integers. 
+       /// Then, each component is converted to a normalized floating-point value to generate the returned scalar.
+       /// 
+       /// The conversion for unpacked fixed-point value f to floating point is done as follows:
+       /// unpackSnorm1x16: clamp(f / 32767.0, -1, +1)
+       /// 
+       /// @see gtc_packing
+       /// @see vec2 unpackSnorm2x16(uint32 p)
+       /// @see vec4 unpackSnorm4x16(uint64 p)
+       /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackSnorm1x16.xml">GLSL unpackSnorm4x8 man page</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a>
+       GLM_FUNC_DECL float unpackSnorm1x16(uint16 p);
+
+       /// First, converts each component of the normalized floating-point value v into 16-bit integer values.
+       /// Then, the results are packed into the returned 64-bit unsigned integer.
+       ///
+       /// The conversion for component c of v to fixed point is done as follows:
+       /// packSnorm2x8:       round(clamp(c, -1, +1) * 32767.0)
+       ///
+       /// The first component of the vector will be written to the least significant bits of the output;
+       /// the last component will be written to the most significant bits.
+       ///
+       /// @see gtc_packing
+       /// @see uint16 packSnorm1x16(float const & v)
+       /// @see uint32 packSnorm2x16(vec2 const & v)
+       /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/packSnorm4x8.xml">GLSL packSnorm4x8 man page</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a>
+       GLM_FUNC_DECL uint64 packSnorm4x16(vec4 const & v);
+
+       /// First, unpacks a single 64-bit unsigned integer p into four 16-bit signed integers. 
+       /// Then, each component is converted to a normalized floating-point value to generate the returned four-component vector.
+       /// 
+       /// The conversion for unpacked fixed-point value f to floating point is done as follows:
+       /// unpackSnorm4x16: clamp(f / 32767.0, -1, +1)
+       /// 
+       /// The first component of the returned vector will be extracted from the least significant bits of the input; 
+       /// the last component will be extracted from the most significant bits.
+       /// 
+       /// @see gtc_packing
+       /// @see float unpackSnorm1x16(uint16 p)
+       /// @see vec2 unpackSnorm2x16(uint32 p)
+       /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackSnorm2x16.xml">GLSL unpackSnorm4x8 man page</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a>
+       GLM_FUNC_DECL vec4 unpackSnorm4x16(uint64 p);
+       
+       /// Returns an unsigned integer obtained by converting the components of a floating-point scalar
+       /// to the 16-bit floating-point representation found in the OpenGL Specification,
+       /// and then packing this 16-bit value into a 16-bit unsigned integer.
+       ///
+       /// @see gtc_packing
+       /// @see uint32 packHalf2x16(vec2 const & v)
+       /// @see uint64 packHalf4x16(vec4 const & v)
+       /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/packHalf2x16.xml">GLSL packHalf2x16 man page</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a>
+       GLM_FUNC_DECL uint16 packHalf1x16(float v);
+       
+       /// Returns a floating-point scalar with components obtained by unpacking a 16-bit unsigned integer into a 16-bit value,
+       /// interpreted as a 16-bit floating-point number according to the OpenGL Specification,
+       /// and converting it to 32-bit floating-point values.
+       ///
+       /// @see gtc_packing
+       /// @see vec2 unpackHalf2x16(uint32 const & v)
+       /// @see vec4 unpackHalf4x16(uint64 const & v)
+       /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackHalf2x16.xml">GLSL unpackHalf2x16 man page</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a>
+       GLM_FUNC_DECL float unpackHalf1x16(uint16 v);
+
+       /// Returns an unsigned integer obtained by converting the components of a four-component floating-point vector 
+       /// to the 16-bit floating-point representation found in the OpenGL Specification, 
+       /// and then packing these four 16-bit values into a 64-bit unsigned integer.
+       /// The first vector component specifies the 16 least-significant bits of the result; 
+       /// the forth component specifies the 16 most-significant bits.
+       /// 
+       /// @see gtc_packing
+       /// @see uint16 packHalf1x16(float const & v)
+       /// @see uint32 packHalf2x16(vec2 const & v)
+       /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/packHalf2x16.xml">GLSL packHalf2x16 man page</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a>
+       GLM_FUNC_DECL uint64 packHalf4x16(vec4 const & v);
+       
+       /// Returns a four-component floating-point vector with components obtained by unpacking a 64-bit unsigned integer into four 16-bit values,
+       /// interpreting those values as 16-bit floating-point numbers according to the OpenGL Specification, 
+       /// and converting them to 32-bit floating-point values.
+       /// The first component of the vector is obtained from the 16 least-significant bits of v; 
+       /// the forth component is obtained from the 16 most-significant bits of v.
+       /// 
+       /// @see gtc_packing
+       /// @see float unpackHalf1x16(uint16 const & v)
+       /// @see vec2 unpackHalf2x16(uint32 const & v)
+       /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackHalf2x16.xml">GLSL unpackHalf2x16 man page</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a>
+       GLM_FUNC_DECL vec4 unpackHalf4x16(uint64 p);
+
+       /// Returns an unsigned integer obtained by converting the components of a four-component signed integer vector 
+       /// to the 10-10-10-2-bit signed integer representation found in the OpenGL Specification, 
+       /// and then packing these four values into a 32-bit unsigned integer.
+       /// The first vector component specifies the 10 least-significant bits of the result; 
+       /// the forth component specifies the 2 most-significant bits.
+       /// 
+       /// @see gtc_packing
+       /// @see uint32 packI3x10_1x2(uvec4 const & v)
+       /// @see uint32 packSnorm3x10_1x2(vec4 const & v)
+       /// @see uint32 packUnorm3x10_1x2(vec4 const & v)
+       /// @see ivec4 unpackI3x10_1x2(uint32 const & p)
+       GLM_FUNC_DECL uint32 packI3x10_1x2(ivec4 const & v);
+
+       /// Unpacks a single 32-bit unsigned integer p into three 10-bit and one 2-bit signed integers. 
+       /// 
+       /// The first component of the returned vector will be extracted from the least significant bits of the input; 
+       /// the last component will be extracted from the most significant bits.
+       /// 
+       /// @see gtc_packing
+       /// @see uint32 packU3x10_1x2(uvec4 const & v)
+       /// @see vec4 unpackSnorm3x10_1x2(uint32 const & p);
+       /// @see uvec4 unpackI3x10_1x2(uint32 const & p);
+       GLM_FUNC_DECL ivec4 unpackI3x10_1x2(uint32 p);
+
+       /// Returns an unsigned integer obtained by converting the components of a four-component unsigned integer vector 
+       /// to the 10-10-10-2-bit unsigned integer representation found in the OpenGL Specification, 
+       /// and then packing these four values into a 32-bit unsigned integer.
+       /// The first vector component specifies the 10 least-significant bits of the result; 
+       /// the forth component specifies the 2 most-significant bits.
+       /// 
+       /// @see gtc_packing
+       /// @see uint32 packI3x10_1x2(ivec4 const & v)
+       /// @see uint32 packSnorm3x10_1x2(vec4 const & v)
+       /// @see uint32 packUnorm3x10_1x2(vec4 const & v)
+       /// @see ivec4 unpackU3x10_1x2(uint32 const & p)
+       GLM_FUNC_DECL uint32 packU3x10_1x2(uvec4 const & v);
+
+       /// Unpacks a single 32-bit unsigned integer p into three 10-bit and one 2-bit unsigned integers. 
+       /// 
+       /// The first component of the returned vector will be extracted from the least significant bits of the input; 
+       /// the last component will be extracted from the most significant bits.
+       /// 
+       /// @see gtc_packing
+       /// @see uint32 packU3x10_1x2(uvec4 const & v)
+       /// @see vec4 unpackSnorm3x10_1x2(uint32 const & p);
+       /// @see uvec4 unpackI3x10_1x2(uint32 const & p);
+       GLM_FUNC_DECL uvec4 unpackU3x10_1x2(uint32 p);
+
+       /// First, converts the first three components of the normalized floating-point value v into 10-bit signed integer values.
+       /// Then, converts the forth component of the normalized floating-point value v into 2-bit signed integer values.
+       /// Then, the results are packed into the returned 32-bit unsigned integer.
+       ///
+       /// The conversion for component c of v to fixed point is done as follows:
+       /// packSnorm3x10_1x2(xyz):     round(clamp(c, -1, +1) * 511.0)
+       /// packSnorm3x10_1x2(w):       round(clamp(c, -1, +1) * 1.0)
+       ///
+       /// The first vector component specifies the 10 least-significant bits of the result; 
+       /// the forth component specifies the 2 most-significant bits.
+       ///
+       /// @see gtc_packing
+       /// @see vec4 unpackSnorm3x10_1x2(uint32 const & p)
+       /// @see uint32 packUnorm3x10_1x2(vec4 const & v)
+       /// @see uint32 packU3x10_1x2(uvec4 const & v)
+       /// @see uint32 packI3x10_1x2(ivec4 const & v)
+       GLM_FUNC_DECL uint32 packSnorm3x10_1x2(vec4 const & v);
+
+       /// First, unpacks a single 32-bit unsigned integer p into four 16-bit signed integers. 
+       /// Then, each component is converted to a normalized floating-point value to generate the returned four-component vector.
+       /// 
+       /// The conversion for unpacked fixed-point value f to floating point is done as follows:
+       /// unpackSnorm3x10_1x2(xyz): clamp(f / 511.0, -1, +1)
+       /// unpackSnorm3x10_1x2(w): clamp(f / 511.0, -1, +1)
+       /// 
+       /// The first component of the returned vector will be extracted from the least significant bits of the input; 
+       /// the last component will be extracted from the most significant bits.
+       /// 
+       /// @see gtc_packing
+       /// @see uint32 packSnorm3x10_1x2(vec4 const & v)
+       /// @see vec4 unpackUnorm3x10_1x2(uint32 const & p))
+       /// @see uvec4 unpackI3x10_1x2(uint32 const & p)
+       /// @see uvec4 unpackU3x10_1x2(uint32 const & p)
+       GLM_FUNC_DECL vec4 unpackSnorm3x10_1x2(uint32 p);
+
+       /// First, converts the first three components of the normalized floating-point value v into 10-bit unsigned integer values.
+       /// Then, converts the forth component of the normalized floating-point value v into 2-bit signed uninteger values.
+       /// Then, the results are packed into the returned 32-bit unsigned integer.
+       ///
+       /// The conversion for component c of v to fixed point is done as follows:
+       /// packUnorm3x10_1x2(xyz):     round(clamp(c, 0, +1) * 1023.0)
+       /// packUnorm3x10_1x2(w):       round(clamp(c, 0, +1) * 3.0)
+       ///
+       /// The first vector component specifies the 10 least-significant bits of the result; 
+       /// the forth component specifies the 2 most-significant bits.
+       ///
+       /// @see gtc_packing
+       /// @see vec4 unpackUnorm3x10_1x2(uint32 const & p)
+       /// @see uint32 packUnorm3x10_1x2(vec4 const & v)
+       /// @see uint32 packU3x10_1x2(uvec4 const & v)
+       /// @see uint32 packI3x10_1x2(ivec4 const & v)
+       GLM_FUNC_DECL uint32 packUnorm3x10_1x2(vec4 const & v);
+
+       /// First, unpacks a single 32-bit unsigned integer p into four 16-bit signed integers. 
+       /// Then, each component is converted to a normalized floating-point value to generate the returned four-component vector.
+       /// 
+       /// The conversion for unpacked fixed-point value f to floating point is done as follows:
+       /// unpackSnorm3x10_1x2(xyz): clamp(f / 1023.0, 0, +1)
+       /// unpackSnorm3x10_1x2(w): clamp(f / 3.0, 0, +1)
+       /// 
+       /// The first component of the returned vector will be extracted from the least significant bits of the input; 
+       /// the last component will be extracted from the most significant bits.
+       /// 
+       /// @see gtc_packing
+       /// @see uint32 packSnorm3x10_1x2(vec4 const & v)
+       /// @see vec4 unpackInorm3x10_1x2(uint32 const & p))
+       /// @see uvec4 unpackI3x10_1x2(uint32 const & p)
+       /// @see uvec4 unpackU3x10_1x2(uint32 const & p)
+       GLM_FUNC_DECL vec4 unpackUnorm3x10_1x2(uint32 p);
+
+       /// First, converts the first two components of the normalized floating-point value v into 11-bit signless floating-point values.
+       /// Then, converts the third component of the normalized floating-point value v into a 10-bit signless floating-point value.
+       /// Then, the results are packed into the returned 32-bit unsigned integer.
+       ///
+       /// The first vector component specifies the 11 least-significant bits of the result; 
+       /// the last component specifies the 10 most-significant bits.
+       ///
+       /// @see gtc_packing
+       /// @see vec3 unpackF2x11_1x10(uint32 const & p)
+       GLM_FUNC_DECL uint32 packF2x11_1x10(vec3 const & v);
+
+       /// First, unpacks a single 32-bit unsigned integer p into two 11-bit signless floating-point values and one 10-bit signless floating-point value . 
+       /// Then, each component is converted to a normalized floating-point value to generate the returned three-component vector.
+       /// 
+       /// The first component of the returned vector will be extracted from the least significant bits of the input; 
+       /// the last component will be extracted from the most significant bits.
+       /// 
+       /// @see gtc_packing
+       /// @see uint32 packF2x11_1x10(vec3 const & v)
+       GLM_FUNC_DECL vec3 unpackF2x11_1x10(uint32 p);
+
+       /// @}
+}// namespace glm
+
+#include "packing.inl"
diff --git a/include/glm/gtc/packing.inl b/include/glm/gtc/packing.inl
new file mode 100644 (file)
index 0000000..58b1d59
--- /dev/null
@@ -0,0 +1,490 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtc_packing
+/// @file glm/gtc/packing.inl
+/// @date 2013-08-08 / 2013-08-08
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////
+
+#include "../common.hpp"
+#include "../vec2.hpp"
+#include "../vec3.hpp"
+#include "../vec4.hpp"
+#include "../detail/type_half.hpp"
+#include <cstring>
+
+namespace glm{
+namespace detail
+{
+       GLM_FUNC_QUALIFIER glm::uint16 float2half(glm::uint32 f)
+       {
+               // 10 bits    =>                         EE EEEFFFFF
+               // 11 bits    =>                        EEE EEFFFFFF
+               // Half bits  =>                   SEEEEEFF FFFFFFFF
+               // Float bits => SEEEEEEE EFFFFFFF FFFFFFFF FFFFFFFF
+
+               // 0x00007c00 => 00000000 00000000 01111100 00000000
+               // 0x000003ff => 00000000 00000000 00000011 11111111
+               // 0x38000000 => 00111000 00000000 00000000 00000000
+               // 0x7f800000 => 01111111 10000000 00000000 00000000
+               // 0x00008000 => 00000000 00000000 10000000 00000000
+               return
+                       ((f >> 16) & 0x8000) | // sign
+                       ((((f & 0x7f800000) - 0x38000000) >> 13) & 0x7c00) | // exponential
+                       ((f >> 13) & 0x03ff); // Mantissa
+       }
+
+       GLM_FUNC_QUALIFIER glm::uint32 float2packed11(glm::uint32 f)
+       {
+               // 10 bits    =>                         EE EEEFFFFF
+               // 11 bits    =>                        EEE EEFFFFFF
+               // Half bits  =>                   SEEEEEFF FFFFFFFF
+               // Float bits => SEEEEEEE EFFFFFFF FFFFFFFF FFFFFFFF
+
+               // 0x000007c0 => 00000000 00000000 00000111 11000000
+               // 0x00007c00 => 00000000 00000000 01111100 00000000
+               // 0x000003ff => 00000000 00000000 00000011 11111111
+               // 0x38000000 => 00111000 00000000 00000000 00000000
+               // 0x7f800000 => 01111111 10000000 00000000 00000000
+               // 0x00008000 => 00000000 00000000 10000000 00000000
+               return
+                       ((((f & 0x7f800000) - 0x38000000) >> 17) & 0x07c0) | // exponential
+                       ((f >> 17) & 0x003f); // Mantissa
+       }
+
+       GLM_FUNC_QUALIFIER glm::uint32 packed11ToFloat(glm::uint32 p)
+       {
+               // 10 bits    =>                         EE EEEFFFFF
+               // 11 bits    =>                        EEE EEFFFFFF
+               // Half bits  =>                   SEEEEEFF FFFFFFFF
+               // Float bits => SEEEEEEE EFFFFFFF FFFFFFFF FFFFFFFF
+
+               // 0x000007c0 => 00000000 00000000 00000111 11000000
+               // 0x00007c00 => 00000000 00000000 01111100 00000000
+               // 0x000003ff => 00000000 00000000 00000011 11111111
+               // 0x38000000 => 00111000 00000000 00000000 00000000
+               // 0x7f800000 => 01111111 10000000 00000000 00000000
+               // 0x00008000 => 00000000 00000000 10000000 00000000
+               return
+                       ((((p & 0x07c0) << 17) + 0x38000000) & 0x7f800000) | // exponential
+                       ((p & 0x003f) << 17); // Mantissa
+       }
+
+       GLM_FUNC_QUALIFIER glm::uint32 float2packed10(glm::uint32 f)
+       {
+               // 10 bits    =>                         EE EEEFFFFF
+               // 11 bits    =>                        EEE EEFFFFFF
+               // Half bits  =>                   SEEEEEFF FFFFFFFF
+               // Float bits => SEEEEEEE EFFFFFFF FFFFFFFF FFFFFFFF
+
+               // 0x0000001F => 00000000 00000000 00000000 00011111
+               // 0x0000003F => 00000000 00000000 00000000 00111111
+               // 0x000003E0 => 00000000 00000000 00000011 11100000
+               // 0x000007C0 => 00000000 00000000 00000111 11000000
+               // 0x00007C00 => 00000000 00000000 01111100 00000000
+               // 0x000003FF => 00000000 00000000 00000011 11111111
+               // 0x38000000 => 00111000 00000000 00000000 00000000
+               // 0x7f800000 => 01111111 10000000 00000000 00000000
+               // 0x00008000 => 00000000 00000000 10000000 00000000
+               return
+                       ((((f & 0x7f800000) - 0x38000000) >> 18) & 0x03E0) | // exponential
+                       ((f >> 18) & 0x001f); // Mantissa
+       }
+
+       GLM_FUNC_QUALIFIER glm::uint32 packed10ToFloat(glm::uint32 p)
+       {
+               // 10 bits    =>                         EE EEEFFFFF
+               // 11 bits    =>                        EEE EEFFFFFF
+               // Half bits  =>                   SEEEEEFF FFFFFFFF
+               // Float bits => SEEEEEEE EFFFFFFF FFFFFFFF FFFFFFFF
+
+               // 0x0000001F => 00000000 00000000 00000000 00011111
+               // 0x0000003F => 00000000 00000000 00000000 00111111
+               // 0x000003E0 => 00000000 00000000 00000011 11100000
+               // 0x000007C0 => 00000000 00000000 00000111 11000000
+               // 0x00007C00 => 00000000 00000000 01111100 00000000
+               // 0x000003FF => 00000000 00000000 00000011 11111111
+               // 0x38000000 => 00111000 00000000 00000000 00000000
+               // 0x7f800000 => 01111111 10000000 00000000 00000000
+               // 0x00008000 => 00000000 00000000 10000000 00000000
+               return
+                       ((((p & 0x03E0) << 18) + 0x38000000) & 0x7f800000) | // exponential
+                       ((p & 0x001f) << 18); // Mantissa
+       }
+
+       GLM_FUNC_QUALIFIER glm::uint half2float(glm::uint h)
+       {
+               return ((h & 0x8000) << 16) | ((( h & 0x7c00) + 0x1C000) << 13) | ((h & 0x03FF) << 13);
+       }
+
+       GLM_FUNC_QUALIFIER glm::uint floatTo11bit(float x)
+       {
+               if(x == 0.0f)
+                       return 0u;
+               else if(glm::isnan(x))
+                       return ~0u;
+               else if(glm::isinf(x))
+                       return 0x1Fu << 6u;
+
+#              if(GLM_COMPILER & GLM_COMPILER_GCC || GLM_COMPILER & (GLM_COMPILER_APPLE_CLANG | GLM_COMPILER_LLVM))
+                       uint Pack = 0u;
+                       memcpy(&Pack, &x, sizeof(Pack));
+#              else    
+                       uint Pack = reinterpret_cast<uint&>(x);
+#              endif
+
+               return float2packed11(Pack);
+       }
+
+       GLM_FUNC_QUALIFIER float packed11bitToFloat(glm::uint x)
+       {
+               if(x == 0)
+                       return 0.0f;
+               else if(x == ((1 << 11) - 1))
+                       return ~0;//NaN
+               else if(x == (0x1f << 6))
+                       return ~0;//Inf
+
+               uint Result = packed11ToFloat(x);
+
+#              if(GLM_COMPILER & GLM_COMPILER_GCC || GLM_COMPILER & (GLM_COMPILER_APPLE_CLANG | GLM_COMPILER_LLVM))
+                       float Temp = 0;
+                       memcpy(&Temp, &Result, sizeof(Temp));
+                       return Temp;
+#              else    
+                       return reinterpret_cast<float&>(Result);
+#              endif
+       }
+
+       GLM_FUNC_QUALIFIER glm::uint floatTo10bit(float x)
+       {
+               if(x == 0.0f)
+                       return 0u;
+               else if(glm::isnan(x))
+                       return ~0u;
+               else if(glm::isinf(x))
+                       return 0x1Fu << 5u;
+
+#              if(GLM_COMPILER & GLM_COMPILER_GCC || GLM_COMPILER & (GLM_COMPILER_APPLE_CLANG | GLM_COMPILER_LLVM))
+                       uint Pack = 0;
+                       memcpy(&Pack, &x, sizeof(Pack));
+#              else    
+                       uint Pack = reinterpret_cast<uint&>(x);
+#              endif
+
+               return float2packed10(Pack);
+       }
+
+       GLM_FUNC_QUALIFIER float packed10bitToFloat(glm::uint x)
+       {
+               if(x == 0)
+                       return 0.0f;
+               else if(x == ((1 << 10) - 1))
+                       return ~0;//NaN
+               else if(x == (0x1f << 5))
+                       return ~0;//Inf
+
+               uint Result = packed10ToFloat(x);
+
+#              if(GLM_COMPILER & GLM_COMPILER_GCC || GLM_COMPILER & (GLM_COMPILER_APPLE_CLANG | GLM_COMPILER_LLVM))
+                       float Temp = 0;
+                       memcpy(&Temp, &Result, sizeof(Temp));
+                       return Temp;
+#              else    
+                       return reinterpret_cast<float&>(Result);
+#              endif
+       }
+
+//     GLM_FUNC_QUALIFIER glm::uint f11_f11_f10(float x, float y, float z)
+//     {
+//             return ((floatTo11bit(x) & ((1 << 11) - 1)) << 0) |  ((floatTo11bit(y) & ((1 << 11) - 1)) << 11) | ((floatTo10bit(z) & ((1 << 10) - 1)) << 22);
+//     }
+
+       union u10u10u10u2
+       {
+               struct
+               {
+                       uint x : 10;
+                       uint y : 10;
+                       uint z : 10;
+                       uint w : 2;
+               } data;
+               uint32 pack;
+       };
+
+       union i10i10i10i2
+       {
+               struct
+               {
+                       int x : 10;
+                       int y : 10;
+                       int z : 10;
+                       int w : 2;
+               } data;
+               uint32 pack;
+       };
+
+}//namespace detail
+
+       GLM_FUNC_QUALIFIER uint8 packUnorm1x8(float v)
+       {
+               return static_cast<uint8>(round(clamp(v, 0.0f, 1.0f) * 255.0f));
+       }
+       
+       GLM_FUNC_QUALIFIER float unpackUnorm1x8(uint8 p)
+       {
+               float const Unpack(p);
+               return Unpack * static_cast<float>(0.0039215686274509803921568627451); // 1 / 255
+       }
+       
+       GLM_FUNC_QUALIFIER uint16 packUnorm2x8(vec2 const & v)
+       {
+               u8vec2 const Topack(round(clamp(v, 0.0f, 1.0f) * 255.0f));
+               return reinterpret_cast<uint16 const &>(Topack);
+       }
+       
+       GLM_FUNC_QUALIFIER vec2 unpackUnorm2x8(uint16 p)
+       {
+               vec2 const Unpack(reinterpret_cast<u8vec2 const &>(p));
+               return Unpack * float(0.0039215686274509803921568627451); // 1 / 255
+       }
+
+       GLM_FUNC_QUALIFIER uint8 packSnorm1x8(float v)
+       {
+               int8 const Topack(static_cast<int8>(round(clamp(v ,-1.0f, 1.0f) * 127.0f)));
+               return reinterpret_cast<uint8 const &>(Topack);
+       }
+       
+       GLM_FUNC_QUALIFIER float unpackSnorm1x8(uint8 p)
+       {
+               float const Unpack(reinterpret_cast<int8 const &>(p));
+               return clamp(
+                       Unpack * 0.00787401574803149606299212598425f, // 1.0f / 127.0f
+                       -1.0f, 1.0f);
+       }
+       
+       GLM_FUNC_QUALIFIER uint16 packSnorm2x8(vec2 const & v)
+       {
+               i8vec2 const Topack(round(clamp(v, -1.0f, 1.0f) * 127.0f));
+               return reinterpret_cast<uint16 const &>(Topack);
+       }
+       
+       GLM_FUNC_QUALIFIER vec2 unpackSnorm2x8(uint16 p)
+       {
+               vec2 const Unpack(reinterpret_cast<i8vec2 const &>(p));
+               return clamp(
+                       Unpack * 0.00787401574803149606299212598425f, // 1.0f / 127.0f
+                       -1.0f, 1.0f);
+       }
+       
+       GLM_FUNC_QUALIFIER uint16 packUnorm1x16(float s)
+       {
+               return static_cast<uint16>(round(clamp(s, 0.0f, 1.0f) * 65535.0f));
+       }
+
+       GLM_FUNC_QUALIFIER float unpackUnorm1x16(uint16 p)
+       {
+               float const Unpack(p);
+               return Unpack * 1.5259021896696421759365224689097e-5f; // 1.0 / 65535.0
+       }
+
+       GLM_FUNC_QUALIFIER uint64 packUnorm4x16(vec4 const & v)
+       {
+               u16vec4 const Topack(round(clamp(v , 0.0f, 1.0f) * 65535.0f));
+               return reinterpret_cast<uint64 const &>(Topack);
+       }
+
+       GLM_FUNC_QUALIFIER vec4 unpackUnorm4x16(uint64 p)
+       {
+               vec4 const Unpack(reinterpret_cast<u16vec4 const &>(p));
+               return Unpack * 1.5259021896696421759365224689097e-5f; // 1.0 / 65535.0
+       }
+
+       GLM_FUNC_QUALIFIER uint16 packSnorm1x16(float v)
+       {
+               int16 const Topack = static_cast<int16>(round(clamp(v ,-1.0f, 1.0f) * 32767.0f));
+               return reinterpret_cast<uint16 const &>(Topack);
+       }
+
+       GLM_FUNC_QUALIFIER float unpackSnorm1x16(uint16 p)
+       {
+               float const Unpack(reinterpret_cast<int16 const &>(p));
+               return clamp(
+                       Unpack * 3.0518509475997192297128208258309e-5f, //1.0f / 32767.0f, 
+                       -1.0f, 1.0f);
+       }
+
+       GLM_FUNC_QUALIFIER uint64 packSnorm4x16(vec4 const & v)
+       {
+               i16vec4 const Topack(round(clamp(v ,-1.0f, 1.0f) * 32767.0f));
+               return reinterpret_cast<uint64 const &>(Topack);
+       }
+
+       GLM_FUNC_QUALIFIER vec4 unpackSnorm4x16(uint64 p)
+       {
+               vec4 const Unpack(reinterpret_cast<i16vec4 const &>(p));
+               return clamp(
+                       Unpack * 3.0518509475997192297128208258309e-5f, //1.0f / 32767.0f,
+                       -1.0f, 1.0f);
+       }
+
+       GLM_FUNC_QUALIFIER uint16 packHalf1x16(float v)
+       {
+               int16 const Topack(detail::toFloat16(v));
+               return reinterpret_cast<uint16 const &>(Topack);
+       }
+
+       GLM_FUNC_QUALIFIER float unpackHalf1x16(uint16 v)
+       {
+               return detail::toFloat32(reinterpret_cast<int16 const &>(v));
+       }
+
+       GLM_FUNC_QUALIFIER uint64 packHalf4x16(glm::vec4 const & v)
+       {
+               i16vec4 Unpack(
+                       detail::toFloat16(v.x),
+                       detail::toFloat16(v.y),
+                       detail::toFloat16(v.z),
+                       detail::toFloat16(v.w));
+
+               return reinterpret_cast<uint64 const &>(Unpack);
+       }
+
+       GLM_FUNC_QUALIFIER glm::vec4 unpackHalf4x16(uint64 v)
+       {
+               i16vec4 Unpack(reinterpret_cast<i16vec4 const &>(v));
+       
+               return vec4(
+                       detail::toFloat32(Unpack.x),
+                       detail::toFloat32(Unpack.y),
+                       detail::toFloat32(Unpack.z),
+                       detail::toFloat32(Unpack.w));
+       }
+
+       GLM_FUNC_QUALIFIER uint32 packI3x10_1x2(ivec4 const & v)
+       {
+               detail::i10i10i10i2 Result;
+               Result.data.x = v.x;
+               Result.data.y = v.y;
+               Result.data.z = v.z;
+               Result.data.w = v.w;
+               return Result.pack; 
+       }
+
+       GLM_FUNC_QUALIFIER ivec4 unpackI3x10_1x2(uint32 v)
+       {
+               detail::i10i10i10i2 Unpack;
+               Unpack.pack = v;
+               return ivec4(
+                       Unpack.data.x,
+                       Unpack.data.y,
+                       Unpack.data.z,
+                       Unpack.data.w);
+       }
+
+       GLM_FUNC_QUALIFIER uint32 packU3x10_1x2(uvec4 const & v)
+       {
+               detail::u10u10u10u2 Result;
+               Result.data.x = v.x;
+               Result.data.y = v.y;
+               Result.data.z = v.z;
+               Result.data.w = v.w;
+               return Result.pack; 
+       }
+
+       GLM_FUNC_QUALIFIER uvec4 unpackU3x10_1x2(uint32 v)
+       {
+               detail::u10u10u10u2 Unpack;
+               Unpack.pack = v;
+               return uvec4(
+                       Unpack.data.x,
+                       Unpack.data.y,
+                       Unpack.data.z,
+                       Unpack.data.w);
+       }
+
+       GLM_FUNC_QUALIFIER uint32 packSnorm3x10_1x2(vec4 const & v)
+       {
+               detail::i10i10i10i2 Result;
+               Result.data.x = int(round(clamp(v.x,-1.0f, 1.0f) * 511.f));
+               Result.data.y = int(round(clamp(v.y,-1.0f, 1.0f) * 511.f));
+               Result.data.z = int(round(clamp(v.z,-1.0f, 1.0f) * 511.f));
+               Result.data.w = int(round(clamp(v.w,-1.0f, 1.0f) *   1.f));
+               return Result.pack;
+       }
+
+       GLM_FUNC_QUALIFIER vec4 unpackSnorm3x10_1x2(uint32 v)
+       {
+               detail::i10i10i10i2 Unpack;
+               Unpack.pack = v;
+               vec4 Result;
+               Result.x = clamp(float(Unpack.data.x) / 511.f, -1.0f, 1.0f);
+               Result.y = clamp(float(Unpack.data.y) / 511.f, -1.0f, 1.0f);
+               Result.z = clamp(float(Unpack.data.z) / 511.f, -1.0f, 1.0f);
+               Result.w = clamp(float(Unpack.data.w) /   1.f, -1.0f, 1.0f);
+               return Result;
+       }
+
+       GLM_FUNC_QUALIFIER uint32 packUnorm3x10_1x2(vec4 const & v)
+       {
+               detail::i10i10i10i2 Result;
+               Result.data.x = int(round(clamp(v.x, 0.0f, 1.0f) * 1023.f));
+               Result.data.y = int(round(clamp(v.y, 0.0f, 1.0f) * 1023.f));
+               Result.data.z = int(round(clamp(v.z, 0.0f, 1.0f) * 1023.f));
+               Result.data.w = int(round(clamp(v.w, 0.0f, 1.0f) *    3.f));
+               return Result.pack;
+       }
+
+       GLM_FUNC_QUALIFIER vec4 unpackUnorm3x10_1x2(uint32 v)
+       {
+               detail::i10i10i10i2 Unpack;
+               Unpack.pack = v;
+               vec4 Result;
+               Result.x = float(Unpack.data.x) / 1023.f;
+               Result.y = float(Unpack.data.y) / 1023.f;
+               Result.z = float(Unpack.data.z) / 1023.f;
+               Result.w = float(Unpack.data.w) /   3.f;
+               return Result;
+       }
+
+       GLM_FUNC_QUALIFIER uint32 packF2x11_1x10(vec3 const & v)
+       {
+               return
+                       ((detail::floatTo11bit(v.x) & ((1 << 11) - 1)) <<  0) |
+                       ((detail::floatTo11bit(v.y) & ((1 << 11) - 1)) << 11) |
+                       ((detail::floatTo10bit(v.z) & ((1 << 10) - 1)) << 22);
+       }
+
+       GLM_FUNC_QUALIFIER vec3 unpackF2x11_1x10(uint32 v)
+       {
+               return vec3(
+                       detail::packed11bitToFloat(v >> 0),
+                       detail::packed11bitToFloat(v >> 11),
+                       detail::packed10bitToFloat(v >> 22));
+       }
+
+}//namespace glm
diff --git a/include/glm/gtc/quaternion.hpp b/include/glm/gtc/quaternion.hpp
new file mode 100644 (file)
index 0000000..0735abf
--- /dev/null
@@ -0,0 +1,377 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtc_quaternion
+/// @file glm/gtc/quaternion.hpp
+/// @date 2009-05-21 / 2012-12-20
+/// @author Christophe Riccio
+///
+/// @see core (dependence)
+/// @see gtc_half_float (dependence)
+/// @see gtc_constants (dependence)
+///
+/// @defgroup gtc_quaternion GLM_GTC_quaternion
+/// @ingroup gtc
+/// 
+/// @brief Defines a templated quaternion type and several quaternion operations.
+/// 
+/// <glm/gtc/quaternion.hpp> need to be included to use these functionalities.
+///////////////////////////////////////////////////////////////////////////////////
+
+#pragma once
+
+// Dependency:
+#include "../mat3x3.hpp"
+#include "../mat4x4.hpp"
+#include "../vec3.hpp"
+#include "../vec4.hpp"
+#include "../gtc/constants.hpp"
+
+#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
+#      pragma message("GLM: GLM_GTC_quaternion extension included")
+#endif
+
+namespace glm
+{
+       /// @addtogroup gtc_quaternion
+       /// @{
+
+       template <typename T, precision P>
+       struct tquat
+       {
+               typedef tquat<T, P> type;
+               typedef T value_type;
+
+       public:
+               T x, y, z, w;
+
+               //////////////////////////////////////
+               // Component accesses
+
+#              ifdef GLM_FORCE_SIZE_FUNC
+                       typedef size_t size_type;
+                       /// Return the count of components of a quaternion
+                       GLM_FUNC_DECL GLM_CONSTEXPR size_type size() const;
+
+                       GLM_FUNC_DECL T & operator[](size_type i);
+                       GLM_FUNC_DECL T const & operator[](size_type i) const;
+#              else
+                       typedef length_t length_type;
+                       /// Return the count of components of a quaternion
+                       GLM_FUNC_DECL GLM_CONSTEXPR length_type length() const;
+
+                       GLM_FUNC_DECL T & operator[](length_type i);
+                       GLM_FUNC_DECL T const & operator[](length_type i) const;
+#              endif//GLM_FORCE_SIZE_FUNC
+
+               //////////////////////////////////////
+               // Implicit basic constructors
+
+               GLM_FUNC_DECL tquat();
+               GLM_FUNC_DECL tquat(tquat<T, P> const & q);
+               template <precision Q>
+               GLM_FUNC_DECL tquat(tquat<T, Q> const & q);
+
+               //////////////////////////////////////
+               // Explicit basic constructors
+
+               GLM_FUNC_DECL explicit tquat(ctor);
+               GLM_FUNC_DECL explicit tquat(T const & s, tvec3<T, P> const & v);
+               GLM_FUNC_DECL tquat(T const & w, T const & x, T const & y, T const & z);
+
+               //////////////////////////////////////
+               // Convertions
+
+#              ifdef GLM_FORCE_EXPLICIT_CTOR
+                       template <typename U, precision Q>
+                       GLM_FUNC_DECL explicit tquat(tquat<U, Q> const & q);
+#              else
+                       template <typename U, precision Q>
+                       GLM_FUNC_DECL tquat(tquat<U, Q> const & q);
+#              endif
+               
+               // explicit conversion operators
+#              if GLM_HAS_EXPLICIT_CONVERSION_OPERATORS
+                       GLM_FUNC_DECL explicit operator tmat3x3<T, P>();
+                       GLM_FUNC_DECL explicit operator tmat4x4<T, P>();
+#              endif
+               
+               /// Create a quaternion from two normalized axis
+               /// 
+               /// @param u A first normalized axis
+               /// @param v A second normalized axis
+               /// @see gtc_quaternion
+               /// @see http://lolengine.net/blog/2013/09/18/beautiful-maths-quaternion-from-vectors
+               GLM_FUNC_DECL explicit tquat(tvec3<T, P> const & u,     tvec3<T, P> const & v);
+
+               /// Build a quaternion from euler angles (pitch, yaw, roll), in radians.
+               GLM_FUNC_DECL explicit tquat(tvec3<T, P> const & eulerAngles);
+               GLM_FUNC_DECL explicit tquat(tmat3x3<T, P> const & m);
+               GLM_FUNC_DECL explicit tquat(tmat4x4<T, P> const & m);
+
+               //////////////////////////////////////
+               // Operators
+
+               GLM_FUNC_DECL tquat<T, P> & operator=(tquat<T, P> const & m);
+
+               template <typename U>
+               GLM_FUNC_DECL tquat<T, P> & operator=(tquat<U, P> const & m);
+               template <typename U>
+               GLM_FUNC_DECL tquat<T, P> & operator+=(tquat<U, P> const & q);
+               template <typename U>
+               GLM_FUNC_DECL tquat<T, P> & operator*=(tquat<U, P> const & q);
+               template <typename U>
+               GLM_FUNC_DECL tquat<T, P> & operator*=(U s);
+               template <typename U>
+               GLM_FUNC_DECL tquat<T, P> & operator/=(U s);
+       };
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tquat<T, P> operator-(tquat<T, P> const & q);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tquat<T, P> operator+(tquat<T, P> const & q, tquat<T, P> const & p);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tquat<T, P> operator*(tquat<T, P> const & q, tquat<T, P> const & p);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec3<T, P> operator*(tquat<T, P> const & q, tvec3<T, P> const & v);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec3<T, P> operator*(tvec3<T, P> const & v, tquat<T, P> const & q);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec4<T, P> operator*(tquat<T, P> const & q, tvec4<T, P> const & v);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec4<T, P> operator*(tvec4<T, P> const & v, tquat<T, P> const & q);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tquat<T, P> operator*(tquat<T, P> const & q, T const & s);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tquat<T, P> operator*(T const & s, tquat<T, P> const & q);
+
+       template <typename T, precision P>
+       GLM_FUNC_DECL tquat<T, P> operator/(tquat<T, P> const & q, T const & s);
+
+       /// Returns the length of the quaternion.
+       /// 
+       /// @see gtc_quaternion
+       template <typename T, precision P>
+       GLM_FUNC_DECL T length(tquat<T, P> const & q);
+
+       /// Returns the normalized quaternion.
+       /// 
+       /// @see gtc_quaternion
+       template <typename T, precision P>
+       GLM_FUNC_DECL tquat<T, P> normalize(tquat<T, P> const & q);
+               
+       /// Returns dot product of q1 and q2, i.e., q1[0] * q2[0] + q1[1] * q2[1] + ...
+       /// 
+       /// @see gtc_quaternion
+       template <typename T, precision P, template <typename, precision> class quatType>
+       GLM_FUNC_DECL T dot(quatType<T, P> const & x, quatType<T, P> const & y);
+
+       /// Spherical linear interpolation of two quaternions.
+       /// The interpolation is oriented and the rotation is performed at constant speed.
+       /// For short path spherical linear interpolation, use the slerp function.
+       /// 
+       /// @param x A quaternion
+       /// @param y A quaternion
+       /// @param a Interpolation factor. The interpolation is defined beyond the range [0, 1].
+       /// @tparam T Value type used to build the quaternion. Supported: half, float or double.
+       /// @see gtc_quaternion
+       /// @see - slerp(tquat<T, P> const & x, tquat<T, P> const & y, T const & a)
+       template <typename T, precision P>
+       GLM_FUNC_DECL tquat<T, P> mix(tquat<T, P> const & x, tquat<T, P> const & y, T a);
+
+       /// Linear interpolation of two quaternions.
+       /// The interpolation is oriented.
+       /// 
+       /// @param x A quaternion
+       /// @param y A quaternion
+       /// @param a Interpolation factor. The interpolation is defined in the range [0, 1].
+       /// @tparam T Value type used to build the quaternion. Supported: half, float or double.
+       /// @see gtc_quaternion
+       template <typename T, precision P>
+       GLM_FUNC_DECL tquat<T, P> lerp(tquat<T, P> const & x, tquat<T, P> const & y, T a);
+
+       /// Spherical linear interpolation of two quaternions.
+       /// The interpolation always take the short path and the rotation is performed at constant speed.
+       /// 
+       /// @param x A quaternion
+       /// @param y A quaternion
+       /// @param a Interpolation factor. The interpolation is defined beyond the range [0, 1].
+       /// @tparam T Value type used to build the quaternion. Supported: half, float or double.
+       /// @see gtc_quaternion
+       template <typename T, precision P>
+       GLM_FUNC_DECL tquat<T, P> slerp(tquat<T, P> const & x, tquat<T, P> const & y, T a);
+
+       /// Returns the q conjugate.
+       /// 
+       /// @see gtc_quaternion
+       template <typename T, precision P>
+       GLM_FUNC_DECL tquat<T, P> conjugate(tquat<T, P> const & q);
+
+       /// Returns the q inverse.
+       /// 
+       /// @see gtc_quaternion
+       template <typename T, precision P>
+       GLM_FUNC_DECL tquat<T, P> inverse(tquat<T, P> const & q);
+
+       /// Rotates a quaternion from a vector of 3 components axis and an angle.
+       /// 
+       /// @param q Source orientation
+       /// @param angle Angle expressed in radians.
+       /// @param axis Axis of the rotation
+       /// 
+       /// @see gtc_quaternion
+       template <typename T, precision P>
+       GLM_FUNC_DECL tquat<T, P> rotate(tquat<T, P> const & q, T const & angle, tvec3<T, P> const & axis);
+
+       /// Returns euler angles, yitch as x, yaw as y, roll as z.
+       /// The result is expressed in radians if GLM_FORCE_RADIANS is defined or degrees otherwise.
+       /// 
+       /// @see gtc_quaternion
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec3<T, P> eulerAngles(tquat<T, P> const & x);
+
+       /// Returns roll value of euler angles expressed in radians.
+       ///
+       /// @see gtx_quaternion
+       template <typename T, precision P>
+       GLM_FUNC_DECL T roll(tquat<T, P> const & x);
+
+       /// Returns pitch value of euler angles expressed in radians.
+       ///
+       /// @see gtx_quaternion
+       template <typename T, precision P>
+       GLM_FUNC_DECL T pitch(tquat<T, P> const & x);
+
+       /// Returns yaw value of euler angles expressed in radians.
+       ///
+       /// @see gtx_quaternion
+       template <typename T, precision P>
+       GLM_FUNC_DECL T yaw(tquat<T, P> const & x);
+
+       /// Converts a quaternion to a 3 * 3 matrix.
+       /// 
+       /// @see gtc_quaternion
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat3x3<T, P> mat3_cast(tquat<T, P> const & x);
+
+       /// Converts a quaternion to a 4 * 4 matrix.
+       /// 
+       /// @see gtc_quaternion
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat4x4<T, P> mat4_cast(tquat<T, P> const & x);
+
+       /// Converts a 3 * 3 matrix to a quaternion.
+       /// 
+       /// @see gtc_quaternion
+       template <typename T, precision P>
+       GLM_FUNC_DECL tquat<T, P> quat_cast(tmat3x3<T, P> const & x);
+
+       /// Converts a 4 * 4 matrix to a quaternion.
+       /// 
+       /// @see gtc_quaternion
+       template <typename T, precision P>
+       GLM_FUNC_DECL tquat<T, P> quat_cast(tmat4x4<T, P> const & x);
+
+       /// Returns the quaternion rotation angle.
+       ///
+       /// @see gtc_quaternion
+       template <typename T, precision P>
+       GLM_FUNC_DECL T angle(tquat<T, P> const & x);
+
+       /// Returns the q rotation axis.
+       ///
+       /// @see gtc_quaternion
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec3<T, P> axis(tquat<T, P> const & x);
+
+       /// Build a quaternion from an angle and a normalized axis.
+       ///
+       /// @param angle Angle expressed in radians.
+       /// @param axis Axis of the quaternion, must be normalized.
+       ///
+       /// @see gtc_quaternion
+       template <typename T, precision P>
+       GLM_FUNC_DECL tquat<T, P> angleAxis(T const & angle, tvec3<T, P> const & axis);
+
+       /// Returns the component-wise comparison result of x < y.
+       /// 
+       /// @tparam quatType Floating-point quaternion types.
+       ///
+       /// @see gtc_quaternion
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec4<bool, P> lessThan(tquat<T, P> const & x, tquat<T, P> const & y);
+
+       /// Returns the component-wise comparison of result x <= y.
+       ///
+       /// @tparam quatType Floating-point quaternion types.
+       ///
+       /// @see gtc_quaternion
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec4<bool, P> lessThanEqual(tquat<T, P> const & x, tquat<T, P> const & y);
+
+       /// Returns the component-wise comparison of result x > y.
+       ///
+       /// @tparam quatType Floating-point quaternion types.
+       ///
+       /// @see gtc_quaternion
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec4<bool, P> greaterThan(tquat<T, P> const & x, tquat<T, P> const & y);
+
+       /// Returns the component-wise comparison of result x >= y.
+       ///
+       /// @tparam quatType Floating-point quaternion types.
+       ///
+       /// @see gtc_quaternion
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec4<bool, P> greaterThanEqual(tquat<T, P> const & x, tquat<T, P> const & y);
+
+       /// Returns the component-wise comparison of result x == y.
+       ///
+       /// @tparam quatType Floating-point quaternion types.
+       ///
+       /// @see gtc_quaternion
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec4<bool, P> equal(tquat<T, P> const & x, tquat<T, P> const & y);
+
+       /// Returns the component-wise comparison of result x != y.
+       /// 
+       /// @tparam quatType Floating-point quaternion types.
+       ///
+       /// @see gtc_quaternion
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec4<bool, P> notEqual(tquat<T, P> const & x, tquat<T, P> const & y);
+       /// @}
+} //namespace glm
+
+#include "quaternion.inl"
diff --git a/include/glm/gtc/quaternion.inl b/include/glm/gtc/quaternion.inl
new file mode 100644 (file)
index 0000000..33ca82c
--- /dev/null
@@ -0,0 +1,784 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtc_quaternion
+/// @file glm/gtc/quaternion.inl
+/// @date 2009-05-21 / 2011-06-15
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////
+
+#include "../trigonometric.hpp"
+#include "../geometric.hpp"
+#include "../exponential.hpp"
+#include <limits>
+
+namespace glm{
+namespace detail
+{
+       template <typename T, precision P>
+       struct compute_dot<tquat, T, P>
+       {
+               static GLM_FUNC_QUALIFIER T call(tquat<T, P> const & x, tquat<T, P> const & y)
+               {
+                       tvec4<T, P> tmp(x.x * y.x, x.y * y.y, x.z * y.z, x.w * y.w);
+                       return (tmp.x + tmp.y) + (tmp.z + tmp.w);
+               }
+       };
+}//namespace detail
+
+       //////////////////////////////////////
+       // Component accesses
+
+#      ifdef GLM_FORCE_SIZE_FUNC
+               template <typename T, precision P>
+               GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tquat<T, P>::size_type tquat<T, P>::size() const
+               {
+                       return 4;
+               }
+
+               template <typename T, precision P>
+               GLM_FUNC_QUALIFIER T & tquat<T, P>::operator[](typename tquat<T, P>::size_type i)
+               {
+                       assert(i >= 0 && static_cast<detail::component_count_t>(i) < detail::component_count(*this));
+                       return (&x)[i];
+               }
+
+               template <typename T, precision P>
+               GLM_FUNC_QUALIFIER T const & tquat<T, P>::operator[](typename tquat<T, P>::size_type i) const
+               {
+                       assert(i >= 0 && static_cast<detail::component_count_t>(i) < detail::component_count(*this));
+                       return (&x)[i];
+               }
+#      else
+               template <typename T, precision P>
+               GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tquat<T, P>::length_type tquat<T, P>::length() const
+               {
+                       return 4;
+               }
+
+               template <typename T, precision P>
+               GLM_FUNC_QUALIFIER T & tquat<T, P>::operator[](typename tquat<T, P>::length_type i)
+               {
+                       assert(i >= 0 && static_cast<detail::component_count_t>(i) < detail::component_count(*this));
+                       return (&x)[i];
+               }
+
+               template <typename T, precision P>
+               GLM_FUNC_QUALIFIER T const & tquat<T, P>::operator[](typename tquat<T, P>::length_type i) const
+               {
+                       assert(i >= 0 && static_cast<detail::component_count_t>(i) < detail::component_count(*this));
+                       return (&x)[i];
+               }
+#      endif//GLM_FORCE_SIZE_FUNC
+
+       //////////////////////////////////////
+       // Implicit basic constructors
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tquat<T, P>::tquat()
+#              ifndef GLM_FORCE_NO_CTOR_INIT
+                       : x(0), y(0), z(0), w(1)
+#              endif
+       {}
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tquat<T, P>::tquat(tquat<T, P> const & q)
+               : x(q.x), y(q.y), z(q.z), w(q.w)
+       {}
+
+       template <typename T, precision P>
+       template <precision Q>
+       GLM_FUNC_QUALIFIER tquat<T, P>::tquat(tquat<T, Q> const & q)
+               : x(q.x), y(q.y), z(q.z), w(q.w)
+       {}
+
+       //////////////////////////////////////
+       // Explicit basic constructors
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tquat<T, P>::tquat(ctor)
+       {}
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tquat<T, P>::tquat(T const & s, tvec3<T, P> const & v)
+               : x(v.x), y(v.y), z(v.z), w(s)
+       {}
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tquat<T, P>::tquat(T const & w, T const & x, T const & y, T const & z)
+               : x(x), y(y), z(z), w(w)
+       {}
+
+       //////////////////////////////////////////////////////////////
+       // Conversions
+
+       template <typename T, precision P>
+       template <typename U, precision Q>
+       GLM_FUNC_QUALIFIER tquat<T, P>::tquat(tquat<U, Q> const & q)
+               : x(static_cast<T>(q.x))
+               , y(static_cast<T>(q.y))
+               , z(static_cast<T>(q.z))
+               , w(static_cast<T>(q.w))
+       {}
+
+       //template <typename valType> 
+       //GLM_FUNC_QUALIFIER tquat<valType>::tquat
+       //(
+       //      valType const & pitch,
+       //      valType const & yaw,
+       //      valType const & roll
+       //)
+       //{
+       //      tvec3<valType> eulerAngle(pitch * valType(0.5), yaw * valType(0.5), roll * valType(0.5));
+       //      tvec3<valType> c = glm::cos(eulerAngle * valType(0.5));
+       //      tvec3<valType> s = glm::sin(eulerAngle * valType(0.5));
+       //      
+       //      this->w = c.x * c.y * c.z + s.x * s.y * s.z;
+       //      this->x = s.x * c.y * c.z - c.x * s.y * s.z;
+       //      this->y = c.x * s.y * c.z + s.x * c.y * s.z;
+       //      this->z = c.x * c.y * s.z - s.x * s.y * c.z;
+       //}
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tquat<T, P>::tquat(tvec3<T, P> const & u, tvec3<T, P> const & v)
+       {
+               tvec3<T, P> const LocalW(cross(u, v));
+               T Dot = detail::compute_dot<tvec3, T, P>::call(u, v);
+               tquat<T, P> q(T(1) + Dot, LocalW.x, LocalW.y, LocalW.z);
+
+               *this = normalize(q);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tquat<T, P>::tquat(tvec3<T, P> const & eulerAngle)
+       {
+               tvec3<T, P> c = glm::cos(eulerAngle * T(0.5));
+               tvec3<T, P> s = glm::sin(eulerAngle * T(0.5));
+               
+               this->w = c.x * c.y * c.z + s.x * s.y * s.z;
+               this->x = s.x * c.y * c.z - c.x * s.y * s.z;
+               this->y = c.x * s.y * c.z + s.x * c.y * s.z;
+               this->z = c.x * c.y * s.z - s.x * s.y * c.z;
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tquat<T, P>::tquat(tmat3x3<T, P> const & m)
+       {
+               *this = quat_cast(m);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tquat<T, P>::tquat(tmat4x4<T, P> const & m)
+       {
+               *this = quat_cast(m);
+       }
+
+#      if GLM_HAS_EXPLICIT_CONVERSION_OPERATORS
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tquat<T, P>::operator tmat3x3<T, P>()
+       {
+               return mat3_cast(*this);
+       }
+       
+       template <typename T, precision P>      
+       GLM_FUNC_QUALIFIER tquat<T, P>::operator tmat4x4<T, P>()
+       {
+               return mat4_cast(*this);
+       }
+#      endif//GLM_HAS_EXPLICIT_CONVERSION_OPERATORS
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tquat<T, P> conjugate(tquat<T, P> const & q)
+       {
+               return tquat<T, P>(q.w, -q.x, -q.y, -q.z);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tquat<T, P> inverse(tquat<T, P> const & q)
+       {
+               return conjugate(q) / dot(q, q);
+       }
+
+       //////////////////////////////////////////////////////////////
+       // tquat<valType> operators
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tquat<T, P> & tquat<T, P>::operator=(tquat<T, P> const & q)
+       {
+               this->w = q.w;
+               this->x = q.x;
+               this->y = q.y;
+               this->z = q.z;
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U>
+       GLM_FUNC_QUALIFIER tquat<T, P> & tquat<T, P>::operator=(tquat<U, P> const & q)
+       {
+               this->w = static_cast<T>(q.w);
+               this->x = static_cast<T>(q.x);
+               this->y = static_cast<T>(q.y);
+               this->z = static_cast<T>(q.z);
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U>
+       GLM_FUNC_QUALIFIER tquat<T, P> & tquat<T, P>::operator+=(tquat<U, P> const & q)
+       {
+               this->w += static_cast<T>(q.w);
+               this->x += static_cast<T>(q.x);
+               this->y += static_cast<T>(q.y);
+               this->z += static_cast<T>(q.z);
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U>
+       GLM_FUNC_QUALIFIER tquat<T, P> & tquat<T, P>::operator*=(tquat<U, P> const & r)
+       {
+               tquat<T, P> const p(*this);
+               tquat<T, P> const q(r);
+
+               this->w = p.w * q.w - p.x * q.x - p.y * q.y - p.z * q.z;
+               this->x = p.w * q.x + p.x * q.w + p.y * q.z - p.z * q.y;
+               this->y = p.w * q.y + p.y * q.w + p.z * q.x - p.x * q.z;
+               this->z = p.w * q.z + p.z * q.w + p.x * q.y - p.y * q.x;
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U>
+       GLM_FUNC_QUALIFIER tquat<T, P> & tquat<T, P>::operator*=(U s)
+       {
+               this->w *= static_cast<U>(s);
+               this->x *= static_cast<U>(s);
+               this->y *= static_cast<U>(s);
+               this->z *= static_cast<U>(s);
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U>
+       GLM_FUNC_QUALIFIER tquat<T, P> & tquat<T, P>::operator/=(U s)
+       {
+               this->w /= static_cast<U>(s);
+               this->x /= static_cast<U>(s);
+               this->y /= static_cast<U>(s);
+               this->z /= static_cast<U>(s);
+               return *this;
+       }
+
+       //////////////////////////////////////////////////////////////
+       // tquat<T, P> external operators
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tquat<T, P> operator-(tquat<T, P> const & q)
+       {
+               return tquat<T, P>(-q.w, -q.x, -q.y, -q.z);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tquat<T, P> operator+(tquat<T, P> const & q, tquat<T, P> const & p)
+       {
+               return tquat<T, P>(q) += p;
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tquat<T, P> operator*(tquat<T, P> const & q, tquat<T, P> const & p)
+       {
+               return tquat<T, P>(q) *= p;
+       }
+
+       // Transformation
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec3<T, P> operator*(tquat<T, P> const & q, tvec3<T, P> const & v)
+       {
+               tvec3<T, P> const QuatVector(q.x, q.y, q.z);
+               tvec3<T, P> const uv(glm::cross(QuatVector, v));
+               tvec3<T, P> const uuv(glm::cross(QuatVector, uv));
+
+               return v + ((uv * q.w) + uuv) * static_cast<T>(2);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec3<T, P> operator*(tvec3<T, P> const & v, tquat<T, P> const & q)
+       {
+               return glm::inverse(q) * v;
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec4<T, P> operator*(tquat<T, P> const & q, tvec4<T, P> const & v)
+       {
+               return tvec4<T, P>(q * tvec3<T, P>(v), v.w);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec4<T, P> operator*(tvec4<T, P> const & v, tquat<T, P> const & q)
+       {
+               return glm::inverse(q) * v;
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tquat<T, P> operator*(tquat<T, P> const & q, T const & s)
+       {
+               return tquat<T, P>(
+                       q.w * s, q.x * s, q.y * s, q.z * s);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tquat<T, P> operator*(T const & s, tquat<T, P> const & q)
+       {
+               return q * s;
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tquat<T, P> operator/(tquat<T, P> const & q, T const & s)
+       {
+               return tquat<T, P>(
+                       q.w / s, q.x / s, q.y / s, q.z / s);
+       }
+
+       //////////////////////////////////////
+       // Boolean operators
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER bool operator==(tquat<T, P> const & q1, tquat<T, P> const & q2)
+       {
+               return (q1.x == q2.x) && (q1.y == q2.y) && (q1.z == q2.z) && (q1.w == q2.w);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER bool operator!=(tquat<T, P> const & q1, tquat<T, P> const & q2)
+       {
+               return (q1.x != q2.x) || (q1.y != q2.y) || (q1.z != q2.z) || (q1.w != q2.w);
+       }
+
+       ////////////////////////////////////////////////////////
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER T length(tquat<T, P> const & q)
+       {
+               return glm::sqrt(dot(q, q));
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tquat<T, P> normalize(tquat<T, P> const & q)
+       {
+               T len = length(q);
+               if(len <= T(0)) // Problem
+                       return tquat<T, P>(1, 0, 0, 0);
+               T oneOverLen = T(1) / len;
+               return tquat<T, P>(q.w * oneOverLen, q.x * oneOverLen, q.y * oneOverLen, q.z * oneOverLen);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tquat<T, P> cross(tquat<T, P> const & q1, tquat<T, P> const & q2)
+       {
+               return tquat<T, P>(
+                       q1.w * q2.w - q1.x * q2.x - q1.y * q2.y - q1.z * q2.z,
+                       q1.w * q2.x + q1.x * q2.w + q1.y * q2.z - q1.z * q2.y,
+                       q1.w * q2.y + q1.y * q2.w + q1.z * q2.x - q1.x * q2.z,
+                       q1.w * q2.z + q1.z * q2.w + q1.x * q2.y - q1.y * q2.x);
+       }
+/*
+       // (x * sin(1 - a) * angle / sin(angle)) + (y * sin(a) * angle / sin(angle))
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tquat<T, P> mix(tquat<T, P> const & x, tquat<T, P> const & y, T const & a)
+       {
+               if(a <= T(0)) return x;
+               if(a >= T(1)) return y;
+
+               float fCos = dot(x, y);
+               tquat<T, P> y2(y); //BUG!!! tquat<T, P> y2;
+               if(fCos < T(0))
+               {
+                       y2 = -y;
+                       fCos = -fCos;
+               }
+
+               //if(fCos > 1.0f) // problem
+               float k0, k1;
+               if(fCos > T(0.9999))
+               {
+                       k0 = T(1) - a;
+                       k1 = T(0) + a; //BUG!!! 1.0f + a;
+               }
+               else
+               {
+                       T fSin = sqrt(T(1) - fCos * fCos);
+                       T fAngle = atan(fSin, fCos);
+                       T fOneOverSin = static_cast<T>(1) / fSin;
+                       k0 = sin((T(1) - a) * fAngle) * fOneOverSin;
+                       k1 = sin((T(0) + a) * fAngle) * fOneOverSin;
+               }
+
+               return tquat<T, P>(
+                       k0 * x.w + k1 * y2.w,
+                       k0 * x.x + k1 * y2.x,
+                       k0 * x.y + k1 * y2.y,
+                       k0 * x.z + k1 * y2.z);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tquat<T, P> mix2
+       (
+               tquat<T, P> const & x, 
+               tquat<T, P> const & y, 
+               T const & a
+       )
+       {
+               bool flip = false;
+               if(a <= static_cast<T>(0)) return x;
+               if(a >= static_cast<T>(1)) return y;
+
+               T cos_t = dot(x, y);
+               if(cos_t < T(0))
+               {
+                       cos_t = -cos_t;
+                       flip = true;
+               }
+
+               T alpha(0), beta(0);
+
+               if(T(1) - cos_t < 1e-7)
+                       beta = static_cast<T>(1) - alpha;
+               else
+               {
+                       T theta = acos(cos_t);
+                       T sin_t = sin(theta);
+                       beta = sin(theta * (T(1) - alpha)) / sin_t;
+                       alpha = sin(alpha * theta) / sin_t;
+               }
+
+               if(flip)
+                       alpha = -alpha;
+               
+               return normalize(beta * x + alpha * y);
+       }
+*/
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tquat<T, P> mix(tquat<T, P> const & x, tquat<T, P> const & y, T a)
+       {
+               T cosTheta = dot(x, y);
+
+               // Perform a linear interpolation when cosTheta is close to 1 to avoid side effect of sin(angle) becoming a zero denominator
+               if(cosTheta > T(1) - epsilon<T>())
+               {
+                       // Linear interpolation
+                       return tquat<T, P>(
+                               mix(x.w, y.w, a),
+                               mix(x.x, y.x, a),
+                               mix(x.y, y.y, a),
+                               mix(x.z, y.z, a));
+               }
+               else
+               {
+                       // Essential Mathematics, page 467
+                       T angle = acos(cosTheta);
+                       return (sin((T(1) - a) * angle) * x + sin(a * angle) * y) / sin(angle);
+               }
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tquat<T, P> lerp(tquat<T, P> const & x, tquat<T, P> const & y, T a)
+       {
+               // Lerp is only defined in [0, 1]
+               assert(a >= static_cast<T>(0));
+               assert(a <= static_cast<T>(1));
+
+               return x * (T(1) - a) + (y * a);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tquat<T, P> slerp(tquat<T, P> const & x,     tquat<T, P> const & y, T a)
+       {
+               tquat<T, P> z = y;
+
+               T cosTheta = dot(x, y);
+
+               // If cosTheta < 0, the interpolation will take the long way around the sphere. 
+               // To fix this, one quat must be negated.
+               if (cosTheta < T(0))
+               {
+                       z        = -y;
+                       cosTheta = -cosTheta;
+               }
+
+               // Perform a linear interpolation when cosTheta is close to 1 to avoid side effect of sin(angle) becoming a zero denominator
+               if(cosTheta > T(1) - epsilon<T>())
+               {
+                       // Linear interpolation
+                       return tquat<T, P>(
+                               mix(x.w, z.w, a),
+                               mix(x.x, z.x, a),
+                               mix(x.y, z.y, a),
+                               mix(x.z, z.z, a));
+               }
+               else
+               {
+                       // Essential Mathematics, page 467
+                       T angle = acos(cosTheta);
+                       return (sin((T(1) - a) * angle) * x + sin(a * angle) * z) / sin(angle);
+               }
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tquat<T, P> rotate(tquat<T, P> const & q, T const & angle, tvec3<T, P> const & v)
+       {
+               tvec3<T, P> Tmp = v;
+
+               // Axis of rotation must be normalised
+               T len = glm::length(Tmp);
+               if(abs(len - T(1)) > T(0.001))
+               {
+                       T oneOverLen = static_cast<T>(1) / len;
+                       Tmp.x *= oneOverLen;
+                       Tmp.y *= oneOverLen;
+                       Tmp.z *= oneOverLen;
+               }
+
+               T const AngleRad(angle);
+               T const Sin = sin(AngleRad * T(0.5));
+
+               return q * tquat<T, P>(cos(AngleRad * T(0.5)), Tmp.x * Sin, Tmp.y * Sin, Tmp.z * Sin);
+               //return gtc::quaternion::cross(q, tquat<T, P>(cos(AngleRad * T(0.5)), Tmp.x * fSin, Tmp.y * fSin, Tmp.z * fSin));
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec3<T, P> eulerAngles(tquat<T, P> const & x)
+       {
+               return tvec3<T, P>(pitch(x), yaw(x), roll(x));
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER T roll(tquat<T, P> const & q)
+       {
+               return T(atan(T(2) * (q.x * q.y + q.w * q.z), q.w * q.w + q.x * q.x - q.y * q.y - q.z * q.z));
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER T pitch(tquat<T, P> const & q)
+       {
+               return T(atan(T(2) * (q.y * q.z + q.w * q.x), q.w * q.w - q.x * q.x - q.y * q.y + q.z * q.z));
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER T yaw(tquat<T, P> const & q)
+       {
+               return asin(T(-2) * (q.x * q.z - q.w * q.y));
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat3x3<T, P> mat3_cast(tquat<T, P> const & q)
+       {
+               tmat3x3<T, P> Result(T(1));
+               T qxx(q.x * q.x);
+               T qyy(q.y * q.y);
+               T qzz(q.z * q.z);
+               T qxz(q.x * q.z);
+               T qxy(q.x * q.y);
+               T qyz(q.y * q.z);
+               T qwx(q.w * q.x);
+               T qwy(q.w * q.y);
+               T qwz(q.w * q.z);
+
+               Result[0][0] = 1 - 2 * (qyy +  qzz);
+               Result[0][1] = 2 * (qxy + qwz);
+               Result[0][2] = 2 * (qxz - qwy);
+
+               Result[1][0] = 2 * (qxy - qwz);
+               Result[1][1] = 1 - 2 * (qxx +  qzz);
+               Result[1][2] = 2 * (qyz + qwx);
+
+               Result[2][0] = 2 * (qxz + qwy);
+               Result[2][1] = 2 * (qyz - qwx);
+               Result[2][2] = 1 - 2 * (qxx +  qyy);
+               return Result;
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat4x4<T, P> mat4_cast(tquat<T, P> const & q)
+       {
+               return tmat4x4<T, P>(mat3_cast(q));
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tquat<T, P> quat_cast(tmat3x3<T, P> const & m)
+       {
+               T fourXSquaredMinus1 = m[0][0] - m[1][1] - m[2][2];
+               T fourYSquaredMinus1 = m[1][1] - m[0][0] - m[2][2];
+               T fourZSquaredMinus1 = m[2][2] - m[0][0] - m[1][1];
+               T fourWSquaredMinus1 = m[0][0] + m[1][1] + m[2][2];
+
+               int biggestIndex = 0;
+               T fourBiggestSquaredMinus1 = fourWSquaredMinus1;
+               if(fourXSquaredMinus1 > fourBiggestSquaredMinus1)
+               {
+                       fourBiggestSquaredMinus1 = fourXSquaredMinus1;
+                       biggestIndex = 1;
+               }
+               if(fourYSquaredMinus1 > fourBiggestSquaredMinus1)
+               {
+                       fourBiggestSquaredMinus1 = fourYSquaredMinus1;
+                       biggestIndex = 2;
+               }
+               if(fourZSquaredMinus1 > fourBiggestSquaredMinus1)
+               {
+                       fourBiggestSquaredMinus1 = fourZSquaredMinus1;
+                       biggestIndex = 3;
+               }
+
+               T biggestVal = sqrt(fourBiggestSquaredMinus1 + T(1)) * T(0.5);
+               T mult = static_cast<T>(0.25) / biggestVal;
+
+               tquat<T, P> Result(uninitialize);
+               switch(biggestIndex)
+               {
+               case 0:
+                       Result.w = biggestVal;
+                       Result.x = (m[1][2] - m[2][1]) * mult;
+                       Result.y = (m[2][0] - m[0][2]) * mult;
+                       Result.z = (m[0][1] - m[1][0]) * mult;
+                       break;
+               case 1:
+                       Result.w = (m[1][2] - m[2][1]) * mult;
+                       Result.x = biggestVal;
+                       Result.y = (m[0][1] + m[1][0]) * mult;
+                       Result.z = (m[2][0] + m[0][2]) * mult;
+                       break;
+               case 2:
+                       Result.w = (m[2][0] - m[0][2]) * mult;
+                       Result.x = (m[0][1] + m[1][0]) * mult;
+                       Result.y = biggestVal;
+                       Result.z = (m[1][2] + m[2][1]) * mult;
+                       break;
+               case 3:
+                       Result.w = (m[0][1] - m[1][0]) * mult;
+                       Result.x = (m[2][0] + m[0][2]) * mult;
+                       Result.y = (m[1][2] + m[2][1]) * mult;
+                       Result.z = biggestVal;
+                       break;
+                       
+               default:                                        // Silence a -Wswitch-default warning in GCC. Should never actually get here. Assert is just for sanity.
+                       assert(false);
+                       break;
+               }
+               return Result;
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tquat<T, P> quat_cast(tmat4x4<T, P> const & m4)
+       {
+               return quat_cast(tmat3x3<T, P>(m4));
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER T angle(tquat<T, P> const & x)
+       {
+               return acos(x.w) * T(2);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec3<T, P> axis(tquat<T, P> const & x)
+       {
+               T tmp1 = static_cast<T>(1) - x.w * x.w;
+               if(tmp1 <= static_cast<T>(0))
+                       return tvec3<T, P>(0, 0, 1);
+               T tmp2 = static_cast<T>(1) / sqrt(tmp1);
+               return tvec3<T, P>(x.x * tmp2, x.y * tmp2, x.z * tmp2);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tquat<T, P> angleAxis(T const & angle, tvec3<T, P> const & v)
+       {
+               tquat<T, P> Result(uninitialize);
+
+               T const a(angle);
+               T const s = glm::sin(a * static_cast<T>(0.5));
+
+               Result.w = glm::cos(a * static_cast<T>(0.5));
+               Result.x = v.x * s;
+               Result.y = v.y * s;
+               Result.z = v.z * s;
+               return Result;
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec4<bool, P> lessThan(tquat<T, P> const & x, tquat<T, P> const & y)
+       {
+               tvec4<bool, P> Result(uninitialize);
+               for(detail::component_count_t i = 0; i < detail::component_count(x); ++i)
+                       Result[i] = x[i] < y[i];
+               return Result;
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec4<bool, P> lessThanEqual(tquat<T, P> const & x, tquat<T, P> const & y)
+       {
+               tvec4<bool, P> Result(uninitialize);
+               for(detail::component_count_t i = 0; i < detail::component_count(x); ++i)
+                       Result[i] = x[i] <= y[i];
+               return Result;
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec4<bool, P> greaterThan(tquat<T, P> const & x, tquat<T, P> const & y)
+       {
+               tvec4<bool, P> Result(uninitialize);
+               for(detail::component_count_t i = 0; i < detail::component_count(x); ++i)
+                       Result[i] = x[i] > y[i];
+               return Result;
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec4<bool, P> greaterThanEqual(tquat<T, P> const & x, tquat<T, P> const & y)
+       {
+               tvec4<bool, P> Result(uninitialize);
+               for(detail::component_count_t i = 0; i < detail::component_count(x); ++i)
+                       Result[i] = x[i] >= y[i];
+               return Result;
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec4<bool, P> equal(tquat<T, P> const & x, tquat<T, P> const & y)
+       {
+               tvec4<bool, P> Result(uninitialize);
+               for(detail::component_count_t i = 0; i < detail::component_count(x); ++i)
+                       Result[i] = x[i] == y[i];
+               return Result;
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec4<bool, P> notEqual(tquat<T, P> const & x, tquat<T, P> const & y)
+       {
+               tvec4<bool, P> Result(uninitialize);
+               for(detail::component_count_t i = 0; i < detail::component_count(x); ++i)
+                       Result[i] = x[i] != y[i];
+               return Result;
+       }
+}//namespace glm
diff --git a/include/glm/gtc/random.hpp b/include/glm/gtc/random.hpp
new file mode 100644 (file)
index 0000000..a9254c0
--- /dev/null
@@ -0,0 +1,120 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtc_random
+/// @file glm/gtc/random.hpp
+/// @date 2011-09-18 / 2011-09-18
+/// @author Christophe Riccio
+///
+/// @see core (dependence)
+/// @see gtc_half_float (dependence)
+/// @see gtx_random (extended)
+///
+/// @defgroup gtc_random GLM_GTC_random
+/// @ingroup gtc
+/// 
+/// @brief Generate random number from various distribution methods.
+/// 
+/// <glm/gtc/random.hpp> need to be included to use these functionalities.
+///////////////////////////////////////////////////////////////////////////////////
+
+#pragma once
+
+// Dependency:
+#include "../vec2.hpp"
+#include "../vec3.hpp"
+
+#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
+#      pragma message("GLM: GLM_GTC_random extension included")
+#endif
+
+namespace glm
+{
+       /// @addtogroup gtc_random
+       /// @{
+       
+       /// Generate random numbers in the interval [Min, Max], according a linear distribution 
+       /// 
+       /// @param Min 
+       /// @param Max 
+       /// @tparam genType Value type. Currently supported: half (not recommanded), float or double scalars and vectors.
+       /// @see gtc_random
+       template <typename genTYpe>
+       GLM_FUNC_DECL genTYpe linearRand(
+               genTYpe Min,
+               genTYpe Max);
+
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_DECL vecType<T, P> linearRand(
+               vecType<T, P> const & Min,
+               vecType<T, P> const & Max);
+
+       /// Generate random numbers in the interval [Min, Max], according a gaussian distribution 
+       /// 
+       /// @param Mean
+       /// @param Deviation
+       /// @see gtc_random
+       template <typename genType>
+       GLM_FUNC_DECL genType gaussRand(
+               genType Mean,
+               genType Deviation);
+       
+       /// Generate a random 2D vector which coordinates are regulary distributed on a circle of a given radius
+       /// 
+       /// @param Radius 
+       /// @see gtc_random
+       template <typename T>
+       GLM_FUNC_DECL tvec2<T, defaultp> circularRand(
+               T Radius);
+       
+       /// Generate a random 3D vector which coordinates are regulary distributed on a sphere of a given radius
+       /// 
+       /// @param Radius
+       /// @see gtc_random
+       template <typename T>
+       GLM_FUNC_DECL tvec3<T, defaultp> sphericalRand(
+               T Radius);
+       
+       /// Generate a random 2D vector which coordinates are regulary distributed within the area of a disk of a given radius
+       /// 
+       /// @param Radius
+       /// @see gtc_random
+       template <typename T>
+       GLM_FUNC_DECL tvec2<T, defaultp> diskRand(
+               T Radius);
+       
+       /// Generate a random 3D vector which coordinates are regulary distributed within the volume of a ball of a given radius
+       /// 
+       /// @param Radius
+       /// @see gtc_random
+       template <typename T>
+       GLM_FUNC_DECL tvec3<T, defaultp> ballRand(
+               T Radius);
+       
+       /// @}
+}//namespace glm
+
+#include "random.inl"
diff --git a/include/glm/gtc/random.inl b/include/glm/gtc/random.inl
new file mode 100644 (file)
index 0000000..e21b195
--- /dev/null
@@ -0,0 +1,379 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtc_random
+/// @file glm/gtc/random.inl
+/// @date 2011-09-19 / 2012-04-07
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////
+
+#include "../geometric.hpp"
+#include "../exponential.hpp"
+#include <cstdlib>
+#include <ctime>
+#include <cassert>
+
+namespace glm{
+namespace detail
+{
+       template <typename T, precision P, template <class, precision> class vecType>
+       struct compute_rand
+       {
+               GLM_FUNC_QUALIFIER static vecType<T, P> call();
+       };
+
+       template <precision P>
+       struct compute_rand<uint8, P, tvec1>
+       {
+               GLM_FUNC_QUALIFIER static tvec1<uint8, P> call()
+               {
+                       return tvec1<uint8, P>(
+                               std::rand()) % std::numeric_limits<uint8>::max();
+               }
+       };
+
+       template <precision P>
+       struct compute_rand<uint8, P, tvec2>
+       {
+               GLM_FUNC_QUALIFIER static tvec2<uint8, P> call()
+               {
+                       return tvec2<uint8, P>(
+                               std::rand(),
+                               std::rand()) % std::numeric_limits<uint8>::max();
+               }
+       };
+
+       template <precision P>
+       struct compute_rand<uint8, P, tvec3>
+       {
+               GLM_FUNC_QUALIFIER static tvec3<uint8, P> call()
+               {
+                       return tvec3<uint8, P>(
+                               std::rand(),
+                               std::rand(),
+                               std::rand()) % std::numeric_limits<uint8>::max();
+               }
+       };
+
+       template <precision P>
+       struct compute_rand<uint8, P, tvec4>
+       {
+               GLM_FUNC_QUALIFIER static tvec4<uint8, P> call()
+               {
+                       return tvec4<uint8, P>(
+                               std::rand(),
+                               std::rand(),
+                               std::rand(),
+                               std::rand()) % std::numeric_limits<uint8>::max();
+               }
+       };
+
+       template <precision P, template <class, precision> class vecType>
+       struct compute_rand<uint16, P, vecType>
+       {
+               GLM_FUNC_QUALIFIER static vecType<uint16, P> call()
+               {
+                       return
+                               (vecType<uint16, P>(compute_rand<uint8, P, vecType>::call()) << static_cast<uint16>(8)) |
+                               (vecType<uint16, P>(compute_rand<uint8, P, vecType>::call()) << static_cast<uint16>(0));
+               }
+       };
+
+       template <precision P, template <class, precision> class vecType>
+       struct compute_rand<uint32, P, vecType>
+       {
+               GLM_FUNC_QUALIFIER static vecType<uint32, P> call()
+               {
+                       return
+                               (vecType<uint32, P>(compute_rand<uint16, P, vecType>::call()) << static_cast<uint32>(16)) |
+                               (vecType<uint32, P>(compute_rand<uint16, P, vecType>::call()) << static_cast<uint32>(0));
+               }
+       };
+
+       template <precision P, template <class, precision> class vecType>
+       struct compute_rand<uint64, P, vecType>
+       {
+               GLM_FUNC_QUALIFIER static vecType<uint64, P> call()
+               {
+                       return
+                               (vecType<uint64, P>(compute_rand<uint32, P, vecType>::call()) << static_cast<uint64>(32)) |
+                               (vecType<uint64, P>(compute_rand<uint32, P, vecType>::call()) << static_cast<uint64>(0));
+               }
+       };
+
+       template <typename T, precision P, template <class, precision> class vecType>
+       struct compute_linearRand
+       {
+               GLM_FUNC_QUALIFIER static vecType<T, P> call(vecType<T, P> const & Min, vecType<T, P> const & Max);
+       };
+
+       template <precision P, template <class, precision> class vecType>
+       struct compute_linearRand<int8, P, vecType>
+       {
+               GLM_FUNC_QUALIFIER static vecType<int8, P> call(vecType<int8, P> const & Min, vecType<int8, P> const & Max)
+               {
+                       return (vecType<int8, P>(compute_rand<uint8, P, vecType>::call() % vecType<uint8, P>(Max + static_cast<int8>(1) - Min))) + Min;
+               }
+       };
+
+       template <precision P, template <class, precision> class vecType>
+       struct compute_linearRand<uint8, P, vecType>
+       {
+               GLM_FUNC_QUALIFIER static vecType<uint8, P> call(vecType<uint8, P> const & Min, vecType<uint8, P> const & Max)
+               {
+                       return (compute_rand<uint8, P, vecType>::call() % (Max + static_cast<uint8>(1) - Min)) + Min;
+               }
+       };
+
+       template <precision P, template <class, precision> class vecType>
+       struct compute_linearRand<int16, P, vecType>
+       {
+               GLM_FUNC_QUALIFIER static vecType<int16, P> call(vecType<int16, P> const & Min, vecType<int16, P> const & Max)
+               {
+                       return (vecType<int16, P>(compute_rand<uint16, P, vecType>::call() % vecType<uint16, P>(Max + static_cast<int16>(1) - Min))) + Min;
+               }
+       };
+
+       template <precision P, template <class, precision> class vecType>
+       struct compute_linearRand<uint16, P, vecType>
+       {
+               GLM_FUNC_QUALIFIER static vecType<uint16, P> call(vecType<uint16, P> const & Min, vecType<uint16, P> const & Max)
+               {
+                       return (compute_rand<uint16, P, vecType>::call() % (Max + static_cast<uint16>(1) - Min)) + Min;
+               }
+       };
+
+       template <precision P, template <class, precision> class vecType>
+       struct compute_linearRand<int32, P, vecType>
+       {
+               GLM_FUNC_QUALIFIER static vecType<int32, P> call(vecType<int32, P> const & Min, vecType<int32, P> const & Max)
+               {
+                       return (vecType<int32, P>(compute_rand<uint32, P, vecType>::call() % vecType<uint32, P>(Max + static_cast<int32>(1) - Min))) + Min;
+               }
+       };
+
+       template <precision P, template <class, precision> class vecType>
+       struct compute_linearRand<uint32, P, vecType>
+       {
+               GLM_FUNC_QUALIFIER static vecType<uint32, P> call(vecType<uint32, P> const & Min, vecType<uint32, P> const & Max)
+               {
+                       return (compute_rand<uint32, P, vecType>::call() % (Max + static_cast<uint32>(1) - Min)) + Min;
+               }
+       };
+
+       template <precision P, template <class, precision> class vecType>
+       struct compute_linearRand<int64, P, vecType>
+       {
+               GLM_FUNC_QUALIFIER static vecType<int64, P> call(vecType<int64, P> const & Min, vecType<int64, P> const & Max)
+               {
+                       return (vecType<int64, P>(compute_rand<uint64, P, vecType>::call() % vecType<uint64, P>(Max + static_cast<int64>(1) - Min))) + Min;
+               }
+       };
+
+       template <precision P, template <class, precision> class vecType>
+       struct compute_linearRand<uint64, P, vecType>
+       {
+               GLM_FUNC_QUALIFIER static vecType<uint64, P> call(vecType<uint64, P> const & Min, vecType<uint64, P> const & Max)
+               {
+                       return (compute_rand<uint64, P, vecType>::call() % (Max + static_cast<uint64>(1) - Min)) + Min;
+               }
+       };
+
+       template <template <class, precision> class vecType>
+       struct compute_linearRand<float, lowp, vecType>
+       {
+               GLM_FUNC_QUALIFIER static vecType<float, lowp> call(vecType<float, lowp> const & Min, vecType<float, lowp> const & Max)
+               {
+                       return vecType<float, lowp>(compute_rand<uint8, lowp, vecType>::call()) / static_cast<float>(std::numeric_limits<uint8>::max()) * (Max - Min) + Min;
+               }
+       };
+
+       template <template <class, precision> class vecType>
+       struct compute_linearRand<float, mediump, vecType>
+       {
+               GLM_FUNC_QUALIFIER static vecType<float, mediump> call(vecType<float, mediump> const & Min, vecType<float, mediump> const & Max)
+               {
+                       return vecType<float, mediump>(compute_rand<uint16, mediump, vecType>::call()) / static_cast<float>(std::numeric_limits<uint16>::max()) * (Max - Min) + Min;
+               }
+       };
+
+       template <template <class, precision> class vecType>
+       struct compute_linearRand<float, highp, vecType>
+       {
+               GLM_FUNC_QUALIFIER static vecType<float, highp> call(vecType<float, highp> const & Min, vecType<float, highp> const & Max)
+               {
+                       return vecType<float, highp>(compute_rand<uint32, highp, vecType>::call()) / static_cast<float>(std::numeric_limits<uint32>::max()) * (Max - Min) + Min;
+               }
+       };
+
+       template <template <class, precision> class vecType>
+       struct compute_linearRand<double, lowp, vecType>
+       {
+               GLM_FUNC_QUALIFIER static vecType<double, lowp> call(vecType<double, lowp> const & Min, vecType<double, lowp> const & Max)
+               {
+                       return vecType<double, lowp>(compute_rand<uint16, lowp, vecType>::call()) / static_cast<double>(std::numeric_limits<uint16>::max()) * (Max - Min) + Min;
+               }
+       };
+
+       template <template <class, precision> class vecType>
+       struct compute_linearRand<double, mediump, vecType>
+       {
+               GLM_FUNC_QUALIFIER static vecType<double, mediump> call(vecType<double, mediump> const & Min, vecType<double, mediump> const & Max)
+               {
+                       return vecType<double, mediump>(compute_rand<uint32, mediump, vecType>::call()) / static_cast<double>(std::numeric_limits<uint32>::max()) * (Max - Min) + Min;
+               }
+       };
+
+       template <template <class, precision> class vecType>
+       struct compute_linearRand<double, highp, vecType>
+       {
+               GLM_FUNC_QUALIFIER static vecType<double, highp> call(vecType<double, highp> const & Min, vecType<double, highp> const & Max)
+               {
+                       return vecType<double, highp>(compute_rand<uint64, highp, vecType>::call()) / static_cast<double>(std::numeric_limits<uint64>::max()) * (Max - Min) + Min;
+               }
+       };
+
+       template <template <class, precision> class vecType>
+       struct compute_linearRand<long double, lowp, vecType>
+       {
+               GLM_FUNC_QUALIFIER static vecType<long double, lowp> call(vecType<long double, lowp> const & Min, vecType<long double, lowp> const & Max)
+               {
+                       return vecType<long double, lowp>(compute_rand<uint32, lowp, vecType>::call()) / static_cast<long double>(std::numeric_limits<uint32>::max()) * (Max - Min) + Min;
+               }
+       };
+
+       template <template <class, precision> class vecType>
+       struct compute_linearRand<long double, mediump, vecType>
+       {
+               GLM_FUNC_QUALIFIER static vecType<long double, mediump> call(vecType<long double, mediump> const & Min, vecType<long double, mediump> const & Max)
+               {
+                       return vecType<long double, mediump>(compute_rand<uint64, mediump, vecType>::call()) / static_cast<long double>(std::numeric_limits<uint64>::max()) * (Max - Min) + Min;
+               }
+       };
+
+       template <template <class, precision> class vecType>
+       struct compute_linearRand<long double, highp, vecType>
+       {
+               GLM_FUNC_QUALIFIER static vecType<long double, highp> call(vecType<long double, highp> const & Min, vecType<long double, highp> const & Max)
+               {
+                       return vecType<long double, highp>(compute_rand<uint64, highp, vecType>::call()) / static_cast<long double>(std::numeric_limits<uint64>::max()) * (Max - Min) + Min;
+               }
+       };
+}//namespace detail
+
+       template <typename genType>
+       GLM_FUNC_QUALIFIER genType linearRand(genType Min, genType Max)
+       {
+               return detail::compute_linearRand<genType, highp, tvec1>::call(
+                       tvec1<genType, highp>(Min),
+                       tvec1<genType, highp>(Max)).x;
+       }
+
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_QUALIFIER vecType<T, P> linearRand(vecType<T, P> const & Min, vecType<T, P> const & Max)
+       {
+               return detail::compute_linearRand<T, P, vecType>::call(Min, Max);
+       }
+
+       template <typename genType>
+       GLM_FUNC_QUALIFIER genType gaussRand(genType Mean, genType Deviation)
+       {
+               genType w, x1, x2;
+       
+               do
+               {
+                       x1 = linearRand(genType(-1), genType(1));
+                       x2 = linearRand(genType(-1), genType(1));
+               
+                       w = x1 * x1 + x2 * x2;
+               } while(w > genType(1));
+       
+               return x2 * Deviation * Deviation * sqrt((genType(-2) * log(w)) / w) + Mean;
+       }
+
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_QUALIFIER vecType<T, P> gaussRand(vecType<T, P> const & Mean, vecType<T, P> const & Deviation)
+       {
+               return detail::functor2<T, P, vecType>::call(gaussRand, Mean, Deviation);
+       }
+
+       template <typename T>
+       GLM_FUNC_QUALIFIER tvec2<T, defaultp> diskRand(T Radius)
+       {               
+               tvec2<T, defaultp> Result(T(0));
+               T LenRadius(T(0));
+               
+               do
+               {
+                       Result = linearRand(
+                               tvec2<T, defaultp>(-Radius),
+                               tvec2<T, defaultp>(Radius));
+                       LenRadius = length(Result);
+               }
+               while(LenRadius > Radius);
+               
+               return Result;
+       }
+       
+       template <typename T>
+       GLM_FUNC_QUALIFIER tvec3<T, defaultp> ballRand(T Radius)
+       {               
+               tvec3<T, defaultp> Result(T(0));
+               T LenRadius(T(0));
+               
+               do
+               {
+                       Result = linearRand(
+                               tvec3<T, defaultp>(-Radius),
+                               tvec3<T, defaultp>(Radius));
+                       LenRadius = length(Result);
+               }
+               while(LenRadius > Radius);
+               
+               return Result;
+       }
+       
+       template <typename T>
+       GLM_FUNC_QUALIFIER tvec2<T, defaultp> circularRand(T Radius)
+       {
+               T a = linearRand(T(0), T(6.283185307179586476925286766559f));
+               return tvec2<T, defaultp>(cos(a), sin(a)) * Radius;             
+       }
+       
+       template <typename T>
+       GLM_FUNC_QUALIFIER tvec3<T, defaultp> sphericalRand(T Radius)
+       {
+               T z = linearRand(T(-1), T(1));
+               T a = linearRand(T(0), T(6.283185307179586476925286766559f));
+       
+               T r = sqrt(T(1) - z * z);
+       
+               T x = r * cos(a);
+               T y = r * sin(a);
+       
+               return tvec3<T, defaultp>(x, y, z) * Radius;    
+       }
+}//namespace glm
diff --git a/include/glm/gtc/reciprocal.hpp b/include/glm/gtc/reciprocal.hpp
new file mode 100644 (file)
index 0000000..7248078
--- /dev/null
@@ -0,0 +1,134 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtc_reciprocal
+/// @file glm/gtc/reciprocal.hpp
+/// @date 2008-10-09 / 2012-01-25
+/// @author Christophe Riccio
+///
+/// @see core (dependence)
+///
+/// @defgroup gtc_reciprocal GLM_GTC_reciprocal
+/// @ingroup gtc
+/// 
+/// @brief Define secant, cosecant and cotangent functions.
+/// 
+/// <glm/gtc/reciprocal.hpp> need to be included to use these features.
+///////////////////////////////////////////////////////////////////////////////////
+
+#pragma once
+
+// Dependencies
+#include "../detail/setup.hpp"
+
+#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
+#      pragma message("GLM: GLM_GTC_reciprocal extension included")
+#endif
+
+namespace glm
+{
+       /// @addtogroup gtc_reciprocal
+       /// @{
+
+       /// Secant function. 
+       /// hypotenuse / adjacent or 1 / cos(x)
+       /// 
+       /// @see gtc_reciprocal
+       template <typename genType> 
+       GLM_FUNC_DECL genType sec(genType const & angle);
+
+       /// Cosecant function. 
+       /// hypotenuse / opposite or 1 / sin(x)
+       /// 
+       /// @see gtc_reciprocal
+       template <typename genType> 
+       GLM_FUNC_DECL genType csc(genType const & angle);
+               
+       /// Cotangent function. 
+       /// adjacent / opposite or 1 / tan(x)
+       /// 
+       /// @see gtc_reciprocal
+       template <typename genType> 
+       GLM_FUNC_DECL genType cot(genType const & angle);
+
+       /// Inverse secant function. 
+       /// 
+       /// @see gtc_reciprocal
+       template <typename genType> 
+       GLM_FUNC_DECL genType asec(genType const & x);
+
+       /// Inverse cosecant function. 
+       /// 
+       /// @see gtc_reciprocal
+       template <typename genType> 
+       GLM_FUNC_DECL genType acsc(genType const & x);
+               
+       /// Inverse cotangent function. 
+       /// 
+       /// @see gtc_reciprocal
+       template <typename genType> 
+       GLM_FUNC_DECL genType acot(genType const & x);
+
+       /// Secant hyperbolic function. 
+       /// 
+       /// @see gtc_reciprocal
+       template <typename genType> 
+       GLM_FUNC_DECL genType sech(genType const & angle);
+
+       /// Cosecant hyperbolic function. 
+       /// 
+       /// @see gtc_reciprocal
+       template <typename genType> 
+       GLM_FUNC_DECL genType csch(genType const & angle);
+               
+       /// Cotangent hyperbolic function. 
+       /// 
+       /// @see gtc_reciprocal
+       template <typename genType> 
+       GLM_FUNC_DECL genType coth(genType const & angle);
+
+       /// Inverse secant hyperbolic function. 
+       /// 
+       /// @see gtc_reciprocal
+       template <typename genType> 
+       GLM_FUNC_DECL genType asech(genType const & x);
+
+       /// Inverse cosecant hyperbolic function. 
+       /// 
+       /// @see gtc_reciprocal
+       template <typename genType> 
+       GLM_FUNC_DECL genType acsch(genType const & x);
+               
+       /// Inverse cotangent hyperbolic function. 
+       /// 
+       /// @see gtc_reciprocal
+       template <typename genType> 
+       GLM_FUNC_DECL genType acoth(genType const & x);
+
+       /// @}
+}//namespace glm
+
+#include "reciprocal.inl"
diff --git a/include/glm/gtc/reciprocal.inl b/include/glm/gtc/reciprocal.inl
new file mode 100644 (file)
index 0000000..b86c347
--- /dev/null
@@ -0,0 +1,221 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtc_reciprocal
+/// @file glm/gtc/reciprocal.inl
+/// @date 2008-10-09 / 2012-04-07
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////
+
+#include "../trigonometric.hpp"
+#include <limits>
+
+namespace glm
+{
+       // sec
+       template <typename genType>
+       GLM_FUNC_QUALIFIER genType sec(genType angle)
+       {
+               GLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, "'sec' only accept floating-point values");
+               return genType(1) / glm::cos(angle);
+       }
+
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_QUALIFIER vecType<T, P> sec(vecType<T, P> const & x)
+       {
+               GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'sec' only accept floating-point inputs");
+               return detail::functor1<T, T, P, vecType>::call(sec, x);
+       }
+
+       // csc
+       template <typename genType>
+       GLM_FUNC_QUALIFIER genType csc(genType angle)
+       {
+               GLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, "'csc' only accept floating-point values");
+               return genType(1) / glm::sin(angle);
+       }
+
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_QUALIFIER vecType<T, P> csc(vecType<T, P> const & x)
+       {
+               GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'csc' only accept floating-point inputs");
+               return detail::functor1<T, T, P, vecType>::call(csc, x);
+       }
+
+       // cot
+       template <typename genType>
+       GLM_FUNC_QUALIFIER genType cot(genType angle)
+       {
+               GLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, "'cot' only accept floating-point values");
+       
+               genType const pi_over_2 = genType(3.1415926535897932384626433832795 / 2.0);
+               return glm::tan(pi_over_2 - angle);
+       }
+
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_QUALIFIER vecType<T, P> cot(vecType<T, P> const & x)
+       {
+               GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'cot' only accept floating-point inputs");
+               return detail::functor1<T, T, P, vecType>::call(cot, x);
+       }
+
+       // asec
+       template <typename genType>
+       GLM_FUNC_QUALIFIER genType asec(genType x)
+       {
+               GLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, "'asec' only accept floating-point values");
+               return acos(genType(1) / x);
+       }
+
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_QUALIFIER vecType<T, P> asec(vecType<T, P> const & x)
+       {
+               GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'asec' only accept floating-point inputs");
+               return detail::functor1<T, T, P, vecType>::call(asec, x);
+       }
+
+       // acsc
+       template <typename genType>
+       GLM_FUNC_QUALIFIER genType acsc(genType x)
+       {
+               GLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, "'acsc' only accept floating-point values");
+               return asin(genType(1) / x);
+       }
+
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_QUALIFIER vecType<T, P> acsc(vecType<T, P> const & x)
+       {
+               GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'acsc' only accept floating-point inputs");
+               return detail::functor1<T, T, P, vecType>::call(acsc, x);
+       }
+
+       // acot
+       template <typename genType>
+       GLM_FUNC_QUALIFIER genType acot(genType x)
+       {
+               GLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, "'acot' only accept floating-point values");
+
+               genType const pi_over_2 = genType(3.1415926535897932384626433832795 / 2.0);
+               return pi_over_2 - atan(x);
+       }
+
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_QUALIFIER vecType<T, P> acot(vecType<T, P> const & x)
+       {
+               GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'acot' only accept floating-point inputs");
+               return detail::functor1<T, T, P, vecType>::call(acot, x);
+       }
+
+       // sech
+       template <typename genType>
+       GLM_FUNC_QUALIFIER genType sech(genType angle)
+       {
+               GLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, "'sech' only accept floating-point values");
+               return genType(1) / glm::cosh(angle);
+       }
+
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_QUALIFIER vecType<T, P> sech(vecType<T, P> const & x)
+       {
+               GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'sech' only accept floating-point inputs");
+               return detail::functor1<T, T, P, vecType>::call(sech, x);
+       }
+
+       // csch
+       template <typename genType>
+       GLM_FUNC_QUALIFIER genType csch(genType angle)
+       {
+               GLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, "'csch' only accept floating-point values");
+               return genType(1) / glm::sinh(angle);
+       }
+
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_QUALIFIER vecType<T, P> csch(vecType<T, P> const & x)
+       {
+               GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'csch' only accept floating-point inputs");
+               return detail::functor1<T, T, P, vecType>::call(csch, x);
+       }
+
+       // coth
+       template <typename genType>
+       GLM_FUNC_QUALIFIER genType coth(genType angle)
+       {
+               GLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, "'coth' only accept floating-point values");
+               return glm::cosh(angle) / glm::sinh(angle);
+       }
+
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_QUALIFIER vecType<T, P> coth(vecType<T, P> const & x)
+       {
+               GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'coth' only accept floating-point inputs");
+               return detail::functor1<T, T, P, vecType>::call(coth, x);
+       }
+
+       // asech
+       template <typename genType>
+       GLM_FUNC_QUALIFIER genType asech(genType x)
+       {
+               GLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, "'asech' only accept floating-point values");
+               return acosh(genType(1) / x);
+       }
+
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_QUALIFIER vecType<T, P> asech(vecType<T, P> const & x)
+       {
+               GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'asech' only accept floating-point inputs");
+               return detail::functor1<T, T, P, vecType>::call(asech, x);
+       }
+
+       // acsch
+       template <typename genType>
+       GLM_FUNC_QUALIFIER genType acsch(genType x)
+       {
+               GLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, "'acsch' only accept floating-point values");
+               return acsch(genType(1) / x);
+       }
+
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_QUALIFIER vecType<T, P> acsch(vecType<T, P> const & x)
+       {
+               GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'acsch' only accept floating-point inputs");
+               return detail::functor1<T, T, P, vecType>::call(acsch, x);
+       }
+
+       // acoth
+       template <typename genType>
+       GLM_FUNC_QUALIFIER genType acoth(genType x)
+       {
+               GLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, "'acoth' only accept floating-point values");
+               return atanh(genType(1) / x);
+       }
+
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_QUALIFIER vecType<T, P> acoth(vecType<T, P> const & x)
+       {
+               GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'acoth' only accept floating-point inputs");
+               return detail::functor1<T, T, P, vecType>::call(acoth, x);
+       }
+}//namespace glm
diff --git a/include/glm/gtc/round.hpp b/include/glm/gtc/round.hpp
new file mode 100644 (file)
index 0000000..270849e
--- /dev/null
@@ -0,0 +1,203 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtc_round
+/// @file glm/gtc/round.hpp
+/// @date 2014-11-03 / 2014-11-03
+/// @author Christophe Riccio
+///
+/// @see core (dependence)
+/// @see gtc_round (dependence)
+///
+/// @defgroup gtc_round GLM_GTC_round
+/// @ingroup gtc
+/// 
+/// @brief rounding value to specific boundings
+/// 
+/// <glm/gtc/round.hpp> need to be included to use these functionalities.
+///////////////////////////////////////////////////////////////////////////////////
+
+#pragma once
+
+// Dependencies
+#include "../detail/setup.hpp"
+#include "../detail/precision.hpp"
+#include "../detail/_vectorize.hpp"
+#include "../vector_relational.hpp"
+#include "../common.hpp"
+#include <limits>
+
+#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
+#      pragma message("GLM: GLM_GTC_integer extension included")
+#endif
+
+namespace glm
+{
+       /// @addtogroup gtc_round
+       /// @{
+
+       /// Return true if the value is a power of two number.
+       ///
+       /// @see gtc_round
+       template <typename genIUType>
+       GLM_FUNC_DECL bool isPowerOfTwo(genIUType Value);
+
+       /// Return true if the value is a power of two number.
+       ///
+       /// @see gtc_round
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_DECL vecType<bool, P> isPowerOfTwo(vecType<T, P> const & value);
+
+       /// Return the power of two number which value is just higher the input value,
+       /// round up to a power of two.
+       ///
+       /// @see gtc_round
+       template <typename genIUType>
+       GLM_FUNC_DECL genIUType ceilPowerOfTwo(genIUType Value);
+
+       /// Return the power of two number which value is just higher the input value,
+       /// round up to a power of two.
+       ///
+       /// @see gtc_round
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_DECL vecType<T, P> ceilPowerOfTwo(vecType<T, P> const & value);
+
+       /// Return the power of two number which value is just lower the input value,
+       /// round down to a power of two.
+       ///
+       /// @see gtc_round
+       template <typename genIUType>
+       GLM_FUNC_DECL genIUType floorPowerOfTwo(genIUType Value);
+
+       /// Return the power of two number which value is just lower the input value,
+       /// round down to a power of two.
+       ///
+       /// @see gtc_round
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_DECL vecType<T, P> floorPowerOfTwo(vecType<T, P> const & value);
+
+       /// Return the power of two number which value is the closet to the input value.
+       ///
+       /// @see gtc_round
+       template <typename genIUType>
+       GLM_FUNC_DECL genIUType roundPowerOfTwo(genIUType Value);
+
+       /// Return the power of two number which value is the closet to the input value.
+       ///
+       /// @see gtc_round
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_DECL vecType<T, P> roundPowerOfTwo(vecType<T, P> const & value);
+
+       /// Return true if the 'Value' is a multiple of 'Multiple'.
+       ///
+       /// @see gtc_round
+       template <typename genIUType>
+       GLM_FUNC_DECL bool isMultiple(genIUType Value, genIUType Multiple);
+
+       /// Return true if the 'Value' is a multiple of 'Multiple'.
+       ///
+       /// @see gtc_round
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_DECL vecType<bool, P> isMultiple(vecType<T, P> const & Value, T Multiple);
+
+       /// Return true if the 'Value' is a multiple of 'Multiple'.
+       ///
+       /// @see gtc_round
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_DECL vecType<bool, P> isMultiple(vecType<T, P> const & Value, vecType<T, P> const & Multiple);
+
+       /// Higher multiple number of Source.
+       ///
+       /// @tparam genType Floating-point or integer scalar or vector types.
+       /// @param Source 
+       /// @param Multiple Must be a null or positive value
+       ///
+       /// @see gtc_round
+       template <typename genType>
+       GLM_FUNC_DECL genType ceilMultiple(genType Source, genType Multiple);
+
+       /// Higher multiple number of Source.
+       ///
+       /// @tparam genType Floating-point or integer scalar or vector types.
+       /// @param Source 
+       /// @param Multiple Must be a null or positive value
+       ///
+       /// @see gtc_round
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_DECL vecType<T, P> ceilMultiple(vecType<T, P> const & Source, vecType<T, P> const & Multiple);
+
+       /// Lower multiple number of Source.
+       ///
+       /// @tparam genType Floating-point or integer scalar or vector types.
+       /// @param Source 
+       /// @param Multiple Must be a null or positive value
+       ///
+       /// @see gtc_round
+       template <typename genType>
+       GLM_FUNC_DECL genType floorMultiple(
+               genType Source,
+               genType Multiple);
+
+       /// Lower multiple number of Source.
+       ///
+       /// @tparam genType Floating-point or integer scalar or vector types.
+       /// @param Source 
+       /// @param Multiple Must be a null or positive value
+       ///
+       /// @see gtc_round
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_DECL vecType<T, P> floorMultiple(
+               vecType<T, P> const & Source,
+               vecType<T, P> const & Multiple);
+
+       /// Lower multiple number of Source.
+       ///
+       /// @tparam genType Floating-point or integer scalar or vector types.
+       /// @param Source 
+       /// @param Multiple Must be a null or positive value
+       ///
+       /// @see gtc_round
+       template <typename genType>
+       GLM_FUNC_DECL genType roundMultiple(
+               genType Source,
+               genType Multiple);
+
+       /// Lower multiple number of Source.
+       ///
+       /// @tparam genType Floating-point or integer scalar or vector types.
+       /// @param Source 
+       /// @param Multiple Must be a null or positive value
+       ///
+       /// @see gtc_round
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_DECL vecType<T, P> roundMultiple(
+               vecType<T, P> const & Source,
+               vecType<T, P> const & Multiple);
+
+       /// @}
+} //namespace glm
+
+#include "round.inl"
diff --git a/include/glm/gtc/round.inl b/include/glm/gtc/round.inl
new file mode 100644 (file)
index 0000000..255dec6
--- /dev/null
@@ -0,0 +1,378 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtc_round
+/// @file glm/gtc/round.inl
+/// @date 2014-11-03 / 2014-11-03
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////
+
+namespace glm
+{
+namespace detail
+{
+       template <typename T, precision P, template <typename, precision> class vecType, bool compute = false>
+       struct compute_ceilShift
+       {
+               GLM_FUNC_QUALIFIER static vecType<T, P> call(vecType<T, P> const & v, T)
+               {
+                       return v;
+               }
+       };
+
+       template <typename T, precision P, template <typename, precision> class vecType>
+       struct compute_ceilShift<T, P, vecType, true>
+       {
+               GLM_FUNC_QUALIFIER static vecType<T, P> call(vecType<T, P> const & v, T Shift)
+               {
+                       return v | (v >> Shift);
+               }
+       };
+
+       template <typename T, precision P, template <typename, precision> class vecType, bool isSigned = true>
+       struct compute_ceilPowerOfTwo
+       {
+               GLM_FUNC_QUALIFIER static vecType<T, P> call(vecType<T, P> const & x)
+               {
+                       GLM_STATIC_ASSERT(!std::numeric_limits<T>::is_iec559, "'ceilPowerOfTwo' only accept integer scalar or vector inputs");
+
+                       vecType<T, P> const Sign(sign(x));
+
+                       vecType<T, P> v(abs(x));
+
+                       v = v - static_cast<T>(1);
+                       v = v | (v >> static_cast<T>(1));
+                       v = v | (v >> static_cast<T>(2));
+                       v = v | (v >> static_cast<T>(4));
+                       v = compute_ceilShift<T, P, vecType, sizeof(T) >= 2>::call(v, 8);
+                       v = compute_ceilShift<T, P, vecType, sizeof(T) >= 4>::call(v, 16);
+                       v = compute_ceilShift<T, P, vecType, sizeof(T) >= 8>::call(v, 32);
+                       return (v + static_cast<T>(1)) * Sign;
+               }
+       };
+
+       template <typename T, precision P, template <typename, precision> class vecType>
+       struct compute_ceilPowerOfTwo<T, P, vecType, false>
+       {
+               GLM_FUNC_QUALIFIER static vecType<T, P> call(vecType<T, P> const & x)
+               {
+                       GLM_STATIC_ASSERT(!std::numeric_limits<T>::is_iec559, "'ceilPowerOfTwo' only accept integer scalar or vector inputs");
+
+                       vecType<T, P> v(x);
+
+                       v = v - static_cast<T>(1);
+                       v = v | (v >> static_cast<T>(1));
+                       v = v | (v >> static_cast<T>(2));
+                       v = v | (v >> static_cast<T>(4));
+                       v = compute_ceilShift<T, P, vecType, sizeof(T) >= 2>::call(v, 8);
+                       v = compute_ceilShift<T, P, vecType, sizeof(T) >= 4>::call(v, 16);
+                       v = compute_ceilShift<T, P, vecType, sizeof(T) >= 8>::call(v, 32);
+                       return v + static_cast<T>(1);
+               }
+       };
+
+       template <bool is_float, bool is_signed>
+       struct compute_ceilMultiple{};
+
+       template <>
+       struct compute_ceilMultiple<true, true>
+       {
+               template <typename genType>
+               GLM_FUNC_QUALIFIER static genType call(genType Source, genType Multiple)
+               {
+                       if(Source > genType(0))
+                       {
+                               genType Tmp = Source - genType(1);
+                               return Tmp + (Multiple - std::fmod(Tmp, Multiple));
+                       }
+                       else
+                               return Source + std::fmod(-Source, Multiple);
+               }
+       };
+
+       template <>
+       struct compute_ceilMultiple<false, false>
+       {
+               template <typename genType>
+               GLM_FUNC_QUALIFIER static genType call(genType Source, genType Multiple)
+               {
+                       genType Tmp = Source - genType(1);
+                       return Tmp + (Multiple - (Tmp % Multiple));
+               }
+       };
+
+       template <>
+       struct compute_ceilMultiple<false, true>
+       {
+               template <typename genType>
+               GLM_FUNC_QUALIFIER static genType call(genType Source, genType Multiple)
+               {
+                       if(Source > genType(0))
+                       {
+                               genType Tmp = Source - genType(1);
+                               return Tmp + (Multiple - (Tmp % Multiple));
+                       }
+                       else
+                               return Source + (-Source % Multiple);
+               }
+       };
+
+       template <bool is_float, bool is_signed>
+       struct compute_floorMultiple{};
+
+       template <>
+       struct compute_floorMultiple<true, true>
+       {
+               template <typename genType>
+               GLM_FUNC_QUALIFIER static genType call(genType Source, genType Multiple)
+               {
+                       if(Source >= genType(0))
+                               return Source - std::fmod(Source, Multiple);
+                       else
+                       {
+                               genType Tmp = Source + genType(1);
+                               return Tmp - std::fmod(Tmp, Multiple) - Multiple;
+                       }
+               }
+       };
+
+       template <>
+       struct compute_floorMultiple<false, false>
+       {
+               template <typename genType>
+               GLM_FUNC_QUALIFIER static genType call(genType Source, genType Multiple)
+               {
+                       if(Source >= genType(0))
+                               return Source - Source % Multiple;
+                       else
+                       {
+                               genType Tmp = Source + genType(1);
+                               return Tmp - Tmp % Multiple - Multiple;
+                       }
+               }
+       };
+
+       template <>
+       struct compute_floorMultiple<false, true>
+       {
+               template <typename genType>
+               GLM_FUNC_QUALIFIER static genType call(genType Source, genType Multiple)
+               {
+                       if(Source >= genType(0))
+                               return Source - Source % Multiple;
+                       else
+                       {
+                               genType Tmp = Source + genType(1);
+                               return Tmp - Tmp % Multiple - Multiple;
+                       }
+               }
+       };
+
+       template <bool is_float, bool is_signed>
+       struct compute_roundMultiple{};
+
+       template <>
+       struct compute_roundMultiple<true, true>
+       {
+               template <typename genType>
+               GLM_FUNC_QUALIFIER static genType call(genType Source, genType Multiple)
+               {
+                       if(Source >= genType(0))
+                               return Source - std::fmod(Source, Multiple);
+                       else
+                       {
+                               genType Tmp = Source + genType(1);
+                               return Tmp - std::fmod(Tmp, Multiple) - Multiple;
+                       }
+               }
+       };
+
+       template <>
+       struct compute_roundMultiple<false, false>
+       {
+               template <typename genType>
+               GLM_FUNC_QUALIFIER static genType call(genType Source, genType Multiple)
+               {
+                       if(Source >= genType(0))
+                               return Source - Source % Multiple;
+                       else
+                       {
+                               genType Tmp = Source + genType(1);
+                               return Tmp - Tmp % Multiple - Multiple;
+                       }
+               }
+       };
+
+       template <>
+       struct compute_roundMultiple<false, true>
+       {
+               template <typename genType>
+               GLM_FUNC_QUALIFIER static genType call(genType Source, genType Multiple)
+               {
+                       if(Source >= genType(0))
+                               return Source - Source % Multiple;
+                       else
+                       {
+                               genType Tmp = Source + genType(1);
+                               return Tmp - Tmp % Multiple - Multiple;
+                       }
+               }
+       };
+}//namespace detail
+
+       ////////////////
+       // isPowerOfTwo
+
+       template <typename genType>
+       GLM_FUNC_QUALIFIER bool isPowerOfTwo(genType Value)
+       {
+               genType const Result = glm::abs(Value);
+               return !(Result & (Result - 1));
+       }
+
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_QUALIFIER vecType<bool, P> isPowerOfTwo(vecType<T, P> const & Value)
+       {
+               vecType<T, P> const Result(abs(Value));
+               return equal(Result & (Result - 1), vecType<T, P>(0));
+       }
+
+       //////////////////
+       // ceilPowerOfTwo
+
+       template <typename genType>
+       GLM_FUNC_QUALIFIER genType ceilPowerOfTwo(genType value)
+       {
+               return detail::compute_ceilPowerOfTwo<genType, defaultp, tvec1, std::numeric_limits<genType>::is_signed>::call(tvec1<genType, defaultp>(value)).x;
+       }
+
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_QUALIFIER vecType<T, P> ceilPowerOfTwo(vecType<T, P> const & v)
+       {
+               return detail::compute_ceilPowerOfTwo<T, P, vecType, std::numeric_limits<T>::is_signed>::call(v);
+       }
+
+       ///////////////////
+       // floorPowerOfTwo
+
+       template <typename genType>
+       GLM_FUNC_QUALIFIER genType floorPowerOfTwo(genType value)
+       {
+               return isPowerOfTwo(value) ? value : highestBitValue(value);
+       }
+
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_QUALIFIER vecType<T, P> floorPowerOfTwo(vecType<T, P> const & v)
+       {
+               return detail::functor1<T, T, P, vecType>::call(floorPowerOfTwo, v);
+       }
+
+       ///////////////////
+       // roundPowerOfTwo
+
+       template <typename genIUType>
+       GLM_FUNC_QUALIFIER genIUType roundPowerOfTwo(genIUType value)
+       {
+               if(isPowerOfTwo(value))
+                       return value;
+
+               genIUType const prev = highestBitValue(value);
+               genIUType const next = prev << 1;
+               return (next - value) < (value - prev) ? next : prev;
+       }
+
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_QUALIFIER vecType<T, P> roundPowerOfTwo(vecType<T, P> const & v)
+       {
+               return detail::functor1<T, T, P, vecType>::call(roundPowerOfTwo, v);
+       }
+
+       ////////////////
+       // isMultiple
+
+       template <typename genType>
+       GLM_FUNC_QUALIFIER bool isMultiple(genType Value, genType Multiple)
+       {
+               return isMultiple(tvec1<genType>(Value), tvec1<genType>(Multiple)).x;
+       }
+
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_QUALIFIER vecType<bool, P> isMultiple(vecType<T, P> const & Value, T Multiple)
+       {
+               return (Value % Multiple) == vecType<T, P>(0);
+       }
+
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_QUALIFIER vecType<bool, P> isMultiple(vecType<T, P> const & Value, vecType<T, P> const & Multiple)
+       {
+               return (Value % Multiple) == vecType<T, P>(0);
+       }
+
+       //////////////////////
+       // ceilMultiple
+
+       template <typename genType>
+       GLM_FUNC_QUALIFIER genType ceilMultiple(genType Source, genType Multiple)
+       {
+               return detail::compute_ceilMultiple<std::numeric_limits<genType>::is_iec559, std::numeric_limits<genType>::is_signed>::call(Source, Multiple);
+       }
+
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_QUALIFIER vecType<T, P> ceilMultiple(vecType<T, P> const & Source, vecType<T, P> const & Multiple)
+       {
+               return detail::functor2<T, P, vecType>::call(ceilMultiple, Source, Multiple);
+       }
+
+       //////////////////////
+       // floorMultiple
+
+       template <typename genType>
+       GLM_FUNC_QUALIFIER genType floorMultiple(genType Source, genType Multiple)
+       {
+               return detail::compute_floorMultiple<std::numeric_limits<genType>::is_iec559, std::numeric_limits<genType>::is_signed>::call(Source, Multiple);
+       }
+
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_QUALIFIER vecType<T, P> floorMultiple(vecType<T, P> const & Source, vecType<T, P> const & Multiple)
+       {
+               return detail::functor2<T, P, vecType>::call(floorMultiple, Source, Multiple);
+       }
+
+       //////////////////////
+       // roundMultiple
+
+       template <typename genType>
+       GLM_FUNC_QUALIFIER genType roundMultiple(genType Source, genType Multiple)
+       {
+               return detail::compute_roundMultiple<std::numeric_limits<genType>::is_iec559, std::numeric_limits<genType>::is_signed>::call(Source, Multiple);
+       }
+
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_QUALIFIER vecType<T, P> roundMultiple(vecType<T, P> const & Source, vecType<T, P> const & Multiple)
+       {
+               return detail::functor2<T, P, vecType>::call(roundMultiple, Source, Multiple);
+       }
+}//namespace glm
diff --git a/include/glm/gtc/type_precision.hpp b/include/glm/gtc/type_precision.hpp
new file mode 100644 (file)
index 0000000..4716af8
--- /dev/null
@@ -0,0 +1,890 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+/// 
+/// @ref gtc_type_precision
+/// @file glm/gtc/type_precision.hpp
+/// @date 2009-06-04 / 2011-12-07
+/// @author Christophe Riccio
+/// 
+/// @see core (dependence)
+/// @see gtc_half_float (dependence)
+/// @see gtc_quaternion (dependence)
+/// 
+/// @defgroup gtc_type_precision GLM_GTC_type_precision
+/// @ingroup gtc
+/// 
+/// @brief Defines specific C++-based precision types.
+/// 
+/// @ref core_precision defines types based on GLSL's precision qualifiers. This
+/// extension defines types based on explicitly-sized C++ data types.
+/// 
+/// <glm/gtc/type_precision.hpp> need to be included to use these functionalities.
+///////////////////////////////////////////////////////////////////////////////////
+
+#pragma once
+
+// Dependency:
+#include "../gtc/quaternion.hpp"
+#include "../gtc/vec1.hpp"
+#include "../vec2.hpp"
+#include "../vec3.hpp"
+#include "../vec4.hpp"
+#include "../mat2x2.hpp"
+#include "../mat2x3.hpp"
+#include "../mat2x4.hpp"
+#include "../mat3x2.hpp"
+#include "../mat3x3.hpp"
+#include "../mat3x4.hpp"
+#include "../mat4x2.hpp"
+#include "../mat4x3.hpp"
+#include "../mat4x4.hpp"
+
+#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
+#      pragma message("GLM: GLM_GTC_type_precision extension included")
+#endif
+
+namespace glm
+{
+       ///////////////////////////
+       // Signed int vector types 
+
+       /// @addtogroup gtc_type_precision
+       /// @{
+
+       /// Low precision 8 bit signed integer type.
+       /// @see gtc_type_precision
+       typedef detail::int8 lowp_int8;
+       
+       /// Low precision 16 bit signed integer type.
+       /// @see gtc_type_precision
+       typedef detail::int16 lowp_int16;
+
+       /// Low precision 32 bit signed integer type.
+       /// @see gtc_type_precision
+       typedef detail::int32 lowp_int32;
+
+       /// Low precision 64 bit signed integer type.
+       /// @see gtc_type_precision
+       typedef detail::int64 lowp_int64;
+
+       /// Low precision 8 bit signed integer type.
+       /// @see gtc_type_precision
+       typedef detail::int8 lowp_int8_t;
+       
+       /// Low precision 16 bit signed integer type.
+       /// @see gtc_type_precision
+       typedef detail::int16 lowp_int16_t;
+
+       /// Low precision 32 bit signed integer type.
+       /// @see gtc_type_precision
+       typedef detail::int32 lowp_int32_t;
+
+       /// Low precision 64 bit signed integer type.
+       /// @see gtc_type_precision
+       typedef detail::int64 lowp_int64_t;
+
+       /// Low precision 8 bit signed integer type.
+       /// @see gtc_type_precision
+       typedef detail::int8 lowp_i8;
+       
+       /// Low precision 16 bit signed integer type.
+       /// @see gtc_type_precision
+       typedef detail::int16 lowp_i16;
+
+       /// Low precision 32 bit signed integer type.
+       /// @see gtc_type_precision
+       typedef detail::int32 lowp_i32;
+
+       /// Low precision 64 bit signed integer type.
+       /// @see gtc_type_precision
+       typedef detail::int64 lowp_i64;
+
+       /// Medium precision 8 bit signed integer type.
+       /// @see gtc_type_precision
+       typedef detail::int8 mediump_int8;
+       
+       /// Medium precision 16 bit signed integer type.
+       /// @see gtc_type_precision
+       typedef detail::int16 mediump_int16;
+
+       /// Medium precision 32 bit signed integer type.
+       /// @see gtc_type_precision
+       typedef detail::int32 mediump_int32;
+
+       /// Medium precision 64 bit signed integer type.
+       /// @see gtc_type_precision
+       typedef detail::int64 mediump_int64;
+
+       /// Medium precision 8 bit signed integer type.
+       /// @see gtc_type_precision
+       typedef detail::int8 mediump_int8_t;
+       
+       /// Medium precision 16 bit signed integer type.
+       /// @see gtc_type_precision
+       typedef detail::int16 mediump_int16_t;
+
+       /// Medium precision 32 bit signed integer type.
+       /// @see gtc_type_precision
+       typedef detail::int32 mediump_int32_t;
+
+       /// Medium precision 64 bit signed integer type.
+       /// @see gtc_type_precision
+       typedef detail::int64 mediump_int64_t;
+
+       /// Medium precision 8 bit signed integer type.
+       /// @see gtc_type_precision
+       typedef detail::int8 mediump_i8;
+       
+       /// Medium precision 16 bit signed integer type.
+       /// @see gtc_type_precision
+       typedef detail::int16 mediump_i16;
+
+       /// Medium precision 32 bit signed integer type.
+       /// @see gtc_type_precision
+       typedef detail::int32 mediump_i32;
+
+       /// Medium precision 64 bit signed integer type.
+       /// @see gtc_type_precision
+       typedef detail::int64 mediump_i64;
+
+       /// High precision 8 bit signed integer type.
+       /// @see gtc_type_precision
+       typedef detail::int8 highp_int8;
+       
+       /// High precision 16 bit signed integer type.
+       /// @see gtc_type_precision
+       typedef detail::int16 highp_int16;
+
+       /// High precision 32 bit signed integer type.
+       /// @see gtc_type_precision
+       typedef detail::int32 highp_int32;
+
+       /// High precision 64 bit signed integer type.
+       /// @see gtc_type_precision
+       typedef detail::int64 highp_int64;
+
+       /// High precision 8 bit signed integer type.
+       /// @see gtc_type_precision
+       typedef detail::int8 highp_int8_t;
+       
+       /// High precision 16 bit signed integer type.
+       /// @see gtc_type_precision
+       typedef detail::int16 highp_int16_t;
+
+       /// 32 bit signed integer type.
+       /// @see gtc_type_precision
+       typedef detail::int32 highp_int32_t;
+
+       /// High precision 64 bit signed integer type.
+       /// @see gtc_type_precision
+       typedef detail::int64 highp_int64_t;
+
+       /// High precision 8 bit signed integer type.
+       /// @see gtc_type_precision
+       typedef detail::int8 highp_i8;
+       
+       /// High precision 16 bit signed integer type.
+       /// @see gtc_type_precision
+       typedef detail::int16 highp_i16;
+
+       /// High precision 32 bit signed integer type.
+       /// @see gtc_type_precision
+       typedef detail::int32 highp_i32;
+
+       /// High precision 64 bit signed integer type.
+       /// @see gtc_type_precision
+       typedef detail::int64 highp_i64;
+       
+
+       /// 8 bit signed integer type.
+       /// @see gtc_type_precision
+       typedef detail::int8 int8;
+       
+       /// 16 bit signed integer type.
+       /// @see gtc_type_precision
+       typedef detail::int16 int16;
+
+       /// 32 bit signed integer type.
+       /// @see gtc_type_precision
+       typedef detail::int32 int32;
+
+       /// 64 bit signed integer type.
+       /// @see gtc_type_precision
+       typedef detail::int64 int64;
+
+#if GLM_HAS_EXTENDED_INTEGER_TYPE
+       using std::int8_t;
+       using std::int16_t;
+       using std::int32_t;
+       using std::int64_t;
+#else
+       /// 8 bit signed integer type.
+       /// @see gtc_type_precision
+       typedef detail::int8 int8_t;
+       
+       /// 16 bit signed integer type.
+       /// @see gtc_type_precision
+       typedef detail::int16 int16_t;
+
+       /// 32 bit signed integer type.
+       /// @see gtc_type_precision
+       typedef detail::int32 int32_t;
+
+       /// 64 bit signed integer type.
+       /// @see gtc_type_precision
+       typedef detail::int64 int64_t;
+#endif
+
+       /// 8 bit signed integer type.
+       /// @see gtc_type_precision
+       typedef detail::int8 i8;
+       
+       /// 16 bit signed integer type.
+       /// @see gtc_type_precision
+       typedef detail::int16 i16;
+
+       /// 32 bit signed integer type.
+       /// @see gtc_type_precision
+       typedef detail::int32 i32;
+
+       /// 64 bit signed integer type.
+       /// @see gtc_type_precision
+       typedef detail::int64 i64;
+
+
+       /// 8 bit signed integer scalar type.
+       /// @see gtc_type_precision
+       typedef tvec1<i8, defaultp> i8vec1;
+       
+       /// 8 bit signed integer vector of 2 components type.
+       /// @see gtc_type_precision
+       typedef tvec2<i8, defaultp> i8vec2;
+
+       /// 8 bit signed integer vector of 3 components type.
+       /// @see gtc_type_precision
+       typedef tvec3<i8, defaultp> i8vec3;
+
+       /// 8 bit signed integer vector of 4 components type.
+       /// @see gtc_type_precision
+       typedef tvec4<i8, defaultp> i8vec4;
+
+
+       /// 16 bit signed integer scalar type.
+       /// @see gtc_type_precision
+       typedef tvec1<i16, defaultp> i16vec1;
+       
+       /// 16 bit signed integer vector of 2 components type.
+       /// @see gtc_type_precision
+       typedef tvec2<i16, defaultp> i16vec2;
+
+       /// 16 bit signed integer vector of 3 components type.
+       /// @see gtc_type_precision
+       typedef tvec3<i16, defaultp> i16vec3;
+
+       /// 16 bit signed integer vector of 4 components type.
+       /// @see gtc_type_precision
+       typedef tvec4<i16, defaultp> i16vec4;
+
+
+       /// 32 bit signed integer scalar type.
+       /// @see gtc_type_precision
+       typedef tvec1<i32, defaultp> i32vec1;
+       
+       /// 32 bit signed integer vector of 2 components type.
+       /// @see gtc_type_precision
+       typedef tvec2<i32, defaultp> i32vec2;
+
+       /// 32 bit signed integer vector of 3 components type.
+       /// @see gtc_type_precision
+       typedef tvec3<i32, defaultp> i32vec3;
+
+       /// 32 bit signed integer vector of 4 components type.
+       /// @see gtc_type_precision
+       typedef tvec4<i32, defaultp> i32vec4;
+
+
+       /// 64 bit signed integer scalar type.
+       /// @see gtc_type_precision
+       typedef tvec1<i64, defaultp> i64vec1;
+       
+       /// 64 bit signed integer vector of 2 components type.
+       /// @see gtc_type_precision
+       typedef tvec2<i64, defaultp> i64vec2;
+
+       /// 64 bit signed integer vector of 3 components type.
+       /// @see gtc_type_precision
+       typedef tvec3<i64, defaultp> i64vec3;
+
+       /// 64 bit signed integer vector of 4 components type.
+       /// @see gtc_type_precision
+       typedef tvec4<i64, defaultp> i64vec4;
+
+
+       /////////////////////////////
+       // Unsigned int vector types
+
+       /// Low precision 8 bit unsigned integer type.
+       /// @see gtc_type_precision
+       typedef detail::uint8 lowp_uint8;
+       
+       /// Low precision 16 bit unsigned integer type.
+       /// @see gtc_type_precision
+       typedef detail::uint16 lowp_uint16;
+
+       /// Low precision 32 bit unsigned integer type.
+       /// @see gtc_type_precision
+       typedef detail::uint32 lowp_uint32;
+
+       /// Low precision 64 bit unsigned integer type.
+       /// @see gtc_type_precision
+       typedef detail::uint64 lowp_uint64;
+
+       /// Low precision 8 bit unsigned integer type.
+       /// @see gtc_type_precision
+       typedef detail::uint8 lowp_uint8_t;
+       
+       /// Low precision 16 bit unsigned integer type.
+       /// @see gtc_type_precision
+       typedef detail::uint16 lowp_uint16_t;
+
+       /// Low precision 32 bit unsigned integer type.
+       /// @see gtc_type_precision
+       typedef detail::uint32 lowp_uint32_t;
+
+       /// Low precision 64 bit unsigned integer type.
+       /// @see gtc_type_precision
+       typedef detail::uint64 lowp_uint64_t;
+
+       /// Low precision 8 bit unsigned integer type.
+       /// @see gtc_type_precision
+       typedef detail::uint8 lowp_u8;
+       
+       /// Low precision 16 bit unsigned integer type.
+       /// @see gtc_type_precision
+       typedef detail::uint16 lowp_u16;
+
+       /// Low precision 32 bit unsigned integer type.
+       /// @see gtc_type_precision
+       typedef detail::uint32 lowp_u32;
+
+       /// Low precision 64 bit unsigned integer type.
+       /// @see gtc_type_precision
+       typedef detail::uint64 lowp_u64;
+       
+       /// Medium precision 8 bit unsigned integer type.
+       /// @see gtc_type_precision
+       typedef detail::uint8 mediump_uint8;
+       
+       /// Medium precision 16 bit unsigned integer type.
+       /// @see gtc_type_precision
+       typedef detail::uint16 mediump_uint16;
+
+       /// Medium precision 32 bit unsigned integer type.
+       /// @see gtc_type_precision
+       typedef detail::uint32 mediump_uint32;
+
+       /// Medium precision 64 bit unsigned integer type.
+       /// @see gtc_type_precision
+       typedef detail::uint64 mediump_uint64;
+
+       /// Medium precision 8 bit unsigned integer type.
+       /// @see gtc_type_precision
+       typedef detail::uint8 mediump_uint8_t;
+       
+       /// Medium precision 16 bit unsigned integer type.
+       /// @see gtc_type_precision
+       typedef detail::uint16 mediump_uint16_t;
+
+       /// Medium precision 32 bit unsigned integer type.
+       /// @see gtc_type_precision
+       typedef detail::uint32 mediump_uint32_t;
+
+       /// Medium precision 64 bit unsigned integer type.
+       /// @see gtc_type_precision
+       typedef detail::uint64 mediump_uint64_t;
+
+       /// Medium precision 8 bit unsigned integer type.
+       /// @see gtc_type_precision
+       typedef detail::uint8 mediump_u8;
+       
+       /// Medium precision 16 bit unsigned integer type.
+       /// @see gtc_type_precision
+       typedef detail::uint16 mediump_u16;
+
+       /// Medium precision 32 bit unsigned integer type.
+       /// @see gtc_type_precision
+       typedef detail::uint32 mediump_u32;
+
+       /// Medium precision 64 bit unsigned integer type.
+       /// @see gtc_type_precision
+       typedef detail::uint64 mediump_u64;
+       
+       /// High precision 8 bit unsigned integer type.
+       /// @see gtc_type_precision
+       typedef detail::uint8 highp_uint8;
+       
+       /// High precision 16 bit unsigned integer type.
+       /// @see gtc_type_precision
+       typedef detail::uint16 highp_uint16;
+
+       /// High precision 32 bit unsigned integer type.
+       /// @see gtc_type_precision
+       typedef detail::uint32 highp_uint32;
+
+       /// High precision 64 bit unsigned integer type.
+       /// @see gtc_type_precision
+       typedef detail::uint64 highp_uint64;
+
+       /// High precision 8 bit unsigned integer type.
+       /// @see gtc_type_precision
+       typedef detail::uint8 highp_uint8_t;
+       
+       /// High precision 16 bit unsigned integer type.
+       /// @see gtc_type_precision
+       typedef detail::uint16 highp_uint16_t;
+
+       /// High precision 32 bit unsigned integer type.
+       /// @see gtc_type_precision
+       typedef detail::uint32 highp_uint32_t;
+
+       /// High precision 64 bit unsigned integer type.
+       /// @see gtc_type_precision
+       typedef detail::uint64 highp_uint64_t;
+
+       /// High precision 8 bit unsigned integer type.
+       /// @see gtc_type_precision
+       typedef detail::uint8 highp_u8;
+       
+       /// High precision 16 bit unsigned integer type.
+       /// @see gtc_type_precision
+       typedef detail::uint16 highp_u16;
+
+       /// High precision 32 bit unsigned integer type.
+       /// @see gtc_type_precision
+       typedef detail::uint32 highp_u32;
+
+       /// High precision 64 bit unsigned integer type.
+       /// @see gtc_type_precision
+       typedef detail::uint64 highp_u64;
+
+       /// Default precision 8 bit unsigned integer type.
+       /// @see gtc_type_precision
+       typedef detail::uint8 uint8;
+       
+       /// Default precision 16 bit unsigned integer type.
+       /// @see gtc_type_precision
+       typedef detail::uint16 uint16;
+
+       /// Default precision 32 bit unsigned integer type.
+       /// @see gtc_type_precision
+       typedef detail::uint32 uint32;
+
+       /// Default precision 64 bit unsigned integer type.
+       /// @see gtc_type_precision
+       typedef detail::uint64 uint64;
+
+#if GLM_HAS_EXTENDED_INTEGER_TYPE
+       using std::uint8_t;
+       using std::uint16_t;
+       using std::uint32_t;
+       using std::uint64_t;
+#else
+       /// Default precision 8 bit unsigned integer type.
+       /// @see gtc_type_precision
+       typedef detail::uint8 uint8_t;
+       
+       /// Default precision 16 bit unsigned integer type.
+       /// @see gtc_type_precision
+       typedef detail::uint16 uint16_t;
+
+       /// Default precision 32 bit unsigned integer type.
+       /// @see gtc_type_precision
+       typedef detail::uint32 uint32_t;
+
+       /// Default precision 64 bit unsigned integer type.
+       /// @see gtc_type_precision
+       typedef detail::uint64 uint64_t;
+#endif
+
+       /// Default precision 8 bit unsigned integer type.
+       /// @see gtc_type_precision
+       typedef detail::uint8 u8;
+       
+       /// Default precision 16 bit unsigned integer type.
+       /// @see gtc_type_precision
+       typedef detail::uint16 u16;
+
+       /// Default precision 32 bit unsigned integer type.
+       /// @see gtc_type_precision
+       typedef detail::uint32 u32;
+
+       /// Default precision 64 bit unsigned integer type.
+       /// @see gtc_type_precision
+       typedef detail::uint64 u64;
+
+
+
+       /// Default precision 8 bit unsigned integer scalar type.
+       /// @see gtc_type_precision
+       typedef tvec1<u8, defaultp> u8vec1;
+       
+       /// Default precision 8 bit unsigned integer vector of 2 components type.
+       /// @see gtc_type_precision
+       typedef tvec2<u8, defaultp> u8vec2;
+
+       /// Default precision 8 bit unsigned integer vector of 3 components type.
+       /// @see gtc_type_precision
+       typedef tvec3<u8, defaultp> u8vec3;
+
+       /// Default precision 8 bit unsigned integer vector of 4 components type.
+       /// @see gtc_type_precision
+       typedef tvec4<u8, defaultp> u8vec4;
+
+
+       /// Default precision 16 bit unsigned integer scalar type.
+       /// @see gtc_type_precision
+       typedef tvec1<u16, defaultp> u16vec1;
+       
+       /// Default precision 16 bit unsigned integer vector of 2 components type.
+       /// @see gtc_type_precision
+       typedef tvec2<u16, defaultp> u16vec2;
+
+       /// Default precision 16 bit unsigned integer vector of 3 components type.
+       /// @see gtc_type_precision
+       typedef tvec3<u16, defaultp> u16vec3;
+
+       /// Default precision 16 bit unsigned integer vector of 4 components type.
+       /// @see gtc_type_precision
+       typedef tvec4<u16, defaultp> u16vec4;
+
+
+       /// Default precision 32 bit unsigned integer scalar type.
+       /// @see gtc_type_precision
+       typedef tvec1<u32, defaultp> u32vec1;
+       
+       /// Default precision 32 bit unsigned integer vector of 2 components type.
+       /// @see gtc_type_precision
+       typedef tvec2<u32, defaultp> u32vec2;
+
+       /// Default precision 32 bit unsigned integer vector of 3 components type.
+       /// @see gtc_type_precision
+       typedef tvec3<u32, defaultp> u32vec3;
+
+       /// Default precision 32 bit unsigned integer vector of 4 components type.
+       /// @see gtc_type_precision
+       typedef tvec4<u32, defaultp> u32vec4;
+
+
+       /// Default precision 64 bit unsigned integer scalar type.
+       /// @see gtc_type_precision
+       typedef tvec1<u64, defaultp> u64vec1;
+       
+       /// Default precision 64 bit unsigned integer vector of 2 components type.
+       /// @see gtc_type_precision
+       typedef tvec2<u64, defaultp> u64vec2;
+
+       /// Default precision 64 bit unsigned integer vector of 3 components type.
+       /// @see gtc_type_precision
+       typedef tvec3<u64, defaultp> u64vec3;
+
+       /// Default precision 64 bit unsigned integer vector of 4 components type.
+       /// @see gtc_type_precision
+       typedef tvec4<u64, defaultp> u64vec4;
+
+
+       //////////////////////
+       // Float vector types
+
+       /// 32 bit single-precision floating-point scalar.
+       /// @see gtc_type_precision
+       typedef detail::float32 float32;
+
+       /// 64 bit double-precision floating-point scalar.
+       /// @see gtc_type_precision
+       typedef detail::float64 float64;
+
+
+       /// 32 bit single-precision floating-point scalar.
+       /// @see gtc_type_precision
+       typedef detail::float32 float32_t;
+
+       /// 64 bit double-precision floating-point scalar.
+       /// @see gtc_type_precision
+       typedef detail::float64 float64_t;
+
+
+       /// 32 bit single-precision floating-point scalar.
+       /// @see gtc_type_precision
+       typedef float32 f32;
+
+       /// 64 bit double-precision floating-point scalar.
+       /// @see gtc_type_precision
+       typedef float64 f64;
+
+
+       /// Single-precision floating-point vector of 1 component.
+       /// @see gtc_type_precision
+       typedef tvec1<float, defaultp> fvec1;
+
+       /// Single-precision floating-point vector of 2 components.
+       /// @see gtc_type_precision
+       typedef tvec2<float, defaultp> fvec2;
+
+       /// Single-precision floating-point vector of 3 components.
+       /// @see gtc_type_precision
+       typedef tvec3<float, defaultp> fvec3;
+
+       /// Single-precision floating-point vector of 4 components.
+       /// @see gtc_type_precision
+       typedef tvec4<float, defaultp> fvec4;
+
+       
+       /// Single-precision floating-point vector of 1 component.
+       /// @see gtc_type_precision
+       typedef tvec1<f32, defaultp> f32vec1;
+
+       /// Single-precision floating-point vector of 2 components.
+       /// @see gtc_type_precision
+       typedef tvec2<f32, defaultp> f32vec2;
+
+       /// Single-precision floating-point vector of 3 components.
+       /// @see gtc_type_precision
+       typedef tvec3<f32, defaultp> f32vec3;
+
+       /// Single-precision floating-point vector of 4 components.
+       /// @see gtc_type_precision
+       typedef tvec4<f32, defaultp> f32vec4;
+
+
+       /// Double-precision floating-point vector of 1 component.
+       /// @see gtc_type_precision
+       typedef tvec1<f64, defaultp> f64vec1;
+
+       /// Double-precision floating-point vector of 2 components.
+       /// @see gtc_type_precision
+       typedef tvec2<f64, defaultp> f64vec2;
+
+       /// Double-precision floating-point vector of 3 components.
+       /// @see gtc_type_precision
+       typedef tvec3<f64, defaultp> f64vec3;
+
+       /// Double-precision floating-point vector of 4 components.
+       /// @see gtc_type_precision
+       typedef tvec4<f64, defaultp> f64vec4;
+
+
+       //////////////////////
+       // Float matrix types 
+
+       /// Single-precision floating-point 1x1 matrix.
+       /// @see gtc_type_precision
+       //typedef detail::tmat1x1<f32> fmat1;
+
+       /// Single-precision floating-point 2x2 matrix.
+       /// @see gtc_type_precision
+       typedef tmat2x2<f32, defaultp> fmat2;
+
+       /// Single-precision floating-point 3x3 matrix.
+       /// @see gtc_type_precision
+       typedef tmat3x3<f32, defaultp> fmat3;
+
+       /// Single-precision floating-point 4x4 matrix.
+       /// @see gtc_type_precision
+       typedef tmat4x4<f32, defaultp> fmat4;
+
+
+       /// Single-precision floating-point 1x1 matrix.
+       /// @see gtc_type_precision
+       //typedef f32 fmat1x1;
+
+       /// Single-precision floating-point 2x2 matrix.
+       /// @see gtc_type_precision
+       typedef tmat2x2<f32, defaultp> fmat2x2;
+
+       /// Single-precision floating-point 2x3 matrix.
+       /// @see gtc_type_precision
+       typedef tmat2x3<f32, defaultp> fmat2x3;
+
+       /// Single-precision floating-point 2x4 matrix.
+       /// @see gtc_type_precision
+       typedef tmat2x4<f32, defaultp> fmat2x4;
+
+       /// Single-precision floating-point 3x2 matrix.
+       /// @see gtc_type_precision
+       typedef tmat3x2<f32, defaultp> fmat3x2;
+
+       /// Single-precision floating-point 3x3 matrix.
+       /// @see gtc_type_precision
+       typedef tmat3x3<f32, defaultp> fmat3x3;
+
+       /// Single-precision floating-point 3x4 matrix.
+       /// @see gtc_type_precision
+       typedef tmat3x4<f32, defaultp> fmat3x4;
+
+       /// Single-precision floating-point 4x2 matrix.
+       /// @see gtc_type_precision
+       typedef tmat4x2<f32, defaultp> fmat4x2;
+
+       /// Single-precision floating-point 4x3 matrix.
+       /// @see gtc_type_precision
+       typedef tmat4x3<f32, defaultp> fmat4x3;
+
+       /// Single-precision floating-point 4x4 matrix.
+       /// @see gtc_type_precision
+       typedef tmat4x4<f32, defaultp> fmat4x4;
+
+
+       /// Single-precision floating-point 1x1 matrix.
+       /// @see gtc_type_precision
+       //typedef detail::tmat1x1<f32, defaultp> f32mat1;
+
+       /// Single-precision floating-point 2x2 matrix.
+       /// @see gtc_type_precision
+       typedef tmat2x2<f32, defaultp> f32mat2;
+
+       /// Single-precision floating-point 3x3 matrix.
+       /// @see gtc_type_precision
+       typedef tmat3x3<f32, defaultp> f32mat3;
+
+       /// Single-precision floating-point 4x4 matrix.
+       /// @see gtc_type_precision
+       typedef tmat4x4<f32, defaultp> f32mat4;
+
+
+       /// Single-precision floating-point 1x1 matrix.
+       /// @see gtc_type_precision
+       //typedef f32 f32mat1x1;
+
+       /// Single-precision floating-point 2x2 matrix.
+       /// @see gtc_type_precision
+       typedef tmat2x2<f32, defaultp> f32mat2x2;
+
+       /// Single-precision floating-point 2x3 matrix.
+       /// @see gtc_type_precision
+       typedef tmat2x3<f32, defaultp> f32mat2x3;
+
+       /// Single-precision floating-point 2x4 matrix.
+       /// @see gtc_type_precision
+       typedef tmat2x4<f32, defaultp> f32mat2x4;
+
+       /// Single-precision floating-point 3x2 matrix.
+       /// @see gtc_type_precision
+       typedef tmat3x2<f32, defaultp> f32mat3x2;
+
+       /// Single-precision floating-point 3x3 matrix.
+       /// @see gtc_type_precision
+       typedef tmat3x3<f32, defaultp> f32mat3x3;
+
+       /// Single-precision floating-point 3x4 matrix.
+       /// @see gtc_type_precision
+       typedef tmat3x4<f32, defaultp> f32mat3x4;
+
+       /// Single-precision floating-point 4x2 matrix.
+       /// @see gtc_type_precision
+       typedef tmat4x2<f32, defaultp> f32mat4x2;
+
+       /// Single-precision floating-point 4x3 matrix.
+       /// @see gtc_type_precision
+       typedef tmat4x3<f32, defaultp> f32mat4x3;
+
+       /// Single-precision floating-point 4x4 matrix.
+       /// @see gtc_type_precision
+       typedef tmat4x4<f32, defaultp> f32mat4x4;
+
+
+       /// Double-precision floating-point 1x1 matrix.
+       /// @see gtc_type_precision
+       //typedef detail::tmat1x1<f64, defaultp> f64mat1;
+
+       /// Double-precision floating-point 2x2 matrix.
+       /// @see gtc_type_precision
+       typedef tmat2x2<f64, defaultp> f64mat2;
+
+       /// Double-precision floating-point 3x3 matrix.
+       /// @see gtc_type_precision
+       typedef tmat3x3<f64, defaultp> f64mat3;
+
+       /// Double-precision floating-point 4x4 matrix.
+       /// @see gtc_type_precision
+       typedef tmat4x4<f64, defaultp> f64mat4;
+
+
+       /// Double-precision floating-point 1x1 matrix.
+       /// @see gtc_type_precision
+       //typedef f64 f64mat1x1;
+
+       /// Double-precision floating-point 2x2 matrix.
+       /// @see gtc_type_precision
+       typedef tmat2x2<f64, defaultp> f64mat2x2;
+
+       /// Double-precision floating-point 2x3 matrix.
+       /// @see gtc_type_precision
+       typedef tmat2x3<f64, defaultp> f64mat2x3;
+
+       /// Double-precision floating-point 2x4 matrix.
+       /// @see gtc_type_precision
+       typedef tmat2x4<f64, defaultp> f64mat2x4;
+
+       /// Double-precision floating-point 3x2 matrix.
+       /// @see gtc_type_precision
+       typedef tmat3x2<f64, defaultp> f64mat3x2;
+
+       /// Double-precision floating-point 3x3 matrix.
+       /// @see gtc_type_precision
+       typedef tmat3x3<f64, defaultp> f64mat3x3;
+
+       /// Double-precision floating-point 3x4 matrix.
+       /// @see gtc_type_precision
+       typedef tmat3x4<f64, defaultp> f64mat3x4;
+
+       /// Double-precision floating-point 4x2 matrix.
+       /// @see gtc_type_precision
+       typedef tmat4x2<f64, defaultp> f64mat4x2;
+
+       /// Double-precision floating-point 4x3 matrix.
+       /// @see gtc_type_precision
+       typedef tmat4x3<f64, defaultp> f64mat4x3;
+
+       /// Double-precision floating-point 4x4 matrix.
+       /// @see gtc_type_precision
+       typedef tmat4x4<f64, defaultp> f64mat4x4;
+
+
+       //////////////////////////
+       // Quaternion types
+
+       /// Single-precision floating-point quaternion.
+       /// @see gtc_type_precision
+       typedef tquat<f32, defaultp> f32quat;
+
+       /// Double-precision floating-point quaternion.
+       /// @see gtc_type_precision
+       typedef tquat<f64, defaultp> f64quat;
+
+       /// @}
+}//namespace glm
+
+#include "type_precision.inl"
diff --git a/include/glm/gtc/type_precision.inl b/include/glm/gtc/type_precision.inl
new file mode 100644 (file)
index 0000000..0107db8
--- /dev/null
@@ -0,0 +1,36 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtc_swizzle
+/// @file glm/gtc/swizzle.inl
+/// @date 2009-06-14 / 2011-06-15
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////
+
+namespace glm
+{
+
+}
diff --git a/include/glm/gtc/type_ptr.hpp b/include/glm/gtc/type_ptr.hpp
new file mode 100644 (file)
index 0000000..302d827
--- /dev/null
@@ -0,0 +1,178 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtc_type_ptr
+/// @file glm/gtc/type_ptr.hpp
+/// @date 2009-05-06 / 2011-06-05
+/// @author Christophe Riccio
+///
+/// @see core (dependence)
+/// @see gtc_half_float (dependence)
+/// @see gtc_quaternion (dependence)
+///
+/// @defgroup gtc_type_ptr GLM_GTC_type_ptr
+/// @ingroup gtc
+///
+/// @brief Handles the interaction between pointers and vector, matrix types.
+/// 
+/// This extension defines an overloaded function, glm::value_ptr, which
+/// takes any of the \ref core_template "core template types". It returns
+/// a pointer to the memory layout of the object. Matrix types store their values
+/// in column-major order.
+/// 
+/// This is useful for uploading data to matrices or copying data to buffer objects.
+///
+/// Example:
+/// @code
+/// #include <glm/glm.hpp>
+/// #include <glm/gtc/type_ptr.hpp>
+/// 
+/// glm::vec3 aVector(3);
+/// glm::mat4 someMatrix(1.0);
+/// 
+/// glUniform3fv(uniformLoc, 1, glm::value_ptr(aVector));
+/// glUniformMatrix4fv(uniformMatrixLoc, 1, GL_FALSE, glm::value_ptr(someMatrix));
+/// @endcode
+/// 
+/// <glm/gtc/type_ptr.hpp> need to be included to use these functionalities.
+///////////////////////////////////////////////////////////////////////////////////
+
+#pragma once
+
+// Dependency:
+#include "../gtc/quaternion.hpp"
+#include "../vec2.hpp"
+#include "../vec3.hpp"
+#include "../vec4.hpp"
+#include "../mat2x2.hpp"
+#include "../mat2x3.hpp"
+#include "../mat2x4.hpp"
+#include "../mat3x2.hpp"
+#include "../mat3x3.hpp"
+#include "../mat3x4.hpp"
+#include "../mat4x2.hpp"
+#include "../mat4x3.hpp"
+#include "../mat4x4.hpp"
+#include <cstring>
+
+#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
+#      pragma message("GLM: GLM_GTC_type_ptr extension included")
+#endif
+
+namespace glm
+{
+       /// @addtogroup gtc_type_ptr
+       /// @{
+
+       /// Return the constant address to the data of the input parameter.
+       /// @see gtc_type_ptr
+       template<typename genType>
+       GLM_FUNC_DECL typename genType::value_type const * value_ptr(genType const & vec);
+
+       /// Build a vector from a pointer.
+       /// @see gtc_type_ptr
+       template<typename T>
+       GLM_FUNC_DECL tvec2<T, defaultp> make_vec2(T const * const ptr);
+
+       /// Build a vector from a pointer.
+       /// @see gtc_type_ptr
+       template<typename T>
+       GLM_FUNC_DECL tvec3<T, defaultp> make_vec3(T const * const ptr);
+
+       /// Build a vector from a pointer.
+       /// @see gtc_type_ptr
+       template<typename T>
+       GLM_FUNC_DECL tvec4<T, defaultp> make_vec4(T const * const ptr);
+
+       /// Build a matrix from a pointer.
+       /// @see gtc_type_ptr
+       template<typename T>
+       GLM_FUNC_DECL tmat2x2<T, defaultp> make_mat2x2(T const * const ptr);
+
+       /// Build a matrix from a pointer.
+       /// @see gtc_type_ptr
+       template<typename T>
+       GLM_FUNC_DECL tmat2x3<T, defaultp> make_mat2x3(T const * const ptr);
+
+       /// Build a matrix from a pointer.
+       /// @see gtc_type_ptr
+       template<typename T>
+       GLM_FUNC_DECL tmat2x4<T, defaultp> make_mat2x4(T const * const ptr);
+
+       /// Build a matrix from a pointer.
+       /// @see gtc_type_ptr
+       template<typename T>
+       GLM_FUNC_DECL tmat3x2<T, defaultp> make_mat3x2(T const * const ptr);
+
+       /// Build a matrix from a pointer.
+       /// @see gtc_type_ptr
+       template<typename T>
+       GLM_FUNC_DECL tmat3x3<T, defaultp> make_mat3x3(T const * const ptr);
+
+       /// Build a matrix from a pointer.
+       /// @see gtc_type_ptr
+       template<typename T>
+       GLM_FUNC_DECL tmat3x4<T, defaultp> make_mat3x4(T const * const ptr);
+
+       /// Build a matrix from a pointer.
+       /// @see gtc_type_ptr
+       template<typename T>
+       GLM_FUNC_DECL tmat4x2<T, defaultp> make_mat4x2(T const * const ptr);
+
+       /// Build a matrix from a pointer.
+       /// @see gtc_type_ptr
+       template<typename T>
+       GLM_FUNC_DECL tmat4x3<T, defaultp> make_mat4x3(T const * const ptr);
+
+       /// Build a matrix from a pointer.
+       /// @see gtc_type_ptr
+       template<typename T>
+       GLM_FUNC_DECL tmat4x4<T, defaultp> make_mat4x4(T const * const ptr);
+       
+       /// Build a matrix from a pointer.
+       /// @see gtc_type_ptr
+       template<typename T>
+       GLM_FUNC_DECL tmat2x2<T, defaultp> make_mat2(T const * const ptr);
+
+       /// Build a matrix from a pointer.
+       /// @see gtc_type_ptr
+       template<typename T>
+       GLM_FUNC_DECL tmat3x3<T, defaultp> make_mat3(T const * const ptr);
+               
+       /// Build a matrix from a pointer.
+       /// @see gtc_type_ptr
+       template<typename T>
+       GLM_FUNC_DECL tmat4x4<T, defaultp> make_mat4(T const * const ptr);
+
+       /// Build a quaternion from a pointer.
+       /// @see gtc_type_ptr
+       template<typename T>
+       GLM_FUNC_DECL tquat<T, defaultp> make_quat(T const * const ptr);
+
+       /// @}
+}//namespace glm
+
+#include "type_ptr.inl"
diff --git a/include/glm/gtc/type_ptr.inl b/include/glm/gtc/type_ptr.inl
new file mode 100644 (file)
index 0000000..0e1cd31
--- /dev/null
@@ -0,0 +1,479 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtc_type_ptr
+/// @file glm/gtc/type_ptr.inl
+/// @date 2011-06-15 / 2011-12-07
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////
+
+#include <cstring>
+
+namespace glm
+{
+       /// @addtogroup gtc_type_ptr
+       /// @{
+
+       /// Return the constant address to the data of the vector input.
+       /// @see gtc_type_ptr
+       template<typename T, precision P>
+       GLM_FUNC_QUALIFIER T const * value_ptr
+       (
+               tvec2<T, P> const & vec
+       )
+       {
+               return &(vec.x);
+       }
+
+       //! Return the address to the data of the vector input.
+       /// @see gtc_type_ptr
+       template<typename T, precision P>
+       GLM_FUNC_QUALIFIER T * value_ptr
+       (
+               tvec2<T, P> & vec
+       )
+       {
+               return &(vec.x);
+       }
+
+       /// Return the constant address to the data of the vector input.
+       /// @see gtc_type_ptr
+       template<typename T, precision P>
+       GLM_FUNC_QUALIFIER T const * value_ptr
+       (
+               tvec3<T, P> const & vec
+       )
+       {
+               return &(vec.x);
+       }
+
+       //! Return the address to the data of the vector input.
+       /// @see gtc_type_ptr
+       template<typename T, precision P>
+       GLM_FUNC_QUALIFIER T * value_ptr
+       (
+               tvec3<T, P> & vec
+       )
+       {
+               return &(vec.x);
+       }
+               
+       /// Return the constant address to the data of the vector input.
+       /// @see gtc_type_ptr
+       template<typename T, precision P>
+       GLM_FUNC_QUALIFIER T const * value_ptr
+       (       
+               tvec4<T, P> const & vec
+       )
+       {
+               return &(vec.x);
+       }
+
+       //! Return the address to the data of the vector input.
+       //! From GLM_GTC_type_ptr extension.
+       template<typename T, precision P>
+       GLM_FUNC_QUALIFIER T * value_ptr
+       (       
+               tvec4<T, P> & vec
+       )
+       {
+               return &(vec.x);
+       }
+
+       /// Return the constant address to the data of the matrix input.
+       /// @see gtc_type_ptr
+       template<typename T, precision P>
+       GLM_FUNC_QUALIFIER T const * value_ptr
+       (
+               tmat2x2<T, P> const & mat
+       )
+       {
+               return &(mat[0].x);
+       }
+
+       //! Return the address to the data of the matrix input.
+       /// @see gtc_type_ptr
+       template<typename T, precision P>
+       GLM_FUNC_QUALIFIER T * value_ptr
+       (
+               tmat2x2<T, P> & mat
+       )
+       {
+               return &(mat[0].x);
+       }
+               
+       /// Return the constant address to the data of the matrix input.
+       /// @see gtc_type_ptr
+       template<typename T, precision P>
+       GLM_FUNC_QUALIFIER T const * value_ptr
+       (
+               tmat3x3<T, P> const & mat
+       )
+       {
+               return &(mat[0].x);
+       }
+
+       //! Return the address to the data of the matrix input.
+       /// @see gtc_type_ptr
+       template<typename T, precision P>
+       GLM_FUNC_QUALIFIER T * value_ptr
+       (
+               tmat3x3<T, P> & mat
+       )
+       {
+               return &(mat[0].x);
+       }
+               
+       /// Return the constant address to the data of the matrix input.
+       /// @see gtc_type_ptr
+       template<typename T, precision P>
+       GLM_FUNC_QUALIFIER T const * value_ptr
+       (
+               tmat4x4<T, P> const & mat
+       )
+       {
+               return &(mat[0].x);
+       }
+
+       //! Return the address to the data of the matrix input.
+       //! From GLM_GTC_type_ptr extension.
+       template<typename T, precision P>
+       GLM_FUNC_QUALIFIER T * value_ptr
+       (
+               tmat4x4<T, P> & mat
+       )
+       {
+               return &(mat[0].x);
+       }
+
+       /// Return the constant address to the data of the matrix input.
+       /// @see gtc_type_ptr
+       template<typename T, precision P>
+       GLM_FUNC_QUALIFIER T const * value_ptr
+       (
+               tmat2x3<T, P> const & mat
+       )
+       {
+               return &(mat[0].x);
+       }
+
+       //! Return the address to the data of the matrix input.
+       /// @see gtc_type_ptr
+       template<typename T, precision P>
+       GLM_FUNC_QUALIFIER T * value_ptr
+       (
+               tmat2x3<T, P> & mat
+       )
+       {
+               return &(mat[0].x);
+       }
+               
+       /// Return the constant address to the data of the matrix input.
+       /// @see gtc_type_ptr
+       template<typename T, precision P>
+       GLM_FUNC_QUALIFIER T const * value_ptr
+       (
+               tmat3x2<T, P> const & mat
+       )
+       {
+               return &(mat[0].x);
+       }
+
+       //! Return the address to the data of the matrix input.
+       /// @see gtc_type_ptr
+       template<typename T, precision P>
+       GLM_FUNC_QUALIFIER T * value_ptr
+       (
+               tmat3x2<T, P> & mat
+       )
+       {
+               return &(mat[0].x);
+       }
+               
+       /// Return the constant address to the data of the matrix input.
+       /// @see gtc_type_ptr
+       template<typename T, precision P>
+       GLM_FUNC_QUALIFIER T const * value_ptr
+       (
+               tmat2x4<T, P> const & mat
+       )
+       {
+               return &(mat[0].x);
+       }
+
+       //! Return the address to the data of the matrix input.
+       /// @see gtc_type_ptr
+       template<typename T, precision P>
+       GLM_FUNC_QUALIFIER T * value_ptr
+       (
+               tmat2x4<T, P> & mat
+       )
+       {
+               return &(mat[0].x);
+       }
+               
+       /// Return the constant address to the data of the matrix input.
+       /// @see gtc_type_ptr
+       template<typename T, precision P>
+       GLM_FUNC_QUALIFIER T const * value_ptr
+       (
+               tmat4x2<T, P> const & mat
+       )
+       {
+               return &(mat[0].x);
+       }
+
+       //! Return the address to the data of the matrix input.
+       /// @see gtc_type_ptr
+       template<typename T, precision P>
+       GLM_FUNC_QUALIFIER T * value_ptr
+       (       
+               tmat4x2<T, P> & mat
+       )
+       {
+               return &(mat[0].x);
+       }
+               
+       /// Return the constant address to the data of the matrix input.
+       /// @see gtc_type_ptr
+       template<typename T, precision P>
+       GLM_FUNC_QUALIFIER T const * value_ptr
+       (
+               tmat3x4<T, P> const & mat
+       )
+       {
+               return &(mat[0].x);
+       }
+
+       //! Return the address to the data of the matrix input.
+       /// @see gtc_type_ptr
+       template<typename T, precision P>
+       GLM_FUNC_QUALIFIER T * value_ptr
+       (
+               tmat3x4<T, P> & mat
+       )
+       {
+               return &(mat[0].x);
+       }
+               
+       /// Return the constant address to the data of the matrix input.
+       /// @see gtc_type_ptr
+       template<typename T, precision P>
+       GLM_FUNC_QUALIFIER T const * value_ptr
+       (
+               tmat4x3<T, P> const & mat
+       )
+       {
+               return &(mat[0].x);
+       }
+
+       /// Return the address to the data of the matrix input.
+       /// @see gtc_type_ptr
+       template<typename T, precision P>
+       GLM_FUNC_QUALIFIER T * value_ptr(tmat4x3<T, P> & mat)
+       {
+               return &(mat[0].x);
+       }
+
+       /// Return the constant address to the data of the input parameter.
+       /// @see gtc_type_ptr
+       template<typename T, precision P>
+       GLM_FUNC_QUALIFIER T const * value_ptr
+       (
+               tquat<T, P> const & q
+       )
+       {
+               return &(q[0]);
+       }
+
+       /// Return the address to the data of the quaternion input.
+       /// @see gtc_type_ptr
+       template<typename T, precision P>
+       GLM_FUNC_QUALIFIER T * value_ptr
+       (
+               tquat<T, P> & q
+       )
+       {
+               return &(q[0]);
+       }
+
+       /// Build a vector from a pointer.
+       /// @see gtc_type_ptr
+       template <typename T>
+       GLM_FUNC_QUALIFIER tvec2<T, defaultp> make_vec2(T const * const ptr)
+       {
+               tvec2<T, defaultp> Result;
+               memcpy(value_ptr(Result), ptr, sizeof(tvec2<T, defaultp>));
+               return Result;
+       }
+
+       /// Build a vector from a pointer.
+       /// @see gtc_type_ptr
+       template <typename T>
+       GLM_FUNC_QUALIFIER tvec3<T, defaultp> make_vec3(T const * const ptr)
+       {
+               tvec3<T, defaultp> Result;
+               memcpy(value_ptr(Result), ptr, sizeof(tvec3<T, defaultp>));
+               return Result;
+       }
+
+       /// Build a vector from a pointer.
+       /// @see gtc_type_ptr
+       template <typename T>
+       GLM_FUNC_QUALIFIER tvec4<T, defaultp> make_vec4(T const * const ptr)
+       {
+               tvec4<T, defaultp> Result;
+               memcpy(value_ptr(Result), ptr, sizeof(tvec4<T, defaultp>));
+               return Result;
+       }
+
+       /// Build a matrix from a pointer.
+       /// @see gtc_type_ptr
+       template <typename T>
+       GLM_FUNC_QUALIFIER tmat2x2<T, defaultp> make_mat2x2(T const * const ptr)
+       {
+               tmat2x2<T, defaultp> Result;
+               memcpy(value_ptr(Result), ptr, sizeof(tmat2x2<T, defaultp>));
+               return Result;
+       }
+
+       /// Build a matrix from a pointer.
+       /// @see gtc_type_ptr
+       template <typename T>
+       GLM_FUNC_QUALIFIER tmat2x3<T, defaultp> make_mat2x3(T const * const ptr)
+       {
+               tmat2x3<T, defaultp> Result;
+               memcpy(value_ptr(Result), ptr, sizeof(tmat2x3<T, defaultp>));
+               return Result;
+       }
+
+       /// Build a matrix from a pointer.
+       /// @see gtc_type_ptr
+       template <typename T>
+       GLM_FUNC_QUALIFIER tmat2x4<T, defaultp> make_mat2x4(T const * const ptr)
+       {
+               tmat2x4<T, defaultp> Result;
+               memcpy(value_ptr(Result), ptr, sizeof(tmat2x4<T, defaultp>));
+               return Result;
+       }
+
+       /// Build a matrix from a pointer.
+       /// @see gtc_type_ptr
+       template <typename T>
+       GLM_FUNC_QUALIFIER tmat3x2<T, defaultp> make_mat3x2(T const * const ptr)
+       {
+               tmat3x2<T, defaultp> Result;
+               memcpy(value_ptr(Result), ptr, sizeof(tmat3x2<T, defaultp>));
+               return Result;
+       }
+
+       //! Build a matrix from a pointer.
+       /// @see gtc_type_ptr
+       template <typename T>
+       GLM_FUNC_QUALIFIER tmat3x3<T, defaultp> make_mat3x3(T const * const ptr)
+       {
+               tmat3x3<T, defaultp> Result;
+               memcpy(value_ptr(Result), ptr, sizeof(tmat3x3<T, defaultp>));
+               return Result;
+       }
+
+       //! Build a matrix from a pointer.
+       /// @see gtc_type_ptr
+       template <typename T>
+       GLM_FUNC_QUALIFIER tmat3x4<T, defaultp> make_mat3x4(T const * const ptr)
+       {
+               tmat3x4<T, defaultp> Result;
+               memcpy(value_ptr(Result), ptr, sizeof(tmat3x4<T, defaultp>));
+               return Result;
+       }
+
+       //! Build a matrix from a pointer.
+       /// @see gtc_type_ptr
+       template <typename T>
+       GLM_FUNC_QUALIFIER tmat4x2<T, defaultp> make_mat4x2(T const * const ptr)
+       {
+               tmat4x2<T, defaultp> Result;
+               memcpy(value_ptr(Result), ptr, sizeof(tmat4x2<T, defaultp>));
+               return Result;
+       }
+
+       //! Build a matrix from a pointer.
+       /// @see gtc_type_ptr
+       template <typename T>
+       GLM_FUNC_QUALIFIER tmat4x3<T, defaultp> make_mat4x3(T const * const ptr)
+       {
+               tmat4x3<T, defaultp> Result;
+               memcpy(value_ptr(Result), ptr, sizeof(tmat4x3<T, defaultp>));
+               return Result;
+       }
+
+       //! Build a matrix from a pointer.
+       /// @see gtc_type_ptr
+       template <typename T>
+       GLM_FUNC_QUALIFIER tmat4x4<T, defaultp> make_mat4x4(T const * const ptr)
+       {
+               tmat4x4<T, defaultp> Result;
+               memcpy(value_ptr(Result), ptr, sizeof(tmat4x4<T, defaultp>));
+               return Result;
+       }
+
+       //! Build a matrix from a pointer.
+       /// @see gtc_type_ptr
+       template <typename T>
+       GLM_FUNC_QUALIFIER tmat2x2<T, defaultp> make_mat2(T const * const ptr)
+       {
+               return make_mat2x2(ptr);
+       }
+
+       //! Build a matrix from a pointer.
+       /// @see gtc_type_ptr
+       template <typename T>
+       GLM_FUNC_QUALIFIER tmat3x3<T, defaultp> make_mat3(T const * const ptr)
+       {
+               return make_mat3x3(ptr);
+       }
+               
+       //! Build a matrix from a pointer.
+       /// @see gtc_type_ptr
+       template <typename T>
+       GLM_FUNC_QUALIFIER tmat4x4<T, defaultp> make_mat4(T const * const ptr)
+       {
+               return make_mat4x4(ptr);
+       }
+
+       //! Build a quaternion from a pointer.
+       /// @see gtc_type_ptr
+       template <typename T>
+       GLM_FUNC_QUALIFIER tquat<T, defaultp> make_quat(T const * const ptr)
+       {
+               tquat<T, defaultp> Result;
+               memcpy(value_ptr(Result), ptr, sizeof(tquat<T, defaultp>));
+               return Result;
+       }
+
+       /// @}
+}//namespace glm
+
diff --git a/include/glm/gtc/ulp.hpp b/include/glm/gtc/ulp.hpp
new file mode 100644 (file)
index 0000000..b0f8859
--- /dev/null
@@ -0,0 +1,92 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtc_ulp
+/// @file glm/gtc/ulp.hpp
+/// @date 2011-02-21 / 2011-12-12
+/// @author Christophe Riccio
+///
+/// @see core (dependence)
+///
+/// @defgroup gtc_ulp GLM_GTC_ulp
+/// @ingroup gtc
+/// 
+/// @brief Allow the measurement of the accuracy of a function against a reference 
+/// implementation. This extension works on floating-point data and provide results 
+/// in ULP.
+/// <glm/gtc/ulp.hpp> need to be included to use these features.
+///////////////////////////////////////////////////////////////////////////////////
+
+#pragma once
+
+// Dependencies
+#include "../detail/setup.hpp"
+#include "../detail/precision.hpp"
+#include "../detail/type_int.hpp"
+
+#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
+#      pragma message("GLM: GLM_GTC_ulp extension included")
+#endif
+
+namespace glm
+{
+       /// @addtogroup gtc_ulp
+       /// @{
+
+       /// Return the next ULP value(s) after the input value(s).
+       /// @see gtc_ulp
+       template <typename genType>
+       GLM_FUNC_DECL genType next_float(genType const & x);
+
+       /// Return the previous ULP value(s) before the input value(s).
+       /// @see gtc_ulp
+       template <typename genType>
+       GLM_FUNC_DECL genType prev_float(genType const & x);
+
+       /// Return the value(s) ULP distance after the input value(s).
+       /// @see gtc_ulp
+       template <typename genType>
+       GLM_FUNC_DECL genType next_float(genType const & x, uint const & Distance);
+
+       /// Return the value(s) ULP distance before the input value(s).
+       /// @see gtc_ulp
+       template <typename genType>
+       GLM_FUNC_DECL genType prev_float(genType const & x, uint const & Distance);
+       
+       /// Return the distance in the number of ULP between 2 scalars.
+       /// @see gtc_ulp
+       template <typename T>
+       GLM_FUNC_DECL uint float_distance(T const & x, T const & y);
+
+       /// Return the distance in the number of ULP between 2 vectors.
+       /// @see gtc_ulp
+       template<typename T, template<typename> class vecType>
+       GLM_FUNC_DECL vecType<uint> float_distance(vecType<T> const & x, vecType<T> const & y);
+       
+       /// @}
+}// namespace glm
+
+#include "ulp.inl"
diff --git a/include/glm/gtc/ulp.inl b/include/glm/gtc/ulp.inl
new file mode 100644 (file)
index 0000000..765698b
--- /dev/null
@@ -0,0 +1,350 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtc_ulp
+/// @file glm/gtc/ulp.inl
+/// @date 2011-03-07 / 2012-04-07
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////
+/// Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+///
+/// Developed at SunPro, a Sun Microsystems, Inc. business.
+/// Permission to use, copy, modify, and distribute this
+/// software is freely granted, provided that this notice
+/// is preserved.
+///////////////////////////////////////////////////////////////////////////////////
+
+#include "../detail/type_int.hpp"
+#include <cmath>
+#include <cfloat>
+#include <limits>
+
+#if(GLM_COMPILER & GLM_COMPILER_VC)
+#      pragma warning(push)
+#      pragma warning(disable : 4127)
+#endif
+
+typedef union
+{
+       float value;
+       /* FIXME: Assumes 32 bit int.  */
+       unsigned int word;
+} ieee_float_shape_type;
+
+typedef union
+{
+       double value;
+       struct
+       {
+               glm::detail::int32 lsw;
+               glm::detail::int32 msw;
+       } parts;
+} ieee_double_shape_type;
+
+#define GLM_EXTRACT_WORDS(ix0,ix1,d)           \
+       do {                                                                    \
+               ieee_double_shape_type ew_u;            \
+               ew_u.value = (d);                                       \
+               (ix0) = ew_u.parts.msw;                         \
+               (ix1) = ew_u.parts.lsw;                         \
+       } while (0)
+
+#define GLM_GET_FLOAT_WORD(i,d)                                \
+       do {                                                                    \
+               ieee_float_shape_type gf_u;                     \
+               gf_u.value = (d);                                       \
+               (i) = gf_u.word;                                        \
+       } while (0)
+
+#define GLM_SET_FLOAT_WORD(d,i)                                \
+       do {                                                                    \
+               ieee_float_shape_type sf_u;                     \
+               sf_u.word = (i);                                        \
+               (d) = sf_u.value;                                       \
+       } while (0)
+
+#define GLM_INSERT_WORDS(d,ix0,ix1)                    \
+       do {                                                                    \
+               ieee_double_shape_type iw_u;            \
+               iw_u.parts.msw = (ix0);                         \
+               iw_u.parts.lsw = (ix1);                         \
+               (d) = iw_u.value;                                       \
+       } while (0)
+
+namespace glm{
+namespace detail
+{
+       GLM_FUNC_QUALIFIER float nextafterf(float x, float y)
+       {
+               volatile float t;
+               glm::detail::int32 hx, hy, ix, iy;
+
+               GLM_GET_FLOAT_WORD(hx, x);
+               GLM_GET_FLOAT_WORD(hy, y);
+               ix = hx&0x7fffffff;             // |x|
+               iy = hy&0x7fffffff;             // |y|
+
+               if((ix>0x7f800000) ||   // x is nan 
+                       (iy>0x7f800000))        // y is nan 
+                       return x+y;
+               if(x==y) return y;              // x=y, return y
+               if(ix==0) {                             // x == 0
+                       GLM_SET_FLOAT_WORD(x,(hy&0x80000000)|1);// return +-minsubnormal
+                       t = x*x;
+                       if(t==x) return t; else return x;       // raise underflow flag
+               }
+               if(hx>=0) {                             // x > 0 
+                       if(hx>hy) {                     // x > y, x -= ulp
+                               hx -= 1;
+                       } else {                        // x < y, x += ulp
+                               hx += 1;
+                       }
+               } else {                                // x < 0
+                       if(hy>=0||hx>hy){       // x < y, x -= ulp
+                               hx -= 1;
+                       } else {                        // x > y, x += ulp
+                               hx += 1;
+                       }
+               }
+               hy = hx&0x7f800000;
+               if(hy>=0x7f800000) return x+x;  // overflow
+               if(hy<0x00800000) {             // underflow
+                       t = x*x;
+                       if(t!=x) {          // raise underflow flag
+                               GLM_SET_FLOAT_WORD(y,hx);
+                               return y;
+                       }
+               }
+               GLM_SET_FLOAT_WORD(x,hx);
+               return x;
+       }
+
+       GLM_FUNC_QUALIFIER double nextafter(double x, double y)
+       {
+               volatile double t;
+               glm::detail::int32 hx, hy, ix, iy;
+               glm::detail::uint32 lx, ly;
+
+               GLM_EXTRACT_WORDS(hx, lx, x);
+               GLM_EXTRACT_WORDS(hy, ly, y);
+               ix = hx & 0x7fffffff;             // |x| 
+               iy = hy & 0x7fffffff;             // |y| 
+
+               if(((ix>=0x7ff00000)&&((ix-0x7ff00000)|lx)!=0) ||   // x is nan
+                       ((iy>=0x7ff00000)&&((iy-0x7ff00000)|ly)!=0))     // y is nan
+                       return x+y;
+               if(x==y) return y;              // x=y, return y
+               if((ix|lx)==0) {                        // x == 0 
+                       GLM_INSERT_WORDS(x, hy & 0x80000000, 1);    // return +-minsubnormal
+                       t = x*x;
+                       if(t==x) return t; else return x;   // raise underflow flag 
+               }
+               if(hx>=0) {                             // x > 0 
+                       if(hx>hy||((hx==hy)&&(lx>ly))) {    // x > y, x -= ulp 
+                               if(lx==0) hx -= 1;
+                               lx -= 1;
+                       } else {                            // x < y, x += ulp
+                               lx += 1;
+                               if(lx==0) hx += 1;
+                       }
+               } else {                                // x < 0 
+                       if(hy>=0||hx>hy||((hx==hy)&&(lx>ly))){// x < y, x -= ulp
+                               if(lx==0) hx -= 1;
+                               lx -= 1;
+                       } else {                            // x > y, x += ulp
+                               lx += 1;
+                               if(lx==0) hx += 1;
+                       }
+               }
+               hy = hx&0x7ff00000;
+               if(hy>=0x7ff00000) return x+x;  // overflow
+               if(hy<0x00100000) {             // underflow
+                       t = x*x;
+                       if(t!=x) {          // raise underflow flag
+                               GLM_INSERT_WORDS(y,hx,lx);
+                               return y;
+                       }
+               }
+               GLM_INSERT_WORDS(x,hx,lx);
+               return x;
+       }
+}//namespace detail
+}//namespace glm
+
+#if(GLM_COMPILER & GLM_COMPILER_VC)
+#      pragma warning(pop)
+#endif
+
+namespace glm
+{
+       template <>
+       GLM_FUNC_QUALIFIER float next_float(float const & x)
+       {
+#              if GLM_HAS_CXX11_STL
+                       return std::nextafter(x, std::numeric_limits<float>::max());
+#              elif((GLM_COMPILER & GLM_COMPILER_VC) || ((GLM_COMPILER & GLM_COMPILER_INTEL) && (GLM_PLATFORM & GLM_PLATFORM_WINDOWS)))
+                       return detail::nextafterf(x, FLT_MAX);
+#              elif(GLM_PLATFORM & GLM_PLATFORM_ANDROID)
+                       return __builtin_nextafterf(x, FLT_MAX);
+#              else
+                       return nextafterf(x, FLT_MAX);
+#              endif
+       }
+
+       template <>
+       GLM_FUNC_QUALIFIER double next_float(double const & x)
+       {
+#              if GLM_HAS_CXX11_STL
+                       return std::nextafter(x, std::numeric_limits<double>::max());
+#              elif((GLM_COMPILER & GLM_COMPILER_VC) || ((GLM_COMPILER & GLM_COMPILER_INTEL) && (GLM_PLATFORM & GLM_PLATFORM_WINDOWS)))
+                       return detail::nextafter(x, std::numeric_limits<double>::max());
+#              elif(GLM_PLATFORM & GLM_PLATFORM_ANDROID)
+                       return __builtin_nextafter(x, FLT_MAX);
+#              else
+                       return nextafter(x, DBL_MAX);
+#              endif
+       }
+
+       template<typename T, precision P, template<typename, precision> class vecType>
+       GLM_FUNC_QUALIFIER vecType<T, P> next_float(vecType<T, P> const & x)
+       {
+               vecType<T, P> Result(uninitialize);
+               for(detail::component_count_t i = 0; i < detail::component_count(Result); ++i)
+                       Result[i] = next_float(x[i]);
+               return Result;
+       }
+
+       GLM_FUNC_QUALIFIER float prev_float(float const & x)
+       {
+#              if GLM_HAS_CXX11_STL
+                       return std::nextafter(x, std::numeric_limits<float>::min());
+#              elif((GLM_COMPILER & GLM_COMPILER_VC) || ((GLM_COMPILER & GLM_COMPILER_INTEL) && (GLM_PLATFORM & GLM_PLATFORM_WINDOWS)))
+                       return detail::nextafterf(x, FLT_MIN);
+#              elif(GLM_PLATFORM & GLM_PLATFORM_ANDROID)
+                       return __builtin_nextafterf(x, FLT_MIN);
+#              else
+                       return nextafterf(x, FLT_MIN);
+#              endif
+       }
+
+       GLM_FUNC_QUALIFIER double prev_float(double const & x)
+       {
+#              if GLM_HAS_CXX11_STL
+                       return std::nextafter(x, std::numeric_limits<double>::min());
+#              elif((GLM_COMPILER & GLM_COMPILER_VC) || ((GLM_COMPILER & GLM_COMPILER_INTEL) && (GLM_PLATFORM & GLM_PLATFORM_WINDOWS)))
+                       return _nextafter(x, DBL_MIN);
+#              elif(GLM_PLATFORM & GLM_PLATFORM_ANDROID)
+                       return __builtin_nextafter(x, DBL_MIN);
+#              else
+                       return nextafter(x, DBL_MIN);
+#              endif
+       }
+
+       template<typename T, precision P, template<typename, precision> class vecType>
+       GLM_FUNC_QUALIFIER vecType<T, P> prev_float(vecType<T, P> const & x)
+       {
+               vecType<T, P> Result(uninitialize);
+               for(detail::component_count_t i = 0; i < detail::component_count(Result); ++i)
+                       Result[i] = prev_float(x[i]);
+               return Result;
+       }
+
+       template <typename T>
+       GLM_FUNC_QUALIFIER T next_float(T const & x, uint const & ulps)
+       {
+               T temp = x;
+               for(uint i = 0; i < ulps; ++i)
+                       temp = next_float(temp);
+               return temp;
+       }
+
+       template<typename T, precision P, template<typename, precision> class vecType>
+       GLM_FUNC_QUALIFIER vecType<T, P> next_float(vecType<T, P> const & x, vecType<uint, P> const & ulps)
+       {
+               vecType<T, P> Result(uninitialize);
+               for(detail::component_count_t i = 0; i < detail::component_count(Result); ++i)
+                       Result[i] = next_float(x[i], ulps[i]);
+               return Result;
+       }
+
+       template <typename T>
+       GLM_FUNC_QUALIFIER T prev_float(T const & x, uint const & ulps)
+       {
+               T temp = x;
+               for(uint i = 0; i < ulps; ++i)
+                       temp = prev_float(temp);
+               return temp;
+       }
+
+       template<typename T, precision P, template<typename, precision> class vecType>
+       GLM_FUNC_QUALIFIER vecType<T, P> prev_float(vecType<T, P> const & x, vecType<uint, P> const & ulps)
+       {
+               vecType<T, P> Result(uninitialize);
+               for(detail::component_count_t i = 0; i < detail::component_count(Result); ++i)
+                       Result[i] = prev_float(x[i], ulps[i]);
+               return Result;
+       }
+
+       template <typename T>
+       GLM_FUNC_QUALIFIER uint float_distance(T const & x, T const & y)
+       {
+               uint ulp = 0;
+
+               if(x < y)
+               {
+                       T temp = x;
+                       while(temp != y)// && ulp < std::numeric_limits<std::size_t>::max())
+                       {
+                               ++ulp;
+                               temp = next_float(temp);
+                       }
+               }
+               else if(y < x)
+               {
+                       T temp = y;
+                       while(temp != x)// && ulp < std::numeric_limits<std::size_t>::max())
+                       {
+                               ++ulp;
+                               temp = next_float(temp);
+                       }
+               }
+               else // ==
+               {
+
+               }
+
+               return ulp;
+       }
+
+       template<typename T, precision P, template<typename, precision> class vecType>
+       GLM_FUNC_QUALIFIER vecType<uint, P> float_distance(vecType<T, P> const & x, vecType<T, P> const & y)
+       {
+               vecType<uint, P> Result(uninitialize);
+               for(detail::component_count_t i = 0; i < detail::component_count(Result); ++i)
+                       Result[i] = float_distance(x[i], y[i]);
+               return Result;
+       }
+}//namespace glm
diff --git a/include/glm/gtc/vec1.hpp b/include/glm/gtc/vec1.hpp
new file mode 100644 (file)
index 0000000..fefcbb1
--- /dev/null
@@ -0,0 +1,193 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtc_vec1
+/// @file glm/gtc/vec1.hpp
+/// @date 2010-02-08 / 2011-06-07
+/// @author Christophe Riccio
+///
+/// @see core (dependence)
+///
+/// @defgroup gtc_vec1 GLM_GTC_vec1
+/// @ingroup gtc
+/// 
+/// @brief Add vec1, ivec1, uvec1 and bvec1 types.
+/// <glm/gtc/vec1.hpp> need to be included to use these functionalities.
+///////////////////////////////////////////////////////////////////////////////////
+
+#pragma once
+
+// Dependency:
+#include "../glm.hpp"
+#include "../detail/type_vec1.hpp"
+
+#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
+#      pragma message("GLM: GLM_GTC_vec1 extension included")
+#endif
+
+namespace glm
+{
+       /// 1 component vector of high precision floating-point numbers. 
+       /// There is no guarantee on the actual precision.
+       /// @see gtc_vec1 extension.
+       typedef highp_vec1_t                    highp_vec1;
+
+       /// 1 component vector of medium precision floating-point numbers. 
+       /// There is no guarantee on the actual precision.
+       /// @see gtc_vec1 extension.
+       typedef mediump_vec1_t                  mediump_vec1;
+
+       /// 1 component vector of low precision floating-point numbers. 
+       /// There is no guarantee on the actual precision.
+       /// @see gtc_vec1 extension.
+       typedef lowp_vec1_t                             lowp_vec1;
+
+       /// 1 component vector of high precision floating-point numbers. 
+       /// There is no guarantee on the actual precision.
+       /// @see gtc_vec1 extension.
+       typedef highp_dvec1_t                   highp_dvec1;
+
+       /// 1 component vector of medium precision floating-point numbers. 
+       /// There is no guarantee on the actual precision.
+       /// @see gtc_vec1 extension.
+       typedef mediump_dvec1_t                 mediump_dvec1;
+
+       /// 1 component vector of low precision floating-point numbers. 
+       /// There is no guarantee on the actual precision.
+       /// @see gtc_vec1 extension.
+       typedef lowp_dvec1_t                    lowp_dvec1;
+
+       /// 1 component vector of high precision signed integer numbers. 
+       /// There is no guarantee on the actual precision.
+       /// @see gtc_vec1 extension.
+       typedef highp_ivec1_t                   highp_ivec1;
+
+       /// 1 component vector of medium precision signed integer numbers. 
+       /// There is no guarantee on the actual precision.
+       /// @see gtc_vec1 extension.
+       typedef mediump_ivec1_t                 mediump_ivec1;
+
+       /// 1 component vector of low precision signed integer numbers. 
+       /// There is no guarantee on the actual precision.
+       /// @see gtc_vec1 extension.
+       typedef lowp_ivec1_t                    lowp_ivec1;
+
+       /// 1 component vector of high precision unsigned integer numbers. 
+       /// There is no guarantee on the actual precision.
+       /// @see gtc_vec1 extension.
+       typedef highp_uvec1_t                   highp_uvec1;
+
+       /// 1 component vector of medium precision unsigned integer numbers. 
+       /// There is no guarantee on the actual precision.
+       /// @see gtc_vec1 extension.
+       typedef mediump_uvec1_t                 mediump_uvec1;
+
+       /// 1 component vector of low precision unsigned integer numbers. 
+       /// There is no guarantee on the actual precision.
+       /// @see gtc_vec1 extension.
+       typedef lowp_uvec1_t                    lowp_uvec1;
+
+       /// 1 component vector of high precision boolean. 
+       /// There is no guarantee on the actual precision.
+       /// @see gtc_vec1 extension.
+       typedef highp_bvec1_t                   highp_bvec1;
+
+       /// 1 component vector of medium precision boolean.
+       /// There is no guarantee on the actual precision.
+       /// @see gtc_vec1 extension.
+       typedef mediump_bvec1_t                 mediump_bvec1;
+
+       /// 1 component vector of low precision boolean.
+       /// There is no guarantee on the actual precision.
+       /// @see gtc_vec1 extension.
+       typedef lowp_bvec1_t                    lowp_bvec1;
+
+       //////////////////////////
+       // vec1 definition
+
+#if(defined(GLM_PRECISION_HIGHP_BOOL))
+       typedef highp_bvec1                             bvec1;
+#elif(defined(GLM_PRECISION_MEDIUMP_BOOL))
+       typedef mediump_bvec1                   bvec1;
+#elif(defined(GLM_PRECISION_LOWP_BOOL))
+       typedef lowp_bvec1                              bvec1;
+#else
+       /// 1 component vector of boolean.
+       /// @see gtc_vec1 extension.
+       typedef highp_bvec1                             bvec1;
+#endif//GLM_PRECISION
+
+#if(defined(GLM_PRECISION_HIGHP_FLOAT))
+       typedef highp_vec1                              vec1;
+#elif(defined(GLM_PRECISION_MEDIUMP_FLOAT))
+       typedef mediump_vec1                    vec1;
+#elif(defined(GLM_PRECISION_LOWP_FLOAT))
+       typedef lowp_vec1                               vec1;
+#else
+       /// 1 component vector of floating-point numbers.
+       /// @see gtc_vec1 extension.
+       typedef highp_vec1                              vec1;
+#endif//GLM_PRECISION
+
+#if(defined(GLM_PRECISION_HIGHP_DOUBLE))
+       typedef highp_dvec1                             dvec1;
+#elif(defined(GLM_PRECISION_MEDIUMP_DOUBLE))
+       typedef mediump_dvec1                   dvec1;
+#elif(defined(GLM_PRECISION_LOWP_DOUBLE))
+       typedef lowp_dvec1                              dvec1;
+#else
+       /// 1 component vector of floating-point numbers.
+       /// @see gtc_vec1 extension.
+       typedef highp_dvec1                             dvec1;
+#endif//GLM_PRECISION
+
+#if(defined(GLM_PRECISION_HIGHP_INT))
+       typedef highp_ivec1                     ivec1;
+#elif(defined(GLM_PRECISION_MEDIUMP_INT))
+       typedef mediump_ivec1           ivec1;
+#elif(defined(GLM_PRECISION_LOWP_INT))
+       typedef lowp_ivec1                      ivec1;
+#else
+       /// 1 component vector of signed integer numbers. 
+       /// @see gtc_vec1 extension.
+       typedef highp_ivec1                     ivec1;
+#endif//GLM_PRECISION
+
+#if(defined(GLM_PRECISION_HIGHP_UINT))
+       typedef highp_uvec1                     uvec1;
+#elif(defined(GLM_PRECISION_MEDIUMP_UINT))
+       typedef mediump_uvec1           uvec1;
+#elif(defined(GLM_PRECISION_LOWP_UINT))
+       typedef lowp_uvec1                      uvec1;
+#else
+       /// 1 component vector of unsigned integer numbers. 
+       /// @see gtc_vec1 extension.
+       typedef highp_uvec1                     uvec1;
+#endif//GLM_PRECISION
+
+}// namespace glm
+
+#include "vec1.inl"
diff --git a/include/glm/gtc/vec1.inl b/include/glm/gtc/vec1.inl
new file mode 100644 (file)
index 0000000..4a7c88d
--- /dev/null
@@ -0,0 +1,31 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtc_vec1
+/// @file glm/gtc/vec1.inl
+/// @date 2013-03-16 / 2013-03-16
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////
diff --git a/include/glm/gtx/associated_min_max.hpp b/include/glm/gtx/associated_min_max.hpp
new file mode 100644 (file)
index 0000000..84c1322
--- /dev/null
@@ -0,0 +1,231 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtx_associated_min_max
+/// @file glm/gtx/associated_min_max.hpp
+/// @date 2008-03-10 / 2014-10-11
+/// @author Christophe Riccio
+///
+/// @see core (dependence)
+/// @see gtx_extented_min_max (dependence)
+///
+/// @defgroup gtx_associated_min_max GLM_GTX_associated_min_max
+/// @ingroup gtx
+/// 
+/// @brief Min and max functions that return associated values not the compared onces.
+/// <glm/gtx/associated_min_max.hpp> need to be included to use these functionalities.
+///////////////////////////////////////////////////////////////////////////////////
+
+#pragma once
+
+// Dependency:
+#include "../glm.hpp"
+
+#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
+#      pragma message("GLM: GLM_GTX_associated_min_max extension included")
+#endif
+
+namespace glm
+{
+       /// @addtogroup gtx_associated_min_max
+       /// @{
+
+       /// Minimum comparison between 2 variables and returns 2 associated variable values
+       /// @see gtx_associated_min_max
+       template<typename T, typename U, precision P>
+       GLM_FUNC_DECL U associatedMin(T x, U a, T y, U b);
+
+       /// Minimum comparison between 2 variables and returns 2 associated variable values
+       /// @see gtx_associated_min_max
+       template<typename T, typename U, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_DECL tvec2<U, P> associatedMin(
+               vecType<T, P> const & x, vecType<U, P> const & a,
+               vecType<T, P> const & y, vecType<U, P> const & b);
+
+       /// Minimum comparison between 2 variables and returns 2 associated variable values
+       /// @see gtx_associated_min_max
+       template<typename T, typename U, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_DECL vecType<U, P> associatedMin(
+               T x, const vecType<U, P>& a,
+               T y, const vecType<U, P>& b);
+
+       /// Minimum comparison between 2 variables and returns 2 associated variable values
+       /// @see gtx_associated_min_max
+       template<typename T, typename U, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_DECL vecType<U, P> associatedMin(
+               vecType<T, P> const & x, U a,
+               vecType<T, P> const & y, U b);
+
+       /// Minimum comparison between 3 variables and returns 3 associated variable values
+       /// @see gtx_associated_min_max
+       template<typename T, typename U>
+       GLM_FUNC_DECL U associatedMin(
+               T x, U a,
+               T y, U b,
+               T z, U c);
+
+       /// Minimum comparison between 3 variables and returns 3 associated variable values
+       /// @see gtx_associated_min_max
+       template<typename T, typename U, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_DECL vecType<U, P> associatedMin(
+               vecType<T, P> const & x, vecType<U, P> const & a,
+               vecType<T, P> const & y, vecType<U, P> const & b,
+               vecType<T, P> const & z, vecType<U, P> const & c);
+
+       /// Minimum comparison between 4 variables and returns 4 associated variable values
+       /// @see gtx_associated_min_max
+       template<typename T, typename U>
+       GLM_FUNC_DECL U associatedMin(
+               T x, U a,
+               T y, U b,
+               T z, U c,
+               T w, U d);
+
+       /// Minimum comparison between 4 variables and returns 4 associated variable values
+       /// @see gtx_associated_min_max
+       template<typename T, typename U, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_DECL vecType<U, P> associatedMin(
+               vecType<T, P> const & x, vecType<U, P> const & a,
+               vecType<T, P> const & y, vecType<U, P> const & b,
+               vecType<T, P> const & z, vecType<U, P> const & c,
+               vecType<T, P> const & w, vecType<U, P> const & d);
+
+       /// Minimum comparison between 4 variables and returns 4 associated variable values
+       /// @see gtx_associated_min_max
+       template<typename T, typename U, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_DECL vecType<U, P> associatedMin(
+               T x, vecType<U, P> const & a,
+               T y, vecType<U, P> const & b,
+               T z, vecType<U, P> const & c,
+               T w, vecType<U, P> const & d);
+
+       /// Minimum comparison between 4 variables and returns 4 associated variable values
+       /// @see gtx_associated_min_max
+       template<typename T, typename U, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_DECL vecType<U, P> associatedMin(
+               vecType<T, P> const & x, U a,
+               vecType<T, P> const & y, U b,
+               vecType<T, P> const & z, U c,
+               vecType<T, P> const & w, U d);
+
+       /// Maximum comparison between 2 variables and returns 2 associated variable values
+       /// @see gtx_associated_min_max
+       template<typename T, typename U>
+       GLM_FUNC_DECL U associatedMax(T x, U a, T y, U b);
+
+       /// Maximum comparison between 2 variables and returns 2 associated variable values
+       /// @see gtx_associated_min_max
+       template<typename T, typename U, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_DECL tvec2<U, P> associatedMax(
+               vecType<T, P> const & x, vecType<U, P> const & a,
+               vecType<T, P> const & y, vecType<U, P> const & b);
+
+       /// Maximum comparison between 2 variables and returns 2 associated variable values
+       /// @see gtx_associated_min_max
+       template<typename T, typename U, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_DECL vecType<T, P> associatedMax(
+               T x, vecType<U, P> const & a,
+               T y, vecType<U, P> const & b);
+
+       /// Maximum comparison between 2 variables and returns 2 associated variable values
+       /// @see gtx_associated_min_max
+       template<typename T, typename U, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_DECL vecType<U, P> associatedMax(
+               vecType<T, P> const & x, U a,
+               vecType<T, P> const & y, U b);
+
+       /// Maximum comparison between 3 variables and returns 3 associated variable values
+       /// @see gtx_associated_min_max
+       template<typename T, typename U>
+       GLM_FUNC_DECL U associatedMax(
+               T x, U a,
+               T y, U b,
+               T z, U c);
+
+       /// Maximum comparison between 3 variables and returns 3 associated variable values
+       /// @see gtx_associated_min_max
+       template<typename T, typename U, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_DECL vecType<U, P> associatedMax(
+               vecType<T, P> const & x, vecType<U, P> const & a,
+               vecType<T, P> const & y, vecType<U, P> const & b,
+               vecType<T, P> const & z, vecType<U, P> const & c);
+
+       /// Maximum comparison between 3 variables and returns 3 associated variable values
+       /// @see gtx_associated_min_max
+       template<typename T, typename U, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_DECL vecType<T, P> associatedMax(
+               T x, vecType<U, P> const & a,
+               T y, vecType<U, P> const & b,
+               T z, vecType<U, P> const & c);
+
+       /// Maximum comparison between 3 variables and returns 3 associated variable values
+       /// @see gtx_associated_min_max
+       template<typename T, typename U, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_DECL vecType<U, P> associatedMax(
+               vecType<T, P> const & x, U a,
+               vecType<T, P> const & y, U b,
+               vecType<T, P> const & z, U c);
+
+       /// Maximum comparison between 4 variables and returns 4 associated variable values
+       /// @see gtx_associated_min_max
+       template<typename T, typename U>
+       GLM_FUNC_DECL U associatedMax(
+               T x, U a,
+               T y, U b,
+               T z, U c,
+               T w, U d);
+
+       /// Maximum comparison between 4 variables and returns 4 associated variable values
+       /// @see gtx_associated_min_max
+       template<typename T, typename U, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_DECL vecType<U, P> associatedMax(
+               vecType<T, P> const & x, vecType<U, P> const & a,
+               vecType<T, P> const & y, vecType<U, P> const & b,
+               vecType<T, P> const & z, vecType<U, P> const & c,
+               vecType<T, P> const & w, vecType<U, P> const & d);
+
+       /// Maximum comparison between 4 variables and returns 4 associated variable values
+       /// @see gtx_associated_min_max
+       template<typename T, typename U, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_DECL vecType<U, P> associatedMax(
+               T x, vecType<U, P> const & a,
+               T y, vecType<U, P> const & b,
+               T z, vecType<U, P> const & c,
+               T w, vecType<U, P> const & d);
+
+       /// Maximum comparison between 4 variables and returns 4 associated variable values
+       /// @see gtx_associated_min_max
+       template<typename T, typename U, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_DECL vecType<U, P> associatedMax(
+               vecType<T, P> const & x, U a,
+               vecType<T, P> const & y, U b,
+               vecType<T, P> const & z, U c,
+               vecType<T, P> const & w, U d);
+
+       /// @}
+} //namespace glm
+
+#include "associated_min_max.inl"
diff --git a/include/glm/gtx/associated_min_max.inl b/include/glm/gtx/associated_min_max.inl
new file mode 100644 (file)
index 0000000..41f08b4
--- /dev/null
@@ -0,0 +1,384 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtx_associated_min_max
+/// @file glm/gtx/associated_min_max.inl
+/// @date 2008-03-10 / 2014-10-11
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+namespace glm{
+
+// Min comparison between 2 variables
+template<typename T, typename U, precision P>
+GLM_FUNC_QUALIFIER U associatedMin(T x, U a, T y, U b)
+{
+       return x < y ? a : b;
+}
+
+template<typename T, typename U, precision P, template <typename, precision> class vecType>
+GLM_FUNC_QUALIFIER tvec2<U, P> associatedMin
+(
+       vecType<T, P> const & x, vecType<U, P> const & a,
+       vecType<T, P> const & y, vecType<U, P> const & b
+)
+{
+       vecType<U, P> Result(uninitialize);
+       for(detail::component_count_t i = 0; i < detail::component_count(Result); ++i)
+               Result[i] = x[i] < y[i] ? a[i] : b[i];
+       return Result;
+}
+
+template<typename T, typename U, precision P, template <typename, precision> class vecType>
+GLM_FUNC_QUALIFIER vecType<U, P> associatedMin
+(
+       T x, const vecType<U, P>& a,
+       T y, const vecType<U, P>& b
+)
+{
+       vecType<U, P> Result(uninitialize);
+       for(detail::component_count_t i = 0; i < detail::component_count(Result); ++i)
+               Result[i] = x < y ? a[i] : b[i];
+       return Result;
+}
+
+template<typename T, typename U, precision P, template <typename, precision> class vecType>
+GLM_FUNC_QUALIFIER vecType<U, P> associatedMin
+(
+       vecType<T, P> const & x, U a,
+       vecType<T, P> const & y, U b
+)
+{
+       vecType<U, P> Result(uninitialize);
+       for(detail::component_count_t i = 0; i < detail::component_count(Result); ++i)
+               Result[i] = x[i] < y[i] ? a : b;
+       return Result;
+}
+
+// Min comparison between 3 variables
+template<typename T, typename U>
+GLM_FUNC_QUALIFIER U associatedMin
+(
+       T x, U a,
+       T y, U b,
+       T z, U c
+)
+{
+       U Result = x < y ? (x < z ? a : c) : (y < z ? b : c);
+       return Result;
+}
+
+template<typename T, typename U, precision P, template <typename, precision> class vecType>
+GLM_FUNC_QUALIFIER vecType<U, P> associatedMin
+(
+       vecType<T, P> const & x, vecType<U, P> const & a,
+       vecType<T, P> const & y, vecType<U, P> const & b,
+       vecType<T, P> const & z, vecType<U, P> const & c
+)
+{
+       vecType<U, P> Result(uninitialize);
+       for(detail::component_count_t i = 0; i < detail::component_count(Result); ++i)
+               Result[i] = x[i] < y[i] ? (x[i] < z[i] ? a[i] : c[i]) : (y[i] < z[i] ? b[i] : c[i]);
+       return Result;
+}
+
+// Min comparison between 4 variables
+template<typename T, typename U>
+GLM_FUNC_QUALIFIER U associatedMin
+(
+       T x, U a,
+       T y, U b,
+       T z, U c,
+       T w, U d
+)
+{
+       T Test1 = min(x, y);
+       T Test2 = min(z, w);;
+       U Result1 = x < y ? a : b;
+       U Result2 = z < w ? c : d;
+       U Result = Test1 < Test2 ? Result1 : Result2;
+       return Result;
+}
+
+// Min comparison between 4 variables
+template<typename T, typename U, precision P, template <typename, precision> class vecType>
+GLM_FUNC_QUALIFIER vecType<U, P> associatedMin
+(
+       vecType<T, P> const & x, vecType<U, P> const & a,
+       vecType<T, P> const & y, vecType<U, P> const & b,
+       vecType<T, P> const & z, vecType<U, P> const & c,
+       vecType<T, P> const & w, vecType<U, P> const & d
+)
+{
+       vecType<U, P> Result(uninitialize);
+       for(detail::component_count_t i = 0; i < detail::component_count(Result); ++i)
+       {
+               T Test1 = min(x[i], y[i]);
+               T Test2 = min(z[i], w[i]);
+               U Result1 = x[i] < y[i] ? a[i] : b[i];
+               U Result2 = z[i] < w[i] ? c[i] : d[i];
+               Result[i] = Test1 < Test2 ? Result1 : Result2;
+       }
+       return Result;
+}
+
+// Min comparison between 4 variables
+template<typename T, typename U, precision P, template <typename, precision> class vecType>
+GLM_FUNC_QUALIFIER vecType<U, P> associatedMin
+(
+       T x, vecType<U, P> const & a,
+       T y, vecType<U, P> const & b,
+       T z, vecType<U, P> const & c,
+       T w, vecType<U, P> const & d
+)
+{
+       T Test1 = min(x, y);
+       T Test2 = min(z, w);
+
+       vecType<U, P> Result(uninitialize);
+       for(detail::component_count_t i = 0; i < detail::component_count(Result); ++i)
+       {
+               U Result1 = x < y ? a[i] : b[i];
+               U Result2 = z < w ? c[i] : d[i];
+               Result[i] = Test1 < Test2 ? Result1 : Result2;
+       }
+       return Result;
+}
+
+// Min comparison between 4 variables
+template<typename T, typename U, precision P, template <typename, precision> class vecType>
+GLM_FUNC_QUALIFIER vecType<U, P> associatedMin
+(
+       vecType<T, P> const & x, U a,
+       vecType<T, P> const & y, U b,
+       vecType<T, P> const & z, U c,
+       vecType<T, P> const & w, U d
+)
+{
+       vecType<U, P> Result(uninitialize);
+       for(detail::component_count_t i = 0; i < detail::component_count(Result); ++i)
+       {
+               T Test1 = min(x[i], y[i]);
+               T Test2 = min(z[i], w[i]);;
+               U Result1 = x[i] < y[i] ? a : b;
+               U Result2 = z[i] < w[i] ? c : d;
+               Result[i] = Test1 < Test2 ? Result1 : Result2;
+       }
+       return Result;
+}
+
+// Max comparison between 2 variables
+template<typename T, typename U>
+GLM_FUNC_QUALIFIER U associatedMax(T x, U a, T y, U b)
+{
+       return x > y ? a : b;
+}
+
+// Max comparison between 2 variables
+template<typename T, typename U, precision P, template <typename, precision> class vecType>
+GLM_FUNC_QUALIFIER tvec2<U, P> associatedMax
+(
+       vecType<T, P> const & x, vecType<U, P> const & a,
+       vecType<T, P> const & y, vecType<U, P> const & b
+)
+{
+       vecType<U, P> Result(uninitialize);
+       for(detail::component_count_t i = 0; i < detail::component_count(Result); ++i)
+               Result[i] = x[i] > y[i] ? a[i] : b[i];
+       return Result;
+}
+
+// Max comparison between 2 variables
+template<typename T, typename U, precision P, template <typename, precision> class vecType>
+GLM_FUNC_QUALIFIER vecType<T, P> associatedMax
+(
+       T x, vecType<U, P> const & a,
+       T y, vecType<U, P> const & b
+)
+{
+       vecType<U, P> Result(uninitialize);
+       for(detail::component_count_t i = 0; i < detail::component_count(Result); ++i)
+               Result[i] = x > y ? a[i] : b[i];
+       return Result;
+}
+
+// Max comparison between 2 variables
+template<typename T, typename U, precision P, template <typename, precision> class vecType>
+GLM_FUNC_QUALIFIER vecType<U, P> associatedMax
+(
+       vecType<T, P> const & x, U a,
+       vecType<T, P> const & y, U b
+)
+{
+       vecType<T, P> Result(uninitialize);
+       for(detail::component_count_t i = 0; i < detail::component_count(Result); ++i)
+               Result[i] = x[i] > y[i] ? a : b;
+       return Result;
+}
+
+// Max comparison between 3 variables
+template<typename T, typename U>
+GLM_FUNC_QUALIFIER U associatedMax
+(
+       T x, U a,
+       T y, U b,
+       T z, U c
+)
+{
+       U Result = x > y ? (x > z ? a : c) : (y > z ? b : c);
+       return Result;
+}
+
+// Max comparison between 3 variables
+template<typename T, typename U, precision P, template <typename, precision> class vecType>
+GLM_FUNC_QUALIFIER vecType<U, P> associatedMax
+(
+       vecType<T, P> const & x, vecType<U, P> const & a,
+       vecType<T, P> const & y, vecType<U, P> const & b,
+       vecType<T, P> const & z, vecType<U, P> const & c
+)
+{
+       vecType<U, P> Result(uninitialize);
+       for(detail::component_count_t i = 0; i < detail::component_count(Result); ++i)
+               Result[i] = x[i] > y[i] ? (x[i] > z[i] ? a[i] : c[i]) : (y[i] > z[i] ? b[i] : c[i]);
+       return Result;
+}
+
+// Max comparison between 3 variables
+template<typename T, typename U, precision P, template <typename, precision> class vecType>
+GLM_FUNC_QUALIFIER vecType<T, P> associatedMax
+(
+       T x, vecType<U, P> const & a,
+       T y, vecType<U, P> const & b,
+       T z, vecType<U, P> const & c
+)
+{
+       vecType<U, P> Result(uninitialize);
+       for(detail::component_count_t i = 0; i < detail::component_count(Result); ++i)
+               Result[i] = x > y ? (x > z ? a[i] : c[i]) : (y > z ? b[i] : c[i]);
+       return Result;
+}
+
+// Max comparison between 3 variables
+template<typename T, typename U, precision P, template <typename, precision> class vecType>
+GLM_FUNC_QUALIFIER vecType<U, P> associatedMax
+(
+       vecType<T, P> const & x, U a,
+       vecType<T, P> const & y, U b,
+       vecType<T, P> const & z, U c
+)
+{
+       vecType<T, P> Result(uninitialize);
+       for(detail::component_count_t i = 0; i < detail::component_count(Result); ++i)
+               Result[i] = x[i] > y[i] ? (x[i] > z[i] ? a : c) : (y[i] > z[i] ? b : c);
+       return Result;
+}
+
+// Max comparison between 4 variables
+template<typename T, typename U>
+GLM_FUNC_QUALIFIER U associatedMax
+(
+       T x, U a,
+       T y, U b,
+       T z, U c,
+       T w, U d
+)
+{
+       T Test1 = max(x, y);
+       T Test2 = max(z, w);;
+       U Result1 = x > y ? a : b;
+       U Result2 = z > w ? c : d;
+       U Result = Test1 > Test2 ? Result1 : Result2;
+       return Result;
+}
+
+// Max comparison between 4 variables
+template<typename T, typename U, precision P, template <typename, precision> class vecType>
+GLM_FUNC_QUALIFIER vecType<U, P> associatedMax
+(
+       vecType<T, P> const & x, vecType<U, P> const & a,
+       vecType<T, P> const & y, vecType<U, P> const & b,
+       vecType<T, P> const & z, vecType<U, P> const & c,
+       vecType<T, P> const & w, vecType<U, P> const & d
+)
+{
+       vecType<U, P> Result(uninitialize);
+       for(detail::component_count_t i = 0; i < detail::component_count(Result); ++i)
+       {
+               T Test1 = max(x[i], y[i]);
+               T Test2 = max(z[i], w[i]);
+               U Result1 = x[i] > y[i] ? a[i] : b[i];
+               U Result2 = z[i] > w[i] ? c[i] : d[i];
+               Result[i] = Test1 > Test2 ? Result1 : Result2;
+       }
+       return Result;
+}
+
+// Max comparison between 4 variables
+template<typename T, typename U, precision P, template <typename, precision> class vecType>
+GLM_FUNC_QUALIFIER vecType<U, P> associatedMax
+(
+       T x, vecType<U, P> const & a,
+       T y, vecType<U, P> const & b,
+       T z, vecType<U, P> const & c,
+       T w, vecType<U, P> const & d
+)
+{
+       T Test1 = max(x, y);
+       T Test2 = max(z, w);
+
+       vecType<U, P> Result(uninitialize);
+       for(detail::component_count_t i = 0; i < detail::component_count(Result); ++i)
+       {
+               U Result1 = x > y ? a[i] : b[i];
+               U Result2 = z > w ? c[i] : d[i];
+               Result[i] = Test1 > Test2 ? Result1 : Result2;
+       }
+       return Result;
+}
+
+// Max comparison between 4 variables
+template<typename T, typename U, precision P, template <typename, precision> class vecType>
+GLM_FUNC_QUALIFIER vecType<U, P> associatedMax
+(
+       vecType<T, P> const & x, U a,
+       vecType<T, P> const & y, U b,
+       vecType<T, P> const & z, U c,
+       vecType<T, P> const & w, U d
+)
+{
+       vecType<U, P> Result(uninitialize);
+       for(detail::component_count_t i = 0; i < detail::component_count(Result); ++i)
+       {
+               T Test1 = max(x[i], y[i]);
+               T Test2 = max(z[i], w[i]);;
+               U Result1 = x[i] > y[i] ? a : b;
+               U Result2 = z[i] > w[i] ? c : d;
+               Result[i] = Test1 > Test2 ? Result1 : Result2;
+       }
+       return Result;
+}
+}//namespace glm
diff --git a/include/glm/gtx/bit.hpp b/include/glm/gtx/bit.hpp
new file mode 100644 (file)
index 0000000..126fc22
--- /dev/null
@@ -0,0 +1,120 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtx_bit
+/// @file glm/gtx/bit.hpp
+/// @date 2007-03-14 / 2011-06-07
+/// @author Christophe Riccio
+///
+/// @see core (dependence)
+/// @see gtc_half_float (dependence)
+///
+/// @defgroup gtx_bit GLM_GTX_bit
+/// @ingroup gtx
+/// 
+/// @brief Allow to perform bit operations on integer values
+/// 
+/// <glm/gtx/bit.hpp> need to be included to use these functionalities.
+///////////////////////////////////////////////////////////////////////////////////
+
+#pragma once
+
+// Dependencies
+#include "../gtc/bitfield.hpp"
+
+#if(defined(GLM_MESSAGES))
+#      pragma message("GLM: GLM_GTX_bit extension is deprecated, include GLM_GTC_bitfield and GLM_GTC_integer instead")
+#endif
+
+namespace glm
+{
+       /// @addtogroup gtx_bit
+       /// @{
+
+       /// @see gtx_bit
+       template <typename genIUType>
+       GLM_FUNC_DECL genIUType highestBitValue(genIUType Value);
+
+       /// Find the highest bit set to 1 in a integer variable and return its value.
+       ///
+       /// @see gtx_bit
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_DECL vecType<T, P> highestBitValue(vecType<T, P> const & value);
+
+       /// Return the power of two number which value is just higher the input value.
+       /// Deprecated, use ceilPowerOfTwo from GTC_round instead
+       ///
+       /// @see gtc_round
+       /// @see gtx_bit
+       template <typename genIUType>
+       GLM_DEPRECATED GLM_FUNC_DECL genIUType powerOfTwoAbove(genIUType Value);
+
+       /// Return the power of two number which value is just higher the input value.
+       /// Deprecated, use ceilPowerOfTwo from GTC_round instead
+       ///
+       /// @see gtc_round
+       /// @see gtx_bit
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_DEPRECATED GLM_FUNC_DECL vecType<T, P> powerOfTwoAbove(vecType<T, P> const & value);
+
+       /// Return the power of two number which value is just lower the input value.
+       /// Deprecated, use floorPowerOfTwo from GTC_round instead
+       ///
+       /// @see gtc_round
+       /// @see gtx_bit
+       template <typename genIUType>
+       GLM_DEPRECATED GLM_FUNC_DECL genIUType powerOfTwoBelow(genIUType Value);
+
+       /// Return the power of two number which value is just lower the input value.
+       /// Deprecated, use floorPowerOfTwo from GTC_round instead
+       ///
+       /// @see gtc_round
+       /// @see gtx_bit
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_DEPRECATED GLM_FUNC_DECL vecType<T, P> powerOfTwoBelow(vecType<T, P> const & value);
+
+       /// Return the power of two number which value is the closet to the input value.
+       /// Deprecated, use roundPowerOfTwo from GTC_round instead
+       ///
+       /// @see gtc_round
+       /// @see gtx_bit
+       template <typename genIUType>
+       GLM_DEPRECATED GLM_FUNC_DECL genIUType powerOfTwoNearest(genIUType Value);
+
+       /// Return the power of two number which value is the closet to the input value.
+       /// Deprecated, use roundPowerOfTwo from GTC_round instead
+       ///
+       /// @see gtc_round
+       /// @see gtx_bit
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_DEPRECATED GLM_FUNC_DECL vecType<T, P> powerOfTwoNearest(vecType<T, P> const & value);
+
+       /// @}
+} //namespace glm
+
+
+#include "bit.inl"
+
diff --git a/include/glm/gtx/bit.inl b/include/glm/gtx/bit.inl
new file mode 100644 (file)
index 0000000..5178a12
--- /dev/null
@@ -0,0 +1,107 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtx_bit
+/// @file glm/gtx/bit.inl
+/// @date 2014-11-25 / 2014-11-25
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////
+
+namespace glm
+{
+       ///////////////////
+       // highestBitValue
+
+       template <typename genIUType>
+       GLM_FUNC_QUALIFIER genIUType highestBitValue(genIUType Value)
+       {
+               genIUType tmp = Value;
+               genIUType result = genIUType(0);
+               while(tmp)
+               {
+                       result = (tmp & (~tmp + 1)); // grab lowest bit
+                       tmp &= ~result; // clear lowest bit
+               }
+               return result;
+       }
+
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_QUALIFIER vecType<T, P> highestBitValue(vecType<T, P> const & v)
+       {
+               return detail::functor1<T, T, P, vecType>::call(highestBitValue, v);
+       }
+
+       ///////////////////
+       // powerOfTwoAbove
+
+       template <typename genType>
+       GLM_FUNC_QUALIFIER genType powerOfTwoAbove(genType value)
+       {
+               return isPowerOfTwo(value) ? value : highestBitValue(value) << 1;
+       }
+
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_QUALIFIER vecType<T, P> powerOfTwoAbove(vecType<T, P> const & v)
+       {
+               return detail::functor1<T, T, P, vecType>::call(powerOfTwoAbove, v);
+       }
+
+       ///////////////////
+       // powerOfTwoBelow
+
+       template <typename genType>
+       GLM_FUNC_QUALIFIER genType powerOfTwoBelow(genType value)
+       {
+               return isPowerOfTwo(value) ? value : highestBitValue(value);
+       }
+
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_QUALIFIER vecType<T, P> powerOfTwoBelow(vecType<T, P> const & v)
+       {
+               return detail::functor1<T, T, P, vecType>::call(powerOfTwoBelow, v);
+       }
+
+       /////////////////////
+       // powerOfTwoNearest
+
+       template <typename genType>
+       GLM_FUNC_QUALIFIER genType powerOfTwoNearest(genType value)
+       {
+               if(isPowerOfTwo(value))
+                       return value;
+
+               genType const prev = highestBitValue(value);
+               genType const next = prev << 1;
+               return (next - value) < (value - prev) ? next : prev;
+       }
+
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_QUALIFIER vecType<T, P> powerOfTwoNearest(vecType<T, P> const & v)
+       {
+               return detail::functor1<T, T, P, vecType>::call(powerOfTwoNearest, v);
+       }
+
+}//namespace glm
diff --git a/include/glm/gtx/closest_point.hpp b/include/glm/gtx/closest_point.hpp
new file mode 100644 (file)
index 0000000..0e5a187
--- /dev/null
@@ -0,0 +1,74 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtx_closest_point
+/// @file glm/gtx/closest_point.hpp
+/// @date 2005-12-30 / 2011-06-07
+/// @author Christophe Riccio
+///
+/// @see core (dependence)
+///
+/// @defgroup gtx_closest_point GLM_GTX_closest_point
+/// @ingroup gtx
+///
+/// @brief Find the point on a straight line which is the closet of a point.
+/// 
+/// <glm/gtx/closest_point.hpp> need to be included to use these functionalities.
+///////////////////////////////////////////////////////////////////////////////////
+
+#pragma once
+
+// Dependency:
+#include "../glm.hpp"
+
+#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
+#      pragma message("GLM: GLM_GTX_closest_point extension included")
+#endif
+
+namespace glm
+{
+       /// @addtogroup gtx_closest_point
+       /// @{
+
+       /// Find the point on a straight line which is the closet of a point. 
+       /// @see gtx_closest_point
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec3<T, P> closestPointOnLine(
+               tvec3<T, P> const & point,
+               tvec3<T, P> const & a, 
+               tvec3<T, P> const & b);
+       
+       /// 2d lines work as well       
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec2<T, P> closestPointOnLine(
+               tvec2<T, P> const & point,
+               tvec2<T, P> const & a, 
+               tvec2<T, P> const & b); 
+
+       /// @}
+}// namespace glm
+
+#include "closest_point.inl"
diff --git a/include/glm/gtx/closest_point.inl b/include/glm/gtx/closest_point.inl
new file mode 100644 (file)
index 0000000..89bb1a8
--- /dev/null
@@ -0,0 +1,75 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtx_closest_point
+/// @file glm/gtx/closest_point.inl
+/// @date 2005-12-30 / 2011-06-07
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+namespace glm
+{
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec3<T, P> closestPointOnLine
+       (
+               tvec3<T, P> const & point,
+               tvec3<T, P> const & a,
+               tvec3<T, P> const & b
+       )
+       {
+               T LineLength = distance(a, b);
+               tvec3<T, P> Vector = point - a;
+               tvec3<T, P> LineDirection = (b - a) / LineLength;
+
+               // Project Vector to LineDirection to get the distance of point from a
+               T Distance = dot(Vector, LineDirection);
+
+               if(Distance <= T(0)) return a;
+               if(Distance >= LineLength) return b;
+               return a + LineDirection * Distance;
+       }
+       
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec2<T, P> closestPointOnLine
+       (
+               tvec2<T, P> const & point,
+               tvec2<T, P> const & a,
+               tvec2<T, P> const & b
+       )
+       {
+               T LineLength = distance(a, b);
+               tvec2<T, P> Vector = point - a;
+               tvec2<T, P> LineDirection = (b - a) / LineLength;
+
+               // Project Vector to LineDirection to get the distance of point from a
+               T Distance = dot(Vector, LineDirection);
+
+               if(Distance <= T(0)) return a;
+               if(Distance >= LineLength) return b;
+               return a + LineDirection * Distance;
+       }
+       
+}//namespace glm
diff --git a/include/glm/gtx/color_space.hpp b/include/glm/gtx/color_space.hpp
new file mode 100644 (file)
index 0000000..16b9d89
--- /dev/null
@@ -0,0 +1,97 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtx_color_space
+/// @file glm/gtx/color_space.hpp
+/// @date 2005-12-21 / 2011-06-07
+/// @author Christophe Riccio
+///
+/// @see core (dependence)
+///
+/// @defgroup gtx_color_space GLM_GTX_color_space
+/// @ingroup gtx
+/// 
+/// @brief Related to RGB to HSV conversions and operations.
+/// 
+/// <glm/gtx/color_space.hpp> need to be included to use these functionalities.
+///////////////////////////////////////////////////////////////////////////////////
+
+#pragma once
+
+// Dependency:
+#include "../glm.hpp"
+
+#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
+#      pragma message("GLM: GLM_GTX_color_space extension included")
+#endif
+
+namespace glm
+{
+       /// @addtogroup gtx_color_space
+       /// @{
+
+       /// Converts a color from HSV color space to its color in RGB color space.
+       /// @see gtx_color_space
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec3<T, P> rgbColor(
+               tvec3<T, P> const & hsvValue);
+
+       /// Converts a color from RGB color space to its color in HSV color space.
+       /// @see gtx_color_space
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec3<T, P> hsvColor(
+               tvec3<T, P> const & rgbValue);
+               
+       /// Build a saturation matrix.
+       /// @see gtx_color_space
+       template <typename T>
+       GLM_FUNC_DECL tmat4x4<T, defaultp> saturation(
+               T const s);
+
+       /// Modify the saturation of a color.
+       /// @see gtx_color_space
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec3<T, P> saturation(
+               T const s,
+               tvec3<T, P> const & color);
+               
+       /// Modify the saturation of a color.
+       /// @see gtx_color_space
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec4<T, P> saturation(
+               T const s,
+               tvec4<T, P> const & color);
+               
+       /// Compute color luminosity associating ratios (0.33, 0.59, 0.11) to RGB canals.
+       /// @see gtx_color_space
+       template <typename T, precision P>
+       GLM_FUNC_DECL T luminosity(
+               tvec3<T, P> const & color);
+
+       /// @}
+}//namespace glm
+
+#include "color_space.inl"
diff --git a/include/glm/gtx/color_space.inl b/include/glm/gtx/color_space.inl
new file mode 100644 (file)
index 0000000..76333b7
--- /dev/null
@@ -0,0 +1,172 @@
+/////////////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtx_color_space
+/// @file glm/gtx/color_space.inl
+/// @date 2005-12-21 / 2011-06-07
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+namespace glm
+{
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec3<T, P> rgbColor(const tvec3<T, P>& hsvColor)
+       {
+               tvec3<T, P> hsv = hsvColor;
+               tvec3<T, P> rgbColor;
+
+               if(hsv.y == static_cast<T>(0))
+                       // achromatic (grey)
+                       rgbColor = tvec3<T, P>(hsv.z);
+               else
+               {
+                       T sector = floor(hsv.x / T(60));
+                       T frac = (hsv.x / T(60)) - sector;
+                       // factorial part of h
+                       T o = hsv.z * (T(1) - hsv.y);
+                       T p = hsv.z * (T(1) - hsv.y * frac);
+                       T q = hsv.z * (T(1) - hsv.y * (T(1) - frac));
+
+                       switch(int(sector))
+                       {
+                       default:
+                       case 0:
+                               rgbColor.r = hsv.z;
+                               rgbColor.g = q;
+                               rgbColor.b = o;
+                               break;
+                       case 1:
+                               rgbColor.r = p;
+                               rgbColor.g = hsv.z;
+                               rgbColor.b = o;
+                               break;
+                       case 2:
+                               rgbColor.r = o;
+                               rgbColor.g = hsv.z;
+                               rgbColor.b = q;
+                               break;
+                       case 3:
+                               rgbColor.r = o;
+                               rgbColor.g = p;
+                               rgbColor.b = hsv.z;
+                               break;
+                       case 4:
+                               rgbColor.r = q; 
+                               rgbColor.g = o; 
+                               rgbColor.b = hsv.z;
+                               break;
+                       case 5:
+                               rgbColor.r = hsv.z; 
+                               rgbColor.g = o; 
+                               rgbColor.b = p;
+                               break;
+                       }
+               }
+
+               return rgbColor;
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec3<T, P> hsvColor(const tvec3<T, P>& rgbColor)
+       {
+               tvec3<T, P> hsv = rgbColor;
+               float Min   = min(min(rgbColor.r, rgbColor.g), rgbColor.b);
+               float Max   = max(max(rgbColor.r, rgbColor.g), rgbColor.b);
+               float Delta = Max - Min;
+
+               hsv.z = Max;                               
+
+               if(Max != static_cast<T>(0))
+               {
+                       hsv.y = Delta / hsv.z;    
+                       T h = static_cast<T>(0);
+
+                       if(rgbColor.r == Max)
+                               // between yellow & magenta
+                               h = static_cast<T>(0) + T(60) * (rgbColor.g - rgbColor.b) / Delta;
+                       else if(rgbColor.g == Max)
+                               // between cyan & yellow
+                               h = static_cast<T>(120) + T(60) * (rgbColor.b - rgbColor.r) / Delta;
+                       else
+                               // between magenta & cyan
+                               h = static_cast<T>(240) + T(60) * (rgbColor.r - rgbColor.g) / Delta;
+
+                       if(h < T(0)) 
+                               hsv.x = h + T(360);
+                       else
+                               hsv.x = h;
+               }
+               else
+               {
+                       // If r = g = b = 0 then s = 0, h is undefined
+                       hsv.y = static_cast<T>(0);
+                       hsv.x = static_cast<T>(0);
+               }
+
+               return hsv;
+       }
+
+       template <typename T>
+       GLM_FUNC_QUALIFIER tmat4x4<T, defaultp> saturation(T const s)
+       {
+               tvec3<T, defaultp> rgbw = tvec3<T, defaultp>(T(0.2126), T(0.7152), T(0.0722));
+
+               T col0 = (T(1) - s) * rgbw.r;
+               T col1 = (T(1) - s) * rgbw.g;
+               T col2 = (T(1) - s) * rgbw.b;
+
+               tmat4x4<T, defaultp> result(T(1));
+               result[0][0] = col0 + s;
+               result[0][1] = col0;
+               result[0][2] = col0;
+               result[1][0] = col1;
+               result[1][1] = col1 + s;
+               result[1][2] = col1;
+               result[2][0] = col2;
+               result[2][1] = col2;
+               result[2][2] = col2 + s;
+               return result;
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec3<T, P> saturation(const T s, const tvec3<T, P>& color)
+       {
+               return tvec3<T, P>(saturation(s) * tvec4<T, P>(color, T(0)));
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec4<T, P> saturation(const T s, const tvec4<T, P>& color)
+       {
+               return saturation(s) * color;
+       }
+
+       template <typename T, precision P> 
+       GLM_FUNC_QUALIFIER T luminosity(const tvec3<T, P>& color)
+       {
+               const tvec3<T, P> tmp = tvec3<T, P>(0.33, 0.59, 0.11);
+               return dot(color, tmp);
+       }
+}//namespace glm
diff --git a/include/glm/gtx/color_space_YCoCg.hpp b/include/glm/gtx/color_space_YCoCg.hpp
new file mode 100644 (file)
index 0000000..4fbbf82
--- /dev/null
@@ -0,0 +1,85 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtx_color_space_YCoCg
+/// @file glm/gtx/color_space_YCoCg.hpp
+/// @date 2008-10-28 / 2011-06-07
+/// @author Christophe Riccio
+///
+/// @see core (dependence)
+///
+/// @defgroup gtx_color_space_YCoCg GLM_GTX_color_space_YCoCg
+/// @ingroup gtx
+///
+/// @brief RGB to YCoCg conversions and operations
+/// 
+/// <glm/gtx/color_space_YCoCg.hpp> need to be included to use these functionalities.
+///////////////////////////////////////////////////////////////////////////////////
+
+#pragma once
+
+// Dependency:
+#include "../glm.hpp"
+
+#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
+#      pragma message("GLM: GLM_GTX_color_space_YCoCg extension included")
+#endif
+
+namespace glm
+{
+       /// @addtogroup gtx_color_space_YCoCg
+       /// @{
+
+       /// Convert a color from RGB color space to YCoCg color space.
+       /// @see gtx_color_space_YCoCg
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec3<T, P> rgb2YCoCg(
+               tvec3<T, P> const & rgbColor);
+
+       /// Convert a color from YCoCg color space to RGB color space.
+       /// @see gtx_color_space_YCoCg
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec3<T, P> YCoCg2rgb(
+               tvec3<T, P> const & YCoCgColor);
+
+       /// Convert a color from RGB color space to YCoCgR color space.
+       /// @see "YCoCg-R: A Color Space with RGB Reversibility and Low Dynamic Range"
+       /// @see gtx_color_space_YCoCg
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec3<T, P> rgb2YCoCgR(
+               tvec3<T, P> const & rgbColor);
+
+       /// Convert a color from YCoCgR color space to RGB color space.
+       /// @see "YCoCg-R: A Color Space with RGB Reversibility and Low Dynamic Range"
+       /// @see gtx_color_space_YCoCg
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec3<T, P> YCoCgR2rgb(
+               tvec3<T, P> const & YCoCgColor);
+
+       /// @}
+}//namespace glm
+
+#include "color_space_YCoCg.inl"
diff --git a/include/glm/gtx/color_space_YCoCg.inl b/include/glm/gtx/color_space_YCoCg.inl
new file mode 100644 (file)
index 0000000..caf8822
--- /dev/null
@@ -0,0 +1,87 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtx_color_space_YCoCg
+/// @file glm/gtx/color_space_YCoCg.inl
+/// @date 2008-10-28 / 2011-06-07
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+namespace glm
+{
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec3<T, P> rgb2YCoCg
+       (
+               tvec3<T, P> const & rgbColor
+       )
+       {
+               tvec3<T, P> result;
+               result.x/*Y */ =   rgbColor.r / T(4) + rgbColor.g / T(2) + rgbColor.b / T(4);
+               result.y/*Co*/ =   rgbColor.r / T(2) + rgbColor.g * T(0) - rgbColor.b / T(2);
+               result.z/*Cg*/ = - rgbColor.r / T(4) + rgbColor.g / T(2) - rgbColor.b / T(4);
+               return result;
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec3<T, P> rgb2YCoCgR
+       (
+               tvec3<T, P> const & rgbColor
+       )
+       {
+               tvec3<T, P> result;
+               result.x/*Y */ = rgbColor.g / T(2) + (rgbColor.r + rgbColor.b) / T(4);
+               result.y/*Co*/ = rgbColor.r - rgbColor.b;
+               result.z/*Cg*/ = rgbColor.g - (rgbColor.r + rgbColor.b) / T(2);
+               return result;
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec3<T, P> YCoCg2rgb
+       (
+               tvec3<T, P> const & YCoCgColor
+       )
+       {
+               tvec3<T, P> result;
+               result.r = YCoCgColor.x + YCoCgColor.y - YCoCgColor.z;
+               result.g = YCoCgColor.x                + YCoCgColor.z;
+               result.b = YCoCgColor.x - YCoCgColor.y - YCoCgColor.z;
+               return result;
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec3<T, P> YCoCgR2rgb
+       (
+               tvec3<T, P> const & YCoCgRColor
+       )
+       {
+               tvec3<T, P> result;
+               T tmp = YCoCgRColor.x - (YCoCgRColor.z / T(2));
+               result.g = YCoCgRColor.z + tmp;
+               result.b = tmp - (YCoCgRColor.y / T(2));
+               result.r = result.b + YCoCgRColor.y;
+               return result;
+       }
+}//namespace glm
diff --git a/include/glm/gtx/common.hpp b/include/glm/gtx/common.hpp
new file mode 100644 (file)
index 0000000..27a00fd
--- /dev/null
@@ -0,0 +1,74 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtx_common
+/// @file glm/gtx/common.hpp
+/// @date 2014-09-08 / 2014-09-08
+/// @author Christophe Riccio
+///
+/// @see core (dependence)
+/// @see gtc_half_float (dependence)
+///
+/// @defgroup gtx_common GLM_GTX_common
+/// @ingroup gtx
+/// 
+/// @brief Provide functions to increase the compatibility with Cg and HLSL languages
+/// 
+/// <glm/gtx/common.hpp> need to be included to use these functionalities.
+///////////////////////////////////////////////////////////////////////////////////
+
+#pragma once
+
+// Dependencies:
+#include "../vec2.hpp"
+#include "../vec3.hpp"
+#include "../vec4.hpp"
+#include "../gtc/vec1.hpp"
+
+#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
+#      pragma message("GLM: GLM_GTX_common extension included")
+#endif
+
+namespace glm
+{
+       /// @addtogroup gtx_common
+       /// @{
+
+       /// Returns true if x is a denormalized number
+       /// Numbers whose absolute value is too small to be represented in the normal format are represented in an alternate, denormalized format.
+       /// This format is less precise but can represent values closer to zero.
+       /// 
+       /// @tparam genType Floating-point scalar or vector types.
+       ///
+       /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/isnan.xml">GLSL isnan man page</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
+       template <typename genType> 
+       GLM_FUNC_DECL typename genType::bool_type isdenormal(genType const & x);
+
+       /// @}
+}//namespace glm
+
+#include "common.inl"
diff --git a/include/glm/gtx/common.inl b/include/glm/gtx/common.inl
new file mode 100644 (file)
index 0000000..05e02d6
--- /dev/null
@@ -0,0 +1,102 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtx_common
+/// @file glm/gtx/common.inl
+/// @date 2014-09-08 / 2014-09-08
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////
+
+#include <cmath>
+
+namespace glm
+{
+       template <typename T> 
+       GLM_FUNC_QUALIFIER bool isdenormal(T const & x)
+       {
+               GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'isdenormal' only accept floating-point inputs");
+
+#              if GLM_HAS_CXX11_STL
+                       return std::fpclassify(x) == FP_SUBNORMAL;
+#              else
+                       return x != static_cast<T>(0) && std::fabs(x) < std::numeric_limits<T>::min();
+#              endif
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER typename tvec1<T, P>::bool_type isdenormal
+       (
+               tvec1<T, P> const & x
+       )
+       {
+               GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'isdenormal' only accept floating-point inputs");
+
+               return typename tvec1<T, P>::bool_type(
+                       isdenormal(x.x));
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER typename tvec2<T, P>::bool_type isdenormal
+       (
+               tvec2<T, P> const & x
+       )
+       {
+               GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'isdenormal' only accept floating-point inputs");
+
+               return typename tvec2<T, P>::bool_type(
+                       isdenormal(x.x),
+                       isdenormal(x.y));
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER typename tvec3<T, P>::bool_type isdenormal
+       (
+               tvec3<T, P> const & x
+       )
+       {
+               GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'isdenormal' only accept floating-point inputs");
+
+               return typename tvec3<T, P>::bool_type(
+                       isdenormal(x.x),
+                       isdenormal(x.y),
+                       isdenormal(x.z));
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER typename tvec4<T, P>::bool_type isdenormal
+       (
+               tvec4<T, P> const & x
+       )
+       {
+               GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'isdenormal' only accept floating-point inputs");
+
+               return typename tvec4<T, P>::bool_type(
+                       isdenormal(x.x),
+                       isdenormal(x.y),
+                       isdenormal(x.z),
+                       isdenormal(x.w));
+       }
+}//namespace glm
diff --git a/include/glm/gtx/compatibility.hpp b/include/glm/gtx/compatibility.hpp
new file mode 100644 (file)
index 0000000..6a3623b
--- /dev/null
@@ -0,0 +1,158 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtx_compatibility
+/// @file glm/gtx/compatibility.hpp
+/// @date 2007-01-24 / 2011-06-07
+/// @author Christophe Riccio
+///
+/// @see core (dependence)
+/// @see gtc_half_float (dependence)
+///
+/// @defgroup gtx_compatibility GLM_GTX_compatibility
+/// @ingroup gtx
+/// 
+/// @brief Provide functions to increase the compatibility with Cg and HLSL languages
+/// 
+/// <glm/gtx/compatibility.hpp> need to be included to use these functionalities.
+///////////////////////////////////////////////////////////////////////////////////
+
+#pragma once
+
+// Dependency:
+#include "../glm.hpp"
+#include "../gtc/quaternion.hpp"
+
+#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
+#      pragma message("GLM: GLM_GTX_compatibility extension included")
+#endif
+
+#if(GLM_COMPILER & GLM_COMPILER_VC)
+#      include <cfloat>
+#elif(GLM_COMPILER & GLM_COMPILER_GCC)
+#      include <cmath>
+#      if(GLM_PLATFORM & GLM_PLATFORM_ANDROID)
+#              undef isfinite
+#      endif
+#endif//GLM_COMPILER
+
+namespace glm
+{
+       /// @addtogroup gtx_compatibility
+       /// @{
+
+       template <typename T> GLM_FUNC_QUALIFIER T lerp(T x, T y, T a){return mix(x, y, a);}                                                                                                                                                                    //!< \brief Returns x * (1.0 - a) + y * a, i.e., the linear blend of x and y using the floating-point value a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility)
+       template <typename T, precision P> GLM_FUNC_QUALIFIER tvec2<T, P> lerp(const tvec2<T, P>& x, const tvec2<T, P>& y, T a){return mix(x, y, a);}                                                   //!< \brief Returns x * (1.0 - a) + y * a, i.e., the linear blend of x and y using the floating-point value a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility)
+
+       template <typename T, precision P> GLM_FUNC_QUALIFIER tvec3<T, P> lerp(const tvec3<T, P>& x, const tvec3<T, P>& y, T a){return mix(x, y, a);}                                                   //!< \brief Returns x * (1.0 - a) + y * a, i.e., the linear blend of x and y using the floating-point value a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility)
+       template <typename T, precision P> GLM_FUNC_QUALIFIER tvec4<T, P> lerp(const tvec4<T, P>& x, const tvec4<T, P>& y, T a){return mix(x, y, a);}                                                   //!< \brief Returns x * (1.0 - a) + y * a, i.e., the linear blend of x and y using the floating-point value a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility)
+       template <typename T, precision P> GLM_FUNC_QUALIFIER tvec2<T, P> lerp(const tvec2<T, P>& x, const tvec2<T, P>& y, const tvec2<T, P>& a){return mix(x, y, a);}  //!< \brief Returns the component-wise result of x * (1.0 - a) + y * a, i.e., the linear blend of x and y using vector a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility)
+       template <typename T, precision P> GLM_FUNC_QUALIFIER tvec3<T, P> lerp(const tvec3<T, P>& x, const tvec3<T, P>& y, const tvec3<T, P>& a){return mix(x, y, a);}  //!< \brief Returns the component-wise result of x * (1.0 - a) + y * a, i.e., the linear blend of x and y using vector a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility)
+       template <typename T, precision P> GLM_FUNC_QUALIFIER tvec4<T, P> lerp(const tvec4<T, P>& x, const tvec4<T, P>& y, const tvec4<T, P>& a){return mix(x, y, a);}  //!< \brief Returns the component-wise result of x * (1.0 - a) + y * a, i.e., the linear blend of x and y using vector a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility)
+
+       template <typename T, precision P> GLM_FUNC_QUALIFIER T saturate(T x){return clamp(x, T(0), T(1));}                                                                                                             //!< \brief Returns clamp(x, 0, 1) for each component in x. (From GLM_GTX_compatibility)
+       template <typename T, precision P> GLM_FUNC_QUALIFIER tvec2<T, P> saturate(const tvec2<T, P>& x){return clamp(x, T(0), T(1));}                                  //!< \brief Returns clamp(x, 0, 1) for each component in x. (From GLM_GTX_compatibility)
+       template <typename T, precision P> GLM_FUNC_QUALIFIER tvec3<T, P> saturate(const tvec3<T, P>& x){return clamp(x, T(0), T(1));}                                  //!< \brief Returns clamp(x, 0, 1) for each component in x. (From GLM_GTX_compatibility)
+       template <typename T, precision P> GLM_FUNC_QUALIFIER tvec4<T, P> saturate(const tvec4<T, P>& x){return clamp(x, T(0), T(1));}                                  //!< \brief Returns clamp(x, 0, 1) for each component in x. (From GLM_GTX_compatibility)
+
+       template <typename T, precision P> GLM_FUNC_QUALIFIER T atan2(T x, T y){return atan(x, y);}                                                                                                                             //!< \brief Arc tangent. Returns an angle whose tangent is y/x. The signs of x and y are used to determine what quadrant the angle is in. The range of values returned by this function is [-PI, PI]. Results are undefined if x and y are both 0. (From GLM_GTX_compatibility)
+       template <typename T, precision P> GLM_FUNC_QUALIFIER tvec2<T, P> atan2(const tvec2<T, P>& x, const tvec2<T, P>& y){return atan(x, y);} //!< \brief Arc tangent. Returns an angle whose tangent is y/x. The signs of x and y are used to determine what quadrant the angle is in. The range of values returned by this function is [-PI, PI]. Results are undefined if x and y are both 0. (From GLM_GTX_compatibility)
+       template <typename T, precision P> GLM_FUNC_QUALIFIER tvec3<T, P> atan2(const tvec3<T, P>& x, const tvec3<T, P>& y){return atan(x, y);} //!< \brief Arc tangent. Returns an angle whose tangent is y/x. The signs of x and y are used to determine what quadrant the angle is in. The range of values returned by this function is [-PI, PI]. Results are undefined if x and y are both 0. (From GLM_GTX_compatibility)
+       template <typename T, precision P> GLM_FUNC_QUALIFIER tvec4<T, P> atan2(const tvec4<T, P>& x, const tvec4<T, P>& y){return atan(x, y);} //!< \brief Arc tangent. Returns an angle whose tangent is y/x. The signs of x and y are used to determine what quadrant the angle is in. The range of values returned by this function is [-PI, PI]. Results are undefined if x and y are both 0. (From GLM_GTX_compatibility)
+
+       template <typename genType> GLM_FUNC_DECL bool isfinite(genType const & x);                                                                                     //!< \brief Test whether or not a scalar or each vector component is a finite value. (From GLM_GTX_compatibility)
+       template <typename T, precision P> GLM_FUNC_DECL tvec2<bool, P> isfinite(const tvec2<T, P>& x);                         //!< \brief Test whether or not a scalar or each vector component is a finite value. (From GLM_GTX_compatibility)
+       template <typename T, precision P> GLM_FUNC_DECL tvec3<bool, P> isfinite(const tvec3<T, P>& x);                         //!< \brief Test whether or not a scalar or each vector component is a finite value. (From GLM_GTX_compatibility)
+       template <typename T, precision P> GLM_FUNC_DECL tvec4<bool, P> isfinite(const tvec4<T, P>& x);                         //!< \brief Test whether or not a scalar or each vector component is a finite value. (From GLM_GTX_compatibility)
+
+       typedef bool                                            bool1;                  //!< \brief boolean type with 1 component. (From GLM_GTX_compatibility extension)
+       typedef tvec2<bool, highp>                      bool2;                  //!< \brief boolean type with 2 components. (From GLM_GTX_compatibility extension)
+       typedef tvec3<bool, highp>                      bool3;                  //!< \brief boolean type with 3 components. (From GLM_GTX_compatibility extension)
+       typedef tvec4<bool, highp>                      bool4;                  //!< \brief boolean type with 4 components. (From GLM_GTX_compatibility extension)
+
+       typedef bool                                            bool1x1;                //!< \brief boolean matrix with 1 x 1 component. (From GLM_GTX_compatibility extension)
+       typedef tmat2x2<bool, highp>            bool2x2;                //!< \brief boolean matrix with 2 x 2 components. (From GLM_GTX_compatibility extension)
+       typedef tmat2x3<bool, highp>            bool2x3;                //!< \brief boolean matrix with 2 x 3 components. (From GLM_GTX_compatibility extension)
+       typedef tmat2x4<bool, highp>            bool2x4;                //!< \brief boolean matrix with 2 x 4 components. (From GLM_GTX_compatibility extension)
+       typedef tmat3x2<bool, highp>            bool3x2;                //!< \brief boolean matrix with 3 x 2 components. (From GLM_GTX_compatibility extension)
+       typedef tmat3x3<bool, highp>            bool3x3;                //!< \brief boolean matrix with 3 x 3 components. (From GLM_GTX_compatibility extension)
+       typedef tmat3x4<bool, highp>            bool3x4;                //!< \brief boolean matrix with 3 x 4 components. (From GLM_GTX_compatibility extension)
+       typedef tmat4x2<bool, highp>            bool4x2;                //!< \brief boolean matrix with 4 x 2 components. (From GLM_GTX_compatibility extension)
+       typedef tmat4x3<bool, highp>            bool4x3;                //!< \brief boolean matrix with 4 x 3 components. (From GLM_GTX_compatibility extension)
+       typedef tmat4x4<bool, highp>            bool4x4;                //!< \brief boolean matrix with 4 x 4 components. (From GLM_GTX_compatibility extension)
+
+       typedef int                                                     int1;                   //!< \brief integer vector with 1 component. (From GLM_GTX_compatibility extension)
+       typedef tvec2<int, highp>                       int2;                   //!< \brief integer vector with 2 components. (From GLM_GTX_compatibility extension)
+       typedef tvec3<int, highp>                       int3;                   //!< \brief integer vector with 3 components. (From GLM_GTX_compatibility extension)
+       typedef tvec4<int, highp>                       int4;                   //!< \brief integer vector with 4 components. (From GLM_GTX_compatibility extension)
+
+       typedef int                                                     int1x1;                 //!< \brief integer matrix with 1 component. (From GLM_GTX_compatibility extension)
+       typedef tmat2x2<int, highp>             int2x2;                 //!< \brief integer matrix with 2 x 2 components. (From GLM_GTX_compatibility extension)
+       typedef tmat2x3<int, highp>             int2x3;                 //!< \brief integer matrix with 2 x 3 components. (From GLM_GTX_compatibility extension)
+       typedef tmat2x4<int, highp>             int2x4;                 //!< \brief integer matrix with 2 x 4 components. (From GLM_GTX_compatibility extension)
+       typedef tmat3x2<int, highp>             int3x2;                 //!< \brief integer matrix with 3 x 2 components. (From GLM_GTX_compatibility extension)
+       typedef tmat3x3<int, highp>             int3x3;                 //!< \brief integer matrix with 3 x 3 components. (From GLM_GTX_compatibility extension)
+       typedef tmat3x4<int, highp>             int3x4;                 //!< \brief integer matrix with 3 x 4 components. (From GLM_GTX_compatibility extension)
+       typedef tmat4x2<int, highp>             int4x2;                 //!< \brief integer matrix with 4 x 2 components. (From GLM_GTX_compatibility extension)
+       typedef tmat4x3<int, highp>             int4x3;                 //!< \brief integer matrix with 4 x 3 components. (From GLM_GTX_compatibility extension)
+       typedef tmat4x4<int, highp>             int4x4;                 //!< \brief integer matrix with 4 x 4 components. (From GLM_GTX_compatibility extension)
+
+       typedef float                                           float1;                 //!< \brief single-precision floating-point vector with 1 component. (From GLM_GTX_compatibility extension)
+       typedef tvec2<float, highp>             float2;                 //!< \brief single-precision floating-point vector with 2 components. (From GLM_GTX_compatibility extension)
+       typedef tvec3<float, highp>             float3;                 //!< \brief single-precision floating-point vector with 3 components. (From GLM_GTX_compatibility extension)
+       typedef tvec4<float, highp>             float4;                 //!< \brief single-precision floating-point vector with 4 components. (From GLM_GTX_compatibility extension)
+
+       typedef float                                           float1x1;               //!< \brief single-precision floating-point matrix with 1 component. (From GLM_GTX_compatibility extension)
+       typedef tmat2x2<float, highp>           float2x2;               //!< \brief single-precision floating-point matrix with 2 x 2 components. (From GLM_GTX_compatibility extension)
+       typedef tmat2x3<float, highp>           float2x3;               //!< \brief single-precision floating-point matrix with 2 x 3 components. (From GLM_GTX_compatibility extension)
+       typedef tmat2x4<float, highp>           float2x4;               //!< \brief single-precision floating-point matrix with 2 x 4 components. (From GLM_GTX_compatibility extension)
+       typedef tmat3x2<float, highp>           float3x2;               //!< \brief single-precision floating-point matrix with 3 x 2 components. (From GLM_GTX_compatibility extension)
+       typedef tmat3x3<float, highp>           float3x3;               //!< \brief single-precision floating-point matrix with 3 x 3 components. (From GLM_GTX_compatibility extension)
+       typedef tmat3x4<float, highp>           float3x4;               //!< \brief single-precision floating-point matrix with 3 x 4 components. (From GLM_GTX_compatibility extension)
+       typedef tmat4x2<float, highp>           float4x2;               //!< \brief single-precision floating-point matrix with 4 x 2 components. (From GLM_GTX_compatibility extension)
+       typedef tmat4x3<float, highp>           float4x3;               //!< \brief single-precision floating-point matrix with 4 x 3 components. (From GLM_GTX_compatibility extension)
+       typedef tmat4x4<float, highp>           float4x4;               //!< \brief single-precision floating-point matrix with 4 x 4 components. (From GLM_GTX_compatibility extension)
+
+       typedef double                                          double1;                //!< \brief double-precision floating-point vector with 1 component. (From GLM_GTX_compatibility extension)
+       typedef tvec2<double, highp>            double2;                //!< \brief double-precision floating-point vector with 2 components. (From GLM_GTX_compatibility extension)
+       typedef tvec3<double, highp>            double3;                //!< \brief double-precision floating-point vector with 3 components. (From GLM_GTX_compatibility extension)
+       typedef tvec4<double, highp>            double4;                //!< \brief double-precision floating-point vector with 4 components. (From GLM_GTX_compatibility extension)
+
+       typedef double                                          double1x1;              //!< \brief double-precision floating-point matrix with 1 component. (From GLM_GTX_compatibility extension)
+       typedef tmat2x2<double, highp>          double2x2;              //!< \brief double-precision floating-point matrix with 2 x 2 components. (From GLM_GTX_compatibility extension)
+       typedef tmat2x3<double, highp>          double2x3;              //!< \brief double-precision floating-point matrix with 2 x 3 components. (From GLM_GTX_compatibility extension)
+       typedef tmat2x4<double, highp>          double2x4;              //!< \brief double-precision floating-point matrix with 2 x 4 components. (From GLM_GTX_compatibility extension)
+       typedef tmat3x2<double, highp>          double3x2;              //!< \brief double-precision floating-point matrix with 3 x 2 components. (From GLM_GTX_compatibility extension)
+       typedef tmat3x3<double, highp>          double3x3;              //!< \brief double-precision floating-point matrix with 3 x 3 components. (From GLM_GTX_compatibility extension)
+       typedef tmat3x4<double, highp>          double3x4;              //!< \brief double-precision floating-point matrix with 3 x 4 components. (From GLM_GTX_compatibility extension)
+       typedef tmat4x2<double, highp>          double4x2;              //!< \brief double-precision floating-point matrix with 4 x 2 components. (From GLM_GTX_compatibility extension)
+       typedef tmat4x3<double, highp>          double4x3;              //!< \brief double-precision floating-point matrix with 4 x 3 components. (From GLM_GTX_compatibility extension)
+       typedef tmat4x4<double, highp>          double4x4;              //!< \brief double-precision floating-point matrix with 4 x 4 components. (From GLM_GTX_compatibility extension)
+
+       /// @}
+}//namespace glm
+
+#include "compatibility.inl"
diff --git a/include/glm/gtx/compatibility.inl b/include/glm/gtx/compatibility.inl
new file mode 100644 (file)
index 0000000..decc26c
--- /dev/null
@@ -0,0 +1,83 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtx_compatibility
+/// @file glm/gtx/compatibility.inl
+/// @date 2007-01-24 / 2011-06-07
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+#include <limits>
+
+namespace glm
+{
+       // isfinite
+       template <typename genType>
+       GLM_FUNC_QUALIFIER bool isfinite(
+               genType const & x)
+       {
+#              if GLM_HAS_CXX11_STL
+                       return std::isfinite(x) != 0;
+#              elif GLM_COMPILER & GLM_COMPILER_VC
+                       return _finite(x);
+#              elif GLM_COMPILER & GLM_COMPILER_GCC && GLM_PLATFORM & GLM_PLATFORM_ANDROID
+                       return _isfinite(x) != 0;
+#              else
+                       return x >= std::numeric_limits<genType>::min() && x <= std::numeric_limits<genType>::max();
+#              endif
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec2<bool, P> isfinite(
+               tvec2<T, P> const & x)
+       {
+               return tvec2<bool, P>(
+                       isfinite(x.x),
+                       isfinite(x.y));
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec3<bool, P> isfinite(
+               tvec3<T, P> const & x)
+       {
+               return tvec3<bool, P>(
+                       isfinite(x.x),
+                       isfinite(x.y),
+                       isfinite(x.z));
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec4<bool, P> isfinite(
+               tvec4<T, P> const & x)
+       {
+               return tvec4<bool, P>(
+                       isfinite(x.x),
+                       isfinite(x.y),
+                       isfinite(x.z),
+                       isfinite(x.w));
+       }
+
+}//namespace glm
diff --git a/include/glm/gtx/component_wise.hpp b/include/glm/gtx/component_wise.hpp
new file mode 100644 (file)
index 0000000..d5b3d81
--- /dev/null
@@ -0,0 +1,84 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtx_component_wise
+/// @file glm/gtx/component_wise.hpp
+/// @date 2007-05-21 / 2011-06-07
+/// @author Christophe Riccio
+/// 
+/// @see core (dependence)
+///
+/// @defgroup gtx_component_wise GLM_GTX_component_wise
+/// @ingroup gtx
+/// 
+/// @brief Operations between components of a type
+/// 
+/// <glm/gtx/component_wise.hpp> need to be included to use these functionalities.
+///////////////////////////////////////////////////////////////////////////////////
+
+#pragma once
+
+// Dependencies
+#include "../detail/setup.hpp"
+#include "../detail/precision.hpp"
+
+#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
+#      pragma message("GLM: GLM_GTX_component_wise extension included")
+#endif
+
+namespace glm
+{
+       /// @addtogroup gtx_component_wise
+       /// @{
+
+       /// Add all vector components together. 
+       /// @see gtx_component_wise
+       template <typename genType> 
+       GLM_FUNC_DECL typename genType::value_type compAdd(
+               genType const & v);
+
+       /// Multiply all vector components together. 
+       /// @see gtx_component_wise
+       template <typename genType> 
+       GLM_FUNC_DECL typename genType::value_type compMul(
+               genType const & v);
+
+       /// Find the minimum value between single vector components.
+       /// @see gtx_component_wise
+       template <typename genType> 
+       GLM_FUNC_DECL typename genType::value_type compMin(
+               genType const & v);
+
+       /// Find the maximum value between single vector components.
+       /// @see gtx_component_wise
+       template <typename genType> 
+       GLM_FUNC_DECL typename genType::value_type compMax(
+               genType const & v);
+
+       /// @}
+}//namespace glm
+
+#include "component_wise.inl"
diff --git a/include/glm/gtx/component_wise.inl b/include/glm/gtx/component_wise.inl
new file mode 100644 (file)
index 0000000..f944fae
--- /dev/null
@@ -0,0 +1,70 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtx_component_wise
+/// @file glm/gtx/component_wise.inl
+/// @date 2007-05-21 / 2011-06-07
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+namespace glm
+{
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_QUALIFIER T compAdd(vecType<T, P> const & v)
+       {
+               T result(0);
+               for(detail::component_count_t i = 0; i < detail::component_count(v); ++i)
+                       result += v[i];
+               return result;
+       }
+
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_QUALIFIER T compMul(vecType<T, P> const & v)
+       {
+               T result(1);
+               for(detail::component_count_t i = 0; i < detail::component_count(v); ++i)
+                       result *= v[i];
+               return result;
+       }
+
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_QUALIFIER T compMin(vecType<T, P> const & v)
+       {
+               T result(v[0]);
+               for(detail::component_count_t i = 1; i < detail::component_count(v); ++i)
+                       result = min(result, v[i]);
+               return result;
+       }
+
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_QUALIFIER T compMax(vecType<T, P> const & v)
+       {
+               T result(v[0]);
+               for(detail::component_count_t i = 1; i < detail::component_count(v); ++i)
+                       result = max(result, v[i]);
+               return result;
+       }
+}//namespace glm
diff --git a/include/glm/gtx/dual_quaternion.hpp b/include/glm/gtx/dual_quaternion.hpp
new file mode 100644 (file)
index 0000000..3cb1474
--- /dev/null
@@ -0,0 +1,321 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+///
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtx_dual_quaternion
+/// @file glm/gtx/dual_quaternion.hpp
+/// @date 2013-02-10 / 2013-02-20
+/// @author Maksim Vorobiev (msomeone@gmail.com)
+///
+/// @see core (dependence)
+/// @see gtc_half_float (dependence)
+/// @see gtc_constants (dependence)
+/// @see gtc_quaternion (dependence)
+///
+/// @defgroup gtx_dual_quaternion GLM_GTX_dual_quaternion
+/// @ingroup gtx
+///
+/// @brief Defines a templated dual-quaternion type and several dual-quaternion operations.
+///
+/// <glm/gtx/dual_quaternion.hpp> need to be included to use these functionalities.
+///////////////////////////////////////////////////////////////////////////////////
+
+#pragma once
+
+// Dependency:
+#include "../glm.hpp"
+#include "../gtc/constants.hpp"
+#include "../gtc/quaternion.hpp"
+
+#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
+#      pragma message("GLM: GLM_GTX_dual_quaternion extension included")
+#endif
+
+namespace glm
+{
+       /// @addtogroup gtx_dual_quaternion
+       /// @{
+
+       template <typename T, precision P>
+       struct tdualquat
+       {
+               typedef T value_type;
+               typedef glm::tquat<T, P> part_type;
+               
+       public:
+               glm::tquat<T, P> real, dual;
+               
+               //////////////////////////////////////
+               // Component accesses
+
+#              ifdef GLM_FORCE_SIZE_FUNC
+                       typedef size_t size_type;
+                       /// Return the count of components of a dual quaternion
+                       GLM_FUNC_DECL GLM_CONSTEXPR size_type size() const;
+
+                       GLM_FUNC_DECL part_type & operator[](size_type i);
+                       GLM_FUNC_DECL part_type const & operator[](size_type i) const;
+#              else
+                       typedef length_t length_type;
+                       /// Return the count of components of a dual quaternion
+                       GLM_FUNC_DECL GLM_CONSTEXPR length_type length() const;
+
+                       GLM_FUNC_DECL part_type & operator[](length_type i);
+                       GLM_FUNC_DECL part_type const & operator[](length_type i) const;
+#              endif//GLM_FORCE_SIZE_FUNC
+
+               //////////////////////////////////////
+               // Implicit basic constructors
+
+               GLM_FUNC_DECL tdualquat();
+               GLM_FUNC_DECL tdualquat(tdualquat<T, P> const & d);
+               template <precision Q>
+               GLM_FUNC_DECL tdualquat(tdualquat<T, Q> const & d);
+
+               //////////////////////////////////////
+               // Explicit basic constructors
+
+               GLM_FUNC_DECL explicit tdualquat(ctor);
+               GLM_FUNC_DECL explicit tdualquat(tquat<T, P> const & real);
+               GLM_FUNC_DECL tdualquat(tquat<T, P> const & orientation, tvec3<T, P> const & translation);
+               GLM_FUNC_DECL tdualquat(tquat<T, P> const & real, tquat<T, P> const & dual);
+
+               //////////////////////////////////////////////////////////////
+               // tdualquat conversions
+
+#              ifdef GLM_FORCE_EXPLICIT_CTOR
+                       template <typename U, precision Q>
+                       GLM_FUNC_DECL explicit tdualquat(tdualquat<U, Q> const & q);
+#              else
+                       template <typename U, precision Q>
+                       GLM_FUNC_DECL tdualquat(tdualquat<U, Q> const & q);
+#              endif
+
+               GLM_FUNC_DECL explicit tdualquat(tmat2x4<T, P> const & holder_mat);
+               GLM_FUNC_DECL explicit tdualquat(tmat3x4<T, P> const & aug_mat);
+               
+               // Operators
+               GLM_FUNC_DECL tdualquat<T, P> & operator=(tdualquat<T, P> const & m);
+
+               template <typename U>
+               GLM_FUNC_DECL tdualquat<T, P> & operator=(tdualquat<U, P> const & m);
+               template <typename U>
+               GLM_FUNC_DECL tdualquat<T, P> & operator*=(U s);
+               template <typename U>
+               GLM_FUNC_DECL tdualquat<T, P> & operator/=(U s);
+       };
+       
+       template <typename T, precision P>
+       GLM_FUNC_DECL tquat<T, P> operator- (
+               tquat<T, P> const & q);
+       
+       template <typename T, precision P>
+       GLM_FUNC_DECL tdualquat<T, P> operator+ (
+               tdualquat<T, P> const & q,
+               tdualquat<T, P> const & p);
+       
+       template <typename T, precision P>
+       GLM_FUNC_DECL tdualquat<T, P> operator* (
+               tdualquat<T, P> const & q,
+               tdualquat<T, P> const & p);
+       
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec3<T, P> operator* (
+               tquat<T, P> const & q,
+               tvec3<T, P> const & v);
+       
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec3<T, P> operator* (
+               tvec3<T, P> const & v,
+               tquat<T, P> const & q);
+       
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec4<T, P> operator* (
+               tquat<T, P> const & q,
+               tvec4<T, P> const & v);
+       
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec4<T, P> operator* (
+               tvec4<T, P> const & v,
+               tquat<T, P> const & q);
+       
+       template <typename T, precision P>
+       GLM_FUNC_DECL tdualquat<T, P> operator* (
+               tdualquat<T, P> const & q,
+               T const & s);
+       
+       template <typename T, precision P>
+       GLM_FUNC_DECL tdualquat<T, P> operator* (
+               T const & s,
+               tdualquat<T, P> const & q);
+       
+       template <typename T, precision P>
+       GLM_FUNC_DECL tdualquat<T, P> operator/ (
+               tdualquat<T, P> const & q,
+               T const & s);
+
+       /// Returns the normalized quaternion.
+       ///
+       /// @see gtx_dual_quaternion
+       template <typename T, precision P>
+       GLM_FUNC_DECL tdualquat<T, P> normalize(
+               tdualquat<T, P> const & q);
+
+       /// Returns the linear interpolation of two dual quaternion.
+       ///
+       /// @see gtc_dual_quaternion
+       template <typename T, precision P>
+       GLM_FUNC_DECL tdualquat<T, P> lerp(
+               tdualquat<T, P> const & x,
+               tdualquat<T, P> const & y,
+               T const & a);
+
+       /// Returns the q inverse.
+       ///
+       /// @see gtx_dual_quaternion
+       template <typename T, precision P>
+       GLM_FUNC_DECL tdualquat<T, P> inverse(
+               tdualquat<T, P> const & q);
+
+       /// Converts a quaternion to a 2 * 4 matrix.
+       ///
+       /// @see gtx_dual_quaternion
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat2x4<T, P> mat2x4_cast(
+               tdualquat<T, P> const & x);
+
+       /// Converts a quaternion to a 3 * 4 matrix.
+       ///
+       /// @see gtx_dual_quaternion
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat3x4<T, P> mat3x4_cast(
+               tdualquat<T, P> const & x);
+
+       /// Converts a 2 * 4 matrix (matrix which holds real and dual parts) to a quaternion.
+       ///
+       /// @see gtx_dual_quaternion
+       template <typename T, precision P>
+       GLM_FUNC_DECL tdualquat<T, P> dualquat_cast(
+               tmat2x4<T, P> const & x);
+
+       /// Converts a 3 * 4 matrix (augmented matrix rotation + translation) to a quaternion.
+       ///
+       /// @see gtx_dual_quaternion
+       template <typename T, precision P>
+       GLM_FUNC_DECL tdualquat<T, P> dualquat_cast(
+               tmat3x4<T, P> const & x);
+
+       
+       /// Dual-quaternion of low single-precision floating-point numbers.
+       ///
+       /// @see gtx_dual_quaternion
+       typedef tdualquat<float, lowp>          lowp_dualquat;
+       
+       /// Dual-quaternion of medium single-precision floating-point numbers.
+       ///
+       /// @see gtx_dual_quaternion
+       typedef tdualquat<float, mediump>       mediump_dualquat;
+       
+       /// Dual-quaternion of high single-precision floating-point numbers.
+       ///
+       /// @see gtx_dual_quaternion
+       typedef tdualquat<float, highp>         highp_dualquat;
+
+
+       /// Dual-quaternion of low single-precision floating-point numbers.
+       ///
+       /// @see gtx_dual_quaternion
+       typedef tdualquat<float, lowp>          lowp_fdualquat;
+       
+       /// Dual-quaternion of medium single-precision floating-point numbers.
+       ///
+       /// @see gtx_dual_quaternion
+       typedef tdualquat<float, mediump>       mediump_fdualquat;
+       
+       /// Dual-quaternion of high single-precision floating-point numbers.
+       ///
+       /// @see gtx_dual_quaternion
+       typedef tdualquat<float, highp>         highp_fdualquat;
+       
+       
+       /// Dual-quaternion of low double-precision floating-point numbers.
+       ///
+       /// @see gtx_dual_quaternion
+       typedef tdualquat<double, lowp>         lowp_ddualquat;
+       
+       /// Dual-quaternion of medium double-precision floating-point numbers.
+       ///
+       /// @see gtx_dual_quaternion
+       typedef tdualquat<double, mediump>      mediump_ddualquat;
+       
+       /// Dual-quaternion of high double-precision floating-point numbers.
+       ///
+       /// @see gtx_dual_quaternion
+       typedef tdualquat<double, highp>        highp_ddualquat;
+
+       
+#if(!defined(GLM_PRECISION_HIGHP_FLOAT) && !defined(GLM_PRECISION_MEDIUMP_FLOAT) && !defined(GLM_PRECISION_LOWP_FLOAT))
+       /// Dual-quaternion of floating-point numbers.
+       ///
+       /// @see gtx_dual_quaternion
+       typedef highp_fdualquat                 dualquat;
+       
+       /// Dual-quaternion of single-precision floating-point numbers.
+       ///
+       /// @see gtx_dual_quaternion
+       typedef highp_fdualquat                 fdualquat;
+#elif(defined(GLM_PRECISION_HIGHP_FLOAT) && !defined(GLM_PRECISION_MEDIUMP_FLOAT) && !defined(GLM_PRECISION_LOWP_FLOAT))
+       typedef highp_fdualquat                 dualquat;
+       typedef highp_fdualquat                 fdualquat;
+#elif(!defined(GLM_PRECISION_HIGHP_FLOAT) && defined(GLM_PRECISION_MEDIUMP_FLOAT) && !defined(GLM_PRECISION_LOWP_FLOAT))
+       typedef mediump_fdualquat               dualquat;
+       typedef mediump_fdualquat               fdualquat;
+#elif(!defined(GLM_PRECISION_HIGHP_FLOAT) && !defined(GLM_PRECISION_MEDIUMP_FLOAT) && defined(GLM_PRECISION_LOWP_FLOAT))
+       typedef lowp_fdualquat                  dualquat;
+       typedef lowp_fdualquat                  fdualquat;
+#else
+#      error "GLM error: multiple default precision requested for single-precision floating-point types"
+#endif
+       
+
+#if(!defined(GLM_PRECISION_HIGHP_DOUBLE) && !defined(GLM_PRECISION_MEDIUMP_DOUBLE) && !defined(GLM_PRECISION_LOWP_DOUBLE))
+       /// Dual-quaternion of default double-precision floating-point numbers.
+       ///
+       /// @see gtx_dual_quaternion
+       typedef highp_ddualquat                 ddualquat;
+#elif(defined(GLM_PRECISION_HIGHP_DOUBLE) && !defined(GLM_PRECISION_MEDIUMP_DOUBLE) && !defined(GLM_PRECISION_LOWP_DOUBLE))
+       typedef highp_ddualquat                 ddualquat;
+#elif(!defined(GLM_PRECISION_HIGHP_DOUBLE) && defined(GLM_PRECISION_MEDIUMP_DOUBLE) && !defined(GLM_PRECISION_LOWP_DOUBLE))
+       typedef mediump_ddualquat               ddualquat;
+#elif(!defined(GLM_PRECISION_HIGHP_DOUBLE) && !defined(GLM_PRECISION_MEDIUMP_DOUBLE) && defined(GLM_PRECISION_LOWP_DOUBLE))
+       typedef lowp_ddualquat                  ddualquat;
+#else
+#      error "GLM error: Multiple default precision requested for double-precision floating-point types"
+#endif
+
+       /// @}
+} //namespace glm
+
+#include "dual_quaternion.inl"
diff --git a/include/glm/gtx/dual_quaternion.inl b/include/glm/gtx/dual_quaternion.inl
new file mode 100644 (file)
index 0000000..8fed085
--- /dev/null
@@ -0,0 +1,400 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtx_dual_quaternion
+/// @file glm/gtx/dual_quaternion.inl
+/// @date 2013-02-10 / 2013-02-13
+/// @author Maksim Vorobiev (msomeone@gmail.com)
+///////////////////////////////////////////////////////////////////////////////////
+
+#include "../geometric.hpp"
+#include <limits>
+
+namespace glm
+{
+       //////////////////////////////////////
+       // Component accesses
+
+#      ifdef GLM_FORCE_SIZE_FUNC
+               template <typename T, precision P>
+               GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tdualquat<T, P>::size_type tdualquat<T, P>::size() const
+               {
+                       return 2;
+               }
+
+               template <typename T, precision P>
+               GLM_FUNC_QUALIFIER typename tdualquat<T, P>::part_type & tdualquat<T, P>::operator[](typename tdualquat<T, P>::size_type i)
+               {
+                       assert(i >= 0 && static_cast<detail::component_count_t>(i) < detail::component_count(*this));
+                       return (&real)[i];
+               }
+
+               template <typename T, precision P>
+               GLM_FUNC_QUALIFIER typename tdualquat<T, P>::part_type const & tdualquat<T, P>::operator[](typename tdualquat<T, P>::size_type i) const
+               {
+                       assert(i >= 0 && static_cast<detail::component_count_t>(i) < detail::component_count(*this));
+                       return (&real)[i];
+               }
+#      else
+               template <typename T, precision P>
+               GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tdualquat<T, P>::length_type tdualquat<T, P>::length() const
+               {
+                       return 2;
+               }
+
+               template <typename T, precision P>
+               GLM_FUNC_QUALIFIER typename tdualquat<T, P>::part_type & tdualquat<T, P>::operator[](typename tdualquat<T, P>::length_type i)
+               {
+                       assert(i >= 0 && static_cast<detail::component_count_t>(i) < detail::component_count(*this));
+                       return (&real)[i];
+               }
+
+               template <typename T, precision P>
+               GLM_FUNC_QUALIFIER typename tdualquat<T, P>::part_type const & tdualquat<T, P>::operator[](typename tdualquat<T, P>::length_type i) const
+               {
+                       assert(i >= 0 && static_cast<detail::component_count_t>(i) < detail::component_count(*this));
+                       return (&real)[i];
+               }
+#      endif//GLM_FORCE_SIZE_FUNC
+
+       //////////////////////////////////////
+       // Implicit basic constructors
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tdualquat<T, P>::tdualquat()
+#              ifndef GLM_FORCE_NO_CTOR_INIT 
+                       : real(tquat<T, P>())
+                       , dual(tquat<T, P>(0, 0, 0, 0))
+#              endif
+       {}
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tdualquat<T, P>::tdualquat(tdualquat<T, P> const & d)
+               : real(d.real)
+               , dual(d.dual)
+       {}
+
+       template <typename T, precision P>
+       template <precision Q>
+       GLM_FUNC_QUALIFIER tdualquat<T, P>::tdualquat(tdualquat<T, Q> const & d)
+               : real(d.real)
+               , dual(d.dual)
+       {}
+
+       //////////////////////////////////////
+       // Explicit basic constructors
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tdualquat<T, P>::tdualquat(ctor)
+       {}
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tdualquat<T, P>::tdualquat(tquat<T, P> const & r)
+               : real(r), dual(tquat<T, P>(0, 0, 0, 0))
+       {}
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tdualquat<T, P>::tdualquat(tquat<T, P> const & q, tvec3<T, P> const& p)
+               : real(q), dual(
+                       T(-0.5) * ( p.x*q.x + p.y*q.y + p.z*q.z),
+                       T(+0.5) * ( p.x*q.w + p.y*q.z - p.z*q.y),
+                       T(+0.5) * (-p.x*q.z + p.y*q.w + p.z*q.x),
+                       T(+0.5) * ( p.x*q.y - p.y*q.x + p.z*q.w))
+       {}
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tdualquat<T, P>::tdualquat(tquat<T, P> const & r, tquat<T, P> const & d)
+               : real(r), dual(d)
+       {}
+
+       //////////////////////////////////////////////////////////////
+       // tdualquat conversions
+
+       template <typename T, precision P>
+       template <typename U, precision Q>
+       GLM_FUNC_QUALIFIER tdualquat<T, P>::tdualquat(tdualquat<U, Q> const & q)
+               : real(q.real)
+               , dual(q.dual)
+       {}
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tdualquat<T, P>::tdualquat(tmat2x4<T, P> const & m)
+       {
+               *this = dualquat_cast(m);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tdualquat<T, P>::tdualquat(tmat3x4<T, P> const & m)
+       {
+               *this = dualquat_cast(m);
+       }
+
+       //////////////////////////////////////////////////////////////
+       // tdualquat operators
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tdualquat<T, P> & tdualquat<T, P>::operator=(tdualquat<T, P> const & q)
+       {
+               this->real = q.real;
+               this->dual = q.dual;
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U>
+       GLM_FUNC_QUALIFIER tdualquat<T, P> & tdualquat<T, P>::operator=(tdualquat<U, P> const & q)
+       {
+               this->real = q.real;
+               this->dual = q.dual;
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U>
+       GLM_FUNC_QUALIFIER tdualquat<T, P> & tdualquat<T, P>::operator*=(U s)
+       {
+               this->real *= static_cast<T>(s);
+               this->dual *= static_cast<T>(s);
+               return *this;
+       }
+
+       template <typename T, precision P>
+       template <typename U>
+       GLM_FUNC_QUALIFIER tdualquat<T, P> & tdualquat<T, P>::operator/=(U s)
+       {
+               this->real /= static_cast<T>(s);
+               this->dual /= static_cast<T>(s);
+               return *this;
+       }
+
+       //////////////////////////////////////////////////////////////
+       // tquat<valType> external operators
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tdualquat<T, P> operator-(tdualquat<T, P> const & q)
+       {
+               return tdualquat<T, P>(-q.real,-q.dual);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tdualquat<T, P> operator+(tdualquat<T, P> const & q, tdualquat<T, P> const & p)
+       {
+               return tdualquat<T, P>(q.real + p.real,q.dual + p.dual);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tdualquat<T, P> operator*(tdualquat<T, P> const & p, tdualquat<T, P> const & o)
+       {
+               return tdualquat<T, P>(p.real * o.real,p.real * o.dual + p.dual * o.real);
+       }
+
+       // Transformation
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec3<T, P> operator*(tdualquat<T, P> const & q, tvec3<T, P> const & v)
+       {
+               tvec3<T, P> const real_v3(q.real.x,q.real.y,q.real.z);
+               tvec3<T, P> const dual_v3(q.dual.x,q.dual.y,q.dual.z);
+               return (cross(real_v3, cross(real_v3,v) + v * q.real.w + dual_v3) + dual_v3 * q.real.w - real_v3 * q.dual.w) * T(2) + v;
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec3<T, P> operator*(tvec3<T, P> const & v, tdualquat<T, P> const & q)
+       {
+               return glm::inverse(q) * v;
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec4<T, P> operator*(tdualquat<T, P> const & q, tvec4<T, P> const & v)
+       {
+               return tvec4<T, P>(q * tvec3<T, P>(v), v.w);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec4<T, P> operator*(tvec4<T, P> const & v, tdualquat<T, P> const & q)
+       {
+               return glm::inverse(q) * v;
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tdualquat<T, P> operator*(tdualquat<T, P> const & q, T const & s)
+       {
+               return tdualquat<T, P>(q.real * s, q.dual * s);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tdualquat<T, P> operator*(T const & s, tdualquat<T, P> const & q)
+       {
+               return q * s;
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tdualquat<T, P> operator/(tdualquat<T, P> const & q, T const & s)
+       {
+               return tdualquat<T, P>(q.real / s, q.dual / s);
+       }
+
+       //////////////////////////////////////
+       // Boolean operators
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER bool operator==(tdualquat<T, P> const & q1, tdualquat<T, P> const & q2)
+       {
+               return (q1.real == q2.real) && (q1.dual == q2.dual);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER bool operator!=(tdualquat<T, P> const & q1, tdualquat<T, P> const & q2)
+       {
+               return (q1.real != q2.dual) || (q1.real != q2.dual);
+       }
+
+       ////////////////////////////////////////////////////////
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tdualquat<T, P> normalize(tdualquat<T, P> const & q)
+       {
+               return q / length(q.real);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tdualquat<T, P> lerp(tdualquat<T, P> const & x, tdualquat<T, P> const & y, T const & a)
+       {
+               // Dual Quaternion Linear blend aka DLB:
+               // Lerp is only defined in [0, 1]
+               assert(a >= static_cast<T>(0));
+               assert(a <= static_cast<T>(1));
+               T const k = dot(x.real,y.real) < static_cast<T>(0) ? -a : a;
+               T const one(1);
+               return tdualquat<T, P>(x * (one - a) + y * k);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tdualquat<T, P> inverse(tdualquat<T, P> const & q)
+       {
+               const glm::tquat<T, P> real = conjugate(q.real);
+               const glm::tquat<T, P> dual = conjugate(q.dual);
+               return tdualquat<T, P>(real, dual + (real * (-2.0f * dot(real,dual))));
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat2x4<T, P> mat2x4_cast(tdualquat<T, P> const & x)
+       {
+               return tmat2x4<T, P>( x[0].x, x[0].y, x[0].z, x[0].w, x[1].x, x[1].y, x[1].z, x[1].w );
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat3x4<T, P> mat3x4_cast(tdualquat<T, P> const & x)
+       {
+               tquat<T, P> r = x.real / length2(x.real);
+               
+               tquat<T, P> const rr(r.w * x.real.w, r.x * x.real.x, r.y * x.real.y, r.z * x.real.z);
+               r *= static_cast<T>(2);
+               
+               T const xy = r.x * x.real.y;
+               T const xz = r.x * x.real.z;
+               T const yz = r.y * x.real.z;
+               T const wx = r.w * x.real.x;
+               T const wy = r.w * x.real.y;
+               T const wz = r.w * x.real.z;
+               
+               tvec4<T, P> const a(
+                       rr.w + rr.x - rr.y - rr.z,
+                       xy - wz,
+                       xz + wy,
+                       -(x.dual.w * r.x - x.dual.x * r.w + x.dual.y * r.z - x.dual.z * r.y));
+               
+               tvec4<T, P> const b(
+                       xy + wz,
+                       rr.w + rr.y - rr.x - rr.z,
+                       yz - wx,
+                       -(x.dual.w * r.y - x.dual.x * r.z - x.dual.y * r.w + x.dual.z * r.x));
+               
+               tvec4<T, P> const c(
+                       xz - wy,
+                       yz + wx,
+                       rr.w + rr.z - rr.x - rr.y,
+                       -(x.dual.w * r.z + x.dual.x * r.y - x.dual.y * r.x - x.dual.z * r.w));
+               
+               return tmat3x4<T, P>(a, b, c);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tdualquat<T, P> dualquat_cast(tmat2x4<T, P> const & x)
+       {
+               return tdualquat<T, P>(
+                       tquat<T, P>( x[0].w, x[0].x, x[0].y, x[0].z ),
+                       tquat<T, P>( x[1].w, x[1].x, x[1].y, x[1].z ));
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tdualquat<T, P> dualquat_cast(tmat3x4<T, P> const & x)
+       {
+               tquat<T, P> real(uninitialize);
+               
+               T const trace = x[0].x + x[1].y + x[2].z;
+               if(trace > static_cast<T>(0))
+               {
+                       T const r = sqrt(T(1) + trace);
+                       T const invr = static_cast<T>(0.5) / r;
+                       real.w = static_cast<T>(0.5) * r;
+                       real.x = (x[2].y - x[1].z) * invr;
+                       real.y = (x[0].z - x[2].x) * invr;
+                       real.z = (x[1].x - x[0].y) * invr;
+               }
+               else if(x[0].x > x[1].y && x[0].x > x[2].z)
+               {
+                       T const r = sqrt(T(1) + x[0].x - x[1].y - x[2].z);
+                       T const invr = static_cast<T>(0.5) / r;
+                       real.x = static_cast<T>(0.5)*r;
+                       real.y = (x[1].x + x[0].y) * invr;
+                       real.z = (x[0].z + x[2].x) * invr;
+                       real.w = (x[2].y - x[1].z) * invr;
+               }
+               else if(x[1].y > x[2].z)
+               {
+                       T const r = sqrt(T(1) + x[1].y - x[0].x - x[2].z);
+                       T const invr = static_cast<T>(0.5) / r;
+                       real.x = (x[1].x + x[0].y) * invr;
+                       real.y = static_cast<T>(0.5) * r;
+                       real.z = (x[2].y + x[1].z) * invr;
+                       real.w = (x[0].z - x[2].x) * invr;
+               }
+               else
+               {
+                       T const r = sqrt(T(1) + x[2].z - x[0].x - x[1].y);
+                       T const invr = static_cast<T>(0.5) / r;
+                       real.x = (x[0].z + x[2].x) * invr;
+                       real.y = (x[2].y + x[1].z) * invr;
+                       real.z = static_cast<T>(0.5) * r;
+                       real.w = (x[1].x - x[0].y) * invr;
+               }
+               
+               tquat<T, P> dual(uninitialize);
+               dual.x =  static_cast<T>(0.5) * ( x[0].w * real.w + x[1].w * real.z - x[2].w * real.y);
+               dual.y =  static_cast<T>(0.5) * (-x[0].w * real.z + x[1].w * real.w + x[2].w * real.x);
+               dual.z =  static_cast<T>(0.5) * ( x[0].w * real.y - x[1].w * real.x + x[2].w * real.w);
+               dual.w = -static_cast<T>(0.5) * ( x[0].w * real.x + x[1].w * real.y + x[2].w * real.z);
+               return tdualquat<T, P>(real, dual);
+       }
+}//namespace glm
diff --git a/include/glm/gtx/euler_angles.hpp b/include/glm/gtx/euler_angles.hpp
new file mode 100644 (file)
index 0000000..7a1cb36
--- /dev/null
@@ -0,0 +1,156 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtx_euler_angles
+/// @file glm/gtx/euler_angles.hpp
+/// @date 2005-12-21 / 2011-06-07
+/// @author Christophe Riccio
+///
+/// @see core (dependence)
+/// @see gtc_half_float (dependence)
+///
+/// @defgroup gtx_euler_angles GLM_GTX_euler_angles
+/// @ingroup gtx
+/// 
+/// @brief Build matrices from Euler angles.
+/// 
+/// <glm/gtx/euler_angles.hpp> need to be included to use these functionalities.
+///////////////////////////////////////////////////////////////////////////////////
+
+#pragma once
+
+// Dependency:
+#include "../glm.hpp"
+
+#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
+#      pragma message("GLM: GLM_GTX_euler_angles extension included")
+#endif
+
+namespace glm
+{
+       /// @addtogroup gtx_euler_angles
+       /// @{
+
+       /// Creates a 3D 4 * 4 homogeneous rotation matrix from an euler angle X.
+       /// @see gtx_euler_angles
+       template <typename T>
+       GLM_FUNC_DECL tmat4x4<T, defaultp> eulerAngleX(
+               T const & angleX);
+
+       /// Creates a 3D 4 * 4 homogeneous rotation matrix from an euler angle Y.
+       /// @see gtx_euler_angles
+       template <typename T>
+       GLM_FUNC_DECL tmat4x4<T, defaultp> eulerAngleY(
+               T const & angleY);
+
+       /// Creates a 3D 4 * 4 homogeneous rotation matrix from an euler angle Z.
+       /// @see gtx_euler_angles
+       template <typename T>
+       GLM_FUNC_DECL tmat4x4<T, defaultp> eulerAngleZ(
+               T const & angleZ);
+
+       /// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (X * Y).
+       /// @see gtx_euler_angles
+       template <typename T>
+       GLM_FUNC_DECL tmat4x4<T, defaultp> eulerAngleXY(
+               T const & angleX,
+               T const & angleY);
+
+       /// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * X).
+       /// @see gtx_euler_angles
+       template <typename T>
+       GLM_FUNC_DECL tmat4x4<T, defaultp> eulerAngleYX(
+               T const & angleY,
+               T const & angleX);
+
+       /// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (X * Z).
+       /// @see gtx_euler_angles
+       template <typename T>
+       GLM_FUNC_DECL tmat4x4<T, defaultp> eulerAngleXZ(
+               T const & angleX,
+               T const & angleZ);
+
+       /// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Z * X).
+       /// @see gtx_euler_angles
+       template <typename T>
+       GLM_FUNC_DECL tmat4x4<T, defaultp> eulerAngleZX(
+               T const & angle,
+               T const & angleX);
+
+       /// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * Z).
+       /// @see gtx_euler_angles
+       template <typename T>
+       GLM_FUNC_DECL tmat4x4<T, defaultp> eulerAngleYZ(
+               T const & angleY,
+               T const & angleZ);
+
+       /// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Z * Y).
+       /// @see gtx_euler_angles
+       template <typename T>
+       GLM_FUNC_DECL tmat4x4<T, defaultp> eulerAngleZY(
+               T const & angleZ,
+               T const & angleY);
+
+       /// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * X * Z).
+       /// @see gtx_euler_angles
+       template <typename T>
+       GLM_FUNC_DECL tmat4x4<T, defaultp> eulerAngleYXZ(
+               T const & yaw,
+               T const & pitch,
+               T const & roll);
+
+       /// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * X * Z).
+       /// @see gtx_euler_angles
+       template <typename T>
+       GLM_FUNC_DECL tmat4x4<T, defaultp> yawPitchRoll(
+               T const & yaw,
+               T const & pitch,
+               T const & roll);
+
+       /// Creates a 2D 2 * 2 rotation matrix from an euler angle.
+       /// @see gtx_euler_angles
+       template <typename T>
+       GLM_FUNC_DECL tmat2x2<T, defaultp> orientate2(T const & angle);
+
+       /// Creates a 2D 4 * 4 homogeneous rotation matrix from an euler angle.
+       /// @see gtx_euler_angles
+       template <typename T>
+       GLM_FUNC_DECL tmat3x3<T, defaultp> orientate3(T const & angle);
+
+       /// Creates a 3D 3 * 3 rotation matrix from euler angles (Y * X * Z). 
+       /// @see gtx_euler_angles
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat3x3<T, P> orientate3(tvec3<T, P> const & angles);
+               
+       /// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * X * Z).
+       /// @see gtx_euler_angles
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat4x4<T, P> orientate4(tvec3<T, P> const & angles);
+
+       /// @}
+}//namespace glm
+
+#include "euler_angles.inl"
diff --git a/include/glm/gtx/euler_angles.inl b/include/glm/gtx/euler_angles.inl
new file mode 100644 (file)
index 0000000..77fea42
--- /dev/null
@@ -0,0 +1,287 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtx_euler_angles
+/// @file glm/gtx/euler_angles.inl
+/// @date 2005-12-21 / 2011-06-07
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+namespace glm
+{
+       template <typename T>
+       GLM_FUNC_QUALIFIER tmat4x4<T, defaultp> eulerAngleX
+       (
+               T const & angleX
+       )
+       {
+               T cosX = glm::cos(angleX);
+               T sinX = glm::sin(angleX);
+       
+               return tmat4x4<T, defaultp>(
+                       T(1), T(0), T(0), T(0),
+                       T(0), cosX, sinX, T(0),
+                       T(0),-sinX, cosX, T(0),
+                       T(0), T(0), T(0), T(1));
+       }
+
+       template <typename T>
+       GLM_FUNC_QUALIFIER tmat4x4<T, defaultp> eulerAngleY
+       (
+               T const & angleY
+       )
+       {
+               T cosY = glm::cos(angleY);
+               T sinY = glm::sin(angleY);
+
+               return tmat4x4<T, defaultp>(
+                       cosY,   T(0),   -sinY,  T(0),
+                       T(0),   T(1),   T(0),   T(0),
+                       sinY,   T(0),   cosY,   T(0),
+                       T(0),   T(0),   T(0),   T(1));
+       }
+
+       template <typename T>
+       GLM_FUNC_QUALIFIER tmat4x4<T, defaultp> eulerAngleZ
+       (
+               T const & angleZ
+       )
+       {
+               T cosZ = glm::cos(angleZ);
+               T sinZ = glm::sin(angleZ);
+
+               return tmat4x4<T, defaultp>(
+                       cosZ,   sinZ,   T(0), T(0),
+                       -sinZ,  cosZ,   T(0), T(0),
+                       T(0),   T(0),   T(1), T(0),
+                       T(0),   T(0),   T(0), T(1));
+       }
+
+       template <typename T>
+       GLM_FUNC_QUALIFIER tmat4x4<T, defaultp> eulerAngleXY
+       (
+               T const & angleX,
+               T const & angleY
+       )
+       {
+               T cosX = glm::cos(angleX);
+               T sinX = glm::sin(angleX);
+               T cosY = glm::cos(angleY);
+               T sinY = glm::sin(angleY);
+
+               return tmat4x4<T, defaultp>(
+                       cosY,   -sinX * -sinY,  cosX * -sinY,   T(0),
+                       T(0),   cosX,           sinX,           T(0),
+                       sinY,   -sinX * cosY,   cosX * cosY,    T(0),
+                       T(0),   T(0),           T(0),           T(1));
+       }
+
+       template <typename T>
+       GLM_FUNC_QUALIFIER tmat4x4<T, defaultp> eulerAngleYX
+       (
+               T const & angleY,
+               T const & angleX
+       )
+       {
+               T cosX = glm::cos(angleX);
+               T sinX = glm::sin(angleX);
+               T cosY = glm::cos(angleY);
+               T sinY = glm::sin(angleY);
+
+               return tmat4x4<T, defaultp>(
+                       cosY,          0,      -sinY,    T(0),
+                       sinY * sinX,  cosX, cosY * sinX, T(0),
+                       sinY * cosX, -sinX, cosY * cosX, T(0),
+                       T(0),         T(0),     T(0),    T(1));
+       }
+
+       template <typename T>
+       GLM_FUNC_QUALIFIER tmat4x4<T, defaultp> eulerAngleXZ
+       (
+               T const & angleX,
+               T const & angleZ
+       )
+       {
+               return eulerAngleX(angleX) * eulerAngleZ(angleZ);
+       }
+
+       template <typename T>
+       GLM_FUNC_QUALIFIER tmat4x4<T, defaultp> eulerAngleZX
+       (
+               T const & angleZ,
+               T const & angleX
+       )
+       {
+               return eulerAngleZ(angleZ) * eulerAngleX(angleX);
+       }
+
+       template <typename T>
+       GLM_FUNC_QUALIFIER tmat4x4<T, defaultp> eulerAngleYZ
+       (
+               T const & angleY,
+               T const & angleZ
+       )
+       {
+               return eulerAngleY(angleY) * eulerAngleZ(angleZ);
+       }
+
+       template <typename T>
+       GLM_FUNC_QUALIFIER tmat4x4<T, defaultp> eulerAngleZY
+       (
+               T const & angleZ,
+               T const & angleY
+       )
+       {
+               return eulerAngleZ(angleZ) * eulerAngleY(angleY);
+       }
+
+       template <typename T>
+       GLM_FUNC_QUALIFIER tmat4x4<T, defaultp> eulerAngleYXZ
+       (
+               T const & yaw,
+               T const & pitch,
+               T const & roll
+       )
+       {
+               T tmp_ch = glm::cos(yaw);
+               T tmp_sh = glm::sin(yaw);
+               T tmp_cp = glm::cos(pitch);
+               T tmp_sp = glm::sin(pitch);
+               T tmp_cb = glm::cos(roll);
+               T tmp_sb = glm::sin(roll);
+
+               tmat4x4<T, defaultp> Result;
+               Result[0][0] = tmp_ch * tmp_cb + tmp_sh * tmp_sp * tmp_sb;
+               Result[0][1] = tmp_sb * tmp_cp;
+               Result[0][2] = -tmp_sh * tmp_cb + tmp_ch * tmp_sp * tmp_sb;
+               Result[0][3] = static_cast<T>(0);
+               Result[1][0] = -tmp_ch * tmp_sb + tmp_sh * tmp_sp * tmp_cb;
+               Result[1][1] = tmp_cb * tmp_cp;
+               Result[1][2] = tmp_sb * tmp_sh + tmp_ch * tmp_sp * tmp_cb;
+               Result[1][3] = static_cast<T>(0);
+               Result[2][0] = tmp_sh * tmp_cp;
+               Result[2][1] = -tmp_sp;
+               Result[2][2] = tmp_ch * tmp_cp;
+               Result[2][3] = static_cast<T>(0);
+               Result[3][0] = static_cast<T>(0);
+               Result[3][1] = static_cast<T>(0);
+               Result[3][2] = static_cast<T>(0);
+               Result[3][3] = static_cast<T>(1);
+               return Result;
+       }
+
+       template <typename T>
+       GLM_FUNC_QUALIFIER tmat4x4<T, defaultp> yawPitchRoll
+       (
+               T const & yaw,
+               T const & pitch,
+               T const & roll
+       )
+       {
+               T tmp_ch = glm::cos(yaw);
+               T tmp_sh = glm::sin(yaw);
+               T tmp_cp = glm::cos(pitch);
+               T tmp_sp = glm::sin(pitch);
+               T tmp_cb = glm::cos(roll);
+               T tmp_sb = glm::sin(roll);
+
+               tmat4x4<T, defaultp> Result;
+               Result[0][0] = tmp_ch * tmp_cb + tmp_sh * tmp_sp * tmp_sb;
+               Result[0][1] = tmp_sb * tmp_cp;
+               Result[0][2] = -tmp_sh * tmp_cb + tmp_ch * tmp_sp * tmp_sb;
+               Result[0][3] = static_cast<T>(0);
+               Result[1][0] = -tmp_ch * tmp_sb + tmp_sh * tmp_sp * tmp_cb;
+               Result[1][1] = tmp_cb * tmp_cp;
+               Result[1][2] = tmp_sb * tmp_sh + tmp_ch * tmp_sp * tmp_cb;
+               Result[1][3] = static_cast<T>(0);
+               Result[2][0] = tmp_sh * tmp_cp;
+               Result[2][1] = -tmp_sp;
+               Result[2][2] = tmp_ch * tmp_cp;
+               Result[2][3] = static_cast<T>(0);
+               Result[3][0] = static_cast<T>(0);
+               Result[3][1] = static_cast<T>(0);
+               Result[3][2] = static_cast<T>(0);
+               Result[3][3] = static_cast<T>(1);
+               return Result;
+       }
+
+       template <typename T>
+       GLM_FUNC_QUALIFIER tmat2x2<T, defaultp> orientate2
+       (
+               T const & angle
+       )
+       {
+               T c = glm::cos(angle);
+               T s = glm::sin(angle);
+
+               tmat2x2<T, defaultp> Result;
+               Result[0][0] = c;
+               Result[0][1] = s;
+               Result[1][0] = -s;
+               Result[1][1] = c;
+               return Result;
+       }
+
+       template <typename T>
+       GLM_FUNC_QUALIFIER tmat3x3<T, defaultp> orientate3
+       (
+               T const & angle
+       )
+       {
+               T c = glm::cos(angle);
+               T s = glm::sin(angle);
+
+               tmat3x3<T, defaultp> Result;
+               Result[0][0] = c;
+               Result[0][1] = s;
+               Result[0][2] = 0.0f;
+               Result[1][0] = -s;
+               Result[1][1] = c;
+               Result[1][2] = 0.0f;
+               Result[2][0] = 0.0f;
+               Result[2][1] = 0.0f;
+               Result[2][2] = 1.0f;
+               return Result;
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat3x3<T, P> orientate3
+       (
+               tvec3<T, P> const & angles
+       )
+       {
+               return tmat3x3<T, P>(yawPitchRoll(angles.z, angles.x, angles.y));
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat4x4<T, P> orientate4
+       (
+               tvec3<T, P> const & angles
+       )
+       {
+               return yawPitchRoll(angles.z, angles.x, angles.y);
+       }
+}//namespace glm
diff --git a/include/glm/gtx/extend.hpp b/include/glm/gtx/extend.hpp
new file mode 100644 (file)
index 0000000..ad3a50a
--- /dev/null
@@ -0,0 +1,67 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtx_extend
+/// @file glm/gtx/extend.hpp
+/// @date 2006-01-07 / 2011-06-07
+/// @author Christophe Riccio
+///
+/// @see core (dependence)
+///
+/// @defgroup gtx_extend GLM_GTX_extend
+/// @ingroup gtx
+/// 
+/// @brief Extend a position from a source to a position at a defined length.
+/// 
+/// <glm/gtx/extend.hpp> need to be included to use these functionalities.
+///////////////////////////////////////////////////////////////////////////////////
+
+#pragma once
+
+// Dependency:
+#include "../glm.hpp"
+
+#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
+#      pragma message("GLM: GLM_GTX_extend extension included")
+#endif
+
+namespace glm
+{
+       /// @addtogroup gtx_extend
+       /// @{
+
+       /// Extends of Length the Origin position using the (Source - Origin) direction.
+       /// @see gtx_extend
+       template <typename genType> 
+       GLM_FUNC_DECL genType extend(
+               genType const & Origin, 
+               genType const & Source, 
+               typename genType::value_type const Length);
+
+       /// @}
+}//namespace glm
+
+#include "extend.inl"
diff --git a/include/glm/gtx/extend.inl b/include/glm/gtx/extend.inl
new file mode 100644 (file)
index 0000000..c8768e2
--- /dev/null
@@ -0,0 +1,78 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtx_extend
+/// @file glm/gtx/extend.inl
+/// @date 2006-01-07 / 2011-06-07
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+namespace glm
+{
+       template <typename genType>
+       GLM_FUNC_QUALIFIER genType extend
+       (
+               genType const & Origin, 
+               genType const & Source, 
+               genType const & Distance
+       )
+       {
+               return Origin + (Source - Origin) * Distance;
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec2<T, P> extend
+       (
+               tvec2<T, P> const & Origin,
+               tvec2<T, P> const & Source,
+               T const & Distance
+       )
+       {
+               return Origin + (Source - Origin) * Distance;
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec3<T, P> extend
+       (
+               tvec3<T, P> const & Origin,
+               tvec3<T, P> const & Source,
+               T const & Distance
+       )
+       {
+               return Origin + (Source - Origin) * Distance;
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec4<T, P> extend
+       (
+               tvec4<T, P> const & Origin,
+               tvec4<T, P> const & Source,
+               T const & Distance
+       )
+       {
+               return Origin + (Source - Origin) * Distance;
+       }
+}//namespace glm
diff --git a/include/glm/gtx/extented_min_max.hpp b/include/glm/gtx/extented_min_max.hpp
new file mode 100644 (file)
index 0000000..08d56f1
--- /dev/null
@@ -0,0 +1,162 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtx_extented_min_max
+/// @file glm/gtx/extented_min_max.hpp
+/// @date 2007-03-14 / 2011-06-07
+/// @author Christophe Riccio
+///
+/// @see core (dependence)
+/// @see gtx_half_float (dependence)
+///
+/// @defgroup gtx_extented_min_max GLM_GTX_extented_min_max
+/// @ingroup gtx
+/// 
+/// Min and max functions for 3 to 4 parameters.
+/// 
+/// <glm/gtx/extented_min_max.hpp> need to be included to use these functionalities.
+///////////////////////////////////////////////////////////////////////////////////
+
+#pragma once
+
+// Dependency:
+#include "../glm.hpp"
+
+#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
+#      pragma message("GLM: GLM_GTX_extented_min_max extension included")
+#endif
+
+namespace glm
+{
+       /// @addtogroup gtx_extented_min_max
+       /// @{
+
+       /// Return the minimum component-wise values of 3 inputs 
+       /// @see gtx_extented_min_max
+       template <typename T>
+       GLM_FUNC_DECL T min(
+               T const & x, 
+               T const & y, 
+               T const & z);
+
+       /// Return the minimum component-wise values of 3 inputs
+       /// @see gtx_extented_min_max
+       template <typename T, template <typename> class C>
+       GLM_FUNC_DECL C<T> min(
+               C<T> const & x, 
+               typename C<T>::T const & y, 
+               typename C<T>::T const & z);
+
+       /// Return the minimum component-wise values of 3 inputs 
+       /// @see gtx_extented_min_max
+       template <typename T, template <typename> class C>
+       GLM_FUNC_DECL C<T> min(
+               C<T> const & x, 
+               C<T> const & y, 
+               C<T> const & z);
+
+       /// Return the minimum component-wise values of 4 inputs 
+       /// @see gtx_extented_min_max
+       template <typename T>
+       GLM_FUNC_DECL T min(
+               T const & x, 
+               T const & y, 
+               T const & z, 
+               T const & w);
+
+       /// Return the minimum component-wise values of 4 inputs 
+       /// @see gtx_extented_min_max
+       template <typename T, template <typename> class C>
+       GLM_FUNC_DECL C<T> min(
+               C<T> const & x, 
+               typename C<T>::T const & y, 
+               typename C<T>::T const & z, 
+               typename C<T>::T const & w);
+
+       /// Return the minimum component-wise values of 4 inputs
+       /// @see gtx_extented_min_max
+       template <typename T, template <typename> class C>
+       GLM_FUNC_DECL C<T> min(
+               C<T> const & x, 
+               C<T> const & y, 
+               C<T> const & z,
+               C<T> const & w);
+
+       /// Return the maximum component-wise values of 3 inputs 
+       /// @see gtx_extented_min_max
+       template <typename T>
+       GLM_FUNC_DECL T max(
+               T const & x, 
+               T const & y, 
+               T const & z);
+
+       /// Return the maximum component-wise values of 3 inputs
+       /// @see gtx_extented_min_max
+       template <typename T, template <typename> class C>
+       GLM_FUNC_DECL C<T> max(
+               C<T> const & x, 
+               typename C<T>::T const & y, 
+               typename C<T>::T const & z);
+
+       /// Return the maximum component-wise values of 3 inputs 
+       /// @see gtx_extented_min_max
+       template <typename T, template <typename> class C>
+       GLM_FUNC_DECL C<T> max(
+               C<T> const & x, 
+               C<T> const & y, 
+               C<T> const & z);
+
+       /// Return the maximum component-wise values of 4 inputs
+       /// @see gtx_extented_min_max
+       template <typename T>
+       GLM_FUNC_DECL T max(
+               T const & x, 
+               T const & y, 
+               T const & z, 
+               T const & w);
+
+       /// Return the maximum component-wise values of 4 inputs 
+       /// @see gtx_extented_min_max
+       template <typename T, template <typename> class C>
+       GLM_FUNC_DECL C<T> max(
+               C<T> const & x, 
+               typename C<T>::T const & y, 
+               typename C<T>::T const & z, 
+               typename C<T>::T const & w);
+
+       /// Return the maximum component-wise values of 4 inputs 
+       /// @see gtx_extented_min_max
+       template <typename T, template <typename> class C>
+       GLM_FUNC_DECL C<T> max(
+               C<T> const & x, 
+               C<T> const & y, 
+               C<T> const & z, 
+               C<T> const & w);
+
+       /// @}
+}//namespace glm
+
+#include "extented_min_max.inl"
diff --git a/include/glm/gtx/extented_min_max.inl b/include/glm/gtx/extented_min_max.inl
new file mode 100644 (file)
index 0000000..e54c847
--- /dev/null
@@ -0,0 +1,169 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtx_extented_min_max
+/// @file glm/gtx/extented_min_max.inl
+/// @date 2007-03-14 / 2011-06-07
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+namespace glm
+{
+       template <typename T>
+       GLM_FUNC_QUALIFIER T min(
+               T const & x, 
+               T const & y, 
+               T const & z)
+       {
+               return glm::min(glm::min(x, y), z);
+       }
+
+       template <typename T, template <typename> class C>
+       GLM_FUNC_QUALIFIER C<T> min
+       (
+               C<T> const & x, 
+               typename C<T>::T const & y, 
+               typename C<T>::T const & z
+       )
+       {
+               return glm::min(glm::min(x, y), z);
+       }
+
+       template <typename T, template <typename> class C>
+       GLM_FUNC_QUALIFIER C<T> min
+       (
+               C<T> const & x, 
+               C<T> const & y, 
+               C<T> const & z
+       )
+       {
+               return glm::min(glm::min(x, y), z);
+       }
+
+       template <typename T>
+       GLM_FUNC_QUALIFIER T min
+       (
+               T const & x, 
+               T const & y, 
+               T const & z, 
+               T const & w
+       )
+       {
+               return glm::min(glm::min(x, y), glm::min(z, w));
+       }
+
+       template <typename T, template <typename> class C>
+       GLM_FUNC_QUALIFIER C<T> min
+       (
+               C<T> const & x, 
+               typename C<T>::T const & y, 
+               typename C<T>::T const & z, 
+               typename C<T>::T const & w
+       )
+       {
+               return glm::min(glm::min(x, y), glm::min(z, w));
+       }
+
+       template <typename T, template <typename> class C>
+       GLM_FUNC_QUALIFIER C<T> min
+       (
+               C<T> const & x, 
+               C<T> const & y, 
+               C<T> const & z, 
+               C<T> const & w
+       )
+       {
+               return glm::min(glm::min(x, y), glm::min(z, w));
+       }
+
+       template <typename T>
+       GLM_FUNC_QUALIFIER T max(
+               T const & x, 
+               T const & y, 
+               T const & z)
+       {
+               return glm::max(glm::max(x, y), z);
+       }
+
+       template <typename T, template <typename> class C>
+       GLM_FUNC_QUALIFIER C<T> max
+       (
+               C<T> const & x, 
+               typename C<T>::T const & y, 
+               typename C<T>::T const & z
+       )
+       {
+               return glm::max(glm::max(x, y), z);
+       }
+
+       template <typename T, template <typename> class C>
+       GLM_FUNC_QUALIFIER C<T> max
+       (
+               C<T> const & x, 
+               C<T> const & y, 
+               C<T> const & z
+       )
+       {
+               return glm::max(glm::max(x, y), z);
+       }
+
+       template <typename T>
+       GLM_FUNC_QUALIFIER T max
+       (
+               T const & x, 
+               T const & y, 
+               T const & z, 
+               T const & w
+       )
+       {
+               return glm::max(glm::max(x, y), glm::max(z, w));
+       }
+
+       template <typename T, template <typename> class C>
+       GLM_FUNC_QUALIFIER C<T> max
+       (
+               C<T> const & x, 
+               typename C<T>::T const & y, 
+               typename C<T>::T const & z, 
+               typename C<T>::T const & w
+       )
+       {
+               return glm::max(glm::max(x, y), glm::max(z, w));
+       }
+
+       template <typename T, template <typename> class C>
+       GLM_FUNC_QUALIFIER C<T> max
+       (
+               C<T> const & x, 
+               C<T> const & y, 
+               C<T> const & z, 
+               C<T> const & w
+       )
+       {
+               return glm::max(glm::max(x, y), glm::max(z, w));
+       }
+
+}//namespace glm
diff --git a/include/glm/gtx/fast_exponential.hpp b/include/glm/gtx/fast_exponential.hpp
new file mode 100644 (file)
index 0000000..15b7d1d
--- /dev/null
@@ -0,0 +1,120 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtx_fast_exponential
+/// @file glm/gtx/fast_exponential.hpp
+/// @date 2006-01-09 / 2011-06-07
+/// @author Christophe Riccio
+///
+/// @see core (dependence)
+/// @see gtx_half_float (dependence)
+///
+/// @defgroup gtx_fast_exponential GLM_GTX_fast_exponential
+/// @ingroup gtx
+/// 
+/// @brief Fast but less accurate implementations of exponential based functions.
+/// 
+/// <glm/gtx/fast_exponential.hpp> need to be included to use these functionalities.
+///////////////////////////////////////////////////////////////////////////////////
+
+#pragma once
+
+// Dependency:
+#include "../glm.hpp"
+
+#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
+#      pragma message("GLM: GLM_GTX_fast_exponential extension included")
+#endif
+
+namespace glm
+{
+       /// @addtogroup gtx_fast_exponential
+       /// @{
+
+       /// Faster than the common pow function but less accurate.
+       /// @see gtx_fast_exponential
+       template <typename genType>
+       GLM_FUNC_DECL genType fastPow(genType x, genType y);
+
+       /// Faster than the common pow function but less accurate.
+       /// @see gtx_fast_exponential
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_DECL vecType<T, P> fastPow(vecType<T, P> const & x, vecType<T, P> const & y);
+
+       /// Faster than the common pow function but less accurate.
+       /// @see gtx_fast_exponential
+       template <typename genTypeT, typename genTypeU>
+       GLM_FUNC_DECL genTypeT fastPow(genTypeT x, genTypeU y);
+
+       /// Faster than the common pow function but less accurate.
+       /// @see gtx_fast_exponential
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_DECL vecType<T, P> fastPow(vecType<T, P> const & x);
+
+       /// Faster than the common exp function but less accurate.
+       /// @see gtx_fast_exponential
+       template <typename T>
+       GLM_FUNC_DECL T fastExp(T x);
+
+       /// Faster than the common exp function but less accurate.
+       /// @see gtx_fast_exponential
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_DECL vecType<T, P> fastExp(vecType<T, P> const & x);
+
+       /// Faster than the common log function but less accurate.
+       /// @see gtx_fast_exponential
+       template <typename T>
+       GLM_FUNC_DECL T fastLog(T x);
+
+       /// Faster than the common exp2 function but less accurate.
+       /// @see gtx_fast_exponential
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_DECL vecType<T, P> fastLog(vecType<T, P> const & x);
+
+       /// Faster than the common exp2 function but less accurate.
+       /// @see gtx_fast_exponential
+       template <typename T>
+       GLM_FUNC_DECL T fastExp2(T x);
+
+       /// Faster than the common exp2 function but less accurate.
+       /// @see gtx_fast_exponential
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_DECL vecType<T, P> fastExp2(vecType<T, P> const & x);
+
+       /// Faster than the common log2 function but less accurate.
+       /// @see gtx_fast_exponential
+       template <typename T>
+       GLM_FUNC_DECL T fastLog2(T x);
+
+       /// Faster than the common log2 function but less accurate.
+       /// @see gtx_fast_exponential
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_DECL vecType<T, P> fastLog2(vecType<T, P> const & x);
+
+       /// @}
+}//namespace glm
+
+#include "fast_exponential.inl"
diff --git a/include/glm/gtx/fast_exponential.inl b/include/glm/gtx/fast_exponential.inl
new file mode 100644 (file)
index 0000000..9cf882c
--- /dev/null
@@ -0,0 +1,166 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtx_fast_exponential
+/// @file glm/gtx/fast_exponential.inl
+/// @date 2006-01-09 / 2011-06-07
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+namespace glm
+{
+       // fastPow:
+       template <typename genType>
+       GLM_FUNC_QUALIFIER genType fastPow(genType x, genType y)
+       {
+               return exp(y * log(x));
+       }
+
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_QUALIFIER vecType<T, P> fastPow(vecType<T, P> const & x, vecType<T, P> const & y)
+       {
+               return exp(y * log(x));
+       }
+
+       template <typename T>
+       GLM_FUNC_QUALIFIER T fastPow(T x, int y)
+       {
+               T f = static_cast<T>(1);
+               for(int i = 0; i < y; ++i)
+                       f *= x;
+               return f;
+       }
+
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_QUALIFIER vecType<T, P> fastPow(vecType<T, P> const & x, vecType<int, P> const & y)
+       {
+               vecType<T, P> Result(uninitialize);
+               for(detail::component_count_t i = 0; i < detail::component_count(x); ++i)
+                       Result[i] = fastPow(x[i], y[i]);
+               return Result;
+       }
+
+       // fastExp
+       // Note: This function provides accurate results only for value between -1 and 1, else avoid it.
+       template <typename T>
+       GLM_FUNC_QUALIFIER T fastExp(T x)
+       {
+               // This has a better looking and same performance in release mode than the following code. However, in debug mode it's slower.
+               // return 1.0f + x * (1.0f + x * 0.5f * (1.0f + x * 0.3333333333f * (1.0f + x * 0.25 * (1.0f + x * 0.2f))));
+               T x2 = x * x;
+               T x3 = x2 * x;
+               T x4 = x3 * x;
+               T x5 = x4 * x;
+               return T(1) + x + (x2 * T(0.5)) + (x3 * T(0.1666666667)) + (x4 * T(0.041666667)) + (x5 * T(0.008333333333));
+       }
+       /*  // Try to handle all values of float... but often shower than std::exp, glm::floor and the loop kill the performance
+       GLM_FUNC_QUALIFIER float fastExp(float x)
+       {
+               const float e = 2.718281828f;
+               const float IntegerPart = floor(x);
+               const float FloatPart = x - IntegerPart;
+               float z = 1.f;
+
+               for(int i = 0; i < int(IntegerPart); ++i)
+                       z *= e;
+
+               const float x2 = FloatPart * FloatPart;
+               const float x3 = x2 * FloatPart;
+               const float x4 = x3 * FloatPart;
+               const float x5 = x4 * FloatPart;
+               return z * (1.0f + FloatPart + (x2 * 0.5f) + (x3 * 0.1666666667f) + (x4 * 0.041666667f) + (x5 * 0.008333333333f));
+       }
+
+       // Increase accuracy on number bigger that 1 and smaller than -1 but it's not enough for high and negative numbers
+       GLM_FUNC_QUALIFIER float fastExp(float x)
+       {
+               // This has a better looking and same performance in release mode than the following code. However, in debug mode it's slower.
+               // return 1.0f + x * (1.0f + x * 0.5f * (1.0f + x * 0.3333333333f * (1.0f + x * 0.25 * (1.0f + x * 0.2f))));
+               float x2 = x * x;
+               float x3 = x2 * x;
+               float x4 = x3 * x;
+               float x5 = x4 * x;
+               float x6 = x5 * x;
+               float x7 = x6 * x;
+               float x8 = x7 * x;
+               return 1.0f + x + (x2 * 0.5f) + (x3 * 0.1666666667f) + (x4 * 0.041666667f) + (x5 * 0.008333333333f)+ (x6 * 0.00138888888888f) + (x7 * 0.000198412698f) + (x8 * 0.0000248015873f);;
+       }
+       */
+
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_QUALIFIER vecType<T, P> fastExp(vecType<T, P> const & x)
+       {
+               return detail::functor1<T, T, P, vecType>::call(fastExp, x);
+       }
+
+       // fastLog
+       template <typename genType>
+       GLM_FUNC_QUALIFIER genType fastLog(genType x)
+       {
+               return std::log(x);
+       }
+
+       /* Slower than the VC7.1 function...
+       GLM_FUNC_QUALIFIER float fastLog(float x)
+       {
+               float y1 = (x - 1.0f) / (x + 1.0f);
+               float y2 = y1 * y1;
+               return 2.0f * y1 * (1.0f + y2 * (0.3333333333f + y2 * (0.2f + y2 * 0.1428571429f)));
+       }
+       */
+
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_QUALIFIER vecType<T, P> fastLog(vecType<T, P> const & x)
+       {
+               return detail::functor1<T, T, P, vecType>::call(fastLog, x);
+       }
+
+       //fastExp2, ln2 = 0.69314718055994530941723212145818f
+       template <typename genType>
+       GLM_FUNC_QUALIFIER genType fastExp2(genType x)
+       {
+               return fastExp(0.69314718055994530941723212145818f * x);
+       }
+
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_QUALIFIER vecType<T, P> fastExp2(vecType<T, P> const & x)
+       {
+               return detail::functor1<T, T, P, vecType>::call(fastExp2, x);
+       }
+
+       // fastLog2, ln2 = 0.69314718055994530941723212145818f
+       template <typename genType>
+       GLM_FUNC_QUALIFIER genType fastLog2(genType x)
+       {
+               return fastLog(x) / 0.69314718055994530941723212145818f;
+       }
+
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_QUALIFIER vecType<T, P> fastLog2(vecType<T, P> const & x)
+       {
+               return detail::functor1<T, T, P, vecType>::call(fastLog2, x);
+       }
+}//namespace glm
diff --git a/include/glm/gtx/fast_square_root.hpp b/include/glm/gtx/fast_square_root.hpp
new file mode 100644 (file)
index 0000000..2073df4
--- /dev/null
@@ -0,0 +1,117 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtx_fast_square_root
+/// @file glm/gtx/fast_square_root.hpp
+/// @date 2006-01-04 / 2011-06-07
+/// @author Christophe Riccio
+///
+/// @see core (dependence)
+///
+/// @defgroup gtx_fast_square_root GLM_GTX_fast_square_root
+/// @ingroup gtx
+/// 
+/// @brief Fast but less accurate implementations of square root based functions.
+/// - Sqrt optimisation based on Newton's method, 
+/// www.gamedev.net/community/forums/topic.asp?topic id=139956
+/// 
+/// <glm/gtx/fast_square_root.hpp> need to be included to use these functionalities.
+///////////////////////////////////////////////////////////////////////////////////
+
+#pragma once
+
+// Dependency:
+#include "../common.hpp"
+#include "../exponential.hpp"
+#include "../geometric.hpp"
+
+#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
+#      pragma message("GLM: GLM_GTX_fast_square_root extension included")
+#endif
+
+namespace glm
+{
+       /// @addtogroup gtx_fast_square_root
+       /// @{
+
+       /// Faster than the common sqrt function but less accurate.
+       ///
+       /// @see gtx_fast_square_root extension.
+       template <typename genType> 
+       GLM_FUNC_DECL genType fastSqrt(genType x);
+
+       /// Faster than the common sqrt function but less accurate.
+       ///
+       /// @see gtx_fast_square_root extension.
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_DECL vecType<T, P> fastSqrt(vecType<T, P> const & x);
+
+       /// Faster than the common inversesqrt function but less accurate.
+       ///
+       /// @see gtx_fast_square_root extension.
+       template <typename genType> 
+       GLM_FUNC_DECL genType fastInverseSqrt(genType x);
+
+       /// Faster than the common inversesqrt function but less accurate.
+       ///
+       /// @see gtx_fast_square_root extension.
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_DECL vecType<T, P> fastInverseSqrt(vecType<T, P> const & x);
+
+       /// Faster than the common length function but less accurate.
+       ///
+       /// @see gtx_fast_square_root extension.
+       template <typename genType>
+       GLM_FUNC_DECL genType fastLength(genType x);
+
+       /// Faster than the common length function but less accurate.
+       ///
+       /// @see gtx_fast_square_root extension.
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_DECL T fastLength(vecType<T, P> const & x);
+
+       /// Faster than the common distance function but less accurate.
+       ///
+       /// @see gtx_fast_square_root extension.
+       template <typename genType>
+       GLM_FUNC_DECL genType fastDistance(genType x, genType y);
+
+       /// Faster than the common distance function but less accurate.
+       ///
+       /// @see gtx_fast_square_root extension.
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_DECL T fastDistance(vecType<T, P> const & x, vecType<T, P> const & y);
+
+       /// Faster than the common normalize function but less accurate.
+       ///
+       /// @see gtx_fast_square_root extension.
+       template <typename genType> 
+       GLM_FUNC_DECL genType fastNormalize(genType const & x);
+
+       /// @}
+}// namespace glm
+
+#include "fast_square_root.inl"
diff --git a/include/glm/gtx/fast_square_root.inl b/include/glm/gtx/fast_square_root.inl
new file mode 100644 (file)
index 0000000..9db769d
--- /dev/null
@@ -0,0 +1,110 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtx_fast_square_root
+/// @file glm/gtx/fast_square_root.inl
+/// @date 2006-01-04 / 2011-06-07
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+namespace glm
+{
+       // fastSqrt
+       template <typename genType>
+       GLM_FUNC_QUALIFIER genType fastSqrt(genType x)
+       {
+               GLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, "'fastSqrt' only accept floating-point input");
+
+               return genType(1) / fastInverseSqrt(x);
+       }
+
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_QUALIFIER vecType<T, P> fastSqrt(vecType<T, P> const & x)
+       {
+               return detail::functor1<T, T, P, vecType>::call(fastSqrt, x);
+       }
+
+       // fastInversesqrt
+       template <typename genType>
+       GLM_FUNC_QUALIFIER genType fastInverseSqrt(genType x)
+       {
+#              ifdef __CUDACC__ // Wordaround for a CUDA compiler bug up to CUDA6
+                       tvec1<T, P> tmp(detail::compute_inversesqrt<tvec1, genType, lowp>::call(tvec1<genType, lowp>(x)));
+                       return tmp.x;
+#              else
+                       return detail::compute_inversesqrt<tvec1, genType, lowp>::call(tvec1<genType, lowp>(x)).x;
+#              endif
+       }
+
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_QUALIFIER vecType<T, P> fastInverseSqrt(vecType<T, P> const & x)
+       {
+               return detail::compute_inversesqrt<vecType, T, P>::call(x);
+       }
+
+       // fastLength
+       template <typename genType>
+       GLM_FUNC_QUALIFIER genType fastLength(genType x)
+       {
+               GLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, "'fastLength' only accept floating-point inputs");
+
+               return abs(x);
+       }
+
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_QUALIFIER T fastLength(vecType<T, P> const & x)
+       {
+               GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'fastLength' only accept floating-point inputs");
+
+               return fastSqrt(dot(x, x));
+       }
+
+       // fastDistance
+       template <typename genType>
+       GLM_FUNC_QUALIFIER genType fastDistance(genType x, genType y)
+       {
+               return fastLength(y - x);
+       }
+
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_QUALIFIER T fastDistance(vecType<T, P> const & x, vecType<T, P> const & y)
+       {
+               return fastLength(y - x);
+       }
+
+       // fastNormalize
+       template <typename genType>
+       GLM_FUNC_QUALIFIER genType fastNormalize(genType x)
+       {
+               return x > genType(0) ? genType(1) : -genType(1);
+       }
+
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_QUALIFIER vecType<T, P> fastNormalize(vecType<T, P> const & x)
+       {
+               return x * fastInverseSqrt(dot(x, x));
+       }
+}//namespace glm
diff --git a/include/glm/gtx/fast_trigonometry.hpp b/include/glm/gtx/fast_trigonometry.hpp
new file mode 100644 (file)
index 0000000..93c38ab
--- /dev/null
@@ -0,0 +1,104 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtx_fast_trigonometry
+/// @file glm/gtx/fast_trigonometry.hpp
+/// @date 2006-01-08 / 2011-06-07
+/// @author Christophe Riccio
+///
+/// @see core (dependence)
+///
+/// @defgroup gtx_fast_trigonometry GLM_GTX_fast_trigonometry
+/// @ingroup gtx
+/// 
+/// @brief Fast but less accurate implementations of trigonometric functions.
+/// 
+/// <glm/gtx/fast_trigonometry.hpp> need to be included to use these functionalities.
+///////////////////////////////////////////////////////////////////////////////////
+
+#pragma once
+
+// Dependency:
+#include "../gtc/constants.hpp"
+
+#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
+#      pragma message("GLM: GLM_GTX_fast_trigonometry extension included")
+#endif
+
+namespace glm
+{
+       /// @addtogroup gtx_fast_trigonometry
+       /// @{
+
+       /// Wrap an angle to [0 2pi[
+       /// From GLM_GTX_fast_trigonometry extension.
+       template <typename T> 
+       GLM_FUNC_DECL T wrapAngle(T angle);
+
+       /// Faster than the common sin function but less accurate.
+       /// From GLM_GTX_fast_trigonometry extension.
+       template <typename T>
+       GLM_FUNC_DECL T fastSin(T angle);
+
+       /// Faster than the common cos function but less accurate.
+       /// From GLM_GTX_fast_trigonometry extension.
+       template <typename T> 
+       GLM_FUNC_DECL T fastCos(T angle);
+
+       /// Faster than the common tan function but less accurate. 
+       /// Defined between -2pi and 2pi. 
+       /// From GLM_GTX_fast_trigonometry extension.
+       template <typename T> 
+       GLM_FUNC_DECL T fastTan(T angle);
+
+       /// Faster than the common asin function but less accurate. 
+       /// Defined between -2pi and 2pi.
+       /// From GLM_GTX_fast_trigonometry extension.
+       template <typename T> 
+       GLM_FUNC_DECL T fastAsin(T angle);
+
+       /// Faster than the common acos function but less accurate. 
+       /// Defined between -2pi and 2pi. 
+       /// From GLM_GTX_fast_trigonometry extension.
+       template <typename T> 
+       GLM_FUNC_DECL T fastAcos(T angle);
+
+       /// Faster than the common atan function but less accurate.
+       /// Defined between -2pi and 2pi. 
+       /// From GLM_GTX_fast_trigonometry extension.
+       template <typename T> 
+       GLM_FUNC_DECL T fastAtan(T y, T x);
+
+       /// Faster than the common atan function but less accurate. 
+       /// Defined between -2pi and 2pi.
+       /// From GLM_GTX_fast_trigonometry extension.
+       template <typename T> 
+       GLM_FUNC_DECL T fastAtan(T angle);
+
+       /// @}
+}//namespace glm
+
+#include "fast_trigonometry.inl"
diff --git a/include/glm/gtx/fast_trigonometry.inl b/include/glm/gtx/fast_trigonometry.inl
new file mode 100644 (file)
index 0000000..16a821a
--- /dev/null
@@ -0,0 +1,162 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtx_fast_trigonometry
+/// @file glm/gtx/fast_trigonometry.inl
+/// @date 2006-01-08 / 2014-11-25
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+namespace glm{
+namespace detail
+{
+       template <typename T>
+       GLM_FUNC_QUALIFIER T cos_52s(T x)
+       {
+               T const xx(x * x);
+               return (T(0.9999932946) + xx * (T(-0.4999124376) + xx * (T(0.0414877472) + xx * T(-0.0012712095))));
+       }
+
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_QUALIFIER vecType<T, P> cos_52s(vecType<T, P> const & x)
+       {
+               return detail::functor1<T, T, P, vecType>::call(cos_52s, x);
+       }
+}//namespace detail
+
+       // wrapAngle
+       template <typename T>
+       GLM_FUNC_QUALIFIER T wrapAngle(T angle)
+       {
+               return abs<T>(mod<T>(angle, two_pi<T>()));
+       }
+
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_QUALIFIER vecType<T, P> wrapAngle(vecType<T, P> const & x)
+       {
+               return detail::functor1<T, T, P, vecType>::call(wrapAngle, x);
+       }
+
+       // cos
+       template <typename T> 
+       GLM_FUNC_QUALIFIER T fastCos(T x)
+       {
+               T const angle(wrapAngle<T>(x));
+
+               if(angle<half_pi<T>())
+                       return detail::cos_52s(angle);
+               if(angle<pi<T>())
+                       return -detail::cos_52s(pi<T>() - angle);
+               if(angle<(T(3) * half_pi<T>()))
+                       return -detail::cos_52s(angle - pi<T>());
+
+               return detail::cos_52s(two_pi<T>() - angle);
+       }
+
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_QUALIFIER vecType<T, P> fastCos(vecType<T, P> const & x)
+       {
+               return detail::functor1<T, T, P, vecType>::call(fastCos, x);
+       }
+
+       // sin
+       template <typename T> 
+       GLM_FUNC_QUALIFIER T fastSin(T x)
+       {
+               return fastCos<T>(half_pi<T>() - x);
+       }
+
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_QUALIFIER vecType<T, P> fastSin(vecType<T, P> const & x)
+       {
+               return detail::functor1<T, T, P, vecType>::call(fastSin, x);
+       }
+
+       // tan
+       template <typename T> 
+       GLM_FUNC_QUALIFIER T fastTan(T x)
+       {
+               return x + (x * x * x * T(0.3333333333)) + (x * x * x * x * x * T(0.1333333333333)) + (x * x * x * x * x * x * x * T(0.0539682539));
+       }
+
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_QUALIFIER vecType<T, P> fastTan(vecType<T, P> const & x)
+       {
+               return detail::functor1<T, T, P, vecType>::call(fastTan, x);
+       }
+
+       // asin
+       template <typename T> 
+       GLM_FUNC_QUALIFIER T fastAsin(T x)
+       {
+               return x + (x * x * x * T(0.166666667)) + (x * x * x * x * x * T(0.075)) + (x * x * x * x * x * x * x * T(0.0446428571)) + (x * x * x * x * x * x * x * x * x * T(0.0303819444));// + (x * x * x * x * x * x * x * x * x * x * x * T(0.022372159));
+       }
+
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_QUALIFIER vecType<T, P> fastAsin(vecType<T, P> const & x)
+       {
+               return detail::functor1<T, T, P, vecType>::call(fastAsin, x);
+       }
+
+       // acos
+       template <typename T> 
+       GLM_FUNC_QUALIFIER T fastAcos(T x)
+       {
+               return T(1.5707963267948966192313216916398) - fastAsin(x); //(PI / 2)
+       }
+
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_QUALIFIER vecType<T, P> fastAcos(vecType<T, P> const & x)
+       {
+               return detail::functor1<T, T, P, vecType>::call(fastAcos, x);
+       }
+
+       // atan
+       template <typename T> 
+       GLM_FUNC_QUALIFIER T fastAtan(T y, T x)
+       {
+               T sgn = sign(y) * sign(x);
+               return abs(fastAtan(y / x)) * sgn;
+       }
+
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_QUALIFIER vecType<T, P> fastAtan(vecType<T, P> const & y, vecType<T, P> const & x)
+       {
+               return detail::functor2<T, P, vecType>::call(fastAtan, y, x);
+       }
+
+       template <typename T> 
+       GLM_FUNC_QUALIFIER T fastAtan(T x)
+       {
+               return x - (x * x * x * T(0.333333333333)) + (x * x * x * x * x * T(0.2)) - (x * x * x * x * x * x * x * T(0.1428571429)) + (x * x * x * x * x * x * x * x * x * T(0.111111111111)) - (x * x * x * x * x * x * x * x * x * x * x * T(0.0909090909));
+       }
+
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_QUALIFIER vecType<T, P> fastAtan(vecType<T, P> const & x)
+       {
+               return detail::functor1<T, T, P, vecType>::call(fastAtan, x);
+       }
+}//namespace glm
diff --git a/include/glm/gtx/gradient_paint.hpp b/include/glm/gtx/gradient_paint.hpp
new file mode 100644 (file)
index 0000000..8e73429
--- /dev/null
@@ -0,0 +1,77 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtx_gradient_paint
+/// @file glm/gtx/gradient_paint.hpp
+/// @date 2009-03-06 / 2011-06-07
+/// @author Christophe Riccio
+///
+/// @see core (dependence)
+/// @see gtx_optimum_pow (dependence)
+///
+/// @defgroup gtx_gradient_paint GLM_GTX_gradient_paint
+/// @ingroup gtx
+/// 
+/// @brief Functions that return the color of procedural gradient for specific coordinates.
+/// <glm/gtx/gradient_paint.hpp> need to be included to use these functionalities.
+///////////////////////////////////////////////////////////////////////////////////
+
+#pragma once
+
+// Dependency:
+#include "../glm.hpp"
+#include "../gtx/optimum_pow.hpp"
+
+#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
+#      pragma message("GLM: GLM_GTX_gradient_paint extension included")
+#endif
+
+namespace glm
+{
+       /// @addtogroup gtx_gradient_paint
+       /// @{
+
+       /// Return a color from a radial gradient.
+       /// @see - gtx_gradient_paint
+       template <typename T, precision P>
+       GLM_FUNC_DECL T radialGradient(
+               tvec2<T, P> const & Center,
+               T const & Radius,
+               tvec2<T, P> const & Focal,
+               tvec2<T, P> const & Position);
+
+       /// Return a color from a linear gradient.
+       /// @see - gtx_gradient_paint
+       template <typename T, precision P>
+       GLM_FUNC_DECL T linearGradient(
+               tvec2<T, P> const & Point0,
+               tvec2<T, P> const & Point1,
+               tvec2<T, P> const & Position);
+
+       /// @}
+}// namespace glm
+
+#include "gradient_paint.inl"
diff --git a/include/glm/gtx/gradient_paint.inl b/include/glm/gtx/gradient_paint.inl
new file mode 100644 (file)
index 0000000..9a2305f
--- /dev/null
@@ -0,0 +1,66 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtx_gradient_paint
+/// @file glm/gtx/gradient_paint.inl
+/// @date 2009-03-06 / 2013-04-09
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+namespace glm
+{
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER T radialGradient
+       (
+               tvec2<T, P> const & Center,
+               T const & Radius,
+               tvec2<T, P> const & Focal,
+               tvec2<T, P> const & Position
+       )
+       {
+               tvec2<T, P> F = Focal - Center;
+               tvec2<T, P> D = Position - Focal;
+               T Radius2 = pow2(Radius);
+               T Fx2 = pow2(F.x);
+               T Fy2 = pow2(F.y);
+
+               T Numerator = (D.x * F.x + D.y * F.y) + sqrt(Radius2 * (pow2(D.x) + pow2(D.y)) - pow2(D.x * F.y - D.y * F.x));
+               T Denominator = Radius2 - (Fx2 + Fy2);
+               return Numerator / Denominator;
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER T linearGradient
+       (
+               tvec2<T, P> const & Point0,
+               tvec2<T, P> const & Point1,
+               tvec2<T, P> const & Position
+       )
+       {
+               tvec2<T, P> Dist = Point1 - Point0;
+               return (Dist.x * (Position.x - Point0.x) + Dist.y * (Position.y - Point0.y)) / glm::dot(Dist, Dist);
+       }
+}//namespace glm
diff --git a/include/glm/gtx/handed_coordinate_space.hpp b/include/glm/gtx/handed_coordinate_space.hpp
new file mode 100644 (file)
index 0000000..d4020af
--- /dev/null
@@ -0,0 +1,75 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtx_handed_coordinate_space
+/// @file glm/gtx/handed_coordinate_space.hpp
+/// @date 2005-12-21 / 2011-06-07
+/// @author Christophe Riccio
+///
+/// @see core (dependence)
+///
+/// @defgroup gtx_handed_coordinate_space GLM_GTX_handed_coordinate_space
+/// @ingroup gtx
+/// 
+/// @brief To know if a set of three basis vectors defines a right or left-handed coordinate system.
+/// 
+/// <glm/gtx/handed_coordinate_system.hpp> need to be included to use these functionalities.
+///////////////////////////////////////////////////////////////////////////////////
+
+#pragma once
+
+// Dependency:
+#include "../glm.hpp"
+
+#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
+#      pragma message("GLM: GLM_GTX_handed_coordinate_space extension included")
+#endif
+
+namespace glm
+{
+       /// @addtogroup gtx_handed_coordinate_space
+       /// @{
+
+       //! Return if a trihedron right handed or not.
+       //! From GLM_GTX_handed_coordinate_space extension.
+       template <typename T, precision P>
+       GLM_FUNC_DECL bool rightHanded(
+               tvec3<T, P> const & tangent,
+               tvec3<T, P> const & binormal,
+               tvec3<T, P> const & normal);
+
+       //! Return if a trihedron left handed or not.
+       //! From GLM_GTX_handed_coordinate_space extension.
+       template <typename T, precision P>
+       GLM_FUNC_DECL bool leftHanded(
+               tvec3<T, P> const & tangent,
+               tvec3<T, P> const & binormal,
+               tvec3<T, P> const & normal);
+
+       /// @}
+}// namespace glm
+
+#include "handed_coordinate_space.inl"
diff --git a/include/glm/gtx/handed_coordinate_space.inl b/include/glm/gtx/handed_coordinate_space.inl
new file mode 100644 (file)
index 0000000..86e9faf
--- /dev/null
@@ -0,0 +1,56 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtx_handed_coordinate_space
+/// @file glm/gtx/handed_coordinate_space.inl
+/// @date 2005-12-21 / 2009-02-19
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+namespace glm
+{
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER bool rightHanded
+       (
+               tvec3<T, P> const & tangent,
+               tvec3<T, P> const & binormal,
+               tvec3<T, P> const & normal
+       )
+       {
+               return dot(cross(normal, tangent), binormal) > T(0);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER bool leftHanded
+       (
+               tvec3<T, P> const & tangent,
+               tvec3<T, P> const & binormal,
+               tvec3<T, P> const & normal
+       )
+       {
+               return dot(cross(normal, tangent), binormal) < T(0);
+       }
+}//namespace glm
diff --git a/include/glm/gtx/integer.hpp b/include/glm/gtx/integer.hpp
new file mode 100644 (file)
index 0000000..f22850a
--- /dev/null
@@ -0,0 +1,101 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtx_integer
+/// @file glm/gtx/integer.hpp
+/// @date 2005-12-24 / 2011-10-13
+/// @author Christophe Riccio
+///
+/// @see core (dependence)
+///
+/// @defgroup gtx_integer GLM_GTX_integer
+/// @ingroup gtx
+/// 
+/// @brief Add support for integer for core functions
+/// 
+/// <glm/gtx/integer.hpp> need to be included to use these functionalities.
+///////////////////////////////////////////////////////////////////////////////////
+
+#pragma once
+
+// Dependency:
+#include "../glm.hpp"
+#include "../gtc/integer.hpp"
+
+#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
+#      pragma message("GLM: GLM_GTX_integer extension included")
+#endif
+
+namespace glm
+{
+       /// @addtogroup gtx_integer
+       /// @{
+
+       //! Returns x raised to the y power. 
+       //! From GLM_GTX_integer extension.
+       GLM_FUNC_DECL int pow(int x, int y);
+
+       //! Returns the positive square root of x.
+       //! From GLM_GTX_integer extension.
+       GLM_FUNC_DECL int sqrt(int x);
+
+       //! Returns the floor log2 of x.
+       //! From GLM_GTX_integer extension.
+       GLM_FUNC_DECL unsigned int floor_log2(unsigned int x);
+
+       //! Modulus. Returns x - y * floor(x / y) for each component in x using the floating point value y.
+       //! From GLM_GTX_integer extension.
+       GLM_FUNC_DECL int mod(int x, int y);
+
+       //! Return the factorial value of a number (!12 max, integer only)
+       //! From GLM_GTX_integer extension.
+       template <typename genType> 
+       GLM_FUNC_DECL genType factorial(genType const & x);
+
+       //! 32bit signed integer. 
+       //! From GLM_GTX_integer extension.
+       typedef signed int                                      sint;
+
+       //! Returns x raised to the y power.
+       //! From GLM_GTX_integer extension.
+       GLM_FUNC_DECL uint pow(uint x, uint y);
+
+       //! Returns the positive square root of x. 
+       //! From GLM_GTX_integer extension.
+       GLM_FUNC_DECL uint sqrt(uint x);
+
+       //! Modulus. Returns x - y * floor(x / y) for each component in x using the floating point value y.
+       //! From GLM_GTX_integer extension.
+       GLM_FUNC_DECL uint mod(uint x, uint y);
+
+       //! Returns the number of leading zeros.
+       //! From GLM_GTX_integer extension.
+       GLM_FUNC_DECL uint nlz(uint x);
+
+       /// @}
+}//namespace glm
+
+#include "integer.inl"
diff --git a/include/glm/gtx/integer.inl b/include/glm/gtx/integer.inl
new file mode 100644 (file)
index 0000000..360818b
--- /dev/null
@@ -0,0 +1,211 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtx_integer
+/// @file glm/gtx/integer.inl
+/// @date 2005-12-24 / 2011-10-13
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+namespace glm
+{
+       // pow
+       GLM_FUNC_QUALIFIER int pow(int x, int y)
+       {
+               if(y == 0)
+                       return 1;
+               int result = x;
+               for(int i = 1; i < y; ++i)
+                       result *= x;
+               return result;
+       }
+
+       // sqrt: From Christopher J. Musial, An integer square root, Graphics Gems, 1990, page 387
+       GLM_FUNC_QUALIFIER int sqrt(int x)
+       {
+               if(x <= 1) return x;
+
+               int NextTrial = x >> 1;
+               int CurrentAnswer;
+
+               do
+               {
+                       CurrentAnswer = NextTrial;
+                       NextTrial = (NextTrial + x / NextTrial) >> 1;
+               } while(NextTrial < CurrentAnswer);
+
+               return CurrentAnswer;
+       }
+
+// Henry Gordon Dietz: http://aggregate.org/MAGIC/
+namespace detail
+{
+       GLM_FUNC_QUALIFIER unsigned int ones32(unsigned int x)
+       {
+               /* 32-bit recursive reduction using SWAR...
+               but first step is mapping 2-bit values
+               into sum of 2 1-bit values in sneaky way
+               */
+               x -= ((x >> 1) & 0x55555555);
+               x = (((x >> 2) & 0x33333333) + (x & 0x33333333));
+               x = (((x >> 4) + x) & 0x0f0f0f0f);
+               x += (x >> 8);
+               x += (x >> 16);
+               return(x & 0x0000003f);
+       }
+}//namespace detail
+
+       // Henry Gordon Dietz: http://aggregate.org/MAGIC/
+/*
+       GLM_FUNC_QUALIFIER unsigned int floor_log2(unsigned int x)
+       {
+               x |= (x >> 1);
+               x |= (x >> 2);
+               x |= (x >> 4);
+               x |= (x >> 8);
+               x |= (x >> 16);
+
+               return _detail::ones32(x) >> 1;
+       }
+*/
+       // mod
+       GLM_FUNC_QUALIFIER int mod(int x, int y)
+       {
+               return x - y * (x / y);
+       }
+
+       // factorial (!12 max, integer only)
+       template <typename genType>
+       GLM_FUNC_QUALIFIER genType factorial(genType const & x)
+       {
+               genType Temp = x;
+               genType Result;
+               for(Result = 1; Temp > 1; --Temp)
+                       Result *= Temp;
+               return Result;
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec2<T, P> factorial(
+               tvec2<T, P> const & x)
+       {
+               return tvec2<T, P>(
+                       factorial(x.x),
+                       factorial(x.y));
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec3<T, P> factorial(
+               tvec3<T, P> const & x)
+       {
+               return tvec3<T, P>(
+                       factorial(x.x),
+                       factorial(x.y),
+                       factorial(x.z));
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec4<T, P> factorial(
+               tvec4<T, P> const & x)
+       {
+               return tvec4<T, P>(
+                       factorial(x.x),
+                       factorial(x.y),
+                       factorial(x.z),
+                       factorial(x.w));
+       }
+
+       GLM_FUNC_QUALIFIER uint pow(uint x, uint y)
+       {
+               uint result = x;
+               for(uint i = 1; i < y; ++i)
+                       result *= x;
+               return result;
+       }
+
+       GLM_FUNC_QUALIFIER uint sqrt(uint x)
+       {
+               if(x <= 1) return x;
+
+               uint NextTrial = x >> 1;
+               uint CurrentAnswer;
+
+               do
+               {
+                       CurrentAnswer = NextTrial;
+                       NextTrial = (NextTrial + x / NextTrial) >> 1;
+               } while(NextTrial < CurrentAnswer);
+
+               return CurrentAnswer;
+       }
+
+       GLM_FUNC_QUALIFIER uint mod(uint x, uint y)
+       {
+               return x - y * (x / y);
+       }
+
+#if(GLM_COMPILER & (GLM_COMPILER_VC | GLM_COMPILER_GCC))
+
+       GLM_FUNC_QUALIFIER unsigned int nlz(unsigned int x) 
+       {
+               return 31u - findMSB(x);
+       }
+
+#else
+
+       // Hackers Delight: http://www.hackersdelight.org/HDcode/nlz.c.txt
+       GLM_FUNC_QUALIFIER unsigned int nlz(unsigned int x) 
+       {
+               int y, m, n;
+
+               y = -int(x >> 16);      // If left half of x is 0,
+               m = (y >> 16) & 16;  // set n = 16.  If left half
+               n = 16 - m;          // is nonzero, set n = 0 and
+               x = x >> m;          // shift x right 16.
+                                                       // Now x is of the form 0000xxxx.
+               y = x - 0x100;       // If positions 8-15 are 0,
+               m = (y >> 16) & 8;   // add 8 to n and shift x left 8.
+               n = n + m;
+               x = x << m;
+
+               y = x - 0x1000;      // If positions 12-15 are 0,
+               m = (y >> 16) & 4;   // add 4 to n and shift x left 4.
+               n = n + m;
+               x = x << m;
+
+               y = x - 0x4000;      // If positions 14-15 are 0,
+               m = (y >> 16) & 2;   // add 2 to n and shift x left 2.
+               n = n + m;
+               x = x << m;
+
+               y = x >> 14;         // Set y = 0, 1, 2, or 3.
+               m = y & ~(y >> 1);   // Set m = 0, 1, 2, or 2 resp.
+               return unsigned(n + 2 - m);
+       }
+
+#endif//(GLM_COMPILER)
+
+}//namespace glm
diff --git a/include/glm/gtx/intersect.hpp b/include/glm/gtx/intersect.hpp
new file mode 100644 (file)
index 0000000..ef3d42d
--- /dev/null
@@ -0,0 +1,112 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtx_intersect
+/// @file glm/gtx/intersect.hpp
+/// @date 2007-04-03 / 2011-06-07
+/// @author Christophe Riccio
+///
+/// @see core (dependence)
+/// @see gtx_closest_point (dependence)
+///
+/// @defgroup gtx_intersect GLM_GTX_intersect
+/// @ingroup gtx
+/// 
+/// @brief Add intersection functions
+/// 
+/// <glm/gtx/intersect.hpp> need to be included to use these functionalities.
+///////////////////////////////////////////////////////////////////////////////////
+
+#pragma once
+
+// Dependency:
+#include "../glm.hpp"
+#include "../gtx/closest_point.hpp"
+
+#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
+#      pragma message("GLM: GLM_GTX_closest_point extension included")
+#endif
+
+namespace glm
+{
+       /// @addtogroup gtx_intersect
+       /// @{
+
+       //! Compute the intersection of a ray and a triangle.
+       //! Ray direction and plane normal must be unit length.
+       //! From GLM_GTX_intersect extension.
+       template <typename genType>
+       GLM_FUNC_DECL bool intersectRayPlane(
+               genType const & orig, genType const & dir,
+               genType const & planeOrig, genType const & planeNormal,
+               typename genType::value_type & intersectionDistance);
+
+       //! Compute the intersection of a ray and a triangle.
+       //! From GLM_GTX_intersect extension.
+       template <typename genType>
+       GLM_FUNC_DECL bool intersectRayTriangle(
+               genType const & orig, genType const & dir,
+               genType const & vert0, genType const & vert1, genType const & vert2,
+               genType & baryPosition);
+
+       //! Compute the intersection of a line and a triangle.
+       //! From GLM_GTX_intersect extension.
+       template <typename genType>
+       GLM_FUNC_DECL bool intersectLineTriangle(
+               genType const & orig, genType const & dir,
+               genType const & vert0, genType const & vert1, genType const & vert2,
+               genType & position);
+
+       //! Compute the intersection distance of a ray and a sphere. 
+       //! The ray direction vector is unit length.
+       //! From GLM_GTX_intersect extension.
+       template <typename genType>
+       GLM_FUNC_DECL bool intersectRaySphere(
+               genType const & rayStarting, genType const & rayNormalizedDirection,
+               genType const & sphereCenter, typename genType::value_type const sphereRadiusSquered,
+               typename genType::value_type & intersectionDistance);
+
+       //! Compute the intersection of a ray and a sphere.
+       //! From GLM_GTX_intersect extension.
+       template <typename genType>
+       GLM_FUNC_DECL bool intersectRaySphere(
+               genType const & rayStarting, genType const & rayNormalizedDirection,
+               genType const & sphereCenter, const typename genType::value_type sphereRadius,
+               genType & intersectionPosition, genType & intersectionNormal);
+
+       //! Compute the intersection of a line and a sphere.
+       //! From GLM_GTX_intersect extension
+       template <typename genType>
+       GLM_FUNC_DECL bool intersectLineSphere(
+               genType const & point0, genType const & point1,
+               genType const & sphereCenter, typename genType::value_type sphereRadius,
+               genType & intersectionPosition1, genType & intersectionNormal1, 
+               genType & intersectionPosition2 = genType(), genType & intersectionNormal2 = genType());
+
+       /// @}
+}//namespace glm
+
+#include "intersect.inl"
diff --git a/include/glm/gtx/intersect.inl b/include/glm/gtx/intersect.inl
new file mode 100644 (file)
index 0000000..0c1cc93
--- /dev/null
@@ -0,0 +1,217 @@
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// Created : 2007-04-03
+// Updated : 2009-01-20
+// Licence : This source is under MIT licence
+// File    : glm/gtx/intersect.inl
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+#include "../geometric.hpp"
+#include <cfloat>
+#include <limits>
+
+namespace glm
+{
+       template <typename genType>
+       GLM_FUNC_QUALIFIER bool intersectRayPlane
+       (
+               genType const & orig, genType const & dir,
+               genType const & planeOrig, genType const & planeNormal,
+               typename genType::value_type & intersectionDistance
+       )
+       {
+               typename genType::value_type d = glm::dot(dir, planeNormal);
+               typename genType::value_type Epsilon = std::numeric_limits<typename genType::value_type>::epsilon();
+
+               if(d < Epsilon)
+               {
+                       intersectionDistance = glm::dot(planeOrig - orig, planeNormal) / d;
+                       return true;
+               }
+
+               return false;
+       }
+
+       template <typename genType>
+       GLM_FUNC_QUALIFIER bool intersectRayTriangle
+       (
+               genType const & orig, genType const & dir,
+               genType const & v0, genType const & v1, genType const & v2,
+               genType & baryPosition
+       )
+       {
+               genType e1 = v1 - v0;
+               genType e2 = v2 - v0;
+
+               genType p = glm::cross(dir, e2);
+
+               typename genType::value_type a = glm::dot(e1, p);
+
+               typename genType::value_type Epsilon = std::numeric_limits<typename genType::value_type>::epsilon();
+               if(a < Epsilon)
+                       return false;
+
+               typename genType::value_type f = typename genType::value_type(1.0f) / a;
+
+               genType s = orig - v0;
+               baryPosition.x = f * glm::dot(s, p);
+               if(baryPosition.x < typename genType::value_type(0.0f))
+                       return false;
+               if(baryPosition.x > typename genType::value_type(1.0f))
+                       return false;
+
+               genType q = glm::cross(s, e1);
+               baryPosition.y = f * glm::dot(dir, q);
+               if(baryPosition.y < typename genType::value_type(0.0f))
+                       return false;
+               if(baryPosition.y + baryPosition.x > typename genType::value_type(1.0f))
+                       return false;
+
+               baryPosition.z = f * glm::dot(e2, q);
+
+               return baryPosition.z >= typename genType::value_type(0.0f);
+       }
+
+       //template <typename genType>
+       //GLM_FUNC_QUALIFIER bool intersectRayTriangle
+       //(
+       //      genType const & orig, genType const & dir,
+       //      genType const & vert0, genType const & vert1, genType const & vert2,
+       //      genType & position
+       //)
+       //{
+       //      typename genType::value_type Epsilon = std::numeric_limits<typename genType::value_type>::epsilon();
+       //
+       //      genType edge1 = vert1 - vert0;
+       //      genType edge2 = vert2 - vert0;
+       //
+       //      genType pvec = cross(dir, edge2);
+       //
+       //      float det = dot(edge1, pvec);
+       //      if(det < Epsilon)
+       //              return false;
+       //
+       //      genType tvec = orig - vert0;
+       //
+       //      position.y = dot(tvec, pvec);
+       //      if (position.y < typename genType::value_type(0) || position.y > det)
+       //              return typename genType::value_type(0);
+       //
+       //      genType qvec = cross(tvec, edge1);
+       //
+       //      position.z = dot(dir, qvec);
+       //      if (position.z < typename genType::value_type(0) || position.y + position.z > det)
+       //              return typename genType::value_type(0);
+       //
+       //      position.x = dot(edge2, qvec);
+       //      position *= typename genType::value_type(1) / det;
+       //
+       //      return typename genType::value_type(1);
+       //}
+
+       template <typename genType>
+       GLM_FUNC_QUALIFIER bool intersectLineTriangle
+       (
+               genType const & orig, genType const & dir,
+               genType const & vert0, genType const & vert1, genType const & vert2,
+               genType & position
+       )
+       {
+               typename genType::value_type Epsilon = std::numeric_limits<typename genType::value_type>::epsilon();
+
+               genType edge1 = vert1 - vert0;
+               genType edge2 = vert2 - vert0;
+
+               genType pvec = cross(dir, edge2);
+
+               float det = dot(edge1, pvec);
+
+               if (det > -Epsilon && det < Epsilon)
+                       return false;
+               float inv_det = typename genType::value_type(1) / det;
+
+               genType tvec = orig - vert0;
+
+               position.y = dot(tvec, pvec) * inv_det;
+               if (position.y < typename genType::value_type(0) || position.y > typename genType::value_type(1))
+                       return false;
+
+               genType qvec = cross(tvec, edge1);
+
+               position.z = dot(dir, qvec) * inv_det;
+               if (position.z < typename genType::value_type(0) || position.y + position.z > typename genType::value_type(1))
+                       return false;
+
+               position.x = dot(edge2, qvec) * inv_det;
+
+               return true;
+       }
+
+       template <typename genType>
+       GLM_FUNC_QUALIFIER bool intersectRaySphere
+       (
+               genType const & rayStarting, genType const & rayNormalizedDirection,
+               genType const & sphereCenter, const typename genType::value_type sphereRadiusSquered,
+               typename genType::value_type & intersectionDistance
+       )
+       {
+               typename genType::value_type Epsilon = std::numeric_limits<typename genType::value_type>::epsilon();
+               genType diff = sphereCenter - rayStarting;
+               typename genType::value_type t0 = dot(diff, rayNormalizedDirection);
+               typename genType::value_type dSquared = dot(diff, diff) - t0 * t0;
+               if( dSquared > sphereRadiusSquered )
+               {
+                       return false;
+               }
+               typename genType::value_type t1 = sqrt( sphereRadiusSquered - dSquared );
+               intersectionDistance = t0 > t1 + Epsilon ? t0 - t1 : t0 + t1;
+               return intersectionDistance > Epsilon;
+       }
+
+       template <typename genType>
+       GLM_FUNC_QUALIFIER bool intersectRaySphere
+       (
+               genType const & rayStarting, genType const & rayNormalizedDirection,
+               genType const & sphereCenter, const typename genType::value_type sphereRadius,
+               genType & intersectionPosition, genType & intersectionNormal
+       )
+       {
+               typename genType::value_type distance;
+               if( intersectRaySphere( rayStarting, rayNormalizedDirection, sphereCenter, sphereRadius * sphereRadius, distance ) )
+               {
+                       intersectionPosition = rayStarting + rayNormalizedDirection * distance;
+                       intersectionNormal = (intersectionPosition - sphereCenter) / sphereRadius;
+                       return true;
+               }
+               return false;
+       }
+
+       template <typename genType>
+       GLM_FUNC_QUALIFIER bool intersectLineSphere
+       (
+               genType const & point0, genType const & point1,
+               genType const & sphereCenter, typename genType::value_type sphereRadius,
+               genType & intersectionPoint1, genType & intersectionNormal1, 
+               genType & intersectionPoint2, genType & intersectionNormal2
+       )
+       {
+               typename genType::value_type Epsilon = std::numeric_limits<typename genType::value_type>::epsilon();
+               genType dir = normalize(point1 - point0);
+               genType diff = sphereCenter - point0;
+               typename genType::value_type t0 = dot(diff, dir);
+               typename genType::value_type dSquared = dot(diff, diff) - t0 * t0;
+               if( dSquared > sphereRadius * sphereRadius )
+               {
+                       return false;
+               }
+               typename genType::value_type t1 = sqrt( sphereRadius * sphereRadius - dSquared );
+               if( t0 < t1 + Epsilon )
+                       t1 = -t1;
+               intersectionPoint1 = point0 + dir * (t0 - t1);
+               intersectionNormal1 = (intersectionPoint1 - sphereCenter) / sphereRadius;
+               intersectionPoint2 = point0 + dir * (t0 + t1);
+               intersectionNormal2 = (intersectionPoint2 - sphereCenter) / sphereRadius;
+               return true;
+       }
+}//namespace glm
diff --git a/include/glm/gtx/io.hpp b/include/glm/gtx/io.hpp
new file mode 100644 (file)
index 0000000..5630d92
--- /dev/null
@@ -0,0 +1,224 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtx_io
+/// @file glm/gtx/io.hpp
+/// @date 2013-11-22 / 2014-11-25
+/// @author Jan P Springer (regnirpsj@gmail.com)
+///
+/// @see core (dependence)
+/// @see gtc_quaternion (dependence)
+///
+/// @defgroup gtx_io GLM_GTX_io
+/// @ingroup gtx
+/// 
+/// @brief std::[w]ostream support for glm types
+///
+///        std::[w]ostream support for glm types + precision/width/etc. manipulators
+///        based on howard hinnant's std::chrono io proposal
+///        [http://home.roadrunner.com/~hinnant/bloomington/chrono_io.html]
+///
+/// <glm/gtx/io.hpp> needs to be included to use these functionalities.
+///////////////////////////////////////////////////////////////////////////////////
+
+#pragma once
+
+// Dependency:
+#include "../glm.hpp"
+#include "../gtx/quaternion.hpp"
+
+#if(defined(GLM_MESSAGES) && !defined(glm_ext))
+# pragma message("GLM: GLM_GTX_io extension included")
+#endif
+
+#include <iosfwd>  // std::basic_ostream<> (fwd)
+#include <locale>  // std::locale, std::locale::facet, std::locale::id
+#include <utility> // std::pair<>
+
+namespace glm
+{
+       /// @addtogroup gtx_io
+       /// @{
+
+       namespace io
+       {
+               enum order_type { column_major, row_major};
+
+               template <typename CTy>
+               class format_punct : public std::locale::facet
+               {
+                       typedef CTy char_type;
+
+               public:
+
+                       static std::locale::id id;
+
+                       bool       formatted;
+                       unsigned   precision;
+                       unsigned   width;
+                       char_type  separator;
+                       char_type  delim_left;
+                       char_type  delim_right;
+                       char_type  space;
+                       char_type  newline;
+                       order_type order;
+
+                       explicit format_punct(size_t a = 0);
+                       explicit format_punct(format_punct const&);
+               };
+
+               template <typename CTy, typename CTr = std::char_traits<CTy> >
+               class basic_state_saver {
+
+               public:
+
+                       explicit basic_state_saver(std::basic_ios<CTy,CTr>&);
+                                       ~basic_state_saver();
+
+               private:
+
+                       typedef ::std::basic_ios<CTy,CTr>      state_type;
+                       typedef typename state_type::char_type char_type;
+                       typedef ::std::ios_base::fmtflags      flags_type;
+                       typedef ::std::streamsize              streamsize_type;
+                       typedef ::std::locale const            locale_type;
+
+                       state_type&     state_;
+                       flags_type      flags_;
+                       streamsize_type precision_;
+                       streamsize_type width_;
+                       char_type       fill_;
+                       locale_type     locale_;
+
+                       basic_state_saver& operator=(basic_state_saver const&);
+               };
+
+               typedef basic_state_saver<char>     state_saver;
+               typedef basic_state_saver<wchar_t> wstate_saver;
+
+               template <typename CTy, typename CTr = std::char_traits<CTy> >
+               class basic_format_saver
+               {
+               public:
+
+                       explicit basic_format_saver(std::basic_ios<CTy,CTr>&);
+                                       ~basic_format_saver();
+
+               private:
+
+                       basic_state_saver<CTy> const bss_;
+
+                       basic_format_saver& operator=(basic_format_saver const&);
+               };
+
+               typedef basic_format_saver<char>     format_saver;
+               typedef basic_format_saver<wchar_t> wformat_saver;
+
+               struct precision
+               {
+                       unsigned value;
+
+                       explicit precision(unsigned);
+               };
+
+               struct width
+               {
+                       unsigned value;
+
+                       explicit width(unsigned);
+               };
+
+               template <typename CTy>
+               struct delimeter
+               {
+                       CTy value[3];
+
+                       explicit delimeter(CTy /* left */, CTy /* right */, CTy /* separator */ = ',');
+               };
+
+               struct order
+               {
+                       order_type value;
+
+                       explicit order(order_type);
+               };
+
+               // functions, inlined (inline)
+
+               template <typename FTy, typename CTy, typename CTr>
+               FTy const& get_facet(std::basic_ios<CTy,CTr>&);
+               template <typename FTy, typename CTy, typename CTr>
+               std::basic_ios<CTy,CTr>& formatted(std::basic_ios<CTy,CTr>&);
+               template <typename FTy, typename CTy, typename CTr>
+               std::basic_ios<CTy,CTr>& unformattet(std::basic_ios<CTy,CTr>&);
+
+               template <typename CTy, typename CTr>
+               std::basic_ostream<CTy, CTr>& operator<<(std::basic_ostream<CTy, CTr>&, precision const&);
+               template <typename CTy, typename CTr>
+               std::basic_ostream<CTy, CTr>& operator<<(std::basic_ostream<CTy, CTr>&, width const&);
+               template <typename CTy, typename CTr>
+               std::basic_ostream<CTy, CTr>& operator<<(std::basic_ostream<CTy, CTr>&, delimeter<CTy> const&);
+               template <typename CTy, typename CTr>
+               std::basic_ostream<CTy, CTr>& operator<<(std::basic_ostream<CTy, CTr>&, order const&);
+       }//namespace io
+
+       template <typename CTy, typename CTr, typename T, precision P>
+       GLM_FUNC_DECL std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>&, tquat<T,P> const&);
+       template <typename CTy, typename CTr, typename T, precision P>
+       GLM_FUNC_DECL std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>&, tvec2<T,P> const&);
+       template <typename CTy, typename CTr, typename T, precision P>
+       GLM_FUNC_DECL std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>&, tvec3<T,P> const&);
+       template <typename CTy, typename CTr, typename T, precision P>
+       GLM_FUNC_DECL std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>&, tvec4<T,P> const&);
+       template <typename CTy, typename CTr, typename T, precision P>
+       GLM_FUNC_DECL std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>&, tmat2x2<T,P> const&);
+       template <typename CTy, typename CTr, typename T, precision P>
+       GLM_FUNC_DECL std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>&, tmat2x3<T,P> const&);
+       template <typename CTy, typename CTr, typename T, precision P>
+       GLM_FUNC_DECL std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>&, tmat2x4<T,P> const&);
+       template <typename CTy, typename CTr, typename T, precision P>
+       GLM_FUNC_DECL std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>&, tmat3x2<T,P> const&);
+       template <typename CTy, typename CTr, typename T, precision P>
+       GLM_FUNC_DECL std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>&, tmat3x3<T,P> const&);
+       template <typename CTy, typename CTr, typename T, precision P>
+       GLM_FUNC_DECL std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>&, tmat3x4<T,P> const&);
+       template <typename CTy, typename CTr, typename T, precision P>
+       GLM_FUNC_DECL std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>&, tmat4x2<T,P> const&);
+       template <typename CTy, typename CTr, typename T, precision P>
+       GLM_FUNC_DECL std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>&, tmat4x3<T,P> const&);
+       template <typename CTy, typename CTr, typename T, precision P>
+       GLM_FUNC_DECL std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>&, tmat4x4<T,P> const&);
+
+       template <typename CTy, typename CTr, typename T, precision P>
+       GLM_FUNC_DECL std::basic_ostream<CTy,CTr> & operator<<(
+               std::basic_ostream<CTy,CTr> &,
+               std::pair<tmat4x4<T,P> const,
+               tmat4x4<T,P> const> const &);
+
+       /// @}
+}//namespace glm
+
+#include "io.inl"
diff --git a/include/glm/gtx/io.inl b/include/glm/gtx/io.inl
new file mode 100644 (file)
index 0000000..fe5f194
--- /dev/null
@@ -0,0 +1,618 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtx_io
+/// @file glm/gtx/io.inl
+/// @date 2013-11-22 / 2014-11-25
+/// @author Jan P Springer (regnirpsj@gmail.com)
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+#include <iomanip> // std::setfill<>, std::fixed, std::setprecision, std::right, std::setw
+#include <ostream> // std::basic_ostream<>
+
+namespace glm{
+namespace io
+{
+       template <typename CTy>
+       /* explicit */ GLM_FUNC_QUALIFIER
+       format_punct<CTy>::format_punct(size_t a)
+               : std::locale::facet(a),
+               formatted         (true),
+               precision         (3),
+               width             (1 + 4 + 1 + precision),
+               separator         (','),
+               delim_left        ('['),
+               delim_right       (']'),
+               space             (' '),
+               newline           ('\n'),
+               order             (row_major)
+       {}
+
+       template <typename CTy>
+       /* explicit */ GLM_FUNC_QUALIFIER
+       format_punct<CTy>::format_punct(format_punct const& a)
+               : std::locale::facet(0),
+               formatted         (a.formatted),
+               precision         (a.precision),
+               width             (a.width),
+               separator         (a.separator),
+               delim_left        (a.delim_left),
+               delim_right       (a.delim_right),
+               space             (a.space),
+               newline           (a.newline),
+               order             (a.order)
+       {}
+
+       template <typename CTy> std::locale::id format_punct<CTy>::id;
+
+       template <typename CTy, typename CTr>
+       /* explicit */ GLM_FUNC_QUALIFIER basic_state_saver<CTy,CTr>::basic_state_saver(std::basic_ios<CTy,CTr>& a)
+               : state_    (a),
+               flags_    (a.flags()),
+               precision_(a.precision()),
+               width_    (a.width()),
+               fill_     (a.fill()),
+               locale_   (a.getloc())
+       {}
+
+       template <typename CTy, typename CTr>
+       GLM_FUNC_QUALIFIER basic_state_saver<CTy,CTr>::~basic_state_saver()
+       {
+               state_.imbue(locale_);
+               state_.fill(fill_);
+               state_.width(width_);
+               state_.precision(precision_);
+               state_.flags(flags_);
+       }
+
+       template <typename CTy, typename CTr>
+       /* explicit */ GLM_FUNC_QUALIFIER basic_format_saver<CTy,CTr>::basic_format_saver(std::basic_ios<CTy,CTr>& a)
+               : bss_(a)
+       {
+               a.imbue(std::locale(a.getloc(), new format_punct<CTy>(get_facet<format_punct<CTy> >(a))));
+       }
+
+       template <typename CTy, typename CTr>
+       GLM_FUNC_QUALIFIER
+       basic_format_saver<CTy,CTr>::~basic_format_saver()
+       {}
+
+       /* explicit */ GLM_FUNC_QUALIFIER precision::precision(unsigned a)
+               : value(a)
+       {}
+
+       /* explicit */ GLM_FUNC_QUALIFIER width::width(unsigned a)
+               : value(a)
+       {}
+
+       template <typename CTy>
+       /* explicit */ GLM_FUNC_QUALIFIER delimeter<CTy>::delimeter(CTy a, CTy b, CTy c)
+               : value()
+       {
+               value[0] = a;
+               value[1] = b;
+               value[2] = c;
+       }
+
+       /* explicit */ GLM_FUNC_QUALIFIER
+       order::order(order_type a)
+               : value(a)
+       {}
+
+       template <typename FTy, typename CTy, typename CTr>
+       GLM_FUNC_QUALIFIER FTy const& get_facet(std::basic_ios<CTy,CTr>& ios)
+       {
+               if (!std::has_facet<FTy>(ios.getloc())) {
+               ios.imbue(std::locale(ios.getloc(), new FTy));
+               }
+
+               return std::use_facet<FTy>(ios.getloc());
+       }
+
+       template <typename CTy, typename CTr>
+       GLM_FUNC_QUALIFIER std::basic_ios<CTy,CTr>& formatted(std::basic_ios<CTy,CTr>& ios)
+       {
+               const_cast<format_punct<CTy>&>(get_facet<format_punct<CTy> >(ios)).formatted = true;
+
+               return ios;
+       }
+
+       template <typename CTy, typename CTr>
+       GLM_FUNC_QUALIFIER std::basic_ios<CTy,CTr>& unformatted(std::basic_ios<CTy,CTr>& ios)
+       {
+               const_cast<format_punct<CTy>&>(get_facet<format_punct<CTy> >(ios)).formatted = false;
+
+               return ios;
+       }
+
+       template <typename CTy, typename CTr>
+       GLM_FUNC_QUALIFIER std::basic_ostream<CTy, CTr>& operator<<(std::basic_ostream<CTy, CTr>& os, precision const& a)
+       {
+               const_cast<format_punct<CTy>&>(get_facet<format_punct<CTy> >(os)).precision = a.value;
+
+               return os;
+       }
+
+       template <typename CTy, typename CTr>
+       GLM_FUNC_QUALIFIER std::basic_ostream<CTy, CTr>& operator<<(std::basic_ostream<CTy, CTr>& os, width const& a)
+       {
+               const_cast<format_punct<CTy>&>(get_facet<format_punct<CTy> >(os)).width = a.value;
+
+               return os;
+       }
+
+       template <typename CTy, typename CTr>
+       std::basic_ostream<CTy, CTr>& operator<<(std::basic_ostream<CTy, CTr>& os, delimeter<CTy> const& a)
+       {
+               format_punct<CTy> & fmt(const_cast<format_punct<CTy>&>(get_facet<format_punct<CTy> >(os)));
+
+               fmt.delim_left  = a.value[0];
+               fmt.delim_right = a.value[1];
+               fmt.separator   = a.value[2];
+
+               return os;
+       }
+
+       template <typename CTy, typename CTr>
+       GLM_FUNC_QUALIFIER std::basic_ostream<CTy, CTr>& operator<<(std::basic_ostream<CTy, CTr>& os, order const& a)
+       {
+               const_cast<format_punct<CTy>&>(get_facet<format_punct<CTy> >(os)).order = a.value;
+
+               return os;
+       }
+} // namespace io
+
+       template <typename CTy, typename CTr, typename T, precision P>
+       GLM_FUNC_QUALIFIER std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>& os, tquat<T,P> const& a)
+       {
+               typename std::basic_ostream<CTy,CTr>::sentry const cerberus(os);
+
+               if(cerberus)
+               {
+                       io::format_punct<CTy> const & fmt(io::get_facet<io::format_punct<CTy> >(os));
+
+                       if(fmt.formatted)
+                       {
+                               io::basic_state_saver<CTy> const bss(os);
+
+                               os << std::fixed
+                                       << std::right
+                                       << std::setprecision(fmt.precision)
+                                       << std::setfill(fmt.space)
+                                       << fmt.delim_left
+                                       << std::setw(fmt.width) << a.w << fmt.separator
+                                       << std::setw(fmt.width) << a.x << fmt.separator
+                                       << std::setw(fmt.width) << a.y << fmt.separator
+                                       << std::setw(fmt.width) << a.z
+                                       << fmt.delim_right;
+                       }
+                       else
+                       {
+                               os << a.w << fmt.space << a.x << fmt.space << a.y << fmt.space << a.z;
+                       }
+               }
+
+               return os;
+       }
+
+       template <typename CTy, typename CTr, typename T, precision P>
+       GLM_FUNC_QUALIFIER std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>& os, tvec2<T,P> const& a)
+       {
+               typename std::basic_ostream<CTy,CTr>::sentry const cerberus(os);
+
+               if(cerberus)
+               {
+                       io::format_punct<CTy> const & fmt(io::get_facet<io::format_punct<CTy> >(os));
+
+                       if(fmt.formatted)
+                       {
+                               io::basic_state_saver<CTy> const bss(os);
+
+                               os << std::fixed
+                                       << std::right
+                                       << std::setprecision(fmt.precision)
+                                       << std::setfill(fmt.space)
+                                       << fmt.delim_left
+                                       << std::setw(fmt.width) << a.x << fmt.separator
+                                       << std::setw(fmt.width) << a.y
+                                       << fmt.delim_right;
+                       }
+                       else
+                       {
+                               os << a.x << fmt.space << a.y;
+                       }
+               }
+
+               return os;
+       }
+
+       template <typename CTy, typename CTr, typename T, precision P>
+       GLM_FUNC_QUALIFIER std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>& os, tvec3<T,P> const& a)
+       {
+               typename std::basic_ostream<CTy,CTr>::sentry const cerberus(os);
+
+               if(cerberus)
+               {
+                       io::format_punct<CTy> const & fmt(io::get_facet<io::format_punct<CTy> >(os));
+
+                       if(fmt.formatted)
+                       {
+                               io::basic_state_saver<CTy> const bss(os);
+
+                               os << std::fixed
+                                       << std::right
+                                       << std::setprecision(fmt.precision)
+                                       << std::setfill(fmt.space)
+                                       << fmt.delim_left
+                                       << std::setw(fmt.width) << a.x << fmt.separator
+                                       << std::setw(fmt.width) << a.y << fmt.separator
+                                       << std::setw(fmt.width) << a.z
+                                       << fmt.delim_right;
+                       }
+                       else
+                       {
+                               os << a.x << fmt.space << a.y << fmt.space << a.z;
+                       }
+               }
+
+               return os;
+       }
+
+       template <typename CTy, typename CTr, typename T, precision P>
+       GLM_FUNC_QUALIFIER std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>& os, tvec4<T,P> const& a)
+       {
+               typename std::basic_ostream<CTy,CTr>::sentry const cerberus(os);
+
+               if(cerberus)
+               {
+                       io::format_punct<CTy> const & fmt(io::get_facet<io::format_punct<CTy> >(os));
+
+                       if(fmt.formatted)
+                       {
+                               io::basic_state_saver<CTy> const bss(os);
+
+                               os << std::fixed
+                                       << std::right
+                                       << std::setprecision(fmt.precision)
+                                       << std::setfill(fmt.space)
+                                       << fmt.delim_left
+                                       << std::setw(fmt.width) << a.x << fmt.separator
+                                       << std::setw(fmt.width) << a.y << fmt.separator
+                                       << std::setw(fmt.width) << a.z << fmt.separator
+                                       << std::setw(fmt.width) << a.w
+                                       << fmt.delim_right;
+                       }
+                       else
+                       {
+                               os << a.x << fmt.space << a.y << fmt.space << a.z << fmt.space << a.w;
+                       }
+               }
+
+               return os;
+       }
+
+       template <typename CTy, typename CTr, typename T, precision P>
+       GLM_FUNC_QUALIFIER std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>& os, tmat2x2<T,P> const& a)
+       {
+               typename std::basic_ostream<CTy,CTr>::sentry const cerberus(os);
+
+               if(cerberus)
+               {
+                       io::format_punct<CTy> const & fmt(io::get_facet<io::format_punct<CTy> >(os));
+                       tmat2x2<T,P> m(a);
+
+                       if(io::row_major == fmt.order)
+                               m = transpose(a);
+
+                       if(fmt.formatted)
+                       {
+                               os << fmt.newline
+                                       << fmt.delim_left << m[0] << fmt.newline
+                                       << fmt.space      << m[1] << fmt.delim_right;
+                       }
+                       else
+                       {
+                               os << m[0] << fmt.space << m[1];
+                       }
+               }
+
+               return os;
+       }
+
+       template <typename CTy, typename CTr, typename T, precision P>
+       GLM_FUNC_QUALIFIER std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>& os, tmat2x3<T,P> const& a)
+       {
+               typename std::basic_ostream<CTy,CTr>::sentry const cerberus(os);
+
+               if(cerberus)
+               {
+                       io::format_punct<CTy> const & fmt(io::get_facet<io::format_punct<CTy> >(os));
+                       tmat3x2<T,P> m(a);
+
+                       if(io::row_major == fmt.order)
+                               m = transpose(a);
+
+                       if(fmt.formatted)
+                       {
+                               os << fmt.newline
+                                       << fmt.delim_left << m[0] << fmt.newline
+                                       << fmt.space      << m[1] << fmt.newline
+                                       << fmt.space      << m[2] << fmt.delim_right;
+                       }
+                       else
+                       {
+                               os << m[0] << fmt.space << m[1] << fmt.space << m[2];
+                       }
+               }
+
+               return os;
+       }
+
+       template <typename CTy, typename CTr, typename T, precision P>
+       GLM_FUNC_QUALIFIER std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>& os, tmat2x4<T,P> const& a)
+       {
+               typename std::basic_ostream<CTy,CTr>::sentry const cerberus(os);
+
+               if(cerberus)
+               {
+                       io::format_punct<CTy> const & fmt(io::get_facet<io::format_punct<CTy> >(os));
+                       tmat4x2<T,P> m(a);
+
+                       if(io::row_major == fmt.order)
+                               m = transpose(a);
+
+
+                       if(fmt.formatted)
+                       {
+                               os << fmt.newline
+                                       << fmt.delim_left << m[0] << fmt.newline
+                                       << fmt.space      << m[1] << fmt.newline
+                                       << fmt.space      << m[2] << fmt.newline
+                                       << fmt.space      << m[3] << fmt.delim_right;
+                       }
+                       else
+                       {
+                               os << m[0] << fmt.space << m[1] << fmt.space << m[2] << fmt.space << m[3];
+                       }
+               }
+
+               return os;
+       }
+
+       template <typename CTy, typename CTr, typename T, precision P>
+       GLM_FUNC_QUALIFIER std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>& os, tmat3x2<T,P> const& a)
+       {
+               typename std::basic_ostream<CTy,CTr>::sentry const cerberus(os);
+
+               if(cerberus)
+               {
+                       io::format_punct<CTy> const & fmt(io::get_facet<io::format_punct<CTy> >(os));
+                       tmat2x3<T,P> m(a);
+
+                       if(io::row_major == fmt.order)
+                               m = transpose(a);
+
+                       if(fmt.formatted)
+                       {
+                               os << fmt.newline
+                                       << fmt.delim_left << m[0] << fmt.newline
+                                       << fmt.space      << m[1] << fmt.delim_right;
+                       }
+                       else
+                       {
+                               os << m[0] << fmt.space << m[1];
+                       }
+               }
+
+               return os;
+       }
+
+       template <typename CTy, typename CTr, typename T, precision P>
+       GLM_FUNC_QUALIFIER std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>& os, tmat3x3<T,P> const& a)
+       {
+               typename std::basic_ostream<CTy,CTr>::sentry const cerberus(os);
+
+               if(cerberus)
+               {
+                       io::format_punct<CTy> const & fmt(io::get_facet<io::format_punct<CTy> >(os));
+                       tmat3x3<T,P> m(a);
+
+                       if(io::row_major == fmt.order)
+                               m = transpose(a);
+
+                       if(fmt.formatted)
+                       {
+                               os << fmt.newline
+                                       << fmt.delim_left << m[0] << fmt.newline
+                                       << fmt.space      << m[1] << fmt.newline
+                                       << fmt.space      << m[2] << fmt.delim_right;
+                       }
+                       else
+                       {
+                               os << m[0] << fmt.space << m[1] << fmt.space << m[2];
+                       }
+               }
+
+               return os;
+       }
+
+       template <typename CTy, typename CTr, typename T, precision P>
+       GLM_FUNC_QUALIFIER std::basic_ostream<CTy,CTr> & operator<<(std::basic_ostream<CTy,CTr>& os, tmat3x4<T,P> const& a)
+       {
+               typename std::basic_ostream<CTy,CTr>::sentry const cerberus(os);
+
+               if(cerberus)
+               {
+                       io::format_punct<CTy> const & fmt(io::get_facet<io::format_punct<CTy> >(os));
+                       tmat4x3<T,P> m(a);
+
+                       if(io::row_major == fmt.order)
+                               m = transpose(a);
+
+                       if (fmt.formatted)
+                       {
+                               os << fmt.newline
+                                       << fmt.delim_left << m[0] << fmt.newline
+                                       << fmt.space      << m[1] << fmt.newline
+                                       << fmt.space      << m[2] << fmt.newline
+                                       << fmt.space      << m[3] << fmt.delim_right;
+                       }
+                       else
+                       {
+                               os << m[0] << fmt.space << m[1] << fmt.space << m[2] << fmt.space << m[3];
+                       }
+               }
+
+               return os;
+       }
+
+       template <typename CTy, typename CTr, typename T, precision P>
+       GLM_FUNC_QUALIFIER std::basic_ostream<CTy,CTr> & operator<<(std::basic_ostream<CTy,CTr>& os, tmat4x2<T,P> const& a)
+       {
+               typename std::basic_ostream<CTy,CTr>::sentry const cerberus(os);
+
+               if(cerberus)
+               {
+                       io::format_punct<CTy> const & fmt(io::get_facet<io::format_punct<CTy> >(os));
+                       tmat2x4<T,P> m(a);
+
+                       if(io::row_major == fmt.order)
+                               m = transpose(a);
+
+                       if (fmt.formatted)
+                       {
+                               os << fmt.newline
+                                       << fmt.delim_left << m[0] << fmt.newline
+                                       << fmt.space      << m[1] << fmt.delim_right;
+                       }
+                       else
+                       {
+                               os << m[0] << fmt.space << m[1];
+                       }
+               }
+
+               return os;
+       }
+
+       template <typename CTy, typename CTr, typename T, precision P>
+       GLM_FUNC_QUALIFIER std::basic_ostream<CTy,CTr> & operator<<(std::basic_ostream<CTy,CTr>& os, tmat4x3<T,P> const& a)
+       {
+               typename std::basic_ostream<CTy,CTr>::sentry const cerberus(os);
+
+               if(cerberus)
+               {
+                       io::format_punct<CTy> const & fmt(io::get_facet<io::format_punct<CTy> >(os));
+                       tmat3x4<T,P> m(a);
+
+                       if(io::row_major == fmt.order)
+                               m = transpose(a);
+
+                       if(fmt.formatted)
+                       {
+                               os << fmt.newline
+                                       << fmt.delim_left << m[0] << fmt.newline
+                                       << fmt.space      << m[1] << fmt.newline
+                                       << fmt.space      << m[2] << fmt.delim_right;
+                       }
+                       else
+                       {
+                               os << m[0] << fmt.space << m[1] << fmt.space << m[2];
+                       }
+               }
+
+               return os;
+       }
+
+       template <typename CTy, typename CTr, typename T, precision P>
+       GLM_FUNC_QUALIFIER std::basic_ostream<CTy,CTr> & operator<<(std::basic_ostream<CTy,CTr>& os, tmat4x4<T,P> const& a)
+       {
+               typename std::basic_ostream<CTy,CTr>::sentry const cerberus(os);
+
+               if(cerberus)
+               {
+                       io::format_punct<CTy> const & fmt(io::get_facet<io::format_punct<CTy> >(os));
+                       tmat4x4<T,P> m(a);
+
+                       if (io::row_major == fmt.order)
+                               m = transpose(a);
+
+                       if(fmt.formatted)
+                       {
+                               os << fmt.newline
+                                       << fmt.delim_left << m[0] << fmt.newline
+                                       << fmt.space      << m[1] << fmt.newline
+                                       << fmt.space      << m[2] << fmt.newline
+                                       << fmt.space      << m[3] << fmt.delim_right;
+                       }
+                       else
+                       {
+                               os << m[0] << fmt.space << m[1] << fmt.space << m[2] << fmt.space << m[3];
+                       }
+               }
+
+               return os;
+       }
+
+       template <typename CTy, typename CTr, typename T, precision P>
+       GLM_FUNC_QUALIFIER std::basic_ostream<CTy,CTr>& operator<<(
+               std::basic_ostream<CTy,CTr> & os,
+               std::pair<tmat4x4<T,P> const, tmat4x4<T,P> const> const& a)
+       {
+               typename std::basic_ostream<CTy,CTr>::sentry const cerberus(os);
+
+               if(cerberus)
+               {
+                       io::format_punct<CTy> const & fmt(io::get_facet<io::format_punct<CTy> >(os));
+                       tmat4x4<T,P> ml(a.first);
+                       tmat4x4<T,P> mr(a.second);
+
+                       if(io::row_major == fmt.order)
+                       {
+                               ml = transpose(a.first);
+                               mr = transpose(a.second);
+                       }
+
+                       if(fmt.formatted)
+                       {
+                               CTy const & l(fmt.delim_left);
+                               CTy const & r(fmt.delim_right);
+                               CTy const & s(fmt.space);
+
+                               os << fmt.newline
+                                       << l << ml[0] << s << s << l << mr[0] << fmt.newline
+                                       << s << ml[1] << s << s << s << mr[1] << fmt.newline
+                                       << s << ml[2] << s << s << s << mr[2] << fmt.newline
+                                       << s << ml[3] << r << s << s << mr[3] << r;
+                       }
+                       else
+                       {
+                               os << ml << fmt.space << mr;
+                       }
+               }
+
+               return os;
+       }
+}//namespace glm
diff --git a/include/glm/gtx/log_base.hpp b/include/glm/gtx/log_base.hpp
new file mode 100644 (file)
index 0000000..94d0347
--- /dev/null
@@ -0,0 +1,73 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtx_log_base
+/// @file glm/gtx/log_base.hpp
+/// @date 2008-10-24 / 2011-06-07
+/// @author Christophe Riccio
+///
+/// @see core (dependence)
+///
+/// @defgroup gtx_log_base GLM_GTX_log_base
+/// @ingroup gtx
+/// 
+/// @brief Logarithm for any base. base can be a vector or a scalar.
+/// 
+/// <glm/gtx/log_base.hpp> need to be included to use these functionalities.
+///////////////////////////////////////////////////////////////////////////////////
+
+#pragma once
+
+// Dependency:
+#include "../glm.hpp"
+
+#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
+#      pragma message("GLM: GLM_GTX_log_base extension included")
+#endif
+
+namespace glm
+{
+       /// @addtogroup gtx_log_base
+       /// @{
+
+       //! Logarithm for any base.
+       //! From GLM_GTX_log_base.
+       template <typename genType>
+       GLM_FUNC_DECL genType log(
+               genType x,
+               genType base);
+
+       //! Logarithm for any base.
+       //! From GLM_GTX_log_base.
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_DECL vecType<T, P> sign(
+               vecType<T, P> const & x,
+               vecType<T, P> const & base);
+
+       /// @}
+}//namespace glm
+
+#include "log_base.inl"
diff --git a/include/glm/gtx/log_base.inl b/include/glm/gtx/log_base.inl
new file mode 100644 (file)
index 0000000..95b8dfa
--- /dev/null
@@ -0,0 +1,47 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtx_log_base
+/// @file glm/gtx/log_base.inl
+/// @date 2008-10-24 / 2014-11-25
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////
+
+namespace glm
+{
+       template <typename genType> 
+       GLM_FUNC_QUALIFIER genType log(genType const & x, genType const & base)
+       {
+               assert(x != genType(0));
+               return glm::log(x) / glm::log(base);
+       }
+
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_QUALIFIER vecType<T, P> log(vecType<T, P> const & x, vecType<T, P> const & base)
+       {
+               return glm::log(x) / glm::log(base);
+       }
+}//namespace glm
diff --git a/include/glm/gtx/matrix_cross_product.hpp b/include/glm/gtx/matrix_cross_product.hpp
new file mode 100644 (file)
index 0000000..f4fd54f
--- /dev/null
@@ -0,0 +1,72 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtx_matrix_cross_product
+/// @file glm/gtx/matrix_cross_product.hpp
+/// @date 2005-12-21 / 2011-06-07
+/// @author Christophe Riccio
+///
+/// @see core (dependence)
+/// @see gtx_extented_min_max (dependence)
+///
+/// @defgroup gtx_matrix_cross_product GLM_GTX_matrix_cross_product
+/// @ingroup gtx
+/// 
+/// @brief Build cross product matrices
+/// 
+/// <glm/gtx/matrix_cross_product.hpp> need to be included to use these functionalities.
+///////////////////////////////////////////////////////////////////////////////////
+
+#pragma once
+
+// Dependency:
+#include "../glm.hpp"
+
+#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
+#      pragma message("GLM: GLM_GTX_matrix_cross_product extension included")
+#endif
+
+namespace glm
+{
+       /// @addtogroup gtx_matrix_cross_product
+       /// @{
+
+       //! Build a cross product matrix.
+       //! From GLM_GTX_matrix_cross_product extension.
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat3x3<T, P> matrixCross3(
+               tvec3<T, P> const & x);
+               
+       //! Build a cross product matrix.
+       //! From GLM_GTX_matrix_cross_product extension.
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat4x4<T, P> matrixCross4(
+               tvec3<T, P> const & x);
+
+       /// @}
+}//namespace glm
+
+#include "matrix_cross_product.inl"
diff --git a/include/glm/gtx/matrix_cross_product.inl b/include/glm/gtx/matrix_cross_product.inl
new file mode 100644 (file)
index 0000000..9665b06
--- /dev/null
@@ -0,0 +1,67 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtx_matrix_cross_product
+/// @file glm/gtx/matrix_cross_product.inl
+/// @date 2005-12-21 / 2005-12-21
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////
+
+namespace glm
+{
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat3x3<T, P> matrixCross3
+       (
+               tvec3<T, P> const & x
+       )
+       {
+               tmat3x3<T, P> Result(T(0));
+               Result[0][1] = x.z;
+               Result[1][0] = -x.z;
+               Result[0][2] = -x.y;
+               Result[2][0] = x.y;
+               Result[1][2] = x.x;
+               Result[2][1] = -x.x;
+               return Result;
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat4x4<T, P> matrixCross4
+       (
+               tvec3<T, P> const & x
+       )
+       {
+               tmat4x4<T, P> Result(T(0));
+               Result[0][1] = x.z;
+               Result[1][0] = -x.z;
+               Result[0][2] = -x.y;
+               Result[2][0] = x.y;
+               Result[1][2] = x.x;
+               Result[2][1] = -x.x;
+               return Result;
+       }
+
+}//namespace glm
diff --git a/include/glm/gtx/matrix_decompose.hpp b/include/glm/gtx/matrix_decompose.hpp
new file mode 100644 (file)
index 0000000..735b428
--- /dev/null
@@ -0,0 +1,70 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtx_matrix_decompose
+/// @file glm/gtx/matrix_decompose.hpp
+/// @date 2014-08-29 / 2014-08-29
+/// @author Christophe Riccio
+/// 
+/// @see core (dependence)
+///
+/// @defgroup gtx_matrix_decompose GLM_GTX_matrix_decompose
+/// @ingroup gtx
+/// 
+/// @brief Decomposes a model matrix to translations, rotation and scale components
+/// 
+/// <glm/gtx/decomposition.hpp> need to be included to use these functionalities.
+///////////////////////////////////////////////////////////////////////////////////
+
+#pragma once
+
+// Dependencies
+#include "../mat4x4.hpp"
+#include "../vec3.hpp"
+#include "../vec4.hpp"
+#include "../gtc/quaternion.hpp"
+#include "../gtc/matrix_transform.hpp"
+
+#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
+#      pragma message("GLM: GLM_GTX_matrix_decompose extension included")
+#endif
+
+namespace glm
+{
+       /// @addtogroup gtx_matrix_decompose
+       /// @{
+
+       /// Decomposes a model matrix to translations, rotation and scale components 
+       /// @see gtx_matrix_decompose
+       template <typename T, precision P>
+       GLM_FUNC_DECL bool decompose(
+               tmat4x4<T, P> const & modelMatrix,
+               tvec3<T, P> & scale, tquat<T, P> & orientation, tvec3<T, P> & translation, tvec3<T, P> & skew, tvec4<T, P> & perspective);
+
+       /// @}
+}//namespace glm
+
+#include "matrix_decompose.inl"
diff --git a/include/glm/gtx/matrix_decompose.inl b/include/glm/gtx/matrix_decompose.inl
new file mode 100644 (file)
index 0000000..ba507d0
--- /dev/null
@@ -0,0 +1,231 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtx_matrix_decompose
+/// @file glm/gtx/matrix_decompose.inl
+/// @date 2014-08-29 / 2014-08-29
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////
+
+namespace glm
+{
+       /// Make a linear combination of two vectors and return the result.
+       // result = (a * ascl) + (b * bscl)
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec3<T, P> combine(
+               tvec3<T, P> const & a, 
+               tvec3<T, P> const & b,
+               T ascl, T bscl)
+       {
+               return (a * ascl) + (b * bscl);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER void v3Scale(tvec3<T, P> & v, T desiredLength)
+       {
+               T len = glm::length(v);
+               if(len != 0)
+               {
+                       T l = desiredLength / len;
+                       v[0] *= l;
+                       v[1] *= l;
+                       v[2] *= l;
+               }
+       }
+
+       /**
+       * Matrix decompose
+       * http://www.opensource.apple.com/source/WebCore/WebCore-514/platform/graphics/transforms/TransformationMatrix.cpp
+       * Decomposes the mode matrix to translations,rotation scale components
+       * 
+       */
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER bool decompose(tmat4x4<T, P> const & ModelMatrix, tvec3<T, P> & Scale, tquat<T, P> & Orientation, tvec3<T, P> & Translation, tvec3<T, P> & Skew, tvec4<T, P> & Perspective)
+       {
+               tmat4x4<T, P> LocalMatrix(ModelMatrix);
+
+               // Normalize the matrix.
+               if(LocalMatrix[3][3] == static_cast<T>(0))
+                       return false;
+
+               for(length_t i = 0; i < 4; ++i)
+               for(length_t j = 0; j < 4; ++j)
+                       LocalMatrix[i][j] /= LocalMatrix[3][3];
+
+               // perspectiveMatrix is used to solve for perspective, but it also provides
+               // an easy way to test for singularity of the upper 3x3 component.
+               tmat4x4<T, P> PerspectiveMatrix(LocalMatrix);
+
+               for(length_t i = 0; i < 3; i++)
+                       PerspectiveMatrix[i][3] = 0;
+               PerspectiveMatrix[3][3] = 1;
+
+               /// TODO: Fixme!
+               if(determinant(PerspectiveMatrix) == static_cast<T>(0))
+                       return false;
+
+               // First, isolate perspective.  This is the messiest.
+               if(LocalMatrix[0][3] != 0 || LocalMatrix[1][3] != 0 || LocalMatrix[2][3] != 0)
+               {
+                       // rightHandSide is the right hand side of the equation.
+                       tvec4<T, P> RightHandSide;
+                       RightHandSide[0] = LocalMatrix[0][3];
+                       RightHandSide[1] = LocalMatrix[1][3];
+                       RightHandSide[2] = LocalMatrix[2][3];
+                       RightHandSide[3] = LocalMatrix[3][3];
+
+                       // Solve the equation by inverting PerspectiveMatrix and multiplying
+                       // rightHandSide by the inverse.  (This is the easiest way, not
+                       // necessarily the best.)
+                       tmat4x4<T, P> InversePerspectiveMatrix = glm::inverse(PerspectiveMatrix);//   inverse(PerspectiveMatrix, inversePerspectiveMatrix);
+                       tmat4x4<T, P> TransposedInversePerspectiveMatrix = glm::transpose(InversePerspectiveMatrix);//   transposeMatrix4(inversePerspectiveMatrix, transposedInversePerspectiveMatrix);
+
+                       Perspective = TransposedInversePerspectiveMatrix * RightHandSide;
+                       //  v4MulPointByMatrix(rightHandSide, transposedInversePerspectiveMatrix, perspectivePoint);
+
+                       // Clear the perspective partition
+                       LocalMatrix[0][3] = LocalMatrix[1][3] = LocalMatrix[2][3] = 0;
+                       LocalMatrix[3][3] = 1;
+               }
+               else
+               {
+                       // No perspective.
+                       Perspective = tvec4<T, P>(0, 0, 0, 1);
+               }
+
+               // Next take care of translation (easy).
+               Translation = tvec3<T, P>(LocalMatrix[3]);
+               LocalMatrix[3] = tvec4<T, P>(0, 0, 0, LocalMatrix[3].w);
+
+               tvec3<T, P> Row[3], Pdum3;
+
+               // Now get scale and shear.
+               for(length_t i = 0; i < 3; ++i)
+                       for(int j = 0; j < 3; ++j)
+                               Row[i][j] = LocalMatrix[i][j];
+
+               // Compute X scale factor and normalize first row.
+               Scale.x = length(Row[0]);// v3Length(Row[0]);
+
+               v3Scale(Row[0], static_cast<T>(1));
+
+               // Compute XY shear factor and make 2nd row orthogonal to 1st.
+               Skew.z = dot(Row[0], Row[1]);
+               Row[1] = combine(Row[1], Row[0], static_cast<T>(1), -Skew.z);
+
+               // Now, compute Y scale and normalize 2nd row.
+               Scale.y = length(Row[1]);
+               v3Scale(Row[1], static_cast<T>(1));
+               Skew.z /= Scale.y;
+
+               // Compute XZ and YZ shears, orthogonalize 3rd row.
+               Skew.y = glm::dot(Row[0], Row[2]);
+               Row[2] = combine(Row[2], Row[0], static_cast<T>(1), -Skew.y);
+               Skew.x = glm::dot(Row[1], Row[2]);
+               Row[2] = combine(Row[2], Row[1], static_cast<T>(1), -Skew.x);
+
+               // Next, get Z scale and normalize 3rd row.
+               Scale.z = length(Row[2]);
+               v3Scale(Row[2], static_cast<T>(1));
+               Skew.y /= Scale.z;
+               Skew.x /= Scale.z;
+
+               // At this point, the matrix (in rows[]) is orthonormal.
+               // Check for a coordinate system flip.  If the determinant
+               // is -1, then negate the matrix and the scaling factors.
+               Pdum3 = cross(Row[1], Row[2]); // v3Cross(row[1], row[2], Pdum3);
+               if(dot(Row[0], Pdum3) < 0)
+               {
+                       for(length_t i = 0; i < 3; i++)
+                       {
+                               Scale.x *= static_cast<T>(-1);
+                               Row[i] *= static_cast<T>(-1);
+                       }
+               }
+
+               // Now, get the rotations out, as described in the gem.
+
+               // FIXME - Add the ability to return either quaternions (which are
+               // easier to recompose with) or Euler angles (rx, ry, rz), which
+               // are easier for authors to deal with. The latter will only be useful
+               // when we fix https://bugs.webkit.org/show_bug.cgi?id=23799, so I
+               // will leave the Euler angle code here for now.
+
+               // ret.rotateY = asin(-Row[0][2]);
+               // if (cos(ret.rotateY) != 0) {
+               //     ret.rotateX = atan2(Row[1][2], Row[2][2]);
+               //     ret.rotateZ = atan2(Row[0][1], Row[0][0]);
+               // } else {
+               //     ret.rotateX = atan2(-Row[2][0], Row[1][1]);
+               //     ret.rotateZ = 0;
+               // }
+
+               T s, t, x, y, z, w;
+
+               t = Row[0][0] + Row[1][1] + Row[2][2] + 1.0;
+
+               if(t > 1e-4)
+               {
+                       s = 0.5 / sqrt(t);
+                       w = 0.25 / s;
+                       x = (Row[2][1] - Row[1][2]) * s;
+                       y = (Row[0][2] - Row[2][0]) * s;
+                       z = (Row[1][0] - Row[0][1]) * s;
+               }
+               else if(Row[0][0] > Row[1][1] && Row[0][0] > Row[2][2])
+               { 
+                       s = sqrt (1.0 + Row[0][0] - Row[1][1] - Row[2][2]) * 2.0; // S=4*qx 
+                       x = 0.25 * s;
+                       y = (Row[0][1] + Row[1][0]) / s; 
+                       z = (Row[0][2] + Row[2][0]) / s; 
+                       w = (Row[2][1] - Row[1][2]) / s;
+               }
+               else if(Row[1][1] > Row[2][2])
+               { 
+                       s = sqrt (1.0 + Row[1][1] - Row[0][0] - Row[2][2]) * 2.0; // S=4*qy
+                       x = (Row[0][1] + Row[1][0]) / s; 
+                       y = 0.25 * s;
+                       z = (Row[1][2] + Row[2][1]) / s; 
+                       w = (Row[0][2] - Row[2][0]) / s;
+               }
+               else
+               { 
+                       s = sqrt(1.0 + Row[2][2] - Row[0][0] - Row[1][1]) * 2.0; // S=4*qz
+                       x = (Row[0][2] + Row[2][0]) / s;
+                       y = (Row[1][2] + Row[2][1]) / s; 
+                       z = 0.25 * s;
+                       w = (Row[1][0] - Row[0][1]) / s;
+               }
+
+               Orientation.x = x;
+               Orientation.y = y;
+               Orientation.z = z;
+               Orientation.w = w;
+
+               return true;
+       }
+}//namespace glm
diff --git a/include/glm/gtx/matrix_interpolation.hpp b/include/glm/gtx/matrix_interpolation.hpp
new file mode 100644 (file)
index 0000000..d00b722
--- /dev/null
@@ -0,0 +1,89 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtx_matrix_interpolation
+/// @file glm/gtx/matrix_interpolation.hpp
+/// @date 2011-03-05 / 2011-06-07
+/// @author Ghenadii Ursachi (the.asteroth@gmail.com)
+///
+/// @see core (dependence)
+///
+/// @defgroup gtx_matrix_interpolation GLM_GTX_matrix_interpolation
+/// @ingroup gtx
+/// 
+/// @brief Allows to directly interpolate two exiciting matrices.
+/// 
+/// <glm/gtx/matrix_interpolation.hpp> need to be included to use these functionalities.
+///////////////////////////////////////////////////////////////////////////////////
+
+#pragma once
+
+// Dependency:
+#include "../glm.hpp"
+
+#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
+#      pragma message("GLM: GLM_GTX_matrix_interpolation extension included")
+#endif
+
+namespace glm
+{
+       /// @addtogroup gtx_matrix_interpolation
+       /// @{
+
+       /// Get the axis and angle of the rotation from a matrix.
+       /// From GLM_GTX_matrix_interpolation extension.
+       template <typename T, precision P>
+       GLM_FUNC_DECL void axisAngle(
+               tmat4x4<T, P> const & mat,
+               tvec3<T, P> & axis,
+               T & angle);
+
+       /// Build a matrix from axis and angle.
+       /// From GLM_GTX_matrix_interpolation extension.
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat4x4<T, P> axisAngleMatrix(
+               tvec3<T, P> const & axis,
+               T const angle);
+
+       /// Extracts the rotation part of a matrix.
+       /// From GLM_GTX_matrix_interpolation extension.
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat4x4<T, P> extractMatrixRotation(
+               tmat4x4<T, P> const & mat);
+
+       /// Build a interpolation of 4 * 4 matrixes.
+       /// From GLM_GTX_matrix_interpolation extension.
+       /// Warning! works only with rotation and/or translation matrixes, scale will generate unexpected results.
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat4x4<T, P> interpolate(
+               tmat4x4<T, P> const & m1,
+               tmat4x4<T, P> const & m2,
+               T const delta);
+
+       /// @}
+}//namespace glm
+
+#include "matrix_interpolation.inl"
diff --git a/include/glm/gtx/matrix_interpolation.inl b/include/glm/gtx/matrix_interpolation.inl
new file mode 100644 (file)
index 0000000..5112d1a
--- /dev/null
@@ -0,0 +1,163 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtx_matrix_interpolation
+/// @file glm/gtx/matrix_interpolation.hpp
+/// @date 2011-03-05 / 2011-03-05
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////
+
+namespace glm
+{
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER void axisAngle
+       (
+               tmat4x4<T, P> const & mat,
+               tvec3<T, P> & axis,
+               T & angle
+       )
+       {
+               T epsilon = (T)0.01;
+               T epsilon2 = (T)0.1;
+
+               if((abs(mat[1][0] - mat[0][1]) < epsilon) && (abs(mat[2][0] - mat[0][2]) < epsilon) && (abs(mat[2][1] - mat[1][2]) < epsilon))
+               {
+                       if ((abs(mat[1][0] + mat[0][1]) < epsilon2) && (abs(mat[2][0] + mat[0][2]) < epsilon2) && (abs(mat[2][1] + mat[1][2]) < epsilon2) && (abs(mat[0][0] + mat[1][1] + mat[2][2] - (T)3.0) < epsilon2))
+                       {
+                               angle = (T)0.0;
+                               axis.x = (T)1.0;
+                               axis.y = (T)0.0;
+                               axis.z = (T)0.0;
+                               return;
+                       }
+                       angle = static_cast<T>(3.1415926535897932384626433832795);
+                       T xx = (mat[0][0] + (T)1.0) / (T)2.0;
+                       T yy = (mat[1][1] + (T)1.0) / (T)2.0;
+                       T zz = (mat[2][2] + (T)1.0) / (T)2.0;
+                       T xy = (mat[1][0] + mat[0][1]) / (T)4.0;
+                       T xz = (mat[2][0] + mat[0][2]) / (T)4.0;
+                       T yz = (mat[2][1] + mat[1][2]) / (T)4.0;
+                       if((xx > yy) && (xx > zz))
+                       {
+                               if (xx < epsilon) {
+                                       axis.x = (T)0.0;
+                                       axis.y = (T)0.7071;
+                                       axis.z = (T)0.7071;
+                               } else {
+                                       axis.x = sqrt(xx);
+                                       axis.y = xy / axis.x;
+                                       axis.z = xz / axis.x;
+                               }
+                       }
+                       else if (yy > zz)
+                       {
+                               if (yy < epsilon) {
+                                       axis.x = (T)0.7071;
+                                       axis.y = (T)0.0;
+                                       axis.z = (T)0.7071;
+                               } else {
+                                       axis.y = sqrt(yy);
+                                       axis.x = xy / axis.y;
+                                       axis.z = yz / axis.y;
+                               }
+                       }
+                       else
+                       {
+                               if (zz < epsilon) {
+                                       axis.x = (T)0.7071;
+                                       axis.y = (T)0.7071;
+                                       axis.z = (T)0.0;
+                               } else {
+                                       axis.z = sqrt(zz);
+                                       axis.x = xz / axis.z;
+                                       axis.y = yz / axis.z;
+                               }
+                       }
+                       return;
+               }
+               T s = sqrt((mat[2][1] - mat[1][2]) * (mat[2][1] - mat[1][2]) + (mat[2][0] - mat[0][2]) * (mat[2][0] - mat[0][2]) + (mat[1][0] - mat[0][1]) * (mat[1][0] - mat[0][1]));
+               if (glm::abs(s) < T(0.001))
+                       s = (T)1.0;
+               angle = acos((mat[0][0] + mat[1][1] + mat[2][2] - (T)1.0) / (T)2.0);
+               axis.x = (mat[1][2] - mat[2][1]) / s;
+               axis.y = (mat[2][0] - mat[0][2]) / s;
+               axis.z = (mat[0][1] - mat[1][0]) / s;
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat4x4<T, P> axisAngleMatrix
+       (
+               tvec3<T, P> const & axis,
+               T const angle
+       )
+       {
+               T c = cos(angle);
+               T s = sin(angle);
+               T t = static_cast<T>(1) - c;
+               tvec3<T, P> n = normalize(axis);
+
+               return tmat4x4<T, P>(
+                       t * n.x * n.x + c,          t * n.x * n.y + n.z * s,    t * n.x * n.z - n.y * s,    T(0),
+                       t * n.x * n.y - n.z * s,    t * n.y * n.y + c,          t * n.y * n.z + n.x * s,    T(0),
+                       t * n.x * n.z + n.y * s,    t * n.y * n.z - n.x * s,    t * n.z * n.z + c,          T(0),
+                       T(0),                        T(0),                        T(0),                     T(1)
+               );
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat4x4<T, P> extractMatrixRotation
+       (
+               tmat4x4<T, P> const & mat
+       )
+       {
+               return tmat4x4<T, P>(
+                       mat[0][0], mat[0][1], mat[0][2], 0.0,
+                       mat[1][0], mat[1][1], mat[1][2], 0.0,
+                       mat[2][0], mat[2][1], mat[2][2], 0.0,
+                       0.0,       0.0,       0.0,       1.0
+               );
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat4x4<T, P> interpolate
+       (
+               tmat4x4<T, P> const & m1,
+               tmat4x4<T, P> const & m2,
+               T const delta
+       )
+       {
+               tmat4x4<T, P> m1rot = extractMatrixRotation(m1);
+               tmat4x4<T, P> dltRotation = m2 * transpose(m1rot);
+               tvec3<T, P> dltAxis;
+               T dltAngle;
+               axisAngle(dltRotation, dltAxis, dltAngle);
+               tmat4x4<T, P> out = axisAngleMatrix(dltAxis, dltAngle * delta) * m1rot;
+               out[3][0] = m1[3][0] + delta * (m2[3][0] - m1[3][0]);
+               out[3][1] = m1[3][1] + delta * (m2[3][1] - m1[3][1]);
+               out[3][2] = m1[3][2] + delta * (m2[3][2] - m1[3][2]);
+               return out;
+       }
+}//namespace glm
diff --git a/include/glm/gtx/matrix_major_storage.hpp b/include/glm/gtx/matrix_major_storage.hpp
new file mode 100644 (file)
index 0000000..a098a55
--- /dev/null
@@ -0,0 +1,144 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtx_matrix_major_storage
+/// @file glm/gtx/matrix_major_storage.hpp
+/// @date 2006-04-19 / 2011-06-07
+/// @author Christophe Riccio
+///
+/// @see core (dependence)
+/// @see gtx_extented_min_max (dependence)
+///
+/// @defgroup gtx_matrix_major_storage GLM_GTX_matrix_major_storage
+/// @ingroup gtx
+/// 
+/// @brief Build matrices with specific matrix order, row or column
+/// 
+/// <glm/gtx/matrix_major_storage.hpp> need to be included to use these functionalities.
+///////////////////////////////////////////////////////////////////////////////////
+
+#pragma once
+
+// Dependency:
+#include "../glm.hpp"
+
+#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
+#      pragma message("GLM: GLM_GTX_matrix_major_storage extension included")
+#endif
+
+namespace glm
+{
+       /// @addtogroup gtx_matrix_major_storage
+       /// @{
+
+       //! Build a row major matrix from row vectors.
+       //! From GLM_GTX_matrix_major_storage extension.
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat2x2<T, P> rowMajor2(
+               tvec2<T, P> const & v1, 
+               tvec2<T, P> const & v2);
+               
+       //! Build a row major matrix from other matrix.
+       //! From GLM_GTX_matrix_major_storage extension.
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat2x2<T, P> rowMajor2(
+               tmat2x2<T, P> const & m);
+
+       //! Build a row major matrix from row vectors.
+       //! From GLM_GTX_matrix_major_storage extension.
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat3x3<T, P> rowMajor3(
+               tvec3<T, P> const & v1, 
+               tvec3<T, P> const & v2, 
+               tvec3<T, P> const & v3);
+
+       //! Build a row major matrix from other matrix.
+       //! From GLM_GTX_matrix_major_storage extension.
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat3x3<T, P> rowMajor3(
+               tmat3x3<T, P> const & m);
+
+       //! Build a row major matrix from row vectors.
+       //! From GLM_GTX_matrix_major_storage extension.
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat4x4<T, P> rowMajor4(
+               tvec4<T, P> const & v1, 
+               tvec4<T, P> const & v2,
+               tvec4<T, P> const & v3, 
+               tvec4<T, P> const & v4);
+
+       //! Build a row major matrix from other matrix.
+       //! From GLM_GTX_matrix_major_storage extension.
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat4x4<T, P> rowMajor4(
+               tmat4x4<T, P> const & m);
+
+       //! Build a column major matrix from column vectors.
+       //! From GLM_GTX_matrix_major_storage extension.
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat2x2<T, P> colMajor2(
+               tvec2<T, P> const & v1, 
+               tvec2<T, P> const & v2);
+               
+       //! Build a column major matrix from other matrix.
+       //! From GLM_GTX_matrix_major_storage extension.
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat2x2<T, P> colMajor2(
+               tmat2x2<T, P> const & m);
+
+       //! Build a column major matrix from column vectors.
+       //! From GLM_GTX_matrix_major_storage extension.
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat3x3<T, P> colMajor3(
+               tvec3<T, P> const & v1, 
+               tvec3<T, P> const & v2, 
+               tvec3<T, P> const & v3);
+               
+       //! Build a column major matrix from other matrix.
+       //! From GLM_GTX_matrix_major_storage extension.
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat3x3<T, P> colMajor3(
+               tmat3x3<T, P> const & m);
+               
+       //! Build a column major matrix from column vectors.
+       //! From GLM_GTX_matrix_major_storage extension.
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat4x4<T, P> colMajor4(
+               tvec4<T, P> const & v1, 
+               tvec4<T, P> const & v2, 
+               tvec4<T, P> const & v3, 
+               tvec4<T, P> const & v4);
+                               
+       //! Build a column major matrix from other matrix.
+       //! From GLM_GTX_matrix_major_storage extension.
+       template <typename T, precision P> 
+       GLM_FUNC_DECL tmat4x4<T, P> colMajor4(
+               tmat4x4<T, P> const & m);
+
+       /// @}
+}//namespace glm
+
+#include "matrix_major_storage.inl"
diff --git a/include/glm/gtx/matrix_major_storage.inl b/include/glm/gtx/matrix_major_storage.inl
new file mode 100644 (file)
index 0000000..5166a66
--- /dev/null
@@ -0,0 +1,196 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtx_matrix_major_storage
+/// @file glm/gtx/matrix_major_storage.hpp
+/// @date 2006-04-19 / 2014-11-25
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////
+
+namespace glm
+{
+       template <typename T, precision P> 
+       GLM_FUNC_QUALIFIER tmat2x2<T, P> rowMajor2
+       (
+               tvec2<T, P> const & v1, 
+               tvec2<T, P> const & v2
+       )
+       {
+               tmat2x2<T, P> Result;
+               Result[0][0] = v1.x;
+               Result[1][0] = v1.y;
+               Result[0][1] = v2.x;
+               Result[1][1] = v2.y;
+               return Result;
+       }
+
+       template <typename T, precision P> 
+       GLM_FUNC_QUALIFIER tmat2x2<T, P> rowMajor2(
+               const tmat2x2<T, P>& m)
+       {
+               tmat2x2<T, P> Result;
+               Result[0][0] = m[0][0];
+               Result[0][1] = m[1][0];
+               Result[1][0] = m[0][1];
+               Result[1][1] = m[1][1];
+               return Result;
+       }
+
+       template <typename T, precision P> 
+       GLM_FUNC_QUALIFIER tmat3x3<T, P> rowMajor3(
+               const tvec3<T, P>& v1, 
+               const tvec3<T, P>& v2, 
+               const tvec3<T, P>& v3)
+       {
+               tmat3x3<T, P> Result;
+               Result[0][0] = v1.x;
+               Result[1][0] = v1.y;
+               Result[2][0] = v1.z;
+               Result[0][1] = v2.x;
+               Result[1][1] = v2.y;
+               Result[2][1] = v2.z;
+               Result[0][2] = v3.x;
+               Result[1][2] = v3.y;
+               Result[2][2] = v3.z;
+               return Result;
+       }
+
+       template <typename T, precision P> 
+       GLM_FUNC_QUALIFIER tmat3x3<T, P> rowMajor3(
+               const tmat3x3<T, P>& m)
+       {
+               tmat3x3<T, P> Result;
+               Result[0][0] = m[0][0];
+               Result[0][1] = m[1][0];
+               Result[0][2] = m[2][0];
+               Result[1][0] = m[0][1];
+               Result[1][1] = m[1][1];
+               Result[1][2] = m[2][1];
+               Result[2][0] = m[0][2];
+               Result[2][1] = m[1][2];
+               Result[2][2] = m[2][2];
+               return Result;
+       }
+
+       template <typename T, precision P> 
+       GLM_FUNC_QUALIFIER tmat4x4<T, P> rowMajor4(
+               const tvec4<T, P>& v1, 
+               const tvec4<T, P>& v2, 
+               const tvec4<T, P>& v3, 
+               const tvec4<T, P>& v4)
+       {
+               tmat4x4<T, P> Result;
+               Result[0][0] = v1.x;
+               Result[1][0] = v1.y;
+               Result[2][0] = v1.z;
+               Result[3][0] = v1.w;
+               Result[0][1] = v2.x;
+               Result[1][1] = v2.y;
+               Result[2][1] = v2.z;
+               Result[3][1] = v2.w;
+               Result[0][2] = v3.x;
+               Result[1][2] = v3.y;
+               Result[2][2] = v3.z;
+               Result[3][2] = v3.w;
+               Result[0][3] = v4.x;
+               Result[1][3] = v4.y;
+               Result[2][3] = v4.z;
+               Result[3][3] = v4.w;
+               return Result;
+       }
+
+       template <typename T, precision P> 
+       GLM_FUNC_QUALIFIER tmat4x4<T, P> rowMajor4(
+               const tmat4x4<T, P>& m)
+       {
+               tmat4x4<T, P> Result;
+               Result[0][0] = m[0][0];
+               Result[0][1] = m[1][0];
+               Result[0][2] = m[2][0];
+               Result[0][3] = m[3][0];
+               Result[1][0] = m[0][1];
+               Result[1][1] = m[1][1];
+               Result[1][2] = m[2][1];
+               Result[1][3] = m[3][1];
+               Result[2][0] = m[0][2];
+               Result[2][1] = m[1][2];
+               Result[2][2] = m[2][2];
+               Result[2][3] = m[3][2];
+               Result[3][0] = m[0][3];
+               Result[3][1] = m[1][3];
+               Result[3][2] = m[2][3];
+               Result[3][3] = m[3][3];
+               return Result;
+       }
+
+       template <typename T, precision P> 
+       GLM_FUNC_QUALIFIER tmat2x2<T, P> colMajor2(
+               const tvec2<T, P>& v1, 
+               const tvec2<T, P>& v2)
+       {
+               return tmat2x2<T, P>(v1, v2);
+       }
+
+       template <typename T, precision P> 
+       GLM_FUNC_QUALIFIER tmat2x2<T, P> colMajor2(
+               const tmat2x2<T, P>& m)
+       {
+               return tmat2x2<T, P>(m);
+       }
+
+       template <typename T, precision P> 
+       GLM_FUNC_QUALIFIER tmat3x3<T, P> colMajor3(
+               const tvec3<T, P>& v1, 
+               const tvec3<T, P>& v2, 
+               const tvec3<T, P>& v3)
+       {
+               return tmat3x3<T, P>(v1, v2, v3);
+       }
+
+       template <typename T, precision P> 
+       GLM_FUNC_QUALIFIER tmat3x3<T, P> colMajor3(
+               const tmat3x3<T, P>& m)
+       {
+               return tmat3x3<T, P>(m);
+       }
+
+       template <typename T, precision P> 
+       GLM_FUNC_QUALIFIER tmat4x4<T, P> colMajor4(
+               const tvec4<T, P>& v1, 
+               const tvec4<T, P>& v2, 
+               const tvec4<T, P>& v3, 
+               const tvec4<T, P>& v4)
+       {
+               return tmat4x4<T, P>(v1, v2, v3, v4);
+       }
+
+       template <typename T, precision P> 
+       GLM_FUNC_QUALIFIER tmat4x4<T, P> colMajor4(
+               const tmat4x4<T, P>& m)
+       {
+               return tmat4x4<T, P>(m);
+       }
+}//namespace glm
diff --git a/include/glm/gtx/matrix_operation.hpp b/include/glm/gtx/matrix_operation.hpp
new file mode 100644 (file)
index 0000000..3c06b94
--- /dev/null
@@ -0,0 +1,113 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtx_matrix_operation
+/// @file glm/gtx/matrix_operation.hpp
+/// @date 2009-08-29 / 2011-06-07
+/// @author Christophe Riccio
+///
+/// @see core (dependence)
+///
+/// @defgroup gtx_matrix_operation GLM_GTX_matrix_operation
+/// @ingroup gtx
+/// 
+/// @brief Build diagonal matrices from vectors.
+/// 
+/// <glm/gtx/matrix_operation.hpp> need to be included to use these functionalities.
+///////////////////////////////////////////////////////////////////////////////////
+
+#pragma once
+
+// Dependency:
+#include "../glm.hpp"
+
+#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
+#      pragma message("GLM: GLM_GTX_matrix_operation extension included")
+#endif
+
+namespace glm
+{
+       /// @addtogroup gtx_matrix_operation
+       /// @{
+
+       //! Build a diagonal matrix.
+       //! From GLM_GTX_matrix_operation extension.
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat2x2<T, P> diagonal2x2(
+               tvec2<T, P> const & v);
+
+       //! Build a diagonal matrix.
+       //! From GLM_GTX_matrix_operation extension.
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat2x3<T, P> diagonal2x3(
+               tvec2<T, P> const & v);
+
+       //! Build a diagonal matrix.
+       //! From GLM_GTX_matrix_operation extension.
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat2x4<T, P> diagonal2x4(
+               tvec2<T, P> const & v);
+
+       //! Build a diagonal matrix.
+       //! From GLM_GTX_matrix_operation extension.
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat3x2<T, P> diagonal3x2(
+               tvec2<T, P> const & v);
+
+       //! Build a diagonal matrix.
+       //! From GLM_GTX_matrix_operation extension.
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat3x3<T, P> diagonal3x3(
+               tvec3<T, P> const & v);
+
+       //! Build a diagonal matrix.
+       //! From GLM_GTX_matrix_operation extension.
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat3x4<T, P> diagonal3x4(
+               tvec3<T, P> const & v);
+
+       //! Build a diagonal matrix.
+       //! From GLM_GTX_matrix_operation extension.
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat4x2<T, P> diagonal4x2(
+               tvec2<T, P> const & v);
+
+       //! Build a diagonal matrix.
+       //! From GLM_GTX_matrix_operation extension.
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat4x3<T, P> diagonal4x3(
+               tvec3<T, P> const & v);
+
+       //! Build a diagonal matrix.
+       //! From GLM_GTX_matrix_operation extension.
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat4x4<T, P> diagonal4x4(
+               tvec4<T, P> const & v);
+
+       /// @}
+}//namespace glm
+
+#include "matrix_operation.inl"
diff --git a/include/glm/gtx/matrix_operation.inl b/include/glm/gtx/matrix_operation.inl
new file mode 100644 (file)
index 0000000..20c1496
--- /dev/null
@@ -0,0 +1,147 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtx_matrix_operation
+/// @file glm/gtx/matrix_operation.inl
+/// @date 2009-08-29 / 2009-08-29
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////
+
+namespace glm
+{
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat2x2<T, P> diagonal2x2
+       (
+               tvec2<T, P> const & v
+       )
+       {
+               tmat2x2<T, P> Result(static_cast<T>(1));
+               Result[0][0] = v[0];
+               Result[1][1] = v[1];
+               return Result;
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat2x3<T, P> diagonal2x3
+       (
+               tvec2<T, P> const & v
+       )
+       {
+               tmat2x3<T, P> Result(static_cast<T>(1));
+               Result[0][0] = v[0];
+               Result[1][1] = v[1];
+               return Result;
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat2x4<T, P> diagonal2x4
+       (
+               tvec2<T, P> const & v
+       )
+       {
+               tmat2x4<T, P> Result(static_cast<T>(1));
+               Result[0][0] = v[0];
+               Result[1][1] = v[1];
+               return Result;
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat3x2<T, P> diagonal3x2
+       (
+               tvec2<T, P> const & v
+       )
+       {
+               tmat3x2<T, P> Result(static_cast<T>(1));
+               Result[0][0] = v[0];
+               Result[1][1] = v[1];
+               return Result;
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat3x3<T, P> diagonal3x3
+       (
+               tvec3<T, P> const & v
+       )
+       {
+               tmat3x3<T, P> Result(static_cast<T>(1));
+               Result[0][0] = v[0];
+               Result[1][1] = v[1];
+               Result[2][2] = v[2];
+               return Result;
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat3x4<T, P> diagonal3x4
+       (
+               tvec3<T, P> const & v
+       )
+       {
+               tmat3x4<T, P> Result(static_cast<T>(1));
+               Result[0][0] = v[0];
+               Result[1][1] = v[1];
+               Result[2][2] = v[2];
+               return Result;
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat4x4<T, P> diagonal4x4
+       (
+               tvec4<T, P> const & v
+       )
+       {
+               tmat4x4<T, P> Result(static_cast<T>(1));
+               Result[0][0] = v[0];
+               Result[1][1] = v[1];
+               Result[2][2] = v[2];
+               Result[3][3] = v[3];
+               return Result;          
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat4x3<T, P> diagonal4x3
+       (
+               tvec3<T, P> const & v
+       )
+       {
+               tmat4x3<T, P> Result(static_cast<T>(1));
+               Result[0][0] = v[0];
+               Result[1][1] = v[1];
+               Result[2][2] = v[2];
+               return Result;          
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat4x2<T, P> diagonal4x2
+       (
+               tvec2<T, P> const & v
+       )
+       {
+               tmat4x2<T, P> Result(static_cast<T>(1));
+               Result[0][0] = v[0];
+               Result[1][1] = v[1];
+               return Result;          
+       }
+}//namespace glm
diff --git a/include/glm/gtx/matrix_query.hpp b/include/glm/gtx/matrix_query.hpp
new file mode 100644 (file)
index 0000000..0be1e54
--- /dev/null
@@ -0,0 +1,102 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtx_matrix_query
+/// @file glm/gtx/matrix_query.hpp
+/// @date 2007-03-05 / 2011-08-28
+/// @author Christophe Riccio
+///
+/// @see core (dependence)
+/// @see gtx_vector_query (dependence)
+///
+/// @defgroup gtx_matrix_query GLM_GTX_matrix_query
+/// @ingroup gtx
+/// 
+/// @brief Query to evaluate matrix properties
+/// 
+/// <glm/gtx/matrix_query.hpp> need to be included to use these functionalities.
+///////////////////////////////////////////////////////////////////////////////////
+
+#pragma once
+
+// Dependency:
+#include "../glm.hpp"
+#include "../gtx/vector_query.hpp"
+#include <limits>
+
+#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
+#      pragma message("GLM: GLM_GTX_matrix_query extension included")
+#endif
+
+namespace glm
+{
+       /// @addtogroup gtx_matrix_query
+       /// @{
+
+       /// Return whether a matrix a null matrix.
+       /// From GLM_GTX_matrix_query extension.
+       template<typename T, precision P>
+       GLM_FUNC_DECL bool isNull(tmat2x2<T, P> const & m, T const & epsilon);
+               
+       /// Return whether a matrix a null matrix.
+       /// From GLM_GTX_matrix_query extension.
+       template<typename T, precision P>
+       GLM_FUNC_DECL bool isNull(tmat3x3<T, P> const & m, T const & epsilon);
+               
+       /// Return whether a matrix is a null matrix.
+       /// From GLM_GTX_matrix_query extension.
+       template<typename T, precision P>
+       GLM_FUNC_DECL bool isNull(tmat4x4<T, P> const & m, T const & epsilon);
+                       
+       /// Return whether a matrix is an identity matrix.
+       /// From GLM_GTX_matrix_query extension.
+       template<typename T, precision P, template <typename, precision> class matType>
+       GLM_FUNC_DECL bool isIdentity(matType<T, P> const & m, T const & epsilon);
+
+       /// Return whether a matrix is a normalized matrix.
+       /// From GLM_GTX_matrix_query extension.
+       template<typename T, precision P>
+       GLM_FUNC_DECL bool isNormalized(tmat2x2<T, P> const & m, T const & epsilon);
+
+       /// Return whether a matrix is a normalized matrix.
+       /// From GLM_GTX_matrix_query extension.
+       template<typename T, precision P>
+       GLM_FUNC_DECL bool isNormalized(tmat3x3<T, P> const & m, T const & epsilon);
+
+       /// Return whether a matrix is a normalized matrix.
+       /// From GLM_GTX_matrix_query extension.
+       template<typename T, precision P>
+       GLM_FUNC_DECL bool isNormalized(tmat4x4<T, P> const & m, T const & epsilon);
+
+       /// Return whether a matrix is an orthonormalized matrix.
+       /// From GLM_GTX_matrix_query extension.
+       template<typename T, precision P, template <typename, precision> class matType>
+       GLM_FUNC_DECL bool isOrthogonal(matType<T, P> const & m, T const & epsilon);
+
+       /// @}
+}//namespace glm
+
+#include "matrix_query.inl"
diff --git a/include/glm/gtx/matrix_query.inl b/include/glm/gtx/matrix_query.inl
new file mode 100644 (file)
index 0000000..d913116
--- /dev/null
@@ -0,0 +1,143 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtx_matrix_query
+/// @file glm/gtx/matrix_query.inl
+/// @date 2007-03-05 / 2007-03-05
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////
+
+namespace glm
+{
+       template<typename T, precision P>
+       GLM_FUNC_QUALIFIER bool isNull(tmat2x2<T, P> const & m, T const & epsilon)
+       {
+               bool result = true;
+               for(detail::component_count_t i = 0; result && i < 2 ; ++i)
+                       result = isNull(m[i], epsilon);
+               return result;
+       }
+
+       template<typename T, precision P>
+       GLM_FUNC_QUALIFIER bool isNull(tmat3x3<T, P> const & m, T const & epsilon)
+       {
+               bool result = true;
+               for(detail::component_count_t i = 0; result && i < 3 ; ++i)
+                       result = isNull(m[i], epsilon);
+               return result;
+       }
+
+       template<typename T, precision P>
+       GLM_FUNC_QUALIFIER bool isNull(tmat4x4<T, P> const & m, T const & epsilon)
+       {
+               bool result = true;
+               for(detail::component_count_t i = 0; result && i < 4 ; ++i)
+                       result = isNull(m[i], epsilon);
+               return result;
+       }
+
+       template<typename T, precision P, template <typename, precision> class matType>
+       GLM_FUNC_QUALIFIER bool isIdentity(matType<T, P> const & m, T const & epsilon)
+       {
+               bool result = true;
+               for(detail::component_count_t i(0); result && i < detail::component_count(m[0]); ++i)
+               {
+                       for(detail::component_count_t j(0); result && j < i ; ++j)
+                               result = abs(m[i][j]) <= epsilon;
+                       if(result)
+                               result = abs(m[i][i] - 1) <= epsilon;
+                       for(detail::component_count_t j(i + 1); result && j < detail::component_count(m); ++j)
+                               result = abs(m[i][j]) <= epsilon;
+               }
+               return result;
+       }
+
+       template<typename T, precision P>
+       GLM_FUNC_QUALIFIER bool isNormalized(tmat2x2<T, P> const & m, T const & epsilon)
+       {
+               bool result(true);
+               for(detail::component_count_t i(0); result && i < detail::component_count(m); ++i)
+                       result = isNormalized(m[i], epsilon);
+               for(detail::component_count_t i(0); result && i < detail::component_count(m); ++i)
+               {
+                       typename tmat2x2<T, P>::col_type v;
+                       for(detail::component_count_t j(0); j < detail::component_count(m); ++j)
+                               v[j] = m[j][i];
+                       result = isNormalized(v, epsilon);
+               }
+               return result;
+       }
+
+       template<typename T, precision P>
+       GLM_FUNC_QUALIFIER bool isNormalized(tmat3x3<T, P> const & m, T const & epsilon)
+       {
+               bool result(true);
+               for(detail::component_count_t i(0); result && i < detail::component_count(m); ++i)
+                       result = isNormalized(m[i], epsilon);
+               for(detail::component_count_t i(0); result && i < detail::component_count(m); ++i)
+               {
+                       typename tmat3x3<T, P>::col_type v;
+                       for(detail::component_count_t j(0); j < detail::component_count(m); ++j)
+                               v[j] = m[j][i];
+                       result = isNormalized(v, epsilon);
+               }
+               return result;
+       }
+
+       template<typename T, precision P>
+       GLM_FUNC_QUALIFIER bool isNormalized(tmat4x4<T, P> const & m, T const & epsilon)
+       {
+               bool result(true);
+               for(detail::component_count_t i(0); result && i < detail::component_count(m); ++i)
+                       result = isNormalized(m[i], epsilon);
+               for(detail::component_count_t i(0); result && i < detail::component_count(m); ++i)
+               {
+                       typename tmat4x4<T, P>::col_type v;
+                       for(detail::component_count_t j(0); j < detail::component_count(m); ++j)
+                               v[j] = m[j][i];
+                       result = isNormalized(v, epsilon);
+               }
+               return result;
+       }
+
+       template<typename T, precision P, template <typename, precision> class matType>
+       GLM_FUNC_QUALIFIER bool isOrthogonal(matType<T, P> const & m, T const & epsilon)
+       {
+               bool result(true);
+               for(detail::component_count_t i(0); result && i < detail::component_count(m) - 1; ++i)
+               for(detail::component_count_t j(i + 1); result && j < detail::component_count(m); ++j)
+                       result = areOrthogonal(m[i], m[j], epsilon);
+
+               if(result)
+               {
+                       matType<T, P> tmp = transpose(m);
+                       for(detail::component_count_t i(0); result && i < detail::component_count(m) - 1 ; ++i)
+                       for(detail::component_count_t j(i + 1); result && j < detail::component_count(m); ++j)
+                               result = areOrthogonal(tmp[i], tmp[j], epsilon);
+               }
+               return result;
+       }
+}//namespace glm
diff --git a/include/glm/gtx/matrix_transform_2d.hpp b/include/glm/gtx/matrix_transform_2d.hpp
new file mode 100644 (file)
index 0000000..010a437
--- /dev/null
@@ -0,0 +1,106 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtx_matrix_transform_2d
+/// @file glm/gtx/matrix_transform_2d.hpp
+/// @date 2014-02-20
+/// @author Miguel Ángel Pérez Martínez
+///
+/// @see core (dependence)
+///
+/// @defgroup gtx_matrix_transform_2d GLM_GTX_matrix_transform_2d
+/// @ingroup gtx
+/// 
+/// @brief Defines functions that generate common 2d transformation matrices.
+/// 
+/// <glm/gtx/matrix_transform_2d.hpp> need to be included to use these functionalities.
+///////////////////////////////////////////////////////////////////////////////////
+
+#pragma once
+
+// Dependency:
+#include "../mat3x3.hpp"
+#include "../vec2.hpp"
+
+
+#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
+#      pragma message("GLM: GLM_GTX_matrix_transform_2d extension included")
+#endif
+
+namespace glm
+{
+       /// @addtogroup gtx_matrix_transform_2d
+       /// @{
+       
+       /// Builds a translation 3 * 3 matrix created from a vector of 2 components.
+       ///
+       /// @param m Input matrix multiplied by this translation matrix.
+       /// @param v Coordinates of a translation vector.               
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat3x3<T, P> translate(
+               tmat3x3<T, P> const & m,
+               tvec2<T, P> const & v);
+
+       /// Builds a rotation 3 * 3 matrix created from an angle. 
+       ///
+       /// @param m Input matrix multiplied by this translation matrix.
+       /// @param angle Rotation angle expressed in radians if GLM_FORCE_RADIANS is defined or degrees otherwise.
+       template <typename T, precision P> 
+       GLM_FUNC_QUALIFIER tmat3x3<T, P> rotate(
+               tmat3x3<T, P> const & m,
+               T angle);
+
+       /// Builds a scale 3 * 3 matrix created from a vector of 2 components.
+       ///
+       /// @param m Input matrix multiplied by this translation matrix.
+       /// @param v Coordinates of a scale vector.             
+       template <typename T, precision P> 
+       GLM_FUNC_QUALIFIER tmat3x3<T, P> scale(
+               tmat3x3<T, P> const & m,
+               tvec2<T, P> const & v);
+
+       /// Builds an horizontal (parallel to the x axis) shear 3 * 3 matrix. 
+       ///
+       /// @param m Input matrix multiplied by this translation matrix.
+       /// @param y Shear factor.
+       template <typename T, precision P> 
+       GLM_FUNC_QUALIFIER tmat3x3<T, P> shearX(
+               tmat3x3<T, P> const & m,
+               T y);
+
+       /// Builds a vertical (parallel to the y axis) shear 3 * 3 matrix. 
+       ///
+       /// @param m Input matrix multiplied by this translation matrix.
+       /// @param x Shear factor.
+       template <typename T, precision P> 
+       GLM_FUNC_QUALIFIER tmat3x3<T, P> shearY(
+               tmat3x3<T, P> const & m,
+               T x);
+
+       /// @}
+}//namespace glm
+
+#include "matrix_transform_2d.inl"
diff --git a/include/glm/gtx/matrix_transform_2d.inl b/include/glm/gtx/matrix_transform_2d.inl
new file mode 100644 (file)
index 0000000..0c97161
--- /dev/null
@@ -0,0 +1,97 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtx_matrix_transform_2d
+/// @file glm/gtc/matrix_transform_2d.inl
+/// @date 2014-02-20
+/// @author Miguel Ángel Pérez Martínez
+///////////////////////////////////////////////////////////////////////////////////
+
+#include "../trigonometric.hpp"
+
+namespace glm
+{
+       
+       template <typename T, precision P> 
+       GLM_FUNC_QUALIFIER tmat3x3<T, P> translate(
+               tmat3x3<T, P> const & m,
+               tvec2<T, P> const & v)
+       {
+               tmat3x3<T, P> Result(m);
+               Result[2] = m[0] * v[0] + m[1] * v[1] + m[2];
+               return Result;
+       }
+
+
+       template <typename T, precision P> 
+       GLM_FUNC_QUALIFIER tmat3x3<T, P> rotate(
+               tmat3x3<T, P> const & m,
+               T angle)
+       {
+               T const a = angle;
+               T const c = cos(a);
+               T const s = sin(a);
+
+               tmat3x3<T, P> Result(uninitialize);
+               Result[0] = m[0] * c + m[1] * s;
+               Result[1] = m[0] * -s + m[1] * c;
+               Result[2] = m[2];
+               return Result;
+       }
+
+       template <typename T, precision P> 
+       GLM_FUNC_QUALIFIER tmat3x3<T, P> scale(
+               tmat3x3<T, P> const & m,
+               tvec2<T, P> const & v)
+       {
+               tmat3x3<T, P> Result(uninitialize);
+               Result[0] = m[0] * v[0];
+               Result[1] = m[1] * v[1];
+               Result[2] = m[2];
+               return Result;
+       }
+
+       template <typename T, precision P> 
+       GLM_FUNC_QUALIFIER tmat3x3<T, P> shearX(
+               tmat3x3<T, P> const & m,
+               T y)
+       {
+               tmat3x3<T, P> Result(1);
+               Result[0][1] = y;
+               return m * Result;
+       }
+
+       template <typename T, precision P> 
+       GLM_FUNC_QUALIFIER tmat3x3<T, P> shearY(
+               tmat3x3<T, P> const & m,
+               T x)
+       {
+               tmat3x3<T, P> Result(1);
+               Result[1][0] = x;
+               return m * Result;
+       }
+
+}//namespace glm
diff --git a/include/glm/gtx/mixed_product.hpp b/include/glm/gtx/mixed_product.hpp
new file mode 100644 (file)
index 0000000..9128640
--- /dev/null
@@ -0,0 +1,66 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtx_mixed_product
+/// @file glm/gtx/mixed_product.hpp
+/// @date 2007-04-03 / 2011-06-07
+/// @author Christophe Riccio
+///
+/// @see core (dependence)
+///
+/// @defgroup gtx_mixed_product GLM_GTX_mixed_producte
+/// @ingroup gtx
+/// 
+/// @brief Mixed product of 3 vectors.
+/// 
+/// <glm/gtx/mixed_product.hpp> need to be included to use these functionalities.
+///////////////////////////////////////////////////////////////////////////////////
+
+#pragma once
+
+// Dependency:
+#include "../glm.hpp"
+
+#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
+#      pragma message("GLM: GLM_GTX_mixed_product extension included")
+#endif
+
+namespace glm
+{
+       /// @addtogroup gtx_mixed_product
+       /// @{
+
+       /// @brief Mixed product of 3 vectors (from GLM_GTX_mixed_product extension)
+       template <typename T, precision P> 
+       GLM_FUNC_DECL T mixedProduct(
+               tvec3<T, P> const & v1, 
+               tvec3<T, P> const & v2, 
+               tvec3<T, P> const & v3);
+
+       /// @}
+}// namespace glm
+
+#include "mixed_product.inl"
diff --git a/include/glm/gtx/mixed_product.inl b/include/glm/gtx/mixed_product.inl
new file mode 100644 (file)
index 0000000..36ef814
--- /dev/null
@@ -0,0 +1,45 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtx_mixed_product
+/// @file glm/gtx/mixed_product.inl
+/// @date 2007-04-03 / 2008-09-17
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////
+
+namespace glm
+{
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER T mixedProduct
+       (
+               tvec3<T, P> const & v1,
+               tvec3<T, P> const & v2,
+               tvec3<T, P> const & v3
+       )
+       {
+               return dot(cross(v1, v2), v3);
+       }
+}//namespace glm
diff --git a/include/glm/gtx/multiple.hpp b/include/glm/gtx/multiple.hpp
new file mode 100644 (file)
index 0000000..f693ee1
--- /dev/null
@@ -0,0 +1,106 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtx_multiple
+/// @file glm/gtx/multiple.hpp
+/// @date 2009-10-26 / 2011-06-07
+/// @author Christophe Riccio
+///
+/// @see core (dependence)
+/// @see gtx_extented_min_max (dependence)
+///
+/// @defgroup gtx_multiple GLM_GTX_multiple
+/// @ingroup gtx
+/// 
+/// @brief Find the closest number of a number multiple of other number.
+/// 
+/// <glm/gtx/multiple.hpp> need to be included to use these functionalities.
+///////////////////////////////////////////////////////////////////////////////////
+
+#pragma once
+
+// Dependency:
+#include "../gtc/round.hpp"
+
+#pragma message("GLM: GLM_GTX_multiple extension is deprecated, use GLM_GTC_round instead.")
+
+namespace glm
+{
+       /// @addtogroup gtx_multiple
+       /// @{
+
+       /// Higher multiple number of Source.
+       ///
+       /// @tparam genType Floating-point or integer scalar or vector types.
+       /// @param Source 
+       /// @param Multiple Must be a null or positive value
+       ///
+       /// @see gtx_multiple
+       template <typename genType>
+       GLM_DEPRECATED GLM_FUNC_DECL genType higherMultiple(
+               genType Source,
+               genType Multiple);
+
+       /// Higher multiple number of Source.
+       ///
+       /// @tparam genType Floating-point or integer scalar or vector types.
+       /// @param Source 
+       /// @param Multiple Must be a null or positive value
+       ///
+       /// @see gtx_multiple
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_DEPRECATED GLM_FUNC_DECL vecType<T, P> higherMultiple(
+               vecType<T, P> const & Source,
+               vecType<T, P> const & Multiple);
+
+       /// Lower multiple number of Source.
+       ///
+       /// @tparam genType Floating-point or integer scalar or vector types.
+       /// @param Source 
+       /// @param Multiple Must be a null or positive value
+       ///
+       /// @see gtx_multiple
+       template <typename genType>
+       GLM_DEPRECATED GLM_FUNC_DECL genType lowerMultiple(
+               genType Source,
+               genType Multiple);
+
+       /// Lower multiple number of Source.
+       ///
+       /// @tparam genType Floating-point or integer scalar or vector types.
+       /// @param Source 
+       /// @param Multiple Must be a null or positive value
+       ///
+       /// @see gtx_multiple
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_DEPRECATED GLM_FUNC_DECL vecType<T, P> lowerMultiple(
+               vecType<T, P> const & Source,
+               vecType<T, P> const & Multiple);
+
+       /// @}
+}//namespace glm
+
+#include "multiple.inl"
diff --git a/include/glm/gtx/multiple.inl b/include/glm/gtx/multiple.inl
new file mode 100644 (file)
index 0000000..878cdfb
--- /dev/null
@@ -0,0 +1,64 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtx_multiple
+/// @file glm/gtx/multiple.inl
+/// @date 2009-10-26 / 2011-06-07
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////
+
+namespace glm
+{
+       //////////////////////
+       // higherMultiple
+
+       template <typename genType>
+       GLM_FUNC_QUALIFIER genType higherMultiple(genType Source, genType Multiple)
+       {
+               return detail::compute_ceilMultiple<std::numeric_limits<genType>::is_iec559, std::numeric_limits<genType>::is_signed>::call(Source, Multiple);
+       }
+
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_QUALIFIER vecType<T, P> higherMultiple(vecType<T, P> const & Source, vecType<T, P> const & Multiple)
+       {
+               return detail::functor2<T, P, vecType>::call(higherMultiple, Source, Multiple);
+       }
+
+       //////////////////////
+       // lowerMultiple
+
+       template <typename genType>
+       GLM_FUNC_QUALIFIER genType lowerMultiple(genType Source, genType Multiple)
+       {
+               return detail::compute_floorMultiple<std::numeric_limits<genType>::is_iec559, std::numeric_limits<genType>::is_signed>::call(Source, Multiple);
+       }
+
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_QUALIFIER vecType<T, P> lowerMultiple(vecType<T, P> const & Source, vecType<T, P> const & Multiple)
+       {
+               return detail::functor2<T, P, vecType>::call(lowerMultiple, Source, Multiple);
+       }
+}//namespace glm
diff --git a/include/glm/gtx/norm.hpp b/include/glm/gtx/norm.hpp
new file mode 100644 (file)
index 0000000..d8fbf2c
--- /dev/null
@@ -0,0 +1,128 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtx_norm
+/// @file glm/gtx/norm.hpp
+/// @date 2005-12-21 / 2011-06-07
+/// @author Christophe Riccio
+///
+/// @see core (dependence)
+/// @see gtx_quaternion (dependence)
+///
+/// @defgroup gtx_norm GLM_GTX_norm
+/// @ingroup gtx
+/// 
+/// @brief Various ways to compute vector norms.
+/// 
+/// <glm/gtx/norm.hpp> need to be included to use these functionalities.
+///////////////////////////////////////////////////////////////////////////////////
+
+#pragma once
+
+// Dependency:
+#include "../glm.hpp"
+#include "../gtx/quaternion.hpp"
+
+#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
+#      pragma message("GLM: GLM_GTX_norm extension included")
+#endif
+
+namespace glm
+{
+       /// @addtogroup gtx_norm
+       /// @{
+
+       //! Returns the squared length of x.
+       //! From GLM_GTX_norm extension.
+       template <typename T>
+       GLM_FUNC_DECL T length2(
+               T const & x);
+
+       //! Returns the squared length of x.
+       //! From GLM_GTX_norm extension.
+       template <typename genType>
+       GLM_FUNC_DECL typename genType::value_type length2(
+               genType const & x);
+               
+       //! Returns the squared distance between p0 and p1, i.e., length(p0 - p1).
+       //! From GLM_GTX_norm extension.
+       template <typename T>
+       GLM_FUNC_DECL T distance2(
+               T const & p0,
+               T const & p1);
+               
+       //! Returns the squared distance between p0 and p1, i.e., length(p0 - p1).
+       //! From GLM_GTX_norm extension.
+       template <typename genType>
+       GLM_FUNC_DECL typename genType::value_type distance2(
+               genType const & p0,
+               genType const & p1);
+
+       //! Returns the L1 norm between x and y.
+       //! From GLM_GTX_norm extension.
+       template <typename T, precision P>
+       GLM_FUNC_DECL T l1Norm(
+               tvec3<T, P> const & x,
+               tvec3<T, P> const & y);
+               
+       //! Returns the L1 norm of v.
+       //! From GLM_GTX_norm extension.
+       template <typename T, precision P>
+       GLM_FUNC_DECL T l1Norm(
+               tvec3<T, P> const & v);
+               
+       //! Returns the L2 norm between x and y.
+       //! From GLM_GTX_norm extension.
+       template <typename T, precision P>
+       GLM_FUNC_DECL T l2Norm(
+               tvec3<T, P> const & x,
+               tvec3<T, P> const & y);
+               
+       //! Returns the L2 norm of v.
+       //! From GLM_GTX_norm extension.
+       template <typename T, precision P>
+       GLM_FUNC_DECL T l2Norm(
+               tvec3<T, P> const & x);
+               
+       //! Returns the L norm between x and y.
+       //! From GLM_GTX_norm extension.
+       template <typename T, precision P>
+       GLM_FUNC_DECL T lxNorm(
+               tvec3<T, P> const & x,
+               tvec3<T, P> const & y,
+               unsigned int Depth);
+
+       //! Returns the L norm of v.
+       //! From GLM_GTX_norm extension.
+       template <typename T, precision P>
+       GLM_FUNC_DECL T lxNorm(
+               tvec3<T, P> const & x,
+               unsigned int Depth);
+
+       /// @}
+}//namespace glm
+
+#include "norm.inl"
diff --git a/include/glm/gtx/norm.inl b/include/glm/gtx/norm.inl
new file mode 100644 (file)
index 0000000..2b8e982
--- /dev/null
@@ -0,0 +1,170 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtx_norm
+/// @file glm/gtx/norm.inl
+/// @date 2005-12-21 / 2008-07-24
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////
+
+namespace glm
+{
+       template <typename T>
+       GLM_FUNC_QUALIFIER T length2
+       (
+               T const & x
+       )
+       {
+               return x * x;
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER T length2
+       (
+               tvec2<T, P> const & x
+       )
+       {
+               return dot(x, x);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER T length2
+       (
+               tvec3<T, P> const & x
+       )
+       {
+               return dot(x, x);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER T length2
+       (
+               tvec4<T, P> const & x
+       )
+       {
+               return dot(x, x);
+       }
+
+       template <typename T>
+       GLM_FUNC_QUALIFIER T distance2
+       (
+               T const & p0,
+               T const & p1
+       )
+       {
+               return length2(p1 - p0);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER T distance2
+       (
+               tvec2<T, P> const & p0,
+               tvec2<T, P> const & p1
+       )
+       {
+               return length2(p1 - p0);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER T distance2
+       (
+               tvec3<T, P> const & p0,
+               tvec3<T, P> const & p1
+       )
+       {
+               return length2(p1 - p0);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER T distance2
+       (
+               tvec4<T, P> const & p0,
+               tvec4<T, P> const & p1
+       )
+       {
+               return length2(p1 - p0);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER T l1Norm
+       (
+               tvec3<T, P> const & a,
+               tvec3<T, P> const & b
+       )
+       {
+               return abs(b.x - a.x) + abs(b.y - a.y) + abs(b.z - a.z);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER T l1Norm
+       (
+               tvec3<T, P> const & v
+       )
+       {
+               return abs(v.x) + abs(v.y) + abs(v.z);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER T l2Norm
+       (
+               tvec3<T, P> const & a,
+               tvec3<T, P> const & b
+       )
+       {
+               return length(b - a);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER T l2Norm
+       (
+               tvec3<T, P> const & v
+       )
+       {
+               return length(v);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER T lxNorm
+       (
+               tvec3<T, P> const & x,
+               tvec3<T, P> const & y,
+               unsigned int Depth
+       )
+       {
+               return pow(pow(y.x - x.x, T(Depth)) + pow(y.y - x.y, T(Depth)) + pow(y.z - x.z, T(Depth)), T(1) / T(Depth));
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER T lxNorm
+       (
+               tvec3<T, P> const & v,
+               unsigned int Depth
+       )
+       {
+               return pow(pow(v.x, T(Depth)) + pow(v.y, T(Depth)) + pow(v.z, T(Depth)), T(1) / T(Depth));
+       }
+
+}//namespace glm
diff --git a/include/glm/gtx/normal.hpp b/include/glm/gtx/normal.hpp
new file mode 100644 (file)
index 0000000..7ddb002
--- /dev/null
@@ -0,0 +1,68 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtx_normal
+/// @file glm/gtx/normal.hpp
+/// @date 2005-12-21 / 2011-06-07
+/// @author Christophe Riccio
+///
+/// @see core (dependence)
+/// @see gtx_extented_min_max (dependence)
+///
+/// @defgroup gtx_normal GLM_GTX_normal
+/// @ingroup gtx
+/// 
+/// @brief Compute the normal of a triangle.
+/// 
+/// <glm/gtx/normal.hpp> need to be included to use these functionalities.
+///////////////////////////////////////////////////////////////////////////////////
+
+#pragma once
+
+// Dependency:
+#include "../glm.hpp"
+
+#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
+#      pragma message("GLM: GLM_GTX_normal extension included")
+#endif
+
+namespace glm
+{
+       /// @addtogroup gtx_normal
+       /// @{
+
+       //! Computes triangle normal from triangle points. 
+       //! From GLM_GTX_normal extension.
+       template <typename T, precision P> 
+       GLM_FUNC_DECL tvec3<T, P> triangleNormal(
+               tvec3<T, P> const & p1, 
+               tvec3<T, P> const & p2, 
+               tvec3<T, P> const & p3);
+
+       /// @}
+}//namespace glm
+
+#include "normal.inl"
diff --git a/include/glm/gtx/normal.inl b/include/glm/gtx/normal.inl
new file mode 100644 (file)
index 0000000..153e9a4
--- /dev/null
@@ -0,0 +1,45 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtx_normal
+/// @file glm/gtx/normal.inl
+/// @date 2005-12-21 / 2011-06-07
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////
+
+namespace glm
+{
+       template <typename T, precision P> 
+       GLM_FUNC_QUALIFIER tvec3<T, P> triangleNormal
+       (
+               tvec3<T, P> const & p1, 
+               tvec3<T, P> const & p2, 
+               tvec3<T, P> const & p3
+       )
+       {
+               return normalize(cross(p1 - p2, p1 - p3));
+       }
+}//namespace glm
diff --git a/include/glm/gtx/normalize_dot.hpp b/include/glm/gtx/normalize_dot.hpp
new file mode 100644 (file)
index 0000000..1429c48
--- /dev/null
@@ -0,0 +1,74 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtx_normalize_dot
+/// @file glm/gtx/normalize_dot.hpp
+/// @date 2007-09-28 / 2011-06-07
+/// @author Christophe Riccio
+///
+/// @see core (dependence)
+/// @see gtx_fast_square_root (dependence)
+///
+/// @defgroup gtx_normalize_dot GLM_GTX_normalize_dot
+/// @ingroup gtx
+/// 
+/// @brief Dot product of vectors that need to be normalize with a single square root.
+/// 
+/// <glm/gtx/normalized_dot.hpp> need to be included to use these functionalities.
+///////////////////////////////////////////////////////////////////////////////////
+
+#pragma once
+
+// Dependency:
+#include "../gtx/fast_square_root.hpp"
+
+#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
+#      pragma message("GLM: GLM_GTX_normalize_dot extension included")
+#endif
+
+namespace glm
+{
+       /// @addtogroup gtx_normalize_dot
+       /// @{
+
+       /// Normalize parameters and returns the dot product of x and y.
+       /// It's faster that dot(normalize(x), normalize(y)).
+       ///
+       /// @see gtx_normalize_dot extension.
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_DECL T normalizeDot(vecType<T, P> const & x, vecType<T, P> const & y);
+
+       /// Normalize parameters and returns the dot product of x and y.
+       /// Faster that dot(fastNormalize(x), fastNormalize(y)).
+       ///
+       /// @see gtx_normalize_dot extension.
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_DECL T fastNormalizeDot(vecType<T, P> const & x, vecType<T, P> const & y);
+
+       /// @}
+}//namespace glm
+
+#include "normalize_dot.inl"
diff --git a/include/glm/gtx/normalize_dot.inl b/include/glm/gtx/normalize_dot.inl
new file mode 100644 (file)
index 0000000..80df8dd
--- /dev/null
@@ -0,0 +1,46 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtx_normalize_dot
+/// @file glm/gtx/normalize_dot.inl
+/// @date 2007-09-28 / 2008-10-07
+/// @author Christophe Riccio
+//////////////////////////////////////////////////////////////////////////////////
+
+namespace glm
+{
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_QUALIFIER T normalizeDot(vecType<T, P> const & x, vecType<T, P> const & y)
+       {
+               return glm::dot(x, y) * glm::inversesqrt(glm::dot(x, x) * glm::dot(y, y));
+       }
+
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_QUALIFIER T fastNormalizeDot(vecType<T, P> const & x, vecType<T, P> const & y)
+       {
+               return glm::dot(x, y) * glm::fastInverseSqrt(glm::dot(x, x) * glm::dot(y, y));
+       }
+}//namespace glm
diff --git a/include/glm/gtx/number_precision.hpp b/include/glm/gtx/number_precision.hpp
new file mode 100644 (file)
index 0000000..c4736f3
--- /dev/null
@@ -0,0 +1,86 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtx_number_precision
+/// @file glm/gtx/number_precision.hpp
+/// @date 2007-05-10 / 2011-06-07
+/// @author Christophe Riccio
+///
+/// @see core (dependence)
+/// @see gtc_type_precision (dependence)
+/// @see gtc_quaternion (dependence)
+///
+/// @defgroup gtx_number_precision GLM_GTX_number_precision
+/// @ingroup gtx
+/// 
+/// @brief Defined size types.
+/// 
+/// <glm/gtx/number_precision.hpp> need to be included to use these functionalities.
+///////////////////////////////////////////////////////////////////////////////////
+
+#pragma once
+
+// Dependency:
+#include "../glm.hpp"
+#include "../gtc/type_precision.hpp"
+
+#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
+#      pragma message("GLM: GLM_GTX_number_precision extension included")
+#endif
+
+namespace glm{
+namespace gtx
+{
+       /////////////////////////////
+       // Unsigned int vector types 
+
+       /// @addtogroup gtx_number_precision
+       /// @{
+
+       typedef u8                      u8vec1;         //!< \brief 8bit unsigned integer scalar. (from GLM_GTX_number_precision extension)
+       typedef u16                     u16vec1;    //!< \brief 16bit unsigned integer scalar. (from GLM_GTX_number_precision extension)
+       typedef u32                     u32vec1;    //!< \brief 32bit unsigned integer scalar. (from GLM_GTX_number_precision extension)
+       typedef u64                     u64vec1;    //!< \brief 64bit unsigned integer scalar. (from GLM_GTX_number_precision extension)
+
+       //////////////////////
+       // Float vector types 
+
+       typedef f32                     f32vec1;    //!< \brief Single-precision floating-point scalar. (from GLM_GTX_number_precision extension)
+       typedef f64                     f64vec1;    //!< \brief Single-precision floating-point scalar. (from GLM_GTX_number_precision extension)
+
+       //////////////////////
+       // Float matrix types 
+
+       typedef f32                     f32mat1;        //!< \brief Single-precision floating-point scalar. (from GLM_GTX_number_precision extension)
+       typedef f32                     f32mat1x1;      //!< \brief Single-precision floating-point scalar. (from GLM_GTX_number_precision extension)
+       typedef f64                     f64mat1;        //!< \brief Double-precision floating-point scalar. (from GLM_GTX_number_precision extension)
+       typedef f64                     f64mat1x1;      //!< \brief Double-precision floating-point scalar. (from GLM_GTX_number_precision extension)
+
+       /// @}
+}//namespace gtx
+}//namespace glm
+
+#include "number_precision.inl"
diff --git a/include/glm/gtx/number_precision.inl b/include/glm/gtx/number_precision.inl
new file mode 100644 (file)
index 0000000..cd93fe5
--- /dev/null
@@ -0,0 +1,36 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtx_number_precision
+/// @file glm/gtx/number_precision.inl
+/// @date 2007-05-10 / 2011-06-07
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////
+
+namespace glm
+{
+
+}
diff --git a/include/glm/gtx/optimum_pow.hpp b/include/glm/gtx/optimum_pow.hpp
new file mode 100644 (file)
index 0000000..e958de4
--- /dev/null
@@ -0,0 +1,79 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtx_optimum_pow
+/// @file glm/gtx/optimum_pow.hpp
+/// @date 2005-12-21 / 2011-06-07
+/// @author Christophe Riccio
+///
+/// @see core (dependence)
+///
+/// @defgroup gtx_optimum_pow GLM_GTX_optimum_pow
+/// @ingroup gtx
+/// 
+/// @brief Integer exponentiation of power functions.
+/// 
+/// <glm/gtx/optimum_pow.hpp> need to be included to use these functionalities.
+///////////////////////////////////////////////////////////////////////////////////
+
+#pragma once
+
+// Dependency:
+#include "../glm.hpp"
+
+#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
+#      pragma message("GLM: GLM_GTX_optimum_pow extension included")
+#endif
+
+namespace glm{
+namespace gtx
+{
+       /// @addtogroup gtx_optimum_pow
+       /// @{
+
+       /// Returns x raised to the power of 2.
+       ///
+       /// @see gtx_optimum_pow
+       template <typename genType>
+       GLM_FUNC_DECL genType pow2(genType const & x);
+
+       /// Returns x raised to the power of 3.
+       ///
+       /// @see gtx_optimum_pow
+       template <typename genType>
+       GLM_FUNC_DECL genType pow3(genType const & x);
+
+       /// Returns x raised to the power of 4.
+       ///
+       /// @see gtx_optimum_pow
+       template <typename genType>
+       GLM_FUNC_DECL genType pow4(genType const & x);
+
+       /// @}
+}//namespace gtx
+}//namespace glm
+
+#include "optimum_pow.inl"
diff --git a/include/glm/gtx/optimum_pow.inl b/include/glm/gtx/optimum_pow.inl
new file mode 100644 (file)
index 0000000..d0c22ab
--- /dev/null
@@ -0,0 +1,52 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtx_optimum_pow
+/// @file glm/gtx/optimum_pow.inl
+/// @date 2005-12-21 / 2011-06-07
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////
+
+namespace glm
+{
+       template <typename genType>
+       GLM_FUNC_QUALIFIER genType pow2(genType const & x)
+       {
+               return x * x;
+       }
+
+       template <typename genType>
+       GLM_FUNC_QUALIFIER genType pow3(genType const & x)
+       {
+               return x * x * x;
+       }
+
+       template <typename genType>
+       GLM_FUNC_QUALIFIER genType pow4(genType const & x)
+       {
+               return (x * x) * (x * x);
+       }
+}//namespace glm
diff --git a/include/glm/gtx/orthonormalize.hpp b/include/glm/gtx/orthonormalize.hpp
new file mode 100644 (file)
index 0000000..d9f031d
--- /dev/null
@@ -0,0 +1,74 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtx_orthonormalize
+/// @file glm/gtx/orthonormalize.hpp
+/// @date 2005-12-21 / 2011-06-07
+/// @author Christophe Riccio
+///
+/// @see core (dependence)
+/// @see gtx_extented_min_max (dependence)
+///
+/// @defgroup gtx_orthonormalize GLM_GTX_orthonormalize
+/// @ingroup gtx
+/// 
+/// @brief Orthonormalize matrices.
+/// 
+/// <glm/gtx/orthonormalize.hpp> need to be included to use these functionalities.
+///////////////////////////////////////////////////////////////////////////////////
+
+#pragma once
+
+// Dependency:
+#include "../vec3.hpp"
+#include "../mat3x3.hpp"
+#include "../geometric.hpp"
+
+#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
+#      pragma message("GLM: GLM_GTX_orthonormalize extension included")
+#endif
+
+namespace glm
+{
+       /// @addtogroup gtx_orthonormalize
+       /// @{
+
+       /// Returns the orthonormalized matrix of m.
+       ///
+       /// @see gtx_orthonormalize
+       template <typename T, precision P> 
+       GLM_FUNC_DECL tmat3x3<T, P> orthonormalize(tmat3x3<T, P> const & m);
+               
+       /// Orthonormalizes x according y.
+       ///
+       /// @see gtx_orthonormalize
+       template <typename T, precision P> 
+       GLM_FUNC_DECL tvec3<T, P> orthonormalize(tvec3<T, P> const & x, tvec3<T, P> const & y);
+
+       /// @}
+}//namespace glm
+
+#include "orthonormalize.inl"
diff --git a/include/glm/gtx/orthonormalize.inl b/include/glm/gtx/orthonormalize.inl
new file mode 100644 (file)
index 0000000..07491a3
--- /dev/null
@@ -0,0 +1,59 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtx_orthonormalize
+/// @file glm/gtx/orthonormalize.inl
+/// @date 2005-12-21 / 2011-06-07
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////
+
+namespace glm
+{
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat3x3<T, P> orthonormalize(tmat3x3<T, P> const & m)
+       {
+               tmat3x3<T, P> r = m;
+
+               r[0] = normalize(r[0]);
+
+               T d0 = dot(r[0], r[1]);
+               r[1] -= r[0] * d0;
+               r[1] = normalize(r[1]);
+
+               T d1 = dot(r[1], r[2]);
+               d0 = dot(r[0], r[2]);
+               r[2] -= r[0] * d0 + r[1] * d1;
+               r[2] = normalize(r[2]);
+
+               return r;
+       }
+
+       template <typename T, precision P> 
+       GLM_FUNC_QUALIFIER tvec3<T, P> orthonormalize(tvec3<T, P> const & x, tvec3<T, P> const & y)
+       {
+               return normalize(x - y * dot(y, x));
+       }
+}//namespace glm
diff --git a/include/glm/gtx/perpendicular.hpp b/include/glm/gtx/perpendicular.hpp
new file mode 100644 (file)
index 0000000..e8c7fc0
--- /dev/null
@@ -0,0 +1,68 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtx_perpendicular
+/// @file glm/gtx/perpendicular.hpp
+/// @date 2005-12-21 / 2011-06-07
+/// @author Christophe Riccio
+///
+/// @see core (dependence)
+/// @see gtx_projection (dependence)
+///
+/// @defgroup gtx_perpendicular GLM_GTX_perpendicular
+/// @ingroup gtx
+/// 
+/// @brief Perpendicular of a vector from other one
+/// 
+/// <glm/gtx/perpendicular.hpp> need to be included to use these functionalities.
+///////////////////////////////////////////////////////////////////////////////////
+
+#pragma once
+
+// Dependency:
+#include "../glm.hpp"
+#include "../gtx/projection.hpp"
+
+#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
+#      pragma message("GLM: GLM_GTX_perpendicular extension included")
+#endif
+
+namespace glm
+{
+       /// @addtogroup gtx_perpendicular
+       /// @{
+
+       //! Projects x a perpendicular axis of Normal.
+       //! From GLM_GTX_perpendicular extension.
+       template <typename vecType> 
+       GLM_FUNC_DECL vecType perp(
+               vecType const & x, 
+               vecType const & Normal);
+
+       /// @}
+}//namespace glm
+
+#include "perpendicular.inl"
diff --git a/include/glm/gtx/perpendicular.inl b/include/glm/gtx/perpendicular.inl
new file mode 100644 (file)
index 0000000..4c321b7
--- /dev/null
@@ -0,0 +1,44 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtx_perpendicular
+/// @file glm/gtx/perpendicular.inl
+/// @date 2005-12-21 / 2011-06-07
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////
+
+namespace glm
+{
+       template <typename vecType> 
+       GLM_FUNC_QUALIFIER vecType perp
+       (
+               vecType const & x, 
+               vecType const & Normal
+       )
+       {
+               return x - proj(x, Normal);
+       }
+}//namespace glm
diff --git a/include/glm/gtx/polar_coordinates.hpp b/include/glm/gtx/polar_coordinates.hpp
new file mode 100644 (file)
index 0000000..c5e3d8f
--- /dev/null
@@ -0,0 +1,73 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtx_polar_coordinates
+/// @file glm/gtx/polar_coordinates.hpp
+/// @date 2007-03-06 / 2011-06-07
+/// @author Christophe Riccio
+///
+/// @see core (dependence)
+///
+/// @defgroup gtx_polar_coordinates GLM_GTX_polar_coordinates
+/// @ingroup gtx
+/// 
+/// @brief Conversion from Euclidean space to polar space and revert.
+/// 
+/// <glm/gtx/polar_coordinates.hpp> need to be included to use these functionalities.
+///////////////////////////////////////////////////////////////////////////////////
+
+#pragma once
+
+// Dependency:
+#include "../glm.hpp"
+
+#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
+#      pragma message("GLM: GLM_GTX_polar_coordinates extension included")
+#endif
+
+namespace glm
+{
+       /// @addtogroup gtx_polar_coordinates
+       /// @{
+
+       /// Convert Euclidean to Polar coordinates, x is the xz distance, y, the latitude and z the longitude.
+       ///
+       /// @see gtx_polar_coordinates
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec3<T, P> polar(
+               tvec3<T, P> const & euclidean);
+
+       /// Convert Polar to Euclidean coordinates.
+       ///
+       /// @see gtx_polar_coordinates
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec3<T, P> euclidean(
+               tvec2<T, P> const & polar);
+
+       /// @}
+}//namespace glm
+
+#include "polar_coordinates.inl"
diff --git a/include/glm/gtx/polar_coordinates.inl b/include/glm/gtx/polar_coordinates.inl
new file mode 100644 (file)
index 0000000..d1afbb2
--- /dev/null
@@ -0,0 +1,66 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtx_polar_coordinates
+/// @file glm/gtx/polar_coordinates.inl
+/// @date 2007-03-06 / 2011-06-07
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////
+
+namespace glm
+{
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec3<T, P> polar
+       (
+               tvec3<T, P> const & euclidean
+       )
+       {
+               T const Length(length(euclidean));
+               tvec3<T, P> const tmp(euclidean / Length);
+               T const xz_dist(sqrt(tmp.x * tmp.x + tmp.z * tmp.z));
+
+               return tvec3<T, P>(
+                       atan(xz_dist, tmp.y),   // latitude
+                       atan(tmp.x, tmp.z),             // longitude
+                       xz_dist);                               // xz distance
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec3<T, P> euclidean
+       (
+               tvec2<T, P> const & polar
+       )
+       {
+               T const latitude(polar.x);
+               T const longitude(polar.y);
+
+               return tvec3<T, P>(
+                       cos(latitude) * sin(longitude),
+                       sin(latitude),
+                       cos(latitude) * cos(longitude));
+       }
+
+}//namespace glm
diff --git a/include/glm/gtx/projection.hpp b/include/glm/gtx/projection.hpp
new file mode 100644 (file)
index 0000000..e64065b
--- /dev/null
@@ -0,0 +1,65 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtx_projection
+/// @file glm/gtx/projection.hpp
+/// @date 2005-12-21 / 2011-06-07
+/// @author Christophe Riccio
+///
+/// @see core (dependence)
+///
+/// @defgroup gtx_projection GLM_GTX_projection
+/// @ingroup gtx
+/// 
+/// @brief Projection of a vector to other one
+/// 
+/// <glm/gtx/projection.hpp> need to be included to use these functionalities.
+///////////////////////////////////////////////////////////////////////////////////
+
+#pragma once
+
+// Dependency:
+#include "../geometric.hpp"
+
+#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
+#      pragma message("GLM: GLM_GTX_projection extension included")
+#endif
+
+namespace glm
+{
+       /// @addtogroup gtx_projection
+       /// @{
+
+       /// Projects x on Normal.
+       ///
+       /// @see gtx_projection
+       template <typename vecType>
+       GLM_FUNC_DECL vecType proj(vecType const & x, vecType const & Normal);
+
+       /// @}
+}//namespace glm
+
+#include "projection.inl"
diff --git a/include/glm/gtx/projection.inl b/include/glm/gtx/projection.inl
new file mode 100644 (file)
index 0000000..c46b96a
--- /dev/null
@@ -0,0 +1,40 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtx_projection
+/// @file glm/gtx/projection.inl
+/// @date 2005-12-21 / 2011-06-07
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////
+
+namespace glm
+{
+       template <typename vecType>
+       GLM_FUNC_QUALIFIER vecType proj(vecType const & x, vecType const & Normal)
+       {
+               return glm::dot(x, Normal) / glm::dot(Normal, Normal) * Normal;
+       }
+}//namespace glm
diff --git a/include/glm/gtx/quaternion.hpp b/include/glm/gtx/quaternion.hpp
new file mode 100644 (file)
index 0000000..34d940a
--- /dev/null
@@ -0,0 +1,214 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtx_quaternion
+/// @file glm/gtx/quaternion.hpp
+/// @date 2005-12-21 / 2011-06-07
+/// @author Christophe Riccio
+///
+/// @see core (dependence)
+/// @see gtx_extented_min_max (dependence)
+///
+/// @defgroup gtx_quaternion GLM_GTX_quaternion
+/// @ingroup gtx
+/// 
+/// @brief Extented quaternion types and functions
+/// 
+/// <glm/gtx/quaternion.hpp> need to be included to use these functionalities.
+///////////////////////////////////////////////////////////////////////////////////
+
+#pragma once
+
+// Dependency:
+#include "../glm.hpp"
+#include "../gtc/constants.hpp"
+#include "../gtc/quaternion.hpp"
+#include "../gtx/norm.hpp"
+
+#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
+#      pragma message("GLM: GLM_GTX_quaternion extension included")
+#endif
+
+namespace glm
+{
+       /// @addtogroup gtx_quaternion
+       /// @{
+
+       //! Compute a cross product between a quaternion and a vector.
+       ///
+       /// @see gtx_quaternion
+       template<typename T, precision P>
+       GLM_FUNC_DECL tvec3<T, P> cross(
+               tquat<T, P> const & q,
+               tvec3<T, P> const & v);
+
+       //! Compute a cross product between a vector and a quaternion.
+       ///
+       /// @see gtx_quaternion
+       template<typename T, precision P>
+       GLM_FUNC_DECL tvec3<T, P> cross(
+               tvec3<T, P> const & v,
+               tquat<T, P> const & q);
+
+       //! Compute a point on a path according squad equation. 
+       //! q1 and q2 are control points; s1 and s2 are intermediate control points.
+       ///
+       /// @see gtx_quaternion
+       template<typename T, precision P>
+       GLM_FUNC_DECL tquat<T, P> squad(
+               tquat<T, P> const & q1,
+               tquat<T, P> const & q2,
+               tquat<T, P> const & s1,
+               tquat<T, P> const & s2,
+               T const & h);
+
+       //! Returns an intermediate control point for squad interpolation.
+       ///
+       /// @see gtx_quaternion
+       template<typename T, precision P>
+       GLM_FUNC_DECL tquat<T, P> intermediate(
+               tquat<T, P> const & prev,
+               tquat<T, P> const & curr,
+               tquat<T, P> const & next);
+
+       //! Returns a exp of a quaternion.
+       ///
+       /// @see gtx_quaternion
+       template<typename T, precision P>
+       GLM_FUNC_DECL tquat<T, P> exp(
+               tquat<T, P> const & q);
+
+       //! Returns a log of a quaternion.
+       ///
+       /// @see gtx_quaternion
+       template<typename T, precision P>
+       GLM_FUNC_DECL tquat<T, P> log(
+               tquat<T, P> const & q);
+
+       /// Returns x raised to the y power.
+       ///
+       /// @see gtx_quaternion
+       template<typename T, precision P>
+       GLM_FUNC_DECL tquat<T, P> pow(
+               tquat<T, P> const & x,
+               T const & y);
+
+       //! Returns quarternion square root.
+       ///
+       /// @see gtx_quaternion
+       //template<typename T, precision P>
+       //tquat<T, P> sqrt(
+       //      tquat<T, P> const & q);
+
+       //! Rotates a 3 components vector by a quaternion.
+       ///
+       /// @see gtx_quaternion
+       template<typename T, precision P>
+       GLM_FUNC_DECL tvec3<T, P> rotate(
+               tquat<T, P> const & q,
+               tvec3<T, P> const & v);
+
+       /// Rotates a 4 components vector by a quaternion.
+       ///
+       /// @see gtx_quaternion
+       template<typename T, precision P>
+       GLM_FUNC_DECL tvec4<T, P> rotate(
+               tquat<T, P> const & q,
+               tvec4<T, P> const & v);
+
+       /// Extract the real component of a quaternion.
+       ///
+       /// @see gtx_quaternion
+       template<typename T, precision P>
+       GLM_FUNC_DECL T extractRealComponent(
+               tquat<T, P> const & q);
+
+       /// Converts a quaternion to a 3 * 3 matrix.
+       ///
+       /// @see gtx_quaternion
+       template<typename T, precision P>
+       GLM_FUNC_DECL tmat3x3<T, P> toMat3(
+               tquat<T, P> const & x){return mat3_cast(x);}
+
+       /// Converts a quaternion to a 4 * 4 matrix.
+       ///
+       /// @see gtx_quaternion
+       template<typename T, precision P>
+       GLM_FUNC_DECL tmat4x4<T, P> toMat4(
+               tquat<T, P> const & x){return mat4_cast(x);}
+
+       /// Converts a 3 * 3 matrix to a quaternion.
+       ///
+       /// @see gtx_quaternion
+       template<typename T, precision P>
+       GLM_FUNC_DECL tquat<T, P> toQuat(
+               tmat3x3<T, P> const & x){return quat_cast(x);}
+
+       /// Converts a 4 * 4 matrix to a quaternion.
+       ///
+       /// @see gtx_quaternion
+       template<typename T, precision P>
+       GLM_FUNC_DECL tquat<T, P> toQuat(
+               tmat4x4<T, P> const & x){return quat_cast(x);}
+
+       /// Quaternion interpolation using the rotation short path.
+       ///
+       /// @see gtx_quaternion
+       template<typename T, precision P>
+       GLM_FUNC_DECL tquat<T, P> shortMix(
+               tquat<T, P> const & x,
+               tquat<T, P> const & y,
+               T const & a);
+
+       /// Quaternion normalized linear interpolation.
+       ///
+       /// @see gtx_quaternion
+       template<typename T, precision P>
+       GLM_FUNC_DECL tquat<T, P> fastMix(
+               tquat<T, P> const & x,
+               tquat<T, P> const & y,
+               T const & a);
+
+       /// Compute the rotation between two vectors.
+       /// param orig vector, needs to be normalized
+       /// param dest vector, needs to be normalized
+       ///
+       /// @see gtx_quaternion
+       template<typename T, precision P>
+       GLM_FUNC_DECL tquat<T, P> rotation(
+               tvec3<T, P> const & orig, 
+               tvec3<T, P> const & dest);
+
+       /// Returns the squared length of x.
+       /// 
+       /// @see gtx_quaternion
+       template<typename T, precision P>
+       GLM_FUNC_DECL T length2(tquat<T, P> const & q);
+
+       /// @}
+}//namespace glm
+
+#include "quaternion.inl"
diff --git a/include/glm/gtx/quaternion.inl b/include/glm/gtx/quaternion.inl
new file mode 100644 (file)
index 0000000..4c5b3d6
--- /dev/null
@@ -0,0 +1,285 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtx_quaternion
+/// @file glm/gtx/quaternion.inl
+/// @date 2005-12-21 / 2011-06-07
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////
+
+#include <limits>
+#include "../gtc/constants.hpp"
+
+namespace glm
+{
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec3<T, P> cross
+       (
+               tvec3<T, P> const & v,
+               tquat<T, P> const & q
+       )
+       {
+               return inverse(q) * v;
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec3<T, P> cross
+       (
+               tquat<T, P> const & q,
+               tvec3<T, P> const & v
+       )
+       {
+               return q * v;
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tquat<T, P> squad
+       (
+               tquat<T, P> const & q1,
+               tquat<T, P> const & q2,
+               tquat<T, P> const & s1,
+               tquat<T, P> const & s2,
+               T const & h)
+       {
+               return mix(mix(q1, q2, h), mix(s1, s2, h), static_cast<T>(2) * (static_cast<T>(1) - h) * h);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tquat<T, P> intermediate
+       (
+               tquat<T, P> const & prev,
+               tquat<T, P> const & curr,
+               tquat<T, P> const & next
+       )
+       {
+               tquat<T, P> invQuat = inverse(curr);
+               return exp((log(next + invQuat) + log(prev + invQuat)) / static_cast<T>(-4)) * curr;
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tquat<T, P> exp
+       (
+               tquat<T, P> const & q
+       )
+       {
+               tvec3<T, P> u(q.x, q.y, q.z);
+               T Angle = glm::length(u);
+               if (Angle < epsilon<T>())
+                       return tquat<T, P>();
+
+               tvec3<T, P> v(u / Angle);
+               return tquat<T, P>(cos(Angle), sin(Angle) * v);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tquat<T, P> log
+       (
+               tquat<T, P> const & q
+       )
+       {
+               tvec3<T, P> u(q.x, q.y, q.z);
+               T Vec3Len = length(u);
+
+               if (Vec3Len < epsilon<T>())
+               {
+                       if(q.w > static_cast<T>(0))
+                               return tquat<T, P>(log(q.w), static_cast<T>(0), static_cast<T>(0), static_cast<T>(0));
+                       else if(q.w < static_cast<T>(0))
+                               return tquat<T, P>(log(-q.w), pi<T>(), static_cast<T>(0), static_cast<T>(0));
+                       else
+                               return tquat<T, P>(std::numeric_limits<T>::infinity(), std::numeric_limits<T>::infinity(), std::numeric_limits<T>::infinity(), std::numeric_limits<T>::infinity());
+               }
+               else
+               {
+                       T QuatLen = sqrt(Vec3Len * Vec3Len + q.w * q.w);
+                       T t = atan(Vec3Len, T(q.w)) / Vec3Len;
+                       return tquat<T, P>(log(QuatLen), t * q.x, t * q.y, t * q.z);
+               }
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tquat<T, P> pow
+       (
+               tquat<T, P> const & x,
+               T const & y
+       )
+       {
+               if(abs(x.w) > (static_cast<T>(1) - epsilon<T>()))
+                       return x;
+               T Angle = acos(y);
+               T NewAngle = Angle * y;
+               T Div = sin(NewAngle) / sin(Angle);
+               return tquat<T, P>(
+                       cos(NewAngle),
+                       x.x * Div,
+                       x.y * Div,
+                       x.z * Div);
+       }
+
+       //template <typename T, precision P>
+       //GLM_FUNC_QUALIFIER tquat<T, P> sqrt
+       //(
+       //      tquat<T, P> const & q
+       //)
+       //{
+       //      T q0 = static_cast<T>(1) - dot(q, q);
+       //      return T(2) * (T(1) + q0) * q;
+       //}
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec3<T, P> rotate
+       (
+               tquat<T, P> const & q,
+               tvec3<T, P> const & v
+       )
+       {
+               return q * v;
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec4<T, P> rotate
+       (
+               tquat<T, P> const & q,
+               tvec4<T, P> const & v
+       )
+       {
+               return q * v;
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER T extractRealComponent
+       (
+               tquat<T, P> const & q
+       )
+       {
+               T w = static_cast<T>(1) - q.x * q.x - q.y * q.y - q.z * q.z;
+               if(w < T(0))
+                       return T(0);
+               else
+                       return -sqrt(w);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER T length2
+       (
+               tquat<T, P> const & q
+       )
+       {
+               return q.x * q.x + q.y * q.y + q.z * q.z + q.w * q.w;
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tquat<T, P> shortMix
+       (
+               tquat<T, P> const & x,
+               tquat<T, P> const & y,
+               T const & a
+       )
+       {
+               if(a <= static_cast<T>(0)) return x;
+               if(a >= static_cast<T>(1)) return y;
+
+               T fCos = dot(x, y);
+               tquat<T, P> y2(y); //BUG!!! tquat<T> y2;
+               if(fCos < static_cast<T>(0))
+               {
+                       y2 = -y;
+                       fCos = -fCos;
+               }
+
+               //if(fCos > 1.0f) // problem
+               T k0, k1;
+               if(fCos > (static_cast<T>(1) - epsilon<T>()))
+               {
+                       k0 = static_cast<T>(1) - a;
+                       k1 = static_cast<T>(0) + a; //BUG!!! 1.0f + a;
+               }
+               else
+               {
+                       T fSin = sqrt(T(1) - fCos * fCos);
+                       T fAngle = atan(fSin, fCos);
+                       T fOneOverSin = static_cast<T>(1) / fSin;
+                       k0 = sin((static_cast<T>(1) - a) * fAngle) * fOneOverSin;
+                       k1 = sin((static_cast<T>(0) + a) * fAngle) * fOneOverSin;
+               }
+
+               return tquat<T, P>(
+                       k0 * x.w + k1 * y2.w,
+                       k0 * x.x + k1 * y2.x,
+                       k0 * x.y + k1 * y2.y,
+                       k0 * x.z + k1 * y2.z);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tquat<T, P> fastMix
+       (
+               tquat<T, P> const & x,
+               tquat<T, P> const & y,
+               T const & a
+       )
+       {
+               return glm::normalize(x * (static_cast<T>(1) - a) + (y * a));
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tquat<T, P> rotation
+       (
+               tvec3<T, P> const & orig,
+               tvec3<T, P> const & dest
+       )
+       {
+               T cosTheta = dot(orig, dest);
+               tvec3<T, P> rotationAxis;
+
+               if(cosTheta < static_cast<T>(-1) + epsilon<T>())
+               {
+                       // special case when vectors in opposite directions :
+                       // there is no "ideal" rotation axis
+                       // So guess one; any will do as long as it's perpendicular to start
+                       // This implementation favors a rotation around the Up axis (Y),
+                       // since it's often what you want to do.
+                       rotationAxis = cross(tvec3<T, P>(0, 0, 1), orig);
+                       if(length2(rotationAxis) < epsilon<T>()) // bad luck, they were parallel, try again!
+                               rotationAxis = cross(tvec3<T, P>(1, 0, 0), orig);
+
+                       rotationAxis = normalize(rotationAxis);
+                       return angleAxis(pi<T>(), rotationAxis);
+               }
+
+               // Implementation from Stan Melax's Game Programming Gems 1 article
+               rotationAxis = cross(orig, dest);
+
+               T s = sqrt((T(1) + cosTheta) * static_cast<T>(2));
+               T invs = static_cast<T>(1) / s;
+
+               return tquat<T, P>(
+                       s * static_cast<T>(0.5f), 
+                       rotationAxis.x * invs,
+                       rotationAxis.y * invs,
+                       rotationAxis.z * invs);
+       }
+
+}//namespace glm
diff --git a/include/glm/gtx/range.hpp b/include/glm/gtx/range.hpp
new file mode 100644 (file)
index 0000000..19ae240
--- /dev/null
@@ -0,0 +1,102 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+///
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtx_range
+/// @file glm/gtx/range.hpp
+/// @date 2014-09-19 / 2014-09-19
+/// @author Joshua Moerman
+///
+/// @defgroup gtx_range GLM_GTX_range
+/// @ingroup gtx
+///
+/// @brief Defines begin and end for vectors and matrices. Useful for range-based for loop.
+/// The range is defined over the elements, not over columns or rows (e.g. mat4 has 16 elements).
+///
+/// <glm/gtx/range.hpp> need to be included to use these functionalities.
+///////////////////////////////////////////////////////////////////////////////////
+
+#pragma once
+
+// Dependencies
+#include "../detail/setup.hpp"
+
+#if !GLM_HAS_RANGE_FOR
+#      error "GLM_GTX_range requires C++11 suppport or 'range for'"
+#endif
+
+#include "../gtc/type_ptr.hpp"
+
+namespace glm{
+namespace detail
+{
+       /* The glm types provide a .length() member, but for matrices
+        this only defines the number of columns, so we need to work around this */
+       template <typename T, precision P>
+       detail::component_count_t number_of_elements_(tvec2<T, P> const & v){
+               return detail::component_count(v);
+       }
+
+       template <typename T, precision P>
+       detail::component_count_t number_of_elements_(tvec3<T, P> const & v){
+               return detail::component_count(v);
+       }
+
+       template <typename T, precision P>
+       detail::component_count_t number_of_elements_(tvec4<T, P> const & v){
+               return detail::component_count(v);
+       }
+
+       template <typename genType>
+       detail::component_count_t number_of_elements_(genType const & m){
+               return detail::component_count(m) * detail::component_count(m[0]);
+       }
+}//namespace
+
+       /// @addtogroup gtx_range
+       /// @{
+
+       template <typename genType>
+       const typename genType::value_type * begin(genType const & v){
+               return value_ptr(v);
+       }
+
+       template <typename genType>
+       const typename genType::value_type * end(genType const & v){
+               return begin(v) + detail::number_of_elements_(v);
+       }
+
+       template <typename genType>
+       typename genType::value_type * begin(genType& v){
+               return value_ptr(v);
+       }
+
+       template <typename genType>
+       typename genType::value_type * end(genType& v){
+               return begin(v) + detail::number_of_elements_(v);
+       }
+
+       /// @}
+}//namespace glm
diff --git a/include/glm/gtx/raw_data.hpp b/include/glm/gtx/raw_data.hpp
new file mode 100644 (file)
index 0000000..b30c246
--- /dev/null
@@ -0,0 +1,76 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtx_raw_data
+/// @file glm/gtx/raw_data.hpp
+/// @date 2008-11-19 / 2011-06-07
+/// @author Christophe Riccio
+///
+/// @see core (dependence)
+///
+/// @defgroup gtx_raw_data GLM_GTX_raw_data
+/// @ingroup gtx
+/// 
+/// @brief Projection of a vector to other one
+/// 
+/// <glm/gtx/raw_data.hpp> need to be included to use these functionalities.
+///////////////////////////////////////////////////////////////////////////////////
+
+#pragma once
+
+// Dependencies
+#include "../detail/setup.hpp"
+#include "../detail/type_int.hpp"
+
+#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
+#      pragma message("GLM: GLM_GTX_raw_data extension included")
+#endif
+
+namespace glm
+{
+       /// @addtogroup gtx_raw_data
+       /// @{
+
+       //! Type for byte numbers. 
+       //! From GLM_GTX_raw_data extension.
+       typedef detail::uint8           byte;
+
+       //! Type for word numbers. 
+       //! From GLM_GTX_raw_data extension.
+       typedef detail::uint16          word;
+
+       //! Type for dword numbers. 
+       //! From GLM_GTX_raw_data extension.
+       typedef detail::uint32          dword;
+
+       //! Type for qword numbers. 
+       //! From GLM_GTX_raw_data extension.
+       typedef detail::uint64          qword;
+
+       /// @}
+}// namespace glm
+
+#include "raw_data.inl"
diff --git a/include/glm/gtx/raw_data.inl b/include/glm/gtx/raw_data.inl
new file mode 100644 (file)
index 0000000..f573a72
--- /dev/null
@@ -0,0 +1,31 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtx_raw_data
+/// @file glm/gtx/raw_data.inl
+/// @date 2008-11-19 / 2011-06-07
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////
diff --git a/include/glm/gtx/rotate_normalized_axis.hpp b/include/glm/gtx/rotate_normalized_axis.hpp
new file mode 100644 (file)
index 0000000..9deba38
--- /dev/null
@@ -0,0 +1,93 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtx_rotate_normalized_axis
+/// @file glm/gtx/rotate_normalized_axis.hpp
+/// @date 2012-12-13 / 2012-12-13
+/// @author Christophe Riccio
+///
+/// @see core (dependence)
+/// @see gtc_matrix_transform
+/// @see gtc_quaternion
+/// 
+/// @defgroup gtx_rotate_normalized_axis GLM_GTX_rotate_normalized_axis
+/// @ingroup gtx
+/// 
+/// @brief Quaternions and matrices rotations around normalized axis.
+/// 
+/// <glm/gtx/rotate_normalized_axis.hpp> need to be included to use these functionalities.
+///////////////////////////////////////////////////////////////////////////////////
+
+#pragma once
+
+// Dependency:
+#include "../glm.hpp"
+#include "../gtc/epsilon.hpp"
+#include "../gtc/quaternion.hpp"
+
+#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
+#      pragma message("GLM: GLM_GTX_rotate_normalized_axis extension included")
+#endif
+
+namespace glm
+{
+       /// @addtogroup gtx_rotate_normalized_axis
+       /// @{
+
+       /// Builds a rotation 4 * 4 matrix created from a normalized axis and an angle. 
+       /// 
+       /// @param m Input matrix multiplied by this rotation matrix.
+       /// @param angle Rotation angle expressed in radians if GLM_FORCE_RADIANS is define or degrees otherwise.
+       /// @param axis Rotation axis, must be normalized.
+       /// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double.
+       /// 
+       /// @see gtx_rotate_normalized_axis
+       /// @see - rotate(T angle, T x, T y, T z) 
+       /// @see - rotate(tmat4x4<T, P> const & m, T angle, T x, T y, T z) 
+       /// @see - rotate(T angle, tvec3<T, P> const & v) 
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat4x4<T, P> rotateNormalizedAxis(
+               tmat4x4<T, P> const & m,
+               T const & angle,
+               tvec3<T, P> const & axis);
+
+       /// Rotates a quaternion from a vector of 3 components normalized axis and an angle.
+       /// 
+       /// @param q Source orientation
+       /// @param angle Angle expressed in radians if GLM_FORCE_RADIANS is define or degrees otherwise.
+       /// @param axis Normalized axis of the rotation, must be normalized.
+       /// 
+       /// @see gtx_rotate_normalized_axis
+       template <typename T, precision P>
+       GLM_FUNC_DECL tquat<T, P> rotateNormalizedAxis(
+               tquat<T, P> const & q,
+               T const & angle,
+               tvec3<T, P> const & axis);
+
+       /// @}
+}//namespace glm
+
+#include "rotate_normalized_axis.inl"
diff --git a/include/glm/gtx/rotate_normalized_axis.inl b/include/glm/gtx/rotate_normalized_axis.inl
new file mode 100644 (file)
index 0000000..9bb257c
--- /dev/null
@@ -0,0 +1,88 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtx_rotate_normalized_axis
+/// @file glm/gtx/rotate_normalized_axis.inl
+/// @date 2012-12-13 / 2012-12-13
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////
+
+namespace glm
+{
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat4x4<T, P> rotateNormalizedAxis
+       (
+               tmat4x4<T, P> const & m,
+               T const & angle,
+               tvec3<T, P> const & v
+       )
+       {
+               T const a = angle;
+               T const c = cos(a);
+               T const s = sin(a);
+
+               tvec3<T, P> const axis(v);
+
+               tvec3<T, P> const temp((static_cast<T>(1) - c) * axis);
+
+               tmat4x4<T, P> Rotate(uninitialize);
+               Rotate[0][0] = c + temp[0] * axis[0];
+               Rotate[0][1] = 0 + temp[0] * axis[1] + s * axis[2];
+               Rotate[0][2] = 0 + temp[0] * axis[2] - s * axis[1];
+
+               Rotate[1][0] = 0 + temp[1] * axis[0] - s * axis[2];
+               Rotate[1][1] = c + temp[1] * axis[1];
+               Rotate[1][2] = 0 + temp[1] * axis[2] + s * axis[0];
+
+               Rotate[2][0] = 0 + temp[2] * axis[0] + s * axis[1];
+               Rotate[2][1] = 0 + temp[2] * axis[1] - s * axis[0];
+               Rotate[2][2] = c + temp[2] * axis[2];
+
+               tmat4x4<T, P> Result(uninitialize);
+               Result[0] = m[0] * Rotate[0][0] + m[1] * Rotate[0][1] + m[2] * Rotate[0][2];
+               Result[1] = m[0] * Rotate[1][0] + m[1] * Rotate[1][1] + m[2] * Rotate[1][2];
+               Result[2] = m[0] * Rotate[2][0] + m[1] * Rotate[2][1] + m[2] * Rotate[2][2];
+               Result[3] = m[3];
+               return Result;
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tquat<T, P> rotateNormalizedAxis
+       (
+               tquat<T, P> const & q, 
+               T const & angle,
+               tvec3<T, P> const & v
+       )
+       {
+               tvec3<T, P> const Tmp(v);
+
+               T const AngleRad(angle);
+               T const Sin = sin(AngleRad * T(0.5));
+
+               return q * tquat<T, P>(cos(AngleRad * static_cast<T>(0.5)), Tmp.x * Sin, Tmp.y * Sin, Tmp.z * Sin);
+               //return gtc::quaternion::cross(q, tquat<T, P>(cos(AngleRad * T(0.5)), Tmp.x * fSin, Tmp.y * fSin, Tmp.z * fSin));
+       }
+}//namespace glm
diff --git a/include/glm/gtx/rotate_vector.hpp b/include/glm/gtx/rotate_vector.hpp
new file mode 100644 (file)
index 0000000..36a45d5
--- /dev/null
@@ -0,0 +1,146 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtx_rotate_vector
+/// @file glm/gtx/rotate_vector.hpp
+/// @date 2006-11-02 / 2011-06-07
+/// @author Christophe Riccio
+///
+/// @see core (dependence)
+/// @see gtx_transform (dependence)
+///
+/// @defgroup gtx_rotate_vector GLM_GTX_rotate_vector
+/// @ingroup gtx
+/// 
+/// @brief Function to directly rotate a vector
+/// 
+/// <glm/gtx/rotate_vector.hpp> need to be included to use these functionalities.
+///////////////////////////////////////////////////////////////////////////////////
+
+#pragma once
+
+// Dependency:
+#include "../glm.hpp"
+#include "../gtx/transform.hpp"
+
+#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
+#      pragma message("GLM: GLM_GTX_rotate_vector extension included")
+#endif
+
+namespace glm
+{
+       /// @addtogroup gtx_rotate_vector
+       /// @{
+
+       /// Returns Spherical interpolation between two vectors
+       /// 
+       /// @param x A first vector
+       /// @param y A second vector
+       /// @param a Interpolation factor. The interpolation is defined beyond the range [0, 1].
+       /// 
+       /// @see gtx_rotate_vector
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec3<T, P> slerp(
+               tvec3<T, P> const & x,
+               tvec3<T, P> const & y,
+               T const & a);
+
+       //! Rotate a two dimensional vector.
+       //! From GLM_GTX_rotate_vector extension.
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec2<T, P> rotate(
+               tvec2<T, P> const & v,
+               T const & angle);
+               
+       //! Rotate a three dimensional vector around an axis.
+       //! From GLM_GTX_rotate_vector extension.
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec3<T, P> rotate(
+               tvec3<T, P> const & v,
+               T const & angle,
+               tvec3<T, P> const & normal);
+               
+       //! Rotate a four dimensional vector around an axis.
+       //! From GLM_GTX_rotate_vector extension.
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec4<T, P> rotate(
+               tvec4<T, P> const & v,
+               T const & angle,
+               tvec3<T, P> const & normal);
+               
+       //! Rotate a three dimensional vector around the X axis.
+       //! From GLM_GTX_rotate_vector extension.
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec3<T, P> rotateX(
+               tvec3<T, P> const & v,
+               T const & angle);
+
+       //! Rotate a three dimensional vector around the Y axis.
+       //! From GLM_GTX_rotate_vector extension.
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec3<T, P> rotateY(
+               tvec3<T, P> const & v,
+               T const & angle);
+               
+       //! Rotate a three dimensional vector around the Z axis.
+       //! From GLM_GTX_rotate_vector extension.
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec3<T, P> rotateZ(
+               tvec3<T, P> const & v,
+               T const & angle);
+               
+       //! Rotate a four dimentionnals vector around the X axis.
+       //! From GLM_GTX_rotate_vector extension.
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec4<T, P> rotateX(
+               tvec4<T, P> const & v,
+               T const & angle);
+               
+       //! Rotate a four dimensional vector around the X axis.
+       //! From GLM_GTX_rotate_vector extension.
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec4<T, P> rotateY(
+               tvec4<T, P> const & v,
+               T const & angle);
+               
+       //! Rotate a four dimensional vector around the X axis.
+       //! From GLM_GTX_rotate_vector extension.
+       template <typename T, precision P>
+       GLM_FUNC_DECL tvec4<T, P> rotateZ(
+               tvec4<T, P> const & v,
+               T const & angle);
+               
+       //! Build a rotation matrix from a normal and a up vector.
+       //! From GLM_GTX_rotate_vector extension.
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat4x4<T, P> orientation(
+               tvec3<T, P> const & Normal,
+               tvec3<T, P> const & Up);
+
+       /// @}
+}//namespace glm
+
+#include "rotate_vector.inl"
diff --git a/include/glm/gtx/rotate_vector.inl b/include/glm/gtx/rotate_vector.inl
new file mode 100644 (file)
index 0000000..cdac574
--- /dev/null
@@ -0,0 +1,217 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtx_rotate_vector
+/// @file glm/gtx/rotate_vector.inl
+/// @date 2006-11-02 / 2011-06-07
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////
+
+namespace glm
+{
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec3<T, P> slerp
+       (
+               tvec3<T, P> const & x,
+               tvec3<T, P> const & y,
+               T const & a
+       )
+       {
+               // get cosine of angle between vectors (-1 -> 1)
+               T CosAlpha = dot(x, y);
+               // get angle (0 -> pi)
+               T Alpha = acos(CosAlpha);
+               // get sine of angle between vectors (0 -> 1)
+               T SinAlpha = sin(Alpha);
+               // this breaks down when SinAlpha = 0, i.e. Alpha = 0 or pi
+               T t1 = sin((static_cast<T>(1) - a) * Alpha) / SinAlpha;
+               T t2 = sin(a * Alpha) / SinAlpha;
+
+               // interpolate src vectors
+               return x * t1 + y * t2;
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec2<T, P> rotate
+       (
+               tvec2<T, P> const & v,
+               T const & angle
+       )
+       {
+               tvec2<T, P> Result;
+               T const Cos(cos(angle));
+               T const Sin(sin(angle));
+
+               Result.x = v.x * Cos - v.y * Sin;
+               Result.y = v.x * Sin + v.y * Cos;
+               return Result;
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec3<T, P> rotate
+       (
+               tvec3<T, P> const & v,
+               T const & angle,
+               tvec3<T, P> const & normal
+       )
+       {
+               return tmat3x3<T, P>(glm::rotate(angle, normal)) * v;
+       }
+       /*
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec3<T, P> rotateGTX(
+               const tvec3<T, P>& x,
+               T angle,
+               const tvec3<T, P>& normal)
+       {
+               const T Cos = cos(radians(angle));
+               const T Sin = sin(radians(angle));
+               return x * Cos + ((x * normal) * (T(1) - Cos)) * normal + cross(x, normal) * Sin;
+       }
+       */
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec4<T, P> rotate
+       (
+               tvec4<T, P> const & v,
+               T const & angle,
+               tvec3<T, P> const & normal
+       )
+       {
+               return rotate(angle, normal) * v;
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec3<T, P> rotateX
+       (
+               tvec3<T, P> const & v,
+               T const & angle
+       )
+       {
+               tvec3<T, P> Result(v);
+               T const Cos(cos(angle));
+               T const Sin(sin(angle));
+
+               Result.y = v.y * Cos - v.z * Sin;
+               Result.z = v.y * Sin + v.z * Cos;
+               return Result;
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec3<T, P> rotateY
+       (
+               tvec3<T, P> const & v,
+               T const & angle
+       )
+       {
+               tvec3<T, P> Result = v;
+               T const Cos(cos(angle));
+               T const Sin(sin(angle));
+
+               Result.x =  v.x * Cos + v.z * Sin;
+               Result.z = -v.x * Sin + v.z * Cos;
+               return Result;
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec3<T, P> rotateZ
+       (
+               tvec3<T, P> const & v,
+               T const & angle
+       )
+       {
+               tvec3<T, P> Result = v;
+               T const Cos(cos(angle));
+               T const Sin(sin(angle));
+
+               Result.x = v.x * Cos - v.y * Sin;
+               Result.y = v.x * Sin + v.y * Cos;
+               return Result;
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec4<T, P> rotateX
+       (
+               tvec4<T, P> const & v,
+               T const & angle
+       )
+       {
+               tvec4<T, P> Result = v;
+               T const Cos(cos(angle));
+               T const Sin(sin(angle));
+
+               Result.y = v.y * Cos - v.z * Sin;
+               Result.z = v.y * Sin + v.z * Cos;
+               return Result;
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec4<T, P> rotateY
+       (
+               tvec4<T, P> const & v,
+               T const & angle
+       )
+       {
+               tvec4<T, P> Result = v;
+               T const Cos(cos(angle));
+               T const Sin(sin(angle));
+
+               Result.x =  v.x * Cos + v.z * Sin;
+               Result.z = -v.x * Sin + v.z * Cos;
+               return Result;
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec4<T, P> rotateZ
+       (
+               tvec4<T, P> const & v,
+               T const & angle
+       )
+       {
+               tvec4<T, P> Result = v;
+               T const Cos(cos(angle));
+               T const Sin(sin(angle));
+
+               Result.x = v.x * Cos - v.y * Sin;
+               Result.y = v.x * Sin + v.y * Cos;
+               return Result;
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat4x4<T, P> orientation
+       (
+               tvec3<T, P> const & Normal,
+               tvec3<T, P> const & Up
+       )
+       {
+               if(all(equal(Normal, Up)))
+                       return tmat4x4<T, P>(T(1));
+
+               tvec3<T, P> RotationAxis = cross(Up, Normal);
+               T Angle = acos(dot(Normal, Up));
+
+               return rotate(Angle, RotationAxis);
+       }
+}//namespace glm
diff --git a/include/glm/gtx/scalar_multiplication.hpp b/include/glm/gtx/scalar_multiplication.hpp
new file mode 100644 (file)
index 0000000..5f6c4d9
--- /dev/null
@@ -0,0 +1,98 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+///
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtx
+/// @file glm/gtx/scalar_multiplication.hpp
+/// @date 2014-09-22 / 2014-09-22
+/// @author Joshua Moerman
+///
+/// @brief Enables scalar multiplication for all types
+///
+/// Since GLSL is very strict about types, the following (often used) combinations do not work:
+///    double * vec4
+///    int * vec4
+///    vec4 / int
+/// So we'll fix that! Of course "float * vec4" should remain the same (hence the enable_if magic)
+///
+///////////////////////////////////////////////////////////////////////////////////
+
+#pragma once
+
+#include "../detail/setup.hpp"
+
+#if !GLM_HAS_TEMPLATE_ALIASES && !(GLM_COMPILER & GLM_COMPILER_GCC)
+#      error "GLM_GTX_scalar_multiplication requires C++11 suppport or alias templates and if not support for GCC"
+#endif
+
+#include "../vec2.hpp"
+#include "../vec3.hpp"
+#include "../vec4.hpp"
+#include "../mat2x2.hpp"
+#include <type_traits>
+
+namespace glm
+{
+       template <typename T, typename Vec>
+       using return_type_scalar_multiplication = typename std::enable_if<
+               !std::is_same<T, float>::value       // T may not be a float
+               && std::is_arithmetic<T>::value, Vec // But it may be an int or double (no vec3 or mat3, ...)
+       >::type;
+
+#define GLM_IMPLEMENT_SCAL_MULT(Vec) \
+       template <typename T> \
+       return_type_scalar_multiplication<T, Vec> \
+       operator*(T const & s, Vec rh){ \
+               return rh *= static_cast<float>(s); \
+       } \
+        \
+       template <typename T> \
+       return_type_scalar_multiplication<T, Vec> \
+       operator*(Vec lh, T const & s){ \
+               return lh *= static_cast<float>(s); \
+       } \
+        \
+       template <typename T> \
+       return_type_scalar_multiplication<T, Vec> \
+       operator/(Vec lh, T const & s){ \
+               return lh *= 1.0f / s; \
+       }
+
+GLM_IMPLEMENT_SCAL_MULT(vec2)
+GLM_IMPLEMENT_SCAL_MULT(vec3)
+GLM_IMPLEMENT_SCAL_MULT(vec4)
+
+GLM_IMPLEMENT_SCAL_MULT(mat2)
+GLM_IMPLEMENT_SCAL_MULT(mat2x3)
+GLM_IMPLEMENT_SCAL_MULT(mat2x4)
+GLM_IMPLEMENT_SCAL_MULT(mat3x2)
+GLM_IMPLEMENT_SCAL_MULT(mat3)
+GLM_IMPLEMENT_SCAL_MULT(mat3x4)
+GLM_IMPLEMENT_SCAL_MULT(mat4x2)
+GLM_IMPLEMENT_SCAL_MULT(mat4x3)
+GLM_IMPLEMENT_SCAL_MULT(mat4)
+
+#undef GLM_IMPLEMENT_SCAL_MULT
+} // namespace glm
diff --git a/include/glm/gtx/scalar_relational.hpp b/include/glm/gtx/scalar_relational.hpp
new file mode 100644 (file)
index 0000000..8e855e6
--- /dev/null
@@ -0,0 +1,61 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtx_scalar_relational
+/// @file glm/gtx/scalar_relational.hpp
+/// @date 2013-02-04 / 2013-02-04
+/// @author Christophe Riccio
+///
+/// @see core (dependence)
+///
+/// @defgroup gtx_scalar_relational GLM_GTX_scalar_relational
+/// @ingroup gtx
+/// 
+/// @brief Extend a position from a source to a position at a defined length.
+/// 
+/// <glm/gtx/scalar_relational.hpp> need to be included to use these functionalities.
+///////////////////////////////////////////////////////////////////////////////////
+
+#pragma once
+
+// Dependency:
+#include "../glm.hpp"
+
+#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
+#      pragma message("GLM: GLM_GTX_extend extension included")
+#endif
+
+namespace glm
+{
+       /// @addtogroup gtx_scalar_relational
+       /// @{
+
+
+
+       /// @}
+}//namespace glm
+
+#include "scalar_relational.inl"
diff --git a/include/glm/gtx/scalar_relational.inl b/include/glm/gtx/scalar_relational.inl
new file mode 100644 (file)
index 0000000..b28c8cf
--- /dev/null
@@ -0,0 +1,118 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtx_scalar_relational
+/// @file glm/gtx/scalar_relational.inl
+/// @date 2013-02-04 / 2013-02-04
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////
+
+namespace glm
+{
+       template <typename T>
+       GLM_FUNC_QUALIFIER bool lessThan
+       (
+               T const & x, 
+               T const & y
+       )
+       {
+               return x < y;
+       }
+
+       template <typename T>
+       GLM_FUNC_QUALIFIER bool lessThanEqual
+       (
+               T const & x, 
+               T const & y
+       )
+       {
+               return x <= y;
+       }
+
+       template <typename T>
+       GLM_FUNC_QUALIFIER bool greaterThan
+       (
+               T const & x, 
+               T const & y
+       )
+       {
+               return x > y;
+       }
+
+       template <typename T>
+       GLM_FUNC_QUALIFIER bool greaterThanEqual
+       (
+               T const & x, 
+               T const & y
+       )
+       {
+               return x >= y;
+       }
+
+       template <typename T>
+       GLM_FUNC_QUALIFIER bool equal
+       (
+               T const & x, 
+               T const & y
+       )
+       {
+               return x == y;
+       }
+
+       template <typename T>
+       GLM_FUNC_QUALIFIER bool notEqual
+       (
+               T const & x, 
+               T const & y
+       )
+       {
+               return x != y;
+       }
+
+       GLM_FUNC_QUALIFIER bool any
+       (
+               bool const & x
+       )
+       {
+               return x;
+       }
+
+       GLM_FUNC_QUALIFIER bool all
+       (
+               bool const & x
+       )
+       {
+               return x;
+       }
+
+       GLM_FUNC_QUALIFIER bool not_
+       (
+               bool const & x
+       )
+       {
+               return !x;
+       }
+}//namespace glm
diff --git a/include/glm/gtx/simd_mat4.hpp b/include/glm/gtx/simd_mat4.hpp
new file mode 100644 (file)
index 0000000..89ee5e7
--- /dev/null
@@ -0,0 +1,205 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtx_simd_mat4
+/// @file glm/gtx/simd_mat4.hpp
+/// @date 2009-05-07 / 2011-06-07
+/// @author Christophe Riccio
+///
+/// @see core (dependence)
+///
+/// @defgroup gtx_simd_mat4 GLM_GTX_simd_mat4
+/// @ingroup gtx
+/// 
+/// @brief SIMD implementation of mat4 type.
+/// 
+/// <glm/gtx/simd_mat4.hpp> need to be included to use these functionalities.
+///////////////////////////////////////////////////////////////////////////////////
+
+#pragma once
+
+// Dependencies
+#include "../detail/setup.hpp"
+
+#if(GLM_ARCH != GLM_ARCH_PURE)
+
+#if(GLM_ARCH & GLM_ARCH_SSE2)
+#      include "../detail/intrinsic_matrix.hpp"
+#      include "../gtx/simd_vec4.hpp"
+#else
+#      error "GLM: GLM_GTX_simd_mat4 requires compiler support of SSE2 through intrinsics"
+#endif
+
+#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
+#      pragma message("GLM: GLM_GTX_simd_mat4 extension included")
+#endif
+
+namespace glm{
+namespace detail
+{
+       /// 4x4 Matrix implemented using SIMD SEE intrinsics.
+       /// \ingroup gtx_simd_mat4
+       GLM_ALIGNED_STRUCT(16) fmat4x4SIMD
+       {
+               typedef float value_type;
+               typedef fvec4SIMD col_type;
+               typedef fvec4SIMD row_type;
+               typedef std::size_t size_type;
+               typedef fmat4x4SIMD type;
+               typedef fmat4x4SIMD transpose_type;
+
+               GLM_FUNC_DECL length_t length() const;
+
+               fvec4SIMD Data[4];
+
+               //////////////////////////////////////
+               // Constructors
+
+               fmat4x4SIMD();
+               explicit fmat4x4SIMD(float const & s);
+               explicit fmat4x4SIMD(
+                       float const & x0, float const & y0, float const & z0, float const & w0,
+                       float const & x1, float const & y1, float const & z1, float const & w1,
+                       float const & x2, float const & y2, float const & z2, float const & w2,
+                       float const & x3, float const & y3, float const & z3, float const & w3);
+               explicit fmat4x4SIMD(
+                       fvec4SIMD const & v0,
+                       fvec4SIMD const & v1,
+                       fvec4SIMD const & v2,
+                       fvec4SIMD const & v3);
+               explicit fmat4x4SIMD(
+                       mat4x4 const & m);
+               explicit fmat4x4SIMD(
+                       __m128 const in[4]);
+
+               // Conversions
+               //template <typename U> 
+               //explicit tmat4x4(tmat4x4<U> const & m);
+
+               //explicit tmat4x4(tmat2x2<T> const & x);
+               //explicit tmat4x4(tmat3x3<T> const & x);
+               //explicit tmat4x4(tmat2x3<T> const & x);
+               //explicit tmat4x4(tmat3x2<T> const & x);
+               //explicit tmat4x4(tmat2x4<T> const & x);
+               //explicit tmat4x4(tmat4x2<T> const & x);
+               //explicit tmat4x4(tmat3x4<T> const & x);
+               //explicit tmat4x4(tmat4x3<T> const & x);
+
+               // Accesses
+               fvec4SIMD & operator[](length_t i);
+               fvec4SIMD const & operator[](length_t i) const;
+
+               // Unary updatable operators
+               fmat4x4SIMD & operator= (fmat4x4SIMD const & m);
+               fmat4x4SIMD & operator+= (float const & s);
+               fmat4x4SIMD & operator+= (fmat4x4SIMD const & m);
+               fmat4x4SIMD & operator-= (float const & s);
+               fmat4x4SIMD & operator-= (fmat4x4SIMD const & m);
+               fmat4x4SIMD & operator*= (float const & s);
+               fmat4x4SIMD & operator*= (fmat4x4SIMD const & m);
+               fmat4x4SIMD & operator/= (float const & s);
+               fmat4x4SIMD & operator/= (fmat4x4SIMD const & m);
+               fmat4x4SIMD & operator++ ();
+               fmat4x4SIMD & operator-- ();
+       };
+
+       // Binary operators
+       fmat4x4SIMD operator+ (fmat4x4SIMD const & m, float const & s);
+       fmat4x4SIMD operator+ (float const & s, fmat4x4SIMD const & m);
+       fmat4x4SIMD operator+ (fmat4x4SIMD const & m1, fmat4x4SIMD const & m2);
+
+       fmat4x4SIMD operator- (fmat4x4SIMD const & m, float const & s);
+       fmat4x4SIMD operator- (float const & s, fmat4x4SIMD const & m);
+       fmat4x4SIMD operator- (fmat4x4SIMD const & m1, fmat4x4SIMD const & m2);
+
+       fmat4x4SIMD operator* (fmat4x4SIMD const & m, float const & s);
+       fmat4x4SIMD operator* (float const & s, fmat4x4SIMD const & m);
+
+       fvec4SIMD operator* (fmat4x4SIMD const & m, fvec4SIMD const & v);
+       fvec4SIMD operator* (fvec4SIMD const & v, fmat4x4SIMD const & m);
+
+       fmat4x4SIMD operator* (fmat4x4SIMD const & m1, fmat4x4SIMD const & m2);
+
+       fmat4x4SIMD operator/ (fmat4x4SIMD const & m, float const & s);
+       fmat4x4SIMD operator/ (float const & s, fmat4x4SIMD const & m);
+
+       fvec4SIMD operator/ (fmat4x4SIMD const & m, fvec4SIMD const & v);
+       fvec4SIMD operator/ (fvec4SIMD const & v, fmat4x4SIMD const & m);
+
+       fmat4x4SIMD operator/ (fmat4x4SIMD const & m1, fmat4x4SIMD const & m2);
+
+       // Unary constant operators
+       fmat4x4SIMD const operator-  (fmat4x4SIMD const & m);
+       fmat4x4SIMD const operator-- (fmat4x4SIMD const & m, int);
+       fmat4x4SIMD const operator++ (fmat4x4SIMD const & m, int);
+}//namespace detail
+
+       typedef detail::fmat4x4SIMD simdMat4;
+
+       /// @addtogroup gtx_simd_mat4
+       /// @{
+
+       //! Convert a simdMat4 to a mat4.
+       //! (From GLM_GTX_simd_mat4 extension)
+       mat4 mat4_cast(
+               detail::fmat4x4SIMD const & x);
+
+       //! Multiply matrix x by matrix y component-wise, i.e.,
+       //! result[i][j] is the scalar product of x[i][j] and y[i][j].
+       //! (From GLM_GTX_simd_mat4 extension).
+       detail::fmat4x4SIMD matrixCompMult(
+               detail::fmat4x4SIMD const & x,
+               detail::fmat4x4SIMD const & y);
+
+       //! Treats the first parameter c as a column vector
+       //! and the second parameter r as a row vector
+       //! and does a linear algebraic matrix multiply c * r.
+       //! (From GLM_GTX_simd_mat4 extension).
+       detail::fmat4x4SIMD outerProduct(
+               detail::fvec4SIMD const & c,
+               detail::fvec4SIMD const & r);
+
+       //! Returns the transposed matrix of x
+       //! (From GLM_GTX_simd_mat4 extension).
+       detail::fmat4x4SIMD transpose(
+               detail::fmat4x4SIMD const & x);
+
+       //! Return the determinant of a mat4 matrix.
+       //! (From GLM_GTX_simd_mat4 extension).
+       float determinant(
+               detail::fmat4x4SIMD const & m);
+
+       //! Return the inverse of a mat4 matrix.
+       //! (From GLM_GTX_simd_mat4 extension).
+       detail::fmat4x4SIMD inverse(
+               detail::fmat4x4SIMD const & m);
+
+       /// @}
+}// namespace glm
+
+#include "simd_mat4.inl"
+
+#endif//(GLM_ARCH != GLM_ARCH_PURE)
diff --git a/include/glm/gtx/simd_mat4.inl b/include/glm/gtx/simd_mat4.inl
new file mode 100644 (file)
index 0000000..14c8b45
--- /dev/null
@@ -0,0 +1,602 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtx_simd_mat4
+/// @file glm/gtx/simd_mat4.inl
+/// @date 2009-05-07 / 2011-06-07
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+namespace glm{
+namespace detail{
+
+GLM_FUNC_QUALIFIER length_t fmat4x4SIMD::length() const
+{
+       return 4;
+}
+
+//////////////////////////////////////
+// Accesses
+
+GLM_FUNC_QUALIFIER fvec4SIMD & fmat4x4SIMD::operator[]
+(
+       length_t i
+)
+{
+       assert(i < this->length());
+
+       return this->Data[i];
+}
+
+GLM_FUNC_QUALIFIER fvec4SIMD const & fmat4x4SIMD::operator[]
+(
+       length_t i
+) const
+{
+       assert(i < this->length());
+
+       return this->Data[i];
+}
+
+//////////////////////////////////////////////////////////////
+// Constructors
+
+GLM_FUNC_QUALIFIER fmat4x4SIMD::fmat4x4SIMD()
+{
+#      ifndef GLM_FORCE_NO_CTOR_INIT
+               this->Data[0] = fvec4SIMD(1, 0, 0, 0);
+               this->Data[1] = fvec4SIMD(0, 1, 0, 0);
+               this->Data[2] = fvec4SIMD(0, 0, 1, 0);
+               this->Data[3] = fvec4SIMD(0, 0, 0, 1);
+#      endif
+}
+
+GLM_FUNC_QUALIFIER fmat4x4SIMD::fmat4x4SIMD(float const & s)
+{
+       this->Data[0] = fvec4SIMD(s, 0, 0, 0);
+       this->Data[1] = fvec4SIMD(0, s, 0, 0);
+       this->Data[2] = fvec4SIMD(0, 0, s, 0);
+       this->Data[3] = fvec4SIMD(0, 0, 0, s);
+}
+
+GLM_FUNC_QUALIFIER fmat4x4SIMD::fmat4x4SIMD
+(
+       float const & x0, float const & y0, float const & z0, float const & w0,
+       float const & x1, float const & y1, float const & z1, float const & w1,
+       float const & x2, float const & y2, float const & z2, float const & w2,
+       float const & x3, float const & y3, float const & z3, float const & w3
+)
+{
+       this->Data[0] = fvec4SIMD(x0, y0, z0, w0);
+       this->Data[1] = fvec4SIMD(x1, y1, z1, w1);
+       this->Data[2] = fvec4SIMD(x2, y2, z2, w2);
+       this->Data[3] = fvec4SIMD(x3, y3, z3, w3);
+}
+
+GLM_FUNC_QUALIFIER fmat4x4SIMD::fmat4x4SIMD
+(
+       fvec4SIMD const & v0,
+       fvec4SIMD const & v1,
+       fvec4SIMD const & v2,
+       fvec4SIMD const & v3
+)
+{
+       this->Data[0] = v0;
+       this->Data[1] = v1;
+       this->Data[2] = v2;
+       this->Data[3] = v3;
+}
+
+GLM_FUNC_QUALIFIER fmat4x4SIMD::fmat4x4SIMD
+(
+       mat4 const & m
+)
+{
+       this->Data[0] = fvec4SIMD(m[0]);
+       this->Data[1] = fvec4SIMD(m[1]);
+       this->Data[2] = fvec4SIMD(m[2]);
+       this->Data[3] = fvec4SIMD(m[3]);
+}
+
+GLM_FUNC_QUALIFIER fmat4x4SIMD::fmat4x4SIMD
+(
+       __m128 const in[4]
+)
+{
+       this->Data[0] = in[0];
+       this->Data[1] = in[1];
+       this->Data[2] = in[2];
+       this->Data[3] = in[3];
+}
+
+//////////////////////////////////////////////////////////////
+// mat4 operators
+
+GLM_FUNC_QUALIFIER fmat4x4SIMD& fmat4x4SIMD::operator= 
+(
+       fmat4x4SIMD const & m
+)
+{
+       this->Data[0] = m[0];
+       this->Data[1] = m[1];
+       this->Data[2] = m[2];
+       this->Data[3] = m[3];
+       return *this;
+}
+
+GLM_FUNC_QUALIFIER fmat4x4SIMD & fmat4x4SIMD::operator+= 
+(
+       fmat4x4SIMD const & m
+)
+{
+       this->Data[0].Data = _mm_add_ps(this->Data[0].Data, m[0].Data);
+       this->Data[1].Data = _mm_add_ps(this->Data[1].Data, m[1].Data);
+       this->Data[2].Data = _mm_add_ps(this->Data[2].Data, m[2].Data);
+       this->Data[3].Data = _mm_add_ps(this->Data[3].Data, m[3].Data);
+       return *this;
+}
+
+GLM_FUNC_QUALIFIER fmat4x4SIMD & fmat4x4SIMD::operator-= 
+(
+       fmat4x4SIMD const & m
+)
+{
+       this->Data[0].Data = _mm_sub_ps(this->Data[0].Data, m[0].Data);
+       this->Data[1].Data = _mm_sub_ps(this->Data[1].Data, m[1].Data);
+       this->Data[2].Data = _mm_sub_ps(this->Data[2].Data, m[2].Data);
+       this->Data[3].Data = _mm_sub_ps(this->Data[3].Data, m[3].Data);
+
+       return *this;
+}
+
+GLM_FUNC_QUALIFIER fmat4x4SIMD & fmat4x4SIMD::operator*= 
+(
+       fmat4x4SIMD const & m
+)
+{
+       sse_mul_ps(&this->Data[0].Data, &m.Data[0].Data, &this->Data[0].Data);
+       return *this;
+}
+
+GLM_FUNC_QUALIFIER fmat4x4SIMD & fmat4x4SIMD::operator/= 
+(
+       fmat4x4SIMD const & m
+)
+{
+       __m128 Inv[4];
+       sse_inverse_ps(&m.Data[0].Data, Inv);
+       sse_mul_ps(&this->Data[0].Data, Inv, &this->Data[0].Data);
+       return *this;
+}
+
+GLM_FUNC_QUALIFIER fmat4x4SIMD & fmat4x4SIMD::operator+= 
+(
+       float const & s
+)
+{
+       __m128 Operand = _mm_set_ps1(s);
+       this->Data[0].Data = _mm_add_ps(this->Data[0].Data, Operand);
+       this->Data[1].Data = _mm_add_ps(this->Data[1].Data, Operand);
+       this->Data[2].Data = _mm_add_ps(this->Data[2].Data, Operand);
+       this->Data[3].Data = _mm_add_ps(this->Data[3].Data, Operand);
+       return *this;
+}
+
+GLM_FUNC_QUALIFIER fmat4x4SIMD & fmat4x4SIMD::operator-= 
+(
+       float const & s
+)
+{
+       __m128 Operand = _mm_set_ps1(s);
+       this->Data[0].Data = _mm_sub_ps(this->Data[0].Data, Operand);
+       this->Data[1].Data = _mm_sub_ps(this->Data[1].Data, Operand);
+       this->Data[2].Data = _mm_sub_ps(this->Data[2].Data, Operand);
+       this->Data[3].Data = _mm_sub_ps(this->Data[3].Data, Operand);
+       return *this;
+}
+
+GLM_FUNC_QUALIFIER fmat4x4SIMD & fmat4x4SIMD::operator*= 
+(
+       float const & s
+)
+{
+       __m128 Operand = _mm_set_ps1(s);
+       this->Data[0].Data = _mm_mul_ps(this->Data[0].Data, Operand);
+       this->Data[1].Data = _mm_mul_ps(this->Data[1].Data, Operand);
+       this->Data[2].Data = _mm_mul_ps(this->Data[2].Data, Operand);
+       this->Data[3].Data = _mm_mul_ps(this->Data[3].Data, Operand);
+       return *this;
+}
+
+GLM_FUNC_QUALIFIER fmat4x4SIMD & fmat4x4SIMD::operator/= 
+(
+       float const & s
+)
+{
+       __m128 Operand = _mm_div_ps(one, _mm_set_ps1(s));
+       this->Data[0].Data = _mm_mul_ps(this->Data[0].Data, Operand);
+       this->Data[1].Data = _mm_mul_ps(this->Data[1].Data, Operand);
+       this->Data[2].Data = _mm_mul_ps(this->Data[2].Data, Operand);
+       this->Data[3].Data = _mm_mul_ps(this->Data[3].Data, Operand);
+       return *this;
+}
+
+GLM_FUNC_QUALIFIER fmat4x4SIMD & fmat4x4SIMD::operator++ ()
+{
+       this->Data[0].Data = _mm_add_ps(this->Data[0].Data, one);
+       this->Data[1].Data = _mm_add_ps(this->Data[1].Data, one);
+       this->Data[2].Data = _mm_add_ps(this->Data[2].Data, one);
+       this->Data[3].Data = _mm_add_ps(this->Data[3].Data, one);
+       return *this;
+}
+
+GLM_FUNC_QUALIFIER fmat4x4SIMD & fmat4x4SIMD::operator-- ()
+{
+       this->Data[0].Data = _mm_sub_ps(this->Data[0].Data, one);
+       this->Data[1].Data = _mm_sub_ps(this->Data[1].Data, one);
+       this->Data[2].Data = _mm_sub_ps(this->Data[2].Data, one);
+       this->Data[3].Data = _mm_sub_ps(this->Data[3].Data, one);
+       return *this;
+}
+
+
+//////////////////////////////////////////////////////////////
+// Binary operators
+
+GLM_FUNC_QUALIFIER fmat4x4SIMD operator+
+(
+       const fmat4x4SIMD &m,
+       float const & s
+)
+{
+       return detail::fmat4x4SIMD
+       (
+               m[0] + s,
+               m[1] + s,
+               m[2] + s,
+               m[3] + s
+       );
+}
+
+GLM_FUNC_QUALIFIER fmat4x4SIMD operator+
+(
+       float const & s,
+       const fmat4x4SIMD &m
+)
+{
+       return detail::fmat4x4SIMD
+       (
+               m[0] + s,
+               m[1] + s,
+               m[2] + s,
+               m[3] + s
+       );
+}
+
+GLM_FUNC_QUALIFIER fmat4x4SIMD operator+
+(
+    const fmat4x4SIMD &m1,
+    const fmat4x4SIMD &m2
+)
+{
+    return detail::fmat4x4SIMD
+    (
+        m1[0] + m2[0],
+        m1[1] + m2[1],
+        m1[2] + m2[2],
+        m1[3] + m2[3]
+    );
+}
+
+
+GLM_FUNC_QUALIFIER fmat4x4SIMD operator-
+(
+    const fmat4x4SIMD &m,
+    float const & s
+)
+{
+    return detail::fmat4x4SIMD
+    (
+        m[0] - s,
+        m[1] - s,
+        m[2] - s,
+        m[3] - s
+    );
+}
+
+GLM_FUNC_QUALIFIER fmat4x4SIMD operator-
+(
+    float const & s,
+    const fmat4x4SIMD &m
+)
+{
+    return detail::fmat4x4SIMD
+    (
+        s - m[0],
+        s - m[1],
+        s - m[2],
+        s - m[3]
+    );
+}
+
+GLM_FUNC_QUALIFIER fmat4x4SIMD operator-
+(
+    const fmat4x4SIMD &m1,
+    const fmat4x4SIMD &m2
+)
+{
+    return detail::fmat4x4SIMD
+    (
+        m1[0] - m2[0],
+        m1[1] - m2[1],
+        m1[2] - m2[2],
+        m1[3] - m2[3]
+    );
+}
+
+
+GLM_FUNC_QUALIFIER fmat4x4SIMD operator*
+(
+    const fmat4x4SIMD &m,
+    float const & s
+)
+{
+    return detail::fmat4x4SIMD
+    (
+        m[0] * s,
+        m[1] * s,
+        m[2] * s,
+        m[3] * s
+    );
+}
+
+GLM_FUNC_QUALIFIER fmat4x4SIMD operator*
+(
+    float const & s,
+    const fmat4x4SIMD &m
+)
+{
+    return detail::fmat4x4SIMD
+    (
+        m[0] * s,
+        m[1] * s,
+        m[2] * s,
+        m[3] * s
+    );
+}
+
+GLM_FUNC_QUALIFIER fvec4SIMD operator*
+(
+    const fmat4x4SIMD &m,
+    fvec4SIMD const & v
+)
+{
+    return sse_mul_ps(&m.Data[0].Data, v.Data);
+}
+
+GLM_FUNC_QUALIFIER fvec4SIMD operator*
+(
+    fvec4SIMD const & v,
+    const fmat4x4SIMD &m
+)
+{
+    return sse_mul_ps(v.Data, &m.Data[0].Data);
+}
+
+GLM_FUNC_QUALIFIER fmat4x4SIMD operator*
+(
+    const fmat4x4SIMD &m1,
+    const fmat4x4SIMD &m2
+)
+{
+    fmat4x4SIMD result;
+    sse_mul_ps(&m1.Data[0].Data, &m2.Data[0].Data, &result.Data[0].Data);
+    
+    return result;
+}
+    
+
+
+GLM_FUNC_QUALIFIER fmat4x4SIMD operator/
+(
+    const fmat4x4SIMD &m,
+    float const & s
+)
+{
+    return detail::fmat4x4SIMD
+    (
+        m[0] / s,
+        m[1] / s,
+        m[2] / s,
+        m[3] / s
+    );
+}
+
+GLM_FUNC_QUALIFIER fmat4x4SIMD operator/
+(
+    float const & s,
+    const fmat4x4SIMD &m
+)
+{
+    return detail::fmat4x4SIMD
+    (
+        s / m[0],
+        s / m[1],
+        s / m[2],
+        s / m[3]
+    );
+}
+
+GLM_FUNC_QUALIFIER detail::fmat4x4SIMD inverse(detail::fmat4x4SIMD const & m)
+{
+       detail::fmat4x4SIMD result;
+       detail::sse_inverse_ps(&m[0].Data, &result[0].Data);
+       return result;
+}
+
+GLM_FUNC_QUALIFIER fvec4SIMD operator/
+(
+       const fmat4x4SIMD & m,
+       fvec4SIMD const & v
+)
+{
+       return inverse(m) * v;
+}
+
+GLM_FUNC_QUALIFIER fvec4SIMD operator/
+(
+       fvec4SIMD const & v,
+       const fmat4x4SIMD &m
+)
+{
+       return v * inverse(m);
+}
+
+GLM_FUNC_QUALIFIER fmat4x4SIMD operator/
+(
+       const fmat4x4SIMD &m1,
+       const fmat4x4SIMD &m2
+)
+{
+       __m128 result[4];
+       __m128 inv[4];
+
+       sse_inverse_ps(&m2.Data[0].Data, inv);
+       sse_mul_ps(&m1.Data[0].Data, inv, result);
+
+       return fmat4x4SIMD(result);
+}
+
+
+//////////////////////////////////////////////////////////////
+// Unary constant operators
+GLM_FUNC_QUALIFIER fmat4x4SIMD const operator-
+(
+    fmat4x4SIMD const & m
+)
+{
+    return detail::fmat4x4SIMD
+    (
+        -m[0],
+        -m[1],
+        -m[2],
+        -m[3]
+    );
+}
+
+GLM_FUNC_QUALIFIER fmat4x4SIMD const operator--
+(
+    fmat4x4SIMD const & m,
+    int
+)
+{
+    return detail::fmat4x4SIMD
+    (
+        m[0] - 1.0f,
+        m[1] - 1.0f,
+        m[2] - 1.0f,
+        m[3] - 1.0f
+    );
+}
+
+GLM_FUNC_QUALIFIER fmat4x4SIMD const operator++
+(
+    fmat4x4SIMD const & m,
+    int
+)
+{
+    return detail::fmat4x4SIMD
+    (
+        m[0] + 1.0f,
+        m[1] + 1.0f,
+        m[2] + 1.0f,
+        m[3] + 1.0f
+    );
+}
+
+}//namespace detail
+
+GLM_FUNC_QUALIFIER mat4 mat4_cast
+(
+       detail::fmat4x4SIMD const & x
+)
+{
+       GLM_ALIGN(16) mat4 Result;
+       _mm_store_ps(&Result[0][0], x.Data[0].Data);
+       _mm_store_ps(&Result[1][0], x.Data[1].Data);
+       _mm_store_ps(&Result[2][0], x.Data[2].Data);
+       _mm_store_ps(&Result[3][0], x.Data[3].Data);
+       return Result;
+}
+
+GLM_FUNC_QUALIFIER detail::fmat4x4SIMD matrixCompMult
+(
+       detail::fmat4x4SIMD const & x,
+       detail::fmat4x4SIMD const & y
+)
+{
+       detail::fmat4x4SIMD result;
+       result[0] = x[0] * y[0];
+       result[1] = x[1] * y[1];
+       result[2] = x[2] * y[2];
+       result[3] = x[3] * y[3];
+       return result;
+}
+
+GLM_FUNC_QUALIFIER detail::fmat4x4SIMD outerProduct
+(
+       detail::fvec4SIMD const & c,
+       detail::fvec4SIMD const & r
+)
+{
+       __m128 Shu0 = _mm_shuffle_ps(r.Data, r.Data, _MM_SHUFFLE(0, 0, 0, 0));
+       __m128 Shu1 = _mm_shuffle_ps(r.Data, r.Data, _MM_SHUFFLE(1, 1, 1, 1));
+       __m128 Shu2 = _mm_shuffle_ps(r.Data, r.Data, _MM_SHUFFLE(2, 2, 2, 2));
+       __m128 Shu3 = _mm_shuffle_ps(r.Data, r.Data, _MM_SHUFFLE(3, 3, 3, 3));
+
+       detail::fmat4x4SIMD result(uninitialize);
+       result[0].Data = _mm_mul_ps(c.Data, Shu0);
+       result[1].Data = _mm_mul_ps(c.Data, Shu1);
+       result[2].Data = _mm_mul_ps(c.Data, Shu2);
+       result[3].Data = _mm_mul_ps(c.Data, Shu3);
+       return result;
+}
+
+GLM_FUNC_QUALIFIER detail::fmat4x4SIMD transpose(detail::fmat4x4SIMD const & m)
+{
+       detail::fmat4x4SIMD result;
+       detail::sse_transpose_ps(&m[0].Data, &result[0].Data);
+       return result;
+}
+
+GLM_FUNC_QUALIFIER float determinant(detail::fmat4x4SIMD const & m)
+{
+       float Result;
+       _mm_store_ss(&Result, detail::sse_det_ps(&m[0].Data));
+       return Result;
+}
+
+}//namespace glm
diff --git a/include/glm/gtx/simd_quat.hpp b/include/glm/gtx/simd_quat.hpp
new file mode 100644 (file)
index 0000000..810ce30
--- /dev/null
@@ -0,0 +1,335 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtx_simd_quat
+/// @file glm/gtx/simd_quat.hpp
+/// @date 2013-04-22 / 2014-11-25
+/// @author Christophe Riccio
+///
+/// @see core (dependence)
+///
+/// @defgroup gtx_simd_quat GLM_GTX_simd_quat
+/// @ingroup gtx
+/// 
+/// @brief SIMD implementation of quat type.
+/// 
+/// <glm/gtx/simd_quat.hpp> need to be included to use these functionalities.
+///////////////////////////////////////////////////////////////////////////////////
+
+#pragma once
+
+// Dependency:
+#include "../glm.hpp"
+#include "../gtc/quaternion.hpp"
+#include "../gtx/fast_trigonometry.hpp"
+
+#if(GLM_ARCH != GLM_ARCH_PURE)
+
+#if(GLM_ARCH & GLM_ARCH_SSE2)
+#   include "../gtx/simd_mat4.hpp"
+#else
+#      error "GLM: GLM_GTX_simd_quat requires compiler support of SSE2 through intrinsics"
+#endif
+
+#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
+#      pragma message("GLM: GLM_GTX_simd_quat extension included")
+#endif
+
+// Warning silencer for nameless struct/union.
+#if (GLM_COMPILER & GLM_COMPILER_VC)
+#   pragma warning(push)
+#   pragma warning(disable:4201)   // warning C4201: nonstandard extension used : nameless struct/union
+#endif
+
+namespace glm{
+namespace detail
+{
+       GLM_ALIGNED_STRUCT(16) fquatSIMD
+       {
+               typedef __m128 value_type;
+               typedef std::size_t size_type;
+               static size_type value_size();
+
+               typedef fquatSIMD type;
+               typedef tquat<bool, defaultp> bool_type;
+
+#ifdef GLM_SIMD_ENABLE_XYZW_UNION
+               union
+               {
+                       __m128 Data;
+                       struct {float x, y, z, w;};
+               };
+#else
+               __m128 Data;
+#endif
+
+               //////////////////////////////////////
+               // Implicit basic constructors
+
+               fquatSIMD();
+               fquatSIMD(__m128 const & Data);
+               fquatSIMD(fquatSIMD const & q);
+
+               //////////////////////////////////////
+               // Explicit basic constructors
+
+               explicit fquatSIMD(
+                       ctor);
+               explicit fquatSIMD(
+                       float const & w, 
+                       float const & x, 
+                       float const & y, 
+                       float const & z);
+               explicit fquatSIMD(
+                       quat const & v);
+               explicit fquatSIMD(
+                       vec3 const & eulerAngles);
+               
+
+               //////////////////////////////////////
+               // Unary arithmetic operators
+
+               fquatSIMD& operator =(fquatSIMD const & q);
+               fquatSIMD& operator*=(float const & s);
+               fquatSIMD& operator/=(float const & s);
+       };
+
+
+       //////////////////////////////////////
+       // Arithmetic operators
+
+       detail::fquatSIMD operator- (
+               detail::fquatSIMD const & q);
+
+       detail::fquatSIMD operator+ ( 
+               detail::fquatSIMD const & q, 
+               detail::fquatSIMD const & p); 
+
+       detail::fquatSIMD operator* ( 
+               detail::fquatSIMD const & q, 
+               detail::fquatSIMD const & p); 
+
+       detail::fvec4SIMD operator* (
+               detail::fquatSIMD const & q, 
+               detail::fvec4SIMD const & v);
+
+       detail::fvec4SIMD operator* (
+               detail::fvec4SIMD const & v,
+               detail::fquatSIMD const & q);
+
+       detail::fquatSIMD operator* (
+               detail::fquatSIMD const & q, 
+               float s);
+
+       detail::fquatSIMD operator* (
+               float s,
+               detail::fquatSIMD const & q);
+
+       detail::fquatSIMD operator/ (
+               detail::fquatSIMD const & q, 
+               float s);
+
+}//namespace detail
+
+       /// @addtogroup gtx_simd_quat
+       /// @{
+
+       typedef glm::detail::fquatSIMD simdQuat;
+
+       //! Convert a simdQuat to a quat.
+       /// @see gtx_simd_quat
+       quat quat_cast(
+               detail::fquatSIMD const & x);
+
+       //! Convert a simdMat4 to a simdQuat.
+       /// @see gtx_simd_quat
+       detail::fquatSIMD quatSIMD_cast(
+               detail::fmat4x4SIMD const & m);
+
+       //! Converts a mat4 to a simdQuat.
+       /// @see gtx_simd_quat
+       template <typename T, precision P>
+       detail::fquatSIMD quatSIMD_cast(
+               tmat4x4<T, P> const & m);
+
+       //! Converts a mat3 to a simdQuat.
+       /// @see gtx_simd_quat
+       template <typename T, precision P>
+       detail::fquatSIMD quatSIMD_cast(
+               tmat3x3<T, P> const & m);
+
+       //! Convert a simdQuat to a simdMat4
+       /// @see gtx_simd_quat
+       detail::fmat4x4SIMD mat4SIMD_cast(
+               detail::fquatSIMD const & q);
+
+       //! Converts a simdQuat to a standard mat4.
+       /// @see gtx_simd_quat
+       mat4 mat4_cast(
+               detail::fquatSIMD const & q);
+
+
+       /// Returns the length of the quaternion. 
+       /// 
+       /// @see gtx_simd_quat
+       float length(
+               detail::fquatSIMD const & x);
+
+       /// Returns the normalized quaternion. 
+       /// 
+       /// @see gtx_simd_quat
+       detail::fquatSIMD normalize(
+               detail::fquatSIMD const & x);
+
+       /// Returns dot product of q1 and q2, i.e., q1[0] * q2[0] + q1[1] * q2[1] + ... 
+       /// 
+       /// @see gtx_simd_quat
+       float dot(
+               detail::fquatSIMD const & q1, 
+               detail::fquatSIMD const & q2);
+
+       /// Spherical linear interpolation of two quaternions.
+       /// The interpolation is oriented and the rotation is performed at constant speed.
+       /// For short path spherical linear interpolation, use the slerp function.
+       /// 
+       /// @param x A quaternion
+       /// @param y A quaternion
+       /// @param a Interpolation factor. The interpolation is defined beyond the range [0, 1].
+       /// @tparam T Value type used to build the quaternion. Supported: half, float or double.
+       /// @see gtx_simd_quat
+       /// @see - slerp(detail::fquatSIMD const & x, detail::fquatSIMD const & y, T const & a) 
+       detail::fquatSIMD mix(
+               detail::fquatSIMD const & x, 
+               detail::fquatSIMD const & y, 
+               float const & a);
+
+       /// Linear interpolation of two quaternions. 
+       /// The interpolation is oriented.
+       /// 
+       /// @param x A quaternion
+       /// @param y A quaternion
+       /// @param a Interpolation factor. The interpolation is defined in the range [0, 1].
+       /// @tparam T Value type used to build the quaternion. Supported: half, float or double.
+       /// @see gtx_simd_quat
+       detail::fquatSIMD lerp(
+               detail::fquatSIMD const & x, 
+               detail::fquatSIMD const & y, 
+               float const & a);
+
+       /// Spherical linear interpolation of two quaternions.
+       /// The interpolation always take the short path and the rotation is performed at constant speed.
+       /// 
+       /// @param x A quaternion
+       /// @param y A quaternion
+       /// @param a Interpolation factor. The interpolation is defined beyond the range [0, 1].
+       /// @tparam T Value type used to build the quaternion. Supported: half, float or double.
+       /// @see gtx_simd_quat
+       detail::fquatSIMD slerp(
+               detail::fquatSIMD const & x, 
+               detail::fquatSIMD const & y, 
+               float const & a);
+
+
+       /// Faster spherical linear interpolation of two unit length quaternions.
+       ///
+       /// This is the same as mix(), except for two rules:
+       ///   1) The two quaternions must be unit length.
+       ///   2) The interpolation factor (a) must be in the range [0, 1].
+       ///
+       /// This will use the equivalent to fastAcos() and fastSin().
+       ///
+       /// @see gtx_simd_quat
+       /// @see - mix(detail::fquatSIMD const & x, detail::fquatSIMD const & y, T const & a) 
+       detail::fquatSIMD fastMix(
+               detail::fquatSIMD const & x, 
+               detail::fquatSIMD const & y, 
+               float const & a);
+
+       /// Identical to fastMix() except takes the shortest path.
+       ///
+       /// The same rules apply here as those in fastMix(). Both quaternions must be unit length and 'a' must be
+       /// in the range [0, 1].
+       ///
+       /// @see - fastMix(detail::fquatSIMD const & x, detail::fquatSIMD const & y, T const & a) 
+       /// @see - slerp(detail::fquatSIMD const & x, detail::fquatSIMD const & y, T const & a) 
+       detail::fquatSIMD fastSlerp(
+               detail::fquatSIMD const & x, 
+               detail::fquatSIMD const & y, 
+               float const & a);
+
+
+       /// Returns the q conjugate. 
+       /// 
+       /// @see gtx_simd_quat
+       detail::fquatSIMD conjugate(
+               detail::fquatSIMD const & q);
+
+       /// Returns the q inverse. 
+       /// 
+       /// @see gtx_simd_quat
+       detail::fquatSIMD inverse(
+               detail::fquatSIMD const & q);
+
+       /// Build a quaternion from an angle and a normalized axis.
+       ///
+       /// @param angle Angle expressed in radians.
+       /// @param axis Axis of the quaternion, must be normalized. 
+       ///
+       /// @see gtx_simd_quat
+       detail::fquatSIMD angleAxisSIMD(
+               float const & angle, 
+               vec3 const & axis);
+
+       /// Build a quaternion from an angle and a normalized axis. 
+       ///
+       /// @param angle Angle expressed in radians.
+       /// @param x x component of the x-axis, x, y, z must be a normalized axis
+       /// @param y y component of the y-axis, x, y, z must be a normalized axis
+       /// @param z z component of the z-axis, x, y, z must be a normalized axis
+       ///
+       /// @see gtx_simd_quat
+       detail::fquatSIMD angleAxisSIMD(
+               float const & angle, 
+               float const & x, 
+               float const & y, 
+               float const & z);
+
+       // TODO: Move this to somewhere more appropriate. Used with fastMix() and fastSlerp().
+       /// Performs the equivalent of glm::fastSin() on each component of the given __m128.
+       __m128 fastSin(__m128 x);
+
+       /// @}
+}//namespace glm
+
+#include "simd_quat.inl"
+
+
+#if (GLM_COMPILER & GLM_COMPILER_VC)
+#   pragma warning(pop)
+#endif
+
+
+#endif//(GLM_ARCH != GLM_ARCH_PURE)
diff --git a/include/glm/gtx/simd_quat.inl b/include/glm/gtx/simd_quat.inl
new file mode 100644 (file)
index 0000000..f9dd4c0
--- /dev/null
@@ -0,0 +1,645 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtx_simd_quat
+/// @file glm/gtx/simd_quat.inl
+/// @date 2013-04-22 / 2014-11-25
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////
+
+namespace glm{
+namespace detail{
+
+
+//////////////////////////////////////
+// Debugging
+#if 0
+void print(__m128 v)
+{
+    GLM_ALIGN(16) float result[4];
+    _mm_store_ps(result, v);
+
+    printf("__m128:    %f %f %f %f\n", result[0], result[1], result[2], result[3]);
+}
+
+void print(const fvec4SIMD &v)
+{
+    printf("fvec4SIMD: %f %f %f %f\n", v.x, v.y, v.z, v.w);
+}
+#endif
+
+
+//////////////////////////////////////
+// Implicit basic constructors
+
+GLM_FUNC_QUALIFIER fquatSIMD::fquatSIMD()
+#      ifdef GLM_FORCE_NO_CTOR_INIT
+               : Data(_mm_set_ps(1.0f, 0.0f, 0.0f, 0.0f))
+#      endif
+{}
+
+GLM_FUNC_QUALIFIER fquatSIMD::fquatSIMD(__m128 const & Data) :
+       Data(Data)
+{}
+
+GLM_FUNC_QUALIFIER fquatSIMD::fquatSIMD(fquatSIMD const & q) :
+       Data(q.Data)
+{}
+
+
+//////////////////////////////////////
+// Explicit basic constructors
+
+GLM_FUNC_QUALIFIER fquatSIMD::fquatSIMD(float const & w, float const & x, float const & y, float const & z) :
+       Data(_mm_set_ps(w, z, y, x))
+{}
+
+GLM_FUNC_QUALIFIER fquatSIMD::fquatSIMD(quat const & q) :
+       Data(_mm_set_ps(q.w, q.z, q.y, q.x))
+{}
+
+GLM_FUNC_QUALIFIER fquatSIMD::fquatSIMD(vec3 const & eulerAngles)
+{
+    vec3 c = glm::cos(eulerAngles * 0.5f);
+       vec3 s = glm::sin(eulerAngles * 0.5f);
+
+    Data = _mm_set_ps(
+        (c.x * c.y * c.z) + (s.x * s.y * s.z),
+        (c.x * c.y * s.z) - (s.x * s.y * c.z),
+        (c.x * s.y * c.z) + (s.x * c.y * s.z),
+        (s.x * c.y * c.z) - (c.x * s.y * s.z));
+}
+
+
+//////////////////////////////////////
+// Unary arithmetic operators
+
+GLM_FUNC_QUALIFIER fquatSIMD& fquatSIMD::operator=(fquatSIMD const & q)
+{
+    this->Data = q.Data;
+    return *this;
+}
+
+GLM_FUNC_QUALIFIER fquatSIMD& fquatSIMD::operator*=(float const & s)
+{
+       this->Data = _mm_mul_ps(this->Data, _mm_set_ps1(s));
+       return *this;
+}
+
+GLM_FUNC_QUALIFIER fquatSIMD& fquatSIMD::operator/=(float const & s)
+{
+       this->Data = _mm_div_ps(Data, _mm_set1_ps(s));
+       return *this;
+}
+
+
+
+// negate operator
+GLM_FUNC_QUALIFIER fquatSIMD operator- (fquatSIMD const & q)
+{
+    return fquatSIMD(_mm_mul_ps(q.Data, _mm_set_ps(-1.0f, -1.0f, -1.0f, -1.0f)));
+}
+
+// operator+
+GLM_FUNC_QUALIFIER fquatSIMD operator+ (fquatSIMD const & q1, fquatSIMD const & q2)
+{
+       return fquatSIMD(_mm_add_ps(q1.Data, q2.Data));
+}
+
+//operator*
+GLM_FUNC_QUALIFIER fquatSIMD operator* (fquatSIMD const & q1, fquatSIMD const & q2)
+{
+    // SSE2 STATS:
+    //    11 shuffle
+    //    8  mul
+    //    8  add
+    
+    // SSE4 STATS:
+    //    3 shuffle
+    //    4 mul
+    //    4 dpps
+
+    __m128 mul0 = _mm_mul_ps(q1.Data, _mm_shuffle_ps(q2.Data, q2.Data, _MM_SHUFFLE(0, 1, 2, 3)));
+    __m128 mul1 = _mm_mul_ps(q1.Data, _mm_shuffle_ps(q2.Data, q2.Data, _MM_SHUFFLE(1, 0, 3, 2)));
+    __m128 mul2 = _mm_mul_ps(q1.Data, _mm_shuffle_ps(q2.Data, q2.Data, _MM_SHUFFLE(2, 3, 0, 1)));
+    __m128 mul3 = _mm_mul_ps(q1.Data, q2.Data);
+
+#   if((GLM_ARCH & GLM_ARCH_SSE4))
+    __m128 add0 = _mm_dp_ps(mul0, _mm_set_ps(1.0f, -1.0f,  1.0f,  1.0f), 0xff);
+    __m128 add1 = _mm_dp_ps(mul1, _mm_set_ps(1.0f,  1.0f,  1.0f, -1.0f), 0xff);
+    __m128 add2 = _mm_dp_ps(mul2, _mm_set_ps(1.0f,  1.0f, -1.0f,  1.0f), 0xff);
+    __m128 add3 = _mm_dp_ps(mul3, _mm_set_ps(1.0f, -1.0f, -1.0f, -1.0f), 0xff);
+#   else
+           mul0 = _mm_mul_ps(mul0, _mm_set_ps(1.0f, -1.0f,  1.0f,  1.0f));
+    __m128 add0 = _mm_add_ps(mul0, _mm_movehl_ps(mul0, mul0));
+           add0 = _mm_add_ss(add0, _mm_shuffle_ps(add0, add0, 1));
+
+           mul1 = _mm_mul_ps(mul1, _mm_set_ps(1.0f,  1.0f,  1.0f, -1.0f));
+    __m128 add1 = _mm_add_ps(mul1, _mm_movehl_ps(mul1, mul1));
+           add1 = _mm_add_ss(add1, _mm_shuffle_ps(add1, add1, 1));
+
+           mul2 = _mm_mul_ps(mul2, _mm_set_ps(1.0f,  1.0f, -1.0f,  1.0f));
+    __m128 add2 = _mm_add_ps(mul2, _mm_movehl_ps(mul2, mul2));
+           add2 = _mm_add_ss(add2, _mm_shuffle_ps(add2, add2, 1));
+
+           mul3 = _mm_mul_ps(mul3, _mm_set_ps(1.0f, -1.0f, -1.0f, -1.0f));
+    __m128 add3 = _mm_add_ps(mul3, _mm_movehl_ps(mul3, mul3));
+           add3 = _mm_add_ss(add3, _mm_shuffle_ps(add3, add3, 1));
+#endif
+
+
+    // This SIMD code is a politically correct way of doing this, but in every test I've tried it has been slower than
+    // the final code below. I'll keep this here for reference - maybe somebody else can do something better...
+    //
+    //__m128 xxyy = _mm_shuffle_ps(add0, add1, _MM_SHUFFLE(0, 0, 0, 0));
+    //__m128 zzww = _mm_shuffle_ps(add2, add3, _MM_SHUFFLE(0, 0, 0, 0));
+    //
+    //return _mm_shuffle_ps(xxyy, zzww, _MM_SHUFFLE(2, 0, 2, 0));
+    
+    float x;
+    float y;
+    float z;
+    float w;
+
+    _mm_store_ss(&x, add0);
+    _mm_store_ss(&y, add1);
+    _mm_store_ss(&z, add2);
+    _mm_store_ss(&w, add3);
+
+    return detail::fquatSIMD(w, x, y, z);
+}
+
+GLM_FUNC_QUALIFIER fvec4SIMD operator* (fquatSIMD const & q, fvec4SIMD const & v)
+{
+    static const __m128 two = _mm_set1_ps(2.0f);
+
+    __m128 q_wwww  = _mm_shuffle_ps(q.Data, q.Data, _MM_SHUFFLE(3, 3, 3, 3));
+    __m128 q_swp0  = _mm_shuffle_ps(q.Data, q.Data, _MM_SHUFFLE(3, 0, 2, 1));
+       __m128 q_swp1  = _mm_shuffle_ps(q.Data, q.Data, _MM_SHUFFLE(3, 1, 0, 2));
+       __m128 v_swp0  = _mm_shuffle_ps(v.Data, v.Data, _MM_SHUFFLE(3, 0, 2, 1));
+       __m128 v_swp1  = _mm_shuffle_ps(v.Data, v.Data, _MM_SHUFFLE(3, 1, 0, 2));
+       
+       __m128 uv      = _mm_sub_ps(_mm_mul_ps(q_swp0, v_swp1), _mm_mul_ps(q_swp1, v_swp0));
+    __m128 uv_swp0 = _mm_shuffle_ps(uv, uv, _MM_SHUFFLE(3, 0, 2, 1));
+    __m128 uv_swp1 = _mm_shuffle_ps(uv, uv, _MM_SHUFFLE(3, 1, 0, 2));
+    __m128 uuv     = _mm_sub_ps(_mm_mul_ps(q_swp0, uv_swp1), _mm_mul_ps(q_swp1, uv_swp0));
+
+    
+    uv  = _mm_mul_ps(uv,  _mm_mul_ps(q_wwww, two));
+    uuv = _mm_mul_ps(uuv, two);
+
+    return _mm_add_ps(v.Data, _mm_add_ps(uv, uuv));
+}
+
+GLM_FUNC_QUALIFIER fvec4SIMD operator* (fvec4SIMD const & v, fquatSIMD const & q)
+{
+       return glm::inverse(q) * v;
+}
+
+GLM_FUNC_QUALIFIER fquatSIMD operator* (fquatSIMD const & q, float s)
+{
+       return fquatSIMD(_mm_mul_ps(q.Data, _mm_set1_ps(s)));
+}
+
+GLM_FUNC_QUALIFIER fquatSIMD operator* (float s, fquatSIMD const & q)
+{
+       return fquatSIMD(_mm_mul_ps(_mm_set1_ps(s), q.Data));
+}
+
+
+//operator/
+GLM_FUNC_QUALIFIER fquatSIMD operator/ (fquatSIMD const & q, float s)
+{
+       return fquatSIMD(_mm_div_ps(q.Data, _mm_set1_ps(s)));
+}
+
+
+}//namespace detail
+
+
+GLM_FUNC_QUALIFIER quat quat_cast
+(
+       detail::fquatSIMD const & x
+)
+{
+       GLM_ALIGN(16) quat Result;
+       _mm_store_ps(&Result[0], x.Data);
+
+       return Result;
+}
+
+template <typename T>
+GLM_FUNC_QUALIFIER detail::fquatSIMD quatSIMD_cast_impl(const T m0[], const T m1[], const T m2[])
+{
+    T trace = m0[0] + m1[1] + m2[2] + T(1.0);
+    if (trace > T(0))
+    {
+        T s = static_cast<T>(0.5) / sqrt(trace);
+
+        return _mm_set_ps(
+            static_cast<float>(T(0.25) / s),
+            static_cast<float>((m0[1] - m1[0]) * s),
+            static_cast<float>((m2[0] - m0[2]) * s),
+            static_cast<float>((m1[2] - m2[1]) * s));
+    }
+    else
+    {
+        if (m0[0] > m1[1])
+        {
+            if (m0[0] > m2[2])
+            {
+                // X is biggest.
+                T s = sqrt(m0[0] - m1[1] - m2[2] + T(1.0)) * T(0.5);
+
+                return _mm_set_ps(
+                    static_cast<float>((m1[2] - m2[1]) * s),
+                    static_cast<float>((m2[0] + m0[2]) * s),
+                    static_cast<float>((m0[1] + m1[0]) * s),
+                    static_cast<float>(T(0.5)          * s));
+            }
+        }
+        else
+        {
+            if (m1[1] > m2[2])
+            {
+                // Y is biggest.
+                T s = sqrt(m1[1] - m0[0] - m2[2] + T(1.0)) * T(0.5);
+
+                return _mm_set_ps(
+                    static_cast<float>((m2[0] - m0[2]) * s),
+                    static_cast<float>((m1[2] + m2[1]) * s),
+                    static_cast<float>(T(0.5)          * s),
+                    static_cast<float>((m0[1] + m1[0]) * s));
+            }
+        }
+
+        // Z is biggest.
+        T s = sqrt(m2[2] - m0[0] - m1[1] + T(1.0)) * T(0.5);
+
+        return _mm_set_ps(
+            static_cast<float>((m0[1] - m1[0]) * s),
+            static_cast<float>(T(0.5)          * s),
+            static_cast<float>((m1[2] + m2[1]) * s),
+            static_cast<float>((m2[0] + m0[2]) * s));
+    }
+}
+
+GLM_FUNC_QUALIFIER detail::fquatSIMD quatSIMD_cast
+(
+       detail::fmat4x4SIMD const & m
+)
+{
+    // Scalar implementation for now.
+    GLM_ALIGN(16) float m0[4];
+    GLM_ALIGN(16) float m1[4];
+    GLM_ALIGN(16) float m2[4];
+
+    _mm_store_ps(m0, m[0].Data);
+    _mm_store_ps(m1, m[1].Data);
+    _mm_store_ps(m2, m[2].Data);
+
+    return quatSIMD_cast_impl(m0, m1, m2);
+}
+
+template <typename T, precision P>
+GLM_FUNC_QUALIFIER detail::fquatSIMD quatSIMD_cast
+(
+    tmat4x4<T, P> const & m
+)
+{
+    return quatSIMD_cast_impl(&m[0][0], &m[1][0], &m[2][0]);
+}
+
+template <typename T, precision P>
+GLM_FUNC_QUALIFIER detail::fquatSIMD quatSIMD_cast
+(
+    tmat3x3<T, P> const & m
+)
+{
+    return quatSIMD_cast_impl(&m[0][0], &m[1][0], &m[2][0]);
+}
+
+
+GLM_FUNC_QUALIFIER detail::fmat4x4SIMD mat4SIMD_cast
+(
+       detail::fquatSIMD const & q
+)
+{
+    detail::fmat4x4SIMD result;
+
+    __m128 _wwww  = _mm_shuffle_ps(q.Data, q.Data, _MM_SHUFFLE(3, 3, 3, 3));
+    __m128 _xyzw  = q.Data;
+    __m128 _zxyw  = _mm_shuffle_ps(q.Data, q.Data, _MM_SHUFFLE(3, 1, 0, 2));
+    __m128 _yzxw  = _mm_shuffle_ps(q.Data, q.Data, _MM_SHUFFLE(3, 0, 2, 1));
+
+    __m128 _xyzw2 = _mm_add_ps(_xyzw, _xyzw);
+    __m128 _zxyw2 = _mm_shuffle_ps(_xyzw2, _xyzw2, _MM_SHUFFLE(3, 1, 0, 2));
+    __m128 _yzxw2 = _mm_shuffle_ps(_xyzw2, _xyzw2, _MM_SHUFFLE(3, 0, 2, 1));
+    
+    __m128 _tmp0  = _mm_sub_ps(_mm_set1_ps(1.0f), _mm_mul_ps(_yzxw2, _yzxw));
+           _tmp0  = _mm_sub_ps(_tmp0, _mm_mul_ps(_zxyw2, _zxyw));
+
+    __m128 _tmp1  = _mm_mul_ps(_yzxw2, _xyzw);
+           _tmp1  = _mm_add_ps(_tmp1, _mm_mul_ps(_zxyw2, _wwww));
+
+    __m128 _tmp2  = _mm_mul_ps(_zxyw2, _xyzw);
+           _tmp2  = _mm_sub_ps(_tmp2, _mm_mul_ps(_yzxw2, _wwww));
+
+
+    // There's probably a better, more politically correct way of doing this...
+    result[0].Data = _mm_set_ps(
+        0.0f,
+        reinterpret_cast<float*>(&_tmp2)[0],
+        reinterpret_cast<float*>(&_tmp1)[0],
+        reinterpret_cast<float*>(&_tmp0)[0]);
+
+    result[1].Data = _mm_set_ps(
+        0.0f,
+        reinterpret_cast<float*>(&_tmp1)[1],
+        reinterpret_cast<float*>(&_tmp0)[1],
+        reinterpret_cast<float*>(&_tmp2)[1]);
+
+    result[2].Data = _mm_set_ps(
+        0.0f,
+        reinterpret_cast<float*>(&_tmp0)[2],
+        reinterpret_cast<float*>(&_tmp2)[2],
+        reinterpret_cast<float*>(&_tmp1)[2]);
+
+   result[3].Data = _mm_set_ps(
+        1.0f,
+        0.0f,
+        0.0f,
+        0.0f);
+
+
+    return result;
+}
+
+GLM_FUNC_QUALIFIER mat4 mat4_cast
+(
+       detail::fquatSIMD const & q
+)
+{
+    return mat4_cast(mat4SIMD_cast(q));
+}
+
+
+
+GLM_FUNC_QUALIFIER float length
+(
+       detail::fquatSIMD const & q
+)
+{
+    return glm::sqrt(dot(q, q));
+}
+
+GLM_FUNC_QUALIFIER detail::fquatSIMD normalize
+(
+       detail::fquatSIMD const & q
+)
+{
+    return _mm_mul_ps(q.Data, _mm_set1_ps(1.0f / length(q)));
+}
+
+GLM_FUNC_QUALIFIER float dot
+(
+       detail::fquatSIMD const & q1,
+       detail::fquatSIMD const & q2
+)
+{
+    float result;
+    _mm_store_ss(&result, detail::sse_dot_ps(q1.Data, q2.Data));
+
+    return result;
+}
+
+GLM_FUNC_QUALIFIER detail::fquatSIMD mix
+(
+       detail::fquatSIMD const & x, 
+       detail::fquatSIMD const & y, 
+       float const & a
+)
+{
+       float cosTheta = dot(x, y);
+
+    if (cosTheta > 1.0f - glm::epsilon<float>())
+    {
+           return _mm_add_ps(x.Data, _mm_mul_ps(_mm_set1_ps(a), _mm_sub_ps(y.Data, x.Data)));
+    }
+    else
+    {
+        float angle = glm::acos(cosTheta);
+        
+        
+        float s0 = glm::sin((1.0f - a) * angle);
+        float s1 = glm::sin(a * angle);
+        float d  = 1.0f / glm::sin(angle);
+
+        return (s0 * x + s1 * y) * d;
+    }
+}
+
+GLM_FUNC_QUALIFIER detail::fquatSIMD lerp
+(
+       detail::fquatSIMD const & x, 
+       detail::fquatSIMD const & y, 
+       float const & a
+)
+{
+       // Lerp is only defined in [0, 1]
+       assert(a >= 0.0f);
+       assert(a <= 1.0f);
+
+    return _mm_add_ps(x.Data, _mm_mul_ps(_mm_set1_ps(a), _mm_sub_ps(y.Data, x.Data)));
+}
+
+GLM_FUNC_QUALIFIER detail::fquatSIMD slerp
+(
+       detail::fquatSIMD const & x, 
+       detail::fquatSIMD const & y, 
+       float const & a
+)
+{
+       detail::fquatSIMD z = y;
+
+       float cosTheta = dot(x, y);
+
+       // If cosTheta < 0, the interpolation will take the long way around the sphere. 
+       // To fix this, one quat must be negated.
+       if (cosTheta < 0.0f)
+       {
+               z        = -y;
+               cosTheta = -cosTheta;
+       }
+
+       // Perform a linear interpolation when cosTheta is close to 1 to avoid side effect of sin(angle) becoming a zero denominator
+       if(cosTheta > 1.0f - epsilon<float>())
+       {
+               return _mm_add_ps(x.Data, _mm_mul_ps(_mm_set1_ps(a), _mm_sub_ps(y.Data, x.Data)));
+       }
+       else
+       {
+        float angle = glm::acos(cosTheta);
+
+
+               float s0 = glm::sin((1.0f - a) * angle);
+        float s1 = glm::sin(a * angle);
+        float d  = 1.0f / glm::sin(angle);
+
+        return (s0 * x + s1 * y) * d;
+       }
+}
+
+
+GLM_FUNC_QUALIFIER detail::fquatSIMD fastMix
+(
+       detail::fquatSIMD const & x, 
+       detail::fquatSIMD const & y, 
+       float const & a
+)
+{
+       float cosTheta = dot(x, y);
+
+    if (cosTheta > 1.0f - glm::epsilon<float>())
+    {
+           return _mm_add_ps(x.Data, _mm_mul_ps(_mm_set1_ps(a), _mm_sub_ps(y.Data, x.Data)));
+    }
+    else
+    {
+        float angle = glm::fastAcos(cosTheta);
+
+
+        __m128 s  = glm::fastSin(_mm_set_ps((1.0f - a) * angle, a * angle, angle, 0.0f));
+
+        __m128 s0 =                               _mm_shuffle_ps(s, s, _MM_SHUFFLE(3, 3, 3, 3));
+        __m128 s1 =                               _mm_shuffle_ps(s, s, _MM_SHUFFLE(2, 2, 2, 2));
+        __m128 d  = _mm_div_ps(_mm_set1_ps(1.0f), _mm_shuffle_ps(s, s, _MM_SHUFFLE(1, 1, 1, 1)));
+        
+        return _mm_mul_ps(_mm_add_ps(_mm_mul_ps(s0, x.Data), _mm_mul_ps(s1, y.Data)), d);
+    }
+}
+
+GLM_FUNC_QUALIFIER detail::fquatSIMD fastSlerp
+(
+       detail::fquatSIMD const & x, 
+       detail::fquatSIMD const & y, 
+       float const & a
+)
+{
+       detail::fquatSIMD z = y;
+
+       float cosTheta = dot(x, y);
+       if (cosTheta < 0.0f)
+       {
+               z        = -y;
+               cosTheta = -cosTheta;
+       }
+
+
+       if(cosTheta > 1.0f - epsilon<float>())
+       {
+               return _mm_add_ps(x.Data, _mm_mul_ps(_mm_set1_ps(a), _mm_sub_ps(y.Data, x.Data)));
+       }
+       else
+       {
+        float angle = glm::fastAcos(cosTheta);
+
+
+        __m128 s  = glm::fastSin(_mm_set_ps((1.0f - a) * angle, a * angle, angle, 0.0f));
+
+        __m128 s0 =                               _mm_shuffle_ps(s, s, _MM_SHUFFLE(3, 3, 3, 3));
+        __m128 s1 =                               _mm_shuffle_ps(s, s, _MM_SHUFFLE(2, 2, 2, 2));
+        __m128 d  = _mm_div_ps(_mm_set1_ps(1.0f), _mm_shuffle_ps(s, s, _MM_SHUFFLE(1, 1, 1, 1)));
+        
+        return _mm_mul_ps(_mm_add_ps(_mm_mul_ps(s0, x.Data), _mm_mul_ps(s1, y.Data)), d);
+       }
+}
+
+
+
+GLM_FUNC_QUALIFIER detail::fquatSIMD conjugate
+(
+       detail::fquatSIMD const & q
+)
+{
+       return detail::fquatSIMD(_mm_mul_ps(q.Data, _mm_set_ps(1.0f, -1.0f, -1.0f, -1.0f)));
+}
+
+GLM_FUNC_QUALIFIER detail::fquatSIMD inverse
+(
+       detail::fquatSIMD const & q
+)
+{
+       return conjugate(q) / dot(q, q);
+}
+
+
+GLM_FUNC_QUALIFIER detail::fquatSIMD angleAxisSIMD
+(
+       float const & angle,
+       vec3 const & v
+)
+{
+       float s = glm::sin(angle * 0.5f);
+
+       return _mm_set_ps(
+               glm::cos(angle * 0.5f),
+               v.z * s,
+               v.y * s,
+               v.x * s);
+}
+
+GLM_FUNC_QUALIFIER detail::fquatSIMD angleAxisSIMD
+(
+       float const & angle, 
+       float const & x, 
+       float const & y, 
+       float const & z
+)
+{
+       return angleAxisSIMD(angle, vec3(x, y, z));
+}
+
+
+GLM_FUNC_QUALIFIER __m128 fastSin(__m128 x)
+{
+       static const __m128 c0 = _mm_set1_ps(0.16666666666666666666666666666667f);
+       static const __m128 c1 = _mm_set1_ps(0.00833333333333333333333333333333f);
+       static const __m128 c2 = _mm_set1_ps(0.00019841269841269841269841269841f);
+
+       __m128 x3 = _mm_mul_ps(x,  _mm_mul_ps(x, x));
+       __m128 x5 = _mm_mul_ps(x3, _mm_mul_ps(x, x));
+       __m128 x7 = _mm_mul_ps(x5, _mm_mul_ps(x, x));
+
+       __m128 y0 = _mm_mul_ps(x3, c0);
+       __m128 y1 = _mm_mul_ps(x5, c1);
+       __m128 y2 = _mm_mul_ps(x7, c2);
+
+       return _mm_sub_ps(_mm_add_ps(_mm_sub_ps(x, y0), y1), y2);
+}
+
+
+}//namespace glm
diff --git a/include/glm/gtx/simd_vec4.hpp b/include/glm/gtx/simd_vec4.hpp
new file mode 100644 (file)
index 0000000..2d836a4
--- /dev/null
@@ -0,0 +1,574 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtx_simd_vec4
+/// @file glm/gtx/simd_vec4.hpp
+/// @date 2009-05-07 / 2011-06-07
+/// @author Christophe Riccio
+///
+/// @see core (dependence)
+///
+/// @defgroup gtx_simd_vec4 GLM_GTX_simd_vec4
+/// @ingroup gtx
+/// 
+/// @brief SIMD implementation of vec4 type.
+/// 
+/// <glm/gtx/simd_vec4.hpp> need to be included to use these functionalities.
+///////////////////////////////////////////////////////////////////////////////////
+
+#pragma once
+
+// Dependency:
+#include "../glm.hpp"
+
+#if(GLM_ARCH != GLM_ARCH_PURE)
+
+#if(GLM_ARCH & GLM_ARCH_SSE2)
+#      include "../detail/intrinsic_common.hpp"
+#      include "../detail/intrinsic_geometric.hpp"
+#      include "../detail/intrinsic_integer.hpp"
+#else
+#      error "GLM: GLM_GTX_simd_vec4 requires compiler support of SSE2 through intrinsics"
+#endif
+
+#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
+#      pragma message("GLM: GLM_GTX_simd_vec4 extension included")
+#endif
+
+
+// Warning silencer for nameless struct/union.
+#if (GLM_COMPILER & GLM_COMPILER_VC)
+#      pragma warning(push)
+#      pragma warning(disable:4201)   // warning C4201: nonstandard extension used : nameless struct/union
+#endif
+
+namespace glm
+{
+       enum comp
+       {
+               X = 0,
+               R = 0,
+               S = 0,
+               Y = 1,
+               G = 1,
+               T = 1,
+               Z = 2,
+               B = 2,
+               P = 2,
+               W = 3,
+               A = 3,
+               Q = 3
+       };
+
+}//namespace glm
+
+namespace glm{
+namespace detail
+{
+       /// 4-dimensional vector implemented using SIMD SEE intrinsics.
+       /// \ingroup gtx_simd_vec4
+       GLM_ALIGNED_STRUCT(16) fvec4SIMD
+       {
+               typedef __m128 value_type;
+               typedef std::size_t size_type;
+               static size_type value_size();
+
+               typedef fvec4SIMD type;
+               typedef tvec4<bool, highp> bool_type;
+
+#ifdef GLM_SIMD_ENABLE_XYZW_UNION
+               union
+               {
+                       __m128 Data;
+                       struct {float x, y, z, w;};
+               };
+#else
+               __m128 Data;
+#endif
+
+               //////////////////////////////////////
+               // Implicit basic constructors
+
+               fvec4SIMD();
+               fvec4SIMD(__m128 const & Data);
+               fvec4SIMD(fvec4SIMD const & v);
+
+               //////////////////////////////////////
+               // Explicit basic constructors
+
+               explicit fvec4SIMD(
+                       ctor);
+               explicit fvec4SIMD(
+                       float const & s);
+               explicit fvec4SIMD(
+                       float const & x, 
+                       float const & y, 
+                       float const & z, 
+                       float const & w);
+               explicit fvec4SIMD(
+                       vec4 const & v);
+
+               ////////////////////////////////////////
+               //// Conversion vector constructors
+
+               fvec4SIMD(vec2 const & v, float const & s1, float const & s2);
+               fvec4SIMD(float const & s1, vec2 const & v, float const & s2);
+               fvec4SIMD(float const & s1, float const & s2, vec2 const & v);
+               fvec4SIMD(vec3 const & v, float const & s);
+               fvec4SIMD(float const & s, vec3 const & v);
+               fvec4SIMD(vec2 const & v1, vec2 const & v2);
+               //fvec4SIMD(ivec4SIMD const & v);
+
+               //////////////////////////////////////
+               // Unary arithmetic operators
+
+               fvec4SIMD& operator= (fvec4SIMD const & v);
+               fvec4SIMD& operator+=(fvec4SIMD const & v);
+               fvec4SIMD& operator-=(fvec4SIMD const & v);
+               fvec4SIMD& operator*=(fvec4SIMD const & v);
+               fvec4SIMD& operator/=(fvec4SIMD const & v);
+
+               fvec4SIMD& operator+=(float const & s);
+               fvec4SIMD& operator-=(float const & s);
+               fvec4SIMD& operator*=(float const & s);
+               fvec4SIMD& operator/=(float const & s);
+
+               fvec4SIMD& operator++();
+               fvec4SIMD& operator--();
+
+               //////////////////////////////////////
+               // Swizzle operators
+
+               template <comp X, comp Y, comp Z, comp W>
+               fvec4SIMD& swizzle();
+               template <comp X, comp Y, comp Z, comp W>
+               fvec4SIMD swizzle() const;
+               template <comp X, comp Y, comp Z>
+               fvec4SIMD swizzle() const;
+               template <comp X, comp Y>
+               fvec4SIMD swizzle() const;
+               template <comp X>
+               fvec4SIMD swizzle() const;
+       };
+}//namespace detail
+
+       typedef glm::detail::fvec4SIMD simdVec4;
+
+       /// @addtogroup gtx_simd_vec4
+       /// @{
+
+       //! Convert a simdVec4 to a vec4.
+       /// @see gtx_simd_vec4
+       vec4 vec4_cast(
+               detail::fvec4SIMD const & x);
+
+       //! Returns x if x >= 0; otherwise, it returns -x.
+       /// @see gtx_simd_vec4
+       detail::fvec4SIMD abs(detail::fvec4SIMD const & x);
+
+       //! Returns 1.0 if x > 0, 0.0 if x = 0, or -1.0 if x < 0.
+       /// @see gtx_simd_vec4
+       detail::fvec4SIMD sign(detail::fvec4SIMD const & x);
+
+       //! Returns a value equal to the nearest integer that is less then or equal to x.
+       /// @see gtx_simd_vec4
+       detail::fvec4SIMD floor(detail::fvec4SIMD const & x);
+
+       //! Returns a value equal to the nearest integer to x
+       //! whose absolute value is not larger than the absolute value of x.
+       /// @see gtx_simd_vec4
+       detail::fvec4SIMD trunc(detail::fvec4SIMD const & x);
+
+       //! Returns a value equal to the nearest integer to x.
+       //! The fraction 0.5 will round in a direction chosen by the
+       //! implementation, presumably the direction that is fastest.
+       //! This includes the possibility that round(x) returns the
+       //! same value as roundEven(x) for all values of x.
+       ///
+       /// @see gtx_simd_vec4
+       detail::fvec4SIMD round(detail::fvec4SIMD const & x);
+
+       //! Returns a value equal to the nearest integer to x.
+       //! A fractional part of 0.5 will round toward the nearest even
+       //! integer. (Both 3.5 and 4.5 for x will return 4.0.) 
+       ///
+       /// @see gtx_simd_vec4
+       //detail::fvec4SIMD roundEven(detail::fvec4SIMD const & x);
+
+       //! Returns a value equal to the nearest integer 
+       //! that is greater than or equal to x. 
+       /// @see gtx_simd_vec4
+       detail::fvec4SIMD ceil(detail::fvec4SIMD const & x);
+
+       //! Return x - floor(x).
+       ///
+       /// @see gtx_simd_vec4
+       detail::fvec4SIMD fract(detail::fvec4SIMD const & x);
+
+       //! Modulus. Returns x - y * floor(x / y)
+       //! for each component in x using the floating point value y.
+       ///
+       /// @see gtx_simd_vec4
+       detail::fvec4SIMD mod(
+               detail::fvec4SIMD const & x, 
+               detail::fvec4SIMD const & y);
+
+       //! Modulus. Returns x - y * floor(x / y)
+       //! for each component in x using the floating point value y.
+       ///
+       /// @see gtx_simd_vec4
+       detail::fvec4SIMD mod(
+               detail::fvec4SIMD const & x, 
+               float const & y);
+
+       //! Returns the fractional part of x and sets i to the integer
+       //! part (as a whole number floating point value). Both the
+       //! return value and the output parameter will have the same
+       //! sign as x.
+       //! (From GLM_GTX_simd_vec4 extension, common function)
+       //detail::fvec4SIMD modf(
+       //      detail::fvec4SIMD const & x, 
+       //      detail::fvec4SIMD & i);
+
+       //! Returns y if y < x; otherwise, it returns x.
+       /// 
+       /// @see gtx_simd_vec4
+       detail::fvec4SIMD min(
+               detail::fvec4SIMD const & x, 
+               detail::fvec4SIMD const & y);
+
+       detail::fvec4SIMD min(
+               detail::fvec4SIMD const & x, 
+               float const & y);
+
+       //! Returns y if x < y; otherwise, it returns x.
+       ///
+       /// @see gtx_simd_vec4
+       detail::fvec4SIMD max(
+               detail::fvec4SIMD const & x, 
+               detail::fvec4SIMD const & y);
+
+       detail::fvec4SIMD max(
+               detail::fvec4SIMD const & x, 
+               float const & y);
+
+       //! Returns min(max(x, minVal), maxVal) for each component in x 
+       //! using the floating-point values minVal and maxVal.
+       ///
+       /// @see gtx_simd_vec4
+       detail::fvec4SIMD clamp(
+               detail::fvec4SIMD const & x, 
+               detail::fvec4SIMD const & minVal, 
+               detail::fvec4SIMD const & maxVal); 
+
+       detail::fvec4SIMD clamp(
+               detail::fvec4SIMD const & x, 
+               float const & minVal, 
+               float const & maxVal); 
+
+       //! \return If genTypeU is a floating scalar or vector: 
+       //! Returns x * (1.0 - a) + y * a, i.e., the linear blend of 
+       //! x and y using the floating-point value a. 
+       //! The value for a is not restricted to the range [0, 1].
+       //!
+       //! \return If genTypeU is a boolean scalar or vector: 
+       //! Selects which vector each returned component comes
+       //! from. For a component of a that is false, the
+       //! corresponding component of x is returned. For a
+       //! component of a that is true, the corresponding
+       //! component of y is returned. Components of x and y that
+       //! are not selected are allowed to be invalid floating point
+       //! values and will have no effect on the results. Thus, this
+       //! provides different functionality than
+       //! genType mix(genType x, genType y, genType(a))
+       //! where a is a Boolean vector.
+       //! 
+       //! From GLSL 1.30.08 specification, section 8.3
+       //! 
+       //! \param[in]  x Floating point scalar or vector.
+       //! \param[in]  y Floating point scalar or vector.
+       //! \param[in]  a Floating point or boolean scalar or vector.
+       //!
+       /// \todo Test when 'a' is a boolean.
+       ///
+       /// @see gtx_simd_vec4
+       detail::fvec4SIMD mix(
+               detail::fvec4SIMD const & x, 
+               detail::fvec4SIMD const & y, 
+               detail::fvec4SIMD const & a);
+
+       //! Returns 0.0 if x < edge, otherwise it returns 1.0.
+       ///
+       /// @see gtx_simd_vec4
+       detail::fvec4SIMD step(
+               detail::fvec4SIMD const & edge, 
+               detail::fvec4SIMD const & x);
+
+       detail::fvec4SIMD step(
+               float const & edge, 
+               detail::fvec4SIMD const & x);
+
+       //! Returns 0.0 if x <= edge0 and 1.0 if x >= edge1 and
+       //! performs smooth Hermite interpolation between 0 and 1
+       //! when edge0 < x < edge1. This is useful in cases where
+       //! you would want a threshold function with a smooth
+       //! transition. This is equivalent to:
+       //! genType t;
+       //! t = clamp ((x - edge0) / (edge1 - edge0), 0, 1);
+       //! return t * t * (3 - 2 * t);
+       //! Results are undefined if edge0 >= edge1.
+       ///
+       /// @see gtx_simd_vec4
+       detail::fvec4SIMD smoothstep(
+               detail::fvec4SIMD const & edge0, 
+               detail::fvec4SIMD const & edge1, 
+               detail::fvec4SIMD const & x);
+
+       detail::fvec4SIMD smoothstep(
+               float const & edge0, 
+               float const & edge1, 
+               detail::fvec4SIMD const & x);
+
+       //! Returns true if x holds a NaN (not a number)
+       //! representation in the underlying implementation's set of
+       //! floating point representations. Returns false otherwise,
+       //! including for implementations with no NaN
+       //! representations.
+       ///
+       /// @see gtx_simd_vec4
+       //bvec4 isnan(detail::fvec4SIMD const & x);
+
+       //! Returns true if x holds a positive infinity or negative
+       //! infinity representation in the underlying implementation's
+       //! set of floating point representations. Returns false
+       //! otherwise, including for implementations with no infinity
+       //! representations.
+       ///
+       /// @see gtx_simd_vec4
+       //bvec4 isinf(detail::fvec4SIMD const & x);
+
+       //! Returns a signed or unsigned integer value representing
+       //! the encoding of a floating-point value. The floatingpoint
+       //! value's bit-level representation is preserved.
+       ///
+       /// @see gtx_simd_vec4
+       //detail::ivec4SIMD floatBitsToInt(detail::fvec4SIMD const & value);
+
+       //! Returns a floating-point value corresponding to a signed
+       //! or unsigned integer encoding of a floating-point value.
+       //! If an inf or NaN is passed in, it will not signal, and the
+       //! resulting floating point value is unspecified. Otherwise,
+       //! the bit-level representation is preserved.
+       ///
+       /// @see gtx_simd_vec4
+       //detail::fvec4SIMD intBitsToFloat(detail::ivec4SIMD const & value);
+
+       //! Computes and returns a * b + c.
+       ///
+       /// @see gtx_simd_vec4
+       detail::fvec4SIMD fma(
+               detail::fvec4SIMD const & a, 
+               detail::fvec4SIMD const & b, 
+               detail::fvec4SIMD const & c);
+
+       //! Splits x into a floating-point significand in the range
+       //! [0.5, 1.0) and an integral exponent of two, such that:
+       //! x = significand * exp(2, exponent)
+       //! The significand is returned by the function and the
+       //! exponent is returned in the parameter exp. For a
+       //! floating-point value of zero, the significant and exponent
+       //! are both zero. For a floating-point value that is an
+       //! infinity or is not a number, the results are undefined.
+       ///
+       /// @see gtx_simd_vec4
+       //detail::fvec4SIMD frexp(detail::fvec4SIMD const & x, detail::ivec4SIMD & exp);
+
+       //! Builds a floating-point number from x and the
+       //! corresponding integral exponent of two in exp, returning:
+       //! significand * exp(2, exponent)
+       //! If this product is too large to be represented in the
+       //! floating-point type, the result is undefined.
+       ///
+       /// @see gtx_simd_vec4
+       //detail::fvec4SIMD ldexp(detail::fvec4SIMD const & x, detail::ivec4SIMD const & exp);
+
+       //! Returns the length of x, i.e., sqrt(x * x).
+       ///
+       /// @see gtx_simd_vec4
+       float length(
+               detail::fvec4SIMD const & x);
+
+       //! Returns the length of x, i.e., sqrt(x * x).
+       //! Less accurate but much faster than simdLength.
+       ///
+       /// @see gtx_simd_vec4
+       float fastLength(
+               detail::fvec4SIMD const & x);
+
+       //! Returns the length of x, i.e., sqrt(x * x).
+       //! Slightly more accurate but much slower than simdLength.
+       ///
+       /// @see gtx_simd_vec4
+       float niceLength(
+               detail::fvec4SIMD const & x);
+
+       //! Returns the length of x, i.e., sqrt(x * x).
+       ///
+       /// @see gtx_simd_vec4
+       detail::fvec4SIMD length4(
+               detail::fvec4SIMD const & x);
+
+       //! Returns the length of x, i.e., sqrt(x * x).
+       //! Less accurate but much faster than simdLength4.
+       ///
+       /// @see gtx_simd_vec4
+       detail::fvec4SIMD fastLength4(
+               detail::fvec4SIMD const & x);
+
+       //! Returns the length of x, i.e., sqrt(x * x).
+       //! Slightly more accurate but much slower than simdLength4.
+       ///
+       /// @see gtx_simd_vec4
+       detail::fvec4SIMD niceLength4(
+               detail::fvec4SIMD const & x);
+
+       //! Returns the distance betwwen p0 and p1, i.e., length(p0 - p1).
+       ///
+       /// @see gtx_simd_vec4
+       float distance(
+               detail::fvec4SIMD const & p0,
+               detail::fvec4SIMD const & p1);
+
+       //! Returns the distance betwwen p0 and p1, i.e., length(p0 - p1).
+       ///
+       /// @see gtx_simd_vec4
+       detail::fvec4SIMD distance4(
+               detail::fvec4SIMD const & p0,
+               detail::fvec4SIMD const & p1);
+
+       //! Returns the dot product of x and y, i.e., result = x * y.
+       ///
+       /// @see gtx_simd_vec4
+       float simdDot(
+               detail::fvec4SIMD const & x,
+               detail::fvec4SIMD const & y);
+
+       //! Returns the dot product of x and y, i.e., result = x * y.
+       ///
+       /// @see gtx_simd_vec4
+       detail::fvec4SIMD dot4(
+               detail::fvec4SIMD const & x,
+               detail::fvec4SIMD const & y);
+
+       //! Returns the cross product of x and y.
+       ///
+       /// @see gtx_simd_vec4
+       detail::fvec4SIMD cross(
+               detail::fvec4SIMD const & x,
+               detail::fvec4SIMD const & y);
+
+       //! Returns a vector in the same direction as x but with length of 1.
+       ///
+       /// @see gtx_simd_vec4
+       detail::fvec4SIMD normalize(
+               detail::fvec4SIMD const & x);
+
+       //! Returns a vector in the same direction as x but with length of 1.
+       //! Less accurate but much faster than simdNormalize.
+       ///
+       /// @see gtx_simd_vec4
+       detail::fvec4SIMD fastNormalize(
+               detail::fvec4SIMD const & x);
+
+       //! If dot(Nref, I) < 0.0, return N, otherwise, return -N.
+       ///
+       /// @see gtx_simd_vec4
+       detail::fvec4SIMD simdFaceforward(
+               detail::fvec4SIMD const & N,
+               detail::fvec4SIMD const & I,
+               detail::fvec4SIMD const & Nref);
+
+       //! For the incident vector I and surface orientation N,
+       //! returns the reflection direction : result = I - 2.0 * dot(N, I) * N.
+       ///
+       /// @see gtx_simd_vec4
+       detail::fvec4SIMD reflect(
+               detail::fvec4SIMD const & I,
+               detail::fvec4SIMD const & N);
+
+       //! For the incident vector I and surface normal N,
+       //! and the ratio of indices of refraction eta,
+       //! return the refraction vector.
+       ///
+       /// @see gtx_simd_vec4
+       detail::fvec4SIMD refract(
+               detail::fvec4SIMD const & I,
+               detail::fvec4SIMD const & N,
+               float const & eta);
+
+       //! Returns the positive square root of x.
+       ///
+       /// @see gtx_simd_vec4
+       detail::fvec4SIMD sqrt(
+               detail::fvec4SIMD const & x);
+
+       //! Returns the positive square root of x with the nicest quality but very slow.
+       //! Slightly more accurate but much slower than simdSqrt.
+       ///
+       /// @see gtx_simd_vec4
+       detail::fvec4SIMD niceSqrt(
+               detail::fvec4SIMD const & x);
+
+       //! Returns the positive square root of x
+       //! Less accurate but much faster than sqrt.
+       ///
+       /// @see gtx_simd_vec4
+       detail::fvec4SIMD fastSqrt(
+               detail::fvec4SIMD const & x);
+
+       //! Returns the reciprocal of the positive square root of x.
+       ///
+       /// @see gtx_simd_vec4
+       detail::fvec4SIMD inversesqrt(
+               detail::fvec4SIMD const & x);
+
+       //! Returns the reciprocal of the positive square root of x.
+       //! Faster than inversesqrt but less accurate.
+       ///
+       /// @see gtx_simd_vec4
+       detail::fvec4SIMD fastInversesqrt(
+               detail::fvec4SIMD const & x);
+
+       /// @}
+}//namespace glm
+
+#include "simd_vec4.inl"
+
+#if (GLM_COMPILER & GLM_COMPILER_VC)
+#      pragma warning(pop)
+#endif
+
+#endif//(GLM_ARCH != GLM_ARCH_PURE)
diff --git a/include/glm/gtx/simd_vec4.inl b/include/glm/gtx/simd_vec4.inl
new file mode 100644 (file)
index 0000000..ba5387c
--- /dev/null
@@ -0,0 +1,727 @@
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// Created : 2009-05-07
+// Updated : 2009-05-07
+// Licence : This source is under MIT License
+// File    : glm/gtx/simd_vec4.inl
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+namespace glm{
+namespace detail{
+
+template <int Value>
+struct shuffle_mask
+{
+       enum{value = Value};
+};
+
+//////////////////////////////////////
+// Implicit basic constructors
+
+GLM_FUNC_QUALIFIER fvec4SIMD::fvec4SIMD()
+#      ifdef GLM_FORCE_NO_CTOR_INIT
+               : Data(_mm_set_ps(0.0f, 0.0f, 0.0f, 0.0f))
+#      endif
+{}
+
+GLM_FUNC_QUALIFIER fvec4SIMD::fvec4SIMD(__m128 const & Data) :
+       Data(Data)
+{}
+
+GLM_FUNC_QUALIFIER fvec4SIMD::fvec4SIMD(fvec4SIMD const & v) :
+       Data(v.Data)
+{}
+
+GLM_FUNC_QUALIFIER fvec4SIMD::fvec4SIMD(vec4 const & v) :
+       Data(_mm_set_ps(v.w, v.z, v.y, v.x))
+{}
+
+//////////////////////////////////////
+// Explicit basic constructors
+
+GLM_FUNC_QUALIFIER fvec4SIMD::fvec4SIMD(float const & s) :
+       Data(_mm_set1_ps(s))
+{}
+
+GLM_FUNC_QUALIFIER fvec4SIMD::fvec4SIMD(float const & x, float const & y, float const & z, float const & w) :
+//             Data(_mm_setr_ps(x, y, z, w))
+       Data(_mm_set_ps(w, z, y, x))
+{}
+/*
+GLM_FUNC_QUALIFIER fvec4SIMD::fvec4SIMD(float const v[4]) :
+       Data(_mm_load_ps(v))
+{}
+*/
+//////////////////////////////////////
+// Swizzle constructors
+
+//fvec4SIMD(ref4<float> const & r);
+
+//////////////////////////////////////
+// Conversion vector constructors
+
+GLM_FUNC_QUALIFIER fvec4SIMD::fvec4SIMD(vec2 const & v, float const & s1, float const & s2) :
+       Data(_mm_set_ps(s2, s1, v.y, v.x))
+{}
+
+GLM_FUNC_QUALIFIER fvec4SIMD::fvec4SIMD(float const & s1, vec2 const & v, float const & s2) :
+       Data(_mm_set_ps(s2, v.y, v.x, s1))
+{}
+
+GLM_FUNC_QUALIFIER fvec4SIMD::fvec4SIMD(float const & s1, float const & s2, vec2 const & v) :
+       Data(_mm_set_ps(v.y, v.x, s2, s1))
+{}
+
+GLM_FUNC_QUALIFIER fvec4SIMD::fvec4SIMD(vec3 const & v, float const & s) :
+       Data(_mm_set_ps(s, v.z, v.y, v.x))
+{}
+
+GLM_FUNC_QUALIFIER fvec4SIMD::fvec4SIMD(float const & s, vec3 const & v) :
+       Data(_mm_set_ps(v.z, v.y, v.x, s))
+{}
+
+GLM_FUNC_QUALIFIER fvec4SIMD::fvec4SIMD(vec2 const & v1, vec2 const & v2) :
+       Data(_mm_set_ps(v2.y, v2.x, v1.y, v1.x))
+{}
+
+//GLM_FUNC_QUALIFIER fvec4SIMD::fvec4SIMD(ivec4SIMD const & v) :
+//     Data(_mm_cvtepi32_ps(v.Data))
+//{}
+
+//////////////////////////////////////
+// Unary arithmetic operators
+
+GLM_FUNC_QUALIFIER fvec4SIMD& fvec4SIMD::operator=(fvec4SIMD const & v)
+{
+       this->Data = v.Data;
+       return *this;
+}
+
+GLM_FUNC_QUALIFIER fvec4SIMD& fvec4SIMD::operator+=(float const & s)
+{
+       this->Data = _mm_add_ps(Data, _mm_set_ps1(s));
+       return *this;
+}
+
+GLM_FUNC_QUALIFIER fvec4SIMD& fvec4SIMD::operator+=(fvec4SIMD const & v)
+{
+       this->Data = _mm_add_ps(this->Data , v.Data);
+       return *this;
+}
+
+GLM_FUNC_QUALIFIER fvec4SIMD& fvec4SIMD::operator-=(float const & s)
+{
+       this->Data = _mm_sub_ps(Data, _mm_set_ps1(s));
+       return *this;
+}
+
+GLM_FUNC_QUALIFIER fvec4SIMD& fvec4SIMD::operator-=(fvec4SIMD const & v)
+{
+       this->Data = _mm_sub_ps(this->Data , v.Data);
+       return *this;
+}
+
+GLM_FUNC_QUALIFIER fvec4SIMD& fvec4SIMD::operator*=(float const & s)
+{
+       this->Data = _mm_mul_ps(this->Data, _mm_set_ps1(s));
+       return *this;
+}
+
+GLM_FUNC_QUALIFIER fvec4SIMD& fvec4SIMD::operator*=(fvec4SIMD const & v)
+{
+       this->Data = _mm_mul_ps(this->Data , v.Data);
+       return *this;
+}
+
+GLM_FUNC_QUALIFIER fvec4SIMD& fvec4SIMD::operator/=(float const & s)
+{
+       this->Data = _mm_div_ps(Data, _mm_set1_ps(s));
+       return *this;
+}
+
+GLM_FUNC_QUALIFIER fvec4SIMD& fvec4SIMD::operator/=(fvec4SIMD const & v)
+{
+       this->Data = _mm_div_ps(this->Data , v.Data);
+       return *this;
+}
+
+GLM_FUNC_QUALIFIER fvec4SIMD& fvec4SIMD::operator++()
+{
+       this->Data = _mm_add_ps(this->Data , glm::detail::one);
+       return *this;
+}
+
+GLM_FUNC_QUALIFIER fvec4SIMD& fvec4SIMD::operator--()
+{
+       this->Data = _mm_sub_ps(this->Data, glm::detail::one);
+       return *this;
+}
+
+//////////////////////////////////////
+// Swizzle operators
+
+template <comp X, comp Y, comp Z, comp W>
+GLM_FUNC_QUALIFIER fvec4SIMD fvec4SIMD::swizzle() const
+{
+       __m128 Data = _mm_shuffle_ps(
+               this->Data, this->Data, 
+               shuffle_mask<(W << 6) | (Z << 4) | (Y << 2) | (X << 0)>::value);
+       return fvec4SIMD(Data);
+}
+
+template <comp X, comp Y, comp Z, comp W>
+GLM_FUNC_QUALIFIER fvec4SIMD& fvec4SIMD::swizzle()
+{
+       this->Data = _mm_shuffle_ps(
+               this->Data, this->Data, 
+               shuffle_mask<(W << 6) | (Z << 4) | (Y << 2) | (X << 0)>::value);
+       return *this;
+}
+
+// operator+
+GLM_FUNC_QUALIFIER fvec4SIMD operator+ (fvec4SIMD const & v, float s)
+{
+       return fvec4SIMD(_mm_add_ps(v.Data, _mm_set1_ps(s)));
+}
+
+GLM_FUNC_QUALIFIER fvec4SIMD operator+ (float s, fvec4SIMD const & v)
+{
+       return fvec4SIMD(_mm_add_ps(_mm_set1_ps(s), v.Data));
+}
+
+GLM_FUNC_QUALIFIER fvec4SIMD operator+ (fvec4SIMD const & v1, fvec4SIMD const & v2)
+{
+       return fvec4SIMD(_mm_add_ps(v1.Data, v2.Data));
+}
+
+//operator-
+GLM_FUNC_QUALIFIER fvec4SIMD operator- (fvec4SIMD const & v, float s)
+{
+       return fvec4SIMD(_mm_sub_ps(v.Data, _mm_set1_ps(s)));
+}
+
+GLM_FUNC_QUALIFIER fvec4SIMD operator- (float s, fvec4SIMD const & v)
+{
+       return fvec4SIMD(_mm_sub_ps(_mm_set1_ps(s), v.Data));
+}
+
+GLM_FUNC_QUALIFIER fvec4SIMD operator- (fvec4SIMD const & v1, fvec4SIMD const & v2)
+{
+       return fvec4SIMD(_mm_sub_ps(v1.Data, v2.Data));
+}
+
+//operator*
+GLM_FUNC_QUALIFIER fvec4SIMD operator* (fvec4SIMD const & v, float s)
+{
+       __m128 par0 = v.Data;
+       __m128 par1 = _mm_set1_ps(s);
+       return fvec4SIMD(_mm_mul_ps(par0, par1));
+}
+
+GLM_FUNC_QUALIFIER fvec4SIMD operator* (float s, fvec4SIMD const & v)
+{
+       __m128 par0 = _mm_set1_ps(s);
+       __m128 par1 = v.Data;
+       return fvec4SIMD(_mm_mul_ps(par0, par1));
+}
+
+GLM_FUNC_QUALIFIER fvec4SIMD operator* (fvec4SIMD const & v1, fvec4SIMD const & v2)
+{
+       return fvec4SIMD(_mm_mul_ps(v1.Data, v2.Data));
+}
+
+//operator/
+GLM_FUNC_QUALIFIER fvec4SIMD operator/ (fvec4SIMD const & v, float s)
+{
+       __m128 par0 = v.Data;
+       __m128 par1 = _mm_set1_ps(s);
+       return fvec4SIMD(_mm_div_ps(par0, par1));
+}
+
+GLM_FUNC_QUALIFIER fvec4SIMD operator/ (float s, fvec4SIMD const & v)
+{
+       __m128 par0 = _mm_set1_ps(s);
+       __m128 par1 = v.Data;
+       return fvec4SIMD(_mm_div_ps(par0, par1));
+}
+
+GLM_FUNC_QUALIFIER fvec4SIMD operator/ (fvec4SIMD const & v1, fvec4SIMD const & v2)
+{
+       return fvec4SIMD(_mm_div_ps(v1.Data, v2.Data));
+}
+
+// Unary constant operators
+GLM_FUNC_QUALIFIER fvec4SIMD operator- (fvec4SIMD const & v)
+{
+       return fvec4SIMD(_mm_sub_ps(_mm_setzero_ps(), v.Data));
+}
+
+GLM_FUNC_QUALIFIER fvec4SIMD operator++ (fvec4SIMD const & v, int)
+{
+       return fvec4SIMD(_mm_add_ps(v.Data, glm::detail::one));
+}
+
+GLM_FUNC_QUALIFIER fvec4SIMD operator-- (fvec4SIMD const & v, int)
+{
+       return fvec4SIMD(_mm_sub_ps(v.Data, glm::detail::one));
+}
+
+}//namespace detail
+
+GLM_FUNC_QUALIFIER vec4 vec4_cast
+(
+       detail::fvec4SIMD const & x
+)
+{
+       GLM_ALIGN(16) vec4 Result;
+       _mm_store_ps(&Result[0], x.Data);
+       return Result;
+}
+
+// Other possible implementation
+//float abs(float a)
+//{
+//  return max(-a, a);
+//}
+GLM_FUNC_QUALIFIER detail::fvec4SIMD abs
+(
+       detail::fvec4SIMD const & x
+)
+{
+       return detail::sse_abs_ps(x.Data);
+}
+
+GLM_FUNC_QUALIFIER detail::fvec4SIMD sign
+(
+       detail::fvec4SIMD const & x
+)
+{
+       return detail::sse_sgn_ps(x.Data);
+}
+
+GLM_FUNC_QUALIFIER detail::fvec4SIMD floor
+(
+       detail::fvec4SIMD const & x
+)
+{
+       return detail::sse_flr_ps(x.Data);
+}
+
+GLM_FUNC_QUALIFIER detail::fvec4SIMD trunc
+(
+       detail::fvec4SIMD const & x
+)
+{
+    //return x < 0 ? -floor(-x) : floor(x);
+
+       __m128 Flr0 = detail::sse_flr_ps(_mm_sub_ps(_mm_setzero_ps(), x.Data));
+       __m128 Sub0 = _mm_sub_ps(Flr0, x.Data);
+       __m128 Flr1 = detail::sse_flr_ps(x.Data);
+
+       __m128 Cmp0 = _mm_cmplt_ps(x.Data, glm::detail::zero);
+       __m128 Cmp1 = _mm_cmpnlt_ps(x.Data, glm::detail::zero);
+
+       __m128 And0 = _mm_and_ps(Sub0, Cmp0);
+       __m128 And1 = _mm_and_ps(Flr1, Cmp1);
+
+       return _mm_or_ps(And0, And1);
+}
+
+GLM_FUNC_QUALIFIER detail::fvec4SIMD round
+(
+       detail::fvec4SIMD const & x
+)
+{
+       return detail::sse_rnd_ps(x.Data);
+}
+
+//GLM_FUNC_QUALIFIER detail::fvec4SIMD roundEven
+//(
+//     detail::fvec4SIMD const & x
+//)
+//{
+
+//}
+
+GLM_FUNC_QUALIFIER detail::fvec4SIMD ceil
+(
+       detail::fvec4SIMD const & x
+)
+{
+       return detail::sse_ceil_ps(x.Data);
+}
+
+GLM_FUNC_QUALIFIER detail::fvec4SIMD fract
+(
+       detail::fvec4SIMD const & x
+)
+{
+       return detail::sse_frc_ps(x.Data);
+}
+
+GLM_FUNC_QUALIFIER detail::fvec4SIMD mod
+(
+       detail::fvec4SIMD const & x, 
+       detail::fvec4SIMD const & y
+)
+{
+       return detail::sse_mod_ps(x.Data, y.Data);
+}
+
+GLM_FUNC_QUALIFIER detail::fvec4SIMD mod
+(
+       detail::fvec4SIMD const & x, 
+       float const & y
+)
+{
+       return detail::sse_mod_ps(x.Data, _mm_set1_ps(y));
+}
+
+//GLM_FUNC_QUALIFIER detail::fvec4SIMD modf
+//(
+//     detail::fvec4SIMD const & x, 
+//     detail::fvec4SIMD & i
+//)
+//{
+
+//}
+
+GLM_FUNC_QUALIFIER detail::fvec4SIMD min
+(
+       detail::fvec4SIMD const & x, 
+       detail::fvec4SIMD const & y
+)
+{
+       return _mm_min_ps(x.Data, y.Data);
+}
+
+GLM_FUNC_QUALIFIER detail::fvec4SIMD min
+(
+       detail::fvec4SIMD const & x, 
+       float const & y
+)
+{
+       return _mm_min_ps(x.Data, _mm_set1_ps(y));
+}
+
+GLM_FUNC_QUALIFIER detail::fvec4SIMD max
+(
+       detail::fvec4SIMD const & x, 
+       detail::fvec4SIMD const & y
+)
+{
+       return _mm_max_ps(x.Data, y.Data);
+}
+
+GLM_FUNC_QUALIFIER detail::fvec4SIMD max
+(
+       detail::fvec4SIMD const & x, 
+       float const & y
+)
+{
+       return _mm_max_ps(x.Data, _mm_set1_ps(y));
+}
+
+GLM_FUNC_QUALIFIER detail::fvec4SIMD clamp
+(
+       detail::fvec4SIMD const & x, 
+       detail::fvec4SIMD const & minVal, 
+       detail::fvec4SIMD const & maxVal
+)
+{
+       return detail::sse_clp_ps(x.Data, minVal.Data, maxVal.Data);
+}
+
+GLM_FUNC_QUALIFIER detail::fvec4SIMD clamp
+(
+       detail::fvec4SIMD const & x, 
+       float const & minVal, 
+       float const & maxVal
+) 
+{
+       return detail::sse_clp_ps(x.Data, _mm_set1_ps(minVal), _mm_set1_ps(maxVal));
+}
+
+GLM_FUNC_QUALIFIER detail::fvec4SIMD mix
+(
+       detail::fvec4SIMD const & x, 
+       detail::fvec4SIMD const & y, 
+       detail::fvec4SIMD const & a
+)
+{
+       __m128 Sub0 = _mm_sub_ps(y.Data, x.Data);
+       __m128 Mul0 = _mm_mul_ps(a.Data, Sub0);
+       return _mm_add_ps(x.Data, Mul0);
+}
+
+GLM_FUNC_QUALIFIER detail::fvec4SIMD step
+(
+       detail::fvec4SIMD const & edge, 
+       detail::fvec4SIMD const & x
+)
+{
+       __m128 cmp0 = _mm_cmpngt_ps(x.Data, edge.Data);
+       return _mm_max_ps(_mm_min_ps(cmp0, _mm_setzero_ps()), detail::one);
+}
+
+GLM_FUNC_QUALIFIER detail::fvec4SIMD step
+(
+       float const & edge, 
+       detail::fvec4SIMD const & x
+)
+{
+       __m128 cmp0 = _mm_cmpngt_ps(x.Data, _mm_set1_ps(edge));
+       return _mm_max_ps(_mm_min_ps(cmp0, _mm_setzero_ps()), detail::one);
+}
+
+GLM_FUNC_QUALIFIER detail::fvec4SIMD smoothstep
+(
+       detail::fvec4SIMD const & edge0, 
+       detail::fvec4SIMD const & edge1, 
+       detail::fvec4SIMD const & x
+)
+{
+       return detail::sse_ssp_ps(edge0.Data, edge1.Data, x.Data);
+}
+
+GLM_FUNC_QUALIFIER detail::fvec4SIMD smoothstep
+(
+       float const & edge0, 
+       float const & edge1, 
+       detail::fvec4SIMD const & x
+)
+{
+       return detail::sse_ssp_ps(_mm_set1_ps(edge0), _mm_set1_ps(edge1), x.Data);
+}
+
+//GLM_FUNC_QUALIFIER bvec4 isnan(detail::fvec4SIMD const & x)
+//{
+
+//}
+
+//GLM_FUNC_QUALIFIER bvec4 isinf(detail::fvec4SIMD const & x)
+//{
+
+//}
+
+//GLM_FUNC_QUALIFIER detail::ivec4SIMD floatBitsToInt
+//(
+//     detail::fvec4SIMD const & value
+//)
+//{
+
+//}
+
+//GLM_FUNC_QUALIFIER detail::fvec4SIMD intBitsToFloat
+//(
+//     detail::ivec4SIMD const & value
+//)
+//{
+
+//}
+
+GLM_FUNC_QUALIFIER detail::fvec4SIMD fma
+(
+       detail::fvec4SIMD const & a, 
+       detail::fvec4SIMD const & b, 
+       detail::fvec4SIMD const & c
+)
+{
+       return _mm_add_ps(_mm_mul_ps(a.Data, b.Data), c.Data);
+}
+
+GLM_FUNC_QUALIFIER float length
+(
+       detail::fvec4SIMD const & x
+)
+{
+       detail::fvec4SIMD dot0 = detail::sse_dot_ss(x.Data, x.Data);
+       detail::fvec4SIMD sqt0 = sqrt(dot0);
+       float Result = 0;
+       _mm_store_ss(&Result, sqt0.Data);
+       return Result;
+}
+
+GLM_FUNC_QUALIFIER float fastLength
+(
+       detail::fvec4SIMD const & x
+)
+{
+       detail::fvec4SIMD dot0 = detail::sse_dot_ss(x.Data, x.Data);
+       detail::fvec4SIMD sqt0 = fastSqrt(dot0);
+       float Result = 0;
+       _mm_store_ss(&Result, sqt0.Data);
+       return Result;
+}
+
+GLM_FUNC_QUALIFIER float niceLength
+(
+       detail::fvec4SIMD const & x
+)
+{
+       detail::fvec4SIMD dot0 = detail::sse_dot_ss(x.Data, x.Data);
+       detail::fvec4SIMD sqt0 = niceSqrt(dot0);
+       float Result = 0;
+       _mm_store_ss(&Result, sqt0.Data);
+       return Result;
+}
+
+GLM_FUNC_QUALIFIER detail::fvec4SIMD length4
+(
+       detail::fvec4SIMD const & x
+)
+{
+       return sqrt(dot4(x, x));
+}
+
+GLM_FUNC_QUALIFIER detail::fvec4SIMD fastLength4
+(
+       detail::fvec4SIMD const & x
+)
+{
+       return fastSqrt(dot4(x, x));
+}
+
+GLM_FUNC_QUALIFIER detail::fvec4SIMD niceLength4
+(
+       detail::fvec4SIMD const & x
+)
+{
+       return niceSqrt(dot4(x, x));
+}
+
+GLM_FUNC_QUALIFIER float distance
+(
+       detail::fvec4SIMD const & p0,
+       detail::fvec4SIMD const & p1
+)
+{
+       float Result = 0;
+       _mm_store_ss(&Result, detail::sse_dst_ps(p0.Data, p1.Data));
+       return Result;
+}
+
+GLM_FUNC_QUALIFIER detail::fvec4SIMD distance4
+(
+       detail::fvec4SIMD const & p0,
+       detail::fvec4SIMD const & p1
+)
+{
+       return detail::sse_dst_ps(p0.Data, p1.Data);
+}
+
+GLM_FUNC_QUALIFIER float dot
+(
+       detail::fvec4SIMD const & x,
+       detail::fvec4SIMD const & y
+)
+{
+       float Result = 0;
+       _mm_store_ss(&Result, detail::sse_dot_ss(x.Data, y.Data));
+       return Result;
+}
+
+GLM_FUNC_QUALIFIER detail::fvec4SIMD dot4
+(
+       detail::fvec4SIMD const & x,
+       detail::fvec4SIMD const & y
+)
+{
+       return detail::sse_dot_ps(x.Data, y.Data);
+}
+
+GLM_FUNC_QUALIFIER detail::fvec4SIMD cross
+(
+       detail::fvec4SIMD const & x,
+       detail::fvec4SIMD const & y
+)
+{
+       return detail::sse_xpd_ps(x.Data, y.Data);
+}
+
+GLM_FUNC_QUALIFIER detail::fvec4SIMD normalize
+(
+       detail::fvec4SIMD const & x
+)
+{
+       __m128 dot0 = detail::sse_dot_ps(x.Data, x.Data);
+       __m128 isr0 = inversesqrt(detail::fvec4SIMD(dot0)).Data;
+       __m128 mul0 = _mm_mul_ps(x.Data, isr0);
+       return mul0;
+}
+
+GLM_FUNC_QUALIFIER detail::fvec4SIMD fastNormalize
+(
+       detail::fvec4SIMD const & x
+)
+{
+       __m128 dot0 = detail::sse_dot_ps(x.Data, x.Data);
+       __m128 isr0 = fastInversesqrt(dot0).Data;
+       __m128 mul0 = _mm_mul_ps(x.Data, isr0);
+       return mul0;
+}
+
+GLM_FUNC_QUALIFIER detail::fvec4SIMD faceforward
+(
+       detail::fvec4SIMD const & N,
+       detail::fvec4SIMD const & I,
+       detail::fvec4SIMD const & Nref
+)
+{
+       return detail::sse_ffd_ps(N.Data, I.Data, Nref.Data);
+}
+
+GLM_FUNC_QUALIFIER detail::fvec4SIMD reflect
+(
+       detail::fvec4SIMD const & I,
+       detail::fvec4SIMD const & N
+)
+{
+       return detail::sse_rfe_ps(I.Data, N.Data);
+}
+
+GLM_FUNC_QUALIFIER detail::fvec4SIMD refract
+(
+       detail::fvec4SIMD const & I,
+       detail::fvec4SIMD const & N,
+       float const & eta
+)
+{
+       return detail::sse_rfa_ps(I.Data, N.Data, _mm_set1_ps(eta));
+}
+
+GLM_FUNC_QUALIFIER detail::fvec4SIMD sqrt(detail::fvec4SIMD const & x)
+{
+       return _mm_mul_ps(inversesqrt(x).Data, x.Data);
+}
+
+GLM_FUNC_QUALIFIER detail::fvec4SIMD niceSqrt(detail::fvec4SIMD const & x)
+{
+       return _mm_sqrt_ps(x.Data);
+}
+
+GLM_FUNC_QUALIFIER detail::fvec4SIMD fastSqrt(detail::fvec4SIMD const & x)
+{
+       return _mm_mul_ps(fastInversesqrt(x.Data).Data, x.Data);
+}
+
+// SSE scalar reciprocal sqrt using rsqrt op, plus one Newton-Rhaphson iteration
+// By Elan Ruskin, http://assemblyrequired.crashworks.org/
+GLM_FUNC_QUALIFIER detail::fvec4SIMD inversesqrt(detail::fvec4SIMD const & x)
+{
+       GLM_ALIGN(4) static const __m128 three = {3, 3, 3, 3}; // aligned consts for fast load
+       GLM_ALIGN(4) static const __m128 half = {0.5,0.5,0.5,0.5};
+
+       __m128 recip = _mm_rsqrt_ps(x.Data);  // "estimate" opcode
+       __m128 halfrecip = _mm_mul_ps(half, recip);
+       __m128 threeminus_xrr = _mm_sub_ps(three, _mm_mul_ps(x.Data, _mm_mul_ps(recip, recip)));
+       return _mm_mul_ps(halfrecip, threeminus_xrr);
+}
+
+GLM_FUNC_QUALIFIER detail::fvec4SIMD fastInversesqrt(detail::fvec4SIMD const & x)
+{
+       return _mm_rsqrt_ps(x.Data);
+}
+
+}//namespace glm
diff --git a/include/glm/gtx/spline.hpp b/include/glm/gtx/spline.hpp
new file mode 100644 (file)
index 0000000..09fcf4e
--- /dev/null
@@ -0,0 +1,90 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtx_spline
+/// @file glm/gtx/spline.hpp
+/// @date 2007-01-25 / 2011-06-07
+/// @author Christophe Riccio
+///
+/// @see core (dependence)
+///
+/// @defgroup gtx_spline GLM_GTX_spline
+/// @ingroup gtx
+/// 
+/// @brief Spline functions
+/// 
+/// <glm/gtx/spline.hpp> need to be included to use these functionalities.
+///////////////////////////////////////////////////////////////////////////////////
+
+#pragma once
+
+// Dependency:
+#include "../glm.hpp"
+#include "../gtx/optimum_pow.hpp"
+
+#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
+#      pragma message("GLM: GLM_GTX_spline extension included")
+#endif
+
+namespace glm
+{
+       /// @addtogroup gtx_spline
+       /// @{
+
+       /// Return a point from a catmull rom curve.
+       /// @see gtx_spline extension.
+       template <typename genType> 
+       GLM_FUNC_DECL genType catmullRom(
+               genType const & v1, 
+               genType const & v2, 
+               genType const & v3, 
+               genType const & v4, 
+               typename genType::value_type const & s);
+               
+       /// Return a point from a hermite curve.
+       /// @see gtx_spline extension.
+       template <typename genType> 
+       GLM_FUNC_DECL genType hermite(
+               genType const & v1, 
+               genType const & t1, 
+               genType const & v2, 
+               genType const & t2, 
+               typename genType::value_type const & s);
+               
+       /// Return a point from a cubic curve. 
+       /// @see gtx_spline extension.
+       template <typename genType> 
+       GLM_FUNC_DECL genType cubic(
+               genType const & v1, 
+               genType const & v2, 
+               genType const & v3, 
+               genType const & v4, 
+               typename genType::value_type const & s);
+
+       /// @}
+}//namespace glm
+
+#include "spline.inl"
diff --git a/include/glm/gtx/spline.inl b/include/glm/gtx/spline.inl
new file mode 100644 (file)
index 0000000..befdc3c
--- /dev/null
@@ -0,0 +1,92 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtx_spline
+/// @file glm/gtx/spline.inl
+/// @date 2007-01-25 / 2011-06-07
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////
+
+namespace glm
+{
+       template <typename genType>
+       GLM_FUNC_QUALIFIER genType catmullRom
+       (
+               genType const & v1, 
+               genType const & v2, 
+               genType const & v3, 
+               genType const & v4, 
+               typename genType::value_type const & s
+       )
+       {
+               typename genType::value_type s1 = s;
+               typename genType::value_type s2 = pow2(s);
+               typename genType::value_type s3 = pow3(s);
+
+               typename genType::value_type f1 = -s3 + typename genType::value_type(2) * s2 - s;
+               typename genType::value_type f2 = typename genType::value_type(3) * s3 - typename genType::value_type(5) * s2 + typename genType::value_type(2);
+               typename genType::value_type f3 = typename genType::value_type(-3) * s3 + typename genType::value_type(4) * s2 + s;
+               typename genType::value_type f4 = s3 - s2;
+
+               return (f1 * v1 + f2 * v2 + f3 * v3 + f4 * v4) / typename genType::value_type(2);
+
+       }
+
+       template <typename genType>
+       GLM_FUNC_QUALIFIER genType hermite
+       (
+               genType const & v1, 
+               genType const & t1, 
+               genType const & v2, 
+               genType const & t2, 
+               typename genType::value_type const & s
+       )
+       {
+               typename genType::value_type s1 = s;
+               typename genType::value_type s2 = pow2(s);
+               typename genType::value_type s3 = pow3(s);
+
+               typename genType::value_type f1 = typename genType::value_type(2) * s3 - typename genType::value_type(3) * s2 + typename genType::value_type(1);
+               typename genType::value_type f2 = typename genType::value_type(-2) * s3 + typename genType::value_type(3) * s2;
+               typename genType::value_type f3 = s3 - typename genType::value_type(2) * s2 + s;
+               typename genType::value_type f4 = s3 - s2;
+
+               return f1 * v1 + f2 * v2 + f3 * t1 + f4 * t2;
+       }
+
+       template <typename genType>
+       GLM_FUNC_QUALIFIER genType cubic
+       (
+               genType const & v1, 
+               genType const & v2, 
+               genType const & v3, 
+               genType const & v4, 
+               typename genType::value_type const & s
+       )
+       {
+               return ((v1 * s + v2) * s + v3) * s + v4;
+       }
+}//namespace glm
diff --git a/include/glm/gtx/std_based_type.hpp b/include/glm/gtx/std_based_type.hpp
new file mode 100644 (file)
index 0000000..f4bc193
--- /dev/null
@@ -0,0 +1,92 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtx_std_based_type
+/// @file glm/gtx/std_based_type.hpp
+/// @date 2008-06-08 / 2011-06-07
+/// @author Christophe Riccio
+///
+/// @see core (dependence)
+/// @see gtx_extented_min_max (dependence)
+///
+/// @defgroup gtx_std_based_type GLM_GTX_std_based_type
+/// @ingroup gtx
+/// 
+/// @brief Adds vector types based on STL value types.
+/// <glm/gtx/std_based_type.hpp> need to be included to use these functionalities.
+///////////////////////////////////////////////////////////////////////////////////
+
+#pragma once
+
+// Dependency:
+#include "../glm.hpp"
+#include <cstdlib>
+
+#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
+#      pragma message("GLM: GLM_GTX_std_based_type extension included")
+#endif
+
+namespace glm
+{
+       /// @addtogroup gtx_std_based_type
+       /// @{
+
+       /// Vector type based of one std::size_t component.
+       /// @see GLM_GTX_std_based_type
+       typedef tvec1<std::size_t, defaultp>            size1;
+
+       /// Vector type based of two std::size_t components.
+       /// @see GLM_GTX_std_based_type
+       typedef tvec2<std::size_t, defaultp>            size2;
+
+       /// Vector type based of three std::size_t components.
+       /// @see GLM_GTX_std_based_type
+       typedef tvec3<std::size_t, defaultp>            size3;
+
+       /// Vector type based of four std::size_t components.
+       /// @see GLM_GTX_std_based_type
+       typedef tvec4<std::size_t, defaultp>            size4;
+
+       /// Vector type based of one std::size_t component.
+       /// @see GLM_GTX_std_based_type
+       typedef tvec1<std::size_t, defaultp>            size1_t;
+
+       /// Vector type based of two std::size_t components.
+       /// @see GLM_GTX_std_based_type
+       typedef tvec2<std::size_t, defaultp>            size2_t;
+
+       /// Vector type based of three std::size_t components.
+       /// @see GLM_GTX_std_based_type
+       typedef tvec3<std::size_t, defaultp>            size3_t;
+
+       /// Vector type based of four std::size_t components.
+       /// @see GLM_GTX_std_based_type
+       typedef tvec4<std::size_t, defaultp>            size4_t;
+
+       /// @}
+}//namespace glm
+
+#include "std_based_type.inl"
diff --git a/include/glm/gtx/std_based_type.inl b/include/glm/gtx/std_based_type.inl
new file mode 100644 (file)
index 0000000..4e3cf1c
--- /dev/null
@@ -0,0 +1,36 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtx_std_based_type
+/// @file glm/gtx/std_based_type.inl
+/// @date 2008-06-08 / 2011-06-07
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////
+
+namespace glm
+{
+
+}
diff --git a/include/glm/gtx/string_cast.hpp b/include/glm/gtx/string_cast.hpp
new file mode 100644 (file)
index 0000000..e04320c
--- /dev/null
@@ -0,0 +1,74 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtx_string_cast
+/// @file glm/gtx/string_cast.hpp
+/// @date 2008-04-26 / 2014-05-10
+/// @author Christophe Riccio
+///
+/// @see core (dependence)
+/// @see gtc_half_float (dependence)
+/// @see gtx_integer (dependence)
+/// @see gtx_quaternion (dependence)
+///
+/// @defgroup gtx_string_cast GLM_GTX_string_cast
+/// @ingroup gtx
+/// 
+/// @brief Setup strings for GLM type values
+/// 
+/// <glm/gtx/string_cast.hpp> need to be included to use these functionalities.
+/// This extension is not supported with CUDA
+///////////////////////////////////////////////////////////////////////////////////
+
+#pragma once
+
+// Dependency:
+#include "../glm.hpp"
+#include "../gtc/type_precision.hpp"
+#include <string>
+
+#if(GLM_COMPILER & GLM_COMPILER_CUDA)
+#      error "GLM_GTX_string_cast is not supported on CUDA compiler"
+#endif
+
+#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
+#      pragma message("GLM: GLM_GTX_string_cast extension included")
+#endif
+
+namespace glm
+{
+       /// @addtogroup gtx_string_cast
+       /// @{
+
+       /// Create a string from a GLM vector or matrix typed variable.
+       /// @see gtx_string_cast extension.
+       template <template <typename, precision> class matType, typename T, precision P>
+       GLM_FUNC_DECL std::string to_string(matType<T, P> const & x);
+
+       /// @}
+}//namespace glm
+
+#include "string_cast.inl"
diff --git a/include/glm/gtx/string_cast.inl b/include/glm/gtx/string_cast.inl
new file mode 100644 (file)
index 0000000..fb70ebc
--- /dev/null
@@ -0,0 +1,455 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtx_string_cast
+/// @file glm/gtx/string_cast.inl
+/// @date 2008-04-26 / 2014-05-10
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////
+
+#include <cstdarg>
+#include <cstdio>
+
+namespace glm{
+namespace detail
+{
+       GLM_FUNC_QUALIFIER std::string format(const char* msg, ...)
+       {
+               std::size_t const STRING_BUFFER(4096);
+               char text[STRING_BUFFER];
+               va_list list;
+
+               if(msg == 0)
+                       return std::string();
+
+               va_start(list, msg);
+#              if(GLM_COMPILER & GLM_COMPILER_VC)
+                       vsprintf_s(text, STRING_BUFFER, msg, list);
+#              else//
+                       vsprintf(text, msg, list);
+#              endif//
+               va_end(list);
+
+               return std::string(text);
+       }
+
+       static const char* LabelTrue = "true";
+       static const char* LabelFalse = "false";
+
+       template <typename T, bool isFloat = false>
+       struct literal
+       {
+               GLM_FUNC_QUALIFIER static char const * value() {return "%d";};
+       };
+
+       template <typename T>
+       struct literal<T, true>
+       {
+               GLM_FUNC_QUALIFIER static char const * value() {return "%f";};
+       };
+
+#      if GLM_MODEL == GLM_MODEL_32 && GLM_COMPILER && GLM_COMPILER_VC
+       template <>
+       struct literal<uint64_t, false>
+       {
+               GLM_FUNC_QUALIFIER static char const * value() {return "%lld";};
+       };
+
+       template <>
+       struct literal<int64_t, false>
+       {
+               GLM_FUNC_QUALIFIER static char const * value() {return "%lld";};
+       };
+#      endif//GLM_MODEL == GLM_MODEL_32 && GLM_COMPILER && GLM_COMPILER_VC
+
+       template <typename T>
+       struct prefix{};
+
+       template <>
+       struct prefix<float>
+       {
+               GLM_FUNC_QUALIFIER static char const * value() {return "";};
+       };
+
+       template <>
+       struct prefix<double>
+       {
+               GLM_FUNC_QUALIFIER static char const * value() {return "d";};
+       };
+
+       template <>
+       struct prefix<bool>
+       {
+               GLM_FUNC_QUALIFIER static char const * value() {return "b";};
+       };
+
+       template <>
+       struct prefix<uint8_t>
+       {
+               GLM_FUNC_QUALIFIER static char const * value() {return "u8";};
+       };
+
+       template <>
+       struct prefix<int8_t>
+       {
+               GLM_FUNC_QUALIFIER static char const * value() {return "i8";};
+       };
+
+       template <>
+       struct prefix<uint16_t>
+       {
+               GLM_FUNC_QUALIFIER static char const * value() {return "u16";};
+       };
+
+       template <>
+       struct prefix<int16_t>
+       {
+               GLM_FUNC_QUALIFIER static char const * value() {return "i16";};
+       };
+
+       template <>
+       struct prefix<uint32_t>
+       {
+               GLM_FUNC_QUALIFIER static char const * value() {return "u";};
+       };
+
+       template <>
+       struct prefix<int32_t>
+       {
+               GLM_FUNC_QUALIFIER static char const * value() {return "i";};
+       };
+
+       template <>
+       struct prefix<uint64_t>
+       {
+               GLM_FUNC_QUALIFIER static char const * value() {return "u64";};
+       };
+
+       template <>
+       struct prefix<int64_t>
+       {
+               GLM_FUNC_QUALIFIER static char const * value() {return "i64";};
+       };
+
+       template <template <typename, precision> class matType, typename T, precision P>
+       struct compute_to_string
+       {};
+
+       template <precision P>
+       struct compute_to_string<tvec1, bool, P>
+       {
+               GLM_FUNC_QUALIFIER static std::string call(tvec1<bool, P> const & x)
+               {
+                       return detail::format("bvec1(%s)",
+                               x[0] ? detail::LabelTrue : detail::LabelFalse);
+               }
+       };
+
+       template <precision P>
+       struct compute_to_string<tvec2, bool, P>
+       {
+               GLM_FUNC_QUALIFIER static std::string call(tvec2<bool, P> const & x)
+               {
+                       return detail::format("bvec2(%s, %s)",
+                               x[0] ? detail::LabelTrue : detail::LabelFalse,
+                               x[1] ? detail::LabelTrue : detail::LabelFalse);
+               }
+       };
+
+       template <precision P>
+       struct compute_to_string<tvec3, bool, P>
+       {
+               GLM_FUNC_QUALIFIER static std::string call(tvec3<bool, P> const & x)
+               {
+                       return detail::format("bvec3(%s, %s, %s)",
+                               x[0] ? detail::LabelTrue : detail::LabelFalse,
+                               x[1] ? detail::LabelTrue : detail::LabelFalse,
+                               x[2] ? detail::LabelTrue : detail::LabelFalse);
+               }
+       };
+
+       template <precision P>
+       struct compute_to_string<tvec4, bool, P>
+       {
+               GLM_FUNC_QUALIFIER static std::string call(tvec4<bool, P> const & x)
+               {
+                       return detail::format("bvec4(%s, %s, %s, %s)",
+                               x[0] ? detail::LabelTrue : detail::LabelFalse,
+                               x[1] ? detail::LabelTrue : detail::LabelFalse,
+                               x[2] ? detail::LabelTrue : detail::LabelFalse,
+                               x[3] ? detail::LabelTrue : detail::LabelFalse);
+               }
+       };
+
+       template <typename T, precision P>
+       struct compute_to_string<tvec1, T, P>
+       {
+               GLM_FUNC_QUALIFIER static std::string call(tvec1<T, P> const & x)
+               {
+                       char const * PrefixStr = prefix<T>::value();
+                       char const * LiteralStr = literal<T, std::numeric_limits<T>::is_iec559>::value();
+                       std::string FormatStr(detail::format("%svec1(%s)",
+                               PrefixStr,
+                               LiteralStr));
+
+                       return detail::format(FormatStr.c_str(), x[0]);
+               }
+       };
+
+       template <typename T, precision P>
+       struct compute_to_string<tvec2, T, P>
+       {
+               GLM_FUNC_QUALIFIER static std::string call(tvec2<T, P> const & x)
+               {
+                       char const * PrefixStr = prefix<T>::value();
+                       char const * LiteralStr = literal<T, std::numeric_limits<T>::is_iec559>::value();
+                       std::string FormatStr(detail::format("%svec2(%s, %s)",
+                               PrefixStr,
+                               LiteralStr, LiteralStr));
+
+                       return detail::format(FormatStr.c_str(), x[0], x[1]);
+               }
+       };
+
+       template <typename T, precision P>
+       struct compute_to_string<tvec3, T, P>
+       {
+               GLM_FUNC_QUALIFIER static std::string call(tvec3<T, P> const & x)
+               {
+                       char const * PrefixStr = prefix<T>::value();
+                       char const * LiteralStr = literal<T, std::numeric_limits<T>::is_iec559>::value();
+                       std::string FormatStr(detail::format("%svec3(%s, %s, %s)",
+                               PrefixStr,
+                               LiteralStr, LiteralStr, LiteralStr));
+
+                       return detail::format(FormatStr.c_str(), x[0], x[1], x[2]);
+               }
+       };
+
+       template <typename T, precision P>
+       struct compute_to_string<tvec4, T, P>
+       {
+               GLM_FUNC_QUALIFIER static std::string call(tvec4<T, P> const & x)
+               {
+                       char const * PrefixStr = prefix<T>::value();
+                       char const * LiteralStr = literal<T, std::numeric_limits<T>::is_iec559>::value();
+                       std::string FormatStr(detail::format("%svec4(%s, %s, %s, %s)",
+                               PrefixStr,
+                               LiteralStr, LiteralStr, LiteralStr, LiteralStr));
+
+                       return detail::format(FormatStr.c_str(), x[0], x[1], x[2], x[3]);
+               }
+       };
+
+
+       template <typename T, precision P>
+       struct compute_to_string<tmat2x2, T, P>
+       {
+               GLM_FUNC_QUALIFIER static std::string call(tmat2x2<T, P> const & x)
+               {
+                       char const * PrefixStr = prefix<T>::value();
+                       char const * LiteralStr = literal<T, std::numeric_limits<T>::is_iec559>::value();
+                       std::string FormatStr(detail::format("%smat2x2((%s, %s), (%s, %s))",
+                               PrefixStr,
+                               LiteralStr, LiteralStr,
+                               LiteralStr, LiteralStr));
+
+                       return detail::format(FormatStr.c_str(),
+                               x[0][0], x[0][1],
+                               x[1][0], x[1][1]);
+               }
+       };
+
+       template <typename T, precision P>
+       struct compute_to_string<tmat2x3, T, P>
+       {
+               GLM_FUNC_QUALIFIER static std::string call(tmat2x3<T, P> const & x)
+               {
+                       char const * PrefixStr = prefix<T>::value();
+                       char const * LiteralStr = literal<T, std::numeric_limits<T>::is_iec559>::value();
+                       std::string FormatStr(detail::format("%smat2x3((%s, %s, %s), (%s, %s, %s))",
+                               PrefixStr,
+                               LiteralStr, LiteralStr, LiteralStr,
+                               LiteralStr, LiteralStr, LiteralStr));
+
+                       return detail::format(FormatStr.c_str(),
+                               x[0][0], x[0][1], x[0][2],
+                               x[1][0], x[1][1], x[1][2]);
+               }
+       };
+
+       template <typename T, precision P>
+       struct compute_to_string<tmat2x4, T, P>
+       {
+               GLM_FUNC_QUALIFIER static std::string call(tmat2x4<T, P> const & x)
+               {
+                       char const * PrefixStr = prefix<T>::value();
+                       char const * LiteralStr = literal<T, std::numeric_limits<T>::is_iec559>::value();
+                       std::string FormatStr(detail::format("%smat2x4((%s, %s, %s, %s), (%s, %s, %s, %s))",
+                               PrefixStr,
+                               LiteralStr, LiteralStr, LiteralStr, LiteralStr,
+                               LiteralStr, LiteralStr, LiteralStr, LiteralStr));
+
+                       return detail::format(FormatStr.c_str(),
+                               x[0][0], x[0][1], x[0][2], x[0][3],
+                               x[1][0], x[1][1], x[1][2], x[1][3]);
+               }
+       };
+
+       template <typename T, precision P>
+       struct compute_to_string<tmat3x2, T, P>
+       {
+               GLM_FUNC_QUALIFIER static std::string call(tmat3x2<T, P> const & x)
+               {
+                       char const * PrefixStr = prefix<T>::value();
+                       char const * LiteralStr = literal<T, std::numeric_limits<T>::is_iec559>::value();
+                       std::string FormatStr(detail::format("%smat3x2((%s, %s), (%s, %s), (%s, %s))",
+                               PrefixStr,
+                               LiteralStr, LiteralStr,
+                               LiteralStr, LiteralStr,
+                               LiteralStr, LiteralStr));
+
+                       return detail::format(FormatStr.c_str(),
+                               x[0][0], x[0][1],
+                               x[1][0], x[1][1],
+                               x[2][0], x[2][1]);
+               }
+       };
+
+       template <typename T, precision P>
+       struct compute_to_string<tmat3x3, T, P>
+       {
+               GLM_FUNC_QUALIFIER static std::string call(tmat3x3<T, P> const & x)
+               {
+                       char const * PrefixStr = prefix<T>::value();
+                       char const * LiteralStr = literal<T, std::numeric_limits<T>::is_iec559>::value();
+                       std::string FormatStr(detail::format("%smat3x3((%s, %s, %s), (%s, %s, %s), (%s, %s, %s))",
+                               PrefixStr,
+                               LiteralStr, LiteralStr, LiteralStr,
+                               LiteralStr, LiteralStr, LiteralStr,
+                               LiteralStr, LiteralStr, LiteralStr));
+
+                       return detail::format(FormatStr.c_str(),
+                               x[0][0], x[0][1], x[0][2],
+                               x[1][0], x[1][1], x[1][2],
+                               x[2][0], x[2][1], x[2][2]);
+               }
+       };
+
+       template <typename T, precision P>
+       struct compute_to_string<tmat3x4, T, P>
+       {
+               GLM_FUNC_QUALIFIER static std::string call(tmat3x4<T, P> const & x)
+               {
+                       char const * PrefixStr = prefix<T>::value();
+                       char const * LiteralStr = literal<T, std::numeric_limits<T>::is_iec559>::value();
+                       std::string FormatStr(detail::format("%smat3x4((%s, %s, %s, %s), (%s, %s, %s, %s), (%s, %s, %s, %s))",
+                               PrefixStr,
+                               LiteralStr, LiteralStr, LiteralStr, LiteralStr,
+                               LiteralStr, LiteralStr, LiteralStr, LiteralStr,
+                               LiteralStr, LiteralStr, LiteralStr, LiteralStr));
+
+                       return detail::format(FormatStr.c_str(),
+                               x[0][0], x[0][1], x[0][2], x[0][3],
+                               x[1][0], x[1][1], x[1][2], x[1][3],
+                               x[2][0], x[2][1], x[2][2], x[2][3]);
+               }
+       };
+
+       template <typename T, precision P>
+       struct compute_to_string<tmat4x2, T, P>
+       {
+               GLM_FUNC_QUALIFIER static std::string call(tmat4x2<T, P> const & x)
+               {
+                       char const * PrefixStr = prefix<T>::value();
+                       char const * LiteralStr = literal<T, std::numeric_limits<T>::is_iec559>::value();
+                       std::string FormatStr(detail::format("%smat4x2((%s, %s), (%s, %s), (%s, %s), (%s, %s))",
+                               PrefixStr,
+                               LiteralStr, LiteralStr,
+                               LiteralStr, LiteralStr,
+                               LiteralStr, LiteralStr,
+                               LiteralStr, LiteralStr));
+
+                       return detail::format(FormatStr.c_str(),
+                               x[0][0], x[0][1],
+                               x[1][0], x[1][1],
+                               x[2][0], x[2][1],
+                               x[3][0], x[3][1]);
+               }
+       };
+
+       template <typename T, precision P>
+       struct compute_to_string<tmat4x3, T, P>
+       {
+               GLM_FUNC_QUALIFIER static std::string call(tmat4x3<T, P> const & x)
+               {
+                       char const * PrefixStr = prefix<T>::value();
+                       char const * LiteralStr = literal<T, std::numeric_limits<T>::is_iec559>::value();
+                       std::string FormatStr(detail::format("%smat4x3((%s, %s, %s), (%s, %s, %s), (%s, %s, %s), (%s, %s, %s))",
+                               PrefixStr,
+                               LiteralStr, LiteralStr, LiteralStr,
+                               LiteralStr, LiteralStr, LiteralStr,
+                               LiteralStr, LiteralStr, LiteralStr,
+                               LiteralStr, LiteralStr, LiteralStr));
+
+                       return detail::format(FormatStr.c_str(),
+                               x[0][0], x[0][1], x[0][2],
+                               x[1][0], x[1][1], x[1][2],
+                               x[2][0], x[2][1], x[2][2],
+                               x[3][0], x[3][1], x[3][2]);
+               }
+       };
+
+       template <typename T, precision P>
+       struct compute_to_string<tmat4x4, T, P>
+       {
+               GLM_FUNC_QUALIFIER static std::string call(tmat4x4<T, P> const & x)
+               {
+                       char const * PrefixStr = prefix<T>::value();
+                       char const * LiteralStr = literal<T, std::numeric_limits<T>::is_iec559>::value();
+                       std::string FormatStr(detail::format("%smat4x4((%s, %s, %s, %s), (%s, %s, %s, %s), (%s, %s, %s, %s), (%s, %s, %s, %s))",
+                               PrefixStr,
+                               LiteralStr, LiteralStr, LiteralStr, LiteralStr,
+                               LiteralStr, LiteralStr, LiteralStr, LiteralStr,
+                               LiteralStr, LiteralStr, LiteralStr, LiteralStr,
+                               LiteralStr, LiteralStr, LiteralStr, LiteralStr));
+
+                       return detail::format(FormatStr.c_str(),
+                               x[0][0], x[0][1], x[0][2], x[0][3],
+                               x[1][0], x[1][1], x[1][2], x[1][3],
+                               x[2][0], x[2][1], x[2][2], x[2][3],
+                               x[3][0], x[3][1], x[3][2], x[3][3]);
+               }
+       };
+}//namespace detail
+
+template <template <typename, precision> class matType, typename T, precision P>
+GLM_FUNC_DECL std::string to_string(matType<T, P> const & x)
+{
+       return detail::compute_to_string<matType, T, P>::call(x);
+}
+
+}//namespace glm
diff --git a/include/glm/gtx/transform.hpp b/include/glm/gtx/transform.hpp
new file mode 100644 (file)
index 0000000..7e6a4a7
--- /dev/null
@@ -0,0 +1,85 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtx_transform
+/// @file glm/gtx/transform.hpp
+/// @date 2005-12-21 / 2011-06-07
+/// @author Christophe Riccio
+///
+/// @see core (dependence)
+/// @see gtc_matrix_transform (dependence)
+/// @see gtx_transform
+/// @see gtx_transform2
+///
+/// @defgroup gtx_transform GLM_GTX_transform
+/// @ingroup gtx
+///
+/// @brief Add transformation matrices
+/// 
+/// <glm/gtx/transform.hpp> need to be included to use these functionalities.
+///////////////////////////////////////////////////////////////////////////////////
+
+#pragma once
+
+// Dependency:
+#include "../glm.hpp"
+#include "../gtc/matrix_transform.hpp"
+
+#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
+#      pragma message("GLM: GLM_GTX_transform extension included")
+#endif
+
+namespace glm
+{
+       /// @addtogroup gtx_transform
+       /// @{
+
+       /// Transforms a matrix with a translation 4 * 4 matrix created from 3 scalars.
+       /// @see gtc_matrix_transform
+       /// @see gtx_transform
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat4x4<T, P> translate(
+               tvec3<T, P> const & v);
+
+       /// Builds a rotation 4 * 4 matrix created from an axis of 3 scalars and an angle expressed in degrees. 
+       /// @see gtc_matrix_transform
+       /// @see gtx_transform
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat4x4<T, P> rotate(
+               T angle, 
+               tvec3<T, P> const & v);
+
+       /// Transforms a matrix with a scale 4 * 4 matrix created from a vector of 3 components.
+       /// @see gtc_matrix_transform
+       /// @see gtx_transform
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat4x4<T, P> scale(
+               tvec3<T, P> const & v);
+
+       /// @}
+}// namespace glm
+
+#include "transform.inl"
diff --git a/include/glm/gtx/transform.inl b/include/glm/gtx/transform.inl
new file mode 100644 (file)
index 0000000..832a4ca
--- /dev/null
@@ -0,0 +1,60 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtx_transform
+/// @file glm/gtx/transform.inl
+/// @date 2005-12-21 / 2011-06-07
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////
+
+namespace glm
+{
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat4x4<T, P> translate(
+               tvec3<T, P> const & v)
+       {
+               return translate(
+                       tmat4x4<T, P>(1.0f), v);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat4x4<T, P> rotate(
+               T angle, 
+               tvec3<T, P> const & v)
+       {
+               return rotate(
+                       tmat4x4<T, P>(1), angle, v);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat4x4<T, P> scale(
+               tvec3<T, P> const & v)
+       {
+               return scale(
+                       tmat4x4<T, P>(1.0f), v);
+       }
+
+}//namespace glm
diff --git a/include/glm/gtx/transform2.hpp b/include/glm/gtx/transform2.hpp
new file mode 100644 (file)
index 0000000..6f131af
--- /dev/null
@@ -0,0 +1,136 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtx_transform2
+/// @file glm/gtx/transform2.hpp
+/// @date 2005-12-21 / 2011-06-07
+/// @author Christophe Riccio
+///
+/// @see core (dependence)
+/// @see gtx_transform (dependence)
+///
+/// @defgroup gtx_transform2 GLM_GTX_transform2
+/// @ingroup gtx
+/// 
+/// @brief Add extra transformation matrices
+///
+/// <glm/gtx/transform2.hpp> need to be included to use these functionalities.
+///////////////////////////////////////////////////////////////////////////////////
+
+#pragma once
+
+// Dependency:
+#include "../glm.hpp"
+#include "../gtx/transform.hpp"
+
+#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
+#      pragma message("GLM: GLM_GTX_transform2 extension included")
+#endif
+
+namespace glm
+{
+       /// @addtogroup gtx_transform2
+       /// @{
+
+       //! Transforms a matrix with a shearing on X axis.
+       //! From GLM_GTX_transform2 extension.
+       template <typename T, precision P>
+       GLM_FUNC_DECL tmat3x3<T, P> shearX2D(
+               tmat3x3<T, P> const & m, 
+               T y);
+
+       //! Transforms a matrix with a shearing on Y axis.
+       //! From GLM_GTX_transform2 extension.
+       template <typename T, precision P> 
+       GLM_FUNC_DECL tmat3x3<T, P> shearY2D(
+               tmat3x3<T, P> const & m, 
+               T x);
+
+       //! Transforms a matrix with a shearing on X axis
+       //! From GLM_GTX_transform2 extension.
+       template <typename T, precision P> 
+       GLM_FUNC_DECL tmat4x4<T, P> shearX3D(
+               const tmat4x4<T, P> & m,
+               T y, 
+               T z);
+
+       //! Transforms a matrix with a shearing on Y axis.
+       //! From GLM_GTX_transform2 extension.
+       template <typename T, precision P> 
+       GLM_FUNC_DECL tmat4x4<T, P> shearY3D(
+               const tmat4x4<T, P> & m, 
+               T x, 
+               T z);
+
+       //! Transforms a matrix with a shearing on Z axis. 
+       //! From GLM_GTX_transform2 extension.
+       template <typename T, precision P> 
+       GLM_FUNC_DECL tmat4x4<T, P> shearZ3D(
+               const tmat4x4<T, P> & m, 
+               T x, 
+               T y);
+
+       //template <typename T> GLM_FUNC_QUALIFIER tmat4x4<T, P> shear(const tmat4x4<T, P> & m, shearPlane, planePoint, angle)
+       // Identity + tan(angle) * cross(Normal, OnPlaneVector)     0
+       // - dot(PointOnPlane, normal) * OnPlaneVector              1
+
+       // Reflect functions seem to don't work
+       //template <typename T> tmat3x3<T, P> reflect2D(const tmat3x3<T, P> & m, const tvec3<T, P>& normal){return reflect2DGTX(m, normal);}                                                                    //!< \brief Build a reflection matrix (from GLM_GTX_transform2 extension)
+       //template <typename T> tmat4x4<T, P> reflect3D(const tmat4x4<T, P> & m, const tvec3<T, P>& normal){return reflect3DGTX(m, normal);}                                                                    //!< \brief Build a reflection matrix (from GLM_GTX_transform2 extension)
+               
+       //! Build planar projection matrix along normal axis.
+       //! From GLM_GTX_transform2 extension.
+       template <typename T, precision P> 
+       GLM_FUNC_DECL tmat3x3<T, P> proj2D(
+               const tmat3x3<T, P> & m, 
+               const tvec3<T, P>& normal);
+
+       //! Build planar projection matrix along normal axis.
+       //! From GLM_GTX_transform2 extension.
+       template <typename T, precision P> 
+       GLM_FUNC_DECL tmat4x4<T, P> proj3D(
+               const tmat4x4<T, P> & m, 
+               const tvec3<T, P>& normal);
+
+       //! Build a scale bias matrix. 
+       //! From GLM_GTX_transform2 extension.
+       template <typename valType, precision P> 
+       GLM_FUNC_DECL tmat4x4<valType, P> scaleBias(
+               valType scale, 
+               valType bias);
+
+       //! Build a scale bias matrix.
+       //! From GLM_GTX_transform2 extension.
+       template <typename valType, precision P> 
+       GLM_FUNC_DECL tmat4x4<valType, P> scaleBias(
+               tmat4x4<valType, P> const & m, 
+               valType scale, 
+               valType bias);
+
+       /// @}
+}// namespace glm
+
+#include "transform2.inl"
diff --git a/include/glm/gtx/transform2.inl b/include/glm/gtx/transform2.inl
new file mode 100644 (file)
index 0000000..102093b
--- /dev/null
@@ -0,0 +1,177 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtx_transform2
+/// @file glm/gtx/transform2.inl
+/// @date 2005-12-21 / 2011-06-07
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////
+
+namespace glm
+{
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat3x3<T, P> shearX2D(
+               const tmat3x3<T, P>& m, 
+               T s)
+       {
+               tmat3x3<T, P> r(1);
+               r[0][1] = s;
+               return m * r;
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat3x3<T, P> shearY2D(
+               const tmat3x3<T, P>& m, 
+               T s)
+       {
+               tmat3x3<T, P> r(1);
+               r[1][0] = s;
+               return m * r;
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat4x4<T, P> shearX3D(
+               const tmat4x4<T, P>& m, 
+               T s, 
+               T t)
+       {
+               tmat4x4<T, P> r(1);
+               r[1][0] = s;
+               r[2][0] = t;
+               return m * r;
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat4x4<T, P> shearY3D(
+               const tmat4x4<T, P>& m, 
+               T s, 
+               T t)
+       {
+               tmat4x4<T, P> r(1);
+               r[0][1] = s;
+               r[2][1] = t;
+               return m * r;
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat4x4<T, P> shearZ3D(
+               const tmat4x4<T, P>& m, 
+               T s, 
+               T t)
+       {
+               tmat4x4<T, P> r(1);
+               r[0][2] = s;
+               r[1][2] = t;
+               return m * r;
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat3x3<T, P> reflect2D(
+               const tmat3x3<T, P>& m, 
+               const tvec3<T, P>& normal)
+       {
+               tmat3x3<T, P> r(1);
+               r[0][0] = 1 - 2 * normal.x * normal.x;
+               r[0][1] = -2 * normal.x * normal.y;
+               r[1][0] = -2 * normal.x * normal.y;
+               r[1][1] = 1 - 2 * normal.y * normal.y;
+               return m * r;
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat4x4<T, P> reflect3D(
+               const tmat4x4<T, P>& m, 
+               const tvec3<T, P>& normal)
+       {
+               tmat4x4<T, P> r(1);
+               r[0][0] = 1 - 2 * normal.x * normal.x;
+               r[0][1] = -2 * normal.x * normal.y;
+               r[0][2] = -2 * normal.x * normal.z;
+
+               r[1][0] = -2 * normal.x * normal.y;
+               r[1][1] = 1 - 2 * normal.y * normal.y;
+               r[1][2] = -2 * normal.y * normal.z;
+
+               r[2][0] = -2 * normal.x * normal.z;
+               r[2][1] = -2 * normal.y * normal.z;
+               r[2][2] = 1 - 2 * normal.z * normal.z;
+               return m * r;
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat3x3<T, P> proj2D(
+               const tmat3x3<T, P>& m, 
+               const tvec3<T, P>& normal)
+       {
+               tmat3x3<T, P> r(1);
+               r[0][0] = 1 - normal.x * normal.x;
+               r[0][1] = - normal.x * normal.y;
+               r[1][0] = - normal.x * normal.y;
+               r[1][1] = 1 - normal.y * normal.y;
+               return m * r;
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat4x4<T, P> proj3D(
+               const tmat4x4<T, P>& m, 
+               const tvec3<T, P>& normal)
+       {
+               tmat4x4<T, P> r(1);
+               r[0][0] = 1 - normal.x * normal.x;
+               r[0][1] = - normal.x * normal.y;
+               r[0][2] = - normal.x * normal.z;
+               r[1][0] = - normal.x * normal.y;
+               r[1][1] = 1 - normal.y * normal.y;
+               r[1][2] = - normal.y * normal.z;
+               r[2][0] = - normal.x * normal.z;
+               r[2][1] = - normal.y * normal.z;
+               r[2][2] = 1 - normal.z * normal.z;
+               return m * r;
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tmat4x4<T, P> scaleBias(
+               T scale, 
+               T bias)
+       {
+               tmat4x4<T, P> result;
+               result[3] = tvec4<T, P>(tvec3<T, P>(bias), T(1));
+               result[0][0] = scale;
+               result[1][1] = scale;
+               result[2][2] = scale;
+               return result;
+       }
+
+       template <typename T, precision P> 
+       GLM_FUNC_QUALIFIER tmat4x4<T, P> scaleBias(
+               const tmat4x4<T, P>& m, 
+               T scale, 
+               T bias)
+       {
+               return m * scaleBias(scale, bias);
+       }
+}//namespace glm
+
diff --git a/include/glm/gtx/type_aligned.hpp b/include/glm/gtx/type_aligned.hpp
new file mode 100644 (file)
index 0000000..a2838b2
--- /dev/null
@@ -0,0 +1,995 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+/// 
+/// @ref gtx_type_aligned
+/// @file glm/gtx/type_aligned.hpp
+/// @date 2014-11-23 / 2014-12-23
+/// @author Christophe Riccio
+/// 
+/// @see core (dependence)
+/// @see gtc_quaternion (dependence)
+/// 
+/// @defgroup gtx_type_aligned GLM_GTX_type_aligned
+/// @ingroup gtx
+/// 
+/// @brief Defines aligned types.
+/// 
+/// @ref core_precision defines aligned types.
+/// 
+/// <glm/gtx/type_aligned.hpp> need to be included to use these functionalities.
+///////////////////////////////////////////////////////////////////////////////////
+
+#pragma once
+
+// Dependency:
+#include "../gtc/type_precision.hpp"
+
+#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
+#      pragma message("GLM: GLM_GTX_type_aligned extension included")
+#endif
+
+namespace glm
+{
+       ///////////////////////////
+       // Signed int vector types 
+
+       /// @addtogroup gtx_type_aligned
+       /// @{
+
+       /// Low precision 8 bit signed integer aligned scalar type.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(lowp_int8, aligned_lowp_int8, 1);
+
+       /// Low precision 16 bit signed integer aligned scalar type.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(lowp_int16, aligned_lowp_int16, 2);
+
+       /// Low precision 32 bit signed integer aligned scalar type.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(lowp_int32, aligned_lowp_int32, 4);
+
+       /// Low precision 64 bit signed integer aligned scalar type.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(lowp_int64, aligned_lowp_int64, 8);
+
+
+       /// Low precision 8 bit signed integer aligned scalar type.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(lowp_int8_t, aligned_lowp_int8_t, 1);
+
+       /// Low precision 16 bit signed integer aligned scalar type.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(lowp_int16_t, aligned_lowp_int16_t, 2);
+
+       /// Low precision 32 bit signed integer aligned scalar type.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(lowp_int32_t, aligned_lowp_int32_t, 4);
+
+       /// Low precision 64 bit signed integer aligned scalar type.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(lowp_int64_t, aligned_lowp_int64_t, 8);
+
+
+       /// Low precision 8 bit signed integer aligned scalar type.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(lowp_i8, aligned_lowp_i8, 1);
+
+       /// Low precision 16 bit signed integer aligned scalar type.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(lowp_i16, aligned_lowp_i16, 2);
+
+       /// Low precision 32 bit signed integer aligned scalar type.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(lowp_i32, aligned_lowp_i32, 4);
+
+       /// Low precision 64 bit signed integer aligned scalar type.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(lowp_i64, aligned_lowp_i64, 8);
+
+
+       /// Medium precision 8 bit signed integer aligned scalar type.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(mediump_int8, aligned_mediump_int8, 1);
+
+       /// Medium precision 16 bit signed integer aligned scalar type.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(mediump_int16, aligned_mediump_int16, 2);
+
+       /// Medium precision 32 bit signed integer aligned scalar type.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(mediump_int32, aligned_mediump_int32, 4);
+
+       /// Medium precision 64 bit signed integer aligned scalar type.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(mediump_int64, aligned_mediump_int64, 8);
+
+
+       /// Medium precision 8 bit signed integer aligned scalar type.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(mediump_int8_t, aligned_mediump_int8_t, 1);
+
+       /// Medium precision 16 bit signed integer aligned scalar type.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(mediump_int16_t, aligned_mediump_int16_t, 2);
+
+       /// Medium precision 32 bit signed integer aligned scalar type.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(mediump_int32_t, aligned_mediump_int32_t, 4);
+
+       /// Medium precision 64 bit signed integer aligned scalar type.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(mediump_int64_t, aligned_mediump_int64_t, 8);
+
+
+       /// Medium precision 8 bit signed integer aligned scalar type.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(mediump_i8, aligned_mediump_i8, 1);
+
+       /// Medium precision 16 bit signed integer aligned scalar type.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(mediump_i16, aligned_mediump_i16, 2);
+
+       /// Medium precision 32 bit signed integer aligned scalar type.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(mediump_i32, aligned_mediump_i32, 4);
+
+       /// Medium precision 64 bit signed integer aligned scalar type.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(mediump_i64, aligned_mediump_i64, 8);
+
+
+       /// High precision 8 bit signed integer aligned scalar type.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(highp_int8, aligned_highp_int8, 1);
+
+       /// High precision 16 bit signed integer aligned scalar type.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(highp_int16, aligned_highp_int16, 2);
+
+       /// High precision 32 bit signed integer aligned scalar type.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(highp_int32, aligned_highp_int32, 4);
+
+       /// High precision 64 bit signed integer aligned scalar type.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(highp_int64, aligned_highp_int64, 8);
+
+
+       /// High precision 8 bit signed integer aligned scalar type.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(highp_int8_t, aligned_highp_int8_t, 1);
+
+       /// High precision 16 bit signed integer aligned scalar type.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(highp_int16_t, aligned_highp_int16_t, 2);
+
+       /// High precision 32 bit signed integer aligned scalar type.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(highp_int32_t, aligned_highp_int32_t, 4);
+
+       /// High precision 64 bit signed integer aligned scalar type.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(highp_int64_t, aligned_highp_int64_t, 8);
+
+
+       /// High precision 8 bit signed integer aligned scalar type.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(highp_i8, aligned_highp_i8, 1);
+
+       /// High precision 16 bit signed integer aligned scalar type.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(highp_i16, aligned_highp_i16, 2);
+
+       /// High precision 32 bit signed integer aligned scalar type.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(highp_i32, aligned_highp_i32, 4);
+
+       /// High precision 64 bit signed integer aligned scalar type.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(highp_i64, aligned_highp_i64, 8);
+
+
+       /// Default precision 8 bit signed integer aligned scalar type.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(int8, aligned_int8, 1);
+
+       /// Default precision 16 bit signed integer aligned scalar type.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(int16, aligned_int16, 2);
+
+       /// Default precision 32 bit signed integer aligned scalar type.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(int32, aligned_int32, 4);
+
+       /// Default precision 64 bit signed integer aligned scalar type.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(int64, aligned_int64, 8);
+
+
+       /// Default precision 8 bit signed integer aligned scalar type.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(int8_t, aligned_int8_t, 1);
+
+       /// Default precision 16 bit signed integer aligned scalar type.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(int16_t, aligned_int16_t, 2);
+
+       /// Default precision 32 bit signed integer aligned scalar type.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(int32_t, aligned_int32_t, 4);
+
+       /// Default precision 64 bit signed integer aligned scalar type.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(int64_t, aligned_int64_t, 8);
+
+
+       /// Default precision 8 bit signed integer aligned scalar type.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(i8, aligned_i8, 1);
+
+       /// Default precision 16 bit signed integer aligned scalar type.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(i16, aligned_i16, 2);
+
+       /// Default precision 32 bit signed integer aligned scalar type.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(i32, aligned_i32, 4);
+
+       /// Default precision 64 bit signed integer aligned scalar type.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(i64, aligned_i64, 8);
+
+
+       /// Default precision 32 bit signed integer aligned scalar type.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(ivec1, aligned_ivec1, 4);
+       
+       /// Default precision 32 bit signed integer aligned vector of 2 components type.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(ivec2, aligned_ivec2, 8);
+
+       /// Default precision 32 bit signed integer aligned vector of 3 components type.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(ivec3, aligned_ivec3, 16);
+
+       /// Default precision 32 bit signed integer aligned vector of 4 components type.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(ivec4, aligned_ivec4, 16);
+
+
+       /// Default precision 8 bit signed integer aligned scalar type.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(i8vec1, aligned_i8vec1, 1);
+
+       /// Default precision 8 bit signed integer aligned vector of 2 components type.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(i8vec2, aligned_i8vec2, 2);
+
+       /// Default precision 8 bit signed integer aligned vector of 3 components type.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(i8vec3, aligned_i8vec3, 4);
+
+       /// Default precision 8 bit signed integer aligned vector of 4 components type.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(i8vec4, aligned_i8vec4, 4);
+
+
+       /// Default precision 16 bit signed integer aligned scalar type.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(i16vec1, aligned_i16vec1, 2);
+       
+       /// Default precision 16 bit signed integer aligned vector of 2 components type.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(i16vec2, aligned_i16vec2, 4);
+
+       /// Default precision 16 bit signed integer aligned vector of 3 components type.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(i16vec3, aligned_i16vec3, 8);
+
+       /// Default precision 16 bit signed integer aligned vector of 4 components type.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(i16vec4, aligned_i16vec4, 8);
+
+
+       /// Default precision 32 bit signed integer aligned scalar type.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(i32vec1, aligned_i32vec1, 4);
+       
+       /// Default precision 32 bit signed integer aligned vector of 2 components type.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(i32vec2, aligned_i32vec2, 8);
+
+       /// Default precision 32 bit signed integer aligned vector of 3 components type.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(i32vec3, aligned_i32vec3, 16);
+
+       /// Default precision 32 bit signed integer aligned vector of 4 components type.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(i32vec4, aligned_i32vec4, 16);
+
+
+       /// Default precision 64 bit signed integer aligned scalar type.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(i64vec1, aligned_i64vec1, 8);
+       
+       /// Default precision 64 bit signed integer aligned vector of 2 components type.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(i64vec2, aligned_i64vec2, 16);
+
+       /// Default precision 64 bit signed integer aligned vector of 3 components type.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(i64vec3, aligned_i64vec3, 32);
+
+       /// Default precision 64 bit signed integer aligned vector of 4 components type.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(i64vec4, aligned_i64vec4, 32);
+
+
+       /////////////////////////////
+       // Unsigned int vector types
+
+       /// Low precision 8 bit unsigned integer aligned scalar type.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(lowp_uint8, aligned_lowp_uint8, 1);
+
+       /// Low precision 16 bit unsigned integer aligned scalar type.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(lowp_uint16, aligned_lowp_uint16, 2);
+
+       /// Low precision 32 bit unsigned integer aligned scalar type.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(lowp_uint32, aligned_lowp_uint32, 4);
+
+       /// Low precision 64 bit unsigned integer aligned scalar type.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(lowp_uint64, aligned_lowp_uint64, 8);
+
+
+       /// Low precision 8 bit unsigned integer aligned scalar type.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(lowp_uint8_t, aligned_lowp_uint8_t, 1);
+
+       /// Low precision 16 bit unsigned integer aligned scalar type.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(lowp_uint16_t, aligned_lowp_uint16_t, 2);
+
+       /// Low precision 32 bit unsigned integer aligned scalar type.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(lowp_uint32_t, aligned_lowp_uint32_t, 4);
+
+       /// Low precision 64 bit unsigned integer aligned scalar type.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(lowp_uint64_t, aligned_lowp_uint64_t, 8);
+
+
+       /// Low precision 8 bit unsigned integer aligned scalar type.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(lowp_u8, aligned_lowp_u8, 1);
+
+       /// Low precision 16 bit unsigned integer aligned scalar type.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(lowp_u16, aligned_lowp_u16, 2);
+
+       /// Low precision 32 bit unsigned integer aligned scalar type.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(lowp_u32, aligned_lowp_u32, 4);
+
+       /// Low precision 64 bit unsigned integer aligned scalar type.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(lowp_u64, aligned_lowp_u64, 8);
+
+
+       /// Medium precision 8 bit unsigned integer aligned scalar type.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(mediump_uint8, aligned_mediump_uint8, 1);
+
+       /// Medium precision 16 bit unsigned integer aligned scalar type.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(mediump_uint16, aligned_mediump_uint16, 2);
+
+       /// Medium precision 32 bit unsigned integer aligned scalar type.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(mediump_uint32, aligned_mediump_uint32, 4);
+
+       /// Medium precision 64 bit unsigned integer aligned scalar type.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(mediump_uint64, aligned_mediump_uint64, 8);
+
+
+       /// Medium precision 8 bit unsigned integer aligned scalar type.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(mediump_uint8_t, aligned_mediump_uint8_t, 1);
+
+       /// Medium precision 16 bit unsigned integer aligned scalar type.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(mediump_uint16_t, aligned_mediump_uint16_t, 2);
+
+       /// Medium precision 32 bit unsigned integer aligned scalar type.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(mediump_uint32_t, aligned_mediump_uint32_t, 4);
+
+       /// Medium precision 64 bit unsigned integer aligned scalar type.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(mediump_uint64_t, aligned_mediump_uint64_t, 8);
+
+
+       /// Medium precision 8 bit unsigned integer aligned scalar type.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(mediump_u8, aligned_mediump_u8, 1);
+
+       /// Medium precision 16 bit unsigned integer aligned scalar type.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(mediump_u16, aligned_mediump_u16, 2);
+
+       /// Medium precision 32 bit unsigned integer aligned scalar type.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(mediump_u32, aligned_mediump_u32, 4);
+
+       /// Medium precision 64 bit unsigned integer aligned scalar type.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(mediump_u64, aligned_mediump_u64, 8);
+
+
+       /// High precision 8 bit unsigned integer aligned scalar type.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(highp_uint8, aligned_highp_uint8, 1);
+
+       /// High precision 16 bit unsigned integer aligned scalar type.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(highp_uint16, aligned_highp_uint16, 2);
+
+       /// High precision 32 bit unsigned integer aligned scalar type.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(highp_uint32, aligned_highp_uint32, 4);
+
+       /// High precision 64 bit unsigned integer aligned scalar type.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(highp_uint64, aligned_highp_uint64, 8);
+
+
+       /// High precision 8 bit unsigned integer aligned scalar type.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(highp_uint8_t, aligned_highp_uint8_t, 1);
+
+       /// High precision 16 bit unsigned integer aligned scalar type.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(highp_uint16_t, aligned_highp_uint16_t, 2);
+
+       /// High precision 32 bit unsigned integer aligned scalar type.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(highp_uint32_t, aligned_highp_uint32_t, 4);
+
+       /// High precision 64 bit unsigned integer aligned scalar type.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(highp_uint64_t, aligned_highp_uint64_t, 8);
+
+
+       /// High precision 8 bit unsigned integer aligned scalar type.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(highp_u8, aligned_highp_u8, 1);
+
+       /// High precision 16 bit unsigned integer aligned scalar type.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(highp_u16, aligned_highp_u16, 2);
+
+       /// High precision 32 bit unsigned integer aligned scalar type.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(highp_u32, aligned_highp_u32, 4);
+
+       /// High precision 64 bit unsigned integer aligned scalar type.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(highp_u64, aligned_highp_u64, 8);
+
+
+       /// Default precision 8 bit unsigned integer aligned scalar type.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(uint8, aligned_uint8, 1);
+
+       /// Default precision 16 bit unsigned integer aligned scalar type.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(uint16, aligned_uint16, 2);
+
+       /// Default precision 32 bit unsigned integer aligned scalar type.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(uint32, aligned_uint32, 4);
+
+       /// Default precision 64 bit unsigned integer aligned scalar type.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(uint64, aligned_uint64, 8);
+
+
+       /// Default precision 8 bit unsigned integer aligned scalar type.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(uint8_t, aligned_uint8_t, 1);
+
+       /// Default precision 16 bit unsigned integer aligned scalar type.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(uint16_t, aligned_uint16_t, 2);
+
+       /// Default precision 32 bit unsigned integer aligned scalar type.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(uint32_t, aligned_uint32_t, 4);
+
+       /// Default precision 64 bit unsigned integer aligned scalar type.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(uint64_t, aligned_uint64_t, 8);
+
+
+       /// Default precision 8 bit unsigned integer aligned scalar type.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(u8, aligned_u8, 1);
+
+       /// Default precision 16 bit unsigned integer aligned scalar type.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(u16, aligned_u16, 2);
+
+       /// Default precision 32 bit unsigned integer aligned scalar type.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(u32, aligned_u32, 4);
+
+       /// Default precision 64 bit unsigned integer aligned scalar type.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(u64, aligned_u64, 8);
+
+
+       /// Default precision 32 bit unsigned integer aligned scalar type.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(uvec1, aligned_uvec1, 4);
+       
+       /// Default precision 32 bit unsigned integer aligned vector of 2 components type.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(uvec2, aligned_uvec2, 8);
+
+       /// Default precision 32 bit unsigned integer aligned vector of 3 components type.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(uvec3, aligned_uvec3, 16);
+
+       /// Default precision 32 bit unsigned integer aligned vector of 4 components type.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(uvec4, aligned_uvec4, 16);
+
+
+       /// Default precision 8 bit unsigned integer aligned scalar type.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(u8vec1, aligned_u8vec1, 1);
+
+       /// Default precision 8 bit unsigned integer aligned vector of 2 components type.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(u8vec2, aligned_u8vec2, 2);
+
+       /// Default precision 8 bit unsigned integer aligned vector of 3 components type.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(u8vec3, aligned_u8vec3, 4);
+
+       /// Default precision 8 bit unsigned integer aligned vector of 4 components type.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(u8vec4, aligned_u8vec4, 4);
+
+
+       /// Default precision 16 bit unsigned integer aligned scalar type.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(u16vec1, aligned_u16vec1, 2);
+       
+       /// Default precision 16 bit unsigned integer aligned vector of 2 components type.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(u16vec2, aligned_u16vec2, 4);
+
+       /// Default precision 16 bit unsigned integer aligned vector of 3 components type.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(u16vec3, aligned_u16vec3, 8);
+
+       /// Default precision 16 bit unsigned integer aligned vector of 4 components type.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(u16vec4, aligned_u16vec4, 8);
+
+
+       /// Default precision 32 bit unsigned integer aligned scalar type.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(u32vec1, aligned_u32vec1, 4);
+       
+       /// Default precision 32 bit unsigned integer aligned vector of 2 components type.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(u32vec2, aligned_u32vec2, 8);
+
+       /// Default precision 32 bit unsigned integer aligned vector of 3 components type.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(u32vec3, aligned_u32vec3, 16);
+
+       /// Default precision 32 bit unsigned integer aligned vector of 4 components type.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(u32vec4, aligned_u32vec4, 16);
+
+
+       /// Default precision 64 bit unsigned integer aligned scalar type.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(u64vec1, aligned_u64vec1, 8);
+       
+       /// Default precision 64 bit unsigned integer aligned vector of 2 components type.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(u64vec2, aligned_u64vec2, 16);
+
+       /// Default precision 64 bit unsigned integer aligned vector of 3 components type.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(u64vec3, aligned_u64vec3, 32);
+
+       /// Default precision 64 bit unsigned integer aligned vector of 4 components type.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(u64vec4, aligned_u64vec4, 32);
+
+
+       //////////////////////
+       // Float vector types
+
+       /// 32 bit single-precision floating-point aligned scalar.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(float32, aligned_float32, 4);
+
+       /// 64 bit double-precision floating-point aligned scalar.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(float64, aligned_float64, 8);
+
+
+       /// 32 bit single-precision floating-point aligned scalar.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(float32_t, aligned_float32_t, 4);
+
+       /// 64 bit double-precision floating-point aligned scalar.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(float64_t, aligned_float64_t, 8);
+
+
+       /// 32 bit single-precision floating-point aligned scalar.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(float32, aligned_f32, 4);
+
+       /// 64 bit double-precision floating-point aligned scalar.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(float64, aligned_f64, 8);
+
+
+       /// Single-precision floating-point aligned vector of 1 component.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(vec1, aligned_vec1, 4);
+
+       /// Single-precision floating-point aligned vector of 2 components.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(vec2, aligned_vec2, 8);
+
+       /// Single-precision floating-point aligned vector of 3 components.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(vec3, aligned_vec3, 16);
+
+       /// Single-precision floating-point aligned vector of 4 components.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(vec4, aligned_vec4, 16);
+
+
+       /// Single-precision floating-point aligned vector of 1 component.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(fvec1, aligned_fvec1, 4);
+
+       /// Single-precision floating-point aligned vector of 2 components.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(fvec2, aligned_fvec2, 8);
+
+       /// Single-precision floating-point aligned vector of 3 components.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(fvec3, aligned_fvec3, 16);
+
+       /// Single-precision floating-point aligned vector of 4 components.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(fvec4, aligned_fvec4, 16);
+
+       
+       /// Single-precision floating-point aligned vector of 1 component.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(f32vec1, aligned_f32vec1, 4);
+
+       /// Single-precision floating-point aligned vector of 2 components.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(f32vec2, aligned_f32vec2, 8);
+
+       /// Single-precision floating-point aligned vector of 3 components.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(f32vec3, aligned_f32vec3, 16);
+
+       /// Single-precision floating-point aligned vector of 4 components.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(f32vec4, aligned_f32vec4, 16);
+
+
+       /// Double-precision floating-point aligned vector of 1 component.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(dvec1, aligned_dvec1, 8);
+
+       /// Double-precision floating-point aligned vector of 2 components.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(dvec2, aligned_dvec2, 16);
+
+       /// Double-precision floating-point aligned vector of 3 components.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(dvec3, aligned_dvec3, 32);
+
+       /// Double-precision floating-point aligned vector of 4 components.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(dvec4, aligned_dvec4, 32);
+
+
+       /// Double-precision floating-point aligned vector of 1 component.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(f64vec1, aligned_f64vec1, 8);
+
+       /// Double-precision floating-point aligned vector of 2 components.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(f64vec2, aligned_f64vec2, 16);
+
+       /// Double-precision floating-point aligned vector of 3 components.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(f64vec3, aligned_f64vec3, 32);
+
+       /// Double-precision floating-point aligned vector of 4 components.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(f64vec4, aligned_f64vec4, 32);
+
+
+       //////////////////////
+       // Float matrix types 
+
+       /// Single-precision floating-point aligned 1x1 matrix.
+       /// @see gtx_type_aligned
+       //typedef detail::tmat1<f32> mat1;
+
+       /// Single-precision floating-point aligned 2x2 matrix.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(mat2, aligned_mat2, 16);
+
+       /// Single-precision floating-point aligned 3x3 matrix.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(mat3, aligned_mat3, 16);
+
+       /// Single-precision floating-point aligned 4x4 matrix.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(mat4, aligned_mat4, 16);
+
+
+       /// Single-precision floating-point aligned 1x1 matrix.
+       /// @see gtx_type_aligned
+       //typedef detail::tmat1x1<f32> mat1;
+
+       /// Single-precision floating-point aligned 2x2 matrix.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(mat2x2, aligned_mat2x2, 16);
+
+       /// Single-precision floating-point aligned 3x3 matrix.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(mat3x3, aligned_mat3x3, 16);
+
+       /// Single-precision floating-point aligned 4x4 matrix.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(mat4x4, aligned_mat4x4, 16);
+
+
+       /// Single-precision floating-point aligned 1x1 matrix.
+       /// @see gtx_type_aligned
+       //typedef detail::tmat1x1<f32> fmat1;
+
+       /// Single-precision floating-point aligned 2x2 matrix.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(fmat2x2, aligned_fmat2, 16);
+
+       /// Single-precision floating-point aligned 3x3 matrix.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(fmat3x3, aligned_fmat3, 16);
+
+       /// Single-precision floating-point aligned 4x4 matrix.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(fmat4x4, aligned_fmat4, 16);
+
+
+       /// Single-precision floating-point aligned 1x1 matrix.
+       /// @see gtx_type_aligned
+       //typedef f32 fmat1x1;
+
+       /// Single-precision floating-point aligned 2x2 matrix.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(fmat2x2, aligned_fmat2x2, 16);
+
+       /// Single-precision floating-point aligned 2x3 matrix.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(fmat2x3, aligned_fmat2x3, 16);
+
+       /// Single-precision floating-point aligned 2x4 matrix.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(fmat2x4, aligned_fmat2x4, 16);
+
+       /// Single-precision floating-point aligned 3x2 matrix.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(fmat3x2, aligned_fmat3x2, 16);
+
+       /// Single-precision floating-point aligned 3x3 matrix.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(fmat3x3, aligned_fmat3x3, 16);
+
+       /// Single-precision floating-point aligned 3x4 matrix.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(fmat3x4, aligned_fmat3x4, 16);
+
+       /// Single-precision floating-point aligned 4x2 matrix.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(fmat4x2, aligned_fmat4x2, 16);
+
+       /// Single-precision floating-point aligned 4x3 matrix.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(fmat4x3, aligned_fmat4x3, 16);
+
+       /// Single-precision floating-point aligned 4x4 matrix.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(fmat4x4, aligned_fmat4x4, 16);
+
+
+       /// Single-precision floating-point aligned 1x1 matrix.
+       /// @see gtx_type_aligned
+       //typedef detail::tmat1x1<f32, defaultp> f32mat1;
+
+       /// Single-precision floating-point aligned 2x2 matrix.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(f32mat2x2, aligned_f32mat2, 16);
+
+       /// Single-precision floating-point aligned 3x3 matrix.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(f32mat3x3, aligned_f32mat3, 16);
+
+       /// Single-precision floating-point aligned 4x4 matrix.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(f32mat4x4, aligned_f32mat4, 16);
+
+
+       /// Single-precision floating-point aligned 1x1 matrix.
+       /// @see gtx_type_aligned
+       //typedef f32 f32mat1x1;
+
+       /// Single-precision floating-point aligned 2x2 matrix.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(f32mat2x2, aligned_f32mat2x2, 16);
+
+       /// Single-precision floating-point aligned 2x3 matrix.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(f32mat2x3, aligned_f32mat2x3, 16);
+
+       /// Single-precision floating-point aligned 2x4 matrix.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(f32mat2x4, aligned_f32mat2x4, 16);
+
+       /// Single-precision floating-point aligned 3x2 matrix.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(f32mat3x2, aligned_f32mat3x2, 16);
+
+       /// Single-precision floating-point aligned 3x3 matrix.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(f32mat3x3, aligned_f32mat3x3, 16);
+
+       /// Single-precision floating-point aligned 3x4 matrix.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(f32mat3x4, aligned_f32mat3x4, 16);
+
+       /// Single-precision floating-point aligned 4x2 matrix.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(f32mat4x2, aligned_f32mat4x2, 16);
+
+       /// Single-precision floating-point aligned 4x3 matrix.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(f32mat4x3, aligned_f32mat4x3, 16);
+
+       /// Single-precision floating-point aligned 4x4 matrix.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(f32mat4x4, aligned_f32mat4x4, 16);
+
+
+       /// Double-precision floating-point aligned 1x1 matrix.
+       /// @see gtx_type_aligned
+       //typedef detail::tmat1x1<f64, defaultp> f64mat1;
+
+       /// Double-precision floating-point aligned 2x2 matrix.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(f64mat2x2, aligned_f64mat2, 32);
+
+       /// Double-precision floating-point aligned 3x3 matrix.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(f64mat3x3, aligned_f64mat3, 32);
+
+       /// Double-precision floating-point aligned 4x4 matrix.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(f64mat4x4, aligned_f64mat4, 32);
+
+
+       /// Double-precision floating-point aligned 1x1 matrix.
+       /// @see gtx_type_aligned
+       //typedef f64 f64mat1x1;
+
+       /// Double-precision floating-point aligned 2x2 matrix.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(f64mat2x2, aligned_f64mat2x2, 32);
+
+       /// Double-precision floating-point aligned 2x3 matrix.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(f64mat2x3, aligned_f64mat2x3, 32);
+
+       /// Double-precision floating-point aligned 2x4 matrix.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(f64mat2x4, aligned_f64mat2x4, 32);
+
+       /// Double-precision floating-point aligned 3x2 matrix.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(f64mat3x2, aligned_f64mat3x2, 32);
+
+       /// Double-precision floating-point aligned 3x3 matrix.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(f64mat3x3, aligned_f64mat3x3, 32);
+
+       /// Double-precision floating-point aligned 3x4 matrix.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(f64mat3x4, aligned_f64mat3x4, 32);
+
+       /// Double-precision floating-point aligned 4x2 matrix.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(f64mat4x2, aligned_f64mat4x2, 32);
+
+       /// Double-precision floating-point aligned 4x3 matrix.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(f64mat4x3, aligned_f64mat4x3, 32);
+
+       /// Double-precision floating-point aligned 4x4 matrix.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(f64mat4x4, aligned_f64mat4x4, 32);
+
+
+       //////////////////////////
+       // Quaternion types
+
+       /// Single-precision floating-point aligned quaternion.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(quat, aligned_quat, 16);
+
+       /// Single-precision floating-point aligned quaternion.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(fquat, aligned_fquat, 16);
+
+       /// Double-precision floating-point aligned quaternion.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(dquat, aligned_dquat, 32);
+
+       /// Single-precision floating-point aligned quaternion.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(f32quat, aligned_f32quat, 16);
+
+       /// Double-precision floating-point aligned quaternion.
+       /// @see gtx_type_aligned
+       GLM_ALIGNED_TYPEDEF(f64quat, aligned_f64quat, 32);
+
+       /// @}
+}//namespace glm
+
+#include "type_aligned.inl"
diff --git a/include/glm/gtx/type_aligned.inl b/include/glm/gtx/type_aligned.inl
new file mode 100644 (file)
index 0000000..5e755f0
--- /dev/null
@@ -0,0 +1,36 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtc_type_aligned
+/// @file glm/gtc/type_aligned.inl
+/// @date 2014-11-23 / 2014-11-23
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////
+
+namespace glm
+{
+
+}
diff --git a/include/glm/gtx/vector_angle.hpp b/include/glm/gtx/vector_angle.hpp
new file mode 100644 (file)
index 0000000..8028870
--- /dev/null
@@ -0,0 +1,89 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtx_vector_angle
+/// @file glm/gtx/vector_angle.hpp
+/// @date 2005-12-30 / 2011-06-07
+/// @author Christophe Riccio
+///
+/// @see core (dependence)
+/// @see gtx_quaternion (dependence)
+/// @see gtx_epsilon (dependence)
+///
+/// @defgroup gtx_vector_angle GLM_GTX_vector_angle
+/// @ingroup gtx
+/// 
+/// @brief Compute angle between vectors
+/// 
+/// <glm/gtx/vector_angle.hpp> need to be included to use these functionalities.
+///////////////////////////////////////////////////////////////////////////////////
+
+#pragma once
+
+// Dependency:
+#include "../glm.hpp"
+#include "../gtc/epsilon.hpp"
+#include "../gtx/quaternion.hpp"
+#include "../gtx/rotate_vector.hpp"
+
+#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
+#      pragma message("GLM: GLM_GTX_vector_angle extension included")
+#endif
+
+namespace glm
+{
+       /// @addtogroup gtx_vector_angle
+       /// @{
+
+       //! Returns the absolute angle between two vectors
+       //! Parameters need to be normalized.
+       /// @see gtx_vector_angle extension
+       template <typename vecType>
+       GLM_FUNC_DECL typename vecType::value_type angle(
+               vecType const & x, 
+               vecType const & y);
+
+       //! Returns the oriented angle between two 2d vectors 
+       //! Parameters need to be normalized.
+       /// @see gtx_vector_angle extension.
+       template <typename T, precision P>
+       GLM_FUNC_DECL T orientedAngle(
+               tvec2<T, P> const & x,
+               tvec2<T, P> const & y);
+
+       //! Returns the oriented angle between two 3d vectors based from a reference axis.
+       //! Parameters need to be normalized.
+       /// @see gtx_vector_angle extension.
+       template <typename T, precision P>
+       GLM_FUNC_DECL T orientedAngle(
+               tvec3<T, P> const & x,
+               tvec3<T, P> const & y,
+               tvec3<T, P> const & ref);
+
+       /// @}
+}// namespace glm
+
+#include "vector_angle.inl"
diff --git a/include/glm/gtx/vector_angle.inl b/include/glm/gtx/vector_angle.inl
new file mode 100644 (file)
index 0000000..ba5fdd4
--- /dev/null
@@ -0,0 +1,87 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtx_vector_angle
+/// @file glm/gtx/vector_angle.inl
+/// @date 2005-12-30 / 2011-06-07
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////
+
+namespace glm
+{
+       template <typename genType> 
+       GLM_FUNC_QUALIFIER genType angle
+       (
+               genType const & x,
+               genType const & y
+       )
+       {
+               GLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, "'angle' only accept floating-point inputs");
+               return acos(clamp(dot(x, y), genType(-1), genType(1)));
+       }
+
+       template <typename T, precision P, template <typename, precision> class vecType> 
+       GLM_FUNC_QUALIFIER T angle
+       (
+               vecType<T, P> const & x,
+               vecType<T, P> const & y
+       )
+       {
+               GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'angle' only accept floating-point inputs");
+               return acos(clamp(dot(x, y), T(-1), T(1)));
+       }
+
+       //! \todo epsilon is hard coded to 0.01
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER T orientedAngle
+       (
+               tvec2<T, P> const & x,
+               tvec2<T, P> const & y
+       )
+       {
+               GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'orientedAngle' only accept floating-point inputs");
+               T const Angle(acos(clamp(dot(x, y), T(-1), T(1))));
+
+               if(all(epsilonEqual(y, glm::rotate(x, Angle), T(0.0001))))
+                       return Angle;
+               else
+                       return -Angle;
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER T orientedAngle
+       (
+               tvec3<T, P> const & x,
+               tvec3<T, P> const & y,
+               tvec3<T, P> const & ref
+       )
+       {
+               GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'orientedAngle' only accept floating-point inputs");
+
+               T const Angle(acos(clamp(dot(x, y), T(-1), T(1))));
+               return mix(Angle, -Angle, dot(ref, cross(x, y)) < T(0));
+       }
+}//namespace glm
diff --git a/include/glm/gtx/vector_query.hpp b/include/glm/gtx/vector_query.hpp
new file mode 100644 (file)
index 0000000..88b22c2
--- /dev/null
@@ -0,0 +1,91 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtx_vector_query
+/// @file glm/gtx/vector_query.hpp
+/// @date 2008-03-10 / 2011-06-07
+/// @author Christophe Riccio
+///
+/// @see core (dependence)
+///
+/// @defgroup gtx_vector_query GLM_GTX_vector_query
+/// @ingroup gtx
+/// 
+/// @brief Query informations of vector types
+///
+/// <glm/gtx/vector_query.hpp> need to be included to use these functionalities.
+///////////////////////////////////////////////////////////////////////////////////
+
+#pragma once
+
+// Dependency:
+#include "../glm.hpp"
+#include <cfloat>
+#include <limits>
+
+#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
+#      pragma message("GLM: GLM_GTX_vector_query extension included")
+#endif
+
+namespace glm
+{
+       /// @addtogroup gtx_vector_query
+       /// @{
+
+       //! Check whether two vectors are collinears.
+       /// @see gtx_vector_query extensions.
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_DECL bool areCollinear(vecType<T, P> const & v0, vecType<T, P> const & v1, T const & epsilon);
+               
+       //! Check whether two vectors are orthogonals.
+       /// @see gtx_vector_query extensions.
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_DECL bool areOrthogonal(vecType<T, P> const & v0, vecType<T, P> const & v1, T const & epsilon);
+
+       //! Check whether a vector is normalized.
+       /// @see gtx_vector_query extensions.
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_DECL bool isNormalized(vecType<T, P> const & v, T const & epsilon);
+               
+       //! Check whether a vector is null.
+       /// @see gtx_vector_query extensions.
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_DECL bool isNull(vecType<T, P> const & v, T const & epsilon);
+
+       //! Check whether a each component of a vector is null.
+       /// @see gtx_vector_query extensions.
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_DECL vecType<bool, P> isCompNull(vecType<T, P> const & v, T const & epsilon);
+
+       //! Check whether two vectors are orthonormal.
+       /// @see gtx_vector_query extensions.
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_DECL bool areOrthonormal(vecType<T, P> const & v0, vecType<T, P> const & v1, T const & epsilon);
+
+       /// @}
+}// namespace glm
+
+#include "vector_query.inl"
diff --git a/include/glm/gtx/vector_query.inl b/include/glm/gtx/vector_query.inl
new file mode 100644 (file)
index 0000000..e7b0cb1
--- /dev/null
@@ -0,0 +1,222 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtx_vector_query
+/// @file glm/gtx/vector_query.inl
+/// @date 2008-03-10 / 2011-06-07
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////
+
+#include <cassert>
+
+namespace glm{
+namespace detail
+{
+       template <typename T, precision P, template <typename, precision> class vecType>
+       struct compute_areCollinear{};
+
+       template <typename T, precision P>
+       struct compute_areCollinear<T, P, tvec2>
+       {
+               GLM_FUNC_QUALIFIER static bool call(tvec2<T, P> const & v0, tvec2<T, P> const & v1, T const & epsilon)
+               {
+                       return length(cross(tvec3<T, P>(v0, static_cast<T>(0)), tvec3<T, P>(v1, static_cast<T>(0)))) < epsilon;
+               }
+       };
+
+       template <typename T, precision P>
+       struct compute_areCollinear<T, P, tvec3>
+       {
+               GLM_FUNC_QUALIFIER static bool call(tvec3<T, P> const & v0, tvec3<T, P> const & v1, T const & epsilon)
+               {
+                       return length(cross(v0, v1)) < epsilon;
+               }
+       };
+
+       template <typename T, precision P>
+       struct compute_areCollinear<T, P, tvec4>
+       {
+               GLM_FUNC_QUALIFIER static bool call(tvec4<T, P> const & v0, tvec4<T, P> const & v1, T const & epsilon)
+               {
+                       return length(cross(tvec3<T, P>(v0), tvec3<T, P>(v1))) < epsilon;
+               }
+       };
+
+       template <typename T, precision P, template <typename, precision> class vecType>
+       struct compute_isCompNull{};
+
+       template <typename T, precision P>
+       struct compute_isCompNull<T, P, tvec2>
+       {
+               GLM_FUNC_QUALIFIER static tvec2<bool, P> call(tvec2<T, P> const & v, T const & epsilon)
+               {
+                       return tvec2<bool, P>(
+                               (abs(v.x) < epsilon),
+                               (abs(v.y) < epsilon));
+               }
+       };
+
+       template <typename T, precision P>
+       struct compute_isCompNull<T, P, tvec3>
+       {
+               GLM_FUNC_QUALIFIER static tvec3<bool, P> call(tvec3<T, P> const & v, T const & epsilon)
+               {
+                       return tvec3<bool, P>(
+                               (abs(v.x) < epsilon),
+                               (abs(v.y) < epsilon),
+                               (abs(v.z) < epsilon));
+               }
+       };
+
+       template <typename T, precision P>
+       struct compute_isCompNull<T, P, tvec4>
+       {
+               GLM_FUNC_QUALIFIER static tvec4<bool, P> call(tvec4<T, P> const & v, T const & epsilon)
+               {
+                       return tvec4<bool, P>(
+                               (abs(v.x) < epsilon),
+                               (abs(v.y) < epsilon),
+                               (abs(v.z) < epsilon),
+                               (abs(v.w) < epsilon));
+               }
+       };
+
+}//namespace detail
+
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_QUALIFIER bool areCollinear
+       (
+               vecType<T, P> const & v0,
+               vecType<T, P> const & v1,
+               T const & epsilon
+       )
+       {
+               GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'areCollinear' only accept floating-point inputs");
+
+               return detail::compute_areCollinear<T, P, vecType>::call(v0, v1, epsilon);
+       }
+
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_QUALIFIER bool areOrthogonal
+       (
+               vecType<T, P> const & v0,
+               vecType<T, P> const & v1,
+               T const & epsilon
+       )
+       {
+               GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'areOrthogonal' only accept floating-point inputs");
+
+               return abs(dot(v0, v1)) <= max(
+                       static_cast<T>(1),
+                       length(v0)) * max(static_cast<T>(1), length(v1)) * epsilon;
+       }
+
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_QUALIFIER bool isNormalized
+       (
+               vecType<T, P> const & v,
+               T const & epsilon
+       )
+       {
+               GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'isNormalized' only accept floating-point inputs");
+
+               return abs(length(v) - static_cast<T>(1)) <= static_cast<T>(2) * epsilon;
+       }
+
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_QUALIFIER bool isNull
+       (
+               vecType<T, P> const & v,
+               T const & epsilon
+       )
+       {
+               GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'isNull' only accept floating-point inputs");
+
+               return length(v) <= epsilon;
+       }
+
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_QUALIFIER vecType<bool, P> isCompNull
+       (
+               vecType<T, P> const & v,
+               T const & epsilon
+       )
+       {
+               GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'isCompNull' only accept floating-point inputs");
+
+               return detail::compute_isCompNull<T, P, vecType>::call(v, epsilon);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec2<bool, P> isCompNull
+       (
+               tvec2<T, P> const & v,
+               T const & epsilon)
+       {
+               return tvec2<bool, P>(
+                       abs(v.x) < epsilon,
+                       abs(v.y) < epsilon);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec3<bool, P> isCompNull
+       (
+               tvec3<T, P> const & v,
+               T const & epsilon
+       )
+       {
+               return tvec3<bool, P>(
+                       abs(v.x) < epsilon,
+                       abs(v.y) < epsilon,
+                       abs(v.z) < epsilon);
+       }
+
+       template <typename T, precision P>
+       GLM_FUNC_QUALIFIER tvec4<bool, P> isCompNull
+       (
+               tvec4<T, P> const & v,
+               T const & epsilon
+       )
+       {
+               return tvec4<bool, P>(
+                       abs(v.x) < epsilon,
+                       abs(v.y) < epsilon,
+                       abs(v.z) < epsilon,
+                       abs(v.w) < epsilon);
+       }
+
+       template <typename T, precision P, template <typename, precision> class vecType>
+       GLM_FUNC_QUALIFIER bool areOrthonormal
+       (
+               vecType<T, P> const & v0,
+               vecType<T, P> const & v1,
+               T const & epsilon
+       )
+       {
+               return isNormalized(v0, epsilon) && isNormalized(v1, epsilon) && (abs(dot(v0, v1)) <= epsilon);
+       }
+
+}//namespace glm
diff --git a/include/glm/gtx/wrap.hpp b/include/glm/gtx/wrap.hpp
new file mode 100644 (file)
index 0000000..cf21d6f
--- /dev/null
@@ -0,0 +1,74 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtx_wrap
+/// @file glm/gtx/wrap.hpp
+/// @date 2009-11-25 / 2011-06-07
+/// @author Christophe Riccio
+///
+/// @see core (dependence)
+///
+/// @defgroup gtx_wrap GLM_GTX_wrap
+/// @ingroup gtx
+/// 
+/// @brief Wrapping mode of texture coordinates.
+/// 
+/// <glm/gtx/wrap.hpp> need to be included to use these functionalities.
+///////////////////////////////////////////////////////////////////////////////////
+
+#pragma once
+
+// Dependency:
+#include "../glm.hpp"
+
+#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
+#      pragma message("GLM: GLM_GTX_wrap extension included")
+#endif
+
+namespace glm
+{
+       /// @addtogroup gtx_wrap
+       /// @{
+
+       /// Simulate GL_CLAMP OpenGL wrap mode
+       /// @see gtx_wrap extension.
+       template <typename genType> 
+       GLM_FUNC_DECL genType clamp(genType const & Texcoord);
+
+       /// Simulate GL_REPEAT OpenGL wrap mode
+       /// @see gtx_wrap extension.
+       template <typename genType> 
+       GLM_FUNC_DECL genType repeat(genType const & Texcoord);
+
+       /// Simulate GL_MIRROR_REPEAT OpenGL wrap mode
+       /// @see gtx_wrap extension.
+       template <typename genType> 
+       GLM_FUNC_DECL genType mirrorRepeat(genType const & Texcoord);
+
+       /// @}
+}// namespace glm
+
+#include "wrap.inl"
diff --git a/include/glm/gtx/wrap.inl b/include/glm/gtx/wrap.inl
new file mode 100644 (file)
index 0000000..5cd084e
--- /dev/null
@@ -0,0 +1,185 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref gtx_wrap
+/// @file glm/gtx/wrap.inl
+/// @date 2009-11-25 / 2011-06-07
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////
+
+namespace glm
+{
+       template <typename genType> 
+       GLM_FUNC_QUALIFIER genType clamp
+       (
+               genType const & Texcoord
+       )
+       {
+               return glm::clamp(Texcoord, genType(0), genType(1));
+       }
+
+       template <typename T, precision P> 
+       GLM_FUNC_QUALIFIER tvec2<T, P> clamp
+       (
+               tvec2<T, P> const & Texcoord
+       )
+       {
+               tvec2<T, P> Result;
+               for(typename tvec2<T, P>::size_type i = 0; i < tvec2<T, P>::value_size(); ++i)
+                       Result[i] = clamp(Texcoord[i]);
+               return Result;
+       }
+
+       template <typename T, precision P> 
+       GLM_FUNC_QUALIFIER tvec3<T, P> clamp
+       (
+               tvec3<T, P> const & Texcoord
+       )
+       {
+               tvec3<T, P> Result;
+               for(typename tvec3<T, P>::size_type i = 0; i < tvec3<T, P>::value_size(); ++i)
+                       Result[i] = clamp(Texcoord[i]);
+               return Result;
+       }
+
+       template <typename T, precision P> 
+       GLM_FUNC_QUALIFIER tvec4<T, P> clamp
+       (
+               tvec4<T, P> const & Texcoord
+       )
+       {
+               tvec4<T, P> Result;
+               for(typename tvec4<T, P>::size_type i = 0; i < tvec4<T, P>::value_size(); ++i)
+                       Result[i] = clamp(Texcoord[i]);
+               return Result;
+       }
+
+       ////////////////////////
+       // repeat
+
+       template <typename genType> 
+       GLM_FUNC_QUALIFIER genType repeat
+       (
+               genType const & Texcoord
+       )
+       {
+               return glm::fract(Texcoord);
+       }
+
+       template <typename T, precision P> 
+       GLM_FUNC_QUALIFIER tvec2<T, P> repeat
+       (
+               tvec2<T, P> const & Texcoord
+       )
+       {
+               tvec2<T, P> Result;
+               for(typename tvec2<T, P>::size_type i = 0; i < tvec2<T, P>::value_size(); ++i)
+                       Result[i] = repeat(Texcoord[i]);
+               return Result;
+       }
+
+       template <typename T, precision P> 
+       GLM_FUNC_QUALIFIER tvec3<T, P> repeat
+       (
+               tvec3<T, P> const & Texcoord
+       )
+       {
+               tvec3<T, P> Result;
+               for(typename tvec3<T, P>::size_type i = 0; i < tvec3<T, P>::value_size(); ++i)
+                       Result[i] = repeat(Texcoord[i]);
+               return Result;
+       }
+
+       template <typename T, precision P> 
+       GLM_FUNC_QUALIFIER tvec4<T, P> repeat
+       (
+               tvec4<T, P> const & Texcoord
+       )
+       {
+               tvec4<T, P> Result;
+               for(typename tvec4<T, P>::size_type i = 0; i < tvec4<T, P>::value_size(); ++i)
+                       Result[i] = repeat(Texcoord[i]);
+               return Result;
+       }
+
+       ////////////////////////
+       // mirrorRepeat
+
+       template <typename genType, precision P> 
+       GLM_FUNC_QUALIFIER genType mirrorRepeat
+       (
+               genType const & Texcoord
+       )
+       {
+               genType const Clamp = genType(int(glm::floor(Texcoord)) % 2);
+               genType const Floor = glm::floor(Texcoord);
+               genType const Rest = Texcoord - Floor;
+               genType const Mirror = Clamp + Rest;
+
+               genType Out;
+               if(Mirror >= genType(1))
+                       Out = genType(1) - Rest;
+               else
+                       Out = Rest;
+               return Out;
+       }
+
+       template <typename T, precision P> 
+       GLM_FUNC_QUALIFIER tvec2<T, P> mirrorRepeat
+       (
+               tvec2<T, P> const & Texcoord
+       )
+       {
+               tvec2<T, P> Result;
+               for(typename tvec2<T, P>::size_type i = 0; i < tvec2<T, P>::value_size(); ++i)
+                       Result[i] = mirrorRepeat(Texcoord[i]);
+               return Result;
+       }
+
+       template <typename T, precision P> 
+       GLM_FUNC_QUALIFIER tvec3<T, P> mirrorRepeat
+       (
+               tvec3<T, P> const & Texcoord
+       )
+       {
+               tvec3<T, P> Result;
+               for(typename tvec3<T, P>::size_type i = 0; i < tvec3<T, P>::value_size(); ++i)
+                       Result[i] = mirrorRepeat(Texcoord[i]);
+               return Result;
+       }
+
+       template <typename T, precision P> 
+       GLM_FUNC_QUALIFIER tvec4<T, P> mirrorRepeat
+       (
+               tvec4<T, P> const & Texcoord
+       )
+       {
+               tvec4<T, P> Result;
+               for(typename tvec4<T, P>::size_type i = 0; i < tvec4<T, P>::value_size(); ++i)
+                       Result[i] = mirrorRepeat(Texcoord[i]);
+               return Result;
+       }
+}//namespace glm
diff --git a/include/glm/integer.hpp b/include/glm/integer.hpp
new file mode 100644 (file)
index 0000000..b21a8ea
--- /dev/null
@@ -0,0 +1,35 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref core
+/// @file glm/integer.hpp
+/// @date 2013-12-24 / 2013-12-24
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////
+
+#pragma once
+
+#include "detail/func_integer.hpp"
diff --git a/include/glm/mat2x2.hpp b/include/glm/mat2x2.hpp
new file mode 100644 (file)
index 0000000..84d5598
--- /dev/null
@@ -0,0 +1,81 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref core
+/// @file glm/mat2x2.hpp
+/// @date 2013-12-24 / 2013-12-24
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////
+
+#pragma once
+
+#include "detail/type_mat2x2.hpp"
+
+namespace glm
+{
+       /// 2 columns of 2 components matrix of low precision floating-point numbers.
+       /// There is no guarantee on the actual precision.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tmat2x2<float, lowp>            lowp_mat2;
+       
+       /// 2 columns of 2 components matrix of medium precision floating-point numbers.
+       /// There is no guarantee on the actual precision.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tmat2x2<float, mediump>         mediump_mat2;
+       
+       /// 2 columns of 2 components matrix of high precision floating-point numbers.
+       /// There is no guarantee on the actual precision.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tmat2x2<float, highp>           highp_mat2;
+       
+       /// 2 columns of 2 components matrix of low precision floating-point numbers.
+       /// There is no guarantee on the actual precision.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tmat2x2<float, lowp>            lowp_mat2x2;
+       
+       /// 2 columns of 2 components matrix of medium precision floating-point numbers.
+       /// There is no guarantee on the actual precision.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tmat2x2<float, mediump>         mediump_mat2x2;
+       
+       /// 2 columns of 2 components matrix of high precision floating-point numbers.
+       /// There is no guarantee on the actual precision.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tmat2x2<float, highp>           highp_mat2x2;
+
+}//namespace glm
diff --git a/include/glm/mat2x3.hpp b/include/glm/mat2x3.hpp
new file mode 100644 (file)
index 0000000..b6c98f6
--- /dev/null
@@ -0,0 +1,61 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref core
+/// @file glm/mat2x3.hpp
+/// @date 2013-12-24 / 2013-12-24
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////
+
+#pragma once
+
+#include "detail/type_mat2x3.hpp"
+
+namespace glm
+{
+       /// 2 columns of 3 components matrix of low precision floating-point numbers.
+       /// There is no guarantee on the actual precision.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tmat2x3<float, lowp>            lowp_mat2x3;
+
+       /// 2 columns of 3 components matrix of medium precision floating-point numbers.
+       /// There is no guarantee on the actual precision.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tmat2x3<float, mediump>         mediump_mat2x3;
+
+       /// 2 columns of 3 components matrix of high precision floating-point numbers.
+       /// There is no guarantee on the actual precision.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tmat2x3<float, highp>           highp_mat2x3;
+
+}//namespace glm
+
diff --git a/include/glm/mat2x4.hpp b/include/glm/mat2x4.hpp
new file mode 100644 (file)
index 0000000..c96b4c2
--- /dev/null
@@ -0,0 +1,60 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref core
+/// @file glm/mat2x4.hpp
+/// @date 2013-12-24 / 2013-12-24
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////
+
+#pragma once
+
+#include "detail/type_mat2x4.hpp"
+
+namespace glm
+{
+       /// 2 columns of 4 components matrix of low precision floating-point numbers.
+       /// There is no guarantee on the actual precision.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tmat2x4<float, lowp>            lowp_mat2x4;
+       
+       /// 2 columns of 4 components matrix of medium precision floating-point numbers.
+       /// There is no guarantee on the actual precision.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tmat2x4<float, mediump>         mediump_mat2x4;
+       
+       /// 2 columns of 4 components matrix of high precision floating-point numbers.
+       /// There is no guarantee on the actual precision.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tmat2x4<float, highp>           highp_mat2x4;
+
+}//namespace glm
diff --git a/include/glm/mat3x2.hpp b/include/glm/mat3x2.hpp
new file mode 100644 (file)
index 0000000..9206ebf
--- /dev/null
@@ -0,0 +1,60 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref core
+/// @file glm/mat3x2.hpp
+/// @date 2013-12-24 / 2013-12-24
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////
+
+#pragma once
+
+#include "detail/type_mat3x2.hpp"
+
+namespace glm
+{
+       /// 3 columns of 2 components matrix of low precision floating-point numbers.
+       /// There is no guarantee on the actual precision.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tmat3x2<float, lowp>            lowp_mat3x2;
+       
+       /// 3 columns of 2 components matrix of medium precision floating-point numbers.
+       /// There is no guarantee on the actual precision.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tmat3x2<float, mediump>         mediump_mat3x2;
+       
+       /// 3 columns of 2 components matrix of high precision floating-point numbers.
+       /// There is no guarantee on the actual precision.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tmat3x2<float, highp>           highp_mat3x2;
+
+}//namespace
diff --git a/include/glm/mat3x3.hpp b/include/glm/mat3x3.hpp
new file mode 100644 (file)
index 0000000..55882ba
--- /dev/null
@@ -0,0 +1,81 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref core
+/// @file glm/mat3x3.hpp
+/// @date 2013-12-24 / 2013-12-24
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////
+
+#pragma once
+
+#include "detail/type_mat3x3.hpp"
+
+namespace glm
+{
+       /// 3 columns of 3 components matrix of low precision floating-point numbers.
+       /// There is no guarantee on the actual precision.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tmat3x3<float, lowp>            lowp_mat3;
+       
+       /// 3 columns of 3 components matrix of medium precision floating-point numbers.
+       /// There is no guarantee on the actual precision.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tmat3x3<float, mediump>         mediump_mat3;
+       
+       /// 3 columns of 3 components matrix of high precision floating-point numbers.
+       /// There is no guarantee on the actual precision.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tmat3x3<float, highp>           highp_mat3;
+       
+       /// 3 columns of 3 components matrix of low precision floating-point numbers.
+       /// There is no guarantee on the actual precision.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tmat3x3<float, lowp>            lowp_mat3x3;
+       
+       /// 3 columns of 3 components matrix of medium precision floating-point numbers.
+       /// There is no guarantee on the actual precision.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tmat3x3<float, mediump>         mediump_mat3x3;
+       
+       /// 3 columns of 3 components matrix of high precision floating-point numbers.
+       /// There is no guarantee on the actual precision.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tmat3x3<float, highp>           highp_mat3x3;
+
+}//namespace glm
diff --git a/include/glm/mat3x4.hpp b/include/glm/mat3x4.hpp
new file mode 100644 (file)
index 0000000..f77f544
--- /dev/null
@@ -0,0 +1,60 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref core
+/// @file glm/mat3x4.hpp
+/// @date 2013-12-24 / 2013-12-24
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////
+
+#pragma once
+
+#include "detail/type_mat3x4.hpp"
+
+namespace glm
+{
+       /// 3 columns of 4 components matrix of low precision floating-point numbers.
+       /// There is no guarantee on the actual precision.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tmat3x4<float, lowp>            lowp_mat3x4;
+       
+       /// 3 columns of 4 components matrix of medium precision floating-point numbers.
+       /// There is no guarantee on the actual precision.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tmat3x4<float, mediump>         mediump_mat3x4;
+       
+       /// 3 columns of 4 components matrix of high precision floating-point numbers.
+       /// There is no guarantee on the actual precision.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tmat3x4<float, highp>           highp_mat3x4;
+
+}//namespace glm
diff --git a/include/glm/mat4x2.hpp b/include/glm/mat4x2.hpp
new file mode 100644 (file)
index 0000000..2e54405
--- /dev/null
@@ -0,0 +1,60 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref core
+/// @file glm/mat4x2.hpp
+/// @date 2013-12-24 / 2013-12-24
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////
+
+#pragma once
+
+#include "detail/type_mat4x2.hpp"
+
+namespace glm
+{
+       /// 4 columns of 2 components matrix of low precision floating-point numbers.
+       /// There is no guarantee on the actual precision.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tmat4x2<float, lowp>            lowp_mat4x2;
+       
+       /// 4 columns of 2 components matrix of medium precision floating-point numbers.
+       /// There is no guarantee on the actual precision.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tmat4x2<float, mediump>         mediump_mat4x2;
+       
+       /// 4 columns of 2 components matrix of high precision floating-point numbers.
+       /// There is no guarantee on the actual precision.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tmat4x2<float, highp>           highp_mat4x2;
+
+}//namespace glm
diff --git a/include/glm/mat4x3.hpp b/include/glm/mat4x3.hpp
new file mode 100644 (file)
index 0000000..52750a2
--- /dev/null
@@ -0,0 +1,60 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref core
+/// @file glm/mat4x4.hpp
+/// @date 2013-12-24 / 2013-12-24
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////
+
+#pragma once
+
+#include "detail/type_mat4x3.hpp"
+
+namespace glm
+{
+       /// 4 columns of 3 components matrix of low precision floating-point numbers.
+       /// There is no guarantee on the actual precision.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tmat4x3<float, lowp>            lowp_mat4x3;
+       
+       /// 4 columns of 3 components matrix of medium precision floating-point numbers.
+       /// There is no guarantee on the actual precision.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tmat4x3<float, mediump>         mediump_mat4x3;
+       
+       /// 4 columns of 3 components matrix of high precision floating-point numbers.
+       /// There is no guarantee on the actual precision.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tmat4x3<float, highp>           highp_mat4x3;
+
+}//namespace glm
diff --git a/include/glm/mat4x4.hpp b/include/glm/mat4x4.hpp
new file mode 100644 (file)
index 0000000..2744237
--- /dev/null
@@ -0,0 +1,81 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref core
+/// @file glm/mat4x4.hpp
+/// @date 2013-12-24 / 2013-12-24
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////
+
+#pragma once
+
+#include "detail/type_mat4x4.hpp"
+
+namespace glm
+{
+       /// 4 columns of 4 components matrix of low precision floating-point numbers.
+       /// There is no guarantee on the actual precision.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tmat4x4<float, lowp>            lowp_mat4;
+       
+       /// 4 columns of 4 components matrix of medium precision floating-point numbers.
+       /// There is no guarantee on the actual precision.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tmat4x4<float, mediump>         mediump_mat4;
+       
+       /// 4 columns of 4 components matrix of high precision floating-point numbers.
+       /// There is no guarantee on the actual precision.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tmat4x4<float, highp>           highp_mat4;
+       
+       /// 4 columns of 4 components matrix of low precision floating-point numbers.
+       /// There is no guarantee on the actual precision.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tmat4x4<float, lowp>            lowp_mat4x4;
+       
+       /// 4 columns of 4 components matrix of medium precision floating-point numbers.
+       /// There is no guarantee on the actual precision.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tmat4x4<float, mediump>         mediump_mat4x4;
+       
+       /// 4 columns of 4 components matrix of high precision floating-point numbers.
+       /// There is no guarantee on the actual precision.
+       ///
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+       /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+       typedef tmat4x4<float, highp>           highp_mat4x4;
+
+}//namespace glm
diff --git a/include/glm/matrix.hpp b/include/glm/matrix.hpp
new file mode 100644 (file)
index 0000000..ee96675
--- /dev/null
@@ -0,0 +1,35 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref core
+/// @file glm/matrix.hpp
+/// @date 2013-12-24 / 2013-12-24
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////
+
+#pragma once
+
+#include "detail/func_matrix.hpp"
diff --git a/include/glm/packing.hpp b/include/glm/packing.hpp
new file mode 100644 (file)
index 0000000..1786fd5
--- /dev/null
@@ -0,0 +1,35 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref core
+/// @file glm/packing.hpp
+/// @date 2013-12-24 / 2013-12-24
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////
+
+#pragma once
+
+#include "detail/func_packing.hpp"
diff --git a/include/glm/trigonometric.hpp b/include/glm/trigonometric.hpp
new file mode 100644 (file)
index 0000000..21ba20a
--- /dev/null
@@ -0,0 +1,35 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref core
+/// @file glm/trigonometric.hpp
+/// @date 2013-12-24 / 2013-12-24
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////
+
+#pragma once
+
+#include "detail/func_trigonometric.hpp"
diff --git a/include/glm/vec2.hpp b/include/glm/vec2.hpp
new file mode 100644 (file)
index 0000000..42633ff
--- /dev/null
@@ -0,0 +1,35 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref core
+/// @file glm/vec2.hpp
+/// @date 2013-12-24 / 2013-12-24
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////
+
+#pragma once
+
+#include "detail/type_vec2.hpp"
diff --git a/include/glm/vec3.hpp b/include/glm/vec3.hpp
new file mode 100644 (file)
index 0000000..3e29916
--- /dev/null
@@ -0,0 +1,35 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref core
+/// @file glm/vec3.hpp
+/// @date 2013-12-24 / 2013-12-24
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////
+
+#pragma once
+
+#include "detail/type_vec3.hpp"
diff --git a/include/glm/vec4.hpp b/include/glm/vec4.hpp
new file mode 100644 (file)
index 0000000..91095e8
--- /dev/null
@@ -0,0 +1,35 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref core
+/// @file glm/vec4.hpp
+/// @date 2013-12-24 / 2013-12-24
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////
+
+#pragma once
+
+#include "detail/type_vec4.hpp"
diff --git a/include/glm/vector_relational.hpp b/include/glm/vector_relational.hpp
new file mode 100644 (file)
index 0000000..aff9327
--- /dev/null
@@ -0,0 +1,35 @@
+///////////////////////////////////////////////////////////////////////////////////
+/// OpenGL Mathematics (glm.g-truc.net)
+///
+/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
+/// 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.
+/// 
+/// Restrictions:
+///            By making use of the Software for military purposes, you choose to make
+///            a Bunny unhappy.
+/// 
+/// 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN
+/// THE SOFTWARE.
+///
+/// @ref core
+/// @file glm/vector_relational.hpp
+/// @date 2013-12-24 / 2013-12-24
+/// @author Christophe Riccio
+///////////////////////////////////////////////////////////////////////////////////
+
+#pragma once
+
+#include "detail/func_vector_relational.hpp"
diff --git a/include/zconf.h b/include/zconf.h
new file mode 100644 (file)
index 0000000..9987a77
--- /dev/null
@@ -0,0 +1,511 @@
+/* zconf.h -- configuration of the zlib compression library
+ * Copyright (C) 1995-2013 Jean-loup Gailly.
+ * For conditions of distribution and use, see copyright notice in zlib.h
+ */
+
+/* @(#) $Id$ */
+
+#ifndef ZCONF_H
+#define ZCONF_H
+
+/*
+ * If you *really* need a unique prefix for all types and library functions,
+ * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it.
+ * Even better than compiling with -DZ_PREFIX would be to use configure to set
+ * this permanently in zconf.h using "./configure --zprefix".
+ */
+#ifdef Z_PREFIX     /* may be set to #if 1 by ./configure */
+#  define Z_PREFIX_SET
+
+/* all linked symbols */
+#  define _dist_code            z__dist_code
+#  define _length_code          z__length_code
+#  define _tr_align             z__tr_align
+#  define _tr_flush_bits        z__tr_flush_bits
+#  define _tr_flush_block       z__tr_flush_block
+#  define _tr_init              z__tr_init
+#  define _tr_stored_block      z__tr_stored_block
+#  define _tr_tally             z__tr_tally
+#  define adler32               z_adler32
+#  define adler32_combine       z_adler32_combine
+#  define adler32_combine64     z_adler32_combine64
+#  ifndef Z_SOLO
+#    define compress              z_compress
+#    define compress2             z_compress2
+#    define compressBound         z_compressBound
+#  endif
+#  define crc32                 z_crc32
+#  define crc32_combine         z_crc32_combine
+#  define crc32_combine64       z_crc32_combine64
+#  define deflate               z_deflate
+#  define deflateBound          z_deflateBound
+#  define deflateCopy           z_deflateCopy
+#  define deflateEnd            z_deflateEnd
+#  define deflateInit2_         z_deflateInit2_
+#  define deflateInit_          z_deflateInit_
+#  define deflateParams         z_deflateParams
+#  define deflatePending        z_deflatePending
+#  define deflatePrime          z_deflatePrime
+#  define deflateReset          z_deflateReset
+#  define deflateResetKeep      z_deflateResetKeep
+#  define deflateSetDictionary  z_deflateSetDictionary
+#  define deflateSetHeader      z_deflateSetHeader
+#  define deflateTune           z_deflateTune
+#  define deflate_copyright     z_deflate_copyright
+#  define get_crc_table         z_get_crc_table
+#  ifndef Z_SOLO
+#    define gz_error              z_gz_error
+#    define gz_intmax             z_gz_intmax
+#    define gz_strwinerror        z_gz_strwinerror
+#    define gzbuffer              z_gzbuffer
+#    define gzclearerr            z_gzclearerr
+#    define gzclose               z_gzclose
+#    define gzclose_r             z_gzclose_r
+#    define gzclose_w             z_gzclose_w
+#    define gzdirect              z_gzdirect
+#    define gzdopen               z_gzdopen
+#    define gzeof                 z_gzeof
+#    define gzerror               z_gzerror
+#    define gzflush               z_gzflush
+#    define gzgetc                z_gzgetc
+#    define gzgetc_               z_gzgetc_
+#    define gzgets                z_gzgets
+#    define gzoffset              z_gzoffset
+#    define gzoffset64            z_gzoffset64
+#    define gzopen                z_gzopen
+#    define gzopen64              z_gzopen64
+#    ifdef _WIN32
+#      define gzopen_w              z_gzopen_w
+#    endif
+#    define gzprintf              z_gzprintf
+#    define gzvprintf             z_gzvprintf
+#    define gzputc                z_gzputc
+#    define gzputs                z_gzputs
+#    define gzread                z_gzread
+#    define gzrewind              z_gzrewind
+#    define gzseek                z_gzseek
+#    define gzseek64              z_gzseek64
+#    define gzsetparams           z_gzsetparams
+#    define gztell                z_gztell
+#    define gztell64              z_gztell64
+#    define gzungetc              z_gzungetc
+#    define gzwrite               z_gzwrite
+#  endif
+#  define inflate               z_inflate
+#  define inflateBack           z_inflateBack
+#  define inflateBackEnd        z_inflateBackEnd
+#  define inflateBackInit_      z_inflateBackInit_
+#  define inflateCopy           z_inflateCopy
+#  define inflateEnd            z_inflateEnd
+#  define inflateGetHeader      z_inflateGetHeader
+#  define inflateInit2_         z_inflateInit2_
+#  define inflateInit_          z_inflateInit_
+#  define inflateMark           z_inflateMark
+#  define inflatePrime          z_inflatePrime
+#  define inflateReset          z_inflateReset
+#  define inflateReset2         z_inflateReset2
+#  define inflateSetDictionary  z_inflateSetDictionary
+#  define inflateGetDictionary  z_inflateGetDictionary
+#  define inflateSync           z_inflateSync
+#  define inflateSyncPoint      z_inflateSyncPoint
+#  define inflateUndermine      z_inflateUndermine
+#  define inflateResetKeep      z_inflateResetKeep
+#  define inflate_copyright     z_inflate_copyright
+#  define inflate_fast          z_inflate_fast
+#  define inflate_table         z_inflate_table
+#  ifndef Z_SOLO
+#    define uncompress            z_uncompress
+#  endif
+#  define zError                z_zError
+#  ifndef Z_SOLO
+#    define zcalloc               z_zcalloc
+#    define zcfree                z_zcfree
+#  endif
+#  define zlibCompileFlags      z_zlibCompileFlags
+#  define zlibVersion           z_zlibVersion
+
+/* all zlib typedefs in zlib.h and zconf.h */
+#  define Byte                  z_Byte
+#  define Bytef                 z_Bytef
+#  define alloc_func            z_alloc_func
+#  define charf                 z_charf
+#  define free_func             z_free_func
+#  ifndef Z_SOLO
+#    define gzFile                z_gzFile
+#  endif
+#  define gz_header             z_gz_header
+#  define gz_headerp            z_gz_headerp
+#  define in_func               z_in_func
+#  define intf                  z_intf
+#  define out_func              z_out_func
+#  define uInt                  z_uInt
+#  define uIntf                 z_uIntf
+#  define uLong                 z_uLong
+#  define uLongf                z_uLongf
+#  define voidp                 z_voidp
+#  define voidpc                z_voidpc
+#  define voidpf                z_voidpf
+
+/* all zlib structs in zlib.h and zconf.h */
+#  define gz_header_s           z_gz_header_s
+#  define internal_state        z_internal_state
+
+#endif
+
+#if defined(__MSDOS__) && !defined(MSDOS)
+#  define MSDOS
+#endif
+#if (defined(OS_2) || defined(__OS2__)) && !defined(OS2)
+#  define OS2
+#endif
+#if defined(_WINDOWS) && !defined(WINDOWS)
+#  define WINDOWS
+#endif
+#if defined(_WIN32) || defined(_WIN32_WCE) || defined(__WIN32__)
+#  ifndef WIN32
+#    define WIN32
+#  endif
+#endif
+#if (defined(MSDOS) || defined(OS2) || defined(WINDOWS)) && !defined(WIN32)
+#  if !defined(__GNUC__) && !defined(__FLAT__) && !defined(__386__)
+#    ifndef SYS16BIT
+#      define SYS16BIT
+#    endif
+#  endif
+#endif
+
+/*
+ * Compile with -DMAXSEG_64K if the alloc function cannot allocate more
+ * than 64k bytes at a time (needed on systems with 16-bit int).
+ */
+#ifdef SYS16BIT
+#  define MAXSEG_64K
+#endif
+#ifdef MSDOS
+#  define UNALIGNED_OK
+#endif
+
+#ifdef __STDC_VERSION__
+#  ifndef STDC
+#    define STDC
+#  endif
+#  if __STDC_VERSION__ >= 199901L
+#    ifndef STDC99
+#      define STDC99
+#    endif
+#  endif
+#endif
+#if !defined(STDC) && (defined(__STDC__) || defined(__cplusplus))
+#  define STDC
+#endif
+#if !defined(STDC) && (defined(__GNUC__) || defined(__BORLANDC__))
+#  define STDC
+#endif
+#if !defined(STDC) && (defined(MSDOS) || defined(WINDOWS) || defined(WIN32))
+#  define STDC
+#endif
+#if !defined(STDC) && (defined(OS2) || defined(__HOS_AIX__))
+#  define STDC
+#endif
+
+#if defined(__OS400__) && !defined(STDC)    /* iSeries (formerly AS/400). */
+#  define STDC
+#endif
+
+#ifndef STDC
+#  ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */
+#    define const       /* note: need a more gentle solution here */
+#  endif
+#endif
+
+#if defined(ZLIB_CONST) && !defined(z_const)
+#  define z_const const
+#else
+#  define z_const
+#endif
+
+/* Some Mac compilers merge all .h files incorrectly: */
+#if defined(__MWERKS__)||defined(applec)||defined(THINK_C)||defined(__SC__)
+#  define NO_DUMMY_DECL
+#endif
+
+/* Maximum value for memLevel in deflateInit2 */
+#ifndef MAX_MEM_LEVEL
+#  ifdef MAXSEG_64K
+#    define MAX_MEM_LEVEL 8
+#  else
+#    define MAX_MEM_LEVEL 9
+#  endif
+#endif
+
+/* Maximum value for windowBits in deflateInit2 and inflateInit2.
+ * WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files
+ * created by gzip. (Files created by minigzip can still be extracted by
+ * gzip.)
+ */
+#ifndef MAX_WBITS
+#  define MAX_WBITS   15 /* 32K LZ77 window */
+#endif
+
+/* The memory requirements for deflate are (in bytes):
+            (1 << (windowBits+2)) +  (1 << (memLevel+9))
+ that is: 128K for windowBits=15  +  128K for memLevel = 8  (default values)
+ plus a few kilobytes for small objects. For example, if you want to reduce
+ the default memory requirements from 256K to 128K, compile with
+     make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7"
+ Of course this will generally degrade compression (there's no free lunch).
+
+   The memory requirements for inflate are (in bytes) 1 << windowBits
+ that is, 32K for windowBits=15 (default value) plus a few kilobytes
+ for small objects.
+*/
+
+                        /* Type declarations */
+
+#ifndef OF /* function prototypes */
+#  ifdef STDC
+#    define OF(args)  args
+#  else
+#    define OF(args)  ()
+#  endif
+#endif
+
+#ifndef Z_ARG /* function prototypes for stdarg */
+#  if defined(STDC) || defined(Z_HAVE_STDARG_H)
+#    define Z_ARG(args)  args
+#  else
+#    define Z_ARG(args)  ()
+#  endif
+#endif
+
+/* The following definitions for FAR are needed only for MSDOS mixed
+ * model programming (small or medium model with some far allocations).
+ * This was tested only with MSC; for other MSDOS compilers you may have
+ * to define NO_MEMCPY in zutil.h.  If you don't need the mixed model,
+ * just define FAR to be empty.
+ */
+#ifdef SYS16BIT
+#  if defined(M_I86SM) || defined(M_I86MM)
+     /* MSC small or medium model */
+#    define SMALL_MEDIUM
+#    ifdef _MSC_VER
+#      define FAR _far
+#    else
+#      define FAR far
+#    endif
+#  endif
+#  if (defined(__SMALL__) || defined(__MEDIUM__))
+     /* Turbo C small or medium model */
+#    define SMALL_MEDIUM
+#    ifdef __BORLANDC__
+#      define FAR _far
+#    else
+#      define FAR far
+#    endif
+#  endif
+#endif
+
+#if defined(WINDOWS) || defined(WIN32)
+   /* If building or using zlib as a DLL, define ZLIB_DLL.
+    * This is not mandatory, but it offers a little performance increase.
+    */
+#  ifdef ZLIB_DLL
+#    if defined(WIN32) && (!defined(__BORLANDC__) || (__BORLANDC__ >= 0x500))
+#      ifdef ZLIB_INTERNAL
+#        define ZEXTERN extern __declspec(dllexport)
+#      else
+#        define ZEXTERN extern __declspec(dllimport)
+#      endif
+#    endif
+#  endif  /* ZLIB_DLL */
+   /* If building or using zlib with the WINAPI/WINAPIV calling convention,
+    * define ZLIB_WINAPI.
+    * Caution: the standard ZLIB1.DLL is NOT compiled using ZLIB_WINAPI.
+    */
+#  ifdef ZLIB_WINAPI
+#    ifdef FAR
+#      undef FAR
+#    endif
+#    include <windows.h>
+     /* No need for _export, use ZLIB.DEF instead. */
+     /* For complete Windows compatibility, use WINAPI, not __stdcall. */
+#    define ZEXPORT WINAPI
+#    ifdef WIN32
+#      define ZEXPORTVA WINAPIV
+#    else
+#      define ZEXPORTVA FAR CDECL
+#    endif
+#  endif
+#endif
+
+#if defined (__BEOS__)
+#  ifdef ZLIB_DLL
+#    ifdef ZLIB_INTERNAL
+#      define ZEXPORT   __declspec(dllexport)
+#      define ZEXPORTVA __declspec(dllexport)
+#    else
+#      define ZEXPORT   __declspec(dllimport)
+#      define ZEXPORTVA __declspec(dllimport)
+#    endif
+#  endif
+#endif
+
+#ifndef ZEXTERN
+#  define ZEXTERN extern
+#endif
+#ifndef ZEXPORT
+#  define ZEXPORT
+#endif
+#ifndef ZEXPORTVA
+#  define ZEXPORTVA
+#endif
+
+#ifndef FAR
+#  define FAR
+#endif
+
+#if !defined(__MACTYPES__)
+typedef unsigned char  Byte;  /* 8 bits */
+#endif
+typedef unsigned int   uInt;  /* 16 bits or more */
+typedef unsigned long  uLong; /* 32 bits or more */
+
+#ifdef SMALL_MEDIUM
+   /* Borland C/C++ and some old MSC versions ignore FAR inside typedef */
+#  define Bytef Byte FAR
+#else
+   typedef Byte  FAR Bytef;
+#endif
+typedef char  FAR charf;
+typedef int   FAR intf;
+typedef uInt  FAR uIntf;
+typedef uLong FAR uLongf;
+
+#ifdef STDC
+   typedef void const *voidpc;
+   typedef void FAR   *voidpf;
+   typedef void       *voidp;
+#else
+   typedef Byte const *voidpc;
+   typedef Byte FAR   *voidpf;
+   typedef Byte       *voidp;
+#endif
+
+#if !defined(Z_U4) && !defined(Z_SOLO) && defined(STDC)
+#  include <limits.h>
+#  if (UINT_MAX == 0xffffffffUL)
+#    define Z_U4 unsigned
+#  elif (ULONG_MAX == 0xffffffffUL)
+#    define Z_U4 unsigned long
+#  elif (USHRT_MAX == 0xffffffffUL)
+#    define Z_U4 unsigned short
+#  endif
+#endif
+
+#ifdef Z_U4
+   typedef Z_U4 z_crc_t;
+#else
+   typedef unsigned long z_crc_t;
+#endif
+
+#ifdef HAVE_UNISTD_H    /* may be set to #if 1 by ./configure */
+#  define Z_HAVE_UNISTD_H
+#endif
+
+#ifdef HAVE_STDARG_H    /* may be set to #if 1 by ./configure */
+#  define Z_HAVE_STDARG_H
+#endif
+
+#ifdef STDC
+#  ifndef Z_SOLO
+#    include <sys/types.h>      /* for off_t */
+#  endif
+#endif
+
+#if defined(STDC) || defined(Z_HAVE_STDARG_H)
+#  ifndef Z_SOLO
+#    include <stdarg.h>         /* for va_list */
+#  endif
+#endif
+
+#ifdef _WIN32
+#  ifndef Z_SOLO
+#    include <stddef.h>         /* for wchar_t */
+#  endif
+#endif
+
+/* a little trick to accommodate both "#define _LARGEFILE64_SOURCE" and
+ * "#define _LARGEFILE64_SOURCE 1" as requesting 64-bit operations, (even
+ * though the former does not conform to the LFS document), but considering
+ * both "#undef _LARGEFILE64_SOURCE" and "#define _LARGEFILE64_SOURCE 0" as
+ * equivalently requesting no 64-bit operations
+ */
+#if defined(_LARGEFILE64_SOURCE) && -_LARGEFILE64_SOURCE - -1 == 1
+#  undef _LARGEFILE64_SOURCE
+#endif
+
+#if defined(__WATCOMC__) && !defined(Z_HAVE_UNISTD_H)
+#  define Z_HAVE_UNISTD_H
+#endif
+#ifndef Z_SOLO
+#  if defined(Z_HAVE_UNISTD_H) || defined(_LARGEFILE64_SOURCE)
+#    include <unistd.h>         /* for SEEK_*, off_t, and _LFS64_LARGEFILE */
+#    ifdef VMS
+#      include <unixio.h>       /* for off_t */
+#    endif
+#    ifndef z_off_t
+#      define z_off_t off_t
+#    endif
+#  endif
+#endif
+
+#if defined(_LFS64_LARGEFILE) && _LFS64_LARGEFILE-0
+#  define Z_LFS64
+#endif
+
+#if defined(_LARGEFILE64_SOURCE) && defined(Z_LFS64)
+#  define Z_LARGE64
+#endif
+
+#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS-0 == 64 && defined(Z_LFS64)
+#  define Z_WANT64
+#endif
+
+#if !defined(SEEK_SET) && !defined(Z_SOLO)
+#  define SEEK_SET        0       /* Seek from beginning of file.  */
+#  define SEEK_CUR        1       /* Seek from current position.  */
+#  define SEEK_END        2       /* Set file pointer to EOF plus "offset" */
+#endif
+
+#ifndef z_off_t
+#  define z_off_t long
+#endif
+
+#if !defined(_WIN32) && defined(Z_LARGE64)
+#  define z_off64_t off64_t
+#else
+#  if defined(_WIN32) && !defined(__GNUC__) && !defined(Z_SOLO)
+#    define z_off64_t __int64
+#  else
+#    define z_off64_t z_off_t
+#  endif
+#endif
+
+/* MVS linker does not support external names larger than 8 bytes */
+#if defined(__MVS__)
+  #pragma map(deflateInit_,"DEIN")
+  #pragma map(deflateInit2_,"DEIN2")
+  #pragma map(deflateEnd,"DEEND")
+  #pragma map(deflateBound,"DEBND")
+  #pragma map(inflateInit_,"ININ")
+  #pragma map(inflateInit2_,"ININ2")
+  #pragma map(inflateEnd,"INEND")
+  #pragma map(inflateSync,"INSY")
+  #pragma map(inflateSetDictionary,"INSEDI")
+  #pragma map(compressBound,"CMBND")
+  #pragma map(inflate_table,"INTABL")
+  #pragma map(inflate_fast,"INFA")
+  #pragma map(inflate_copyright,"INCOPY")
+#endif
+
+#endif /* ZCONF_H */
diff --git a/include/zlib.h b/include/zlib.h
new file mode 100644 (file)
index 0000000..3e0c767
--- /dev/null
@@ -0,0 +1,1768 @@
+/* zlib.h -- interface of the 'zlib' general purpose compression library
+  version 1.2.8, April 28th, 2013
+
+  Copyright (C) 1995-2013 Jean-loup Gailly and Mark Adler
+
+  This software is provided 'as-is', without any express or implied
+  warranty.  In no event will the authors be held liable for any damages
+  arising from the use of this software.
+
+  Permission is granted to anyone to use this software for any purpose,
+  including commercial applications, and to alter it and redistribute it
+  freely, subject to the following restrictions:
+
+  1. The origin of this software must not be misrepresented; you must not
+     claim that you wrote the original software. If you use this software
+     in a product, an acknowledgment in the product documentation would be
+     appreciated but is not required.
+  2. Altered source versions must be plainly marked as such, and must not be
+     misrepresented as being the original software.
+  3. This notice may not be removed or altered from any source distribution.
+
+  Jean-loup Gailly        Mark Adler
+  jloup@gzip.org          madler@alumni.caltech.edu
+
+
+  The data format used by the zlib library is described by RFCs (Request for
+  Comments) 1950 to 1952 in the files http://tools.ietf.org/html/rfc1950
+  (zlib format), rfc1951 (deflate format) and rfc1952 (gzip format).
+*/
+
+#ifndef ZLIB_H
+#define ZLIB_H
+
+#include "zconf.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define ZLIB_VERSION "1.2.8"
+#define ZLIB_VERNUM 0x1280
+#define ZLIB_VER_MAJOR 1
+#define ZLIB_VER_MINOR 2
+#define ZLIB_VER_REVISION 8
+#define ZLIB_VER_SUBREVISION 0
+
+/*
+    The 'zlib' compression library provides in-memory compression and
+  decompression functions, including integrity checks of the uncompressed data.
+  This version of the library supports only one compression method (deflation)
+  but other algorithms will be added later and will have the same stream
+  interface.
+
+    Compression can be done in a single step if the buffers are large enough,
+  or can be done by repeated calls of the compression function.  In the latter
+  case, the application must provide more input and/or consume the output
+  (providing more output space) before each call.
+
+    The compressed data format used by default by the in-memory functions is
+  the zlib format, which is a zlib wrapper documented in RFC 1950, wrapped
+  around a deflate stream, which is itself documented in RFC 1951.
+
+    The library also supports reading and writing files in gzip (.gz) format
+  with an interface similar to that of stdio using the functions that start
+  with "gz".  The gzip format is different from the zlib format.  gzip is a
+  gzip wrapper, documented in RFC 1952, wrapped around a deflate stream.
+
+    This library can optionally read and write gzip streams in memory as well.
+
+    The zlib format was designed to be compact and fast for use in memory
+  and on communications channels.  The gzip format was designed for single-
+  file compression on file systems, has a larger header than zlib to maintain
+  directory information, and uses a different, slower check method than zlib.
+
+    The library does not install any signal handler.  The decoder checks
+  the consistency of the compressed data, so the library should never crash
+  even in case of corrupted input.
+*/
+
+typedef voidpf (*alloc_func) OF((voidpf opaque, uInt items, uInt size));
+typedef void   (*free_func)  OF((voidpf opaque, voidpf address));
+
+struct internal_state;
+
+typedef struct z_stream_s {
+    z_const Bytef *next_in;     /* next input byte */
+    uInt     avail_in;  /* number of bytes available at next_in */
+    uLong    total_in;  /* total number of input bytes read so far */
+
+    Bytef    *next_out; /* next output byte should be put there */
+    uInt     avail_out; /* remaining free space at next_out */
+    uLong    total_out; /* total number of bytes output so far */
+
+    z_const char *msg;  /* last error message, NULL if no error */
+    struct internal_state FAR *state; /* not visible by applications */
+
+    alloc_func zalloc;  /* used to allocate the internal state */
+    free_func  zfree;   /* used to free the internal state */
+    voidpf     opaque;  /* private data object passed to zalloc and zfree */
+
+    int     data_type;  /* best guess about the data type: binary or text */
+    uLong   adler;      /* adler32 value of the uncompressed data */
+    uLong   reserved;   /* reserved for future use */
+} z_stream;
+
+typedef z_stream FAR *z_streamp;
+
+/*
+     gzip header information passed to and from zlib routines.  See RFC 1952
+  for more details on the meanings of these fields.
+*/
+typedef struct gz_header_s {
+    int     text;       /* true if compressed data believed to be text */
+    uLong   time;       /* modification time */
+    int     xflags;     /* extra flags (not used when writing a gzip file) */
+    int     os;         /* operating system */
+    Bytef   *extra;     /* pointer to extra field or Z_NULL if none */
+    uInt    extra_len;  /* extra field length (valid if extra != Z_NULL) */
+    uInt    extra_max;  /* space at extra (only when reading header) */
+    Bytef   *name;      /* pointer to zero-terminated file name or Z_NULL */
+    uInt    name_max;   /* space at name (only when reading header) */
+    Bytef   *comment;   /* pointer to zero-terminated comment or Z_NULL */
+    uInt    comm_max;   /* space at comment (only when reading header) */
+    int     hcrc;       /* true if there was or will be a header crc */
+    int     done;       /* true when done reading gzip header (not used
+                           when writing a gzip file) */
+} gz_header;
+
+typedef gz_header FAR *gz_headerp;
+
+/*
+     The application must update next_in and avail_in when avail_in has dropped
+   to zero.  It must update next_out and avail_out when avail_out has dropped
+   to zero.  The application must initialize zalloc, zfree and opaque before
+   calling the init function.  All other fields are set by the compression
+   library and must not be updated by the application.
+
+     The opaque value provided by the application will be passed as the first
+   parameter for calls of zalloc and zfree.  This can be useful for custom
+   memory management.  The compression library attaches no meaning to the
+   opaque value.
+
+     zalloc must return Z_NULL if there is not enough memory for the object.
+   If zlib is used in a multi-threaded application, zalloc and zfree must be
+   thread safe.
+
+     On 16-bit systems, the functions zalloc and zfree must be able to allocate
+   exactly 65536 bytes, but will not be required to allocate more than this if
+   the symbol MAXSEG_64K is defined (see zconf.h).  WARNING: On MSDOS, pointers
+   returned by zalloc for objects of exactly 65536 bytes *must* have their
+   offset normalized to zero.  The default allocation function provided by this
+   library ensures this (see zutil.c).  To reduce memory requirements and avoid
+   any allocation of 64K objects, at the expense of compression ratio, compile
+   the library with -DMAX_WBITS=14 (see zconf.h).
+
+     The fields total_in and total_out can be used for statistics or progress
+   reports.  After compression, total_in holds the total size of the
+   uncompressed data and may be saved for use in the decompressor (particularly
+   if the decompressor wants to decompress everything in a single step).
+*/
+
+                        /* constants */
+
+#define Z_NO_FLUSH      0
+#define Z_PARTIAL_FLUSH 1
+#define Z_SYNC_FLUSH    2
+#define Z_FULL_FLUSH    3
+#define Z_FINISH        4
+#define Z_BLOCK         5
+#define Z_TREES         6
+/* Allowed flush values; see deflate() and inflate() below for details */
+
+#define Z_OK            0
+#define Z_STREAM_END    1
+#define Z_NEED_DICT     2
+#define Z_ERRNO        (-1)
+#define Z_STREAM_ERROR (-2)
+#define Z_DATA_ERROR   (-3)
+#define Z_MEM_ERROR    (-4)
+#define Z_BUF_ERROR    (-5)
+#define Z_VERSION_ERROR (-6)
+/* Return codes for the compression/decompression functions. Negative values
+ * are errors, positive values are used for special but normal events.
+ */
+
+#define Z_NO_COMPRESSION         0
+#define Z_BEST_SPEED             1
+#define Z_BEST_COMPRESSION       9
+#define Z_DEFAULT_COMPRESSION  (-1)
+/* compression levels */
+
+#define Z_FILTERED            1
+#define Z_HUFFMAN_ONLY        2
+#define Z_RLE                 3
+#define Z_FIXED               4
+#define Z_DEFAULT_STRATEGY    0
+/* compression strategy; see deflateInit2() below for details */
+
+#define Z_BINARY   0
+#define Z_TEXT     1
+#define Z_ASCII    Z_TEXT   /* for compatibility with 1.2.2 and earlier */
+#define Z_UNKNOWN  2
+/* Possible values of the data_type field (though see inflate()) */
+
+#define Z_DEFLATED   8
+/* The deflate compression method (the only one supported in this version) */
+
+#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
+
+#define zlib_version zlibVersion()
+/* for compatibility with versions < 1.0.2 */
+
+
+                        /* basic functions */
+
+ZEXTERN const char * ZEXPORT zlibVersion OF((void));
+/* The application can compare zlibVersion and ZLIB_VERSION for consistency.
+   If the first character differs, the library code actually used is not
+   compatible with the zlib.h header file used by the application.  This check
+   is automatically made by deflateInit and inflateInit.
+ */
+
+/*
+ZEXTERN int ZEXPORT deflateInit OF((z_streamp strm, int level));
+
+     Initializes the internal stream state for compression.  The fields
+   zalloc, zfree and opaque must be initialized before by the caller.  If
+   zalloc and zfree are set to Z_NULL, deflateInit updates them to use default
+   allocation functions.
+
+     The compression level must be Z_DEFAULT_COMPRESSION, or between 0 and 9:
+   1 gives best speed, 9 gives best compression, 0 gives no compression at all
+   (the input data is simply copied a block at a time).  Z_DEFAULT_COMPRESSION
+   requests a default compromise between speed and compression (currently
+   equivalent to level 6).
+
+     deflateInit returns Z_OK if success, Z_MEM_ERROR if there was not enough
+   memory, Z_STREAM_ERROR if level is not a valid compression level, or
+   Z_VERSION_ERROR if the zlib library version (zlib_version) is incompatible
+   with the version assumed by the caller (ZLIB_VERSION).  msg is set to null
+   if there is no error message.  deflateInit does not perform any compression:
+   this will be done by deflate().
+*/
+
+
+ZEXTERN int ZEXPORT deflate OF((z_streamp strm, int flush));
+/*
+    deflate compresses as much data as possible, and stops when the input
+  buffer becomes empty or the output buffer becomes full.  It may introduce
+  some output latency (reading input without producing any output) except when
+  forced to flush.
+
+    The detailed semantics are as follows.  deflate performs one or both of the
+  following actions:
+
+  - Compress more input starting at next_in and update next_in and avail_in
+    accordingly.  If not all input can be processed (because there is not
+    enough room in the output buffer), next_in and avail_in are updated and
+    processing will resume at this point for the next call of deflate().
+
+  - Provide more output starting at next_out and update next_out and avail_out
+    accordingly.  This action is forced if the parameter flush is non zero.
+    Forcing flush frequently degrades the compression ratio, so this parameter
+    should be set only when necessary (in interactive applications).  Some
+    output may be provided even if flush is not set.
+
+    Before the call of deflate(), the application should ensure that at least
+  one of the actions is possible, by providing more input and/or consuming more
+  output, and updating avail_in or avail_out accordingly; avail_out should
+  never be zero before the call.  The application can consume the compressed
+  output when it wants, for example when the output buffer is full (avail_out
+  == 0), or after each call of deflate().  If deflate returns Z_OK and with
+  zero avail_out, it must be called again after making room in the output
+  buffer because there might be more output pending.
+
+    Normally the parameter flush is set to Z_NO_FLUSH, which allows deflate to
+  decide how much data to accumulate before producing output, in order to
+  maximize compression.
+
+    If the parameter flush is set to Z_SYNC_FLUSH, all pending output is
+  flushed to the output buffer and the output is aligned on a byte boundary, so
+  that the decompressor can get all input data available so far.  (In
+  particular avail_in is zero after the call if enough output space has been
+  provided before the call.) Flushing may degrade compression for some
+  compression algorithms and so it should be used only when necessary.  This
+  completes the current deflate block and follows it with an empty stored block
+  that is three bits plus filler bits to the next byte, followed by four bytes
+  (00 00 ff ff).
+
+    If flush is set to Z_PARTIAL_FLUSH, all pending output is flushed to the
+  output buffer, but the output is not aligned to a byte boundary.  All of the
+  input data so far will be available to the decompressor, as for Z_SYNC_FLUSH.
+  This completes the current deflate block and follows it with an empty fixed
+  codes block that is 10 bits long.  This assures that enough bytes are output
+  in order for the decompressor to finish the block before the empty fixed code
+  block.
+
+    If flush is set to Z_BLOCK, a deflate block is completed and emitted, as
+  for Z_SYNC_FLUSH, but the output is not aligned on a byte boundary, and up to
+  seven bits of the current block are held to be written as the next byte after
+  the next deflate block is completed.  In this case, the decompressor may not
+  be provided enough bits at this point in order to complete decompression of
+  the data provided so far to the compressor.  It may need to wait for the next
+  block to be emitted.  This is for advanced applications that need to control
+  the emission of deflate blocks.
+
+    If flush is set to Z_FULL_FLUSH, all output is flushed as with
+  Z_SYNC_FLUSH, and the compression state is reset so that decompression can
+  restart from this point if previous compressed data has been damaged or if
+  random access is desired.  Using Z_FULL_FLUSH too often can seriously degrade
+  compression.
+
+    If deflate returns with avail_out == 0, this function must be called again
+  with the same value of the flush parameter and more output space (updated
+  avail_out), until the flush is complete (deflate returns with non-zero
+  avail_out).  In the case of a Z_FULL_FLUSH or Z_SYNC_FLUSH, make sure that
+  avail_out is greater than six to avoid repeated flush markers due to
+  avail_out == 0 on return.
+
+    If the parameter flush is set to Z_FINISH, pending input is processed,
+  pending output is flushed and deflate returns with Z_STREAM_END if there was
+  enough output space; if deflate returns with Z_OK, this function must be
+  called again with Z_FINISH and more output space (updated avail_out) but no
+  more input data, until it returns with Z_STREAM_END or an error.  After
+  deflate has returned Z_STREAM_END, the only possible operations on the stream
+  are deflateReset or deflateEnd.
+
+    Z_FINISH can be used immediately after deflateInit if all the compression
+  is to be done in a single step.  In this case, avail_out must be at least the
+  value returned by deflateBound (see below).  Then deflate is guaranteed to
+  return Z_STREAM_END.  If not enough output space is provided, deflate will
+  not return Z_STREAM_END, and it must be called again as described above.
+
+    deflate() sets strm->adler to the adler32 checksum of all input read
+  so far (that is, total_in bytes).
+
+    deflate() may update strm->data_type if it can make a good guess about
+  the input data type (Z_BINARY or Z_TEXT).  In doubt, the data is considered
+  binary.  This field is only for information purposes and does not affect the
+  compression algorithm in any manner.
+
+    deflate() returns Z_OK if some progress has been made (more input
+  processed or more output produced), Z_STREAM_END if all input has been
+  consumed and all output has been produced (only when flush is set to
+  Z_FINISH), Z_STREAM_ERROR if the stream state was inconsistent (for example
+  if next_in or next_out was Z_NULL), Z_BUF_ERROR if no progress is possible
+  (for example avail_in or avail_out was zero).  Note that Z_BUF_ERROR is not
+  fatal, and deflate() can be called again with more input and more output
+  space to continue compressing.
+*/
+
+
+ZEXTERN int ZEXPORT deflateEnd OF((z_streamp strm));
+/*
+     All dynamically allocated data structures for this stream are freed.
+   This function discards any unprocessed input and does not flush any pending
+   output.
+
+     deflateEnd returns Z_OK if success, Z_STREAM_ERROR if the
+   stream state was inconsistent, Z_DATA_ERROR if the stream was freed
+   prematurely (some input or output was discarded).  In the error case, msg
+   may be set but then points to a static string (which must not be
+   deallocated).
+*/
+
+
+/*
+ZEXTERN int ZEXPORT inflateInit OF((z_streamp strm));
+
+     Initializes the internal stream state for decompression.  The fields
+   next_in, avail_in, zalloc, zfree and opaque must be initialized before by
+   the caller.  If next_in is not Z_NULL and avail_in is large enough (the
+   exact value depends on the compression method), inflateInit determines the
+   compression method from the zlib header and allocates all data structures
+   accordingly; otherwise the allocation will be deferred to the first call of
+   inflate.  If zalloc and zfree are set to Z_NULL, inflateInit updates them to
+   use default allocation functions.
+
+     inflateInit returns Z_OK if success, Z_MEM_ERROR if there was not enough
+   memory, Z_VERSION_ERROR if the zlib library version is incompatible with the
+   version assumed by the caller, or Z_STREAM_ERROR if the parameters are
+   invalid, such as a null pointer to the structure.  msg is set to null if
+   there is no error message.  inflateInit does not perform any decompression
+   apart from possibly reading the zlib header if present: actual decompression
+   will be done by inflate().  (So next_in and avail_in may be modified, but
+   next_out and avail_out are unused and unchanged.) The current implementation
+   of inflateInit() does not process any header information -- that is deferred
+   until inflate() is called.
+*/
+
+
+ZEXTERN int ZEXPORT inflate OF((z_streamp strm, int flush));
+/*
+    inflate decompresses as much data as possible, and stops when the input
+  buffer becomes empty or the output buffer becomes full.  It may introduce
+  some output latency (reading input without producing any output) except when
+  forced to flush.
+
+  The detailed semantics are as follows.  inflate performs one or both of the
+  following actions:
+
+  - Decompress more input starting at next_in and update next_in and avail_in
+    accordingly.  If not all input can be processed (because there is not
+    enough room in the output buffer), next_in is updated and processing will
+    resume at this point for the next call of inflate().
+
+  - Provide more output starting at next_out and update next_out and avail_out
+    accordingly.  inflate() provides as much output as possible, until there is
+    no more input data or no more space in the output buffer (see below about
+    the flush parameter).
+
+    Before the call of inflate(), the application should ensure that at least
+  one of the actions is possible, by providing more input and/or consuming more
+  output, and updating the next_* and avail_* values accordingly.  The
+  application can consume the uncompressed output when it wants, for example
+  when the output buffer is full (avail_out == 0), or after each call of
+  inflate().  If inflate returns Z_OK and with zero avail_out, it must be
+  called again after making room in the output buffer because there might be
+  more output pending.
+
+    The flush parameter of inflate() can be Z_NO_FLUSH, Z_SYNC_FLUSH, Z_FINISH,
+  Z_BLOCK, or Z_TREES.  Z_SYNC_FLUSH requests that inflate() flush as much
+  output as possible to the output buffer.  Z_BLOCK requests that inflate()
+  stop if and when it gets to the next deflate block boundary.  When decoding
+  the zlib or gzip format, this will cause inflate() to return immediately
+  after the header and before the first block.  When doing a raw inflate,
+  inflate() will go ahead and process the first block, and will return when it
+  gets to the end of that block, or when it runs out of data.
+
+    The Z_BLOCK option assists in appending to or combining deflate streams.
+  Also to assist in this, on return inflate() will set strm->data_type to the
+  number of unused bits in the last byte taken from strm->next_in, plus 64 if
+  inflate() is currently decoding the last block in the deflate stream, plus
+  128 if inflate() returned immediately after decoding an end-of-block code or
+  decoding the complete header up to just before the first byte of the deflate
+  stream.  The end-of-block will not be indicated until all of the uncompressed
+  data from that block has been written to strm->next_out.  The number of
+  unused bits may in general be greater than seven, except when bit 7 of
+  data_type is set, in which case the number of unused bits will be less than
+  eight.  data_type is set as noted here every time inflate() returns for all
+  flush options, and so can be used to determine the amount of currently
+  consumed input in bits.
+
+    The Z_TREES option behaves as Z_BLOCK does, but it also returns when the
+  end of each deflate block header is reached, before any actual data in that
+  block is decoded.  This allows the caller to determine the length of the
+  deflate block header for later use in random access within a deflate block.
+  256 is added to the value of strm->data_type when inflate() returns
+  immediately after reaching the end of the deflate block header.
+
+    inflate() should normally be called until it returns Z_STREAM_END or an
+  error.  However if all decompression is to be performed in a single step (a
+  single call of inflate), the parameter flush should be set to Z_FINISH.  In
+  this case all pending input is processed and all pending output is flushed;
+  avail_out must be large enough to hold all of the uncompressed data for the
+  operation to complete.  (The size of the uncompressed data may have been
+  saved by the compressor for this purpose.) The use of Z_FINISH is not
+  required to perform an inflation in one step.  However it may be used to
+  inform inflate that a faster approach can be used for the single inflate()
+  call.  Z_FINISH also informs inflate to not maintain a sliding window if the
+  stream completes, which reduces inflate's memory footprint.  If the stream
+  does not complete, either because not all of the stream is provided or not
+  enough output space is provided, then a sliding window will be allocated and
+  inflate() can be called again to continue the operation as if Z_NO_FLUSH had
+  been used.
+
+     In this implementation, inflate() always flushes as much output as
+  possible to the output buffer, and always uses the faster approach on the
+  first call.  So the effects of the flush parameter in this implementation are
+  on the return value of inflate() as noted below, when inflate() returns early
+  when Z_BLOCK or Z_TREES is used, and when inflate() avoids the allocation of
+  memory for a sliding window when Z_FINISH is used.
+
+     If a preset dictionary is needed after this call (see inflateSetDictionary
+  below), inflate sets strm->adler to the Adler-32 checksum of the dictionary
+  chosen by the compressor and returns Z_NEED_DICT; otherwise it sets
+  strm->adler to the Adler-32 checksum of all output produced so far (that is,
+  total_out bytes) and returns Z_OK, Z_STREAM_END or an error code as described
+  below.  At the end of the stream, inflate() checks that its computed adler32
+  checksum is equal to that saved by the compressor and returns Z_STREAM_END
+  only if the checksum is correct.
+
+    inflate() can decompress and check either zlib-wrapped or gzip-wrapped
+  deflate data.  The header type is detected automatically, if requested when
+  initializing with inflateInit2().  Any information contained in the gzip
+  header is not retained, so applications that need that information should
+  instead use raw inflate, see inflateInit2() below, or inflateBack() and
+  perform their own processing of the gzip header and trailer.  When processing
+  gzip-wrapped deflate data, strm->adler32 is set to the CRC-32 of the output
+  producted so far.  The CRC-32 is checked against the gzip trailer.
+
+    inflate() returns Z_OK if some progress has been made (more input processed
+  or more output produced), Z_STREAM_END if the end of the compressed data has
+  been reached and all uncompressed output has been produced, Z_NEED_DICT if a
+  preset dictionary is needed at this point, Z_DATA_ERROR if the input data was
+  corrupted (input stream not conforming to the zlib format or incorrect check
+  value), Z_STREAM_ERROR if the stream structure was inconsistent (for example
+  next_in or next_out was Z_NULL), Z_MEM_ERROR if there was not enough memory,
+  Z_BUF_ERROR if no progress is possible or if there was not enough room in the
+  output buffer when Z_FINISH is used.  Note that Z_BUF_ERROR is not fatal, and
+  inflate() can be called again with more input and more output space to
+  continue decompressing.  If Z_DATA_ERROR is returned, the application may
+  then call inflateSync() to look for a good compression block if a partial
+  recovery of the data is desired.
+*/
+
+
+ZEXTERN int ZEXPORT inflateEnd OF((z_streamp strm));
+/*
+     All dynamically allocated data structures for this stream are freed.
+   This function discards any unprocessed input and does not flush any pending
+   output.
+
+     inflateEnd returns Z_OK if success, Z_STREAM_ERROR if the stream state
+   was inconsistent.  In the error case, msg may be set but then points to a
+   static string (which must not be deallocated).
+*/
+
+
+                        /* Advanced functions */
+
+/*
+    The following functions are needed only in some special applications.
+*/
+
+/*
+ZEXTERN int ZEXPORT deflateInit2 OF((z_streamp strm,
+                                     int  level,
+                                     int  method,
+                                     int  windowBits,
+                                     int  memLevel,
+                                     int  strategy));
+
+     This is another version of deflateInit with more compression options.  The
+   fields next_in, zalloc, zfree and opaque must be initialized before by the
+   caller.
+
+     The method parameter is the compression method.  It must be Z_DEFLATED in
+   this version of the library.
+
+     The windowBits parameter is the base two logarithm of the window size
+   (the size of the history buffer).  It should be in the range 8..15 for this
+   version of the library.  Larger values of this parameter result in better
+   compression at the expense of memory usage.  The default value is 15 if
+   deflateInit is used instead.
+
+     windowBits can also be -8..-15 for raw deflate.  In this case, -windowBits
+   determines the window size.  deflate() will then generate raw deflate data
+   with no zlib header or trailer, and will not compute an adler32 check value.
+
+     windowBits can also be greater than 15 for optional gzip encoding.  Add
+   16 to windowBits to write a simple gzip header and trailer around the
+   compressed data instead of a zlib wrapper.  The gzip header will have no
+   file name, no extra data, no comment, no modification time (set to zero), no
+   header crc, and the operating system will be set to 255 (unknown).  If a
+   gzip stream is being written, strm->adler is a crc32 instead of an adler32.
+
+     The memLevel parameter specifies how much memory should be allocated
+   for the internal compression state.  memLevel=1 uses minimum memory but is
+   slow and reduces compression ratio; memLevel=9 uses maximum memory for
+   optimal speed.  The default value is 8.  See zconf.h for total memory usage
+   as a function of windowBits and memLevel.
+
+     The strategy parameter is used to tune the compression algorithm.  Use the
+   value Z_DEFAULT_STRATEGY for normal data, Z_FILTERED for data produced by a
+   filter (or predictor), Z_HUFFMAN_ONLY to force Huffman encoding only (no
+   string match), or Z_RLE to limit match distances to one (run-length
+   encoding).  Filtered data consists mostly of small values with a somewhat
+   random distribution.  In this case, the compression algorithm is tuned to
+   compress them better.  The effect of Z_FILTERED is to force more Huffman
+   coding and less string matching; it is somewhat intermediate between
+   Z_DEFAULT_STRATEGY and Z_HUFFMAN_ONLY.  Z_RLE is designed to be almost as
+   fast as Z_HUFFMAN_ONLY, but give better compression for PNG image data.  The
+   strategy parameter only affects the compression ratio but not the
+   correctness of the compressed output even if it is not set appropriately.
+   Z_FIXED prevents the use of dynamic Huffman codes, allowing for a simpler
+   decoder for special applications.
+
+     deflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough
+   memory, Z_STREAM_ERROR if any parameter is invalid (such as an invalid
+   method), or Z_VERSION_ERROR if the zlib library version (zlib_version) is
+   incompatible with the version assumed by the caller (ZLIB_VERSION).  msg is
+   set to null if there is no error message.  deflateInit2 does not perform any
+   compression: this will be done by deflate().
+*/
+
+ZEXTERN int ZEXPORT deflateSetDictionary OF((z_streamp strm,
+                                             const Bytef *dictionary,
+                                             uInt  dictLength));
+/*
+     Initializes the compression dictionary from the given byte sequence
+   without producing any compressed output.  When using the zlib format, this
+   function must be called immediately after deflateInit, deflateInit2 or
+   deflateReset, and before any call of deflate.  When doing raw deflate, this
+   function must be called either before any call of deflate, or immediately
+   after the completion of a deflate block, i.e. after all input has been
+   consumed and all output has been delivered when using any of the flush
+   options Z_BLOCK, Z_PARTIAL_FLUSH, Z_SYNC_FLUSH, or Z_FULL_FLUSH.  The
+   compressor and decompressor must use exactly the same dictionary (see
+   inflateSetDictionary).
+
+     The dictionary should consist of strings (byte sequences) that are likely
+   to be encountered later in the data to be compressed, with the most commonly
+   used strings preferably put towards the end of the dictionary.  Using a
+   dictionary is most useful when the data to be compressed is short and can be
+   predicted with good accuracy; the data can then be compressed better than
+   with the default empty dictionary.
+
+     Depending on the size of the compression data structures selected by
+   deflateInit or deflateInit2, a part of the dictionary may in effect be
+   discarded, for example if the dictionary is larger than the window size
+   provided in deflateInit or deflateInit2.  Thus the strings most likely to be
+   useful should be put at the end of the dictionary, not at the front.  In
+   addition, the current implementation of deflate will use at most the window
+   size minus 262 bytes of the provided dictionary.
+
+     Upon return of this function, strm->adler is set to the adler32 value
+   of the dictionary; the decompressor may later use this value to determine
+   which dictionary has been used by the compressor.  (The adler32 value
+   applies to the whole dictionary even if only a subset of the dictionary is
+   actually used by the compressor.) If a raw deflate was requested, then the
+   adler32 value is not computed and strm->adler is not set.
+
+     deflateSetDictionary returns Z_OK if success, or Z_STREAM_ERROR if a
+   parameter is invalid (e.g.  dictionary being Z_NULL) or the stream state is
+   inconsistent (for example if deflate has already been called for this stream
+   or if not at a block boundary for raw deflate).  deflateSetDictionary does
+   not perform any compression: this will be done by deflate().
+*/
+
+ZEXTERN int ZEXPORT deflateCopy OF((z_streamp dest,
+                                    z_streamp source));
+/*
+     Sets the destination stream as a complete copy of the source stream.
+
+     This function can be useful when several compression strategies will be
+   tried, for example when there are several ways of pre-processing the input
+   data with a filter.  The streams that will be discarded should then be freed
+   by calling deflateEnd.  Note that deflateCopy duplicates the internal
+   compression state which can be quite large, so this strategy is slow and can
+   consume lots of memory.
+
+     deflateCopy returns Z_OK if success, Z_MEM_ERROR if there was not
+   enough memory, Z_STREAM_ERROR if the source stream state was inconsistent
+   (such as zalloc being Z_NULL).  msg is left unchanged in both source and
+   destination.
+*/
+
+ZEXTERN int ZEXPORT deflateReset OF((z_streamp strm));
+/*
+     This function is equivalent to deflateEnd followed by deflateInit,
+   but does not free and reallocate all the internal compression state.  The
+   stream will keep the same compression level and any other attributes that
+   may have been set by deflateInit2.
+
+     deflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source
+   stream state was inconsistent (such as zalloc or state being Z_NULL).
+*/
+
+ZEXTERN int ZEXPORT deflateParams OF((z_streamp strm,
+                                      int level,
+                                      int strategy));
+/*
+     Dynamically update the compression level and compression strategy.  The
+   interpretation of level and strategy is as in deflateInit2.  This can be
+   used to switch between compression and straight copy of the input data, or
+   to switch to a different kind of input data requiring a different strategy.
+   If the compression level is changed, the input available so far is
+   compressed with the old level (and may be flushed); the new level will take
+   effect only at the next call of deflate().
+
+     Before the call of deflateParams, the stream state must be set as for
+   a call of deflate(), since the currently available input may have to be
+   compressed and flushed.  In particular, strm->avail_out must be non-zero.
+
+     deflateParams returns Z_OK if success, Z_STREAM_ERROR if the source
+   stream state was inconsistent or if a parameter was invalid, Z_BUF_ERROR if
+   strm->avail_out was zero.
+*/
+
+ZEXTERN int ZEXPORT deflateTune OF((z_streamp strm,
+                                    int good_length,
+                                    int max_lazy,
+                                    int nice_length,
+                                    int max_chain));
+/*
+     Fine tune deflate's internal compression parameters.  This should only be
+   used by someone who understands the algorithm used by zlib's deflate for
+   searching for the best matching string, and even then only by the most
+   fanatic optimizer trying to squeeze out the last compressed bit for their
+   specific input data.  Read the deflate.c source code for the meaning of the
+   max_lazy, good_length, nice_length, and max_chain parameters.
+
+     deflateTune() can be called after deflateInit() or deflateInit2(), and
+   returns Z_OK on success, or Z_STREAM_ERROR for an invalid deflate stream.
+ */
+
+ZEXTERN uLong ZEXPORT deflateBound OF((z_streamp strm,
+                                       uLong sourceLen));
+/*
+     deflateBound() returns an upper bound on the compressed size after
+   deflation of sourceLen bytes.  It must be called after deflateInit() or
+   deflateInit2(), and after deflateSetHeader(), if used.  This would be used
+   to allocate an output buffer for deflation in a single pass, and so would be
+   called before deflate().  If that first deflate() call is provided the
+   sourceLen input bytes, an output buffer allocated to the size returned by
+   deflateBound(), and the flush value Z_FINISH, then deflate() is guaranteed
+   to return Z_STREAM_END.  Note that it is possible for the compressed size to
+   be larger than the value returned by deflateBound() if flush options other
+   than Z_FINISH or Z_NO_FLUSH are used.
+*/
+
+ZEXTERN int ZEXPORT deflatePending OF((z_streamp strm,
+                                       unsigned *pending,
+                                       int *bits));
+/*
+     deflatePending() returns the number of bytes and bits of output that have
+   been generated, but not yet provided in the available output.  The bytes not
+   provided would be due to the available output space having being consumed.
+   The number of bits of output not provided are between 0 and 7, where they
+   await more bits to join them in order to fill out a full byte.  If pending
+   or bits are Z_NULL, then those values are not set.
+
+     deflatePending returns Z_OK if success, or Z_STREAM_ERROR if the source
+   stream state was inconsistent.
+ */
+
+ZEXTERN int ZEXPORT deflatePrime OF((z_streamp strm,
+                                     int bits,
+                                     int value));
+/*
+     deflatePrime() inserts bits in the deflate output stream.  The intent
+   is that this function is used to start off the deflate output with the bits
+   leftover from a previous deflate stream when appending to it.  As such, this
+   function can only be used for raw deflate, and must be used before the first
+   deflate() call after a deflateInit2() or deflateReset().  bits must be less
+   than or equal to 16, and that many of the least significant bits of value
+   will be inserted in the output.
+
+     deflatePrime returns Z_OK if success, Z_BUF_ERROR if there was not enough
+   room in the internal buffer to insert the bits, or Z_STREAM_ERROR if the
+   source stream state was inconsistent.
+*/
+
+ZEXTERN int ZEXPORT deflateSetHeader OF((z_streamp strm,
+                                         gz_headerp head));
+/*
+     deflateSetHeader() provides gzip header information for when a gzip
+   stream is requested by deflateInit2().  deflateSetHeader() may be called
+   after deflateInit2() or deflateReset() and before the first call of
+   deflate().  The text, time, os, extra field, name, and comment information
+   in the provided gz_header structure are written to the gzip header (xflag is
+   ignored -- the extra flags are set according to the compression level).  The
+   caller must assure that, if not Z_NULL, name and comment are terminated with
+   a zero byte, and that if extra is not Z_NULL, that extra_len bytes are
+   available there.  If hcrc is true, a gzip header crc is included.  Note that
+   the current versions of the command-line version of gzip (up through version
+   1.3.x) do not support header crc's, and will report that it is a "multi-part
+   gzip file" and give up.
+
+     If deflateSetHeader is not used, the default gzip header has text false,
+   the time set to zero, and os set to 255, with no extra, name, or comment
+   fields.  The gzip header is returned to the default state by deflateReset().
+
+     deflateSetHeader returns Z_OK if success, or Z_STREAM_ERROR if the source
+   stream state was inconsistent.
+*/
+
+/*
+ZEXTERN int ZEXPORT inflateInit2 OF((z_streamp strm,
+                                     int  windowBits));
+
+     This is another version of inflateInit with an extra parameter.  The
+   fields next_in, avail_in, zalloc, zfree and opaque must be initialized
+   before by the caller.
+
+     The windowBits parameter is the base two logarithm of the maximum window
+   size (the size of the history buffer).  It should be in the range 8..15 for
+   this version of the library.  The default value is 15 if inflateInit is used
+   instead.  windowBits must be greater than or equal to the windowBits value
+   provided to deflateInit2() while compressing, or it must be equal to 15 if
+   deflateInit2() was not used.  If a compressed stream with a larger window
+   size is given as input, inflate() will return with the error code
+   Z_DATA_ERROR instead of trying to allocate a larger window.
+
+     windowBits can also be zero to request that inflate use the window size in
+   the zlib header of the compressed stream.
+
+     windowBits can also be -8..-15 for raw inflate.  In this case, -windowBits
+   determines the window size.  inflate() will then process raw deflate data,
+   not looking for a zlib or gzip header, not generating a check value, and not
+   looking for any check values for comparison at the end of the stream.  This
+   is for use with other formats that use the deflate compressed data format
+   such as zip.  Those formats provide their own check values.  If a custom
+   format is developed using the raw deflate format for compressed data, it is
+   recommended that a check value such as an adler32 or a crc32 be applied to
+   the uncompressed data as is done in the zlib, gzip, and zip formats.  For
+   most applications, the zlib format should be used as is.  Note that comments
+   above on the use in deflateInit2() applies to the magnitude of windowBits.
+
+     windowBits can also be greater than 15 for optional gzip decoding.  Add
+   32 to windowBits to enable zlib and gzip decoding with automatic header
+   detection, or add 16 to decode only the gzip format (the zlib format will
+   return a Z_DATA_ERROR).  If a gzip stream is being decoded, strm->adler is a
+   crc32 instead of an adler32.
+
+     inflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough
+   memory, Z_VERSION_ERROR if the zlib library version is incompatible with the
+   version assumed by the caller, or Z_STREAM_ERROR if the parameters are
+   invalid, such as a null pointer to the structure.  msg is set to null if
+   there is no error message.  inflateInit2 does not perform any decompression
+   apart from possibly reading the zlib header if present: actual decompression
+   will be done by inflate().  (So next_in and avail_in may be modified, but
+   next_out and avail_out are unused and unchanged.) The current implementation
+   of inflateInit2() does not process any header information -- that is
+   deferred until inflate() is called.
+*/
+
+ZEXTERN int ZEXPORT inflateSetDictionary OF((z_streamp strm,
+                                             const Bytef *dictionary,
+                                             uInt  dictLength));
+/*
+     Initializes the decompression dictionary from the given uncompressed byte
+   sequence.  This function must be called immediately after a call of inflate,
+   if that call returned Z_NEED_DICT.  The dictionary chosen by the compressor
+   can be determined from the adler32 value returned by that call of inflate.
+   The compressor and decompressor must use exactly the same dictionary (see
+   deflateSetDictionary).  For raw inflate, this function can be called at any
+   time to set the dictionary.  If the provided dictionary is smaller than the
+   window and there is already data in the window, then the provided dictionary
+   will amend what's there.  The application must insure that the dictionary
+   that was used for compression is provided.
+
+     inflateSetDictionary returns Z_OK if success, Z_STREAM_ERROR if a
+   parameter is invalid (e.g.  dictionary being Z_NULL) or the stream state is
+   inconsistent, Z_DATA_ERROR if the given dictionary doesn't match the
+   expected one (incorrect adler32 value).  inflateSetDictionary does not
+   perform any decompression: this will be done by subsequent calls of
+   inflate().
+*/
+
+ZEXTERN int ZEXPORT inflateGetDictionary OF((z_streamp strm,
+                                             Bytef *dictionary,
+                                             uInt  *dictLength));
+/*
+     Returns the sliding dictionary being maintained by inflate.  dictLength is
+   set to the number of bytes in the dictionary, and that many bytes are copied
+   to dictionary.  dictionary must have enough space, where 32768 bytes is
+   always enough.  If inflateGetDictionary() is called with dictionary equal to
+   Z_NULL, then only the dictionary length is returned, and nothing is copied.
+   Similary, if dictLength is Z_NULL, then it is not set.
+
+     inflateGetDictionary returns Z_OK on success, or Z_STREAM_ERROR if the
+   stream state is inconsistent.
+*/
+
+ZEXTERN int ZEXPORT inflateSync OF((z_streamp strm));
+/*
+     Skips invalid compressed data until a possible full flush point (see above
+   for the description of deflate with Z_FULL_FLUSH) can be found, or until all
+   available input is skipped.  No output is provided.
+
+     inflateSync searches for a 00 00 FF FF pattern in the compressed data.
+   All full flush points have this pattern, but not all occurrences of this
+   pattern are full flush points.
+
+     inflateSync returns Z_OK if a possible full flush point has been found,
+   Z_BUF_ERROR if no more input was provided, Z_DATA_ERROR if no flush point
+   has been found, or Z_STREAM_ERROR if the stream structure was inconsistent.
+   In the success case, the application may save the current current value of
+   total_in which indicates where valid compressed data was found.  In the
+   error case, the application may repeatedly call inflateSync, providing more
+   input each time, until success or end of the input data.
+*/
+
+ZEXTERN int ZEXPORT inflateCopy OF((z_streamp dest,
+                                    z_streamp source));
+/*
+     Sets the destination stream as a complete copy of the source stream.
+
+     This function can be useful when randomly accessing a large stream.  The
+   first pass through the stream can periodically record the inflate state,
+   allowing restarting inflate at those points when randomly accessing the
+   stream.
+
+     inflateCopy returns Z_OK if success, Z_MEM_ERROR if there was not
+   enough memory, Z_STREAM_ERROR if the source stream state was inconsistent
+   (such as zalloc being Z_NULL).  msg is left unchanged in both source and
+   destination.
+*/
+
+ZEXTERN int ZEXPORT inflateReset OF((z_streamp strm));
+/*
+     This function is equivalent to inflateEnd followed by inflateInit,
+   but does not free and reallocate all the internal decompression state.  The
+   stream will keep attributes that may have been set by inflateInit2.
+
+     inflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source
+   stream state was inconsistent (such as zalloc or state being Z_NULL).
+*/
+
+ZEXTERN int ZEXPORT inflateReset2 OF((z_streamp strm,
+                                      int windowBits));
+/*
+     This function is the same as inflateReset, but it also permits changing
+   the wrap and window size requests.  The windowBits parameter is interpreted
+   the same as it is for inflateInit2.
+
+     inflateReset2 returns Z_OK if success, or Z_STREAM_ERROR if the source
+   stream state was inconsistent (such as zalloc or state being Z_NULL), or if
+   the windowBits parameter is invalid.
+*/
+
+ZEXTERN int ZEXPORT inflatePrime OF((z_streamp strm,
+                                     int bits,
+                                     int value));
+/*
+     This function inserts bits in the inflate input stream.  The intent is
+   that this function is used to start inflating at a bit position in the
+   middle of a byte.  The provided bits will be used before any bytes are used
+   from next_in.  This function should only be used with raw inflate, and
+   should be used before the first inflate() call after inflateInit2() or
+   inflateReset().  bits must be less than or equal to 16, and that many of the
+   least significant bits of value will be inserted in the input.
+
+     If bits is negative, then the input stream bit buffer is emptied.  Then
+   inflatePrime() can be called again to put bits in the buffer.  This is used
+   to clear out bits leftover after feeding inflate a block description prior
+   to feeding inflate codes.
+
+     inflatePrime returns Z_OK if success, or Z_STREAM_ERROR if the source
+   stream state was inconsistent.
+*/
+
+ZEXTERN long ZEXPORT inflateMark OF((z_streamp strm));
+/*
+     This function returns two values, one in the lower 16 bits of the return
+   value, and the other in the remaining upper bits, obtained by shifting the
+   return value down 16 bits.  If the upper value is -1 and the lower value is
+   zero, then inflate() is currently decoding information outside of a block.
+   If the upper value is -1 and the lower value is non-zero, then inflate is in
+   the middle of a stored block, with the lower value equaling the number of
+   bytes from the input remaining to copy.  If the upper value is not -1, then
+   it is the number of bits back from the current bit position in the input of
+   the code (literal or length/distance pair) currently being processed.  In
+   that case the lower value is the number of bytes already emitted for that
+   code.
+
+     A code is being processed if inflate is waiting for more input to complete
+   decoding of the code, or if it has completed decoding but is waiting for
+   more output space to write the literal or match data.
+
+     inflateMark() is used to mark locations in the input data for random
+   access, which may be at bit positions, and to note those cases where the
+   output of a code may span boundaries of random access blocks.  The current
+   location in the input stream can be determined from avail_in and data_type
+   as noted in the description for the Z_BLOCK flush parameter for inflate.
+
+     inflateMark returns the value noted above or -1 << 16 if the provided
+   source stream state was inconsistent.
+*/
+
+ZEXTERN int ZEXPORT inflateGetHeader OF((z_streamp strm,
+                                         gz_headerp head));
+/*
+     inflateGetHeader() requests that gzip header information be stored in the
+   provided gz_header structure.  inflateGetHeader() may be called after
+   inflateInit2() or inflateReset(), and before the first call of inflate().
+   As inflate() processes the gzip stream, head->done is zero until the header
+   is completed, at which time head->done is set to one.  If a zlib stream is
+   being decoded, then head->done is set to -1 to indicate that there will be
+   no gzip header information forthcoming.  Note that Z_BLOCK or Z_TREES can be
+   used to force inflate() to return immediately after header processing is
+   complete and before any actual data is decompressed.
+
+     The text, time, xflags, and os fields are filled in with the gzip header
+   contents.  hcrc is set to true if there is a header CRC.  (The header CRC
+   was valid if done is set to one.) If extra is not Z_NULL, then extra_max
+   contains the maximum number of bytes to write to extra.  Once done is true,
+   extra_len contains the actual extra field length, and extra contains the
+   extra field, or that field truncated if extra_max is less than extra_len.
+   If name is not Z_NULL, then up to name_max characters are written there,
+   terminated with a zero unless the length is greater than name_max.  If
+   comment is not Z_NULL, then up to comm_max characters are written there,
+   terminated with a zero unless the length is greater than comm_max.  When any
+   of extra, name, or comment are not Z_NULL and the respective field is not
+   present in the header, then that field is set to Z_NULL to signal its
+   absence.  This allows the use of deflateSetHeader() with the returned
+   structure to duplicate the header.  However if those fields are set to
+   allocated memory, then the application will need to save those pointers
+   elsewhere so that they can be eventually freed.
+
+     If inflateGetHeader is not used, then the header information is simply
+   discarded.  The header is always checked for validity, including the header
+   CRC if present.  inflateReset() will reset the process to discard the header
+   information.  The application would need to call inflateGetHeader() again to
+   retrieve the header from the next gzip stream.
+
+     inflateGetHeader returns Z_OK if success, or Z_STREAM_ERROR if the source
+   stream state was inconsistent.
+*/
+
+/*
+ZEXTERN int ZEXPORT inflateBackInit OF((z_streamp strm, int windowBits,
+                                        unsigned char FAR *window));
+
+     Initialize the internal stream state for decompression using inflateBack()
+   calls.  The fields zalloc, zfree and opaque in strm must be initialized
+   before the call.  If zalloc and zfree are Z_NULL, then the default library-
+   derived memory allocation routines are used.  windowBits is the base two
+   logarithm of the window size, in the range 8..15.  window is a caller
+   supplied buffer of that size.  Except for special applications where it is
+   assured that deflate was used with small window sizes, windowBits must be 15
+   and a 32K byte window must be supplied to be able to decompress general
+   deflate streams.
+
+     See inflateBack() for the usage of these routines.
+
+     inflateBackInit will return Z_OK on success, Z_STREAM_ERROR if any of
+   the parameters are invalid, Z_MEM_ERROR if the internal state could not be
+   allocated, or Z_VERSION_ERROR if the version of the library does not match
+   the version of the header file.
+*/
+
+typedef unsigned (*in_func) OF((void FAR *,
+                                z_const unsigned char FAR * FAR *));
+typedef int (*out_func) OF((void FAR *, unsigned char FAR *, unsigned));
+
+ZEXTERN int ZEXPORT inflateBack OF((z_streamp strm,
+                                    in_func in, void FAR *in_desc,
+                                    out_func out, void FAR *out_desc));
+/*
+     inflateBack() does a raw inflate with a single call using a call-back
+   interface for input and output.  This is potentially more efficient than
+   inflate() for file i/o applications, in that it avoids copying between the
+   output and the sliding window by simply making the window itself the output
+   buffer.  inflate() can be faster on modern CPUs when used with large
+   buffers.  inflateBack() trusts the application to not change the output
+   buffer passed by the output function, at least until inflateBack() returns.
+
+     inflateBackInit() must be called first to allocate the internal state
+   and to initialize the state with the user-provided window buffer.
+   inflateBack() may then be used multiple times to inflate a complete, raw
+   deflate stream with each call.  inflateBackEnd() is then called to free the
+   allocated state.
+
+     A raw deflate stream is one with no zlib or gzip header or trailer.
+   This routine would normally be used in a utility that reads zip or gzip
+   files and writes out uncompressed files.  The utility would decode the
+   header and process the trailer on its own, hence this routine expects only
+   the raw deflate stream to decompress.  This is different from the normal
+   behavior of inflate(), which expects either a zlib or gzip header and
+   trailer around the deflate stream.
+
+     inflateBack() uses two subroutines supplied by the caller that are then
+   called by inflateBack() for input and output.  inflateBack() calls those
+   routines until it reads a complete deflate stream and writes out all of the
+   uncompressed data, or until it encounters an error.  The function's
+   parameters and return types are defined above in the in_func and out_func
+   typedefs.  inflateBack() will call in(in_desc, &buf) which should return the
+   number of bytes of provided input, and a pointer to that input in buf.  If
+   there is no input available, in() must return zero--buf is ignored in that
+   case--and inflateBack() will return a buffer error.  inflateBack() will call
+   out(out_desc, buf, len) to write the uncompressed data buf[0..len-1].  out()
+   should return zero on success, or non-zero on failure.  If out() returns
+   non-zero, inflateBack() will return with an error.  Neither in() nor out()
+   are permitted to change the contents of the window provided to
+   inflateBackInit(), which is also the buffer that out() uses to write from.
+   The length written by out() will be at most the window size.  Any non-zero
+   amount of input may be provided by in().
+
+     For convenience, inflateBack() can be provided input on the first call by
+   setting strm->next_in and strm->avail_in.  If that input is exhausted, then
+   in() will be called.  Therefore strm->next_in must be initialized before
+   calling inflateBack().  If strm->next_in is Z_NULL, then in() will be called
+   immediately for input.  If strm->next_in is not Z_NULL, then strm->avail_in
+   must also be initialized, and then if strm->avail_in is not zero, input will
+   initially be taken from strm->next_in[0 ..  strm->avail_in - 1].
+
+     The in_desc and out_desc parameters of inflateBack() is passed as the
+   first parameter of in() and out() respectively when they are called.  These
+   descriptors can be optionally used to pass any information that the caller-
+   supplied in() and out() functions need to do their job.
+
+     On return, inflateBack() will set strm->next_in and strm->avail_in to
+   pass back any unused input that was provided by the last in() call.  The
+   return values of inflateBack() can be Z_STREAM_END on success, Z_BUF_ERROR
+   if in() or out() returned an error, Z_DATA_ERROR if there was a format error
+   in the deflate stream (in which case strm->msg is set to indicate the nature
+   of the error), or Z_STREAM_ERROR if the stream was not properly initialized.
+   In the case of Z_BUF_ERROR, an input or output error can be distinguished
+   using strm->next_in which will be Z_NULL only if in() returned an error.  If
+   strm->next_in is not Z_NULL, then the Z_BUF_ERROR was due to out() returning
+   non-zero.  (in() will always be called before out(), so strm->next_in is
+   assured to be defined if out() returns non-zero.) Note that inflateBack()
+   cannot return Z_OK.
+*/
+
+ZEXTERN int ZEXPORT inflateBackEnd OF((z_streamp strm));
+/*
+     All memory allocated by inflateBackInit() is freed.
+
+     inflateBackEnd() returns Z_OK on success, or Z_STREAM_ERROR if the stream
+   state was inconsistent.
+*/
+
+ZEXTERN uLong ZEXPORT zlibCompileFlags OF((void));
+/* Return flags indicating compile-time options.
+
+    Type sizes, two bits each, 00 = 16 bits, 01 = 32, 10 = 64, 11 = other:
+     1.0: size of uInt
+     3.2: size of uLong
+     5.4: size of voidpf (pointer)
+     7.6: size of z_off_t
+
+    Compiler, assembler, and debug options:
+     8: DEBUG
+     9: ASMV or ASMINF -- use ASM code
+     10: ZLIB_WINAPI -- exported functions use the WINAPI calling convention
+     11: 0 (reserved)
+
+    One-time table building (smaller code, but not thread-safe if true):
+     12: BUILDFIXED -- build static block decoding tables when needed
+     13: DYNAMIC_CRC_TABLE -- build CRC calculation tables when needed
+     14,15: 0 (reserved)
+
+    Library content (indicates missing functionality):
+     16: NO_GZCOMPRESS -- gz* functions cannot compress (to avoid linking
+                          deflate code when not needed)
+     17: NO_GZIP -- deflate can't write gzip streams, and inflate can't detect
+                    and decode gzip streams (to avoid linking crc code)
+     18-19: 0 (reserved)
+
+    Operation variations (changes in library functionality):
+     20: PKZIP_BUG_WORKAROUND -- slightly more permissive inflate
+     21: FASTEST -- deflate algorithm with only one, lowest compression level
+     22,23: 0 (reserved)
+
+    The sprintf variant used by gzprintf (zero is best):
+     24: 0 = vs*, 1 = s* -- 1 means limited to 20 arguments after the format
+     25: 0 = *nprintf, 1 = *printf -- 1 means gzprintf() not secure!
+     26: 0 = returns value, 1 = void -- 1 means inferred string length returned
+
+    Remainder:
+     27-31: 0 (reserved)
+ */
+
+#ifndef Z_SOLO
+
+                        /* utility functions */
+
+/*
+     The following utility functions are implemented on top of the basic
+   stream-oriented functions.  To simplify the interface, some default options
+   are assumed (compression level and memory usage, standard memory allocation
+   functions).  The source code of these utility functions can be modified if
+   you need special options.
+*/
+
+ZEXTERN int ZEXPORT compress OF((Bytef *dest,   uLongf *destLen,
+                                 const Bytef *source, uLong sourceLen));
+/*
+     Compresses the source buffer into the destination buffer.  sourceLen is
+   the byte length of the source buffer.  Upon entry, destLen is the total size
+   of the destination buffer, which must be at least the value returned by
+   compressBound(sourceLen).  Upon exit, destLen is the actual size of the
+   compressed buffer.
+
+     compress returns Z_OK if success, Z_MEM_ERROR if there was not
+   enough memory, Z_BUF_ERROR if there was not enough room in the output
+   buffer.
+*/
+
+ZEXTERN int ZEXPORT compress2 OF((Bytef *dest,   uLongf *destLen,
+                                  const Bytef *source, uLong sourceLen,
+                                  int level));
+/*
+     Compresses the source buffer into the destination buffer.  The level
+   parameter has the same meaning as in deflateInit.  sourceLen is the byte
+   length of the source buffer.  Upon entry, destLen is the total size of the
+   destination buffer, which must be at least the value returned by
+   compressBound(sourceLen).  Upon exit, destLen is the actual size of the
+   compressed buffer.
+
+     compress2 returns Z_OK if success, Z_MEM_ERROR if there was not enough
+   memory, Z_BUF_ERROR if there was not enough room in the output buffer,
+   Z_STREAM_ERROR if the level parameter is invalid.
+*/
+
+ZEXTERN uLong ZEXPORT compressBound OF((uLong sourceLen));
+/*
+     compressBound() returns an upper bound on the compressed size after
+   compress() or compress2() on sourceLen bytes.  It would be used before a
+   compress() or compress2() call to allocate the destination buffer.
+*/
+
+ZEXTERN int ZEXPORT uncompress OF((Bytef *dest,   uLongf *destLen,
+                                   const Bytef *source, uLong sourceLen));
+/*
+     Decompresses the source buffer into the destination buffer.  sourceLen is
+   the byte length of the source buffer.  Upon entry, destLen is the total size
+   of the destination buffer, which must be large enough to hold the entire
+   uncompressed data.  (The size of the uncompressed data must have been saved
+   previously by the compressor and transmitted to the decompressor by some
+   mechanism outside the scope of this compression library.) Upon exit, destLen
+   is the actual size of the uncompressed buffer.
+
+     uncompress returns Z_OK if success, Z_MEM_ERROR if there was not
+   enough memory, Z_BUF_ERROR if there was not enough room in the output
+   buffer, or Z_DATA_ERROR if the input data was corrupted or incomplete.  In
+   the case where there is not enough room, uncompress() will fill the output
+   buffer with the uncompressed data up to that point.
+*/
+
+                        /* gzip file access functions */
+
+/*
+     This library supports reading and writing files in gzip (.gz) format with
+   an interface similar to that of stdio, using the functions that start with
+   "gz".  The gzip format is different from the zlib format.  gzip is a gzip
+   wrapper, documented in RFC 1952, wrapped around a deflate stream.
+*/
+
+typedef struct gzFile_s *gzFile;    /* semi-opaque gzip file descriptor */
+
+/*
+ZEXTERN gzFile ZEXPORT gzopen OF((const char *path, const char *mode));
+
+     Opens a gzip (.gz) file for reading or writing.  The mode parameter is as
+   in fopen ("rb" or "wb") but can also include a compression level ("wb9") or
+   a strategy: 'f' for filtered data as in "wb6f", 'h' for Huffman-only
+   compression as in "wb1h", 'R' for run-length encoding as in "wb1R", or 'F'
+   for fixed code compression as in "wb9F".  (See the description of
+   deflateInit2 for more information about the strategy parameter.)  'T' will
+   request transparent writing or appending with no compression and not using
+   the gzip format.
+
+     "a" can be used instead of "w" to request that the gzip stream that will
+   be written be appended to the file.  "+" will result in an error, since
+   reading and writing to the same gzip file is not supported.  The addition of
+   "x" when writing will create the file exclusively, which fails if the file
+   already exists.  On systems that support it, the addition of "e" when
+   reading or writing will set the flag to close the file on an execve() call.
+
+     These functions, as well as gzip, will read and decode a sequence of gzip
+   streams in a file.  The append function of gzopen() can be used to create
+   such a file.  (Also see gzflush() for another way to do this.)  When
+   appending, gzopen does not test whether the file begins with a gzip stream,
+   nor does it look for the end of the gzip streams to begin appending.  gzopen
+   will simply append a gzip stream to the existing file.
+
+     gzopen can be used to read a file which is not in gzip format; in this
+   case gzread will directly read from the file without decompression.  When
+   reading, this will be detected automatically by looking for the magic two-
+   byte gzip header.
+
+     gzopen returns NULL if the file could not be opened, if there was
+   insufficient memory to allocate the gzFile state, or if an invalid mode was
+   specified (an 'r', 'w', or 'a' was not provided, or '+' was provided).
+   errno can be checked to determine if the reason gzopen failed was that the
+   file could not be opened.
+*/
+
+ZEXTERN gzFile ZEXPORT gzdopen OF((int fd, const char *mode));
+/*
+     gzdopen associates a gzFile with the file descriptor fd.  File descriptors
+   are obtained from calls like open, dup, creat, pipe or fileno (if the file
+   has been previously opened with fopen).  The mode parameter is as in gzopen.
+
+     The next call of gzclose on the returned gzFile will also close the file
+   descriptor fd, just like fclose(fdopen(fd, mode)) closes the file descriptor
+   fd.  If you want to keep fd open, use fd = dup(fd_keep); gz = gzdopen(fd,
+   mode);.  The duplicated descriptor should be saved to avoid a leak, since
+   gzdopen does not close fd if it fails.  If you are using fileno() to get the
+   file descriptor from a FILE *, then you will have to use dup() to avoid
+   double-close()ing the file descriptor.  Both gzclose() and fclose() will
+   close the associated file descriptor, so they need to have different file
+   descriptors.
+
+     gzdopen returns NULL if there was insufficient memory to allocate the
+   gzFile state, if an invalid mode was specified (an 'r', 'w', or 'a' was not
+   provided, or '+' was provided), or if fd is -1.  The file descriptor is not
+   used until the next gz* read, write, seek, or close operation, so gzdopen
+   will not detect if fd is invalid (unless fd is -1).
+*/
+
+ZEXTERN int ZEXPORT gzbuffer OF((gzFile file, unsigned size));
+/*
+     Set the internal buffer size used by this library's functions.  The
+   default buffer size is 8192 bytes.  This function must be called after
+   gzopen() or gzdopen(), and before any other calls that read or write the
+   file.  The buffer memory allocation is always deferred to the first read or
+   write.  Two buffers are allocated, either both of the specified size when
+   writing, or one of the specified size and the other twice that size when
+   reading.  A larger buffer size of, for example, 64K or 128K bytes will
+   noticeably increase the speed of decompression (reading).
+
+     The new buffer size also affects the maximum length for gzprintf().
+
+     gzbuffer() returns 0 on success, or -1 on failure, such as being called
+   too late.
+*/
+
+ZEXTERN int ZEXPORT gzsetparams OF((gzFile file, int level, int strategy));
+/*
+     Dynamically update the compression level or strategy.  See the description
+   of deflateInit2 for the meaning of these parameters.
+
+     gzsetparams returns Z_OK if success, or Z_STREAM_ERROR if the file was not
+   opened for writing.
+*/
+
+ZEXTERN int ZEXPORT gzread OF((gzFile file, voidp buf, unsigned len));
+/*
+     Reads the given number of uncompressed bytes from the compressed file.  If
+   the input file is not in gzip format, gzread copies the given number of
+   bytes into the buffer directly from the file.
+
+     After reaching the end of a gzip stream in the input, gzread will continue
+   to read, looking for another gzip stream.  Any number of gzip streams may be
+   concatenated in the input file, and will all be decompressed by gzread().
+   If something other than a gzip stream is encountered after a gzip stream,
+   that remaining trailing garbage is ignored (and no error is returned).
+
+     gzread can be used to read a gzip file that is being concurrently written.
+   Upon reaching the end of the input, gzread will return with the available
+   data.  If the error code returned by gzerror is Z_OK or Z_BUF_ERROR, then
+   gzclearerr can be used to clear the end of file indicator in order to permit
+   gzread to be tried again.  Z_OK indicates that a gzip stream was completed
+   on the last gzread.  Z_BUF_ERROR indicates that the input file ended in the
+   middle of a gzip stream.  Note that gzread does not return -1 in the event
+   of an incomplete gzip stream.  This error is deferred until gzclose(), which
+   will return Z_BUF_ERROR if the last gzread ended in the middle of a gzip
+   stream.  Alternatively, gzerror can be used before gzclose to detect this
+   case.
+
+     gzread returns the number of uncompressed bytes actually read, less than
+   len for end of file, or -1 for error.
+*/
+
+ZEXTERN int ZEXPORT gzwrite OF((gzFile file,
+                                voidpc buf, unsigned len));
+/*
+     Writes the given number of uncompressed bytes into the compressed file.
+   gzwrite returns the number of uncompressed bytes written or 0 in case of
+   error.
+*/
+
+ZEXTERN int ZEXPORTVA gzprintf Z_ARG((gzFile file, const char *format, ...));
+/*
+     Converts, formats, and writes the arguments to the compressed file under
+   control of the format string, as in fprintf.  gzprintf returns the number of
+   uncompressed bytes actually written, or 0 in case of error.  The number of
+   uncompressed bytes written is limited to 8191, or one less than the buffer
+   size given to gzbuffer().  The caller should assure that this limit is not
+   exceeded.  If it is exceeded, then gzprintf() will return an error (0) with
+   nothing written.  In this case, there may also be a buffer overflow with
+   unpredictable consequences, which is possible only if zlib was compiled with
+   the insecure functions sprintf() or vsprintf() because the secure snprintf()
+   or vsnprintf() functions were not available.  This can be determined using
+   zlibCompileFlags().
+*/
+
+ZEXTERN int ZEXPORT gzputs OF((gzFile file, const char *s));
+/*
+     Writes the given null-terminated string to the compressed file, excluding
+   the terminating null character.
+
+     gzputs returns the number of characters written, or -1 in case of error.
+*/
+
+ZEXTERN char * ZEXPORT gzgets OF((gzFile file, char *buf, int len));
+/*
+     Reads bytes from the compressed file until len-1 characters are read, or a
+   newline character is read and transferred to buf, or an end-of-file
+   condition is encountered.  If any characters are read or if len == 1, the
+   string is terminated with a null character.  If no characters are read due
+   to an end-of-file or len < 1, then the buffer is left untouched.
+
+     gzgets returns buf which is a null-terminated string, or it returns NULL
+   for end-of-file or in case of error.  If there was an error, the contents at
+   buf are indeterminate.
+*/
+
+ZEXTERN int ZEXPORT gzputc OF((gzFile file, int c));
+/*
+     Writes c, converted to an unsigned char, into the compressed file.  gzputc
+   returns the value that was written, or -1 in case of error.
+*/
+
+ZEXTERN int ZEXPORT gzgetc OF((gzFile file));
+/*
+     Reads one byte from the compressed file.  gzgetc returns this byte or -1
+   in case of end of file or error.  This is implemented as a macro for speed.
+   As such, it does not do all of the checking the other functions do.  I.e.
+   it does not check to see if file is NULL, nor whether the structure file
+   points to has been clobbered or not.
+*/
+
+ZEXTERN int ZEXPORT gzungetc OF((int c, gzFile file));
+/*
+     Push one character back onto the stream to be read as the first character
+   on the next read.  At least one character of push-back is allowed.
+   gzungetc() returns the character pushed, or -1 on failure.  gzungetc() will
+   fail if c is -1, and may fail if a character has been pushed but not read
+   yet.  If gzungetc is used immediately after gzopen or gzdopen, at least the
+   output buffer size of pushed characters is allowed.  (See gzbuffer above.)
+   The pushed character will be discarded if the stream is repositioned with
+   gzseek() or gzrewind().
+*/
+
+ZEXTERN int ZEXPORT gzflush OF((gzFile file, int flush));
+/*
+     Flushes all pending output into the compressed file.  The parameter flush
+   is as in the deflate() function.  The return value is the zlib error number
+   (see function gzerror below).  gzflush is only permitted when writing.
+
+     If the flush parameter is Z_FINISH, the remaining data is written and the
+   gzip stream is completed in the output.  If gzwrite() is called again, a new
+   gzip stream will be started in the output.  gzread() is able to read such
+   concatented gzip streams.
+
+     gzflush should be called only when strictly necessary because it will
+   degrade compression if called too often.
+*/
+
+/*
+ZEXTERN z_off_t ZEXPORT gzseek OF((gzFile file,
+                                   z_off_t offset, int whence));
+
+     Sets the starting position for the next gzread or gzwrite on the given
+   compressed file.  The offset represents a number of bytes in the
+   uncompressed data stream.  The whence parameter is defined as in lseek(2);
+   the value SEEK_END is not supported.
+
+     If the file is opened for reading, this function is emulated but can be
+   extremely slow.  If the file is opened for writing, only forward seeks are
+   supported; gzseek then compresses a sequence of zeroes up to the new
+   starting position.
+
+     gzseek returns the resulting offset location as measured in bytes from
+   the beginning of the uncompressed stream, or -1 in case of error, in
+   particular if the file is opened for writing and the new starting position
+   would be before the current position.
+*/
+
+ZEXTERN int ZEXPORT    gzrewind OF((gzFile file));
+/*
+     Rewinds the given file. This function is supported only for reading.
+
+     gzrewind(file) is equivalent to (int)gzseek(file, 0L, SEEK_SET)
+*/
+
+/*
+ZEXTERN z_off_t ZEXPORT    gztell OF((gzFile file));
+
+     Returns the starting position for the next gzread or gzwrite on the given
+   compressed file.  This position represents a number of bytes in the
+   uncompressed data stream, and is zero when starting, even if appending or
+   reading a gzip stream from the middle of a file using gzdopen().
+
+     gztell(file) is equivalent to gzseek(file, 0L, SEEK_CUR)
+*/
+
+/*
+ZEXTERN z_off_t ZEXPORT gzoffset OF((gzFile file));
+
+     Returns the current offset in the file being read or written.  This offset
+   includes the count of bytes that precede the gzip stream, for example when
+   appending or when using gzdopen() for reading.  When reading, the offset
+   does not include as yet unused buffered input.  This information can be used
+   for a progress indicator.  On error, gzoffset() returns -1.
+*/
+
+ZEXTERN int ZEXPORT gzeof OF((gzFile file));
+/*
+     Returns true (1) if the end-of-file indicator has been set while reading,
+   false (0) otherwise.  Note that the end-of-file indicator is set only if the
+   read tried to go past the end of the input, but came up short.  Therefore,
+   just like feof(), gzeof() may return false even if there is no more data to
+   read, in the event that the last read request was for the exact number of
+   bytes remaining in the input file.  This will happen if the input file size
+   is an exact multiple of the buffer size.
+
+     If gzeof() returns true, then the read functions will return no more data,
+   unless the end-of-file indicator is reset by gzclearerr() and the input file
+   has grown since the previous end of file was detected.
+*/
+
+ZEXTERN int ZEXPORT gzdirect OF((gzFile file));
+/*
+     Returns true (1) if file is being copied directly while reading, or false
+   (0) if file is a gzip stream being decompressed.
+
+     If the input file is empty, gzdirect() will return true, since the input
+   does not contain a gzip stream.
+
+     If gzdirect() is used immediately after gzopen() or gzdopen() it will
+   cause buffers to be allocated to allow reading the file to determine if it
+   is a gzip file.  Therefore if gzbuffer() is used, it should be called before
+   gzdirect().
+
+     When writing, gzdirect() returns true (1) if transparent writing was
+   requested ("wT" for the gzopen() mode), or false (0) otherwise.  (Note:
+   gzdirect() is not needed when writing.  Transparent writing must be
+   explicitly requested, so the application already knows the answer.  When
+   linking statically, using gzdirect() will include all of the zlib code for
+   gzip file reading and decompression, which may not be desired.)
+*/
+
+ZEXTERN int ZEXPORT    gzclose OF((gzFile file));
+/*
+     Flushes all pending output if necessary, closes the compressed file and
+   deallocates the (de)compression state.  Note that once file is closed, you
+   cannot call gzerror with file, since its structures have been deallocated.
+   gzclose must not be called more than once on the same file, just as free
+   must not be called more than once on the same allocation.
+
+     gzclose will return Z_STREAM_ERROR if file is not valid, Z_ERRNO on a
+   file operation error, Z_MEM_ERROR if out of memory, Z_BUF_ERROR if the
+   last read ended in the middle of a gzip stream, or Z_OK on success.
+*/
+
+ZEXTERN int ZEXPORT gzclose_r OF((gzFile file));
+ZEXTERN int ZEXPORT gzclose_w OF((gzFile file));
+/*
+     Same as gzclose(), but gzclose_r() is only for use when reading, and
+   gzclose_w() is only for use when writing or appending.  The advantage to
+   using these instead of gzclose() is that they avoid linking in zlib
+   compression or decompression code that is not used when only reading or only
+   writing respectively.  If gzclose() is used, then both compression and
+   decompression code will be included the application when linking to a static
+   zlib library.
+*/
+
+ZEXTERN const char * ZEXPORT gzerror OF((gzFile file, int *errnum));
+/*
+     Returns the error message for the last error which occurred on the given
+   compressed file.  errnum is set to zlib error number.  If an error occurred
+   in the file system and not in the compression library, errnum is set to
+   Z_ERRNO and the application may consult errno to get the exact error code.
+
+     The application must not modify the returned string.  Future calls to
+   this function may invalidate the previously returned string.  If file is
+   closed, then the string previously returned by gzerror will no longer be
+   available.
+
+     gzerror() should be used to distinguish errors from end-of-file for those
+   functions above that do not distinguish those cases in their return values.
+*/
+
+ZEXTERN void ZEXPORT gzclearerr OF((gzFile file));
+/*
+     Clears the error and end-of-file flags for file.  This is analogous to the
+   clearerr() function in stdio.  This is useful for continuing to read a gzip
+   file that is being written concurrently.
+*/
+
+#endif /* !Z_SOLO */
+
+                        /* checksum functions */
+
+/*
+     These functions are not related to compression but are exported
+   anyway because they might be useful in applications using the compression
+   library.
+*/
+
+ZEXTERN uLong ZEXPORT adler32 OF((uLong adler, const Bytef *buf, uInt len));
+/*
+     Update a running Adler-32 checksum with the bytes buf[0..len-1] and
+   return the updated checksum.  If buf is Z_NULL, this function returns the
+   required initial value for the checksum.
+
+     An Adler-32 checksum is almost as reliable as a CRC32 but can be computed
+   much faster.
+
+   Usage example:
+
+     uLong adler = adler32(0L, Z_NULL, 0);
+
+     while (read_buffer(buffer, length) != EOF) {
+       adler = adler32(adler, buffer, length);
+     }
+     if (adler != original_adler) error();
+*/
+
+/*
+ZEXTERN uLong ZEXPORT adler32_combine OF((uLong adler1, uLong adler2,
+                                          z_off_t len2));
+
+     Combine two Adler-32 checksums into one.  For two sequences of bytes, seq1
+   and seq2 with lengths len1 and len2, Adler-32 checksums were calculated for
+   each, adler1 and adler2.  adler32_combine() returns the Adler-32 checksum of
+   seq1 and seq2 concatenated, requiring only adler1, adler2, and len2.  Note
+   that the z_off_t type (like off_t) is a signed integer.  If len2 is
+   negative, the result has no meaning or utility.
+*/
+
+ZEXTERN uLong ZEXPORT crc32   OF((uLong crc, const Bytef *buf, uInt len));
+/*
+     Update a running CRC-32 with the bytes buf[0..len-1] and return the
+   updated CRC-32.  If buf is Z_NULL, this function returns the required
+   initial value for the crc.  Pre- and post-conditioning (one's complement) is
+   performed within this function so it shouldn't be done by the application.
+
+   Usage example:
+
+     uLong crc = crc32(0L, Z_NULL, 0);
+
+     while (read_buffer(buffer, length) != EOF) {
+       crc = crc32(crc, buffer, length);
+     }
+     if (crc != original_crc) error();
+*/
+
+/*
+ZEXTERN uLong ZEXPORT crc32_combine OF((uLong crc1, uLong crc2, z_off_t len2));
+
+     Combine two CRC-32 check values into one.  For two sequences of bytes,
+   seq1 and seq2 with lengths len1 and len2, CRC-32 check values were
+   calculated for each, crc1 and crc2.  crc32_combine() returns the CRC-32
+   check value of seq1 and seq2 concatenated, requiring only crc1, crc2, and
+   len2.
+*/
+
+
+                        /* various hacks, don't look :) */
+
+/* deflateInit and inflateInit are macros to allow checking the zlib version
+ * and the compiler's view of z_stream:
+ */
+ZEXTERN int ZEXPORT deflateInit_ OF((z_streamp strm, int level,
+                                     const char *version, int stream_size));
+ZEXTERN int ZEXPORT inflateInit_ OF((z_streamp strm,
+                                     const char *version, int stream_size));
+ZEXTERN int ZEXPORT deflateInit2_ OF((z_streamp strm, int  level, int  method,
+                                      int windowBits, int memLevel,
+                                      int strategy, const char *version,
+                                      int stream_size));
+ZEXTERN int ZEXPORT inflateInit2_ OF((z_streamp strm, int  windowBits,
+                                      const char *version, int stream_size));
+ZEXTERN int ZEXPORT inflateBackInit_ OF((z_streamp strm, int windowBits,
+                                         unsigned char FAR *window,
+                                         const char *version,
+                                         int stream_size));
+#define deflateInit(strm, level) \
+        deflateInit_((strm), (level), ZLIB_VERSION, (int)sizeof(z_stream))
+#define inflateInit(strm) \
+        inflateInit_((strm), ZLIB_VERSION, (int)sizeof(z_stream))
+#define deflateInit2(strm, level, method, windowBits, memLevel, strategy) \
+        deflateInit2_((strm),(level),(method),(windowBits),(memLevel),\
+                      (strategy), ZLIB_VERSION, (int)sizeof(z_stream))
+#define inflateInit2(strm, windowBits) \
+        inflateInit2_((strm), (windowBits), ZLIB_VERSION, \
+                      (int)sizeof(z_stream))
+#define inflateBackInit(strm, windowBits, window) \
+        inflateBackInit_((strm), (windowBits), (window), \
+                      ZLIB_VERSION, (int)sizeof(z_stream))
+
+#ifndef Z_SOLO
+
+/* gzgetc() macro and its supporting function and exposed data structure.  Note
+ * that the real internal state is much larger than the exposed structure.
+ * This abbreviated structure exposes just enough for the gzgetc() macro.  The
+ * user should not mess with these exposed elements, since their names or
+ * behavior could change in the future, perhaps even capriciously.  They can
+ * only be used by the gzgetc() macro.  You have been warned.
+ */
+struct gzFile_s {
+    unsigned have;
+    unsigned char *next;
+    z_off64_t pos;
+};
+ZEXTERN int ZEXPORT gzgetc_ OF((gzFile file));  /* backward compatibility */
+#ifdef Z_PREFIX_SET
+#  undef z_gzgetc
+#  define z_gzgetc(g) \
+          ((g)->have ? ((g)->have--, (g)->pos++, *((g)->next)++) : gzgetc(g))
+#else
+#  define gzgetc(g) \
+          ((g)->have ? ((g)->have--, (g)->pos++, *((g)->next)++) : gzgetc(g))
+#endif
+
+/* provide 64-bit offset functions if _LARGEFILE64_SOURCE defined, and/or
+ * change the regular functions to 64 bits if _FILE_OFFSET_BITS is 64 (if
+ * both are true, the application gets the *64 functions, and the regular
+ * functions are changed to 64 bits) -- in case these are set on systems
+ * without large file support, _LFS64_LARGEFILE must also be true
+ */
+#ifdef Z_LARGE64
+   ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *));
+   ZEXTERN z_off64_t ZEXPORT gzseek64 OF((gzFile, z_off64_t, int));
+   ZEXTERN z_off64_t ZEXPORT gztell64 OF((gzFile));
+   ZEXTERN z_off64_t ZEXPORT gzoffset64 OF((gzFile));
+   ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off64_t));
+   ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off64_t));
+#endif
+
+#if !defined(ZLIB_INTERNAL) && defined(Z_WANT64)
+#  ifdef Z_PREFIX_SET
+#    define z_gzopen z_gzopen64
+#    define z_gzseek z_gzseek64
+#    define z_gztell z_gztell64
+#    define z_gzoffset z_gzoffset64
+#    define z_adler32_combine z_adler32_combine64
+#    define z_crc32_combine z_crc32_combine64
+#  else
+#    define gzopen gzopen64
+#    define gzseek gzseek64
+#    define gztell gztell64
+#    define gzoffset gzoffset64
+#    define adler32_combine adler32_combine64
+#    define crc32_combine crc32_combine64
+#  endif
+#  ifndef Z_LARGE64
+     ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *));
+     ZEXTERN z_off_t ZEXPORT gzseek64 OF((gzFile, z_off_t, int));
+     ZEXTERN z_off_t ZEXPORT gztell64 OF((gzFile));
+     ZEXTERN z_off_t ZEXPORT gzoffset64 OF((gzFile));
+     ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off_t));
+     ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off_t));
+#  endif
+#else
+   ZEXTERN gzFile ZEXPORT gzopen OF((const char *, const char *));
+   ZEXTERN z_off_t ZEXPORT gzseek OF((gzFile, z_off_t, int));
+   ZEXTERN z_off_t ZEXPORT gztell OF((gzFile));
+   ZEXTERN z_off_t ZEXPORT gzoffset OF((gzFile));
+   ZEXTERN uLong ZEXPORT adler32_combine OF((uLong, uLong, z_off_t));
+   ZEXTERN uLong ZEXPORT crc32_combine OF((uLong, uLong, z_off_t));
+#endif
+
+#else /* Z_SOLO */
+
+   ZEXTERN uLong ZEXPORT adler32_combine OF((uLong, uLong, z_off_t));
+   ZEXTERN uLong ZEXPORT crc32_combine OF((uLong, uLong, z_off_t));
+
+#endif /* !Z_SOLO */
+
+/* hack for buggy compilers */
+#if !defined(ZUTIL_H) && !defined(NO_DUMMY_DECL)
+    struct internal_state {int dummy;};
+#endif
+
+/* undocumented functions */
+ZEXTERN const char   * ZEXPORT zError           OF((int));
+ZEXTERN int            ZEXPORT inflateSyncPoint OF((z_streamp));
+ZEXTERN const z_crc_t FAR * ZEXPORT get_crc_table    OF((void));
+ZEXTERN int            ZEXPORT inflateUndermine OF((z_streamp, int));
+ZEXTERN int            ZEXPORT inflateResetKeep OF((z_streamp));
+ZEXTERN int            ZEXPORT deflateResetKeep OF((z_streamp));
+#if defined(_WIN32) && !defined(Z_SOLO)
+ZEXTERN gzFile         ZEXPORT gzopen_w OF((const wchar_t *path,
+                                            const char *mode));
+#endif
+#if defined(STDC) || defined(Z_HAVE_STDARG_H)
+#  ifndef Z_SOLO
+ZEXTERN int            ZEXPORTVA gzvprintf Z_ARG((gzFile file,
+                                                  const char *format,
+                                                  va_list va));
+#  endif
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* ZLIB_H */
diff --git a/lib/FreeImage.lib b/lib/FreeImage.lib
new file mode 100644 (file)
index 0000000..48d9bba
Binary files /dev/null and b/lib/FreeImage.lib differ
diff --git a/lib/freetype-bcc.lib b/lib/freetype-bcc.lib
new file mode 100644 (file)
index 0000000..f2ae65e
Binary files /dev/null and b/lib/freetype-bcc.lib differ
diff --git a/lib/freetype.lib b/lib/freetype.lib
new file mode 100644 (file)
index 0000000..983d4dd
Binary files /dev/null and b/lib/freetype.lib differ
diff --git a/lib/x64/SDL2.dll b/lib/x64/SDL2.dll
new file mode 100644 (file)
index 0000000..a65b22c
Binary files /dev/null and b/lib/x64/SDL2.dll differ
diff --git a/lib/x64/SDL2.lib b/lib/x64/SDL2.lib
new file mode 100644 (file)
index 0000000..6faf131
Binary files /dev/null and b/lib/x64/SDL2.lib differ
diff --git a/lib/x64/SDL2main.lib b/lib/x64/SDL2main.lib
new file mode 100644 (file)
index 0000000..699f8f6
Binary files /dev/null and b/lib/x64/SDL2main.lib differ
diff --git a/lib/x64/SDL2test.lib b/lib/x64/SDL2test.lib
new file mode 100644 (file)
index 0000000..e4d409b
Binary files /dev/null and b/lib/x64/SDL2test.lib differ
diff --git a/lib/x64/assimp.lib b/lib/x64/assimp.lib
new file mode 100644 (file)
index 0000000..9ba440e
Binary files /dev/null and b/lib/x64/assimp.lib differ
diff --git a/lib/x64/glew32.lib b/lib/x64/glew32.lib
new file mode 100644 (file)
index 0000000..9d1aadb
Binary files /dev/null and b/lib/x64/glew32.lib differ
diff --git a/lib/x64/glew32s.lib b/lib/x64/glew32s.lib
new file mode 100644 (file)
index 0000000..bc67710
Binary files /dev/null and b/lib/x64/glew32s.lib differ
diff --git a/lib/x86/SDL2.dll b/lib/x86/SDL2.dll
new file mode 100644 (file)
index 0000000..18d707f
Binary files /dev/null and b/lib/x86/SDL2.dll differ
diff --git a/lib/x86/SDL2.lib b/lib/x86/SDL2.lib
new file mode 100644 (file)
index 0000000..88452a9
Binary files /dev/null and b/lib/x86/SDL2.lib differ
diff --git a/lib/x86/SDL2main.lib b/lib/x86/SDL2main.lib
new file mode 100644 (file)
index 0000000..ad65ae0
Binary files /dev/null and b/lib/x86/SDL2main.lib differ
diff --git a/lib/x86/SDL2test.lib b/lib/x86/SDL2test.lib
new file mode 100644 (file)
index 0000000..09e11c6
Binary files /dev/null and b/lib/x86/SDL2test.lib differ
diff --git a/lib/x86/assimp.lib b/lib/x86/assimp.lib
new file mode 100644 (file)
index 0000000..af50e7c
Binary files /dev/null and b/lib/x86/assimp.lib differ
diff --git a/lib/x86/glew32.lib b/lib/x86/glew32.lib
new file mode 100644 (file)
index 0000000..a12d771
Binary files /dev/null and b/lib/x86/glew32.lib differ
diff --git a/lib/x86/glew32s.lib b/lib/x86/glew32s.lib
new file mode 100644 (file)
index 0000000..9f1ab1a
Binary files /dev/null and b/lib/x86/glew32s.lib differ
diff --git a/lib/zdll.lib b/lib/zdll.lib
new file mode 100644 (file)
index 0000000..669b186
Binary files /dev/null and b/lib/zdll.lib differ