/Box3D

Primary LanguageCMIT LicenseMIT

Box3D

C++ & OpenGL | Box3D engine

Usage

There are two general ways to use this solution:

  1. Build the libraries in the solution and run their unit tests.
  2. Build the engine program and its plugins, and configure and run the engine.

Unit tests

Each library in the solution comes with unit tests. There are two main ways to run the tests:

  1. Use CTest.
  2. Run individual unit test runners directly (e.g. build/Box3D/test/Debug/Box3DTests.exe).

Programs and libraries hosted in this solution

  • Boost provides free peer-reviewed portable C++ source libraries.
  • googletest Google Testing and Mocking Framework.
  • json for Modern C++.
  • MySQL Connector/C++ provides developers a JDBC-like API driver for MySQL.

Supported platforms / recommended toolchains

The following are recommended toolchains for popular platforms.

  • Windows -- Visual Studio (Microsoft Visual C++)
  • Linux -- clang or gcc
  • MacOS -- Xcode (clang)

Building

There are two distinct steps in the build process:

  1. Generation of the build system, using CMake
  2. Compiling, linking, etc., using CMake-compatible toolchain

Prerequisites

  • CMake version 3.8 or newer
  • C++17 toolchain compatible with CMake for your development platform (e.g. Visual Studio on Windows)

How to install

git clone https://github.com/Campeanu/Box3D.git

git submodule init
git submodule update

Build system generation

mkdir build
cd build
cmake -G "Visual Studio 16 2019" -A "x64" ..

Compiling, linking ...

Either use CMake or your toolchain's IDE to build. For CMake:

cd build
cmake --build . --config Debug