一、先看下效果图
二、使用
这个是谷歌官方为移动平台下VR解决方案,有兴趣的可以看看
Google VR主页:https://developers.google.com/vr/
github地址:https://github.com/googlevr/gvr-android-sdk
1. 在 build.gradle 文件中添加库依赖:
dependencies {
compile 'com.google.vr:sdk-panowidget:1.80.0'
}
2. 创建布局
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".activitys.OpenGLActivity">
<com.bj.bs.utils.GLPanorama
android:id="@+id/mgl"
android:layout_width