svn merge -r37276:38555 https://svn.blender.org/svnroot/bf-blender/trunk/blender .
authorNathan Letwory <nathan@letworyinteractive.com>
Thu, 21 Jul 2011 09:40:59 +0000 (09:40 +0000)
committerNathan Letwory <nathan@letworyinteractive.com>
Thu, 21 Jul 2011 09:40:59 +0000 (09:40 +0000)
586 files changed:
CMakeLists.txt
GNUmakefile
SConstruct
build_files/buildbot/master.cfg
build_files/buildbot/master_unpack.py
build_files/buildbot/slave_pack.py
build_files/cmake/FindPythonLibsUnix.cmake [deleted file]
build_files/cmake/Modules/FindFftw3.cmake [new file with mode: 0644]
build_files/cmake/Modules/FindJack.cmake [new file with mode: 0644]
build_files/cmake/Modules/FindJeMalloc.cmake [new file with mode: 0644]
build_files/cmake/Modules/FindOpenEXR.cmake [new file with mode: 0644]
build_files/cmake/Modules/FindOpenJPEG.cmake [new file with mode: 0644]
build_files/cmake/Modules/FindPythonLibsUnix.cmake [new file with mode: 0644]
build_files/cmake/Modules/FindSamplerate.cmake [new file with mode: 0644]
build_files/cmake/Modules/FindSndFile.cmake [new file with mode: 0644]
build_files/cmake/cmake_consistency_check.py
build_files/cmake/cmake_consistency_check_config.py [new file with mode: 0644]
build_files/cmake/example_scripts/cmake_linux_install.sh
build_files/cmake/macros.cmake
build_files/scons/config/aix4-config.py
build_files/scons/config/linux2-config.py
build_files/scons/config/win32-vc-config.py
build_files/scons/config/win64-vc-config.py
build_files/scons/tools/Blender.py
build_files/scons/tools/btools.py
doc/blender_file_format/BlendFileDnaExporter_25.py
doc/blender_file_format/BlendFileReader.py
doc/doxygen/Doxyfile
doc/python_api/blender-org/layout.html
doc/python_api/epy/BGL.py [deleted file]
doc/python_api/examples/aud.py [new file with mode: 0644]
doc/python_api/examples/bge.constraints.py [new file with mode: 0644]
doc/python_api/examples/bge.texture.1.py [new file with mode: 0644]
doc/python_api/examples/bge.texture.py [new file with mode: 0644]
doc/python_api/examples/blf.py [new file with mode: 0644]
doc/python_api/examples/bpy.props.4.py [new file with mode: 0644]
doc/python_api/examples/bpy.types.RenderEngine.py
doc/python_api/rst/bge.constraints.rst [new file with mode: 0644]
doc/python_api/rst/bge.events.rst
doc/python_api/rst/bge.logic.rst
doc/python_api/rst/bge.texture.rst [new file with mode: 0644]
doc/python_api/rst/bge.types.rst
doc/python_api/rst/bgl.rst [new file with mode: 0644]
doc/python_api/rst/change_log.rst
doc/python_api/sphinx_changelog_gen.py
doc/python_api/sphinx_doc_gen.py
extern/binreloc/CMakeLists.txt
extern/bullet2/CMakeLists.txt
extern/glew/CMakeLists.txt
extern/libopenjpeg/CMakeLists.txt
extern/lzo/CMakeLists.txt
intern/CMakeLists.txt
intern/audaspace/CMakeLists.txt
intern/boolop/CMakeLists.txt
intern/bsp/CMakeLists.txt
intern/elbeem/extern/elbeem.h
intern/elbeem/intern/simulation_object.cpp
intern/elbeem/intern/solver_class.h
intern/elbeem/intern/solver_init.cpp
intern/elbeem/intern/solver_interface.h
intern/ffmpeg/ffmpeg_compat.h
intern/ghost/CMakeLists.txt
intern/ghost/GHOST_Types.h
intern/ghost/SConscript
intern/ghost/intern/GHOST_Debug.h
intern/ghost/intern/GHOST_DisplayManagerCocoa.mm
intern/ghost/intern/GHOST_DisplayManagerSDL.cpp [new file with mode: 0644]
intern/ghost/intern/GHOST_DisplayManagerSDL.h [new file with mode: 0644]
intern/ghost/intern/GHOST_EventPrinter.cpp
intern/ghost/intern/GHOST_EventPrinter.h
intern/ghost/intern/GHOST_ISystem.cpp
intern/ghost/intern/GHOST_SystemCocoa.h
intern/ghost/intern/GHOST_SystemCocoa.mm
intern/ghost/intern/GHOST_SystemSDL.cpp [new file with mode: 0644]
intern/ghost/intern/GHOST_SystemSDL.h [new file with mode: 0644]
intern/ghost/intern/GHOST_SystemWin32.cpp
intern/ghost/intern/GHOST_SystemX11.cpp
intern/ghost/intern/GHOST_SystemX11.h
intern/ghost/intern/GHOST_Window.cpp
intern/ghost/intern/GHOST_Window.h
intern/ghost/intern/GHOST_WindowCarbon.cpp
intern/ghost/intern/GHOST_WindowCocoa.h
intern/ghost/intern/GHOST_WindowCocoa.mm
intern/ghost/intern/GHOST_WindowNULL.h
intern/ghost/intern/GHOST_WindowSDL.cpp [new file with mode: 0644]
intern/ghost/intern/GHOST_WindowSDL.h [new file with mode: 0644]
intern/ghost/intern/GHOST_WindowWin32.cpp
intern/ghost/intern/GHOST_WindowX11.cpp
intern/ghost/test/CMakeLists.txt [new file with mode: 0644]
intern/ghost/test/gears/GHOST_C-Test.c
intern/ghost/test/gears/GHOST_Test.cpp
intern/ghost/test/multitest/MultiTest.c
intern/iksolver/intern/IK_QJacobian.cpp
intern/iksolver/intern/IK_QJacobian.h
intern/iksolver/intern/IK_QSegment.cpp
intern/iksolver/intern/IK_QTask.cpp
intern/itasc/ConstraintSet.cpp
intern/mikktspace/mikktspace.c
intern/smoke/CMakeLists.txt
intern/smoke/intern/WAVELET_NOISE.h
release/datafiles/splash.png
release/scripts/modules/addon_utils.py
release/scripts/modules/bpy/__init__.py
release/scripts/modules/bpy/ops.py
release/scripts/modules/bpy/path.py
release/scripts/modules/bpy/utils.py
release/scripts/modules/bpy_extras/image_utils.py
release/scripts/modules/bpy_extras/io_utils.py
release/scripts/modules/bpy_extras/mesh_utils.py
release/scripts/modules/bpy_extras/view3d_utils.py
release/scripts/modules/bpy_types.py
release/scripts/modules/bpyml_ui.py
release/scripts/modules/console/complete_namespace.py
release/scripts/modules/console/intellisense.py
release/scripts/modules/console_python.py
release/scripts/modules/rna_prop_ui.py
release/scripts/startup/bl_operators/image.py
release/scripts/startup/bl_operators/mesh.py
release/scripts/startup/bl_operators/nla.py
release/scripts/startup/bl_operators/object_align.py
release/scripts/startup/bl_operators/object_quick_effects.py
release/scripts/startup/bl_operators/presets.py
release/scripts/startup/bl_operators/screen_play_rendered_anim.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_animviz.py
release/scripts/startup/bl_ui/properties_data_armature.py
release/scripts/startup/bl_ui/properties_data_curve.py
release/scripts/startup/bl_ui/properties_data_mesh.py
release/scripts/startup/bl_ui/properties_data_metaball.py
release/scripts/startup/bl_ui/properties_data_modifier.py
release/scripts/startup/bl_ui/properties_material.py
release/scripts/startup/bl_ui/properties_object.py
release/scripts/startup/bl_ui/properties_object_constraint.py
release/scripts/startup/bl_ui/properties_particle.py
release/scripts/startup/bl_ui/properties_physics_fluid.py
release/scripts/startup/bl_ui/properties_render.py
release/scripts/startup/bl_ui/properties_texture.py
release/scripts/startup/bl_ui/space_image.py
release/scripts/startup/bl_ui/space_info.py
release/scripts/startup/bl_ui/space_node.py
release/scripts/startup/bl_ui/space_sequencer.py
release/scripts/startup/bl_ui/space_userpref.py
release/scripts/startup/bl_ui/space_userpref_keymap.py
release/scripts/startup/bl_ui/space_view3d.py
release/scripts/startup/bl_ui/space_view3d_toolbar.py
release/scripts/startup/keyingsets_builtins.py
release/scripts/templates/batch_export.py [new file with mode: 0644]
release/text/GPL-license.txt
release/text/readme.html
source/blender/avi/AVI_avi.h
source/blender/avi/CMakeLists.txt
source/blender/avi/SConscript
source/blender/avi/intern/avi.c
source/blender/avi/intern/options.c
source/blender/blenfont/CMakeLists.txt
source/blender/blenkernel/BKE_action.h
source/blender/blenkernel/BKE_blender.h
source/blender/blenkernel/BKE_brush.h
source/blender/blenkernel/BKE_depsgraph.h
source/blender/blenkernel/BKE_displist.h
source/blender/blenkernel/BKE_node.h
source/blender/blenkernel/BKE_particle.h
source/blender/blenkernel/CMakeLists.txt
source/blender/blenkernel/SConscript
source/blender/blenkernel/depsgraph_private.h
source/blender/blenkernel/intern/BME_tools.c
source/blender/blenkernel/intern/action.c
source/blender/blenkernel/intern/anim.c
source/blender/blenkernel/intern/armature.c
source/blender/blenkernel/intern/blender.c
source/blender/blenkernel/intern/boids.c
source/blender/blenkernel/intern/brush.c
source/blender/blenkernel/intern/bvhutils.c
source/blender/blenkernel/intern/cdderivedmesh.c
source/blender/blenkernel/intern/constraint.c
source/blender/blenkernel/intern/curve.c
source/blender/blenkernel/intern/depsgraph.c
source/blender/blenkernel/intern/displist.c
source/blender/blenkernel/intern/image.c
source/blender/blenkernel/intern/key.c
source/blender/blenkernel/intern/material.c
source/blender/blenkernel/intern/multires.c
source/blender/blenkernel/intern/node.c
source/blender/blenkernel/intern/object.c
source/blender/blenkernel/intern/paint.c
source/blender/blenkernel/intern/particle.c
source/blender/blenkernel/intern/particle_system.c
source/blender/blenkernel/intern/pointcache.c
source/blender/blenkernel/intern/sca.c
source/blender/blenkernel/intern/scene.c
source/blender/blenkernel/intern/seqeffects.c
source/blender/blenkernel/intern/sequencer.c
source/blender/blenkernel/intern/smoke.c
source/blender/blenkernel/intern/softbody.c
source/blender/blenkernel/intern/sound.c
source/blender/blenkernel/intern/subsurf_ccg.c
source/blender/blenkernel/intern/texture.c
source/blender/blenkernel/intern/writeffmpeg.c
source/blender/blenlib/BLI_callbacks.h [new file with mode: 0644]
source/blender/blenlib/BLI_math_base.h
source/blender/blenlib/BLI_math_color.h
source/blender/blenlib/BLI_math_geom.h
source/blender/blenlib/BLI_math_vector.h
source/blender/blenlib/BLI_utildefines.h
source/blender/blenlib/BLI_winstuff.h
source/blender/blenlib/CMakeLists.txt
source/blender/blenlib/intern/callbacks.c [new file with mode: 0644]
source/blender/blenlib/intern/math_base_inline.c
source/blender/blenlib/intern/math_color.c
source/blender/blenlib/intern/math_geom.c
source/blender/blenlib/intern/math_vector_inline.c
source/blender/blenlib/intern/path_util.c
source/blender/blenlib/intern/pbvh.c
source/blender/blenlib/intern/storage.c
source/blender/blenlib/intern/uvproject.c
source/blender/blenloader/CMakeLists.txt
source/blender/blenloader/intern/readfile.c
source/blender/blenloader/intern/writefile.c
source/blender/blenpluginapi/CMakeLists.txt
source/blender/blenpluginapi/iff.h
source/blender/collada/AnimationImporter.cpp
source/blender/collada/ArmatureExporter.cpp
source/blender/collada/ArmatureExporter.h
source/blender/collada/ArmatureImporter.cpp
source/blender/collada/CMakeLists.txt
source/blender/collada/CameraExporter.cpp
source/blender/collada/CameraExporter.h
source/blender/collada/DocumentExporter.cpp
source/blender/collada/DocumentExporter.h
source/blender/collada/DocumentImporter.cpp
source/blender/collada/DocumentImporter.h
source/blender/collada/EffectExporter.cpp
source/blender/collada/EffectExporter.h
source/blender/collada/GeometryExporter.cpp
source/blender/collada/GeometryExporter.h
source/blender/collada/ImageExporter.cpp
source/blender/collada/ImageExporter.h
source/blender/collada/LightExporter.cpp
source/blender/collada/LightExporter.h
source/blender/collada/MaterialExporter.cpp
source/blender/collada/MaterialExporter.h
source/blender/collada/MeshImporter.cpp
source/blender/collada/MeshImporter.h
source/blender/collada/SkinInfo.cpp
source/blender/collada/collada.cpp
source/blender/collada/collada.h
source/blender/collada/collada_internal.cpp
source/blender/editors/CMakeLists.txt
source/blender/editors/animation/CMakeLists.txt
source/blender/editors/animation/anim_markers.c
source/blender/editors/animation/anim_ops.c
source/blender/editors/armature/CMakeLists.txt
source/blender/editors/armature/armature_intern.h
source/blender/editors/armature/armature_ops.c
source/blender/editors/armature/editarmature.c
source/blender/editors/armature/poseUtils.c
source/blender/editors/curve/CMakeLists.txt
source/blender/editors/curve/editcurve.c
source/blender/editors/datafiles/CMakeLists.txt
source/blender/editors/datafiles/preview.blend.c
source/blender/editors/datafiles/splash.png.c
source/blender/editors/datafiles/startup.blend.c
source/blender/editors/gpencil/CMakeLists.txt
source/blender/editors/include/ED_curve.h
source/blender/editors/include/ED_mesh.h
source/blender/editors/include/ED_view3d.h
source/blender/editors/include/UI_interface.h
source/blender/editors/interface/CMakeLists.txt
source/blender/editors/interface/interface.c
source/blender/editors/interface/interface_draw.c
source/blender/editors/interface/interface_handlers.c
source/blender/editors/interface/interface_layout.c
source/blender/editors/interface/interface_regions.c
source/blender/editors/interface/interface_style.c
source/blender/editors/interface/interface_templates.c
source/blender/editors/interface/interface_widgets.c
source/blender/editors/interface/resources.c
source/blender/editors/interface/view2d.c
source/blender/editors/mesh/CMakeLists.txt
source/blender/editors/mesh/editmesh_loop.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/metaball/CMakeLists.txt
source/blender/editors/object/CMakeLists.txt
source/blender/editors/object/object_add.c
source/blender/editors/object/object_bake.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_relations.c
source/blender/editors/object/object_vgroup.c
source/blender/editors/physics/CMakeLists.txt
source/blender/editors/physics/particle_edit.c
source/blender/editors/physics/physics_fluid.c
source/blender/editors/render/CMakeLists.txt
source/blender/editors/render/render_internal.c
source/blender/editors/render/render_opengl.c
source/blender/editors/render/render_preview.c
source/blender/editors/screen/CMakeLists.txt
source/blender/editors/screen/area.c
source/blender/editors/screen/screen_edit.c
source/blender/editors/screen/screen_ops.c
source/blender/editors/sculpt_paint/CMakeLists.txt
source/blender/editors/sculpt_paint/paint_image.c
source/blender/editors/sculpt_paint/sculpt.c
source/blender/editors/sound/CMakeLists.txt
source/blender/editors/sound/sound_ops.c
source/blender/editors/space_action/CMakeLists.txt
source/blender/editors/space_api/CMakeLists.txt
source/blender/editors/space_buttons/CMakeLists.txt
source/blender/editors/space_buttons/buttons_context.c
source/blender/editors/space_buttons/buttons_intern.h
source/blender/editors/space_buttons/buttons_ops.c
source/blender/editors/space_buttons/space_buttons.c
source/blender/editors/space_console/console_draw.c
source/blender/editors/space_console/console_ops.c
source/blender/editors/space_file/CMakeLists.txt
source/blender/editors/space_file/file_draw.c
source/blender/editors/space_file/file_ops.c
source/blender/editors/space_file/filelist.c
source/blender/editors/space_file/filesel.c
source/blender/editors/space_graph/CMakeLists.txt
source/blender/editors/space_graph/graph_edit.c
source/blender/editors/space_image/CMakeLists.txt
source/blender/editors/space_image/image_buttons.c
source/blender/editors/space_info/CMakeLists.txt
source/blender/editors/space_info/info_stats.c
source/blender/editors/space_logic/CMakeLists.txt
source/blender/editors/space_logic/logic_window.c
source/blender/editors/space_nla/CMakeLists.txt
source/blender/editors/space_node/CMakeLists.txt
source/blender/editors/space_node/drawnode.c
source/blender/editors/space_node/node_buttons.c
source/blender/editors/space_node/node_draw.c
source/blender/editors/space_node/node_edit.c
source/blender/editors/space_node/node_header.c
source/blender/editors/space_node/node_intern.h
source/blender/editors/space_node/node_ops.c
source/blender/editors/space_node/space_node.c
source/blender/editors/space_outliner/CMakeLists.txt
source/blender/editors/space_outliner/outliner.c
source/blender/editors/space_script/CMakeLists.txt
source/blender/editors/space_sequencer/CMakeLists.txt
source/blender/editors/space_sequencer/sequencer_add.c
source/blender/editors/space_sequencer/sequencer_draw.c
source/blender/editors/space_sequencer/sequencer_edit.c
source/blender/editors/space_sound/CMakeLists.txt
source/blender/editors/space_text/CMakeLists.txt
source/blender/editors/space_time/CMakeLists.txt
source/blender/editors/space_userpref/CMakeLists.txt
source/blender/editors/space_view3d/CMakeLists.txt
source/blender/editors/space_view3d/drawanimviz.c
source/blender/editors/space_view3d/drawarmature.c
source/blender/editors/space_view3d/drawobject.c
source/blender/editors/space_view3d/space_view3d.c
source/blender/editors/space_view3d/view3d_buttons.c
source/blender/editors/space_view3d/view3d_draw.c
source/blender/editors/space_view3d/view3d_intern.h
source/blender/editors/space_view3d/view3d_select.c
source/blender/editors/space_view3d/view3d_view.c
source/blender/editors/transform/CMakeLists.txt
source/blender/editors/transform/transform.c
source/blender/editors/transform/transform.h
source/blender/editors/transform/transform_constraints.c
source/blender/editors/transform/transform_conversions.c
source/blender/editors/transform/transform_generics.c
source/blender/editors/transform/transform_manipulator.c
source/blender/editors/transform/transform_snap.c
source/blender/editors/util/CMakeLists.txt
source/blender/editors/util/ed_util.c
source/blender/editors/util/undo.c
source/blender/editors/uvedit/CMakeLists.txt
source/blender/editors/uvedit/uvedit_draw.c
source/blender/editors/uvedit/uvedit_unwrap_ops.c
source/blender/gpu/CMakeLists.txt
source/blender/gpu/GPU_buffers.h
source/blender/gpu/GPU_draw.h
source/blender/gpu/SConscript
source/blender/gpu/intern/gpu_buffers.c
source/blender/gpu/intern/gpu_draw.c
source/blender/gpu/intern/gpu_material.c
source/blender/ikplugin/CMakeLists.txt
source/blender/imbuf/CMakeLists.txt
source/blender/imbuf/IMB_imbuf.h
source/blender/imbuf/intern/cineon/CMakeLists.txt
source/blender/imbuf/intern/dds/CMakeLists.txt
source/blender/imbuf/intern/divers.c
source/blender/imbuf/intern/openexr/CMakeLists.txt
source/blender/imbuf/intern/openexr/openexr_api.cpp
source/blender/imbuf/intern/rectop.c
source/blender/imbuf/intern/util.c
source/blender/makesdna/DNA_actuator_types.h
source/blender/makesdna/DNA_image_types.h
source/blender/makesdna/DNA_material_types.h
source/blender/makesdna/DNA_object_fluidsim.h
source/blender/makesdna/DNA_object_force.h
source/blender/makesdna/DNA_object_types.h
source/blender/makesdna/DNA_particle_types.h
source/blender/makesdna/DNA_scene_types.h
source/blender/makesdna/DNA_sequence_types.h
source/blender/makesdna/DNA_space_types.h
source/blender/makesdna/DNA_userdef_types.h
source/blender/makesdna/intern/makesdna.c
source/blender/makesrna/RNA_access.h
source/blender/makesrna/RNA_types.h
source/blender/makesrna/intern/CMakeLists.txt
source/blender/makesrna/intern/makesrna.c
source/blender/makesrna/intern/rna_ID.c
source/blender/makesrna/intern/rna_access.c
source/blender/makesrna/intern/rna_actuator.c
source/blender/makesrna/intern/rna_armature.c
source/blender/makesrna/intern/rna_camera.c
source/blender/makesrna/intern/rna_constraint.c
source/blender/makesrna/intern/rna_controller.c
source/blender/makesrna/intern/rna_curve.c
source/blender/makesrna/intern/rna_fluidsim.c
source/blender/makesrna/intern/rna_group.c
source/blender/makesrna/intern/rna_image.c
source/blender/makesrna/intern/rna_internal_types.h
source/blender/makesrna/intern/rna_material.c
source/blender/makesrna/intern/rna_mesh.c
source/blender/makesrna/intern/rna_modifier.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_particle.c
source/blender/makesrna/intern/rna_pose.c
source/blender/makesrna/intern/rna_render.c
source/blender/makesrna/intern/rna_rna.c
source/blender/makesrna/intern/rna_scene.c
source/blender/makesrna/intern/rna_scene_api.c
source/blender/makesrna/intern/rna_sequencer.c
source/blender/makesrna/intern/rna_space.c
source/blender/makesrna/intern/rna_texture.c
source/blender/makesrna/intern/rna_userdef.c
source/blender/modifiers/CMakeLists.txt
source/blender/modifiers/intern/MOD_cast.c
source/blender/modifiers/intern/MOD_cloth.c
source/blender/modifiers/intern/MOD_displace.c
source/blender/modifiers/intern/MOD_explode.c
source/blender/modifiers/intern/MOD_fluidsim_util.c
source/blender/modifiers/intern/MOD_hook.c
source/blender/modifiers/intern/MOD_mask.c
source/blender/modifiers/intern/MOD_meshdeform.c
source/blender/modifiers/intern/MOD_simpledeform.c
source/blender/modifiers/intern/MOD_smoke.c
source/blender/modifiers/intern/MOD_smooth.c
source/blender/modifiers/intern/MOD_solidify.c
source/blender/modifiers/intern/MOD_util.c
source/blender/modifiers/intern/MOD_util.h
source/blender/modifiers/intern/MOD_warp.c
source/blender/modifiers/intern/MOD_wave.c
source/blender/nodes/CMakeLists.txt
source/blender/nodes/intern/CMP_nodes/CMP_blur.c
source/blender/nodes/intern/CMP_nodes/CMP_channelMatte.c
source/blender/nodes/intern/CMP_nodes/CMP_glare.c
source/blender/nodes/intern/CMP_nodes/CMP_image.c
source/blender/nodes/intern/CMP_nodes/CMP_math.c
source/blender/nodes/intern/CMP_nodes/CMP_rotate.c
source/blender/nodes/intern/CMP_util.c
source/blender/nodes/intern/SHD_nodes/SHD_material.c
source/blender/nodes/intern/SHD_util.c
source/blender/nodes/intern/TEX_nodes/TEX_texture.c
source/blender/python/BPY_extern.h
source/blender/python/CMakeLists.txt
source/blender/python/SConscript
source/blender/python/generic/CMakeLists.txt
source/blender/python/generic/IDProp.c
source/blender/python/generic/IDProp.h
source/blender/python/generic/bgl.c
source/blender/python/generic/py_capi_utils.c
source/blender/python/generic/py_capi_utils.h
source/blender/python/intern/CMakeLists.txt
source/blender/python/intern/bpy.c
source/blender/python/intern/bpy_app.c
source/blender/python/intern/bpy_app_handlers.c [new file with mode: 0644]
source/blender/python/intern/bpy_app_handlers.h [moved from source/blender/blenlib/intern/BLI_callbacks.h with 64% similarity]
source/blender/python/intern/bpy_driver.c
source/blender/python/intern/bpy_interface.c
source/blender/python/intern/bpy_intern_string.c [new file with mode: 0644]
source/blender/python/intern/bpy_intern_string.h [new file with mode: 0644]
source/blender/python/intern/bpy_props.c
source/blender/python/intern/bpy_rna.c
source/blender/python/intern/bpy_rna.h
source/blender/python/intern/bpy_rna_array.c
source/blender/python/intern/bpy_util.c
source/blender/python/mathutils/CMakeLists.txt [new file with mode: 0644]
source/blender/python/mathutils/mathutils.c [moved from source/blender/python/generic/mathutils.c with 81% similarity]
source/blender/python/mathutils/mathutils.h [moved from source/blender/python/generic/mathutils.h with 99% similarity]
source/blender/python/mathutils/mathutils_Color.c [moved from source/blender/python/generic/mathutils_Color.c with 87% similarity]
source/blender/python/mathutils/mathutils_Color.h [moved from source/blender/python/generic/mathutils_Color.h with 100% similarity]
source/blender/python/mathutils/mathutils_Euler.c [moved from source/blender/python/generic/mathutils_Euler.c with 92% similarity]
source/blender/python/mathutils/mathutils_Euler.h [moved from source/blender/python/generic/mathutils_Euler.h with 100% similarity]
source/blender/python/mathutils/mathutils_Matrix.c [moved from source/blender/python/generic/mathutils_Matrix.c with 85% similarity]
source/blender/python/mathutils/mathutils_Matrix.h [moved from source/blender/python/generic/mathutils_Matrix.h with 100% similarity]
source/blender/python/mathutils/mathutils_Quaternion.c [moved from source/blender/python/generic/mathutils_Quaternion.c with 93% similarity]
source/blender/python/mathutils/mathutils_Quaternion.h [moved from source/blender/python/generic/mathutils_Quaternion.h with 100% similarity]
source/blender/python/mathutils/mathutils_Vector.c [moved from source/blender/python/generic/mathutils_Vector.c with 94% similarity]
source/blender/python/mathutils/mathutils_Vector.h [moved from source/blender/python/generic/mathutils_Vector.h with 100% similarity]
source/blender/python/mathutils/mathutils_geometry.c [moved from source/blender/python/generic/mathutils_geometry.c with 77% similarity]
source/blender/python/mathutils/mathutils_geometry.h [moved from source/blender/python/generic/mathutils_geometry.h with 96% similarity]
source/blender/quicktime/CMakeLists.txt
source/blender/quicktime/apple/qtkit_export.m
source/blender/render/CMakeLists.txt
source/blender/render/SConscript
source/blender/render/extern/include/RE_pipeline.h
source/blender/render/extern/include/RE_shader_ext.h
source/blender/render/intern/include/rayobject.h
source/blender/render/intern/include/render_types.h
source/blender/render/intern/source/convertblender.c
source/blender/render/intern/source/envmap.c
source/blender/render/intern/source/imagetexture.c
source/blender/render/intern/source/pipeline.c
source/blender/render/intern/source/pixelshading.c
source/blender/render/intern/source/rayshade.c
source/blender/render/intern/source/render_texture.c
source/blender/render/intern/source/rendercore.c
source/blender/render/intern/source/renderdatabase.c
source/blender/render/intern/source/shadeinput.c
source/blender/render/intern/source/shadeoutput.c
source/blender/render/intern/source/strand.c
source/blender/render/intern/source/sunsky.c
source/blender/render/intern/source/volume_precache.c
source/blender/render/intern/source/volumetric.c
source/blender/render/intern/source/voxeldata.c
source/blender/render/intern/source/zbuf.c
source/blender/windowmanager/CMakeLists.txt
source/blender/windowmanager/intern/wm_event_system.c
source/blender/windowmanager/intern/wm_files.c
source/blender/windowmanager/intern/wm_init_exit.c
source/blender/windowmanager/intern/wm_operators.c
source/blender/windowmanager/intern/wm_window.c
source/blenderplayer/CMakeLists.txt
source/blenderplayer/bad_level_call_stubs/CMakeLists.txt
source/blenderplayer/bad_level_call_stubs/stubs.c
source/creator/CMakeLists.txt
source/creator/SConscript
source/creator/creator.c
source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp
source/gameengine/BlenderRoutines/CMakeLists.txt
source/gameengine/Converter/BL_ActionActuator.cpp
source/gameengine/Converter/BL_BlenderDataConversion.cpp
source/gameengine/Converter/CMakeLists.txt
source/gameengine/Converter/KX_ConvertActuators.cpp
source/gameengine/Expressions/CMakeLists.txt
source/gameengine/Expressions/PyObjectPlus.cpp
source/gameengine/Expressions/PyObjectPlus.h
source/gameengine/GameLogic/CMakeLists.txt
source/gameengine/GameLogic/Joystick/SCA_Joystick.cpp
source/gameengine/GameLogic/SCA_2DFilterActuator.cpp
source/gameengine/GameLogic/SCA_2DFilterActuator.h
source/gameengine/GamePlayer/common/CMakeLists.txt
source/gameengine/GamePlayer/ghost/CMakeLists.txt
source/gameengine/GamePlayer/ghost/GPG_Application.cpp
source/gameengine/GamePlayer/ghost/GPG_ghost.cpp
source/gameengine/GamePlayer/ghost/SConscript
source/gameengine/Ketsji/BL_Texture.cpp
source/gameengine/Ketsji/CMakeLists.txt
source/gameengine/Ketsji/KXNetwork/CMakeLists.txt
source/gameengine/Ketsji/KX_Camera.cpp
source/gameengine/Ketsji/KX_CameraActuator.cpp
source/gameengine/Ketsji/KX_CameraActuator.h
source/gameengine/Ketsji/KX_GameObject.cpp
source/gameengine/Ketsji/KX_KetsjiEngine.cpp
source/gameengine/Ketsji/KX_PyMath.h
source/gameengine/Ketsji/KX_PythonInit.cpp
source/gameengine/Ketsji/KX_SoundActuator.cpp
source/gameengine/Ketsji/KX_SoundActuator.h
source/gameengine/Ketsji/SConscript
source/gameengine/Network/CMakeLists.txt
source/gameengine/Network/LoopBackNetwork/CMakeLists.txt
source/gameengine/Physics/Bullet/CMakeLists.txt
source/gameengine/Physics/Bullet/CcdPhysicsController.cpp
source/gameengine/Physics/Bullet/CcdPhysicsController.h
source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.h
source/gameengine/Rasterizer/CMakeLists.txt
source/gameengine/Rasterizer/RAS_OpenGLRasterizer/CMakeLists.txt
source/gameengine/VideoTexture/CMakeLists.txt
source/tests/CMakeLists.txt
source/tests/bl_load_py_modules.py
source/tests/check_deprecated.py [new file with mode: 0644]

index 935918a932667723619a26d6e32555a685b33591..cb59b35f406643457c785035aea9d1bdc621c5e1 100644 (file)
@@ -49,8 +49,15 @@ endif()
 
 cmake_minimum_required(VERSION 2.8)
 
+if(NOT EXECUTABLE_OUTPUT_PATH)
+       set(FIRST_RUN "TRUE")
+endif()
+
 # this starts out unset
-set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/build_files/cmake/Modules/")
+list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/build_files/cmake/Modules")
+
+# avoid having empty buildtype
+set(CMAKE_BUILD_TYPE_INIT "Release")
 
 # quiet output for Makefiles, 'make -s' helps too
 # set_property(GLOBAL PROPERTY RULE_MESSAGES OFF)
@@ -83,6 +90,9 @@ set(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/lib 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)
+
 option(WITH_INTERNATIONAL "Enable I18N (International fonts and text)" ON)
 
 option(WITH_PYTHON        "Enable Embedded Python API  (only disable for development)" ON)
@@ -99,9 +109,21 @@ option(WITH_BULLET        "Enable Bullet (Physics Engine)" ON)
 option(WITH_GAMEENGINE    "Enable Game Engine" ON)
 option(WITH_PLAYER        "Build Player" OFF)
 
+# GHOST Windowing Library Options
+option(WITH_GHOST_DEBUG   "Enable debugging output for the GHOST library" OFF)
+mark_as_advanced(WITH_GHOST_DEBUG)
+
+option(WITH_GHOST_SDL    "Enable building blender against SDL for windowing rather then the native APIs" OFF)
+mark_as_advanced(WITH_GHOST_SDL)
+
+# Misc...
 option(WITH_HEADLESS      "Build without graphical support (renderfarm, server mode only)" OFF)
 mark_as_advanced(WITH_HEADLESS)
 
+option(WITH_AUDASPACE    "Build with blenders audio library (only disable if you know what you're doing!)" ON)
+mark_as_advanced(WITH_AUDASPACE)
+
+
 # (unix defaults to OpenMP On)
 if(UNIX AND NOT APPLE)
        option(WITH_OPENMP        "Enable OpenMP (has to be supported by the compiler)" ON)
@@ -119,6 +141,7 @@ endif()
 
 # Modifiers
 option(WITH_MOD_FLUID          "Enable Elbeem Modifier (Fluid Simulation)" ON)
+option(WITH_MOD_SMOKE          "Enable Smoke Modifier (Smoke Simulation)" ON)
 option(WITH_MOD_DECIMATE               "Enable Decimate Modifier" ON)
 option(WITH_MOD_BOOLEAN                "Enable Boolean Modifier" ON)
 option(WITH_MOD_CLOTH_ELTOPO           "Enable Experemental cloth solver" OFF)
@@ -134,7 +157,7 @@ option(WITH_IMAGE_HDR           "Enable HDR Image Support" ON)
 option(WITH_IMAGE_REDCODE       "Enable RedCode Image Support" OFF)
 
 # Audio/Video format support
-option(WITH_CODEC_FFMPEG        "Enable FFMPeg Support (http://ffmpeg.mplayerhq.hu)" OFF)
+option(WITH_CODEC_FFMPEG        "Enable FFMPeg Support (http://ffmpeg.org)" OFF)
 option(WITH_CODEC_SNDFILE       "Enable libsndfile Support (http://www.mega-nerd.com/libsndfile)" OFF)
 if(APPLE OR (WIN32 AND NOT UNIX))
        option(WITH_CODEC_QUICKTIME     "Enable Quicktime Support" OFF)
@@ -189,12 +212,23 @@ if(APPLE)
        option(WITH_LIBS10.5  "Use 10.5 libs (needed for 64bit builds)" OFF)
 endif()
 
+#-----------------------------------------------------------------------------
+# Check for conflicting/unsupported configurations
+
+if(NOT WITH_BLENDER AND NOT WITH_PLAYER)
+       message(FATAL_ERROR "At least one of WITH_BLENDER or WITH_PLAYER must be enabled, nothing to do!")
+endif()
+
 if(NOT WITH_GAMEENGINE AND WITH_PLAYER)
        message(FATAL_ERROR "WITH_PLAYER requires WITH_GAMEENGINE")
 endif()
 
-if(NOT WITH_SAMPLERATE AND (WITH_OPENAL OR WITH_SDL OR WITH_JACK))
-       message(FATAL_ERROR "WITH_OPENAL/WITH_SDL/WITH_JACK require WITH_SAMPLERATE")
+if(NOT WITH_AUDASPACE AND (WITH_OPENAL OR WITH_SDL OR WITH_JACK))
+       message(FATAL_ERROR "WITH_OPENAL/WITH_SDL/WITH_JACK/WITH_CODEC_FFMPEG require WITH_AUDASPACE")
+endif()
+
+if(NOT WITH_SDL AND WITH_GHOST_SDL)
+       message(FATAL_ERROR "WITH_GHOST_SDL requires WITH_SDL to be ON")
 endif()
 
 if(NOT WITH_IMAGE_OPENJPEG AND WITH_IMAGE_REDCODE)
@@ -210,14 +244,17 @@ if(WITH_PYTHON_MODULE AND WITH_PYTHON_INSTALL)
        message(FATAL_ERROR "WITH_PYTHON_MODULE requires WITH_PYTHON_INSTALL to be OFF")
 endif()
 
+if(WITH_CODEC_QUICKTIME AND MINGW)
+       message(FATAL_ERROR "MINGW requires WITH_CODEC_QUICKTIME to be OFF "
+                                               "because it is currently unsupported, remove this "
+                                               "line if youre a developer who wants to add support.")
+endif()
+
 # may as well build python module without a UI
 if(WITH_PYTHON_MODULE)
        set(WITH_HEADLESS ON)
 endif()
 
-# remove old vars
-unset(WITH_INSTALL CACHE)
-
 TEST_SSE_SUPPORT()
 
 #-----------------------------------------------------------------------------
@@ -226,9 +263,25 @@ TEST_SSE_SUPPORT()
 # linux only, not cached
 set(WITH_BINRELOC OFF)
 
+# MAXOSX only, set to avoid uninitialized 
+set(EXETYPE)
+
+# C/C++ flags
+set(PLATFORM_CFLAGS)
+
 # these are added to later on.
-set(C_WARNINGS "")
-set(CXX_WARNINGS "")
+set(C_WARNINGS)
+set(CXX_WARNINGS)
+
+# libraries to link the binary with passed to target_link_libraries()
+# known as LLIBS to scons
+set(PLATFORM_LINKLIBS)
+
+# Added to linker flags in setup_liblinks
+# - CMAKE_EXE_LINKER_FLAGS
+# - CMAKE_EXE_LINKER_FLAGS_DEBUG
+set(PLATFORM_LINKFLAGS)
+set(PLATFORM_LINKFLAGS_DEBUG)
 
 
 # disabled for now, not supported
@@ -238,13 +291,12 @@ set(CXX_WARNINGS "")
 # On Unix: 
 #   cmake ../blender \
 #         -D PYTHON_VERSION=3.2 \
-#         -D PYTHON_INCLUDE_DIRS=/opt/py32/include/python3.2d \
-#         -D PYTHON_LIBPATH=/opt/py32/lib \
-#         -D PYTHON_LIBRARY=python3.2d
+#         -D PYTHON_INCLUDE_DIR=/opt/py32/include/python3.2d \
+#         -D PYTHON_LIBRARY=/opt/py32/lib/libpython3.2d.so
 #
 # On Macs: 
 #   cmake ../blender \
-#         -D PYTHON_INCLUDE_DIRS=/System/Library/Frameworks/Python.framework/Versions/3.2/include/python3.2 \
+#         -D PYTHON_INCLUDE_DIR=/System/Library/Frameworks/Python.framework/Versions/3.2/include/python3.2 \
 #         -D PYTHON_LIBPATH=/System/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/config \
 #         -G Xcode
 #
@@ -260,65 +312,48 @@ if(UNIX AND NOT APPLE)
                set(CMAKE_LIBRARY_PATH "/usr/lib/x86_64-linux-gnu;${CMAKE_LIBRARY_PATH}")
        endif()
 
-       if(WITH_OPENAL)
-               find_package(OpenAL)
-               if(NOT OPENAL_FOUND)
-                       set(WITH_OPENAL OFF)
-               endif()
-       endif()
+       find_package(JPEG REQUIRED)
+       find_package(PNG REQUIRED)
+       find_package(ZLIB REQUIRED)
+       find_package(Freetype REQUIRED)
 
-       if(WITH_JACK)
-               set(JACK /usr)
-               set(JACK_INC ${JACK}/include/jack)
-               set(JACK_LIB jack)
-               set(JACK_LIBPATH ${JACK}/lib)
-       endif()
+       if(WITH_PYTHON)
+               # No way to set py32. remove for now.
+               # find_package(PythonLibs)
 
-       if(WITH_CODEC_SNDFILE)
-               set(SNDFILE /usr)
-               set(SNDFILE_INC ${SNDFILE}/include)
-               set(SNDFILE_LIB sndfile)
-               set(SNDFILE_LIBPATH ${SNDFILE}/lib)
+               # Use our own instead, since wothout py is such a rare case,
+               # require this package
+               find_package(PythonLibsUnix REQUIRED)
        endif()
 
-       if(WITH_INTERNATIONAL)
-               find_library(INTL_LIBRARY
-                       NAMES intl
-                       PATHS
-                       /sw/lib
-               )
 
-               find_library(ICONV_LIBRARY
-                       NAMES iconv
-                       PATHS
-                       /sw/lib
-               )
-               mark_as_advanced(ICONV_LIBRARY)
-               mark_as_advanced(INTL_LIBRARY)
-
-               if(INTL_LIBRARY AND ICONV_LIBRARY)
-                       set(GETTEXT_LIB ${INTL_LIBRARY} ${ICONV_LIBRARY})
+       if(WITH_IMAGE_OPENEXR)
+               find_package(OpenEXR)  # our own module
+               if(NOT OPENEXR_FOUND)
+                       set(WITH_IMAGE_OPENEXR OFF)
                endif()
        endif()
 
-       find_package(Freetype)
-       # unset(FREETYPE_INCLUDE_DIRS CACHE) # cant use
-
-
-       if(WITH_PYTHON)
-               # No way to set py32. remove for now.
-               # find_package(PythonLibs)
-
-               # defines...
-               
-               #  PYTHON_VERSION
-               #  PYTHON_INCLUDE_DIRS
-               #  PYTHON_LIBRARY
-               #  PYTHON_LIBPATH
-               #  PYTHON_LINKFLAGS
+       if(WITH_IMAGE_OPENJPEG)
+               find_package(OpenJPEG)
+               if(NOT OPENJPEG_FOUND)
+                       set(WITH_IMAGE_OPENJPEG OFF)
+               endif()
+       endif()
 
-               include(build_files/cmake/FindPythonLibsUnix.cmake)
+       if(WITH_IMAGE_TIFF)
+               find_package(TIFF)
+               if(NOT TIFF_FOUND)
+                       set(WITH_IMAGE_TIFF OFF)
+               endif()
+       endif()
 
+       # Audio IO
+       if(WITH_OPENAL)
+               find_package(OpenAL)
+               if(NOT OPENAL_FOUND)
+                       set(WITH_OPENAL OFF)
+               endif()
        endif()
 
        if(WITH_SDL)
@@ -333,90 +368,88 @@ if(UNIX AND NOT APPLE)
                endif()
        endif()
 
-       if(WITH_IMAGE_OPENEXR)
-               set(OPENEXR /usr CACHE FILEPATH "OPENEXR Directory")
-               mark_as_advanced(OPENEXR)
-               find_path(OPENEXR_INC
-                       ImfXdr.h
-                       PATHS
-                       ${OPENEXR}/include/OpenEXR
-                       /usr/local/include/OpenEXR
-                       /sw/include/OpenEXR
-                       /opt/local/include/OpenEXR
-                       /opt/csw/include/OpenEXR
-                       /opt/include/OpenEXR
-               )
-               mark_as_advanced(OPENEXR_INC)
-
-               set(OPENEXR_LIB Half IlmImf Iex Imath)
-               
-               if(NOT OPENEXR_INC)
-                       set(WITH_IMAGE_OPENEXR OFF)
+       if(WITH_JACK)
+               find_package(Jack)
+               if(NOT JACK_FOUND)
+                       set(WITH_JACK OFF)
                endif()
        endif()
 
-       if(WITH_IMAGE_TIFF)
-               find_package(TIFF)
-               if(NOT TIFF_FOUND)
-                       set(WITH_IMAGE_TIFF OFF)
+       # Codecs
+       if(WITH_CODEC_SNDFILE)
+               find_package(SndFile)
+               if(NOT SNDFILE_FOUND)
+                       set(WITH_CODEC_SNDFILE OFF)
                endif()
        endif()
 
-       find_package(JPEG REQUIRED)
-
-       find_package(PNG REQUIRED)
-
-       find_package(ZLIB REQUIRED)
-
        if(WITH_CODEC_FFMPEG)
-               set(FFMPEG /usr CACHE FILEPATH "FFMPEG Directory")
+               set(FFMPEG /usr CACHE PATH "FFMPEG Directory")
                mark_as_advanced(FFMPEG)
-               set(FFMPEG_INC ${FFMPEG}/include)
-               set(FFMPEG_LIB avformat avcodec avutil avdevice swscale CACHE STRING "FFMPEG Libraries")
-               mark_as_advanced(FFMPEG_LIB)
+               set(FFMPEG_INCLUDE_DIRS ${FFMPEG}/include)
+               set(FFMPEG_LIBRARIES avformat avcodec avutil avdevice swscale CACHE STRING "FFMPEG Libraries")
+               mark_as_advanced(FFMPEG_LIBRARIES)
                set(FFMPEG_LIBPATH ${FFMPEG}/lib)
                set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D__STDC_CONSTANT_MACROS")
        endif()
 
+       if(WITH_INTERNATIONAL)
+               find_library(INTL_LIBRARY
+                       NAMES intl
+                       PATHS
+                       /sw/lib
+               )
+
+               find_library(ICONV_LIBRARY
+                       NAMES iconv
+                       PATHS
+                       /sw/lib
+               )
+               mark_as_advanced(ICONV_LIBRARY)
+               mark_as_advanced(INTL_LIBRARY)
+
+               if(INTL_LIBRARY AND ICONV_LIBRARY)
+                       set(GETTEXT_LIB ${INTL_LIBRARY} ${ICONV_LIBRARY})
+               endif()
+       endif()
+
        if(WITH_FFTW3)
-               set(FFTW3 /usr)
-               set(FFTW3_INC ${FFTW3}/include)
-               set(FFTW3_LIB fftw3)
-               set(FFTW3_LIBPATH ${FFTW3}/lib)
+               find_package(Fftw3)
+               if(NOT FFTW3_FOUND)
+                       set(WITH_FFTW3 OFF)
+               endif()
        endif()
 
        if(WITH_SAMPLERATE)
-               set(LIBSAMPLERATE /usr)
-               set(LIBSAMPLERATE_INC ${LIBSAMPLERATE}/include)
-               set(LIBSAMPLERATE_LIB samplerate)
-               set(LIBSAMPLERATE_LIBPATH ${LIBSAMPLERATE}/lib)
+               find_package(Samplerate)
+               if(NOT SAMPLERATE_FOUND)
+                       set(WITH_SAMPLERATE OFF)
+               endif()
        endif()
 
        if(WITH_OPENCOLLADA)
-               set(OPENCOLLADA /usr/local/opencollada CACHE FILEPATH "OpenCollada Directory")
+               set(OPENCOLLADA /usr/local/opencollada CACHE PATH "OpenCollada Directory")
                mark_as_advanced(OPENCOLLADA)
                set(OPENCOLLADA_LIBPATH ${OPENCOLLADA}/lib)
-               set(OPENCOLLADA_LIB OpenCOLLADAStreamWriter OpenCOLLADASaxFrameworkLoader OpenCOLLADAFramework OpenCOLLADABaseUtils GeneratedSaxParser UTF MathMLSolver pcre ftoa buffer xml2)
-               set(OPENCOLLADA_INC ${OPENCOLLADA})
+               set(OPENCOLLADA_LIBRARIES OpenCOLLADAStreamWriter OpenCOLLADASaxFrameworkLoader OpenCOLLADAFramework OpenCOLLADABaseUtils GeneratedSaxParser UTF MathMLSolver pcre ftoa buffer xml2)
+               set(OPENCOLLADA_INCLUDE_DIR ${OPENCOLLADA})
 
-               set(PCRE /usr CACHE FILEPATH "PCRE Directory")
+               set(PCRE /usr CACHE PATH "PCRE Directory")
                mark_as_advanced(PCRE)
                set(PCRE_LIBPATH ${PCRE}/lib)
                set(PCRE_LIB pcre)
 
-               set(EXPAT /usr CACHE FILEPATH "Expat Directory")
+               set(EXPAT /usr CACHE PATH "Expat Directory")
                mark_as_advanced(EXPAT)
                set(EXPAT_LIBPATH ${EXPAT}/lib)
                set(EXPAT_LIB expat)
        endif()
 
        if(WITH_MEM_JEMALLOC)
-               set(JEMALLOC /usr)
-               set(JEMALLOC_LIBRARY jemalloc CACHE STRING "JeMalloc library")
-               set(JEMALLOC_LIBPATH ${JEMALLOC}/lib  CACHE FILEPATH "JeMalloc library path")
-               # no use for this yet.
-               # set(JEMALLOC_INCLUDE_DIR ${JEMALLOC}/include  CACHE FILEPATH "JeMalloc include path")
-               unset(JEMALLOC)
+               find_package(JeMalloc)
+               if(NOT JEMALLOC_FOUND)
+                       set(WITH_MEM_JEMALLOC OFF)
+               endif()
        endif()
 
        if (WITH_NDOF)
@@ -429,28 +462,26 @@ if(UNIX AND NOT APPLE)
        endif()
 
        # OpenSuse needs lutil, ArchLinux not, for now keep, can avoid by using --as-needed
-       set(LLIBS "-lutil -lc -lm -lpthread -lstdc++")
+       set(PLATFORM_LINKLIBS "-lutil -lc -lm -lpthread -lstdc++")
 
-       if(NOT WITH_HEADLESS)
+       if((NOT WITH_HEADLESS) AND (NOT WITH_GHOST_SDL))
                find_package(X11 REQUIRED)
                find_path(X11_XF86keysym_INCLUDE_PATH X11/XF86keysym.h ${X11_INC_SEARCH_PATH})
                mark_as_advanced(X11_XF86keysym_INCLUDE_PATH)
 
-               list(APPEND LLIBS ${X11_X11_LIB})
+               list(APPEND PLATFORM_LINKLIBS ${X11_X11_LIB})
 
                if(WITH_X11_XINPUT)
-                       list(APPEND LLIBS ${X11_Xinput_LIB})
+                       list(APPEND PLATFORM_LINKLIBS ${X11_Xinput_LIB})
                endif()
        endif()
 
        if(CMAKE_SYSTEM_NAME MATCHES "Linux")
                if(NOT WITH_PYTHON_MODULE)
                        # BSD's dont use libdl.so
-                       list(APPEND LLIBS -ldl)
-
+                       list(APPEND PLATFORM_LINKLIBS -ldl)
                        # binreloc is linux only
-                       set(BINRELOC ${CMAKE_SOURCE_DIR}/extern/binreloc)
-                       set(BINRELOC_INC ${BINRELOC}/include)
+                       set(BINRELOC_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/extern/binreloc/include)
                        set(WITH_BINRELOC ON)
                endif()
        endif()
@@ -503,16 +534,16 @@ elseif(WIN32)
 
        if(WITH_INTERNATIONAL)
                set(ICONV ${LIBDIR}/iconv)
-               set(ICONV_INC ${ICONV}/include)
-               set(ICONV_LIB iconv)
+               set(ICONV_INCLUDE_DIRS ${ICONV}/include)
+               set(ICONV_LIBRARIES iconv)
                set(ICONV_LIBPATH ${ICONV}/lib)
        endif()
 
        if(WITH_SAMPLERATE)
-               set(LIBSAMPLERATE ${LIBDIR}/samplerate)
-               set(LIBSAMPLERATE_INC ${LIBSAMPLERATE}/include)
-               set(LIBSAMPLERATE_LIB libsamplerate)
-               set(LIBSAMPLERATE_LIBPATH ${LIBSAMPLERATE}/lib)
+               set(SAMPLERATE ${LIBDIR}/samplerate)
+               set(SAMPLERATE_INCLUDE_DIRS ${SAMPLERATE}/include)
+               set(SAMPLERATE_LIBRARIES libsamplerate)
+               set(SAMPLERATE_LIBPATH ${SAMPLERATE}/lib)
        endif()
 
        set(PNG "${LIBDIR}/png")
@@ -534,9 +565,9 @@ elseif(WIN32)
 
        if(WITH_CODEC_SNDFILE)
                set(SNDFILE ${LIBDIR}/sndfile)
-               set(SNDFILE_INC ${SNDFILE}/include)
-               set(SNDFILE_LIB libsndfile-1)
-               set(SNDFILE_LIBPATH ${SNDFILE}/lib)
+               set(SNDFILE_INCLUDE_DIRS ${SNDFILE}/include)
+               set(SNDFILE_LIBRARIES libsndfile-1)
+               set(SNDFILE_LIBPATH ${SNDFILE}/lib) # TODO, deprecate
        endif()
 
        if(WITH_SDL)
@@ -548,8 +579,8 @@ elseif(WIN32)
 
        if(WITH_CODEC_QUICKTIME)
                set(QUICKTIME ${LIBDIR}/QTDevWin)
-               set(QUICKTIME_INC ${QUICKTIME}/CIncludes)
-               set(QUICKTIME_LIB qtmlClient)
+               set(QUICKTIME_INCLUDE_DIRS ${QUICKTIME}/CIncludes)
+               set(QUICKTIME_LIBRARIES qtmlClient)
                set(QUICKTIME_LIBPATH ${QUICKTIME}/Libraries)
        endif()
 
@@ -559,13 +590,15 @@ elseif(WIN32)
 
        if(MSVC)
                if(CMAKE_CL_64)
-                       set(LLIBS ws2_32 vfw32 winmm kernel32 user32 gdi32 comdlg32 advapi32 shfolder shell32 ole32 oleaut32 uuid )
+                       set(PLATFORM_LINKLIBS ws2_32 vfw32 winmm kernel32 user32 gdi32 comdlg32 advapi32 shfolder shell32 ole32 oleaut32 uuid)
                else()
-                       set(LLIBS kernel32 user32 gdi32 comdlg32 advapi32 shell32 ole32 oleaut32 uuid ws2_32 vfw32 winmm)
+                       set(PLATFORM_LINKLIBS ws2_32 vfw32 winmm kernel32 user32 gdi32 comdlg32 advapi32 shfolder shell32 ole32 oleaut32 uuid)
                endif()
-               
-               set(CMAKE_CXX_FLAGS "/D_CRT_NONSTDC_NO_DEPRECATE /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /we4013 /wd4018 /wd4800 /wd4244 /wd4305 /wd4065 /wd4267" CACHE STRING "MSVC MT C++ flags " FORCE)
-               set(CMAKE_C_FLAGS   "/D_CRT_NONSTDC_NO_DEPRECATE /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /we4013 /wd4018 /wd4800 /wd4244 /wd4305 /wd4065 /wd4267" CACHE STRING "MSVC MT C++ flags " FORCE)
+
+               add_definitions(/D_CRT_NONSTDC_NO_DEPRECATE /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_CONSOLE /D_LIB)
+
+               set(CMAKE_CXX_FLAGS "/nologo /J /W0 /Gd /wd4018 /wd4244 /wd4305 /wd4800 /wd4065 /wd4267 /we4013" CACHE STRING "MSVC MT C++ flags " FORCE)
+               set(CMAKE_C_FLAGS   "/nologo /J /W0 /Gd /wd4018 /wd4244 /wd4305 /wd4800 /wd4065 /wd4267 /we4013 /EHsc" CACHE STRING "MSVC MT C++ flags " FORCE)
 
                if(CMAKE_CL_64)
                        set(CMAKE_CXX_FLAGS_DEBUG "/D_DEBUG /Od /Gm /EHsc /RTC1 /MTd /W3 /nologo /Zi /J" CACHE STRING "MSVC MT flags " FORCE)
@@ -602,52 +635,67 @@ elseif(WIN32)
                endif()
                set(JPEG_LIBRARIES libjpeg)
 
-               set(ZLIB ${LIBDIR}/zlib)
-               set(ZLIB_INCLUDE_DIRS ${ZLIB}/include)
-               set(ZLIB_LIBPATH ${ZLIB}/lib)
+               set(ZLIB_INCLUDE_DIRS ${LIBDIR}/zlib/include)
                if(CMAKE_CL_64)
-                       set(ZLIB_LIBRARIES libz)
+                       set(ZLIB_LIBRARIES ${LIBDIR}/zlib/lib/libz.lib)
                else()
-                       set(ZLIB_LIBRARIES zlib)
+                       set(ZLIB_LIBRARIES ${LIBDIR}/zlib/lib/zlib.lib)
                endif()
 
-               set(PTHREADS ${LIBDIR}/pthreads)
-               set(PTHREADS_INC ${PTHREADS}/include)
-               set(PTHREADS_LIBPATH ${PTHREADS}/lib)
-               set(PTHREADS_LIB pthreadVC2)
-               
+               set(PTHREADS_INCLUDE_DIRS ${LIBDIR}/pthreads/include)
+               set(PTHREADS_LIBRARIES ${LIBDIR}/pthreads/lib/pthreadVC2.lib)
+
                set(FREETYPE ${LIBDIR}/freetype)
-               set(FREETYPE_INCLUDE_DIRS ${FREETYPE}/include ${FREETYPE}/include/freetype2)
-               set(FREETYPE_LIBPATH ${FREETYPE}/lib)
-               set(FREETYPE_LIBRARY freetype2ST)
+               set(FREETYPE_INCLUDE_DIRS
+                       ${LIBDIR}/freetype/include
+                       ${LIBDIR}/freetype/include/freetype2
+               )
+               set(FREETYPE_LIBRARY ${LIBDIR}/freetype/lib/freetype2ST.lib)
 
                if(WITH_FFTW3)
                        set(FFTW3 ${LIBDIR}/fftw3)
-                       set(FFTW3_LIB libfftw)
-                       set(FFTW3_INC ${FFTW3}/include)
+                       set(FFTW3_LIBRARIES libfftw)
+                       set(FFTW3_INCLUDE_DIRS ${FFTW3}/include)
                        set(FFTW3_LIBPATH ${FFTW3}/lib)
                endif()
 
                if(WITH_OPENCOLLADA)
-                       set(OPENCOLLADA ${LIBDIR}/opencollada)
-                       set(OPENCOLLADA_INC ${OPENCOLLADA}/include)
-                       set(OPENCOLLADA_LIBPATH ${OPENCOLLADA}/lib)
-                       set(OPENCOLLADA_LIB OpenCOLLADASaxFrameworkLoader OpenCOLLADAFramework OpenCOLLADABaseUtils OpenCOLLADAStreamWriter MathMLSolver GeneratedSaxParser xml2 buffer ftoa UTF)
-                       set(PCRE_LIB pcre)
+                       set(OPENCOLLADA_INCLUDE_DIR
+                               ${LIBDIR}/opencollada/include
+                       )
+                       set(OPENCOLLADA_LIBRARIES
+                               ${LIBDIR}/opencollada/lib/OpenCOLLADASaxFrameworkLoader.lib
+                               ${LIBDIR}/opencollada/lib/OpenCOLLADAFramework.lib
+                               ${LIBDIR}/opencollada/lib/OpenCOLLADABaseUtils.lib
+                               ${LIBDIR}/opencollada/lib/OpenCOLLADAStreamWriter.lib
+                               ${LIBDIR}/opencollada/lib/MathMLSolver.lib
+                               ${LIBDIR}/opencollada/lib/GeneratedSaxParser.lib
+                               ${LIBDIR}/opencollada/lib/xml2.lib
+                               ${LIBDIR}/opencollada/lib/buffer.lib
+                               ${LIBDIR}/opencollada/lib/ftoa.lib
+                               ${LIBDIR}/opencollada/lib/UTF.lib
+                       )
+                       set(PCRE_LIB
+                               ${LIBDIR}/opencollada/lib/pcre.lib
+                       )
                endif()
-       
+
                if(WITH_CODEC_FFMPEG)
-                       set(FFMPEG ${LIBDIR}/ffmpeg)
-                       set(FFMPEG_INC ${FFMPEG}/include ${FFMPEG}/include/msvc)
-                       set(FFMPEG_LIB avcodec-52 avformat-52 avdevice-52 avutil-50 swscale-0)
-                       set(FFMPEG_LIBPATH ${FFMPEG}/lib)
+                       set(FFMPEG_INCLUDE_DIRS
+                               ${LIBDIR}/ffmpeg/include
+                               ${LIBDIR}/ffmpeg/include/msvc
+                       )
+                       set(FFMPEG_LIBRARIES
+                               ${LIBDIR}/ffmpeg/lib/avcodec-52.lib
+                               ${LIBDIR}/ffmpeg/lib/avformat-52.lib
+                               ${LIBDIR}/ffmpeg/lib/avdevice-52.lib
+                               ${LIBDIR}/ffmpeg/lib/avutil-50.lib
+                               ${LIBDIR}/ffmpeg/lib/swscale-0.lib
+                       )
                endif()
 
                if(WITH_IMAGE_OPENEXR)
-                       if(MSVC80)
-                               set(MSVC_LIB _vs2005)
-                               set(MSVC_INC)
-                       elseif(MSVC90)
+                       if(MSVC90)
                                set(MSVC_LIB _vs2008)
                                set(MSVC_INC)
                        elseif(MSVC10)
@@ -657,53 +705,68 @@ elseif(WIN32)
                                set(MSVC_LIB msvc)
                                set(MSVC_INC)
                        endif()
-                       set(OPENEXR ${LIBDIR}/openexr)                  
-                       set(OPENEXR_LIB Iex Half IlmImf Imath IlmThread)
+                       set(OPENEXR ${LIBDIR}/openexr)
                        set(OPENEXR_LIBPATH ${OPENEXR}/lib${MSVC_LIB})
+                       set(OPENEXR_LIBRARIES
+                               ${OPENEXR_LIBPATH}/Iex.lib
+                               ${OPENEXR_LIBPATH}/Half.lib
+                               ${OPENEXR_LIBPATH}/IlmImf.lib
+                               ${OPENEXR_LIBPATH}/Imath.lib
+                               ${OPENEXR_LIBPATH}/IlmThread.lib
+                       )
                        set(OPENEXR_INCUDE ${OPENEXR}/include${MSVC_INC})
-                       set(OPENEXR_INC ${OPENEXR_INCUDE}/ ${OPENEXR_INCUDE}/IlmImf ${OPENEXR_INCUDE}/Iex ${OPENEXR_INCUDE}/Imath)
+                       set(OPENEXR_INCLUDE_DIRS
+                               ${OPENEXR_INCUDE}
+                               ${OPENEXR_INCUDE}/IlmImf
+                               ${OPENEXR_INCUDE}/Iex
+                               ${OPENEXR_INCUDE}/Imath
+                       )
+                       unset(OPENEXR_INCUDE)
+                       unset(OPENEXR_LIBPATH)
                endif()
 
                if(WITH_IMAGE_TIFF)
-                       set(TIFF ${LIBDIR}/tiff)
-                       set(TIFF_LIBRARY libtiff)
-                       set(TIFF_INCLUDE_DIR ${TIFF}/include)
-                       set(TIFF_LIBPATH ${TIFF}/lib)
+                       set(TIFF_LIBRARY ${LIBDIR}/tiff/lib/libtiff.lib)
+                       set(TIFF_INCLUDE_DIR ${LIBDIR}/tiff/include)
                endif()
 
                if(WITH_JACK)
-                       set(JACK ${LIBDIR}/jack)
-                       set(JACK_INC ${JACK}/include/jack ${JACK}/include)
-                       set(JACK_LIB libjack)
-                       set(JACK_LIBPATH ${JACK}/lib)
+                       set(JACK_INCLUDE_DIRS
+                               ${LIBDIR}/jack/include/jack
+                               ${LIBDIR}/jack/include
+                       )
+                       set(JACK_LIBRARIES ${LIBDIR}/jack/lib/libjack.lib)
                endif()
 
                if(WITH_PYTHON)
-                       set(PYTHON ${LIBDIR}/python)
-                       set(PYTHON_VERSION 3.2)
-                       set(PYTHON_INCLUDE_DIRS "${PYTHON}/include/python${PYTHON_VERSION}")
-                       # set(PYTHON_BINARY python) # not used yet
-                       set(PYTHON_LIBRARY python32)
-                       set(PYTHON_LIBPATH ${PYTHON}/lib)
+                       # normally cached but not since we include them with blender
+                       set(PYTHON_VERSION 3.2) # CACHE STRING)
+                       set(PYTHON_INCLUDE_DIR "${LIBDIR}/python/include/python${PYTHON_VERSION}") # CACHE PATH)
+                       set(PYTHON_LIBRARY "${LIBDIR}/python/lib/python32.lib") #CACHE FILEPATH)
+
+                       # uncached vars
+                       set(PYTHON_INCLUDE_DIRS "${PYTHON_INCLUDE_DIR}")
+                       set(PYTHON_LIBRARIES  "${PYTHON_LIBRARY}")
                endif()
 
+               set(PLATFORM_LINKFLAGS "/SUBSYSTEM:CONSOLE /STACK:2097152 /INCREMENTAL:NO /NODEFAULTLIB:msvcrt.lib /NODEFAULTLIB:msvcmrt.lib /NODEFAULTLIB:msvcurt.lib /NODEFAULTLIB:msvcrtd.lib")
+
                # MSVC only, Mingw doesnt need
                if(CMAKE_CL_64)
-                       set(PLATFORM_LINKFLAGS "/MACHINE:X64 /NODEFAULTLIB:libc.lib /STACK:2097152 ")
+                       set(PLATFORM_LINKFLAGS "/MACHINE:X64 /OPT:NOREF ${PLATFORM_LINKFLAGS}")
                else()
-                       set(PLATFORM_LINKFLAGS "/NODEFAULTLIB:libc.lib /STACK:2097152 ")
+                       set(PLATFORM_LINKFLAGS "/MACHINE:IX86 /LARGEADDRESSAWARE ${PLATFORM_LINKFLAGS}")
                endif()
 
-               set(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} /NODEFAULTLIB:libcmt.lib;libc.lib ")
+               set(PLATFORM_LINKFLAGS_DEBUG "/NODEFAULTLIB:libcmt.lib /NODEFAULTLIB:libc.lib")
 
        else()
                # keep GCC spesific stuff here
                if(CMAKE_COMPILER_IS_GNUCC)
-                       set(LLIBS "-lshell32 -lshfolder -lgdi32 -lmsvcrt -lwinmm -lmingw32 -lm -lws2_32 -lz -lstdc++ -lole32 -luuid")
+                       set(PLATFORM_LINKLIBS "-lshell32 -lshfolder -lgdi32 -lmsvcrt -lwinmm -lmingw32 -lm -lws2_32 -lz -lstdc++ -lole32 -luuid")
                        set(PLATFORM_CFLAGS "-pipe -funsigned-char -fno-strict-aliasing")
 
-                       set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE")
-                       set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE")
+                       add_definitions(-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE)
                endif()
 
                add_definitions(-DFREE_WINDOWS)
@@ -727,9 +790,9 @@ elseif(WIN32)
                set(ZLIB_LIBRARIES z)
 
                set(PTHREADS ${LIBDIR}/pthreads)
-               set(PTHREADS_INC ${PTHREADS}/include)
+               set(PTHREADS_INCLUDE_DIRS ${PTHREADS}/include)
                set(PTHREADS_LIBPATH ${PTHREADS}/lib)
-               set(PTHREADS_LIB pthreadGC2)
+               set(PTHREADS_LIBRARIES pthreadGC2)
                
                set(FREETYPE ${LIBDIR}/gcc/freetype)
                set(FREETYPE_INCLUDE_DIRS ${FREETYPE}/include ${FREETYPE}/include/freetype2)
@@ -738,34 +801,31 @@ elseif(WIN32)
 
                if(WITH_FFTW3)
                        set(FFTW3 ${LIBDIR}/gcc/fftw3)
-                       set(FFTW3_LIB fftw3)
-                       set(FFTW3_INC ${FFTW3}/include)
+                       set(FFTW3_LIBRARIES fftw3)
+                       set(FFTW3_INCLUDE_DIRS ${FFTW3}/include)
                        set(FFTW3_LIBPATH ${FFTW3}/lib)
                endif()
 
                if(WITH_OPENCOLLADA)
                        set(OPENCOLLADA ${LIBDIR}/gcc/opencollada)
-                       set(OPENCOLLADA_INC ${OPENCOLLADA}/include)
+                       set(OPENCOLLADA_INCLUDE_DIR ${OPENCOLLADA}/include)
                        set(OPENCOLLADA_LIBPATH ${OPENCOLLADA}/lib ${OPENCOLLADA}/lib)
-                       set(OPENCOLLADA_LIB OpenCOLLADAStreamWriter OpenCOLLADASaxFrameworkLoader OpenCOLLADAFramework OpenCOLLADABaseUtils GeneratedSaxParser UTF MathMLSolver expat pcre buffer ftoa)
+                       set(OPENCOLLADA_LIBRARIES OpenCOLLADAStreamWriter OpenCOLLADASaxFrameworkLoader OpenCOLLADAFramework OpenCOLLADABaseUtils GeneratedSaxParser UTF MathMLSolver expat pcre buffer ftoa)
                        set(PCRE_LIB pcre)
                endif()
                
                if(WITH_CODEC_FFMPEG)
                        set(FFMPEG ${LIBDIR}/ffmpeg)
-                       set(FFMPEG_INC ${FFMPEG}/include ${FFMPEG}/include)
-                       set(FFMPEG_LIB avcodec-52 avformat-52 avdevice-52 avutil-50 swscale-0)
+                       set(FFMPEG_INCLUDE_DIRS ${FFMPEG}/include ${FFMPEG}/include)
+                       set(FFMPEG_LIBRARIES avcodec-52 avformat-52 avdevice-52 avutil-50 swscale-0)
                        set(FFMPEG_LIBPATH ${FFMPEG}/lib)
                endif()
 
                if(WITH_IMAGE_OPENEXR)
                        set(OPENEXR ${LIBDIR}/gcc/openexr)
-                       set(OPENEXR_INC ${OPENEXR}/include ${OPENEXR}/include/OpenEXR)
-                       set(OPENEXR_LIB Half IlmImf Imath IlmThread)
+                       set(OPENEXR_INCLUDE_DIRS ${OPENEXR}/include/OpenEXR)
+                       set(OPENEXR_LIBRARIES Half IlmImf Imath IlmThread Iex)
                        set(OPENEXR_LIBPATH ${OPENEXR}/lib)
-
-                       # TODO, gives linking errors, force off
-                       set(WITH_IMAGE_OPENEXR OFF)
                endif()
 
                if(WITH_IMAGE_TIFF)
@@ -777,8 +837,8 @@ elseif(WIN32)
 
                if(WITH_JACK)
                        set(JACK ${LIBDIR}/jack)
-                       set(JACK_INC ${JACK}/include/jack ${JACK}/include)
-                       set(JACK_LIB jack)
+                       set(JACK_INCLUDE_DIRS ${JACK}/include/jack ${JACK}/include)
+                       set(JACK_LIBRARIES jack)
                        set(JACK_LIBPATH ${JACK}/lib)
                        
                        # TODO, gives linking errors, force off
@@ -786,12 +846,14 @@ elseif(WIN32)
                endif()
 
                if(WITH_PYTHON)
-                       set(PYTHON ${LIBDIR}/python)
-                       set(PYTHON_VERSION 3.2)
-                       set(PYTHON_INCLUDE_DIRS "${PYTHON}/include/python${PYTHON_VERSION}")
-                       # set(PYTHON_BINARY python) # not used yet
-                       set(PYTHON_LIBRARY python32mw)
-                       set(PYTHON_LIBPATH ${PYTHON}/lib)
+                       # normally cached but not since we include them with blender
+                       set(PYTHON_VERSION 3.2) #  CACHE STRING)
+                       set(PYTHON_INCLUDE_DIR "${LIBDIR}/python/include/python${PYTHON_VERSION}")  # CACHE PATH)
+                       set(PYTHON_LIBRARY "${LIBDIR}/python/lib/python32mw.lib")  # CACHE FILEPATH)
+
+                       # uncached vars
+                       set(PYTHON_INCLUDE_DIRS "${PYTHON_INCLUDE_DIR}")
+                       set(PYTHON_LIBRARIES  "${PYTHON_LIBRARY}")
                endif()
 
                set(PLATFORM_LINKFLAGS "--stack,2097152")
@@ -799,7 +861,7 @@ elseif(WIN32)
        endif()
 
        # used in many places so include globally, like OpenGL
-       blender_include_dirs("${PTHREADS_INC}")
+       blender_include_dirs("${PTHREADS_INCLUDE_DIRS}")
 
 elseif(APPLE)
 
@@ -830,39 +892,45 @@ elseif(APPLE)
 
        if(WITH_JACK)
                set(JACK /usr)
-               set(JACK_INC ${JACK}/include/jack)
-               set(JACK_LIB jack)
+               set(JACK_INCLUDE_DIRS ${JACK}/include/jack)
+               set(JACK_LIBRARIES jack)
                set(JACK_LIBPATH ${JACK}/lib)
        endif()
 
        if(WITH_CODEC_SNDFILE)
                set(SNDFILE ${LIBDIR}/sndfile)
-               set(SNDFILE_INC ${SNDFILE}/include)
-               set(SNDFILE_LIB sndfile FLAC ogg vorbis vorbisenc)
-               set(SNDFILE_LIBPATH ${SNDFILE}/lib ${FFMPEG}/lib)
+               set(SNDFILE_INCLUDE_DIRS ${SNDFILE}/include)
+               set(SNDFILE_LIBRARIES sndfile FLAC ogg vorbis vorbisenc)
+               set(SNDFILE_LIBPATH ${SNDFILE}/lib ${FFMPEG}/lib)  # TODO, deprecate
        endif()
 
-       set(PYTHON_VERSION 3.2)
-
-       if(PYTHON_VERSION MATCHES 3.2)
-               # we use precompiled libraries for py 3.2 and up by default
-
-               set(PYTHON ${LIBDIR}/python)
-               set(PYTHON_INCLUDE_DIRS "${PYTHON}/include/python${PYTHON_VERSION}")
-               # set(PYTHON_BINARY "${PYTHON}/bin/python${PYTHON_VERSION}") # not used yet
-               set(PYTHON_LIBRARY python${PYTHON_VERSION})
-               set(PYTHON_LIBPATH "${PYTHON}/lib/python${PYTHON_VERSION}")
-               # set(PYTHON_LINKFLAGS "-u _PyMac_Error")  # won't  build with this enabled
-       else()
-               # otherwise, use custom system framework
-
-               set(PYTHON /System/Library/Frameworks/Python.framework/Versions/)
+       if(WITH_PYTHON)
                set(PYTHON_VERSION 3.2)
-               set(PYTHON_INCLUDE_DIRS "${PYTHON}${PYTHON_VERSION}/include/python${PYTHON_VERSION}")
-               # set(PYTHON_BINARY ${PYTHON}${PYTHON_VERSION}/bin/python${PYTHON_VERSION}) # not used yet
-               set(PYTHON_LIBRARY "")
-               set(PYTHON_LIBPATH ${PYTHON}${PYTHON_VERSION}/lib/python${PYTHON_VERSION}/config)
-               set(PYTHON_LINKFLAGS "-u _PyMac_Error -framework System -framework Python")
+               if(PYTHON_VERSION MATCHES 3.2)
+                       # we use precompiled libraries for py 3.2 and up by default
+
+                       # normally cached but not since we include them with blender
+                       set(PYTHON_INCLUDE_DIR "${LIBDIR}/python/include/python${PYTHON_VERSION}")
+                       # set(PYTHON_BINARY "${LIBDIR}/python/bin/python${PYTHON_VERSION}") # not used yet
+                       set(PYTHON_LIBRARY python${PYTHON_VERSION})
+                       set(PYTHON_LIBPATH "${LIBDIR}/python/lib/python${PYTHON_VERSION}")
+                       # set(PYTHON_LINKFLAGS "-u _PyMac_Error")  # won't  build with this enabled
+               else()
+                       # otherwise, use custom system framework
+                       # *not used but maintained incase some dev wants to*
+
+                       set(PYTHON "/System/Library/Frameworks/Python.framework/Versions/" CACHE PATH)
+                       set(PYTHON_INCLUDE_DIR "${PYTHON}${PYTHON_VERSION}/include/python${PYTHON_VERSION}" CACHE PATH)
+                       # set(PYTHON_BINARY ${PYTHON}${PYTHON_VERSION}/bin/python${PYTHON_VERSION}) # not used yet
+                       set(PYTHON_LIBRARY "" CACHE FILEPATH)
+                       set(PYTHON_LIBPATH "${PYTHON}${PYTHON_VERSION}/lib/python${PYTHON_VERSION}/config" CACHE PATH)
+                       set(PYTHON_LINKFLAGS "-u _PyMac_Error -framework System -framework Python" CACHE STRING)
+                       unset(PYTHON)
+               endif()
+
+               # uncached vars
+               set(PYTHON_INCLUDE_DIRS "${PYTHON_INCLUDE_DIR}")
+               set(PYTHON_LIBRARIES  "${PYTHON_LIBRARY}")
        endif()
 
        if(WITH_INTERNATIONAL)
@@ -874,8 +942,8 @@ elseif(APPLE)
 
        if(WITH_FFTW3)
                set(FFTW3 ${LIBDIR}/fftw3)
-               set(FFTW3_INC ${FFTW3}/include)
-               set(FFTW3_LIB fftw3)
+               set(FFTW3_INCLUDE_DIRS ${FFTW3}/include)
+               set(FFTW3_LIBRARIES fftw3)
                set(FFTW3_LIBPATH ${FFTW3}/lib)
        endif()
 
@@ -893,27 +961,27 @@ elseif(APPLE)
 
        if(WITH_IMAGE_OPENEXR)
                set(OPENEXR ${LIBDIR}/openexr)
-               set(OPENEXR_INC ${OPENEXR}/include/OpenEXR ${OPENEXR}/include)
-               set(OPENEXR_LIB Iex Half IlmImf Imath IlmThread)
+               set(OPENEXR_INCLUDE_DIRS ${OPENEXR}/include/OpenEXR)
+               set(OPENEXR_LIBRARIES Iex Half IlmImf Imath IlmThread)
                set(OPENEXR_LIBPATH ${OPENEXR}/lib)
        endif()
 
        if(WITH_CODEC_FFMPEG)
                set(FFMPEG ${LIBDIR}/ffmpeg)
-               set(FFMPEG_INC ${FFMPEG}/include)
-               set(FFMPEG_LIB avcodec avdevice avformat avutil mp3lame swscale x264 xvidcore theora theoradec theoraenc vorbis vorbisenc vorbisfile ogg)
+               set(FFMPEG_INCLUDE_DIRS ${FFMPEG}/include)
+               set(FFMPEG_LIBRARIES avcodec avdevice avformat avutil mp3lame swscale x264 xvidcore theora theoradec theoraenc vorbis vorbisenc vorbisfile ogg)
                set(FFMPEG_LIBPATH ${FFMPEG}/lib)
                set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D__STDC_CONSTANT_MACROS")
        endif()
 
        if(WITH_SAMPLERATE)
-               set(LIBSAMPLERATE ${LIBDIR}/samplerate)
-               set(LIBSAMPLERATE_INC ${LIBSAMPLERATE}/include)
-               set(LIBSAMPLERATE_LIB samplerate)
-               set(LIBSAMPLERATE_LIBPATH ${LIBSAMPLERATE}/lib)
+               set(SAMPLERATE ${LIBDIR}/samplerate)
+               set(SAMPLERATE_INCLUDE_DIRS ${SAMPLERATE}/include)
+               set(SAMPLERATE_LIBRARIES samplerate)
+               set(SAMPLERATE_LIBPATH ${SAMPLERATE}/lib)
        endif()
 
-       set(LLIBS stdc++ SystemStubs)
+       set(PLATFORM_LINKLIBS stdc++ SystemStubs)
 
        if(WITH_COCOA)
                set(PLATFORM_CFLAGS "-pipe -funsigned-char -DGHOST_COCOA")
@@ -935,9 +1003,9 @@ elseif(APPLE)
 
        if(WITH_OPENCOLLADA)
                set(OPENCOLLADA ${LIBDIR}/opencollada)
-               set(OPENCOLLADA_INC ${OPENCOLLADA}/include)
+               set(OPENCOLLADA_INCLUDE_DIR ${OPENCOLLADA}/include)
                set(OPENCOLLADA_LIBPATH ${OPENCOLLADA}/lib)
-               set(OPENCOLLADA_LIB "OpenCOLLADASaxFrameworkLoader -lOpenCOLLADAFramework -lOpenCOLLADABaseUtils -lOpenCOLLADAStreamWriter -lMathMLSolver -lGeneratedSaxParser -lUTF -lxml2 -lbuffer -lftoa" )
+               set(OPENCOLLADA_LIBRARIES "OpenCOLLADASaxFrameworkLoader -lOpenCOLLADAFramework -lOpenCOLLADABaseUtils -lOpenCOLLADAStreamWriter -lMathMLSolver -lGeneratedSaxParser -lUTF -lxml2 -lbuffer -lftoa" )
                #pcre is bundled with openCollada
                #set(PCRE ${LIBDIR}/pcre)
                #set(PCRE_LIBPATH ${PCRE}/lib)
@@ -995,7 +1063,7 @@ endif()
 # Common.
 
 if(APPLE OR WIN32)
-       if(NOT IS_DIRECTORY "${LIBDIR}")
+       if(NOT EXISTS "${LIBDIR}/")
                message(FATAL_ERROR "Apple and Windows require pre-compiled libs at: '${LIBDIR}'")
        endif()
 endif()
@@ -1018,13 +1086,9 @@ endif()
 
 if(WITH_IMAGE_OPENJPEG)
        if(UNIX AND NOT APPLE)
-               set(OPENJPEG /usr)
-               set(OPENJPEG_INC ${OPENJPEG}/include)
-               set(OPENJPEG_LIB openjpeg)
-               set(OPENJPEG_LIBPATH ${OPENJPEG}/lib)
+               # dealt with above
        else()
-               set(OPENJPEG ${CMAKE_SOURCE_DIR}/extern/libopenjpeg)
-               set(OPENJPEG_INC ${OPENJPEG})
+               set(OPENJPEG_INCLUDE_DIRS "${CMAKE_SOURCE_DIR}/extern/libopenjpeg")
        endif()
 endif()
 
@@ -1047,7 +1111,7 @@ endif()
 #-----------------------------------------------------------------------------
 # Configure OpenGL.
 find_package(OpenGL)
-blender_include_dirs("${OPENGL_INCLUDE_DIR}")
+blender_include_dirs_sys("${OPENGL_INCLUDE_DIR}")
 # unset(OPENGL_LIBRARIES CACHE) # not compat with older cmake 
 # unset(OPENGL_xmesa_INCLUDE_DIR CACHE) # not compat with older cmake 
 
@@ -1146,6 +1210,18 @@ elseif(CMAKE_C_COMPILER_ID MATCHES "Intel")
 
 endif()
 
+# MSVC2010 fails to links C++ libs right
+if(MSVC10)
+       if(WITH_IMAGE_OPENEXR)
+               message(WARNING "MSVC 2010 does not support OpenEXR, disabling WITH_IMAGE_OPENEXR. To enable support use Use MSVC 2008")
+               set(WITH_IMAGE_OPENEXR OFF)
+       endif()
+       if(WITH_OPENCOLLADA)
+               message(WARNING "MSVC 2010 does not support OpenCollada, disabling WITH_OPENCOLLADA. To enable support use Use MSVC 2008")
+               set(WITH_OPENCOLLADA OFF)
+       endif()
+endif()
+
 if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
        if(WITH_IK_ITASC OR WITH_MOD_FLUID)
                message(WARNING "Using Clang as CXX compiler: disabling WITH_IK_ITASC and WITH_MOD_FLUID, these features will be missing.")
@@ -1154,6 +1230,20 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
        endif()
 endif()
 
+
+# ensure python header is found since detection can fail, this could happen
+# with _any_ library but since we used a fixed python version this tends to
+# be most problematic.
+if(WITH_PYTHON)
+       if(NOT EXISTS "${PYTHON_INCLUDE_DIR}/Python.h")
+               message(FATAL_ERROR "Missing: \"${PYTHON_INCLUDE_DIR}/Python.h\",\n"
+                                                       "Set the cache entry 'PYTHON_INCLUDE_DIR' to point "
+                                                       "to a valid python include path. Containing "
+                                                       "Python.h for python version \"${PYTHON_VERSION}\"")
+       endif()
+endif()
+
+
 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${PLATFORM_CFLAGS} ${C_WARNINGS}")
 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${PLATFORM_CFLAGS} ${CXX_WARNINGS}")
 
@@ -1182,7 +1272,9 @@ add_subdirectory(extern)
 
 #-----------------------------------------------------------------------------
 # Blender Application
-add_subdirectory(source/creator)
+if(WITH_BLENDER)
+       add_subdirectory(source/creator)
+endif()
 
 
 #-----------------------------------------------------------------------------
@@ -1194,3 +1286,83 @@ endif()
 #-----------------------------------------------------------------------------
 # CPack for generating packages
 include(build_files/cmake/packaging.cmake)
+
+
+#-----------------------------------------------------------------------------
+# Print Final Configuration
+
+if(FIRST_RUN)
+       set(_config_msg "\n* Blender Configuration *")
+       macro(info_cfg_option
+               _setting)
+               set(_msg "   * ${_setting}")
+               string(LENGTH "${_msg}" _len)
+               while("28" GREATER "${_len}")
+                       set(_msg "${_msg} ")
+                        math(EXPR _len "${_len} + 1")
+               endwhile()
+
+               set(_config_msg "${_config_msg}\n${_msg}${${_setting}}")
+       endmacro()
+
+       macro(info_cfg_text
+               _text)
+               set(_config_msg "${_config_msg}\n\n  ${_text}")
+               
+               
+       endmacro()
+
+       info_cfg_text("Build Options:")
+       info_cfg_option(WITH_GAMEENGINE)
+       info_cfg_option(WITH_PLAYER)
+       info_cfg_option(WITH_BULLET)
+       info_cfg_option(WITH_IK_ITASC)
+       info_cfg_option(WITH_OPENCOLLADA)
+       info_cfg_option(WITH_FFTW3)
+       info_cfg_option(WITH_INTERNATIONAL)
+
+       info_cfg_text("Compiler Options:")
+       info_cfg_option(WITH_BUILDINFO)
+       info_cfg_option(WITH_OPENMP)
+       info_cfg_option(WITH_RAYOPTIMIZATION)
+
+       info_cfg_text("System Options:")
+       info_cfg_option(WITH_INSTALL_PORTABLE)
+       info_cfg_option(WITH_X11_XINPUT)
+       info_cfg_option(WITH_BUILTIN_GLEW)
+
+       info_cfg_text("Image Formats:")
+       info_cfg_option(WITH_IMAGE_CINEON)
+       info_cfg_option(WITH_IMAGE_DDS)
+       info_cfg_option(WITH_IMAGE_HDR)
+       info_cfg_option(WITH_IMAGE_OPENEXR)
+       info_cfg_option(WITH_IMAGE_OPENJPEG)
+       info_cfg_option(WITH_IMAGE_REDCODE)
+       info_cfg_option(WITH_IMAGE_TIFF)
+
+       info_cfg_text("Audio:")
+       info_cfg_option(WITH_OPENAL)
+       info_cfg_option(WITH_SDL)
+       info_cfg_option(WITH_JACK)
+       info_cfg_option(WITH_CODEC_FFMPEG)
+       info_cfg_option(WITH_CODEC_SNDFILE)
+       info_cfg_option(WITH_SAMPLERATE)
+
+       info_cfg_text("Compression:")
+       info_cfg_option(WITH_LZMA)
+       info_cfg_option(WITH_LZO)
+
+       info_cfg_text("Python:")
+       info_cfg_option(WITH_PYTHON_INSTALL)
+       info_cfg_option(WITH_PYTHON_MODULE)
+       info_cfg_option(WITH_PYTHON_SAFETY)
+
+       info_cfg_text("Modifiers:")
+       info_cfg_option(WITH_MOD_BOOLEAN)
+       info_cfg_option(WITH_MOD_DECIMATE)
+       info_cfg_option(WITH_MOD_FLUID)
+
+       info_cfg_text("")
+
+       message("${_config_msg}")
+endif()
index 47073bf573488650ccea7d84641e3658c0afe8f9..b6741d7e5f0654a381f2bd074ef97611d92e6e5b 100644 (file)
@@ -73,9 +73,10 @@ all:
 
        @echo
        @echo Building Blender ...
-       make -C $(BUILD_DIR) -s -j $(NPROCS) install
+       $(MAKE) -C $(BUILD_DIR) -s -j $(NPROCS) install
        @echo
-       @echo run blender from "$(BUILD_DIR)/bin/blender"
+       @echo edit build configuration with: "$(BUILD_DIR)/CMakeCache.txt" run make again to rebuild.
+       @echo blender installed, run from: "$(BUILD_DIR)/bin/blender"
        @echo
 
 debug: all
@@ -98,15 +99,19 @@ test:
 
 # run pep8 check check on scripts we distribute.
 test_pep8:
-       python source/tests/pep8.py > test_pep8.log 2>&1
+       python3 source/tests/pep8.py > test_pep8.log 2>&1
        @echo "written: test_pep8.log"
 
 # run some checks on our cmakefiles.
 test_cmake:
-       python build_files/cmake/cmake_consistency_check.py > test_cmake_consistency.log 2>&1
+       python3 build_files/cmake/cmake_consistency_check.py > test_cmake_consistency.log 2>&1
        @echo "written: test_cmake_consistency.log"
 
+# run deprecation tests, see if we have anything to remove.
+test_deprecated:
+       python3 source/tests/check_deprecated.py
+
 clean:
-       make -C $(BUILD_DIR) clean
+       $(MAKE) -C $(BUILD_DIR) clean
 
 .PHONY: all
index e928970f6b84da541facf6d2801ca789b68d9e52..053f414c954dcb8cc545c5a9f12781dde5519e68 100644 (file)
@@ -306,9 +306,10 @@ if env['BF_NO_ELBEEM'] == 1:
     env['CXXFLAGS'].append('-DDISABLE_ELBEEM')
     env['CCFLAGS'].append('-DDISABLE_ELBEEM')
 
-if env['WITH_BF_SDL'] == False and env['OURPLATFORM'] in ('win32-vc', 'win32-ming', 'win64-vc'):
-    env['PLATFORM_LINKFLAGS'].remove('/ENTRY:mainCRTStartup')
-    env['PLATFORM_LINKFLAGS'].append('/ENTRY:main')
+# TODO, make optional
+env['CPPFLAGS'].append('-DWITH_AUDASPACE')
+env['CXXFLAGS'].append('-DWITH_AUDASPACE')
+env['CCFLAGS'].append('-DWITH_AUDASPACE')
 
 # lastly we check for root_build_dir ( we should not do before, otherwise we might do wrong builddir
 B.root_build_dir = env['BF_BUILDDIR']
@@ -360,6 +361,23 @@ if not quickie and do_clean:
         print B.bc.HEADER+'Already Clean, nothing to do.'+B.bc.ENDC
     Exit()
 
+
+# ensure python header is found since detection can fail, this could happen
+# with _any_ library but since we used a fixed python version this tends to
+# be most problematic.
+if env['WITH_BF_PYTHON']:
+       py_h = os.path.join(Dir(env.subst('${BF_PYTHON_INC}')).abspath, "Python.h")
+
+       if not os.path.exists(py_h):
+               print("\nMissing: \"" + env.subst('${BF_PYTHON_INC}') + os.sep + "Python.h\",\n"
+                         "  Set 'BF_PYTHON_INC' to point "
+                         "to a valid python include path.\n  Containing "
+                         "Python.h for python version \"" + env.subst('${BF_PYTHON_VERSION}') + "\"")
+
+               Exit()
+       del py_h
+
+
 if not os.path.isdir ( B.root_build_dir):
     os.makedirs ( B.root_build_dir )
     os.makedirs ( B.root_build_dir + 'source' )
@@ -409,17 +427,18 @@ if B.arguments.get('BF_PRIORITYLIST', '0')=='1':
     B.propose_priorities()
 
 dobj = B.buildinfo(env, "dynamic") + B.resources
+creob = B.creator(env)
 thestatlibs, thelibincs = B.setup_staticlibs(env)
 thesyslibs = B.setup_syslibs(env)
 
 if 'blender' in B.targets or not env['WITH_BF_NOBLENDER']:
-    env.BlenderProg(B.root_build_dir, "blender", mainlist + thestatlibs + dobj, thesyslibs, [B.root_build_dir+'/lib'] + thelibincs, 'blender')
+    env.BlenderProg(B.root_build_dir, "blender", creob + mainlist + thestatlibs + dobj, thesyslibs, [B.root_build_dir+'/lib'] + thelibincs, 'blender')
 if env['WITH_BF_PLAYER']:
     playerlist = B.create_blender_liblist(env, 'player')
     playerlist += B.create_blender_liblist(env, 'player2')
     playerlist += B.create_blender_liblist(env, 'intern')
     playerlist += B.create_blender_liblist(env, 'extern')
-    env.BlenderProg(B.root_build_dir, "blenderplayer",  playerlist + thestatlibs + dobj, thesyslibs, [B.root_build_dir+'/lib'] + thelibincs, 'blenderplayer')
+    env.BlenderProg(B.root_build_dir, "blenderplayer", dobj + playerlist + thestatlibs, thesyslibs, [B.root_build_dir+'/lib'] + thelibincs, 'blenderplayer')
 
 ##### Now define some targets
 
index b4d69a289eecd0d7f83fbe78109e30985f7345a1..fd712f1b832c8c58c70ecc41f76e6bfb651d11c8 100644 (file)
@@ -74,6 +74,7 @@ def svn_step(branch=''):
     else:
         return SVN(baseURL='https://svn.blender.org/svnroot/bf-blender/%%BRANCH%%/blender', mode='update', defaultBranch='trunk', workdir='blender')
 
+
 def lib_svn_step(dir):
     return SVN(name='lib svn', baseURL='https://svn.blender.org/svnroot/bf-blender/%%BRANCH%%/lib/' + dir, mode='update', defaultBranch='trunk', workdir='lib/' + dir)
 
index 3e1dec726e5035538134f7bdd7cf88310fd6f452..ad7c09933c69ad2058d4b0dcc366733ba988c28b 100644 (file)
@@ -64,10 +64,11 @@ def get_platform(filename):
 
     return '-'.join(platform_tokens)
 
+
 def get_branch(filename):
     tokens = filename.split("-")
     branch = ""
-    
+
     for token in tokens:
         if branch == "":
             branch = token
index cdc7cff32754a13082daa205aafc98bdbf586e51..4c19b723fc8635061ab12d6bf0c71bb2cedecab4 100644 (file)
@@ -36,7 +36,7 @@ builder = sys.argv[1]
 branch = ''
 
 if len(sys.argv) >= 3:
-       branch = sys.argv[2]
+    branch = sys.argv[2]
 
 # scons does own packaging
 if builder.find('scons') != -1:
diff --git a/build_files/cmake/FindPythonLibsUnix.cmake b/build_files/cmake/FindPythonLibsUnix.cmake
deleted file mode 100644 (file)
index 0752de4..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-# - Find python libraries
-#
-#  PYTHON_VERSION
-#  PYTHON_INCLUDE_DIRS
-#  PYTHON_LIBRARY
-#  PYTHON_LIBPATH
-#  PYTHON_LINKFLAGS
-
-#=============================================================================
-
-set(PYTHON_VERSION 3.2 CACHE STRING "")
-mark_as_advanced(PYTHON_VERSION)
-
-set(PYTHON_LINKFLAGS "-Xlinker -export-dynamic")
-mark_as_advanced(PYTHON_LINKFLAGS)
-
-set(_Python_ABI_FLAGS
-       "m;mu;u; ")
-
-string(REPLACE "." "" _PYTHON_VERSION_NO_DOTS ${PYTHON_VERSION})
-set(_Python_PATHS
-  "$ENV{HOME}/py${_PYTHON_VERSION_NO_DOTS}" "/opt/py${_PYTHON_VERSION_NO_DOTS}" "/usr" "/usr/local")
-
-if(NOT DEFINED PYTHON_INCLUDE_DIRS)
-       message(STATUS "Looking for include Python.h")
-       set(_Found_PYTHON_H OFF)
-
-       foreach(_CURRENT_PATH ${_Python_PATHS})
-               foreach(_CURRENT_ABI_FLAGS ${_Python_ABI_FLAGS})
-                       if(CMAKE_BUILD_TYPE STREQUAL Debug)
-                               set(_CURRENT_ABI_FLAGS "d${_CURRENT_ABI_FLAGS}")
-                       endif()
-                       string(REPLACE " " "" _CURRENT_ABI_FLAGS ${_CURRENT_ABI_FLAGS})
-
-                       set(_Python_HEADER "${_CURRENT_PATH}/include/python${PYTHON_VERSION}${_CURRENT_ABI_FLAGS}/Python.h")
-
-                       if(EXISTS ${_Python_HEADER})
-                               message(STATUS "Checking for header: ${_Python_HEADER} - found")
-                               set(_Found_PYTHON_H ON)
-                               set(PYTHON ${_CURRENT_PATH})
-                               set(PYTHON_ABI_FLAGS ${_CURRENT_ABI_FLAGS})
-                               break()
-                       else()
-                               message(STATUS "Checking for header: ${_Python_HEADER}")
-                       endif()
-               endforeach()
-               
-               if(_Found_PYTHON_H)
-                       break()
-               endif()
-       endforeach()
-
-       if(NOT _Found_PYTHON_H)
-               message(FATAL_ERROR "Python.h not found")
-       endif()
-endif()
-
-#=============================================================================
-# now the python versions are found
-
-
-set(PYTHON_INCLUDE_DIRS "${PYTHON}/include/python${PYTHON_VERSION}${PYTHON_ABI_FLAGS}" CACHE STRING "")
-mark_as_advanced(PYTHON_INCLUDE_DIRS)
-set(PYTHON_LIBRARY "python${PYTHON_VERSION}${PYTHON_ABI_FLAGS}" CACHE STRING "")
-mark_as_advanced(PYTHON_LIBRARY)
-set(PYTHON_LIBPATH ${PYTHON}/lib CACHE STRING "")
-mark_as_advanced(PYTHON_LIBPATH)
-# set(PYTHON_BINARY ${PYTHON_EXECUTABLE} CACHE STRING "")
-
-if(NOT EXISTS "${PYTHON_INCLUDE_DIRS}/Python.h")
-       message(FATAL_ERROR " Missing python header: ${PYTHON_INCLUDE_DIRS}/Python.h")
-endif()
diff --git a/build_files/cmake/Modules/FindFftw3.cmake b/build_files/cmake/Modules/FindFftw3.cmake
new file mode 100644 (file)
index 0000000..197d4aa
--- /dev/null
@@ -0,0 +1,70 @@
+# - Find Fftw3 library
+# Find the native Fftw3 includes and library
+# This module defines
+#  FFTW3_INCLUDE_DIRS, where to find fftw3.h, Set when
+#                        FFTW3_INCLUDE_DIR is found.
+#  FFTW3_LIBRARIES, libraries to link against to use Fftw3.
+#  FFTW3_ROOT_DIR, The base directory to search for Fftw3.
+#                    This can also be an environment variable.
+#  FFTW3_FOUND, If false, do not try to use Fftw3.
+#
+# also defined, but not for general use are
+#  FFTW3_LIBRARY, where to find the Fftw3 library.
+
+#=============================================================================
+# Copyright 2011 Blender Foundation.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+
+# If FFTW3_ROOT_DIR was defined in the environment, use it.
+IF(NOT FFTW3_ROOT_DIR AND NOT $ENV{FFTW3_ROOT_DIR} STREQUAL "")
+  SET(FFTW3_ROOT_DIR $ENV{FFTW3_ROOT_DIR})
+ENDIF()
+
+SET(_fftw3_SEARCH_DIRS
+  ${FFTW3_ROOT_DIR}
+  /usr/local
+  /sw # Fink
+  /opt/local # DarwinPorts
+  /opt/csw # Blastwave
+)
+
+FIND_PATH(FFTW3_INCLUDE_DIR
+  NAMES
+    fftw3.h
+  HINTS
+    ${_fftw3_SEARCH_DIRS}
+  PATH_SUFFIXES
+    include
+)
+
+FIND_LIBRARY(FFTW3_LIBRARY
+  NAMES
+    fftw3
+  HINTS
+    ${_fftw3_SEARCH_DIRS}
+  PATH_SUFFIXES
+    lib64 lib
+  )
+
+# handle the QUIETLY and REQUIRED arguments and set FFTW3_FOUND to TRUE if 
+# all listed variables are TRUE
+INCLUDE(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(Fftw3 DEFAULT_MSG
+    FFTW3_LIBRARY FFTW3_INCLUDE_DIR)
+
+IF(FFTW3_FOUND)
+  SET(FFTW3_LIBRARIES ${FFTW3_LIBRARY})
+  SET(FFTW3_INCLUDE_DIRS ${FFTW3_INCLUDE_DIR})
+ENDIF(FFTW3_FOUND)
+
+MARK_AS_ADVANCED(
+  FFTW3_INCLUDE_DIR
+  FFTW3_LIBRARY
+)
diff --git a/build_files/cmake/Modules/FindJack.cmake b/build_files/cmake/Modules/FindJack.cmake
new file mode 100644 (file)
index 0000000..9a847fa
--- /dev/null
@@ -0,0 +1,70 @@
+# - Find Jack library
+# Find the native Jack includes and library
+# This module defines
+#  JACK_INCLUDE_DIRS, where to find jack.h, Set when
+#                        JACK_INCLUDE_DIR is found.
+#  JACK_LIBRARIES, libraries to link against to use Jack.
+#  JACK_ROOT_DIR, The base directory to search for Jack.
+#                    This can also be an environment variable.
+#  JACK_FOUND, If false, do not try to use Jack.
+#
+# also defined, but not for general use are
+#  JACK_LIBRARY, where to find the Jack library.
+
+#=============================================================================
+# Copyright 2011 Blender Foundation.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+
+# If JACK_ROOT_DIR was defined in the environment, use it.
+IF(NOT JACK_ROOT_DIR AND NOT $ENV{JACK_ROOT_DIR} STREQUAL "")
+  SET(JACK_ROOT_DIR $ENV{JACK_ROOT_DIR})
+ENDIF()
+
+SET(_jack_SEARCH_DIRS
+  ${JACK_ROOT_DIR}
+  /usr/local
+  /sw # Fink
+  /opt/local # DarwinPorts
+  /opt/csw # Blastwave
+)
+
+FIND_PATH(JACK_INCLUDE_DIR
+  NAMES
+    jack.h
+  HINTS
+    ${_jack_SEARCH_DIRS}
+  PATH_SUFFIXES
+    include/jack
+)
+
+FIND_LIBRARY(JACK_LIBRARY
+  NAMES
+    jack
+  HINTS
+    ${_jack_SEARCH_DIRS}
+  PATH_SUFFIXES
+    lib64 lib
+  )
+
+# handle the QUIETLY and REQUIRED arguments and set JACK_FOUND to TRUE if 
+# all listed variables are TRUE
+INCLUDE(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(Jack DEFAULT_MSG
+    JACK_LIBRARY JACK_INCLUDE_DIR)
+
+IF(JACK_FOUND)
+  SET(JACK_LIBRARIES ${JACK_LIBRARY})
+  SET(JACK_INCLUDE_DIRS ${JACK_INCLUDE_DIR})
+ENDIF(JACK_FOUND)
+
+MARK_AS_ADVANCED(
+  JACK_INCLUDE_DIR
+  JACK_LIBRARY
+)
diff --git a/build_files/cmake/Modules/FindJeMalloc.cmake b/build_files/cmake/Modules/FindJeMalloc.cmake
new file mode 100644 (file)
index 0000000..5c7aa2c
--- /dev/null
@@ -0,0 +1,70 @@
+# - Find JeMalloc library
+# Find the native JeMalloc includes and library
+# This module defines
+#  JEMALLOC_INCLUDE_DIRS, where to find jemalloc.h, Set when
+#                        JEMALLOC_INCLUDE_DIR is found.
+#  JEMALLOC_LIBRARIES, libraries to link against to use JeMalloc.
+#  JEMALLOC_ROOT_DIR, The base directory to search for JeMalloc.
+#                    This can also be an environment variable.
+#  JEMALLOC_FOUND, If false, do not try to use JeMalloc.
+#
+# also defined, but not for general use are
+#  JEMALLOC_LIBRARY, where to find the JeMalloc library.
+
+#=============================================================================
+# Copyright 2011 Blender Foundation.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+
+# If JEMALLOC_ROOT_DIR was defined in the environment, use it.
+IF(NOT JEMALLOC_ROOT_DIR AND NOT $ENV{JEMALLOC_ROOT_DIR} STREQUAL "")
+  SET(JEMALLOC_ROOT_DIR $ENV{JEMALLOC_ROOT_DIR})
+ENDIF()
+
+SET(_jemalloc_SEARCH_DIRS
+  ${JEMALLOC_ROOT_DIR}
+  /usr/local
+  /sw # Fink
+  /opt/local # DarwinPorts
+  /opt/csw # Blastwave
+)
+
+FIND_PATH(JEMALLOC_INCLUDE_DIR
+  NAMES
+    jemalloc.h
+  HINTS
+    ${_jemalloc_SEARCH_DIRS}
+  PATH_SUFFIXES
+    include/jemalloc
+)
+
+FIND_LIBRARY(JEMALLOC_LIBRARY
+  NAMES
+    jemalloc
+  HINTS
+    ${_jemalloc_SEARCH_DIRS}
+  PATH_SUFFIXES
+    lib64 lib
+  )
+
+# handle the QUIETLY and REQUIRED arguments and set JEMALLOC_FOUND to TRUE if 
+# all listed variables are TRUE
+INCLUDE(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(JeMalloc DEFAULT_MSG
+    JEMALLOC_LIBRARY JEMALLOC_INCLUDE_DIR)
+
+IF(JEMALLOC_FOUND)
+  SET(JEMALLOC_LIBRARIES ${JEMALLOC_LIBRARY})
+  SET(JEMALLOC_INCLUDE_DIRS ${JEMALLOC_INCLUDE_DIR})
+ENDIF(JEMALLOC_FOUND)
+
+MARK_AS_ADVANCED(
+  JEMALLOC_INCLUDE_DIR
+  JEMALLOC_LIBRARY
+)
diff --git a/build_files/cmake/Modules/FindOpenEXR.cmake b/build_files/cmake/Modules/FindOpenEXR.cmake
new file mode 100644 (file)
index 0000000..546f690
--- /dev/null
@@ -0,0 +1,92 @@
+# - Find OpenEXR library
+# Find the native OpenEXR includes and library
+# This module defines
+#  OPENEXR_INCLUDE_DIRS, where to find ImfXdr.h, etc. Set when
+#                        OPENEXR_INCLUDE_DIR is found.
+#  OPENEXR_LIBRARIES, libraries to link against to use OpenEXR.
+#  OPENEXR_ROOT_DIR, The base directory to search for OpenEXR.
+#                    This can also be an environment variable.
+#  OPENEXR_FOUND, If false, do not try to use OpenEXR.
+#
+# For indervidual library access these advanced settings are available
+#  OPENEXR_HALF_LIBRARY, Path to Half library
+#  OPENEXR_IEX_LIBRARY, Path to Half library
+#  OPENEXR_ILMIMF_LIBRARY, Path to Ilmimf library
+#  OPENEXR_ILMTHREAD_LIBRARY, Path to IlmThread library
+#  OPENEXR_IMATH_LIBRARY, Path to Imath library
+#
+# also defined, but not for general use are
+#  OPENEXR_LIBRARY, where to find the OpenEXR library.
+
+#=============================================================================
+# Copyright 2011 Blender Foundation.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+
+# If OPENEXR_ROOT_DIR was defined in the environment, use it.
+IF(NOT OPENEXR_ROOT_DIR AND NOT $ENV{OPENEXR_ROOT_DIR} STREQUAL "")
+  SET(OPENEXR_ROOT_DIR $ENV{OPENEXR_ROOT_DIR})
+ENDIF()
+
+SET(_openexr_FIND_COMPONENTS
+  Half
+  Iex
+  IlmImf
+  IlmThread
+  Imath
+)
+
+SET(_openexr_SEARCH_DIRS
+  ${OPENEXR_ROOT_DIR}
+  /usr/local
+  /sw # Fink
+  /opt/local # DarwinPorts
+  /opt/csw # Blastwave
+)
+
+FIND_PATH(OPENEXR_INCLUDE_DIR
+  NAMES
+    ImfXdr.h
+  HINTS
+    ${_openexr_SEARCH_DIRS}
+  PATH_SUFFIXES
+    include/OpenEXR
+)
+
+SET(_openexr_LIBRARIES)
+FOREACH(COMPONENT ${_openexr_FIND_COMPONENTS})
+  STRING(TOUPPER ${COMPONENT} UPPERCOMPONENT)
+
+  FIND_LIBRARY(OPENEXR_${UPPERCOMPONENT}_LIBRARY
+    NAMES
+      ${COMPONENT}
+    HINTS
+      ${_openexr_SEARCH_DIRS}
+    PATH_SUFFIXES
+      lib64 lib
+    )
+  LIST(APPEND _openexr_LIBRARIES "${OPENEXR_${UPPERCOMPONENT}_LIBRARY}")
+ENDFOREACH()
+
+# handle the QUIETLY and REQUIRED arguments and set OPENEXR_FOUND to TRUE if 
+# all listed variables are TRUE
+INCLUDE(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(OpenEXR  DEFAULT_MSG
+    _openexr_LIBRARIES OPENEXR_INCLUDE_DIR)
+
+IF(OPENEXR_FOUND)
+  SET(OPENEXR_LIBRARIES ${_openexr_LIBRARIES})
+  SET(OPENEXR_INCLUDE_DIRS ${OPENEXR_INCLUDE_DIR})
+ENDIF()
+
+MARK_AS_ADVANCED(OPENEXR_INCLUDE_DIR)
+FOREACH(COMPONENT ${_openexr_FIND_COMPONENTS})
+  STRING(TOUPPER ${COMPONENT} UPPERCOMPONENT)
+  MARK_AS_ADVANCED(OPENEXR_${UPPERCOMPONENT}_LIBRARY)
+ENDFOREACH()
diff --git a/build_files/cmake/Modules/FindOpenJPEG.cmake b/build_files/cmake/Modules/FindOpenJPEG.cmake
new file mode 100644 (file)
index 0000000..8d901ed
--- /dev/null
@@ -0,0 +1,70 @@
+# - Find OpenJPEG library
+# Find the native OpenJPEG includes and library
+# This module defines
+#  OPENJPEG_INCLUDE_DIRS, where to find openjpeg.h, Set when
+#                        OPENJPEG_INCLUDE_DIR is found.
+#  OPENJPEG_LIBRARIES, libraries to link against to use OpenJPEG.
+#  OPENJPEG_ROOT_DIR, The base directory to search for OpenJPEG.
+#                    This can also be an environment variable.
+#  OPENJPEG_FOUND, If false, do not try to use OpenJPEG.
+#
+# also defined, but not for general use are
+#  OPENJPEG_LIBRARY, where to find the OpenJPEG library.
+
+#=============================================================================
+# Copyright 2011 Blender Foundation.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+
+# If OPENJPEG_ROOT_DIR was defined in the environment, use it.
+IF(NOT OPENJPEG_ROOT_DIR AND NOT $ENV{OPENJPEG_ROOT_DIR} STREQUAL "")
+  SET(OPENJPEG_ROOT_DIR $ENV{OPENJPEG_ROOT_DIR})
+ENDIF()
+
+SET(_openjpeg_SEARCH_DIRS
+  ${OPENJPEG_ROOT_DIR}
+  /usr/local
+  /sw # Fink
+  /opt/local # DarwinPorts
+  /opt/csw # Blastwave
+)
+
+FIND_PATH(OPENJPEG_INCLUDE_DIR
+  NAMES
+    openjpeg.h
+  HINTS
+    ${_openjpeg_SEARCH_DIRS}
+  PATH_SUFFIXES
+    include
+)
+
+FIND_LIBRARY(OPENJPEG_LIBRARY
+  NAMES
+    openjpeg
+  HINTS
+    ${_openjpeg_SEARCH_DIRS}
+  PATH_SUFFIXES
+    lib64 lib
+  )
+
+# handle the QUIETLY and REQUIRED arguments and set OPENJPEG_FOUND to TRUE if 
+# all listed variables are TRUE
+INCLUDE(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(OpenJPEG DEFAULT_MSG
+    OPENJPEG_LIBRARY OPENJPEG_INCLUDE_DIR)
+
+IF(OPENJPEG_FOUND)
+  SET(OPENJPEG_LIBRARIES ${OPENJPEG_LIBRARY})
+  SET(OPENJPEG_INCLUDE_DIRS ${OPENJPEG_INCLUDE_DIR})
+ENDIF(OPENJPEG_FOUND)
+
+MARK_AS_ADVANCED(
+  OPENJPEG_INCLUDE_DIR
+  OPENJPEG_LIBRARY
+)
diff --git a/build_files/cmake/Modules/FindPythonLibsUnix.cmake b/build_files/cmake/Modules/FindPythonLibsUnix.cmake
new file mode 100644 (file)
index 0000000..882f1e2
--- /dev/null
@@ -0,0 +1,121 @@
+# - Find Python libraries
+# Find the native Python includes and library
+#
+# Note:, This is not _yet_ intended to be a general python module for other
+#  projects to use since its hard coded to python 3.2 as blender only supports
+#  a single python version.
+#  This is for blender/unix python only.
+#
+# This module defines
+#  PYTHON_VERSION
+#  PYTHON_INCLUDE_DIRS
+#  PYTHON_LIBRARIES
+#  PYTHON_LIBPATH, Used for installation
+#  PYTHON_LINKFLAGS
+#  PYTHON_ROOT_DIR, The base directory to search for Python.
+#                   This can also be an environment variable.
+#
+# also defined, but not for general use are
+#  PYTHON_LIBRARY, where to find the python library.
+
+#=============================================================================
+# Copyright 2011 Blender Foundation.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+
+# If PYTHON_ROOT_DIR was defined in the environment, use it.
+IF(NOT PYTHON_ROOT_DIR AND NOT $ENV{PYTHON_ROOT_DIR} STREQUAL "")
+  SET(PYTHON_ROOT_DIR $ENV{PYTHON_ROOT_DIR})
+ENDIF()
+
+IF(DEFINED PYTHON_VERSION)
+  SET(PYTHON_VERSION "${PYTHON_VERSION}" CACHE STRING "")
+ELSE()
+  SET(PYTHON_VERSION 3.2 CACHE STRING "")
+ENDIF()
+MARK_AS_ADVANCED(PYTHON_VERSION)
+
+SET(PYTHON_LINKFLAGS "-Xlinker -export-dynamic")
+MARK_AS_ADVANCED(PYTHON_LINKFLAGS)
+
+SET(_python_ABI_FLAGS
+  "m;mu;u; "  # release
+  "md;mud;ud;d" # debug
+)
+
+STRING(REPLACE "." "" _PYTHON_VERSION_NO_DOTS ${PYTHON_VERSION})
+
+SET(_python_SEARCH_DIRS
+  ${PYTHON_ROOT_DIR}
+  "$ENV{HOME}/py${_PYTHON_VERSION_NO_DOTS}"
+  "/opt/py${_PYTHON_VERSION_NO_DOTS}"
+)
+
+FOREACH(_CURRENT_ABI_FLAGS ${_python_ABI_FLAGS})
+  #IF(CMAKE_BUILD_TYPE STREQUAL Debug)
+  #  SET(_CURRENT_ABI_FLAGS "d${_CURRENT_ABI_FLAGS}")
+  #ENDIF()
+  STRING(REPLACE " " "" _CURRENT_ABI_FLAGS ${_CURRENT_ABI_FLAGS})
+
+  FIND_PATH(PYTHON_INCLUDE_DIR
+    NAMES
+      Python.h
+    HINTS
+      ${_python_SEARCH_DIRS}
+    PATH_SUFFIXES
+      include/python${PYTHON_VERSION}${_CURRENT_ABI_FLAGS}
+  )
+
+  FIND_LIBRARY(PYTHON_LIBRARY
+    NAMES
+      "python${PYTHON_VERSION}${_CURRENT_ABI_FLAGS}"
+    HINTS
+      ${_python_SEARCH_DIRS}
+    PATH_SUFFIXES
+      lib64 lib
+  )
+
+  IF(PYTHON_LIBRARY AND PYTHON_INCLUDE_DIR)
+    break()
+  ELSE()
+    # ensure we dont find values from 2 different ABI versions
+    UNSET(PYTHON_INCLUDE_DIR CACHE)
+    UNSET(PYTHON_LIBRARY CACHE)
+  ENDIF()
+ENDFOREACH()
+
+UNSET(_CURRENT_ABI_FLAGS)
+UNSET(_CURRENT_PATH)
+
+UNSET(_python_ABI_FLAGS)
+UNSET(_python_SEARCH_DIRS)
+
+# handle the QUIETLY and REQUIRED arguments and SET PYTHONLIBSUNIX_FOUND to TRUE IF 
+# all listed variables are TRUE
+INCLUDE(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(PythonLibsUnix  DEFAULT_MSG
+    PYTHON_LIBRARY PYTHON_INCLUDE_DIR)
+
+
+IF(PYTHONLIBSUNIX_FOUND)
+  # Assign cache items
+  SET(PYTHON_INCLUDE_DIRS ${PYTHON_INCLUDE_DIR})
+  SET(PYTHON_LIBRARIES ${PYTHON_LIBRARY})
+
+  # we need this for installation
+  GET_FILENAME_COMPONENT(PYTHON_LIBPATH ${PYTHON_LIBRARY} PATH)
+
+  # not used
+  # SET(PYTHON_BINARY ${PYTHON_EXECUTABLE} CACHE STRING "")
+
+  MARK_AS_ADVANCED(
+    PYTHON_INCLUDE_DIR
+    PYTHON_LIBRARY
+  )
+ENDIF()
diff --git a/build_files/cmake/Modules/FindSamplerate.cmake b/build_files/cmake/Modules/FindSamplerate.cmake
new file mode 100644 (file)
index 0000000..ea7a0d7
--- /dev/null
@@ -0,0 +1,70 @@
+# - Find Samplerate library
+# Find the native Samplerate includes and library
+# This module defines
+#  SAMPLERATE_INCLUDE_DIRS, where to find samplerate.h, Set when
+#                        SAMPLERATE_INCLUDE_DIR is found.
+#  SAMPLERATE_LIBRARIES, libraries to link against to use Samplerate.
+#  SAMPLERATE_ROOT_DIR, The base directory to search for Samplerate.
+#                    This can also be an environment variable.
+#  SAMPLERATE_FOUND, If false, do not try to use Samplerate.
+#
+# also defined, but not for general use are
+#  SAMPLERATE_LIBRARY, where to find the Samplerate library.
+
+#=============================================================================
+# Copyright 2011 Blender Foundation.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+
+# If SAMPLERATE_ROOT_DIR was defined in the environment, use it.
+IF(NOT SAMPLERATE_ROOT_DIR AND NOT $ENV{SAMPLERATE_ROOT_DIR} STREQUAL "")
+  SET(SAMPLERATE_ROOT_DIR $ENV{SAMPLERATE_ROOT_DIR})
+ENDIF()
+
+SET(_samplerate_SEARCH_DIRS
+  ${SAMPLERATE_ROOT_DIR}
+  /usr/local
+  /sw # Fink
+  /opt/local # DarwinPorts
+  /opt/csw # Blastwave
+)
+
+FIND_PATH(SAMPLERATE_INCLUDE_DIR
+  NAMES
+    samplerate.h
+  HINTS
+    ${_samplerate_SEARCH_DIRS}
+  PATH_SUFFIXES
+    include
+)
+
+FIND_LIBRARY(SAMPLERATE_LIBRARY
+  NAMES
+    samplerate
+  HINTS
+    ${_samplerate_SEARCH_DIRS}
+  PATH_SUFFIXES
+    lib64 lib
+  )
+
+# handle the QUIETLY and REQUIRED arguments and set SAMPLERATE_FOUND to TRUE if 
+# all listed variables are TRUE
+INCLUDE(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(Samplerate DEFAULT_MSG
+    SAMPLERATE_LIBRARY SAMPLERATE_INCLUDE_DIR)
+
+IF(SAMPLERATE_FOUND)
+  SET(SAMPLERATE_LIBRARIES ${SAMPLERATE_LIBRARY})
+  SET(SAMPLERATE_INCLUDE_DIRS ${SAMPLERATE_INCLUDE_DIR})
+ENDIF(SAMPLERATE_FOUND)
+
+MARK_AS_ADVANCED(
+  SAMPLERATE_INCLUDE_DIR
+  SAMPLERATE_LIBRARY
+)
diff --git a/build_files/cmake/Modules/FindSndFile.cmake b/build_files/cmake/Modules/FindSndFile.cmake
new file mode 100644 (file)
index 0000000..1b685ea
--- /dev/null
@@ -0,0 +1,68 @@
+# - Find SndFile library
+# Find the native SndFile includes and library
+# This module defines
+#  SNDFILE_INCLUDE_DIRS, where to find sndfile.h, Set when
+#                        SNDFILE_INCLUDE_DIR is found.
+#  SNDFILE_LIBRARIES, libraries to link against to use SndFile.
+#  SNDFILE_ROOT_DIR, The base directory to search for SndFile.
+#                    This can also be an environment variable.
+#  SNDFILE_FOUND, If false, do not try to use SndFile.
+#
+# also defined, but not for general use are
+#  SNDFILE_LIBRARY, where to find the SndFile library.
+
+#=============================================================================
+# Copyright 2011 Blender Foundation.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+
+# If SNDFILE_ROOT_DIR was defined in the environment, use it.
+IF(NOT SNDFILE_ROOT_DIR AND NOT $ENV{SNDFILE_ROOT_DIR} STREQUAL "")
+  SET(SNDFILE_ROOT_DIR $ENV{SNDFILE_ROOT_DIR})
+ENDIF()
+
+SET(_sndfile_SEARCH_DIRS
+  ${SNDFILE_ROOT_DIR}
+  /usr/local
+  /sw # Fink
+  /opt/local # DarwinPorts
+  /opt/csw # Blastwave
+)
+
+FIND_PATH(SNDFILE_INCLUDE_DIR sndfile.h
+  HINTS
+    ${_sndfile_SEARCH_DIRS}
+  PATH_SUFFIXES
+    include
+)
+
+FIND_LIBRARY(SNDFILE_LIBRARY
+  NAMES
+    sndfile
+  HINTS
+    ${_sndfile_SEARCH_DIRS}
+  PATH_SUFFIXES
+    lib64 lib
+  )
+
+# handle the QUIETLY and REQUIRED arguments and set SNDFILE_FOUND to TRUE if 
+# all listed variables are TRUE
+INCLUDE(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(SndFile DEFAULT_MSG
+    SNDFILE_LIBRARY SNDFILE_INCLUDE_DIR)
+
+IF(SNDFILE_FOUND)
+  SET(SNDFILE_LIBRARIES ${SNDFILE_LIBRARY})
+  SET(SNDFILE_INCLUDE_DIRS ${SNDFILE_INCLUDE_DIR})
+ENDIF(SNDFILE_FOUND)
+
+MARK_AS_ADVANCED(
+  SNDFILE_INCLUDE_DIR
+  SNDFILE_LIBRARY
+)
index f55b2e95d5e36c02e9fd96b44f2bba337d543a3c..4b35e34a5cddf5bb35d176adc48adc60bcbc2868 100755 (executable)
 
 # <pep8 compliant>
 
-IGNORE = \
-    "/test/",\
-    "/decimate_glut_test/",\
-    "/BSP_GhostTest/",\
-    "/release/",\
-    "/xembed/",\
-    "/decimation/intern/future/",\
-    "/TerraplayNetwork/",\
-    "/ik_glut_test/"
+from cmake_consistency_check_config import IGNORE, UTF8_CHECK, SOURCE_DIR
 
 import os
-from os.path import join, dirname, normpath, abspath, splitext
+from os.path import join, dirname, normpath, splitext
 
-base = join(os.path.dirname(__file__), "..", "..")
-base = normpath(base)
-base = abspath(base)
-
-print("Scanning:", base)
+print("Scanning:", SOURCE_DIR)
 
 global_h = set()
 global_c = set()
+global_refs = {}
+
+
+def replace_line(f, i, text, keep_indent=True):
+    file_handle = open(f, 'r')
+    data = file_handle.readlines()
+    file_handle.close()
+    
+    l = data[i]
+    ws = l[:len(l) - len(l.lstrip())]
+    
+    data[i] = "%s%s\n" % (ws, text)
+    
+    file_handle = open(f, 'w')
+    file_handle.writelines(data)
+    file_handle.close()
 
 
 def source_list(path, filename_check=None):
@@ -88,7 +92,20 @@ def cmake_get_src(f):
     found = False
     i = 0
     # print(f)
+
+    def is_definition(l, f, i, name):
+        if ('set(%s' % name) in l or ('set(' in l and l.endswith(name)):
+            if len(l.split()) > 1:
+                raise Exception("strict formatting not kept 'set(%s*' %s:%d" % (name, f, i))
+            return True
+
+        if ("list(APPEND %s" % name) in l or ('list(APPEND ' in l and l.endswith(name)):
+            if l.endswith(")"):
+                raise Exception("strict formatting not kept 'list(APPEND %s...)' on 1 line %s:%d" % (name, f, i))
+            return True
+
     while it is not None:
+        context_name = ""
         while it is not None:
             i += 1
             try:
@@ -98,16 +115,13 @@ def cmake_get_src(f):
                 break
             l = l.strip()
             if not l.startswith("#"):
-                if 'set(SRC' in l or ('set(' in l and l.endswith("SRC")):
-                    if len(l.split()) > 1:
-                        raise Exception("strict formatting not kept 'set(SRC*' %s:%d" % (f, i))
-                    found = True
+                found = is_definition(l, f, i, "SRC")
+                if found:
+                    context_name = "SRC"
                     break
-
-                if "list(APPEND SRC" in l:
-                    if l.endswith(")"):
-                        raise Exception("strict formatting not kept 'list(APPEND SRC...)' on 1 line %s:%d" % (f, i))
-                    found = True
+                found = is_definition(l, f, i, "INC")
+                if found:
+                    context_name = "INC"
                     break
 
         if found:
@@ -136,22 +150,45 @@ def cmake_get_src(f):
                     if not l:
                         pass
                     elif l.startswith("$"):
-                        print("Cant use var '%s' %s:%d" % (l, f, i))
+                        if context_name == "SRC":
+                            # assume if it ends with context_name we know about it
+                            if not l.split("}")[0].endswith(context_name):
+                                print("Can't use var '%s' %s:%d" % (l, f, i))
                     elif len(l.split()) > 1:
                         raise Exception("Multi-line define '%s' %s:%d" % (l, f, i))
                     else:
                         new_file = normpath(join(cmake_base, l))
 
-                        if is_c_header(new_file):
-                            sources_h.append(new_file)
-                        elif is_c(new_file):
-                            sources_c.append(new_file)
-                        elif l in ("PARENT_SCOPE", ):
-                            # cmake var, ignore
-                            pass
-                        else:
-                            raise Exception("unknown file type - not c or h %s -> %s" % (f, new_file))
-
+                        if context_name == "SRC":
+                            if is_c_header(new_file):
+                                sources_h.append(new_file)
+                                global_refs.setdefault(new_file, []).append((f, i))
+                            elif is_c(new_file):
+                                sources_c.append(new_file)
+                                global_refs.setdefault(new_file, []).append((f, i))
+                            elif l in ("PARENT_SCOPE", ):
+                                # cmake var, ignore
+                                pass
+                            elif new_file.endswith(".list"):
+                                pass
+                            elif new_file.endswith(".def"):
+                                pass
+                            else:
+                                raise Exception("unknown file type - not c or h %s -> %s" % (f, new_file))
+
+                        elif context_name == "INC":
+                            if os.path.isdir(new_file):
+                                new_path_rel = os.path.relpath(new_file, cmake_base)
+
+                                if new_path_rel != l:
+                                    print("overly relative path:\n  %s:%d\n  %s\n  %s" % (f, i, l, new_path_rel))
+                                    
+                                    ## Save time. just replace the line
+                                    # replace_line(f, i - 1, new_path_rel)
+                                    
+                            else:
+                                raise Exception("non existant include %s:%d -> %s" % (f, i, new_file))
+                            
                         # print(new_file)
 
             global_h.update(set(sources_h))
@@ -169,11 +206,15 @@ def cmake_get_src(f):
                 if ff not in sources_c:
                     print("  missing: " + ff)
             '''
+            
+            # reset
+            sources_h[:] = []
+            sources_c[:] = []
 
     filen.close()
 
 
-for cmake in source_list(base, is_cmake):
+for cmake in source_list(SOURCE_DIR, is_cmake):
     cmake_get_src(cmake)
 
 
@@ -183,39 +224,74 @@ def is_ignore(f):
             return True
     return False
 
+
 # First do stupid check, do these files exist?
+print("\nChecking for missing references:")
+is_err = False
+errs = []
 for f in (global_h | global_c):
     if f.endswith("dna.c"):
         continue
 
     if not os.path.exists(f):
-        raise Exception("CMake referenced file missing: " + f)
-
+        refs = global_refs[f]
+        if refs:
+            for cf, i in refs:
+                errs.append((cf, i))
+        else:
+            raise Exception("CMake referenecs missing, internal error, aborting!")
+        is_err = True
+
+errs.sort()
+errs.reverse()
+for cf, i in errs:
+    print("%s:%d" % (cf, i))
+    # Write a 'sed' script, useful if we get a lot of these
+    # print("sed '%dd' '%s' > '%s.tmp' ; mv '%s.tmp' '%s'" % (i, cf, cf, cf, cf))
+
+
+if is_err:
+    raise Exception("CMake referenecs missing files, aborting!")
+del is_err
+del errs
 
 # now check on files not accounted for.
 print("\nC/C++ Files CMake doesnt know about...")
-for cf in sorted(source_list(base, is_c)):
+for cf in sorted(source_list(SOURCE_DIR, is_c)):
     if not is_ignore(cf):
         if cf not in global_c:
             print("missing_c: ", cf)
+
+        # check if automake builds a corrasponding .o file.
+        '''
+        if cf in global_c:
+            out1 = os.path.splitext(cf)[0] + ".o"
+            out2 = os.path.splitext(cf)[0] + ".Po"
+            out2_dir, out2_file = out2 = os.path.split(out2)
+            out2 = os.path.join(out2_dir, ".deps", out2_file)
+            if not os.path.exists(out1) and not os.path.exists(out2):
+                print("bad_c: ", cf)
+        '''
+
 print("\nC/C++ Headers CMake doesnt know about...")
-for hf in sorted(source_list(base, is_c_header)):
+for hf in sorted(source_list(SOURCE_DIR, is_c_header)):
     if not is_ignore(hf):
         if hf not in global_h:
             print("missing_h: ", hf)
 
-# test encoding
-import traceback
-for files in (global_c, global_h):
-    for f in sorted(files):
-        if os.path.exists(f):
-            # ignore outside of our source tree
-            if "extern" not in f:
-                i = 1
-                try:
-                    for l in open(f, "r", encoding="utf8"):
-                        i += 1
-                except:
-                    print("Non utf8: %s:%d" % (f, i))
-                    if i > 1:
-                        traceback.print_exc()
+if UTF8_CHECK:
+    # test encoding
+    import traceback
+    for files in (global_c, global_h):
+        for f in sorted(files):
+            if os.path.exists(f):
+                # ignore outside of our source tree
+                if "extern" not in f:
+                    i = 1
+                    try:
+                        for l in open(f, "r", encoding="utf8"):
+                            i += 1
+                    except:
+                        print("Non utf8: %s:%d" % (f, i))
+                        if i > 1:
+                            traceback.print_exc()
diff --git a/build_files/cmake/cmake_consistency_check_config.py b/build_files/cmake/cmake_consistency_check_config.py
new file mode 100644 (file)
index 0000000..60a46d3
--- /dev/null
@@ -0,0 +1,48 @@
+import os
+
+IGNORE = (
+    "/test/",
+    "/decimate_glut_test/",
+    "/BSP_GhostTest/",
+    "/release/",
+    "/xembed/",
+    "/decimation/intern/future/",
+    "/TerraplayNetwork/",
+    "/ik_glut_test/",
+
+    # specific source files
+    "extern/Eigen2/Eigen/src/Cholesky/CholeskyInstantiations.cpp",
+    "extern/Eigen2/Eigen/src/Core/CoreInstantiations.cpp",
+    "extern/Eigen2/Eigen/src/QR/QrInstantiations.cpp",
+    "extern/bullet2/src/BulletCollision/CollisionDispatch/btBox2dBox2dCollisionAlgorithm.cpp",
+    "extern/bullet2/src/BulletCollision/CollisionDispatch/btConvex2dConvex2dAlgorithm.cpp",
+    "extern/bullet2/src/BulletCollision/CollisionDispatch/btInternalEdgeUtility.cpp",
+    "extern/bullet2/src/BulletCollision/CollisionShapes/btBox2dShape.cpp",
+    "extern/bullet2/src/BulletCollision/CollisionShapes/btConvex2dShape.cpp",
+    "extern/bullet2/src/BulletDynamics/Character/btKinematicCharacterController.cpp",
+    "extern/bullet2/src/BulletDynamics/ConstraintSolver/btHinge2Constraint.cpp",
+    "extern/bullet2/src/BulletDynamics/ConstraintSolver/btUniversalConstraint.cpp",
+    "extern/eltopo/common/meshes/ObjLoader.cpp",
+    "extern/eltopo/common/meshes/meshloader.cpp",
+    "extern/eltopo/common/openglutils.cpp",
+    "extern/eltopo/eltopo3d/broadphase_blenderbvh.cpp",
+    "source/blender/imbuf/intern/imbuf_cocoa.m",
+
+    "extern/bullet2/src/BulletCollision/CollisionDispatch/btBox2dBox2dCollisionAlgorithm.h",
+    "extern/bullet2/src/BulletCollision/CollisionDispatch/btConvex2dConvex2dAlgorithm.h",
+    "extern/bullet2/src/BulletCollision/CollisionDispatch/btInternalEdgeUtility.h",
+    "extern/bullet2/src/BulletCollision/CollisionShapes/btBox2dShape.h",
+    "extern/bullet2/src/BulletCollision/CollisionShapes/btConvex2dShape.h",
+    "extern/bullet2/src/BulletDynamics/Character/btKinematicCharacterController.h",
+    "extern/bullet2/src/BulletDynamics/ConstraintSolver/btHinge2Constraint.h",
+    "extern/bullet2/src/BulletDynamics/ConstraintSolver/btUniversalConstraint.h",
+    "extern/eltopo/common/meshes/Edge.hpp",
+    "extern/eltopo/common/meshes/ObjLoader.hpp",
+    "extern/eltopo/common/meshes/TriangleIndex.hpp",
+    "extern/eltopo/common/meshes/meshloader.h",
+    "extern/eltopo/eltopo3d/broadphase_blenderbvh.h"
+    )
+
+UTF8_CHECK = True
+
+SOURCE_DIR = os.path.normpath(os.path.abspath(os.path.normpath(os.path.join(os.path.dirname(__file__), "..", ".."))))
index 7770efcf3921f707e7cfc01d648730e8e7714ca0..504218f91a672d10e02d4e900c803ff7dcee0e7b 100755 (executable)
@@ -17,7 +17,7 @@ cd ~/blender-svn/build-cmake
 
 # cmake without copying files for fast rebuilds
 # the files from svn will be used in place
-cmake ../blender -DWITH_INSTALL:BOOL=FALSE
+cmake ../blender
 
 # make blender, will take some time
 make
index 265d507220549bd61be3c41c183fc53bd2ca595c..34301458a0654361a962b22e91e4e07f3a9a8263 100644 (file)
@@ -1,26 +1,85 @@
 # -*- mode: cmake; indent-tabs-mode: t; -*-
 # $Id$
 
+
+# foo_bar.spam --> foo_barMySuffix.spam
+macro(file_suffix
+       file_name_new file_name file_suffix
+       )
+
+       get_filename_component(_file_name_PATH ${file_name} PATH)
+       get_filename_component(_file_name_NAME_WE ${file_name} NAME_WE)
+       get_filename_component(_file_name_EXT ${file_name} EXT)
+       set(${file_name_new} "${_file_name_PATH}/${_file_name_NAME_WE}${file_suffix}${_file_name_EXT}")
+
+       unset(_file_name_PATH)
+       unset(_file_name_NAME_WE)
+       unset(_file_name_EXT)
+endmacro()
+
+# usefil for adding debug suffix to library lists:
+# /somepath/foo.lib --> /somepath/foo_d.lib
+macro(file_list_suffix
+       fp_list_new fp_list fn_suffix
+       )
+
+       # incase of empty list
+       set(_fp)
+       set(_fp_suffixed)
+
+       set(fp_list_new)
+
+       foreach(_fp ${fp_list})
+               file_suffix(_fp_suffixed "${_fp}" "${fn_suffix}")
+               list(APPEND "${fp_list_new}" "${_fp_suffixed}")
+       endforeach()
+
+       unset(_fp)
+       unset(_fp_suffixed)
+
+endmacro()
+
+
+macro(target_link_libraries_optimized TARGET LIBS)
+       foreach(_LIB ${LIBS})
+               target_link_libraries(${TARGET} optimized "${_LIB}")
+       endforeach()
+       unset(_LIB)
+endmacro()
+
+macro(target_link_libraries_debug TARGET LIBS)
+       foreach(_LIB ${LIBS})
+               target_link_libraries(${TARGET} debug "${_LIB}")
+       endforeach()
+       unset(_LIB)
+endmacro()
+
 # Nicer makefiles with -I/1/foo/ instead of -I/1/2/3/../../foo/
 # use it instead of include_directories()
 macro(blender_include_dirs
        includes)
-
-       foreach(inc ${ARGV})
-               get_filename_component(abs_inc ${inc} ABSOLUTE)
-               list(APPEND all_incs ${abs_inc})
+       set(_ALL_INCS "")
+       foreach(_INC ${ARGV})
+               get_filename_component(_ABS_INC ${_INC} ABSOLUTE)
+               list(APPEND _ALL_INCS ${_ABS_INC})
        endforeach()
-       include_directories(${all_incs})
+       include_directories(${_ALL_INCS})
+       unset(_INC)
+       unset(_ABS_INC)
+       unset(_ALL_INCS)
 endmacro()
 
 macro(blender_include_dirs_sys
        includes)
-
-       foreach(inc ${ARGV})
-               get_filename_component(abs_inc ${inc} ABSOLUTE)
-               list(APPEND all_incs ${abs_inc})
+       set(_ALL_INCS "")
+       foreach(_INC ${ARGV})
+               get_filename_component(_ABS_INC ${_INC} ABSOLUTE)
+               list(APPEND _ALL_INCS ${_ABS_INC})
        endforeach()
-       include_directories(SYSTEM ${all_incs})
+       include_directories(SYSTEM ${_ALL_INCS})
+       unset(_INC)
+       unset(_ABS_INC)
+       unset(_ALL_INCS)
 endmacro()
 
 macro(blender_source_group
@@ -29,14 +88,17 @@ macro(blender_source_group
        # Group by location on disk
        source_group("Source Files" FILES CMakeLists.txt)
 
-       foreach(SRC ${sources})
-               get_filename_component(SRC_EXT ${SRC} EXT)
-               if(${SRC_EXT} MATCHES ".h" OR ${SRC_EXT} MATCHES ".hpp")
-                       source_group("Header Files" FILES ${SRC})
+       foreach(_SRC ${sources})
+               get_filename_component(_SRC_EXT ${_SRC} EXT)
+               if((${_SRC_EXT} MATCHES ".h") OR (${_SRC_EXT} MATCHES ".hpp"))
+                       source_group("Header Files" FILES ${_SRC})
                else()
-                       source_group("Source Files" FILES ${SRC})
+                       source_group("Source Files" FILES ${_SRC})
                endif()
        endforeach()
+
+       unset(_SRC)
+       unset(_SRC_EXT)
 endmacro()
 
 
@@ -118,7 +180,7 @@ macro(SETUP_LIBDIRS)
                link_directories(${SNDFILE_LIBPATH})
        endif()
        if(WITH_SAMPLERATE)
-               link_directories(${LIBSAMPLERATE_LIBPATH})
+               link_directories(${SAMPLERATE_LIBPATH})
        endif()
        if(WITH_FFTW3)
                link_directories(${FFTW3_LIBPATH})
@@ -139,19 +201,29 @@ endmacro()
 
 macro(setup_liblinks
        target)
-       set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${PLATFORM_LINKFLAGS} ")
 
-       target_link_libraries(${target} ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY} ${JPEG_LIBRARIES} ${PNG_LIBRARIES} ${ZLIB_LIBRARIES} ${LLIBS})
+       set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${PLATFORM_LINKFLAGS}")
+       set(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} ${PLATFORM_LINKFLAGS_DEBUG}")
+
+       target_link_libraries(${target}
+                       ${OPENGL_gl_LIBRARY}
+                       ${OPENGL_glu_LIBRARY}
+                       ${JPEG_LIBRARIES}
+                       ${PNG_LIBRARIES}
+                       ${ZLIB_LIBRARIES}
+                       ${PLATFORM_LINKLIBS})
 
        # since we are using the local libs for python when compiling msvc projects, we need to add _d when compiling debug versions
        if(WITH_PYTHON)  # AND NOT WITH_PYTHON_MODULE  # WIN32 needs
                target_link_libraries(${target} ${PYTHON_LINKFLAGS})
 
                if(WIN32 AND NOT UNIX)
-                       target_link_libraries(${target} debug ${PYTHON_LIBRARY}_d)
-                       target_link_libraries(${target} optimized ${PYTHON_LIBRARY})
+                       file_list_suffix(PYTHON_LIBRARIES_DEBUG "${PYTHON_LIBRARIES}" "_d")
+                       target_link_libraries_debug(${target} "${PYTHON_LIBRARIES_DEBUG}")
+                       target_link_libraries_optimized(${target} "${PYTHON_LIBRARIES}")
+                       unset(PYTHON_LIBRARIES_DEBUG)
                else()
-                       target_link_libraries(${target} ${PYTHON_LIBRARY})
+                       target_link_libraries(${target} ${PYTHON_LIBRARIES})
                endif()
        endif()
 
@@ -159,14 +231,18 @@ macro(setup_liblinks
                target_link_libraries(${target} ${GLEW_LIBRARY})
        endif()
 
-       target_link_libraries(${target} ${OPENGL_glu_LIBRARY} ${JPEG_LIBRARIES} ${PNG_LIBRARIES} ${ZLIB_LIBRARIES})
-       target_link_libraries(${target} ${FREETYPE_LIBRARY})
+       target_link_libraries(${target}
+                       ${OPENGL_glu_LIBRARY}
+                       ${JPEG_LIBRARIES}
+                       ${PNG_LIBRARIES}
+                       ${ZLIB_LIBRARIES}
+                       ${FREETYPE_LIBRARY})
 
        if(WITH_INTERNATIONAL)
                target_link_libraries(${target} ${GETTEXT_LIB})
 
                if(WIN32 AND NOT UNIX)
-                       target_link_libraries(${target} ${ICONV_LIB})
+                       target_link_libraries(${target} ${ICONV_LIBRARIES})
                endif()
        endif()
 
@@ -174,65 +250,72 @@ macro(setup_liblinks
                target_link_libraries(${target} ${OPENAL_LIBRARY})
        endif()
        if(WITH_FFTW3)
-               target_link_libraries(${target} ${FFTW3_LIB})
+               target_link_libraries(${target} ${FFTW3_LIBRARIES})
        endif()
        if(WITH_JACK)
-               target_link_libraries(${target} ${JACK_LIB})
+               target_link_libraries(${target} ${JACK_LIBRARIES})
        endif()
        if(WITH_CODEC_SNDFILE)
-               target_link_libraries(${target} ${SNDFILE_LIB})
+               target_link_libraries(${target} ${SNDFILE_LIBRARIES})
        endif()
        if(WITH_SAMPLERATE)
-               target_link_libraries(${target} ${LIBSAMPLERATE_LIB})
+               target_link_libraries(${target} ${SAMPLERATE_LIBRARIES})
        endif()
        if(WITH_SDL)
                target_link_libraries(${target} ${SDL_LIBRARY})
        endif()
        if(WITH_CODEC_QUICKTIME)
-               target_link_libraries(${target} ${QUICKTIME_LIB})
+               target_link_libraries(${target} ${QUICKTIME_LIBRARIES})
        endif()
        if(WITH_IMAGE_TIFF)
                target_link_libraries(${target} ${TIFF_LIBRARY})
        endif()
        if(WITH_IMAGE_OPENEXR)
                if(WIN32 AND NOT UNIX)
-                       foreach(loop_var ${OPENEXR_LIB})
-                               target_link_libraries(${target} debug ${loop_var}_d)
-                               target_link_libraries(${target} optimized ${loop_var})
-                       endforeach()
+                       file_list_suffix(OPENEXR_LIBRARIES_DEBUG "${OPENEXR_LIBRARIES}" "_d")
+                       target_link_libraries_debug(${target} "${OPENEXR_LIBRARIES_DEBUG}")
+                       target_link_libraries_optimized(${target} "${OPENEXR_LIBRARIES}")
+                       unset(OPENEXR_LIBRARIES_DEBUG)
                else()
-                       target_link_libraries(${target} ${OPENEXR_LIB})
+                       target_link_libraries(${target} ${OPENEXR_LIBRARIES})
                endif()
        endif()
        if(WITH_IMAGE_OPENJPEG AND UNIX AND NOT APPLE)
-               target_link_libraries(${target} ${OPENJPEG_LIB})
+               target_link_libraries(${target} ${OPENJPEG_LIBRARIES})
        endif()
        if(WITH_CODEC_FFMPEG)
-               target_link_libraries(${target} ${FFMPEG_LIB})
+               target_link_libraries(${target} ${FFMPEG_LIBRARIES})
        endif()
        if(WITH_OPENCOLLADA)
                if(WIN32 AND NOT UNIX)
-                       foreach(loop_var ${OPENCOLLADA_LIB})
-                               target_link_libraries(${target} debug ${loop_var}_d)
-                               target_link_libraries(${target} optimized ${loop_var})
-                       endforeach()
-                       target_link_libraries(${target} debug ${PCRE_LIB}_d)
-                       target_link_libraries(${target} optimized ${PCRE_LIB})
+                       file_list_suffix(OPENCOLLADA_LIBRARIES_DEBUG "${OPENCOLLADA_LIBRARIES}" "_d")
+                       target_link_libraries_debug(${target} "${OPENCOLLADA_LIBRARIES_DEBUG}")
+                       target_link_libraries_optimized(${target} "${OPENCOLLADA_LIBRARIES}")
+                       unset(OPENCOLLADA_LIBRARIES_DEBUG)
+
+                       file_list_suffix(PCRE_LIB_DEBUG "${PCRE_LIB}" "_d")
+                       target_link_libraries_debug(${target} "${PCRE_LIB_DEBUG}")
+                       target_link_libraries_optimized(${target} "${PCRE_LIB}")
+                       unset(PCRE_LIB_DEBUG)
+
                        if(EXPAT_LIB)
-                               target_link_libraries(${target} debug ${EXPAT_LIB}_d)
-                               target_link_libraries(${target} optimized ${EXPAT_LIB})
+                               file_list_suffix(EXPAT_LIB_DEBUG "${EXPAT_LIB}" "_d")
+                               target_link_libraries_debug(${target} "${EXPAT_LIB_DEBUG}")
+                               target_link_libraries_optimized(${target} "${EXPAT_LIB}")
+                               unset(EXPAT_LIB_DEBUG)
                        endif()
                else()
-                       target_link_libraries(${target} ${OPENCOLLADA_LIB})
-                       target_link_libraries(${target} ${PCRE_LIB})
-                       target_link_libraries(${target} ${EXPAT_LIB})
+                       target_link_libraries(${target}
+                                       ${OPENCOLLADA_LIBRARIES}
+                                       ${PCRE_LIB}
+                                       ${EXPAT_LIB})
                endif()
        endif()
        if(WITH_MEM_JEMALLOC)
-               target_link_libraries(${target} ${JEMALLOC_LIBRARY})
+               target_link_libraries(${target} ${JEMALLOC_LIBRARIES})
        endif()
        if(WIN32 AND NOT UNIX)
-               target_link_libraries(${target} ${PTHREADS_LIB})
+               target_link_libraries(${target} ${PTHREADS_LIBRARIES})
        endif()
 endmacro()
 
@@ -472,4 +555,13 @@ macro(blender_project_hack_post)
 
        unset(_reset_standard_cflags_rel)
        unset(_reset_standard_cxxflags_rel)
+
+       # ------------------------------------------------------------------
+       # workaround for omission in cmake 2.8.4's GNU.cmake, fixed in 2.8.5
+       if(CMAKE_COMPILER_IS_GNUCC)
+               if(NOT DARWIN)
+                       set(CMAKE_INCLUDE_SYSTEM_FLAG_C "-isystem ")
+               endif()
+       endif()
+
 endmacro()
index e8004338271528c6175d89ab31c20f1021e1a18d..f8b3e750e7457483746d657fec0b9f4b9b11141b 100644 (file)
@@ -76,11 +76,6 @@ BF_GETTEXT_INC = '${BF_GETTEXT}/include'
 BF_GETTEXT_LIB = 'gettextpo intl'
 BF_GETTEXT_LIBPATH = '${BF_GETTEXT}/lib'
 
-WITH_BF_FTGL = 'false'
-BF_FTGL = '#extern/bFTGL'
-BF_FTGL_INC = '${BF_FTGL}/include'
-BF_FTGL_LIB = 'extern_ftgl'
-
 WITH_BF_GAMEENGINE='false'
 
 WITH_BF_BULLET = 'true'
index bf87889751c5199b743abc826e75e3904b5d25f1..2f7bdace7d37dae6871ff6a353a54dd831120092 100644 (file)
@@ -93,7 +93,7 @@ BF_GETTEXT_LIBPATH = '${BF_GETTEXT}/lib'
 #BF_GETTEXT_LIB_STATIC = '${BF_GETTEXT}/lib/libgettextlib.a'
 
 WITH_BF_GAMEENGINE = True
-WITH_BF_PLAYER = False
+WITH_BF_PLAYER = True
 
 WITH_BF_BULLET = True
 BF_BULLET = '#extern/bullet2/src'
index a0dade8bdf67a84ad7c470a9bcc213f668c5a0f4..89b246cb39f329f5415bfb6fc1526d29c8b01f4b 100644 (file)
@@ -99,7 +99,7 @@ BF_GETTEXT_LIB = 'gnu_gettext'
 BF_GETTEXT_LIBPATH = '${BF_GETTEXT}/lib'
 
 WITH_BF_GAMEENGINE = True
-WITH_BF_PLAYER = False
+WITH_BF_PLAYER = True
 
 WITH_BF_BULLET = True
 BF_BULLET = '#extern/bullet2/src'
@@ -118,7 +118,7 @@ BF_FREETYPE_INC = '${BF_FREETYPE}/include ${BF_FREETYPE}/include/freetype2'
 BF_FREETYPE_LIB = 'freetype2ST'
 BF_FREETYPE_LIBPATH = '${BF_FREETYPE}/lib'
 
-WITH_BF_QUICKTIME = True # -DWITH_QUICKTIME
+WITH_BF_QUICKTIME = False # -DWITH_QUICKTIME
 BF_QUICKTIME = LIBDIR + '/QTDevWin'
 BF_QUICKTIME_INC = '${BF_QUICKTIME}/CIncludes'
 BF_QUICKTIME_LIB = 'qtmlClient'
@@ -170,7 +170,7 @@ BGE_CXXFLAGS = ['/O2', '/EHsc', '/GR', '/fp:fast', '/arch:SSE']
 
 BF_DEBUG_CCFLAGS = ['/Zi', '/FR${TARGET}.sbr']
 
-CPPFLAGS = ['-DWIN32','-D_CONSOLE', '-D_LIB', '-DFTGL_LIBRARY_STATIC', '-D_CRT_SECURE_NO_DEPRECATE']
+CPPFLAGS = ['-DWIN32','-D_CONSOLE', '-D_LIB', '-D_CRT_SECURE_NO_DEPRECATE']
 REL_CFLAGS = ['-O2', '-DNDEBUG']
 REL_CCFLAGS = ['-O2', '-DNDEBUG']
 REL_CXXFLAGS = ['-O2', '-DNDEBUG']
@@ -181,7 +181,7 @@ CXX_WARN = []
 
 LLIBS = ['ws2_32', 'vfw32', 'winmm', 'kernel32', 'user32', 'gdi32', 'comdlg32', 'advapi32', 'shfolder', 'shell32', 'ole32', 'oleaut32', 'uuid']
 
-PLATFORM_LINKFLAGS = ['/SUBSYSTEM:CONSOLE','/MACHINE:IX86','/STACK:2097152','/INCREMENTAL:NO', '/LARGEADDRESSAWARE']
+PLATFORM_LINKFLAGS = ['/SUBSYSTEM:CONSOLE','/MACHINE:IX86','/STACK:2097152','/INCREMENTAL:NO', '/LARGEADDRESSAWARE', '/NODEFAULTLIB:msvcrt.lib', '/NODEFAULTLIB:msvcmrt.lib', '/NODEFAULTLIB:msvcurt.lib', '/NODEFAULTLIB:msvcrtd.lib']
 
 # # Todo
 # BF_PROFILE_CCFLAGS = ['-pg', '-g ']
index 2c99094176470dffb826e78e5dd7856cdb864576..67db1c441d7d41b3343ed0893ed1d9250f8b1abd 100644 (file)
@@ -50,6 +50,8 @@ BF_SDL_INC = '${BF_SDL}/include'
 BF_SDL_LIB = 'SDL.lib'
 BF_SDL_LIBPATH = '${BF_SDL}/lib'
 
+WITH_BF_JACK = False
+
 BF_PTHREADS = LIBDIR + '/pthreads'
 BF_PTHREADS_INC = '${BF_PTHREADS}/include'
 BF_PTHREADS_LIB = 'pthreadVC2'
@@ -101,7 +103,7 @@ BF_GETTEXT_LIB = 'gettext'
 BF_GETTEXT_LIBPATH = '${BF_GETTEXT}/lib'
 
 WITH_BF_GAMEENGINE = True
-WITH_BF_PLAYER = False
+WITH_BF_PLAYER = True
 
 WITH_BF_BULLET = True
 BF_BULLET = '#extern/bullet2/src'
@@ -170,9 +172,9 @@ CCFLAGS = ['/nologo', '/Ob1', '/J', '/W0', '/Gd', '/we4013', '/wd4018', '/wd4244
 CXXFLAGS = ['/EHsc']
 BGE_CXXFLAGS = ['/O2', '/EHsc', '/GR', '/fp:fast']
 
-BF_DEBUG_CCFLAGS = ['/Zi', '/FR${TARGET}.sbr']
+BF_DEBUG_CCFLAGS = ['/Zi', '/FR${TARGET}.sbr', '/Od']
 
-CPPFLAGS = ['-DWIN32', '-D_CONSOLE', '-D_LIB', '-DFTGL_LIBRARY_STATIC', '-D_CRT_SECURE_NO_DEPRECATE']
+CPPFLAGS = ['-DWIN32', '-D_CONSOLE', '-D_LIB', '-D_CRT_SECURE_NO_DEPRECATE']
 REL_CFLAGS = ['-O2', '-DNDEBUG']
 REL_CCFLAGS = ['-O2', '-DNDEBUG']
 REL_CXXFLAGS = ['-O2', '-DNDEBUG']
@@ -188,7 +190,7 @@ if BF_DEBUG:
 else:
        BF_NUMJOBS=6
 
-PLATFORM_LINKFLAGS = ['/SUBSYSTEM:CONSOLE','/MACHINE:X64','/STACK:2097152','/OPT:NOREF','/INCREMENTAL:NO']
+PLATFORM_LINKFLAGS = ['/SUBSYSTEM:CONSOLE','/MACHINE:X64','/STACK:2097152','/OPT:NOREF','/INCREMENTAL:NO', '/NODEFAULTLIB:msvcrt.lib', '/NODEFAULTLIB:msvcmrt.lib', '/NODEFAULTLIB:msvcurt.lib', '/NODEFAULTLIB:msvcrtd.lib']
 
 BF_BUILDDIR = '..\\build\\blender25-win64-vc'
 BF_INSTALLDIR='..\\install\\blender25-win64-vc'
index 8dbed82ed84a54de44a9ec6d639a9011c5d71797..75af7e47edd5061be4fe6c0d7068e3cd39818b3b 100644 (file)
@@ -258,7 +258,10 @@ def setup_syslibs(lenv):
         syslibs += Split(lenv['BF_PTHREADS_LIB'])
     if lenv['WITH_BF_COLLADA']:
         syslibs.append(lenv['BF_PCRE_LIB'])
-        syslibs += Split(lenv['BF_OPENCOLLADA_LIB'])
+        if lenv['BF_DEBUG']:
+            syslibs += [colladalib+'_d' for colladalib in Split(lenv['BF_OPENCOLLADA_LIB'])]
+        else:
+            syslibs += Split(lenv['BF_OPENCOLLADA_LIB'])
         syslibs.append(lenv['BF_EXPAT_LIB'])
 
     if not lenv['WITH_BF_STATICLIBSAMPLERATE']:
@@ -287,6 +290,46 @@ def propose_priorities():
             print "\t\t",new_priority, v
             new_priority += 5
 
+# emits the necessary file objects for creator.c, to be used in creating
+# the final blender executable
+def creator(env):
+    sources = ['creator.c']# + Blender.buildinfo(env, "dynamic") + Blender.resources
+
+    incs = ['#/intern/guardedalloc', '#/source/blender/blenlib', '#/source/blender/blenkernel', '#/source/blender/editors/include', '#/source/blender/blenloader', '#/source/blender/imbuf', '#/source/blender/renderconverter', '#/source/blender/render/extern/include', '#/source/blender/windowmanager', '#/source/blender/makesdna', '#/source/blender/makesrna', '#/source/gameengine/BlenderRoutines', '#/extern/glew/include', '#/source/blender/gpu', env['BF_OPENGL_INC']]
+
+    defs = []
+    if env['WITH_BF_QUICKTIME']:
+        incs.append(env['BF_QUICKTIME_INC'])
+        defs.append('WITH_QUICKTIME')
+
+    if env['WITH_BF_BINRELOC']:
+        incs.append('#/extern/binreloc/include')
+        defs.append('WITH_BINRELOC')
+
+    if env['WITH_BF_OPENEXR']:
+        defs.append('WITH_OPENEXR')
+
+    if env['WITH_BF_TIFF']:
+        defs.append('WITH_TIFF')
+
+    if not env['WITH_BF_SDL']:
+        defs.append('DISABLE_SDL')
+
+    if env['WITH_BF_PYTHON']:
+        incs.append('#/source/blender/python')
+        defs.append('WITH_PYTHON')
+        if env['BF_DEBUG']:
+            defs.append('_DEBUG')
+
+    if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc'):
+        incs.append(env['BF_PTHREADS_INC'])
+
+    env.Append(CPPDEFINES=defs)
+    env.Append(CPPPATH=incs)
+    obj = [env.Object(root_build_dir+'source/creator/creator/creator', ['#source/creator/creator.c'])]
+
+    return obj
+
 ## TODO: see if this can be made in an emitter
 def buildinfo(lenv, build_type):
     """
@@ -324,7 +367,7 @@ def buildinfo(lenv, build_type):
 
         lenv.Append (CPPPATH = [root_build_dir+'source/blender/blenkernel'])
 
-        obj = [lenv.Object (root_build_dir+'source/creator/%s_buildinfo'%build_type, [root_build_dir+'source/creator/buildinfo.c'])]
+        obj = [lenv.Object (root_build_dir+'source/creator/%s_buildinfo'%build_type, ['#source/creator/buildinfo.c'])]
 
     return obj
 
@@ -518,13 +561,16 @@ def AppIt(target=None, source=None, env=None):
     cmd = 'mkdir %s/%s.app/Contents/MacOS/%s/python/'%(installdir,binary, VERSION)
     commands.getoutput(cmd)
     cmd = 'unzip -q %s/release/%s -d %s/%s.app/Contents/MacOS/%s/python/'%(libdir,python_zip,installdir,binary,VERSION)
-    commands.getoutput(cmd) 
-    cmd = 'cp -R %s/release/scripts %s/%s.app/Contents/MacOS/%s/'%(bldroot,installdir,binary,VERSION)
-    commands.getoutput(cmd)
-    cmd = 'cp -R %s/release/ui %s/%s.app/Contents/MacOS/%s/'%(bldroot,installdir,binary,VERSION)
-    commands.getoutput(cmd)
-    cmd = 'cp -R %s/release/io %s/%s.app/Contents/MacOS/%s/'%(bldroot,installdir,binary,VERSION)
     commands.getoutput(cmd)
+
+    if binary == 'blender':#not copy everything for blenderplayer
+        cmd = 'cp -R %s/release/scripts %s/%s.app/Contents/MacOS/%s/'%(bldroot,installdir,binary,VERSION)
+        commands.getoutput(cmd)
+        cmd = 'cp -R %s/release/ui %s/%s.app/Contents/MacOS/%s/'%(bldroot,installdir,binary,VERSION)
+        commands.getoutput(cmd)
+        cmd = 'cp -R %s/release/io %s/%s.app/Contents/MacOS/%s/'%(bldroot,installdir,binary,VERSION)
+        commands.getoutput(cmd)
+
     cmd = 'chmod +x  %s/%s.app/Contents/MacOS/%s'%(installdir,binary, binary)
     commands.getoutput(cmd)
     cmd = 'find %s/%s.app -name .svn -prune -exec rm -rf {} \;'%(installdir, binary)
@@ -714,23 +760,19 @@ class BlenderEnvironment(SConsEnvironment):
         global vcp
         print bc.HEADER+'Configuring program '+bc.ENDC+bc.OKGREEN+progname+bc.ENDC
         lenv = self.Clone()
+        lenv.Append(LINKFLAGS = lenv['PLATFORM_LINKFLAGS'])
         if lenv['OURPLATFORM'] in ('win32-vc', 'cygwin', 'win64-vc'):
-            lenv.Append(LINKFLAGS = lenv['PLATFORM_LINKFLAGS'])
-            lenv.Append(LINKFLAGS = ['/FORCE:MULTIPLE'])
             if lenv['BF_DEBUG']:
-                lenv.Prepend(LINKFLAGS = ['/DEBUG','/PDB:'+progname+'.pdb'])
+                lenv.Prepend(LINKFLAGS = ['/DEBUG','/PDB:'+progname+'.pdb','/NODEFAULTLIB:libcmt'])
         if  lenv['OURPLATFORM']=='linux2':
-            lenv.Append(LINKFLAGS = lenv['PLATFORM_LINKFLAGS'])
             if lenv['WITH_BF_PYTHON']:
                 lenv.Append(LINKFLAGS = lenv['BF_PYTHON_LINKFLAGS'])
         if  lenv['OURPLATFORM']=='sunos5':
-            lenv.Append(LINKFLAGS = lenv['PLATFORM_LINKFLAGS'])
             if lenv['WITH_BF_PYTHON']:
                 lenv.Append(LINKFLAGS = lenv['BF_PYTHON_LINKFLAGS'])
             if lenv['CXX'].endswith('CC'):
                  lenv.Replace(LINK = '$CXX')
         if  lenv['OURPLATFORM']=='darwin':
-            lenv.Append(LINKFLAGS = lenv['PLATFORM_LINKFLAGS'])
             if lenv['WITH_BF_PYTHON']:
                 lenv.Append(LINKFLAGS = lenv['BF_PYTHON_LINKFLAGS'])
             lenv.Append(LINKFLAGS = lenv['BF_OPENGL_LINKFLAGS'])
index a8bee920a9b21755ab96f8ea3e7e9c7b717874f8..677ddab8db5c4f7c01bb1359c67dbd715d9d9b25 100644 (file)
@@ -121,6 +121,7 @@ def validate_arguments(args, bc):
             'BF_OPENMP_INC',
             'BF_OPENMP_LIBPATH',
             'WITH_GHOST_COCOA',
+            'WITH_GHOST_SDL',
             'USE_QTKIT',
             'BF_FANCY', 'BF_QUIET', 'BF_LINE_OVERWRITE',
             'BF_X264_CONFIG',
@@ -385,6 +386,7 @@ def read_opts(env, cfg, args):
         ('BF_OPENMP_INC', 'Path to OpenMP includes (used when cross-compiling with older versions of WinGW)', ''),
         ('BF_OPENMP_LIBPATH', 'Path to OpenMP libraries (used when cross-compiling with older versions of WinGW)', ''),
         (BoolVariable('WITH_GHOST_COCOA', 'Use Cocoa-framework if true', False)),
+        (BoolVariable('WITH_GHOST_SDL', 'Enable building blender against SDL for windowing rather then the native APIs', False)),
         (BoolVariable('USE_QTKIT', 'Use QTKIT if true', False)),
 
         (BoolVariable('WITH_BF_QUICKTIME', 'Use QuickTime if true', False)),
index afc58ce67303e4bb717a6208d5f7108314804e2d..988c992fd78d1f0ea40e2f3b64878a2775ba55ba 100755 (executable)
@@ -13,8 +13,8 @@
 # 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., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+# along with this program; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 #
 # ***** END GPL LICENCE BLOCK *****
 
index 7003af10ac77e8e647c8e60a5190fcbd43b42e26..313c8c7ff5dfb26cb215279a24d9634ccb51db13 100644 (file)
@@ -13,8 +13,8 @@
 # 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., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+# along with this program; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 #
 # ***** END GPL LICENCE BLOCK *****
 
index 89dcf834227ecf44e31472a7af4e2e8fdd41d59b..79b3f1a4160bb0707ed2a3818ebbe610abe53589 100644 (file)
@@ -31,7 +31,7 @@ PROJECT_NAME           = Blender
 # This could be handy for archiving the generated documentation or 
 # if some version control system is used.
 
-PROJECT_NUMBER         = "V2.57"
+PROJECT_NUMBER         = "V2.58"
 
 # Using the PROJECT_BRIEF tag one can provide an optional one line description
 # for a project that appears at the top of each page and should give viewer
index a37ed730c22e574e0f007fa1119b2858f1c55745..88db31e15860007061c05be792d054431754452d 100644 (file)
@@ -8,7 +8,7 @@
 
 {%- macro relbar() %}
     <div class="subnav boxheader">
-       <ul class="noprint"><li><a href="http://www.blender.org/development/coding-guides/">Coding Guides</a></li><li>•</li><li><a href="http://www.blender.org/development/report-a-bug/">Report a Bug</a></li><li>•</li><li><a href="http://www.blender.org/development/submit-a-patch/">Submit a Patch</a></li><li>•</li><li><a href="http://www.blender.org/development/release-logs/">Release Logs</a></li><li>•</li><li><a href="http://www.blender.org/development/current-projects/">Current Projects</a></li><li>•</li><li><a href="http://www.blender.org/development/architecture/">Architecture</a></li><li>•</li><li><a href="http://www.blender.org/development/building-blender/">Building Blender</a></li><li>•</li><li class="subnav-active"><a href="http://www.blender.org/documentation/250PythonDoc/contents.html">PyAPI</a></li><li>•</li><li><a href="http://wiki.blender.org/index.php/Main_Page">Wiki</a></li></ul>
+       <ul class="noprint"><li><a href="http://wiki.blender.org/index.php/Dev:Contents">Documentation</a></li><li>•</li><li><a href="http://www.blender.org/development/report-a-bug/">Report a Bug</a></li><li>•</li><li><a href="http://wiki.blender.org/index.php/Dev:Doc/Process/Patches">Submit a Patch</a></li><li>•</li><li><a href="http://www.blender.org/development/release-logs/">Release Logs</a></li><li>•</li><li><a href="http://www.blender.org/development/building-blender/">Building Blender</a></li><li>•</li><li><a href="http://wiki.blender.org/index.php/Dev:Doc/Projects">Current Projects</a></li><li>•</li><li><a href="http://wiki.blender.org/index.php/Dev:Source/Architecture">Architecture</a></li><li>•</li><li><a href="http://www.blender.org/documentation/250PythonDoc/contents.html">Python API</a></li><li>•</li><li><a href="http://wiki.blender.org">Wiki</a></li></ul>
     </div>
     <div class="related subnav">
       <h3>{{ _('Navigation') }}</h3>
diff --git a/doc/python_api/epy/BGL.py b/doc/python_api/epy/BGL.py
deleted file mode 100644 (file)
index ce148dc..0000000
+++ /dev/null
@@ -1,1807 +0,0 @@
-# Blender.BGL module (OpenGL wrapper)
-
-"""
-The Blender.BGL submodule (the OpenGL wrapper).
-
-B{New}: some GLU functions: L{gluLookAt}, etc.
-
-The Blender.BGL submodule
-=========================
-(when accessing it from the Game Engine use BGL instead of Blender.BGL)
-
-This module wraps OpenGL constants and functions, making them available from
-within Blender Python.
-
-The complete list can be retrieved from the module itself, by listing its
-contents: dir(Blender.BGL).  A simple search on the net can point to more 
-than enough material to teach OpenGL programming, from books to many 
-collections of tutorials.
-
-The "red book": "I{OpenGL Programming Guide: The Official Guide to Learning
-OpenGL}" and the online NeHe tutorials are two of the best resources.
-
-Example::
-  import Blender
-  from Blender.BGL import *
-  from Blender import Draw
-  R = G = B = 0
-  A = 1
-  title = "Testing BGL  + Draw"
-  instructions = "Use mouse buttons or wheel to change the background color."
-  quitting = " Press ESC or q to quit."
-  len1 = Draw.GetStringWidth(title)
-  len2 = Draw.GetStringWidth(instructions + quitting)
-  #
-  def show_win():
-    glClearColor(R,G,B,A)                # define color used to clear buffers 
-    glClear(GL_COLOR_BUFFER_BIT)         # use it to clear the color buffer
-    glColor3f(0.35,0.18,0.92)            # define default color
-    glBegin(GL_POLYGON)                  # begin a vertex data list
-    glVertex2i(165, 158)
-    glVertex2i(252, 55)
-    glVertex2i(104, 128)
-    glEnd()
-    glColor3f(0.4,0.4,0.4)               # change default color
-    glRecti(40, 96, 60+len1, 113)
-    glColor3f(1,1,1)
-    glRasterPos2i(50,100)                # move cursor to x = 50, y = 100
-    Draw.Text(title)                     # draw this text there
-    glRasterPos2i(350,40)                # move cursor again
-    Draw.Text(instructions + quitting)   # draw another msg
-    glBegin(GL_LINE_LOOP)                # begin a vertex-data list
-    glVertex2i(46,92)
-    glVertex2i(120,92)
-    glVertex2i(120,115)
-    glVertex2i(46,115)
-    glEnd()                              # close this list
-  #
-  def ev(evt, val):                      # event callback for Draw.Register()
-    global R,G,B,A                       # ... it handles input events
-    if evt == Draw.ESCKEY or evt == Draw.QKEY:
-      Draw.Exit()                        # this quits the script
-    elif not val: return
-    elif evt == Draw.LEFTMOUSE: R = 1 - R
-    elif evt == Draw.MIDDLEMOUSE: G = 1 - G
-    elif evt == Draw.RIGHTMOUSE: B = 1 - B
-    elif evt == Draw.WHEELUPMOUSE:
-      R += 0.1
-      if R > 1: R = 1
-    elif evt == Draw.WHEELDOWNMOUSE:
-      R -= 0.1
-      if R < 0: R = 0
-    else:
-      return                             # don't redraw if nothing changed
-    Draw.Redraw(1)                       # make changes visible.
-  #
-  Draw.Register(show_win, ev, None)      # start the main loop
-
-@note: you can use the L{Image} module and L{Image.Image} BPy object to load
-    and set textures.  See L{Image.Image.glLoad} and L{Image.Image.glFree},
-    for example.
-@see: U{www.opengl.org}
-@see: U{nehe.gamedev.net}
-"""
-
-def glAccum(op, value):
-  """
-  Operate on the accumulation buffer
-  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/accum.html}
-
-  @type op: Enumerated constant
-  @param op: The accumulation buffer operation. 
-  @type value: float
-  @param value: a value used in the accumulation buffer operation.
-  """
-
-def glAlphaFunc(func, ref):
-  """
-  Specify the alpha test function
-  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/alphafunc.html}
-  
-  @type func: Enumerated constant
-  @param func: Specifies the alpha comparison function. 
-  @type ref: float
-  @param ref: The reference value that incoming alpha values are compared to. 
-  Clamped between 0 and 1.
-  """
-
-def glAreTexturesResident(n, textures, residences):
-  """
-  Determine if textures are loaded in texture memory
-  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/aretexturesresident.html}
-
-  @type n: int
-  @param n: Specifies the number of textures to be queried.
-  @type textures: Buffer object I{type GL_INT}
-  @param textures: Specifies an array containing the names of the textures to be queried 
-  @type residences: Buffer object I{type GL_INT}(boolean)
-  @param residences: An array in which the texture residence status in returned.The residence status of a
-  texture named by an element of textures is returned in the corresponding element of residences.
-  """
-
-def glBegin(mode):
-  """
-  Delimit the vertices of a primitive or a group of like primatives
-  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/begin.html}
-
-  @type mode: Enumerated constant
-  @param mode: Specifies the primitive that will be create from vertices between glBegin and
-  glEnd. 
-  """
-
-def glBindTexture(target, texture):
-  """
-  Bind a named texture to a texturing target
-  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/bindtexture.html}
-
-  @type target: Enumerated constant
-  @param target: Specifies the target to which the texture is bound. 
-  @type texture: unsigned int
-  @param texture: Specifies the name of a texture.
-  """
-
-def glBitmap(width, height, xorig, yorig, xmove, ymove, bitmap):
-  """
-  Draw a bitmap
-  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/bitmap.html}
-
-  @type width, height: int
-  @param width, height: Specify the pixel width and height of the bitmap image.
-  @type xorig, yorig: float
-  @param xorig, yorig: Specify the location of the origin in the bitmap image. The origin is measured
-  from the lower left corner of the bitmap, with right and up being the positive axes.
-  @type xmove, ymove: float
-  @param xmove, ymove: Specify the x and y offsets to be added to the current raster position after 
-  the bitmap is drawn. 
-  @type bitmap: Buffer object I{type GL_BYTE}
-  @param bitmap: Specifies the address of the bitmap image. 
-  """
-
-def glBlendFunc(sfactor, dfactor):
-  """
-  Specify pixel arithmetic
-  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/blendfunc.html}
-
-  @type sfactor: Enumerated constant
-  @param sfactor: Specifies how the red, green, blue, and alpha source blending factors are 
-  computed. 
-  @type dfactor: Enumerated constant
-  @param dfactor: Specifies how the red, green, blue, and alpha destination blending factors are 
-  computed. 
-  """
-
-def glCallList(list):
-  """
-  Execute a display list
-  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/calllist.html}
-
-  @type list: unsigned int
-  @param list: Specifies the integer name of the display list to be executed.
-  """
-
-def glCallLists(n, type, lists):
-  """
-  Execute a list of display lists
-  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/calllists.html}
-
-  @type n: int
-  @param n: Specifies the number of display lists to be executed. 
-  @type type: Enumerated constant
-  @param type: Specifies the type of values in lists. 
-  @type lists: Buffer object
-  @param lists: Specifies the address of an array of name offsets in the display list. 
-  The pointer type is void because the offsets can be bytes, shorts, ints, or floats, 
-  depending on the value of type.
-  """
-
-def glClear(mask):
-  """
-  Clear buffers to preset values
-  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/clear.html}
-
-  @type mask: Enumerated constant(s)
-  @param mask: Bitwise OR of masks that indicate the buffers to be cleared. 
-  """
-
-def glClearAccum(red, green, blue, alpha):
-  """
-  Specify clear values for the accumulation buffer
-  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/clearaccum.html}
-
-  @type red, green, blue, alpha: float
-  @param red, green, blue, alpha: Specify the red, green, blue, and alpha values used when the 
-  accumulation buffer is cleared. The initial values are all 0. 
-  """
-
-def glClearColor(red, green, blue, alpha):
-  """
-  Specify clear values for the color buffers
-  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/clearcolor.html}
-
-  @type red, green, blue, alpha: float
-  @param red, green, blue, alpha: Specify the red, green, blue, and alpha values used when the 
-  color buffers are cleared. The initial values are all 0. 
-  """
-
-def glClearDepth(depth):
-  """
-  Specify the clear value for the depth buffer
-  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/cleardepth.html}
-
-  @type depth: int
-  @param depth: Specifies the depth value used when the depth buffer is cleared. 
-  The initial value is 1.  
-  """
-
-def glClearIndex(c):
-  """
-  Specify the clear value for the color index buffers
-  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/clearindex.html}
-
-  @type c: float
-  @param c: Specifies the index used when the color index buffers are cleared. 
-  The initial value is 0. 
-  """
-
-def glClearStencil(s):
-  """
-  Specify the clear value for the stencil buffer
-  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/clearstencil.html}
-
-  @type s: int
-  @param s: Specifies the index used when the stencil buffer is cleared. The initial value is 0. 
-  """
-
-def glClipPlane (plane, equation):
-  """
-  Specify a plane against which all geometry is clipped
-  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/clipplane.html}
-
-  @type plane: Enumerated constant
-  @param plane: Specifies which clipping plane is being positioned. 
-  @type equation: Buffer object I{type GL_FLOAT}(double)
-  @param equation: Specifies the address of an array of four double- precision floating-point 
-  values. These values are interpreted as a plane equation.
-  """
-
-def glColor (red, green, blue, alpha):
-  """
-  B{glColor3b, glColor3d, glColor3f, glColor3i, glColor3s, glColor3ub, glColor3ui, glColor3us, 
-  glColor4b, glColor4d, glColor4f, glColor4i, glColor4s, glColor4ub, glColor4ui, glColor4us, 
-  glColor3bv, glColor3dv, glColor3fv, glColor3iv, glColor3sv, glColor3ubv, glColor3uiv, 
-  glColor3usv, glColor4bv, glColor4dv, glColor4fv, glColor4iv, glColor4sv, glColor4ubv, 
-  glColor4uiv, glColor4usv}
-
-  Set a new color.
-  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/color.html}
-
-  @type red, green, blue, alpha: Depends on function prototype. 
-  @param red, green, blue: Specify new red, green, and blue values for the current color. 
-  @param alpha: Specifies a new alpha value for the current color. Included only in the 
-  four-argument glColor4 commands. (With '4' colors only)
-  """
-
-def glColorMask(red, green, blue, alpha):
-  """
-  Enable and disable writing of frame buffer color components
-  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/colormask.html}
-
-  @type red, green, blue, alpha: int (boolean)
-  @param red, green, blue, alpha: Specify whether red, green, blue, and alpha can or cannot be 
-  written into the frame buffer. The initial values are all GL_TRUE, indicating that the 
-  color components can be written. 
-  """
-
-def glColorMaterial(face, mode):
-  """
-  Cause a material color to track the current color 
-  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/colormaterial.html}
-
-  @type face: Enumerated constant
-  @param face: Specifies whether front, back, or both front and back material parameters should 
-  track the current color. 
-  @type mode: Enumerated constant
-  @param mode: Specifies which of several material parameters track the current color. 
-  """
-
-def glCopyPixels(x, y, width, height, type):
-  """
-  Copy pixels in the frame buffer
-  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/copypixels.html}
-
-  @type x, y: int
-  @param x, y: Specify the window coordinates of the lower left corner of the rectangular 
-  region of pixels to be copied. 
-  @type width, height: int
-  @param width,height: Specify the dimensions of the rectangular region of pixels to be copied. 
-  Both must be non-negative. 
-  @type type: Enumerated constant
-  @param type: Specifies whether color values, depth values, or stencil values are to be copied. 
-  """
-  
-  def glCopyTexImage2D(target, level, internalformat, x, y, width, height, border):
-  """
-  Copy pixels into a 2D texture image
-  @see: U{www.opengl.org/sdk/docs/man/xhtml/glCopyTexImage2D.xml}
-
-  @type target: Enumerated constant
-  @param target: Specifies the target texture. 
-  @type level: int
-  @param level: Specifies the level-of-detail number. Level 0 is the base image level. 
-  Level n is the nth mipmap reduction image. 
-  @type internalformat: int
-  @param internalformat: Specifies the number of color components in the texture. 
-  @type width: int
-  @type x, y: int
-  @param x, y:Specify the window coordinates of the first pixel that is copied 
-  from the frame buffer. This location is the lower left corner of a rectangular
-  block of pixels.
-  @param width: Specifies the width of the texture image. Must be 2n+2(border) for 
-  some integer n. All implementations support texture images that are at least 64 
-  texels wide. 
-  @type height: int
-  @param height: Specifies the height of the texture image. Must be 2m+2(border) for 
-  some integer m. All implementations support texture images that are at least 64 
-  texels high. 
-  @type border: int
-  @param border: Specifies the width of the border. Must be either 0 or 1. 
-  """
-
-def glCullFace(mode):
-  """
-  Specify whether front- or back-facing facets can be culled 
-  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/cullface.html}
-
-  @type mode: Enumerated constant
-  @param mode: Specifies whether front- or back-facing facets are candidates for culling. 
-  """
-
-def glDeleteLists(list, range):
-  """
-  Delete a contiguous group of display lists
-  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/deletelists.html}
-
-  @type list: unsigned int
-  @param list: Specifies the integer name of the first display list to delete
-  @type range: int
-  @param range: Specifies the number of display lists to delete
-  """
-
-def glDeleteTextures(n, textures):
-  """
-  Delete named textures
-  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/deletetextures.html}
-
-  @type n: int
-  @param n: Specifies the number of textures to be deleted
-  @type textures: Buffer I{GL_INT}
-  @param textures: Specifies an array of textures to be deleted
-  """
-
-def glDepthFunc(func):
-  """
-  Specify the value used for depth buffer comparisons 
-  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/depthfunc.html}
-
-  @type func: Enumerated constant
-  @param func: Specifies the depth comparison function. 
-  """
-
-def glDepthMask(flag):
-  """
-  Enable or disable writing into the depth buffer
-  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/depthmask.html}
-
-  @type flag: int (boolean)
-  @param flag: Specifies whether the depth buffer is enabled for writing. If flag is GL_FALSE,
-  depth buffer writing is disabled. Otherwise, it is enabled. Initially, depth buffer 
-  writing is enabled. 
-  """
-
-def glDepthRange(zNear, zFar):
-  """
-  Specify mapping of depth values from normalized device coordinates to window coordinates 
-  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/depthrange.html}
-
-  @type zNear: int
-  @param zNear: Specifies the mapping of the near clipping plane to window coordinates. 
-  The initial value is 0. 
-  @type zFar: int
-  @param zFar: Specifies the mapping of the far clipping plane to window coordinates. 
-  The initial value is 1. 
-  """
-
-def glDisable(cap):
-  """
-  Disable server-side GL capabilities
-  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/enable.html}
-
-  @type cap: Enumerated constant
-  @param cap: Specifies a symbolic constant indicating a GL capability.
-  """
-
-def glDrawBuffer(mode):
-  """
-  Specify which color buffers are to be drawn into
-  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/drawbuffer.html}
-
-  @type mode: Enumerated constant
-  @param mode: Specifies up to four color buffers to be drawn into. 
-  """
-
-def glDrawPixels(width, height, format, type, pixels):
-  """
-  Write a block of pixels to the frame buffer
-  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/drawpixels.html}
-
-  @type width, height: int
-  @param width, height: Specify the dimensions of the pixel rectangle to be 
-  written into the frame buffer. 
-  @type format: Enumerated constant
-  @param format: Specifies the format of the pixel data. 
-  @type type: Enumerated constant
-  @param type: Specifies the data type for pixels. 
-  @type pixels: Buffer object 
-  @param pixels: Specifies a pointer to the pixel data. 
-  """
-
-def glEdgeFlag (flag):
-  """
-  B{glEdgeFlag, glEdgeFlagv}
-
-  Flag edges as either boundary or non-boundary
-  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/edgeflag.html}
-
-  @type flag: Depends of function prototype
-  @param flag: Specifies the current edge flag value.The initial value is GL_TRUE. 
-  """
-
-def glEnable(cap):
-  """
-  Enable server-side GL capabilities
-  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/enable.html}
-
-  @type cap: Enumerated constant
-  @param cap: Specifies a symbolic constant indicating a GL capability.
-  """
-
-def glEnd():
-  """
-  Delimit the vertices of a primitive or group of like primitives
-  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/begin.html}
-  """
-
-def glEndList():
-  """
-  Create or replace a display list
-  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/newlist.html}
-  """
-
-def glEvalCoord (u,v):
-  """
-  B{glEvalCoord1d, glEvalCoord1f, glEvalCoord2d, glEvalCoord2f, glEvalCoord1dv, glEvalCoord1fv, 
-  glEvalCoord2dv, glEvalCoord2fv}
-
-  Evaluate enabled one- and two-dimensional maps
-  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/evalcoord.html}
-
-  @type u: Depends on function prototype.
-  @param u: Specifies a value that is the domain coordinate u to the basis function defined 
-  in a previous glMap1 or glMap2 command. If the function prototype ends in 'v' then
-  u specifies a pointer to an array containing either one or two domain coordinates. The first 
-  coordinate is u. The second coordinate is v, which is present only in glEvalCoord2 versions. 
-  @type v: Depends on function prototype. (only with '2' prototypes)
-  @param v: Specifies a value that is the domain coordinate v to the basis function defined 
-  in a previous glMap2 command. This argument is not present in a glEvalCoord1 command. 
-  """
-
-def glEvalMesh (mode, i1, i2):
-  """
-  B{glEvalMesh1 or glEvalMesh2}
-
-  Compute a one- or two-dimensional grid of points or lines
-  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/evalmesh.html}
-
-  @type mode: Enumerated constant
-  @param mode: In glEvalMesh1, specifies whether to compute a one-dimensional 
-  mesh of points or lines.
-  @type i1, i2: int
-  @param i1, i2: Specify the first and last integer values for the grid domain variable i.
-  """
-
-def glEvalPoint (i, j):
-  """
-  B{glEvalPoint1 and glEvalPoint2}
-
-  Generate and evaluate a single point in a mesh
-  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/evalpoint.html}
-
-  @type i: int
-  @param i: Specifies the integer value for grid domain variable i.
-  @type j: int (only with '2' prototypes)
-  @param j: Specifies the integer value for grid domain variable j (glEvalPoint2 only).
-  """
-
-def glFeedbackBuffer (size, type, buffer):
-  """
-  Controls feedback mode
-  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/feedbackbuffer.html}
-
-  @type size: int
-  @param size:Specifies the maximum number of values that can be written into buffer. 
-  @type type: Enumerated constant
-  @param type:Specifies a symbolic constant that describes the information that 
-  will be returned for each vertex. 
-  @type buffer: Buffer object I{GL_FLOAT}
-  @param buffer: Returns the feedback data. 
-  """
-
-def glFinish():
-  """
-  Block until all GL execution is complete
-  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/finish.html}
-  """
-
-def glFlush():
-  """
-  Force Execution of GL commands in finite time
-  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/flush.html}
-  """
-
-def glFog (pname, param):
-  """
-  B{glFogf, glFogi, glFogfv, glFogiv}
-
-  Specify fog parameters
-  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/fog.html}
-
-  @type pname: Enumerated constant
-  @param pname: Specifies a single-valued fog parameter. If the function prototype
-  ends in 'v' specifies a fog parameter.
-  @type param: Depends on function prototype.
-  @param param: Specifies the value or values to be assigned to pname. GL_FOG_COLOR 
-  requires an array of four values. All other parameters accept an array containing 
-  only a single value. 
-  """
-
-def glFrontFace(mode):
-  """
-  Define front- and back-facing polygons
-  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/frontface.html}
-
-  @type mode: Enumerated constant
-  @param mode: Specifies the orientation of front-facing polygons.
-  """
-
-def glFrustum(left, right, bottom, top, zNear, zFar):
-  """
-  Multiply the current matrix by a perspective matrix
-  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/frustum.html}
-
-  @type left, right: double (float)
-  @param left, right: Specify the coordinates for the left and right vertical 
-  clipping planes. 
-  @type top, bottom: double (float)
-  @param top, bottom: Specify the coordinates for the bottom and top horizontal 
-  clipping planes. 
-  @type zNear, zFar: double (float)
-  @param zNear, zFar: Specify the distances to the near and far depth clipping planes. 
-  Both distances must be positive. 
-  """
-
-def glGenLists(range):
-  """
-  Generate a contiguous set of empty display lists
-  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/genlists.html}
-
-  @type range: int
-  @param range: Specifies the number of contiguous empty display lists to be generated. 
-  """
-
-def glGenTextures(n, textures):
-  """
-  Generate texture names
-  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/gentextures.html}
-
-  @type n: int
-  @param n: Specifies the number of textures name to be generated.
-  @type textures: Buffer object I{type GL_INT}
-  @param textures: Specifies an array in which the generated textures names are stored.
-  """
-
-def glGet (pname, param):
-  """
-  B{glGetBooleanv, glGetfloatv, glGetFloatv, glGetIntegerv}
-
-  Return the value or values of a selected parameter
-  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/get.html}
-
-  @type pname: Enumerated constant
-  @param pname: Specifies the parameter value to be returned. 
-  @type param: Depends on function prototype.
-  @param param: Returns the value or values of the specified parameter. 
-  """
-
-def glGetClipPlane(plane, equation):
-  """
-  Return the coefficients of the specified clipping plane 
-  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/getclipplane.html}
-  @type plane: Enumerated constant
-  @param plane: Specifies a clipping plane. The number of clipping planes depends on the 
-  implementation, but at least six clipping planes are supported. They are identified by 
-  symbolic names of the form GL_CLIP_PLANEi where 0 < i < GL_MAX_CLIP_PLANES. 
-  @type equation:  Buffer object I{type GL_FLOAT}
-  @param equation:  Returns four float (double)-precision values that are the coefficients of the
-  plane equation of plane in eye coordinates. The initial value is (0, 0, 0, 0). 
-  """
-
-def glGetError():
-  """
-  Return error information
-  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/geterror.html}
-  """
-
-def glGetLight (light, pname, params):
-  """
-  B{glGetLightfv and glGetLightiv}
-
-  Return light source parameter values
-  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/getlight.html}
-  @type light: Enumerated constant
-  @param light: Specifies a light source. The number of possible lights depends on the 
-  implementation, but at least eight lights are supported. They are identified by symbolic 
-  names of the form GL_LIGHTi where 0 < i < GL_MAX_LIGHTS. 
-  @type pname: Enumerated constant
-  @param pname: Specifies a light source parameter for light. 
-  @type params:  Buffer object. Depends on function prototype.
-  @param params: Returns the requested data. 
-  """
-
-def glGetMap (target, query, v):
-  """
-  B{glGetMapdv, glGetMapfv, glGetMapiv}
-
-  Return evaluator parameters
-  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/getmap.html}
-
-  @type target: Enumerated constant
-  @param target: Specifies the symbolic name of a map. 
-  @type query: Enumerated constant
-  @param query: Specifies which parameter to return. 
-  @type v: Buffer object. Depends on function prototype.
-  @param v: Returns the requested data. 
-  """
-
-def glGetMaterial (face, pname, params):
-  """
-  B{glGetMaterialfv, glGetMaterialiv}
-
-  Return material parameters
-  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/getmaterial.html}
-
-  @type face: Enumerated constant
-  @param face: Specifies which of the two materials is being queried.  
-  representing the front and back materials, respectively. 
-  @type pname: Enumerated constant
-  @param pname: Specifies the material parameter to return. 
-  @type params: Buffer object. Depends on function prototype.
-  @param params: Returns the requested data. 
-  """
-
-def glGetPixelMap (map, values):
-  """
-  B{glGetPixelMapfv, glGetPixelMapuiv, glGetPixelMapusv}
-
-  Return the specified pixel map
-  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/getpixelmap.html}
-
-  @type map:  Enumerated constant
-  @param map: Specifies the name of the pixel map to return. 
-  @type values: Buffer object. Depends on function prototype.
-  @param values: Returns the pixel map contents. 
-  """
-
-def glGetPolygonStipple(mask):
-  """
-  Return the polygon stipple pattern
-  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/getpolygonstipple.html}
-
-  @type mask: Buffer object I{type GL_BYTE}
-  @param mask: Returns the stipple pattern. The initial value is all 1's.
-  """
-
-def glGetString(name):
-  """
-  Return a string describing the current GL connection
-  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/getstring.html}
-
-  @type name: Enumerated constant
-  @param name: Specifies a symbolic constant. 
-
-  """
-
-def glGetTexEnv (target, pname, params):
-  """
-  B{glGetTexEnvfv, glGetTexEnviv}
-
-  Return texture environment parameters
-  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/gettexenv.html}
-
-  @type target: Enumerated constant
-  @param target: Specifies a texture environment. Must be GL_TEXTURE_ENV. 
-  @type pname: Enumerated constant
-  @param pname: Specifies the symbolic name of a texture environment parameter. 
-  @type params: Buffer object. Depends on function prototype.
-  @param params: Returns the requested data. 
-  """
-
-def glGetTexGen (coord, pname, params):
-  """
-  B{glGetTexGendv, glGetTexGenfv, glGetTexGeniv}
-  Return texture coordinate generation parameters
-  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/gettexgen.html}
-
-  @type coord: Enumerated constant
-  @param coord: Specifies a texture coordinate. 
-  @type pname: Enumerated constant
-  @param pname: Specifies the symbolic name of the value(s) to be returned. 
-  @type params: Buffer object. Depends on function prototype.
-  @param params: Returns the requested data. 
-  """
-
-def glGetTexImage(target, level, format, type, pixels):
-  """
-  Return a texture image
-  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/getteximage.html}
-
-  @type target: Enumerated constant
-  @param target: Specifies which texture is to be obtained. 
-  @type level: int
-  @param level: Specifies the level-of-detail number of the desired image. 
-  Level 0 is the base image level. Level n is the nth mipmap reduction image. 
-  @type format: Enumerated constant
-  @param format: Specifies a pixel format for the returned data. 
-  @type type: Enumerated constant
-  @param type: Specifies a pixel type for the returned data. 
-  @type pixels: Buffer object.
-  @param pixels: Returns the texture image. Should be a pointer to an array of the 
-  type specified by type
-  """
-
-def glGetTexLevelParameter (target, level, pname, params):
-  """
-  B{glGetTexLevelParameterfv, glGetTexLevelParameteriv}
-
-  return texture parameter values for a specific level of detail 
-  @see: U{opengl.org/developers/documentation/man_pages/hardcopy/GL/html/gl/gettexlevelparameter.html}
-
-  @type target: Enumerated constant
-  @param target: Specifies the symbolic name of the target texture. 
-  @type level: int
-  @param level: Specifies the level-of-detail number of the desired image. 
-  Level 0 is the base image level. Level n is the nth mipmap reduction image. 
-  @type pname: Enumerated constant
-  @param pname: Specifies the symbolic name of a texture parameter. 
-  @type params: Buffer object. Depends on function prototype.
-  @param params: Returns the requested data.
-  """
-
-def glGetTexParameter (target, pname, params):
-  """
-  B{glGetTexParameterfv, glGetTexParameteriv}
-
-  Return texture parameter values 
-  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/gettexparameter.html}
-
-  @type target: Enumerated constant
-  @param target: Specifies the symbolic name of the target texture. 
-  @type pname: Enumerated constant
-  @param pname: Specifies the symbolic name the target texture. 
-  @type params: Buffer object. Depends on function prototype.
-  @param params: Returns the texture parameters.
-  """
-
-def glHint(target, mode):
-  """
-  Specify implementation-specific hints
-  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/hint.html}
-
-  @type target: Enumerated constant
-  @param target: Specifies a symbolic constant indicating the behavior to be 
-  controlled. 
-  @type mode: Enumerated constant
-  @param mode: Specifies a symbolic constant indicating the desired behavior. 
-  """
-
-def glIndex (c):
-  """
-  B{glIndexd, glIndexf, glIndexi, glIndexs,  glIndexdv, glIndexfv, glIndexiv, glIndexsv}
-
-  Set the current color index
-  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/index_.html}
-
-  @type c: Buffer object. Depends on function prototype.
-  @param c: Specifies a pointer to a one element array that contains the new value for
-  the current color index.
-  """
-
-def glInitNames():
-  """
-  Initialize the name stack
-  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/initnames.html}
-  """
-
-def glIsEnabled(cap):
-  """
-  Test whether a capability is enabled
-  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/isenabled.html}
-
-  @type cap: Enumerated constant
-  @param cap: Specifies a constant representing a GL capability.
-  """
-
-def glIsList(list):
-  """
-  Determine if a name corresponds to a display-list
-  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/islist.html}
-
-  @type list: unsigned int
-  @param list: Specifies a potential display-list name.
-  """
-
-def glIsTexture(texture):
-  """
-  Determine if a name corresponds to a texture
-  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/istexture.html}
-
-  @type texture: unsigned int
-  @param texture: Specifies a value that may be the name of a texture.
-  """
-
-def glLight (light, pname, param):
-  """
-  B{glLightf,glLighti, glLightfv, glLightiv}
-
-  Set the light source parameters
-  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/light.html}
-
-  @type light: Enumerated constant
-  @param light: Specifies a light. The number of lights depends on the implementation, 
-  but at least eight lights are supported. They are identified by symbolic names of the 
-  form GL_LIGHTi where 0 < i < GL_MAX_LIGHTS. 
-  @type pname: Enumerated constant
-  @param pname: Specifies a single-valued light source parameter for light. 
-  @type param: Depends on function prototype.
-  @param param: Specifies the value that parameter pname of light source light will be set to.  
-  If function prototype ends in 'v' specifies a pointer to the value or values that 
-  parameter pname of light source light will be set to. 
-  """
-
-def glLightModel (pname, param):
-  """
-  B{glLightModelf, glLightModeli, glLightModelfv, glLightModeliv}
-
-  Set the lighting model parameters
-  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/lightmodel.html}
-
-  @type pname:  Enumerated constant
-  @param pname: Specifies a single-value light model parameter. 
-  @type param: Depends on function prototype.
-  @param param: Specifies the value that param will be set to. If function prototype ends in 'v'
-  specifies a pointer to the value or values that param will be set to.
-  """
-
-def glLineStipple(factor, pattern):
-  """
-  Specify the line stipple pattern
-  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/linestipple.html}
-
-  @type factor: int
-  @param factor: Specifies a multiplier for each bit in the line stipple pattern. 
-  If factor is 3, for example, each bit in the pattern is used three times before 
-  the next bit in the pattern is used. factor is clamped to the range [1, 256] and 
-  defaults to 1. 
-  @type pattern: unsigned short int
-  @param pattern: Specifies a 16-bit integer whose bit pattern determines which fragments 
-  of a line will be drawn when the line is rasterized. Bit zero is used first; the default 
-  pattern is all 1's. 
-  """
-
-def glLineWidth(width):
-  """
-  Specify the width of rasterized lines.
-  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/linewidth.html}
-
-  @type width: float
-  @param width: Specifies the width of rasterized lines. The initial value is 1. 
-  """
-
-def glListBase(base):
-  """
-  Set the display-list base for glCallLists 
-  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/listbase.html}
-
-  @type base: unsigned int
-  @param base: Specifies an integer offset that will be added to glCallLists 
-  offsets to generate display-list names. The initial value is 0.
-  """
-
-def glLoadIdentity():
-  """
-  Replace the current matrix with the identity matrix 
-  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/loadidentity.html}
-  """
-
-def glLoadMatrix (m):
-  """
-  B{glLoadMatrixd, glLoadMatixf}
-
-  Replace the current matrix with the specified matrix 
-  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/loadmatrix.html}
-
-  @type m: Buffer object. Depends on function prototype.
-  @param m: Specifies a pointer to 16 consecutive values, which are used as the elements 
-  of a 4x4 column-major matrix. 
-  """
-
-def glLoadName(name):
-  """
-  Load a name onto the name stack.
-  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/loadname.html}
-
-  @type name: unsigned int
-  @param name: Specifies a name that will replace the top value on the name stack. 
-  """
-
-def glLogicOp(opcode):
-  """
-  Specify a logical pixel operation for color index rendering 
-  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/logicop.html}
-
-  @type opcode: Enumerated constant
-  @param opcode: Specifies a symbolic constant that selects a logical operation. 
-  """
-
-def glMap1 (target, u1, u2, stride, order, points):
-  """
-  B{glMap1d, glMap1f}
-
-  Define a one-dimensional evaluator
-  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/map1.html}
-
-  @type target: Enumerated constant
-  @param target: Specifies the kind of values that are generated by the evaluator. 
-  @type u1, u2: Depends on function prototype.
-  @param u1,u2: Specify a linear mapping of u, as presented to glEvalCoord1, to ^, t
-  he variable that is evaluated by the equations specified by this command. 
-  @type stride: int
-  @param stride: Specifies the number of floats or float (double)s between the beginning 
-  of one control point and the beginning of the next one in the data structure 
-  referenced in points. This allows control points to be embedded in arbitrary data 
-  structures. The only constraint is that the values for a particular control point must 
-  occupy contiguous memory locations. 
-  @type order: int
-  @param order: Specifies the number of control points. Must be positive. 
-  @type points: Buffer object. Depends on function prototype.
-  @param points: Specifies a pointer to the array of control points. 
-  """
-
-def glMap2 (target, u1, u2, ustride, uorder, v1, v2, vstride, vorder, points):
-  """
-  B{glMap2d, glMap2f}
-
-  Define a two-dimensional evaluator
-  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/map2.html}
-
-  @type target: Enumerated constant
-  @param target: Specifies the kind of values that are generated by the evaluator. 
-  @type u1, u2: Depends on function prototype.
-  @param u1,u2: Specify a linear mapping of u, as presented to glEvalCoord2, to ^, t
-  he variable that is evaluated by the equations specified by this command. Initially
-  u1 is 0 and u2 is 1.
-  @type ustride: int
-  @param ustride: Specifies the number of floats or float (double)s between the beginning 
-  of control point R and the beginning of control point R ij, where i and j are the u 
-  and v control point indices, respectively. This allows control points to be embedded 
-  in arbitrary data structures. The only constraint is that the values for a particular 
-  control point must occupy contiguous memory locations. The initial value of ustride is 0. 
-  @type uorder: int
-  @param uorder: Specifies the dimension of the control point array in the u axis. 
-  Must be positive. The initial value is 1. 
-  @type v1, v2: Depends on function prototype.
-  @param v1, v2: Specify a linear mapping of v, as presented to glEvalCoord2, to ^, 
-  one of the two variables that are evaluated by the equations specified by this command. 
-  Initially, v1 is 0 and v2 is 1. 
-  @type vstride: int
-  @param vstride: Specifies the number of floats or float (double)s between the beginning of control 
-  point R and the beginning of control point R ij, where i and j are the u and v control 
-  point(indices, respectively. This allows control points to be embedded in arbitrary data
-  structures. The only constraint is that the values for a particular control point must 
-  occupy contiguous memory locations. The initial value of vstride is 0. 
-  @type vorder: int
-  @param vorder: Specifies the dimension of the control point array in the v axis. 
-  Must be positive. The initial value is 1. 
-  @type points: Buffer object. Depends on function prototype.
-  @param points: Specifies a pointer to the array of control points. 
-  """
-
-def glMapGrid (un, u1,u2 ,vn, v1, v2):
-  """
-  B{glMapGrid1d, glMapGrid1f, glMapGrid2d, glMapGrid2f}
-
-  Define a one- or two-dimensional mesh
-  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/mapgrid.html}
-
-  @type un: int
-  @param un: Specifies the number of partitions in the grid range interval 
-  [u1, u2]. Must be positive. 
-  @type u1, u2: Depends on function prototype.
-  @param u1, u2: Specify the mappings for integer grid domain values i=0 and i=un. 
-  @type vn: int
-  @param vn: Specifies the number of partitions in the grid range interval [v1, v2] 
-  (glMapGrid2 only). 
-  @type v1, v2: Depends on function prototype.
-  @param v1, v2: Specify the mappings for integer grid domain values j=0 and j=vn 
-  (glMapGrid2 only). 
-  """
-
-def glMaterial (face, pname, params):
-  """
-  Specify material parameters for the lighting model.
-  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/material.html}
-  
-  @type face: Enumerated constant
-  @param face: Specifies which face or faces are being updated. Must be one of:
-  @type pname: Enumerated constant
-  @param pname: Specifies the single-valued material parameter of the face 
-  or faces that is being updated. Must be GL_SHININESS. 
-  @type params: int
-  @param params: Specifies the value that parameter GL_SHININESS will be set to. 
-  If function prototype ends in 'v' specifies a pointer to the value or values that 
-  pname will be set to. 
-  """
-
-def glMatrixMode(mode):
-  """
-  Specify which matrix is the current matrix.
-  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/matrixmode.html}
-
-  @type mode: Enumerated constant
-  @param mode: Specifies which matrix stack is the target for subsequent matrix operations. 
-  """
-
-def glMultMatrix (m):
-  """
-  B{glMultMatrixd, glMultMatrixf}
-
-  Multiply the current matrix with the specified matrix
-  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/multmatrix.html}
-
-  @type m: Buffer object. Depends on function prototype.
-  @param m: Points to 16 consecutive values that are used as the elements of a 4x4 column
-  major matrix.
-  """
-
-def glNewList(list, mode):
-  """
-  Create or replace a display list
-  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/newlist.html}
-  
-  @type list: unsigned int
-  @param list: Specifies the display list name
-  @type mode: Enumerated constant
-  @param mode: Specifies the compilation mode.
-  """
-
-def glNormal3 (nx, ny, nz, v):
-  """
-  B{Normal3b, Normal3bv, Normal3d, Normal3dv, Normal3f, Normal3fv, Normal3i, Normal3iv,
-  Normal3s, Normal3sv}
-
-  Set the current normal vector
-  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/normal.html}
-  
-  @type nx, ny, nz: Depends on function prototype. (non - 'v' prototypes only)
-  @param nx, ny, nz: Specify the x, y, and z coordinates of the new current normal. 
-  The initial value of the current normal is the unit vector, (0, 0, 1). 
-  @type v: Buffer object. Depends on function prototype. ('v' prototypes)
-  @param v: Specifies a pointer to an array of three elements: the x, y, and z coordinates
-  of the new current normal.
-  """
-  
-def glOrtho(left, right, bottom, top, zNear, zFar):
-  """
-  Multiply the current matrix with an orthographic matrix
-  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/ortho.html}
-  
-  @type left, right: double (float)
-  @param left, right: Specify the coordinates for the left and 
-  right vertical clipping planes. 
-  @type bottom, top: double (float)
-  @param bottom, top: Specify the coordinates for the bottom and top 
-  horizontal clipping planes. 
-  @type zNear, zFar: double (float)
-  @param zNear, zFar: Specify the distances to the nearer and farther 
-  depth clipping planes. These values are negative if the plane is to be behind the viewer. 
-  """
-
-def glPassThrough(token):
-  """
-  Place a marker in the feedback buffer
-  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/passthrough.html}
-
-  @type token: float
-  @param token: Specifies a marker value to be placed in the feedback 
-  buffer following a GL_PASS_THROUGH_TOKEN. 
-  """
-
-def glPixelMap (map, mapsize, values):
-  """
-  B{glPixelMapfv, glPixelMapuiv, glPixelMapusv}
-
-  Set up pixel transfer maps
-  @see:  U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/pixelmap.html}
-
-  @type map: Enumerated constant
-  @param map: Specifies a symbolic map name.
-  @type mapsize: int
-  @param mapsize: Specifies the size of the map being defined. 
-  @type values: Buffer object. Depends on function prototype.
-  @param values: Specifies an array of mapsize values. 
-  """
-
-def glPixelStore (pname, param):
-  """
-  B{glPixelStoref, glPixelStorei}
-
-  Set pixel storage modes
-  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/pixelstore.html}
-  
-  @type pname: Enumerated constant
-  @param pname: Specifies the symbolic name of the parameter to be set. 
-  Six values affect the packing of pixel data into memory.
-  Six more affect the unpacking of pixel data from memory. 
-  @type param: Depends on function prototype.
-  @param param: Specifies the value that pname is set to. 
-  """
-
-def glPixelTransfer (pname, param):
-  """
-  B{glPixelTransferf, glPixelTransferi}
-
-  Set pixel transfer modes
-  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/pixeltransfer.html}
-  @type pname: Enumerated constant
-  @param pname: Specifies the symbolic name of the pixel transfer parameter to be set. 
-  @type param: Depends on function prototype.
-  @param param: Specifies the value that pname is set to. 
-  """
-
-def glPixelZoom(xfactor, yfactor):
-  """
-  Specify the pixel zoom factors
-  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/pixelzoom.html}
-  
-  @type xfactor, yfactor: float
-  @param xfactor, yfactor: Specify the x and y zoom factors for pixel write operations.
-  """
-
-def glPointSize(size):
-  """
-  Specify the diameter of rasterized points
-  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/pointsize.html}
-  
-  @type size: float
-  @param size: Specifies the diameter of rasterized points. The initial value is 1.
-  """
-
-def glPolygonMode(face, mode):
-  """
-  Select a polygon rasterization mode
-  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/polygonmode.html}
-  @type face: Enumerated constant
-  @param face: Specifies the polygons that mode applies to. 
-  Must be GL_FRONT for front-facing polygons, GL_BACK for back- facing polygons, 
-  or GL_FRONT_AND_BACK for front- and back-facing polygons. 
-  @type mode: Enumerated constant
-  @param mode: Specifies how polygons will be rasterized. 
-  The initial value is GL_FILL for both front- and back- facing polygons. 
-  """
-
-def glPolygonOffset(factor, units):
-  """
-  Set the scale and units used to calculate depth values
-  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/polygonoffset.html}
-  
-  @type factor: float
-  @param factor: Specifies a scale factor that is used to create a variable depth 
-  offset for each polygon. The initial value is 0. 
-  @type units:  float
-  @param units: Is multiplied by an implementation-specific value to create a constant
-  depth offset. The initial value is 0. 
-  """
-
-def glPolygonStipple(mask):
-  """
-  Set the polygon stippling pattern
-  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/polygonstipple.html}
-  
-  @type mask: Buffer object I{type GL_BYTE}
-  @param mask: Specifies a pointer to a 32x32 stipple pattern that will be unpacked 
-  from memory in the same way that glDrawPixels unpacks pixels. 
-  """
-
-def glPopAttrib():
-  """
-  Pop the server attribute stack
-  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/pushattrib.html}
-  """
-
-def glPopClientAttrib():
-  """
-  Pop the client attribute stack
-  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/pushclientattrib.html}
-  """
-
-def glPopMatrix():
-  """
-  Pop the current matrix stack
-  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/pushmatrix.html}
-  """
-
-def glPopName():
-  """
-  Pop the name stack
-  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/pushname.html}
-  """
-
-def glPrioritizeTextures(n, textures, priorities):
-  """
-  Set texture residence priority
-  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/prioritizetextures.html}
-  
-  @type n: int
-  @param n:Specifies the number of textures to be prioritized. 
-  @type textures: Buffer I{type GL_INT}
-  @param textures: Specifies an array containing the names of the textures to be prioritized. 
-  @type priorities: Buffer I{type GL_FLOAT}
-  @param priorities: Specifies an array containing the texture priorities. A priority given 
-  in an element of priorities applies to the texture named by the corresponding element of textures. 
-  """
-
-def glPushAttrib(mask):
-  """
-  Push the server attribute stack
-  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/pushattrib.html}
-
-  @type mask: Enumerated constant(s)
-  @param mask: Specifies a mask that indicates which attributes to save.
-  """
-
-def glPushClientAttrib(mask):
-  """
-  Push the client attribute stack
-  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/pushclientattrib.html}
-
-  @type mask: Enumerated constant(s)
-  @param mask: Specifies a mask that indicates which attributes to save.
-  """
-
-def glPushMatrix():
-  """
-  Push the current matrix stack
-  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/pushmatrix.html}
-  """
-
-def glPushName(name):
-  """
-  Push the name stack
-  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/pushname.html}
-
-  @type name: unsigned int
-  @param name: Specifies a name that will be pushed onto the name stack.
-  """
-
-def glRasterPos (x,y,z,w):
-  """
-  B{glRasterPos2d, glRasterPos2f, glRasterPos2i, glRasterPos2s, glRasterPos3d, 
-  glRasterPos3f, glRasterPos3i, glRasterPos3s, glRasterPos4d, glRasterPos4f, 
-  glRasterPos4i, glRasterPos4s, glRasterPos2dv, glRasterPos2fv, glRasterPos2iv, 
-  glRasterPos2sv, glRasterPos3dv, glRasterPos3fv, glRasterPos3iv, glRasterPos3sv, 
-  glRasterPos4dv, glRasterPos4fv, glRasterPos4iv, glRasterPos4sv}
-
-  Specify the raster position for pixel operations
-  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/rasterpos.html}
-
-  @type x, y, z, w: Depends on function prototype. (z and w for '3' and '4' prototypes only)
-  @param x, y, z, w: Specify the x,y,z, and w object coordinates (if present) for the 
-  raster position.  If function prototype ends in 'v' specifies a pointer to an array of two, 
-  three, or four elements, specifying x, y, z, and w coordinates, respectively.
-  @note:
-    If you are drawing to the 3d view with a Scriptlink of a space handler
-    the zoom level of the panels will scale the glRasterPos by the view matrix.
-    so a X of 10 will not always offset 10 pixels as you would expect.
-
-    To work around this get the scale value of the view matrix and use it to scale your pixel values.
-
-    Workaround::
-
-      import Blender
-      from Blender.BGL import *
-      xval, yval= 100, 40
-      # Get the scale of the view matrix
-      viewMatrix = Buffer(GL_FLOAT, 16)
-      glGetFloatv(GL_MODELVIEW_MATRIX, viewMatrix)
-      f = 1/viewMatrix[0]
-      glRasterPos2f(xval*f, yval*f) # Instead of the usual glRasterPos2i(xval, yval)
-  """
-
-def glReadBuffer(mode):
-  """
-  Select a color buffer source for pixels.
-  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/readbuffer.html}
-  
-  @type mode: Enumerated constant
-  @param mode: Specifies a color buffer. 
-  """
-
-def glReadPixels(x, y, width, height, format, type, pixels):
-  """
-  Read a block of pixels from the frame buffer
-  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/readpixels.html}
-  
-  @type x, y: int
-  @param x, y:Specify the window coordinates of the first pixel that is read 
-  from the frame buffer. This location is the lower left corner of a rectangular
-  block of pixels. 
-  @type width, height: int
-  @param width, height: Specify the dimensions of the pixel rectangle. width and 
-  height of one correspond to a single pixel. 
-  @type format: Enumerated constant
-  @param format: Specifies the format of the pixel data. 
-  @type type: Enumerated constant
-  @param type: Specifies the data type of the pixel data. 
-  @type pixels: Buffer object
-  @param pixels: Returns the pixel data. 
-  """
-
-def glRect (x1,y1,x2,y2,v1,v2):
-  """
-  B{glRectd, glRectf, glRecti, glRects, glRectdv, glRectfv, glRectiv, glRectsv}
-
-  Draw a rectangle
-  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/rect.html}
-  @type x1, y1: Depends on function prototype. (for non 'v' prototypes only)
-  @param x1, y1: Specify one vertex of a rectangle
-  @type x2, y2: Depends on function prototype. (for non 'v' prototypes only)
-  @param x2, y2: Specify the opposite vertex of the rectangle
-  @type v1, v2: Depends on function prototype. (for 'v' prototypes only)
-  @param v1, v2: Specifies a pointer to one vertex of a rectangle and the pointer
-  to the opposite vertex of the rectangle
-  """
-
-def glRenderMode(mode):
-  """
-  Set rasterization mode
-  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/rendermode.html}
-  
-  @type mode: Enumerated constant
-  @param mode: Specifies the rasterization mode. 
-  """
-
-def glRotate (angle, x, y, z):
-  """
-  B{glRotated, glRotatef}
-
-  Multiply the current matrix by a rotation matrix
-  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/rotate.html}
-
-  @type angle:  Depends on function prototype.
-  @param angle:  Specifies the angle of rotation in degrees.
-  @type x, y, z:  Depends on function prototype.
-  @param x, y, z:  Specify the x, y, and z coordinates of a vector respectively.
-  """
-
-def glScale (x,y,z):
-  """
-  B{glScaled, glScalef}
-
-  Multiply the current matrix by a general scaling matrix
-  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/scale.html}
-
-  @type x, y, z: Depends on function prototype.
-  @param x, y, z: Specify scale factors along the x, y, and z axes, respectively.
-  """
-
-def glScissor(x,y,width,height):
-  """
-  Define the scissor box
-  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/scissor.html}
-  @type x, y: int
-  @param x, y: Specify the lower left corner of the scissor box. Initially (0, 0). 
-  @type width, height: int
-  @param width height: Specify the width and height of the scissor box. When a 
-  GL context is first attached to a window, width and height are set to the 
-  dimensions of that window. 
-  """
-
-def glSelectBuffer(size, buffer):
-  """
-  Establish a buffer for selection mode values
-  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/selectbuffer.html}
-
-  @type size: int
-  @param size: Specifies the size of buffer
-  @type buffer: Buffer I{type GL_INT}
-  @param buffer: Returns the selection data
-  """
-
-def glShadeModel(mode):
-  """
-  Select flat or smooth shading
-  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/shademodel.html}
-  
-  @type mode: Enumerated constant
-  @param mode: Specifies a symbolic value representing a shading technique.  
-  """
-
-def glStencilFuc(func, ref, mask):
-  """
-  Set function and reference value for stencil testing
-  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/stencilfunc.html}
-
-  @type func: Enumerated constant
-  @param func:Specifies the test function. 
-  @type ref: int
-  @param ref:Specifies the reference value for the stencil test. ref is clamped to 
-  the range [0,2n-1], where n is the number of bitplanes in the stencil buffer. 
-  The initial value is 0.
-  @type mask: unsigned int
-  @param mask:Specifies a mask that is ANDed with both the reference value and 
-  the stored stencil value when the test is done. The initial value is all 1's. 
-  """
-
-def glStencilMask(mask):
-  """
-  Control the writing of individual bits in the stencil planes
-  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/stencilmask.html}
-  
-  @type mask: unsigned int
-  @param mask: Specifies a bit mask to enable and disable writing of individual bits 
-  in the stencil planes. Initially, the mask is all 1's. 
-  """
-
-def glStencilOp(fail, zfail, zpass):
-  """
-  Set stencil test actions
-  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/stencilop.html}
-  
-  @type fail: Enumerated constant
-  @param fail: Specifies the action to take when the stencil test fails. 
-  The initial value is GL_KEEP. 
-  @type zfail: Enumerated constant
-  @param zfail: Specifies the stencil action when the stencil test passes, but the 
-  depth test fails. zfail accepts the same symbolic constants as fail. 
-  The initial value is GL_KEEP. 
-  @type zpass: Enumerated constant
-  @param zpass: Specifies the stencil action when both the stencil test and the 
-  depth test pass, or when the stencil test passes and either there is no depth 
-  buffer or depth testing is not enabled. zpass accepts the same symbolic constants 
-  as fail. The initial value is GL_KEEP.
-  """
-
-def glTexCoord (s,t,r,q,v): 
-  """
-  B{glTexCoord1d, glTexCoord1f, glTexCoord1i, glTexCoord1s, glTexCoord2d, glTexCoord2f, 
-  glTexCoord2i, glTexCoord2s, glTexCoord3d, glTexCoord3f, glTexCoord3i, glTexCoord3s, 
-  glTexCoord4d, glTexCoord4f, glTexCoord4i, glTexCoord4s, glTexCoord1dv, glTexCoord1fv, 
-  glTexCoord1iv, glTexCoord1sv, glTexCoord2dv, glTexCoord2fv, glTexCoord2iv, 
-  glTexCoord2sv, glTexCoord3dv, glTexCoord3fv, glTexCoord3iv, glTexCoord3sv, 
-  glTexCoord4dv, glTexCoord4fv, glTexCoord4iv, glTexCoord4sv}
-
-  Set the current texture coordinates
-  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/texcoord.html}
-  
-  @type s, t, r, q: Depends on function prototype. (r and q for '3' and '4' prototypes only)
-  @param s, t, r, q: Specify s, t, r, and q texture coordinates. Not all parameters are 
-  present in all forms of the command. 
-  @type v: Buffer object. Depends on function prototype. (for 'v' prototypes only)
-  @param v: Specifies a pointer to an array of one, two, three, or four elements, 
-  which in turn specify the s, t, r, and q texture coordinates. 
-  """
-
-def glTexEnv  (target,&n