copy glut*.dll next to executable using cmake postbuild step
re-add CollisionInterfaceDemo to cmake
This commit is contained in:
@@ -10,15 +10,36 @@
|
||||
########################################################
|
||||
|
||||
|
||||
INCLUDE_DIRECTORIES(
|
||||
${BULLET_PHYSICS_SOURCE_DIR}/src ${BULLET_PHYSICS_SOURCE_DIR}/Demos/OpenGL
|
||||
)
|
||||
IF (USE_GLUT)
|
||||
INCLUDE_DIRECTORIES(
|
||||
${BULLET_PHYSICS_SOURCE_DIR}/src ${BULLET_PHYSICS_SOURCE_DIR}/Demos/OpenGL
|
||||
)
|
||||
|
||||
LINK_LIBRARIES(
|
||||
OpenGLSupport BulletDynamics BulletCollision LinearMath ${GLUT_glut_LIBRARY} ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY}
|
||||
)
|
||||
LINK_LIBRARIES(
|
||||
OpenGLSupport BulletDynamics BulletCollision LinearMath ${GLUT_glut_LIBRARY} ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY}
|
||||
)
|
||||
|
||||
ADD_EXECUTABLE(AppCollisionInterfaceDemo
|
||||
CollisionInterfaceDemo.cpp
|
||||
)
|
||||
ADD_EXECUTABLE(AppCollisionInterfaceDemo
|
||||
CollisionInterfaceDemo.cpp
|
||||
CollisionInterfaceDemo.h
|
||||
main.cpp
|
||||
|
||||
)
|
||||
ELSE (USE_GLUT)
|
||||
INCLUDE_DIRECTORIES(
|
||||
${BULLET_PHYSICS_SOURCE_DIR}/src ${BULLET_PHYSICS_SOURCE_DIR}/Demos/OpenGL
|
||||
)
|
||||
|
||||
LINK_LIBRARIES(
|
||||
OpenGLSupport BulletDynamics BulletCollision LinearMath ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY}
|
||||
)
|
||||
|
||||
ADD_EXECUTABLE(AppCollisionInterfaceDemo
|
||||
WIN32
|
||||
CollisionInterfaceDemo.cpp
|
||||
CollisionInterfaceDemo.h
|
||||
Win32CollisionInterfaceDemo.cpp
|
||||
../OpenGL/Win32AppMain.cpp
|
||||
)
|
||||
ENDIF (USE_GLUT)
|
||||
|
||||
|
||||
@@ -44,16 +44,6 @@ int screenWidth = 640;
|
||||
int screenHeight = 480;
|
||||
GLDebugDrawer debugDrawer;
|
||||
|
||||
int main(int argc,char** argv)
|
||||
{
|
||||
CollisionInterfaceDemo* collisionInterfaceDemo = new CollisionInterfaceDemo();
|
||||
|
||||
collisionInterfaceDemo->initPhysics();
|
||||
|
||||
collisionInterfaceDemo->clientResetScene();
|
||||
|
||||
return glutmain(argc, argv,screenWidth,screenHeight,"Collision Interface Demo",collisionInterfaceDemo);
|
||||
}
|
||||
|
||||
void CollisionInterfaceDemo::initPhysics()
|
||||
{
|
||||
@@ -260,7 +250,7 @@ void CollisionInterfaceDemo::displayCallback(void) {
|
||||
}
|
||||
|
||||
glFlush();
|
||||
glutSwapBuffers();
|
||||
swapBuffers();
|
||||
}
|
||||
|
||||
void CollisionInterfaceDemo::clientResetScene()
|
||||
|
||||
@@ -15,10 +15,16 @@ subject to the following restrictions:
|
||||
#ifndef COLLISION_INTERFACE_DEMO_H
|
||||
#define COLLISION_INTERFACE_DEMO_H
|
||||
|
||||
#ifdef _WINDOWS
|
||||
#include "Win32DemoApplication.h"
|
||||
#define PlatformDemoApplication Win32DemoApplication
|
||||
#else
|
||||
#include "GlutDemoApplication.h"
|
||||
#define PlatformDemoApplication GlutDemoApplication
|
||||
#endif
|
||||
|
||||
///CollisionInterfaceDemo shows how to use the collision detection without dynamics (btCollisionWorld/CollisionObject)
|
||||
class CollisionInterfaceDemo : public GlutDemoApplication
|
||||
class CollisionInterfaceDemo : public PlatformDemoApplication
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
25
Demos/CollisionInterfaceDemo/Win32CollisionInterfaceDemo.cpp
Normal file
25
Demos/CollisionInterfaceDemo/Win32CollisionInterfaceDemo.cpp
Normal file
@@ -0,0 +1,25 @@
|
||||
#ifdef _WINDOWS
|
||||
/*
|
||||
Bullet Continuous Collision Detection and Physics Library
|
||||
Copyright (c) 2003-2009 Erwin Coumans http://bulletphysics.org
|
||||
|
||||
This software is provided 'as-is', without any express or implied warranty.
|
||||
In no event will the authors be held liable for any damages arising from the use of this software.
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it freely,
|
||||
subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
#include "CollisionInterfaceDemo.h"
|
||||
|
||||
///The 'createDemo' function is called from Bullet/Demos/OpenGL/Win32AppMain.cpp to instantiate this particular demo
|
||||
DemoApplication* createDemo()
|
||||
{
|
||||
return new CollisionInterfaceDemo();
|
||||
}
|
||||
|
||||
#endif
|
||||
15
Demos/CollisionInterfaceDemo/main.cpp
Normal file
15
Demos/CollisionInterfaceDemo/main.cpp
Normal file
@@ -0,0 +1,15 @@
|
||||
|
||||
#include "CollisionInterfaceDemo.h"
|
||||
#include "GlutStuff.h"
|
||||
#include "btBulletDynamicsCommon.h"
|
||||
|
||||
int main(int argc,char** argv)
|
||||
{
|
||||
CollisionInterfaceDemo* collisionInterfaceDemo = new CollisionInterfaceDemo();
|
||||
|
||||
collisionInterfaceDemo->initPhysics();
|
||||
|
||||
collisionInterfaceDemo->clientResetScene();
|
||||
|
||||
return glutmain(argc, argv,screenWidth,screenHeight,"Collision Interface Demo",collisionInterfaceDemo);
|
||||
}
|
||||
Reference in New Issue
Block a user