more fixes in the build, related to CMake and some error (don't delete a void* pointer!)

revert BasicDemo.cpp to original Bullet 2.82 state
This commit is contained in:
Erwin Coumans 2014-05-13 21:52:46 -07:00
parent 9ab755fc07
commit 934df75ea6
8 changed files with 69 additions and 61 deletions

View File

@ -226,7 +226,13 @@ ENDIF(USE_GLUT)
ENDIF()
ENDIF(BUILD_BULLET2_DEMOS)
OPTION(BUILD_BULLET3_DEMOS "Set when you want to build the Bullet 3 demos" ON)
OPTION(BUILD_BULLET3 "Set when you want to build Bullet 3" ON)
IF(BUILD_BULLET3)
OPTION(BUILD_BULLET3_DEMOS "Set when you want to build the Bullet 3 demos" ON)
ELSE(BUILD_BULLET3)
unset(BUILD_BULLET3_DEMOS CACHE)
OPTION(BUILD_BULLET3_DEMOS "Set when you want to build the Bullet 3 demos" OFF)
ENDIF(BUILD_BULLET3)
IF(BUILD_BULLET3_DEMOS)
IF(EXISTS ${BULLET_PHYSICS_SOURCE_DIR}/Demos3 AND IS_DIRECTORY ${BULLET_PHYSICS_SOURCE_DIR}/Demos3)
SUBDIRS(Demos3)

View File

@ -15,9 +15,9 @@ subject to the following restrictions:
///create 125 (5x5x5) dynamic object
#define ARRAY_SIZE_X 10
#define ARRAY_SIZE_Y 10
#define ARRAY_SIZE_Z 10
#define ARRAY_SIZE_X 5
#define ARRAY_SIZE_Y 5
#define ARRAY_SIZE_Z 5
//maximum number of objects (and allow user to shoot additional boxes)
#define MAX_PROXIES (ARRAY_SIZE_X*ARRAY_SIZE_Y*ARRAY_SIZE_Z + 1024)
@ -81,8 +81,8 @@ void BasicDemo::clientMoveAndDisplay()
MyOverlapCallback aabbOverlap(aabbMin,aabbMax);
m_dynamicsWorld->getBroadphase()->aabbTest(aabbMin,aabbMax,aabbOverlap);
if (aabbOverlap.m_numOverlap)
printf("#aabb overlap = %d\n", aabbOverlap.m_numOverlap);
//if (aabbOverlap.m_numOverlap)
// printf("#aabb overlap = %d\n", aabbOverlap.m_numOverlap);
}
renderme();

View File

@ -1,3 +1,3 @@
if (BUILD_BULLET3)
if (BUILD_BULLET3_DEMOS)
SUBDIRS( AllBullet2Demos GpuDemos SimpleOpenGL3 )
endif(BUILD_BULLET3)
endif(BUILD_BULLET3_DEMOS)

View File

@ -1 +1,3 @@
if (OPENGL_FOUND)
SUBDIRS( Gwen OpenGLWindow )
endif(OPENGL_FOUND)

View File

@ -180,7 +180,7 @@ void InternalOpenGL2RenderCallbacks::updateTexture(sth_texture* texture, sth_gly
glDeleteTextures(1, id);
//delete id;
delete texture->m_userData;
delete id;//texture->m_userData;
texture->m_userData = 0;
}

View File

@ -43,4 +43,3 @@
"../OpenGLWindow/MacOpenGLWindow.mm",
}
end

View File

@ -1,3 +1,11 @@
function findOpenGL()
configuration{}
if os.is("Linux") then
return false
end
--assume OpenGL is available on Mac OSX, Windows etc
return true
end
function initOpenGL()
configuration {}

View File

@ -4,10 +4,10 @@
-- Multithreaded compiling
if _ACTION == "vs2010" or _ACTION=="vs2008" then
buildoptions { "/MP" }
end
end
act = ""
if _ACTION then
act = _ACTION
end
@ -18,9 +18,9 @@
trigger = "midi",
description = "Use Midi controller to control parameters"
}
-- _OPTIONS["midi"] = "1";
newoption
{
trigger = "bullet2gpu",
@ -32,19 +32,20 @@
trigger = "enet",
description = "Enable enet NAT punchthrough test"
}
newoption
{
trigger = "gtest",
description = "Enable unit tests using gtest"
}
}
configurations {"Release", "Debug"}
configuration "Release"
flags { "Optimize", "EnableSSE2","StaticRuntime", "NoMinimalRebuild", "FloatFast"}
configuration "Debug"
defines {"_DEBUG=1"}
flags { "Symbols", "StaticRuntime" , "NoMinimalRebuild", "NoEditAndContinue" ,"FloatFast"}
if os.is("Linux") then
if os.is64bit() then
platforms {"x64"}
@ -57,7 +58,7 @@
configuration {"x32"}
targetsuffix ("_" .. act)
configuration "x64"
configuration "x64"
targetsuffix ("_" .. act .. "_64" )
configuration {"x64", "debug"}
targetsuffix ("_" .. act .. "_x64_debug")
@ -65,7 +66,7 @@
targetsuffix ("_" .. act .. "_x64_release" )
configuration {"x32", "debug"}
targetsuffix ("_" .. act .. "_debug" )
configuration{}
postfix=""
@ -78,45 +79,46 @@
}
end
flags { "NoRTTI", "NoExceptions"}
defines { "_HAS_EXCEPTIONS=0" }
targetdir "../bin"
location("./" .. act .. postfix)
projectRootDir = os.getcwd() .. "/../"
print("Project root directroy: " .. projectRootDir);
print("Project root directory: " .. projectRootDir);
dofile ("findOpenCL.lua")
dofile ("findDirectX11.lua")
dofile ("findOpenGLGlewGlut.lua")
language "C++"
if _OPTIONS["gtest"] then
if _OPTIONS["gtest"] then
include "../test/gtest-1.7.0"
-- include "../test/hello_gtest"
include "../test/TestBullet3OpenCL"
end
if findOpenGL() then
include "../Demos3/AllBullet2Demos"
include "../Demos3/GpuDemos"
-- include "../Demos3/CpuDemos"
-- include "../Demos3/Wavefront"
-- include "../btgui/MultiThreading"
include "../Demos3/Wavefront"
include "../btgui/MultiThreading"
include "../btgui/OpenGLWindow"
include "../Demos3/ImplicitCloth"
include "../Demos3/SimpleOpenGL3"
-- include "../Demos3/ImplicitCloth"
-- include "../Demos3/SimpleOpenGL3"
include "../btgui/lua-5.2.3"
include "../test/lua"
include "../btgui/Gwen"
include "../btgui/GwenOpenGLTest"
end
-- include "../demo/gpudemo"
if _OPTIONS["midi"] then
include "../btgui/MidiTest"
@ -124,58 +126,49 @@ end
-- include "../opencl/vector_add_simplified"
-- include "../opencl/vector_add"
include "../btgui/Gwen"
include "../btgui/GwenOpenGLTest"
include "../test/clew"
include "../Demos3/GpuGuiInitialize"
include "../test/OpenCL/BasicInitialize"
include "../test/OpenCL/KernelLaunch"--
-- include "../test/clew"
-- include "../Demos3/GpuGuiInitialize"
-- include "../test/OpenCL/BasicInitialize"
include "../test/OpenCL/KernelLaunch"--
-- include "../test/OpenCL/BroadphaseCollision"
-- include "../test/OpenCL/NarrowphaseCollision"
include "../test/OpenCL/ParallelPrimitives"
include "../test/OpenCL/RadixSortBenchmark"
include "../src/BulletSoftBody"
include "../src/BulletSoftBody"
include "../src/BulletDynamics"
include "../src/BulletCollision"
include "../src/LinearMath"
include "../src/Bullet3Dynamics"
include "../src/Bullet3Common"
include "../src/Bullet3Geometry"
include "../src/Bullet3Collision"
include "../src/Bullet3Serialize/Bullet2FileLoader"
include "../src/Bullet3OpenCL"
-- include "../demo/gpu_initialize"
-- include "../opencl/lds_bank_conflict"
-- include "../opencl/reduce"
include "../btgui/OpenGLTrueTypeFont"
-- include "../btgui/OpenGLTrueTypeFont"
-- include "../btgui/OpenGLWindow"
-- include "../demo/ObjLoader"
-- include "../test/b3DynamicBvhBroadphase"
if _OPTIONS["enet"] then
include "../btgui/enet"
include "../test/enet/server"
include "../test/enet/client"
end
if _OPTIONS["bullet2gpu"] then
include "../src/LinearMath"
include "../src/BulletCollision"
include "../src/BulletDynamics"
include "../src/BulletSoftBody"
include "../ObsoleteDemos/HelloWorld"
include "../Demos3"
include "../src/LinearMath"
include "../src/BulletCollision"
include "../src/BulletDynamics"
include "../src/BulletSoftBody"
include "../ObsoleteDemos/HelloWorld"
include "../Demos3"
end