# moonlight-3Dbox **Repository Path**: chen-chaos/moonlight-3dbox ## Basic Information - **Project Name**: moonlight-3Dbox - **Description**: forked from https://github.com/moonlight-stream/moonlight-android 基于 Moonlight Android v12.1,添加 SuperD 裸眼3D 支持 - **Primary Language**: Unknown - **License**: GPL-3.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 1 - **Created**: 2026-07-21 - **Last Updated**: 2026-07-22 ## Categories & Tags **Categories**: Uncategorized **Tags**: MoonLight, 3dbox ## README # Moonlight Android [![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/232a8tadrrn8jv0k/branch/master?svg=true)](https://ci.appveyor.com/project/cgutman/moonlight-android/branch/master) [![Translation Status](https://hosted.weblate.org/widgets/moonlight/-/moonlight-android/svg-badge.svg)](https://hosted.weblate.org/projects/moonlight/moonlight-android/) # Moonlight 3DBox — SuperD 裸眼3D 基于 [Moonlight Android](https://github.com/moonlight-stream/moonlight-android) **v12.1**,添加 **SuperD 裸眼3D 显示格式切换**支持。 ## 新增功能 - **裸眼3D 模式切换** — 在设置 → 高级设置中可选择 左右分屏 / 右左分屏 / 上下分屏 / 下上分屏 - **SuperD 兼容层** — 通过反射调用 `Surface.setS3dFormat()`,非 SuperD 设备自动降级,不崩溃 - 设置后下次串流自动生效,无需额外操作 ## S3DDisplayCompat 裸眼3D 兼容层 ### 是什么 **SuperD** 使用的裸眼3D 方案,它在 `Surface` 类中扩展了一个隐藏方法 `setS3dFormat()` 来控制 3D 显示模式。`S3DDisplayCompat` 通过反射调用它,非 SuperD 设备上自动降级,不崩溃。 ### 常量说明 | 常量 | 值 | 说明 | |------|-----|------| | `S3D_OFF` | 2 | 关闭 3D,普通 2D 显示 | | `S3D_LR` | 4 | 左右分屏,左眼画面在左、右眼画面在右 | | `S3D_RL` | 6 | 右左分屏,左眼画面在右、右眼画面在左 | | `S3D_TB` | 8 | 上下分屏,左眼画面在上、右眼画面在下 | | `S3D_BT` | 10 | 下上分屏,左眼画面在下、右眼画面在上 | | `S3D_ONLY_LEFT_MASK` | 16 | 与格式 OR 组合,只显示左眼画面(调试用) | | `S3D_NO_TRAKING_MASK` | 32 | 与格式 OR 组合,禁用头部追踪 | > `S3D_ONLY_LEFT_MASK` 和 `S3D_NO_TRAKING_MASK` 是掩码,需要与其他格式按位 OR 使用,例如 `S3D_LR | S3D_ONLY_LEFT_MASK`。 ### API ```java // 使用默认格式(左右分屏),返回 true 表示设置成功 S3DDisplayCompat.enableS3D(surface); // 指定格式 S3DDisplayCompat.enableS3D(surface, S3DDisplayCompat.S3D_TB); ``` ### 调用时机 Surface 创建后、开始渲染前调用一次即可: ```java surfaceView.getHolder().addCallback(new SurfaceHolder.Callback() { @Override public void surfaceCreated(SurfaceHolder holder) { S3DDisplayCompat.enableS3D(holder.getSurface()); } }); ``` ### 安全机制 - **反射调用** — 不依赖 SuperD SDK,编译时无需 SuperD 的库 - **异常捕获** — 所有异常统一 catch,不抛到上层 - **自动降级** — 非 SuperD 设备返回 `false`,零开销 Moonlight for Android will allow you to stream your full collection of games from your Windows PC to your Android device, whether in your own home or over the internet. Moonlight also has a [PC client](https://github.com/moonlight-stream/moonlight-qt) and [iOS/tvOS client](https://github.com/moonlight-stream/moonlight-ios). You can follow development on our [Discord server](https://moonlight-stream.org/discord) and help translate Moonlight into your language on [Weblate](https://hosted.weblate.org/projects/moonlight/moonlight-android/). ## Downloads * [Google Play Store](https://play.google.com/store/apps/details?id=com.limelight) * [Amazon App Store](https://www.amazon.com/gp/product/B00JK4MFN2) * [F-Droid](https://f-droid.org/packages/com.limelight) * [APK](https://github.com/moonlight-stream/moonlight-android/releases) ## Building * Install Android Studio and the Android NDK * Run ‘git submodule update --init --recursive’ from within moonlight-android/ * In moonlight-android/, create a file called ‘local.properties’. Add an ‘ndk.dir=’ property to the local.properties file and set it equal to your NDK directory. * Build the APK using Android Studio or gradle ## Authors * [Cameron Gutman](https://github.com/cgutman) * [Diego Waxemberg](https://github.com/dwaxemberg) * [Aaron Neyer](https://github.com/Aaronneyer) * [Andrew Hennessy](https://github.com/yetanothername) Moonlight is the work of students at [Case Western](http://case.edu) and was started as a project at [MHacks](http://mhacks.org).