-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added OpenCL cloth demo, contributed by AMD.
updated GpuSoftBodySolvers updated DirectCompute cloth demo
- Loading branch information
erwin.coumans
committed
Aug 14, 2010
1 parent
40958f2
commit 4f9b450
Showing
72 changed files
with
7,513 additions
and
832 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
|
||
|
||
INCLUDE_DIRECTORIES( | ||
${BULLET_PHYSICS_SOURCE_DIR}/src | ||
${BULLET_PHYSICS_SOURCE_DIR}/Demos/SharedOpenCL | ||
${BULLET_PHYSICS_SOURCE_DIR}/Demos/OpenGL | ||
) | ||
|
||
ADD_DEFINITIONS(-DUSE_AMD_OPENCL) | ||
ADD_DEFINITIONS(-DCL_PLATFORM_AMD) | ||
|
||
|
||
IF (INTERNAL_CREATE_DISTRIBUTABLE_MSVC_PROJECTFILES) | ||
INCLUDE_DIRECTORIES( $ENV{==ATISTREAMSDKROOT=}/include ) | ||
IF (CMAKE_CL_64) | ||
SET(CMAK_ATISTREAMSDK_LIBPATH $ENV{==ATISTREAMSDKROOT=}/lib/x86_64 ) | ||
ELSE(CMAKE_CL_64) | ||
SET(CMAK_ATISTREAMSDK_LIBPATH $ENV{==ATISTREAMSDKROOT=}/lib/x86 ) | ||
ENDIF(CMAKE_CL_64) | ||
ELSE() | ||
INCLUDE_DIRECTORIES( $ENV{ATISTREAMSDKROOT}/include ) | ||
IF (CMAKE_CL_64) | ||
SET(CMAK_ATISTREAMSDK_LIBPATH $ENV{ATISTREAMSDKROOT}/lib/x86_64 ) | ||
ELSE(CMAKE_CL_64) | ||
SET(CMAK_ATISTREAMSDK_LIBPATH $ENV{ATISTREAMSDKROOT}/lib/x86 ) | ||
ENDIF(CMAKE_CL_64) | ||
ENDIF() | ||
|
||
|
||
IF (CMAKE_CL_64) | ||
SET(CMAK_GLEW_LIBRARY | ||
${BULLET_PHYSICS_SOURCE_DIR}/Glut/glew64.lib ) | ||
ELSE(CMAKE_CL_64) | ||
SET(CMAK_GLEW_LIBRARY ${BULLET_PHYSICS_SOURCE_DIR}/Glut/glew32.lib ) | ||
ENDIF(CMAKE_CL_64) | ||
|
||
|
||
IF (USE_GLUT) | ||
LINK_LIBRARIES( | ||
OpenGLSupport | ||
BulletSoftBodySolvers_OpenCL_AMD | ||
BulletSoftBodySolvers_CPU | ||
BulletMultiThreaded | ||
BulletSoftBody | ||
BulletDynamics | ||
BulletCollision | ||
LinearMath | ||
${GLUT_glut_LIBRARY} | ||
${OPENGL_gl_LIBRARY} | ||
${OPENGL_glu_LIBRARY} | ||
${CMAK_GLEW_LIBRARY} | ||
${CMAK_ATISTREAMSDK_LIBPATH}/OpenCL.lib | ||
) | ||
|
||
|
||
ADD_EXECUTABLE(AppOpenCLClothDemo_AMD | ||
../cl_cloth_demo.cpp | ||
${BULLET_PHYSICS_SOURCE_DIR}/Demos/SharedOpenCL/btOclUtils.h | ||
${BULLET_PHYSICS_SOURCE_DIR}/Demos/SharedOpenCL/btOclCommon.h | ||
${BULLET_PHYSICS_SOURCE_DIR}/Demos/SharedOpenCL/btOclUtils.cpp | ||
${BULLET_PHYSICS_SOURCE_DIR}/Demos/SharedOpenCL/btOclCommon.cpp | ||
../gl_win.cpp | ||
../clstuff.cpp | ||
../bmpLoader.cpp | ||
../bmpLoader.h | ||
../clstuff.h | ||
../gl_win.h | ||
|
||
) | ||
ELSE (USE_GLUT) | ||
ENDIF (USE_GLUT) | ||
|
||
IF(WIN32) | ||
IF (CMAKE_CL_64) | ||
IF (NOT INTERNAL_CREATE_DISTRIBUTABLE_MSVC_PROJECTFILES) | ||
ADD_CUSTOM_COMMAND( TARGET AppOpenCLClothDemo_AMD POST_BUILD | ||
COMMAND ${CMAKE_COMMAND} ARGS -E copy_if_different ${BULLET_PHYSICS_SOURCE_DIR}/glut64.dll ${CMAKE_CURRENT_BINARY_DIR} | ||
) | ||
ADD_CUSTOM_COMMAND( TARGET AppOpenCLClothDemo_AMD POST_BUILD | ||
COMMAND ${CMAKE_COMMAND} ARGS -E copy_if_different ${BULLET_PHYSICS_SOURCE_DIR}/GLEW64.DLL ${CMAKE_CURRENT_BINARY_DIR}) | ||
ENDIF() | ||
ELSE(CMAKE_CL_64) | ||
IF (NOT INTERNAL_CREATE_DISTRIBUTABLE_MSVC_PROJECTFILES) | ||
ADD_CUSTOM_COMMAND( TARGET AppOpenCLClothDemo_AMD POST_BUILD | ||
COMMAND ${CMAKE_COMMAND} ARGS -E copy_if_different ${BULLET_PHYSICS_SOURCE_DIR}/GLUT32.DLL ${CMAKE_CURRENT_BINARY_DIR} | ||
) | ||
ADD_CUSTOM_COMMAND( TARGET AppOpenCLClothDemo_AMD POST_BUILD | ||
COMMAND ${CMAKE_COMMAND} ARGS -E copy_if_different ${BULLET_PHYSICS_SOURCE_DIR}/GLEW32.DLL ${CMAKE_CURRENT_BINARY_DIR}) | ||
|
||
ENDIF() | ||
ENDIF(CMAKE_CL_64) | ||
ENDIF(WIN32) | ||
|
||
ADD_CUSTOM_COMMAND( TARGET AppOpenCLClothDemo_AMD POST_BUILD | ||
COMMAND ${CMAKE_COMMAND} ARGS -E copy_if_different ${BULLET_PHYSICS_SOURCE_DIR}/Demos/OpenCLClothDemo/amdFlag.bmp ${CMAKE_CURRENT_BINARY_DIR} | ||
COMMAND ${CMAKE_COMMAND} ARGS -E copy_if_different ${BULLET_PHYSICS_SOURCE_DIR}/Demos/OpenCLClothDemo/atiFlag.bmp ${CMAKE_CURRENT_BINARY_DIR} | ||
) | ||
|
||
IF (UNIX) | ||
TARGET_LINK_LIBRARIES(AppOpenCLClothDemo_AMD pthread) | ||
ENDIF(UNIX) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
|
||
|
||
INCLUDE_DIRECTORIES( | ||
${BULLET_PHYSICS_SOURCE_DIR}/src | ||
${BULLET_PHYSICS_SOURCE_DIR}/Demos/SharedOpenCL | ||
${BULLET_PHYSICS_SOURCE_DIR}/Demos/OpenGL | ||
) | ||
|
||
|
||
IF (APPLE) | ||
FIND_LIBRARY(OPENCL_LIBRARY OpenCL DOC "OpenCL lib for OSX") | ||
FIND_PATH(OPENCL_INCLUDE_DIR OpenCL/cl.h DOC "Include for OpenCL on OSX") | ||
ENDIF (APPLE) | ||
|
||
|
||
IF (USE_GLUT) | ||
LINK_LIBRARIES( | ||
OpenGLSupport | ||
BulletSoftBodySolvers_OpenCL_Apple | ||
BulletSoftBodySolvers_CPU | ||
BulletMultiThreaded | ||
BulletSoftBody | ||
BulletDynamics | ||
BulletCollision | ||
LinearMath | ||
${OPENCL_LIBRARY} | ||
${GLUT_glut_LIBRARY} | ||
${OPENGL_gl_LIBRARY} | ||
${OPENGL_glu_LIBRARY} | ||
${CMAK_GLEW_LIBRARY} | ||
) | ||
|
||
|
||
ADD_EXECUTABLE(AppOpenCLClothDemo_Apple | ||
../cl_cloth_demo.cpp | ||
${BULLET_PHYSICS_SOURCE_DIR}/Demos/SharedOpenCL/btOclUtils.h | ||
${BULLET_PHYSICS_SOURCE_DIR}/Demos/SharedOpenCL/btOclCommon.h | ||
${BULLET_PHYSICS_SOURCE_DIR}/Demos/SharedOpenCL/btOclUtils.cpp | ||
${BULLET_PHYSICS_SOURCE_DIR}/Demos/SharedOpenCL/btOclCommon.cpp | ||
../gl_win.cpp | ||
../clstuff.cpp | ||
../bmpLoader.cpp | ||
../bmpLoader.h | ||
../clstuff.h | ||
../gl_win.h | ||
|
||
) | ||
ELSE (USE_GLUT) | ||
ENDIF (USE_GLUT) | ||
|
||
|
||
ADD_CUSTOM_COMMAND( TARGET AppOpenCLClothDemo_Apple POST_BUILD | ||
COMMAND ${CMAKE_COMMAND} ARGS -E copy_if_different ${BULLET_PHYSICS_SOURCE_DIR}/Demos/OpenCLClothDemo/amdFlag.bmp ${CMAKE_CURRENT_BINARY_DIR} | ||
COMMAND ${CMAKE_COMMAND} ARGS -E copy_if_different ${BULLET_PHYSICS_SOURCE_DIR}/Demos/OpenCLClothDemo/atiFlag.bmp ${CMAKE_CURRENT_BINARY_DIR} | ||
) | ||
|
||
IF (UNIX) | ||
TARGET_LINK_LIBRARIES(AppOpenCLClothDemo_Apple pthread) | ||
ENDIF(UNIX) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 10.00 | ||
# Visual Studio 2008 | ||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CLClothDemo", "CLClothDemo.vcproj", "{A61906AF-B5DE-454E-99F6-B653C250D221}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Win32 = Debug|Win32 | ||
Release|Win32 = Release|Win32 | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{A61906AF-B5DE-454E-99F6-B653C250D221}.Debug|Win32.ActiveCfg = Debug|Win32 | ||
{A61906AF-B5DE-454E-99F6-B653C250D221}.Debug|Win32.Build.0 = Debug|Win32 | ||
{A61906AF-B5DE-454E-99F6-B653C250D221}.Release|Win32.ActiveCfg = Release|Win32 | ||
{A61906AF-B5DE-454E-99F6-B653C250D221}.Release|Win32.Build.0 = Release|Win32 | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
EndGlobal |
Oops, something went wrong.