Giter Club home page Giter Club logo

androidsurfaceimgui's Introduction

AndroidSurfaceImgui

介绍

  • 支持RPC进行多进程/远程绘制。
  • 支持鼠标滚轮
  • 支持物理键盘输入
  • 支持横/竖屏自动切换

在Android使用上API创建Surface并进行Dear ImGui的绘制。

注意:如果拥有Surface的进程的用户权限在shell之下,则你的Surface不会被系统添加到根视图,也就是不会显示出来,详情请看:SurfaceFlinger.cpp

支持系统版本

  • Android9
  • Android10
  • Android11
  • Android12
  • Android13
  • Android14

编译

  1. 确保在项目根目录打开命令行终端 。
  2. 执行git submodule init
  3. 执行git submodule update
  4. 执行cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=${NDK_PATH}build/cmake/android.toolchain.cmake -DANDROID_PLATFORM=android-23 -DANDROID_ABI=${PLATFORM} -S . -B build -G Ninja,其中${NDK_PATH}需要替换为你的NDK路径,${PLATFORM}替换成你想要编译出的目标平台。
  5. 执行cmake --build build --config Release
  6. 编译完成。

你也可以直接使用build.bat来进行批量编译,默认编译armeabi-v7a arm64-v8a x86 x86_64四个版本,可修改脚本中的ANDROID_ABIS变量来进行更改。

脚本有三个可选参数分别为:NDK路径、最低支持SDK版本、CMake程序路径,不设置则脚本自动检测NDK_PATH与CMake工具链,如果都没有则使用脚本默认内置路径。

使用

例子请看:src/test-ui/main.cc

screenshot.jpg

RPC使用

  1. Server:src/test-ui/canvas.cc
  2. Client:src/test-ui/render.cc
screenshot.webm

androidsurfaceimgui's People

Contributors

bzi-han 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.