Class SphericalGLSurfaceView

  • All Implemented Interfaces:
    Drawable.Callback, AccessibilityEventSource, KeyEvent.Callback, SurfaceHolder.Callback, SurfaceHolder.Callback2

    @Deprecated
    public final class SphericalGLSurfaceView
    extends GLSurfaceView
    Deprecated.
    com.google.android.exoplayer2 is deprecated. Please migrate to androidx.media3 (which contains the same ExoPlayer code). See the migration guide for more details, including a script to help with the migration.
    Renders a GL scene in a non-VR Activity that is affected by phone orientation and touch input.

    The two input components are the TYPE_GAME_ROTATION_VECTOR Sensor and a TouchListener. The GL renderer combines these two inputs to render a scene with the appropriate camera orientation.

    The primary complexity in this class is related to the various rotations. It is important to apply the touch and sensor rotations in the correct order or the user's touch manipulations won't match what they expect.