summaryrefslogtreecommitdiffstats
path: root/src/oculusvr/classes/com
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2015-03-27 03:07:58 +0100
committerSven Gothel <[email protected]>2015-03-27 03:07:58 +0100
commite626312c79f49b2244b5fdae8dbbf1ee22520817 (patch)
tree717c760aa7f02bd67ca5ab020844286ae4caa367 /src/oculusvr/classes/com
parentbb6a8fdc8decdbec64bbab0fe2175e76211d0e77 (diff)
Bug 1116: Oculus SDK 0.4.4 support for JOGL - Part-3: New set of C-files, adapt to new SDK API
- Tested on Windows and working StereoDemo01 w/ DK2!
Diffstat (limited to 'src/oculusvr/classes/com')
-rw-r--r--src/oculusvr/classes/com/jogamp/oculusvr/OVRVersion.java11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/oculusvr/classes/com/jogamp/oculusvr/OVRVersion.java b/src/oculusvr/classes/com/jogamp/oculusvr/OVRVersion.java
index 9be37e193..50e0efd30 100644
--- a/src/oculusvr/classes/com/jogamp/oculusvr/OVRVersion.java
+++ b/src/oculusvr/classes/com/jogamp/oculusvr/OVRVersion.java
@@ -90,6 +90,10 @@ public class OVRVersion extends JogampVersion {
if(null == hmdDesc) {
throw new IllegalArgumentException("null hmdDesc");
}
+ final OvrHmdContext hmdCtx = hmdDesc.getHandle();
+ if(null == hmdCtx) {
+ throw new IllegalArgumentException("null hmdCtx");
+ }
if(null==sb) {
sb = new StringBuilder();
}
@@ -100,15 +104,16 @@ public class OVRVersion extends JogampVersion {
sb.append("\thmd."+ovrHmdIndex+".vendorId:\t0x"+Integer.toHexString(hmdDesc.getVendorId())).append(Platform.getNewline());
sb.append("\thmd."+ovrHmdIndex+".serial:\t"+hmdDesc.getSerialNumberAsString()).append(Platform.getNewline());
sb.append("\thmd."+ovrHmdIndex+".type:\t"+hmdDesc.getType()).append(Platform.getNewline());
- sb.append("\thmd."+ovrHmdIndex+".hmdCaps:\t"+hmdDesc.getHmdCaps()).append(Platform.getNewline());
- sb.append("\thmd."+ovrHmdIndex+".distorCaps:\t"+hmdDesc.getDistortionCaps()).append(Platform.getNewline());
- sb.append("\thmd."+ovrHmdIndex+".sensorCaps:\t"+hmdDesc.getTrackingCaps()).append(Platform.getNewline());
+ sb.append("\thmd."+ovrHmdIndex+".hmdCaps:\t"+toHexString(hmdDesc.getHmdCaps())).append(Platform.getNewline());
+ sb.append("\thmd."+ovrHmdIndex+".distorCaps:\t"+toHexString(hmdDesc.getDistortionCaps())).append(Platform.getNewline());
+ sb.append("\thmd."+ovrHmdIndex+".sensorCaps:\t"+toHexString(hmdDesc.getTrackingCaps())).append(Platform.getNewline());
final ovrSizei resolution = hmdDesc.getResolution();
sb.append("\thmd."+ovrHmdIndex+".resolution:\t"+resolution.getW()+"x"+resolution.getH()).append(Platform.getNewline());
final ovrVector2i winPos = hmdDesc.getWindowsPos();
sb.append("\thmd."+ovrHmdIndex+".winPos:\t"+winPos.getX()+" / "+winPos.getY()).append(Platform.getNewline());
return sb;
}
+ private static String toHexString(final int v) { return "0x"+Integer.toHexString(v); }
public static StringBuilder getAllAvailableCapabilitiesInfo(StringBuilder sb) {
if(null==sb) {