Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
ngsvrift's avatar
ngsvrift
Honored Guest
9 years ago

Oculus API

What is the API for Oculus Rift? That is to say, what protocol or language does it use to talk to the player? Is it HTML5? Is there are a method of using a Flash-based API?

6 Replies

  • The core API is in C++. You can interface with C++ engines or frameworks directly (for example if you use OpenGL or DirectX). You may be able to create a DLL plugin for some alternate languages. 

    However, most developers will use either Unity or Unreal Engine, which come with native support for VR and the Oculus hardware. 

    HTML5 or Flash will be difficult because of security and sandbox restrictions that make it hard to execute native code or get low level access to hardware. I believe there are some VR branches for popular web browsers, and you may want to investigate this option.
  • The implementation is C++ but the API is written in C.  
  • ngsvrift's avatar
    ngsvrift
    Honored Guest
    Thanks guys, these responses alone are a big help. Unfortunately for this project we can't go through an engine and we're working with an RTMP stream, which is flash-based. We need to find a way to make it go from the web-based player (which is HTML5-based) to the headset.
  • kearwood's avatar
    kearwood
    Honored Guest
    Hello from Mozilla!  There are indeed VR enabled experimental browser builds.  You can use WebGL to render content into the Oculus, use three.js, or if you prefer something declarative, try out A-Frame (http://aframe.io).

    Links to builds are at http://webvr.info

    Some demos are up at http://mozvr.com

    There is a WebVR community on slack at https://webvr-slack.herokuapp.com

    I hope this helps!