Skip to content

A customizable 3D graphics and physics application supporting Android and desktop builds.

License

MIT, Apache-2.0 licenses found

Licenses found

MIT
LICENSE
Apache-2.0
LICENSE-2.0
Notifications You must be signed in to change notification settings

chrisliebert/droidgfxsim

Repository files navigation

Copyright (C) 2017 Chris Liebert

https://chrisliebert.github.io/droidgfxsim/

This Android app uses a native OpenGL ES 2/3 compatable render system along with
the Bullet Physics SDK to provide an XML-defined graphical 3D simulation that can
also be built as a native desktop application using GLFW3 for window
management. The Android portion of application is derived from the gles3jni
Android SDK sample ( see https://github.com/googlesamples/android-ndk/tree/master/gles3jni ).

Building the Desktop Application:
All third-party dependencies are either included in the repository or installed
via the ExternalProject_Add function provided by the CMake build system and Git. It can be
built for Windows with MSVC, MinGW or Linux.
$ cmake -G"MinGW Makefiles" /path/to/source/native && cmake --build .

The build script will attempt to download and build all dependencies then link them statically.
An advantage of this approach is the ability to specify different compiler flags and anable debug
symbols which is done automatically unless -DCMAKE_BUILD_TYPE:STRING=Release is specified.
Note: changing from Debug to Release after the initial build will cause problems, it is recommended
to use a separate directory when compiling Debug and Release builds.
The following dependencies will be fetched via Git:

https://github.com/glfw/glfw.git
https://github.com/g-truc/glm.git
https://github.com/syoyo/tinyobjloader.git
https://github.com/bulletphysics/bullet3.git

Exising versions of these dependencies can be specified by enabling the following CMake parameters:
-DUSE_EXISTING_GLFW3:BOOL=ON
-DUSE_EXISTING_GLM:BOOL=ON
-DUSE_EXISTING_BULLET:BOOL=ON
-DUSE_EXISTING_TINYOBJLOADER:BOOL=ON

Running the Desktop Application:
There are various assets found in app/src/main/assets that need to be in the current directory in
order for the application to work correctly.
$ cd app/src/main/assets
$ /path/to/binary/desktop_app

Building the Android Application:
This application requires the Android NDK and relies on a slightly different CMake build script
than the desktop application and will be used to produce shared libraries for multiple architectures.
The CMake build is triggered by the top-level Gradle build script:
$ gradlew build

License Information:
There are source files included from the Android Open Source Project:
gl3stub_wrapper.c
gl3stub.c.inc
gl3stub.h
These files use the Apache License, Version 2.0 ( see LICENSE-2.0 )
which were copied from the gles3jni Android sample and used for compatibility.
There are a number of included dependencies that use various permissive open source licences such as
stb_image.h, rapidxml.hpp, and OpenGL extension loading provided by the GLAD code generator.
All sources in this directory authored by Chris Liebert are provided under the MIT license, for more 
see LICENSE.

About

A customizable 3D graphics and physics application supporting Android and desktop builds.

Topics

Resources

License

MIT, Apache-2.0 licenses found

Licenses found

MIT
LICENSE
Apache-2.0
LICENSE-2.0

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published