Cycles: svn merge -r40266:40358 https://svn.blender.org/svnroot/bf-blender/trunk...
authorBrecht Van Lommel <brechtvanlommel@pandora.be>
Mon, 19 Sep 2011 14:20:15 +0000 (14:20 +0000)
committerBrecht Van Lommel <brechtvanlommel@pandora.be>
Mon, 19 Sep 2011 14:20:15 +0000 (14:20 +0000)
227 files changed:
CMakeLists.txt
SConstruct
build_files/cmake/cmake_static_check_cppcheck.py
build_files/cmake/cmake_static_check_sparse.py
build_files/cmake/cmake_static_check_splint.py
build_files/cmake/project_source_info.py
build_files/scons/tools/btools.py
extern/glew/README.txt [deleted file]
extern/glew/include/GL/glew.h
extern/glew/include/GL/glxew.h
extern/glew/include/GL/wglew.h
extern/glew/src/glew.c
intern/audaspace/intern/AUD_ConverterReader.cpp
intern/audaspace/intern/AUD_Mixer.cpp
intern/guardedalloc/intern/mallocn.c
intern/itasc/kdl/frames.hpp
intern/string/intern/STR_String.cpp
release/scripts/modules/bpy/utils.py
release/scripts/modules/bpy_extras/io_utils.py
release/scripts/modules/bpy_types.py
release/scripts/modules/console_python.py
release/scripts/startup/bl_operators/image.py
release/scripts/startup/bl_operators/object.py
release/scripts/startup/bl_operators/object_quick_effects.py
release/scripts/startup/bl_operators/sequencer.py
release/scripts/startup/bl_operators/uvcalc_follow_active.py
release/scripts/startup/bl_operators/uvcalc_lightmap.py
release/scripts/startup/bl_operators/uvcalc_smart_project.py
release/scripts/startup/bl_operators/wm.py
release/scripts/startup/bl_ui/properties_data_curve.py
release/scripts/startup/bl_ui/properties_particle.py
release/scripts/startup/bl_ui/properties_scene.py
release/scripts/startup/bl_ui/space_userpref.py
release/scripts/templates/operator_export.py
source/blender/avi/intern/avirgb.c
source/blender/avi/intern/endian.c
source/blender/blenfont/BLF_api.h
source/blender/blenfont/intern/blf.c
source/blender/blenfont/intern/blf_dir.c
source/blender/blenfont/intern/blf_font.c
source/blender/blenfont/intern/blf_glyph.c
source/blender/blenfont/intern/blf_internal_types.h
source/blender/blenfont/intern/blf_lang.c
source/blender/blenfont/intern/blf_util.c
source/blender/blenkernel/BKE_endian.h [deleted file]
source/blender/blenkernel/BKE_global.h
source/blender/blenkernel/BKE_utildefines.h
source/blender/blenkernel/CMakeLists.txt
source/blender/blenkernel/intern/blender.c
source/blender/blenkernel/intern/constraint.c
source/blender/blenkernel/intern/curve.c
source/blender/blenkernel/intern/effect.c
source/blender/blenkernel/intern/particle.c
source/blender/blenkernel/intern/screen.c
source/blender/blenkernel/intern/seqeffects.c
source/blender/blenkernel/intern/sound.c
source/blender/blenlib/BLI_math_rotation.h
source/blender/blenlib/BLI_utildefines.h
source/blender/blenlib/BLI_voxel.h
source/blender/blenlib/intern/math_rotation.c
source/blender/blenlib/intern/voxel.c
source/blender/blenloader/intern/readfile.c
source/blender/collada/AnimationExporter.cpp
source/blender/collada/AnimationImporter.cpp
source/blender/collada/CameraExporter.cpp
source/blender/collada/DocumentImporter.cpp
source/blender/collada/TransformReader.cpp
source/blender/collada/TransformWriter.cpp
source/blender/editors/animation/anim_channels_defines.c
source/blender/editors/animation/anim_draw.c
source/blender/editors/animation/drivers.c
source/blender/editors/animation/fmodifier_ui.c
source/blender/editors/animation/keyframes_general.c
source/blender/editors/animation/keyframing.c
source/blender/editors/animation/keyingsets.c
source/blender/editors/armature/editarmature.c
source/blender/editors/armature/meshlaplacian.c
source/blender/editors/armature/poseSlide.c
source/blender/editors/armature/poseobject.c
source/blender/editors/curve/editcurve.c
source/blender/editors/curve/editfont.c
source/blender/editors/gpencil/gpencil_edit.c
source/blender/editors/gpencil/gpencil_paint.c
source/blender/editors/interface/interface.c
source/blender/editors/interface/interface_draw.c
source/blender/editors/interface/interface_layout.c
source/blender/editors/interface/interface_ops.c
source/blender/editors/interface/interface_templates.c
source/blender/editors/interface/view2d_ops.c
source/blender/editors/mesh/editmesh.c
source/blender/editors/mesh/editmesh_mods.c
source/blender/editors/mesh/editmesh_tools.c
source/blender/editors/mesh/mesh_data.c
source/blender/editors/mesh/meshtools.c
source/blender/editors/metaball/mball_edit.c
source/blender/editors/object/object_constraint.c
source/blender/editors/object/object_edit.c
source/blender/editors/object/object_hook.c
source/blender/editors/object/object_modifier.c
source/blender/editors/object/object_ops.c
source/blender/editors/object/object_relations.c
source/blender/editors/object/object_select.c
source/blender/editors/object/object_shapekey.c
source/blender/editors/object/object_transform.c
source/blender/editors/object/object_vgroup.c
source/blender/editors/physics/particle_edit.c
source/blender/editors/physics/physics_fluid.c
source/blender/editors/render/render_internal.c
source/blender/editors/render/render_opengl.c
source/blender/editors/render/render_shading.c
source/blender/editors/screen/screen_ops.c
source/blender/editors/sculpt_paint/paint_image.c
source/blender/editors/sculpt_paint/paint_stroke.c
source/blender/editors/sculpt_paint/paint_utils.c
source/blender/editors/sculpt_paint/paint_vertex.c
source/blender/editors/sound/sound_ops.c
source/blender/editors/space_action/action_edit.c
source/blender/editors/space_action/action_select.c
source/blender/editors/space_console/console_ops.c
source/blender/editors/space_console/space_console.c
source/blender/editors/space_file/file_draw.c
source/blender/editors/space_file/file_ops.c
source/blender/editors/space_file/filesel.c
source/blender/editors/space_graph/graph_buttons.c
source/blender/editors/space_graph/graph_edit.c
source/blender/editors/space_graph/graph_select.c
source/blender/editors/space_image/image_buttons.c
source/blender/editors/space_image/image_ops.c
source/blender/editors/space_info/info_ops.c
source/blender/editors/space_info/info_report.c
source/blender/editors/space_logic/logic_window.c
source/blender/editors/space_nla/nla_channels.c
source/blender/editors/space_nla/nla_edit.c
source/blender/editors/space_nla/nla_select.c
source/blender/editors/space_node/node_edit.c
source/blender/editors/space_node/node_select.c
source/blender/editors/space_outliner/outliner_draw.c
source/blender/editors/space_outliner/outliner_edit.c
source/blender/editors/space_outliner/outliner_select.c
source/blender/editors/space_outliner/outliner_tools.c
source/blender/editors/space_sequencer/sequencer_add.c
source/blender/editors/space_sequencer/sequencer_edit.c
source/blender/editors/space_sequencer/sequencer_select.c
source/blender/editors/space_sequencer/space_sequencer.c
source/blender/editors/space_text/text_ops.c
source/blender/editors/space_view3d/drawobject.c
source/blender/editors/space_view3d/view3d_buttons.c
source/blender/editors/space_view3d/view3d_edit.c
source/blender/editors/space_view3d/view3d_select.c
source/blender/editors/space_view3d/view3d_view.c
source/blender/editors/transform/transform_conversions.c
source/blender/editors/transform/transform_ops.c
source/blender/editors/uvedit/uvedit_draw.c
source/blender/editors/uvedit/uvedit_ops.c
source/blender/editors/uvedit/uvedit_parametrizer.c
source/blender/editors/uvedit/uvedit_unwrap_ops.c
source/blender/imbuf/CMakeLists.txt
source/blender/imbuf/SConscript
source/blender/imbuf/intern/IMB_anim.h
source/blender/imbuf/intern/IMB_indexer.h
source/blender/imbuf/intern/imbuf.h
source/blender/imbuf/intern/jp2.c
source/blender/imbuf/intern/md5.c
source/blender/imbuf/intern/radiance_hdr.c
source/blender/imbuf/intern/tiff.c
source/blender/makesdna/DNA_ID.h
source/blender/makesrna/intern/rna_ID.c
source/blender/makesrna/intern/rna_access.c
source/blender/makesrna/intern/rna_action.c
source/blender/makesrna/intern/rna_actuator.c
source/blender/makesrna/intern/rna_actuator_api.c
source/blender/makesrna/intern/rna_animation.c
source/blender/makesrna/intern/rna_armature.c
source/blender/makesrna/intern/rna_armature_api.c
source/blender/makesrna/intern/rna_color.c
source/blender/makesrna/intern/rna_controller_api.c
source/blender/makesrna/intern/rna_curve.c
source/blender/makesrna/intern/rna_fcurve.c
source/blender/makesrna/intern/rna_gpencil.c
source/blender/makesrna/intern/rna_group.c
source/blender/makesrna/intern/rna_image_api.c
source/blender/makesrna/intern/rna_main.c
source/blender/makesrna/intern/rna_main_api.c
source/blender/makesrna/intern/rna_material.c
source/blender/makesrna/intern/rna_mesh.c
source/blender/makesrna/intern/rna_mesh_api.c
source/blender/makesrna/intern/rna_meta.c
source/blender/makesrna/intern/rna_modifier.c
source/blender/makesrna/intern/rna_nla.c
source/blender/makesrna/intern/rna_nodetree.c
source/blender/makesrna/intern/rna_object.c
source/blender/makesrna/intern/rna_object_api.c
source/blender/makesrna/intern/rna_object_force.c
source/blender/makesrna/intern/rna_pose.c
source/blender/makesrna/intern/rna_pose_api.c
source/blender/makesrna/intern/rna_render.c
source/blender/makesrna/intern/rna_scene.c
source/blender/makesrna/intern/rna_scene_api.c
source/blender/makesrna/intern/rna_screen.c
source/blender/makesrna/intern/rna_sensor_api.c
source/blender/makesrna/intern/rna_sequencer.c
source/blender/makesrna/intern/rna_sequencer_api.c
source/blender/makesrna/intern/rna_smoke.c
source/blender/makesrna/intern/rna_sound.c
source/blender/makesrna/intern/rna_space.c
source/blender/makesrna/intern/rna_speaker.c
source/blender/makesrna/intern/rna_text_api.c
source/blender/makesrna/intern/rna_texture.c
source/blender/makesrna/intern/rna_texture_api.c
source/blender/makesrna/intern/rna_ui.c
source/blender/makesrna/intern/rna_ui_api.c
source/blender/makesrna/intern/rna_userdef.c
source/blender/makesrna/intern/rna_wm.c
source/blender/makesrna/intern/rna_wm_api.c
source/blender/python/generic/bgl.c
source/blender/python/mathutils/mathutils_Matrix.c
source/blender/render/intern/include/voxeldata.h
source/blender/render/intern/source/convertblender.c
source/blender/render/intern/source/shadbuf.c
source/blender/render/intern/source/volumetric.c
source/blender/render/intern/source/voxeldata.c
source/blender/windowmanager/intern/wm_init_exit.c
source/blender/windowmanager/intern/wm_operators.c
source/gameengine/Ketsji/KX_Dome.cpp
source/gameengine/Ketsji/KX_GameObject.cpp
source/gameengine/Ketsji/KX_KetsjiEngine.cpp
source/gameengine/Ketsji/KX_Scene.cpp

index 3620b7dc2d1f2ffae8559e85d17083666ac2cf23..7194dd4b7dab397facfd33127fcfa300d8070817 100644 (file)
@@ -106,6 +106,7 @@ set(INCLUDE_OUTPUT_PATH ${CMAKE_BINARY_DIR}/include CACHE INTERNAL "" FORCE )
 
 get_blender_version()
 
+
 # Blender internal features
 option(WITH_BLENDER "Build blender (disable to build only the blender player)" ON)
 mark_as_advanced(WITH_BLENDER)
@@ -1273,6 +1274,18 @@ if(WITH_RAYOPTIMIZATION)
        unset(_sse2)
 endif()
 
+
+# set the endian define
+include(TestBigEndian)
+test_big_endian(_SYSTEM_BIG_ENDIAN)
+if(_SYSTEM_BIG_ENDIAN)
+       add_definitions(-D__BIG_ENDIAN__)
+else()
+       add_definitions(-D__LITTLE_ENDIAN__)
+endif()
+unset(_SYSTEM_BIG_ENDIAN)
+
+
 if(WITH_IMAGE_OPENJPEG)
        if(UNIX AND NOT APPLE)
                # dealt with above
index 06e6fe3473d5adb1cede2cff0b7a2deab5a188f4..3432a7b71ba962f2524e5d7fd6d916e159130266 100644 (file)
@@ -337,6 +337,17 @@ if env['BF_NO_ELBEEM'] == 1:
     env['CXXFLAGS'].append('-DDISABLE_ELBEEM')
     env['CCFLAGS'].append('-DDISABLE_ELBEEM')
 
+
+if btools.ENDIAN == "big":
+    env['CPPFLAGS'].append('-D__BIG_ENDIAN__')
+    env['CXXFLAGS'].append('-D__BIG_ENDIAN__')
+    env['CCFLAGS'].append('-D__BIG_ENDIAN__')
+else:
+    env['CPPFLAGS'].append('-D__LITTLE_ENDIAN__')
+    env['CXXFLAGS'].append('-D__LITTLE_ENDIAN__')
+    env['CCFLAGS'].append('-D__LITTLE_ENDIAN__')       
+
+
 # TODO, make optional
 env['CPPFLAGS'].append('-DWITH_AUDASPACE')
 env['CXXFLAGS'].append('-DWITH_AUDASPACE')
index 6a69891c0aa4d6113234fc715d1b7087756110b4..f6d46904794059b94ddf9a5760043da10a816c14 100644 (file)
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 
-# $Id:
+# $Id$
 # ***** BEGIN GPL LICENSE BLOCK *****
 #
 # This program is free software; you can redistribute it and/or
index 740569708b5b8da7c53609993f29d8a4fadfb3cb..9af53ed800834b68b2c968e891aed37dc157f960 100644 (file)
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 
-# $Id:
+# $Id$
 # ***** BEGIN GPL LICENSE BLOCK *****
 #
 # This program is free software; you can redistribute it and/or
index fbbee2351db93a333655f35482045b2dfb0a8257..7827d3a512028cfaafe0064e41d94dbe5f09cc8a 100644 (file)
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 
-# $Id:
+# $Id$
 # ***** BEGIN GPL LICENSE BLOCK *****
 #
 # This program is free software; you can redistribute it and/or
index d85544b732f9d1c4da12e086923b7d75a03d436f..c4b83d20ea5bc6ead1b5af4e7173bf5a45489b7a 100644 (file)
@@ -1,4 +1,4 @@
-# $Id:
+# $Id$
 # ***** BEGIN GPL LICENSE BLOCK *****
 #
 # This program is free software; you can redistribute it and/or
index be059241727a5f13bcf19d2aa0dc67a14cd7393a..caa83ea41be929c315aeadae883b6856c0988524 100644 (file)
@@ -63,9 +63,27 @@ def get_revision():
 
     return 'r' + build_rev
 
+
+# copied from: http://www.scons.org/wiki/AutoconfRecipes
+def checkEndian():
+    import struct
+    array = struct.pack('cccc', '\x01', '\x02', '\x03', '\x04')
+    i = struct.unpack('i', array)
+    # Little Endian
+    if i == struct.unpack('<i', array):
+        return "little"
+    # Big Endian
+    elif i == struct.unpack('>i', array):
+        return "big"
+    else:
+        raise Exception("cant find endian")
+
+
 # This is used in creating the local config directories
 VERSION, VERSION_DISPLAY = get_version()
 REVISION = get_revision()
+ENDIAN = checkEndian()
+
 
 def print_arguments(args, bc):
     if len(args):
diff --git a/extern/glew/README.txt b/extern/glew/README.txt
deleted file mode 100644 (file)
index 1b19c53..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-See doc/index.html for more information.
-
-If you downloaded the tarball from the GLEW website, you just need to:
-
-    Unix:
-
-        make
-
-    Windows:
-
-        use the project file in build/vc6/
-
-If you wish to build GLEW from scratch (update the extension data from
-the net or add your own extension information), you need a Unix
-environment (including wget, perl, and GNU make).  The extension data
-is regenerated from the top level source directory with:
-
-        make extensions
index 1775aa784dc9298fcc0c3890e82b9b454bba273a..cdf5b70db59682b0b25dc90f735438183d26242b 100644 (file)
@@ -199,9 +199,10 @@ typedef _W64 int ptrdiff_t;
 
 #include <stddef.h>
 
-/* SGI MIPSPro doesn't like stdint.h in C++ mode */
+/* 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(__GNUC__)
+#if (defined(__sgi) || defined(__sun)) && !defined(__GNUC__)
 #include <inttypes.h>
 #else
 #include <stdint.h>
@@ -1490,8 +1491,8 @@ 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, GLint *first, GLsizei *count, GLsizei primcount);
-typedef void (GLAPIENTRY * PFNGLMULTIDRAWELEMENTSPROC) (GLenum mode, GLsizei *count, GLenum type, const GLvoid **indices, GLsizei primcount);
+typedef void (GLAPIENTRY * PFNGLMULTIDRAWARRAYSPROC) (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount);
+typedef void (GLAPIENTRY * PFNGLMULTIDRAWELEMENTSPROC) (GLenum mode, const GLsizei *count, GLenum type, const GLvoid **indices, GLsizei primcount);
 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);
@@ -2408,6 +2409,15 @@ typedef void (GLAPIENTRY * PFNGLMINSAMPLESHADINGPROC) (GLclampf value);
 
 #endif /* GL_VERSION_4_1 */
 
+/* ----------------------------- GL_VERSION_4_2 ---------------------------- */
+
+#ifndef GL_VERSION_4_2
+#define GL_VERSION_4_2 1
+
+#define GLEW_VERSION_4_2 GLEW_GET_VAR(__GLEW_VERSION_4_2)
+
+#endif /* GL_VERSION_4_2 */
+
 /* -------------------------- GL_3DFX_multisample -------------------------- */
 
 #ifndef GL_3DFX_multisample
@@ -2535,6 +2545,21 @@ typedef void (GLAPIENTRY * PFNGLBLENDFUNCSEPARATEINDEXEDAMDPROC) (GLuint buf, GL
 
 #endif /* GL_AMD_draw_buffers_blend */
 
+/* ----------------------- 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
@@ -3033,6 +3058,23 @@ typedef void (GLAPIENTRY * PFNGLSHADERBINARYPROC) (GLsizei count, const GLuint*
 
 #endif /* GL_ARB_ES2_compatibility */
 
+/* -------------------------- 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_blend_func_extended ---------------------- */
 
 #ifndef GL_ARB_blend_func_extended
@@ -3100,6 +3142,33 @@ typedef void (GLAPIENTRY * PFNGLCLAMPCOLORARBPROC) (GLenum target, GLenum clamp)
 
 #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_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
@@ -3862,6 +3931,32 @@ typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBDIVISORARBPROC) (GLuint index, GLuin
 
 #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_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
@@ -4175,6 +4270,7 @@ typedef void (GLAPIENTRY * PFNGLPROVOKINGVERTEXPROC) (GLenum mode);
 #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);
@@ -4195,6 +4291,7 @@ typedef void (GLAPIENTRY * PFNGLGETNUNIFORMIVARBPROC) (GLuint program, GLint loc
 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)
@@ -4428,6 +4525,49 @@ typedef void (GLAPIENTRY * PFNGLVALIDATEPROGRAMPIPELINEPROC) (GLuint pipeline);
 
 #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
@@ -4437,6 +4577,86 @@ typedef void (GLAPIENTRY * PFNGLVALIDATEPROGRAMPIPELINEPROC) (GLuint pipeline);
 
 #endif /* GL_ARB_shader_bit_encoding */
 
+/* --------------------- 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_objects ------------------------- */
 
 #ifndef GL_ARB_shader_objects
@@ -4639,6 +4859,15 @@ typedef void (GLAPIENTRY * PFNGLUNIFORMSUBROUTINESUIVPROC) (GLenum shadertype, G
 
 #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
@@ -4666,6 +4895,15 @@ typedef void (GLAPIENTRY * PFNGLNAMEDSTRINGARBPROC) (GLenum type, GLint namelen,
 
 #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
@@ -5159,6 +5397,34 @@ typedef void (GLAPIENTRY * PFNGLTEXIMAGE3DMULTISAMPLEPROC) (GLenum target, GLsiz
 
 #endif /* GL_ARB_texture_rgb10_a2ui */
 
+/* ------------------------- GL_ARB_texture_storage ------------------------ */
+
+#ifndef GL_ARB_texture_storage
+#define GL_ARB_texture_storage 1
+
+#define GL_ALPHA8_EXT 0x803C
+#define GL_LUMINANCE8_EXT 0x8040
+#define GL_LUMINANCE8_ALPHA8_EXT 0x8045
+#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_swizzle ------------------------ */
 
 #ifndef GL_ARB_texture_swizzle
@@ -5246,6 +5512,21 @@ typedef void (GLAPIENTRY * PFNGLGETQUERYINDEXEDIVPROC) (GLenum target, GLuint in
 
 #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_transpose_matrix ------------------------ */
 
 #ifndef GL_ARB_transpose_matrix
@@ -7489,6 +7770,18 @@ typedef void (GLAPIENTRY * PFNGLRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC) (GLenum t
 
 #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
@@ -9622,17 +9915,17 @@ typedef void (GLAPIENTRY * PFNGLTEXSCISSORINTELPROC) (GLenum target, GLclampf tl
 #define GL_KTX_Z_REGION 0x2
 #define GL_KTX_STENCIL_REGION 0x3
 
-typedef GLuint (GLAPIENTRY * PFNGLBUFFERREGIONENABLEDEXTPROC) (void);
-typedef void (GLAPIENTRY * PFNGLDELETEBUFFERREGIONEXTPROC) (GLenum region);
-typedef void (GLAPIENTRY * PFNGLDRAWBUFFERREGIONEXTPROC) (GLuint region, GLint x, GLint y, GLsizei width, GLsizei height, GLint xDest, GLint yDest);
-typedef GLuint (GLAPIENTRY * PFNGLNEWBUFFERREGIONEXTPROC) (GLenum region);
-typedef void (GLAPIENTRY * PFNGLREADBUFFERREGIONEXTPROC) (GLuint region, GLint x, GLint y, GLsizei width, GLsizei height);
+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 glBufferRegionEnabledEXT GLEW_GET_FUN(__glewBufferRegionEnabledEXT)
-#define glDeleteBufferRegionEXT GLEW_GET_FUN(__glewDeleteBufferRegionEXT)
-#define glDrawBufferRegionEXT GLEW_GET_FUN(__glewDrawBufferRegionEXT)
-#define glNewBufferRegionEXT GLEW_GET_FUN(__glewNewBufferRegionEXT)
-#define glReadBufferRegionEXT GLEW_GET_FUN(__glewReadBufferRegionEXT)
+#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)
 
@@ -10516,6 +10809,242 @@ typedef void (GLAPIENTRY * PFNGLPROGRAMBUFFERPARAMETERSFVNVPROC) (GLenum target,
 
 #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_MOVE_TO_NV 0x02
+#define GL_GLYPH_HEIGHT_BIT_NV 0x02
+#define GL_ITALIC_BIT_NV 0x02
+#define GL_RELATIVE_MOVE_TO_NV 0x03
+#define GL_LINE_TO_NV 0x04
+#define GL_GLYPH_HORIZONTAL_BEARING_X_BIT_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_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_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_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_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_X_MIN_BOUNDS_NV 0x00010000
+#define GL_FONT_Y_MIN_BOUNDS_NV 0x00020000
+#define GL_FONT_X_MAX_BOUNDS_NV 0x00040000
+#define GL_FONT_Y_MAX_BOUNDS_NV 0x00080000
+#define GL_FONT_UNITS_PER_EM_NV 0x00100000
+#define GL_FONT_ASCENDER_NV 0x00200000
+#define GL_FONT_DESCENDER_NV 0x00400000
+#define GL_FONT_HEIGHT_NV 0x00800000
+#define GL_FONT_MAX_ADVANCE_WIDTH_NV 0x01000000
+#define GL_FONT_MAX_ADVANCE_HEIGHT_NV 0x02000000
+#define GL_FONT_UNDERLINE_POSITION_NV 0x04000000
+#define GL_FONT_UNDERLINE_THICKNESS_NV 0x08000000
+#define GL_FONT_HAS_KERNING_NV 0x10000000
+
+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 name, 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 name, GLubyte* commands);
+typedef void (GLAPIENTRY * PFNGLGETPATHCOORDSNVPROC) (GLuint name, GLfloat* coords);
+typedef void (GLAPIENTRY * PFNGLGETPATHDASHARRAYNVPROC) (GLuint name, GLfloat* dashArray);
+typedef GLfloat (GLAPIENTRY * PFNGLGETPATHLENGTHNVPROC) (GLuint path, GLsizei startSegment, GLsizei numSegments);
+typedef void (GLAPIENTRY * PFNGLGETPATHMETRICRANGENVPROC) (GLbitfield metricQueryMask, GLuint fistPathName, 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 name, GLenum param, GLfloat* value);
+typedef void (GLAPIENTRY * PFNGLGETPATHPARAMETERIVNVPROC) (GLuint name, GLenum param, 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 * 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 * 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 GLvoid*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 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 GLvoid*charcodes, GLenum handleMissingGlyphs, 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, GLint 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 GLvoid*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 * 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 * 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 glInterpolatePathsNV GLEW_GET_FUN(__glewInterpolatePathsNV)
+#define glIsPathNV GLEW_GET_FUN(__glewIsPathNV)
+#define glIsPointInFillPathNV GLEW_GET_FUN(__glewIsPointInFillPathNV)
+#define glIsPointInStrokePathNV GLEW_GET_FUN(__glewIsPointInStrokePathNV)
+#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 glPathGlyphRangeNV GLEW_GET_FUN(__glewPathGlyphRangeNV)
+#define glPathGlyphsNV GLEW_GET_FUN(__glewPathGlyphsNV)
+#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 glStencilFillPathInstancedNV GLEW_GET_FUN(__glewStencilFillPathInstancedNV)
+#define glStencilFillPathNV GLEW_GET_FUN(__glewStencilFillPathNV)
+#define glStencilStrokePathInstancedNV GLEW_GET_FUN(__glewStencilStrokePathInstancedNV)
+#define glStencilStrokePathNV GLEW_GET_FUN(__glewStencilStrokePathNV)
+#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_pixel_data_range ------------------------ */
 
 #ifndef GL_NV_pixel_data_range
@@ -13171,6 +13700,9 @@ GLEW_FUN_EXPORT PFNGLBLENDEQUATIONSEPARATEINDEXEDAMDPROC __glewBlendEquationSepa
 GLEW_FUN_EXPORT PFNGLBLENDFUNCINDEXEDAMDPROC __glewBlendFuncIndexedAMD;
 GLEW_FUN_EXPORT PFNGLBLENDFUNCSEPARATEINDEXEDAMDPROC __glewBlendFuncSeparateIndexedAMD;
 
+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;
@@ -13240,6 +13772,10 @@ GLEW_FUN_EXPORT PFNGLGETSHADERPRECISIONFORMATPROC __glewGetShaderPrecisionFormat
 GLEW_FUN_EXPORT PFNGLRELEASESHADERCOMPILERPROC __glewReleaseShaderCompiler;
 GLEW_FUN_EXPORT PFNGLSHADERBINARYPROC __glewShaderBinary;
 
+GLEW_FUN_EXPORT PFNGLDRAWARRAYSINSTANCEDBASEINSTANCEPROC __glewDrawArraysInstancedBaseInstance;
+GLEW_FUN_EXPORT PFNGLDRAWELEMENTSINSTANCEDBASEINSTANCEPROC __glewDrawElementsInstancedBaseInstance;
+GLEW_FUN_EXPORT PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXBASEINSTANCEPROC __glewDrawElementsInstancedBaseVertexBaseInstance;
+
 GLEW_FUN_EXPORT PFNGLBINDFRAGDATALOCATIONINDEXEDPROC __glewBindFragDataLocationIndexed;
 GLEW_FUN_EXPORT PFNGLGETFRAGDATAINDEXPROC __glewGetFragDataIndex;
 
@@ -13372,6 +13908,8 @@ GLEW_FUN_EXPORT PFNGLDRAWARRAYSINSTANCEDARBPROC __glewDrawArraysInstancedARB;
 GLEW_FUN_EXPORT PFNGLDRAWELEMENTSINSTANCEDARBPROC __glewDrawElementsInstancedARB;
 GLEW_FUN_EXPORT PFNGLVERTEXATTRIBDIVISORARBPROC __glewVertexAttribDivisorARB;
 
+GLEW_FUN_EXPORT PFNGLGETINTERNALFORMATIVPROC __glewGetInternalformativ;
+
 GLEW_FUN_EXPORT PFNGLFLUSHMAPPEDBUFFERRANGEPROC __glewFlushMappedBufferRange;
 GLEW_FUN_EXPORT PFNGLMAPBUFFERRANGEPROC __glewMapBufferRange;
 
@@ -13432,6 +13970,7 @@ GLEW_FUN_EXPORT PFNGLPOINTPARAMETERFVARBPROC __glewPointParameterfvARB;
 
 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;
@@ -13530,6 +14069,11 @@ GLEW_FUN_EXPORT PFNGLPROGRAMUNIFORMMATRIX4X3FVPROC __glewProgramUniformMatrix4x3
 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;
@@ -13612,6 +14156,13 @@ 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 PFNGLGETQUERYOBJECTI64VPROC __glewGetQueryObjecti64v;
 GLEW_FUN_EXPORT PFNGLGETQUERYOBJECTUI64VPROC __glewGetQueryObjectui64v;
 GLEW_FUN_EXPORT PFNGLQUERYCOUNTERPROC __glewQueryCounter;
@@ -13629,6 +14180,9 @@ GLEW_FUN_EXPORT PFNGLDRAWTRANSFORMFEEDBACKSTREAMPROC __glewDrawTransformFeedback
 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;
@@ -14481,11 +15035,11 @@ GLEW_FUN_EXPORT PFNGLVERTEXPOINTERVINTELPROC __glewVertexPointervINTEL;
 GLEW_FUN_EXPORT PFNGLTEXSCISSORFUNCINTELPROC __glewTexScissorFuncINTEL;
 GLEW_FUN_EXPORT PFNGLTEXSCISSORINTELPROC __glewTexScissorINTEL;
 
-GLEW_FUN_EXPORT PFNGLBUFFERREGIONENABLEDEXTPROC __glewBufferRegionEnabledEXT;
-GLEW_FUN_EXPORT PFNGLDELETEBUFFERREGIONEXTPROC __glewDeleteBufferRegionEXT;
-GLEW_FUN_EXPORT PFNGLDRAWBUFFERREGIONEXTPROC __glewDrawBufferRegionEXT;
-GLEW_FUN_EXPORT PFNGLNEWBUFFERREGIONEXTPROC __glewNewBufferRegionEXT;
-GLEW_FUN_EXPORT PFNGLREADBUFFERREGIONEXTPROC __glewReadBufferRegionEXT;
+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;
 
@@ -14663,6 +15217,56 @@ GLEW_FUN_EXPORT PFNGLPROGRAMBUFFERPARAMETERSIIVNVPROC __glewProgramBufferParamet
 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 PFNGLINTERPOLATEPATHSNVPROC __glewInterpolatePathsNV;
+GLEW_FUN_EXPORT PFNGLISPATHNVPROC __glewIsPathNV;
+GLEW_FUN_EXPORT PFNGLISPOINTINFILLPATHNVPROC __glewIsPointInFillPathNV;
+GLEW_FUN_EXPORT PFNGLISPOINTINSTROKEPATHNVPROC __glewIsPointInStrokePathNV;
+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 PFNGLPATHGLYPHRANGENVPROC __glewPathGlyphRangeNV;
+GLEW_FUN_EXPORT PFNGLPATHGLYPHSNVPROC __glewPathGlyphsNV;
+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 PFNGLSTENCILFILLPATHINSTANCEDNVPROC __glewStencilFillPathInstancedNV;
+GLEW_FUN_EXPORT PFNGLSTENCILFILLPATHNVPROC __glewStencilFillPathNV;
+GLEW_FUN_EXPORT PFNGLSTENCILSTROKEPATHINSTANCEDNVPROC __glewStencilStrokePathInstancedNV;
+GLEW_FUN_EXPORT PFNGLSTENCILSTROKEPATHNVPROC __glewStencilStrokePathNV;
+GLEW_FUN_EXPORT PFNGLTRANSFORMPATHNVPROC __glewTransformPathNV;
+GLEW_FUN_EXPORT PFNGLWEIGHTPATHSNVPROC __glewWeightPathsNV;
+
 GLEW_FUN_EXPORT PFNGLFLUSHPIXELDATARANGENVPROC __glewFlushPixelDataRangeNV;
 GLEW_FUN_EXPORT PFNGLPIXELDATARANGENVPROC __glewPixelDataRangeNV;
 
@@ -15022,6 +15626,7 @@ 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_3DFX_multisample;
 GLEW_VAR_EXPORT GLboolean __GLEW_3DFX_tbuffer;
 GLEW_VAR_EXPORT GLboolean __GLEW_3DFX_texture_compression_FXT1;
@@ -15030,6 +15635,7 @@ 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_multi_draw_indirect;
 GLEW_VAR_EXPORT GLboolean __GLEW_AMD_name_gen_delete;
 GLEW_VAR_EXPORT GLboolean __GLEW_AMD_performance_monitor;
 GLEW_VAR_EXPORT GLboolean __GLEW_AMD_sample_positions;
@@ -15056,10 +15662,13 @@ 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_base_instance;
 GLEW_VAR_EXPORT GLboolean __GLEW_ARB_blend_func_extended;
 GLEW_VAR_EXPORT GLboolean __GLEW_ARB_cl_event;
 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_conservative_depth;
 GLEW_VAR_EXPORT GLboolean __GLEW_ARB_copy_buffer;
 GLEW_VAR_EXPORT GLboolean __GLEW_ARB_debug_output;
 GLEW_VAR_EXPORT GLboolean __GLEW_ARB_depth_buffer_float;
@@ -15085,6 +15694,8 @@ 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_instanced_arrays;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_internalformat_query;
+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_multisample;
@@ -15100,14 +15711,18 @@ 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_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_image_load_store;
 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_subroutine;
 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_sync;
@@ -15133,10 +15748,12 @@ 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_storage;
 GLEW_VAR_EXPORT GLboolean __GLEW_ARB_texture_swizzle;
 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_transpose_matrix;
 GLEW_VAR_EXPORT GLboolean __GLEW_ARB_uniform_buffer_object;
 GLEW_VAR_EXPORT GLboolean __GLEW_ARB_vertex_array_bgra;
@@ -15198,6 +15815,7 @@ 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;
@@ -15322,6 +15940,7 @@ 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_pixel_data_range;
 GLEW_VAR_EXPORT GLboolean __GLEW_NV_point_sprite;
 GLEW_VAR_EXPORT GLboolean __GLEW_NV_present_video;
index 2995318f691a32deae79775a9615e20eec2b4b2d..6d249f73eaaf67f068ae71018ed70113627c554e 100644 (file)
@@ -785,6 +785,21 @@ typedef GLboolean ( * PFNGLXSET3DFXMODEMESAPROC) (GLint 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_image --------------------------- */
 
 #ifndef GLX_NV_copy_image
@@ -1385,6 +1400,9 @@ extern PFNGLXRELEASEBUFFERSMESAPROC __glewXReleaseBuffersMESA;
 
 extern PFNGLXSET3DFXMODEMESAPROC __glewXSet3DfxModeMESA;
 
+extern PFNGLXGETSWAPINTERVALMESAPROC __glewXGetSwapIntervalMESA;
+extern PFNGLXSWAPINTERVALMESAPROC __glewXSwapIntervalMESA;
+
 extern PFNGLXCOPYIMAGESUBDATANVPROC __glewXCopyImageSubDataNV;
 
 extern PFNGLXBINDVIDEODEVICENVPROC __glewXBindVideoDeviceNV;
@@ -1504,6 +1522,7 @@ GLXEW_EXPORT GLboolean __GLXEW_MESA_copy_sub_buffer;
 GLXEW_EXPORT GLboolean __GLXEW_MESA_pixmap_colormap;
 GLXEW_EXPORT GLboolean __GLXEW_MESA_release_buffers;
 GLXEW_EXPORT GLboolean __GLXEW_MESA_set_3dfx_mode;
+GLXEW_EXPORT GLboolean __GLXEW_MESA_swap_control;
 GLXEW_EXPORT GLboolean __GLXEW_NV_copy_image;
 GLXEW_EXPORT GLboolean __GLXEW_NV_float_buffer;
 GLXEW_EXPORT GLboolean __GLXEW_NV_multisample_coverage;
index deb64682811a7f19cda8318302106c69fe36f32f..05f054fc85546d485635d3d891648df4c01c02e4 100644 (file)
@@ -193,6 +193,8 @@ typedef BOOL (WINAPI * PFNWGLSAVEBUFFERREGIONARBPROC) (HANDLE hRegion, int x, in
 #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);
 
index b2244a03237fca855335baa5448c0dad5208a4d1..5d886ce7807f1ba42df482337e8cb2e37bb0ad09 100644 (file)
@@ -577,6 +577,9 @@ PFNGLBLENDEQUATIONSEPARATEINDEXEDAMDPROC __glewBlendEquationSeparateIndexedAMD =
 PFNGLBLENDFUNCINDEXEDAMDPROC __glewBlendFuncIndexedAMD = NULL;
 PFNGLBLENDFUNCSEPARATEINDEXEDAMDPROC __glewBlendFuncSeparateIndexedAMD = NULL;
 
+PFNGLMULTIDRAWARRAYSINDIRECTAMDPROC __glewMultiDrawArraysIndirectAMD = NULL;
+PFNGLMULTIDRAWELEMENTSINDIRECTAMDPROC __glewMultiDrawElementsIndirectAMD = NULL;
+
 PFNGLDELETENAMESAMDPROC __glewDeleteNamesAMD = NULL;
 PFNGLGENNAMESAMDPROC __glewGenNamesAMD = NULL;
 PFNGLISNAMEAMDPROC __glewIsNameAMD = NULL;
@@ -646,6 +649,10 @@ PFNGLGETSHADERPRECISIONFORMATPROC __glewGetShaderPrecisionFormat = NULL;
 PFNGLRELEASESHADERCOMPILERPROC __glewReleaseShaderCompiler = NULL;
 PFNGLSHADERBINARYPROC __glewShaderBinary = NULL;
 
+PFNGLDRAWARRAYSINSTANCEDBASEINSTANCEPROC __glewDrawArraysInstancedBaseInstance = NULL;
+PFNGLDRAWELEMENTSINSTANCEDBASEINSTANCEPROC __glewDrawElementsInstancedBaseInstance = NULL;
+PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXBASEINSTANCEPROC __glewDrawElementsInstancedBaseVertexBaseInstance = NULL;
+
 PFNGLBINDFRAGDATALOCATIONINDEXEDPROC __glewBindFragDataLocationIndexed = NULL;
 PFNGLGETFRAGDATAINDEXPROC __glewGetFragDataIndex = NULL;
 
@@ -778,6 +785,8 @@ PFNGLDRAWARRAYSINSTANCEDARBPROC __glewDrawArraysInstancedARB = NULL;
 PFNGLDRAWELEMENTSINSTANCEDARBPROC __glewDrawElementsInstancedARB = NULL;
 PFNGLVERTEXATTRIBDIVISORARBPROC __glewVertexAttribDivisorARB = NULL;
 
+PFNGLGETINTERNALFORMATIVPROC __glewGetInternalformativ = NULL;
+
 PFNGLFLUSHMAPPEDBUFFERRANGEPROC __glewFlushMappedBufferRange = NULL;
 PFNGLMAPBUFFERRANGEPROC __glewMapBufferRange = NULL;
 
@@ -838,6 +847,7 @@ PFNGLPOINTPARAMETERFVARBPROC __glewPointParameterfvARB = NULL;
 
 PFNGLPROVOKINGVERTEXPROC __glewProvokingVertex = NULL;
 
+PFNGLGETGRAPHICSRESETSTATUSARBPROC __glewGetGraphicsResetStatusARB = NULL;
 PFNGLGETNCOLORTABLEARBPROC __glewGetnColorTableARB = NULL;
 PFNGLGETNCOMPRESSEDTEXIMAGEARBPROC __glewGetnCompressedTexImageARB = NULL;
 PFNGLGETNCONVOLUTIONFILTERARBPROC __glewGetnConvolutionFilterARB = NULL;
@@ -936,6 +946,11 @@ PFNGLPROGRAMUNIFORMMATRIX4X3FVPROC __glewProgramUniformMatrix4x3fv = NULL;
 PFNGLUSEPROGRAMSTAGESPROC __glewUseProgramStages = NULL;
 PFNGLVALIDATEPROGRAMPIPELINEPROC __glewValidateProgramPipeline = NULL;
 
+PFNGLGETACTIVEATOMICCOUNTERBUFFERIVPROC __glewGetActiveAtomicCounterBufferiv = NULL;
+
+PFNGLBINDIMAGETEXTUREPROC __glewBindImageTexture = NULL;
+PFNGLMEMORYBARRIERPROC __glewMemoryBarrier = NULL;
+
 PFNGLATTACHOBJECTARBPROC __glewAttachObjectARB = NULL;
 PFNGLCOMPILESHADERARBPROC __glewCompileShaderARB = NULL;
 PFNGLCREATEPROGRAMOBJECTARBPROC __glewCreateProgramObjectARB = NULL;
@@ -1018,6 +1033,13 @@ PFNGLSAMPLEMASKIPROC __glewSampleMaski = NULL;
 PFNGLTEXIMAGE2DMULTISAMPLEPROC __glewTexImage2DMultisample = NULL;
 PFNGLTEXIMAGE3DMULTISAMPLEPROC __glewTexImage3DMultisample = NULL;
 
+PFNGLTEXSTORAGE1DPROC __glewTexStorage1D = NULL;
+PFNGLTEXSTORAGE2DPROC __glewTexStorage2D = NULL;
+PFNGLTEXSTORAGE3DPROC __glewTexStorage3D = NULL;
+PFNGLTEXTURESTORAGE1DEXTPROC __glewTextureStorage1DEXT = NULL;
+PFNGLTEXTURESTORAGE2DEXTPROC __glewTextureStorage2DEXT = NULL;
+PFNGLTEXTURESTORAGE3DEXTPROC __glewTextureStorage3DEXT = NULL;
+
 PFNGLGETQUERYOBJECTI64VPROC __glewGetQueryObjecti64v = NULL;
 PFNGLGETQUERYOBJECTUI64VPROC __glewGetQueryObjectui64v = NULL;
 PFNGLQUERYCOUNTERPROC __glewQueryCounter = NULL;
@@ -1035,6 +1057,9 @@ PFNGLDRAWTRANSFORMFEEDBACKSTREAMPROC __glewDrawTransformFeedbackStream = NULL;
 PFNGLENDQUERYINDEXEDPROC __glewEndQueryIndexed = NULL;
 PFNGLGETQUERYINDEXEDIVPROC __glewGetQueryIndexediv = NULL;
 
+PFNGLDRAWTRANSFORMFEEDBACKINSTANCEDPROC __glewDrawTransformFeedbackInstanced = NULL;
+PFNGLDRAWTRANSFORMFEEDBACKSTREAMINSTANCEDPROC __glewDrawTransformFeedbackStreamInstanced = NULL;
+
 PFNGLLOADTRANSPOSEMATRIXDARBPROC __glewLoadTransposeMatrixdARB = NULL;
 PFNGLLOADTRANSPOSEMATRIXFARBPROC __glewLoadTransposeMatrixfARB = NULL;
 PFNGLMULTTRANSPOSEMATRIXDARBPROC __glewMultTransposeMatrixdARB = NULL;
@@ -1887,11 +1912,11 @@ PFNGLVERTEXPOINTERVINTELPROC __glewVertexPointervINTEL = NULL;
 PFNGLTEXSCISSORFUNCINTELPROC __glewTexScissorFuncINTEL = NULL;
 PFNGLTEXSCISSORINTELPROC __glewTexScissorINTEL = NULL;
 
-PFNGLBUFFERREGIONENABLEDEXTPROC __glewBufferRegionEnabledEXT = NULL;
-PFNGLDELETEBUFFERREGIONEXTPROC __glewDeleteBufferRegionEXT = NULL;
-PFNGLDRAWBUFFERREGIONEXTPROC __glewDrawBufferRegionEXT = NULL;
-PFNGLNEWBUFFERREGIONEXTPROC __glewNewBufferRegionEXT = NULL;
-PFNGLREADBUFFERREGIONEXTPROC __glewReadBufferRegionEXT = NULL;
+PFNGLBUFFERREGIONENABLEDPROC __glewBufferRegionEnabled = NULL;
+PFNGLDELETEBUFFERREGIONPROC __glewDeleteBufferRegion = NULL;
+PFNGLDRAWBUFFERREGIONPROC __glewDrawBufferRegion = NULL;
+PFNGLNEWBUFFERREGIONPROC __glewNewBufferRegion = NULL;
+PFNGLREADBUFFERREGIONPROC __glewReadBufferRegion = NULL;
 
 PFNGLRESIZEBUFFERSMESAPROC __glewResizeBuffersMESA = NULL;
 
@@ -2069,6 +2094,56 @@ PFNGLPROGRAMBUFFERPARAMETERSIIVNVPROC __glewProgramBufferParametersIivNV = NULL;
 PFNGLPROGRAMBUFFERPARAMETERSIUIVNVPROC __glewProgramBufferParametersIuivNV = NULL;
 PFNGLPROGRAMBUFFERPARAMETERSFVNVPROC __glewProgramBufferParametersfvNV = NULL;
 
+PFNGLCOPYPATHNVPROC __glewCopyPathNV = NULL;
+PFNGLCOVERFILLPATHINSTANCEDNVPROC __glewCoverFillPathInstancedNV = NULL;
+PFNGLCOVERFILLPATHNVPROC __glewCoverFillPathNV = NULL;
+PFNGLCOVERSTROKEPATHINSTANCEDNVPROC __glewCoverStrokePathInstancedNV = NULL;
+PFNGLCOVERSTROKEPATHNVPROC __glewCoverStrokePathNV = NULL;
+PFNGLDELETEPATHSNVPROC __glewDeletePathsNV = NULL;
+PFNGLGENPATHSNVPROC __glewGenPathsNV = NULL;
+PFNGLGETPATHCOLORGENFVNVPROC __glewGetPathColorGenfvNV = NULL;
+PFNGLGETPATHCOLORGENIVNVPROC __glewGetPathColorGenivNV = NULL;
+PFNGLGETPATHCOMMANDSNVPROC __glewGetPathCommandsNV = NULL;
+PFNGLGETPATHCOORDSNVPROC __glewGetPathCoordsNV = NULL;
+PFNGLGETPATHDASHARRAYNVPROC __glewGetPathDashArrayNV = NULL;
+PFNGLGETPATHLENGTHNVPROC __glewGetPathLengthNV = NULL;
+PFNGLGETPATHMETRICRANGENVPROC __glewGetPathMetricRangeNV = NULL;
+PFNGLGETPATHMETRICSNVPROC __glewGetPathMetricsNV = NULL;
+PFNGLGETPATHPARAMETERFVNVPROC __glewGetPathParameterfvNV = NULL;
+PFNGLGETPATHPARAMETERIVNVPROC __glewGetPathParameterivNV = NULL;
+PFNGLGETPATHSPACINGNVPROC __glewGetPathSpacingNV = NULL;
+PFNGLGETPATHTEXGENFVNVPROC __glewGetPathTexGenfvNV = NULL;
+PFNGLGETPATHTEXGENIVNVPROC __glewGetPathTexGenivNV = NULL;
+PFNGLINTERPOLATEPATHSNVPROC __glewInterpolatePathsNV = NULL;
+PFNGLISPATHNVPROC __glewIsPathNV = NULL;
+PFNGLISPOINTINFILLPATHNVPROC __glewIsPointInFillPathNV = NULL;
+PFNGLISPOINTINSTROKEPATHNVPROC __glewIsPointInStrokePathNV = NULL;
+PFNGLPATHCOLORGENNVPROC __glewPathColorGenNV = NULL;
+PFNGLPATHCOMMANDSNVPROC __glewPathCommandsNV = NULL;
+PFNGLPATHCOORDSNVPROC __glewPathCoordsNV = NULL;
+PFNGLPATHCOVERDEPTHFUNCNVPROC __glewPathCoverDepthFuncNV = NULL;
+PFNGLPATHDASHARRAYNVPROC __glewPathDashArrayNV = NULL;
+PFNGLPATHFOGGENNVPROC __glewPathFogGenNV = NULL;
+PFNGLPATHGLYPHRANGENVPROC __glewPathGlyphRangeNV = NULL;
+PFNGLPATHGLYPHSNVPROC __glewPathGlyphsNV = NULL;
+PFNGLPATHPARAMETERFNVPROC __glewPathParameterfNV = NULL;
+PFNGLPATHPARAMETERFVNVPROC __glewPathParameterfvNV = NULL;
+PFNGLPATHPARAMETERINVPROC __glewPathParameteriNV = NULL;
+PFNGLPATHPARAMETERIVNVPROC __glewPathParameterivNV = NULL;
+PFNGLPATHSTENCILDEPTHOFFSETNVPROC __glewPathStencilDepthOffsetNV = NULL;
+PFNGLPATHSTENCILFUNCNVPROC __glewPathStencilFuncNV = NULL;
+PFNGLPATHSTRINGNVPROC __glewPathStringNV = NULL;
+PFNGLPATHSUBCOMMANDSNVPROC __glewPathSubCommandsNV = NULL;
+PFNGLPATHSUBCOORDSNVPROC __glewPathSubCoordsNV = NULL;
+PFNGLPATHTEXGENNVPROC __glewPathTexGenNV = NULL;
+PFNGLPOINTALONGPATHNVPROC __glewPointAlongPathNV = NULL;
+PFNGLSTENCILFILLPATHINSTANCEDNVPROC __glewStencilFillPathInstancedNV = NULL;
+PFNGLSTENCILFILLPATHNVPROC __glewStencilFillPathNV = NULL;
+PFNGLSTENCILSTROKEPATHINSTANCEDNVPROC __glewStencilStrokePathInstancedNV = NULL;
+PFNGLSTENCILSTROKEPATHNVPROC __glewStencilStrokePathNV = NULL;
+PFNGLTRANSFORMPATHNVPROC __glewTransformPathNV = NULL;
+PFNGLWEIGHTPATHSNVPROC __glewWeightPathsNV = NULL;
+
 PFNGLFLUSHPIXELDATARANGENVPROC __glewFlushPixelDataRangeNV = NULL;
 PFNGLPIXELDATARANGENVPROC __glewPixelDataRangeNV = NULL;
 
@@ -2427,6 +2502,7 @@ GLboolean __GLEW_VERSION_3_2 = GL_FALSE;
 GLboolean __GLEW_VERSION_3_3 = GL_FALSE;
 GLboolean __GLEW_VERSION_4_0 = GL_FALSE;
 GLboolean __GLEW_VERSION_4_1 = GL_FALSE;
+GLboolean __GLEW_VERSION_4_2 = GL_FALSE;
 GLboolean __GLEW_3DFX_multisample = GL_FALSE;
 GLboolean __GLEW_3DFX_tbuffer = GL_FALSE;
 GLboolean __GLEW_3DFX_texture_compression_FXT1 = GL_FALSE;
@@ -2435,6 +2511,7 @@ GLboolean __GLEW_AMD_conservative_depth = GL_FALSE;
 GLboolean __GLEW_AMD_debug_output = GL_FALSE;
 GLboolean __GLEW_AMD_depth_clamp_separate = GL_FALSE;
 GLboolean __GLEW_AMD_draw_buffers_blend = GL_FALSE;
+GLboolean __GLEW_AMD_multi_draw_indirect = GL_FALSE;
 GLboolean __GLEW_AMD_name_gen_delete = GL_FALSE;
 GLboolean __GLEW_AMD_performance_monitor = GL_FALSE;
 GLboolean __GLEW_AMD_sample_positions = GL_FALSE;
@@ -2461,10 +2538,13 @@ GLboolean __GLEW_APPLE_vertex_array_range = GL_FALSE;
 GLboolean __GLEW_APPLE_vertex_program_evaluators = GL_FALSE;
 GLboolean __GLEW_APPLE_ycbcr_422 = GL_FALSE;
 GLboolean __GLEW_ARB_ES2_compatibility = GL_FALSE;
+GLboolean __GLEW_ARB_base_instance = GL_FALSE;
 GLboolean __GLEW_ARB_blend_func_extended = GL_FALSE;
 GLboolean __GLEW_ARB_cl_event = GL_FALSE;
 GLboolean __GLEW_ARB_color_buffer_float = GL_FALSE;
 GLboolean __GLEW_ARB_compatibility = GL_FALSE;
+GLboolean __GLEW_ARB_compressed_texture_pixel_storage = GL_FALSE;
+GLboolean __GLEW_ARB_conservative_depth = GL_FALSE;
 GLboolean __GLEW_ARB_copy_buffer = GL_FALSE;
 GLboolean __GLEW_ARB_debug_output = GL_FALSE;
 GLboolean __GLEW_ARB_depth_buffer_float = GL_FALSE;
@@ -2490,6 +2570,8 @@ GLboolean __GLEW_ARB_half_float_pixel = GL_FALSE;
 GLboolean __GLEW_ARB_half_float_vertex = GL_FALSE;
 GLboolean __GLEW_ARB_imaging = GL_FALSE;
 GLboolean __GLEW_ARB_instanced_arrays = GL_FALSE;
+GLboolean __GLEW_ARB_internalformat_query = GL_FALSE;
+GLboolean __GLEW_ARB_map_buffer_alignment = GL_FALSE;
 GLboolean __GLEW_ARB_map_buffer_range = GL_FALSE;
 GLboolean __GLEW_ARB_matrix_palette = GL_FALSE;
 GLboolean __GLEW_ARB_multisample = GL_FALSE;
@@ -2505,14 +2587,18 @@ GLboolean __GLEW_ARB_sample_shading = GL_FALSE;
 GLboolean __GLEW_ARB_sampler_objects = GL_FALSE;
 GLboolean __GLEW_ARB_seamless_cube_map = GL_FALSE;
 GLboolean __GLEW_ARB_separate_shader_objects = GL_FALSE;
+GLboolean __GLEW_ARB_shader_atomic_counters = GL_FALSE;
 GLboolean __GLEW_ARB_shader_bit_encoding = GL_FALSE;
+GLboolean __GLEW_ARB_shader_image_load_store = GL_FALSE;
 GLboolean __GLEW_ARB_shader_objects = GL_FALSE;
 GLboolean __GLEW_ARB_shader_precision = GL_FALSE;
 GLboolean __GLEW_ARB_shader_stencil_export = GL_FALSE;
 GLboolean __GLEW_ARB_shader_subroutine = GL_FALSE;
 GLboolean __GLEW_ARB_shader_texture_lod = GL_FALSE;
 GLboolean __GLEW_ARB_shading_language_100 = GL_FALSE;
+GLboolean __GLEW_ARB_shading_language_420pack = GL_FALSE;
 GLboolean __GLEW_ARB_shading_language_include = GL_FALSE;
+GLboolean __GLEW_ARB_shading_language_packing = GL_FALSE;
 GLboolean __GLEW_ARB_shadow = GL_FALSE;
 GLboolean __GLEW_ARB_shadow_ambient = GL_FALSE;
 GLboolean __GLEW_ARB_sync = GL_FALSE;
@@ -2538,10 +2624,12 @@ GLboolean __GLEW_ARB_texture_query_lod = GL_FALSE;
 GLboolean __GLEW_ARB_texture_rectangle = GL_FALSE;
 GLboolean __GLEW_ARB_texture_rg = GL_FALSE;
 GLboolean __GLEW_ARB_texture_rgb10_a2ui = GL_FALSE;
+GLboolean __GLEW_ARB_texture_storage = GL_FALSE;
 GLboolean __GLEW_ARB_texture_swizzle = GL_FALSE;
 GLboolean __GLEW_ARB_timer_query = GL_FALSE;
 GLboolean __GLEW_ARB_transform_feedback2 = GL_FALSE;
 GLboolean __GLEW_ARB_transform_feedback3 = GL_FALSE;
+GLboolean __GLEW_ARB_transform_feedback_instanced = GL_FALSE;
 GLboolean __GLEW_ARB_transpose_matrix = GL_FALSE;
 GLboolean __GLEW_ARB_uniform_buffer_object = GL_FALSE;
 GLboolean __GLEW_ARB_vertex_array_bgra = GL_FALSE;
@@ -2603,6 +2691,7 @@ GLboolean __GLEW_EXT_fog_coord = GL_FALSE;
 GLboolean __GLEW_EXT_fragment_lighting = GL_FALSE;
 GLboolean __GLEW_EXT_framebuffer_blit = GL_FALSE;
 GLboolean __GLEW_EXT_framebuffer_multisample = GL_FALSE;
+GLboolean __GLEW_EXT_framebuffer_multisample_blit_scaled = GL_FALSE;
 GLboolean __GLEW_EXT_framebuffer_object = GL_FALSE;
 GLboolean __GLEW_EXT_framebuffer_sRGB = GL_FALSE;
 GLboolean __GLEW_EXT_geometry_shader4 = GL_FALSE;
@@ -2727,6 +2816,7 @@ GLboolean __GLEW_NV_occlusion_query = GL_FALSE;
 GLboolean __GLEW_NV_packed_depth_stencil = GL_FALSE;
 GLboolean __GLEW_NV_parameter_buffer_object = GL_FALSE;
 GLboolean __GLEW_NV_parameter_buffer_object2 = GL_FALSE;
+GLboolean __GLEW_NV_path_rendering = GL_FALSE;
 GLboolean __GLEW_NV_pixel_data_range = GL_FALSE;
 GLboolean __GLEW_NV_point_sprite = GL_FALSE;
 GLboolean __GLEW_NV_present_video = GL_FALSE;
@@ -3257,6 +3347,10 @@ static GLboolean _glewInit_GL_VERSION_4_0 (GLEW_CONTEXT_ARG_DEF_INIT)
 
 #endif /* GL_VERSION_4_1 */
 
+#ifdef GL_VERSION_4_2
+
+#endif /* GL_VERSION_4_2 */
+
 #ifdef GL_3DFX_multisample
 
 #endif /* GL_3DFX_multisample */
@@ -3322,6 +3416,20 @@ static GLboolean _glewInit_GL_AMD_draw_buffers_blend (GLEW_CONTEXT_ARG_DEF_INIT)
 
 #endif /* GL_AMD_draw_buffers_blend */
 
+#ifdef GL_AMD_multi_draw_indirect
+
+static GLboolean _glewInit_GL_AMD_multi_draw_indirect (GLEW_CONTEXT_ARG_DEF_INIT)
+{
+  GLboolean r = GL_FALSE;
+
+  r = ((glMultiDrawArraysIndirectAMD = (PFNGLMULTIDRAWARRAYSINDIRECTAMDPROC)glewGetProcAddress((const GLubyte*)"glMultiDrawArraysIndirectAMD")) == NULL) || r;
+  r = ((glMultiDrawElementsIndirectAMD = (PFNGLMULTIDRAWELEMENTSINDIRECTAMDPROC)glewGetProcAddress((const GLubyte*)"glMultiDrawElementsIndirectAMD")) == NULL) || r;
+
+  return r;
+}
+
+#endif /* GL_AMD_multi_draw_indirect */
+
 #ifdef GL_AMD_name_gen_delete
 
 static GLboolean _glewInit_GL_AMD_name_gen_delete (GLEW_CONTEXT_ARG_DEF_INIT)
@@ -3586,6 +3694,21 @@ static GLboolean _glewInit_GL_ARB_ES2_compatibility (GLEW_CONTEXT_ARG_DEF_INIT)
 
 #endif /* GL_ARB_ES2_compatibility */
 
+#ifdef GL_ARB_base_instance
+
+static GLboolean _glewInit_GL_ARB_base_instance (GLEW_CONTEXT_ARG_DEF_INIT)
+{
+  GLboolean r = GL_FALSE;
+
+  r = ((glDrawArraysInstancedBaseInstance = (PFNGLDRAWARRAYSINSTANCEDBASEINSTANCEPROC)glewGetProcAddress((const GLubyte*)"glDrawArraysInstancedBaseInstance")) == NULL) || r;
+  r = ((glDrawElementsInstancedBaseInstance = (PFNGLDRAWELEMENTSINSTANCEDBASEINSTANCEPROC)glewGetProcAddress((const GLubyte*)"glDrawElementsInstancedBaseInstance")) == NULL) || r;
+  r = ((glDrawElementsInstancedBaseVertexBaseInstance = (PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXBASEINSTANCEPROC)glewGetProcAddress((const GLubyte*)"glDrawElementsInstancedBaseVertexBaseInstance")) == NULL) || r;
+
+  return r;
+}
+
+#endif /* GL_ARB_base_instance */
+
 #ifdef GL_ARB_blend_func_extended
 
 static GLboolean _glewInit_GL_ARB_blend_func_extended (GLEW_CONTEXT_ARG_DEF_INIT)
@@ -3630,6 +3753,14 @@ static GLboolean _glewInit_GL_ARB_color_buffer_float (GLEW_CONTEXT_ARG_DEF_INIT)
 
 #endif /* GL_ARB_compatibility */
 
+#ifdef GL_ARB_compressed_texture_pixel_storage
+
+#endif /* GL_ARB_compressed_texture_pixel_storage */
+
+#ifdef GL_ARB_conservative_depth
+
+#endif /* GL_ARB_conservative_depth */
+
 #ifdef GL_ARB_copy_buffer
 
 static GLboolean _glewInit_GL_ARB_copy_buffer (GLEW_CONTEXT_ARG_DEF_INIT)
@@ -3940,6 +4071,23 @@ static GLboolean _glewInit_GL_ARB_instanced_arrays (GLEW_CONTEXT_ARG_DEF_INIT)
 
 #endif /* GL_ARB_instanced_arrays */
 
+#ifdef GL_ARB_internalformat_query
+
+static GLboolean _glewInit_GL_ARB_internalformat_query (GLEW_CONTEXT_ARG_DEF_INIT)
+{
+  GLboolean r = GL_FALSE;
+
+  r = ((glGetInternalformativ = (PFNGLGETINTERNALFORMATIVPROC)glewGetProcAddress((const GLubyte*)"glGetInternalformativ")) == NULL) || r;
+
+  return r;
+}
+
+#endif /* GL_ARB_internalformat_query */
+
+#ifdef GL_ARB_map_buffer_alignment
+
+#endif /* GL_ARB_map_buffer_alignment */
+
 #ifdef GL_ARB_map_buffer_range
 
 static GLboolean _glewInit_GL_ARB_map_buffer_range (GLEW_CONTEXT_ARG_DEF_INIT)
@@ -4095,6 +4243,7 @@ static GLboolean _glewInit_GL_ARB_robustness (GLEW_CONTEXT_ARG_DEF_INIT)
 {
   GLboolean r = GL_FALSE;
 
+  r = ((glGetGraphicsResetStatusARB = (PFNGLGETGRAPHICSRESETSTATUSARBPROC)glewGetProcAddress((const GLubyte*)"glGetGraphicsResetStatusARB")) == NULL) || r;
   r = ((glGetnColorTableARB = (PFNGLGETNCOLORTABLEARBPROC)glewGetProcAddress((const GLubyte*)"glGetnColorTableARB")) == NULL) || r;
   r = ((glGetnCompressedTexImageARB = (PFNGLGETNCOMPRESSEDTEXIMAGEARBPROC)glewGetProcAddress((const GLubyte*)"glGetnCompressedTexImageARB")) == NULL) || r;
   r = ((glGetnConvolutionFilterARB = (PFNGLGETNCONVOLUTIONFILTERARBPROC)glewGetProcAddress((const GLubyte*)"glGetnConvolutionFilterARB")) == NULL) || r;
@@ -4235,10 +4384,37 @@ static GLboolean _glewInit_GL_ARB_separate_shader_objects (GLEW_CONTEXT_ARG_DEF_
 
 #endif /* GL_ARB_separate_shader_objects */
 
+#ifdef GL_ARB_shader_atomic_counters
+
+static GLboolean _glewInit_GL_ARB_shader_atomic_counters (GLEW_CONTEXT_ARG_DEF_INIT)
+{
+  GLboolean r = GL_FALSE;
+
+  r = ((glGetActiveAtomicCounterBufferiv = (PFNGLGETACTIVEATOMICCOUNTERBUFFERIVPROC)glewGetProcAddress((const GLubyte*)"glGetActiveAtomicCounterBufferiv")) == NULL) || r;
+
+  return r;
+}
+
+#endif /* GL_ARB_shader_atomic_counters */
+
 #ifdef GL_ARB_shader_bit_encoding
 
 #endif /* GL_ARB_shader_bit_encoding */
 
+#ifdef GL_ARB_shader_image_load_store
+
+static GLboolean _glewInit_GL_ARB_shader_image_load_store (GLEW_CONTEXT_ARG_DEF_INIT)
+{
+  GLboolean r = GL_FALSE;
+
+  r = ((glBindImageTexture = (PFNGLBINDIMAGETEXTUREPROC)glewGetProcAddress((const GLubyte*)"glBindImageTexture")) == NULL) || r;
+  r = ((glMemoryBarrier = (PFNGLMEMORYBARRIERPROC)glewGetProcAddress((const GLubyte*)"glMemoryBarrier")) == NULL) || r;
+
+  return r;
+}
+
+#endif /* GL_ARB_shader_image_load_store */
+
 #ifdef GL_ARB_shader_objects
 
 static GLboolean _glewInit_GL_ARB_shader_objects (GLEW_CONTEXT_ARG_DEF_INIT)
@@ -4326,6 +4502,10 @@ static GLboolean _glewInit_GL_ARB_shader_subroutine (GLEW_CONTEXT_ARG_DEF_INIT)
 
 #endif /* GL_ARB_shading_language_100 */
 
+#ifdef GL_ARB_shading_language_420pack
+
+#endif /* GL_ARB_shading_language_420pack */
+
 #ifdef GL_ARB_shading_language_include
 
 static GLboolean _glewInit_GL_ARB_shading_language_include (GLEW_CONTEXT_ARG_DEF_INIT)
@@ -4344,6 +4524,10 @@ static GLboolean _glewInit_GL_ARB_shading_language_include (GLEW_CONTEXT_ARG_DEF
 
 #endif /* GL_ARB_shading_language_include */
 
+#ifdef GL_ARB_shading_language_packing
+
+#endif /* GL_ARB_shading_language_packing */
+
 #ifdef GL_ARB_shadow
 
 #endif /* GL_ARB_shadow */
@@ -4505,6 +4689,24 @@ static GLboolean _glewInit_GL_ARB_texture_multisample (GLEW_CONTEXT_ARG_DEF_INIT
 
 #endif /* GL_ARB_texture_rgb10_a2ui */
 
+#ifdef GL_ARB_texture_storage
+
+static GLboolean _glewInit_GL_ARB_texture_storage (GLEW_CONTEXT_ARG_DEF_INIT)
+{
+  GLboolean r = GL_FALSE;
+
+  r = ((glTexStorage1D = (PFNGLTEXSTORAGE1DPROC)glewGetProcAddress((const GLubyte*)"glTexStorage1D")) == NULL) || r;
+  r = ((glTexStorage2D = (PFNGLTEXSTORAGE2DPROC)glewGetProcAddress((const GLubyte*)"glTexStorage2D")) == NULL) || r;
+  r = ((glTexStorage3D = (PFNGLTEXSTORAGE3DPROC)glewGetProcAddress((const GLubyte*)"glTexStorage3D")) == NULL) || r;
+  r = ((glTextureStorage1DEXT = (PFNGLTEXTURESTORAGE1DEXTPROC)glewGetProcAddress((const GLubyte*)"glTextureStorage1DEXT")) == NULL) || r;
+  r = ((glTextureStorage2DEXT = (PFNGLTEXTURESTORAGE2DEXTPROC)glewGetProcAddress((const GLubyte*)"glTextureStorage2DEXT")) == NULL) || r;
+  r = ((glTextureStorage3DEXT = (PFNGLTEXTURESTORAGE3DEXTPROC)glewGetProcAddress((const GLubyte*)"glTextureStorage3DEXT")) == NULL) || r;
+
+  return r;
+}
+
+#endif /* GL_ARB_texture_storage */
+
 #ifdef GL_ARB_texture_swizzle
 
 #endif /* GL_ARB_texture_swizzle */
@@ -4559,6 +4761,20 @@ static GLboolean _glewInit_GL_ARB_transform_feedback3 (GLEW_CONTEXT_ARG_DEF_INIT
 
 #endif /* GL_ARB_transform_feedback3 */
 
+#ifdef GL_ARB_transform_feedback_instanced
+
+static GLboolean _glewInit_GL_ARB_transform_feedback_instanced (GLEW_CONTEXT_ARG_DEF_INIT)
+{
+  GLboolean r = GL_FALSE;
+
+  r = ((glDrawTransformFeedbackInstanced = (PFNGLDRAWTRANSFORMFEEDBACKINSTANCEDPROC)glewGetProcAddress((const GLubyte*)"glDrawTransformFeedbackInstanced")) == NULL) || r;
+  r = ((glDrawTransformFeedbackStreamInstanced = (PFNGLDRAWTRANSFORMFEEDBACKSTREAMINSTANCEDPROC)glewGetProcAddress((const GLubyte*)"glDrawTransformFeedbackStreamInstanced")) == NULL) || r;
+
+  return r;
+}
+
+#endif /* GL_ARB_transform_feedback_instanced */
+
 #ifdef GL_ARB_transpose_matrix
 
 static GLboolean _glewInit_GL_ARB_transpose_matrix (GLEW_CONTEXT_ARG_DEF_INIT)
@@ -5670,6 +5886,10 @@ static GLboolean _glewInit_GL_EXT_framebuffer_multisample (GLEW_CONTEXT_ARG_DEF_
 
 #endif /* GL_EXT_framebuffer_multisample */
 
+#ifdef GL_EXT_framebuffer_multisample_blit_scaled
+
+#endif /* GL_EXT_framebuffer_multisample_blit_scaled */
+
 #ifdef GL_EXT_framebuffer_object
 
 static GLboolean _glewInit_GL_EXT_framebuffer_object (GLEW_CONTEXT_ARG_DEF_INIT)
@@ -6579,11 +6799,11 @@ static GLboolean _glewInit_GL_KTX_buffer_region (GLEW_CONTEXT_ARG_DEF_INIT)
 {
   GLboolean r = GL_FALSE;
 
-  r = ((glBufferRegionEnabledEXT = (PFNGLBUFFERREGIONENABLEDEXTPROC)glewGetProcAddress((const GLubyte*)"glBufferRegionEnabledEXT")) == NULL) || r;
-  r = ((glDeleteBufferRegionEXT = (PFNGLDELETEBUFFERREGIONEXTPROC)glewGetProcAddress((const GLubyte*)"glDeleteBufferRegionEXT")) == NULL) || r;
-  r = ((glDrawBufferRegionEXT = (PFNGLDRAWBUFFERREGIONEXTPROC)glewGetProcAddress((const GLubyte*)"glDrawBufferRegionEXT")) == NULL) || r;
-  r = ((glNewBufferRegionEXT = (PFNGLNEWBUFFERREGIONEXTPROC)glewGetProcAddress((const GLubyte*)"glNewBufferRegionEXT")) == NULL) || r;
-  r = ((glReadBufferRegionEXT = (PFNGLREADBUFFERREGIONEXTPROC)glewGetProcAddress((const GLubyte*)"glReadBufferRegionEXT")) == NULL) || r;
+  r = ((glBufferRegionEnabled = (PFNGLBUFFERREGIONENABLEDPROC)glewGetProcAddress((const GLubyte*)"glBufferRegionEnabled")) == NULL) || r;
+  r = ((glDeleteBufferRegion = (PFNGLDELETEBUFFERREGIONPROC)glewGetProcAddress((const GLubyte*)"glDeleteBufferRegion")) == NULL) || r;
+  r = ((glDrawBufferRegion = (PFNGLDRAWBUFFERREGIONPROC)glewGetProcAddress((const GLubyte*)"glDrawBufferRegion")) == NULL) || r;
+  r = ((glNewBufferRegion = (PFNGLNEWBUFFERREGIONPROC)glewGetProcAddress((const GLubyte*)"glNewBufferRegion")) == NULL) || r;
+  r = ((glReadBufferRegion = (PFNGLREADBUFFERREGIONPROC)glewGetProcAddress((const GLubyte*)"glReadBufferRegion")) == NULL) || r;
 
   return r;
 }
@@ -7026,6 +7246,67 @@ static GLboolean _glewInit_GL_NV_parameter_buffer_object (GLEW_CONTEXT_ARG_DEF_I
 
 #endif /* GL_NV_parameter_buffer_object2 */
 
+#ifdef GL_NV_path_rendering
+
+static GLboolean _glewInit_GL_NV_path_rendering (GLEW_CONTEXT_ARG_DEF_INIT)
+{
+  GLboolean r = GL_FALSE;
+
+  r = ((glCopyPathNV = (PFNGLCOPYPATHNVPROC)glewGetProcAddress((const GLubyte*)"glCopyPathNV")) == NULL) || r;
+  r = ((glCoverFillPathInstancedNV = (PFNGLCOVERFILLPATHINSTANCEDNVPROC)glewGetProcAddress((const GLubyte*)"glCoverFillPathInstancedNV")) == NULL) || r;
+  r = ((glCoverFillPathNV = (PFNGLCOVERFILLPATHNVPROC)glewGetProcAddress((const GLubyte*)"glCoverFillPathNV")) == NULL) || r;
+  r = ((glCoverStrokePathInstancedNV = (PFNGLCOVERSTROKEPATHINSTANCEDNVPROC)glewGetProcAddress((const GLubyte*)"glCoverStrokePathInstancedNV")) == NULL) || r;
+  r = ((glCoverStrokePathNV = (PFNGLCOVERSTROKEPATHNVPROC)glewGetProcAddress((const GLubyte*)"glCoverStrokePathNV")) == NULL) || r;
+  r = ((glDeletePathsNV = (PFNGLDELETEPATHSNVPROC)glewGetProcAddress((const GLubyte*)"glDeletePathsNV")) == NULL) || r;
+  r = ((glGenPathsNV = (PFNGLGENPATHSNVPROC)glewGetProcAddress((const GLubyte*)"glGenPathsNV")) == NULL) || r;
+  r = ((glGetPathColorGenfvNV = (PFNGLGETPATHCOLORGENFVNVPROC)glewGetProcAddress((const GLubyte*)"glGetPathColorGenfvNV")) == NULL) || r;
+  r = ((glGetPathColorGenivNV = (PFNGLGETPATHCOLORGENIVNVPROC)glewGetProcAddress((const GLubyte*)"glGetPathColorGenivNV")) == NULL) || r;
+  r = ((glGetPathCommandsNV = (PFNGLGETPATHCOMMANDSNVPROC)glewGetProcAddress((const GLubyte*)"glGetPathCommandsNV")) == NULL) || r;
+  r = ((glGetPathCoordsNV = (PFNGLGETPATHCOORDSNVPROC)glewGetProcAddress((const GLubyte*)"glGetPathCoordsNV")) == NULL) || r;
+  r = ((glGetPathDashArrayNV = (PFNGLGETPATHDASHARRAYNVPROC)glewGetProcAddress((const GLubyte*)"glGetPathDashArrayNV")) == NULL) || r;
+  r = ((glGetPathLengthNV = (PFNGLGETPATHLENGTHNVPROC)glewGetProcAddress((const GLubyte*)"glGetPathLengthNV")) == NULL) || r;
+  r = ((glGetPathMetricRangeNV = (PFNGLGETPATHMETRICRANGENVPROC)glewGetProcAddress((const GLubyte*)"glGetPathMetricRangeNV")) == NULL) || r;
+  r = ((glGetPathMetricsNV = (PFNGLGETPATHMETRICSNVPROC)glewGetProcAddress((const GLubyte*)"glGetPathMetricsNV")) == NULL) || r;
+  r = ((glGetPathParameterfvNV = (PFNGLGETPATHPARAMETERFVNVPROC)glewGetProcAddress((const GLubyte*)"glGetPathParameterfvNV")) == NULL) || r;
+  r = ((glGetPathParameterivNV = (PFNGLGETPATHPARAMETERIVNVPROC)glewGetProcAddress((const GLubyte*)"glGetPathParameterivNV")) == NULL) || r;
+  r = ((glGetPathSpacingNV = (PFNGLGETPATHSPACINGNVPROC)glewGetProcAddress((const GLubyte*)"glGetPathSpacingNV")) == NULL) || r;
+  r = ((glGetPathTexGenfvNV = (PFNGLGETPATHTEXGENFVNVPROC)glewGetProcAddress((const GLubyte*)"glGetPathTexGenfvNV")) == NULL) || r;
+  r = ((glGetPathTexGenivNV = (PFNGLGETPATHTEXGENIVNVPROC)glewGetProcAddress((const GLubyte*)"glGetPathTexGenivNV")) == NULL) || r;
+  r = ((glInterpolatePathsNV = (PFNGLINTERPOLATEPATHSNVPROC)glewGetProcAddress((const GLubyte*)"glInterpolatePathsNV")) == NULL) || r;
+  r = ((glIsPathNV = (PFNGLISPATHNVPROC)glewGetProcAddress((const GLubyte*)"glIsPathNV")) == NULL) || r;
+  r = ((glIsPointInFillPathNV = (PFNGLISPOINTINFILLPATHNVPROC)glewGetProcAddress((const GLubyte*)"glIsPointInFillPathNV")) == NULL) || r;
+  r = ((glIsPointInStrokePathNV = (PFNGLISPOINTINSTROKEPATHNVPROC)glewGetProcAddress((const GLubyte*)"glIsPointInStrokePathNV")) == NULL) || r;
+  r = ((glPathColorGenNV = (PFNGLPATHCOLORGENNVPROC)glewGetProcAddress((const GLubyte*)"glPathColorGenNV")) == NULL) || r;
+  r = ((glPathCommandsNV = (PFNGLPATHCOMMANDSNVPROC)glewGetProcAddress((const GLubyte*)"glPathCommandsNV")) == NULL) || r;
+  r = ((glPathCoordsNV = (PFNGLPATHCOORDSNVPROC)glewGetProcAddress((const GLubyte*)"glPathCoordsNV")) == NULL) || r;
+  r = ((glPathCoverDepthFuncNV = (PFNGLPATHCOVERDEPTHFUNCNVPROC)glewGetProcAddress((const GLubyte*)"glPathCoverDepthFuncNV")) == NULL) || r;
+  r = ((glPathDashArrayNV = (PFNGLPATHDASHARRAYNVPROC)glewGetProcAddress((const GLubyte*)"glPathDashArrayNV")) == NULL) || r;
+  r = ((glPathFogGenNV = (PFNGLPATHFOGGENNVPROC)glewGetProcAddress((const GLubyte*)"glPathFogGenNV")) == NULL) || r;
+  r = ((glPathGlyphRangeNV = (PFNGLPATHGLYPHRANGENVPROC)glewGetProcAddress((const GLubyte*)"glPathGlyphRangeNV")) == NULL) || r;
+  r = ((glPathGlyphsNV = (PFNGLPATHGLYPHSNVPROC)glewGetProcAddress((const GLubyte*)"glPathGlyphsNV")) == NULL) || r;
+  r = ((glPathParameterfNV = (PFNGLPATHPARAMETERFNVPROC)glewGetProcAddress((const GLubyte*)"glPathParameterfNV")) == NULL) || r;
+  r = ((glPathParameterfvNV = (PFNGLPATHPARAMETERFVNVPROC)glewGetProcAddress((const GLubyte*)"glPathParameterfvNV")) == NULL) || r;
+  r = ((glPathParameteriNV = (PFNGLPATHPARAMETERINVPROC)glewGetProcAddress((const GLubyte*)"glPathParameteriNV")) == NULL) || r;
+  r = ((glPathParameterivNV = (PFNGLPATHPARAMETERIVNVPROC)glewGetProcAddress((const GLubyte*)"glPathParameterivNV")) == NULL) || r;
+  r = ((glPathStencilDepthOffsetNV = (PFNGLPATHSTENCILDEPTHOFFSETNVPROC)glewGetProcAddress((const GLubyte*)"glPathStencilDepthOffsetNV")) == NULL) || r;
+  r = ((glPathStencilFuncNV = (PFNGLPATHSTENCILFUNCNVPROC)glewGetProcAddress((const GLubyte*)"glPathStencilFuncNV")) == NULL) || r;
+  r = ((glPathStringNV = (PFNGLPATHSTRINGNVPROC)glewGetProcAddress((const GLubyte*)"glPathStringNV")) == NULL) || r;
+  r = ((glPathSubCommandsNV = (PFNGLPATHSUBCOMMANDSNVPROC)glewGetProcAddress((const GLubyte*)"glPathSubCommandsNV")) == NULL) || r;
+  r = ((glPathSubCoordsNV = (PFNGLPATHSUBCOORDSNVPROC)glewGetProcAddress((const GLubyte*)"glPathSubCoordsNV")) == NULL) || r;
+  r = ((glPathTexGenNV = (PFNGLPATHTEXGENNVPROC)glewGetProcAddress((const GLubyte*)"glPathTexGenNV")) == NULL) || r;
+  r = ((glPointAlongPathNV = (PFNGLPOINTALONGPATHNVPROC)glewGetProcAddress((const GLubyte*)"glPointAlongPathNV")) == NULL) || r;
+  r = ((glStencilFillPathInstancedNV = (PFNGLSTENCILFILLPATHINSTANCEDNVPROC)glewGetProcAddress((const GLubyte*)"glStencilFillPathInstancedNV")) == NULL) || r;
+  r = ((glStencilFillPathNV = (PFNGLSTENCILFILLPATHNVPROC)glewGetProcAddress((const GLubyte*)"glStencilFillPathNV")) == NULL) || r;
+  r = ((glStencilStrokePathInstancedNV = (PFNGLSTENCILSTROKEPATHINSTANCEDNVPROC)glewGetProcAddress((const GLubyte*)"glStencilStrokePathInstancedNV")) == NULL) || r;
+  r = ((glStencilStrokePathNV = (PFNGLSTENCILSTROKEPATHNVPROC)glewGetProcAddress((const GLubyte*)"glStencilStrokePathNV")) == NULL) || r;
+  r = ((glTransformPathNV = (PFNGLTRANSFORMPATHNVPROC)glewGetProcAddress((const GLubyte*)"glTransformPathNV")) == NULL) || r;
+  r = ((glWeightPathsNV = (PFNGLWEIGHTPATHSNVPROC)glewGetProcAddress((const GLubyte*)"glWeightPathsNV")) == NULL) || r;
+
+  return r;
+}
+
+#endif /* GL_NV_path_rendering */
+
 #ifdef GL_NV_pixel_data_range
 
 static GLboolean _glewInit_GL_NV_pixel_data_range (GLEW_CONTEXT_ARG_DEF_INIT)
@@ -8108,7 +8389,8 @@ GLenum glewContextInit (GLEW_CONTEXT_ARG_DEF_LIST)
   }
   else
   {
-    CONST_CAST(GLEW_VERSION_4_1)   = ( major > 4 )                 || ( major == 4 && minor >= 1 ) ? GL_TRUE : GL_FALSE;
+    CONST_CAST(GLEW_VERSION_4_2)   = ( major > 4 )                 || ( major == 4 && minor >= 2 ) ? GL_TRUE : GL_FALSE;
+    CONST_CAST(GLEW_VERSION_4_1)   = GLEW_VERSION_4_2   == GL_TRUE || ( major == 4 && minor >= 1 ) ? GL_TRUE : GL_FALSE;
     CONST_CAST(GLEW_VERSION_4_0)   = GLEW_VERSION_4_1   == GL_TRUE || ( major == 4               ) ? GL_TRUE : GL_FALSE;
     CONST_CAST(GLEW_VERSION_3_3)   = GLEW_VERSION_4_0   == GL_TRUE || ( major == 3 && minor >= 3 ) ? GL_TRUE : GL_FALSE;
     CONST_CAST(GLEW_VERSION_3_2)   = GLEW_VERSION_3_3   == GL_TRUE || ( major == 3 && minor >= 2 ) ? GL_TRUE : GL_FALSE;
@@ -8168,6 +8450,8 @@ GLenum glewContextInit (GLEW_CONTEXT_ARG_DEF_LIST)
 #endif /* GL_VERSION_4_0 */
 #ifdef GL_VERSION_4_1
 #endif /* GL_VERSION_4_1 */
+#ifdef GL_VERSION_4_2
+#endif /* GL_VERSION_4_2 */
 #ifdef GL_3DFX_multisample
   CONST_CAST(GLEW_3DFX_multisample) = _glewSearchExtension("GL_3DFX_multisample", extStart, extEnd);
 #endif /* GL_3DFX_multisample */
@@ -8195,6 +8479,10 @@ GLenum glewContextInit (GLEW_CONTEXT_ARG_DEF_LIST)
   CONST_CAST(GLEW_AMD_draw_buffers_blend) = _glewSearchExtension("GL_AMD_draw_buffers_blend", extStart, extEnd);
   if (glewExperimental || GLEW_AMD_draw_buffers_blend) CONST_CAST(GLEW_AMD_draw_buffers_blend) = !_glewInit_GL_AMD_draw_buffers_blend(GLEW_CONTEXT_ARG_VAR_INIT);
 #endif /* GL_AMD_draw_buffers_blend */
+#ifdef GL_AMD_multi_draw_indirect
+  CONST_CAST(GLEW_AMD_multi_draw_indirect) = _glewSearchExtension("GL_AMD_multi_draw_indirect", extStart, extEnd);
+  if (glewExperimental || GLEW_AMD_multi_draw_indirect) CONST_CAST(GLEW_AMD_multi_draw_indirect) = !_glewInit_GL_AMD_multi_draw_indirect(GLEW_CONTEXT_ARG_VAR_INIT);
+#endif /* GL_AMD_multi_draw_indirect */
 #ifdef GL_AMD_name_gen_delete
   CONST_CAST(GLEW_AMD_name_gen_delete) = _glewSearchExtension("GL_AMD_name_gen_delete", extStart, extEnd);
   if (glewExperimental || GLEW_AMD_name_gen_delete) CONST_CAST(GLEW_AMD_name_gen_delete) = !_glewInit_GL_AMD_name_gen_delete(GLEW_CONTEXT_ARG_VAR_INIT);
@@ -8286,6 +8574,10 @@ GLenum glewContextInit (GLEW_CONTEXT_ARG_DEF_LIST)
   CONST_CAST(GLEW_ARB_ES2_compatibility) = _glewSearchExtension("GL_ARB_ES2_compatibility", extStart, extEnd);
   if (glewExperimental || GLEW_ARB_ES2_compatibility) CONST_CAST(GLEW_ARB_ES2_compatibility) = !_glewInit_GL_ARB_ES2_compatibility(GLEW_CONTEXT_ARG_VAR_INIT);
 #endif /* GL_ARB_ES2_compatibility */
+#ifdef GL_ARB_base_instance
+  CONST_CAST(GLEW_ARB_base_instance) = _glewSearchExtension("GL_ARB_base_instance", extStart, extEnd);
+  if (glewExperimental || GLEW_ARB_base_instance) CONST_CAST(GLEW_ARB_base_instance) = !_glewInit_GL_ARB_base_instance(GLEW_CONTEXT_ARG_VAR_INIT);
+#endif /* GL_ARB_base_instance */
 #ifdef GL_ARB_blend_func_extended
   CONST_CAST(GLEW_ARB_blend_func_extended) = _glewSearchExtension("GL_ARB_blend_func_extended", extStart, extEnd);
   if (glewExperimental || GLEW_ARB_blend_func_extended) CONST_CAST(GLEW_ARB_blend_func_extended) = !_glewInit_GL_ARB_blend_func_extended(GLEW_CONTEXT_ARG_VAR_INIT);
@@ -8301,6 +8593,12 @@ GLenum glewContextInit (GLEW_CONTEXT_ARG_DEF_LIST)
 #ifdef GL_ARB_compatibility
   CONST_CAST(GLEW_ARB_compatibility) = _glewSearchExtension("GL_ARB_compatibility", extStart, extEnd);
 #endif /* GL_ARB_compatibility */
+#ifdef GL_ARB_compressed_texture_pixel_storage
+  CONST_CAST(GLEW_ARB_compressed_texture_pixel_storage) = _glewSearchExtension("GL_ARB_compressed_texture_pixel_storage", extStart, extEnd);
+#endif /* GL_ARB_compressed_texture_pixel_storage */
+#ifdef GL_ARB_conservative_depth
+  CONST_CAST(GLEW_ARB_conservative_depth) = _glewSearchExtension("GL_ARB_conservative_depth", extStart, extEnd);
+#endif /* GL_ARB_conservative_depth */
 #ifdef GL_ARB_copy_buffer
   CONST_CAST(GLEW_ARB_copy_buffer) = _glewSearchExtension("GL_ARB_copy_buffer", extStart, extEnd);
   if (glewExperimental || GLEW_ARB_copy_buffer) CONST_CAST(GLEW_ARB_copy_buffer) = !_glewInit_GL_ARB_copy_buffer(GLEW_CONTEXT_ARG_VAR_INIT);
@@ -8388,6 +8686,13 @@ GLenum glewContextInit (GLEW_CONTEXT_ARG_DEF_LIST)
   CONST_CAST(GLEW_ARB_instanced_arrays) = _glewSearchExtension("GL_ARB_instanced_arrays", extStart, extEnd);
   if (glewExperimental || GLEW_ARB_instanced_arrays) CONST_CAST(GLEW_ARB_instanced_arrays) = !_glewInit_GL_ARB_instanced_arrays(GLEW_CONTEXT_ARG_VAR_INIT);
 #endif /* GL_ARB_instanced_arrays */
+#ifdef GL_ARB_internalformat_query
+  CONST_CAST(GLEW_ARB_internalformat_query) = _glewSearchExtension("GL_ARB_internalformat_query", extStart, extEnd);
+  if (glewExperimental || GLEW_ARB_internalformat_query) CONST_CAST(GLEW_ARB_internalformat_query) = !_glewInit_GL_ARB_internalformat_query(GLEW_CONTEXT_ARG_VAR_INIT);
+#endif /* GL_ARB_internalformat_query */
+#ifdef GL_ARB_map_buffer_alignment
+  CONST_CAST(GLEW_ARB_map_buffer_alignment) = _glewSearchExtension("GL_ARB_map_buffer_alignment", extStart, extEnd);
+#endif /* GL_ARB_map_buffer_alignment */
 #ifdef GL_ARB_map_buffer_range
   CONST_CAST(GLEW_ARB_map_buffer_range) = _glewSearchExtension("GL_ARB_map_buffer_range", extStart, extEnd);
   if (glewExperimental || GLEW_ARB_map_buffer_range) CONST_CAST(GLEW_ARB_map_buffer_range) = !_glewInit_GL_ARB_map_buffer_range(GLEW_CONTEXT_ARG_VAR_INIT);
@@ -8444,9 +8749,17 @@ GLenum glewContextInit (GLEW_CONTEXT_ARG_DEF_LIST)
   CONST_CAST(GLEW_ARB_separate_shader_objects) = _glewSearchExtension("GL_ARB_separate_shader_objects", extStart, extEnd);
   if (glewExperimental || GLEW_ARB_separate_shader_objects) CONST_CAST(GLEW_ARB_separate_shader_objects) = !_glewInit_GL_ARB_separate_shader_objects(GLEW_CONTEXT_ARG_VAR_INIT);
 #endif /* GL_ARB_separate_shader_objects */
+#ifdef GL_ARB_shader_atomic_counters
+  CONST_CAST(GLEW_ARB_shader_atomic_counters) = _glewSearchExtension("GL_ARB_shader_atomic_counters", extStart, extEnd);
+  if (glewExperimental || GLEW_ARB_shader_atomic_counters) CONST_CAST(GLEW_ARB_shader_atomic_counters) = !_glewInit_GL_ARB_shader_atomic_counters(GLEW_CONTEXT_ARG_VAR_INIT);
+#endif /* GL_ARB_shader_atomic_counters */
 #ifdef GL_ARB_shader_bit_encoding
   CONST_CAST(GLEW_ARB_shader_bit_encoding) = _glewSearchExtension("GL_ARB_shader_bit_encoding", extStart, extEnd);
 #endif /* GL_ARB_shader_bit_encoding */
+#ifdef GL_ARB_shader_image_load_store
+  CONST_CAST(GLEW_ARB_shader_image_load_store) = _glewSearchExtension("GL_ARB_shader_image_load_store", extStart, extEnd);
+  if (glewExperimental || GLEW_ARB_shader_image_load_store) CONST_CAST(GLEW_ARB_shader_image_load_store) = !_glewInit_GL_ARB_shader_image_load_store(GLEW_CONTEXT_ARG_VAR_INIT);
+#endif /* GL_ARB_shader_image_load_store */
 #ifdef GL_ARB_shader_objects
   CONST_CAST(GLEW_ARB_shader_objects) = _glewSearchExtension("GL_ARB_shader_objects", extStart, extEnd);
   if (glewExperimental || GLEW_ARB_shader_objects) CONST_CAST(GLEW_ARB_shader_objects) = !_glewInit_GL_ARB_shader_objects(GLEW_CONTEXT_ARG_VAR_INIT);
@@ -8467,10 +8780,16 @@ GLenum glewContextInit (GLEW_CONTEXT_ARG_DEF_LIST)
 #ifdef GL_ARB_shading_language_100
   CONST_CAST(GLEW_ARB_shading_language_100) = _glewSearchExtension("GL_ARB_shading_language_100", extStart, extEnd);
 #endif /* GL_ARB_shading_language_100 */
+#ifdef GL_ARB_shading_language_420pack
+  CONST_CAST(GLEW_ARB_shading_language_420pack) = _glewSearchExtension("GL_ARB_shading_language_420pack", extStart, extEnd);
+#endif /* GL_ARB_shading_language_420pack */
 #ifdef GL_ARB_shading_language_include
   CONST_CAST(GLEW_ARB_shading_language_include) = _glewSearchExtension("GL_ARB_shading_language_include", extStart, extEnd);
   if (glewExperimental || GLEW_ARB_shading_language_include) CONST_CAST(GLEW_ARB_shading_language_include) = !_glewInit_GL_ARB_shading_language_include(GLEW_CONTEXT_ARG_VAR_INIT);
 #endif /* GL_ARB_shading_language_include */
+#ifdef GL_ARB_shading_language_packing
+  CONST_CAST(GLEW_ARB_shading_language_packing) = _glewSearchExtension("GL_ARB_shading_language_packing", extStart, extEnd);
+#endif /* GL_ARB_shading_language_packing */
 #ifdef GL_ARB_shadow
   CONST_CAST(GLEW_ARB_shadow) = _glewSearchExtension("GL_ARB_shadow", extStart, extEnd);
 #endif /* GL_ARB_shadow */
@@ -8551,6 +8870,10 @@ GLenum glewContextInit (GLEW_CONTEXT_ARG_DEF_LIST)
 #ifdef GL_ARB_texture_rgb10_a2ui
   CONST_CAST(GLEW_ARB_texture_rgb10_a2ui) = _glewSearchExtension("GL_ARB_texture_rgb10_a2ui", extStart, extEnd);
 #endif /* GL_ARB_texture_rgb10_a2ui */
+#ifdef GL_ARB_texture_storage
+  CONST_CAST(GLEW_ARB_texture_storage) = _glewSearchExtension("GL_ARB_texture_storage", extStart, extEnd);
+  if (glewExperimental || GLEW_ARB_texture_storage) CONST_CAST(GLEW_ARB_texture_storage) = !_glewInit_GL_ARB_texture_storage(GLEW_CONTEXT_ARG_VAR_INIT);
+#endif /* GL_ARB_texture_storage */
 #ifdef GL_ARB_texture_swizzle
   CONST_CAST(GLEW_ARB_texture_swizzle) = _glewSearchExtension("GL_ARB_texture_swizzle", extStart, extEnd);
 #endif /* GL_ARB_texture_swizzle */
@@ -8566,6 +8889,10 @@ GLenum glewContextInit (GLEW_CONTEXT_ARG_DEF_LIST)
   CONST_CAST(GLEW_ARB_transform_feedback3) = _glewSearchExtension("GL_ARB_transform_feedback3", extStart, extEnd);
   if (glewExperimental || GLEW_ARB_transform_feedback3) CONST_CAST(GLEW_ARB_transform_feedback3) = !_glewInit_GL_ARB_transform_feedback3(GLEW_CONTEXT_ARG_VAR_INIT);
 #endif /* GL_ARB_transform_feedback3 */
+#ifdef GL_ARB_transform_feedback_instanced
+  CONST_CAST(GLEW_ARB_transform_feedback_instanced) = _glewSearchExtension("GL_ARB_transform_feedback_instanced", extStart, extEnd);
+  if (glewExperimental || GLEW_ARB_transform_feedback_instanced) CONST_CAST(GLEW_ARB_transform_feedback_instanced) = !_glewInit_GL_ARB_transform_feedback_instanced(GLEW_CONTEXT_ARG_VAR_INIT);
+#endif /* GL_ARB_transform_feedback_instanced */
 #ifdef GL_ARB_transpose_matrix
   CONST_CAST(GLEW_ARB_transpose_matrix) = _glewSearchExtension("GL_ARB_transpose_matrix", extStart, extEnd);
   if (glewExperimental || GLEW_ARB_transpose_matrix) CONST_CAST(GLEW_ARB_transpose_matrix) = !_glewInit_GL_ARB_transpose_matrix(GLEW_CONTEXT_ARG_VAR_INIT);
@@ -8790,6 +9117,9 @@ GLenum glewContextInit (GLEW_CONTEXT_ARG_DEF_LIST)
   CONST_CAST(GLEW_EXT_framebuffer_multisample) = _glewSearchExtension("GL_EXT_framebuffer_multisample", extStart, extEnd);
   if (glewExperimental || GLEW_EXT_framebuffer_multisample) CONST_CAST(GLEW_EXT_framebuffer_multisample) = !_glewInit_GL_EXT_framebuffer_multisample(GLEW_CONTEXT_ARG_VAR_INIT);
 #endif /* GL_EXT_framebuffer_multisample */
+#ifdef GL_EXT_framebuffer_multisample_blit_scaled
+  CONST_CAST(GLEW_EXT_framebuffer_multisample_blit_scaled) = _glewSearchExtension("GL_EXT_framebuffer_multisample_blit_scaled", extStart, extEnd);
+#endif /* GL_EXT_framebuffer_multisample_blit_scaled */
 #ifdef GL_EXT_framebuffer_object
   CONST_CAST(GLEW_EXT_framebuffer_object) = _glewSearchExtension("GL_EXT_framebuffer_object", extStart, extEnd);
   if (glewExperimental || GLEW_EXT_framebuffer_object) CONST_CAST(GLEW_EXT_framebuffer_object) = !_glewInit_GL_EXT_framebuffer_object(GLEW_CONTEXT_ARG_VAR_INIT);
@@ -9220,6 +9550,10 @@ GLenum glewContextInit (GLEW_CONTEXT_ARG_DEF_LIST)
 #ifdef GL_NV_parameter_buffer_object2
   CONST_CAST(GLEW_NV_parameter_buffer_object2) = _glewSearchExtension("GL_NV_parameter_buffer_object2", extStart, extEnd);
 #endif /* GL_NV_parameter_buffer_object2 */
+#ifdef GL_NV_path_rendering
+  CONST_CAST(GLEW_NV_path_rendering) = _glewSearchExtension("GL_NV_path_rendering", extStart, extEnd);
+  if (glewExperimental || GLEW_NV_path_rendering) CONST_CAST(GLEW_NV_path_rendering) = !_glewInit_GL_NV_path_rendering(GLEW_CONTEXT_ARG_VAR_INIT);
+#endif /* GL_NV_path_rendering */
 #ifdef GL_NV_pixel_data_range
   CONST_CAST(GLEW_NV_pixel_data_range) = _glewSearchExtension("GL_NV_pixel_data_range", extStart, extEnd);
   if (glewExperimental || GLEW_NV_pixel_data_range) CONST_CAST(GLEW_NV_pixel_data_range) = !_glewInit_GL_NV_pixel_data_range(GLEW_CONTEXT_ARG_VAR_INIT);
@@ -10588,6 +10922,9 @@ PFNGLXRELEASEBUFFERSMESAPROC __glewXReleaseBuffersMESA = NULL;
 
 PFNGLXSET3DFXMODEMESAPROC __glewXSet3DfxModeMESA = NULL;
 
+PFNGLXGETSWAPINTERVALMESAPROC __glewXGetSwapIntervalMESA = NULL;
+PFNGLXSWAPINTERVALMESAPROC __glewXSwapIntervalMESA = NULL;
+
 PFNGLXCOPYIMAGESUBDATANVPROC __glewXCopyImageSubDataNV = NULL;
 
 PFNGLXBINDVIDEODEVICENVPROC __glewXBindVideoDeviceNV = NULL;
@@ -10704,6 +11041,7 @@ GLboolean __GLXEW_MESA_copy_sub_buffer = GL_FALSE;
 GLboolean __GLXEW_MESA_pixmap_colormap = GL_FALSE;
 GLboolean __GLXEW_MESA_release_buffers = GL_FALSE;
 GLboolean __GLXEW_MESA_set_3dfx_mode = GL_FALSE;
+GLboolean __GLXEW_MESA_swap_control = GL_FALSE;
 GLboolean __GLXEW_NV_copy_image = GL_FALSE;
 GLboolean __GLXEW_NV_float_buffer = GL_FALSE;
 GLboolean __GLXEW_NV_multisample_coverage = GL_FALSE;
@@ -10984,6 +11322,20 @@ static GLboolean _glewInit_GLX_MESA_set_3dfx_mode (GLXEW_CONTEXT_ARG_DEF_INIT)
 
 #endif /* GLX_MESA_set_3dfx_mode */
 
+#ifdef GLX_MESA_swap_control
+
+static GLboolean _glewInit_GLX_MESA_swap_control (GLXEW_CONTEXT_ARG_DEF_INIT)
+{
+  GLboolean r = GL_FALSE;
+
+  r = ((glXGetSwapIntervalMESA = (PFNGLXGETSWAPINTERVALMESAPROC)glewGetProcAddress((const GLubyte*)"glXGetSwapIntervalMESA")) == NULL) || r;
+  r = ((glXSwapIntervalMESA = (PFNGLXSWAPINTERVALMESAPROC)glewGetProcAddress((const GLubyte*)"glXSwapIntervalMESA")) == NULL) || r;
+
+  return r;
+}
+
+#endif /* GLX_MESA_swap_control */
+
 #ifdef GLX_NV_copy_image
 
 static GLboolean _glewInit_GLX_NV_copy_image (GLXEW_CONTEXT_ARG_DEF_INIT)
@@ -11454,6 +11806,10 @@ GLenum glxewContextInit (GLXEW_CONTEXT_ARG_DEF_LIST)
   CONST_CAST(GLXEW_MESA_set_3dfx_mode) = _glewSearchExtension("GLX_MESA_set_3dfx_mode", extStart, extEnd);
   if (glewExperimental || GLXEW_MESA_set_3dfx_mode) CONST_CAST(GLXEW_MESA_set_3dfx_mode) = !_glewInit_GLX_MESA_set_3dfx_mode(GLEW_CONTEXT_ARG_VAR_INIT);
 #endif /* GLX_MESA_set_3dfx_mode */
+#ifdef GLX_MESA_swap_control
+  CONST_CAST(GLXEW_MESA_swap_control) = _glewSearchExtension("GLX_MESA_swap_control", extStart, extEnd);
+  if (glewExperimental || GLXEW_MESA_swap_control) CONST_CAST(GLXEW_MESA_swap_control) = !_glewInit_GLX_MESA_swap_control(GLEW_CONTEXT_ARG_VAR_INIT);
+#endif /* GLX_MESA_swap_control */
 #ifdef GLX_NV_copy_image
   CONST_CAST(GLXEW_NV_copy_image) = _glewSearchExtension("GLX_NV_copy_image", extStart, extEnd);
   if (glewExperimental || GLXEW_NV_copy_image) CONST_CAST(GLXEW_NV_copy_image) = !_glewInit_GLX_NV_copy_image(GLEW_CONTEXT_ARG_VAR_INIT);
@@ -11581,9 +11937,9 @@ const GLubyte* glewGetString (GLenum name)
   static const GLubyte* _glewString[] =
   {
     (const GLubyte*)NULL,
-    (const GLubyte*)"1.6.0",
+    (const GLubyte*)"1.7.0",
     (const GLubyte*)"1",
-    (const GLubyte*)"6",
+    (const GLubyte*)"7",
     (const GLubyte*)"0"
   };
   const int max_string = sizeof(_glewString)/sizeof(*_glewString) - 1;
@@ -11721,6 +12077,13 @@ GLboolean glewIsSupported (const char* name)
           ret = GLEW_VERSION_4_1;
           continue;
         }
+#endif
+#ifdef GL_VERSION_4_2
+        if (_glewStrSame3(&pos, &len, (const GLubyte*)"4_2", 3))
+        {
+          ret = GLEW_VERSION_4_2;
+          continue;
+        }
 #endif
       }
       if (_glewStrSame2(&pos, &len, (const GLubyte*)"3DFX_", 5))
@@ -11784,6 +12147,13 @@ GLboolean glewIsSupported (const char* name)
           continue;
         }
 #endif
+#ifdef GL_AMD_multi_draw_indirect
+        if (_glewStrSame3(&pos, &len, (const GLubyte*)"multi_draw_indirect", 19))
+        {
+          ret = GLEW_AMD_multi_draw_indirect;
+          continue;
+        }
+#endif
 #ifdef GL_AMD_name_gen_delete
         if (_glewStrSame3(&pos, &len, (const GLubyte*)"name_gen_delete", 15))
         {
@@ -11972,6 +12342,13 @@ GLboolean glewIsSupported (const char* name)
           continue;
         }
 #endif
+#ifdef GL_ARB_base_instance
+        if (_glewStrSame3(&pos, &len, (const GLubyte*)"base_instance", 13))
+        {
+          ret = GLEW_ARB_base_instance;
+          continue;
+        }
+#endif
 #ifdef GL_ARB_blend_func_extended
         if (_glewStrSame3(&pos, &len, (const GLubyte*)"blend_func_extended", 19))
         {
@@ -12000,6 +12377,20 @@ GLboolean glewIsSupported (const char* name)
           continue;
         }
 #endif
+#ifdef GL_ARB_compressed_texture_pixel_storage
+        if (_glewStrSame3(&pos, &len, (const GLubyte*)"compressed_texture_pixel_storage", 32))
+        {
+          ret = GLEW_ARB_compressed_texture_pixel_storage;
+          continue;
+        }
+#endif
+#ifdef GL_ARB_conservative_depth
+        if (_glewStrSame3(&pos, &len, (const GLubyte*)"conservative_depth", 18))
+        {
+          ret = GLEW_ARB_conservative_depth;
+          continue;
+        }
+#endif
 #ifdef GL_ARB_copy_buffer
         if (_glewStrSame3(&pos, &len, (const GLubyte*)"copy_buffer", 11))
         {
@@ -12175,6 +12566,20 @@ GLboolean glewIsSupported (const char* name)
           continue;
         }
 #endif
+#ifdef GL_ARB_internalformat_query
+        if (_glewStrSame3(&pos, &len, (const GLubyte*)"internalformat_query", 20))
+        {
+          ret = GLEW_ARB_internalformat_query;
+          continue;
+        }
+#endif
+#ifdef GL_ARB_map_buffer_alignment
+        if (_glewStrSame3(&pos, &len, (const GLubyte*)"map_buffer_alignment", 20))
+        {
+          ret = GLEW_ARB_map_buffer_alignment;
+          continue;
+        }
+#endif
 #ifdef GL_ARB_map_buffer_range
         if (_glewStrSame3(&pos, &len, (const GLubyte*)"map_buffer_range", 16))
         {
@@ -12280,6 +12685,13 @@ GLboolean glewIsSupported (const char* name)
           continue;
         }
 #endif
+#ifdef GL_ARB_shader_atomic_counters
+        if (_glewStrSame3(&pos, &len, (const GLubyte*)"shader_atomic_counters", 22))
+        {
+          ret = GLEW_ARB_shader_atomic_counters;
+          continue;
+        }
+#endif
 #ifdef GL_ARB_shader_bit_encoding
         if (_glewStrSame3(&pos, &len, (const GLubyte*)"shader_bit_encoding", 19))
         {
@@ -12287,6 +12699,13 @@ GLboolean glewIsSupported (const char* name)
           continue;
         }
 #endif
+#ifdef GL_ARB_shader_image_load_store
+        if (_glewStrSame3(&pos, &len, (const GLubyte*)"shader_image_load_store", 23))
+        {
+          ret = GLEW_ARB_shader_image_load_store;
+          continue;
+        }
+#endif
 #ifdef GL_ARB_shader_objects
         if (_glewStrSame3(&pos, &len, (const GLubyte*)"shader_objects", 14))
         {
@@ -12329,6 +12748,13 @@ GLboolean glewIsSupported (const char* name)
           continue;
         }
 #endif
+#ifdef GL_ARB_shading_language_420pack
+        if (_glewStrSame3(&pos, &len, (const GLubyte*)"shading_language_420pack", 24))
+        {
+          ret = GLEW_ARB_shading_language_420pack;
+          continue;
+        }
+#endif
 #ifdef GL_ARB_shading_language_include
         if (_glewStrSame3(&pos, &len, (const GLubyte*)"shading_language_include", 24))
         {
@@ -12336,6 +12762,13 @@ GLboolean glewIsSupported (const char* name)
           continue;
         }
 #endif
+#ifdef GL_ARB_shading_language_packing
+        if (_glewStrSame3(&pos, &len, (const GLubyte*)"shading_language_packing", 24))
+        {
+          ret = GLEW_ARB_shading_language_packing;
+          continue;
+        }
+#endif
 #ifdef GL_ARB_shadow
         if (_glewStrSame3(&pos, &len, (const GLubyte*)"shadow", 6))
         {
@@ -12511,6 +12944,13 @@ GLboolean glewIsSupported (const char* name)
           continue;
         }
 #endif
+#ifdef GL_ARB_texture_storage
+        if (_glewStrSame3(&pos, &len, (const GLubyte*)"texture_storage", 15))
+        {
+          ret = GLEW_ARB_texture_storage;
+          continue;
+        }
+#endif
 #ifdef GL_ARB_texture_swizzle
         if (_glewStrSame3(&pos, &len, (const GLubyte*)"texture_swizzle", 15))
         {
@@ -12539,6 +12979,13 @@ GLboolean glewIsSupported (const char* name)
           continue;
         }
 #endif
+#ifdef GL_ARB_transform_feedback_instanced
+        if (_glewStrSame3(&pos, &len, (const GLubyte*)"transform_feedback_instanced", 28))
+        {
+          ret = GLEW_ARB_transform_feedback_instanced;
+          continue;
+        }
+#endif
 #ifdef GL_ARB_transpose_matrix
         if (_glewStrSame3(&pos, &len, (const GLubyte*)"transpose_matrix", 16))
         {
@@ -12975,6 +13422,13 @@ GLboolean glewIsSupported (const char* name)
           continue;
         }
 #endif
+#ifdef GL_EXT_framebuffer_multisample_blit_scaled
+        if (_glewStrSame3(&pos, &len, (const GLubyte*)"framebuffer_multisample_blit_scaled", 35))
+        {
+          ret = GLEW_EXT_framebuffer_multisample_blit_scaled;
+          continue;
+        }
+#endif
 #ifdef GL_EXT_framebuffer_object
         if (_glewStrSame3(&pos, &len, (const GLubyte*)"framebuffer_object", 18))
         {
@@ -13873,6 +14327,13 @@ GLboolean glewIsSupported (const char* name)
           continue;
         }
 #endif
+#ifdef GL_NV_path_rendering
+        if (_glewStrSame3(&pos, &len, (const GLubyte*)"path_rendering", 14))
+        {
+          ret = GLEW_NV_path_rendering;
+          continue;
+        }
+#endif
 #ifdef GL_NV_pixel_data_range
         if (_glewStrSame3(&pos, &len, (const GLubyte*)"pixel_data_range", 16))
         {
@@ -15265,6 +15726,13 @@ GLboolean glxewIsSupported (const char* name)
           ret = GLXEW_MESA_set_3dfx_mode;
           continue;
         }
+#endif
+#ifdef GLX_MESA_swap_control
+        if (_glewStrSame3(&pos, &len, (const GLubyte*)"swap_control", 12))
+        {
+          ret = GLXEW_MESA_swap_control;
+          continue;
+        }
 #endif
       }
       if (_glewStrSame2(&pos, &len, (const GLubyte*)"NV_", 3))
index b3d669379f8c53894f446ecb5c61a34984cf9514..7665f276c0a0c40e16a5234aed6b078a867c3ff4 100644 (file)
@@ -36,9 +36,6 @@ AUD_ConverterReader::AUD_ConverterReader(AUD_Reference<AUD_IReader> reader,
        AUD_EffectReader(reader),
        m_format(specs.format)
 {
-       int bigendian = 1;
-       bigendian = (((char*)&bigendian)[0]) ? 0: 1; // 1 if Big Endian
-
        switch(m_format)
        {
        case AUD_FORMAT_U8:
@@ -48,10 +45,11 @@ AUD_ConverterReader::AUD_ConverterReader(AUD_Reference<AUD_IReader> reader,
                m_convert = AUD_convert_float_s16;
                break;
        case AUD_FORMAT_S24:
-               if(bigendian)
-                       m_convert = AUD_convert_float_s24_be;
-               else
-                       m_convert = AUD_convert_float_s24_le;
+#ifdef __BIG_ENDIAN__
+               m_convert = AUD_convert_float_s24_be;
+#else
+               m_convert = AUD_convert_float_s24_le;
+#endif
                break;
        case AUD_FORMAT_S32:
                m_convert = AUD_convert_float_s32;
index 74ff180627a22471a17c3a3a5a194cba18db018e..caeeac8d43c82141e6514e61c898af7c24bc4a03 100644 (file)
@@ -37,9 +37,6 @@
 AUD_Mixer::AUD_Mixer(AUD_DeviceSpecs specs) :
        m_specs(specs)
 {
-       int bigendian = 1;
-       bigendian = (((char*)&bigendian)[0]) ? 0: 1; // 1 if Big Endian
-
        switch(m_specs.format)
        {
        case AUD_FORMAT_U8:
@@ -49,10 +46,12 @@ AUD_Mixer::AUD_Mixer(AUD_DeviceSpecs specs) :
                m_convert = AUD_convert_float_s16;
                break;
        case AUD_FORMAT_S24:
-               if(bigendian)
-                       m_convert = AUD_convert_float_s24_be;
-               else
-                       m_convert = AUD_convert_float_s24_le;
+
+#ifdef __BIG_ENDIAN__
+               m_convert = AUD_convert_float_s24_be;
+#else
+               m_convert = AUD_convert_float_s24_le;
+#endif
                break;
        case AUD_FORMAT_S32:
                m_convert = AUD_convert_float_s32;
index 2421c25398af99f4ce6cc300f03489b8ac94417f..c3ff851f3bcd939f717755a754a079ca5f9824b8 100644 (file)
@@ -124,10 +124,10 @@ static const char *check_memlist(MemHead *memh);
 /* locally used defines                                                  */
 /* --------------------------------------------------------------------- */
 
-#if defined( __sgi) || defined (__sun) || defined (__sun__) || defined (__sparc) || defined (__sparc__) || defined (__PPC__) || (defined (__APPLE__) && !defined(__LITTLE_ENDIAN__))
-#define MAKE_ID(a,b,c,d) ( (int)(a)<<24 | (int)(b)<<16 | (c)<<8 | (d) )
+#ifdef __BIG_ENDIAN__
+#  define MAKE_ID(a,b,c,d) ( (int)(a)<<24 | (int)(b)<<16 | (c)<<8 | (d) )
 #else
-#define MAKE_ID(a,b,c,d) ( (int)(d)<<24 | (int)(c)<<16 | (b)<<8 | (a) )
+#  define MAKE_ID(a,b,c,d) ( (int)(d)<<24 | (int)(c)<<16 | (b)<<8 | (a) )
 #endif
 
 #define MEMTAG1 MAKE_ID('M', 'E', 'M', 'O')
index 01213f91d5a34391673731311442ee09c591e4f0..2a1ed3296f998330024763da5039139eb454ed0b 100644 (file)
@@ -299,7 +299,7 @@ public:
     double data[9];
 
     inline Rotation() {
-               *this = Rotation::Identity();
+               *this = Identity();
        }
     inline Rotation(double Xx,double Yx,double Zx,
                 double Xy,double Yy,double Zy,
index 071f34e0ef96b2eaa092065af982c0b01c716e9b..ba097ba60467d89aa5af9640744ef073070b7667 100644 (file)
@@ -45,7 +45,7 @@
 #include <ctype.h>
 #include <string.h>
 #if defined(__sun__) || defined( __sun ) || defined (__sparc) || defined (__sparc__) || defined (_AIX)
-#include <strings.h>
+#  include <strings.h>
 #endif
 #include "STR_String.h"
 
index a6304378cc45bc26a813d47d12fb39b37edd3f2c..fdd22f403a49f40fe96fef027c094fc11f4d5ac6 100644 (file)
@@ -63,7 +63,7 @@ def _test_import(module_name, loaded_modules):
         return None
     if "." in module_name:
         print("Ignoring '%s', can't import files containing "
-              "multiple periods." % module_name)
+              "multiple periods" % module_name)
         return None
 
     if use_time:
@@ -159,7 +159,7 @@ def load_scripts(reload_scripts=False, refresh_scripts=False):
                 traceback.print_exc()
         else:
             print("\nWarning! '%s' has no register function, "
-                  "this is now a requirement for registerable scripts." %
+                  "this is now a requirement for registerable scripts" %
                   mod.__file__)
 
     def unregister_module_call(mod):
index 3f6a3682e7cdf2e0ca10439fff597588e32957da..91546e0282909ca0da699e04884629976b518b6e 100644 (file)
@@ -233,8 +233,8 @@ def axis_conversion(from_forward='Y', from_up='Z', to_forward='Y', to_up='Z'):
         return Matrix().to_3x3()
 
     if from_forward[-1] == from_up[-1] or to_forward[-1] == to_up[-1]:
-        raise Exception("invalid axis arguments passed, "
-                        "can't use up/forward on the same axis.")
+        raise Exception("Invalid axis arguments passed, "
+                        "can't use up/forward on the same axis")
 
     value = reduce(int.__or__, (_axis_convert_num[a] << (i * 3)
                    for i, a in enumerate((from_forward,
index b3127733c1eb8d8da655f510b31722a139c0a96a..6b65f720a5c6947319e7f3ba9f260e04ad416829 100644 (file)
@@ -206,7 +206,7 @@ class _GenericBone:
 
     @property
     def children_recursive(self):
-        """a list of all children from this bone."""
+        """A list of all children from this bone."""
         bones_children = []
         for bone in self._other_bones:
             index = bone.parent_index(self)
index 425ea2101040d4d9e60e9a9e4429e15082f0b8ab..94d0c8c8614612906f08b915c82dd77ea3923a7a 100644 (file)
@@ -299,7 +299,7 @@ def banner(context):
     add_scrollback("Builtin Modules:     bpy, bpy.data, bpy.ops, bpy.props, bpy.types, bpy.context, bpy.utils, bgl, blf, mathutils", 'OUTPUT')
     add_scrollback("Convenience Imports: from mathutils import *; from math import *", 'OUTPUT')
     add_scrollback("", 'OUTPUT')
-    # add_scrollback("  WARNING!!! Blender 2.5 API is subject to change, see API reference for more info.", 'ERROR')
+    # add_scrollback("  WARNING!!! Blender 2.5 API is subject to change, see API reference for more info", 'ERROR')
     # add_scrollback("", 'OUTPUT')
     sc.prompt = PROMPT
 
index 9226cbed51b737ba05d1a7860407d90cb75acb34..2b190e1aee177d6ef0d0efb8321d83ce9e2f6ad5 100644 (file)
@@ -74,7 +74,7 @@ class EditExternally(Operator):
         if not os.path.exists(filepath):
             self.report({'ERROR'},
                         "Image path %r not found, image may be packed or "
-                        "unsaved." % filepath)
+                        "unsaved" % filepath)
             return {'CANCELLED'}
 
         cmd = self._editor_guess(context) + [filepath]
index 6c9f27afaa58c531fcf44170b54657206c1e4bc0..d7c6cfc0565302644928a7bd6e10a6d87b0f9790 100644 (file)
@@ -283,11 +283,11 @@ class ShapeTransfer(Operator):
                     ),
                    ('RELATIVE_FACE',
                     "Relative Face",
-                    "Calculate relative position (using faces).",
+                    "Calculate relative position (using faces)",
                     ),
                    ('RELATIVE_EDGE',
                    "Relative Edge",
-                   "Calculate relative position (using edges).",
+                   "Calculate relative position (using edges)",
                    ),
                    ),
             name="Transformation Mode",
@@ -297,7 +297,7 @@ class ShapeTransfer(Operator):
     use_clamp = BoolProperty(
             name="Clamp Offset",
             description=("Clamp the transformation to the distance each "
-                         "vertex moves in the original shape."),
+                         "vertex moves in the original shape"),
             default=False,
             )
 
@@ -503,7 +503,7 @@ class ShapeTransfer(Operator):
             ob_act, objects = objects[0], [ob_act]
 
         if ob_act.type != 'MESH':
-            self.report({'ERROR'}, "Other object is not a mesh.")
+            self.report({'ERROR'}, "Other object is not a mesh")
             return {'CANCELLED'}
 
         if ob_act.active_shape_key is None:
index 48b547980d4b6bd8dbffff4801532ae37891fd90..c13a04eb87aa544062c87f3eeadd757a8679caf2 100644 (file)
@@ -77,7 +77,7 @@ class QuickFur(Operator):
                         if obj.type == 'MESH']
 
         if not mesh_objects:
-            self.report({'ERROR'}, "Select at least one mesh object.")
+            self.report({'ERROR'}, "Select at least one mesh object")
             return {'CANCELLED'}
 
         mat = bpy.data.materials.new("Fur Material")
@@ -157,7 +157,7 @@ class QuickExplode(Operator):
 
     fade = BoolProperty(
             name="Fade",
-            description="Fade the pieces over time.",
+            description="Fade the pieces over time",
             default=True,
             )
 
@@ -307,7 +307,7 @@ class QuickSmoke(Operator):
 
     show_flows = BoolProperty(
             name="Render Smoke Objects",
-            description="Keep the smoke objects visible during rendering.",
+            description="Keep the smoke objects visible during rendering",
             default=False,
             )
 
@@ -319,7 +319,7 @@ class QuickSmoke(Operator):
         max_co = -min_co
 
         if not mesh_objects:
-            self.report({'ERROR'}, "Select at least one mesh object.")
+            self.report({'ERROR'}, "Select at least one mesh object")
             return {'CANCELLED'}
 
         for obj in mesh_objects:
@@ -428,7 +428,7 @@ class QuickFluid(Operator):
             )
     show_flows = BoolProperty(
             name="Render Fluid Objects",
-            description="Keep the fluid objects visible during rendering.",
+            description="Keep the fluid objects visible during rendering",
             default=False,
             )
     start_baking = BoolProperty(
@@ -446,7 +446,7 @@ class QuickFluid(Operator):
         max_co = Vector((-100000, -100000, -100000))
 
         if not mesh_objects:
-            self.report({'ERROR'}, "Select at least one mesh object.")
+            self.report({'ERROR'}, "Select at least one mesh object")
             return {'CANCELLED'}
 
         for obj in mesh_objects:
index 856e182279a02233658421c8626c5f477c7e4109..53654ffbc6fb31d193e2ca43064f3a18c1120a88 100644 (file)
@@ -51,7 +51,7 @@ class SequencerCrossfadeSounds(Operator):
                     seq2 = None
                     break
         if seq2 is None:
-            self.report({'ERROR'}, "Select 2 sound strips.")
+            self.report({'ERROR'}, "Select 2 sound strips")
             return {'CANCELLED'}
         if seq1.frame_final_start > seq2.frame_final_start:
             s = seq1
@@ -71,7 +71,7 @@ class SequencerCrossfadeSounds(Operator):
             context.scene.frame_current = tempcfra
             return {'FINISHED'}
         else:
-            self.report({'ERROR'}, "The selected strips don't overlap.")
+            self.report({'ERROR'}, "The selected strips don't overlap")
             return {'CANCELLED'}
 
 
index 6c258d094e83c453c9d5c31b19797377bbd1177a..05656f5397d4b9b1d2dd2b49e6bffb3c79ae22eb 100644 (file)
@@ -140,7 +140,7 @@ def extend(obj, operator, EXTEND_MODE):
 
     face_act = me.faces.active
     if face_act == -1:
-        operator.report({'ERROR'}, "No active face.")
+        operator.report({'ERROR'}, "No active face")
         return
 
     face_sel = [f for f in me.faces if len(f.vertices) == 4 and f.select]
@@ -152,7 +152,7 @@ def extend(obj, operator, EXTEND_MODE):
             break
 
     if face_act_local_index == -1:
-        operator.report({'ERROR'}, "Active face not selected.")
+        operator.report({'ERROR'}, "Active face not selected")
         return
 
     # Modes
index 060fe400045d03a5beef95f776387a0a3573fcff..d9cdb1794c2d75b74fcdafdb28792d5185511b4c 100644 (file)
@@ -531,7 +531,7 @@ def unwrap(operator, context, **kwargs):
         meshes = list({me for obj in context.selected_objects if obj.type == 'MESH' for me in (obj.data,) if me.faces and me.library is None})
 
     if not meshes:
-        operator.report({'ERROR'}, "No mesh object.")
+        operator.report({'ERROR'}, "No mesh object")
         return {'CANCELLED'}
 
     lightmap_uvpack(meshes, **kwargs)
index 23838588f43992d7235c38fa2ff00ba64bff8af8..c4466e6453f20d089aef49ad07a41e8ea34b788f 100644 (file)
@@ -1070,11 +1070,11 @@ def main(context,
 
     # We want to pack all in 1 go, so pack now
     if USER_SHARE_SPACE:
-#XXX           Window.DrawProgressBar(0.9, "Box Packing for all objects...")
+#XXX        Window.DrawProgressBar(0.9, "Box Packing for all objects...")
         packIslands(collected_islandList)
 
     print("Smart Projection time: %.2f" % (time.time() - time1))
-    # Window.DrawProgressBar(0.9, "Smart Projections done, time: %.2f sec." % (time.time() - time1))
+    # Window.DrawProgressBar(0.9, "Smart Projections done, time: %.2f sec" % (time.time() - time1))
 
     if is_editmode:
         bpy.ops.object.mode_set(mode='EDIT')
index aa09a088c4fc246a15f334f42f9cd5421291036e..861255f167f466f7b41d81c1d3729f9e75d532c0 100644 (file)
@@ -218,7 +218,7 @@ class WM_OT_context_scale_int(Operator):
             )
     always_step = BoolProperty(
             name="Always Step",
-            description="Always adjust the value by a minimum of 1 when 'value' is not 1.0.",
+            description="Always adjust the value by a minimum of 1 when 'value' is not 1.0",
             default=True,
             )
 
@@ -567,7 +567,7 @@ doc_new = StringProperty(
         )
 
 data_path_iter = StringProperty(
-        description="The data path relative to the context, must point to an iterable.")
+        description="The data path relative to the context, must point to an iterable")
 
 data_path_item = StringProperty(
         description="The data path from each iterable to the value (int or float)")
@@ -1175,7 +1175,7 @@ class WM_OT_copy_prev_settings(Operator):
             if bpy.data.is_saved is bpy.data.is_dirty is False:
                 bpy.ops.wm.read_homefile()
             else:
-                self.report({'INFO'}, "Reload Start-Up file to restore settings.")
+                self.report({'INFO'}, "Reload Start-Up file to restore settings")
             return {'FINISHED'}
 
         return {'CANCELLED'}
index 6448b9a5229d908c632bbaa865c6121f5142eed9..2e0b36a7a7560bd6cc854675dfb022617c2b238f 100644 (file)
@@ -110,8 +110,7 @@ class DATA_PT_shape_curve(CurveButtonsPanel, Panel):
             col.label(text="Fill:")
             sub = col.column()
             sub.active = (curve.dimensions == '2D' or (curve.bevel_object is None and curve.dimensions == '3D'))
-            sub.prop(curve, "use_fill_front")
-            sub.prop(curve, "use_fill_back")
+            sub.prop(curve, "fill_mode", text="")
             col.prop(curve, "use_fill_deform", text="Fill Deformed")
 
 
index a8a9d1b40c24f41f770e130ec25efb61a1467c5e..63408aec9fd691a26692ede125e1fd54dcf4864e 100644 (file)
@@ -107,7 +107,7 @@ class PARTICLE_PT_context_particles(ParticleButtonsPanel, Panel):
             layout.template_ID(context.space_data, "pin_id")
 
             if part.is_fluid:
-                layout.label(text="Settings used for fluid.")
+                layout.label(text="Settings used for fluid")
                 return
 
             layout.prop(part, "type", text="Type")
@@ -144,7 +144,7 @@ class PARTICLE_PT_context_particles(ParticleButtonsPanel, Panel):
             #row.label(text="Render")
 
             if part.is_fluid:
-                layout.label(text=str(part.count) + " fluid particles for this frame.")
+                layout.label(text=str(part.count) + " fluid particles for this frame")
                 return
 
             row = col.row()
@@ -713,7 +713,7 @@ class PARTICLE_PT_boidbrain(ParticleButtonsPanel, Panel):
                 row.prop(rule, "use_predict")
                 row.prop(rule, "fear_factor")
             elif rule.type == 'FOLLOW_PATH':
-                row.label(text="Not yet functional.")
+                row.label(text="Not yet functional")
             elif rule.type == 'AVOID_COLLISION':
                 row.prop(rule, "use_avoid")
                 row.prop(rule, "use_avoid_collision")
@@ -1039,7 +1039,7 @@ class PARTICLE_PT_children(ParticleButtonsPanel, Panel):
             sub = col.column(align=True)
             sub.label(text="Parting not")
             sub.label(text="available with")
-            sub.label(text="virtual parents.")
+            sub.label(text="virtual parents")
         else:
             sub = col.column(align=True)
             sub.prop(part, "child_parting_factor", text="Parting", slider=True)
index 66f967bb6e1d63ed01b5c4832dff43db6f75cfcb..5a25e608a39251db13bf7a59f5cbc00c335598df 100644 (file)
@@ -228,22 +228,22 @@ class SCENE_PT_custom_props(SceneButtonsPanel, PropertyPanel, Panel):
 
 
 class ANIM_OT_keying_set_export(Operator):
-    "Export Keying Set to a python script."
+    "Export Keying Set to a python script"
     bl_idname = "anim.keying_set_export"
     bl_label = "Export Keying Set..."
 
-    filepath = bpy.props.StringProperty(name="File Path", description="Filepath to write file to.")
+    filepath = bpy.props.StringProperty(name="File Path", description="Filepath to write file to")
     filter_folder = bpy.props.BoolProperty(name="Filter folders", description="", default=True, options={'HIDDEN'})
     filter_text = bpy.props.BoolProperty(name="Filter text", description="", default=True, options={'HIDDEN'})
     filter_python = bpy.props.BoolProperty(name="Filter python", description="", default=True, options={'HIDDEN'})
 
     def execute(self, context):
         if not self.filepath:
-            raise Exception("Filepath not set.")
+            raise Exception("Filepath not set")
 
         f = open(self.filepath, "w")
         if not f:
-            raise Exception("Could not open file.")
+            raise Exception("Could not open file")
 
         scene = context.scene
         ks = scene.keying_sets.active
index 67aca5eb4c151d37d76e7e0eb4060030f8e2c37e..3e3ca913e884a1c212d18165f690189cddcf5761 100644 (file)
@@ -1104,8 +1104,8 @@ class WM_OT_addon_enable(Operator):
             if info_ver > bpy.app.version:
                 self.report({'WARNING'}, ("This script was written Blender "
                                           "version %d.%d.%d and might not "
-                                          "function (correctly).\n"
-                                          "The script is enabled though.") %
+                                          "function (correctly)"
+                                          "though it is enabled") %
                                          info_ver)
             return {'FINISHED'}
         else:
index b1d53e6ee0cbdaaed60ad37d33834430de00914f..3a7040ae2d2ebbfde130dd3cc2280f9aecb73489 100644 (file)
@@ -41,7 +41,7 @@ class ExportSomeData(bpy.types.Operator, ExportHelper):
             name="Example Enum",
             description="Choose between two items",
             items=(('OPT_A', "First Option", "Description one"),
-                   ('OPT_B', "Second Option", "Description two.")),
+                   ('OPT_B', "Second Option", "Description two")),
             default='OPT_A',
             )
 
index b7f6a58b6d7388c770f7bf5bf98917215fa2876a..7050aec9bf67282a3bdcad010546c13b7903a519 100644 (file)
 #include "MEM_guardedalloc.h"
 #include "avirgb.h"
 
-#if defined(__sgi) || defined (__sparc) || defined (__sparc__) || defined (__PPC__) || defined (__ppc__) || defined (__hppa__) || defined (__BIG_ENDIAN__)
-#define WORDS_BIGENDIAN
-#endif
-
-
 /* implementation */
 
 void *avi_converter_from_avi_rgb (AviMovie *movie, int stream, unsigned char *buffer, int *size) {
@@ -63,9 +58,9 @@ void *avi_converter_from_avi_rgb (AviMovie *movie, int stream, unsigned char *bu
        if (bits==16) {
                unsigned short *pxl;
                unsigned char *to;
-               #ifdef WORDS_BIGENDIAN
+#ifdef __BIG_ENDIAN__
                unsigned char  *pxla;
-               #endif            
+#endif           
                
                buf = MEM_mallocN (movie->header->Height * movie->header->Width * 3, "fromavirgbbuf");
 
@@ -75,19 +70,19 @@ void *avi_converter_from_avi_rgb (AviMovie *movie, int stream, unsigned char *bu
                while (y--) {
                        pxl= (unsigned short *) (buffer + y * movie->header->Width * 2);
                        
-                       #ifdef WORDS_BIGENDIAN
+#ifdef __BIG_ENDIAN__
                        pxla= (unsigned char *)pxl;
-                       #endif
+#endif
 
                        x= movie->header->Width;
                        while (x--) {
-                               #ifdef WORDS_BIGENDIAN
+#ifdef __BIG_ENDIAN__
                                i= pxla[0];
                                pxla[0]= pxla[1];
                                pxla[1]= i;
        
                                pxla+=2;
-                               #endif
+#endif
                        
                                *(to++)= ((*pxl>>10)&0x1f)*8;
                                *(to++)= ((*pxl>>5)&0x1f)*8;
index a985e8c3d5eb949ea17f45f5a559671b30287271..50ec2330beb46e931cd3c3537ebfffa99b0dbb9a 100644 (file)
 #include "endian.h"
 #include "avi_intern.h"
 
-#if defined(__sgi) || defined (__sparc) || defined (__sparc__) || defined (__PPC__) || defined (__ppc__) || defined (__hppa__) || defined (__BIG_ENDIAN__)
-#define WORDS_BIGENDIAN
-#endif
-
-#ifdef WORDS_BIGENDIAN
+#ifdef __BIG_ENDIAN__
 static void invert (int *num) {
        int new=0,i,j;
 
@@ -79,7 +75,7 @@ static void Ichunk (AviChunk *chunk) {
 }
 #endif
 
-#ifdef WORDS_BIGENDIAN
+#ifdef __BIG_ENDIAN__
 static void Ilist (AviList *list){
        invert (&list->fcc);
        invert (&list->size);
@@ -159,10 +155,10 @@ static void Iindexe (AviIndexEntry *indexe) {
        invert (&indexe->Offset);
        invert (&indexe->Size);
 }
-#endif /* WORDS_BIGENDIAN */
+#endif /* __BIG_ENDIAN__ */
 
 void awrite (AviMovie *movie, void *datain, int block, int size, FILE *fp, int type) {
-#ifdef WORDS_BIGENDIAN
+#ifdef __BIG_ENDIAN__
        void *data;
 
        data = MEM_mallocN (size, "avi endian");
@@ -209,9 +205,9 @@ void awrite (AviMovie *movie, void *datain, int block, int size, FILE *fp, int t
        }
 
        MEM_freeN (data);
-#else /* WORDS_BIGENDIAN */
+#else /* __BIG_ENDIAN__ */
        (void)movie; /* unused */
        (void)type; /* unused */
        fwrite (datain, block, size, fp);
-#endif /* WORDS_BIGENDIAN */
+#endif /* __BIG_ENDIAN__ */
 }
index 57f8c83eda61963661a2820cb9d2e7ecaa65b022..00943ace05c229fb557ea9258e3b60d66a9eac24 100644 (file)
@@ -66,7 +66,7 @@ void BLF_size(int fontid, int size, int dpi);
        | m[3]  m[7]  m[11] m[15] |
 
  */
-void BLF_matrix(int fontid, double *m);
+void BLF_matrix(int fontid, const double m[16]);
 
 /* Draw the string using the default font, size and dpi. */
 void BLF_draw_default(float x, float y, float z, const char *str, size_t len);
index fc812d652b3da257f890fdb76cccdcb4935aa47d..cccecd00bf7124da01ff3d17a895e213703de0b6 100644 (file)
@@ -6,7 +6,7 @@
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
  * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version. 
+ * of the License, or (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -20,7 +20,7 @@
  * The Original Code is Copyright (C) 2009 Blender Foundation.
  * All rights reserved.
  *
- * 
+ *
  * Contributor(s): Blender Foundation
  *
  * ***** END GPL LICENSE BLOCK *****
@@ -78,8 +78,8 @@ int blf_mono_font_render= -1;
 static FontBLF *BLF_get(int fontid)
 {
        if (fontid >= 0 && fontid < BLF_MAX_FONT)
-               return(global_font[fontid]);
-       return(NULL);
+               return global_font[fontid];
+       return NULL;
 }
 
 int BLF_init(int points, int dpi)
@@ -91,7 +91,7 @@ int BLF_init(int points, int dpi)
 
        global_font_points= points;
        global_font_dpi= dpi;
-       return(blf_font_init());
+       return blf_font_init();
 }
 
 void BLF_exit(void)
@@ -128,9 +128,9 @@ static int blf_search(const char *name)
        for (i= 0; i < BLF_MAX_FONT; i++) {
                font= global_font[i];
                if (font && (!strcmp(font->name, name)))
-                       return(i);
+                       return i;
        }
-       return(-1);
+       return -1;
 }
 
 int BLF_load(const char *name)
@@ -140,24 +140,24 @@ int BLF_load(const char *name)
        int i;
 
        if (!name)
-               return(-1);
+               return -1;
 
        /* check if we already load this font. */
        i= blf_search(name);
        if (i >= 0) {
                /*font= global_font[i];*/ /*UNUSED*/
-               return(i);
+               return i;
        }
 
        if (global_font_num+1 >= BLF_MAX_FONT) {
                printf("Too many fonts!!!\n");
-               return(-1);
+               return -1;
        }
 
        filename= blf_dir_search(name);
        if (!filename) {
                printf("Can't find font: %s\n", name);
-               return(-1);
+               return -1;
        }
 
        font= blf_font_new(name, filename);
@@ -165,13 +165,13 @@ int BLF_load(const char *name)
 
        if (!font) {
                printf("Can't load font: %s\n", name);
-               return(-1);
+               return -1;
        }
 
        global_font[global_font_num]= font;
        i= global_font_num;
        global_font_num++;
-       return(i);
+       return i;
 }
 
 int BLF_load_unique(const char *name)
@@ -181,20 +181,20 @@ int BLF_load_unique(const char *name)
        int i;
 
        if (!name)
-               return(-1);
+               return -1;
 
        /* Don't search in the cache!! make a new
         * object font, this is for keep fonts threads safe.
         */
        if (global_font_num+1 >= BLF_MAX_FONT) {
                printf("Too many fonts!!!\n");
-               return(-1);
+               return -1;
        }
 
        filename= blf_dir_search(name);
        if (!filename) {
                printf("Can't find font: %s\n", name);
-               return(-1);
+               return -1;
        }
 
        font= blf_font_new(name, filename);
@@ -202,22 +202,22 @@ int BLF_load_unique(const char *name)
 
        if (!font) {
                printf("Can't load font: %s\n", name);
-               return(-1);
+               return -1;
        }
 
        global_font[global_font_num]= font;
        i= global_font_num;
        global_font_num++;
-       return(i);
+       return i;
 }
 
 void BLF_metrics_attach(int fontid, unsigned char *mem, int mem_size)
 {
-       FontBLF *font;
+       FontBLF *font= BLF_get(fontid);
 
-       font= BLF_get(fontid);
-       if (font)
+       if (font) {
                blf_font_attach_from_mem(font, mem, mem_size);
+       }
 }
 
 int BLF_load_mem(const char *name, unsigned char *mem, int mem_size)
@@ -226,34 +226,34 @@ int BLF_load_mem(const char *name, unsigned char *mem, int mem_size)
        int i;
 
        if (!name)
-               return(-1);
+               return -1;
 
        i= blf_search(name);
        if (i >= 0) {
                /*font= global_font[i];*/ /*UNUSED*/
-               return(i);
+               return i;
        }
 
        if (global_font_num+1 >= BLF_MAX_FONT) {
                printf("Too many fonts!!!\n");
-               return(-1);
+               return -1;
        }
 
        if (!mem || !mem_size) {
                printf("Can't load font: %s from memory!!\n", name);
-               return(-1);
+               return -1;
        }
 
        font= blf_font_new_from_mem(name, mem, mem_size);
        if (!font) {
                printf("Can't load font: %s from memory!!\n", name);
-               return(-1);
+               return -1;
        }
 
        global_font[global_font_num]= font;
        i= global_font_num;
        global_font_num++;
-       return(i);
+       return i;
 }
 
 int BLF_load_mem_unique(const char *name, unsigned char *mem, int mem_size)
@@ -262,7 +262,7 @@ int BLF_load_mem_unique(const char *name, unsigned char *mem, int mem_size)
        int i;
 
        if (!name)
-               return(-1);
+               return -1;
 
        /*
         * Don't search in the cache, make a new object font!
@@ -270,67 +270,66 @@ int BLF_load_mem_unique(const char *name, unsigned char *mem, int mem_size)
         */
        if (global_font_num+1 >= BLF_MAX_FONT) {
                printf("Too many fonts!!!\n");
-               return(-1);
+               return -1;
        }
 
        if (!mem || !mem_size) {
                printf("Can't load font: %s from memory!!\n", name);
-               return(-1);
+               return -1;
        }
 
        font= blf_font_new_from_mem(name, mem, mem_size);
        if (!font) {
                printf("Can't load font: %s from memory!!\n", name);
-               return(-1);
+               return -1;
        }
 
        global_font[global_font_num]= font;
        i= global_font_num;
        global_font_num++;
-       return(i);
+       return i;
 }
 
 void BLF_enable(int fontid, int option)
 {
-       FontBLF *font;
+       FontBLF *font= BLF_get(fontid);
 
-       font= BLF_get(fontid);
-       if (font)
+       if (font) {
                font->flags |= option;
+       }
 }
 
 void BLF_disable(int fontid, int option)
 {
-       FontBLF *font;
+       FontBLF *font= BLF_get(fontid);
 
-       font= BLF_get(fontid);
-       if (font)
+       if (font) {
                font->flags &= ~option;
+       }
 }
 
 void BLF_enable_default(int option)
 {
-       FontBLF *font;
+       FontBLF *font= BLF_get(global_font_default);
 
-       font= BLF_get(global_font_default);
-       if (font)
+       if (font) {
                font->flags |= option;
+       }
 }
 
 void BLF_disable_default(int option)
 {
-       FontBLF *font;
+       FontBLF *font= BLF_get(global_font_default);
 
-       font= BLF_get(global_font_default);
-       if (font)
+       if (font) {
                font->flags &= ~option;
+       }
 }
 
 void BLF_aspect(int fontid, float x, float y, float z)
 {
-       FontBLF *font;
+       FontBLF *font= BLF_get(fontid);
 
-       font= BLF_get(fontid);
        if (font) {
                font->aspect[0]= x;
                font->aspect[1]= y;
@@ -338,26 +337,23 @@ void BLF_aspect(int fontid, float x, float y, float z)
        }
 }
 
-void BLF_matrix(int fontid, double *m)
+void BLF_matrix(int fontid, const double m[16])
 {
-       FontBLF *font;
-       int i;
+       FontBLF *font= BLF_get(fontid);
 
-       font= BLF_get(fontid);
        if (font) {
-               for (i= 0; i < 16; i++)
-                       font->m[i]= m[i];
+               memcpy(font->m, m, sizeof(font->m));
        }
 }
 
 void BLF_position(int fontid, float x, float y, float z)
 {
-       FontBLF *font;
-       float remainder;
-       float xa, ya, za;
+       FontBLF *font= BLF_get(fontid);
 
-       font= BLF_get(fontid);
        if (font) {
+               float xa, ya, za;
+               float remainder;
+
                if (font->flags & BLF_ASPECT) {
                        xa= font->aspect[0];
                        ya= font->aspect[1];
@@ -401,20 +397,20 @@ void BLF_position(int fontid, float x, float y, float z)
 
 void BLF_size(int fontid, int size, int dpi)
 {
-       FontBLF *font;
+       FontBLF *font= BLF_get(fontid);
 
-       font= BLF_get(fontid);
-       if (font)
+       if (font) {
                blf_font_size(font, size, dpi);
+       }
 }
 
 void BLF_blur(int fontid, int size)
 {
-       FontBLF *font;
-       
-       font= BLF_get(fontid);
-       if (font)
+       FontBLF *font= BLF_get(fontid);
+
+       if (font) {
                font->blur= size;
+       }
 }
 
 void BLF_draw_default(float x, float y, float z, const char *str, size_t len)
@@ -456,11 +452,11 @@ void BLF_draw_default_ascii(float x, float y, float z, const char *str, size_t l
 
 void BLF_rotation_default(float angle)
 {
-       FontBLF *font;
+       FontBLF *font= BLF_get(global_font_default);
 
-       font= BLF_get(global_font_default);
-       if (font)
+       if (font) {
                font->angle= angle;
+       }
 }
 
 static void blf_draw__start(FontBLF *font)
@@ -486,6 +482,13 @@ static void blf_draw__start(FontBLF *font)
 
        if (font->flags & BLF_ROTATION)
                glRotatef(font->angle, 0.0f, 0.0f, 1.0f);
+
+       if(font->shadow || font->blur)
+               glGetFloatv(GL_CURRENT_COLOR, font->orig_col);
+
+       /* always bind the texture for the first glyph */
+       font->tex_bind_state= -1;
+
 }
 
 static void blf_draw__end(void)
@@ -498,7 +501,8 @@ static void blf_draw__end(void)
 void BLF_draw(int fontid, const char *str, size_t len)
 {
        FontBLF *font= BLF_get(fontid);
-       if (font) {
+
+       if (font && font->glyph_cache) {
                blf_draw__start(font);
                blf_font_draw(font, str, len);
                blf_draw__end();
@@ -508,7 +512,8 @@ void BLF_draw(int fontid, const char *str, size_t len)
 void BLF_draw_ascii(int fontid, const char *str, size_t len)
 {
        FontBLF *font= BLF_get(fontid);
-       if (font) {
+
+       if (font && font->glyph_cache) {
                blf_draw__start(font);
                blf_font_draw_ascii(font, str, len);
                blf_draw__end();
@@ -517,148 +522,141 @@ void BLF_draw_ascii(int fontid, const char *str, size_t len)
 
 void BLF_boundbox(int fontid, const char *str, rctf *box)
 {
-       FontBLF *font;
+       FontBLF *font= BLF_get(fontid);
 
-       font= BLF_get(fontid);
-       if (font)
+       if (font) {
                blf_font_boundbox(font, str, box);
+       }
 }
 
 void BLF_width_and_height(int fontid, const char *str, float *width, float *height)
 {
-       FontBLF *font;
+       FontBLF *font= BLF_get(fontid);
 
-       font= BLF_get(fontid);
-       if (font)
+       if (font && font->glyph_cache) {
                blf_font_width_and_height(font, str, width, height);
+       }
 }
 
 float BLF_width(int fontid, const char *str)
 {
-       FontBLF *font;
+       FontBLF *font= BLF_get(fontid);
 
-       font= BLF_get(fontid);
-       if (font)
-               return(blf_font_width(font, str));
-       return(0.0f);
+       if (font && font->glyph_cache) {
+               return blf_font_width(font, str);
+       }
+
+       return 0.0f;
 }
 
 float BLF_fixed_width(int fontid)
 {
-       FontBLF *font;
+       FontBLF *font= BLF_get(fontid);
+
+       if (font && font->glyph_cache) {
+               return blf_font_fixed_width(font);
+       }
 
-       font= BLF_get(fontid);
-       if (font)
-               return(blf_font_fixed_width(font));
-       return(0.0f);
+       return 0.0f;
 }
 
 float BLF_width_default(const char *str)
 {
-       float width;
-
        if (global_font_default == -1)
                global_font_default= blf_search("default");
 
        if (global_font_default == -1) {
                printf("Error: Can't found default font!!\n");
-               return(0.0f);
+               return 0.0f;
        }
 
        BLF_size(global_font_default, global_font_points, global_font_dpi);
-       width= BLF_width(global_font_default, str);
-       return(width);
+       return BLF_width(global_font_default, str);
 }
 
 float BLF_height(int fontid, const char *str)
 {
-       FontBLF *font;
+       FontBLF *font= BLF_get(fontid);
 
-       font= BLF_get(fontid);
-       if (font)
-               return(blf_font_height(font, str));
-       return(0.0f);
+       if (font && font->glyph_cache) {
+               return blf_font_height(font, str);
+       }
+
+       return 0.0f;
 }
 
 float BLF_height_max(int fontid)
 {
-       FontBLF *font;
+       FontBLF *font= BLF_get(fontid);
 
-       font= BLF_get(fontid);
-       if (font) {
-               if(font->glyph_cache)
-                       return(font->glyph_cache->max_glyph_height);
+       if (font && font->glyph_cache) {
+               return font->glyph_cache->max_glyph_height;
        }
-       return(0.0f);
+
+       return 0.0f;
 }
 
 float BLF_width_max(int fontid)
 {
-       FontBLF *font;
+       FontBLF *font= BLF_get(fontid);
 
-       font= BLF_get(fontid);
-       if (font) {
-               if(font->glyph_cache)
-                       return(font->glyph_cache->max_glyph_width);
+       if (font && font->glyph_cache) {
+               return font->glyph_cache->max_glyph_width;
        }
-       return(0.0f);
+
+       return 0.0f;
 }
 
 float BLF_descender(int fontid)
 {
-       FontBLF *font;
+       FontBLF *font= BLF_get(fontid);
 
-       font= BLF_get(fontid);
-       if (font) {
-               if(font->glyph_cache)
-                       return(font->glyph_cache->descender);
+       if (font && font->glyph_cache) {
+               return font->glyph_cache->descender;
        }
-       return(0.0f);
+
+       return 0.0f;
 }
 
 float BLF_ascender(int fontid)
 {
-       FontBLF *font;
+       FontBLF *font= BLF_get(fontid);
 
-       font= BLF_get(fontid);
-       if (font) {
-               if(font->glyph_cache)
-                       return(font->glyph_cache->ascender);
+       if (font && font->glyph_cache) {
+               return font->glyph_cache->ascender;
        }
-       return(0.0f);
+
+       return 0.0f;
 }
 
 float BLF_height_default(const char *str)
 {
-       float height;
-
        if (global_font_default == -1)
                global_font_default= blf_search("default");
 
        if (global_font_default == -1) {
                printf("Error: Can't found default font!!\n");
-               return(0.0f);
+               return 0.0f;
        }
 
        BLF_size(global_font_default, global_font_points, global_font_dpi);
-       height= BLF_height(global_font_default, str);
-       return(height);
+
+       return BLF_height(global_font_default, str);
 }
 
 void BLF_rotation(int fontid, float angle)
 {
-       FontBLF *font;
+       FontBLF *font= BLF_get(fontid);
 
-       font= BLF_get(fontid);
-       if (font)
+       if (font) {
                font->angle= angle;
+       }
 }
 
 void BLF_clipping(int fontid, float xmin, float ymin, float xmax, float ymax)
 {
-       FontBLF *font;
+       FontBLF *font= BLF_get(fontid);
 
-       font= BLF_get(fontid);
        if (font) {
                font->clip_rec.xmin= xmin;
                font->clip_rec.ymin= ymin;
@@ -669,9 +667,8 @@ void BLF_clipping(int fontid, float xmin, float ymin, float xmax, float ymax)
 
 void BLF_clipping_default(float xmin, float ymin, float xmax, float ymax)
 {
-       FontBLF *font;
+       FontBLF *font= BLF_get(global_font_default);
 
-       font= BLF_get(global_font_default);
        if (font) {
                font->clip_rec.xmin= xmin;
                font->clip_rec.ymin= ymin;
@@ -682,9 +679,8 @@ void BLF_clipping_default(float xmin, float ymin, float xmax, float ymax)
 
 void BLF_shadow(int fontid, int level, float r, float g, float b, float a)
 {
-       FontBLF *font;
+       FontBLF *font= BLF_get(fontid);
 
-       font= BLF_get(fontid);
        if (font) {
                font->shadow= level;
                font->shadow_col[0]= r;
@@ -696,9 +692,8 @@ void BLF_shadow(int fontid, int level, float r, float g, float b, float a)
 
 void BLF_shadow_offset(int fontid, int x, int y)
 {
-       FontBLF *font;
+       FontBLF *font= BLF_get(fontid);
 
-       font= BLF_get(fontid);
        if (font) {
                font->shadow_x= x;
                font->shadow_y= y;
@@ -707,9 +702,8 @@ void BLF_shadow_offset(int fontid, int x, int y)
 
 void BLF_buffer(int fontid, float *fbuf, unsigned char *cbuf, int w, int h, int nch)
 {
-       FontBLF *font;
+       FontBLF *font= BLF_get(fontid);
 
-       font= BLF_get(fontid);
        if (font) {
                font->b_fbuf= fbuf;
                font->b_cbuf= cbuf;
@@ -721,9 +715,8 @@ void BLF_buffer(int fontid, float *fbuf, unsigned char *cbuf, int w, int h, int
 
 void BLF_buffer_col(int fontid, float r, float g, float b, float a)
 {
-       FontBLF *font;
+       FontBLF *font= BLF_get(fontid);
 
-       font= BLF_get(fontid);
        if (font) {
                font->b_col[0]= r;
                font->b_col[1]= g;
@@ -734,9 +727,9 @@ void BLF_buffer_col(int fontid, float r, float g, float b, float a)
 
 void BLF_draw_buffer(int fontid, const char *str)
 {
-       FontBLF *font;
+       FontBLF *font= BLF_get(fontid);
 
-       font= BLF_get(fontid);
-       if (font)
+       if (font && font->glyph_cache && (font->b_fbuf || font->b_cbuf)) {
                blf_font_buffer(font, str);
+       }
 }
index fd874d991ead1f6aaae5e86e418e1805a672ad3e..46be49b37e9035441a0d96a57f085f0c06f13470 100644 (file)
@@ -62,10 +62,10 @@ static DirBLF *blf_dir_find(const char *path)
        p= global_font_dir.first;
        while (p) {
                if (BLI_path_cmp(p->path, path) == 0)
-                       return(p);
+                       return p;
                p= p->next;
        }
-       return(NULL);
+       return NULL;
 }
 
 void BLF_dir_add(const char *path)
@@ -76,7 +76,7 @@ void BLF_dir_add(const char *path)
        if (dir) /* already in the list ? just return. */
                return;
        
-       dir= (DirBLF *)MEM_mallocN(sizeof(DirBLF), "BLF_dir_add");
+       dir= (DirBLF *)MEM_callocN(sizeof(DirBLF), "BLF_dir_add");
        dir->path= BLI_strdup(path);
        BLI_addhead(&global_font_dir, dir);
 }
@@ -102,9 +102,9 @@ char **BLF_dir_get(int *ndir)
        
        count= BLI_countlist(&global_font_dir);
        if (!count)
-               return(NULL);
+               return NULL;
        
-       dirs= (char **)MEM_mallocN(sizeof(char *) * count, "BLF_dir_get");
+       dirs= (char **)MEM_callocN(sizeof(char *) * count, "BLF_dir_get");
        p= global_font_dir.first;
        i= 0;
        while (p) {
@@ -113,7 +113,7 @@ char **BLF_dir_get(int *ndir)
                p= p->next;
        }
        *ndir= i;
-       return(dirs);
+       return dirs;
 }
 
 void BLF_dir_free(char **dirs, int count)
@@ -147,8 +147,8 @@ char *blf_dir_search(const char *file)
                if (BLI_exist(file))
                        s= BLI_strdup(file);
        }
-       
-       return(s);
+
+       return s;
 }
 
 #if 0 // UNUSED
@@ -171,9 +171,9 @@ int blf_dir_split(const char *str, char *file, int *size)
                file[i+4]= '\0';
                s++;
                *size= atoi(s);
-               return(1);
+               return 1;
        }
-       return(0);
+       return 0;
 }
 #endif
 
@@ -188,9 +188,9 @@ char *blf_dir_metrics_search(const char *filename)
        mfile= BLI_strdup(filename);
        s= strrchr(mfile, '.');
        if (s) {
-               if (strlen(s) < 4) {
+               if (BLI_strnlen(s, 4) < 4) {
                        MEM_freeN(mfile);
-                       return(NULL);
+                       return NULL;
                }
                s++;
                s[0]= 'a';
@@ -199,14 +199,14 @@ char *blf_dir_metrics_search(const char *filename)
 
                /* first check .afm */
                if (BLI_exist(s))
-                       return(s);
+                       return s;
 
                /* and now check .pfm */
                s[0]= 'p';
 
                if (BLI_exist(s))
-                       return(s);
+                       return s;
        }
        MEM_freeN(mfile);
-       return(NULL);
+       return NULL;
 }
index 3bec7dd262639dbe07579df8a7764818c3fbc53f..26af3a3fd4f78736d0688fb4788e30a293d9f8dd 100644 (file)
@@ -62,7 +62,7 @@ static FT_Library ft_lib;
 
 int blf_font_init(void)
 {
-       return(FT_Init_FreeType(&ft_lib));
+       return FT_Init_FreeType(&ft_lib);
 }
 
 void blf_font_exit(void)
@@ -136,26 +136,33 @@ static void blf_font_ensure_ascii_table(FontBLF *font)
        }                                                                         \
 
 
+#define BLF_KERNING_VARS(_font, _has_kerning, _kern_mode)                     \
+       const short has_kerning= FT_HAS_KERNING((_font)->face);                   \
+       const FT_UInt kern_mode= (has_kerning == 0) ? 0 :                         \
+                                (((_font)->flags & BLF_KERNING_DEFAULT) ?        \
+                                 ft_kerning_default : FT_KERNING_UNFITTED)       \
+                                                                                 \
+
+
+#define BLF_KERNING_STEP(_font, kern_mode, g_prev, g, delta, pen_x)           \
+{                                                                             \
+       if (g_prev) {                                                             \
+               delta.x= delta.y= 0;                                                  \
+               if (FT_Get_Kerning((_font)->face, g_prev->idx, g->idx, kern_mode, &delta) == 0) \
+                       pen_x += delta.x >> 6;                                            \
+       }                                                                         \
+}                                                                             \
 
 void blf_font_draw(FontBLF *font, const char *str, unsigned int len)
 {
        unsigned int c;
-       GlyphBLF *g, *g_prev;
+       GlyphBLF *g, *g_prev= NULL;
        FT_Vector delta;
-       int pen_x, pen_y;
-       int has_kerning, st;
-       unsigned int i;
-       GlyphBLF **glyph_ascii_table;
-
-       if (!font->glyph_cache)
-               return;
-       glyph_ascii_table= font->glyph_cache->glyph_ascii_table;
+       int pen_x= 0, pen_y= 0;
+       unsigned int i= 0;
+       GlyphBLF **glyph_ascii_table= font->glyph_cache->glyph_ascii_table;
 
-       i= 0;
-       pen_x= 0;
-       pen_y= 0;
-       has_kerning= FT_HAS_KERNING(font->face);
-       g_prev= NULL;
+       BLF_KERNING_VARS(font, has_kerning, kern_mode);
 
        blf_font_ensure_ascii_table(font);
 
@@ -163,25 +170,9 @@ void blf_font_draw(FontBLF *font, const char *str, unsigned int len)
 
                BLF_UTF8_NEXT_FAST(font, g, str, i, c, glyph_ascii_table);
 
-               if (c == 0)
-                       break;
-
-               /* if we don't found a glyph, skip it. */
-               if (!g)
-                       continue;
-
-               if (has_kerning && g_prev) {
-                       delta.x= 0;
-                       delta.y= 0;
-
-                       if (font->flags & BLF_KERNING_DEFAULT)
-                               st= FT_Get_Kerning(font->face, g_prev->idx, g->idx, ft_kerning_default, &delta);
-                       else
-                               st= FT_Get_Kerning(font->face, g_prev->idx, g->idx, FT_KERNING_UNFITTED, &delta);
-
-                       if (st == 0)
-                               pen_x += delta.x >> 6;
-               }
+               if (c == 0)      break;
+               if (g == NULL)   continue;
+               if (has_kerning) BLF_KERNING_STEP(font, kern_mode, g_prev, g, delta, pen_x);
 
                /* do not return this loop if clipped, we want every character tested */
                blf_glyph_render(font, g, (float)pen_x, (float)pen_y);
@@ -194,43 +185,19 @@ void blf_font_draw(FontBLF *font, const char *str, unsigned int len)
 /* faster version of blf_font_draw, ascii only for view dimensions */
 void blf_font_draw_ascii(FontBLF *font, const char *str, unsigned int len)
 {
-       char c;
-       GlyphBLF *g, *g_prev;
+       unsigned char c;
+       GlyphBLF *g, *g_prev= NULL;
        FT_Vector delta;
-       int pen_x, pen_y;
-       int has_kerning, st;
-       GlyphBLF **glyph_ascii_table;
-
-       if (!font->glyph_cache)
-               return;
-       glyph_ascii_table= font->glyph_cache->glyph_ascii_table;
+       int pen_x= 0, pen_y= 0;
+       GlyphBLF **glyph_ascii_table= font->glyph_cache->glyph_ascii_table;
 
-       pen_x= 0;
-       pen_y= 0;
-       has_kerning= FT_HAS_KERNING(font->face);
-       g_prev= NULL;
+       BLF_KERNING_VARS(font, has_kerning, kern_mode);
 
        blf_font_ensure_ascii_table(font);
 
        while ((c= *(str++)) && len--) {
-               g= glyph_ascii_table[c];
-
-               /* if we don't found a glyph, skip it. */
-               if (!g)
-                       continue;
-
-               if (has_kerning && g_prev) {
-                       delta.x= 0;
-                       delta.y= 0;
-
-                       if (font->flags & BLF_KERNING_DEFAULT)
-                               st= FT_Get_Kerning(font->face, g_prev->idx, g->idx, ft_kerning_default, &delta);
-                       else
-                               st= FT_Get_Kerning(font->face, g_prev->idx, g->idx, FT_KERNING_UNFITTED, &delta);
-
-                       if (st == 0)
-                               pen_x += delta.x >> 6;
-               }
+               if ((g= glyph_ascii_table[c]) == NULL) continue;
+               if (has_kerning) BLF_KERNING_STEP(font, kern_mode, g_prev, g, delta, pen_x);
 
                /* do not return this loop if clipped, we want every character tested */
                blf_glyph_render(font, g, (float)pen_x, (float)pen_y);
@@ -240,59 +207,37 @@ void blf_font_draw_ascii(FontBLF *font, const char *str, unsigned int len)
        }
 }
 
+/* Sanity checks are done by BLF_draw_buffer() */
 void blf_font_buffer(FontBLF *font, const char *str)
 {
-       unsigned char *cbuf;
        unsigned int c;
-       unsigned char b_col_char[4];
-       GlyphBLF *g, *g_prev;
+       GlyphBLF *g, *g_prev= NULL;
        FT_Vector delta;
+       int pen_x= (int)font->pos[0], pen_y= 0;
+       unsigned int i= 0;
+       GlyphBLF **glyph_ascii_table= font->glyph_cache->glyph_ascii_table;
+
+       /* buffer spesific vars*/
+       const unsigned char b_col_char[4]= {font->b_col[0] * 255,
+                                           font->b_col[1] * 255,
+                                           font->b_col[2] * 255,
+                                           font->b_col[3] * 255};
+       unsigned char *cbuf;
+       int chx, chy;
+       int y, x;
        float a, *fbuf;
-       int pen_x, y, x;
-       int has_kerning, st, chx, chy;
-       unsigned int i;
-       GlyphBLF **glyph_ascii_table;
 
-       if (!font->glyph_cache || (!font->b_fbuf && !font->b_cbuf))
-               return;
-       glyph_ascii_table= font->glyph_cache->glyph_ascii_table;
-       
-       i= 0;
-       pen_x= (int)font->pos[0];
-       has_kerning= FT_HAS_KERNING(font->face);
-       g_prev= NULL;
-       
-       b_col_char[0]= font->b_col[0] * 255;
-       b_col_char[1]= font->b_col[1] * 255;
-       b_col_char[2]= font->b_col[2] * 255;
-       b_col_char[3]= font->b_col[3] * 255;
+       BLF_KERNING_VARS(font, has_kerning, kern_mode);
 
        blf_font_ensure_ascii_table(font);
 
        while (str[i]) {
-               int pen_y;
 
                BLF_UTF8_NEXT_FAST(font, g, str, i, c, glyph_ascii_table);
 
-               if (c == 0)
-                       break;
-
-               /* if we don't found a glyph, skip it. */
-               if (!g)
-                       continue;
-
-               if (has_kerning && g_prev) {
-                       delta.x= 0;
-                       delta.y= 0;
-
-                       if (font->flags & BLF_KERNING_DEFAULT)
-                               st= FT_Get_Kerning(font->face, g_prev->idx, g->idx, ft_kerning_default, &delta);
-                       else
-                               st= FT_Get_Kerning(font->face, g_prev->idx, g->idx, FT_KERNING_UNFITTED, &delta);
-
-                       if (st == 0)
-                               pen_x += delta.x >> 6;
-               }
+               if (c == 0)      break;
+               if (g == NULL)   continue;
+               if (has_kerning) BLF_KERNING_STEP(font, kern_mode, g_prev, g, delta, pen_x);
 
                chx= pen_x + ((int)g->pos_x);
                chy= (int)font->pos[1] + g->height;
@@ -392,69 +337,41 @@ void blf_font_buffer(FontBLF *font, const char *str)
 void blf_font_boundbox(FontBLF *font, const char *str, rctf *box)
 {
        unsigned int c;
-       GlyphBLF *g, *g_prev;
+       GlyphBLF *g, *g_prev= NULL;
        FT_Vector delta;
+       int pen_x= 0, pen_y= 0;
+       unsigned int i= 0;
+       GlyphBLF **glyph_ascii_table= font->glyph_cache->glyph_ascii_table;
+
        rctf gbox;
-       int pen_x, pen_y;
-       int has_kerning, st;
-       unsigned int i;
-       GlyphBLF **glyph_ascii_table;
 
-       if (!font->glyph_cache)
-               return;
+       BLF_KERNING_VARS(font, has_kerning, kern_mode);
 
        box->xmin= 32000.0f;
        box->xmax= -32000.0f;
        box->ymin= 32000.0f;
        box->ymax= -32000.0f;
 
-       i= 0;
-       pen_x= 0;
-       pen_y= 0;
-       has_kerning= FT_HAS_KERNING(font->face);
-       g_prev= NULL;
-
        blf_font_ensure_ascii_table(font);
-       glyph_ascii_table= font->glyph_cache->glyph_ascii_table;
 
        while (str[i]) {
 
                BLF_UTF8_NEXT_FAST(font, g, str, i, c, glyph_ascii_table);
 
-               if (c == 0)
-                       break;
-
-               /* if we don't found a glyph, skip it. */
-               if (!g)
-                       continue;
-
-               if (has_kerning && g_prev) {
-                       delta.x= 0;
-                       delta.y= 0;
-
-                       if (font->flags & BLF_KERNING_DEFAULT)
-                               st= FT_Get_Kerning(font->face, g_prev->idx, g->idx, ft_kerning_default, &delta);
-                       else
-                               st= FT_Get_Kerning(font->face, g_prev->idx, g->idx, FT_KERNING_UNFITTED, &delta);
-
-                       if (st == 0)
-                               pen_x += delta.x >> 6;
-               }
+               if (c == 0)      break;
+               if (g == NULL)   continue;
+               if (has_kerning) BLF_KERNING_STEP(font, kern_mode, g_prev, g, delta, pen_x);
 
                gbox.xmin= pen_x;
                gbox.xmax= pen_x + g->advance;
                gbox.ymin= g->box.ymin + pen_y;
                gbox.ymax= g->box.ymax + pen_y;
 
-               if (gbox.xmin < box->xmin)
-                       box->xmin= gbox.xmin;
-               if (gbox.ymin < box->ymin)
-                       box->ymin= gbox.ymin;
+               if (gbox.xmin < box->xmin) box->xmin= gbox.xmin;
+               if (gbox.ymin < box->ymin) box->ymin= gbox.ymin;
 
-               if (gbox.xmax > box->xmax)
-                       box->xmax= gbox.xmax;
-               if (gbox.ymax > box->ymax)
-                       box->ymax= gbox.ymax;
+               if (gbox.xmax > box->xmax) box->xmax= gbox.xmax;
+               if (gbox.ymax > box->ymax) box->ymax= gbox.ymax;
 
                pen_x += g->advance;
                g_prev= g;
@@ -473,20 +390,18 @@ void blf_font_width_and_height(FontBLF *font, const char *str, float *width, flo
        float xa, ya;
        rctf box;
 
-       if (font->glyph_cache) {
-               if (font->flags & BLF_ASPECT) {
-                       xa= font->aspect[0];
-                       ya= font->aspect[1];
-               }
-               else {
-                       xa= 1.0f;
-                       ya= 1.0f;
-               }
-
-               blf_font_boundbox(font, str, &box);
-               *width= ((box.xmax - box.xmin) * xa);
-               *height= ((box.ymax - box.ymin) * ya);
+       if (font->flags & BLF_ASPECT) {
+               xa= font->aspect[0];
+               ya= font->aspect[1];
+       }
+       else {
+               xa= 1.0f;
+               ya= 1.0f;
        }
+
+       blf_font_boundbox(font, str, &box);
+       *width= ((box.xmax - box.xmin) * xa);
+       *height= ((box.ymax - box.ymin) * ya);
 }
 
 float blf_font_width(FontBLF *font, const char *str)
@@ -494,16 +409,13 @@ float blf_font_width(FontBLF *font, const char *str)
        float xa;
        rctf box;
 
-       if (!font->glyph_cache)
-               return(0.0f);
-
        if (font->flags & BLF_ASPECT)
                xa= font->aspect[0];
        else
                xa= 1.0f;
 
        blf_font_boundbox(font, str, &box);
-       return((box.xmax - box.xmin) * xa);
+       return (box.xmax - box.xmin) * xa;
 }
 
 float blf_font_height(FontBLF *font, const char *str)
@@ -511,36 +423,28 @@ float blf_font_height(FontBLF *font, const char *str)
        float ya;
        rctf box;
 
-       if (!font->glyph_cache)
-               return(0.0f);
-
        if (font->flags & BLF_ASPECT)
                ya= font->aspect[1];
        else
                ya= 1.0f;
 
        blf_font_boundbox(font, str, &box);
-       return((box.ymax - box.ymin) * ya);
+       return (box.ymax - box.ymin) * ya;
 }
 
 float blf_font_fixed_width(FontBLF *font)
 {
-       GlyphBLF *g;
-       FT_UInt glyph_index;
-       unsigned int c = ' ';
-
-       if (!font->glyph_cache)
-               return 0.0f;
-
-       glyph_index= FT_Get_Char_Index(font->face, c);
-       g= blf_glyph_search(font->glyph_cache, c);
-       if (!g)
-               g= blf_glyph_add(font, glyph_index, c);
-
-       /* if we don't find the glyph. */
-       if (!g)
-               return 0.0f;
-       
+       const unsigned int c = ' ';
+       GlyphBLF *g= blf_glyph_search(font->glyph_cache, c);
+       if (!g) {
+               g= blf_glyph_add(font, FT_Get_Char_Index(font->face, c), c);
+
+               /* if we don't find the glyph. */
+               if (!g) {
+                       return 0.0f;
+               }
+       }
+
        return g->advance;
 }
 
@@ -607,11 +511,11 @@ FontBLF *blf_font_new(const char *name, const char *filename)
        FT_Error err;
        char *mfile;
 
-       font= (FontBLF *)MEM_mallocN(sizeof(FontBLF), "blf_font_new");
+       font= (FontBLF *)MEM_callocN(sizeof(FontBLF), "blf_font_new");
        err= FT_New_Face(ft_lib, filename, 0, &font->face);
        if (err) {
                MEM_freeN(font);
-               return(NULL);
+               return NULL;
        }
 
        err= FT_Select_Charmap(font->face, ft_encoding_unicode);
@@ -619,7 +523,7 @@ FontBLF *blf_font_new(const char *name, const char *filename)
                printf("Can't set the unicode character map!\n");
                FT_Done_Face(font->face);
                MEM_freeN(font);
-               return(NULL);
+               return NULL;
        }
 
        mfile= blf_dir_metrics_search(filename);
@@ -631,7 +535,7 @@ FontBLF *blf_font_new(const char *name, const char *filename)
        font->name= BLI_strdup(name);
        font->filename= BLI_strdup(filename);
        blf_font_fill(font);
-       return(font);
+       return font;
 }
 
 void blf_font_attach_from_mem(FontBLF *font, const unsigned char *mem, int mem_size)
@@ -649,11 +553,11 @@ FontBLF *blf_font_new_from_mem(const char *name, unsigned char *mem, int mem_siz
        FontBLF *font;
        FT_Error err;
 
-       font= (FontBLF *)MEM_mallocN(sizeof(FontBLF), "blf_font_new_from_mem");
+       font= (FontBLF *)MEM_callocN(sizeof(FontBLF), "blf_font_new_from_mem");
        err= FT_New_Memory_Face(ft_lib, mem, mem_size, 0, &font->face);
        if (err) {
                MEM_freeN(font);
-               return(NULL);
+               return NULL;
        }
 
        err= FT_Select_Charmap(font->face, ft_encoding_unicode);
@@ -661,11 +565,11 @@ FontBLF *blf_font_new_from_mem(const char *name, unsigned char *mem, int mem_siz
                printf("Can't set the unicode character map!\n");
                FT_Done_Face(font->face);
                MEM_freeN(font);
-               return(NULL);
+               return NULL;
        }
 
        font->name= BLI_strdup(name);
        font->filename= NULL;
        blf_font_fill(font);
-       return(font);
+       return font;
 }
index 9b39cb65cba607058c1f3f78beadef10924b0090..99d41cd7abdf8a78a27a0d106f6bef64e11746be 100644 (file)
@@ -64,10 +64,10 @@ GlyphCacheBLF *blf_glyph_cache_find(FontBLF *font, int size, int dpi)
        p= (GlyphCacheBLF *)font->cache.first;
        while (p) {
                if (p->size == size && p->dpi == dpi)
-                       return(p);
+                       return p;
                p= p->next;
        }
-       return(NULL);
+       return NULL;
 }
 
 /* Create a new glyph cache for the current size and dpi. */
@@ -75,7 +75,7 @@ GlyphCacheBLF *blf_glyph_cache_new(FontBLF *font)
 {
        GlyphCacheBLF *gc;
 
-       gc= (GlyphCacheBLF *)MEM_mallocN(sizeof(GlyphCacheBLF), "blf_glyph_cache_new");
+       gc= (GlyphCacheBLF *)MEM_callocN(sizeof(GlyphCacheBLF), "blf_glyph_cache_new");
        gc->next= NULL;
        gc->prev= NULL;
        gc->size= font->size;
@@ -114,7 +114,7 @@ GlyphCacheBLF *blf_glyph_cache_new(FontBLF *font)
        gc->p2_height= 0;
 
        BLI_addhead(&font->cache, gc);
-       return(gc);
+       return gc;
 }
 
 void blf_glyph_cache_clear(FontBLF *font)
@@ -131,10 +131,8 @@ void blf_glyph_cache_clear(FontBLF *font)
                                blf_glyph_free(g);
                        }
                }
-       }
 
-       if(font->glyph_cache) {
-               memset(font->glyph_cache->glyph_ascii_table, 0, sizeof(font->glyph_cache->glyph_ascii_table));
+               memset(gc->glyph_ascii_table, 0, sizeof(gc->glyph_ascii_table));
        }
 }
 
@@ -185,7 +183,7 @@ static void blf_glyph_cache_texture(FontBLF *font, GlyphCacheBLF *gc)
        memset((void *)buf, 0, tot_mem);
 
        glGenTextures(1, &gc->textures[gc->cur_tex]);
-       glBindTexture(GL_TEXTURE_2D, gc->textures[gc->cur_tex]);
+       glBindTexture(GL_TEXTURE_2D, (font->tex_bind_state= gc->textures[gc->cur_tex]));
        glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP);
        glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP);
        glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
@@ -204,10 +202,10 @@ GlyphBLF *blf_glyph_search(GlyphCacheBLF *gc, unsigned int c)
        p= gc->bucket[key].first;
        while (p) {
                if (p->c == c)
-                       return(p);
+                       return p;
                p= p->next;
        }
-       return(NULL);
+       return NULL;
 }
 
 GlyphBLF *blf_glyph_add(FontBLF *font, unsigned int index, unsigned int c)
@@ -222,14 +220,14 @@ GlyphBLF *blf_glyph_add(FontBLF *font, unsigned int index, unsigned int c)
 
        g= blf_glyph_search(font->glyph_cache, c);
        if (g)
-               return(g);
+               return g;
 
        if (sharp)
                err = FT_Load_Glyph(font->face, (FT_UInt)index, FT_LOAD_TARGET_MONO);
        else
                err = FT_Load_Glyph(font->face, (FT_UInt)index, FT_LOAD_TARGET_NORMAL | FT_LOAD_NO_HINTING | FT_LOAD_NO_BITMAP); /* Sure about NO_* flags? */
        if (err)
-               return(NULL);
+               return NULL;
 
        /* get the glyph. */
        slot= font->face->glyph;
@@ -248,22 +246,13 @@ GlyphBLF *blf_glyph_add(FontBLF *font, unsigned int index, unsigned int c)
        }
 
        if (err || slot->format != FT_GLYPH_FORMAT_BITMAP)
-               return(NULL);
+               return NULL;
 
-       g= (GlyphBLF *)MEM_mallocN(sizeof(GlyphBLF), "blf_glyph_add");
-       g->next= NULL;
-       g->prev= NULL;
+       g= (GlyphBLF *)MEM_callocN(sizeof(GlyphBLF), "blf_glyph_add");
        g->c= c;
        g->idx= (FT_UInt)index;
-       g->tex= 0;
-       g->build_tex= 0;
-       g->bitmap= NULL;
        g->xoff= -1;
        g->yoff= -1;
-       g->uv[0][0]= 0.0f;
-       g->uv[0][1]= 0.0f;
-       g->uv[1][0]= 0.0f;
-       g->uv[1][1]= 0.0f;
        bitmap= slot->bitmap;
        g->width= bitmap.width;
        g->height= bitmap.rows;
@@ -294,7 +283,7 @@ GlyphBLF *blf_glyph_add(FontBLF *font, unsigned int index, unsigned int c)
 
        key= blf_hash(g->c);
        BLI_addhead(&(font->glyph_cache->bucket[key]), g);
-       return(g);
+       return g;
 }
 
 void blf_glyph_free(GlyphBLF *g)
@@ -326,23 +315,25 @@ static void blf_texture_draw(float uv[2][2], float dx, float y1, float dx1, floa
        
 }
 
-static void blf_texture5_draw(float uv[2][2], float x1, float y1, float x2, float y2)
+static void blf_texture5_draw(const float shadow_col[4], float uv[2][2], float x1, float y1, float x2, float y2)
 {
-       float soft[25]= {
-               1/60.0f, 1/60.0f, 2/60.0f, 1/60.0f, 1/60.0f, 
-               1/60.0f, 3/60.0f, 5/60.0f, 3/60.0f, 1/60.0f, 
-               2/60.0f, 5/60.0f, 8/60.0f, 5/60.0f, 2/60.0f, 
-               1/60.0f, 3/60.0f, 5/60.0f, 3/60.0f, 1/60.0f, 
-               1/60.0f, 1/60.0f, 2/60.0f, 1/60.0f, 1/60.0f};
+       float soft[25]= {1/60.0f, 1/60.0f, 2/60.0f, 1/60.0f, 1/60.0f,
+                        1/60.0f, 3/60.0f, 5/60.0f, 3/60.0f, 1/60.0f,
+                        2/60.0f, 5/60.0f, 8/60.0f, 5/60.0f, 2/60.0f,
+                        1/60.0f, 3/60.0f, 5/60.0f, 3/60.0f, 1/60.0f,
+                        1/60.0f, 1/60.0f, 2/60.0f, 1/60.0f, 1/60.0f};
        
        float color[4], *fp= soft;
        int dx, dy;
-       
-       glGetFloatv(GL_CURRENT_COLOR, color);
+
+       color[0]= shadow_col[0];
+       color[1]= shadow_col[1];
+       color[2]= shadow_col[2];
        
        for(dx=-2; dx<3; dx++) {
                for(dy=-2; dy<3; dy++, fp++) {
-                       glColor4f(color[0], color[1], color[2], fp[0]*color[3]);
+                       color[3]= *(fp) * shadow_col[3];
+                       glColor4fv(color);
                        blf_texture_draw(uv, x1+dx, y1+dy, x2+dx, y2+dy);
                }
        }
@@ -350,17 +341,23 @@ static void blf_texture5_draw(float uv[2][2], float x1, float y1, float x2, floa
        glColor4fv(color);
 }
 
-static void blf_texture3_draw(float uv[2][2], float x1, float y1, float x2, float y2)
+static void blf_texture3_draw(const float shadow_col[4], float uv[2][2], float x1, float y1, float x2, float y2)
 {
-       float soft[9]= {1/16.0f, 2/16.0f, 1/16.0f, 2/16.0f, 4/16.0f, 2/16.0f, 1/16.0f, 2/16.0f, 1/16.0f};
+       float soft[9]= {1/16.0f, 2/16.0f, 1/16.0f,
+                       2/16.0f,4/16.0f, 2/16.0f,
+                       1/16.0f, 2/16.0f, 1/16.0f};
+
        float color[4], *fp= soft;
        int dx, dy;
-       
-       glGetFloatv(GL_CURRENT_COLOR, color);
-       
+
+       color[0]= shadow_col[0];
+       color[1]= shadow_col[1];
+       color[2]= shadow_col[2];
+
        for(dx=-1; dx<2; dx++) {
                for(dy=-1; dy<2; dy++, fp++) {
-                       glColor4f(color[0], color[1], color[2], fp[0]*color[3]);
+                       color[3]= *(fp) * shadow_col[3];
+                       glColor4fv(color);
                        blf_texture_draw(uv, x1+dx, y1+dy, x2+dx, y2+dy);
                }
        }
@@ -370,18 +367,15 @@ static void blf_texture3_draw(float uv[2][2], float x1, float y1, float x2, floa
 
 int blf_glyph_render(FontBLF *font, GlyphBLF *g, float x, float y)
 {
-       GlyphCacheBLF *gc;
-       GLint cur_tex;
        float dx, dx1;
        float y1, y2;
        float xo, yo;
-       float color[4];
 
        if ((!g->width) || (!g->height))
-               return(1);
+               return 1;
 
        if (g->build_tex == 0) {
-               gc= font->glyph_cache;
+               GlyphCacheBLF *gc= font->glyph_cache;
 
                if (font->max_tex_size == -1)
                        glGetIntegerv(GL_MAX_TEXTURE_SIZE, (GLint *)&font->max_tex_size);
@@ -444,31 +438,36 @@ int blf_glyph_render(FontBLF *font, GlyphBLF *g, float x, float y)
 
        if (font->flags & BLF_CLIPPING) {
                if (!BLI_in_rctf(&font->clip_rec, dx + font->pos[0], y1 + font->pos[1]))
-                       return(0);
+                       return 0;
                if (!BLI_in_rctf(&font->clip_rec, dx + font->pos[0], y2 + font->pos[1]))
-                       return(0);
+                       return 0;
                if (!BLI_in_rctf(&font->clip_rec, dx1 + font->pos[0], y2 + font->pos[1]))
-                       return(0);
+                       return 0;
                if (!BLI_in_rctf(&font->clip_rec, dx1 + font->pos[0], y1 + font->pos[1]))
-                       return(0);
+                       return 0;
        }
 
-       glGetIntegerv(GL_TEXTURE_2D_BINDING_EXT, &cur_tex);
-       if (cur_tex != g->tex)
-               glBindTexture(GL_TEXTURE_2D, g->tex);
+       if (font->tex_bind_state != g->tex) {
+               glBindTexture(GL_TEXTURE_2D, (font->tex_bind_state= g->tex));
+       }
 
        if (font->flags & BLF_SHADOW) {
-               glGetFloatv(GL_CURRENT_COLOR, color);
-               glColor4fv(font->shadow_col);
-
-               if (font->shadow == 3)
-                       blf_texture3_draw(g->uv, dx, y1, dx1, y2);
-               else if (font->shadow == 5)
-                       blf_texture5_draw(g->uv, dx, y1, dx1, y2);
-               else
-                       blf_texture_draw(g->uv, dx, y1, dx1, y2);
 
-               glColor4fv(color);
+               switch(font->shadow) {
+                       case 3:
+                               blf_texture3_draw(font->shadow_col, g->uv, dx, y1, dx1, y2);
+                               break;
+                       case 5:
+                               blf_texture5_draw(font->shadow_col, g->uv, dx, y1, dx1, y2);
+                               break;
+                       default:
+                               glColor4fv(font->shadow_col);
+                               blf_texture_draw(g->uv, dx, y1, dx1, y2);
+                               break;
+               }
+
+               glColor4fv(font->orig_col);
+
                x= xo;
                y= yo;
 
@@ -478,12 +477,17 @@ int blf_glyph_render(FontBLF *font, GlyphBLF *g, float x, float y)
                y2= y + g->pos_y - g->height;
        }
 
-       if (font->blur==3)
-               blf_texture3_draw(g->uv, dx, y1, dx1, y2);
-       else if (font->blur==5)
-               blf_texture5_draw(g->uv, dx, y1, dx1, y2);
-       else
-               blf_texture_draw(g->uv, dx, y1, dx1, y2);
+       switch(font->blur) {
+               case 3:
+                       blf_texture3_draw(font->orig_col, g->uv, dx, y1, dx1, y2);
+                       break;
+               case 5:
+                       blf_texture5_draw(font->orig_col, g->uv, dx, y1, dx1, y2);
+                       break;
+               default:
+                       blf_texture_draw(g->uv, dx, y1, dx1, y2);
+                       break;
+       }
 
-       return(1);
+       return 1;
 }
index 9840e6446ef1c53be327d7adaf62dafefabf22ef..1450ad39ad815534ea02778bf3e9252610ed206b 100644 (file)
@@ -161,7 +161,10 @@ typedef struct FontBLF {
 
        /* shadow color. */
        float shadow_col[4];
-       
+
+       /* store color here when drawing shadow or blur. */
+       float orig_col[4];
+
        /* Multiplied this matrix with the current one before
         * draw the text! see blf_draw__start.
         */
@@ -179,6 +182,9 @@ typedef struct FontBLF {
        /* max texture size. */
        int max_tex_size;
 
+       /* current opengl texture  bind, avoids calling glGet */
+       int tex_bind_state;
+
        /* font options. */
        int flags;
 
index e7f9d1746adb36e3479df06d3984628d866dcfe0..8095189904004a91c6b73ef18fc705923aef980a 100644 (file)
 #include "BLI_string.h"
 #include "BLI_path_util.h"
 
-
-#ifdef __APPLE__
-
-#endif
-
 #define DOMAIN_NAME "blender"
 #define SYSTEM_ENCODING_DEFAULT "UTF-8"
 #define FONT_SIZE_DEFAULT 12
index edd23ac1ba6848b326f01a8ae3dfe411e8f345a7..cfe77887674a4ba00700681ed91f57e8fd588e32 100644 (file)
@@ -46,7 +46,7 @@ unsigned int blf_next_p2(unsigned int x)
        x |= (x >> 2);
        x |= (x >> 1);
        x += 1;
-       return(x);
+       return x;
 }
 
 unsigned int blf_hash(unsigned int val)
@@ -60,7 +60,7 @@ unsigned int blf_hash(unsigned int val)
        key ^= (key >> 13);
        key += ~(key << 9);
        key ^= (key >> 17);
-       return(key % 257);
+       return key % 257;
 }
 
 /*
@@ -85,7 +85,7 @@ int blf_utf8_next(unsigned char *buf, unsigned int *iindex)
 
        d= buf[index++];
        if (!d)
-               return(0);
+               return 0;
 
        while (buf[index] && ((buf[index] & 0xc0) == 0x80))
                index++;
@@ -124,5 +124,5 @@ int blf_utf8_next(unsigned char *buf, unsigned int *iindex)
                r |= (d4 & 0x3f);
        }
        *iindex= index;
-       return(r);
+       return r;
 }
diff --git a/source/blender/blenkernel/BKE_endian.h b/source/blender/blenkernel/BKE_endian.h
deleted file mode 100644 (file)
index 5647645..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * $Id$
- *
- * ***** BEGIN GPL LICENSE BLOCK *****
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
- * All rights reserved.
- *
- * The Original Code is: all of this file.
- *
- * Contributor(s): none yet.
- *
- * ***** END GPL LICENSE BLOCK *****
- * Are we little or big endian?  From Harbison&Steele.
- */
-#ifndef BKE_ENDIAN_H
-#define BKE_ENDIAN_H
-
-/** \file BKE_endian.h
- *  \ingroup bke
- */
-
-/**
- * BKE_ENDIANNESS(a) returns 1 if big endian and returns 0 if little endian
- */
-#define BKE_ENDIANNESS(a) {  \
-       union {  \
-               intptr_t l;  \
-               char c[sizeof (intptr_t)];  \
-       } u;  \
-       u.l = 1;  \
-       a = (u.c[sizeof (intptr_t) - 1] == 1) ? 1 : 0;  \
-}
-
-#endif
-
index 0e48673f1b1c688399fc870858c1d95acedbe7aa..a59d43d315d636857ad0433e6bdfaa93d8b3fe4e 100644 (file)
@@ -151,9 +151,18 @@ typedef struct Global {
 
 /* ENDIAN_ORDER: indicates what endianness the platform where the file was
  * written had. */
+#if !defined( __BIG_ENDIAN__ ) && !defined( __LITTLE_ENDIAN__ )
+#  error Either __BIG_ENDIAN__ or __LITTLE_ENDIAN__ must be defined.
+#endif
+
 #define L_ENDIAN       1
 #define B_ENDIAN       0
-extern short ENDIAN_ORDER;
+
+#ifdef __BIG_ENDIAN__
+#  define ENDIAN_ORDER B_ENDIAN
+#else
+#  define ENDIAN_ORDER L_ENDIAN
+#endif
 
 /* G.moving, signals drawing in (3d) window to denote transform */
 #define G_TRANSFORM_OBJ                        1
index 14e622c972ebf0df3996080155472be84bc1ce05..87684e4895dd6c932e3bc7733e62f0b451719430 100644 (file)
 
 /* this weirdo pops up in two places ... */
 #if !defined(WIN32)
-#ifndef O_BINARY
-#define O_BINARY 0
-#endif
+#  ifndef O_BINARY
+#    define O_BINARY 0
+#  endif
 #endif
 
 /* INTEGER CODES */
-#if defined(__sgi) || defined (__sparc) || defined (__sparc__) || defined (__PPC__) || defined (__ppc__) || defined (__hppa__) || defined (__BIG_ENDIAN__)
-       /* Big Endian */
-#define MAKE_ID(a,b,c,d) ( (int)(a)<<24 | (int)(b)<<16 | (c)<<8 | (d) )
+#ifdef __BIG_ENDIAN__
+   /* Big Endian */
+#  define MAKE_ID(a,b,c,d) ( (int)(a)<<24 | (int)(b)<<16 | (c)<<8 | (d) )
 #else
-       /* Little Endian */
-#define MAKE_ID(a,b,c,d) ( (int)(d)<<24 | (int)(c)<<16 | (b)<<8 | (a) )
+   /* Little Endian */
+#  define MAKE_ID(a,b,c,d) ( (int)(d)<<24 | (int)(c)<<16 | (b)<<8 | (a) )
 #endif
 
 #define ID_NEW(a)              if( (a) && (a)->id.newid ) (a)= (void *)(a)->id.newid
 #define ENDB MAKE_ID('E','N','D','B')
 
 /* Bit operations */
-#define BTST(a,b)      ( ( (a) & 1<<(b) )!=0 )   
-#define BNTST(a,b)     ( ( (a) & 1<<(b) )==0 )
-#define BTST2(a,b,c)   ( BTST( (a), (b) ) || BTST( (a), (c) ) )
-#define BSET(a,b)      ( (a) | 1<<(b) )
-#define BCLR(a,b)      ( (a) & ~(1<<(b)) )
+#define BTST(a,b)       ( ( (a) & 1<<(b) )!=0 )
+#define BNTST(a,b)      ( ( (a) & 1<<(b) )==0 )
+#define BTST2(a,b,c) ( BTST( (a), (b) ) || BTST( (a), (c) ) )
+#define BSET(a,b)       ( (a) | 1<<(b) )
+#define BCLR(a,b)       ( (a) & ~(1<<(b)) )
 /* bit-row */
 #define BROW(min, max) (((max)>=31? 0xFFFFFFFF: (1<<(max+1))-1) - ((min)? ((1<<(min))-1):0) )
 
index 9cf0a92742fc376caf6fffa9fe665213aefde476..09b38195ef37c532a8066a2a6c329c89fd7d428b 100644 (file)
@@ -179,7 +179,6 @@ set(SRC
        BKE_depsgraph.h
        BKE_displist.h
        BKE_effect.h
-       BKE_endian.h
        BKE_fcurve.h
        BKE_fluidsim.h
        BKE_font.h
index 2d4354bdd9fc9141b56fcc770868a84d2f899a61..2b6261b1c81a2d9e9f626c54007f729a6a196a6c 100644 (file)
@@ -98,7 +98,6 @@
 Global G;
 UserDef U;
 /* ListBase = {NULL, NULL}; */
-short ENDIAN_ORDER;
 
 char versionstr[48]= "";
 
@@ -132,9 +131,6 @@ void initglobals(void)
 
        strcpy(G.ima, "//");
 
-       ENDIAN_ORDER= 1;
-       ENDIAN_ORDER= (((char*)&ENDIAN_ORDER)[0])? L_ENDIAN: B_ENDIAN;
-
        if(BLENDER_SUBVERSION)
                BLI_snprintf(versionstr, sizeof(versionstr), "blender.org %d.%d", BLENDER_VERSION, BLENDER_SUBVERSION);
        else
index 91091d3880f5774ec6232dd7746e01e52dc53dcf..a59092784dde52dc7495f58ffe1bbd6b3618b632 100644 (file)
@@ -2167,7 +2167,7 @@ static void actcon_get_tarmat (bConstraint *con, bConstraintOb *cob, bConstraint
                if (data->type < 10) {
                        /* extract rotation (is in whatever space target should be in) */
                        mat4_to_eul(vec, tempmat);
-                       mul_v3_fl(vec, (float)(180.0/M_PI)); /* rad -> deg */
+                       mul_v3_fl(vec, RAD2DEGF(1.0f)); /* rad -> deg */
                        axis= data->type;
                }
                else if (data->type < 20) {
@@ -3325,7 +3325,7 @@ static void transform_evaluate (bConstraint *con, bConstraintOb *cob, ListBase *
                                break;
                        case 1: /* rotation (convert to degrees first) */
                                mat4_to_eulO(dvec, cob->rotOrder, ct->matrix);
-                               mul_v3_fl(dvec, (float)(180.0/M_PI)); /* rad -> deg */
+                               mul_v3_fl(dvec, RAD2DEGF(1.0f)); /* rad -> deg */
                                break;
                        default: /* location */
                                copy_v3_v3(dvec, ct->matrix[3]);
index bd70e365f512dc5a35df5a9486a1eb70b0bc9dd0..794006e6f39fabb491e62e7ecf06700347adbeba 100644 (file)
@@ -1924,7 +1924,7 @@ static void make_bevel_list_3D_minimum_twist(BevList *bl)
                /* flip rotation if needs be */
                cross_v3_v3v3(cross_tmp, vec_1, vec_2);
                normalize_v3(cross_tmp);
-               if(angle_normalized_v3v3(bevp_first->dir, cross_tmp) < 90.0f/(float)(180.0/M_PI))
+               if(angle_normalized_v3v3(bevp_first->dir, cross_tmp) < DEG2RADF(90.0f))
                        angle = -angle;
 
                bevp2= (BevPoint *)(bl+1);
index 468f39bf731b214ec613ec089cb3e48a98c3e015..7fb9f96e0cf592aa21fcc7caaed7df125449e65a 100644 (file)
@@ -571,7 +571,7 @@ float effector_falloff(EffectorCache *eff, EffectorData *efd, EffectedPoint *UNU
                        if(falloff == 0.0f)
                                break;
 
-                       r_fac=saacos(fac/len_v3(efd->vec_to_point))*180.0f/(float)M_PI;
+                       r_fac= RAD2DEGF(saacos(fac/len_v3(efd->vec_to_point)));
                        falloff*= falloff_func_rad(eff->pd, r_fac);
 
                        break;
index 6043263149201e3d7c591d8a61f73a19b467ffa2..82a2436a01043869c0e48e5ebd1237fad5c67110 100644 (file)
@@ -2542,7 +2542,7 @@ static void psys_thread_create_path(ParticleThread *thread, struct ChildParticle
                                                normalize_v3(v1);
                                                normalize_v3(v2);
 
-                                               d = saacos(dot_v3v3(v1, v2)) * 180.0f/(float)M_PI;
+                                               d = RAD2DEGF(saacos(dot_v3v3(v1, v2)));
                                        }
 
                                        if(p_max > p_min)
index 50b3e32278aff7cc60f594cbe36f7d678e31a700..ef1b75e59138a8fcf254abf20caa1419c8f8fcee 100644 (file)
@@ -277,8 +277,7 @@ void BKE_area_region_free(SpaceType *st, ARegion *ar)
                ar->v2d.tab_offset= NULL;
        }
 
-       if(ar)
-               BLI_freelistN(&ar->panels);
+       BLI_freelistN(&ar->panels);
 }
 
 /* not area itself */
index 43747fde72913d7260664753e4067c5193372339..e5d74177c9156df1c2d5ca02627853438b7fe03a 100644 (file)
@@ -2132,7 +2132,7 @@ static void do_transform(Scene *scene, Sequence *seq, float UNUSED(facf0), int x
        }
        
        // Rotate
-       rotate_radians = ((float)M_PI*transform->rotIni)/180.0f;
+       rotate_radians = DEG2RADF(transform->rotIni);
 
        transform_image(x,y, ibuf1, out, scale_x, scale_y, translate_x, translate_y, rotate_radians, transform->interpolation);
 }
index ff518d69e211ebcbdc2d4aa4062831c274fd28c5..d17b769888b6709c094460ce6d9104d89d3acdcd 100644 (file)
@@ -1,11 +1,35 @@
+/*
+ * $Id:
+ *
+ * ***** BEGIN GPL LICENSE BLOCK *****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): none yet.
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
 /** \file blender/blenkernel/intern/sound.c
  *  \ingroup bke
  */
-/**
- * sound.c (mar-2001 nzc)
- *
- * $Id$
- */
 
 #include <string.h>
 #include <stdlib.h>
index ef20408a37e7686d91b6b210464e78c2e57866f8..d7ca03243df60cc6d00d784eeb37afcd117663e8 100644 (file)
@@ -102,6 +102,8 @@ void quat_to_axis_angle(float axis[3], float *angle, const float q[4]);
 void mat3_to_axis_angle(float axis[3], float *angle, float M[3][3]);
 void mat4_to_axis_angle(float axis[3], float *angle, float M[4][4]);
 
+void single_axis_angle_to_mat3(float R[3][3], const char axis, const float angle);
+
 /****************************** Vector/Rotation ******************************/
 /* old axis angle code                                                       */
 /* TODO: the following calls should probably be depreceated sometime         */
index 9a3b81e577666286bea03a5c4c57d692ff14fa42..456ee72c4e0994ecdccc0f183d24087a2269daa3 100644 (file)
  */
 
 #ifndef FALSE
-#define FALSE 0
+#  define FALSE 0
 #endif
 
 #ifndef TRUE
-#define TRUE 1
+#  define TRUE 1
 #endif
 
 
@@ -94,7 +94,7 @@
 /* some math and copy defines */
 
 #ifndef SWAP
-#define SWAP(type, a, b)        { type sw_ap; sw_ap=(a); (a)=(b); (b)=sw_ap; }
+#  define SWAP(type, a, b)        { type sw_ap; sw_ap=(a); (a)=(b); (b)=sw_ap; }
 #endif
 
 #define ABS(a)                                 ( (a)<0 ? (-(a)) : (a) )
index 41f8bfab7295869543440e6261fb35aa265f5a90..8dd95a897ae691453def2bdbcd8050680180cec2 100644 (file)
@@ -36,9 +36,9 @@
 #define V_I(x, y, z, res) ( (z)*(res)[1]*(res)[0] + (y)*(res)[0] + (x) )
 
 /* all input coordinates must be in bounding box 0.0 - 1.0 */
-float voxel_sample_nearest(float *data, int *res, float *co);
-float voxel_sample_trilinear(float *data, int *res, float *co);
-float voxel_sample_triquadratic(float *data, int *res, float *co);
-float voxel_sample_tricubic(float *data, int *res, float *co, int bspline);
+float voxel_sample_nearest(float *data, const int res[3], const float co[3]);
+float voxel_sample_trilinear(float *data, const int res[3], const float co[3]);
+float voxel_sample_triquadratic(float *data, const int res[3], const float co[3]);
+float voxel_sample_tricubic(float *data, const int res[3], const float co[3], int bspline);
 
 #endif /* BLI_VOXEL_H */
index 6800b59c2c78188310bedb303e59c3e36ad4f370..ef286e1d10238dc2b478b160bc3e26247a64e418 100644 (file)
@@ -771,6 +771,52 @@ void mat4_to_axis_angle(float axis[3], float *angle,float mat[4][4])
        quat_to_axis_angle(axis, angle,q);
 }
 
+
+
+void single_axis_angle_to_mat3(float mat[3][3], const char axis, const float angle)
+{
+       const float angle_cos= cosf(angle);
+       const float angle_sin= sinf(angle);
+
+       switch(axis) {
+       case 'X': /* rotation around X */
+               mat[0][0] =  1.0f;
+               mat[0][1] =  0.0f;
+               mat[0][2] =  0.0f;
+               mat[1][0] =  0.0f;
+               mat[1][1] =  angle_cos;
+               mat[1][2] =  angle_sin;
+               mat[2][0] =  0.0f;
+               mat[2][1] = -angle_sin;
+               mat[2][2] =  angle_cos;
+               break;
+       case 'Y': /* rotation around Y */
+               mat[0][0] =  angle_cos;
+               mat[0][1] =  0.0f;
+               mat[0][2] = -angle_sin;
+               mat[1][0] =  0.0f;
+               mat[1][1] =  1.0f;
+               mat[1][2] =  0.0f;
+               mat[2][0] =  angle_sin;
+               mat[2][1] =  0.0f;
+               mat[2][2] =  angle_cos;
+               break;
+       case 'Z': /* rotation around Z */
+               mat[0][0] =  angle_cos;
+               mat[0][1] =  angle_sin;
+               mat[0][2] =  0.0f;
+               mat[1][0] = -angle_sin;
+               mat[1][1] =  angle_cos;
+               mat[1][2] =  0.0f;
+               mat[2][0] =  0.0f;
+               mat[2][1] =  0.0f;
+               mat[2][2] =  1.0f;
+               break;
+       default:
+               assert("invalid axis");
+       }
+}
+
 /****************************** Vector/Rotation ******************************/
 /* TODO: the following calls should probably be depreceated sometime         */
 
index d11386ff6069296fa732c1c8c524b8d81c6a43c8..6d912be71d3e82cab30f63ccd1e303f43f243bb7 100644 (file)
@@ -36,7 +36,7 @@
 
 
 
-BM_INLINE float D(float *data,  int *res, int x, int y, int z)
+BM_INLINE float D(float *data, const int res[3], int x, int y, int z)
 {
        CLAMP(x, 0, res[0]-1);
        CLAMP(y, 0, res[1]-1);
@@ -46,7 +46,7 @@ BM_INLINE float D(float *data,  int *res, int x, int y, int z)
 
 /* *** nearest neighbour *** */
 /* input coordinates must be in bounding box 0.0 - 1.0 */
-float voxel_sample_nearest(float *data, int *res, float *co)
+float voxel_sample_nearest(float *data, const int res[3], const float co[3])
 {
        int xi, yi, zi;
        
@@ -71,7 +71,7 @@ BM_INLINE int _clamp(int a, int b, int c)
        return (a < b) ? b : ((a > c) ? c : a);
 }
 
-float voxel_sample_trilinear(float *data, int *res, float *co)
+float voxel_sample_trilinear(float *data, const int res[3], const float co[3])
 {
        if (data) {
        
@@ -103,7 +103,7 @@ float voxel_sample_trilinear(float *data, int *res, float *co)
 }
        
 
-float voxel_sample_triquadratic(float *data, int *res, float *co)
+float voxel_sample_triquadratic(float *data, const int res[3], const float co[3])
 {
        if (data) {
 
@@ -133,7 +133,7 @@ float voxel_sample_triquadratic(float *data, int *res, float *co)
        return 0.f;
 }
 
-float voxel_sample_tricubic(float *data, int *res, float *co, int bspline)
+float voxel_sample_tricubic(float *data, const int res[3], const float co[3], int bspline)
 {
        if (data) {
 
index ff01a064fe85aa100c3f0013fdc92ecfca0b63ec..abe4e7a3edba732cd7a032b477902104c3995d86 100644 (file)
@@ -4090,8 +4090,10 @@ static void direct_link_modifiers(FileData *fd, ListBase *lb)
                        FluidsimModifierData *fluidmd = (FluidsimModifierData*) md;
                        
                        fluidmd->fss= newdataadr(fd, fluidmd->fss);
-                       fluidmd->fss->fmd= fluidmd;
-                       fluidmd->fss->meshVelocities = NULL;
+                       if(fluidmd->fss) {
+                               fluidmd->fss->fmd= fluidmd;
+                               fluidmd->fss->meshVelocities = NULL;
+                       }
                }
                else if (md->type==eModifierType_Smoke) {
                        SmokeModifierData *smd = (SmokeModifierData*) md;
index 2ea10111bb94b17951a82e21ea8695d22c25a804..ae568e69936ffce8366f18c36ba81f9fe8ded937 100644 (file)
@@ -577,7 +577,7 @@ void AnimationExporter::get_source_values(BezTriple *bezt, COLLADASW::InputSeman
                case COLLADASW::InputSemantic::OUTPUT:
                        *length = 1;
                        if (rotation) {
-                               values[0] = (bezt->vec[1][1]) * 180.0f/M_PI;
+                               values[0] = RAD2DEGF(bezt->vec[1][1]);
                        }
                        else {
                                values[0] = bezt->vec[1][1];
@@ -593,7 +593,7 @@ void AnimationExporter::get_source_values(BezTriple *bezt, COLLADASW::InputSeman
                                values[1] = 0;  
                        }
                        else if (rotation) {
-                               values[1] = (bezt->vec[0][1]) * 180.0f/M_PI;
+                               values[1] = RAD2DEGF(bezt->vec[0][1]);
                        } else {
                                values[1] = bezt->vec[0][1];
                        }
@@ -608,7 +608,7 @@ void AnimationExporter::get_source_values(BezTriple *bezt, COLLADASW::InputSeman
                                values[1] = 0;  
                        }
                        else if (rotation) {
-                               values[1] = (bezt->vec[2][1]) * 180.0f/M_PI;
+                               values[1] = RAD2DEGF(bezt->vec[2][1]);
                        } else {
                                values[1] = bezt->vec[2][1];
                        }
@@ -688,7 +688,7 @@ std::string AnimationExporter::create_source_from_array(COLLADASW::InputSemantic
                //      val = convert_time(val);
                //else
                if (is_rot)
-                       val *= 180.0f / M_PI;
+                       val = RAD2DEGF(val);
                source.appendValues(val);
        }
 
index 43428f57d4f92ffd61393e2f6a3b94dae8a63772..a176b6eb4cd4da8f124c670b2becfdf131153132 100644 (file)
@@ -170,9 +170,9 @@ void AnimationImporter::fcurve_deg_to_rad(FCurve *cu)
 {
        for (unsigned int i = 0; i < cu->totvert; i++) {
                // TODO convert handles too
-               cu->bezt[i].vec[1][1] *= M_PI / 180.0f;
-               cu->bezt[i].vec[0][1] *= M_PI / 180.0f;
-               cu->bezt[i].vec[2][1] *= M_PI / 180.0f;
+               cu->bezt[i].vec[1][1] *= DEG2RADF(1.0f);
+               cu->bezt[i].vec[0][1] *= DEG2RADF(1.0f);
+               cu->bezt[i].vec[2][1] *= DEG2RADF(1.0f);
        }
 }
 
@@ -741,7 +741,7 @@ void AnimationImporter::apply_matrix_curves( Object * ob, std::vector<FCurve*>&
                mat4_to_quat(rot, mat);
                /*for ( int i = 0 ; i < 4  ;  i ++ )
                {
-               rot[i] = rot[i] * (180 / M_PI); 
+               rot[i] = RAD2DEGF(rot[i]);
                }*/
                copy_v3_v3(loc, mat[3]);
                mat4_to_size(scale, mat);
index 542409072f15fa9e39409c2f804c42f90b28b335..006d4c0ed23f4a39656a28939679ee86fdca1c92 100644 (file)
@@ -73,7 +73,7 @@ void CamerasExporter::operator()(Object *ob, Scene *sce)
        
        if (cam->type == CAM_PERSP) {
                COLLADASW::PerspectiveOptic persp(mSW);
-               persp.setXFov(lens_to_angle(cam->lens)*(180.0f/M_PI),"xfov");
+               persp.setXFov(RAD2DEGF(lens_to_angle(cam->lens)), "xfov");
                persp.setAspectRatio((float)(sce->r.xsch)/(float)(sce->r.ysch),false,"aspect_ratio");
                persp.setZFar(cam->clipend, false , "zfar");
                persp.setZNear(cam->clipsta,false , "znear");
index 366837421e3173872b691808fdff7cd7d9d082d1..2387c9a1465c3b6b42bf27570c871e7d41b9d33a 100644 (file)
@@ -816,7 +816,7 @@ bool DocumentImporter::writeCamera( const COLLADAFW::Camera* camera )
                                                double aspect = camera->getAspectRatio().getValue();
                                                double xfov = aspect*yfov;
                                                // xfov is in degrees, cam->lens is in millimiters
-                                               cam->lens = angle_to_lens((float)xfov*(M_PI/180.0f));
+                                               cam->lens = angle_to_lens(DEG2RADF(xfov));;
                                        }
                                        break;
                        }
@@ -837,7 +837,7 @@ bool DocumentImporter::writeCamera( const COLLADAFW::Camera* camera )
                                        {
                                                double x = camera->getXFov().getValue();
                                                // x is in degrees, cam->lens is in millimiters
-                                               cam->lens = angle_to_lens((float)x*(M_PI/180.0f));
+                                               cam->lens = angle_to_lens(DEG2RADF(x));
                                        }
                                        break;
                        }
@@ -854,7 +854,7 @@ bool DocumentImporter::writeCamera( const COLLADAFW::Camera* camera )
                                        {
                                        double yfov = camera->getYFov().getValue();
                                        // yfov is in degrees, cam->lens is in millimiters
-                                       cam->lens = angle_to_lens((float)yfov*(M_PI/180.0f));
+                                       cam->lens = angle_to_lens(DEG2RADF(yfov));
                                        }
                                        break;
                        }
index 625a0220830c9ff62f510fcf0334a47f022b8b7d..fa14a548850bcb7a40f760806599131b844b388d 100644 (file)
@@ -82,8 +82,8 @@ void TransformReader::dae_rotate_to_mat4(COLLADAFW::Transformation *tm, float m[
 {
        COLLADAFW::Rotate *ro = (COLLADAFW::Rotate*)tm;
        COLLADABU::Math::Vector3& axis = ro->getRotationAxis();
-       float angle = (float)(ro->getRotationAngle() * M_PI / 180.0f);
-       float ax[] = {axis[0], axis[1], axis[2]};
+       const float angle = (float)DEG2RAD(ro->getRotationAngle());
+       const float ax[] = {axis[0], axis[1], axis[2]};
        // float quat[4];
        // axis_angle_to_quat(quat, axis, angle);
        // quat_to_mat4(m, quat);
index 88ed112c3fe3a22926d425bf303a62b57e5c0f57..34d13a2184d2fa8c72d4c07002efa26d1d89aac2 100644 (file)
@@ -107,9 +107,9 @@ void TransformWriter::add_transform(COLLADASW::Node& node, float loc[3], float r
        /*node.addRotateZ("rotationZ", COLLADABU::Math::Utils::radToDegF(rot[2]));
        node.addRotateY("rotationY", COLLADABU::Math::Utils::radToDegF(rot[1]));
        node.addRotateX("rotationX", COLLADABU::Math::Utils::radToDegF(rot[0]));*/
-       node.addRotateZ("rotationZ", rot[2] * 180.0f/M_PI);
-       node.addRotateY("rotationY", (rot[1]* 180.0f/M_PI));
-       node.addRotateX("rotationX", (rot[0]* 180.0f/M_PI));
+       node.addRotateZ("rotationZ", RAD2DEGF(rot[2]));
+       node.addRotateY("rotationY", RAD2DEGF(rot[1]));
+       node.addRotateX("rotationX", RAD2DEGF(rot[0]));
 
        node.addScale("scale", scale[0], scale[1], scale[2]);
 }
index 276765bf96e515bf5b160c3ffe5458b5b18b5e76..373d351fb6c615849d2154d84407373c732d3172 100644 (file)
@@ -3069,21 +3069,21 @@ static void draw_setting_widget (bAnimContext *ac, bAnimListElem *ale, bAnimChan
                        icon= ICON_VISIBLE_IPO_OFF;
                        
                        if (ale->type == ANIMTYPE_FCURVE)
-                               tooltip= "Channel is visible in Graph Editor for editing.";
+                               tooltip= "Channel is visible in Graph Editor for editing";
                        else
-                               tooltip= "Channel(s) are visible in Graph Editor for editing.";
+                               tooltip= "Channel(s) are visible in Graph Editor for editing";
                        break;
                        
                case ACHANNEL_SETTING_EXPAND: /* expanded triangle */
                        //icon= ((enabled)? ICON_TRIA_DOWN : ICON_TRIA_RIGHT);
                        icon= ICON_TRIA_RIGHT;
-                       tooltip= "Make channels grouped under this channel visible.";
+                       tooltip= "Make channels grouped under this channel visible";
                        break;
                        
                case ACHANNEL_SETTING_SOLO: /* NLA Tracks only */
                        //icon= ((enabled)? ICON_LAYER_ACTIVE : ICON_LAYER_USED);
                        icon= ICON_LAYER_USED;
-                       tooltip= "NLA Track is the only one evaluated for the AnimData block it belongs to.";
+                       tooltip= "NLA Track is the only one evaluated for the AnimData block it belongs to";
                        break;
                
                /* --- */
@@ -3092,7 +3092,7 @@ static void draw_setting_widget (bAnimContext *ac, bAnimListElem *ale, bAnimChan
                        // TODO: what about when there's no protect needed?
                        //icon= ((enabled)? ICON_LOCKED : ICON_UNLOCKED);
                        icon= ICON_UNLOCKED;
-                       tooltip= "Editability of keyframes for this channel.";
+                       tooltip= "Editability of keyframes for this channel";
                        break;
                        
                case ACHANNEL_SETTING_MUTE: /* muted speaker */
@@ -3100,9 +3100,9 @@ static void draw_setting_widget (bAnimContext *ac, bAnimListElem *ale, bAnimChan
                        icon= ICON_MUTE_IPO_OFF;
                        
                        if (ale->type == ALE_FCURVE) 
-                               tooltip= "Does F-Curve contribute to result.";
+                               tooltip= "Does F-Curve contribute to result";
                        else
-                               tooltip= "Do channels contribute to result.";
+                               tooltip= "Do channels contribute to result";
                        break;
                        
                default:
index 709743869177cf3c05040084acc1d8b6fb1e553d..d2b1fcc4abdab68271291831a069a7e46ae2ea94 100644 (file)
@@ -404,9 +404,9 @@ float ANIM_unit_mapping_get_factor (Scene *scene, ID *id, FCurve *fcu, short res
                                /* if the radians flag is not set, default to using degrees which need conversions */
                                if ((scene) && (scene->unit.system_rotation == USER_UNIT_ROT_RADIANS) == 0) {
                                        if (restore)
-                                               return M_PI / 180.0;    /* degrees to radians */
+                                               return DEG2RADF(1.0f);  /* degrees to radians */
                                        else
-                                               return 180.0 / M_PI;    /* radians to degrees */
+                                               return RAD2DEGF(1.0f);  /* radians to degrees */
                                }
                        }
                        
index 6ebe488d2c8e45841afe1c33b77475420d0cb498..e8f3fc28d7455549f56fdb534ad488d8376415a4 100644 (file)
@@ -364,7 +364,7 @@ short ANIM_paste_driver (ReportList *reports, ID *id, const char rna_path[], int
        
        /* if the buffer is empty, cannot paste... */
        if (channeldriver_copypaste_buf == NULL) {
-               BKE_report(reports, RPT_ERROR, "Paste Driver: No Driver to paste.");
+               BKE_report(reports, RPT_ERROR, "Paste Driver: No Driver to paste");
                return 0;
        }
        
@@ -527,7 +527,7 @@ void ANIM_OT_driver_button_add (wmOperatorType *ot)
        ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
 
        /* properties */
-       RNA_def_boolean(ot->srna, "all", 1, "All", "Create drivers for all elements of the array.");
+       RNA_def_boolean(ot->srna, "all", 1, "All", "Create drivers for all elements of the array");
 }
 
 /* Remove Driver Button Operator ------------------------ */
@@ -579,7 +579,7 @@ void ANIM_OT_driver_button_remove (wmOperatorType *ot)
        ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
 
        /* properties */
-       RNA_def_boolean(ot->srna, "all", 1, "All", "Delete drivers for all elements of the array.");
+       RNA_def_boolean(ot->srna, "all", 1, "All", "Delete drivers for all elements of the array");
 }
 
 /* Copy Driver Button Operator ------------------------ */
index 928584966d9e48ae75188110c9dc4c2f8bbf85f2..77c67fc4af0aeac8790960692ad45af90d722182 100644 (file)
@@ -648,7 +648,7 @@ void ANIM_uiTemplate_fmodifier_draw (uiLayout *layout, ID *id, ListBase *modifie
                uiBlockSetEmboss(block, UI_EMBOSSN);
                
                /* delete button */
-               but= uiDefIconBut(block, BUT, B_REDR, ICON_X, 0, 0, UI_UNIT_X, UI_UNIT_Y, NULL, 0.0, 0.0, 0.0, 0.0, "Delete F-Curve Modifier.");
+               but= uiDefIconBut(block, BUT, B_REDR, ICON_X, 0, 0, UI_UNIT_X, UI_UNIT_Y, NULL, 0.0, 0.0, 0.0, 0.0, "Delete F-Curve Modifier");
                uiButSetFunc(but, delete_fmodifier_cb, modifiers, fcm);
                
                uiBlockSetEmboss(block, UI_EMBOSS);
index 3d3311b35eb0020b3e11a2f59a4d50f519e4bc5c..0f4546968ba8821f6b6df1a88f9ddfc176e0a369 100644 (file)
@@ -753,7 +753,7 @@ EnumPropertyItem keyframe_paste_merge_items[] = {
        {KEYFRAME_PASTE_MERGE_MIX, "MIX", 0, "Mix", "Overlay existing with new keys"},
        {KEYFRAME_PASTE_MERGE_OVER, "OVER_ALL", 0, "Overwrite All", "Replace all keys"},
        {KEYFRAME_PASTE_MERGE_OVER_RANGE, "OVER_RANGE", 0, "Overwrite Range", "Overwrite keys in pasted range"},
-       {KEYFRAME_PASTE_MERGE_OVER_RANGE_ALL, "OVER_RANGE_ALL", 0, "Overwrite Entire Range", "Overwrite keys in pasted range, using the range of all copied keys."},
+       {KEYFRAME_PASTE_MERGE_OVER_RANGE_ALL, "OVER_RANGE_ALL", 0, "Overwrite Entire Range", "Overwrite keys in pasted range, using the range of all copied keys"},
        {0, NULL, 0, NULL, NULL}};
 
 
index 1e7c18dc6ace23dc1bfa4937dfe39b928c97277b..58e1549c0ed6efb01afe29039e2f5b66593bc94a 100644 (file)
@@ -763,7 +763,7 @@ short insert_keyframe_direct (ReportList *reports, PointerRNA ptr, PropertyRNA *
        /* F-Curve not editable? */
        if (fcurve_is_keyframable(fcu) == 0) {
                BKE_reportf(reports, RPT_ERROR, 
-                       "F-Curve with path = '%s' [%d] cannot be keyframed. Ensure that it is not locked or sampled. Also, try removing F-Modifiers.",
+                       "F-Curve with path = '%s' [%d] cannot be keyframed. Ensure that it is not locked or sampled. Also, try removing F-Modifiers",
                        fcu->rna_path, fcu->array_index);
                return 0;
        }
@@ -1460,7 +1460,7 @@ static int insert_key_button_exec (bContext *C, wmOperator *op)
                else {
                        if (G.f & G_DEBUG)
                                printf("Button Insert-Key: no path to property \n");
-                       BKE_report(op->reports, RPT_WARNING, "Failed to resolve path to property. Try using a Keying Set instead.");
+                       BKE_report(op->reports, RPT_WARNING, "Failed to resolve path to property. Try using a Keying Set instead");
                }
        }
        else if (G.f & G_DEBUG) {
@@ -1498,7 +1498,7 @@ void ANIM_OT_keyframe_insert_button (wmOperatorType *ot)
        ot->flag= OPTYPE_UNDO;
 
        /* properties */
-       RNA_def_boolean(ot->srna, "all", 1, "All", "Insert a keyframe for all element of the array.");
+       RNA_def_boolean(ot->srna, "all", 1, "All", "Insert a keyframe for all element of the array");
 }
 
 /* Delete Key Button Operator ------------------------ */
@@ -1570,7 +1570,7 @@ void ANIM_OT_keyframe_delete_button (wmOperatorType *ot)
        ot->flag= OPTYPE_UNDO;
 
        /* properties */
-       RNA_def_boolean(ot->srna, "all", 1, "All", "Delete keyfames from all elements of the array.");
+       RNA_def_boolean(ot->srna, "all", 1, "All", "Delete keyfames from all elements of the array");
 }
 
 /* ******************************************* */
index dcd1c3abbde8047b90d0d62cbafc040884e814b9..7c2f969e1873028f309f07a50808d91c12a2f6f8 100644 (file)
@@ -382,7 +382,7 @@ void ANIM_OT_keyingset_button_add (wmOperatorType *ot)
        ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
 
        /* properties */
-       RNA_def_boolean(ot->srna, "all", 1, "All", "Add all elements of the array to a Keying Set.");
+       RNA_def_boolean(ot->srna, "all", 1, "All", "Add all elements of the array to a Keying Set");
 }
 
 /* Remove from KeyingSet Button Operator ------------------------ */
index a4b1e9a6e2cce14e046a17f8a901cc87685a4ada..53e0fd92eeb650615d446344d3305ff9894f802d 100644 (file)
@@ -361,7 +361,7 @@ static void fix_bonelist_roll (ListBase *bonelist, ListBase *editbonelist)
                        print_m4("premat", premat);
                        print_m4("postmat", postmat);
                        print_m4("difmat", difmat);
-                       printf ("Roll = %f\n",  (-atan2(difmat[2][0], difmat[2][2]) * (180.0/M_PI)));
+                       printf ("Roll = %f\n",  RAD2DEGF(-atan2(difmat[2][0], difmat[2][2])));
 #endif
                        curBone->roll = (float)-atan2(difmat[2][0], difmat[2][2]);
                        
@@ -653,7 +653,7 @@ static int apply_armature_pose2bones_exec (bContext *C, wmOperator *op)
        if (ob->type!=OB_ARMATURE)
                return OPERATOR_CANCELLED;
        if (object_data_is_libdata(ob)) {
-               BKE_report(op->reports, RPT_ERROR, "Cannot apply pose to lib-linked armature."); //error_libdata();
+               BKE_report(op->reports, RPT_ERROR, "Cannot apply pose to lib-linked armature"); //error_libdata();
                return OPERATOR_CANCELLED;
        }
        
@@ -782,7 +782,7 @@ void POSE_OT_visual_transform_apply (wmOperatorType *ot)
        /* identifiers */
        ot->name= "Apply Visual Transform to Pose";
        ot->idname= "POSE_OT_visual_transform_apply";
-       ot->description= "Apply final constrained position of pose bones to their transform.";
+       ot->description= "Apply final constrained position of pose bones to their transform";
        
        /* callbacks */
        ot->exec= pose_visual_transform_apply_exec;
@@ -1480,7 +1480,7 @@ void POSE_OT_select_linked(wmOperatorType *ot)
        ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
        
        /* props */     
-       RNA_def_boolean(ot->srna, "extend", FALSE, "Extend", "Extend selection instead of deselecting everything first.");
+       RNA_def_boolean(ot->srna, "extend", FALSE, "Extend", "Extend selection instead of deselecting everything first");
 }
 
 /* **************** END Posemode stuff ********************** */
@@ -1574,7 +1574,7 @@ void ARMATURE_OT_select_linked(wmOperatorType *ot)
        ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
        
        /* properties s*/
-       RNA_def_boolean(ot->srna, "extend", FALSE, "Extend", "Extend selection instead of deselecting everything first.");
+       RNA_def_boolean(ot->srna, "extend", FALSE, "Extend", "Extend selection instead of deselecting everything first");
 }
 
 /* does bones and points */
@@ -2115,8 +2115,8 @@ void ARMATURE_OT_calculate_roll(wmOperatorType *ot)
 
        /* properties */
        ot->prop= RNA_def_enum(ot->srna, "type", prop_calc_roll_types, 0, "Type", "");
-       RNA_def_boolean(ot->srna, "axis_flip", 0, "Flip Axis", "Negate the alignment axis.");
-       RNA_def_boolean(ot->srna, "axis_only", 0, "Shortest Rotation", "Ignore the axis direction, use the shortest rotation to align.");
+       RNA_def_boolean(ot->srna, "axis_flip", 0, "Flip Axis", "Negate the alignment axis");
+       RNA_def_boolean(ot->srna, "axis_only", 0, "Shortest Rotation", "Ignore the axis direction, use the shortest rotation to align");
 }
 
 /* **************** undo for armatures ************** */
@@ -3196,7 +3196,7 @@ void ARMATURE_OT_hide(wmOperatorType *ot)
        ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
 
        /* props */
-       RNA_def_boolean(ot->srna, "unselected", 0, "Unselected", "Hide unselected rather than selected.");
+       RNA_def_boolean(ot->srna, "unselected", 0, "Unselected", "Hide unselected rather than selected");
 }
 
 static int armature_reveal_exec(bContext *C, wmOperator *UNUSED(op))
@@ -5534,7 +5534,7 @@ void ARMATURE_OT_autoside_names (wmOperatorType *ot)
        ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
        
        /* settings */
-       ot->prop= RNA_def_enum(ot->srna, "type", axis_items, 0, "Axis", "Axis tag names with.");
+       ot->prop= RNA_def_enum(ot->srna, "type", axis_items, 0, "Axis", "Axis tag names with");
 }
 
 
index 48ca6d6fd72d8887f7d9cbaf902cf7ed98a50fac..806e288798feb91899e928b88fb2b843a22c73b2 100644 (file)
@@ -936,7 +936,7 @@ void rigid_deform_iteration()
                }
                else {
                        if(!sys->rigid.thrownerror) {
-                               error("RigidDeform: failed to find solution.");
+                               error("RigidDeform: failed to find solution");
                                sys->rigid.thrownerror= 1;
                        }
                        break;
@@ -1693,7 +1693,7 @@ static void meshdeform_matrix_solve(MeshDeformBind *mdb)
                        }
                }
                else {
-                       error("Mesh Deform: failed to find solution.");
+                       error("Mesh Deform: failed to find solution");
                        break;
                }
 
index 16888908bab0f17bc0a9bb1d6e8616371068ec5a..0497c0507dcdccf8a94ca2300ef7dc834a4ae9aa 100644 (file)
@@ -600,7 +600,7 @@ static int pose_slide_invoke_common (bContext *C, wmOperator *op, tPoseSlideOp *
                }
        }
        else {
-               BKE_report(op->reports, RPT_ERROR, "No keyframes to slide between.");
+               BKE_report(op->reports, RPT_ERROR, "No keyframes to slide between");
                pose_slide_exit(op);
                return OPERATOR_CANCELLED;
        }
@@ -718,8 +718,8 @@ static int pose_slide_exec_common (bContext *C, wmOperator *op, tPoseSlideOp *ps
 /* common code for defining RNA properties */
 static void pose_slide_opdef_properties (wmOperatorType *ot)
 {
-       RNA_def_int(ot->srna, "prev_frame", 0, MINAFRAME, MAXFRAME, "Previous Keyframe", "Frame number of keyframe immediately before the current frame.", 0, 50);
-       RNA_def_int(ot->srna, "next_frame", 0, MINAFRAME, MAXFRAME, "Next Keyframe", "Frame number of keyframe immediately after the current frame.", 0, 50);
+       RNA_def_int(ot->srna, "prev_frame", 0, MINAFRAME, MAXFRAME, "Previous Keyframe", "Frame number of keyframe immediately before the current frame", 0, 50);
+       RNA_def_int(ot->srna, "next_frame", 0, MINAFRAME, MAXFRAME, "Next Keyframe", "Frame number of keyframe immediately after the current frame", 0, 50);
        RNA_def_float_percentage(ot->srna, "percentage", 0.5f, 0.0f, 1.0f, "Percentage", "Weighting factor for the sliding operation", 0.3, 0.7);
 }
 
index 83285d3634abe874151685fcf25f7fb32669e92d..4405f395843428a0fe5d9635a1578f6f6311ea10 100644 (file)
@@ -673,7 +673,7 @@ void POSE_OT_select_grouped (wmOperatorType *ot)
        ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
        
        /* properties */
-       RNA_def_boolean(ot->srna, "extend", FALSE, "Extend", "Extend selection instead of deselecting everything first.");
+       RNA_def_boolean(ot->srna, "extend", FALSE, "Extend", "Extend selection instead of deselecting everything first");
        ot->prop= RNA_def_enum(ot->srna, "type", prop_select_grouped_types, 0, "Type", "");
 }
 
@@ -722,7 +722,7 @@ void POSE_OT_select_flip_active(wmOperatorType *ot)
        /* identifiers */
        ot->name= "Flip Selected Active Bone";
        ot->idname= "POSE_OT_select_flip_active";
-       ot->description= "Activate the bone with a flipped name.";
+       ot->description= "Activate the bone with a flipped name";
        
        /* api callbacks */
        ot->exec= pose_bone_flip_active_exec;
@@ -1844,7 +1844,7 @@ void POSE_OT_autoside_names (wmOperatorType *ot)
        ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
        
        /* settings */
-       ot->prop= RNA_def_enum(ot->srna, "axis", axis_items, 0, "Axis", "Axis tag names with.");
+       ot->prop= RNA_def_enum(ot->srna, "axis", axis_items, 0, "Axis", "Axis tag names with");
 }
 
 /* ********************************************** */
index b35085ff64dcd05d71eac01779d9decc9606c333..84df77bb120fa3e0a2f6225e00c6c48bf3b6a4ef 100644 (file)
@@ -1354,7 +1354,7 @@ static int separate_exec(bContext *C, wmOperator *op)
        oldedit= oldcu->editnurb;
 
        if(oldcu->key) {
-               BKE_report(op->reports, RPT_ERROR, "Can't separate a curve with vertex keys.");
+               BKE_report(op->reports, RPT_ERROR, "Can't separate a curve with vertex keys");
                return OPERATOR_CANCELLED;
        }
 
@@ -2693,7 +2693,7 @@ void CURVE_OT_hide(wmOperatorType *ot)
        ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
        
        /* props */
-       RNA_def_boolean(ot->srna, "unselected", 0, "Unselected", "Hide unselected rather than selected.");
+       RNA_def_boolean(ot->srna, "unselected", 0, "Unselected", "Hide unselected rather than selected");
 }
 
 /********************** reveal operator *********************/
@@ -3912,7 +3912,7 @@ static int merge_nurb(bContext *C, wmOperator *op)
        
        if(nsortbase.first == nsortbase.last) {
                BLI_freelistN(&nsortbase);
-               BKE_report(op->reports, RPT_ERROR, "Too few selections to merge.");
+               BKE_report(op->reports, RPT_ERROR, "Too few selections to merge");
                return OPERATOR_CANCELLED;
        }
        
@@ -4692,7 +4692,7 @@ void CURVE_OT_vertex_add(wmOperatorType *ot)
        ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
 
        /* properties */
-       RNA_def_float_vector_xyz(ot->srna, "location", 3, NULL, -FLT_MAX, FLT_MAX, "Location", "Location to add new vertex at.", -1e4, 1e4);
+       RNA_def_float_vector_xyz(ot->srna, "location", 3, NULL, -FLT_MAX, FLT_MAX, "Location", "Location to add new vertex at", -1e4, 1e4);
 }
 
 /***************** extrude operator **********************/
@@ -4882,7 +4882,7 @@ void CURVE_OT_cyclic_toggle(wmOperatorType *ot)
        ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
 
        /* properties */
-       RNA_def_enum(ot->srna, "direction", direction_items, 0, "Direction", "Direction to make surface cyclic in.");
+       RNA_def_enum(ot->srna, "direction", direction_items, 0, "Direction", "Direction to make surface cyclic in");
 }
 
 /***************** select linked operator ******************/
@@ -5017,7 +5017,7 @@ void CURVE_OT_select_linked_pick(wmOperatorType *ot)
        ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
 
        /* properties */
-       RNA_def_boolean(ot->srna, "deselect", 0, "Deselect", "Deselect linked control points rather than selecting them.");
+       RNA_def_boolean(ot->srna, "deselect", 0, "Deselect", "Deselect linked control points rather than selecting them");
 }
 
 /***************** select row operator **********************/
@@ -5460,8 +5460,8 @@ void CURVE_OT_select_random(wmOperatorType *ot)
        ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
 
        /* properties */
-       RNA_def_float_percentage(ot->srna, "percent", 50.f, 0.0f, 100.0f, "Percent", "Percentage of elements to select randomly.", 0.f, 100.0f);
-       RNA_def_boolean(ot->srna, "extend", FALSE, "Extend Selection", "Extend selection instead of deselecting everything first.");
+       RNA_def_float_percentage(ot->srna, "percent", 50.f, 0.0f, 100.0f, "Percent", "Percentage of elements to select randomly", 0.f, 100.0f);
+       RNA_def_boolean(ot->srna, "extend", FALSE, "Extend Selection", "Extend selection instead of deselecting everything first");
 }
 
 /********************* every nth number of point *******************/
@@ -5992,7 +5992,7 @@ void CURVE_OT_delete(wmOperatorType *ot)
        ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
 
        /* properties */
-       RNA_def_enum(ot->srna, "type", type_items, 0, "Type", "Which elements to delete.");
+       RNA_def_enum(ot->srna, "type", type_items, 0, "Type", "Which elements to delete");
 }
 
 /********************** shade smooth/flat operator *********************/
index 6c95df53d3988666dc7485bb4db9222c914b9a4c..fcac070f84ec7348bac2ab7530cfd02c30e0b4e8 100644 (file)
@@ -346,7 +346,7 @@ static int paste_file(bContext *C, ReportList *reports, const char *filename)
 
        if(!fp) {
                if(reports)
-                       BKE_reportf(reports, RPT_ERROR, "Failed to open file %s.", filename);
+                       BKE_reportf(reports, RPT_ERROR, "Failed to open file %s", filename);
                return OPERATOR_CANCELLED;
        }
 
@@ -662,8 +662,8 @@ void FONT_OT_style_set(wmOperatorType *ot)
        ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
 
        /* properties */
-       RNA_def_enum(ot->srna, "style", style_items, CU_CHINFO_BOLD, "Style", "Style to set selection to.");
-       RNA_def_boolean(ot->srna, "clear", 0, "Clear", "Clear style rather than setting it.");
+       RNA_def_enum(ot->srna, "style", style_items, CU_CHINFO_BOLD, "Style", "Style to set selection to");
+       RNA_def_boolean(ot->srna, "clear", 0, "Clear", "Clear style rather than setting it");
 }
 
 /******************* toggle style operator ********************/
@@ -700,7 +700,7 @@ void FONT_OT_style_toggle(wmOperatorType *ot)
        ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
 
        /* properties */
-       RNA_def_enum(ot->srna, "style", style_items, CU_CHINFO_BOLD, "Style", "Style to set selection to.");
+       RNA_def_enum(ot->srna, "style", style_items, CU_CHINFO_BOLD, "Style", "Style to set selection to");
 }
 
 /******************* copy text operator ********************/
@@ -799,7 +799,7 @@ static int paste_selection(Object *obedit, ReportList *reports)
                }
        }
        else
-               BKE_report(reports, RPT_WARNING, "Text too long.");
+               BKE_report(reports, RPT_WARNING, "Text too long");
        
        return 0;
 }
@@ -968,7 +968,7 @@ void FONT_OT_move(wmOperatorType *ot)
        ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
 
        /* properties */
-       RNA_def_enum(ot->srna, "type", move_type_items, LINE_BEGIN, "Type", "Where to move cursor to.");
+       RNA_def_enum(ot->srna, "type", move_type_items, LINE_BEGIN, "Type", "Where to move cursor to");
 }
 
 /******************* move select operator ********************/
@@ -995,7 +995,7 @@ void FONT_OT_move_select(wmOperatorType *ot)
        ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
 
        /* properties */
-       RNA_def_enum(ot->srna, "type", move_type_items, LINE_BEGIN, "Type", "Where to move cursor to, to make a selection.");
+       RNA_def_enum(ot->srna, "type", move_type_items, LINE_BEGIN, "Type", "Where to move cursor to, to make a selection");
 }
 
 /************************* change spacing **********************/
@@ -1037,7 +1037,7 @@ void FONT_OT_change_spacing(wmOperatorType *ot)
        ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
 
        /* properties */
-       RNA_def_int(ot->srna, "delta", 1, -20, 20, "Delta", "Amount to decrease or increasing character spacing with.", -20, 20);
+       RNA_def_int(ot->srna, "delta", 1, -20, 20, "Delta", "Amount to decrease or increasing character spacing with", -20, 20);
 }
 
 /************************* change character **********************/
@@ -1082,7 +1082,7 @@ void FONT_OT_change_character(wmOperatorType *ot)
        ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
 
        /* properties */
-       RNA_def_int(ot->srna, "delta", 1, -255, 255, "Delta", "Number to increase or decrease character code with.", -255, 255);
+       RNA_def_int(ot->srna, "delta", 1, -255, 255, "Delta", "Number to increase or decrease character code with", -255, 255);
 }
 
 /******************* line break operator ********************/
@@ -1215,7 +1215,7 @@ void FONT_OT_delete(wmOperatorType *ot)
        ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
 
        /* properties */
-       RNA_def_enum(ot->srna, "type", delete_type_items, DEL_ALL, "Type", "Which part of the text to delete.");
+       RNA_def_enum(ot->srna, "type", delete_type_items, DEL_ALL, "Type", "Which part of the text to delete");
 }
 
 /*********************** insert text operator *************************/
@@ -1365,8 +1365,8 @@ void FONT_OT_text_insert(wmOperatorType *ot)
        ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
 
        /* properties */
-       RNA_def_string(ot->srna, "text", "", 0, "Text", "Text to insert at the cursor position.");
-       RNA_def_boolean(ot->srna, "accent", 0, "Accent mode", "Next typed character will strike through previous, for special character input.");
+       RNA_def_string(ot->srna, "text", "", 0, "Text", "Text to insert at the cursor position");
+       RNA_def_boolean(ot->srna, "accent", 0, "Accent mode", "Next typed character will strike through previous, for special character input");
 }
 
 
@@ -1445,9 +1445,7 @@ void FONT_OT_textbox_remove(wmOperatorType *ot)
        /* flags */
        ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
        
-       RNA_def_int(ot->srna, "index", 0, 0, INT_MAX, "Index", "The current text box.", 0, INT_MAX);
-       
-       
+       RNA_def_int(ot->srna, "index", 0, 0, INT_MAX, "Index", "The current text box", 0, INT_MAX);
 }
 
 
@@ -1584,7 +1582,7 @@ void FONT_OT_case_set(wmOperatorType *ot)
        ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
 
        /* properties */
-       RNA_def_enum(ot->srna, "case", case_items, CASE_LOWER, "Case", "Lower or upper case.");
+       RNA_def_enum(ot->srna, "case", case_items, CASE_LOWER, "Case", "Lower or upper case");
 }
 
 /********************** toggle case operator *********************/
index 1cd8b1f05db701ae2507f1acdd684fb22cd08023..c915bc9ea37c3a54b81c5f9195de0c1e14092c06 100644 (file)
@@ -595,7 +595,7 @@ static int gp_convert_layer_exec (bContext *C, wmOperator *op)
 
        /* check if there's data to work with */
        if (gpd == NULL) {
-               BKE_report(op->reports, RPT_ERROR, "No Grease Pencil data to work on.");
+               BKE_report(op->reports, RPT_ERROR, "No Grease Pencil data to work on");
                return OPERATOR_CANCELLED;
        }
 
@@ -607,7 +607,7 @@ static int gp_convert_layer_exec (bContext *C, wmOperator *op)
                        break;
                        
                default: /* unsupoorted */
-                       BKE_report(op->reports, RPT_ERROR, "Unknown conversion option.");
+                       BKE_report(op->reports, RPT_ERROR, "Unknown conversion option");
                        return OPERATOR_CANCELLED;
        }
 
index da3310ae8838f66ce46c7c1381643b3e33743fe6..842ab92ae3174c39e61e9210fdf24ddbbbf6edf9 100644 (file)
@@ -1901,7 +1901,7 @@ void GPENCIL_OT_draw (wmOperatorType *ot)
        ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING;
        
        /* settings for drawing */
-       RNA_def_enum(ot->srna, "mode", prop_gpencil_drawmodes, 0, "Mode", "Way to intepret mouse movements.");
+       RNA_def_enum(ot->srna, "mode", prop_gpencil_drawmodes, 0, "Mode", "Way to intepret mouse movements");
        
        RNA_def_collection_runtime(ot->srna, "stroke", &RNA_OperatorStrokeElement, "Stroke", "");
 }
index 0dee7a3813a1f392615525efd4970c7094819db4..abc668d72dd81833b6975260afe7216034854658 100644 (file)
@@ -58,6 +58,7 @@
 
 #include "UI_interface.h"
 
+#include "IMB_imbuf.h"
 
 #include "WM_api.h"
 #include "WM_types.h"
@@ -1894,6 +1895,8 @@ static void ui_free_but(const bContext *C, uiBut *but)
        if(but->str && but->str != but->strdata) MEM_freeN(but->str);
        ui_free_link(but->link);
 
+       if((but->type == BUT_IMAGE) && but->poin) IMB_freeImBuf((struct ImBuf *)but->poin);
+
        MEM_freeN(but);
 }
 
index 33aeb2df926a62f0c4b06f6e16445f19dd52d0a1..a1275e237c1fa3223e4d780e54bdd4365eff799a 100644 (file)
@@ -461,19 +461,14 @@ void uiEmboss(float x1, float y1, float x2, float y2, int sel)
 
 /* ************** SPECIAL BUTTON DRAWING FUNCTIONS ************* */
 
-void ui_draw_but_IMAGE(ARegion *UNUSED(ar), uiBut *UNUSED(but), uiWidgetColors *UNUSED(wcol), rcti *rect)
+void ui_draw_but_IMAGE(ARegion *UNUSED(ar), uiBut *but, uiWidgetColors *UNUSED(wcol), rcti *rect)
 {
 #ifdef WITH_HEADLESS
        (void)rect;
 #else
-       extern char datatoc_splash_png[];
-       extern int datatoc_splash_png_size;
-       ImBuf *ibuf;
+       ImBuf *ibuf= (ImBuf *)but->poin;
        //GLint scissor[4];
        //int w, h;
-       
-       /* hardcoded to splash, loading and freeing every draw, eek! */
-       ibuf= IMB_ibImageFromMemory((unsigned char*)datatoc_splash_png, datatoc_splash_png_size, IB_rect);
 
        if (!ibuf) return;
        
@@ -501,7 +496,6 @@ void ui_draw_but_IMAGE(ARegion *UNUSED(ar), uiBut *UNUSED(but), uiWidgetColors *
        glScissor(scissor[0], scissor[1], scissor[2], scissor[3]);
        */
        
-       IMB_freeImBuf(ibuf);
 #endif
 }
 
@@ -959,13 +953,13 @@ static float polar_to_y(float center, float diam, float ampli, float angle)
        return center + diam * ampli * sinf(angle);
 }
 
-static void vectorscope_draw_target(float centerx, float centery, float diam, float r, float g, float b)
+static void vectorscope_draw_target(float centerx, float centery, float diam, const float colf[3])
 {
        float y,u,v;
        float tangle=0.f, tampli;
        float dangle, dampli, dangle2, dampli2;
 
-       rgb_to_yuv(r,g,b, &y, &u, &v);
+       rgb_to_yuv(colf[0], colf[1], colf[2], &y, &u, &v);
        if (u>0 && v>=0) tangle=atanf(v/u);
        else if (u>0 && v<0) tangle= atanf(v/u) + 2.0f * (float)M_PI;
        else if (u<0) tangle=atanf(v/u) + (float)M_PI;
@@ -975,7 +969,7 @@ static void vectorscope_draw_target(float centerx, float centery, float diam, fl
 
        /* small target vary by 2.5 degree and 2.5 IRE unit */
        glColor4f(1.0f, 1.0f, 1.0, 0.12f);
-       dangle= 2.5f*(float)M_PI/180.0f;
+       dangle= DEG2RADF(2.5f);
        dampli= 2.5f/200.0f;
        glBegin(GL_LINE_STRIP);
        glVertex2f(polar_to_x(centerx,diam,tampli+dampli,tangle+dangle), polar_to_y(centery,diam,tampli+dampli,tangle+dangle));
@@ -986,9 +980,9 @@ static void vectorscope_draw_target(float centerx, float centery, float diam, fl
        glEnd();
        /* big target vary by 10 degr