iOS with OpenGL running Basic Bullet Physics on 2 squares
C++ C Objective-C Shell Perl Python
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.



How to insert Bullet Physics into iOS: iOS OpenGL BulletPhysics Sample Code Link:

Download the sample code or follow on a new project form Xcode with iOS openGL template:

Download bullet physics... put it into a folder like the following:
*(notice that there is a folder for the project that contains the Xcode project file)

1.5. Run CMake in the physics directory to compile the frameworks (assuming you installed cmake already CMake: This step is optional with the sample code I uploaded since it already included the compiled frameworks in it....that made the file 100 megs but what is 100 megs these days anyway?

make -j4
sudo make install
Goto your MyProject.xcproj and open in Xcode...
in XCode goto any file you wish to add the physics code to... you must understand that cpp files are c++ and .m .h files are generally cocoa. You must change the Class you wish to add the physics engine code to have a .mm extension signifying it should be compiled as Objective-C++ code...

In the particular class you want to add the physics which is now an Objective-C++ file or a cpp file, add the line

#include "btBulletDynamicsCommon.h"
and you should compile...the error is that the file is not found...

Next goto the MyProjectFolder/bullet-2.78/src and drag the src folder into your project.
Delete the folder named will eliminate the error of trying to compile some openCL (.cl) files

Last step, copy the following frameworks from the src folder of your bullet physics installation into your project:

/MyProjectFolder/bullet-2.78/LinearMath/LinearMath.framework /MyProjectFolder/bullet-2.78/BulletCollision/BulletCollision.framework /MyProjectFolder/bullet-2.78/LinearMath/LinearMath.framework

Build and Run... should compile smoothly to iOS and Mac now...