Skip to content

Commit 69f154f

Browse files
committed
Add Bullet Physics Support
1 parent 81f7364 commit 69f154f

4 files changed

Lines changed: 17 additions & 1 deletion

File tree

‎.gitmodules‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,7 @@
1818
path = Glitter/Vendor/stb
1919
url = https://github.com/nothings/stb.git
2020
branch = master
21+
[submodule "Glitter/Vendor/bullet"]
22+
path = Glitter/Vendor/bullet
23+
url = https://github.com/bulletphysics/bullet3.git
24+
branch = master

‎CMakeLists.txt‎

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,13 @@ option(ASSIMP_BUILD_SAMPLES OFF)
1111
option(ASSIMP_BUILD_TESTS OFF)
1212
add_subdirectory(Glitter/Vendor/assimp)
1313

14+
option(BUILD_BULLET2_DEMOS OFF)
15+
option(BUILD_CPU_DEMOS OFF)
16+
option(BUILD_EXTRAS OFF)
17+
option(BUILD_OPENGL3_DEMOS OFF)
18+
option(BUILD_UNIT_TESTS OFF)
19+
add_subdirectory(Glitter/Vendor/bullet)
20+
1421
if(MSVC)
1522
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4")
1623
else()
@@ -22,6 +29,7 @@ endif()
2229

2330
include_directories(Glitter/Headers/
2431
Glitter/Vendor/assimp/include/
32+
Glitter/Vendor/bullet/src/
2533
Glitter/Vendor/glad/include/
2634
Glitter/Vendor/glfw/include/
2735
Glitter/Vendor/glm/
@@ -50,6 +58,8 @@ add_definitions(-DGLFW_INCLUDE_NONE
5058
add_executable(${PROJECT_NAME} ${PROJECT_SOURCES} ${PROJECT_HEADERS}
5159
${PROJECT_SHADERS} ${PROJECT_CONFIGS}
5260
${VENDORS_SOURCES})
53-
target_link_libraries(${PROJECT_NAME} assimp glfw ${GLFW_LIBRARIES} ${GLAD_LIBRARIES})
61+
target_link_libraries(${PROJECT_NAME} assimp glfw
62+
${GLFW_LIBRARIES} ${GLAD_LIBRARIES}
63+
BulletDynamics BulletCollision LinearMath)
5464
set_target_properties(${PROJECT_NAME} PROPERTIES
5565
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${PROJECT_NAME})

‎Glitter/Headers/glitter.hpp‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#include <assimp/Importer.hpp>
88
#include <assimp/postprocess.h>
99
#include <assimp/scene.h>
10+
#include <btBulletDynamicsCommon.h>
1011
#include <glad/glad.h>
1112
#include <glm/glm.hpp>
1213
#include <glm/gtc/type_ptr.hpp>

‎Glitter/Vendor/bullet‎

Submodule bullet added at 9938db9

0 commit comments

Comments
 (0)