added serialization support for gimpact mesh
improved cmake build system for updating the serialization structures
This commit is contained in:
@@ -9,17 +9,35 @@
|
||||
# You shouldn't have to modify anything below this line
|
||||
########################################################
|
||||
|
||||
IF (USE_GLUT)
|
||||
INCLUDE_DIRECTORIES(
|
||||
${BULLET_PHYSICS_SOURCE_DIR}/src ${BULLET_PHYSICS_SOURCE_DIR}/Demos/OpenGL
|
||||
)
|
||||
|
||||
INCLUDE_DIRECTORIES(
|
||||
${BULLET_PHYSICS_SOURCE_DIR}/src ${BULLET_PHYSICS_SOURCE_DIR}/Demos/OpenGL
|
||||
)
|
||||
LINK_LIBRARIES(
|
||||
OpenGLSupport BulletDynamics BulletCollision LinearMath GIMPACTUtils ConvexDecomposition ${GLUT_glut_LIBRARY} ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY}
|
||||
)
|
||||
|
||||
LINK_LIBRARIES(
|
||||
OpenGLSupport BulletDynamics BulletCollision LinearMath GIMPACTUtils ConvexDecomposition ${GLUT_glut_LIBRARY} ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY}
|
||||
)
|
||||
ADD_EXECUTABLE(AppGimpactTestDemo
|
||||
GimpactTestDemo.cpp
|
||||
GimpactTestDemo.h
|
||||
main.cpp
|
||||
)
|
||||
ELSE(USE_GLUT)
|
||||
|
||||
ADD_EXECUTABLE(AppGimpactTestDemo
|
||||
GimpactTestDemo.cpp
|
||||
main.cpp
|
||||
)
|
||||
INCLUDE_DIRECTORIES(
|
||||
${BULLET_PHYSICS_SOURCE_DIR}/src ${BULLET_PHYSICS_SOURCE_DIR}/Demos/OpenGL
|
||||
)
|
||||
|
||||
LINK_LIBRARIES(
|
||||
OpenGLSupport BulletDynamics BulletCollision LinearMath GIMPACTUtils ConvexDecomposition ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY}
|
||||
)
|
||||
|
||||
ADD_EXECUTABLE(AppGimpactTestDemo
|
||||
WIN32
|
||||
GimpactTestDemo.cpp
|
||||
GimpactTestDemo.h
|
||||
../OpenGL/Win32AppMain.cpp
|
||||
Win32GimpactDemo.cpp
|
||||
)
|
||||
ENDIF(USE_GLUT)
|
||||
|
||||
@@ -626,7 +626,7 @@ void GimpactConcaveDemo::clientMoveAndDisplay()
|
||||
renderme();
|
||||
|
||||
glFlush();
|
||||
glutSwapBuffers();
|
||||
swapBuffers();
|
||||
|
||||
}
|
||||
|
||||
@@ -642,7 +642,7 @@ void GimpactConcaveDemo::displayCallback(void) {
|
||||
m_dynamicsWorld->debugDrawWorld();
|
||||
|
||||
glFlush();
|
||||
glutSwapBuffers();
|
||||
swapBuffers();
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
@@ -15,7 +15,15 @@ subject to the following restrictions:
|
||||
#ifndef TEST_CONCAVE_DEMO_H
|
||||
#define TEST_CONCAVE_DEMO_H
|
||||
|
||||
|
||||
#ifdef _WINDOWS
|
||||
#include "Win32DemoApplication.h"
|
||||
#define PlatformDemoApplication Win32DemoApplication
|
||||
#else
|
||||
#include "GlutDemoApplication.h"
|
||||
#define PlatformDemoApplication GlutDemoApplication
|
||||
#endif
|
||||
|
||||
class btTriangleIndexVertexArray;
|
||||
class btDefaultCollisionConfiguration;
|
||||
|
||||
@@ -47,7 +55,7 @@ struct btCollisionAlgorithmCreateFunc;
|
||||
|
||||
///GimpactConcaveDemo shows usage of static concave triangle meshes
|
||||
///It also shows per-triangle material (friction/restitution) through CustomMaterialCombinerCallback
|
||||
class GimpactConcaveDemo : public GlutDemoApplication
|
||||
class GimpactConcaveDemo : public PlatformDemoApplication
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
25
Demos/GimpactTestDemo/Win32GimpactDemo.cpp
Normal file
25
Demos/GimpactTestDemo/Win32GimpactDemo.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 "GimpactTestDemo.h"
|
||||
|
||||
///The 'createDemo' function is called from Bullet/Demos/OpenGL/Win32AppMain.cpp to instantiate this particular demo
|
||||
DemoApplication* createDemo()
|
||||
{
|
||||
return new GimpactConcaveDemo();
|
||||
}
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user