https://github.com/mlomb/orbitengine
Another hobby cross-platform, multi-API graphics engine
https://github.com/mlomb/orbitengine
cmake cross-platform direct3d engine graphics opengl opengles
Last synced: 5 months ago
JSON representation
Another hobby cross-platform, multi-API graphics engine
- Host: GitHub
- URL: https://github.com/mlomb/orbitengine
- Owner: mlomb
- License: apache-2.0
- Created: 2017-08-01T14:46:41.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2021-08-28T16:07:17.000Z (about 4 years ago)
- Last Synced: 2024-10-04T13:29:54.525Z (about 1 year ago)
- Topics: cmake, cross-platform, direct3d, engine, graphics, opengl, opengles
- Language: C++
- Homepage: https://doc.oe.mlomb.me
- Size: 9.55 MB
- Stars: 20
- Watchers: 4
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://travis-ci.org/mlomb/OrbitEngine)
[](https://ci.appveyor.com/project/mlomb/orbitengine)# OrbitEngine
OrbitEngine is a cross-platform and multi-API graphics engine. It is a personal project.Supported APIs:
* OpenGL & OpenGLES
* Direct3D11Supported platforms:
* Android
* Emscripten
* Linux
* Windows## Dependencies
Currently, OrbitEngine is making use of this libraries:
* [FreeType](https://www.freetype.org/), an open source library to render fonts
* [FreeImage](http://freeimage.sourceforge.net/), an open source library to manage popular graphics images formats
* [XShaderCompiler](https://github.com/LukasBanana/XShaderCompiler/), an open source library to cross compiler shaders
* [Assimp](https://github.com/assimp/assimp/), an open source library to import and export 3d model formatsAll are included as submodules.
## Building
OrbitEngine relies on the [CMake build system](https://cmake.org/) and requires a CXX11 compiler.Don't forget to update the submodules or clone the repositry with `--recursive`.
### Windows
You can just run `cmake` and then compile it with Visual Studio.### Web (Emscripten)
On Windows, you must to have installed the [Emscripten SDK](https://kripken.github.io/emscripten-site/docs/getting_started/downloads.html) and the [Ninja build system](https://ninja-build.org/).Then, you have to run `cmake` with the Emscripten toolchain and the generator `Ninja`. For example:
```shell
cmake -GNinja -DCMAKE_TOOLCHAIN_FILE="%EMSCRIPTEN_SDK%\cmake\Modules\Platform\Emscripten.cmake"
```
After that, you can run `ninja` on the output directory.
### Android
To build for Android on Windows, you must have the Android NDK 25.2.5. The newer versions of the NDK deprecated the way we create the APK files. (This is something to refactor)In you Application CMakeLists you should call the procedure `android_create_apk` to generate the APK file:
```cmake
if(ANDROID)
# Make sure that the Android entry point isnt getting stripped, find a better solution
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -u ANativeActivity_onCreate")include(${OrbitEngine_SOURCE_DIR}/CMake/Android/APK.cmake)
android_create_apk(Sandbox "${CMAKE_BINARY_DIR}/APK" "libApplication.so" "")
endif()
```
Don't forget to link it as a shared library!Now you run CMake with the Android toolchain. For example:
```shell
cmake -GNinja -DCMAKE_TOOLCHAIN_FILE="%ANDROID_NDK%\build\cmake\android.toolchain.cmake" -DANDROID_ABI=armeabi-v7a -DANDROID_PLATFORM=android-21
```
The entry point is handled by the Engine, you should use the common `main`. This allows the code only be written once between platforms.### Linux
You can use CMake with Make.Don't forget to download these packages:
```shell
# X11
sudo apt-get install libx11-dev
# GL
sudo apt-get install freeglut3-dev
# GLES1 & GLES2 & EGL
sudo apt-get install libgles1-mesa libgles2-mesa-dev
```## License
See [LICENSE](LICENSE).