Skip to content

Type errors (array of structures) in IVRCompositor_FnTable #6

@lisphacker

Description

@lisphacker

In the method, vr.IVRCompositor_FnTable.WaitGetPoses_callback.apply(), the first parameter should be an array of structures. I created this with the statement Structure[] pRenderPoseArray = new TrackedDevicePose_t.ByReference().toArray(VR.k_unMaxTrackedDeviceCount); based on the Kotlin code in https://github.com/java-opengl-labs/jogl-hello-vr. However, this value can't be passed into the apply method in Java since the types don't match.

I've also tried

Object pRenderPoseArray = new TrackedDevicePose_t().toArray(VR.k_unMaxTrackedDeviceCount); _vrCompositor.WaitGetPoses.apply((TrackedDevicePose_t) pRenderPoseArray, VR.k_unMaxTrackedDeviceCount, null, 0);

and

Object pRenderPoseArray = new TrackedDevicePose_t.ByReference().toArray(VR.k_unMaxTrackedDeviceCount); _vrCompositor.WaitGetPoses.apply((TrackedDevicePose_t) pRenderPoseArray, VR.k_unMaxTrackedDeviceCount, null, 0);

but they both give runtime errors (type mismatch)

Any suggestions on how to get this working in Java?

Cheers
Gautham

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions