add OpenCL PairBench (missing GUI, so not really useful)

This commit is contained in:
erwincoumans
2015-05-01 00:18:49 -07:00
parent aec360f158
commit aad9a5a396
9 changed files with 1174 additions and 3 deletions

View File

@@ -28,6 +28,7 @@
#include "../Experiments/ImplicitCloth/ImplicitClothExample.h"
#include "../Importers/ImportBullet/SerializeSetup.h"
#include "../Raycast/RaytestDemo.h"
#include "../OpenCL/broadphase/PairBench.h"
struct ExampleEntry
@@ -163,7 +164,10 @@ static ExampleEntry gDefaultExamples[]=
ExampleEntry(1,"Implicit Cloth", "Cloth simulation using implicit integration, by Stan Melax. The cloth is only attached at the corners. Note the stability using a large time step even with high stiffness.",
ImplicitClothCreateFunc),
#ifdef B3_USE_CLEW
ExampleEntry(0,"OpenCL (experimental)"),
ExampleEntry(1,"Pair Bench", "Benchmark of overlapping pair search using OpenCL.", PairBenchOpenCLCreateFunc),
#endif //
ExampleEntry(0,"Rendering"),
ExampleEntry(1,"Instanced Rendering", "Simple example of fast instanced rendering, only active when using OpenGL3+.",RenderInstancingCreateFunc),
ExampleEntry(1,"CoordinateSystemDemo","Show the axis and positive rotation direction around the axis.", CoordinateSystemCreateFunc),

View File

@@ -1,6 +1,16 @@
project "App_ExampleBrowser"
hasCL = findOpenCL("clew")
if (hasCL) then
-- project ("App_Bullet3_OpenCL_Demos_" .. vendor)
initOpenCL("clew")
end
language "C++"
kind "ConsoleApp"
@@ -16,8 +26,20 @@
initOpenGL()
initGlew()
if (hasCL) then
links {
"Bullet3OpenCL_clew",
"Bullet3Dynamics",
"Bullet3Collision",
"Bullet3Geometry",
"Bullet3Common",
}
end
defines {"INCLUDE_CLOTH_DEMOS"}
files {
"**.cpp",
"**.h",
@@ -66,6 +88,13 @@
"../ThirdPartyLibs/urdf/boost_replacement/string_split.h",
}
if (hasCL) then
files {
"../OpenCL/broadphase/*",
"../OpenCL/CommonOpenCL/*"
}
end
if os.is("Linux") then
initX11()
@@ -74,3 +103,5 @@ end
if os.is("MacOSX") then
links{"Cocoa.framework"}
end