Add the GPU rigid body pipeline from https://github.com/erwincoumans/experiments as a Bullet 3.x preview for Bullet 2.80
This commit is contained in:
36
Extras/RigidBodyGpuPipeline/build/findDirectX11.lua
Normal file
36
Extras/RigidBodyGpuPipeline/build/findDirectX11.lua
Normal file
@@ -0,0 +1,36 @@
|
||||
function findDirectX11()
|
||||
local dx11path = os.getenv("DXSDK_DIR")
|
||||
if (dx11path) then
|
||||
local filepath = string.format("%s%s",dx11path,"Include/D3D11.h")
|
||||
headerdx11 = io.open(filepath, "r")
|
||||
if (headerdx11) then
|
||||
printf("Found DX11: '%s'", filepath)
|
||||
return true
|
||||
end
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
function initDirectX11()
|
||||
configuration {}
|
||||
|
||||
local dx11path = os.getenv("DXSDK_DIR")
|
||||
defines { "ADL_ENABLE_DX11"}
|
||||
includedirs {"$(DXSDK_DIR)/include"}
|
||||
|
||||
configuration "x32"
|
||||
libdirs {"$(DXSDK_DIR)/Lib/x86"}
|
||||
configuration "x64"
|
||||
libdirs {"$(DXSDK_DIR)/Lib/x64"}
|
||||
configuration {}
|
||||
links {"d3dcompiler",
|
||||
"dxerr",
|
||||
"dxguid",
|
||||
"d3dx9",
|
||||
"d3d9",
|
||||
"winmm",
|
||||
"comctl32",
|
||||
"d3dx11"
|
||||
}
|
||||
return true
|
||||
end
|
||||
84
Extras/RigidBodyGpuPipeline/build/findOpenCL.lua
Normal file
84
Extras/RigidBodyGpuPipeline/build/findOpenCL.lua
Normal file
@@ -0,0 +1,84 @@
|
||||
-- todo: add Apple OpenCL environment vars
|
||||
|
||||
function findOpenCL_AMD()
|
||||
local amdopenclpath = os.getenv("AMDAPPSDKROOT")
|
||||
if (amdopenclpath) then
|
||||
return true
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
function findOpenCL_NVIDIA()
|
||||
local nvidiaopenclpath = os.getenv("CUDA_PATH")
|
||||
if (nvidiaopenclpath) then
|
||||
return true
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
function findOpenCL_Intel()
|
||||
local intelopenclpath = os.getenv("INTELOCLSDKROOT")
|
||||
if (intelopenclpath) then
|
||||
return true
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
function initOpenCL_AMD()
|
||||
configuration {}
|
||||
local amdopenclpath = os.getenv("AMDAPPSDKROOT")
|
||||
if (amdopenclpath) then
|
||||
defines { "ADL_ENABLE_CL" , "CL_PLATFORM_AMD"}
|
||||
includedirs {
|
||||
"$(AMDAPPSDKROOT)/include"
|
||||
}
|
||||
configuration "x32"
|
||||
libdirs {"$(AMDAPPSDKROOT)/lib/x86"}
|
||||
configuration "x64"
|
||||
libdirs {"$(AMDAPPSDKROOT)/lib/x86_64"}
|
||||
configuration {}
|
||||
links {"OpenCL"}
|
||||
return true
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
|
||||
function initOpenCL_NVIDIA()
|
||||
configuration {}
|
||||
local nvidiaopenclpath = os.getenv("CUDA_PATH")
|
||||
if (nvidiaopenclpath) then
|
||||
defines { "ADL_ENABLE_CL" , "CL_PLATFORM_NVIDIA"}
|
||||
includedirs {
|
||||
"$(CUDA_PATH)/include"
|
||||
}
|
||||
configuration "x32"
|
||||
libdirs {"$(CUDA_PATH)/lib/Win32"}
|
||||
configuration "x64"
|
||||
libdirs {"$(CUDA_PATH)/lib/x64"}
|
||||
configuration {}
|
||||
links {"OpenCL"}
|
||||
return true
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
function initOpenCL_Intel()
|
||||
configuration {}
|
||||
local intelopenclpath = os.getenv("INTELOCLSDKROOT")
|
||||
if (intelopenclpath) then
|
||||
defines { "ADL_ENABLE_CL" , "CL_PLATFORM_INTEL"}
|
||||
includedirs {
|
||||
"$(INTELOCLSDKROOT)/include"
|
||||
}
|
||||
configuration "x32"
|
||||
libdirs {"$(INTELOCLSDKROOT)/lib/x86"}
|
||||
configuration "x64"
|
||||
libdirs {"$(INTELOCLSDKROOT)/lib/x64"}
|
||||
configuration {}
|
||||
links {"OpenCL"}
|
||||
return true
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
52
Extras/RigidBodyGpuPipeline/build/findOpenGLGlewGlut.lua
Normal file
52
Extras/RigidBodyGpuPipeline/build/findOpenGLGlewGlut.lua
Normal file
@@ -0,0 +1,52 @@
|
||||
-- todo: add Apple OpenCL environment vars
|
||||
|
||||
function initOpenGL()
|
||||
configuration {}
|
||||
configuration {"Windows"}
|
||||
links {"opengl32"}
|
||||
configuration {"MacOSX"}
|
||||
links { "Carbon.framework","OpenGL.framework","AGL.framework"}
|
||||
configuration {"not Windows", "not MacOSX"}
|
||||
links {"GL","GLU"}
|
||||
configuration{}
|
||||
end
|
||||
|
||||
function initGlut()
|
||||
configuration {}
|
||||
configuration {"Windows"}
|
||||
|
||||
includedirs {
|
||||
projectRootDir .. "../../Glut"
|
||||
}
|
||||
libdirs { projectRootDir .. "../../Glut"}
|
||||
configuration {"Windows", "x32"}
|
||||
links {"glut32"}
|
||||
configuration {"Windows", "x64"}
|
||||
links {"glut64"}
|
||||
|
||||
configuration {"MacOSX"}
|
||||
links { "Glut.framework" }
|
||||
|
||||
configuration {"not Windows", "not MacOSX"}
|
||||
links {"glut"}
|
||||
configuration{}
|
||||
end
|
||||
|
||||
function initGlew()
|
||||
configuration {}
|
||||
configuration {"Windows"}
|
||||
defines { "GLEW_STATIC"}
|
||||
includedirs {
|
||||
projectRootDir .. "../../Glut"
|
||||
}
|
||||
libdirs { projectRootDir .. "../../Glut"}
|
||||
configuration {"Windows", "x32"}
|
||||
links {"glew32s"}
|
||||
configuration {"Windows", "x64"}
|
||||
links {"glew64s"}
|
||||
|
||||
configuration{}
|
||||
end
|
||||
|
||||
|
||||
|
||||
55
Extras/RigidBodyGpuPipeline/build/premake4.lua
Normal file
55
Extras/RigidBodyGpuPipeline/build/premake4.lua
Normal file
@@ -0,0 +1,55 @@
|
||||
solution "0MySolution"
|
||||
|
||||
-- Multithreaded compiling
|
||||
if _ACTION == "vs2010" then
|
||||
buildoptions { "/MP" }
|
||||
end
|
||||
|
||||
|
||||
|
||||
configurations {"Release", "Debug"}
|
||||
configuration "Release"
|
||||
flags { "Optimize", "StaticRuntime", "NoMinimalRebuild", "FloatFast"}
|
||||
configuration "Debug"
|
||||
flags { "Symbols", "StaticRuntime" , "NoMinimalRebuild", "NoEditAndContinue" ,"FloatFast"}
|
||||
|
||||
platforms {"x32", "x64"}
|
||||
|
||||
configuration "x64"
|
||||
targetsuffix "_64"
|
||||
configuration {"x64", "debug"}
|
||||
targetsuffix "_x64_debug"
|
||||
configuration {"x64", "release"}
|
||||
targetsuffix "_x64"
|
||||
configuration {"x32", "debug"}
|
||||
targetsuffix "_debug"
|
||||
|
||||
configuration{}
|
||||
|
||||
flags { "NoRTTI", "NoExceptions"}
|
||||
defines { "_HAS_EXCEPTIONS=0" }
|
||||
targetdir "../bin"
|
||||
location("./" .. _ACTION)
|
||||
|
||||
|
||||
projectRootDir = os.getcwd() .. "/../"
|
||||
print("Project root directroy: " .. projectRootDir);
|
||||
|
||||
dofile ("findOpenCL.lua")
|
||||
dofile ("findDirectX11.lua")
|
||||
dofile ("findOpenGLGlewGlut.lua")
|
||||
|
||||
language "C++"
|
||||
|
||||
include "../opencl/gpu_rigidbody_pipeline2"
|
||||
include "../opencl/gpu_rigidbody_pipeline"
|
||||
|
||||
include "../opencl/basic_initialize"
|
||||
include "../opencl/vector_add"
|
||||
|
||||
include "../opencl/primitives/AdlTest"
|
||||
include "../opencl/primitives/benchmark"
|
||||
include "../opencl/3dGridBroadphase"
|
||||
include "../opencl/broadphase_benchmark"
|
||||
|
||||
|
||||
10
Extras/RigidBodyGpuPipeline/build/vs2008.bat
Normal file
10
Extras/RigidBodyGpuPipeline/build/vs2008.bat
Normal file
@@ -0,0 +1,10 @@
|
||||
|
||||
rem premake4 --no-pelibs vs2008
|
||||
rem premake4 --no-pedemos vs2008
|
||||
rem premake4 --no-bulletlibs --no-pelibs vs2008
|
||||
rem premake4 --with-nacl vs2008
|
||||
|
||||
..\..\..\msvc\premake4 vs2008
|
||||
mkdir vs2008\cache
|
||||
|
||||
pause
|
||||
5
Extras/RigidBodyGpuPipeline/build/vs2010.bat
Normal file
5
Extras/RigidBodyGpuPipeline/build/vs2010.bat
Normal file
@@ -0,0 +1,5 @@
|
||||
|
||||
..\..\..\msvc\premake4 vs2010
|
||||
|
||||
mkdir vs2010\cache
|
||||
pause
|
||||
Reference in New Issue
Block a user