Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 4 additions & 24 deletions jme3-vr/src/main/java/com/jme3/app/VRApplication.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
import com.jme3.input.vr.openvr.OpenVR;
import com.jme3.input.vr.openvr.OpenVRMouseManager;
import com.jme3.input.vr.openvr.OpenVRViewManager;
import com.jme3.input.vr.osvr.OSVR;
import com.jme3.math.ColorRGBA;
import com.jme3.math.Quaternion;
import com.jme3.math.Vector3f;
Expand Down Expand Up @@ -88,11 +87,6 @@ public abstract class VRApplication implements Application, SystemListener {
*/
public float DEFAULT_ASPECT = 1f;

/**
* Is the application is based on OSVR (default is <code>false</code>).
*/
public boolean CONSTRUCT_WITH_OSVR = false;

/**
* Is the application has not to start within VR mode (default is <code>false</code>).
*/
Expand Down Expand Up @@ -272,15 +266,9 @@ public VRApplication() {
} else if( DISABLE_VR ) {
logger.warning("VR disabled via code.");
} else if( VRSupportedOS && DISABLE_VR == false ) {
if( CONSTRUCT_WITH_OSVR ) {
//FIXME: WARNING !!
vrHardware = new OSVR(null);
logger.config("Creating OSVR wrapper [SUCCESS]");
} else {
//FIXME: WARNING !!
vrHardware = new OpenVR(null);
logger.config("Creating OpenVR wrapper [SUCCESS]");
}
//FIXME: WARNING !!
vrHardware = new OpenVR(null);
logger.config("Creating OpenVR wrapper [SUCCESS]");
if( vrHardware.initialize() ) {
setPauseOnLostFocus(false);
}
Expand Down Expand Up @@ -366,14 +354,6 @@ public boolean compositorAllowed() {
return useCompositor && compositorOS;
}

/**
* Get if the system currently support VR.
* @return <code>true</code> if the system currently support VR and <code>false</Code> otherwise.
*/
public boolean isOSVRSupported() {
return VRSupportedOS;
}

/**
* Simple update of the application, this method should contain {@link #getRootNode() root node} updates.
* This method is called by the {@link #update() update()} method and should not be called manually.
Expand Down Expand Up @@ -725,7 +705,7 @@ public void start() {
settings.setFrequency(vrHardware.getDisplayFrequency());
settings.setFullscreen(false);
settings.setVSync(false); // stop vsyncing on primary monitor!
settings.setSwapBuffers(!disableSwapBuffers || vrHardware instanceof OSVR);
settings.setSwapBuffers(!disableSwapBuffers);
settings.setTitle("Put Headset On Now: " + settings.getTitle());
settings.setResizable(true);
}
Expand Down
15 changes: 0 additions & 15 deletions jme3-vr/src/main/java/com/jme3/app/VRConstants.java
Original file line number Diff line number Diff line change
Expand Up @@ -131,30 +131,16 @@ public class VRConstants {
*
* Deprecated as only the lwjgl OpenVr version has been upgraded to modern action based inputs
*
* @see #SETTING_VRAPI_OSVR_VALUE
* @see #SETTING_VRAPI_OPENVR_LWJGL_VALUE
* @see #SETTING_VRAPI_OCULUSVR_VALUE
*/
@Deprecated
public static final int SETTING_VRAPI_OPENVR_VALUE = 1;

/**
* The identifier of the OSVR system.
*
* Deprecated as an OpenVr system should be used instead for a non vender specific api
*
* @see #SETTING_VRAPI_OPENVR_VALUE
* @see #SETTING_VRAPI_OPENVR_LWJGL_VALUE
* @see #SETTING_VRAPI_OCULUSVR_VALUE
*/
@Deprecated
public static final int SETTING_VRAPI_OSVR_VALUE = 2;

/**
* The identifier of the OpenVR from LWJGL system.
*
* @see #SETTING_VRAPI_OPENVR_VALUE
* @see #SETTING_VRAPI_OSVR_VALUE
* @see #SETTING_VRAPI_OCULUSVR_VALUE
*/
public static final int SETTING_VRAPI_OPENVR_LWJGL_VALUE = 3;
Expand All @@ -165,7 +151,6 @@ public class VRConstants {
* Deprecated as an OpenVr system should be used instead (and the rift itself is discontinued)
*
* @see #SETTING_VRAPI_OPENVR_VALUE
* @see #SETTING_VRAPI_OSVR_VALUE
* @see #SETTING_VRAPI_OPENVR_LWJGL_VALUE
*/
@Deprecated
Expand Down
13 changes: 1 addition & 12 deletions jme3-vr/src/main/java/com/jme3/app/VREnvironment.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@
import com.jme3.input.vr.openvr.OpenVR;
import com.jme3.input.vr.openvr.OpenVRMouseManager;
import com.jme3.input.vr.openvr.OpenVRViewManager;
import com.jme3.input.vr.osvr.OSVR;
import com.jme3.input.vr.osvr.OSVRViewManager;
import com.jme3.renderer.Camera;
import com.jme3.scene.Spatial;
import com.jme3.system.AppSettings;
Expand Down Expand Up @@ -405,8 +403,6 @@ public void atttach(AppState appState, Application application){
// Instantiate view manager
if (vrBinding == VRConstants.SETTING_VRAPI_OPENVR_VALUE){
viewManager = new OpenVRViewManager(this);
} else if (vrBinding == VRConstants.SETTING_VRAPI_OSVR_VALUE){
viewManager = new OSVRViewManager(this);
} else if (vrBinding == VRConstants.SETTING_VRAPI_OCULUSVR_VALUE) {
viewManager = new OculusViewManager(this);
} else if (vrBinding == VRConstants.SETTING_VRAPI_OPENVR_LWJGL_VALUE) {
Expand Down Expand Up @@ -438,14 +434,7 @@ public boolean initialize(){
}

if( vrSupportedOS) {
if( vrBinding == VRConstants.SETTING_VRAPI_OSVR_VALUE ) {
guiManager = new VRGuiManager(this);
mouseManager = new OpenVRMouseManager(this);

hardware = new OSVR(this);
initialized = true;
logger.config("Creating OSVR wrapper [SUCCESS]");
} else if( vrBinding == VRConstants.SETTING_VRAPI_OPENVR_VALUE ) {
if( vrBinding == VRConstants.SETTING_VRAPI_OPENVR_VALUE ) {
guiManager = new VRGuiManager(this);
mouseManager = new OpenVRMouseManager(this);

Expand Down
2 changes: 1 addition & 1 deletion jme3-vr/src/main/java/com/jme3/input/vr/VRAPI.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import com.jme3.renderer.Camera;

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