diff options
author | Sven Gothel <[email protected]> | 2023-09-22 16:43:36 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2023-09-22 16:43:36 +0200 |
commit | c505b85fc4c5f8bc1de6ae7f571d33e401c04e56 (patch) | |
tree | 7e2c5bc1cb376967b11a20b24c07e7094829dd7c /src/oculusvr/classes | |
parent | e4267876d0aca64e9cfa8fa9be0bc8d6e3309b83 (diff) |
OculusVR: Adapt to latest GlueGen changes
Diffstat (limited to 'src/oculusvr/classes')
-rw-r--r-- | src/oculusvr/classes/jogamp/opengl/oculusvr/OVRStereoDevice.java | 6 | ||||
-rw-r--r-- | src/oculusvr/classes/jogamp/opengl/oculusvr/OVRStereoDeviceRenderer.java | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/oculusvr/classes/jogamp/opengl/oculusvr/OVRStereoDevice.java b/src/oculusvr/classes/jogamp/opengl/oculusvr/OVRStereoDevice.java index a59b8248f..2f09598c5 100644 --- a/src/oculusvr/classes/jogamp/opengl/oculusvr/OVRStereoDevice.java +++ b/src/oculusvr/classes/jogamp/opengl/oculusvr/OVRStereoDevice.java @@ -87,13 +87,13 @@ public class OVRStereoDevice implements StereoDevice { this.deviceIndex = deviceIndex; this.hmdDesc = hmdDesc; - final ovrFovPort[] defaultOVREyeFov = hmdDesc.getDefaultEyeFov(0, new ovrFovPort[ovrHmdDesc.getEyeRenderOrderArrayLength()]); + final ovrFovPort[] defaultOVREyeFov = hmdDesc.getDefaultEyeFov(0, new ovrFovPort[ovrHmdDesc.getEyeRenderOrderElemCount()], 0, ovrHmdDesc.getEyeRenderOrderElemCount()); defaultEyeFov = new FovHVHalves[defaultOVREyeFov.length]; for(int i=0; i<defaultEyeFov.length; i++) { defaultEyeFov[i] = OVRUtil.getFovHV(defaultOVREyeFov[i]); } - eyeRenderOrder = new int[ovrHmdDesc.getEyeRenderOrderArrayLength()]; - hmdDesc.getEyeRenderOrder(0, eyeRenderOrder); + eyeRenderOrder = new int[ovrHmdDesc.getEyeRenderOrderElemCount()]; + hmdDesc.getEyeRenderOrder(0, eyeRenderOrder, 0, eyeRenderOrder.length); supportedDistortionBits = OVRUtil.ovrDistCaps2DistBits(hmdDesc.getDistortionCaps()); recommendedDistortionBits = supportedDistortionBits; // & ~StereoDeviceRenderer.DISTORTION_TIMEWARP; minimumDistortionBits = StereoDeviceRenderer.DISTORTION_BARREL; diff --git a/src/oculusvr/classes/jogamp/opengl/oculusvr/OVRStereoDeviceRenderer.java b/src/oculusvr/classes/jogamp/opengl/oculusvr/OVRStereoDeviceRenderer.java index a6671f6b6..f7b1c4e33 100644 --- a/src/oculusvr/classes/jogamp/opengl/oculusvr/OVRStereoDeviceRenderer.java +++ b/src/oculusvr/classes/jogamp/opengl/oculusvr/OVRStereoDeviceRenderer.java @@ -195,7 +195,7 @@ public class OVRStereoDeviceRenderer implements StereoDeviceRenderer { ovRes[0] = ovrDistortionVertex.create(); for ( int vertNum = 0; vertNum < vertexCount; vertNum++ ) { - final ovrDistortionVertex ov = meshData.getPVertexData(vertNum, ovRes)[0]; + final ovrDistortionVertex ov = meshData.getPVertexData(vertNum, ovRes, 0, 1)[0]; ovrVector2f v; if( StereoDevice.DUMP_DATA ) { @@ -332,12 +332,12 @@ public class OVRStereoDeviceRenderer implements StereoDeviceRenderer { /* pp */ void updateTimewarp(final ovrHmdDesc hmdDesc, final ovrPosef eyeRenderPose, final float[] mat4Tmp1, final float[] mat4Tmp2) { OVR.ovrHmd_GetEyeTimewarpMatrices(hmdDesc, eyeName, eyeRenderPose, timeWarpMatrices); - final float[] eyeRotationStartM = FloatUtil.transposeMatrix(timeWarpMatrices[0].getM(0, mat4Tmp1), mat4Tmp2); + final float[] eyeRotationStartM = FloatUtil.transposeMatrix(timeWarpMatrices[0].getM(0, mat4Tmp1, 0, 16), mat4Tmp2); final FloatBuffer eyeRotationStartU = eyeRotationStart.floatBufferValue(); eyeRotationStartU.put(eyeRotationStartM); eyeRotationStartU.rewind(); - final float[] eyeRotationEndM = FloatUtil.transposeMatrix(timeWarpMatrices[1].getM(0, mat4Tmp1), mat4Tmp2); + final float[] eyeRotationEndM = FloatUtil.transposeMatrix(timeWarpMatrices[1].getM(0, mat4Tmp1, 0, 16), mat4Tmp2); final FloatBuffer eyeRotationEndU = eyeRotationEnd.floatBufferValue(); eyeRotationEndU.put(eyeRotationEndM); eyeRotationEndU.rewind(); |