Samsung / GearVRf

The GearVR framework(GearVRf) is an Open Source VR rendering library for application development on VR-supported Android devices.
http://www.gearvrf.org
Apache License 2.0
407 stars 217 forks source link

Monoscopic mode #75

Closed mkeblx closed 9 years ago

mkeblx commented 9 years ago

Currently there is no way to force monoscopic rendering iff isVrSupported but monoscopic should be able to be used on GearVR supported phones.

    // GVRActivity.java
    public void setScript(GVRScript gvrScript, String distortionDataFileName, boolean monoscopic) {
        if (getRequestedOrientation() == ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE) {
            if (isVrSupported() && !monoscopic) {
                mGVRViewManager = new GVRViewManager(this, gvrScript,
                        distortionDataFileName);
            } else {
                mGVRViewManager = new GVRMonoscopicViewManager(this, gvrScript,
                        distortionDataFileName);
            }
        } else {
            throw new IllegalArgumentException(
                    "You can not set orientation to portrait for GVRF apps.");
        }
    }

    public void setScript(GVRScript gvrScript, String distortionDataFileName) {
        setScript(gvrScript, distortionDataFileName, false);
    }
thomasflynn commented 9 years ago

a setForceMonoscopic() api was just merged into master. this will allow forcing to monoscopic even on Note4 and S6.