-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deprecate the jme3-vr module in the wiki #176
Merged
richardTingle
merged 1 commit into
jMonkeyEngine:master
from
richardTingle:deprecateOpenVr
Mar 27, 2024
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
= Virtual Reality Legacy support | ||
:revnumber: 2.0 | ||
:revdate: 2020/07/27 | ||
|
||
|
||
== Introduction | ||
|
||
The jMonkeyEngine module jme3-vr is deprecated and will be removed in a future version. This documents that deprecated functionality. | ||
|
||
jMonkeyEngine 3 supports several VR specifications. The most modern of those is OpenVR, which is currently a widely supported standard. However, vendors are beginning to move towards OpenXR as a fully open cross-platform standard. OpenXR is available with jMonkeyEngine via xref:contributions:vr/topic_contributions_vr.adoc[user contributed virtual reality libraries]. | ||
|
||
The known supported systems are: | ||
|
||
HTC Vive and systems supporting SteamVR/OpenVR | ||
|
||
Native Oculus Rift support (and through SteamVR) | ||
|
||
Oculus Quest 2 (through SteamVR with Virtual Desktop) | ||
|
||
Razer HDK and systems supporting OSVR | ||
|
||
Google Cardboard / GoogleVR | ||
|
||
Two implementations exist for OpenVR. A community maintained JNA based binding and LWJGL's JNI based. | ||
|
||
To use the JNA based bindings, put: | ||
|
||
settings.put(VRConstants.SETTING_VRAPI, VRConstants.SETTING_VRAPI_OPENVR_VALUE); | ||
|
||
in your settings. To use LWJGL, instead put: | ||
|
||
settings.put(VRConstants.SETTING_VRAPI, VRConstants.SETTING_VRAPI_OPENVR_LWJGL_VALUE); | ||
|
||
Note that the LWJGL bindings require LWJGL3 (jme3-lwjgl3) to be used. | ||
|
||
== Required dependencies | ||
|
||
- org.jmonkeyengine:jme3-core | ||
- org.jmonkeyengine:jme3-lwjgl3 | ||
- org.jmonkeyengine:jme3-vr | ||
|
||
== Sample Application | ||
|
||
[source,java] | ||
---- | ||
public class Main extends SimpleApplication { | ||
|
||
public static void main(String[] args) { | ||
AppSettings settings = new AppSettings(true); | ||
settings.put(VRConstants.SETTING_VRAPI, VRConstants.SETTING_VRAPI_OPENVR_LWJGL_VALUE); | ||
settings.put(VRConstants.SETTING_ENABLE_MIRROR_WINDOW, true); | ||
|
||
VREnvironment env = new VREnvironment(settings); | ||
env.initialize(); | ||
|
||
// Checking if the VR environment is well initialized | ||
// (access to the underlying VR system is effective, VR devices are detected). | ||
if (env.isInitialized()){ | ||
VRAppState vrAppState = new VRAppState(settings, env); | ||
vrAppState.setMirrorWindowSize(1024, 800); | ||
Main app = new Main(vrAppState); | ||
app.setLostFocusBehavior(LostFocusBehavior.Disabled); | ||
app.setSettings(settings); | ||
app.setShowSettings(false); | ||
app.start(); | ||
} | ||
} | ||
|
||
public Main(AppState... appStates) { | ||
super(appStates); | ||
} | ||
|
||
@Override | ||
public void simpleInitApp() { | ||
Box b = new Box(1, 1, 1); | ||
Geometry geom = new Geometry("Box", b); | ||
|
||
Material mat = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md"); | ||
mat.setColor("Color", ColorRGBA.Blue); | ||
geom.setMaterial(mat); | ||
|
||
rootNode.attachChild(geom); | ||
} | ||
|
||
@Override | ||
public void simpleUpdate(float tpf) { | ||
//TODO: add update code | ||
} | ||
|
||
@Override | ||
public void simpleRender(RenderManager rm) { | ||
//TODO: add render code | ||
} | ||
} | ||
---- | ||
Project source: https://github.com/neph1/VRSampleApplication | ||
|
||
|
||
== Google Cardboard VR SDK 1.0 integration | ||
gvr-android-jme (https://github.com/nordfalk/gvr-android-jme) | ||
|
||
|
||
== Legacy | ||
The following projects are not up to date, but may provide functionality not found in the other packages. | ||
Google Cardboard up to version 0.6: https://github.com/neph1/jme-cardboard |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,104 +1,12 @@ | ||
= Virtual Reality | ||
:revnumber: 2.0 | ||
:revdate: 2020/07/27 | ||
|
||
Please see this link:https://hub.jmonkeyengine.org/t/official-vr-module/37830/67[forum post] for additional information on JME Official VR module. | ||
:revnumber: 3.0 | ||
:revdate: 2024/01/01 | ||
|
||
== Introduction | ||
|
||
jMonkeyEngine 3 supports several VR specifications. The most modern of those is OpenVR, which is currently a widely supported standard. However, vendors are beginning to move towards OpenXR as a fully open cross-platform standard. OpenXR is available with jMonkeyEngine via xref:contributions:vr/topic_contributions_vr.adoc[user contributed virtual reality libraries]. | ||
|
||
The known supported systems are: | ||
|
||
HTC Vive and systems supporting SteamVR/OpenVR | ||
|
||
Native Oculus Rift support (and through SteamVR) | ||
|
||
Oculus Quest 2 (through SteamVR with Virtual Desktop) | ||
|
||
Razer HDK and systems supporting OSVR | ||
|
||
Google Cardboard / GoogleVR | ||
|
||
Two implementations exist for OpenVR. A community maintained JNA based binding and LWJGL's JNI based. | ||
|
||
To use the JNA based bindings, put: | ||
|
||
settings.put(VRConstants.SETTING_VRAPI, VRConstants.SETTING_VRAPI_OPENVR_VALUE); | ||
|
||
in your settings. To use LWJGL, instead put: | ||
|
||
settings.put(VRConstants.SETTING_VRAPI, VRConstants.SETTING_VRAPI_OPENVR_LWJGL_VALUE); | ||
|
||
Note that the LWJGL bindings require LWJGL3 (jme3-lwjgl3) to be used. | ||
|
||
== Required dependencies | ||
|
||
- org.jmonkeyengine:jme3-core | ||
- org.jmonkeyengine:jme3-lwjgl3 | ||
- org.jmonkeyengine:jme3-vr | ||
|
||
== Sample Application | ||
|
||
[source,java] | ||
---- | ||
public class Main extends SimpleApplication { | ||
|
||
public static void main(String[] args) { | ||
AppSettings settings = new AppSettings(true); | ||
settings.put(VRConstants.SETTING_VRAPI, VRConstants.SETTING_VRAPI_OPENVR_LWJGL_VALUE); | ||
settings.put(VRConstants.SETTING_ENABLE_MIRROR_WINDOW, true); | ||
|
||
VREnvironment env = new VREnvironment(settings); | ||
env.initialize(); | ||
|
||
// Checking if the VR environment is well initialized | ||
// (access to the underlying VR system is effective, VR devices are detected). | ||
if (env.isInitialized()){ | ||
VRAppState vrAppState = new VRAppState(settings, env); | ||
vrAppState.setMirrorWindowSize(1024, 800); | ||
Main app = new Main(vrAppState); | ||
app.setLostFocusBehavior(LostFocusBehavior.Disabled); | ||
app.setSettings(settings); | ||
app.setShowSettings(false); | ||
app.start(); | ||
} | ||
} | ||
|
||
public Main(AppState... appStates) { | ||
super(appStates); | ||
} | ||
|
||
@Override | ||
public void simpleInitApp() { | ||
Box b = new Box(1, 1, 1); | ||
Geometry geom = new Geometry("Box", b); | ||
|
||
Material mat = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md"); | ||
mat.setColor("Color", ColorRGBA.Blue); | ||
geom.setMaterial(mat); | ||
|
||
rootNode.attachChild(geom); | ||
} | ||
|
||
@Override | ||
public void simpleUpdate(float tpf) { | ||
//TODO: add update code | ||
} | ||
|
||
@Override | ||
public void simpleRender(RenderManager rm) { | ||
//TODO: add render code | ||
} | ||
} | ||
---- | ||
Project source: https://github.com/neph1/VRSampleApplication | ||
|
||
|
||
== Google Cardboard VR SDK 1.0 integration | ||
gvr-android-jme (https://github.com/nordfalk/gvr-android-jme) | ||
|
||
Virtual reality is well-supported in jMonkeyEngine 3. The VR support is provided by xref:contributions:vr/topic_contributions_vr.adoc[user contributed virtual reality libraries], for | ||
example xref:contributions:contributions.adoc#tamarin-openxr[Tamarin OpenXR]. | ||
|
||
== Legacy | ||
The following projects are not up to date, but may provide functionality not found in the other packages. | ||
Google Cardboard up to version 0.6: https://github.com/neph1/jme-cardboard | ||
|
||
OpenVr support (and other old virtual reality standards) are documented at xref:vr/legacyOpenVr.adoc[Virtual Reality Legacy support] but will be removed in a future release. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that this content is not new, just moved from another page