项目作者: DaftMat

项目描述 :
3D Editor/Render Engine.
高级语言: C++
项目地址: git://github.com/DaftMat/Daft-Engine.git
创建时间: 2020-07-06T00:06:12Z
项目社区:https://github.com/DaftMat/Daft-Engine

开源协议:MIT License

下载


Daft-Engine

Cross platform 3D Engine-Editor made in C++/OpenGL/Qt.

To download this template, make sure you download the submodules as well :

  1. $ git clone --recurse-submodules https://github.com/DaftMat/Daft-Engine.git

Dependencies

As git submodules

To install

How to install deps

Note: For Qt5, use the link above to install it on windows or linux.

#

On linux using apt package manager :

  1. $ sudo apt update
  2. $ sudo apt install libomp-dev libgl1-mesa-dev libglu1-mesa-dev xorg-dev libxrandr-dev libxcb-randr0-dev libxinerama-dev libglm-dev libassimp-dev libeigen3-dev libglew-dev libglfw3-dev

On mac using homebrew :

  1. $ brew update
  2. $ brew install libomp glm eigen assimp qt glfw

On windows using vcpkg (make sure vcpkg is updated) :

  1. $ vcpkg install glm:x64-windows eigen3:x64-windows assimp:x64-windows glfw3:x64-windows
  2. $ vcpkg integrate install

Note: the command vcpkg integrate install will give you a path to the vcpkg toolchain, copy this path.

Compiling & Executing

You can choose the OpenGL version you want to use by setting the variable GLAD_VERSION to it (from gl33core to gl46core).
If you don’t specify a version, it’s on gl46core by default.

Compiling on Linux/MacOSX

  1. $ mkdir build
  2. $ cd build
  3. $ cmake [-DGLAD_VERSION="glXYcore"] ..
  4. $ make

Compiling on Windows (from powershell)

  1. $ mkdir build
  2. $ cd build
  3. $ cmake -DCMAKE_TOOLCHAIN_FILE="C:/vcpkg/scripts/buildsystems/vcpkg.cmake" [-DGLAD_VERSION="glXYcore"] -G "Visual Studio 16 2019" -A x64 ..
  4. $ cmake --build .

Note: you can use the path you copied before, but make sure the format is the same as before.

Executing

Then you can go and run the project from the bin/Release (or bin/Debug) folder:

  1. $ ./DaftEngineApp

Troubleshooting

Qt5 not found

For some reasons, Qt5 could be not found by cmake, which will output the following error:

  1. Could not find a package configuration file provided by "Qt5" with any of
  2. the following names:
  3. Qt5Config.cmake
  4. qt5-config.cmake
  5. Add the installation prefix of "Qt5" to CMAKE_PREFIX_PATH or set "Qt5_DIR"
  6. to a directory containing one of the above files. If "Qt5" provides a
  7. separate development package or SDK, be sure it has been installed.

The problem is solved by setting the cmake variable Qt5_DIR to the installation directory of Qt5.

The cmake command will then look like this:

  • On linux:

    1. $ cmake -DQt5_DIR="/path/to/Qt/5.x.y/gcc_64/" ..
  • On macos:

    1. $ cmake -DCMAKE_PREFIX_PATH="/usr/local/otp/qt/lib/cmake" ..
  • On windows:

    1. $ set Qt5_DIR="C:\path\to\qt\5.x.y\msvc2019_64"
    2. $ cmake -DCMAKE_TOOLCHAIN_FILE="C:/vcpkg/scripts/buildsystems/vcpkg.cmake" -G "Visual Studio 16 2019" -A x64 ..

Continuous Integration

Continuous Integration and automated code review is active on this project :

Application Status
Travis Build Status
Appveyor Build status
Codacy Codacy Badge