Skip to content

Commit 0059fca

Browse files
authored
Merge pull request #2380 from richardTingle/#2379_remove_OSVR
#2379 Remove OSVR from JME VR
2 parents 358e00e + bcd0cab commit 0059fca

File tree

61 files changed

+6
-5667
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+6
-5667
lines changed

jme3-vr/src/main/java/com/jme3/app/VRApplication.java

+4-24
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
import com.jme3.input.vr.openvr.OpenVR;
2424
import com.jme3.input.vr.openvr.OpenVRMouseManager;
2525
import com.jme3.input.vr.openvr.OpenVRViewManager;
26-
import com.jme3.input.vr.osvr.OSVR;
2726
import com.jme3.math.ColorRGBA;
2827
import com.jme3.math.Quaternion;
2928
import com.jme3.math.Vector3f;
@@ -88,11 +87,6 @@ public abstract class VRApplication implements Application, SystemListener {
8887
*/
8988
public float DEFAULT_ASPECT = 1f;
9089

91-
/**
92-
* Is the application is based on OSVR (default is <code>false</code>).
93-
*/
94-
public boolean CONSTRUCT_WITH_OSVR = false;
95-
9690
/**
9791
* Is the application has not to start within VR mode (default is <code>false</code>).
9892
*/
@@ -272,15 +266,9 @@ public VRApplication() {
272266
} else if( DISABLE_VR ) {
273267
logger.warning("VR disabled via code.");
274268
} else if( VRSupportedOS && DISABLE_VR == false ) {
275-
if( CONSTRUCT_WITH_OSVR ) {
276-
//FIXME: WARNING !!
277-
vrHardware = new OSVR(null);
278-
logger.config("Creating OSVR wrapper [SUCCESS]");
279-
} else {
280-
//FIXME: WARNING !!
281-
vrHardware = new OpenVR(null);
282-
logger.config("Creating OpenVR wrapper [SUCCESS]");
283-
}
269+
//FIXME: WARNING !!
270+
vrHardware = new OpenVR(null);
271+
logger.config("Creating OpenVR wrapper [SUCCESS]");
284272
if( vrHardware.initialize() ) {
285273
setPauseOnLostFocus(false);
286274
}
@@ -366,14 +354,6 @@ public boolean compositorAllowed() {
366354
return useCompositor && compositorOS;
367355
}
368356

369-
/**
370-
* Get if the system currently support VR.
371-
* @return <code>true</code> if the system currently support VR and <code>false</Code> otherwise.
372-
*/
373-
public boolean isOSVRSupported() {
374-
return VRSupportedOS;
375-
}
376-
377357
/**
378358
* Simple update of the application, this method should contain {@link #getRootNode() root node} updates.
379359
* This method is called by the {@link #update() update()} method and should not be called manually.
@@ -725,7 +705,7 @@ public void start() {
725705
settings.setFrequency(vrHardware.getDisplayFrequency());
726706
settings.setFullscreen(false);
727707
settings.setVSync(false); // stop vsyncing on primary monitor!
728-
settings.setSwapBuffers(!disableSwapBuffers || vrHardware instanceof OSVR);
708+
settings.setSwapBuffers(!disableSwapBuffers);
729709
settings.setTitle("Put Headset On Now: " + settings.getTitle());
730710
settings.setResizable(true);
731711
}

jme3-vr/src/main/java/com/jme3/app/VRConstants.java

-15
Original file line numberDiff line numberDiff line change
@@ -131,30 +131,16 @@ public class VRConstants {
131131
*
132132
* Deprecated as only the lwjgl OpenVr version has been upgraded to modern action based inputs
133133
*
134-
* @see #SETTING_VRAPI_OSVR_VALUE
135134
* @see #SETTING_VRAPI_OPENVR_LWJGL_VALUE
136135
* @see #SETTING_VRAPI_OCULUSVR_VALUE
137136
*/
138137
@Deprecated
139138
public static final int SETTING_VRAPI_OPENVR_VALUE = 1;
140139

141-
/**
142-
* The identifier of the OSVR system.
143-
*
144-
* Deprecated as an OpenVr system should be used instead for a non vender specific api
145-
*
146-
* @see #SETTING_VRAPI_OPENVR_VALUE
147-
* @see #SETTING_VRAPI_OPENVR_LWJGL_VALUE
148-
* @see #SETTING_VRAPI_OCULUSVR_VALUE
149-
*/
150-
@Deprecated
151-
public static final int SETTING_VRAPI_OSVR_VALUE = 2;
152-
153140
/**
154141
* The identifier of the OpenVR from LWJGL system.
155142
*
156143
* @see #SETTING_VRAPI_OPENVR_VALUE
157-
* @see #SETTING_VRAPI_OSVR_VALUE
158144
* @see #SETTING_VRAPI_OCULUSVR_VALUE
159145
*/
160146
public static final int SETTING_VRAPI_OPENVR_LWJGL_VALUE = 3;
@@ -165,7 +151,6 @@ public class VRConstants {
165151
* Deprecated as an OpenVr system should be used instead (and the rift itself is discontinued)
166152
*
167153
* @see #SETTING_VRAPI_OPENVR_VALUE
168-
* @see #SETTING_VRAPI_OSVR_VALUE
169154
* @see #SETTING_VRAPI_OPENVR_LWJGL_VALUE
170155
*/
171156
@Deprecated

jme3-vr/src/main/java/com/jme3/app/VREnvironment.java

+1-12
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@
1919
import com.jme3.input.vr.openvr.OpenVR;
2020
import com.jme3.input.vr.openvr.OpenVRMouseManager;
2121
import com.jme3.input.vr.openvr.OpenVRViewManager;
22-
import com.jme3.input.vr.osvr.OSVR;
23-
import com.jme3.input.vr.osvr.OSVRViewManager;
2422
import com.jme3.renderer.Camera;
2523
import com.jme3.scene.Spatial;
2624
import com.jme3.system.AppSettings;
@@ -405,8 +403,6 @@ public void atttach(AppState appState, Application application){
405403
// Instantiate view manager
406404
if (vrBinding == VRConstants.SETTING_VRAPI_OPENVR_VALUE){
407405
viewManager = new OpenVRViewManager(this);
408-
} else if (vrBinding == VRConstants.SETTING_VRAPI_OSVR_VALUE){
409-
viewManager = new OSVRViewManager(this);
410406
} else if (vrBinding == VRConstants.SETTING_VRAPI_OCULUSVR_VALUE) {
411407
viewManager = new OculusViewManager(this);
412408
} else if (vrBinding == VRConstants.SETTING_VRAPI_OPENVR_LWJGL_VALUE) {
@@ -438,14 +434,7 @@ public boolean initialize(){
438434
}
439435

440436
if( vrSupportedOS) {
441-
if( vrBinding == VRConstants.SETTING_VRAPI_OSVR_VALUE ) {
442-
guiManager = new VRGuiManager(this);
443-
mouseManager = new OpenVRMouseManager(this);
444-
445-
hardware = new OSVR(this);
446-
initialized = true;
447-
logger.config("Creating OSVR wrapper [SUCCESS]");
448-
} else if( vrBinding == VRConstants.SETTING_VRAPI_OPENVR_VALUE ) {
437+
if( vrBinding == VRConstants.SETTING_VRAPI_OPENVR_VALUE ) {
449438
guiManager = new VRGuiManager(this);
450439
mouseManager = new OpenVRMouseManager(this);
451440

jme3-vr/src/main/java/com/jme3/input/vr/VRAPI.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import com.jme3.renderer.Camera;
88

99
/**
10-
* An interface that represents a VR system. This interface has to be implemented in order to wrap underlying VR system (OpenVR, OSVR, ...)
10+
* An interface that represents a VR system. This interface has to be implemented in order to wrap underlying VR system (OpenVR, OculusVR, ...)
1111
* @author reden - phr00t - https://github.com/phr00t
1212
* @author Julien Seinturier - COMEX SA - <a href="http://www.seinturier.fr">http://www.seinturier.fr</a>
1313
*/

0 commit comments

Comments
 (0)