merge with 2.5/trunk at r23271
authorJoseph Eagar <joeedh@gmail.com>
Wed, 16 Sep 2009 17:43:09 +0000 (17:43 +0000)
committerJoseph Eagar <joeedh@gmail.com>
Wed, 16 Sep 2009 17:43:09 +0000 (17:43 +0000)
686 files changed:
CMakeLists.txt
SConstruct
blenderplayer/CMakeLists.txt [deleted file]
config/win32-mingw-config.py
config/win32-vc-config.py
config/win64-vc-config.py
extern/CMakeLists.txt
extern/Makefile
extern/binreloc/SConscript
extern/bullet2/CMakeLists.txt
extern/bullet2/src/BulletCollision/CMakeLists.txt
extern/bullet2/src/BulletSoftBody/CMakeLists.txt
extern/bullet2/src/SConscript
extern/glew/CMakeLists.txt
extern/glew/SConscript
extern/libopenjpeg/SConscript
extern/libredcode/SConscript
intern/CMakeLists.txt
intern/audaspace/CMakeLists.txt
intern/audaspace/FX/AUD_DoubleReader.cpp
intern/audaspace/FX/AUD_PingPongFactory.cpp
intern/audaspace/OpenAL/AUD_OpenALDevice.cpp
intern/audaspace/SConscript
intern/audaspace/SDL/AUD_SDLMixerReader.cpp
intern/audaspace/ffmpeg/AUD_FFMPEGReader.cpp
intern/audaspace/intern/AUD_C-API.cpp
intern/audaspace/jack/AUD_JackDevice.cpp
intern/audaspace/make/msvc_9_0/audaspace.vcproj
intern/elbeem/CMakeLists.txt
intern/ghost/CMakeLists.txt
intern/ghost/SConscript
intern/ghost/intern/GHOST_WindowX11.cpp
intern/guardedalloc/CMakeLists.txt
intern/guardedalloc/SConscript
intern/iksolver/SConscript
intern/iksolver/intern/TNT/tntmath.h
intern/memutil/SConscript
intern/moto/SConscript
intern/smoke/CMakeLists.txt
intern/smoke/extern/smoke_API.h
intern/smoke/intern/FLUID_3D.cpp
intern/smoke/intern/FLUID_3D.h
intern/smoke/intern/FLUID_3D_STATIC.cpp
intern/smoke/intern/WTURBULENCE.cpp
intern/smoke/intern/WTURBULENCE.h
intern/smoke/intern/smoke_API.cpp
intern/smoke/intern/tnt/tnt_math_utils.h
intern/string/SConscript
intern/string/STR_String.h
po/Makefile
projectfiles_vc9/blender/blender.vcproj
projectfiles_vc9/blender/blenkernel/BKE_blenkernel.vcproj
projectfiles_vc9/blender/blenlib/BLI_blenlib.vcproj
projectfiles_vc9/blender/editors/ED_editors.vcproj
projectfiles_vc9/blender/gpu/BL_gpu.vcproj
projectfiles_vc9/blender/imbuf/BL_imbuf.vcproj
projectfiles_vc9/blender/loader/BLO_loader.vcproj
projectfiles_vc9/blender/makesrna/RNA_makesrna.vcproj
projectfiles_vc9/blender/makesrna/RNA_rna.vcproj
projectfiles_vc9/blender/nodes/nodes.vcproj
projectfiles_vc9/gameengine/videotexture/TEX_Video.vcproj
release/datafiles/blenderbuttons
release/datafiles/datatoc.c [deleted file]
release/datafiles/datatoc.py [new file with mode: 0755]
release/datafiles/splash.jpg [deleted file]
release/datafiles/splash.png [new file with mode: 0644]
release/io/engine_render_pov.py
release/io/netrender/__init__.py [new file with mode: 0644]
release/io/netrender/client.py [new file with mode: 0644]
release/io/netrender/master.py [new file with mode: 0644]
release/io/netrender/model.py [new file with mode: 0644]
release/io/netrender/operators.py [new file with mode: 0644]
release/io/netrender/slave.py [new file with mode: 0644]
release/io/netrender/ui.py [new file with mode: 0644]
release/io/netrender/utils.py [new file with mode: 0644]
release/scripts/import_edl.py [new file with mode: 0644]
release/test/rna_array.py [new file with mode: 0644]
release/ui/bpy_ops.py
release/ui/buttons_data_armature.py
release/ui/buttons_data_bone.py
release/ui/buttons_data_camera.py
release/ui/buttons_data_curve.py
release/ui/buttons_data_empty.py
release/ui/buttons_data_lamp.py
release/ui/buttons_data_lattice.py
release/ui/buttons_data_mesh.py
release/ui/buttons_data_modifier.py
release/ui/buttons_data_text.py
release/ui/buttons_game.py
release/ui/buttons_material.py
release/ui/buttons_object.py
release/ui/buttons_object_constraint.py
release/ui/buttons_particle.py
release/ui/buttons_physics_cloth.py
release/ui/buttons_physics_field.py
release/ui/buttons_physics_fluid.py
release/ui/buttons_physics_smoke.py
release/ui/buttons_physics_softbody.py
release/ui/buttons_scene.py
release/ui/buttons_texture.py
release/ui/buttons_world.py
release/ui/space_console.py
release/ui/space_image.py
release/ui/space_info.py
release/ui/space_logic.py
release/ui/space_node.py
release/ui/space_sequencer.py
release/ui/space_text.py
release/ui/space_time.py
release/ui/space_userpref.py
release/ui/space_view3d.py
release/ui/space_view3d_toolbar.py
release/windows/inno/blender.iss [new file with mode: 0644]
release/windows/inno/copyright.txt [new file with mode: 0644]
release/windows/inno/header.bmp [new file with mode: 0644]
release/windows/inno/installer.bmp [new file with mode: 0644]
release/windows/inno/installer.ico [new file with mode: 0644]
source/CMakeLists.txt
source/Makefile
source/SConscript
source/blender/CMakeLists.txt
source/blender/avi/CMakeLists.txt
source/blender/avi/SConscript
source/blender/blenfont/CMakeLists.txt
source/blender/blenfont/SConscript
source/blender/blenfont/intern/blf.c
source/blender/blenfont/intern/blf_dir.c
source/blender/blenfont/intern/blf_font.c
source/blender/blenfont/intern/blf_glyph.c
source/blender/blenkernel/BKE_anim.h
source/blender/blenkernel/BKE_animsys.h
source/blender/blenkernel/BKE_armature.h
source/blender/blenkernel/BKE_blender.h
source/blender/blenkernel/BKE_cloth.h
source/blender/blenkernel/BKE_constraint.h
source/blender/blenkernel/BKE_curve.h
source/blender/blenkernel/BKE_depsgraph.h
source/blender/blenkernel/BKE_global.h
source/blender/blenkernel/BKE_group.h
source/blender/blenkernel/BKE_key.h
source/blender/blenkernel/BKE_library.h
source/blender/blenkernel/BKE_node.h
source/blender/blenkernel/BKE_paint.h
source/blender/blenkernel/BKE_particle.h
source/blender/blenkernel/BKE_pointcache.h
source/blender/blenkernel/BKE_sca.h
source/blender/blenkernel/BKE_scene.h
source/blender/blenkernel/BKE_screen.h
source/blender/blenkernel/BKE_sculpt.h [deleted file]
source/blender/blenkernel/BKE_shrinkwrap.h
source/blender/blenkernel/BKE_smoke.h
source/blender/blenkernel/BKE_sound.h
source/blender/blenkernel/BKE_text.h
source/blender/blenkernel/BKE_utildefines.h
source/blender/blenkernel/CMakeLists.txt
source/blender/blenkernel/SConscript
source/blender/blenkernel/intern/DerivedMesh.c
source/blender/blenkernel/intern/action.c
source/blender/blenkernel/intern/anim.c
source/blender/blenkernel/intern/anim_sys.c
source/blender/blenkernel/intern/armature.c
source/blender/blenkernel/intern/boids.c
source/blender/blenkernel/intern/booleanops.c
source/blender/blenkernel/intern/brush.c
source/blender/blenkernel/intern/cloth.c
source/blender/blenkernel/intern/collision.c
source/blender/blenkernel/intern/colortools.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/fcurve.c
source/blender/blenkernel/intern/fluidsim.c
source/blender/blenkernel/intern/font.c
source/blender/blenkernel/intern/gpencil.c
source/blender/blenkernel/intern/group.c
source/blender/blenkernel/intern/image.c
source/blender/blenkernel/intern/implicit.c
source/blender/blenkernel/intern/ipo.c
source/blender/blenkernel/intern/key.c
source/blender/blenkernel/intern/lattice.c
source/blender/blenkernel/intern/library.c
source/blender/blenkernel/intern/material.c
source/blender/blenkernel/intern/mesh.c
source/blender/blenkernel/intern/modifier.c
source/blender/blenkernel/intern/modifiers_bmesh.c
source/blender/blenkernel/intern/multires.c
source/blender/blenkernel/intern/nla.c
source/blender/blenkernel/intern/node.c
source/blender/blenkernel/intern/object.c
source/blender/blenkernel/intern/packedFile.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/screen.c
source/blender/blenkernel/intern/sequence.c
source/blender/blenkernel/intern/shrinkwrap.c
source/blender/blenkernel/intern/smoke.c
source/blender/blenkernel/intern/softbody.c
source/blender/blenkernel/intern/sound.c
source/blender/blenkernel/intern/text.c
source/blender/blenkernel/intern/texture.c
source/blender/blenkernel/intern/writeffmpeg.c
source/blender/blenlib/BLI_arithb.h
source/blender/blenlib/BLI_fileops.h
source/blender/blenlib/BLI_voxel.h
source/blender/blenlib/BLI_winstuff.h
source/blender/blenlib/CMakeLists.txt
source/blender/blenlib/MTC_matrixops.h [deleted file]
source/blender/blenlib/MTC_vectorops.h [deleted file]
source/blender/blenlib/SConscript
source/blender/blenlib/intern/BLI_kdopbvh.c
source/blender/blenlib/intern/BLI_kdtree.c
source/blender/blenlib/intern/BLI_mempool.c
source/blender/blenlib/intern/arithb.c
source/blender/blenlib/intern/bpath.c
source/blender/blenlib/intern/fileops.c
source/blender/blenlib/intern/freetypefont.c
source/blender/blenlib/intern/graph.c
source/blender/blenlib/intern/matrixops.c [deleted file]
source/blender/blenlib/intern/noise.c
source/blender/blenlib/intern/storage.c
source/blender/blenlib/intern/threads.c
source/blender/blenlib/intern/util.c
source/blender/blenlib/intern/vectorops.c [deleted file]
source/blender/blenlib/intern/voxel.c
source/blender/blenloader/BLO_readfile.h
source/blender/blenloader/CMakeLists.txt
source/blender/blenloader/SConscript
source/blender/blenloader/intern/readblenentry.c
source/blender/blenloader/intern/readfile.c
source/blender/blenloader/intern/readfile.h
source/blender/blenloader/intern/writefile.c
source/blender/blenpluginapi/CMakeLists.txt
source/blender/blenpluginapi/SConscript
source/blender/bmesh/bmesh_marking.h
source/blender/bmesh/intern/bmesh_marking.c
source/blender/bmesh/intern/bmesh_queries.c
source/blender/bmesh/operators/subdivideop.c
source/blender/editors/Makefile
source/blender/editors/SConscript
source/blender/editors/animation/anim_channels_defines.c
source/blender/editors/animation/anim_deps.c
source/blender/editors/animation/anim_filter.c
source/blender/editors/animation/anim_intern.h
source/blender/editors/animation/anim_ops.c
source/blender/editors/animation/drivers.c
source/blender/editors/animation/keyframes_draw.c
source/blender/editors/animation/keyframes_edit.c
source/blender/editors/animation/keyframes_general.c
source/blender/editors/animation/keyframing.c
source/blender/editors/animation/keyingsets.c
source/blender/editors/armature/editarmature.c
source/blender/editors/armature/editarmature_generate.c
source/blender/editors/armature/editarmature_retarget.c
source/blender/editors/armature/meshlaplacian.c
source/blender/editors/armature/poselib.c
source/blender/editors/armature/poseobject.c
source/blender/editors/curve/curve_ops.c
source/blender/editors/curve/editcurve.c
source/blender/editors/curve/editfont.c
source/blender/editors/datafiles/B.blend.c
source/blender/editors/datafiles/blenderbuttons.c
source/blender/editors/datafiles/splash.png.c [moved from source/blender/editors/datafiles/splash.jpg.c with 99% similarity]
source/blender/editors/gpencil/drawgpencil.c
source/blender/editors/gpencil/gpencil_buttons.c [new file with mode: 0644]
source/blender/editors/gpencil/gpencil_edit.c
source/blender/editors/gpencil/gpencil_intern.h
source/blender/editors/gpencil/gpencil_ops.c [new file with mode: 0644]
source/blender/editors/gpencil/gpencil_paint.c [new file with mode: 0644]
source/blender/editors/include/ED_anim_api.h
source/blender/editors/include/ED_armature.h
source/blender/editors/include/ED_datafiles.h
source/blender/editors/include/ED_gpencil.h
source/blender/editors/include/ED_keyframes_draw.h
source/blender/editors/include/ED_keyframes_edit.h
source/blender/editors/include/ED_keyframing.h
source/blender/editors/include/ED_mball.h
source/blender/editors/include/ED_mesh.h
source/blender/editors/include/ED_object.h
source/blender/editors/include/ED_particle.h
source/blender/editors/include/ED_screen.h
source/blender/editors/include/ED_screen_types.h
source/blender/editors/include/ED_sound.h [new file with mode: 0644]
source/blender/editors/include/UI_icons.h
source/blender/editors/include/UI_interface.h
source/blender/editors/interface/interface.c
source/blender/editors/interface/interface_anim.c
source/blender/editors/interface/interface_handlers.c
source/blender/editors/interface/interface_icons.c
source/blender/editors/interface/interface_intern.h
source/blender/editors/interface/interface_layout.c
source/blender/editors/interface/interface_panel.c
source/blender/editors/interface/interface_regions.c
source/blender/editors/interface/interface_templates.c
source/blender/editors/interface/interface_utils.c
source/blender/editors/interface/interface_widgets.c
source/blender/editors/interface/resources.c
source/blender/editors/interface/view2d_ops.c
source/blender/editors/mesh/bmesh_select.c
source/blender/editors/mesh/bmesh_selecthistory.c
source/blender/editors/mesh/bmesh_tools.c
source/blender/editors/mesh/bmeshutils.c
source/blender/editors/mesh/editmesh.c
source/blender/editors/mesh/editmesh_add.c
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_intern.h
source/blender/editors/mesh/mesh_layers.c
source/blender/editors/mesh/mesh_ops.c
source/blender/editors/mesh/meshtools.c
source/blender/editors/metaball/mball_edit.c [moved from source/blender/editors/metaball/editmball.c with 93% similarity]
source/blender/editors/metaball/mball_ops.c
source/blender/editors/object/object_add.c [new file with mode: 0644]
source/blender/editors/object/object_constraint.c [moved from source/blender/editors/object/editconstraint.c with 97% similarity]
source/blender/editors/object/object_edit.c
source/blender/editors/object/object_group.c [moved from source/blender/editors/object/editgroup.c with 60% similarity]
source/blender/editors/object/object_hook.c [new file with mode: 0644]
source/blender/editors/object/object_intern.h
source/blender/editors/object/object_lattice.c [moved from source/blender/editors/object/editlattice.c with 95% similarity]
source/blender/editors/object/object_modifier.c
source/blender/editors/object/object_ops.c
source/blender/editors/object/object_relations.c [new file with mode: 0644]
source/blender/editors/object/object_select.c [new file with mode: 0644]
source/blender/editors/object/object_shapekey.c [moved from source/blender/editors/object/editkey.c with 85% similarity]
source/blender/editors/object/object_transform.c [new file with mode: 0644]
source/blender/editors/object/object_vgroup.c
source/blender/editors/physics/ed_fluidsim.c
source/blender/editors/physics/ed_pointcache.c
source/blender/editors/physics/editparticle.c
source/blender/editors/preview/previewrender.c
source/blender/editors/screen/CMakeLists.txt
source/blender/editors/screen/area.c
source/blender/editors/screen/screen_context.c
source/blender/editors/screen/screen_edit.c
source/blender/editors/screen/screen_ops.c
source/blender/editors/screen/screendump.c
source/blender/editors/sculpt_paint/paint_image.c
source/blender/editors/sculpt_paint/paint_ops.c
source/blender/editors/sculpt_paint/paint_utils.c
source/blender/editors/sculpt_paint/paint_vertex.c
source/blender/editors/sculpt_paint/sculpt.c
source/blender/editors/sculpt_paint/sculpt_intern.h
source/blender/editors/sound/Makefile [new file with mode: 0644]
source/blender/editors/sound/SConscript [new file with mode: 0644]
source/blender/editors/sound/sound_intern.h [new file with mode: 0644]
source/blender/editors/sound/sound_ops.c [new file with mode: 0644]
source/blender/editors/space_action/action_edit.c
source/blender/editors/space_action/action_header.c
source/blender/editors/space_action/action_intern.h
source/blender/editors/space_action/action_ops.c
source/blender/editors/space_action/space_action.c
source/blender/editors/space_api/spacetypes.c
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_ops.c
source/blender/editors/space_console/console_report.c
source/blender/editors/space_console/space_console.c
source/blender/editors/space_file/file_intern.h
source/blender/editors/space_file/file_ops.c
source/blender/editors/space_file/file_panels.c
source/blender/editors/space_file/filelist.c
source/blender/editors/space_file/filelist.h
source/blender/editors/space_file/filesel.c
source/blender/editors/space_file/space_file.c
source/blender/editors/space_graph/graph_buttons.c
source/blender/editors/space_graph/graph_draw.c
source/blender/editors/space_graph/graph_edit.c
source/blender/editors/space_graph/graph_header.c
source/blender/editors/space_graph/graph_select.c
source/blender/editors/space_graph/space_graph.c
source/blender/editors/space_image/image_buttons.c
source/blender/editors/space_image/image_draw.c
source/blender/editors/space_image/image_intern.h
source/blender/editors/space_image/image_ops.c
source/blender/editors/space_image/space_image.c
source/blender/editors/space_info/info_ops.c
source/blender/editors/space_info/info_stats.c
source/blender/editors/space_info/space_info.c
source/blender/editors/space_logic/logic_buttons.c
source/blender/editors/space_logic/logic_window.c
source/blender/editors/space_logic/space_logic.c
source/blender/editors/space_nla/nla_buttons.c
source/blender/editors/space_nla/nla_draw.c
source/blender/editors/space_nla/space_nla.c
source/blender/editors/space_node/drawnode.c
source/blender/editors/space_node/node_draw.c
source/blender/editors/space_node/node_edit.c
source/blender/editors/space_node/node_intern.h
source/blender/editors/space_node/node_ops.c
source/blender/editors/space_node/node_select.c
source/blender/editors/space_node/space_node.c
source/blender/editors/space_outliner/outliner.c
source/blender/editors/space_outliner/space_outliner.c
source/blender/editors/space_script/script_edit.c
source/blender/editors/space_script/script_ops.c
source/blender/editors/space_sequencer/sequencer_add.c
source/blender/editors/space_sequencer/sequencer_buttons.c
source/blender/editors/space_sequencer/sequencer_draw.c
source/blender/editors/space_sequencer/sequencer_edit.c
source/blender/editors/space_sequencer/sequencer_select.c
source/blender/editors/space_sequencer/space_sequencer.c
source/blender/editors/space_text/space_text.c
source/blender/editors/space_text/text_header.c
source/blender/editors/space_text/text_intern.h
source/blender/editors/space_text/text_ops.c
source/blender/editors/space_time/space_time.c
source/blender/editors/space_time/time_ops.c
source/blender/editors/space_view3d/SConscript
source/blender/editors/space_view3d/drawarmature.c
source/blender/editors/space_view3d/drawobject.c
source/blender/editors/space_view3d/drawvolume.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_edit.c
source/blender/editors/space_view3d/view3d_header.c
source/blender/editors/space_view3d/view3d_intern.h
source/blender/editors/space_view3d/view3d_ops.c
source/blender/editors/space_view3d/view3d_select.c
source/blender/editors/space_view3d/view3d_snap.c
source/blender/editors/space_view3d/view3d_toolbar.c
source/blender/editors/space_view3d/view3d_view.c
source/blender/editors/transform/transform.c
source/blender/editors/transform/transform.h
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_ops.c
source/blender/editors/transform/transform_orientations.c
source/blender/editors/util/editmode_undo.c
source/blender/editors/util/undo.c
source/blender/editors/uvedit/uvedit_ops.c
source/blender/editors/uvedit/uvedit_unwrap_ops.c
source/blender/gpu/CMakeLists.txt
source/blender/gpu/GPU_draw.h
source/blender/gpu/SConscript
source/blender/gpu/intern/Makefile
source/blender/gpu/intern/gpu_draw.c
source/blender/gpu/intern/gpu_extensions.c
source/blender/imbuf/CMakeLists.txt
source/blender/imbuf/SConscript
source/blender/imbuf/intern/anim.c
source/blender/imbuf/intern/anim5.c
source/blender/imbuf/intern/cineon/CMakeLists.txt
source/blender/imbuf/intern/cineon/SConscript
source/blender/imbuf/intern/dds/CMakeLists.txt
source/blender/imbuf/intern/dds/SConscript
source/blender/imbuf/intern/hamx.c
source/blender/imbuf/intern/iff.c
source/blender/imbuf/intern/jp2.c
source/blender/imbuf/intern/openexr/CMakeLists.txt
source/blender/imbuf/intern/openexr/SConscript
source/blender/imbuf/intern/thumbs.c
source/blender/imbuf/intern/writeimage.c
source/blender/makesdna/DNA_ID.h
source/blender/makesdna/DNA_action_types.h
source/blender/makesdna/DNA_cloth_types.h
source/blender/makesdna/DNA_constraint_types.h
source/blender/makesdna/DNA_curve_types.h
source/blender/makesdna/DNA_gpencil_types.h
source/blender/makesdna/DNA_material_types.h
source/blender/makesdna/DNA_modifier_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_smoke_types.h
source/blender/makesdna/DNA_sound_types.h
source/blender/makesdna/DNA_space_types.h
source/blender/makesdna/DNA_texture_types.h
source/blender/makesdna/DNA_userdef_types.h
source/blender/makesdna/DNA_windowmanager_types.h
source/blender/makesdna/SConscript
source/blender/makesdna/intern/CMakeLists.txt
source/blender/makesdna/intern/SConscript
source/blender/makesrna/RNA_access.h
source/blender/makesrna/RNA_define.h
source/blender/makesrna/RNA_enum_types.h
source/blender/makesrna/RNA_types.h
source/blender/makesrna/SConscript
source/blender/makesrna/intern/CMakeLists.txt
source/blender/makesrna/intern/Makefile
source/blender/makesrna/intern/SConscript
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_action.c
source/blender/makesrna/intern/rna_animation.c
source/blender/makesrna/intern/rna_armature.c
source/blender/makesrna/intern/rna_boid.c
source/blender/makesrna/intern/rna_brush.c
source/blender/makesrna/intern/rna_cloth.c
source/blender/makesrna/intern/rna_constraint.c
source/blender/makesrna/intern/rna_curve.c
source/blender/makesrna/intern/rna_define.c
source/blender/makesrna/intern/rna_fcurve.c
source/blender/makesrna/intern/rna_fluidsim.c
source/blender/makesrna/intern/rna_gpencil.c [new file with mode: 0644]
source/blender/makesrna/intern/rna_group.c
source/blender/makesrna/intern/rna_internal.h
source/blender/makesrna/intern/rna_internal_types.h
source/blender/makesrna/intern/rna_key.c
source/blender/makesrna/intern/rna_lamp.c
source/blender/makesrna/intern/rna_lattice.c
source/blender/makesrna/intern/rna_main.c
source/blender/makesrna/intern/rna_main_api.c
source/blender/makesrna/intern/rna_material.c
source/blender/makesrna/intern/rna_mesh.c
source/blender/makesrna/intern/rna_mesh_api.c
source/blender/makesrna/intern/rna_meta.c
source/blender/makesrna/intern/rna_modifier.c
source/blender/makesrna/intern/rna_nla.c
source/blender/makesrna/intern/rna_nodetree.c
source/blender/makesrna/intern/rna_nodetree_types.h
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_packedfile.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_sculpt_paint.c
source/blender/makesrna/intern/rna_sensor.c
source/blender/makesrna/intern/rna_sequence.c
source/blender/makesrna/intern/rna_smoke.c
source/blender/makesrna/intern/rna_sound.c
source/blender/makesrna/intern/rna_space.c
source/blender/makesrna/intern/rna_test.c [new file with mode: 0644]
source/blender/makesrna/intern/rna_text.c
source/blender/makesrna/intern/rna_text_api.c [new file with mode: 0644]
source/blender/makesrna/intern/rna_texture.c
source/blender/makesrna/intern/rna_ui_api.c
source/blender/makesrna/intern/rna_userdef.c
source/blender/makesrna/intern/rna_wm.c
source/blender/makesrna/intern/rna_world.c
source/blender/nodes/CMP_node.h
source/blender/nodes/CMakeLists.txt
source/blender/nodes/SConscript
source/blender/nodes/intern/CMP_nodes/CMP_channelMatte.c
source/blender/nodes/intern/CMP_nodes/CMP_chromaMatte.c
source/blender/nodes/intern/CMP_nodes/CMP_colorMatte.c [new file with mode: 0644]
source/blender/nodes/intern/CMP_nodes/CMP_diffMatte.c
source/blender/nodes/intern/CMP_nodes/CMP_distanceMatte.c [new file with mode: 0644]
source/blender/nodes/intern/CMP_nodes/CMP_levels.c [new file with mode: 0644]
source/blender/nodes/intern/CMP_nodes/CMP_lummaMatte.c
source/blender/nodes/intern/CMP_util.c
source/blender/nodes/intern/CMP_util.h
source/blender/nodes/intern/TEX_nodes/TEX_rotate.c
source/blender/python/CMakeLists.txt
source/blender/python/SConscript
source/blender/python/epy_doc_gen.py
source/blender/python/generic/Geometry.c
source/blender/python/generic/Mathutils.c
source/blender/python/generic/bpy_internal_import.h
source/blender/python/generic/matrix.c
source/blender/python/generic/vector.c
source/blender/python/intern/bpy_array.c
source/blender/python/intern/bpy_interface.c
source/blender/python/intern/bpy_operator.c
source/blender/python/intern/bpy_operator_wrap.c
source/blender/python/intern/bpy_rna.c
source/blender/python/intern/bpy_rna.h
source/blender/python/intern/bpy_util.c
source/blender/python/intern/bpy_util.h
source/blender/quicktime/CMakeLists.txt
source/blender/quicktime/SConscript
source/blender/readblenfile/CMakeLists.txt
source/blender/readblenfile/SConscript
source/blender/readblenfile/intern/BLO_readblenfile.c
source/blender/render/CMakeLists.txt
source/blender/render/intern/include/render_types.h
source/blender/render/intern/include/volume_precache.h
source/blender/render/intern/source/convertblender.c
source/blender/render/intern/source/envmap.c
source/blender/render/intern/source/initrender.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/rendercore.c
source/blender/render/intern/source/shadbuf.c
source/blender/render/intern/source/shadeinput.c
source/blender/render/intern/source/shadeoutput.c
source/blender/render/intern/source/sss.c
source/blender/render/intern/source/strand.c
source/blender/render/intern/source/texture.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/WM_api.h
source/blender/windowmanager/WM_types.h
source/blender/windowmanager/intern/wm.c
source/blender/windowmanager/intern/wm_event_system.c
source/blender/windowmanager/intern/wm_files.c
source/blender/windowmanager/intern/wm_jobs.c
source/blender/windowmanager/intern/wm_keymap.c
source/blender/windowmanager/intern/wm_operators.c
source/blenderplayer/CMakeLists.txt [new file with mode: 0644]
source/blenderplayer/bad_level_call_stubs/CMakeLists.txt [new file with mode: 0644]
source/blenderplayer/bad_level_call_stubs/Makefile [new file with mode: 0644]
source/blenderplayer/bad_level_call_stubs/SConscript [new file with mode: 0644]
source/blenderplayer/bad_level_call_stubs/stubs.c [new file with mode: 0644]
source/creator/CMakeLists.txt
source/gameengine/BlenderRoutines/CMakeLists.txt
source/gameengine/BlenderRoutines/KX_BlenderGL.cpp
source/gameengine/BlenderRoutines/KX_BlenderGL.h
source/gameengine/BlenderRoutines/KX_BlenderRenderTools.cpp
source/gameengine/BlenderRoutines/SConscript
source/gameengine/CMakeLists.txt
source/gameengine/Converter/BL_BlenderDataConversion.cpp
source/gameengine/Converter/BL_ShapeActionActuator.cpp
source/gameengine/Converter/CMakeLists.txt
source/gameengine/Converter/KX_ConvertActuators.cpp
source/gameengine/Converter/KX_ConvertProperties.cpp
source/gameengine/Converter/SConscript
source/gameengine/Expressions/CMakeLists.txt
source/gameengine/Expressions/PyObjectPlus.cpp
source/gameengine/Expressions/PyObjectPlus.h
source/gameengine/Expressions/SConscript
source/gameengine/GameLogic/CMakeLists.txt
source/gameengine/GameLogic/SConscript
source/gameengine/GamePlayer/CMakeLists.txt
source/gameengine/GamePlayer/common/CMakeLists.txt
source/gameengine/GamePlayer/common/GPC_Engine.cpp
source/gameengine/GamePlayer/common/GPC_Engine.h
source/gameengine/GamePlayer/common/SConscript
source/gameengine/GamePlayer/ghost/CMakeLists.txt
source/gameengine/GamePlayer/ghost/GPG_Application.cpp
source/gameengine/GamePlayer/ghost/GPG_Application.h
source/gameengine/GamePlayer/ghost/GPG_ghost.cpp
source/gameengine/GamePlayer/ghost/SConscript
source/gameengine/Ketsji/CMakeLists.txt
source/gameengine/Ketsji/KXNetwork/CMakeLists.txt
source/gameengine/Ketsji/KXNetwork/SConscript
source/gameengine/Ketsji/KX_GameObject.cpp
source/gameengine/Ketsji/KX_NearSensor.cpp
source/gameengine/Ketsji/KX_NearSensor.h
source/gameengine/Ketsji/KX_ObjectActuator.cpp
source/gameengine/Ketsji/KX_PolyProxy.cpp
source/gameengine/Ketsji/KX_PyMath.h
source/gameengine/Ketsji/KX_PythonInit.cpp
source/gameengine/Ketsji/KX_PythonSeq.cpp
source/gameengine/Ketsji/SConscript
source/gameengine/Network/CMakeLists.txt
source/gameengine/Network/LoopBackNetwork/CMakeLists.txt
source/gameengine/Network/LoopBackNetwork/SConscript
source/gameengine/Network/SConscript
source/gameengine/Physics/Bullet/CMakeLists.txt
source/gameengine/Physics/Bullet/CcdPhysicsController.cpp
source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp
source/gameengine/Physics/Bullet/SConscript
source/gameengine/Physics/Dummy/CMakeLists.txt
source/gameengine/Physics/Dummy/SConscript
source/gameengine/Physics/common/CMakeLists.txt
source/gameengine/Physics/common/SConscript
source/gameengine/PyDoc/GameLogic.py
source/gameengine/Rasterizer/CMakeLists.txt
source/gameengine/Rasterizer/RAS_MaterialBucket.h
source/gameengine/Rasterizer/RAS_OpenGLRasterizer/CMakeLists.txt
source/gameengine/Rasterizer/RAS_OpenGLRasterizer/SConscript
source/gameengine/Rasterizer/RAS_Polygon.cpp
source/gameengine/Rasterizer/RAS_Polygon.h
source/gameengine/Rasterizer/SConscript
source/gameengine/SceneGraph/CMakeLists.txt
source/gameengine/SceneGraph/SConscript
source/gameengine/VideoTexture/CMakeLists.txt
source/gameengine/VideoTexture/SConscript
source/icons/SConscript
source/kernel/CMakeLists.txt
source/kernel/SConscript
source/nan_compile.mk
source/nan_definitions.mk
source/nan_link.mk
source/nan_warn.mk
tools/Blender.py
tools/btools.py

index d1e18723f5db4e34741a2f9c06b4ef39048a26b6..c881dec03dbb7dcaf5f1245443a16a9513a1d453 100644 (file)
@@ -34,11 +34,11 @@ IF(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR})
 MESSAGE(FATAL_ERROR "CMake generation for blender is not allowed within the source directory! 
 Remove the CMakeCache.txt file and try again from another folder, e.g.: 
 
-   rm CMakeCache.txt 
-   cd ..
-   mkdir cmake-make 
-   cd cmake-make
-   cmake -G \"Unix Makefiles\" ../blender
+       rm CMakeCache.txt 
+       cd ..
+       mkdir cmake-make 
+       cd cmake-make
+       cmake -G \"Unix Makefiles\" ../blender
 ")
 ENDIF(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR})
 
@@ -76,7 +76,7 @@ OPTION(WITH_CXX_GUARDEDALLOC "Enable GuardedAlloc for C++ memory allocation" OFF
 OPTION(WITH_INSTALL       "Install accompanying scripts and language files needed to run blender" ON)
 
 IF(NOT WITH_GAMEENGINE AND WITH_PLAYER)
-  MESSAGE("WARNING: WITH_PLAYER needs WITH_GAMEENGINE")
+       MESSAGE("WARNING: WITH_PLAYER needs WITH_GAMEENGINE")
 ENDIF(NOT WITH_GAMEENGINE AND WITH_PLAYER)
 
 # For alternate Python locations the commandline can be used to override detected/default cache settings, e.g:
@@ -95,421 +95,421 @@ INCLUDE(CMake/macros.cmake)
 #Platform specifics
 
 IF(UNIX AND NOT APPLE)
-  IF(WITH_OPENAL)
-    FIND_PACKAGE(OpenAL)
-    IF(OPENAL_FOUND)
-      SET(WITH_OPENAL ON)
-    ELSE(OPENAL_FOUND)
-      SET(WITH_OPENAL OFF)
-    ENDIF(OPENAL_FOUND)
-  ENDIF(WITH_OPENAL)
-
-  IF(WITH_JACK)
-    SET(JACK /usr)
-    SET(JACK_INC ${JACK}/include/jack)
-    SET(JACK_LIB jack)
-    SET(JACK_LIBPATH ${JACK}/lib)
-  ENDIF(WITH_JACK)
-
-  IF(WITH_SNDFILE)
+       IF(WITH_OPENAL)
+               FIND_PACKAGE(OpenAL)
+               IF(OPENAL_FOUND)
+                       SET(WITH_OPENAL ON)
+               ELSE(OPENAL_FOUND)
+                       SET(WITH_OPENAL OFF)
+               ENDIF(OPENAL_FOUND)
+       ENDIF(WITH_OPENAL)
+
+       IF(WITH_JACK)
+               SET(JACK /usr)
+               SET(JACK_INC ${JACK}/include/jack)
+               SET(JACK_LIB jack)
+               SET(JACK_LIBPATH ${JACK}/lib)
+       ENDIF(WITH_JACK)
+
+       IF(WITH_SNDFILE)
        SET(SNDFILE /usr)
        SET(SNDFILE_INC ${SNDFILE}/include)
        SET(SNDFILE_LIB sndfile)
        SET(SNDFILE_LIBPATH ${SNDFILE}/lib)
-  ENDIF(WITH_SNDFILE)
-
-  FIND_LIBRARY(INTL_LIBRARY
-    NAMES intl
-    PATHS
-    /sw/lib
-  )
-  FIND_LIBRARY(ICONV_LIBRARY
-    NAMES iconv
-    PATHS
-    /sw/lib
-  )
+       ENDIF(WITH_SNDFILE)
+
+       FIND_LIBRARY(INTL_LIBRARY
+               NAMES intl
+               PATHS
+               /sw/lib
+       )
+       FIND_LIBRARY(ICONV_LIBRARY
+               NAMES iconv
+               PATHS
+               /sw/lib
+       )
   
-  IF(INTL_LIBRARY AND ICONV_LIBRARY)
-    SET(GETTEXT_LIB ${INTL_LIBRARY} ${ICONV_LIBRARY})
-  ENDIF(INTL_LIBRARY AND ICONV_LIBRARY)
-
-  FIND_PACKAGE(Freetype)
-  # UNSET(FREETYPE_INCLUDE_DIRS CACHE) # cant use
-
-  # No way to set py31. remove for now.
-  # FIND_PACKAGE(PythonLibs)
-  SET(PYTHON /usr)
-  SET(PYTHON_VERSION 3.1)
-  SET(PYTHON_INC "${PYTHON}/include/python${PYTHON_VERSION}" CACHE STRING "")
-  # SET(PYTHON_BINARY python) # not used yet
-  SET(PYTHON_LIB python${PYTHON_VERSION} CACHE STRING "")
-  SET(PYTHON_LIBPATH ${PYTHON}/lib CACHE STRING "")
+       IF(INTL_LIBRARY AND ICONV_LIBRARY)
+               SET(GETTEXT_LIB ${INTL_LIBRARY} ${ICONV_LIBRARY})
+       ENDIF(INTL_LIBRARY AND ICONV_LIBRARY)
+
+       FIND_PACKAGE(Freetype)
+       # UNSET(FREETYPE_INCLUDE_DIRS CACHE) # cant use
+
+       # No way to set py31. remove for now.
+       # FIND_PACKAGE(PythonLibs)
+       SET(PYTHON /usr)
+       SET(PYTHON_VERSION 3.1)
+       SET(PYTHON_INC "${PYTHON}/include/python${PYTHON_VERSION}" CACHE STRING "")
+       # SET(PYTHON_BINARY python) # not used yet
+       SET(PYTHON_LIB python${PYTHON_VERSION} CACHE STRING "")
+       SET(PYTHON_LIBPATH ${PYTHON}/lib CACHE STRING "")
   
-  # FIND_PACKAGE(PythonInterp) # not used yet
-  # SET(PYTHON_BINARY ${PYTHON_EXECUTABLE} CACHE STRING "")
+       # FIND_PACKAGE(PythonInterp) # not used yet
+       # SET(PYTHON_BINARY ${PYTHON_EXECUTABLE} CACHE STRING "")
   
-  SET(PYTHON_LINKFLAGS "-Xlinker -export-dynamic")
-
-  IF(WITH_SDL)
-    FIND_PACKAGE(SDL)
-    # UNSET(SDLMAIN_LIBRARY CACHE)
-    IF(NOT SDL_FOUND)
-      SET(WITH_SDL OFF)
-    ENDIF(NOT SDL_FOUND)
-  ENDIF(WITH_SDL)
-
-  FIND_PATH(OPENEXR_INC
-    ImfXdr.h
-    PATHS
-    /usr/local/include/OpenEXR
-    /usr/include/OpenEXR
-    /sw/include/OpenEXR
-    /opt/local/include/OpenEXR
-    /opt/csw/include/OpenEXR
-    /opt/include/OpenEXR
-  )
-  SET(OPENEXR_LIB Half IlmImf Iex Imath)
-
-  SET(FFMPEG /usr)
-  SET(FFMPEG_INC ${FFMPEG}/include)
-  SET(FFMPEG_LIB avformat avcodec avutil avdevice swscale)
-  SET(FFMPEG_LIBPATH ${FFMPEG}/lib)
+       SET(PYTHON_LINKFLAGS "-Xlinker -export-dynamic")
+
+       IF(WITH_SDL)
+               FIND_PACKAGE(SDL)
+               # UNSET(SDLMAIN_LIBRARY CACHE)
+               IF(NOT SDL_FOUND)
+                       SET(WITH_SDL OFF)
+               ENDIF(NOT SDL_FOUND)
+       ENDIF(WITH_SDL)
+
+       FIND_PATH(OPENEXR_INC
+               ImfXdr.h
+               PATHS
+               /usr/local/include/OpenEXR
+               /usr/include/OpenEXR
+               /sw/include/OpenEXR
+               /opt/local/include/OpenEXR
+               /opt/csw/include/OpenEXR
+               /opt/include/OpenEXR
+       )
+       SET(OPENEXR_LIB Half IlmImf Iex Imath)
+
+       SET(FFMPEG /usr)
+       SET(FFMPEG_INC ${FFMPEG}/include)
+       SET(FFMPEG_LIB avformat avcodec avutil avdevice swscale)
+       SET(FFMPEG_LIBPATH ${FFMPEG}/lib)
   
-  IF(WITH_FFTW3)
-    SET(FFTW3 /usr)
-    SET(FFTW3_INC ${FFTW3}/include)
-    SET(FFTW3_LIB fftw3)
-    SET(FFTW3_LIBPATH ${FFTW3}/lib)
-  ENDIF(WITH_FFTW3)
+       IF(WITH_FFTW3)
+               SET(FFTW3 /usr)
+               SET(FFTW3_INC ${FFTW3}/include)
+               SET(FFTW3_LIB fftw3)
+               SET(FFTW3_LIBPATH ${FFTW3}/lib)
+       ENDIF(WITH_FFTW3)
 
-  SET(LIBSAMPLERATE /usr)
-  SET(LIBSAMPLERATE_INC ${LIBSAMPLERATE}/include)
-  SET(LIBSAMPLERATE_LIB samplerate)
-  SET(LIBSAMPLERATE_LIBPATH ${LIBSAMPLERATE}/lib)
+       SET(LIBSAMPLERATE /usr)
+       SET(LIBSAMPLERATE_INC ${LIBSAMPLERATE}/include)
+       SET(LIBSAMPLERATE_LIB samplerate)
+       SET(LIBSAMPLERATE_LIBPATH ${LIBSAMPLERATE}/lib)
 
-  FIND_PACKAGE(JPEG REQUIRED)
+       FIND_PACKAGE(JPEG REQUIRED)
 
-  FIND_PACKAGE(PNG REQUIRED)
+       FIND_PACKAGE(PNG REQUIRED)
 
-  FIND_PACKAGE(ZLIB REQUIRED)
+       FIND_PACKAGE(ZLIB REQUIRED)
 
-  # Could use ${X11_Xinput_LIB} ${X11_X11_LIB} too
-  SET(LLIBS "-lXi -lutil -lc -lm -lpthread -lstdc++ -lX11")
+       # Could use ${X11_Xinput_LIB} ${X11_X11_LIB} too
+       SET(LLIBS "-lXi -lutil -lc -lm -lpthread -lstdc++ -lX11")
 
-  IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
-    # BSD's dont use libdl.so
-    SET(LLIBS "${LLIBS} -ldl")
-  ENDIF(CMAKE_SYSTEM_NAME MATCHES "Linux")
+       IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
+               # BSD's dont use libdl.so
+               SET(LLIBS "${LLIBS} -ldl")
+       ENDIF(CMAKE_SYSTEM_NAME MATCHES "Linux")
 
-  IF(WITH_OPENMP)
-    SET(LLIBS "${LLIBS} -lgomp")
-    SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fopenmp")
-    SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fopenmp")
-  ENDIF(WITH_OPENMP)
+       IF(WITH_OPENMP)
+               SET(LLIBS "${LLIBS} -lgomp")
+               SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fopenmp")
+               SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fopenmp")
+       ENDIF(WITH_OPENMP)
 
 
-  SET(PLATFORM_CFLAGS "-pipe -fPIC -funsigned-char -fno-strict-aliasing -DXP_UNIX -Wno-char-subscripts")
+       SET(PLATFORM_CFLAGS "-pipe -fPIC -funsigned-char -fno-strict-aliasing -DXP_UNIX -Wno-char-subscripts")
 
-  SET(PLATFORM_LINKFLAGS "-pthread")
+       SET(PLATFORM_LINKFLAGS "-pthread")
 
-  # Better warnings
-  SET(C_WARNINGS "-Wall -Wno-char-subscripts -Wpointer-arith -Wcast-align -Wdeclaration-after-statement")
-  SET(CXX_WARNINGS "-Wall -Wno-invalid-offsetof -Wno-sign-compare")
+       # Better warnings
+       SET(C_WARNINGS "-Wall -Wno-char-subscripts -Wpointer-arith -Wcast-align -Wdeclaration-after-statement")
+       SET(CXX_WARNINGS "-Wall -Wno-invalid-offsetof -Wno-sign-compare")
 
-  INCLUDE_DIRECTORIES(${JPEG_INCLUDE_DIR} ${PNG_INCLUDE_DIR} ${ZLIB_INCLUDE_DIR} )
+       INCLUDE_DIRECTORIES(${JPEG_INCLUDE_DIR} ${PNG_INCLUDE_DIR} ${ZLIB_INCLUDE_DIR} )
 ENDIF(UNIX AND NOT APPLE)
 
 IF(WIN32)
 
-  # this file is included anyway when building under Windows with cl.exe
-  #  INCLUDE(${CMAKE_ROOT}/Modules/Platform/Windows-cl.cmake)
+       # this file is included anyway when building under Windows with cl.exe
+       #  INCLUDE(${CMAKE_ROOT}/Modules/Platform/Windows-cl.cmake)
   
-  SET(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/windows)
-
-  # Setup 64bit and 64bit windows systems
-  IF(CMAKE_CL_64)
-    message("64 bit compiler detected.")
-    SET(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/win64)
-  ENDIF(CMAKE_CL_64)
-
-  SET(PYTHON ${LIBDIR}/python)
-  SET(PYTHON_VERSION 3.1)
-  SET(PYTHON_INC "${PYTHON}/include/python${PYTHON_VERSION}")
-  # SET(PYTHON_BINARY python) # not used yet
-  SET(PYTHON_LIB python31)
-  SET(PYTHON_LIBPATH ${PYTHON}/lib)
-
-  IF(CMAKE_CL_64)
-    SET(WITH_OPENAL OFF)
-  ELSE(CMAKE_CL_64)
-    #SET(WITH_OPENAL ON)
-    SET(OPENAL ${LIBDIR}/openal)
-    SET(OPENAL_INCLUDE_DIR ${OPENAL}/include)
-    SET(OPENAL_LIBRARY wrap_oal)
-    SET(OPENAL_LIBPATH ${OPENAL}/lib)
-  ENDIF(CMAKE_CL_64)
-
-  IF(WITH_JACK)
-    SET(JACK ${LIBDIR}/jack)
-    SET(JACK_INC ${JACK}/include/jack ${JACK}/include)
-    SET(JACK_LIB libjack)
-    SET(JACK_LIBPATH ${JACK}/lib)
-  ENDIF(WITH_JACK)
-
-  IF(WITH_SNDFILE)
-       SET(SNDFILE ${LIBDIR}/sndfile)
-       SET(SNDFILE_INC ${SNDFILE}/include)
-       SET(SNDFILE_LIB sndfile)
-       SET(SNDFILE_LIBPATH ${SNDFILE}/lib)
-  ENDIF(WITH_SNDFILE)
-
-  IF(CMAKE_CL_64)
-    SET(PNG_LIBRARIES libpng)
-  ELSE(CMAKE_CL_64)
-    SET(PNG_LIBRARIES libpng_st)
-  ENDIF(CMAKE_CL_64)
-  SET(JPEG_LIBRARY libjpeg)
-
-  SET(ZLIB ${LIBDIR}/zlib)
-  SET(ZLIB_INC ${ZLIB}/include)
-  IF(CMAKE_CL_64)
-    SET(ZLIB_LIBRARIES libz)
-  ELSE(CMAKE_CL_64)
-    SET(ZLIB_LIBRARIES zlib)
-  ENDIF(CMAKE_CL_64)
-  SET(ZLIB_LIBPATH ${ZLIB}/lib)
+       SET(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/windows)
+
+       # Setup 64bit and 64bit windows systems
+       IF(CMAKE_CL_64)
+               message("64 bit compiler detected.")
+               SET(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/win64)
+       ENDIF(CMAKE_CL_64)
+
+       SET(PYTHON ${LIBDIR}/python)
+       SET(PYTHON_VERSION 3.1)
+       SET(PYTHON_INC "${PYTHON}/include/python${PYTHON_VERSION}")
+       # SET(PYTHON_BINARY python) # not used yet
+       SET(PYTHON_LIB python31)
+       SET(PYTHON_LIBPATH ${PYTHON}/lib)
+
+       IF(CMAKE_CL_64)
+               SET(WITH_OPENAL OFF)
+       ELSE(CMAKE_CL_64)
+               #SET(WITH_OPENAL ON)
+               SET(OPENAL ${LIBDIR}/openal)
+               SET(OPENAL_INCLUDE_DIR ${OPENAL}/include)
+               SET(OPENAL_LIBRARY wrap_oal)
+               SET(OPENAL_LIBPATH ${OPENAL}/lib)
+       ENDIF(CMAKE_CL_64)
+
+       IF(WITH_JACK)
+               SET(JACK ${LIBDIR}/jack)
+               SET(JACK_INC ${JACK}/include/jack ${JACK}/include)
+               SET(JACK_LIB libjack)
+               SET(JACK_LIBPATH ${JACK}/lib)
+       ENDIF(WITH_JACK)
+
+       IF(WITH_SNDFILE)
+               SET(SNDFILE ${LIBDIR}/sndfile)
+               SET(SNDFILE_INC ${SNDFILE}/include)
+               SET(SNDFILE_LIB libsndfile-1)
+               SET(SNDFILE_LIBPATH ${SNDFILE}/lib)
+       ENDIF(WITH_SNDFILE)
+
+       IF(CMAKE_CL_64)
+               SET(PNG_LIBRARIES libpng)
+       ELSE(CMAKE_CL_64)
+               SET(PNG_LIBRARIES libpng_st)
+       ENDIF(CMAKE_CL_64)
+       SET(JPEG_LIBRARY libjpeg)
+
+       SET(ZLIB ${LIBDIR}/zlib)
+       SET(ZLIB_INC ${ZLIB}/include)
+       IF(CMAKE_CL_64)
+               SET(ZLIB_LIBRARIES libz)
+       ELSE(CMAKE_CL_64)
+               SET(ZLIB_LIBRARIES zlib)
+       ENDIF(CMAKE_CL_64)
+       SET(ZLIB_LIBPATH ${ZLIB}/lib)
   
-  SET(PTHREADS ${LIBDIR}/pthreads)
-  SET(PTHREADS_INC ${PTHREADS}/include)
-  SET(PTHREADS_LIB pthreadVC2)
-  SET(PTHREADS_LIBPATH ${PTHREADS}/lib)
+       SET(PTHREADS ${LIBDIR}/pthreads)
+       SET(PTHREADS_INC ${PTHREADS}/include)
+       SET(PTHREADS_LIB pthreadVC2)
+       SET(PTHREADS_LIBPATH ${PTHREADS}/lib)
   
-  SET(ICONV ${LIBDIR}/iconv)
-  SET(ICONV_INC ${ICONV}/include)
-  SET(ICONV_LIB iconv)
-  SET(ICONV_LIBPATH ${ICONV}/lib)
+       SET(ICONV ${LIBDIR}/iconv)
+       SET(ICONV_INC ${ICONV}/include)
+       SET(ICONV_LIB iconv)
+       SET(ICONV_LIBPATH ${ICONV}/lib)
   
-  IF(WITH_FFTW3)
-    SET(FFTW3 ${LIBDIR}/fftw3)
-    SET(FFTW3_INC ${FFTW3}/include)
-    SET(FFTW3_LIB libfftw)
-    SET(FFTW3_LIBPATH ${FFTW3}/lib)
-  ENDIF(WITH_FFTW3)
+       IF(WITH_FFTW3)
+               SET(FFTW3 ${LIBDIR}/fftw3)
+               SET(FFTW3_INC ${FFTW3}/include)
+               SET(FFTW3_LIB libfftw)
+               SET(FFTW3_LIBPATH ${FFTW3}/lib)
+       ENDIF(WITH_FFTW3)
   
-  SET(GETTEXT ${LIBDIR}/gettext)
-  SET(GETTEXT_INC ${GETTEXT}/include)
-  IF(CMAKE_CL_64)
-    SET(GETTEXT_LIB gettext)
-  ELSE(CMAKE_CL_64)
-    SET(GETTEXT_LIB gnu_gettext)
-  ENDIF(CMAKE_CL_64)
-  SET(GETTEXT_LIBPATH ${GETTEXT}/lib)
-
-  SET(FREETYPE ${LIBDIR}/freetype)
-  SET(FREETYPE_INCLUDE_DIRS ${FREETYPE}/include ${FREETYPE}/include/freetype2)
-  SET(FREETYPE_LIBPATH ${FREETYPE}/lib)
-  SET(FREETYPE_LIBRARY freetype2ST)
+       SET(GETTEXT ${LIBDIR}/gettext)
+       SET(GETTEXT_INC ${GETTEXT}/include)
+       IF(CMAKE_CL_64)
+               SET(GETTEXT_LIB gettext)
+       ELSE(CMAKE_CL_64)
+               SET(GETTEXT_LIB gnu_gettext)
+       ENDIF(CMAKE_CL_64)
+       SET(GETTEXT_LIBPATH ${GETTEXT}/lib)
+
+       SET(FREETYPE ${LIBDIR}/freetype)
+       SET(FREETYPE_INCLUDE_DIRS ${FREETYPE}/include ${FREETYPE}/include/freetype2)
+       SET(FREETYPE_LIBPATH ${FREETYPE}/lib)
+       SET(FREETYPE_LIBRARY freetype2ST)
   
-  SET(OPENEXR ${LIBDIR}/openexr)
-  SET(OPENEXR_INC ${OPENEXR}/include ${OPENEXR}/include/IlmImf ${OPENEXR}/include/Iex ${OPENEXR}/include/Imath)
-  SET(OPENEXR_LIB Iex Half IlmImf Imath IlmThread)
-  IF (MSVC80)
-    SET(OPENEXR_LIBPATH ${OPENEXR}/lib_vs2005)
-  ELSE (MSVC80)
-    SET(OPENEXR_LIBPATH ${OPENEXR}/lib_msvc)
-  ENDIF(MSVC80)
-  IF (MSVC90)
-    SET(OPENEXR_LIBPATH ${OPENEXR}/lib_vs2008)
-  ENDIF(MSVC90)
+       SET(OPENEXR ${LIBDIR}/openexr)
+       SET(OPENEXR_INC ${OPENEXR}/include ${OPENEXR}/include/IlmImf ${OPENEXR}/include/Iex ${OPENEXR}/include/Imath)
+       SET(OPENEXR_LIB Iex Half IlmImf Imath IlmThread)
+       IF (MSVC80)
+               SET(OPENEXR_LIBPATH ${OPENEXR}/lib_vs2005)
+       ELSE (MSVC80)
+               SET(OPENEXR_LIBPATH ${OPENEXR}/lib_msvc)
+       ENDIF(MSVC80)
+       IF (MSVC90)
+               SET(OPENEXR_LIBPATH ${OPENEXR}/lib_vs2008)
+       ENDIF(MSVC90)
 
   
-  SET(QUICKTIME ${LIBDIR}/QTDevWin)
-  SET(QUICKTIME_INC ${QUICKTIME}/CIncludes)
-  SET(QUICKTIME_LIB qtmlClient)
-  SET(QUICKTIME_LIBPATH ${QUICKTIME}/Libraries)
-
-  SET(FFMPEG ${LIBDIR}/ffmpeg)
-  SET(FFMPEG_INC ${FFMPEG}/include)
-  SET(FFMPEG_LIB avcodec-52 avformat-52 avdevice-52 avutil-50 swscale-0)
-  SET(FFMPEG_LIBPATH ${FFMPEG}/lib)
-
-  SET(LIBSAMPLERATE ${LIBDIR}/samplerate)
-  SET(LIBSAMPLERATE_INC ${LIBSAMPLERATE}/include)
-  SET(LIBSAMPLERATE_LIB libsamplerate)
-  SET(LIBSAMPLERATE_LIBPATH ${LIBSAMPLERATE}/lib)
-
-  IF(CMAKE_CL_64)
-    SET(LLIBS kernel32 user32 vfw32 winmm ws2_32 )
-  ELSE(CMAKE_CL_64)
-    SET(LLIBS kernel32 user32 gdi32 comdlg32 advapi32 shell32 ole32 oleaut32 uuid ws2_32 vfw32 winmm)
-  ENDIF(CMAKE_CL_64)
-
-  SET(CMAKE_CXX_FLAGS_DEBUG "/D_CRT_NONSTDC_NO_DEPRECATE /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /wd4800 /wd4244 /wd4305 /D_DEBUG /Od /Gm /EHsc /RTC1 /MTd /W3 /nologo /ZI /J" CACHE STRING "MSVC MT flags " FORCE)
-  SET(CMAKE_CXX_FLAGS_RELEASE "/D_CRT_NONSTDC_NO_DEPRECATE /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /wd4800 /wd4244 /wd4305 /O2 /Ob2 /DNDEBUG /EHsc /MT /W3 /nologo /J" CACHE STRING "MSVC MT flags " FORCE)
-  SET(CMAKE_CXX_FLAGS_MINSIZEREL "/D_CRT_NONSTDC_NO_DEPRECATE /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /wd4800 /wd4244 /wd4305 /O1 /Ob1 /DNDEBUG /EHsc /MT /W3 /nologo /J" CACHE STRING "MSVC MT flags " FORCE)
-  SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "/D_CRT_NONSTDC_NO_DEPRECATE /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /wd4800 /wd4244 /wd4305 /O2 /Ob1 /DNDEBUG /EHsc /MT /W3 /nologo /Zi /J" CACHE STRING "MSVC MT flags " FORCE)
-  SET(CMAKE_C_FLAGS_DEBUG "/D_CRT_NONSTDC_NO_DEPRECATE /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /wd4800 /wd4244 /wd4305 /D_DEBUG /Od /Gm /EHsc /RTC1 /MTd /W3 /nologo /ZI /J" CACHE STRING "MSVC MT flags " FORCE)
-  SET(CMAKE_C_FLAGS_RELEASE "/D_CRT_NONSTDC_NO_DEPRECATE /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /wd4800 /wd4244 /wd4305 /O2 /Ob2 /DNDEBUG /EHsc /MT /W3 /nologo /J" CACHE STRING "MSVC MT flags " FORCE)
-  SET(CMAKE_C_FLAGS_MINSIZEREL "/D_CRT_NONSTDC_NO_DEPRECATE /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /wd4800 /wd4244 /wd4305 /O1 /Ob1 /DNDEBUG /EHsc /MT /W3 /nologo /J" CACHE STRING "MSVC MT flags " FORCE)
-  SET(CMAKE_C_FLAGS_RELWITHDEBINFO "/D_CRT_NONSTDC_NO_DEPRECATE /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /wd4800 /wd4244 /wd4305 /O2 /Ob1 /DNDEBUG /EHsc /MT /W3 /nologo /Zi /J" CACHE STRING "MSVC MT flags " FORCE)
-
-  IF(WITH_OPENMP)
-    SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /openmp ")
-    SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /openmp ")
-  ENDIF(WITH_OPENMP)
-
-  SET(SDL ${LIBDIR}/sdl)
-  SET(SDL_INCLUDE_DIR ${SDL}/include)
-  SET(SDL_LIBRARY SDL)
-  SET(SDL_LIBPATH ${SDL}/lib)
-
-  SET(PNG "${LIBDIR}/png")
-  SET(PNG_INC "${PNG}/include")
-  SET(PNG_LIBPATH ${PNG}/lib)
-
-  SET(JPEG "${LIBDIR}/jpeg")
-  SET(JPEG_INC "${JPEG}/include")
-  SET(JPEG_LIBPATH ${JPEG}/lib)
-
-  SET(TIFF ${LIBDIR}/tiff)
-  SET(TIFF_INC ${TIFF}/include)
+       SET(QUICKTIME ${LIBDIR}/QTDevWin)
+       SET(QUICKTIME_INC ${QUICKTIME}/CIncludes)
+       SET(QUICKTIME_LIB qtmlClient)
+       SET(QUICKTIME_LIBPATH ${QUICKTIME}/Libraries)
+
+       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(LIBSAMPLERATE ${LIBDIR}/samplerate)
+       SET(LIBSAMPLERATE_INC ${LIBSAMPLERATE}/include)
+       SET(LIBSAMPLERATE_LIB libsamplerate)
+       SET(LIBSAMPLERATE_LIBPATH ${LIBSAMPLERATE}/lib)
+
+       IF(CMAKE_CL_64)
+               SET(LLIBS kernel32 user32 vfw32 winmm ws2_32 )
+       ELSE(CMAKE_CL_64)
+               SET(LLIBS kernel32 user32 gdi32 comdlg32 advapi32 shell32 ole32 oleaut32 uuid ws2_32 vfw32 winmm)
+       ENDIF(CMAKE_CL_64)
+
+       SET(CMAKE_CXX_FLAGS_DEBUG "/D_CRT_NONSTDC_NO_DEPRECATE /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /wd4800 /wd4244 /wd4305 /D_DEBUG /Od /Gm /EHsc /RTC1 /MTd /W3 /nologo /ZI /J" CACHE STRING "MSVC MT flags " FORCE)
+       SET(CMAKE_CXX_FLAGS_RELEASE "/D_CRT_NONSTDC_NO_DEPRECATE /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /wd4800 /wd4244 /wd4305 /O2 /Ob2 /DNDEBUG /EHsc /MT /W3 /nologo /J" CACHE STRING "MSVC MT flags " FORCE)
+       SET(CMAKE_CXX_FLAGS_MINSIZEREL "/D_CRT_NONSTDC_NO_DEPRECATE /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /wd4800 /wd4244 /wd4305 /O1 /Ob1 /DNDEBUG /EHsc /MT /W3 /nologo /J" CACHE STRING "MSVC MT flags " FORCE)
+       SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "/D_CRT_NONSTDC_NO_DEPRECATE /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /wd4800 /wd4244 /wd4305 /O2 /Ob1 /DNDEBUG /EHsc /MT /W3 /nologo /Zi /J" CACHE STRING "MSVC MT flags " FORCE)
+       SET(CMAKE_C_FLAGS_DEBUG "/D_CRT_NONSTDC_NO_DEPRECATE /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /wd4800 /wd4244 /wd4305 /D_DEBUG /Od /Gm /EHsc /RTC1 /MTd /W3 /nologo /ZI /J" CACHE STRING "MSVC MT flags " FORCE)
+       SET(CMAKE_C_FLAGS_RELEASE "/D_CRT_NONSTDC_NO_DEPRECATE /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /wd4800 /wd4244 /wd4305 /O2 /Ob2 /DNDEBUG /EHsc /MT /W3 /nologo /J" CACHE STRING "MSVC MT flags " FORCE)
+       SET(CMAKE_C_FLAGS_MINSIZEREL "/D_CRT_NONSTDC_NO_DEPRECATE /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /wd4800 /wd4244 /wd4305 /O1 /Ob1 /DNDEBUG /EHsc /MT /W3 /nologo /J" CACHE STRING "MSVC MT flags " FORCE)
+       SET(CMAKE_C_FLAGS_RELWITHDEBINFO "/D_CRT_NONSTDC_NO_DEPRECATE /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /wd4800 /wd4244 /wd4305 /O2 /Ob1 /DNDEBUG /EHsc /MT /W3 /nologo /Zi /J" CACHE STRING "MSVC MT flags " FORCE)
+
+       IF(WITH_OPENMP)
+               SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /openmp ")
+               SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /openmp ")
+       ENDIF(WITH_OPENMP)
+
+       SET(SDL ${LIBDIR}/sdl)
+       SET(SDL_INCLUDE_DIR ${SDL}/include)
+       SET(SDL_LIBRARY SDL)
+       SET(SDL_LIBPATH ${SDL}/lib)
+
+       SET(PNG "${LIBDIR}/png")
+       SET(PNG_INC "${PNG}/include")
+       SET(PNG_LIBPATH ${PNG}/lib)
+
+       SET(JPEG "${LIBDIR}/jpeg")
+       SET(JPEG_INC "${JPEG}/include")
+       SET(JPEG_LIBPATH ${JPEG}/lib)
+
+       SET(TIFF ${LIBDIR}/tiff)
+       SET(TIFF_INC ${TIFF}/include)
   
-  SET(WINTAB_INC ${LIBDIR}/wintab/include) 
+       SET(WINTAB_INC ${LIBDIR}/wintab/include) 
 
-  IF(CMAKE_CL_64)
-    SET(PLATFORM_LINKFLAGS "/MANIFEST:NO /MANIFESTUAC:NO /MACHINE:X64 /NODEFAULTLIB:libc.lib;MSVCRT.lib ")
-  ELSE(CMAKE_CL_64)
-    SET(PLATFORM_LINKFLAGS "/NODEFAULTLIB:libc.lib ")
-  ENDIF(CMAKE_CL_64)
+       IF(CMAKE_CL_64)
+               SET(PLATFORM_LINKFLAGS "/MACHINE:X64 /NODEFAULTLIB:libc.lib;MSVCRT.lib ")
+       ELSE(CMAKE_CL_64)
+               SET(PLATFORM_LINKFLAGS "/NODEFAULTLIB:libc.lib ")
+       ENDIF(CMAKE_CL_64)
   
-  SET(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} /NODEFAULTLIB:libcmt.lib;libc.lib ")
+       SET(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} /NODEFAULTLIB:libcmt.lib;libc.lib ")
 ENDIF(WIN32)
 
 IF(APPLE)
-  IF(CMAKE_OSX_ARCHITECTURES MATCHES i386)
-    SET(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/darwin-8.x.i386)
-  ELSE(CMAKE_OSX_ARCHITECTURES MATCHES i386)
-    SET(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/darwin-6.1-powerpc)
-  ENDIF(CMAKE_OSX_ARCHITECTURES MATCHES i386)
-
-  IF(WITH_OPENAL)
-    FIND_PACKAGE(OpenAL)
-    IF(OPENAL_FOUND)
-      SET(WITH_OPENAL ON)
-    ELSE(OPENAL_FOUND)
-      SET(WITH_OPENAL OFF)
-    ENDIF(OPENAL_FOUND)
-  ENDIF(WITH_OPENAL)
-
-  IF(WITH_JACK)
-    SET(JACK /usr)
-    SET(JACK_INC ${JACK}/include/jack)
-    SET(JACK_LIB jack)
-    SET(JACK_LIBPATH ${JACK}/lib)
-  ENDIF(WITH_JACK)
-
-  IF(WITH_SNDFILE)
-       SET(SNDFILE /usr)
-       SET(SNDFILE_INC ${SNDFILE}/include)
-       SET(SNDFILE_LIB sndfile)
-       SET(SNDFILE_LIBPATH ${SNDFILE}/lib)
-  ENDIF(WITH_SNDFILE)
-
-  SET(PYTHON_VERSION 3.1)
-
-  IF(PYTHON_VERSION MATCHES 3.1)
-    # we use precompiled libraries for py 3.1 and up by default
-
-    SET(PYTHON ${LIBDIR}/python)
-    SET(PYTHON_INC "${PYTHON}/include/python${PYTHON_VERSION}" CACHE STRING "")
-    # SET(PYTHON_BINARY "${PYTHON}/bin/python${PYTHON_VERSION}" CACHE STRING "") # not used yet
-    SET(PYTHON_LIB python${PYTHON_VERSION})
-    SET(PYTHON_LIBPATH "${PYTHON}/lib/python${PYTHON_VERSION}" CACHE STRING "")
-    #    SET(PYTHON_LINKFLAGS "-u _PyMac_Error")  # won't  build with this enabled
-  ELSE(PYTHON_VERSION MATCHES 3.1)
-    # otherwise, use custom system framework
-
-    SET(PYTHON /System/Library/Frameworks/Python.framework/Versions/)
-    SET(PYTHON_VERSION 2.5)
-    SET(PYTHON_INC "${PYTHON}${PYTHON_VERSION}/include/python${PYTHON_VERSION}" CACHE STRING "")
-    # SET(PYTHON_BINARY ${PYTHON}${PYTHON_VERSION}/bin/python${PYTHON_VERSION} CACHE STRING "") # not used yet
-    SET(PYTHON_LIB "")
-    SET(PYTHON_LIBPATH ${PYTHON}${PYTHON_VERSION}/lib/python${PYTHON_VERSION}/config CACHE STRING "")
-    SET(PYTHON_LINKFLAGS "-u _PyMac_Error -framework System -framework Python")
-  ENDIF(PYTHON_VERSION MATCHES 3.1)
-
-  SET(GETTEXT ${LIBDIR}/gettext)
-  SET(GETTEXT_INC "${GETTEXT}/include")
-  SET(GETTEXT_LIB intl iconv)
-  SET(GETTEXT_LIBPATH ${GETTEXT}/lib)
+       IF(CMAKE_OSX_ARCHITECTURES MATCHES i386)
+               SET(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/darwin-8.x.i386)
+       ELSE(CMAKE_OSX_ARCHITECTURES MATCHES i386)
+               SET(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/darwin-6.1-powerpc)
+       ENDIF(CMAKE_OSX_ARCHITECTURES MATCHES i386)
+
+       IF(WITH_OPENAL)
+               FIND_PACKAGE(OpenAL)
+               IF(OPENAL_FOUND)
+                       SET(WITH_OPENAL ON)
+               ELSE(OPENAL_FOUND)
+                       SET(WITH_OPENAL OFF)
+               ENDIF(OPENAL_FOUND)
+       ENDIF(WITH_OPENAL)
+
+       IF(WITH_JACK)
+               SET(JACK /usr)
+               SET(JACK_INC ${JACK}/include/jack)
+               SET(JACK_LIB jack)
+               SET(JACK_LIBPATH ${JACK}/lib)
+       ENDIF(WITH_JACK)
+
+       IF(WITH_SNDFILE)
+               SET(SNDFILE ${LIBDIR}/sndfile)
+               SET(SNDFILE_INC ${SNDFILE}/include)
+               SET(SNDFILE_LIB sndfile)
+               SET(SNDFILE_LIBPATH ${SNDFILE}/lib)
+       ENDIF(WITH_SNDFILE)
+
+       SET(PYTHON_VERSION 3.1)
+
+       IF(PYTHON_VERSION MATCHES 3.1)
+               # we use precompiled libraries for py 3.1 and up by default
+
+               SET(PYTHON ${LIBDIR}/python)
+               SET(PYTHON_INC "${PYTHON}/include/python${PYTHON_VERSION}" CACHE STRING "")
+               # SET(PYTHON_BINARY "${PYTHON}/bin/python${PYTHON_VERSION}" CACHE STRING "") # not used yet
+               SET(PYTHON_LIB python${PYTHON_VERSION})
+               SET(PYTHON_LIBPATH "${PYTHON}/lib/python${PYTHON_VERSION}" CACHE STRING "")
+               #    SET(PYTHON_LINKFLAGS "-u _PyMac_Error")  # won't  build with this enabled
+       ELSE(PYTHON_VERSION MATCHES 3.1)
+               # otherwise, use custom system framework
+
+               SET(PYTHON /System/Library/Frameworks/Python.framework/Versions/)
+               SET(PYTHON_VERSION 2.5)
+               SET(PYTHON_INC "${PYTHON}${PYTHON_VERSION}/include/python${PYTHON_VERSION}" CACHE STRING "")
+               # SET(PYTHON_BINARY ${PYTHON}${PYTHON_VERSION}/bin/python${PYTHON_VERSION} CACHE STRING "") # not used yet
+               SET(PYTHON_LIB "")
+               SET(PYTHON_LIBPATH ${PYTHON}${PYTHON_VERSION}/lib/python${PYTHON_VERSION}/config CACHE STRING "")
+               SET(PYTHON_LINKFLAGS "-u _PyMac_Error -framework System -framework Python")
+       ENDIF(PYTHON_VERSION MATCHES 3.1)
+
+       SET(GETTEXT ${LIBDIR}/gettext)
+       SET(GETTEXT_INC "${GETTEXT}/include")
+       SET(GETTEXT_LIB intl iconv)
+       SET(GETTEXT_LIBPATH ${GETTEXT}/lib)
   
-  IF(WITH_FFTW3)
-    SET(FFTW3 ${LIBDIR}/fftw3)
-    SET(FFTW3_INC ${FFTW3}/include)
-    SET(FFTW3_LIB libfftw)
-    SET(FFTW3_LIBPATH ${FFTW3}/lib)
-  ENDIF(WITH_FFTW3)
-
-  SET(PNG_LIBRARIES png)
-  SET(JPEG_LIBRARY jpeg)
-
-  SET(ZLIB /usr)
-  SET(ZLIB_INC "${ZLIB}/include")
-  SET(ZLIB_LIBRARIES z)
-
-  SET(FREETYPE ${LIBDIR}/freetype)
-  SET(FREETYPE_INCLUDE_DIRS ${FREETYPE}/include ${FREETYPE}/include/freetype2)
-  SET(FREETYPE_LIBPATH ${FREETYPE}/lib)
-  SET(FREETYPE_LIBRARY freetype)
-
-  SET(OPENEXR ${LIBDIR}/openexr)
-  SET(OPENEXR_INC ${OPENEXR}/include/OpenEXR ${OPENEXR}/include)
-  SET(OPENEXR_LIB Iex Half IlmImf Imath IlmThread)
-  SET(OPENEXR_LIBPATH ${OPENEXR}/lib)
-
-  SET(FFMPEG ${LIBDIR}/ffmpeg)
-  SET(FFMPEG_INC ${CMAKE_SOURCE_DIR}/extern/ffmpeg)
-  SET(FFMPEG_LIB avcodec avdevice avformat avutil mp3lame swscale x264 xvidcore)
-  SET(FFMPEG_LIBPATH ${FFMPEG}/lib)
-
-  SET(LIBSAMPLERATE ${LIBDIR}/samplerate)
-  SET(LIBSAMPLERATE_INC ${LIBSAMPLERATE}/include)
-  SET(LIBSAMPLERATE_LIB samplerate)
-  SET(LIBSAMPLERATE_LIBPATH ${LIBSAMPLERATE}/lib)
-
-  SET(LLIBS stdc++ SystemStubs)
-
-  SET(PLATFORM_CFLAGS "-pipe -fPIC -funsigned-char -fno-strict-aliasing")
-  SET(PLATFORM_LINKFLAGS "-fexceptions -framework CoreServices -framework Foundation -framework IOKit -framework AppKit -framework Carbon -framework AGL -framework AudioUnit -framework AudioToolbox -framework CoreAudio -framework QuickTime")
-
-  IF(WITH_OPENMP)
-    SET(LLIBS "${LLIBS} -lgomp ")
-    SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fopenmp ")
-    SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fopenmp ")
-  ENDIF(WITH_OPENMP)
-
-  SET(SDL ${LIBDIR}/sdl)
-  SET(SDL_INCLUDE_DIR ${SDL}/include)
-  SET(SDL_LIBRARY SDL)
-  SET(SDL_LIBPATH ${SDL}/lib)
-
-  SET(PNG "${LIBDIR}/png")
-  SET(PNG_INC "${PNG}/include")
-  SET(PNG_LIBPATH ${PNG}/lib)
-
-  SET(JPEG "${LIBDIR}/jpeg")
-  SET(JPEG_INC "${JPEG}/include")
-  SET(JPEG_LIBPATH ${JPEG}/lib)
-
-  SET(TIFF ${LIBDIR}/tiff)
-  SET(TIFF_INC ${TIFF}/include)
-
-  SET(EXETYPE MACOSX_BUNDLE)
+       IF(WITH_FFTW3)
+               SET(FFTW3 ${LIBDIR}/fftw3)
+               SET(FFTW3_INC ${FFTW3}/include)
+               SET(FFTW3_LIB libfftw)
+               SET(FFTW3_LIBPATH ${FFTW3}/lib)
+       ENDIF(WITH_FFTW3)
+
+       SET(PNG_LIBRARIES png)
+       SET(JPEG_LIBRARY jpeg)
+
+       SET(ZLIB /usr)
+       SET(ZLIB_INC "${ZLIB}/include")
+       SET(ZLIB_LIBRARIES z)
+
+       SET(FREETYPE ${LIBDIR}/freetype)
+       SET(FREETYPE_INCLUDE_DIRS ${FREETYPE}/include ${FREETYPE}/include/freetype2)
+       SET(FREETYPE_LIBPATH ${FREETYPE}/lib)
+       SET(FREETYPE_LIBRARY freetype)
+
+       SET(OPENEXR ${LIBDIR}/openexr)
+       SET(OPENEXR_INC ${OPENEXR}/include/OpenEXR ${OPENEXR}/include)
+       SET(OPENEXR_LIB Iex Half IlmImf Imath IlmThread)
+       SET(OPENEXR_LIBPATH ${OPENEXR}/lib)
+
+       SET(FFMPEG ${LIBDIR}/ffmpeg)
+       SET(FFMPEG_INC ${CMAKE_SOURCE_DIR}/extern/ffmpeg)
+       SET(FFMPEG_LIB avcodec avdevice avformat avutil mp3lame swscale x264 xvidcore)
+       SET(FFMPEG_LIBPATH ${FFMPEG}/lib)
+
+       SET(LIBSAMPLERATE ${LIBDIR}/samplerate)
+       SET(LIBSAMPLERATE_INC ${LIBSAMPLERATE}/include)
+       SET(LIBSAMPLERATE_LIB samplerate)
+       SET(LIBSAMPLERATE_LIBPATH ${LIBSAMPLERATE}/lib)
+
+       SET(LLIBS stdc++ SystemStubs)
+
+       SET(PLATFORM_CFLAGS "-pipe -fPIC -funsigned-char -fno-strict-aliasing")
+       SET(PLATFORM_LINKFLAGS "-fexceptions -framework CoreServices -framework Foundation -framework IOKit -framework AppKit -framework Carbon -framework AGL -framework AudioUnit -framework AudioToolbox -framework CoreAudio -framework QuickTime")
+
+       IF(WITH_OPENMP)
+               SET(LLIBS "${LLIBS} -lgomp ")
+               SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fopenmp ")
+               SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fopenmp ")
+       ENDIF(WITH_OPENMP)
+
+       SET(SDL ${LIBDIR}/sdl)
+       SET(SDL_INCLUDE_DIR ${SDL}/include)
+       SET(SDL_LIBRARY SDL)
+       SET(SDL_LIBPATH ${SDL}/lib)
+
+       SET(PNG "${LIBDIR}/png")
+       SET(PNG_INC "${PNG}/include")
+       SET(PNG_LIBPATH ${PNG}/lib)
+
+       SET(JPEG "${LIBDIR}/jpeg")
+       SET(JPEG_INC "${JPEG}/include")
+       SET(JPEG_LIBPATH ${JPEG}/lib)
+
+       SET(TIFF ${LIBDIR}/tiff)
+       SET(TIFF_INC ${TIFF}/include)
+
+       SET(EXETYPE MACOSX_BUNDLE)
 ENDIF(APPLE)
 
 IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
-  SET(BINRELOC ${CMAKE_SOURCE_DIR}/extern/binreloc)
-  SET(BINRELOC_INC ${BINRELOC}/include)
+       SET(BINRELOC ${CMAKE_SOURCE_DIR}/extern/binreloc)
+       SET(BINRELOC_INC ${BINRELOC}/include)
 ENDIF(CMAKE_SYSTEM_NAME MATCHES "Linux")
 
 
@@ -534,10 +534,10 @@ set(OPENJPEG_LIb extern_libopenjpeg)
 # Blender WebPlugin
 
 IF(WITH_WEBPLUGIN) 
-  SET(GECKO_DIR "${CMAKE_SOURCE_DIR}/../gecko-sdk/" CACHE PATH "Gecko SDK path")
-  SET(WEBPLUGIN_SANDBOX_MODE "apparmor" CACHE STRING "WEB Plugin sandbox mode, can be apparmor, privsep, none")
+       SET(GECKO_DIR "${CMAKE_SOURCE_DIR}/../gecko-sdk/" CACHE PATH "Gecko SDK path")
+       SET(WEBPLUGIN_SANDBOX_MODE "apparmor" CACHE STRING "WEB Plugin sandbox mode, can be apparmor, privsep, none")
 
-  SET(WITH_PLAYER ON)
+       SET(WITH_PLAYER ON)
 ENDIF(WITH_WEBPLUGIN)
 
 
@@ -555,7 +555,7 @@ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${PLATFORM_CFLAGS} ${CXX_WARNINGS}")
 
 # better not define flags here but this is a debugging option thats off by default.
 IF(WITH_CXX_GUARDEDALLOC)
-  SET(CMAKE_CXX_FLAGS " -DWITH_CXX_GUARDEDALLOC -I${CMAKE_SOURCE_DIR}/intern/guardedalloc ${CMAKE_CXX_FLAGS}")
+       SET(CMAKE_CXX_FLAGS " -DWITH_CXX_GUARDEDALLOC -I${CMAKE_SOURCE_DIR}/intern/guardedalloc ${CMAKE_CXX_FLAGS}")
 ENDIF(WITH_CXX_GUARDEDALLOC)
 
 #-----------------------------------------------------------------------------
@@ -574,6 +574,6 @@ ADD_SUBDIRECTORY(source/creator)
 #-----------------------------------------------------------------------------
 # Blender Player
 IF(WITH_PLAYER)
-  ADD_SUBDIRECTORY(blenderplayer)
+       ADD_SUBDIRECTORY(source/blenderplayer)
 ENDIF(WITH_PLAYER)
 
index 6a8063440bac5776c45217863ec92d7ca878a6ee..19bcee524f44cf852eea13dfb52075bbba8f69d2 100644 (file)
@@ -207,7 +207,6 @@ if env['WITH_BF_OPENMP'] == 1:
                                env.Append(CCFLAGS=['-fopenmp']) 
                                env.Append(CPPFLAGS=['-fopenmp'])
                                env.Append(CXXFLAGS=['-fopenmp'])
-                               # env.Append(LINKFLAGS=['-fprofile-generate'])
 
 #check for additional debug libnames
 
@@ -301,7 +300,6 @@ if env['WITH_BF_SDL'] == False and env['OURPLATFORM'] in ('win32-vc', 'win32-min
        env['PLATFORM_LINKFLAGS'].append('/ENTRY:main')
 
 # lastly we check for root_build_dir ( we should not do before, otherwise we might do wrong builddir
-#B.root_build_dir = B.arguments.get('BF_BUILDDIR', '..'+os.sep+'build'+os.sep+platform+os.sep)
 B.root_build_dir = env['BF_BUILDDIR']
 B.doc_build_dir = env['BF_DOCDIR']
 if not B.root_build_dir[-1]==os.sep:
@@ -392,7 +390,7 @@ SConscript(B.root_build_dir+'/source/SConscript')
 # libraries to give as objects to linking phase
 mainlist = []
 for tp in B.possible_types:
-       if not tp == 'player' and not tp == 'player2':
+       if not tp == 'player':
                mainlist += B.create_blender_liblist(env, tp)
 
 if B.arguments.get('BF_PRIORITYLIST', '0')=='1':
@@ -402,14 +400,12 @@ dobj = B.buildinfo(env, "dynamic") + B.resources
 thestatlibs, thelibincs = B.setup_staticlibs(env)
 thesyslibs = B.setup_syslibs(env)
 
-if env['WITH_BF_PLAYER']:
-       print("Warning: Game player may not build on 2.5")
-
 if 'blender' in B.targets or not env['WITH_BF_NOBLENDER']:
-       #env.BlenderProg(B.root_build_dir, "blender", dobj , [], mainlist + thestatlibs + thesyslibs, [B.root_build_dir+'/lib'] + thelibincs, 'blender')
        env.BlenderProg(B.root_build_dir, "blender", dobj + mainlist, [], thestatlibs + 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, 'intern')
+       playerlist += B.create_blender_liblist(env, 'extern')
        env.BlenderProg(B.root_build_dir, "blenderplayer", dobj + playerlist, [], thestatlibs + thesyslibs, [B.root_build_dir+'/lib'] + thelibincs, 'blenderplayer')
 
 ##### Now define some targets
@@ -575,16 +571,13 @@ if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'win64-vc'):
        if env['WITH_BF_OPENAL']:
                dllsources.append('${LCGDIR}/openal/lib/OpenAL32.dll')
                dllsources.append('${LCGDIR}/openal/lib/wrap_oal.dll')
+       if env['WITH_BF_SNDFILE']:
+               dllsources.append('${LCGDIR}/sndfile/lib/libsndfile-1.dll')
        if env['WITH_BF_FFMPEG']:
                dllsources += ['${LCGDIR}/ffmpeg/lib/avcodec-52.dll',
                                                '${LCGDIR}/ffmpeg/lib/avformat-52.dll',
                                                '${LCGDIR}/ffmpeg/lib/avdevice-52.dll',
                                                '${LCGDIR}/ffmpeg/lib/avutil-50.dll',
-#                                              '${LCGDIR}/ffmpeg/lib/libfaad-2.dll',
-#                                              '${LCGDIR}/ffmpeg/lib/libfaac-0.dll',
-#                                              '${LCGDIR}/ffmpeg/lib/libmp3lame-0.dll',
-#                                              '${LCGDIR}/ffmpeg/lib/libx264-67.dll',
-#                                              '${LCGDIR}/ffmpeg/lib/xvidcore.dll',
                                                '${LCGDIR}/ffmpeg/lib/swscale-0.dll']
        if env['WITH_BF_JACK']:
                dllsources += ['${LCGDIR}/jack/lib/libjack.dll']
diff --git a/blenderplayer/CMakeLists.txt b/blenderplayer/CMakeLists.txt
deleted file mode 100644 (file)
index 0407361..0000000
+++ /dev/null
@@ -1,133 +0,0 @@
-# $Id$
-# ***** BEGIN GPL LICENSE BLOCK *****
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software Foundation,
-# Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-#
-# The Original Code is Copyright (C) 2006, Blender Foundation
-# All rights reserved.
-#
-# The Original Code is: all of this file.
-#
-# Contributor(s): Jacques Beaurain.
-#
-# ***** END GPL LICENSE BLOCK *****
-
-MESSAGE(STATUS "Configuring blenderplayer")
-
-SETUP_LIBDIRS()
-
-IF(WITH_QUICKTIME)
-  ADD_DEFINITIONS(-DWITH_QUICKTIME)
-ENDIF(WITH_QUICKTIME)
-
-IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
-  ADD_DEFINITIONS(-DWITH_BINRELOC)
-  INCLUDE_DIRECTORIES(${BINRELOC_INC})
-ENDIF(CMAKE_SYSTEM_NAME MATCHES "Linux")
-
-ADD_CUSTOM_COMMAND(
-  OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/dna.c
-  COMMAND ${CMAKE_BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/makesdna ${CMAKE_CURRENT_BINARY_DIR}/dna.c ${CMAKE_SOURCE_DIR}/source/blender/makesdna/
-  DEPENDS ${CMAKE_BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/makesdna
-)
-
-IF(WIN32)
-  ADD_EXECUTABLE(blenderplayer ${EXETYPE} ${CMAKE_CURRENT_BINARY_DIR}/dna.c ../source/icons/winblender.rc)
-ELSE(WIN32)
-  ADD_EXECUTABLE(blenderplayer ${CMAKE_CURRENT_BINARY_DIR}/dna.c)
-ENDIF(WIN32)
-
-ADD_DEPENDENCIES(blenderplayer makesdna)
-
-FILE(READ ${CMAKE_BINARY_DIR}/cmake_blender_libs.txt BLENDER_LINK_LIBS)
-
-SET(BLENDER_LINK_LIBS ${BLENDER_LINK_LIBS} gp_common gp_ghost blenkernel_blc)
-
-IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
-  SET(BLENDER_LINK_LIBS ${BLENDER_LINK_LIBS} extern_binreloc)
-ENDIF(CMAKE_SYSTEM_NAME MATCHES "Linux")
-
-IF(UNIX)
-  # Sort libraries
-  SET(BLENDER_SORTED_LIBS
-    gp_ghost 
-    gp_common 
-    bf_string 
-    bf_ghost 
-    bf_blenkernel
-    bf_blenloader 
-    bf_blenpluginapi 
-    bf_blroutines 
-    bf_converter 
-    bf_ketsji 
-    bf_bullet 
-    bf_common 
-    bf_dummy 
-    bf_logic 
-    bf_rasterizer 
-    bf_oglrasterizer 
-    bf_expressions 
-    bf_scenegraph 
-       bf_IK
-    bf_moto 
-    bf_kernel 
-    bf_nodes
-       bf_gpu
-    bf_imbuf
-    bf_avi 
-    kx_network 
-    bf_ngnetwork 
-    bf_loopbacknetwork 
-    extern_bullet 
-    bf_guardedalloc 
-    bf_memutil 
-    bf_blenlib 
-    bf_cineon 
-    bf_openexr 
-    extern_libopenjpeg 
-    bf_dds
-    bf_readblenfile 
-    blenkernel_blc
-    extern_binreloc
-       extern_glew
-  )
-  
-  IF(WITH_QUICKTIME)
-    SET(BLENDER_SORTED_LIBS ${BLENDER_SORTED_LIBS} quicktime)
-  ENDIF(WITH_QUICKTIME)
-
-  IF(WITH_CXX_GUARDEDALLOC)
-    SET(BLENDER_SORTED_LIBS ${BLENDER_SORTED_LIBS} bf_guardedalloc_cpp)
-  ENDIF(WITH_CXX_GUARDEDALLOC)
-
-  FOREACH(SORTLIB ${BLENDER_SORTED_LIBS})
-    SET(REMLIB ${SORTLIB})
-    FOREACH(SEARCHLIB ${BLENDER_LINK_LIBS})
-      IF(${SEARCHLIB} STREQUAL ${SORTLIB})
-        SET(REMLIB "")
-      ENDIF(${SEARCHLIB} STREQUAL ${SORTLIB})
-    ENDFOREACH(SEARCHLIB)
-    IF(REMLIB)
-      MESSAGE(STATUS "Removing library ${REMLIB} from blenderplayer linking because: not configured")
-      LIST(REMOVE_ITEM BLENDER_SORTED_LIBS ${REMLIB})
-    ENDIF(REMLIB)
-  ENDFOREACH(SORTLIB)
-
-  TARGET_LINK_LIBRARIES(blenderplayer ${BLENDER_SORTED_LIBS})
-ELSE(UNIX)
-  TARGET_LINK_LIBRARIES(blenderplayer ${BLENDER_LINK_LIBS})
-ENDIF(UNIX)
-
-SETUP_LIBLINKS(blenderplayer)
index 26fa0835255915204881b9f0ecdae1b67405a1bd..e3834c41a810a4894369b0f85e8bcad385275ce5 100644 (file)
@@ -35,7 +35,7 @@ BF_JACK_LIBPATH = '${BF_JACK}/lib'
 WITH_BF_SNDFILE = False
 BF_SNDFILE = LIBDIR + '/sndfile'
 BF_SNDFILE_INC = '${BF_SNDFILE}/include'
-BF_SNDFILE_LIB = 'libsndfile'
+BF_SNDFILE_LIB = 'libsndfile-1'
 BF_SNDFILE_LIBPATH = '${BF_SNDFILE}/lib'
 
 WITH_BF_SDL = True
index aaadf34a4facd119c13b7bf3f228f8c6df9dd15f..d5e8ada060dab6782779adfd30881706ddd807fc 100644 (file)
@@ -150,6 +150,7 @@ CXX = 'cl.exe'
 CCFLAGS = ['/nologo', '/Ob1', '/J', '/W3', '/Gd', '/wd4244', '/wd4305', '/wd4800', '/wd4065', '/wd4267']
 #CCFLAGS += ['/GL']
 CXXFLAGS = ['/EHsc']
+BGE_CXXFLAGS = ['/O2', '/EHsc', '/GR', '/fp:fast', '/arch:SSE']
 
 BF_DEBUG_CCFLAGS = ['/Zi', '/FR${TARGET}.sbr']
 
index ed08e578df8a2212265902643bcc7a20ad398eda..ce2fd8cd40523b9fd6824cc5c8fdeb4410797516 100644 (file)
@@ -163,6 +163,7 @@ CXX = 'cl.exe'
 CFLAGS = []
 CCFLAGS = ['/nologo', '/Ob1', '/J', '/W3', '/Gd', '/wd4244', '/wd4305', '/wd4800', '/wd4065', '/wd4267']
 CXXFLAGS = ['/EHsc']
+BGE_CXXFLAGS = ['/O2', '/EHsc', '/GR', '/fp:fast', '/arch:SSE2']
 
 BF_DEBUG_CCFLAGS = ['/Zi', '/FR${TARGET}.sbr']
 
index 019cd9de28bb60c7d8bb5487b1de19cd40a0926e..44e47aaf88d4fa3c415b5b916fabf5fde86dfa3f 100644 (file)
 # ***** END GPL LICENSE BLOCK *****
 
 IF(WITH_BULLET)
-  ADD_SUBDIRECTORY(bullet2)
+       ADD_SUBDIRECTORY(bullet2)
 ENDIF(WITH_BULLET)
 
 IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
-  ADD_SUBDIRECTORY(binreloc)
+       ADD_SUBDIRECTORY(binreloc)
 ENDIF(CMAKE_SYSTEM_NAME MATCHES "Linux")
 
 ADD_SUBDIRECTORY(glew)
 
 IF(WITH_OPENJPEG)
-  ADD_SUBDIRECTORY(libopenjpeg)
+       ADD_SUBDIRECTORY(libopenjpeg)
 ENDIF(WITH_OPENJPEG)
 
 ADD_SUBDIRECTORY(lzo)
index 1bebf1e1994d1d535ef4ef4b9b724160b7ea1ea0..b81fbd2b91ab4d40165a3c9899b9e691e26795fc 100644 (file)
@@ -32,15 +32,6 @@ SOURCEDIR = extern
 DIR = $(OCGDIR)/extern
 DIRS = glew/src
 
-ifeq ($(WITH_FFMPEG), true)
-ifeq ($(NAN_FFMPEG), $(LCGDIR)/ffmpeg)
-    DIRS += ffmpeg
-endif
-ifeq ($(NAN_FFMPEG), $(LCGDIR)/gcc/ffmpeg)
-    DIRS += ffmpeg
-endif
-endif
-
 # Cloth requires it
 #ifneq ($(NAN_NO_KETSJI), true)
 DIRS += bullet2
index 98d7adb2d1edda341d000e96f97b0c36b0fe8125..331b70a4ebccafbfb0b70f8a09cf147e702403f3 100644 (file)
@@ -9,5 +9,5 @@ cflags = []
 sources = ['binreloc.c']
 incs = 'include'
 
-env.BlenderLib ( 'extern_binreloc', sources, Split(incs), Split(defs), libtype=['extern'], priority=[36], compileflags = cflags)
+env.BlenderLib ( 'extern_binreloc', sources, Split(incs), Split(defs), libtype=['extern','player'], priority=[36,225], compileflags = cflags)
 
index edb6b9c525fcaa9f82e914a39d41ca43d0339a30..2e2d892078147e7a9e9040c22adf14213b942fd7 100644 (file)
 SET(INC . src)
 
 FILE(GLOB SRC   
-  src/LinearMath/*.cpp
-  src/BulletCollision/BroadphaseCollision/*.cpp
-  src/BulletCollision/CollisionShapes/*.cpp
-  src/BulletCollision/NarrowPhaseCollision/*.cpp
-  src/BulletCollision/Gimpact/*.cpp
-  src/BulletCollision//CollisionDispatch/*.cpp
-  src/BulletDynamics/ConstraintSolver/*.cpp
-  src/BulletDynamics/Vehicle/*.cpp
-  src/BulletDynamics/Dynamics/*.cpp
-  src/BulletSoftBody/*.cpp
+       src/LinearMath/*.cpp
+       src/BulletCollision/BroadphaseCollision/*.cpp
+       src/BulletCollision/CollisionShapes/*.cpp
+       src/BulletCollision/NarrowPhaseCollision/*.cpp
+       src/BulletCollision/Gimpact/*.cpp
+       src/BulletCollision//CollisionDispatch/*.cpp
+       src/BulletDynamics/ConstraintSolver/*.cpp
+       src/BulletDynamics/Vehicle/*.cpp
+       src/BulletDynamics/Dynamics/*.cpp
+       src/BulletSoftBody/*.cpp
 )
 
 ADD_DEFINITIONS(-D_LIB)
index 4b4304f43b02efc1b795aeee831d666fafa9b44b..ddc806a3e6acc1ef181d60a3ff408926a4b0d388 100644 (file)
@@ -211,13 +211,13 @@ ADD_LIBRARY(BulletCollision ${BulletCollision_SRCS} ${BulletCollision_HDRS})
 SET_TARGET_PROPERTIES(BulletCollision PROPERTIES VERSION ${BULLET_VERSION})
 SET_TARGET_PROPERTIES(BulletCollision PROPERTIES SOVERSION ${BULLET_VERSION})
 IF (BUILD_SHARED_LIBS)
-  TARGET_LINK_LIBRARIES(BulletCollision LinearMath)
+       TARGET_LINK_LIBRARIES(BulletCollision LinearMath)
 ENDIF (BUILD_SHARED_LIBS)
 
 #INSTALL of other files requires CMake 2.6
 IF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.5)
        INSTALL(TARGETS BulletCollision DESTINATION lib)
-        INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} DESTINATION include FILES_MATCHING PATTERN "*.h")
+                               INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} DESTINATION include FILES_MATCHING PATTERN "*.h")
 ENDIF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.5)
 
 IF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK)
index dbd87afea383ff9771295779ffad1e3cad2ce4a6..fe31d2bee71b588ca7ed5d8064d4360aa07aedbe 100644 (file)
@@ -34,7 +34,7 @@ ENDIF (BUILD_SHARED_LIBS)
 
 IF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.5)
        INSTALL(TARGETS BulletSoftBody DESTINATION lib)
-        INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} DESTINATION include FILES_MATCHING PATTERN "*.h")
+                               INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} DESTINATION include FILES_MATCHING PATTERN "*.h")
 ENDIF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.5)
 
 IF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK)
index 319cc57ce5555509e864b156985e9717695449e6..3d0c645e7a04411d9e7cd3a194b356501dfbbada 100644 (file)
@@ -35,11 +35,11 @@ softbody_src = env.Glob("BulletSoftBody/*.cpp")
 
 incs = '. BulletCollision BulletDynamics LinearMath BulletSoftBody'
 
-env.BlenderLib ( libname = 'extern_bullet2linmath', sources=linearmath_src, includes=Split(incs), defines=Split(defs), libtype=['extern'], priority=[20], compileflags=cflags )
-env.BlenderLib ( libname = 'extern_bullet2dynamics', sources=bulletdyn_src, includes=Split(incs), defines=Split(defs), libtype=['extern'], priority=[19], compileflags=cflags )
-env.BlenderLib ( libname = 'extern_bullet2collision_broadphase', sources=collision_broadphase_src, includes=Split(incs), defines=Split(defs), libtype=['extern'], priority=[25], compileflags=cflags )
-env.BlenderLib ( libname = 'extern_bullet2collision_dispatch', sources=collision_dispatch_src, includes=Split(incs), defines=Split(defs), libtype=['extern'], priority=[20], compileflags=cflags )
-env.BlenderLib ( libname = 'extern_bullet2collision_gimpact', sources=collision_gimpact_src, includes=Split(incs), defines=Split(defs), libtype=['extern'], priority=[20], compileflags=cflags )
-env.BlenderLib ( libname = 'extern_bullet2collision_shapes', sources=collision_shapes_src, includes=Split(incs), defines=Split(defs), libtype=['extern'], priority=[20], compileflags=cflags )
-env.BlenderLib ( libname = 'extern_bullet2collision_narrowphase', sources=collision_narrowphase_src, includes=Split(incs), defines=Split(defs), libtype=['extern'], priority=[20], compileflags=cflags )
-env.BlenderLib ( libname = 'extern_bullet2softbody', sources=softbody_src, includes=Split(incs), defines=Split(defs), libtype=['extern'], priority=[18], compileflags=cflags )
+env.BlenderLib ( libname = 'extern_bullet2linmath', sources=linearmath_src, includes=Split(incs), defines=Split(defs), libtype=['extern','player'], priority=[20,137], compileflags=cflags )
+env.BlenderLib ( libname = 'extern_bullet2dynamics', sources=bulletdyn_src, includes=Split(incs), defines=Split(defs), libtype=['extern','player'], priority=[19,136], compileflags=cflags )
+env.BlenderLib ( libname = 'extern_bullet2collision_broadphase', sources=collision_broadphase_src, includes=Split(incs), defines=Split(defs), libtype=['extern','player'], priority=[25,145], compileflags=cflags )
+env.BlenderLib ( libname = 'extern_bullet2collision_dispatch', sources=collision_dispatch_src, includes=Split(incs), defines=Split(defs), libtype=['extern','player'], priority=[20,138], compileflags=cflags )
+env.BlenderLib ( libname = 'extern_bullet2collision_gimpact', sources=collision_gimpact_src, includes=Split(incs), defines=Split(defs), libtype=['extern','player'], priority=[20,138], compileflags=cflags )
+env.BlenderLib ( libname = 'extern_bullet2collision_shapes', sources=collision_shapes_src, includes=Split(incs), defines=Split(defs), libtype=['extern','player'], priority=[20,138], compileflags=cflags )
+env.BlenderLib ( libname = 'extern_bullet2collision_narrowphase', sources=collision_narrowphase_src, includes=Split(incs), defines=Split(defs), libtype=['extern','player'], priority=[20,138], compileflags=cflags )
+env.BlenderLib ( libname = 'extern_bullet2softbody', sources=softbody_src, includes=Split(incs), defines=Split(defs), libtype=['extern','player'], priority=[18,135], compileflags=cflags )
index eea34488e17f4017d24dc3d1c3fd0259279e893f..26d10a6ca9f71bafc3dd75f7de3e4d5250ffaef8 100644 (file)
 SET(INC include src)
 
 IF(UNIX)
-  SET(INC ${INC} ${X11_X11_INCLUDE_PATH})
+       SET(INC ${INC} ${X11_X11_INCLUDE_PATH})
 ENDIF(UNIX)
 
 SET(SRC
-  src/glew.c
+       src/glew.c
 )
 
 BLENDERLIB(extern_glew "${SRC}" "${INC}")
index b83525daffe8c725235d7cddfd878fbb1a5776fc..81a2fc67ccc2612d14a36275193009bc041f2177 100644 (file)
@@ -9,4 +9,4 @@ sources = ['src/glew.c']
 defs = ''
 incs = 'include'
 
-env.BlenderLib ( 'extern_glew', sources, Split(incs), Split(defs), libtype=['extern'], priority=[50])
+env.BlenderLib ( 'extern_glew', sources, Split(incs), Split(defs), libtype=['extern','player'], priority=[50,230])
index 693fee15c91c54553105244ae1cf81f4b37f8bc8..da6617397835d5959b142c810de2455908362b0a 100644 (file)
@@ -24,5 +24,5 @@ if not env['OURPLATFORM'] in ('win32-vc', 'win64-vc'):
 oj_env.BlenderLib ( libname='extern_openjpeg', 
                     sources=sources, includes=Split(incs),
                     defines=defs,
-                    libtype=['extern'],
-                    priority=[10], compileflags = flags)
+                    libtype=['extern','player'],
+                    priority=[10,185], compileflags = flags)
index 9fd25ad63c7478ba2cd5ac5d9f8fcc0503bdd830..3fb78dbea0fd9ddee14576b5ffd5e12931b29ba9 100644 (file)
@@ -12,5 +12,5 @@ incs = '. ../libopenjpeg'
 env.BlenderLib ( libname='extern_redcode', 
                  sources=sources, includes=Split(incs),
                  defines=[],
-                 libtype=['core','intern','player'],
-                 priority=[5, 5, 200], compileflags = [])
+                 libtype=['core','intern'],
+                 priority=[5, 5], compileflags = [])
index f33ce6a893c03cd702b05e66b0981d115c06043b..9efd1a6ee7ce0f0309cd381e379d8a7fc93f13f5 100644 (file)
@@ -38,7 +38,7 @@ ADD_SUBDIRECTORY(opennl)
 ADD_SUBDIRECTORY(smoke)
 
 IF(WITH_ELBEEM)
-  ADD_SUBDIRECTORY(elbeem)
+       ADD_SUBDIRECTORY(elbeem)
 ENDIF(WITH_ELBEEM)
 
 ADD_SUBDIRECTORY(bsp)
index 1b48de3190b1c44978b78797378e047372e42544..587ef30979b5212923d01ecc58342c7dc5a73cbe 100644 (file)
@@ -25,38 +25,38 @@ SET(INC . intern FX SRC ${PTHREADS_INC} ${LIBSAMPLERATE_INC})
 FILE(GLOB SRC intern/*.cpp intern/*.h FX/*.cpp SRC/*.cpp)
 
 IF(WITH_FFMPEG)
-  SET(INC ${INC} ffmpeg ${FFMPEG_INC})
-  FILE(GLOB FFMPEGSRC ffmpeg/*.cpp)
-  ADD_DEFINITIONS(-DWITH_FFMPEG)
+       SET(INC ${INC} ffmpeg ${FFMPEG_INC})
+       FILE(GLOB FFMPEGSRC ffmpeg/*.cpp)
+       ADD_DEFINITIONS(-DWITH_FFMPEG)
 ENDIF(WITH_FFMPEG)
 
 IF(WITH_SDL)
-  SET(INC ${INC} SDL ${SDL_INCLUDE_DIR})
-  FILE(GLOB SDLSRC SDL/*.cpp)
-  ADD_DEFINITIONS(-DWITH_SDL)
+       SET(INC ${INC} SDL ${SDL_INCLUDE_DIR})
+       FILE(GLOB SDLSRC SDL/*.cpp)
+       ADD_DEFINITIONS(-DWITH_SDL)
 ENDIF(WITH_SDL)
 
 IF(WITH_OPENAL)
-  SET(INC ${INC} OpenAL ${OPENAL_INCLUDE_DIR})
-  FILE(GLOB OPENALSRC OpenAL/*.cpp)
-  ADD_DEFINITIONS(-DWITH_OPENAL)
+       SET(INC ${INC} OpenAL ${OPENAL_INCLUDE_DIR})
+       FILE(GLOB OPENALSRC OpenAL/*.cpp)
+       ADD_DEFINITIONS(-DWITH_OPENAL)
 
-  STRING(REGEX MATCH ".*ramework.*" FRAMEWORK ${OPENAL_INCLUDE_DIR})
-  IF(FRAMEWORK)
-    ADD_DEFINITIONS(-DAPPLE_FRAMEWORK_FIX)
-  ENDIF(FRAMEWORK)
+       STRING(REGEX MATCH ".*ramework.*" FRAMEWORK ${OPENAL_INCLUDE_DIR})
+       IF(FRAMEWORK)
+               ADD_DEFINITIONS(-DAPPLE_FRAMEWORK_FIX)
+       ENDIF(FRAMEWORK)
 ENDIF(WITH_OPENAL)
 
 IF(WITH_JACK)
-  SET(INC ${INC} jack ${JACK_INC})
-  FILE(GLOB JACKSRC jack/*.cpp)
-  ADD_DEFINITIONS(-DWITH_JACK)
+       SET(INC ${INC} jack ${JACK_INC})
+       FILE(GLOB JACKSRC jack/*.cpp)
+       ADD_DEFINITIONS(-DWITH_JACK)
 ENDIF(WITH_JACK)
 
 IF(WITH_SNDFILE)
-  SET(INC ${INC} sndfile ${SNDFILE_INC})
-  FILE(GLOB SNDFILESRC sndfile/*.cpp)
-  ADD_DEFINITIONS(-DWITH_SNDFILE)
+       SET(INC ${INC} sndfile ${SNDFILE_INC})
+       FILE(GLOB SNDFILESRC sndfile/*.cpp)
+       ADD_DEFINITIONS(-DWITH_SNDFILE)
 ENDIF(WITH_SNDFILE)
 
 SET(SRC ${SRC} ${FFMPEGSRC} ${SNDFILESRC} ${SDLSRC} ${OPENALSRC} ${JACKSRC})
index 181e394da983d4bc6af077ede5aa5f6c81f2268e..8d3afbf2f1df2a8609620676ef78defad9bba885 100644 (file)
@@ -47,7 +47,7 @@ AUD_DoubleReader::AUD_DoubleReader(AUD_IReader* reader1,
                        AUD_THROW(AUD_ERROR_READER);
        }
 
-       catch(AUD_Exception e)
+       catch(AUD_Exception)
        {
                if(reader1)
                {
index a030d581b1aa8528553314c850fa911496f09d39..8b72afe05e72468c56036e02b5b6b9224155a77f 100644 (file)
@@ -46,7 +46,7 @@ AUD_IReader* AUD_PingPongFactory::createReader()
                {
                        reader2 = factory.createReader();
                }
-               catch(AUD_Exception e)
+               catch(AUD_Exception)
                {
                        reader2 = 0;
                }
index f94b11a11b85c12a66ae3cfb6ed90ae44976aff1..b33afa2b955e6ab09b2f23734bd61ea064861523 100644 (file)
@@ -544,13 +544,13 @@ AUD_Handle* AUD_OpenALDevice::play(AUD_IFactory* factory, bool keep)
                                        if(alGetError() != AL_NO_ERROR)
                                                AUD_THROW(AUD_ERROR_OPENAL);
                                }
-                               catch(AUD_Exception e)
+                               catch(AUD_Exception)
                                {
                                        alDeleteSources(1, &sound->source);
                                        throw;
                                }
                        }
-                       catch(AUD_Exception e)
+                       catch(AUD_Exception)
                        {
                                delete sound; AUD_DELETE("handle")
                                alcProcessContext(m_context);
@@ -648,19 +648,19 @@ AUD_Handle* AUD_OpenALDevice::play(AUD_IFactory* factory, bool keep)
                                if(alGetError() != AL_NO_ERROR)
                                        AUD_THROW(AUD_ERROR_OPENAL);
                        }
-                       catch(AUD_Exception e)
+                       catch(AUD_Exception)
                        {
                                alDeleteSources(1, &sound->source);
                                throw;
                        }
                }
-               catch(AUD_Exception e)
+               catch(AUD_Exception)
                {
                        alDeleteBuffers(AUD_OPENAL_CYCLE_BUFFERS, sound->buffers);
                        throw;
                }
        }
-       catch(AUD_Exception e)
+       catch(AUD_Exception)
        {
                delete sound; AUD_DELETE("handle")
                delete reader; AUD_DELETE("reader")
@@ -1051,13 +1051,13 @@ bool AUD_OpenALDevice::setCapability(int capability, void *value)
                                                if(alGetError() != AL_NO_ERROR)
                                                        AUD_THROW(AUD_ERROR_OPENAL);
                                        }
-                                       catch(AUD_Exception e)
+                                       catch(AUD_Exception)
                                        {
                                                alDeleteBuffers(1, &bf->buffer);
                                                throw;
                                        }
                                }
-                               catch(AUD_Exception e)
+                               catch(AUD_Exception)
                                {
                                        delete bf; AUD_DELETE("bufferedfactory")
                                        delete reader; AUD_DELETE("reader")
index 0dfd0bb9e3a15dd6e98072b8d87488aca8927232..025fa5a23797fcefcd9aa81c6f38dcd5d0585417 100644 (file)
@@ -31,4 +31,4 @@ if env['WITH_BF_SNDFILE']:
        incs += ' sndfile ' + env['BF_SNDFILE_INC']
        defs.append('WITH_SNDFILE')
 
-env.BlenderLib ('bf_audaspace', sources, Split(incs), defs, libtype=['intern'], priority = [25] )
+env.BlenderLib ('bf_audaspace', sources, Split(incs), defs, libtype=['intern','player'], priority = [25,215] )
index ec61f99f02deac0b2c3f89b20d82f495506f0def..0a47e36533ae836bff5aca90dc95dcb8053b8a49 100644 (file)
@@ -87,7 +87,7 @@ AUD_SDLMixerReader::AUD_SDLMixerReader(AUD_IReader* reader,
                                                         specs.rate) == -1)
                        AUD_THROW(AUD_ERROR_SDL);
        }
-       catch(AUD_Exception e)
+       catch(AUD_Exception)
        {
                delete m_reader; AUD_DELETE("reader")
                throw;
index d70a9c25bcbe128d5ded05abb6ecd49b1b675b32..0384ba5e0e660ba05ad616824d0cdfedb610f651 100644 (file)
@@ -119,7 +119,7 @@ AUD_FFMPEGReader::AUD_FFMPEGReader(const char* filename)
                // find audio stream and codec
                m_stream = -1;
 
-               for(int i = 0; i < m_formatCtx->nb_streams; i++)
+               for(unsigned int i = 0; i < m_formatCtx->nb_streams; i++)
                        if((m_formatCtx->streams[i]->codec->codec_type == CODEC_TYPE_AUDIO)
                                && (m_stream < 0))
                        {
@@ -146,7 +146,7 @@ AUD_FFMPEGReader::AUD_FFMPEGReader(const char* filename)
                m_specs.format = FFMPEG_TO_AUD(m_codecCtx->sample_fmt);
                m_specs.rate = (AUD_SampleRate) m_codecCtx->sample_rate;
        }
-       catch(AUD_Exception e)
+       catch(AUD_Exception)
        {
                av_close_input_file(m_formatCtx);
                throw;
@@ -188,7 +188,7 @@ AUD_FFMPEGReader::AUD_FFMPEGReader(AUD_Reference<AUD_Buffer> buffer)
                // find audio stream and codec
                m_stream = -1;
 
-               for(int i = 0; i < m_formatCtx->nb_streams; i++)
+               for(unsigned int i = 0; i < m_formatCtx->nb_streams; i++)
                        if((m_formatCtx->streams[i]->codec->codec_type == CODEC_TYPE_AUDIO)
                                && (m_stream < 0))
                        {
@@ -215,7 +215,7 @@ AUD_FFMPEGReader::AUD_FFMPEGReader(AUD_Reference<AUD_Buffer> buffer)
                m_specs.format = FFMPEG_TO_AUD(m_codecCtx->sample_fmt);
                m_specs.rate = (AUD_SampleRate) m_codecCtx->sample_rate;
        }
-       catch(AUD_Exception e)
+       catch(AUD_Exception)
        {
                av_close_input_stream(m_formatCtx);
                av_free(m_byteiocontext); AUD_DELETE("byteiocontext")
index 9481e2139e8b6f56665c6381fb78f2164275a34e..45faebc7e97752c4d6827eb8f083f07b18cc61c5 100644 (file)
@@ -67,7 +67,7 @@ typedef AUD_ReadDevice AUD_Device;
 #endif
 
 static AUD_IDevice* AUD_device = NULL;
-static int AUD_available_devices[3];
+static int AUD_available_devices[4];
 static AUD_I3DDevice* AUD_3ddevice = NULL;
 
 int AUD_init(AUD_DeviceType device, AUD_Specs specs, int buffersize)
@@ -77,6 +77,9 @@ int AUD_init(AUD_DeviceType device, AUD_Specs specs, int buffersize)
 #endif
        AUD_IDevice* dev = NULL;
 
+       if(AUD_device)
+               AUD_exit();
+
        try
        {
                switch(device)
@@ -107,16 +110,13 @@ int AUD_init(AUD_DeviceType device, AUD_Specs specs, int buffersize)
                        return false;
                }
 
-               if(AUD_device)
-                       AUD_exit();
-
                AUD_device = dev;
                if(AUD_device->checkCapability(AUD_CAPS_3D_DEVICE))
                        AUD_3ddevice = dynamic_cast<AUD_I3DDevice*>(AUD_device);
 
                return true;
        }
-       catch(AUD_Exception e)
+       catch(AUD_Exception)
        {
                return false;
        }
@@ -204,7 +204,7 @@ AUD_Sound* AUD_bufferSound(AUD_Sound* sound)
        {
                return new AUD_StreamBufferFactory(sound);
        }
-       catch(AUD_Exception e)
+       catch(AUD_Exception)
        {
                return NULL;
        }
@@ -218,7 +218,7 @@ AUD_Sound* AUD_delaySound(AUD_Sound* sound, float delay)
        {
                return new AUD_DelayFactory(sound, delay);
        }
-       catch(AUD_Exception e)
+       catch(AUD_Exception)
        {
                return NULL;
        }
@@ -232,7 +232,7 @@ extern AUD_Sound* AUD_limitSound(AUD_Sound* sound, float start, float end)
        {
                return new AUD_LimiterFactory(sound, start, end);
        }
-       catch(AUD_Exception e)
+       catch(AUD_Exception)
        {
                return NULL;
        }
@@ -246,7 +246,7 @@ AUD_Sound* AUD_pingpongSound(AUD_Sound* sound)
        {
                return new AUD_PingPongFactory(sound);
        }
-       catch(AUD_Exception e)
+       catch(AUD_Exception)
        {
                return NULL;
        }
@@ -260,7 +260,7 @@ AUD_Sound* AUD_loopSound(AUD_Sound* sound)
        {
                return new AUD_LoopFactory(sound);
        }
-       catch(AUD_Exception e)
+       catch(AUD_Exception)
        {
                return NULL;
        }
@@ -278,7 +278,7 @@ int AUD_stopLoop(AUD_Handle* handle)
                {
                        return AUD_device->sendMessage(handle, message);
                }
-               catch(AUD_Exception e)
+               catch(AUD_Exception)
                {
                }
        }
@@ -299,7 +299,7 @@ AUD_Handle* AUD_play(AUD_Sound* sound, int keep)
        {
                return AUD_device->play(sound, keep);
        }
-       catch(AUD_Exception e)
+       catch(AUD_Exception)
        {
                return NULL;
        }
@@ -360,7 +360,7 @@ AUD_Handle* AUD_play3D(AUD_Sound* sound, int keep)
                else
                        return AUD_device->play(sound, keep);
        }
-       catch(AUD_Exception e)
+       catch(AUD_Exception)
        {
                return NULL;
        }
@@ -376,7 +376,7 @@ int AUD_updateListener(AUD_3DData* data)
                if(AUD_3ddevice)
                        return AUD_3ddevice->updateListener(*data);
        }
-       catch(AUD_Exception e)
+       catch(AUD_Exception)
        {
        }
        return false;
@@ -391,7 +391,7 @@ int AUD_set3DSetting(AUD_3DSetting setting, float value)
                if(AUD_3ddevice)
                        return AUD_3ddevice->setSetting(setting, value);
        }
-       catch(AUD_Exception e)
+       catch(AUD_Exception)
        {
        }
        return false;
@@ -406,7 +406,7 @@ float AUD_get3DSetting(AUD_3DSetting setting)
                if(AUD_3ddevice)
                        return AUD_3ddevice->getSetting(setting);
        }
-       catch(AUD_Exception e)
+       catch(AUD_Exception)
        {
        }
        return 0.0;
@@ -424,7 +424,7 @@ int AUD_update3DSource(AUD_Handle* handle, AUD_3DData* data)
                        if(AUD_3ddevice)
                                return AUD_3ddevice->updateSource(handle, *data);
                }
-               catch(AUD_Exception e)
+               catch(AUD_Exception)
                {
                }
        }
@@ -443,7 +443,7 @@ int AUD_set3DSourceSetting(AUD_Handle* handle,
                        if(AUD_3ddevice)
                                return AUD_3ddevice->setSourceSetting(handle, setting, value);
                }
-               catch(AUD_Exception e)
+               catch(AUD_Exception)
                {
                }
        }
@@ -461,7 +461,7 @@ float AUD_get3DSourceSetting(AUD_Handle* handle, AUD_3DSourceSetting setting)
                        if(AUD_3ddevice)
                                return AUD_3ddevice->getSourceSetting(handle, setting);
                }
-               catch(AUD_Exception e)
+               catch(AUD_Exception)
                {
                }
        }
@@ -481,7 +481,7 @@ int AUD_setSoundVolume(AUD_Handle* handle, float volume)
                {
                        return AUD_device->setCapability(AUD_CAPS_SOURCE_VOLUME, &caps);
                }
-               catch(AUD_Exception e) {}
+               catch(AUD_Exception) {}
        }
        return false;
 }
@@ -499,7 +499,7 @@ int AUD_setSoundPitch(AUD_Handle* handle, float pitch)
                {
                        return AUD_device->setCapability(AUD_CAPS_SOURCE_PITCH, &caps);
                }
-               catch(AUD_Exception e) {}
+               catch(AUD_Exception) {}
        }
        return false;
 }
@@ -510,7 +510,7 @@ AUD_Device* AUD_openReadDevice(AUD_Specs specs)
        {
                return new AUD_ReadDevice(specs);
        }
-       catch(AUD_Exception e)
+       catch(AUD_Exception)
        {
                return NULL;
        }
@@ -525,7 +525,7 @@ int AUD_playDevice(AUD_Device* device, AUD_Sound* sound)
        {
                return device->play(sound) != NULL;
        }
-       catch(AUD_Exception e)
+       catch(AUD_Exception)
        {
                return false;
        }
@@ -540,7 +540,7 @@ int AUD_readDevice(AUD_Device* device, sample_t* buffer, int length)
        {
                return device->read(buffer, length);
        }
-       catch(AUD_Exception e)
+       catch(AUD_Exception)
        {
                return false;
        }
@@ -554,7 +554,7 @@ void AUD_closeReadDevice(AUD_Device* device)
        {
                delete device;
        }
-       catch(AUD_Exception e)
+       catch(AUD_Exception)
        {
        }
 }
index 445e68e1a9ae90f7bbc25df9148c98c0fb744190..4d8ab93d6723db2472cfe283da40b80f4fa0ca7d 100644 (file)
@@ -35,7 +35,7 @@
 int AUD_JackDevice::jack_mix(jack_nframes_t length, void *data)
 {
        AUD_JackDevice* device = (AUD_JackDevice*)data;
-       int samplesize = AUD_SAMPLE_SIZE(device->m_specs);
+       unsigned int samplesize = AUD_SAMPLE_SIZE(device->m_specs);
        if(device->m_buffer->getSize() < samplesize * length)
                device->m_buffer->resize(samplesize * length);
        device->mix(device->m_buffer->getBuffer(), length);
@@ -44,10 +44,10 @@ int AUD_JackDevice::jack_mix(jack_nframes_t length, void *data)
        float* out;
        int count = device->m_specs.channels;
 
-       for(int i = 0; i < count; i++)
+       for(unsigned int i = 0; i < count; i++)
        {
                out = (float*)jack_port_get_buffer(device->m_ports[i], length);
-               for(int j = 0; j < length; j++)
+               for(unsigned int j = 0; j < length; j++)
                        out[j] = in[j * count + i];
        }
 
@@ -105,7 +105,7 @@ AUD_JackDevice::AUD_JackDevice(AUD_Specs specs)
                if(jack_activate(m_client))
                        AUD_THROW(AUD_ERROR_JACK);
        }
-       catch(AUD_Exception e)
+       catch(AUD_Exception)
        {
                jack_client_close(m_client);
                delete[] m_ports; AUD_DELETE("jack_port")
index 4c0b26f1c4e07084154753a59eec87e5f2a195bf..0d8ade43e07ebf59f6e9e74824594afe98fd7096 100644 (file)
@@ -43,7 +43,7 @@
                        <Tool\r
                                Name="VCCLCompilerTool"\r
                                InlineFunctionExpansion="2"\r
-                               AdditionalIncludeDirectories="..\..;..\..\ffmpeg;..\..\FX;..\..\intern;..\..\OpenAL;..\..\SDL;..\..\SRC;..\..\..\..\..\lib\windows\pthreads\include;..\..\..\..\..\lib\windows\samplerate\include;..\..\..\..\..\lib\windows\ffmpeg\include;..\..\..\..\..\lib\windows\sdl\include;..\..\..\..\..\lib\windows\openal\include;..\..\..\..\..\lib\windows\jack\include"\r
+                               AdditionalIncludeDirectories="..\..;..\..\ffmpeg;..\..\FX;..\..\intern;..\..\OpenAL;..\..\SDL;..\..\SRC;..\..\sndfile;..\..\..\..\..\lib\windows\pthreads\include;..\..\..\..\..\lib\windows\samplerate\include;..\..\..\..\..\lib\windows\ffmpeg\include;..\..\..\..\..\lib\windows\ffmpeg\include\msvc;..\..\..\..\..\lib\windows\sdl\include;..\..\..\..\..\lib\windows\openal\include;..\..\..\..\..\lib\windows\jack\include;..\..\..\..\..\lib\windows\sndfile\include"\r
                                PreprocessorDefinitions="WIN32,NDEBUG,_LIB,WITH_FFMPEG,WITH_SDL,WITH_OPENAL"\r
                                StringPooling="true"\r
                                RuntimeLibrary="0"\r
                        <Tool\r
                                Name="VCCLCompilerTool"\r
                                Optimization="0"\r
-                               AdditionalIncludeDirectories="..\..;..\..\ffmpeg;..\..\FX;..\..\intern;..\..\OpenAL;..\..\SDL;..\..\SRC;..\..\..\..\..\lib\windows\pthreads\include;..\..\..\..\..\lib\windows\samplerate\include;..\..\..\..\..\lib\windows\ffmpeg\include;..\..\..\..\..\lib\windows\sdl\include;..\..\..\..\..\lib\windows\openal\include;..\..\..\..\..\lib\windows\jack\include"\r
+                               AdditionalIncludeDirectories="..\..;..\..\ffmpeg;..\..\FX;..\..\intern;..\..\OpenAL;..\..\SDL;..\..\SRC;..\..\sndfile;..\..\..\..\..\lib\windows\pthreads\include;..\..\..\..\..\lib\windows\samplerate\include;..\..\..\..\..\lib\windows\ffmpeg\include;..\..\..\..\..\lib\windows\ffmpeg\include\msvc;..\..\..\..\..\lib\windows\sdl\include;..\..\..\..\..\lib\windows\openal\include;..\..\..\..\..\lib\windows\jack\include;..\..\..\..\..\lib\windows\sndfile\include"\r
                                PreprocessorDefinitions="WIN32,_DEBUG,_LIB,WITH_FFMPEG,WITH_SDL,WITH_OPENAL"\r
                                BasicRuntimeChecks="3"\r
                                RuntimeLibrary="1"\r
                        <Tool\r
                                Name="VCCLCompilerTool"\r
                                InlineFunctionExpansion="2"\r
-                               AdditionalIncludeDirectories="..\..;..\..\ffmpeg;..\..\FX;..\..\intern;..\..\OpenAL;..\..\SDL;..\..\SRC;..\..\..\..\..\lib\windows\pthreads\include;..\..\..\..\..\lib\windows\samplerate\include;..\..\..\..\..\lib\windows\ffmpeg\include;..\..\..\..\..\lib\windows\sdl\include;..\..\..\..\..\lib\windows\openal\include;..\..\..\..\..\lib\windows\jack\include"\r
+                               AdditionalIncludeDirectories="..\..;..\..\ffmpeg;..\..\FX;..\..\intern;..\..\OpenAL;..\..\SDL;..\..\SRC;..\..\sndfile;..\..\..\..\..\lib\windows\pthreads\include;..\..\..\..\..\lib\windows\samplerate\include;..\..\..\..\..\lib\windows\ffmpeg\include;..\..\..\..\..\lib\windows\ffmpeg\include\msvc;..\..\..\..\..\lib\windows\sdl\include;..\..\..\..\..\lib\windows\openal\include;..\..\..\..\..\lib\windows\jack\include;..\..\..\..\..\lib\windows\sndfile\include"\r
                                PreprocessorDefinitions="WIN32,NDEBUG,_LIB,WITH_FFMPEG,WITH_SDL,WITH_OPENAL"\r
                                StringPooling="true"\r
                                RuntimeLibrary="2"\r
                        <Tool\r
                                Name="VCCLCompilerTool"\r
                                Optimization="0"\r
-                               AdditionalIncludeDirectories="..\..;..\..\ffmpeg;..\..\FX;..\..\intern;..\..\OpenAL;..\..\SDL;..\..\SRC;..\..\..\..\..\lib\windows\pthreads\include;..\..\..\..\..\lib\windows\samplerate\include;..\..\..\..\..\lib\windows\ffmpeg\include;..\..\..\..\..\lib\windows\sdl\include;..\..\..\..\..\lib\windows\openal\include;..\..\..\..\..\lib\windows\jack\include"\r
+                               AdditionalIncludeDirectories="..\..;..\..\ffmpeg;..\..\FX;..\..\intern;..\..\OpenAL;..\..\SDL;..\..\SRC;..\..\sndfile;..\..\..\..\..\lib\windows\pthreads\include;..\..\..\..\..\lib\windows\samplerate\include;..\..\..\..\..\lib\windows\ffmpeg\include;..\..\..\..\..\lib\windows\ffmpeg\include\msvc;..\..\..\..\..\lib\windows\sdl\include;..\..\..\..\..\lib\windows\openal\include;..\..\..\..\..\lib\windows\jack\include;..\..\..\..\..\lib\windows\sndfile\include"\r
                                PreprocessorDefinitions="WIN32,_DEBUG,_LIB,WITH_FFMPEG,WITH_SDL,WITH_OPENAL"\r
                                BasicRuntimeChecks="3"\r
                                RuntimeLibrary="3"\r
                                >\r
                        </File>\r
                </Filter>\r
+               <Filter\r
+                       Name="sndfile"\r
+                       >\r
+                       <File\r
+                               RelativePath="..\..\sndfile\AUD_SndFileFactory.cpp"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\sndfile\AUD_SndFileFactory.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\sndfile\AUD_SndFileReader.cpp"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\sndfile\AUD_SndFileReader.h"\r
+                               >\r
+                       </File>\r
+               </Filter>\r
                <File\r
                        RelativePath="..\..\AUD_C-API.h"\r
                        >\r
index 8b8a3000efde9f5a36a309dbbc2256a447ce6244..e541d334086aa6ff61f3ca634e21ef34901b7616 100644 (file)
@@ -30,11 +30,11 @@ FILE(GLOB SRC intern/*.cpp)
 
 ADD_DEFINITIONS(-DNOGUI -DELBEEM_BLENDER=1)
 IF(WINDOWS)
-    ADD_DEFINITIONS(-DUSE_MSVC6FIXES)
+               ADD_DEFINITIONS(-DUSE_MSVC6FIXES)
 ENDIF(WINDOWS)
 
 IF(WITH_OPENMP)
-    ADD_DEFINITIONS(-DPARALLEL=1)
+               ADD_DEFINITIONS(-DPARALLEL=1)
 ENDIF(WITH_OPENMP)
 
 BLENDERLIB_NOLIST(bf_elbeem "${SRC}" "${INC}")
index 3d588ecfd000f5ef6a4e17a223b9d17f37ac2fc8..9128e923e199fa553441968bed551fc24b873f2a 100644 (file)
@@ -29,30 +29,30 @@ SET(INC . ../string)
 FILE(GLOB SRC intern/*.cpp)
 
 IF(APPLE)
-  LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_DisplayManagerWin32.cpp")
-  LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_SystemWin32.cpp")
-  LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_WindowWin32.cpp")
-  LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_DisplayManagerX11.cpp")
-  LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_SystemX11.cpp")
-  LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_WindowX11.cpp")
+       LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_DisplayManagerWin32.cpp")
+       LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_SystemWin32.cpp")
+       LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_WindowWin32.cpp")
+       LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_DisplayManagerX11.cpp")
+       LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_SystemX11.cpp")
+       LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_WindowX11.cpp")
 ELSE(APPLE)
-  IF(WIN32)
-    SET(INC ${INC} ${WINTAB_INC})
-    LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_DisplayManagerCarbon.cpp")
-    LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_SystemCarbon.cpp")
-    LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_WindowCarbon.cpp")
-    LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_DisplayManagerX11.cpp")
-    LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_SystemX11.cpp")
-    LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_WindowX11.cpp")
-  ELSE(WIN32)
-    SET(INC ${INC} ${X11_X11_INCLUDE_PATH})
-    LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_DisplayManagerWin32.cpp")
-    LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_SystemWin32.cpp")
-    LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_WindowWin32.cpp")
-    LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_DisplayManagerCarbon.cpp")
-    LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_SystemCarbon.cpp")
-    LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_WindowCarbon.cpp")
-  ENDIF(WIN32)
+       IF(WIN32)
+               SET(INC ${INC} ${WINTAB_INC})
+               LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_DisplayManagerCarbon.cpp")
+               LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_SystemCarbon.cpp")
+               LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_WindowCarbon.cpp")
+               LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_DisplayManagerX11.cpp")
+               LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_SystemX11.cpp")
+               LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_WindowX11.cpp")
+       ELSE(WIN32)
+               SET(INC ${INC} ${X11_X11_INCLUDE_PATH})
+               LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_DisplayManagerWin32.cpp")
+               LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_SystemWin32.cpp")
+               LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_WindowWin32.cpp")
+               LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_DisplayManagerCarbon.cpp")
+               LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_SystemCarbon.cpp")
+               LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_WindowCarbon.cpp")
+       ENDIF(WIN32)
 ENDIF(APPLE)
 
 BLENDERLIB(bf_ghost "${SRC}" "${INC}")
index 9de82ac44fbb69143a0eddadad4a1788f34ba6eb..48009152699488fb57ec51c5ca6460d739f69031 100644 (file)
@@ -29,4 +29,4 @@ else:
 incs = '. ../string ' + env['BF_OPENGL_INC']
 if window_system in ('win32-vc', 'win32-mingw', 'cygwin', 'linuxcross', 'win64-vc'):
     incs = env['BF_WINTAB_INC'] + ' ' + incs
-env.BlenderLib ('bf_ghost', sources, Split(incs), defines=['_USE_MATH_DEFINES'], libtype=['intern'], priority = [40] ) 
+env.BlenderLib ('bf_ghost', sources, Split(incs), defines=['_USE_MATH_DEFINES'], libtype=['intern','player'], priority = [40,15] ) 
index 88ae8afd0ce49aa15fbac67204aadee17a3e62e8..3aff9d64a17edfaa41b957249607e9bf5dfac427 100644 (file)
@@ -294,7 +294,7 @@ GHOST_WindowX11(
        }
        
        // Create some hints for the window manager on how
-       // we want this window treated. 
+       // we want this window treated.
 
        XSizeHints * xsizehints = XAllocSizeHints();
        xsizehints->flags = USPosition | USSize;
@@ -514,7 +514,7 @@ GHOST_WindowX11::
 getXWindow(
 ){
        return m_window;
-}      
+}
 
        bool 
 GHOST_WindowX11::
@@ -528,7 +528,17 @@ GHOST_WindowX11::
 setTitle(
        const STR_String& title
 ){
+       Atom name = XInternAtom(m_display, "_NET_WM_NAME", 0);
+       Atom utf8str = XInternAtom(m_display, "UTF8_STRING", 0);
+       XChangeProperty(m_display, m_window,
+                       name, utf8str, 8, PropModeReplace,
+                       (const unsigned char*) title.ReadPtr(),
+                       strlen(title.ReadPtr()));
+
+// This should convert to valid x11 string
+//  and getTitle would need matching change
        XStoreName(m_display,m_window,title);
+
        XFlush(m_display);
 }
 
index b29837fac7d4d5e38fff4d0d4a6cd8af98415658..40ca35632d7826a1f89e5b70b996a639b96fd294 100644 (file)
@@ -32,6 +32,6 @@ BLENDERLIB(bf_guardedalloc "${SRC}" "${INC}")
 
 # Override C++ alloc optional
 IF(WITH_CXX_GUARDEDALLOC)
-  FILE(GLOB SRC cpp/*.cpp)
-  BLENDERLIB(bf_guardedalloc_cpp "${SRC}" "${INC}")
+       FILE(GLOB SRC cpp/*.cpp)
+       BLENDERLIB(bf_guardedalloc_cpp "${SRC}" "${INC}")
 ENDIF(WITH_CXX_GUARDEDALLOC)
index ef6c6b49266677383c69eae88a6f109aa6951f24..2ee0f84b464ec573675bdcc10b83bdf64013e85a 100644 (file)
@@ -5,4 +5,4 @@ Import('env')
 sources = env.Glob('intern/*.c')
 incs = '.'
 
-env.BlenderLib ('bf_guardedalloc', sources, Split(incs), defines=[], libtype=['intern', 'player'], priority = [10, 175] )
+env.BlenderLib ('bf_guardedalloc', sources, Split(incs), defines=[], libtype=['intern','player'], priority = [5,150] )
index df8c10b7302ff431c38ab4f4ec95b93211dee12f..7adb2d5089362a784c0de45d01cda59a0c2e62ed 100644 (file)
@@ -5,5 +5,5 @@ sources = env.Glob('intern/*.cpp')
 
 incs = 'intern ../moto/include ../memutil'
 
-env.BlenderLib ('bf_IK', sources, Split(incs), [], libtype=['intern'], priority=[100] )
+env.BlenderLib ('bf_IK', sources, Split(incs), [], libtype=['intern','player'], priority=[100,90] )
 
index 5773900caf98eadd7ba901fd53e5eb99ad06abd4..55a79e2aba0a6ce013c1f9b248bb2bf60774e3d0 100644 (file)
@@ -35,7 +35,9 @@
 
 // conventional functions required by several matrix algorithms
 
-
+#ifdef _WIN32
+#define hypot _hypot
+#endif
 
 namespace TNT 
 {
index 4528de814f3ac11392f49768f5d2d6e290e0b9ab..318d4a3997ebd03ee9626ad177e43c67ec04b979 100644 (file)
@@ -5,4 +5,4 @@ sources = env.Glob('intern/*.cpp')
 
 incs = '. ..'
 
-env.BlenderLib ('bf_memutil', sources, Split(incs), [], libtype=['intern', 'player'], priority = [0, 180] )
+env.BlenderLib ('bf_memutil', sources, Split(incs), [], libtype=['intern','player'], priority = [0,155] )
index a730e6de535e956eea98d77ecbc7bcf6194a27eb..d9bbafe4623e0b3b30108a1a379cb5cbc4f4e09a 100644 (file)
@@ -5,4 +5,4 @@ sources = env.Glob('intern/*.cpp')
 
 incs = 'include'
 
-env.BlenderLib ('bf_moto', sources, Split(incs), [], libtype=['intern'], priority = [130] )
+env.BlenderLib ('bf_moto', sources, Split(incs), [], libtype=['intern','player'], priority = [130,95] )
index 0db6acb683f103ce19329641a2e0d23f4e085330..8ed7a7c91158dce9dfa90388251b807fa7a6eaa0 100644 (file)
@@ -29,12 +29,12 @@ SET(INC ${PNG_INC} ${ZLIB_INC} intern ../../extern/bullet2/src ../memutil ../gua
 FILE(GLOB SRC intern/*.cpp)
 
 IF(WITH_OPENMP)
-    ADD_DEFINITIONS(-DPARALLEL=1)
+               ADD_DEFINITIONS(-DPARALLEL=1)
 ENDIF(WITH_OPENMP)
 
 IF(WITH_FFTW3)
-  ADD_DEFINITIONS(-DFFTW3=1)
-  SET(INC ${INC} ${FFTW3_INC})
+       ADD_DEFINITIONS(-DFFTW3=1)
+       SET(INC ${INC} ${FFTW3_INC})
 ENDIF(WITH_FFTW3)
 
 
index 1a3edce2344ef554aeaee1e848e37da625cf6aea..5607df70cf3b8273254fa006e627b3a8afd9110f 100644 (file)
@@ -63,11 +63,11 @@ void smoke_turbulence_free(struct WTURBULENCE *wt);
 void smoke_turbulence_step(struct WTURBULENCE *wt, struct FLUID_3D *fluid);
 
 float *smoke_turbulence_get_density(struct WTURBULENCE *wt);
-void smoke_turbulence_get_res(struct WTURBULENCE *wt, unsigned int *res);
+void smoke_turbulence_get_res(struct WTURBULENCE *wt, int *res);
 void smoke_turbulence_set_noise(struct WTURBULENCE *wt, int type);
-void smoke_turbulence_initBlenderRNA(struct WTURBULENCE *wt, float *strength);
+void smoke_initWaveletBlenderRNA(struct WTURBULENCE *wt, float *strength);
 
-void smoke_turbulence_dissolve(struct WTURBULENCE *wt, int speed, int log);
+void smoke_dissolve_wavelet(struct WTURBULENCE *wt, int speed, int log);
 
 // export
 void smoke_turbulence_export(struct WTURBULENCE *wt, float **dens, float **densold, float **tcu, float **tcv, float **tcw);
index 89dd893198b3546c31dbe7491afbff4d04148b93..8a32eaa2e6824ea32fe389aa3eda7f5f637b48a0 100644 (file)
@@ -27,9 +27,9 @@
 #include <zlib.h>
 
 // boundary conditions of the fluid domain
-#define DOMAIN_BC_FRONT  1
-#define DOMAIN_BC_TOP    0
-#define DOMAIN_BC_LEFT   1
+#define DOMAIN_BC_FRONT  0 // z
+#define DOMAIN_BC_TOP    1 // y
+#define DOMAIN_BC_LEFT   1 // x
 #define DOMAIN_BC_BACK   DOMAIN_BC_FRONT
 #define DOMAIN_BC_BOTTOM DOMAIN_BC_TOP
 #define DOMAIN_BC_RIGHT  DOMAIN_BC_LEFT
@@ -111,47 +111,42 @@ FLUID_3D::FLUID_3D(int *res, float *p0, float dt) :
        }
 
        // set side obstacles
-  size_t index;
-  for (int y = 0; y < _yRes; y++) // z
-    for (int x = 0; x < _xRes; x++)
-    {
-      // front slab
-      index = x + y * _xRes;
-      if(DOMAIN_BC_BOTTOM==1) _obstacles[index] = 1;
+       int index;
+       for (int y = 0; y < _yRes; y++)
+       for (int x = 0; x < _xRes; x++)
+       {
+               // front slab
+               index = x + y * _xRes;
+               if(DOMAIN_BC_FRONT==1) _obstacles[index] = 1;
 
-      // back slab
-      index += _totalCells - _slabSize;
-      if(DOMAIN_BC_TOP==1) _obstacles[index] = 1;
-    }
-  for (int z = 0; z < _zRes; z++) // y
-    for (int x = 0; x < _xRes; x++)
-    {
-      // bottom slab
-      index = x + z * _slabSize;
-      if(DOMAIN_BC_FRONT==1) _obstacles[index] = 1;
+               // back slab
+               index += _totalCells - _slabSize;
+               if(DOMAIN_BC_BACK==1) _obstacles[index] = 1;
+       }
 
-      // top slab
-      index += _slabSize - _xRes;
-      if(DOMAIN_BC_BACK==1) _obstacles[index] = 1;
-    }
-  for (int z = 0; z < _zRes; z++) // x
-    for (int y = 0; y < _yRes; y++)
-    {
-      // left slab
-      index = y * _xRes + z * _slabSize;
-      if(DOMAIN_BC_LEFT==1) _obstacles[index] = 1;
+       for (int z = 0; z < _zRes; z++)
+       for (int x = 0; x < _xRes; x++)
+       {
+               // bottom slab
+               index = x + z * _slabSize;
+               if(DOMAIN_BC_BOTTOM==1) _obstacles[index] = 1;
 
-      // right slab
-      index += _xRes - 1;
-      if(DOMAIN_BC_RIGHT==1) _obstacles[index] = 1;
-    }
+               // top slab
+               index += _slabSize - _xRes;
+               if(DOMAIN_BC_TOP==1) _obstacles[index] = 1;
+       }
 
-       /*
-       SPHERE *obsSphere = NULL;
-       obsSphere = new SPHERE(0.375,0.5,0.375, 0.1); // for 4 to 3 domain
-       addObstacle(obsSphere);
-       delete obsSphere;
-       */
+       for (int z = 0; z < _zRes; z++)
+       for (int y = 0; y < _yRes; y++)
+       {
+               // left slab
+               index = y * _xRes + z * _slabSize;
+               if(DOMAIN_BC_LEFT==1) _obstacles[index] = 1;
+
+               // right slab
+               index += _xRes - 1;
+               if(DOMAIN_BC_RIGHT==1) _obstacles[index] = 1;
+       }
 }
 
 FLUID_3D::~FLUID_3D()
@@ -187,11 +182,14 @@ void FLUID_3D::initBlenderRNA(float *alpha, float *beta)
 //////////////////////////////////////////////////////////////////////
 void FLUID_3D::step()
 {
+       // addSmokeTestCase(_density, _res);
+       // addSmokeTestCase(_heat, _res);
+       
        // wipe forces
        for (int i = 0; i < _totalCells; i++)
        {
                _xForce[i] = _yForce[i] = _zForce[i] = 0.0f;
-               _obstacles[i] &= ~2;
+               // _obstacles[i] &= ~2;
        }
 
        wipeBoundaries();
@@ -232,7 +230,8 @@ void FLUID_3D::step()
        _totalTime += _dt;
        _totalSteps++;  
 
-       memset(_obstacles, 0, sizeof(unsigned char)*_xRes*_yRes*_zRes);
+       // todo xxx dg: only clear obstacles, not boundaries
+       // memset(_obstacles, 0, sizeof(unsigned char)*_xRes*_yRes*_zRes);
 }
 
 //////////////////////////////////////////////////////////////////////
@@ -270,7 +269,7 @@ void FLUID_3D::artificialDamping(float* field) {
 //////////////////////////////////////////////////////////////////////
 void FLUID_3D::copyBorderAll(float* field)
 {
-       size_t index;
+       int index;
        for (int y = 0; y < _yRes; y++)
                for (int x = 0; x < _xRes; x++)
                {
@@ -350,13 +349,13 @@ void FLUID_3D::project()
 
        // copy out the boundaries
        if(DOMAIN_BC_LEFT == 0)  setNeumannX(_xVelocity, _res);
-       else setZeroX(_xVelocity, _res);
+       else setZeroX(_xVelocity, _res); 
 
-       if(DOMAIN_BC_TOP == 0)   setNeumannZ(_zVelocity, _res);
-       else setZeroZ(_zVelocity, _res);
+       if(DOMAIN_BC_TOP == 0)   setNeumannY(_yVelocity, _res);
+       else setZeroY(_yVelocity, _res); 
 
-       if(DOMAIN_BC_FRONT == 0) setNeumannY(_yVelocity, _res);
-       else setZeroY(_yVelocity, _res);
+       if(DOMAIN_BC_FRONT == 0) setNeumannZ(_zVelocity, _res);
+       else setZeroZ(_zVelocity, _res);
 
        // calculate divergence
        index = _slabSize + _xRes + 1;
@@ -400,12 +399,16 @@ void FLUID_3D::project()
                for (y = 1; y < _yRes - 1; y++, index += 2)
                        for (x = 1; x < _xRes - 1; x++, index++)
                        {
-                               if(!_obstacles[index])
+                               // if(!_obstacles[index])
                                {
                                        _xVelocity[index] -= 0.5f * (_pressure[index + 1]     - _pressure[index - 1]) * invDx;
                                        _yVelocity[index] -= 0.5f * (_pressure[index + _xRes]  - _pressure[index - _xRes]) * invDx;
                                        _zVelocity[index] -= 0.5f * (_pressure[index + _slabSize] - _pressure[index - _slabSize]) * invDx;
-                               }
+                               }/*
+                               else
+                               {
+                                       _xVelocity[index] = _yVelocity[index] = _zVelocity[index] = 0.0f;
+                               }*/
                        }
 
        if (_pressure) delete[] _pressure;
@@ -669,13 +672,13 @@ void FLUID_3D::advectMacCormack()
        Vec3Int res = Vec3Int(_xRes,_yRes,_zRes);
 
        if(DOMAIN_BC_LEFT == 0) copyBorderX(_xVelocity, res);
-       else setZeroX(_xVelocity, res);
+       else setZeroX(_xVelocity, res); 
 
-       if(DOMAIN_BC_TOP == 0) copyBorderZ(_zVelocity, res);
-       else setZeroZ(_zVelocity, res);
+       if(DOMAIN_BC_TOP == 0) copyBorderY(_yVelocity, res);
+       else setZeroY(_yVelocity, res); 
 
-       if(DOMAIN_BC_FRONT == 0) copyBorderY(_yVelocity, res);
-       else setZeroY(_yVelocity, res);
+       if(DOMAIN_BC_FRONT == 0) copyBorderZ(_zVelocity, res);
+       else setZeroZ(_zVelocity, res);
 
        SWAP_POINTERS(_xVelocity, _xVelocityOld);
        SWAP_POINTERS(_yVelocity, _yVelocityOld);
@@ -698,13 +701,13 @@ void FLUID_3D::advectMacCormack()
        advectFieldMacCormack(dt0, _xVelocityOld, _yVelocityOld, _zVelocityOld, _zVelocityOld, _zVelocity, t1,t2, res, _obstacles);
 
        if(DOMAIN_BC_LEFT == 0) copyBorderX(_xVelocity, res);
-       else setZeroX(_xVelocity, res);
+       else setZeroX(_xVelocity, res); 
 
-       if(DOMAIN_BC_TOP == 0) copyBorderZ(_zVelocity, res);
-       else setZeroZ(_zVelocity, res);
+       if(DOMAIN_BC_TOP == 0) copyBorderY(_yVelocity, res);
+       else setZeroY(_yVelocity, res); 
 
-       if(DOMAIN_BC_FRONT == 0) copyBorderY(_yVelocity, res);
-       else setZeroY(_yVelocity, res);
+       if(DOMAIN_BC_FRONT == 0) copyBorderZ(_zVelocity, res);
+       else setZeroZ(_zVelocity, res);
 
        setZeroBorder(_density, res);
        setZeroBorder(_heat, res);
index 9d9e7318204d1b4f2028122b2fc39c007a173532..a7be7f58335d38b4ca5c1704f706df96862b3361 100644 (file)
@@ -47,7 +47,7 @@ class FLUID_3D
                void initVectorNoise(int amplify);
 
                void addSmokeColumn();
-               static void addSmokeTestCase(float* field, Vec3Int res, float value);
+               static void addSmokeTestCase(float* field, Vec3Int res);
 
                void step();
                void addObstacle(OBSTACLE* obstacle);
index 4474129beea7a89f6e7f51572855ef9960fc42b6..2d3ec125c2b95a707c53461ae6064723ef93ef7e 100644 (file)
@@ -44,8 +44,8 @@ void FLUID_3D::addSmokeColumn() {
 // generic static version, so that it can be applied to the
 // WTURBULENCE grid as well
 //////////////////////////////////////////////////////////////////////
-/*
-void FLUID_3D::addSmokeTestCase(float* field, Vec3Int res, float value)
+
+void FLUID_3D::addSmokeTestCase(float* field, Vec3Int res)
 {
        const int slabSize = res[0]*res[1]; int maxRes = (int)MAX3V(res);
        float dx = 1.0f / (float)maxRes;
@@ -57,22 +57,22 @@ void FLUID_3D::addSmokeTestCase(float* field, Vec3Int res, float value)
   float heighMin = 0.05;
   float heighMax = 0.10;
 
-  for (int y = 0; y < res[1]; y++)
-    for (int z = (int)(heighMin*res[2]); z <= (int)(heighMax * res[1]); z++)
+  for (int y = 0; y < res[2]; y++)
+    for (int z = (int)(heighMin*res[2]); z <= (int)(heighMax * res[2]); z++)
       for (int x = 0; x < res[0]; x++)
       {
         float xLength = x * dx - xTotal * 0.4f;
-        float yLength = y * dx - zTotal * 0.5f;
+        float yLength = y * dx - yTotal * 0.5f;
         float radius = sqrtf(xLength * xLength + yLength * yLength);
 
         if (radius < 0.075f * xTotal)
         {
           int index = x + y * res[0] + z * slabSize;
-          field[index] = value;
+          field[index] = 1.0f;
         }
       }
 }
-*/
+
 
 //////////////////////////////////////////////////////////////////////
 // set x direction to Neumann boundary conditions
@@ -80,7 +80,7 @@ void FLUID_3D::addSmokeTestCase(float* field, Vec3Int res, float value)
 void FLUID_3D::setNeumannX(float* field, Vec3Int res)
 {
        const int slabSize = res[0] * res[1];
-       size_t index;
+       int index;
        for (int z = 0; z < res[2]; z++)
                for (int y = 0; y < res[1]; y++)
                {
@@ -92,6 +92,18 @@ void FLUID_3D::setNeumannX(float* field, Vec3Int res)
                        index += res[0] - 1;
                        field[index] = field[index - 2];
                }
+
+       // fix, force top slab to only allow outwards flux
+       for (int y = 0; y < res[1]; y++)
+               for (int z = 0; z < res[2]; z++)
+               {
+                       // top slab
+                       int index = y * res[0] + z * slabSize;
+                       index += res[0] - 1;
+                       if(field[index]<0.) field[index] = 0.;
+                       index -= 1;
+                       if(field[index]<0.) field[index] = 0.;
+               }
  }
 
 //////////////////////////////////////////////////////////////////////
@@ -100,18 +112,31 @@ void FLUID_3D::setNeumannX(float* field, Vec3Int res)
 void FLUID_3D::setNeumannY(float* field, Vec3Int res)
 {
        const int slabSize = res[0] * res[1];
-       size_t index;
+       int index;
        for (int z = 0; z < res[2]; z++)
                for (int x = 0; x < res[0]; x++)
                {
-                       // front slab
+                       // bottom slab
                        index = x + z * slabSize;
                        field[index] = field[index + 2 * res[0]];
 
-                       // back slab
+                       // top slab
                        index += slabSize - res[0];
                        field[index] = field[index - 2 * res[0]];
                }
+
+       // fix, force top slab to only allow outwards flux
+       for (int z = 0; z < res[2]; z++)
+               for (int x = 0; x < res[0]; x++)
+               {
+                       // top slab
+                       int index = x + z * slabSize;
+                       index += slabSize - res[0];
+                       if(field[index]<0.) field[index] = 0.;
+                       index -= res[0];
+                       if(field[index]<0.) field[index] = 0.;
+               }
+               
 }
 
 //////////////////////////////////////////////////////////////////////
@@ -121,15 +146,15 @@ void FLUID_3D::setNeumannZ(float* field, Vec3Int res)
 {
        const int slabSize = res[0] * res[1];
        const int totalCells = res[0] * res[1] * res[2];
-       size_t index;
+       int index;
        for (int y = 0; y < res[1]; y++)
                for (int x = 0; x < res[0]; x++)
                {
-                       // bottom slab
+                       // front slab
                        index = x + y * res[0];
                        field[index] = field[index + 2 * slabSize];
 
-                       // top slab
+                       // back slab
                        index += totalCells - slabSize;
                        field[index] = field[index - 2 * slabSize];
                }
@@ -139,11 +164,11 @@ void FLUID_3D::setNeumannZ(float* field, Vec3Int res)
                for (int x = 0; x < res[0]; x++)
                {
                        // top slab
-                       index = x + y * res[0];
+                       int index = x + y * res[0];
                        index += totalCells - slabSize;
-                       if(field[index]<0.) field[index] = 0.0f;
+                       if(field[index]<0.) field[index] = 0.;
                        index -= slabSize;
-                       if(field[index]<0.) field[index] = 0.0f;
+                       if(field[index]<0.) field[index] = 0.;
                }
                
 }
@@ -231,13 +256,14 @@ void FLUID_3D::copyBorderX(float* field, Vec3Int res)
 void FLUID_3D::copyBorderY(float* field, Vec3Int res)
 {
        const int slabSize = res[0] * res[1];
+       const int totalCells = res[0] * res[1] * res[2];
        int index;
        for (int z = 0; z < res[2]; z++)
                for (int x = 0; x < res[0]; x++)
                {
                        // bottom slab
                        index = x + z * slabSize;
-                       field[index] = field[index + res[0]];
+                       field[index] = field[index + res[0]]; 
                        // top slab
                        index += slabSize - res[0];
                        field[index] = field[index - res[0]];
@@ -253,7 +279,7 @@ void FLUID_3D::copyBorderZ(float* field, Vec3Int res)
                {
                        // front slab
                        index = x + y * res[0];
-                       field[index] = field[index + slabSize];
+                       field[index] = field[index + slabSize]; 
                        // back slab
                        index += totalCells - slabSize;
                        field[index] = field[index - slabSize];
@@ -273,14 +299,15 @@ void FLUID_3D::advectFieldSemiLagrange(const float dt, const float* velx, const
 
        // scale dt up to grid resolution
 #if PARALLEL==1
-#pragma omp parallel for schedule(static)
+#pragma omp parallel
+#pragma omp for  schedule(static)
 #endif
        for (int z = 0; z < zres; z++)
                for (int y = 0; y < yres; y++)
                        for (int x = 0; x < xres; x++)
                        {
                                const int index = x + y * xres + z * xres*yres;
-
+                               
         // backtrace
                                float xTrace = x - dt * velx[index];
                                float yTrace = y - dt * vely[index];
@@ -337,8 +364,8 @@ void FLUID_3D::advectFieldSemiLagrange(const float dt, const float* velx, const
 //
 // comments are the pseudocode from selle's paper
 //////////////////////////////////////////////////////////////////////
-void FLUID_3D::advectFieldMacCormack(const float dt, const float* xVelocity, const float* yVelocity, const float* zVelocity,
-               float* oldField, float* newField, float* temp1, float* temp2, Vec3Int res, const unsigned char* obstacles)
+void FLUID_3D::advectFieldMacCormack(const float dt, const float* xVelocity, const float* yVelocity, const float* zVelocity, 
+                               float* oldField, float* newField, float* temp1, float* temp2, Vec3Int res, const unsigned char* obstacles)
 {
        float* phiHatN  = temp1;
        float* phiHatN1 = temp2;
@@ -359,7 +386,7 @@ void FLUID_3D::advectFieldMacCormack(const float dt, const float* xVelocity, con
        advectFieldSemiLagrange( -1.0*dt, xVelocity, yVelocity, zVelocity, phiHatN1, phiHatN, res);
 
        // phiN1 = phiHatN1 + (phiN - phiHatN) / 2
-       const int border = 0;
+       const int border = 0; 
        for (int z = border; z < sz-border; z++)
                for (int y = border; y < sy-border; y++)
                        for (int x = border; x < sx-border; x++) {
@@ -376,7 +403,7 @@ void FLUID_3D::advectFieldMacCormack(const float dt, const float* xVelocity, con
 
        // if the error estimate was bad, revert to first order
        clampOutsideRays(dt, xVelocity, yVelocity, zVelocity, oldField, newField, res, obstacles, phiHatN1);
-}
+} 
 
 
 //////////////////////////////////////////////////////////////////////
@@ -454,17 +481,18 @@ void FLUID_3D::clampExtrema(const float dt, const float* velx, const float* vely
 }
 
 //////////////////////////////////////////////////////////////////////
-// Reverts any backtraces that go into boundaries back to first
+// Reverts any backtraces that go into boundaries back to first 
 // order -- in this case the error correction term was totally
 // incorrect
 //////////////////////////////////////////////////////////////////////
-void FLUID_3D::clampOutsideRays(const float dt, const float* velx, const float* vely, const float* velz,
-               float* oldField, float* newField, Vec3Int res, const unsigned char* obstacles, const float *oldAdvection)
+void FLUID_3D::clampOutsideRays(const float dt, const float* velx, const float* vely,  const float* velz,
+                               float* oldField, float* newField, Vec3Int res, const unsigned char* obstacles, const float *oldAdvection)
 {
        const int sx= res[0];
        const int sy= res[1];
        const int sz= res[2];
        const int slabSize = res[0] * res[1];
+
        for (int z = 1; z < sz-1; z++)
                for (int y = 1; y < sy-1; y++)
                        for (int x = 1; x < sx-1; x++)
@@ -479,7 +507,7 @@ void FLUID_3D::clampOutsideRays(const float dt, const float* velx, const float*
                                float zTrace    = z - dt * velz[index];
 
                                // see if it goes outside the boundaries
-                               bool hasObstacle =
+                               bool hasObstacle = 
                                        (zTrace < 1.0f)    || (zTrace > sz - 2.0f) ||
                                        (yTrace < 1.0f)    || (yTrace > sy - 2.0f) ||
                                        (xTrace < 1.0f)    || (xTrace > sx - 2.0f) ||
@@ -515,7 +543,7 @@ void FLUID_3D::clampOutsideRays(const float dt, const float* velx, const float*
                                int z0 = (int)zBackward;
                                int z1 = z0 + 1;
                                if(obstacles && !hasObstacle) {
-                                       hasObstacle = hasObstacle ||
+                                       hasObstacle = hasObstacle || 
                                                obstacles[x0 + y0 * sx + z0*slabSize] ||
                                                obstacles[x0 + y1 * sx + z0*slabSize] ||
                                                obstacles[x1 + y0 * sx + z0*slabSize] ||
@@ -535,7 +563,7 @@ void FLUID_3D::clampOutsideRays(const float dt, const float* velx, const float*
                                z0 = (int)zTrace;
                                z1 = z0 + 1;
                                if(obstacles && !hasObstacle) {
-                                       hasObstacle = hasObstacle ||
+                                       hasObstacle = hasObstacle || 
                                                obstacles[x0 + y0 * sx + z0*slabSize] ||
                                                obstacles[x0 + y1 * sx + z0*slabSize] ||
                                                obstacles[x1 + y0 * sx + z0*slabSize] ||
@@ -577,84 +605,8 @@ void FLUID_3D::clampOutsideRays(const float dt, const float* velx, const float*
                                                u1 * (s0 * (t0 * oldField[i001] +
                                                                        t1 * oldField[i011]) +
                                                                s1 * (t0 * oldField[i101] +
-                                                                       t1 * oldField[i111]));
+                                                                       t1 * oldField[i111])); 
                                }
                        } // xyz
 }
 
-//////////////////////////////////////////////////////////////////////
-// image output
-//////////////////////////////////////////////////////////////////////
-/*
-void FLUID_3D::writeImageSliceXY(const float *field, Vec3Int res, int slice, string prefix, int picCnt, float scale) {
-  writeProjectedIntern(field, res, 0,1, prefix, picCnt, scale);
-}
-void FLUID_3D::writeImageSliceYZ(const float *field, Vec3Int res, int slice, string prefix, int picCnt, float scale) {
-  writeProjectedIntern(field, res, 1,2, prefix, picCnt, scale);
-}
-void FLUID_3D::writeImageSliceXZ(const float *field, Vec3Int res, int slice, string prefix, int picCnt, float scale) {
-  writeProjectedIntern(field, res, 0,2, prefix, picCnt, scale);
-}
-*/
-
-//////////////////////////////////////////////////////////////////////
-// Helper function for projecting densities along a dimension
-//////////////////////////////////////////////////////////////////////
-/*
-static int getOtherDir(int dir1, int dir2) {
-       switch(dir1) {
-               case 0:
-                       switch(dir2) {
-                               case 1: return 2;
-                               case 2: return 1; }
-                       break;
-               case 1:
-                       switch(dir2) {
-                               case 0: return 2;
-                               case 2: return 0; }
-                       break;
-               case 2:
-                       switch(dir2) {
-                               case 0: return 1;
-                               case 1: return 0; }
-                       break;
-               default:
-                       return 0;
-       }
-       return 0;
-}
-*/
-
-//////////////////////////////////////////////////////////////////////
-// average densities along third spatial direction
-//////////////////////////////////////////////////////////////////////
-/*
-void FLUID_3D::writeProjectedIntern(const float *field, Vec3Int res,
-               int dir1, int dir2, string prefix, int picCnt, float scale) {
-       const int nitems = res[dir1]*res[dir2];
-       const int otherDir = getOtherDir(dir1,dir2);
-       float *buf = new float[nitems];
-       Vec3Int min = Vec3Int(0);
-       Vec3Int max = res;
-
-       min[otherDir] = 0;
-       max[otherDir] = res[otherDir];
-       float div = 1./(float)MIN3V(res); // normalize for shorter sides, old: res[otherDir];
-       div *= 4.; //slightly increase contrast
-       for(int i=0; i<nitems; i++) buf[i] = 0.;
-
-       Vec3Int cnt = 0;
-       for (cnt[2] = min[2]; cnt[2] < max[2]; cnt[2]++) {
-               for (cnt[1] = min[1]; cnt[1] < max[1]; cnt[1]++)
-                       for (cnt[0] = min[0]; cnt[0] < max[0]; cnt[0]++)
-                       {
-                               const int index = cnt[0] + cnt[1] * res[0] + cnt[2] * res[0]*res[1];
-                               const int bufindex = cnt[dir1] + cnt[dir2] * res[dir1];
-                               buf[bufindex] += field[index] * scale *div;
-                       }
-       }
-       // IMAGE::dumpNumberedPNG(picCnt, prefix, buf, res[dir1], res[dir2]);
-       delete[] buf;
-}
-*/
-
index dd092d4f0cc3e72386192f962538313728bb3695..a1b2aaf30f2292f17df164c7e9c4ad6555d7eb58 100644 (file)
@@ -92,10 +92,6 @@ WTURBULENCE::WTURBULENCE(int xResSm, int yResSm, int zResSm, int amplify, int no
        _tcW = new float[_totalCellsSm];
        _tcTemp = new float[_totalCellsSm];
        
-       // allocate & init energy terms
-       _energy = new float[_totalCellsSm];
-       _highFreqEnergy = new float[_totalCellsSm];
-       
        // map all 
        const float dx = 1./(float)(_resSm[0]);
        const float dy = 1./(float)(_resSm[1]);
@@ -109,15 +105,8 @@ WTURBULENCE::WTURBULENCE(int xResSm, int yResSm, int zResSm, int amplify, int no
                _tcV[index] = y*dy;
                _tcW[index] = z*dz;
                _tcTemp[index] = 0.;
-               _energy[index] = 0.;
                }
        
-       // allocate eigenvalue arrays
-       _eigMin = new float[_totalCellsSm];
-       _eigMax = new float[_totalCellsSm];
-       for(int i=0; i < _totalCellsSm; i++) 
-               _eigMin[i] = _eigMax[i] =  0.;
-       
        // noise tiles
        _noiseTile = new float[noiseTileSize * noiseTileSize * noiseTileSize];
        /*
@@ -143,12 +132,7 @@ WTURBULENCE::~WTURBULENCE() {
   delete[] _tcW;
   delete[] _tcTemp;
 
-  delete[] _eigMin;
-  delete[] _eigMax;
   delete[] _noiseTile;
-
-  delete[] _energy;
-  delete[] _highFreqEnergy;
 }
 
 //////////////////////////////////////////////////////////////////////
@@ -293,34 +277,34 @@ static float minDz(int x, int y, int z, float* input, Vec3Int res)
 // handle texture coordinates (advection, reset, eigenvalues), 
 // Beware -- uses big density maccormack as temporary arrays
 ////////////////////////////////////////////////////////////////////// 
-void WTURBULENCE::advectTextureCoordinates (float dtOrg, float* xvel, float* yvel, float* zvel, float *_tempBig1, float *_tempBig2) {
+void WTURBULENCE::advectTextureCoordinates (float dtOrg, float* xvel, float* yvel, float* zvel, float *tempBig1, float *tempBig2) {
   // advection
   SWAP_POINTERS(_tcTemp, _tcU);
   FLUID_3D::copyBorderX(_tcTemp, _resSm);
   FLUID_3D::copyBorderY(_tcTemp, _resSm);
   FLUID_3D::copyBorderZ(_tcTemp, _resSm);
   FLUID_3D::advectFieldMacCormack(dtOrg, xvel, yvel, zvel, 
-      _tcTemp, _tcU, _tempBig1, _tempBig2, _resSm, NULL);
+      _tcTemp, _tcU, tempBig1, tempBig2, _resSm, NULL);
 
   SWAP_POINTERS(_tcTemp, _tcV);
   FLUID_3D::copyBorderX(_tcTemp, _resSm);
   FLUID_3D::copyBorderY(_tcTemp, _resSm);
   FLUID_3D::copyBorderZ(_tcTemp, _resSm);
   FLUID_3D::advectFieldMacCormack(dtOrg, xvel, yvel, zvel, 
-      _tcTemp, _tcV, _tempBig1, _tempBig2, _resSm, NULL);
+      _tcTemp, _tcV, tempBig1, tempBig2, _resSm, NULL);
 
   SWAP_POINTERS(_tcTemp, _tcW);
   FLUID_3D::copyBorderX(_tcTemp, _resSm);
   FLUID_3D::copyBorderY(_tcTemp, _resSm);
   FLUID_3D::copyBorderZ(_tcTemp, _resSm);
   FLUID_3D::advectFieldMacCormack(dtOrg, xvel, yvel, zvel, 
-      _tcTemp, _tcW, _tempBig1, _tempBig2, _resSm, NULL);
+      _tcTemp, _tcW, tempBig1, tempBig2, _resSm, NULL);
 }
 
 //////////////////////////////////////////////////////////////////////
 // Compute the eigenvalues of the advected texture
 ////////////////////////////////////////////////////////////////////// 
-void WTURBULENCE::computeEigenvalues() {
+void WTURBULENCE::computeEigenvalues(float *_eigMin, float *_eigMax) {
   // stats
   float maxeig = -1.;
   float mineig = 10.;
@@ -365,7 +349,7 @@ void WTURBULENCE::computeEigenvalues() {
 //////////////////////////////////////////////////////////////////////
 // advect & reset texture coordinates based on eigenvalues
 ////////////////////////////////////////////////////////////////////// 
-void WTURBULENCE::resetTextureCoordinates() 
+void WTURBULENCE::resetTextureCoordinates(float *_eigMin, float *_eigMax
 {
   // allowed deformation of the textures
   const float limit = 2.f;
@@ -396,7 +380,7 @@ void WTURBULENCE::resetTextureCoordinates()
 // Compute the highest frequency component of the wavelet
 // decomposition
 //////////////////////////////////////////////////////////////////////
-void WTURBULENCE::decomposeEnergy()
+void WTURBULENCE::decomposeEnergy(float *_energy, float *_highFreqEnergy)
 {
   // do the decomposition -- the goal here is to have
   // the energy with the high frequency component stomped out
@@ -432,7 +416,7 @@ void WTURBULENCE::decomposeEnergy()
 // compute velocity from energies and march into obstacles
 // for wavelet decomposition
 ////////////////////////////////////////////////////////////////////// 
-void WTURBULENCE::computeEnergy(float* xvel, float* yvel, float* zvel, unsigned char *obstacles) 
+void WTURBULENCE::computeEnergy(float *_energy, float* xvel, float* yvel, float* zvel, unsigned char *obstacles) 
 {
   // compute everywhere
   for (int x = 0; x < _totalCellsSm; x++) 
@@ -491,7 +475,7 @@ void WTURBULENCE::computeEnergy(float* xvel, float* yvel, float* zvel, unsigned
             }
             if (valid > 0)
             {
-              _energy[index] = sum / valid;
+              _energy[index] = sum / (float)valid;
               obstacles[index] = MARCHED;
             }
           }
@@ -516,9 +500,9 @@ void WTURBULENCE::computeEnergy(float* xvel, float* yvel, float* zvel, unsigned
 Vec3 WTURBULENCE::WVelocity(Vec3 orgPos)
 {
   // arbitrarily offset evaluation points
-  const Vec3 p1 = orgPos + Vec3(NOISE_TILE_SIZE/2,0,0);
-  const Vec3 p2 = orgPos + Vec3(0,NOISE_TILE_SIZE/2,0);
-  const Vec3 p3 = orgPos + Vec3(0,0,NOISE_TILE_SIZE/2);
+  const Vec3 p1 = orgPos + Vec3(NOISE_TILE_SIZE/2.0,0,0);
+  const Vec3 p2 = orgPos + Vec3(0,NOISE_TILE_SIZE/2.0,0);
+  const Vec3 p3 = orgPos + Vec3(0,0,NOISE_TILE_SIZE/2.0);
 
   const float f1y = WNoiseDy(p1, _noiseTile);
   const float f1z = WNoiseDz(p1, _noiseTile);
@@ -542,9 +526,9 @@ Vec3 WTURBULENCE::WVelocity(Vec3 orgPos)
 Vec3 WTURBULENCE::WVelocityWithJacobian(Vec3 orgPos, float* xUnwarped, float* yUnwarped, float* zUnwarped)
 {
   // arbitrarily offset evaluation points
-  const Vec3 p1 = orgPos + Vec3(NOISE_TILE_SIZE/2,0,0);
-  const Vec3 p2 = orgPos + Vec3(0,NOISE_TILE_SIZE/2,0);
-  const Vec3 p3 = orgPos + Vec3(0,0,NOISE_TILE_SIZE/2);
+  const Vec3 p1 = orgPos + Vec3(NOISE_TILE_SIZE/2.0,0,0);
+  const Vec3 p2 = orgPos + Vec3(0,NOISE_TILE_SIZE/2.0,0);
+  const Vec3 p3 = orgPos + Vec3(0,0,NOISE_TILE_SIZE/2.0);
 
   Vec3 final;
   final[0] = WNoiseDx(p1, _noiseTile);
@@ -575,44 +559,40 @@ Vec3 WTURBULENCE::WVelocityWithJacobian(Vec3 orgPos, float* xUnwarped, float* yU
   return ret;
 }
 
+
 //////////////////////////////////////////////////////////////////////
 // perform an actual noise advection step
 //////////////////////////////////////////////////////////////////////
 void WTURBULENCE::stepTurbulenceReadable(float dtOrg, float* xvel, float* yvel, float* zvel, unsigned char *obstacles) 
 {
-  // big velocity macCormack fields
-       float* _bigUx;
-       float* _bigUy;
-       float* _bigUz;
-
-       // temp arrays for BFECC and MacCormack - they have more convenient
-       // names in the actual implementations
-       float* _tempBig1;
-       float* _tempBig2;
-
-       // allocate high resolution velocity field. Note that this is only
-       // necessary because we use MacCormack advection. For semi-Lagrangian
-       // advection, these arrays are not necessary.
-       _tempBig1 = new float[_totalCellsBig];
-       _tempBig2 = new float[_totalCellsBig];
-
-  // enlarge timestep to match grid
-  const float dt = dtOrg * _amplify;
-  const float invAmp = 1.0f / _amplify;
-
-  _bigUx = new float[_totalCellsBig];
-  _bigUy = new float[_totalCellsBig];
-  _bigUz = new float[_totalCellsBig]; 
-
-  // prepare textures
-  advectTextureCoordinates(dtOrg, xvel,yvel,zvel, _tempBig1, _tempBig2);
+       // enlarge timestep to match grid
+       const float dt = dtOrg * _amplify;
+       const float invAmp = 1.0f / _amplify;
+       float *tempBig1 = new float[_totalCellsBig];
+       float *tempBig2 = new float[_totalCellsBig];
+       float *bigUx = new float[_totalCellsBig];
+       float *bigUy = new float[_totalCellsBig];
+       float *bigUz = new float[_totalCellsBig]; 
+       float *_energy = new float[_totalCellsSm];
+       float *highFreqEnergy = new float[_totalCellsSm];
+       float *eigMin  = new float[_totalCellsSm];
+       float *eigMax  = new float[_totalCellsSm];
+
+       memset(tempBig1, 0, sizeof(float)*_totalCellsBig);
+       memset(tempBig2, 0, sizeof(float)*_totalCellsBig);
+       memset(highFreqEnergy, 0, sizeof(float)*_totalCellsSm);
+       memset(eigMin, 0, sizeof(float)*_totalCellsSm);
+       memset(eigMax, 0, sizeof(float)*_totalCellsSm);
+
+       // prepare textures
+       advectTextureCoordinates(dtOrg, xvel,yvel,zvel, tempBig1, tempBig2);
 
   // compute eigenvalues of the texture coordinates
-  computeEigenvalues();
+  computeEigenvalues(eigMin, eigMax);
 
   // do wavelet decomposition of energy
-  computeEnergy(xvel, yvel, zvel, obstacles);
-  decomposeEnergy();
+  computeEnergy(_energy, xvel, yvel, zvel, obstacles);
+  decomposeEnergy(_energy, highFreqEnergy);
 
   // zero out coefficients inside of the obstacle
   for (int x = 0; x < _totalCellsSm; x++)
@@ -647,7 +627,7 @@ void WTURBULENCE::stepTurbulenceReadable(float dtOrg, float* xvel, float* yvel,
 
         // retrieve wavelet energy at highest frequency
         float energy = INTERPOLATE::lerp3d(
-            _highFreqEnergy, posSm[0],posSm[1],posSm[2], _xResSm, _yResSm, _zResSm);
+            highFreqEnergy, posSm[0],posSm[1],posSm[2], _xResSm, _yResSm, _zResSm);
 
         // base amplitude for octave 0
         float coefficient = sqrtf(2.0f * fabs(energy));
@@ -656,8 +636,8 @@ void WTURBULENCE::stepTurbulenceReadable(float dtOrg, float* xvel, float* yvel,
         // add noise to velocity, but only if the turbulence is
         // sufficiently undeformed, and the energy is large enough
         // to make a difference
-        const bool addNoise = _eigMax[indexSmall] < 2. && 
-                              _eigMin[indexSmall] > 0.5;
+        const bool addNoise = eigMax[indexSmall] < 2. && 
+                              eigMin[indexSmall] > 0.5;
         if (addNoise && amplitude > _cullingThreshold) {
           // base amplitude for octave 0
           float amplitudeScaled = amplitude;
@@ -679,21 +659,21 @@ void WTURBULENCE::stepTurbulenceReadable(float dtOrg, float* xvel, float* yvel,
         // If you wanted to save memory, you would instead perform a 
         // semi-Lagrangian backtrace for the current grid cell here. Then
         // you could just throw the velocity away.
-        _bigUx[index] = vel[0];
-        _bigUy[index] = vel[1];
-        _bigUz[index] = vel[2];
+        bigUx[index] = vel[0];
+        bigUy[index] = vel[1];
+        bigUz[index] = vel[2];
 
         // compute the velocity magnitude for substepping later
-        const float velMag = _bigUx[index] * _bigUx[index] + 
-                             _bigUy[index] * _bigUy[index] + 
-                             _bigUz[index] * _bigUz[index];
+        const float velMag = bigUx[index] * bigUx[index] + 
+                             bigUy[index] * bigUy[index] + 
+                             bigUz[index] * bigUz[index];
         if (velMag > maxVelocity) maxVelocity = velMag;
 
         // zero out velocity inside obstacles
         float obsCheck = INTERPOLATE::lerp3dToFloat(
             obstacles, posSm[0], posSm[1], posSm[2], _xResSm, _yResSm, _zResSm); 
         if (obsCheck > 0.95) 
-          _bigUx[index] = _bigUy[index] = _bigUz[index] = 0.;
+          bigUx[index] = bigUy[index] = bigUz[index] = 0.;
       }
 
   // prepare density for an advection
@@ -701,24 +681,23 @@ void WTURBULENCE::stepTurbulenceReadable(float dtOrg, float* xvel, float* yvel,
 
   // based on the maximum velocity present, see if we need to substep,
   // but cap the maximum number of substeps to 5
-  const int maxSubSteps = 25;
-  const int maxVel = 5;
+  const int maxSubSteps = 5; 
   maxVelocity = sqrt(maxVelocity) * dt;
-  int totalSubsteps = (int)(maxVelocity / (float)maxVel);
+  int totalSubsteps = (int)(maxVelocity / (float)maxSubSteps);
   totalSubsteps = (totalSubsteps < 1) ? 1 : totalSubsteps;
   totalSubsteps = (totalSubsteps > maxSubSteps) ? maxSubSteps : totalSubsteps;
   const float dtSubdiv = dt / (float)totalSubsteps;
 
   // set boundaries of big velocity grid
-  FLUID_3D::setZeroX(_bigUx, _resBig); 
-  FLUID_3D::setZeroY(_bigUy, _resBig); 
-  FLUID_3D::setZeroZ(_bigUz, _resBig);
+  FLUID_3D::setZeroX(bigUx, _resBig); 
+  FLUID_3D::setZeroY(bigUy, _resBig); 
+  FLUID_3D::setZeroZ(bigUz, _resBig);
 
   // do the MacCormack advection, with substepping if necessary
   for(int substep = 0; substep < totalSubsteps; substep++)
   {
-    FLUID_3D::advectFieldMacCormack(dtSubdiv, _bigUx, _bigUy, _bigUz, 
-        _densityBigOld, _densityBig, _tempBig1, _tempBig2, _resBig, NULL);
+    FLUID_3D::advectFieldMacCormack(dtSubdiv, bigUx, bigUy, bigUz, 
+        _densityBigOld, _densityBig, tempBig1, tempBig2, _resBig, NULL);
 
     if (substep < totalSubsteps - 1) 
       SWAP_POINTERS(_densityBig, _densityBigOld);
@@ -730,25 +709,21 @@ void WTURBULENCE::stepTurbulenceReadable(float dtOrg, float* xvel, float* yvel,
   // reset texture coordinates now in preparation for next timestep
   // Shouldn't do this before generating the noise because then the 
   // eigenvalues stored do not reflect the underlying texture coordinates
-  resetTextureCoordinates();
+  resetTextureCoordinates(eigMin, eigMax);
   
-  // output files
-  /*
-  string prefix = string("./amplified.preview/density_bigxy_");
-  FLUID_3D::writeImageSliceXY(_densityBig, _resBig, _resBig[2]/2, prefix, _totalStepsBig, 1.0f);
-  //string df3Prefix = string("./df3/density_big_");
-  //IMAGE::dumpDF3(_totalStepsBig, df3Prefix, _densityBig, _resBig[0],_resBig[1],_resBig[2]);
-  string pbrtPrefix = string("./pbrt/density_big_");
-  IMAGE::dumpPBRT(_totalStepsBig, pbrtPrefix, _densityBig, _resBig[0],_resBig[1],_resBig[2]);
-       */
-  _totalStepsBig++;
+  delete[] tempBig1;
+  delete[] tempBig2;
+  delete[] bigUx;
+  delete[] bigUy;
+  delete[] bigUz;
+  delete[] _energy;
+  delete[] highFreqEnergy;
 
-       delete[] _bigUx;
-       delete[] _bigUy;
-       delete[] _bigUz;
+  delete[] eigMin;
+  delete[] eigMax;
+  
 
-       delete[] _tempBig1;
-    delete[] _tempBig2;
+  _totalStepsBig++;
 }
 
 //////////////////////////////////////////////////////////////////////
@@ -757,257 +732,258 @@ void WTURBULENCE::stepTurbulenceReadable(float dtOrg, float* xvel, float* yvel,
 //////////////////////////////////////////////////////////////////////
 void WTURBULENCE::stepTurbulenceFull(float dtOrg, float* xvel, float* yvel, float* zvel, unsigned char *obstacles)
 {
-       // big velocity macCormack fields
-       float* _bigUx;
-       float* _bigUy;
-       float* _bigUz;
-
-       // temp arrays for BFECC and MacCormack - they have more convenient
-       // names in the actual implementations
-       float* _tempBig1;
-       float* _tempBig2;
-
-       // allocate high resolution velocity field. Note that this is only
-       // necessary because we use MacCormack advection. For semi-Lagrangian
-       // advection, these arrays are not necessary.
-       _tempBig1 = new float[_totalCellsBig];
-       _tempBig2 = new float[_totalCellsBig];
-
        // enlarge timestep to match grid
        const float dt = dtOrg * _amplify;
        const float invAmp = 1.0f / _amplify;
-
-       _bigUx = new float[_totalCellsBig];
-       _bigUy = new float[_totalCellsBig];
-       _bigUz = new float[_totalCellsBig]; 
+       float *tempBig1 = new float[_totalCellsBig];
+       float *tempBig2 = new float[_totalCellsBig];
+       float *bigUx = new float[_totalCellsBig];
+       float *bigUy = new float[_totalCellsBig];
+       float *bigUz = new float[_totalCellsBig]; 
+       float *_energy = new float[_totalCellsSm];
+       float *highFreqEnergy = new float[_totalCellsSm];
+       float *eigMin  = new float[_totalCellsSm];
+       float *eigMax  = new float[_totalCellsSm];
+
+       memset(highFreqEnergy, 0, sizeof(float)*_totalCellsSm);
+       memset(eigMin, 0, sizeof(float)*_totalCellsSm);
+       memset(eigMax, 0, sizeof(float)*_totalCellsSm);
 
        // prepare textures
-       advectTextureCoordinates(dtOrg, xvel,yvel,zvel, _tempBig1, _tempBig2);
+       advectTextureCoordinates(dtOrg, xvel,yvel,zvel, tempBig1, tempBig2);
 
        // do wavelet decomposition of energy
-       computeEnergy(xvel, yvel, zvel, obstacles);
-       decomposeEnergy();
+       computeEnergy(_energy, xvel, yvel, zvel, obstacles);
 
-       // zero out coefficients inside of the obstacle
        for (int x = 0; x < _totalCellsSm; x++)
                if (obstacles[x]) _energy[x] = 0.f;
 
-       // parallel region setup
-       float maxVelMagThreads[8] = { -1., -1., -1., -1., -1., -1., -1., -1. };
-
-       #if PARALLEL==1
-               #pragma omp parallel
-       #endif
-         { float maxVelMag1 = 0.;
-       #if PARALLEL==1
-               const int id  = omp_get_thread_num(); /*, num = omp_get_num_threads(); */
-       #endif
-
-       // vector noise main loop
-       #if PARALLEL==1
-       #pragma omp for  schedule(static)
-       #endif
-       for (int zSmall = 0; zSmall < _zResSm; zSmall++) 
-       for (int ySmall = 0; ySmall < _yResSm; ySmall++) 
-       for (int xSmall = 0; xSmall < _xResSm; xSmall++)
-       {
-               const int indexSmall = xSmall + ySmall * _xResSm + zSmall * _slabSizeSm;
-
-               // compute jacobian
-               float jacobian[3][3] = {
-                 { minDx(xSmall, ySmall, zSmall, _tcU, _resSm), minDx(xSmall, ySmall, zSmall, _tcV, _resSm), minDx(xSmall, ySmall, zSmall, _tcW, _resSm) } ,
-                 { minDy(xSmall, ySmall, zSmall, _tcU, _resSm), minDy(xSmall, ySmall, zSmall, _tcV, _resSm), minDy(xSmall, ySmall, zSmall, _tcW, _resSm) } ,
-                 { minDz(xSmall, ySmall, zSmall, _tcU, _resSm), minDz(xSmall, ySmall, zSmall, _tcV, _resSm), minDz(xSmall, ySmall, zSmall, _tcW, _resSm) }
-               };
-
-               // get LU factorization of texture jacobian and apply 
-               // it to unit vectors
-               JAMA::LU<float> LU = computeLU3x3(jacobian);
-               float xUnwarped[] = {1.0f, 0.0f, 0.0f};
-               float yUnwarped[] = {0.0f, 1.0f, 0.0f};
-               float zUnwarped[] = {0.0f, 0.0f, 1.0f};
-               float xWarped[] = {1.0f, 0.0f, 0.0f};
-               float yWarped[] = {0.0f, 1.0f, 0.0f};
-               float zWarped[] = {0.0f, 0.0f, 1.0f};
-               bool nonSingular = LU.isNonsingular();
-
-               #if 0
-                       // UNUSED
-                       float eigMax = 10.0f;
-                       float eigMin = 0.1f;
-               #endif
+       decomposeEnergy(_energy, highFreqEnergy);
 
-               if (nonSingular)
-               {
-                       solveLU3x3(LU, xUnwarped, xWarped);
-                       solveLU3x3(LU, yUnwarped, yWarped);
-                       solveLU3x3(LU, zUnwarped, zWarped);
-
-                       // compute the eigenvalues while we have the Jacobian available
-                       Vec3 eigenvalues = Vec3(1.);
-                       computeEigenvalues3x3( &eigenvalues[0], jacobian);
-                       _eigMax[indexSmall] = MAX3V(eigenvalues);
-                       _eigMin[indexSmall] = MIN3V(eigenvalues);
-               }
+       // zero out coefficients inside of the obstacle
+       for (int x = 0; x < _totalCellsSm; x++)
+               if (obstacles[x]) highFreqEnergy[x] = 0.f;
 
-               // make sure to skip one on the beginning and end
-               int xStart = (xSmall == 0) ? 1 : 0;
-               int xEnd   = (xSmall == _xResSm - 1) ? _amplify - 1 : _amplify;
-               int yStart = (ySmall == 0) ? 1 : 0;
-               int yEnd   = (ySmall == _yResSm - 1) ? _amplify - 1 : _amplify;
-               int zStart = (zSmall == 0) ? 1 : 0;
-               int zEnd   = (zSmall == _zResSm - 1) ? _amplify - 1 : _amplify;
-                 
-               for (int zBig = zStart; zBig < zEnd; zBig++) 
-               for (int yBig = yStart; yBig < yEnd; yBig++) 
-               for (int xBig = xStart; xBig < xEnd; xBig++)
-               {
-                       const int x = xSmall * _amplify + xBig;
-                       const int y = ySmall * _amplify + yBig;
-                       const int z = zSmall * _amplify + zBig;
-
-                       // get unit position for both fine and coarse grid
-                       const Vec3 pos = Vec3(x,y,z);
-                       const Vec3 posSm = pos * invAmp;
-
-                       // get grid index for both fine and coarse grid
-                       const int index = x + y *_xResBig + z *_slabSizeBig;
-
-                       // get a linearly interpolated velocity and texcoords
-                       // from the coarse grid
-                       Vec3 vel = INTERPOLATE::lerp3dVec( xvel,yvel,zvel, 
-                         posSm[0], posSm[1], posSm[2], _xResSm,_yResSm,_zResSm);
-                       Vec3 uvw = INTERPOLATE::lerp3dVec( _tcU,_tcV,_tcW, 
-                         posSm[0], posSm[1], posSm[2], _xResSm,_yResSm,_zResSm);
-
-                       // multiply the texture coordinate by _resSm so that turbulence
-                       // synthesis begins at the first octave that the coarse grid 
-                       // cannot capture
-                       Vec3 texCoord = Vec3(uvw[0] * _resSm[0], 
-                                                          uvw[1] * _resSm[1],
-                                                          uvw[2] * _resSm[2]); 
-
-                       // retrieve wavelet energy at highest frequency
-                       float energy = INTERPOLATE::lerp3d(
-                         _highFreqEnergy, posSm[0],posSm[1],posSm[2], _xResSm, _yResSm, _zResSm);
-
-                       // base amplitude for octave 0
-                       float coefficient = sqrtf(2.0f * fabs(energy));
-                       const float amplitude = *_strength * fabs(0.5 * coefficient) * persistence;
-
-                       // add noise to velocity, but only if the turbulence is
-                       // sufficiently undeformed, and the energy is large enough
-                       // to make a difference
-                       const bool addNoise = _eigMax[indexSmall] < 2. && 
-                                                               _eigMin[indexSmall] > 0.5;
-
-                       if (addNoise && amplitude > _cullingThreshold) {
-                               // base amplitude for octave 0
-                               float amplitudeScaled = amplitude;
-
-                               for (int octave = 0; octave < _octaves; octave++)
-                               {
-                                       // multiply the vector noise times the maximum allowed
-                                       // noise amplitude at this octave, and add it to the total
-                                       vel += WVelocityWithJacobian(texCoord, &xUnwarped[0], &yUnwarped[0], &zUnwarped[0]) * amplitudeScaled;
-
-                                       // scale coefficient for next octave
-                                       amplitudeScaled *= persistence;
-                                       texCoord *= 2.0f;
-                               }
-                       }
-
-                       // Store velocity + turbulence in big grid for maccormack step
-                       //
-                       // If you wanted to save memory, you would instead perform a 
-                       // semi-Lagrangian backtrace for the current grid cell here. Then
-                       // you could just throw the velocity away.
-                       _bigUx[index] = vel[0];
-                       _bigUy[index] = vel[1];
-                       _bigUz[index] = vel[2];
-
-                       // compute the velocity magnitude for substepping later
-                       const float velMag = _bigUx[index] * _bigUx[index] + 
-                                                          _bigUy[index] * _bigUy[index] + 
-                                                          _bigUz[index] * _bigUz[index];
-                       if (velMag > maxVelMag1) maxVelMag1 = velMag;
-
-                       // zero out velocity inside obstacles
-                       float obsCheck = INTERPOLATE::lerp3dToFloat(
-                         obstacles, posSm[0], posSm[1], posSm[2], _xResSm, _yResSm, _zResSm); 
-
-                       if (obsCheck > 0.95) 
-                               _bigUx[index] = _bigUy[index] = _bigUz[index] = 0.;
-               } // xyz
-
-               #if PARALLEL==1
-               maxVelMagThreads[id] = maxVelMag1;
-               #else
-               maxVelMagThreads[0] = maxVelMag1;
-               #endif
-               }
-       } // omp
-
-       // compute maximum over threads
-       float maxVelMag = maxVelMagThreads[0];
-       #if PARALLEL==1
-       for (int i = 1; i < 8; i++) 
-       if (maxVelMag < maxVelMagThreads[i]) 
-         maxVelMag = maxVelMagThreads[i];
-       #endif
-
-       // prepare density for an advection
-       SWAP_POINTERS(_densityBig, _densityBigOld);
-
-       // based on the maximum velocity present, see if we need to substep,
-       // but cap the maximum number of substeps to 5
-       const int maxSubSteps = 25;
-       const int maxVel = 5;
-       maxVelMag = sqrt(maxVelMag) * dt;
-       int totalSubsteps = (int)(maxVelMag / (float)maxVel);
-       totalSubsteps = (totalSubsteps < 1) ? 1 : totalSubsteps;
-       // printf("totalSubsteps: %d\n", totalSubsteps);
-       totalSubsteps = (totalSubsteps > maxSubSteps) ? maxSubSteps : totalSubsteps;
-       const float dtSubdiv = dt / (float)totalSubsteps;
-
-       // set boundaries of big velocity grid
-       FLUID_3D::setZeroX(_bigUx, _resBig); 
-       FLUID_3D::setZeroY(_bigUy, _resBig); 
-       FLUID_3D::setZeroZ(_bigUz, _resBig);
-
-       // do the MacCormack advection, with substepping if necessary
-       for(int substep = 0; substep < totalSubsteps; substep++)
-       {
-       FLUID_3D::advectFieldMacCormack(dtSubdiv, _bigUx, _bigUy, _bigUz, 
-               _densityBigOld, _densityBig, _tempBig1, _tempBig2, _resBig, NULL);
+       Vec3Int ressm(_xResSm, _yResSm, _zResSm);
+       FLUID_3D::setNeumannX(highFreqEnergy, ressm);
+       FLUID_3D::setNeumannY(highFreqEnergy, ressm);
+       FLUID_3D::setNeumannZ(highFreqEnergy, ressm);
+
+  // parallel region setup
+  float maxVelMagThreads[8] = { -1., -1., -1., -1., -1., -1., -1., -1. };
+#if PARALLEL==1
+#pragma omp parallel
+#endif
+  { float maxVelMag1 = 0.;
+#if PARALLEL==1
+    const int id  = omp_get_thread_num(); /*, num = omp_get_num_threads(); */
+#endif
+
+  // vector noise main loop
+#if PARALLEL==1
+#pragma omp for  schedule(static)
+#endif
+  for (int zSmall = 0; zSmall < _zResSm; zSmall++) 
+  for (int ySmall = 0; ySmall < _yResSm; ySmall++) 
+  for (int xSmall = 0; xSmall < _xResSm; xSmall++)
+  {
+    const int indexSmall = xSmall + ySmall * _xResSm + zSmall * _slabSizeSm;
+
+    // compute jacobian
+    float jacobian[3][3] = {
+      { minDx(xSmall, ySmall, zSmall, _tcU, _resSm), minDx(xSmall, ySmall, zSmall, _tcV, _resSm), minDx(xSmall, ySmall, zSmall, _tcW, _resSm) } ,
+      { minDy(xSmall, ySmall, zSmall, _tcU, _resSm), minDy(xSmall, ySmall, zSmall, _tcV, _resSm), minDy(xSmall, ySmall, zSmall, _tcW, _resSm) } ,
+      { minDz(xSmall, ySmall, zSmall, _tcU, _resSm), minDz(xSmall, ySmall, zSmall, _tcV, _resSm), minDz(xSmall, ySmall, zSmall, _tcW, _resSm) }
+    };
+
+    // get LU factorization of texture jacobian and apply 
+    // it to unit vectors
+    JAMA::LU<float> LU = computeLU3x3(jacobian);
+    float xUnwarped[] = {1.0f, 0.0f, 0.0f};
+    float yUnwarped[] = {0.0f, 1.0f, 0.0f};
+    float zUnwarped[] = {0.0f, 0.0f, 1.0f};
+    float xWarped[] = {1.0f, 0.0f, 0.0f};
+    float yWarped[] = {0.0f, 1.0f, 0.0f};
+    float zWarped[] = {0.0f, 0.0f, 1.0f};
+    bool nonSingular = LU.isNonsingular();
+#if 0
+       // UNUSED
+    float eigMax = 10.0f;
+    float eigMin = 0.1f;
+#endif
+    if (nonSingular)
+    {
+      solveLU3x3(LU, xUnwarped, xWarped);
+      solveLU3x3(LU, yUnwarped, yWarped);
+      solveLU3x3(LU, zUnwarped, zWarped);
+
+      // compute the eigenvalues while we have the Jacobian available
+      Vec3 eigenvalues = Vec3(1.);
+      computeEigenvalues3x3( &eigenvalues[0], jacobian);
+      eigMax[indexSmall] = MAX3V(eigenvalues);
+      eigMin[indexSmall] = MIN3V(eigenvalues);
+    }
+    
+    // make sure to skip one on the beginning and end
+    int xStart = (xSmall == 0) ? 1 : 0;
+    int xEnd   = (xSmall == _xResSm - 1) ? _amplify - 1 : _amplify;
+    int yStart = (ySmall == 0) ? 1 : 0;
+    int yEnd   = (ySmall == _yResSm - 1) ? _amplify - 1 : _amplify;
+    int zStart = (zSmall == 0) ? 1 : 0;
+    int zEnd   = (zSmall == _zResSm - 1) ? _amplify - 1 : _amplify;
+      
+    for (int zBig = zStart; zBig < zEnd; zBig++) 
+    for (int yBig = yStart; yBig < yEnd; yBig++) 
+    for (int xBig = xStart; xBig < xEnd; xBig++)
+    {
+      const int x = xSmall * _amplify + xBig;
+      const int y = ySmall * _amplify + yBig;
+      const int z = zSmall * _amplify + zBig;
+      
+      // get unit position for both fine and coarse grid
+      const Vec3 pos = Vec3(x,y,z);
+      const Vec3 posSm = pos * invAmp;
+      
+      // get grid index for both fine and coarse grid
+      const int index = x + y *_xResBig + z&n