Forum Discussion
38leinaD
13 years agoHonored Guest
Java Wrapper. First Version!
Hi There,
As a first note: I don't have my rift yet, so I have been writing this Java wrapper for the OR blindly. I would be cool if someone with a Rift and interest in Java could test it out:
https://dl.dropbox.com/u/8241387/OVR/JRift_alpha.zip
It is compiled for a 32-bit Java Runtime. And you can just call the contained JRift.bat to make it start a loop to read from the Rift sensors:
Any comment is welcome.
Cheers,
Daniel
As a first note: I don't have my rift yet, so I have been writing this Java wrapper for the OR blindly. I would be cool if someone with a Rift and interest in Java could test it out:
https://dl.dropbox.com/u/8241387/OVR/JRift_alpha.zip
It is compiled for a 32-bit Java Runtime. And you can just call the contained JRift.bat to make it start a loop to read from the Rift sensors:
OculusRift or = new OculusRift();
or.init();
HMDInfo hmdInfo = or.getHMDInfo();
System.out.println(hmdInfo);
while (or.isInitialized()) {
or.poll();
System.out.println("Yaw: " + or.getYaw() + " Pitch: " + or.getPitch() + " Roll: " + or.getRoll());
try {
Thread.sleep(100);
} catch (InterruptedException e) {
e.printStackTrace();
}
}
or.destroy();
Any comment is welcome.
Cheers,
Daniel
43 Replies
- usb420Honored GuestThanks for your efforts. I'm going to need this too as soon as I get my dev kit.
- MrGeddingsExplorerNice now this will pave the way for making Minecraft work with the Rift! wow thatd be awesome if by the time i get the Rift someone would have it working :-D wheee! Minecraft really is one of my favorite games as how open and creative it can be and how fun it is just exploring other servers online :-).
- rupyHonored GuestSweet, so this is a JNI bridge to the oculus SDK source?
- JimiHonored GuestWould be nice if this had the source with it :roll:
- 38leinaDHonored GuestYou are right. Might even be easier to get it working if you have the sources.
https://github.com/38leinaD/JRift
Cheers,
Daniel - JimiHonored Guest
"38leinaD" wrote:
You are right. Might even be easier to get it working if you have the sources.
https://github.com/38leinaD/JRift
Cheers,
Daniel
Thanks for delivering! It appears you have forgotten a license. I hope you consider a BSD style one. :) - cyberealityGrand ChampionAwesome!
- nephHonored GuestReally sweet stuff!
I've begun using some of your things to implement Rift support for jMonkeyEngine.
Cheers,
Rickard - 38leinaDHonored GuestAs i did not get any feedback before and now my rift arrived, I was able to test what I have been coding. So, the head tracking data is actually returned correctly; as well as the HDMInfo. So, if you want to tinker with the Rift in Java (e.g. LWJGL or JMonkey): let me know if works for you as well.
cheers,
daniel - nephHonored GuestI would have loved to test it out, but i will have to wait until my 49xxx order arrives :P
In the end, i went about and created my own JNI. A great learning experience, both for c++ and the oculus sdk.
I'll probably lay low for a bit since it'll take quite some time before i can do some testing anyway.
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 2 years ago
- 5 years ago