Skip to content

Latest commit

 

History

History
102 lines (71 loc) · 2.49 KB

File metadata and controls

102 lines (71 loc) · 2.49 KB

Android OpenGL IMGUI

AOGI (Android OpenGL IMGUI) is a simple ImGui template for HXO modules and normal Android shared libraries.
It provides OpenGL ES rendering and touch input support by hooking libinput.

Preview

Dependencies

  1. Gamepwange
  2. IMGUI
  3. HXO Loader
  4. GLAD
  5. EGL

Usage

To use this binary, first compile it automatically via CLion or Android Studio by cloning the project:

git clone https://github.com/Kitsuri-Studios/Android-IMGUI-OpenGL.git

or manually:

# ---- EDIT THESE VARIABLES ----
NDK="/path/to/android-ndk"
SRC="/path/to/project"
BUILD="$SRC/build-android-arm64"
ABI="arm64-v8a"
PLATFORM="android-33"
# -------------------------------

# Configure
cmake -S "$SRC" -B "$BUILD" \
  -DCMAKE_TOOLCHAIN_FILE="$NDK/build/cmake/android.toolchain.cmake" \
  -DANDROID_ABI="$ABI" \
  -DANDROID_PLATFORM="$PLATFORM" \
  -DCMAKE_BUILD_TYPE=Debug

# Build
cmake --build "$BUILD" -- -j$(nproc 2>/dev/null || sysctl -n hw.ncpu 2>/dev/null || echo 4)

The project can be exported as either a .so (Shared Object) or a .hxo (HXO Loader module).
For .so builds, a constructor attribute is added at the entry point.
For .hxo builds, the constructor is not needed since HXO uses its own _init_hxo entry point.


Requirements To Build The Project

  1. Clang
  2. Android Platform Tools
  3. Android NDK

File Structure

Source Files


How To Use

1. HXO Usage

Requires

  1. A HXO loaded (v1.2.0+) APK. Details: here
  2. The target app must be using an OpenGL renderer with a valid GL context.

Setup

Build the project and copy the exported module into the app’s HXO module directory:

/storage/emulated/0/Android/media/<APP_ID>/modules

2. Shared Object

Build the project and load the .so file in any Android app via:

System.load("/path/to/libaethra.so")

Any dynamic linker will work as long as the library is loaded correctly and a valid GL context is present.