Giter Site home page Giter Site logo

linecode / orbitengine Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mlomb/orbitengine

0.0 0.0 0.0 3.06 MB

Another cross-platform, multi-API Graphics Engine

Home Page: https://doc.oe.mlomb.me

License: Apache License 2.0

CMake 4.36% HTML 0.24% C++ 95.01% GLSL 0.12% PowerShell 0.22% Shell 0.04%

orbitengine's Introduction

Build Status Build Status

OrbitEngine

OrbitEngine is a Cross-Platform and multi-API Graphics Engine. The main objective is that you can use the Engine in different ways and different platforms and it just works.

These ways are:

  • API specific classes like GLShader, D3DBuffer, GLTexture, D3DMesh.
  • API agnostic interfaces like Buffer, Mesh, Texture that will instantiate the corresponding one depending on the active context.
  • Renderers like BatchRenderer2D, PathRenderer2D, DeferredRenderer, ForwardRenderer.
  • Engine high-level stuff like Scene, SceneObject.

The current supported APIs are:

  • OpenGL & OpenGLES
  • Direct3D11

And we have plans to implement Vulkan and maybe Direct3D12.

The current supported platforms are:

  • Android
  • Emscripten
  • Linux
  • Windows

Documentation

Currently we have none. This is something that take some time, but you can see some samples on the samples repositry.

Dependencies

Currently, OrbitEngine is making use of this libraries:

  • FreeType, an open source library to render fonts
  • FreeImage, an open source library to manage popular graphics images formats
  • XShaderCompiler, an open source library to cross compiler shaders
  • Assimp, an open source library to import and export 3d model formats

All are included as submodules.

Building

OrbitEngine relies on the CMake build system 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 and the Ninja build system.

Then, you have to run cmake with the Emscripten toolchain and the generator Ninja. For example:

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:

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:

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:

# 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.

orbitengine's People

Contributors

mlomb 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.