Explorar el Código

updated info on JNA vs JNI bindings and how to use them

Rickard Edén hace 5 años
padre
commit
a09de299f7
Se han modificado 1 ficheros con 14 adiciones y 1 borrados
  1. 14 1
      src/docs/asciidoc/jme3/virtualreality.adoc

+ 14 - 1
src/docs/asciidoc/jme3/virtualreality.adoc

@@ -18,6 +18,19 @@ 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.
+
+
 == Sample Application
 
 [source,java]
@@ -26,7 +39,7 @@ 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_VALUE);
+        settings.put(VRConstants.SETTING_VRAPI, VRConstants.SETTING_VRAPI_OPENVR_LWJGL_VALUE);
         settings.put(VRConstants.SETTING_ENABLE_MIRROR_WINDOW, true);
        
         VREnvironment env = new VREnvironment(settings);