Git Product home page Git Product logo

radium-engine's Introduction

Radium-Engine

Coolest engine ever made #yolo #swag

See this presentation for an overview of the project.

Dependencies

  • Eigen 3.3 (as submodule in repository)
  • Assimp 3.2 (as submodule in repository)
  • glbinding (as submodule in repository)
  • globjects (as submodule in repository)
  • glm (as submodule in repository)
  • OpenGL 3+ / GLSL 330+
  • Qt Core, Qt Widgets and Qt OpenGL v5.5+ (5.10 recommended)
  • stb_image (in repository)
  • To build : CMake 3.0.+

Supported compiler and platforms

The following platforms and tool chains have been tested and should work :

  • Windows : MSVC 2017 cmake support, MinGW-32 4.9.2 (with Qt Creator).
  • Mac OSX : gcc 5 or higher, Apple clang
  • Linux : gcc 5 or higher, clang

Continuous Integration:

Build instructions

Getting submodules

Eigen, Assimp, glbinding, globjects, glm are submodules : you can get them by running these two commands

$ git submodule init
$ git submodule update

Folder structure

Radium-Engine relies on CMake buildchain on all supported platforms. In most cases, building should be pretty straightforward, provided that cmake can locate the dependencies. You will need to have the openGL headers and libraries, Qt 5.4 or more and cmake. If cmake doesn't locate the Qt files (e.g. if you manually installed Qt as opposed to using your distribution's package), see the troubleshooting section below.

See plateform-dependent instructions for detailled how-to.

Build output is generated in the Radium-Engine/Bundle-* directory (with * the name of the CXX compiler), with the following structure:

Bundle-*
  - 3rdPartyLibraries
  - Debug: bin/, lib/
  - Release: bin/, lib/
  - ...  #other build types if any (generated at compile time)

3rdPartyLibraries are always compiled in Release mode. Plugins are generated in bin/Plugins.

Configure build

Radium offers two build options which are off by default :

  • RADIUM_WITH_DOUBLE_PRECISION sets the floating point format to double-precision instead of single precisition
  • RADIUM_WITH_OMP instructs the compiler to use OpenMP

Building on Linux/MacOS (command line instruction)

Out-of source builds are mandatory, we recommand to follow the usual sequence:

$ mkdir build
$ cd build
$ cmake ..
$ make

Building on Microsoft Windows with Visual Studio

Supported versions of MSVC

Since Radium requires:

  • the C++11/C++14 advanced features such as constexpr,
  • cmake built-in support

you will need a recent MSVC (2017 minimum). We tested our code with VS 2017 Community (https://www.visualstudio.com/products/visual-studio-community-vs), with the CMake Tools for Visual Studio extension.

See general instruction on cmake for Visual Studio here: https://blogs.msdn.microsoft.com/vcblog/2016/10/05/cmake-support-in-visual-studio/

Dependencies

Qt distributes version 5.10 with precompiled libraries for VS 2017 - 64 bits. If using earlier versions of Qt (5.5) or a different toolset you may have to compile Qt yourself. You will probaby have to manually point cmake to the Qt folder (see Troubleshooting below)

Other dependencies (Eigen, Assimp, glbinding, globjects and glm) are included as a submodule in the git repository.

Getting started with Visual Studio

Thanks to the integrated support of CMake in Visual Studio, you don't need a VS solution to build your project: open the Radium folder (via File > Open > Folder ... or devenv.exe <foldername>). VS should run cmake, generate the target builds (Debug and Release by default). Other build types can be added by editing CMakeSettings.json.

You may have Cmake errors occuring at the first run (see Troubleshooting section below). To fix them, you need to edit the VS-specific file CMakeSettings.json, via CMake > Change CMake Settings > path-to-CMakeLists (configuration-name) from the main menu. For instance, it usually requires to set cmake build types manually, and to give path to Qt libraries. To fix it, edit CMakeSettings.json, such that

    {
      "name": "x64-Debug",
      "generator": "Ninja",
      "configurationType": "Debug",
      "inheritEnvironments": [ "msvc_x64_x64" ],
      "buildRoot": "${env.USERPROFILE}\\CMakeBuilds\\${workspaceHash}\\build\\${name}",
      "installRoot": "${env.USERPROFILE}\\CMakeBuilds\\${workspaceHash}\\install\\${name}",
      "cmakeCommandArgs": "-DCMAKE_PREFIX_PATH=C:/Qt-5.10/5.10.0/msvc2017_64 -DCMAKE_BUILD_TYPE=Debug",
      "buildCommandArgs": "-v",
      "ctestCommandArgs": ""
    },
    {
      "name": "x64-Release",
      "generator": "Ninja",
      "configurationType": "Release",
      "inheritEnvironments": [ "msvc_x64_x64" ],
      "buildRoot": "${env.USERPROFILE}\\CMakeBuilds\\${workspaceHash}\\build\\${name}",
      "installRoot": "${env.USERPROFILE}\\CMakeBuilds\\${workspaceHash}\\install\\${name}",
      "cmakeCommandArgs": "-DCMAKE_PREFIX_PATH=C:/Qt-5.10/5.10.0/msvc2017_64 -DCMAKE_BUILD_TYPE=Release",
      "buildCommandArgs": "-v",
      "ctestCommandArgs": ""
    },

Note: it is strongly encouraged to use / separators in your path, instead of \\ as previously mentionned. See https://stackoverflow.com/questions/13737370/cmake-error-invalid-escape-sequence-u

Compilation

Right click on CMakeList.txt > build > all.

Building with QtCreator

QtCreator is supported on Windows, MacOS and Linux. No specific requirement here, just open Radium-Engine CMake project and enjoy !

Troubleshooting

Qt cmake errors

In case you run into an error like

By not providing "FindQt5Widgets.cmake" in CMAKE_MODULE_PATH this project
has asked CMake to find a package configuration file provided by
"Qt5Widgets", but CMake did not find one.

you need to set CMAKE_PREFIX_PATH, pointing to the Qt root dir of your commpiler. For example on linux with gcc :

$ cmake -DCMAKE_PREFIX_PATH=/opt/Qt/5.x/gcc_64

On windows, using cmake-gui you can use the "add entry" button, adding CMAKE_PREFIX_PATH as a string to point to the Qt directory (for example in the default installation : C:/Qt/5.6/msvc2015_64 )

Crash when starting main application on windows

This is usally caused by missing dlls. With Visual Studio, you may need to copy the Qt dlls to Radium bin folder Bundle-MSVC\{Release-or-Debug}\bin.

Documentation

For more documentation about the engine (how to develop a plugin, how renderer works, how to setup a scene file, ...), please refer to the Docs/ folder.

radium-engine's People

Contributors

louen avatar cmourglia avatar nmellado avatar bangles avatar dlyr avatar mauriziokovacic avatar mathiaspaulin avatar hoshiryu avatar zarzwick avatar syn4ck avatar agathed avatar thibaultlejemble avatar matthieu-locussol avatar yenapas avatar

Watchers

PeterZhouSZ avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.