COLLADA branch: merge from trunk -r 25745:26429.
authorArystanbek Dyussenov <arystan.d@gmail.com>
Sat, 30 Jan 2010 14:12:51 +0000 (14:12 +0000)
committerArystanbek Dyussenov <arystan.d@gmail.com>
Sat, 30 Jan 2010 14:12:51 +0000 (14:12 +0000)
scons+vc build crashes on Blender start when BF_COLLADA is on, don't know why this happens.

Merging from trunk to get working vc project files, then will try to debug and locate the problem.

670 files changed:
CMake/macros.cmake
CMakeLists.txt
SConstruct
config/aix4-config.py [new file with mode: 0644]
config/darwin-config.py
config/irix6-config.py
config/linuxcross-config.py
config/openbsd3-config.py
config/sunos5-config.py
extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionWorld.cpp
extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionWorld.h
extern/bullet2/src/BulletSoftBody/btSoftRigidDynamicsWorld.cpp
extern/bullet2/src/BulletSoftBody/btSoftRigidDynamicsWorld.h
intern/audaspace/OpenAL/AUD_OpenALDevice.cpp
intern/audaspace/SConscript
intern/audaspace/make/msvc_9_0/audaspace.vcproj
intern/bsp/intern/BSP_CSGMesh.cpp
intern/bsp/intern/BSP_CSGMesh.h
intern/ghost/CMakeLists.txt
intern/ghost/GHOST_C-api.h
intern/ghost/GHOST_ISystem.h
intern/ghost/GHOST_IWindow.h
intern/ghost/GHOST_Types.h
intern/ghost/SConscript
intern/ghost/intern/GHOST_C-api.cpp
intern/ghost/intern/GHOST_EventTrackpad.h [new file with mode: 0644]
intern/ghost/intern/GHOST_SystemCarbon.cpp
intern/ghost/intern/GHOST_SystemCarbon.h
intern/ghost/intern/GHOST_SystemCocoa.h
intern/ghost/intern/GHOST_SystemCocoa.mm
intern/ghost/intern/GHOST_SystemWin32.cpp
intern/ghost/intern/GHOST_SystemWin32.h
intern/ghost/intern/GHOST_SystemX11.cpp
intern/ghost/intern/GHOST_SystemX11.h
intern/ghost/intern/GHOST_Window.cpp
intern/ghost/intern/GHOST_Window.h
intern/ghost/intern/GHOST_WindowCarbon.cpp
intern/ghost/intern/GHOST_WindowCarbon.h
intern/ghost/intern/GHOST_WindowCocoa.h
intern/ghost/intern/GHOST_WindowCocoa.mm
intern/ghost/intern/GHOST_WindowManager.cpp
intern/ghost/intern/GHOST_WindowManager.h
intern/ghost/intern/GHOST_WindowWin32.cpp
intern/ghost/intern/GHOST_WindowWin32.h
intern/ghost/intern/GHOST_WindowX11.cpp
intern/ghost/intern/GHOST_WindowX11.h
intern/ghost/make/msvc_9_0/ghost.vcproj
intern/guardedalloc/intern/mallocn.c
intern/smoke/intern/EIGENVALUE_HELPER.cpp [new file with mode: 0644]
intern/smoke/intern/EIGENVALUE_HELPER.h
intern/smoke/intern/FLUID_3D.cpp
intern/smoke/intern/FLUID_3D.h
intern/smoke/intern/FLUID_3D_SOLVERS.cpp
intern/smoke/intern/FLUID_3D_STATIC.cpp
intern/smoke/intern/LU_HELPER.cpp [new file with mode: 0644]
intern/smoke/intern/LU_HELPER.h
intern/smoke/intern/WTURBULENCE.cpp
intern/smoke/intern/smoke_API.cpp
intern/smoke/make/msvc_9_0/smoke.vcproj
intern/string/intern/STR_String.cpp
projectfiles_vc9/blender/BPY_python/BPY_python.vcproj
projectfiles_vc9/blender/blenlib/BLI_blenlib.vcproj
projectfiles_vc9/blender/editors/ED_editors.vcproj
projectfiles_vc9/blender/makesrna/RNA_makesrna.vcproj
projectfiles_vc9/blender/makesrna/RNA_rna.vcproj
projectfiles_vc9/blender/nodes/nodes.vcproj
projectfiles_vc9/blender/windowmanager/windowmanager.vcproj
release/datafiles/blenderbuttons
release/scripts/io/engine_render_pov.py
release/scripts/io/export_3ds.py
release/scripts/io/export_fbx.py
release/scripts/io/export_mdd.py
release/scripts/io/export_obj.py
release/scripts/io/export_ply.py
release/scripts/io/export_x3d.py
release/scripts/io/import_anim_bvh.py
release/scripts/io/import_scene_3ds.py
release/scripts/io/import_scene_obj.py
release/scripts/io/netrender/balancing.py
release/scripts/io/netrender/client.py
release/scripts/io/netrender/master.py
release/scripts/io/netrender/master_html.py
release/scripts/io/netrender/netrender.css
release/scripts/io/netrender/netrender.js
release/scripts/io/netrender/operators.py
release/scripts/io/netrender/slave.py
release/scripts/io/netrender/ui.py
release/scripts/io/netrender/utils.py
release/scripts/modules/bpy/__init__.py
release/scripts/modules/bpy/app.py
release/scripts/modules/bpy/ops.py
release/scripts/modules/bpy/utils.py
release/scripts/modules/bpy_types.py
release/scripts/modules/retopo.py [deleted file]
release/scripts/modules/rigify/__init__.py
release/scripts/modules/rigify/arm_biped.py [moved from release/scripts/modules/rigify/arm_biped_generic.py with 88% similarity]
release/scripts/modules/rigify/copy.py
release/scripts/modules/rigify/delta.py
release/scripts/modules/rigify/eye_balls.py [new file with mode: 0644]
release/scripts/modules/rigify/eye_lid.py [new file with mode: 0644]
release/scripts/modules/rigify/finger_curl.py
release/scripts/modules/rigify/leg_biped.py [moved from release/scripts/modules/rigify/leg_biped_generic.py with 89% similarity]
release/scripts/modules/rigify/leg_quadruped.py [new file with mode: 0644]
release/scripts/modules/rigify/leg_quadruped_generic.py [deleted file]
release/scripts/modules/rigify/mouth.py [new file with mode: 0644]
release/scripts/modules/rigify/neck_flex.py
release/scripts/modules/rigify/palm_curl.py
release/scripts/modules/rigify/shape_key_distance.py [new file with mode: 0644]
release/scripts/modules/rigify/shape_key_rotdiff.py [new file with mode: 0644]
release/scripts/modules/rigify/spine_pivot_flex.py
release/scripts/modules/rigify/stretch.py [new file with mode: 0644]
release/scripts/modules/rigify/stretch_twist.py [new file with mode: 0644]
release/scripts/modules/rigify/track_dual.py [new file with mode: 0644]
release/scripts/modules/rigify/track_reverse.py [new file with mode: 0644]
release/scripts/modules/rigify_utils.py
release/scripts/modules/rna_info.py
release/scripts/modules/rna_prop_ui.py
release/scripts/op/add_armature_human.py
release/scripts/op/add_mesh_torus.py
release/scripts/op/mesh.py
release/scripts/op/mesh_skin.py [deleted file]
release/scripts/op/object.py
release/scripts/op/object_randomize_transform.py [new file with mode: 0644]
release/scripts/op/screen_play_rendered_anim.py
release/scripts/op/uv.py [new file with mode: 0644]
release/scripts/op/uvcalc_follow_active.py
release/scripts/op/uvcalc_smart_project.py
release/scripts/op/wm.py
release/scripts/templates/gamelogic.py
release/scripts/templates/operator.py
release/scripts/templates/operator_uv.py [new file with mode: 0644]
release/scripts/templates/panel_simple.py [new file with mode: 0644]
release/scripts/ui/properties_animviz.py [new file with mode: 0644]
release/scripts/ui/properties_data_armature.py
release/scripts/ui/properties_data_bone.py
release/scripts/ui/properties_data_camera.py
release/scripts/ui/properties_data_curve.py
release/scripts/ui/properties_data_lamp.py
release/scripts/ui/properties_data_lattice.py
release/scripts/ui/properties_data_mesh.py
release/scripts/ui/properties_data_metaball.py
release/scripts/ui/properties_data_modifier.py
release/scripts/ui/properties_material.py
release/scripts/ui/properties_object.py
release/scripts/ui/properties_object_constraint.py
release/scripts/ui/properties_particle.py
release/scripts/ui/properties_physics_smoke.py
release/scripts/ui/properties_render.py
release/scripts/ui/properties_scene.py
release/scripts/ui/properties_texture.py
release/scripts/ui/properties_world.py
release/scripts/ui/space_dopesheet.py
release/scripts/ui/space_graph.py
release/scripts/ui/space_image.py
release/scripts/ui/space_info.py
release/scripts/ui/space_nla.py
release/scripts/ui/space_sequencer.py
release/scripts/ui/space_text.py
release/scripts/ui/space_time.py
release/scripts/ui/space_userpref.py
release/scripts/ui/space_view3d.py
release/scripts/ui/space_view3d_toolbar.py
source/Makefile
source/blender/Makefile
source/blender/blenkernel/BKE_DerivedMesh.h
source/blender/blenkernel/BKE_anim.h
source/blender/blenkernel/BKE_animsys.h
source/blender/blenkernel/BKE_blender.h
source/blender/blenkernel/BKE_brush.h
source/blender/blenkernel/BKE_colortools.h
source/blender/blenkernel/BKE_deform.h
source/blender/blenkernel/BKE_fcurve.h
source/blender/blenkernel/BKE_global.h
source/blender/blenkernel/BKE_group.h
source/blender/blenkernel/BKE_image.h
source/blender/blenkernel/BKE_material.h
source/blender/blenkernel/BKE_modifier.h
source/blender/blenkernel/BKE_nla.h
source/blender/blenkernel/BKE_node.h
source/blender/blenkernel/BKE_object.h
source/blender/blenkernel/BKE_pointcache.h
source/blender/blenkernel/BKE_screen.h
source/blender/blenkernel/BKE_sequencer.h
source/blender/blenkernel/BKE_texture.h
source/blender/blenkernel/BKE_utildefines.h
source/blender/blenkernel/BKE_writeavi.h
source/blender/blenkernel/BKE_writeffmpeg.h
source/blender/blenkernel/intern/BME_Customdata.c
source/blender/blenkernel/intern/BME_mesh.c
source/blender/blenkernel/intern/CCGSubSurf.c
source/blender/blenkernel/intern/DerivedMesh.c
source/blender/blenkernel/intern/anim.c
source/blender/blenkernel/intern/anim_sys.c
source/blender/blenkernel/intern/armature.c
source/blender/blenkernel/intern/blender.c
source/blender/blenkernel/intern/boids.c
source/blender/blenkernel/intern/brush.c
source/blender/blenkernel/intern/cdderivedmesh.c
source/blender/blenkernel/intern/cloth.c
source/blender/blenkernel/intern/colortools.c
source/blender/blenkernel/intern/constraint.c
source/blender/blenkernel/intern/context.c
source/blender/blenkernel/intern/curve.c
source/blender/blenkernel/intern/customdata.c
source/blender/blenkernel/intern/deform.c
source/blender/blenkernel/intern/depsgraph.c
source/blender/blenkernel/intern/effect.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/idprop.c
source/blender/blenkernel/intern/image.c
source/blender/blenkernel/intern/ipo.c
source/blender/blenkernel/intern/library.c
source/blender/blenkernel/intern/material.c
source/blender/blenkernel/intern/modifier.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/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/sequencer.c
source/blender/blenkernel/intern/shrinkwrap.c
source/blender/blenkernel/intern/simple_deform.c
source/blender/blenkernel/intern/smoke.c
source/blender/blenkernel/intern/softbody.c
source/blender/blenkernel/intern/subsurf_ccg.c
source/blender/blenkernel/intern/text.c
source/blender/blenkernel/intern/texture.c
source/blender/blenkernel/intern/unit.c
source/blender/blenkernel/intern/world.c
source/blender/blenkernel/intern/writeavi.c
source/blender/blenkernel/intern/writeffmpeg.c
source/blender/blenlib/BLI_bpath.h
source/blender/blenlib/BLI_ghash.h
source/blender/blenlib/BLI_gsqueue.h
source/blender/blenlib/BLI_math_base.h
source/blender/blenlib/BLI_math_color.h
source/blender/blenlib/BLI_math_geom.h
source/blender/blenlib/BLI_math_inline.h [new file with mode: 0644]
source/blender/blenlib/BLI_math_vector.h
source/blender/blenlib/BLI_mempool.h
source/blender/blenlib/BLI_path_util.h
source/blender/blenlib/BLI_storage_types.h
source/blender/blenlib/BLI_string.h
source/blender/blenlib/BLI_threads.h
source/blender/blenlib/BLI_winstuff.h
source/blender/blenlib/intern/BLI_ghash.c
source/blender/blenlib/intern/BLI_kdopbvh.c
source/blender/blenlib/intern/BLI_mempool.c
source/blender/blenlib/intern/bpath.c
source/blender/blenlib/intern/fileops.c
source/blender/blenlib/intern/freetypefont.c
source/blender/blenlib/intern/gsqueue.c
source/blender/blenlib/intern/math_base.c
source/blender/blenlib/intern/math_base_inline.c [new file with mode: 0644]
source/blender/blenlib/intern/math_color.c
source/blender/blenlib/intern/math_geom.c
source/blender/blenlib/intern/math_rotation.c
source/blender/blenlib/intern/math_vector.c
source/blender/blenlib/intern/math_vector_inline.c
source/blender/blenlib/intern/path_util.c
source/blender/blenlib/intern/pbvh.c
source/blender/blenlib/intern/storage.c
source/blender/blenlib/intern/string.c
source/blender/blenlib/intern/threads.c
source/blender/blenloader/intern/readfile.c
source/blender/blenloader/intern/undofile.c
source/blender/blenloader/intern/writefile.c
source/blender/collada/DocumentImporter.cpp
source/blender/collada/Makefile [new file with mode: 0644]
source/blender/editors/CMakeLists.txt
source/blender/editors/animation/anim_channels_defines.c
source/blender/editors/animation/anim_channels_edit.c
source/blender/editors/animation/anim_draw.c
source/blender/editors/animation/anim_filter.c
source/blender/editors/animation/anim_markers.c
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/keyframing.c
source/blender/editors/animation/keyingsets.c
source/blender/editors/armature/armature_intern.h
source/blender/editors/armature/armature_ops.c
source/blender/editors/armature/editarmature.c
source/blender/editors/armature/meshlaplacian.c
source/blender/editors/armature/poseSlide.c
source/blender/editors/armature/poselib.c
source/blender/editors/armature/poseobject.c
source/blender/editors/curve/curve_intern.h
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/gpencil/gpencil_buttons.c
source/blender/editors/gpencil/gpencil_edit.c
source/blender/editors/include/ED_anim_api.h
source/blender/editors/include/ED_armature.h
source/blender/editors/include/ED_curve.h
source/blender/editors/include/ED_fileselect.h
source/blender/editors/include/ED_interface.h [deleted file]
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_view3d.h
source/blender/editors/include/UI_icons.h
source/blender/editors/include/UI_interface.h
source/blender/editors/include/UI_resources.h
source/blender/editors/interface/interface.c
source/blender/editors/interface/interface_anim.c
source/blender/editors/interface/interface_draw.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_ops.c
source/blender/editors/interface/interface_panel.c
source/blender/editors/interface/interface_regions.c
source/blender/editors/interface/interface_style.c
source/blender/editors/interface/interface_templates.c
source/blender/editors/interface/interface_widgets.c
source/blender/editors/interface/resources.c
source/blender/editors/interface/view2d.c
source/blender/editors/interface/view2d_ops.c
source/blender/editors/mesh/editmesh.c
source/blender/editors/mesh/editmesh_add.c
source/blender/editors/mesh/editmesh_lib.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/loopcut.c
source/blender/editors/mesh/mesh_data.c
source/blender/editors/mesh/mesh_intern.h
source/blender/editors/mesh/mesh_ops.c
source/blender/editors/metaball/mball_edit.c
source/blender/editors/object/object_add.c
source/blender/editors/object/object_bake.c
source/blender/editors/object/object_constraint.c
source/blender/editors/object/object_edit.c
source/blender/editors/object/object_group.c
source/blender/editors/object/object_hook.c
source/blender/editors/object/object_intern.h
source/blender/editors/object/object_modifier.c
source/blender/editors/object/object_ops.c
source/blender/editors/object/object_relations.c
source/blender/editors/object/object_select.c
source/blender/editors/object/object_shapekey.c
source/blender/editors/object/object_transform.c
source/blender/editors/object/object_vgroup.c
source/blender/editors/physics/particle_boids.c
source/blender/editors/physics/particle_edit.c
source/blender/editors/physics/particle_object.c
source/blender/editors/physics/physics_intern.h
source/blender/editors/physics/physics_ops.c
source/blender/editors/render/render_intern.h
source/blender/editors/render/render_ops.c
source/blender/editors/render/render_preview.c
source/blender/editors/render/render_shading.c
source/blender/editors/screen/CMakeLists.txt
source/blender/editors/screen/area.c
source/blender/editors/screen/screen_edit.c
source/blender/editors/screen/screen_intern.h
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_intern.h
source/blender/editors/sculpt_paint/paint_ops.c
source/blender/editors/sculpt_paint/paint_stroke.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/sound_ops.c
source/blender/editors/space_action/action_edit.c
source/blender/editors/space_action/action_select.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_ops.c
source/blender/editors/space_buttons/space_buttons.c
source/blender/editors/space_console/console_draw.c
source/blender/editors/space_console/console_ops.c
source/blender/editors/space_console/space_console.c
source/blender/editors/space_file/file_draw.c
source/blender/editors/space_file/file_intern.h
source/blender/editors/space_file/file_ops.c
source/blender/editors/space_file/filelist.c
source/blender/editors/space_file/filelist.h
source/blender/editors/space_file/space_file.c
source/blender/editors/space_file/writeimage.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_select.c
source/blender/editors/space_graph/graph_utils.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/space_info.c
source/blender/editors/space_logic/Makefile
source/blender/editors/space_logic/SConscript
source/blender/editors/space_logic/logic_buttons.c
source/blender/editors/space_logic/logic_intern.h
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_channels.c
source/blender/editors/space_nla/nla_edit.c
source/blender/editors/space_nla/nla_intern.h
source/blender/editors/space_nla/nla_ops.c
source/blender/editors/space_nla/nla_select.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_header.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/space_script.c
source/blender/editors/space_sequencer/sequencer_add.c
source/blender/editors/space_sequencer/sequencer_draw.c
source/blender/editors/space_sequencer/space_sequencer.c
source/blender/editors/space_sound/space_sound.c
source/blender/editors/space_text/space_text.c
source/blender/editors/space_text/text_draw.c
source/blender/editors/space_text/text_intern.h
source/blender/editors/space_text/text_ops.c
source/blender/editors/space_text/text_python.c
source/blender/editors/space_time/space_time.c
source/blender/editors/space_time/time_ops.c
source/blender/editors/space_userpref/space_userpref.c
source/blender/editors/space_view3d/drawanimviz.c
source/blender/editors/space_view3d/drawarmature.c
source/blender/editors/space_view3d/drawobject.c
source/blender/editors/space_view3d/space_view3d.c
source/blender/editors/space_view3d/view3d_buttons.c
source/blender/editors/space_view3d/view3d_draw.c
source/blender/editors/space_view3d/view3d_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_constraints.c
source/blender/editors/transform/transform_conversions.c
source/blender/editors/transform/transform_generics.c
source/blender/editors/transform/transform_numinput.c
source/blender/editors/transform/transform_ops.c
source/blender/editors/transform/transform_snap.c
source/blender/editors/util/editmode_undo.c
source/blender/gpu/intern/gpu_buffers.c
source/blender/gpu/intern/gpu_draw.c
source/blender/gpu/intern/gpu_extensions.c
source/blender/ikplugin/intern/iksolver_plugin.c
source/blender/imbuf/intern/amiga.c
source/blender/imbuf/intern/anim.c
source/blender/imbuf/intern/anim5.c
source/blender/imbuf/intern/bmp.c
source/blender/imbuf/intern/dds/dds_api.cpp
source/blender/imbuf/intern/divers.c
source/blender/imbuf/intern/dynlibtiff.c
source/blender/imbuf/intern/gen_dynlibtiff.py
source/blender/imbuf/intern/hamx.c
source/blender/imbuf/intern/iris.c
source/blender/imbuf/intern/jpeg.c
source/blender/imbuf/intern/openexr/openexr_api.cpp
source/blender/imbuf/intern/png.c
source/blender/imbuf/intern/radiance_hdr.c
source/blender/imbuf/intern/readimage.c
source/blender/imbuf/intern/targa.c
source/blender/imbuf/intern/tiff.c
source/blender/makesdna/DNA_ID.h
source/blender/makesdna/DNA_action_types.h
source/blender/makesdna/DNA_anim_types.h
source/blender/makesdna/DNA_armature_types.h
source/blender/makesdna/DNA_brush_types.h
source/blender/makesdna/DNA_color_types.h
source/blender/makesdna/DNA_gpencil_types.h
source/blender/makesdna/DNA_lamp_types.h
source/blender/makesdna/DNA_modifier_types.h
source/blender/makesdna/DNA_node_types.h
source/blender/makesdna/DNA_object_types.h
source/blender/makesdna/DNA_scene_types.h
source/blender/makesdna/DNA_screen_types.h
source/blender/makesdna/DNA_smoke_types.h
source/blender/makesdna/DNA_space_types.h
source/blender/makesdna/DNA_text_types.h
source/blender/makesdna/DNA_texture_types.h
source/blender/makesdna/DNA_userdef_types.h
source/blender/makesdna/DNA_vec_types.h
source/blender/makesdna/DNA_view3d_types.h
source/blender/makesdna/DNA_windowmanager_types.h
source/blender/makesdna/DNA_world_types.h
source/blender/makesdna/intern/SConscript
source/blender/makesdna/intern/makesdna.c
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/intern/CMakeLists.txt
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_action_api.c
source/blender/makesrna/intern/rna_animviz.c [new file with mode: 0644]
source/blender/makesrna/intern/rna_brush.c
source/blender/makesrna/intern/rna_camera.c
source/blender/makesrna/intern/rna_color.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_gpencil.c
source/blender/makesrna/intern/rna_image.c
source/blender/makesrna/intern/rna_image_api.c
source/blender/makesrna/intern/rna_internal.h
source/blender/makesrna/intern/rna_key.c
source/blender/makesrna/intern/rna_lamp.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_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_particle.c
source/blender/makesrna/intern/rna_pose.c
source/blender/makesrna/intern/rna_render.c
source/blender/makesrna/intern/rna_rna.c
source/blender/makesrna/intern/rna_scene.c
source/blender/makesrna/intern/rna_scene_api.c
source/blender/makesrna/intern/rna_sculpt_paint.c
source/blender/makesrna/intern/rna_smoke.c
source/blender/makesrna/intern/rna_space.c
source/blender/makesrna/intern/rna_text.c
source/blender/makesrna/intern/rna_texture.c
source/blender/makesrna/intern/rna_timeline.c
source/blender/makesrna/intern/rna_ui_api.c
source/blender/makesrna/intern/rna_userdef.c
source/blender/makesrna/intern/rna_vfont.c
source/blender/makesrna/intern/rna_wm.c
source/blender/makesrna/intern/rna_wm_api.c
source/blender/makesrna/intern/rna_world.c
source/blender/nodes/CMP_node.h
source/blender/nodes/intern/CMP_nodes/CMP_colorbalance.c [new file with mode: 0644]
source/blender/nodes/intern/CMP_nodes/CMP_huecorrect.c [new file with mode: 0644]
source/blender/nodes/intern/CMP_nodes/CMP_image.c
source/blender/nodes/intern/CMP_nodes/CMP_outputFile.c
source/blender/nodes/intern/CMP_nodes/CMP_rgb.c
source/blender/nodes/intern/CMP_nodes/CMP_splitViewer.c
source/blender/nodes/intern/CMP_nodes/CMP_viewer.c
source/blender/nodes/intern/SHD_nodes/SHD_rgb.c
source/blender/nodes/intern/node_util.h
source/blender/python/doc/epy/BGL.py [new file with mode: 0644]
source/blender/python/doc/epy/Geometry.py [new file with mode: 0644]
source/blender/python/doc/epy/IDProp.py [new file with mode: 0644]
source/blender/python/doc/epy/Mathutils.py [new file with mode: 0644]
source/blender/python/doc/epy/testbgl.py [new file with mode: 0644]
source/blender/python/generic/Geometry.c
source/blender/python/generic/Mathutils.c
source/blender/python/generic/Mathutils.h
source/blender/python/generic/euler.c
source/blender/python/generic/matrix.c
source/blender/python/generic/quat.c
source/blender/python/generic/vector.c
source/blender/python/intern/bpy_array.c
source/blender/python/intern/bpy_driver.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_props.c [new file with mode: 0644]
source/blender/python/intern/bpy_props.h [new file with mode: 0644]
source/blender/python/intern/bpy_rna.c
source/blender/python/intern/bpy_rna.h
source/blender/python/sphinx_doc_gen.py
source/blender/quicktime/apple/qtkit_export.m
source/blender/quicktime/apple/qtkit_import.m
source/blender/quicktime/apple/quicktime_export.c
source/blender/quicktime/apple/quicktime_import.c
source/blender/quicktime/quicktime_export.h
source/blender/render/extern/include/RE_pipeline.h
source/blender/render/extern/include/RE_shader_ext.h
source/blender/render/intern/include/rayobject.h
source/blender/render/intern/include/render_types.h
source/blender/render/intern/include/rendercore.h
source/blender/render/intern/raytrace/rayobject_vbvh.cpp
source/blender/render/intern/raytrace/reorganize.h
source/blender/render/intern/raytrace/svbvh.h
source/blender/render/intern/source/convertblender.c
source/blender/render/intern/source/envmap.c
source/blender/render/intern/source/occlusion.c
source/blender/render/intern/source/pipeline.c
source/blender/render/intern/source/rayshade.c
source/blender/render/intern/source/rendercore.c
source/blender/render/intern/source/shadeinput.c
source/blender/render/intern/source/shadeoutput.c
source/blender/render/intern/source/strand.c
source/blender/render/intern/source/texture.c
source/blender/render/intern/source/voxeldata.c
source/blender/render/intern/source/zbuf.c
source/blender/windowmanager/CMakeLists.txt
source/blender/windowmanager/SConscript
source/blender/windowmanager/WM_api.h
source/blender/windowmanager/WM_types.h
source/blender/windowmanager/intern/Makefile
source/blender/windowmanager/intern/wm.c
source/blender/windowmanager/intern/wm_cursors.c
source/blender/windowmanager/intern/wm_dragdrop.c [new file with mode: 0644]
source/blender/windowmanager/intern/wm_draw.c
source/blender/windowmanager/intern/wm_event_system.c
source/blender/windowmanager/intern/wm_files.c
source/blender/windowmanager/intern/wm_gesture.c
source/blender/windowmanager/intern/wm_init_exit.c
source/blender/windowmanager/intern/wm_keymap.c
source/blender/windowmanager/intern/wm_operators.c
source/blender/windowmanager/intern/wm_window.c
source/blender/windowmanager/wm.h
source/blender/windowmanager/wm_cursors.h
source/blender/windowmanager/wm_event_system.h
source/blender/windowmanager/wm_event_types.h
source/blenderplayer/CMakeLists.txt
source/blenderplayer/bad_level_call_stubs/stubs.c
source/creator/CMakeLists.txt
source/creator/SConscript
source/creator/creator.c
source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp
source/gameengine/Converter/BL_BlenderDataConversion.cpp
source/gameengine/GamePlayer/ghost/GPG_Application.cpp
source/gameengine/Ketsji/KX_Camera.cpp
source/gameengine/Ketsji/KX_GameObject.cpp
source/gameengine/Ketsji/KX_GameObject.h
source/gameengine/Ketsji/KX_PyConstraintBinding.cpp
source/gameengine/Ketsji/KX_PythonInit.cpp
source/gameengine/Ketsji/KX_PythonInit.h
source/gameengine/Physics/Bullet/CcdPhysicsController.cpp
source/gameengine/PyDoc/API_intro.py
source/gameengine/PyDoc/GameLogic.py
source/gameengine/PyDoc/GameTypes.py
source/gameengine/PyDoc/PhysicsConstraints.py [new file with mode: 0644]
source/gameengine/PyDoc/Rasterizer.py
source/gameengine/PyDoc/VideoTexture.py [new file with mode: 0644]
source/nan_compile.mk
source/nan_definitions.mk
source/nan_link.mk
tools/Blender.py
tools/btools.py

index de84b5f3372363b933bab623a8903c33de6b4a28..0accf960cff6559ddb28a75c77e94e7d691895ed 100644 (file)
@@ -135,15 +135,35 @@ MACRO(SETUP_LIBLINKS
     TARGET_LINK_LIBRARIES(${target} ${QUICKTIME_LIB})
   ENDIF(WITH_QUICKTIME)
   IF(WITH_OPENEXR)
-    TARGET_LINK_LIBRARIES(${target} ${OPENEXR_LIB})
+    IF(WIN32)
+      FOREACH(loop_var ${OPENEXR_LIB})
+        TARGET_LINK_LIBRARIES(${target} debug ${loop_var}_d)
+        TARGET_LINK_LIBRARIES(${target} optimized ${loop_var})
+      ENDFOREACH(loop_var)
+    ELSE(WIN32)
+      TARGET_LINK_LIBRARIES(${target} ${OPENEXR_LIB})
+    ENDIF(WIN32)
   ENDIF(WITH_OPENEXR)
   IF(WITH_FFMPEG)
     TARGET_LINK_LIBRARIES(${target} ${FFMPEG_LIB})
   ENDIF(WITH_FFMPEG)
   IF(WITH_OPENCOLLADA)
-    TARGET_LINK_LIBRARIES(${target} ${OPENCOLLADA_LIB})
-    TARGET_LINK_LIBRARIES(${target} ${PCRE_LIB})
-    TARGET_LINK_LIBRARIES(${target} ${EXPAT_LIB})
+    IF(WIN32)
+      FOREACH(loop_var ${OPENCOLLADA_LIB})
+        TARGET_LINK_LIBRARIES(${target} debug ${loop_var}_d)
+        TARGET_LINK_LIBRARIES(${target} optimized ${loop_var})
+      ENDFOREACH(loop_var)
+      TARGET_LINK_LIBRARIES(${target} debug ${PCRE_LIB}_d)
+      TARGET_LINK_LIBRARIES(${target} optimized ${PCRE_LIB})
+      IF(EXPAT_LIB)
+        TARGET_LINK_LIBRARIES(${target} debug ${EXPAT_LIB}_d)
+        TARGET_LINK_LIBRARIES(${target} optimized ${EXPAT_LIB})
+      ENDIF(EXPAT_LIB)
+    ELSE(WIN32)
+         TARGET_LINK_LIBRARIES(${target} ${OPENCOLLADA_LIB})
+      TARGET_LINK_LIBRARIES(${target} ${PCRE_LIB})
+      TARGET_LINK_LIBRARIES(${target} ${EXPAT_LIB})
+    ENDIF(WIN32)
   ENDIF(WITH_OPENCOLLADA)
   IF(WIN32)
     TARGET_LINK_LIBRARIES(${target} ${PTHREADS_LIB})
index 077b5125de93de0b53caf5c6b50aa940b66faa85..71830870d03bbdc47e960af92e85d313c465327a 100644 (file)
@@ -82,11 +82,11 @@ OPTION(WITH_INSTALL       "Install accompanying scripts and language files neede
 OPTION(WITH_OPENCOLLADA                "Enable OpenCollada Support (http://www.opencollada.org/)"      ON)
 
 # Unix defaults to OpenMP On
-IF (UNIX)
+IF(UNIX AND NOT APPLE)
        OPTION(WITH_OPENMP        "Enable OpenMP (has to be supported by the compiler)" ON)
-ELSE(UNIX)
+ELSE()
        OPTION(WITH_OPENMP        "Enable OpenMP (has to be supported by the compiler)" OFF)
-ENDIF(UNIX)
+ENDIF()
 
 IF (APPLE)
        OPTION(WITH_COCOA         "Use Cocoa framework instead of deprecated Carbon" ON)
@@ -248,7 +248,7 @@ IF(UNIX AND NOT APPLE)
        SET(PLATFORM_LINKFLAGS "-pthread")
 
        # Better warnings
-       SET(C_WARNINGS "-Wall -Wno-char-subscripts -Wpointer-arith -Wcast-align -Wdeclaration-after-statement")
+       SET(C_WARNINGS "-Wall -Wno-char-subscripts -Wpointer-arith -Wcast-align -Wdeclaration-after-statement -Wno-unknown-pragmas")
        SET(CXX_WARNINGS "-Wall -Wno-invalid-offsetof -Wno-sign-compare")
 
        INCLUDE_DIRECTORIES(${JPEG_INCLUDE_DIR} ${PNG_INCLUDE_DIR} ${ZLIB_INCLUDE_DIR} )
@@ -601,7 +601,7 @@ IF(APPLE)
        ENDIF(CMAKE_OSX_ARCHITECTURES MATCHES "i386")
 
        # Better warnings
-       SET(C_WARNINGS "-Wall -Wno-char-subscripts -Wpointer-arith -Wcast-align -Wdeclaration-after-statement")
+       SET(C_WARNINGS "-Wall -Wno-char-subscripts -Wpointer-arith -Wcast-align -Wdeclaration-after-statement -Wno-unknown-pragmas")
        SET(CXX_WARNINGS "-Wall -Wno-invalid-offsetof -Wno-sign-compare")
 
 ENDIF(APPLE)
index 8a026a0c0837a494fd92778f0c88b799b1f1da7e..c56ee99bb80757e255cb75a20ebb765b79c116d5 100644 (file)
@@ -500,7 +500,7 @@ if  env['OURPLATFORM']!='darwin':
                                        else:                                           dir = os.path.join(env['BF_INSTALLDIR'], '.blender')                            
                                        dir += os.sep + os.path.basename(scriptpath) + dp[len(scriptpath):]
                                        
-                                       source=[os.path.join(dp, f) for f in df]
+                                       source=[os.path.join(dp, f) for f in df if f[-3:]!='pyc']
                                        scriptinstall.append(env.Install(dir=dir,source=source))
 
 #-- icons
@@ -611,7 +611,11 @@ if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'win64-vc'):
                                                '${LCGDIR}/ffmpeg/lib/avformat-52.dll',
                                                '${LCGDIR}/ffmpeg/lib/avdevice-52.dll',
                                                '${LCGDIR}/ffmpeg/lib/avutil-50.dll',
-                                               '${LCGDIR}/ffmpeg/lib/swscale-0.dll']
+                                               '${LCGDIR}/ffmpeg/lib/swscale-0.dll',
+                                               '${LCGDIR}/ffmpeg/lib/libfaac-0.dll',
+                                               '${LCGDIR}/ffmpeg/lib/libfaad-2.dll',
+                                               '${LCGDIR}/ffmpeg/lib/libmp3lame-0.dll',
+                                               '${LCGDIR}/ffmpeg/lib/libx264-67.dll']
        if env['WITH_BF_JACK']:
                dllsources += ['${LCGDIR}/jack/lib/libjack.dll']
        windlls = env.Install(dir=env['BF_INSTALLDIR'], source = dllsources)
diff --git a/config/aix4-config.py b/config/aix4-config.py
new file mode 100644 (file)
index 0000000..3a3db39
--- /dev/null
@@ -0,0 +1,225 @@
+import os
+
+LCGDIR = os.getcwd()+"/../lib/aix-4.3-ppc"
+LIBDIR = LCGDIR
+print LCGDIR
+
+WITH_BF_VERSE = 'false'
+BF_VERSE_INCLUDE = "#extern/verse/dist"
+
+BF_PYTHON = LCGDIR+'/python'
+BF_PYTHON_VERSION = '3.1'
+WITH_BF_STATICPYTHON = 'true'
+BF_PYTHON_INC = '${BF_PYTHON}/include/python${BF_PYTHON_VERSION}'
+BF_PYTHON_BINARY = '${BF_PYTHON}/bin/python${BF_PYTHON_VERSION}'
+BF_PYTHON_LIB = 'python${BF_PYTHON_VERSION}' #BF_PYTHON+'/lib/python'+BF_PYTHON_VERSION+'/config/libpython'+BF_PYTHON_VERSION+'.a'
+BF_PYTHON_LINKFLAGS = ['-Xlinker', '-export-dynamic']
+BF_PYTHON_LIB_STATIC = '${BF_PYTHON}/lib/python2.5/config/libpython${BF_PYTHON_VERSION}.a'
+
+WITH_BF_OPENAL = 'false'
+WITH_BF_STATICOPENAL = 'false'
+BF_OPENAL = LCGDIR+'/openal'
+BF_OPENAL_INC = '${BF_OPENAL}/include'
+BF_OPENAL_LIB = 'openal'
+BF_OPENAL_LIB_STATIC = '${BF_OPENAL}/lib/libopenal.a'
+BF_OPENAL_LIBPATH = LIBDIR + '/lib'
+
+BF_CXX = '/usr'
+WITH_BF_STATICCXX = 'false'
+BF_CXX_LIB_STATIC = '${BF_CXX}/lib/libstdc++.a'
+
+WITH_BF_SDL = 'false'
+BF_SDL = LCGDIR+'/sdl' #$(shell sdl-config --prefix)
+BF_SDL_INC = '${BF_SDL}/include/SDL' #$(shell $(BF_SDL)/bin/sdl-config --cflags)
+BF_SDL_LIB = 'SDL audio iconv charset' #BF_SDL #$(shell $(BF_SDL)/bin/sdl-config --libs) -lSDL_mixer
+BF_SDL_LIBPATH = '${BF_SDL}/lib'
+
+WITH_BF_OPENEXR = 'false'
+WITH_BF_STATICOPENEXR = 'false'
+BF_OPENEXR = '/usr'
+# when compiling with your own openexr lib you might need to set...
+# BF_OPENEXR_INC = '${BF_OPENEXR}/include/OpenEXR ${BF_OPENEXR}/include'
+
+BF_OPENEXR_INC = '${BF_OPENEXR}/include/OpenEXR'
+BF_OPENEXR_LIB = 'Half IlmImf Iex Imath '
+BF_OPENEXR_LIB_STATIC = '${BF_OPENEXR}/lib/libHalf.a ${BF_OPENEXR}/lib/libIlmImf.a ${BF_OPENEXR}/lib/libIex.a ${BF_OPENEXR}/lib/libImath.a ${BF_OPENEXR}/lib/libIlmThread.a'
+# BF_OPENEXR_LIBPATH = '${BF_OPENEXR}/lib'
+
+
+WITH_BF_DDS = 'false'
+
+WITH_BF_JPEG = 'false'
+BF_JPEG = LCGDIR+'/jpeg'
+BF_JPEG_INC = '${BF_JPEG}/include'
+BF_JPEG_LIB = 'jpeg'
+BF_JPEG_LIBPATH = '${BF_JPEG}/lib'
+
+WITH_BF_PNG = 'false'
+BF_PNG = LCGDIR+"/png"
+BF_PNG_INC = '${BF_PNG}/include'
+BF_PNG_LIB = 'png'
+BF_PNG_LIBPATH = '${BF_PNG}/lib'
+
+BF_TIFF = '/usr/nekoware'
+BF_TIFF_INC = '${BF_TIFF}/include'
+
+WITH_BF_ZLIB = 'true'
+BF_ZLIB = LCGDIR+"/zlib"
+BF_ZLIB_INC = '${BF_ZLIB}/include'
+BF_ZLIB_LIB = 'z'
+BF_ZLIB_LIBPATH = '${BF_ZLIB}/lib'
+
+WITH_BF_INTERNATIONAL = 'false'
+
+BF_GETTEXT = LCGDIR+'/gettext'
+BF_GETTEXT_INC = '${BF_GETTEXT}/include'
+BF_GETTEXT_LIB = 'gettextpo intl'
+BF_GETTEXT_LIBPATH = '${BF_GETTEXT}/lib'
+
+WITH_BF_FTGL = 'false'
+BF_FTGL = '#extern/bFTGL'
+BF_FTGL_INC = '${BF_FTGL}/include'
+BF_FTGL_LIB = 'extern_ftgl'
+
+WITH_BF_GAMEENGINE='false'
+
+WITH_BF_ODE = 'false'
+BF_ODE = LIBDIR + '/ode'
+BF_ODE_INC = BF_ODE + '/include'
+BF_ODE_LIB = BF_ODE + '/lib/libode.a'
+
+WITH_BF_BULLET = 'true'
+BF_BULLET = '#extern/bullet2/src'
+BF_BULLET_INC = '${BF_BULLET}'
+BF_BULLET_LIB = 'extern_bullet'
+
+BF_SOLID = '#extern/solid'
+BF_SOLID_INC = '${BF_SOLID}'
+BF_SOLID_LIB = 'extern_solid'
+
+WITH_BF_YAFRAY = 'true'
+
+#WITH_BF_NSPR = 'true'
+#BF_NSPR = $(LIBDIR)/nspr
+#BF_NSPR_INC = -I$(BF_NSPR)/include -I$(BF_NSPR)/include/nspr
+#BF_NSPR_LIB = 
+
+# Uncomment the following line to use Mozilla inplace of netscape
+#CPPFLAGS += -DMOZ_NOT_NET
+# Location of MOZILLA/Netscape header files...
+#BF_MOZILLA = $(LIBDIR)/mozilla
+#BF_MOZILLA_INC = -I$(BF_MOZILLA)/include/mozilla/nspr -I$(BF_MOZILLA)/include/mozilla -I$(BF_MOZILLA)/include/mozilla/xpcom -I$(BF_MOZILLA)/include/mozilla/idl
+#BF_MOZILLA_LIB =
+# Will fall back to look in BF_MOZILLA_INC/nspr and BF_MOZILLA_LIB
+# if this is not set.
+#
+# Be paranoid regarding library creation (do not update archives)
+#BF_PARANOID = 'true'
+
+# enable freetype2 support for text objects
+BF_FREETYPE = LCGDIR+'/freetype'
+BF_FREETYPE_INC = '${BF_FREETYPE}/include ${BF_FREETYPE}/include/freetype2'
+BF_FREETYPE_LIB = 'freetype'
+BF_FREETYPE_LIBPATH = '${BF_FREETYPE}/lib'
+
+WITH_BF_QUICKTIME = 'false' # -DWITH_QUICKTIME
+BF_QUICKTIME = '/usr/local'
+BF_QUICKTIME_INC = '${BF_QUICKTIME}/include'
+
+WITH_BF_ICONV = 'false'
+BF_ICONV = LIBDIR + "/iconv"
+BF_ICONV_INC = '${BF_ICONV}/include'
+BF_ICONV_LIB = 'iconv charset'
+BF_ICONV_LIBPATH = '${BF_ICONV}/lib'
+
+WITH_BF_BINRELOC = 'false'
+
+# enable ffmpeg  support
+WITH_BF_FFMPEG = 'false'  # -DWITH_FFMPEG
+# Uncomment the following two lines to use system's ffmpeg
+BF_FFMPEG = LCGDIR+'/ffmpeg'
+BF_FFMPEG_LIB = 'avformat avcodec swscale avutil avdevice faad faac vorbis x264 ogg mp3lame z'
+BF_FFMPEG_INC = '${BF_FFMPEG}/include'
+BF_FFMPEG_LIBPATH='${BF_FFMPEG}/lib'
+
+# enable ogg, vorbis and theora in ffmpeg
+WITH_BF_OGG = 'false'  # -DWITH_OGG 
+BF_OGG = '/usr'
+BF_OGG_INC = '${BF_OGG}/include'
+BF_OGG_LIB = 'ogg vorbis theoraenc theoradec'
+
+WITH_BF_OPENJPEG = 'false' 
+BF_OPENJPEG = '#extern/libopenjpeg'
+BF_OPENJPEG_LIB = ''
+BF_OPENJPEG_INC = '${BF_OPENJPEG}'
+BF_OPENJPEG_LIBPATH='${BF_OPENJPEG}/lib'
+
+WITH_BF_REDCODE = 'false'  
+BF_REDCODE = '#extern/libredcode'
+BF_REDCODE_LIB = ''
+BF_REDCODE_INC = '${BF_REDCODE}/include'
+BF_REDCODE_LIBPATH='${BF_REDCODE}/lib'
+
+# Mesa Libs should go here if your using them as well....
+WITH_BF_STATICOPENGL = 'false'
+BF_OPENGL = '/usr'
+BF_OPENGL_INC = '${BF_OPENGL}/include'
+BF_OPENGL_LIB = 'GL GLU X11 Xi Xext'
+BF_OPENGL_LIBPATH = '/usr/X11R6/lib'
+BF_OPENGL_LIB_STATIC = '${BF_OPENGL}/libGL.a ${BF_OPENGL}/libGLU.a ${BF_OPENGL}/libXxf86vm.a ${BF_OPENGL}/libX11.a ${BF_OPENGL}/libXi.a ${BF_OPENGL}/libXext.a ${BF_OPENGL}/libXxf86vm.a'
+
+
+CC = 'gcc'
+CXX = 'g++'
+
+CCFLAGS = [ '-pipe', '-funsigned-char', '-fno-strict-aliasing' ]
+
+CPPFLAGS = [ '-DXP_UNIX', '-DWIN32', '-DFREE_WINDOWS' ]
+CXXFLAGS = ['-pipe', '-funsigned-char', '-fno-strict-aliasing' ]
+REL_CFLAGS = [ '-O2' ]
+REL_CCFLAGS = [ '-O2' ]
+C_WARN = [ '-Wall' , '-Wno-char-subscripts', '-Wdeclaration-after-statement' ]
+
+CC_WARN = [ '-Wall' ]
+
+
+
+##BF_DEPEND = 'true'
+##
+##AR = ar
+##ARFLAGS = ruv
+##ARFLAGSQUIET = ru
+##
+
+##FIX_STUBS_WARNINGS = -Wno-unused
+
+LLIBS = 'c m dl pthread dmedia movie'
+##LOPTS = --dynamic
+##DYNLDFLAGS = -shared $(LDFLAGS)
+
+BF_PROFILE_FLAGS = ['-pg','-g']
+BF_PROFILE = 'false'
+
+BF_DEBUG = 'false'
+BF_DEBUG_FLAGS = '-g'
+
+BF_BUILDDIR = '../build/aix4'
+BF_INSTALLDIR='../install/aix4'
+BF_DOCDIR='../install/doc'
+
+#Link against pthread
+LDIRS = []
+LDIRS.append(BF_FREETYPE_LIBPATH)
+LDIRS.append(BF_PNG_LIBPATH)
+LDIRS.append(BF_ZLIB_LIBPATH)
+LDIRS.append(BF_SDL_LIBPATH)
+LDIRS.append(BF_OPENAL_LIBPATH)
+LDIRS.append(BF_ICONV_LIBPATH)
+
+PLATFORM_LINKFLAGS = []
+for x in LDIRS:
+    PLATFORM_LINKFLAGS.append("-L"+x)
+    
+PLATFORM_LINKFLAGS += ['-L${LCGDIR}/jpeg/lib' , '-L/usr/lib32',  '-n32', '-v', '-no_prelink']
+print PLATFORM_LINKFLAGS
+LINKFLAGS= PLATFORM_LINKFLAGS
index a2ce9c3331ab5dcca6e58f35ddfcf5ca4dbaf380..53b75d455bf02551d3cb09dddfcc3f6e15c10b10 100644 (file)
@@ -321,7 +321,7 @@ if MAC_MIN_VERS == '10.3':
        
 if USE_SDK==True:
        SDK_FLAGS=['-isysroot', MACOSX_SDK,'-mmacosx-version-min='+MAC_MIN_VERS,'-arch',MACOSX_ARCHITECTURE]    
-       PLATFORM_LINKFLAGS = ['-mmacosx-version-min='+MAC_MIN_VERS,'-Wl','-syslibroot '+MACOSX_SDK,'-arch',MACOSX_ARCHITECTURE]+PLATFORM_LINKFLAGS
+       PLATFORM_LINKFLAGS = ['-mmacosx-version-min='+MAC_MIN_VERS,'-Wl','-isysroot',MACOSX_SDK,'-arch',MACOSX_ARCHITECTURE]+PLATFORM_LINKFLAGS
        CCFLAGS=SDK_FLAGS+CCFLAGS
        CXXFLAGS=SDK_FLAGS+CXXFLAGS
        
index ab2ef02c977c65f0be1ef1cfe576b5e6dc653294..df18e0b511f6584208f78cb0310ed40c75d597e4 100644 (file)
@@ -4,7 +4,7 @@ LCGDIR = os.getcwd()+"/../lib/irix-6.5-mips"
 LIBDIR = LCGDIR
 
 BF_PYTHON = LCGDIR+'/python'
-BF_PYTHON_VERSION = '2.5'
+BF_PYTHON_VERSION = '3.1'
 WITH_BF_STATICPYTHON = 'true'
 BF_PYTHON_INC = '${BF_PYTHON}/include/python${BF_PYTHON_VERSION}'
 BF_PYTHON_BINARY = '${BF_PYTHON}/bin/python${BF_PYTHON_VERSION}'
index 3cfa11587004915ae8e22c0464dc8b32a8cc9a6b..571d644a9c4a67824ae91f9c4ca3c26e77ccdece 100644 (file)
@@ -2,7 +2,7 @@ LCGDIR = '#../lib/windows'
 LIBDIR = '${LCGDIR}'
 
 BF_PYTHON = LIBDIR + '/python'
-BF_PYTHON_VERSION = '2.5'
+BF_PYTHON_VERSION = '3.1'
 BF_PYTHON_INC = '${BF_PYTHON}/include/python${BF_PYTHON_VERSION}'
 BF_PYTHON_BINARY = 'python'
 BF_PYTHON_LIB = 'python25'
index 353d30f50b3e90d41310ce33b1f8f4a53b604ad4..0ef9ba5d0a435d2b8b1aa7f12e8e9a7ace1fc6d5 100644 (file)
@@ -2,7 +2,7 @@ LCGDIR = '../lib/openbsd3'
 LIBDIR = '${LCGDIR}'
 
 BF_PYTHON = '/usr/local'
-BF_PYTHON_VERSION = '2.5'
+BF_PYTHON_VERSION = '3.1'
 BF_PYTHON_INC = '${BF_PYTHON}/include/python${BF_PYTHON_VERSION}'
 BF_PYTHON_BINARY = '${BF_PYTHON}/bin/python${BF_PYTHON_VERSION}'
 BF_PYTHON_LIB = 'python${BF_PYTHON_VERSION}'
index 88dce927db4f9240b1a40f8ca4b54774eb1af341..a0713735a5b5fab67ea18657c2335d7658371064 100644 (file)
@@ -2,7 +2,7 @@ LCGDIR = '../lib/sunos5'
 LIBDIR = '${LCGDIR}'
 
 BF_PYTHON = '/usr/local'
-BF_PYTHON_VERSION = '2.5'
+BF_PYTHON_VERSION = '3.1'
 BF_PYTHON_INC = '${BF_PYTHON}/include/python${BF_PYTHON_VERSION}'
 BF_PYTHON_BINARY = '${BF_PYTHON}/bin/python${BF_PYTHON_VERSION}'
 BF_PYTHON_LIB = 'python${BF_PYTHON_VERSION}' #BF_PYTHON+'/lib/python'+BF_PYTHON_VERSION+'/config/libpython'+BF_PYTHON_VERSION+'.a'
index 7159f5528295128b1470fe5ae3409841e254cfb2..5c645f82a45b13d56bab2102b401414de1e6a491 100644 (file)
@@ -412,31 +412,6 @@ void       btCollisionWorld::rayTestSingle(const btTransform& rayFromTrans,const btTra
                                        // restore
                                        collisionObject->internalSetTemporaryCollisionShape(saveCollisionShape);
                                }
-                       } else {
-                               if (collisionShape->isSoftBody()) {
-                                       btSoftBody* softBody = static_cast<btSoftBody*>(collisionObject);
-                                       btSoftBody::sRayCast softResult;
-                                       if (softBody->rayTest(rayFromTrans.getOrigin(), rayToTrans.getOrigin(), softResult)) 
-                                       {
-                                               btCollisionWorld::LocalShapeInfo shapeInfo;
-                                               shapeInfo.m_shapePart = 0;
-                                               shapeInfo.m_triangleIndex = softResult.index;
-                                               // get the normal
-                                               btVector3 normal = softBody->m_faces[softResult.index].m_normal;
-                                               btVector3 rayDir = rayToTrans.getOrigin() - rayFromTrans.getOrigin();
-                                               if (normal.dot(rayDir) > 0) {
-                                                       // normal always point toward origin of the ray
-                                                       normal = -normal;
-                                               }
-                                               btCollisionWorld::LocalRayResult rayResult
-                                                       (collisionObject,
-                                                        &shapeInfo,
-                                                        normal,
-                                                        softResult.fraction);
-                                               bool    normalInWorldSpace = true;
-                                               resultCallback.addSingleResult(rayResult,normalInWorldSpace);
-                                       }
-                               }
                        }
                }
        }
index 87f7137a55b93af990c7ad2acc5a7839c28b225b..24343938e5c93e35c76206bc05d586f5857a5476 100644 (file)
@@ -354,7 +354,7 @@ public:
 
        /// rayTest performs a raycast on all objects in the btCollisionWorld, and calls the resultCallback
        /// This allows for several queries: first hit, all hits, any hit, dependent on the value returned by the callback.
-       void    rayTest(const btVector3& rayFromWorld, const btVector3& rayToWorld, RayResultCallback& resultCallback) const; 
+       virtual void rayTest(const btVector3& rayFromWorld, const btVector3& rayToWorld, RayResultCallback& resultCallback) const; 
 
        // convexTest performs a swept convex cast on all objects in the btCollisionWorld, and calls the resultCallback
        // This allows for several queries: first hit, all hits, any hit, dependent on the value return by the callback.
index a0069b9514507983e1188d33a79845de03839689..982ec3e5eb3e59e99f372521ea9324870f21688d 100644 (file)
@@ -22,6 +22,7 @@ subject to the following restrictions:
 #include "btSoftBodyHelpers.h"
 
 
+//#define USE_BRUTEFORCE_RAYBROADPHASE 1
 
 
 
@@ -140,3 +141,140 @@ void      btSoftRigidDynamicsWorld::debugDrawWorld()
                }               
        }       
 }
+
+
+struct btSoftSingleRayCallback : public btBroadphaseRayCallback
+{
+       btVector3       m_rayFromWorld;
+       btVector3       m_rayToWorld;
+       btTransform     m_rayFromTrans;
+       btTransform     m_rayToTrans;
+       btVector3       m_hitNormal;
+
+       const btSoftRigidDynamicsWorld* m_world;
+       btCollisionWorld::RayResultCallback&    m_resultCallback;
+
+       btSoftSingleRayCallback(const btVector3& rayFromWorld,const btVector3& rayToWorld,const btSoftRigidDynamicsWorld* world,btCollisionWorld::RayResultCallback& resultCallback)
+       :m_rayFromWorld(rayFromWorld),
+       m_rayToWorld(rayToWorld),
+       m_world(world),
+       m_resultCallback(resultCallback)
+       {
+               m_rayFromTrans.setIdentity();
+               m_rayFromTrans.setOrigin(m_rayFromWorld);
+               m_rayToTrans.setIdentity();
+               m_rayToTrans.setOrigin(m_rayToWorld);
+
+               btVector3 rayDir = (rayToWorld-rayFromWorld);
+
+               rayDir.normalize ();
+               ///what about division by zero? --> just set rayDirection[i] to INF/1e30
+               m_rayDirectionInverse[0] = rayDir[0] == btScalar(0.0) ? btScalar(1e30) : btScalar(1.0) / rayDir[0];
+               m_rayDirectionInverse[1] = rayDir[1] == btScalar(0.0) ? btScalar(1e30) : btScalar(1.0) / rayDir[1];
+               m_rayDirectionInverse[2] = rayDir[2] == btScalar(0.0) ? btScalar(1e30) : btScalar(1.0) / rayDir[2];
+               m_signs[0] = m_rayDirectionInverse[0] < 0.0;
+               m_signs[1] = m_rayDirectionInverse[1] < 0.0;
+               m_signs[2] = m_rayDirectionInverse[2] < 0.0;
+
+               m_lambda_max = rayDir.dot(m_rayToWorld-m_rayFromWorld);
+
+       }
+
+       
+
+       virtual bool    process(const btBroadphaseProxy* proxy)
+       {
+               ///terminate further ray tests, once the closestHitFraction reached zero
+               if (m_resultCallback.m_closestHitFraction == btScalar(0.f))
+                       return false;
+
+               btCollisionObject*      collisionObject = (btCollisionObject*)proxy->m_clientObject;
+
+               //only perform raycast if filterMask matches
+               if(m_resultCallback.needsCollision(collisionObject->getBroadphaseHandle())) 
+               {
+                       //RigidcollisionObject* collisionObject = ctrl->GetRigidcollisionObject();
+                       //btVector3 collisionObjectAabbMin,collisionObjectAabbMax;
+#if 0
+#ifdef RECALCULATE_AABB
+                       btVector3 collisionObjectAabbMin,collisionObjectAabbMax;
+                       collisionObject->getCollisionShape()->getAabb(collisionObject->getWorldTransform(),collisionObjectAabbMin,collisionObjectAabbMax);
+#else
+                       //getBroadphase()->getAabb(collisionObject->getBroadphaseHandle(),collisionObjectAabbMin,collisionObjectAabbMax);
+                       const btVector3& collisionObjectAabbMin = collisionObject->getBroadphaseHandle()->m_aabbMin;
+                       const btVector3& collisionObjectAabbMax = collisionObject->getBroadphaseHandle()->m_aabbMax;
+#endif
+#endif
+                       //btScalar hitLambda = m_resultCallback.m_closestHitFraction;
+                       //culling already done by broadphase
+                       //if (btRayAabb(m_rayFromWorld,m_rayToWorld,collisionObjectAabbMin,collisionObjectAabbMax,hitLambda,m_hitNormal))
+                       {
+                               m_world->rayTestSingle(m_rayFromTrans,m_rayToTrans,
+                                       collisionObject,
+                                               collisionObject->getCollisionShape(),
+                                               collisionObject->getWorldTransform(),
+                                               m_resultCallback);
+                       }
+               }
+               return true;
+       }
+};
+
+void   btSoftRigidDynamicsWorld::rayTest(const btVector3& rayFromWorld, const btVector3& rayToWorld, RayResultCallback& resultCallback) const
+{
+       BT_PROFILE("rayTest");
+       /// use the broadphase to accelerate the search for objects, based on their aabb
+       /// and for each object with ray-aabb overlap, perform an exact ray test
+       btSoftSingleRayCallback rayCB(rayFromWorld,rayToWorld,this,resultCallback);
+
+#ifndef USE_BRUTEFORCE_RAYBROADPHASE
+       m_broadphasePairCache->rayTest(rayFromWorld,rayToWorld,rayCB);
+#else
+       for (int i=0;i<this->getNumCollisionObjects();i++)
+       {
+               rayCB.process(m_collisionObjects[i]->getBroadphaseHandle());
+       }       
+#endif //USE_BRUTEFORCE_RAYBROADPHASE
+
+}
+
+
+void   btSoftRigidDynamicsWorld::rayTestSingle(const btTransform& rayFromTrans,const btTransform& rayToTrans,
+                                         btCollisionObject* collisionObject,
+                                         const btCollisionShape* collisionShape,
+                                         const btTransform& colObjWorldTransform,
+                                         RayResultCallback& resultCallback)
+{
+       if (collisionShape->isSoftBody()) {
+               btSoftBody* softBody = btSoftBody::upcast(collisionObject);
+               if (softBody) {
+                       btSoftBody::sRayCast softResult;
+                       if (softBody->rayTest(rayFromTrans.getOrigin(), rayToTrans.getOrigin(), softResult)) 
+                       {
+                               if (softResult.fraction<= resultCallback.m_closestHitFraction) 
+                               {
+                                       btCollisionWorld::LocalShapeInfo shapeInfo;
+                                       shapeInfo.m_shapePart = 0;
+                                       shapeInfo.m_triangleIndex = softResult.index;
+                                       // get the normal
+                                       btVector3 normal = softBody->m_faces[softResult.index].m_normal;
+                                       btVector3 rayDir = rayToTrans.getOrigin() - rayFromTrans.getOrigin();
+                                       if (normal.dot(rayDir) > 0) {
+                                               // normal must always point toward origin of the ray
+                                               normal = -normal;
+                                       }
+                                       btCollisionWorld::LocalRayResult rayResult
+                                               (collisionObject,
+                                               &shapeInfo,
+                                               normal,
+                                               softResult.fraction);
+                                       bool    normalInWorldSpace = true;
+                                       resultCallback.addSingleResult(rayResult,normalInWorldSpace);
+                               }
+                       }
+               }
+       } 
+       else {
+               btCollisionWorld::rayTestSingle(rayFromTrans,rayToTrans,collisionObject,collisionShape,colObjWorldTransform,resultCallback);
+       }
+}
index edb848e24814310519feff320411b8a01c456ed0..14220ee75640b36c87b95c48a4a4035edbbbcc00 100644 (file)
@@ -77,6 +77,17 @@ public:
                return m_softBodies;
        }
 
+       virtual void rayTest(const btVector3& rayFromWorld, const btVector3& rayToWorld, RayResultCallback& resultCallback) const; 
+
+       /// rayTestSingle performs a raycast call and calls the resultCallback. It is used internally by rayTest.
+       /// In a future implementation, we consider moving the ray test as a virtual method in btCollisionShape.
+       /// This allows more customization.
+       static void     rayTestSingle(const btTransform& rayFromTrans,const btTransform& rayToTrans,
+                                         btCollisionObject* collisionObject,
+                                         const btCollisionShape* collisionShape,
+                                         const btTransform& colObjWorldTransform,
+                                         RayResultCallback& resultCallback);
+
 };
 
 #endif //BT_SOFT_RIGID_DYNAMICS_WORLD_H
index 0d90b0149431114571a468bc3ba7c82858036814..0b3e86eda56fb7c4ad91bd0b9eec383626cd3b3c 100644 (file)
@@ -270,6 +270,20 @@ AUD_OpenALDevice::AUD_OpenALDevice(AUD_DeviceSpecs specs, int buffersize)
        specs.channels = AUD_CHANNELS_STEREO;
        specs.format = AUD_FORMAT_S16;
 
+#if 0
+       if(alcIsExtensionPresent(NULL, "ALC_ENUMERATION_EXT") == AL_TRUE)
+       {
+               ALCchar* devices = const_cast<ALCchar*>(alcGetString(NULL, ALC_DEVICE_SPECIFIER));
+               printf("OpenAL devices (standard is: %s):\n", alcGetString(NULL, ALC_DEFAULT_DEVICE_SPECIFIER));
+
+               while(*devices)
+               {
+                       printf("%s\n", devices);
+                       devices += strlen(devices) + 1;
+               }
+       }
+#endif
+
        m_device = alcOpenDevice(NULL);
 
        if(!m_device)
index ac3f8ca71a01caa030c8ba45197cd13c11aec8a1..bbd2442c480b5339ca0be0ac2cdf20a7e04487b5 100644 (file)
@@ -36,4 +36,7 @@ if env['WITH_BF_FFTW3']:
        incs += ' fftw ' + env['BF_FFTW3_INC']
        defs.append('WITH_FFTW3')
 
+if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc'):
+    incs += ' ' + env['BF_PTHREADS_INC']
+
 env.BlenderLib ('bf_audaspace', sources, Split(incs), defs, libtype=['intern','player'], priority = [25,215] )
index 37ac98c0cf272cb17b7e4f53169c116da09e3d53..bdf14255391fae2954166052a544ef0bf713d29f 100644 (file)
                                >\r
                        </File>\r
                        <File\r
-                               RelativePath="..\..\intern\AUD_FloatMixer.cpp"\r
+                               RelativePath="..\..\intern\AUD_I3DDevice.h"\r
                                >\r
                        </File>\r
                        <File\r
-                               RelativePath="..\..\intern\AUD_FloatMixer.h"\r
+                               RelativePath="..\..\intern\AUD_IDevice.h"\r
                                >\r
                        </File>\r
                        <File\r
-                               RelativePath="..\..\intern\AUD_I3DDevice.h"\r
+                               RelativePath="..\..\intern\AUD_IFactory.h"\r
                                >\r
                        </File>\r
                        <File\r
-                               RelativePath="..\..\intern\AUD_IDevice.h"\r
+                               RelativePath="..\..\intern\AUD_IReader.h"\r
                                >\r
                        </File>\r
                        <File\r
-                               RelativePath="..\..\intern\AUD_IFactory.h"\r
+                               RelativePath="..\..\intern\AUD_LinearResampleFactory.cpp"\r
                                >\r
                        </File>\r
                        <File\r
-                               RelativePath="..\..\intern\AUD_IMixer.h"\r
+                               RelativePath="..\..\intern\AUD_LinearResampleFactory.h"\r
                                >\r
                        </File>\r
                        <File\r
-                               RelativePath="..\..\intern\AUD_IReader.h"\r
+                               RelativePath="..\..\intern\AUD_LinearResampleReader.cpp"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\intern\AUD_LinearResampleReader.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\intern\AUD_Mixer.cpp"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\intern\AUD_Mixer.h"\r
                                >\r
                        </File>\r
                        <File\r
                <Filter\r
                        Name="FX"\r
                        >\r
+                       <File\r
+                               RelativePath="..\..\FX\AUD_AccumulatorFactory.cpp"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\FX\AUD_AccumulatorFactory.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\FX\AUD_AccumulatorReader.cpp"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\FX\AUD_AccumulatorReader.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\FX\AUD_ButterworthFactory.cpp"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\FX\AUD_ButterworthFactory.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\FX\AUD_ButterworthReader.cpp"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\FX\AUD_ButterworthReader.h"\r
+                               >\r
+                       </File>\r
                        <File\r
                                RelativePath="..\..\FX\AUD_DelayFactory.cpp"\r
                                >\r
                                RelativePath="..\..\FX\AUD_EffectReader.h"\r
                                >\r
                        </File>\r
+                       <File\r
+                               RelativePath="..\..\FX\AUD_EnvelopeFactory.cpp"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\FX\AUD_EnvelopeFactory.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\FX\AUD_EnvelopeReader.cpp"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\FX\AUD_EnvelopeReader.h"\r
+                               >\r
+                       </File>\r
                        <File\r
                                RelativePath="..\..\FX\AUD_FaderFactory.cpp"\r
                                >\r
                                RelativePath="..\..\FX\AUD_FaderReader.h"\r
                                >\r
                        </File>\r
+                       <File\r
+                               RelativePath="..\..\FX\AUD_HighpassFactory.cpp"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\FX\AUD_HighpassFactory.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\FX\AUD_HighpassReader.cpp"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\FX\AUD_HighpassReader.h"\r
+                               >\r
+                       </File>\r
                        <File\r
                                RelativePath="..\..\FX\AUD_LimiterFactory.cpp"\r
                                >\r
                                RelativePath="..\..\FX\AUD_LoopReader.h"\r
                                >\r
                        </File>\r
+                       <File\r
+                               RelativePath="..\..\FX\AUD_LowpassFactory.cpp"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\FX\AUD_LowpassFactory.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\FX\AUD_LowpassReader.cpp"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\FX\AUD_LowpassReader.h"\r
+                               >\r
+                       </File>\r
                        <File\r
                                RelativePath="..\..\FX\AUD_PingPongFactory.cpp"\r
                                >\r
                                >\r
                        </File>\r
                        <File\r
-                               RelativePath="..\..\FX\AUD_VolumeFactory.cpp"\r
+                               RelativePath="..\..\FX\AUD_SquareFactory.cpp"\r
                                >\r
                        </File>\r
                        <File\r
-                               RelativePath="..\..\FX\AUD_VolumeFactory.h"\r
+                               RelativePath="..\..\FX\AUD_SquareFactory.h"\r
                                >\r
                        </File>\r
                        <File\r
-                               RelativePath="..\..\FX\AUD_VolumeReader.cpp"\r
+                               RelativePath="..\..\FX\AUD_SquareReader.cpp"\r
                                >\r
                        </File>\r
                        <File\r
-                               RelativePath="..\..\FX\AUD_VolumeReader.h"\r
+                               RelativePath="..\..\FX\AUD_SquareReader.h"\r
                                >\r
                        </File>\r
-               </Filter>\r
-               <Filter\r
-                       Name="OpenAL"\r
-                       >\r
                        <File\r
-                               RelativePath="..\..\OpenAL\AUD_OpenALDevice.cpp"\r
+                               RelativePath="..\..\FX\AUD_SumFactory.cpp"\r
                                >\r
                        </File>\r
                        <File\r
-                               RelativePath="..\..\OpenAL\AUD_OpenALDevice.h"\r
+                               RelativePath="..\..\FX\AUD_SumFactory.h"\r
                                >\r
                        </File>\r
-               </Filter>\r
-               <Filter\r
-                       Name="SDL"\r
-                       >\r
                        <File\r
-                               RelativePath="..\..\SDL\AUD_SDLDevice.cpp"\r
+                               RelativePath="..\..\FX\AUD_SumReader.cpp"\r
                                >\r
                        </File>\r
                        <File\r
-                               RelativePath="..\..\SDL\AUD_SDLDevice.h"\r
+                               RelativePath="..\..\FX\AUD_SumReader.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\FX\AUD_VolumeFactory.cpp"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\FX\AUD_VolumeFactory.h"\r
                                >\r
                        </File>\r
                        <File\r
-                               RelativePath="..\..\SDL\AUD_SDLMixer.cpp"\r
+                               RelativePath="..\..\FX\AUD_VolumeReader.cpp"\r
                                >\r
                        </File>\r
                        <File\r
-                               RelativePath="..\..\SDL\AUD_SDLMixer.h"\r
+                               RelativePath="..\..\FX\AUD_VolumeReader.h"\r
                                >\r
                        </File>\r
+               </Filter>\r
+               <Filter\r
+                       Name="OpenAL"\r
+                       >\r
                        <File\r
-                               RelativePath="..\..\SDL\AUD_SDLMixerFactory.cpp"\r
+                               RelativePath="..\..\OpenAL\AUD_OpenALDevice.cpp"\r
                                >\r
                        </File>\r
                        <File\r
-                               RelativePath="..\..\SDL\AUD_SDLMixerFactory.h"\r
+                               RelativePath="..\..\OpenAL\AUD_OpenALDevice.h"\r
                                >\r
                        </File>\r
+               </Filter>\r
+               <Filter\r
+                       Name="SDL"\r
+                       >\r
                        <File\r
-                               RelativePath="..\..\SDL\AUD_SDLMixerReader.cpp"\r
+                               RelativePath="..\..\SDL\AUD_SDLDevice.cpp"\r
                                >\r
                        </File>\r
                        <File\r
-                               RelativePath="..\..\SDL\AUD_SDLMixerReader.h"\r
+                               RelativePath="..\..\SDL\AUD_SDLDevice.h"\r
                                >\r
                        </File>\r
                </Filter>\r
index ca7795b3cf5edea6b29dfa9caab4fd1e6accf674..8f14cb597e4f8d08ba6db5ae4ac47e9325418e0a 100644 (file)
@@ -33,6 +33,9 @@
 #include "MT_Plane3.h"
 #include "BSP_CSGException.h"
 
+// for insert_iterator
+#include <iterator>
+
 // for vector reverse
 #include <iostream>
 #include <algorithm>
index 64ecafc2fc08903b2e084a241b1cababf083a919..1fbc8db528690d375332bae0a4c39c8f05f18ff5 100644 (file)
@@ -83,7 +83,7 @@ public :
        DestroyEdges(
        );
 
-       // return a new seperate copy of the 
+       // return a new separate copy of the 
        // mesh allocated on the heap.
 
                BSP_CSGMesh *
index 77afcc929aa53cee2485324f92b1d098e76c8aa8..bf57da23c69d36eb9e46e8d5ddcaa21d5442ca16 100644 (file)
@@ -24,7 +24,7 @@
 #
 # ***** END GPL LICENSE BLOCK *****
 
-SET(INC . ../string)
+SET(INC . ../string ../../extern/glew/include)
 
 FILE(GLOB SRC intern/*.cpp intern/*.mm)
 
index d4788ae9e86eef27d64d2342db9f347cb5f9a14a..7e7b24721eba8969324644a5c91d6f1e56f20201 100644 (file)
@@ -162,6 +162,8 @@ extern void GHOST_GetMainDisplayDimensions(GHOST_SystemHandle systemhandle,
  * @param      height  The height the window.
  * @param      state   The state of the window when opened.
  * @param      type    The type of drawing context installed in this window.
+ * @param stereoVisual         Stereo visual for quad buffered stereo.
+ * @param numOfAASamples       Number of samples used for AA (zero if no AA)
  * @return     A handle to the new window ( == NULL if creation failed).
  */
 extern GHOST_WindowHandle GHOST_CreateWindow(GHOST_SystemHandle systemhandle,
@@ -172,7 +174,8 @@ extern GHOST_WindowHandle GHOST_CreateWindow(GHOST_SystemHandle systemhandle,
        GHOST_TUns32 height,
        GHOST_TWindowState state,
        GHOST_TDrawingContextType type,
-       const int stereoVisual);
+       const int stereoVisual,
+       const GHOST_TUns16 numOfAASamples);
 
 /**
  * Returns the window user data.
index 305caa70ae4a5991814a6145e5af5c3b3b5407b9..d1449aaef5903a699b1f3f61ab41d84aef4bbddb 100644 (file)
@@ -216,14 +216,15 @@ public:
         * Create a new window.
         * The new window is added to the list of windows managed. 
         * Never explicitly delete the window, use disposeWindow() instead.
-        * @param       title   The name of the window (displayed in the title bar of the window if the OS supports it).
-        * @param       left            The coordinate of the left edge of the window.
-        * @param       top             The coordinate of the top edge of the window.
-        * @param       width           The width the window.
-        * @param       height          The height the window.
-        * @param       state           The state of the window when opened.
-        * @param       type            The type of drawing context installed in this window.
+        * @param       title                   The name of the window (displayed in the title bar of the window if the OS supports it).
+        * @param       left                    The coordinate of the left edge of the window.
+        * @param       top                             The coordinate of the top edge of the window.
+        * @param       width                   The width the window.
+        * @param       height                  The height the window.
+        * @param       state                   The state of the window when opened.
+        * @param       type                    The type of drawing context installed in this window.
         * @param       stereoVisual    Create a stereo visual for quad buffered stereo.
+        * @param       numOfAASamples  Number of samples used for AA (zero if no AA)
         * @param       parentWindow    Parent (embedder) window
         * @return      The new window (or 0 if creation failed).
         */
@@ -231,7 +232,8 @@ public:
                const STR_String& title,
                GHOST_TInt32 left, GHOST_TInt32 top, GHOST_TUns32 width, GHOST_TUns32 height,
                GHOST_TWindowState state, GHOST_TDrawingContextType type,
-               const bool stereoVisual,
+               const bool stereoVisual = false,
+               const GHOST_TUns16 numOfAASamples = 0,
                const GHOST_TEmbedderWindowID parentWindow = 0) = 0;
 
        /**
index 5d1e0a67e7ee5002ec4d222bfd6588b44c450314..2bb446c229cecd1df8317fdefcb36186d91c260e 100644 (file)
@@ -72,6 +72,12 @@ public:
         */
        virtual bool getValid() const = 0;
 
+       /**
+        * Returns the associated OS object/handle
+        * @return The associated OS object/handle
+        */
+       virtual void* getOSWindow() const = 0;
+
        /**
         * Returns the type of drawing context used in this window.
         * @return The current type of drawing context.
index 5c888e218d84287ffc0a08856ea59b3a2a049596..9bb8def00d0635ccf68a228e67dfe817f65532d0 100644 (file)
@@ -151,6 +151,7 @@ typedef enum {
        GHOST_kEventButtonDown,         /// Mouse button event
        GHOST_kEventButtonUp,           /// Mouse button event
        GHOST_kEventWheel,                      /// Mouse wheel event
+       GHOST_kEventTrackpad,           /// Trackpad event
 
        GHOST_kEventNDOFMotion,         /// N degree of freedom device motion event
        GHOST_kEventNDOFButton,         /// N degree of freedom device button event
@@ -203,6 +204,7 @@ typedef enum {
        GHOST_kStandardCursorTopRightCorner,
        GHOST_kStandardCursorBottomRightCorner,
        GHOST_kStandardCursorBottomLeftCorner,
+       GHOST_kStandardCursorCopy,
        GHOST_kStandardCursorCustom, 
        GHOST_kStandardCursorNumCursors, 
        GHOST_kStandardCursorPencil
@@ -373,6 +375,28 @@ typedef struct {
        GHOST_TInt32 z; 
 } GHOST_TEventWheelData;
 
+typedef enum {
+       GHOST_kTrackpadEventUnknown =0,
+       GHOST_kTrackpadEventScroll,
+       GHOST_kTrackpadEventRotate,
+       GHOST_kTrackpadEventSwipe, /* Reserved, not used for now */
+       GHOST_kTrackpadEventMagnify
+} GHOST_TTrackpadEventSubTypes;
+       
+
+typedef struct {
+       /** The event subtype */
+       GHOST_TTrackpadEventSubTypes subtype;
+       /** The x-location of the trackpad event */
+       GHOST_TInt32 x;
+       /** The y-location of the trackpad event */
+       GHOST_TInt32 y;
+       /** The x-delta or value of the trackpad event */
+       GHOST_TInt32 deltaX;
+       /** The y-delta (currently only for scroll subtype) of the trackpad event */
+       GHOST_TInt32 deltaY;
+} GHOST_TEventTrackpadData;
+
 
 typedef enum {
        GHOST_kDragnDropTypeUnknown =0,
index 2a06a9d3c9e6f97df61ee1c7aa9c94785882e555..6713ded0afa85b295596e44c3041bcfd98a40f78 100644 (file)
@@ -14,7 +14,7 @@ if window_system == 'darwin':
 pf = ['GHOST_DisplayManager', 'GHOST_System', 'GHOST_Window', 'GHOST_DropTarget']
 defs=['_USE_MATH_DEFINES']
 
-if window_system in ('linux2', 'openbsd3', 'sunos5', 'freebsd6', 'irix6'):
+if window_system in ('linux2', 'openbsd3', 'sunos5', 'freebsd6', 'irix6', 'aix4', 'aix5'):
        for f in pf:
                try:
                        sources.remove('intern' + os.sep + f + 'Win32.cpp')
@@ -57,7 +57,7 @@ else:
 if env['BF_GHOST_DEBUG']:
        defs.append('BF_GHOST_DEBUG')
        
-incs = '. ../string ' + env['BF_OPENGL_INC']
+incs = '. ../string #extern/glew/include ' + 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=defs, libtype=['intern','player'], priority = [40,15] ) 
index 556176809f459ebc03daa9f4a139b50ae1026541..be726282d80ffe7635ac8fca7dd65ff7003b1bd7 100644 (file)
@@ -140,7 +140,8 @@ GHOST_WindowHandle GHOST_CreateWindow(GHOST_SystemHandle systemhandle,
                                                                          GHOST_TUns32 height,
                                                                          GHOST_TWindowState state,
                                                                          GHOST_TDrawingContextType type,
-                                                                         const int stereoVisual)
+                                                                         const int stereoVisual,
+                                                                         const GHOST_TUns16 numOfAASamples)
 {
        GHOST_ISystem* system = (GHOST_ISystem*) systemhandle;
        bool bstereoVisual;
@@ -151,7 +152,7 @@ GHOST_WindowHandle GHOST_CreateWindow(GHOST_SystemHandle systemhandle,
                bstereoVisual = false;
 
        return (GHOST_WindowHandle) system->createWindow(title, left, top, width, height,
-               state, type, bstereoVisual);
+               state, type, bstereoVisual, numOfAASamples);
 }
 
 GHOST_TUserDataPtr GHOST_GetWindowUserData(GHOST_WindowHandle windowhandle)
diff --git a/intern/ghost/intern/GHOST_EventTrackpad.h b/intern/ghost/intern/GHOST_EventTrackpad.h
new file mode 100644 (file)
index 0000000..c2332d8
--- /dev/null
@@ -0,0 +1,71 @@
+/**
+ * $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) 2001-2002 by NaN Holding BV.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s):  James Deery                11/2009
+ *                                     Damien Plisson  12/2009
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+/**
+ * @file       GHOST_EventTrackpad.h
+ * Declaration of GHOST_EventTrackpad class.
+ */
+
+#ifndef _GHOST_EVENT_TRACKPAD_H_
+#define _GHOST_EVENT_TRACKPAD_H_
+
+#include "GHOST_Event.h"
+
+/**
+ * Trackpad (scroll, magnify, rotate, ...) event.
+ */
+class GHOST_EventTrackpad : public GHOST_Event
+{
+public:
+       /**
+        * Constructor.
+        * @param msec          The time this event was generated.
+        * @param type          The type of this event.
+        * @param subtype       The subtype of the event.
+        * @param x                     The x-delta of the pan event.
+        * @param y                     The y-delta of the pan event.
+        */
+       GHOST_EventTrackpad(GHOST_TUns64 msec, GHOST_IWindow* window, GHOST_TTrackpadEventSubTypes subtype, GHOST_TInt32 x, GHOST_TInt32 y, GHOST_TInt32 deltaX, GHOST_TInt32 deltaY)
+               : GHOST_Event(msec, GHOST_kEventTrackpad, window)
+       {
+               m_trackpadEventData.subtype = subtype;
+               m_trackpadEventData.x = x;
+               m_trackpadEventData.y = y;
+               m_trackpadEventData.deltaX = deltaX;
+               m_trackpadEventData.deltaY = deltaY;
+               m_data = &m_trackpadEventData;
+       }
+
+protected:
+       /** The mouse pan data */
+       GHOST_TEventTrackpadData m_trackpadEventData;
+};
+
+
+#endif // _GHOST_EVENT_PAN_H_
+
index 57d6f6c06cc4e01dc53377ab251424cb07e68d73..3813a5ee450e6aea927a6c6d53e41f52e45fc1cf 100644 (file)
@@ -402,6 +402,7 @@ GHOST_IWindow* GHOST_SystemCarbon::createWindow(
        GHOST_TWindowState state,
        GHOST_TDrawingContextType type,
        bool stereoVisual,
+       const GHOST_TUns16 numOfAASamples,
        const GHOST_TEmbedderWindowID parentWindow
 )
 {
index 5b3b786a5aca5c44349bedd8791a9292ab024ade..7ebbbd8e97b45c6e7e676cea93f903d2c1281820 100644 (file)
@@ -115,6 +115,7 @@ public:
                GHOST_TWindowState state,
                GHOST_TDrawingContextType type,
                const bool stereoVisual,
+               const GHOST_TUns16 numOfAASamples = 0,
                const GHOST_TEmbedderWindowID parentWindow = 0 
        );
        
index 81eb8978588890b23ad9a664604e03b3e47392fa..47a1acdb473b7527b10dfd299e3eecb8d215ca21 100644 (file)
@@ -93,13 +93,15 @@ public:
         * Create a new window.
         * The new window is added to the list of windows managed. 
         * Never explicitly delete the window, use disposeWindow() instead.
-        * @param       title   The name of the window (displayed in the title bar of the window if the OS supports it).
-        * @param       left    The coordinate of the left edge of the window.
-        * @param       top             The coordinate of the top edge of the window.
-        * @param       width   The width the window.
-        * @param       height  The height the window.
-        * @param       state   The state of the window when opened.
-        * @param       type    The type of drawing context installed in this window.
+        * @param       title                   The name of the window (displayed in the title bar of the window if the OS supports it).
+        * @param       left                    The coordinate of the left edge of the window.
+        * @param       top                             The coordinate of the top edge of the window.
+        * @param       width                   The width the window.
+        * @param       height                  The height the window.
+        * @param       state                   The state of the window when opened.
+        * @param       type                    The type of drawing context installed in this window.
+        * @param       stereoVisual    Stereo visual for quad buffered stereo.
+        * @param       numOfAASamples  Number of samples used for AA (zero if no AA)
         * @param       parentWindow    Parent (embedder) window
         * @return      The new window (or 0 if creation failed).
         */
@@ -111,7 +113,8 @@ public:
                GHOST_TUns32 height,
                GHOST_TWindowState state,
                GHOST_TDrawingContextType type,
-               const bool stereoVisual,
+               const bool stereoVisual = false,
+               const GHOST_TUns16 numOfAASamples = 0,
                const GHOST_TEmbedderWindowID parentWindow = 0 
        );
        
@@ -261,6 +264,9 @@ protected:
        /** Event has been processed directly by Cocoa and has sent a ghost event to be dispatched */
        bool m_outsideLoopEventProcessed;
        
+       /** Raised window is not yet known by the window manager, so delay application become active event handling */
+       bool m_needDelayedApplicationBecomeActiveEventProcessing;
+       
        /** Mouse buttons state */
        GHOST_TUns32 m_pressedMouseButtons;
        
@@ -274,6 +280,12 @@ protected:
         * Needed because cocoa event delta cursor move takes setCursorPosition changes too.
         */
        GHOST_TInt32 m_cursorDelta_x, m_cursorDelta_y;
+       
+       /** Multitouch trackpad availability */
+       bool m_hasMultiTouchTrackpad;
+       
+       /** Multitouch gesture in progress, useful to distinguish trackpad from mouse scroll events */
+       bool m_isGestureInProgress;
 };
 
 #endif // _GHOST_SYSTEM_COCOA_H_
index e9d34534fcfc69819709e9996b91a66ef0e00387..23f95f95df44d68ac1802763f366909f092d7859 100644 (file)
@@ -41,6 +41,7 @@
 #include "GHOST_EventCursor.h"
 #include "GHOST_EventWheel.h"
 #include "GHOST_EventNDOF.h"
+#include "GHOST_EventTrackpad.h"
 #include "GHOST_EventDragnDrop.h"
 
 #include "GHOST_TimerManager.h"
@@ -376,6 +377,24 @@ static GHOST_TKey convertKey(int rawCode, unichar recvChar)
 
 #pragma mark defines for 10.6 api not documented in 10.5
 #ifndef MAC_OS_X_VERSION_10_6
+enum {
+       /* The following event types are available on some hardware on 10.5.2 and later */
+       NSEventTypeGesture          = 29,
+       NSEventTypeMagnify          = 30,
+       NSEventTypeSwipe            = 31,
+       NSEventTypeRotate           = 18,
+       NSEventTypeBeginGesture     = 19,
+       NSEventTypeEndGesture       = 20
+};
+
+@interface NSEvent(GestureEvents)
+/* This message is valid for events of type NSEventTypeMagnify, on 10.5.2 or later */
+#if MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4
+- (float)magnification;       // change in magnification.
+#else
+- (CGFloat)magnification;       // change in magnification.
+#endif
+@end 
 
 @interface NSEvent(SnowLeopardEvents)
 /* modifier keys currently down.  This returns the state of devices combined
@@ -490,20 +509,23 @@ int cocoa_request_qtcodec_settings(bContext *C, wmOperator *op)
 
 GHOST_SystemCocoa::GHOST_SystemCocoa()
 {
+       int mib[2];
+       struct timeval boottime;
+       size_t len;
+       char *rstring = NULL;
+       
        m_modifierMask =0;
        m_pressedMouseButtons =0;
+       m_isGestureInProgress = false;
        m_cursorDelta_x=0;
        m_cursorDelta_y=0;
        m_outsideLoopEventProcessed = false;
+       m_needDelayedApplicationBecomeActiveEventProcessing = false;
        m_displayManager = new GHOST_DisplayManagerCocoa ();
        GHOST_ASSERT(m_displayManager, "GHOST_SystemCocoa::GHOST_SystemCocoa(): m_displayManager==0\n");
        m_displayManager->initialize();
 
        //NSEvent timeStamp is given in system uptime, state start date is boot time
-       int mib[2];
-       struct timeval boottime;
-       size_t len;
-       
        mib[0] = CTL_KERN;
        mib[1] = KERN_BOOTTIME;
        len = sizeof(struct timeval);
@@ -511,6 +533,22 @@ GHOST_SystemCocoa::GHOST_SystemCocoa()
        sysctl(mib, 2, &boottime, &len, NULL, 0);
        m_start_time = ((boottime.tv_sec*1000)+(boottime.tv_usec/1000));
        
+       //Detect multitouch trackpad
+       mib[0] = CTL_HW;
+       mib[1] = HW_MODEL;
+       sysctl( mib, 2, NULL, &len, NULL, 0 );
+       rstring = (char*)malloc( len );
+       sysctl( mib, 2, rstring, &len, NULL, 0 );
+       
+       //Hack on MacBook revision, as multitouch avail. function missing
+       if (strstr(rstring,"MacBookAir") ||
+               (strstr(rstring,"MacBook") && (rstring[strlen(rstring)-3]>='5') && (rstring[strlen(rstring)-3]<='9')))
+               m_hasMultiTouchTrackpad = true;
+       else m_hasMultiTouchTrackpad = false;
+       
+       free( rstring );
+       rstring = NULL;
+       
        m_ignoreWindowSizedMessages = false;
 }
 
@@ -596,7 +634,7 @@ GHOST_TSuccess GHOST_SystemCocoa::init()
                }
                
                [NSApp finishLaunching];
-                               
+               
                [pool drain];
     }
     return success;
@@ -657,6 +695,7 @@ GHOST_IWindow* GHOST_SystemCocoa::createWindow(
        GHOST_TWindowState state,
        GHOST_TDrawingContextType type,
        bool stereoVisual,
+       const GHOST_TUns16 numOfAASamples,
        const GHOST_TEmbedderWindowID parentWindow
 )
 {
@@ -672,7 +711,7 @@ GHOST_IWindow* GHOST_SystemCocoa::createWindow(
        left = left > contentRect.origin.x ? left : contentRect.origin.x;
        top = top > contentRect.origin.y ? top : contentRect.origin.y;
        
-       window = new GHOST_WindowCocoa (this, title, left, top, width, height, state, type);
+       window = new GHOST_WindowCocoa (this, title, left, top, width, height, state, type, stereoVisual, numOfAASamples);
 
     if (window) {
         if (window->getValid()) {
@@ -845,7 +884,11 @@ bool GHOST_SystemCocoa::processEvents(bool waitForEvent)
                                case NSScrollWheel:
                                case NSOtherMouseDown:
                                case NSOtherMouseUp:
-                               case NSOtherMouseDragged:                               
+                               case NSOtherMouseDragged:
+                               case NSEventTypeMagnify:
+                               case NSEventTypeRotate:
+                               case NSEventTypeBeginGesture:
+                               case NSEventTypeEndGesture:
                                        handleMouseEvent(event);
                                        break;
                                        
@@ -854,13 +897,9 @@ bool GHOST_SystemCocoa::processEvents(bool waitForEvent)
                                        handleTabletEvent(event,[event type]);
                                        break;
                                        
-                                       /* Trackpad features, will need OS X 10.6 for implementation
+                                       /* Trackpad features, fired only from OS X 10.5.2
                                         case NSEventTypeGesture:
-                                        case NSEventTypeMagnify:
                                         case NSEventTypeSwipe:
-                                        case NSEventTypeRotate:
-                                        case NSEventTypeBeginGesture:
-                                        case NSEventTypeEndGesture:
                                         break; */
                                        
                                        /*Unused events
@@ -881,6 +920,8 @@ bool GHOST_SystemCocoa::processEvents(bool waitForEvent)
                } while (event!= nil);          
        //} while (waitForEvent && !anyProcessed); Needed only for timer implementation
        
+       if (m_needDelayedApplicationBecomeActiveEventProcessing) handleApplicationBecomeActiveEvent();
+       
        if (m_outsideLoopEventProcessed) {
                m_outsideLoopEventProcessed = false;
                return true;
@@ -896,6 +937,12 @@ GHOST_TSuccess GHOST_SystemCocoa::handleApplicationBecomeActiveEvent()
        //(that is when update events are sent to another application)
        unsigned int modifiers;
        GHOST_IWindow* window = m_windowManager->getActiveWindow();
+       
+       if (!window) {
+               m_needDelayedApplicationBecomeActiveEventProcessing = true;
+               return GHOST_kFailure;
+       }
+       else m_needDelayedApplicationBecomeActiveEventProcessing = false;
 
 #ifdef MAC_OS_X_VERSION_10_6
        modifiers = [NSEvent modifierFlags];
@@ -910,6 +957,9 @@ GHOST_TSuccess GHOST_SystemCocoa::handleApplicationBecomeActiveEvent()
        }
 #endif
        
+       /* Discard erroneous 10.6 modifiers values reported when switching back from spaces */
+       if ((modifiers & NSDeviceIndependentModifierFlagsMask) == 0xb00000) modifiers = 0;
+       
        if ((modifiers & NSShiftKeyMask) != (m_modifierMask & NSShiftKeyMask)) {
                pushEvent( new GHOST_EventKey(getMilliSeconds(), (modifiers & NSShiftKeyMask)?GHOST_kEventKeyDown:GHOST_kEventKeyUp, window, GHOST_kKeyLeftShift) );
        }
@@ -925,6 +975,7 @@ GHOST_TSuccess GHOST_SystemCocoa::handleApplicationBecomeActiveEvent()
        
        m_modifierMask = modifiers;
        
+       m_outsideLoopEventProcessed = true;
        return GHOST_kSuccess;
 }
 
@@ -951,6 +1002,9 @@ GHOST_TSuccess GHOST_SystemCocoa::handleWindowEvent(GHOST_TEventType eventType,
                        case GHOST_kEventWindowUpdate:
                                pushEvent( new GHOST_Event(getMilliSeconds(), GHOST_kEventWindowUpdate, window) );
                                break;
+                       case GHOST_kEventWindowMove:
+                               pushEvent( new GHOST_Event(getMilliSeconds(), GHOST_kEventWindowMove, window) );
+                               break;
                        case GHOST_kEventWindowSize:
                                if (!m_ignoreWindowSizedMessages)
                                {
@@ -1132,7 +1186,15 @@ GHOST_TSuccess GHOST_SystemCocoa::handleTabletEvent(void *eventPtr, short eventT
        NSEvent *event = (NSEvent *)eventPtr;
        GHOST_IWindow* window = m_windowManager->getActiveWindow();
        
-       if (!window) return GHOST_kFailure;
+       if (!window) {
+               /* If no active window found, still tries to find the window associated with the event
+                This may happen when Cocoa continues to send some events after the window deactivate one */
+               window = m_windowManager->getWindowAssociatedWithOSWindow((void*)[event window]);
+               if (!window) {
+                       //printf("\nW failure for event 0x%x",[event type]);
+                       return GHOST_kFailure;
+               }
+       }
        
        GHOST_TabletData& ct=((GHOST_WindowCocoa*)window)->GetCocoaTabletData();
        
@@ -1184,7 +1246,13 @@ GHOST_TSuccess GHOST_SystemCocoa::handleMouseEvent(void *eventPtr)
     GHOST_Window* window = (GHOST_Window*)m_windowManager->getActiveWindow();
        
        if (!window) {
-               return GHOST_kFailure;
+               /* If no active window found, still tries to find the window associated with the event
+                This may happen when Cocoa continues to send some events after the window deactivate one */
+               window = (GHOST_Window*)m_windowManager->getWindowAssociatedWithOSWindow((void*)[event window]);
+               if (!window) {
+                       //printf("\nW failure for event 0x%x",[event type]);
+                       return GHOST_kFailure;
+               }
        }
        
        switch ([event type])
@@ -1315,16 +1383,59 @@ GHOST_TSuccess GHOST_SystemCocoa::handleMouseEvent(void *eventPtr)
                        
                case NSScrollWheel:
                        {
-                               GHOST_TInt32 delta;
-                               
-                               double deltaF = [event deltaY];
-                               if (deltaF == 0.0) break; //discard trackpad delta=0 events
-                               
-                               delta = deltaF > 0.0 ? 1 : -1;
-                               pushEvent(new GHOST_EventWheel([event timestamp]*1000, window, delta));
+                               /* Send trackpad event if inside a trackpad gesture, send wheel event otherwise */
+                               if (!m_hasMultiTouchTrackpad || !m_isGestureInProgress) {
+                                       GHOST_TInt32 delta;
+                                       
+                                       double deltaF = [event deltaY];
+                                       if (deltaF == 0.0) break; //discard trackpad delta=0 events
+                                       
+                                       delta = deltaF > 0.0 ? 1 : -1;
+                                       pushEvent(new GHOST_EventWheel([event timestamp]*1000, window, delta));
+                               }
+                               else {
+                                       NSPoint mousePos = [event locationInWindow];
+                                       double dx = [event deltaX];
+                                       double dy = -[event deltaY];
+                                       
+                                       const double deltaMax = 50.0;
+                                       
+                                       if ((dx == 0) && (dy == 0)) break;
+                                       
+                                       /* Quadratic acceleration */
+                                       dx = dx*(fabs(dx)+0.5);
+                                       if (dx<0.0) dx-=0.5; else dx+=0.5;
+                                       if (dx< -deltaMax) dx= -deltaMax; else if (dx>deltaMax) dx=deltaMax;
+                                       
+                                       dy = dy*(fabs(dy)+0.5);
+                                       if (dy<0.0) dy-=0.5; else dy+=0.5;
+                                       if (dy< -deltaMax) dy= -deltaMax; else if (dy>deltaMax) dy=deltaMax;
+
+                                       pushEvent(new GHOST_EventTrackpad([event timestamp]*1000, window, GHOST_kTrackpadEventScroll, mousePos.x, mousePos.y, dx, dy));
+                               }
                        }
                        break;
                        
+               case NSEventTypeMagnify:
+                       {
+                               NSPoint mousePos = [event locationInWindow];
+                               pushEvent(new GHOST_EventTrackpad([event timestamp]*1000, window, GHOST_kTrackpadEventMagnify, mousePos.x, mousePos.y,
+                                                                                                 [event magnification]*250.0 + 0.1, 0));
+                       }
+                       break;
+
+               case NSEventTypeRotate:
+                       {
+                               NSPoint mousePos = [event locationInWindow];
+                               pushEvent(new GHOST_EventTrackpad([event timestamp]*1000, window, GHOST_kTrackpadEventRotate, mousePos.x, mousePos.y,
+                                                                                                 -[event rotation] * 5.0, 0));
+                       }
+               case NSEventTypeBeginGesture:
+                       m_isGestureInProgress = true;
+                       break;
+               case NSEventTypeEndGesture:
+                       m_isGestureInProgress = false;
+                       break;
                default:
                        return GHOST_kFailure;
                        break;
@@ -1345,12 +1456,14 @@ GHOST_TSuccess GHOST_SystemCocoa::handleKeyEvent(void *eventPtr)
        unsigned char ascii;
        NSString* charsIgnoringModifiers;
 
-       /* Can happen, very rarely - seems to only be when command-H makes
-        * the window go away and we still get an HKey up. 
-        */
        if (!window) {
-               printf("\nW failure");
-               return GHOST_kFailure;
+               /* If no active window found, still tries to find the window associated with the event
+                This may happen when Cocoa continues to send some events after the window deactivate one */
+               window = m_windowManager->getWindowAssociatedWithOSWindow((void*)[event window]);
+               if (!window) {
+                       //printf("\nW failure for event 0x%x",[event type]);
+                       return GHOST_kFailure;
+               }
        }
        
        switch ([event type]) {
@@ -1389,6 +1502,7 @@ GHOST_TSuccess GHOST_SystemCocoa::handleKeyEvent(void *eventPtr)
        
                case NSFlagsChanged: 
                        modifiers = [event modifierFlags];
+                       
                        if ((modifiers & NSShiftKeyMask) != (m_modifierMask & NSShiftKeyMask)) {
                                pushEvent( new GHOST_EventKey([event timestamp]*1000, (modifiers & NSShiftKeyMask)?GHOST_kEventKeyDown:GHOST_kEventKeyUp, window, GHOST_kKeyLeftShift) );
                        }
index 15914a5bf4343501c82913a81300550b11b44553..1a1cc99742df33774e2ec1ce8987402d7ca78680 100644 (file)
@@ -190,10 +190,10 @@ GHOST_IWindow* GHOST_SystemWin32::createWindow(
        const STR_String& title, 
        GHOST_TInt32 left, GHOST_TInt32 top, GHOST_TUns32 width, GHOST_TUns32 height,
        GHOST_TWindowState state, GHOST_TDrawingContextType type,
-       bool stereoVisual, const GHOST_TEmbedderWindowID parentWindow )
+       bool stereoVisual, const GHOST_TUns16 numOfAASamples, const GHOST_TEmbedderWindowID parentWindow )
 {
        GHOST_Window* window = 0;
-       window = new GHOST_WindowWin32 (this, title, left, top, width, height, state, type, stereoVisual);
+       window = new GHOST_WindowWin32 (this, title, left, top, width, height, state, type, stereoVisual, numOfAASamples);
        if (window) {
                if (window->getValid()) {
                        // Store the pointer to the window
@@ -202,8 +202,18 @@ GHOST_IWindow* GHOST_SystemWin32::createWindow(
 //                     }
                }
                else {
+                       // An invalid window could be one that was used to test for AA
+                       GHOST_Window *other_window = ((GHOST_WindowWin32*)window)->getNextWindow();
+
                        delete window;
                        window = 0;
+                       
+                       // If another window is found, let the wm know about that one, but not the old one
+                       if (other_window)
+                       {
+                               m_windowManager->addWindow(other_window);
+                               window = other_window;
+                       }
                }
        }
        return window;
@@ -655,7 +665,7 @@ LRESULT WINAPI GHOST_SystemWin32::s_wndProc(HWND hwnd, UINT msg, WPARAM wParam,
                                                case VK_CONTROL:
                                                case VK_MENU:
                                                        if (!system->m_separateLeftRightInitialized) {
-                                                               // Check whether this system supports seperate left and right keys
+                                                               // Check whether this system supports separate left and right keys
                                                                switch (wParam) {
                                                                        case VK_SHIFT:
                                                                                system->m_separateLeftRight = 
index 517f7ddbeea524657ed7147dd1917eb7fe7f37c2..65d6a57ede3ce4d794f921237b8a189a341f9017 100644 (file)
@@ -110,6 +110,8 @@ public:
         * @param       height  The height the window.
         * @param       state   The state of the window when opened.
         * @param       type    The type of drawing context installed in this window.
+        * @param       stereoVisual    Stereo visual for quad buffered stereo.
+        * @param       numOfAASamples  Number of samples used for AA (zero if no AA)
         * @param       parentWindow    Parent (embedder) window
         * @return      The new window (or 0 if creation failed).
         */
@@ -117,7 +119,9 @@ public:
                const STR_String& title,
                GHOST_TInt32 left, GHOST_TInt32 top, GHOST_TUns32 width, GHOST_TUns32 height,
                GHOST_TWindowState state, GHOST_TDrawingContextType type,
-               const bool stereoVisual, const GHOST_TEmbedderWindowID parentWindow = 0 );
+               const bool stereoVisual = false,
+               const GHOST_TUns16 numOfAASamples = 0,
+               const GHOST_TEmbedderWindowID parentWindow = 0 );
 
        /***************************************************************************************
         ** Event management functionality
index ad8647d2246047b5d19bf00dccc59b78860c06ed..3ee3c1a29f360863da17aeded1106138f3d89077 100644 (file)
@@ -228,6 +228,8 @@ getMainDisplayDimensions(
         * @param       height  The height the window.
         * @param       state   The state of the window when opened.
         * @param       type    The type of drawing context installed in this window.
+        * @param       stereoVisual    Stereo visual for quad buffered stereo.
+        * @param       numOfAASamples  Number of samples used for AA (zero if no AA)
         * @param       parentWindow    Parent (embedder) window
         * @return      The new window (or 0 if creation failed).
         */
@@ -242,6 +244,7 @@ createWindow(
        GHOST_TWindowState state,
        GHOST_TDrawingContextType type,
        bool stereoVisual,
+       const GHOST_TUns16 numOfAASamples,
        const GHOST_TEmbedderWindowID parentWindow
 ){
        GHOST_WindowX11 * window = 0;
index d76c3991beb2cde38a32d1113f434ec73af5ab1f..361db783102e064cf0694a120eb3764be38deccd 100644 (file)
@@ -127,6 +127,7 @@ public:
                GHOST_TWindowState state,
                GHOST_TDrawingContextType type,
                const bool stereoVisual,
+               const GHOST_TUns16 numOfAASamples = 0,
                const GHOST_TEmbedderWindowID parentWindow = 0 
        );
 
index 14a255e2e5ef2ab79dd21dd3fb6a06f44ffbac3b..1c8b51e73a7431dcda9c185cd556818f3ed54d62 100644 (file)
@@ -44,13 +44,15 @@ GHOST_Window::GHOST_Window(
        GHOST_TInt32 /*left*/, GHOST_TInt32 /*top*/, GHOST_TUns32 width, GHOST_TUns32 height,
        GHOST_TWindowState state,
        GHOST_TDrawingContextType type,
-       const bool stereoVisual)
+       const bool stereoVisual,
+       const GHOST_TUns16 numOfAASamples)
 :
        m_drawingContextType(type),
        m_cursorVisible(true),
        m_cursorGrab(GHOST_kGrabDisable),
        m_cursorShape(GHOST_kStandardCursorDefault),
-       m_stereoVisual(stereoVisual)
+       m_stereoVisual(stereoVisual),
+       m_numOfAASamples(numOfAASamples)
 {
        m_isUnsavedChanges = false;
        m_canAcceptDragOperation = false;
@@ -70,6 +72,10 @@ GHOST_Window::~GHOST_Window()
 {
 }
 
+void* GHOST_Window::getOSWindow() const
+{
+       return NULL;
+}
 
 GHOST_TSuccess GHOST_Window::setDrawingContextType(GHOST_TDrawingContextType type)
 {
index 1b5681dc41cafa71fbf08c97ca7c79b1d2e85a02..c614ae68f65744cbb225da986b70254be3d7f32c 100644 (file)
@@ -75,14 +75,15 @@ public:
         * Constructor.
         * Creates a new window and opens it.
         * To check if the window was created properly, use the getValid() method.
-        * @param title         The text shown in the title bar of the window.
-        * @param left          The coordinate of the left edge of the window.
-        * @param top           The coordinate of the top edge of the window.
-        * @param width         The width the window.
-        * @param heigh         The height the window.
-        * @param state         The state the window is initially opened with.
-        * @param type          The type of drawing context installed in this window.
-        * @param stereoVisual  Stereo visual for quad buffered stereo.
+        * @param title                         The text shown in the title bar of the window.
+        * @param left                          The coordinate of the left edge of the window.
+        * @param top                           The coordinate of the top edge of the window.
+        * @param width                         The width the window.
+        * @param heigh                         The height the window.
+        * @param state                         The state the window is initially opened with.
+        * @param type                          The type of drawing context installed in this window.
+        * @param stereoVisual          Stereo visual for quad buffered stereo.
+        * @param numOfAASamples        Number of samples used for AA (zero if no AA)
         */
        GHOST_Window(
                const STR_String& title, 
@@ -92,7 +93,8 @@ public:
                GHOST_TUns32 height,
                GHOST_TWindowState state,
                GHOST_TDrawingContextType type = GHOST_kDrawingContextTypeNone,
-               const bool stereoVisual = false);
+               const bool stereoVisual = false,
+               const GHOST_TUns16 numOfAASamples = 0);
 
        /**
         * @section Interface inherited from GHOST_IWindow left for derived class
@@ -121,6 +123,12 @@ public:
         */
        virtual ~GHOST_Window();
 
+       /**
+        * Returns the associated OS object/handle
+        * @return The associated OS object/handle
+        */
+       virtual void* getOSWindow() const;
+       
        /**
         * Returns the current cursor shape.
         * @return      The current cursor shape.
@@ -319,6 +327,9 @@ protected:
         *  the graphics h/w
         */
        bool m_stereoVisual;
+       
+       /** Number of samples used in anti-aliasing, set to 0 if no AA **/
+       GHOST_TUns16 m_numOfAASamples;
     
     /** Full-screen width */
     GHOST_TUns32 m_fullScreenWidth;
index 362e949a0a4f14554826686966ed0e7c73ae5370..8dae43ffd65536982b74682dffa7f5a1ca46a6d1 100644 (file)
@@ -98,7 +98,8 @@ GHOST_WindowCarbon::GHOST_WindowCarbon(
        GHOST_TUns32 height,
        GHOST_TWindowState state,
        GHOST_TDrawingContextType type,
-       const bool stereoVisual
+       const bool stereoVisual,
+       const GHOST_TUns16 numOfAASamples
 ) :
        GHOST_Window(title, left, top, width, height, state, GHOST_kDrawingContextTypeNone),
        m_windowRef(0),
@@ -634,6 +635,7 @@ void GHOST_WindowCarbon::loadCursor(bool visible, GHOST_TStandardCursor cursor)
                GCMAP( GHOST_kStandardCursorTopRightCorner,                     kThemeArrowCursor);
                GCMAP( GHOST_kStandardCursorBottomRightCorner,          kThemeArrowCursor);
                GCMAP( GHOST_kStandardCursorBottomLeftCorner,           kThemeArrowCursor);
+               GCMAP( GHOST_kStandardCursorCopy,                                       kThemeCopyArrowCursor);
                };
 #undef GCMAP
 
index dd00add7fb1940f83ae65a6eabc1e80f2db83f32..b91e5410ddd375ce44a10f49ca6d27b630ace2c7 100644 (file)
@@ -80,7 +80,8 @@ public:
                GHOST_TUns32 height,
                GHOST_TWindowState state,
                GHOST_TDrawingContextType type = GHOST_kDrawingContextTypeNone,
-               const bool stereoVisual = false
+               const bool stereoVisual = false,
+               const GHOST_TUns16 numOfAASamples = 0
        );
 
        /**
index e59d9c173330ce69603809fbace61166b998a07d..5a89b1a53a396abb538b2948c2d92ced3a63727a 100644 (file)
@@ -61,15 +61,16 @@ public:
         * Constructor.
         * Creates a new window and opens it.
         * To check if the window was created properly, use the getValid() method.
-        * @param systemCocoa The associated system class to forward events to
-        * @param title         The text shown in the title bar of the window.
-        * @param left          The coordinate of the left edge of the window.
-        * @param top           The coordinate of the top edge of the window.
-        * @param width         The width the window.
-        * @param height        The height the window.
-        * @param state         The state the window is initially opened with.
-        * @param type          The type of drawing context installed in this window.
-        * @param stereoVisual  Stereo visual for quad buffered stereo.
+        * @param systemCocoa           The associated system class to forward events to
+        * @param title                         The text shown in the title bar of the window.
+        * @param left                          The coordinate of the left edge of the window.
+        * @param top                           The coordinate of the top edge of the window.
+        * @param width                         The width the window.
+        * @param height                        The height the window.
+        * @param state                         The state the window is initially opened with.
+        * @param type                          The type of drawing context installed in this window.
+        * @param stereoVisual          Stereo visual for quad buffered stereo.
+        * @param numOfAASamples        Number of samples used for AA (zero if no AA)
         */
        GHOST_WindowCocoa(
                GHOST_SystemCocoa *systemCocoa,
@@ -80,7 +81,8 @@ public:
                GHOST_TUns32 height,
                GHOST_TWindowState state,
                GHOST_TDrawingContextType type = GHOST_kDrawingContextTypeNone,
-               const bool stereoVisual = false
+               const bool stereoVisual = false,
+               const GHOST_TUns16 numOfAASamples = 0
        );
 
        /**
@@ -94,6 +96,12 @@ public:
         * @return The validity of the window.
         */
        virtual bool getValid() const;
+       
+       /**
+        * Returns the associated NSWindow object
+        * @return The associated NSWindow object
+        */
+       virtual void* getOSWindow() const;
 
        /**
         * Sets the title displayed in the title bar.
index 8c9f8a7647d85ae704009a0e87aade2ef43e5fa4..5dcc949ed4590ab85499116854dda757247e2f3e 100644 (file)
 #include <Carbon/Carbon.h>
 #endif
 
+#include <OpenGL/gl.h>
 /***** Multithreaded opengl code : uncomment for enabling
 #include <OpenGL/OpenGL.h>
 */
+
  
 #include "GHOST_WindowCocoa.h"
 #include "GHOST_SystemCocoa.h"
@@ -70,6 +72,8 @@ extern "C" {
 - (void)windowDidResignKey:(NSNotification *)notification;
 - (void)windowDidExpose:(NSNotification *)notification;
 - (void)windowDidResize:(NSNotification *)notification;
+- (void)windowDidMove:(NSNotification *)notification;
+- (void)windowWillMove:(NSNotification *)notification;
 @end
 
 @implementation CocoaWindowDelegate : NSObject
@@ -99,6 +103,16 @@ extern "C" {
        systemCocoa->handleWindowEvent(GHOST_kEventWindowUpdate, associatedWindow);
 }
 
+- (void)windowDidMove:(NSNotification *)notification
+{
+       systemCocoa->handleWindowEvent(GHOST_kEventWindowMove, associatedWindow);
+}
+
+- (void)windowWillMove:(NSNotification *)notification
+{
+       systemCocoa->handleWindowEvent(GHOST_kEventWindowMove, associatedWindow);
+}
+
 - (void)windowDidResize:(NSNotification *)notification
 {
 #ifdef MAC_OS_X_VERSION_10_6
@@ -277,14 +291,15 @@ GHOST_WindowCocoa::GHOST_WindowCocoa(
        GHOST_TUns32 height,
        GHOST_TWindowState state,
        GHOST_TDrawingContextType type,
-       const bool stereoVisual
+       const bool stereoVisual, const GHOST_TUns16 numOfAASamples
 ) :
-       GHOST_Window(title, left, top, width, height, state, GHOST_kDrawingContextTypeNone, stereoVisual),
+       GHOST_Window(title, left, top, width, height, state, GHOST_kDrawingContextTypeNone, stereoVisual, numOfAASamples),
        m_customCursor(0)
 {
        NSOpenGLPixelFormatAttribute pixelFormatAttrsWindow[40];
+       NSOpenGLPixelFormat *pixelFormat = nil;
        int i;
-       
+               
        m_systemCocoa = systemCocoa;
        m_fullScreen = false;
        
@@ -321,6 +336,11 @@ GHOST_WindowCocoa::GHOST_WindowCocoa(
        // Pixel Format Attributes for the windowed NSOpenGLContext
        i=0;
        pixelFormatAttrsWindow[i++] = NSOpenGLPFADoubleBuffer;
+       
+       // Guarantees the back buffer contents to be valid after a call to NSOpenGLContext object’s flushBuffer
+       // needed for 'Draw Overlap' drawing method
+       pixelFormatAttrsWindow[i++] = NSOpenGLPFABackingStore; 
+       
        pixelFormatAttrsWindow[i++] = NSOpenGLPFAAccelerated;
        //pixelFormatAttrsWindow[i++] = NSOpenGLPFAAllowOfflineRenderers,;   // Removed to allow 10.4 builds, and 2 GPUs rendering is not used anyway
        
@@ -329,13 +349,57 @@ GHOST_WindowCocoa::GHOST_WindowCocoa(
        
        if (stereoVisual) pixelFormatAttrsWindow[i++] = NSOpenGLPFAStereo;
        
+       if (numOfAASamples>0) {
+               // Multisample anti-aliasing
+               pixelFormatAttrsWindow[i++] = NSOpenGLPFAMultisample;
+               
+               pixelFormatAttrsWindow[i++] = NSOpenGLPFASampleBuffers;
+               pixelFormatAttrsWindow[i++] = (NSOpenGLPixelFormatAttribute) 1;
+               
+               pixelFormatAttrsWindow[i++] = NSOpenGLPFASamples;
+               pixelFormatAttrsWindow[i++] = (NSOpenGLPixelFormatAttribute) numOfAASamples;
+               
+               pixelFormatAttrsWindow[i++] = NSOpenGLPFANoRecovery;
+       }
+       
        pixelFormatAttrsWindow[i] = (NSOpenGLPixelFormatAttribute) 0;
        
-
-       //Creates the OpenGL View inside the window
-       NSOpenGLPixelFormat *pixelFormat =
-       [[NSOpenGLPixelFormat alloc] initWithAttributes:pixelFormatAttrsWindow];
+       pixelFormat = [[NSOpenGLPixelFormat alloc] initWithAttributes:pixelFormatAttrsWindow];
+       
        
+       //Fall back to no multisampling if Antialiasing init failed
+       if (pixelFormat == nil) {
+               i=0;
+               pixelFormatAttrsWindow[i++] = NSOpenGLPFADoubleBuffer;
+               
+               // Guarantees the back buffer contents to be valid after a call to NSOpenGLContext object’s flushBuffer
+               // needed for 'Draw Overlap' drawing method
+               pixelFormatAttrsWindow[i++] = NSOpenGLPFABackingStore;
+               
+               pixelFormatAttrsWindow[i++] = NSOpenGLPFAAccelerated;
+               //pixelFormatAttrsWindow[i++] = NSOpenGLPFAAllowOfflineRenderers,;   // Removed to allow 10.4 builds, and 2 GPUs rendering is not used anyway
+               
+               pixelFormatAttrsWindow[i++] = NSOpenGLPFADepthSize;
+               pixelFormatAttrsWindow[i++] = (NSOpenGLPixelFormatAttribute) 32;
+               
+               if (stereoVisual) pixelFormatAttrsWindow[i++] = NSOpenGLPFAStereo;
+               
+               pixelFormatAttrsWindow[i] = (NSOpenGLPixelFormatAttribute) 0;
+               
+               pixelFormat = [[NSOpenGLPixelFormat alloc] initWithAttributes:pixelFormatAttrsWindow];
+               
+       }
+       
+       if (numOfAASamples>0) { //Set m_numOfAASamples to the actual value
+               GLint gli;
+               [pixelFormat getValues:&gli forAttribute:NSOpenGLPFASamples forVirtualScreen:0];
+               if (m_numOfAASamples != (GHOST_TUns16)gli) {
+                       m_numOfAASamples = (GHOST_TUns16)gli;
+                       printf("GHOST_Window could be created with anti-aliasing of only %i samples\n",m_numOfAASamples);
+               }
+       }
+               
+       //Creates the OpenGL View inside the window
        m_openGLView = [[CocoaOpenGLView alloc] initWithFrame:rect
                                                                                                 pixelFormat:pixelFormat];
        
@@ -398,16 +462,13 @@ GHOST_WindowCocoa::~GHOST_WindowCocoa()
 
 bool GHOST_WindowCocoa::getValid() const
 {
-    bool valid;
-    if (!m_fullScreen) {
-        valid = (m_window != 0); //&& ::IsValidWindowPtr(m_windowRef);
-    }
-    else {
-        valid = true;
-    }
-    return valid;
+       return (m_window != 0);
 }
 
+void* GHOST_WindowCocoa::getOSWindow() const
+{
+       return (void*)m_window;
+}
 
 void GHOST_WindowCocoa::setTitle(const STR_String& title)
 {
@@ -842,6 +903,9 @@ GHOST_TSuccess GHOST_WindowCocoa::activateDrawingContext()
                if (m_openGLContext != nil) {
                        NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
                        [m_openGLContext makeCurrentContext];
+                       
+                       // Disable AA by default
+                       if (m_numOfAASamples > 0) glDisable(GL_MULTISAMPLE_ARB);
                        [pool drain];
                        return GHOST_kSuccess;
                }
@@ -1004,6 +1068,7 @@ void GHOST_WindowCocoa::loadCursor(bool visible, GHOST_TStandardCursor cursor) c
                        case GHOST_kStandardCursorTopRightCorner:
                        case GHOST_kStandardCursorBottomRightCorner:
                        case GHOST_kStandardCursorBottomLeftCorner:
+                       case GHOST_kStandardCursorCopy:
                        case GHOST_kStandardCursorDefault:
                        default:
                                tmpCursor = [NSCursor arrowCursor];
index 15ee41e3dce6221d8d57b0084d3fda9611339647..56b7c622d9a317ffbb20b7381cee5941963c580b 100644 (file)
@@ -193,6 +193,18 @@ std::vector<GHOST_IWindow *> &GHOST_WindowManager::getWindows()
 }
 
 
+GHOST_IWindow* GHOST_WindowManager::getWindowAssociatedWithOSWindow(void* osWindow)
+{
+       std::vector<GHOST_IWindow*>::iterator iter;
+
+       for (iter = m_windows.begin(); iter != m_windows.end(); iter++) {
+               if ((*iter)->getOSWindow() == osWindow)
+                       return *iter;
+       }
+       
+       return NULL;
+}
+
 bool GHOST_WindowManager::getAnyModifiedState()
 {
        bool isAnyModified = false;
index 3690ad41e2cd791880ab84895bc834c015002b63..6f48c7f4c9c76c1b65c3b76ebd9e199c49f4a271 100644 (file)
@@ -134,7 +134,14 @@ public:
         * interface above for this,
         */
        std::vector<GHOST_IWindow *> & getWindows();
-
+       
+       /**
+        * Finds the window associated with an OS window object/handle
+        * @param osWindow The OS window object/handle
+        * @return The associated window, null if none corresponds
+        */
+       virtual GHOST_IWindow* getWindowAssociatedWithOSWindow(void* osWindow);
+       
        /**
         * Return true if any windows has a modified status
         * @return True if any window has unsaved changes
index ea14f1dfc1b4dd18a5aa606fcb6fdcb82f026b1f..22045378e88dee3449dbe9d2ef0ad9cc6308fda2 100644 (file)
 #include "GHOST_WindowWin32.h"
 #include "GHOST_SystemWin32.h"
 #include "GHOST_DropTargetWin32.h"
-#include <GL/gl.h>
+
+// Need glew for some defines
+#include <GL/glew.h>
+#include <GL/wglew.h>
 #include <math.h>
 
 // MSVC6 still doesn't define M_PI
 #define M_PI 3.1415926536
 #endif
 
+// Some more multisample defines
+#define WGL_SAMPLE_BUFERS_ARB  0x2041
+#define        WGL_SAMPLES_ARB                 0x2042
+
 // win64 doesn't define GWL_USERDATA
 #ifdef WIN32
 #ifndef GWL_USERDATA
@@ -105,10 +112,13 @@ GHOST_WindowWin32::GHOST_WindowWin32(
        GHOST_TUns32 height,
        GHOST_TWindowState state,
        GHOST_TDrawingContextType type,
-       const bool stereoVisual)
+       const bool stereoVisual,
+       const GHOST_TUns16 numOfAASamples,
+       GHOST_TSuccess msEnabled,
+       int msPixelFormat)
 :
        GHOST_Window(title, left, top, width, height, state, GHOST_kDrawingContextTypeNone,
-       stereoVisual),
+       stereoVisual,numOfAASamples),
        m_system(system),
        m_hDC(0),
        m_hGlRc(0),
@@ -118,7 +128,18 @@ GHOST_WindowWin32::GHOST_WindowWin32(
        m_wintab(NULL),
        m_tabletData(NULL),
        m_tablet(0),
-       m_maxPressure(0)
+       m_maxPressure(0),
+       m_multisample(numOfAASamples),
+       m_multisampleEnabled(msEnabled),
+       m_msPixelFormat(msPixelFormat),
+       //For recreation
+       m_title(title),
+       m_left(left),
+       m_top(top),
+       m_width(width),
+       m_height(height),
+       m_stereo(stereoVisual),
+       m_nextWindow(NULL)
 {
        if (state != GHOST_kWindowStateFullScreen) {
                RECT rect;
@@ -194,10 +215,20 @@ GHOST_WindowWin32::GHOST_WindowWin32(
                                nCmdShow = SW_SHOWNORMAL;
                                break;
                }
-               setDrawingContextType(type);
-               ::ShowWindow(m_hWnd, nCmdShow);
-               // Force an initial paint of the window
-               ::UpdateWindow(m_hWnd);
+               GHOST_TSuccess success;
+               success = setDrawingContextType(type);
+
+               if (success)
+               {
+                       ::ShowWindow(m_hWnd, nCmdShow);
+                       // Force an initial paint of the window
+                       ::UpdateWindow(m_hWnd);
+               }
+               else
+               {
+                       //invalidate the window
+                       m_hWnd = 0;
+               }
        }
 
        m_wintab = ::LoadLibrary("Wintab32.dll");
@@ -276,6 +307,8 @@ GHOST_WindowWin32::~GHOST_WindowWin32()
                m_customCursor = NULL;
        }
 
+       m_multisampleEnabled = GHOST_kFailure;
+       m_multisample = 0;
        setDrawingContextType(GHOST_kDrawingContextTypeNone);
        if (m_hDC) {
                ::ReleaseDC(m_hWnd, m_hDC);
@@ -288,6 +321,11 @@ GHOST_WindowWin32::~GHOST_WindowWin32()
        }
 }
 
+GHOST_Window *GHOST_WindowWin32::getNextWindow()
+{
+       return m_nextWindow;
+}
+
 bool GHOST_WindowWin32::getValid() const
 {
        return m_hWnd != 0;
@@ -515,6 +553,69 @@ GHOST_TSuccess GHOST_WindowWin32::invalidate()
        return success;
 }
 
+GHOST_TSuccess GHOST_WindowWin32::initMultisample(PIXELFORMATDESCRIPTOR pfd)
+{
+       int pixelFormat;
+       bool success;
+       UINT numFormats;
+       HDC hDC = GetDC(getHWND());
+       float fAttributes[] = {0, 0};
+
+       // The attributes to look for
+       int iAttributes[] = {
+               WGL_DRAW_TO_WINDOW_ARB, GL_TRUE,
+               WGL_SUPPORT_OPENGL_ARB, GL_TRUE,
+               WGL_ACCELERATION_ARB, WGL_FULL_ACCELERATION_ARB,
+               WGL_COLOR_BITS_ARB, pfd.cColorBits,
+               WGL_DEPTH_BITS_ARB, pfd.cDepthBits,
+               WGL_STENCIL_BITS_ARB, pfd.cStencilBits,
+               WGL_DOUBLE_BUFFER_ARB, GL_TRUE,
+               WGL_SAMPLE_BUFFERS_ARB, GL_TRUE,
+               WGL_SAMPLES_ARB, m_multisample,
+               0, 0
+       };
+
+       // Get the function
+       PFNWGLCHOOSEPIXELFORMATARBPROC wglChoosePixelFormatARB = (PFNWGLCHOOSEPIXELFORMATARBPROC)wglGetProcAddress("wglChoosePixelFormatARB");  
+
+       if (!wglChoosePixelFormatARB)
+       {
+               m_multisampleEnabled = GHOST_kFailure;
+               return GHOST_kFailure;
+       }
+
+       // See if the format is valid
+       success = wglChoosePixelFormatARB(hDC, iAttributes, fAttributes, 1, &pixelFormat, &numFormats);
+
+       if (success && numFormats >= 1)
+       {
+               m_multisampleEnabled = GHOST_kSuccess;
+               m_msPixelFormat = pixelFormat;
+               return GHOST_kSuccess;
+       }
+       else
+       {
+               // See if any formats are supported
+               while (!success && iAttributes[19] != 0)
+               {
+                       iAttributes[19] /= 2;
+
+                       success = wglChoosePixelFormatARB(m_hDC, iAttributes, fAttributes, 1, &pixelFormat, &numFormats);
+
+                       if (success && numFormats >= 1)
+                       {
+                               m_multisampleEnabled = GHOST_kSuccess;
+                               m_msPixelFormat = pixelFormat;
+                               return GHOST_kSuccess;
+                       }
+
+                       success = GHOST_kFailure;
+               }
+       }
+
+       // No available pixel format...
+       return GHOST_kFailure;
+}
 
 GHOST_TSuccess GHOST_WindowWin32::installDrawingContext(GHOST_TDrawingContextType type)
 {
@@ -522,36 +623,101 @@ GHOST_TSuccess GHOST_WindowWin32::installDrawingContext(GHOST_TDrawingContextTyp
        switch (type) {
        case GHOST_kDrawingContextTypeOpenGL:
                {
-               if(m_stereoVisual)
-                       sPreferredFormat.dwFlags |= PFD_STEREO;
+               // If this window has multisample enabled, use the supplied format
+               if (m_multisampleEnabled)
+               {
+                       if (SetPixelFormat(m_hDC, m_msPixelFormat, &sPreferredFormat)==FALSE)
+                       {
+                               success = GHOST_kFailure;
+                               break;
+                       }
 
-               // Attempt to match device context pixel format to the preferred format
-               int iPixelFormat = EnumPixelFormats(m_hDC);
-               if (iPixelFormat == 0) {
-                       success = GHOST_kFailure;
-                       break;
-               }
-               if (::SetPixelFormat(m_hDC, iPixelFormat, &sPreferredFormat) == FALSE) {
-                       success = GHOST_kFailure;
-                       break;
+                       // Create the context
+                       m_hGlRc = ::wglCreateContext(m_hDC);
+                       if (m_hGlRc) {
+                               if (s_firsthGLRc) {
+                                       wglShareLists(s_firsthGLRc, m_hGlRc);
+                               } else {
+                                       s_firsthGLRc = m_hGlRc;
+                               }
+
+                               success = ::wglMakeCurrent(m_hDC, m_hGlRc) == TRUE ? GHOST_kSuccess : GHOST_kFailure;
+                       }
+                       else {
+                               printf("Failed to get a context....\n");
+                               success = GHOST_kFailure;
+                       }
                }
-               // For debugging only: retrieve the pixel format chosen
-               PIXELFORMATDESCRIPTOR preferredFormat;
-               ::DescribePixelFormat(m_hDC, iPixelFormat, sizeof(PIXELFORMATDESCRIPTOR), &preferredFormat);
-               // Create the context
-               m_hGlRc = ::wglCreateContext(m_hDC);
-               if (m_hGlRc) {
-                       if (s_firsthGLRc) {
-                               wglShareLists(s_firsthGLRc, m_hGlRc);
-                       } else {
-                               s_firsthGLRc = m_hGlRc;
+               else
+               {
+                       if(m_stereoVisual)
+                               sPreferredFormat.dwFlags |= PFD_STEREO;
+
+                       // Attempt to match device context pixel format to the preferred format
+                       int iPixelFormat = EnumPixelFormats(m_hDC);
+                       if (iPixelFormat == 0) {
+                               success = GHOST_kFailure;
+                               break;
                        }
+                       if (::SetPixelFormat(m_hDC, iPixelFormat, &sPreferredFormat) == FALSE) {
+                               success = GHOST_kFailure;
+                               break;
+                       }
+                       // For debugging only: retrieve the pixel format chosen
+                       PIXELFORMATDESCRIPTOR preferredFormat;
+                       ::DescribePixelFormat(m_hDC, iPixelFormat, sizeof(PIXELFORMATDESCRIPTOR), &preferredFormat);
+
+                       // Create the context
+                       m_hGlRc = ::wglCreateContext(m_hDC);
+                       if (m_hGlRc) {
+                               if (s_firsthGLRc) {
+                                       wglShareLists(s_firsthGLRc, m_hGlRc);
+                               } else {
+                                       s_firsthGLRc = m_hGlRc;
+                               }
 
-                       success = ::wglMakeCurrent(m_hDC, m_hGlRc) == TRUE ? GHOST_kSuccess : GHOST_kFailure;
-               }
-               else {
-                       success = GHOST_kFailure;
+                               success = ::wglMakeCurrent(m_hDC, m_hGlRc) == TRUE ? GHOST_kSuccess : GHOST_kFailure;
+                       }
+                       else {
+                               printf("Failed to get a context....\n");
+                               success = GHOST_kFailure;
+                       }
+                                       
+                       // Attempt to enable multisample
+                       if (m_multisample && WGL_ARB_multisample && !m_multisampleEnabled)
+                       {
+                               success = initMultisample(preferredFormat);
+
+                               if (success)
+                               {
+
+                                       // Make sure we don't screw up the context
+                                       m_drawingContextType = GHOST_kDrawingContextTypeOpenGL;
+                                       removeDrawingContext();
+
+                                       // Create a new window
+                                       GHOST_TWindowState new_state = getState();
+
+                                       m_nextWindow = new GHOST_WindowWin32((GHOST_SystemWin32*)GHOST_ISystem::getSystem(),
+                                                                                                       m_title,
+                                                                                                       m_left,
+                                                                                                       m_top,
+                                                                                                       m_width,
+                                                                                                       m_height,
+                                                                                                       new_state,
+                                                                                                       type,
+                                                                                                       m_stereo,
+                                                                                                       m_multisample,
+                                                                                                       m_multisampleEnabled,
+                                                                                                       m_msPixelFormat);
+
+                                       // Return failure so we can trash this window.
+                                       success = GHOST_kFailure;
+                                       break;
+                               }
+                       }
                }
+
                }
                break;
 
@@ -565,7 +731,6 @@ GHOST_TSuccess GHOST_WindowWin32::installDrawingContext(GHOST_TDrawingContextTyp
        return success;
 }
 
-
 GHOST_TSuccess GHOST_WindowWin32::removeDrawingContext()
 {
        GHOST_TSuccess success;
@@ -656,6 +821,7 @@ void GHOST_WindowWin32::loadCursor(bool visible, GHOST_TStandardCursor cursor) c
                        case GHOST_kStandardCursorBottomRightCorner:    id = IDC_SIZENWSE;      break;
                        case GHOST_kStandardCursorBottomLeftCorner:     id = IDC_SIZENESW;      break;
                        case GHOST_kStandardCursorPencil:               id = IDC_ARROW;         break;
+                       case GHOST_kStandardCursorCopy:                 id = IDC_ARROW;         break;
                        default:
                        success = false;
                }
index 07a31911a5e28a21d7d7b33fb4f17a8db070bb59..fb561127a2ea6f202260f4898b0823ad41ee60e2 100644 (file)
@@ -75,6 +75,7 @@ public:
         * @param state         The state the window is initially opened with.
         * @param type          The type of drawing context installed in this window.
         * @param stereoVisual  Stereo visual for quad buffered stereo.
+        * @param numOfAASamples        Number of samples used for AA (zero if no AA)
         */
        GHOST_WindowWin32(
                GHOST_SystemWin32 * system,
@@ -85,7 +86,10 @@ public:
                GHOST_TUns32 height,
                GHOST_TWindowState state,
                GHOST_TDrawingContextType type = GHOST_kDrawingContextTypeNone,
-               const bool stereoVisual = false
+               const bool stereoVisual = false,
+               const GHOST_TUns16 numOfAASamples = 0,
+               GHOST_TSuccess msEnabled = GHOST_kFailure,
+               int msPixelFormat = 0
        );
 
        /**
@@ -94,6 +98,13 @@ public:
         */
        virtual ~GHOST_WindowWin32();
 
+       /**
+        * Returns the window to replace this one if it's getting replaced
+        * @return The window replacing this one.
+        */
+
+       GHOST_Window *getNextWindow();
+
        /**
         * Returns indication as to whether the window is valid.
         * @return The validity of the window.
@@ -241,6 +252,8 @@ public:
        void processWin32TabletEvent(WPARAM wParam, LPARAM lParam);
 
 protected:
+       GHOST_TSuccess initMultisample(PIXELFORMATDESCRIPTOR pfd);
+
        /**
         * Tries to install a rendering context in this window.
         * @param type  The type of rendering context installed.
@@ -323,7 +336,25 @@ protected:
        LONG m_maxPressure;
        LONG m_maxAzimuth, m_maxAltitude;
 
+       /** Preferred number of samples */
+       GHOST_TUns16 m_multisample;
+
+       /** Check if multisample is supported */
+       GHOST_TSuccess m_multisampleEnabled;
+
+       /** The pixelFormat to use for multisample */
+       int m_msPixelFormat;
+
+       /** We need to following to recreate the window */
+       const STR_String& m_title;
+       GHOST_TInt32 m_left;
+       GHOST_TInt32 m_top;
+       GHOST_TUns32 m_width;
+       GHOST_TUns32 m_height;
+       bool m_stereo;
+
+       /** The GHOST_System passes this to wm if this window is being replaced */
+       GHOST_Window *m_nextWindow;
 };
 
 #endif // _GHOST_WINDOW_WIN32_H_
-
index 25d6c5980f658d777fe4331c260e84a2e3b5f233..1e33f72f687d85a4c58eb552fbf1e0fd82d27010 100644 (file)
@@ -35,7 +35,7 @@
 #include <X11/cursorfont.h>
 #include <X11/Xatom.h>
 
-#if defined(__sun__) || defined( __sun ) || defined (__sparc) || defined (__sparc__)
+#if defined(__sun__) || defined( __sun ) || defined (__sparc) || defined (__sparc__) || defined (_AIX)
 #include <strings.h>
 #endif
 
@@ -153,9 +153,10 @@ GHOST_WindowX11(
        GHOST_TWindowState state,
        const GHOST_TEmbedderWindowID parentWindow,
        GHOST_TDrawingContextType type,
-       const bool stereoVisual
+       const bool stereoVisual,
+       const GHOST_TUns16 numOfAASamples
 ) :
-       GHOST_Window(title,left,top,width,height,state,type,stereoVisual),
+       GHOST_Window(title,left,top,width,height,state,type,stereoVisual,numOfAASamples),
        m_context(NULL),
        m_display(display),
        m_system (system),
@@ -168,29 +169,54 @@ GHOST_WindowX11(
        // Set up the minimum atrributes that we require and see if
        // X can find us a visual matching those requirements.
 
-       int attributes[40], i = 0;
+       int attributes[40], i, samples;
        Atom atoms[2];
-       int natom;      
-       
-       if(m_stereoVisual)
-               attributes[i++] = GLX_STEREO;
-
-       attributes[i++] = GLX_RGBA;
-       attributes[i++] = GLX_DOUBLEBUFFER;     
-       attributes[i++] = GLX_RED_SIZE;   attributes[i++] = 1;
-       attributes[i++] = GLX_BLUE_SIZE;  attributes[i++] = 1;
-       attributes[i++] = GLX_GREEN_SIZE; attributes[i++] = 1;
-       attributes[i++] = GLX_DEPTH_SIZE; attributes[i++] = 1;
-       attributes[i] = None;
-       
-       m_visual = glXChooseVisual(m_display, DefaultScreen(m_display), attributes);
+       int natom;
+       int glxVersionMajor, glxVersionMinor; // As in GLX major.minor
 
-       if (m_visual == NULL) {
-               // barf : no visual meeting these requirements could be found.
-               printf("%s:%d: X11 glxChooseVisual() failed for OpenGL, verify working openGL system!\n", __FILE__, __LINE__);
+       if (!glXQueryVersion(m_display, &glxVersionMajor, &glxVersionMinor)) {
+               printf("%s:%d: X11 glXQueryVersion() failed, verify working openGL system!\n", __FILE__, __LINE__);
                return;
        }
-       
+
+       /* Find the display with highest samples, starting at level requested */
+       for (samples = m_numOfAASamples; samples >= 0; samples--) {
+               i = 0; /* Reusing attributes array, so reset counter */
+
+               if(m_stereoVisual)
+                       attributes[i++] = GLX_STEREO;
+
+               attributes[i++] = GLX_RGBA;
+               attributes[i++] = GLX_DOUBLEBUFFER;
+               attributes[i++] = GLX_RED_SIZE;   attributes[i++] = 1;
+               attributes[i++] = GLX_BLUE_SIZE;  attributes[i++] = 1;
+               attributes[i++] = GLX_GREEN_SIZE; attributes[i++] = 1;
+               attributes[i++] = GLX_DEPTH_SIZE; attributes[i++] = 1;
+               /* GLX >= 1.4 required for multi-sample */
+               if(samples && (glxVersionMajor >= 1) && (glxVersionMinor >= 4)) {
+                       attributes[i++] = GLX_SAMPLE_BUFFERS; attributes[i++] = 1;
+                       attributes[i++] = GLX_SAMPLES; attributes[i++] = samples;
+               }
+               attributes[i] = None;
+
+               m_visual = glXChooseVisual(m_display, DefaultScreen(m_display), attributes);
+
+               /* Any sample level or even zero, which means oversampling disabled, is good
+                  but we need a valid visual to continue */
+               if (m_visual == NULL) {
+                       if (samples == 0) {
+                               /* All options exhausted, cannot continue */
+                               printf("%s:%d: X11 glXChooseVisual() failed, verify working openGL system!\n", __FILE__, __LINE__);
+                               return;
+                       }
+               } else {
+                       if (m_numOfAASamples && (m_numOfAASamples > samples)) {
+                               printf("%s:%d: oversampling requested %i but using %i samples\n", __FILE__, __LINE__, m_numOfAASamples, samples);
+                       }
+                       break;
+               }
+       }
+
        memset(&m_xtablet, 0, sizeof(m_xtablet));
 
        // Create a bunch of attributes needed to create an X window.
@@ -1333,6 +1359,7 @@ getStandardCursor(
        GtoX(GHOST_kStandardCursorBottomRightCorner, XC_bottom_right_corner); break;
        GtoX(GHOST_kStandardCursorBottomLeftCorner, XC_bottom_left_corner); break;
        GtoX(GHOST_kStandardCursorPencil, XC_pencil); break;
+       GtoX(GHOST_kStandardCursorCopy, XC_arrow); break;
        default:
                xcursor_id = 0;
        }
@@ -1409,7 +1436,7 @@ setWindowCursorGrab(
                                setWindowCursorVisibility(false);
 
                }
-               XGrabPointer(m_display, m_window, True, ButtonPressMask| ButtonReleaseMask|PointerMotionMask, GrabModeAsync, GrabModeAsync, None, None, CurrentTime);
+               XGrabPointer(m_display, m_window, False, ButtonPressMask| ButtonReleaseMask|PointerMotionMask, GrabModeAsync, GrabModeAsync, None, None, CurrentTime);
        }
        else {
                if (m_cursorGrab==GHOST_kGrabHide) {
index 0dba1776553a30311671be88574ee1ff57c7f192..9a299e16eb436e623433838b420a44c65388d8ff 100644 (file)
@@ -67,6 +67,7 @@ public:
         * @param parentWindow  Parent (embedder) window
         * @param type          The type of drawing context installed in this window.
         * @param stereoVisual  Stereo visual for quad buffered stereo.
+        * @param numOfAASamples        Number of samples used for AA (zero if no AA)
         */
        GHOST_WindowX11(
                GHOST_SystemX11 *system,
@@ -79,7 +80,8 @@ public:
                GHOST_TWindowState state,
                const GHOST_TEmbedderWindowID parentWindow,
                GHOST_TDrawingContextType type = GHOST_kDrawingContextTypeNone,
-               const bool stereoVisual = false
+               const bool stereoVisual = false,
+               const GHOST_TUns16 numOfAASamples = 0
        );
 
                bool 
index 4e4d9bb6598052f5e9129a3295ca84d6855879fc..1bb52ba16b654d681aefba6711b06750deb5335f 100644 (file)
@@ -44,7 +44,7 @@
                                Name="VCCLCompilerTool"\r
                                Optimization="2"\r
                                InlineFunctionExpansion="1"\r
-                               AdditionalIncludeDirectories="..\..;..\..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\..\lib\windows\wintab\INCLUDE"\r
+                               AdditionalIncludeDirectories="..\..;..\..\..\..\..\build\msvc_9\intern\string\include;..\..\..\..\..\lib\windows\wintab\INCLUDE;..\..\..\..\..\build\msvc_9\extern\glew\include"\r
                                PreprocessorDefinitions="WIN32,NDEBUG,_LIB"\r
                                StringPooling="true"\r
                                RuntimeLibrary="0"\r
                        <Tool\r