Skip to main content
Up and Coming
March 17, 2016

ovrHmd_AttachToWindow

How can one give the runtime a window to render on the direct monitor?

    11 replies

    joan
    Up and Coming
    March 17, 2016
    This API is no longer part of the SDK. Which version are you using? Have you looked at the samples and how they handle the mirror window?
    rupyAuthor
    Up and Coming
    March 18, 2016
    Yeah, thanks but Oculus have removed extended completely, making my DK2 only work with old Runtimes. Luckily I'm not mad at them "bricking" my DK2 for the extended game I'm building because I ordered a Vive and they have extended!

    I recommend everyone to switch to Vive before it's too late.
    "It's like Homeworld in first person." Disable Aero and vSync for a completely simulator sickness free experience with 2xHz FPS. Keep the config utility open for tracking to work.
    joan
    Up and Coming
    March 18, 2016
    Maybe you don't realize the pain in the ass that extended mode is for users. Or maybe you don't realize the benefits of Direct mode.

    Here is a quote from SteamVR that maybe will have more weight:

    SteamVR’s Direct Mode allows direct communication with the Vive’s displays, bypassing the operating system’s typical display communication path. This results in a more consistent experience for Vive users, as its composited view renders independent of other desktop application windows. For example, flashing displays upon headset detection, confused display destinations for desktop applications, and fullscreen compositor warnings are all resolved by Direct Mode. Additionally, Direct Mode allows the headset to go into standby mode, preserving power and display life.

    To enable Direct Mode, just update your drivers to 361.75 (NVIDIA) or 1.0.3.16 (AMD) or newer and then make sure you are running SteamVR beta.
    Up and Coming
    March 19, 2016
    I really don't understand what you're getting at. Extended mode is worse for both developers and end users.


    • End Users: Windows shifting around each time you turn the headset on, dealing with moving apps too and from DK2 "monitor", strange performance issues depending upon main monitor

    • Developers: Needing a scheme to handle window positioning, strange performance bugs from end users, needing to manage a window, worrying if user has resolution or orientation set correctly


    I don't get it. Direct mode is friendlier for users and friendlier for developers. It only takes a few lines of code to pass textures from your engine to the Oculus (or Vive) sdk. Why would you complain about direct mode and want extended mode? Extended mode needs to go, it was an easy way to get started in the early days but I'm so glad it's gone ;)
    rupyAuthor
    Up and Coming
    March 19, 2016
    I can't use direct mode from LWJGL, I would then have to use Unity or Unreal which both cost money and do not give me the full control over rendering and other things.

    As a consumer or consumer friendly producer, the choice is easy you build the same stuff as everyone else and make money.

    But I'm not in the VR business to make fiat money primarily, I'm in it to build some sort of lowpoly matrix MMO with bitcoin as money; focus on UGC (you should be able to build and sell spaceships) and not getting sick (I know direct mode would help but not as much as being able to control framrates myself = I render at 2x Hz = 150 FPS on DK2 and 180 FPS on Vive)

    The point here is, Oculus are afraid of bad consumer experiences (which I completely agree extended cause alot of the time) but they should not forbid some use of their hardware after a while just like that, because then we cannot forsee and plan our projects. Imagine tomorrow they say: Well now only Win 10 is allowed for the Rift, a better way would be to say Win 10 works best but the users can choose whatever they like.

    At some point you will be able to access direct mode on any monitor in the OS directly from any language DirectX and OpenGL, and along with that we'll have better performing graphics/display technology (OpenGL/HDMI) too (we'll have to because 16nm is about as small as thing will get, so we need to improve in other ways than just throwing smaller lithography at the problem)...

    Everything is ok, I'm really happy Valve/HTC are more "alternative" than Facebook/Microsoft.
    "It's like Homeworld in first person." Disable Aero and vSync for a completely simulator sickness free experience with 2xHz FPS. Keep the config utility open for tracking to work.
    Up and Coming
    March 19, 2016
    That sounds like a very cool project! Now that Oculus has proper OpenGL support I bet you could get direct mode working with LWJGL and have the best of both worlds :)

    I use direct mode from my custom engine with full control over rendering, no Unity/Unreal here :mrgreen:

    I'm curious how 2x FPS helps with sickness. I'd think that Direct Mode with timewarp provides both lower and more consistent latency.
    rupyAuthor
    Up and Coming
    March 19, 2016
    Well, I do the warping and chromatic aberration myself, because I want to experiment with different things. So I won't be rendering to a texture that the runtime then distorts and does magic on. Also at some point I will build my own headset and then I need to be able to distort myself.

    2x Hz is the lowest latency for rendering you can get with current "dumb" HDMI. I get 5.5 ms latency on rendering while others are at 11 ms for 90Hz. Timewarp actually makes me sicker because it is inconsistent in how it fakes low latency = some movements it can correct, others it can't; and that does not go well with my brain.
    "It's like Homeworld in first person." Disable Aero and vSync for a completely simulator sickness free experience with 2xHz FPS. Keep the config utility open for tracking to work.
    Inspiring
    March 20, 2016
    "rupy" wrote:
    I can't use direct mode from LWJGL, I would then have to use Unity or Unreal which both cost money and do not give me the full control over rendering and other things.


    Yes, you can, and even if you couldn't, switching to Vive wouldn't help, since they're migrating to direct mode as well.
    Brad Davis - Developer for High Fidelity Co-author of Oculus Rift in Action
    rupyAuthor
    Up and Coming
    March 20, 2016
    I can't add my own window to direct mode no, on neither; Valve is keeping extended as an option which Oculus did not. SteamVR -> Devices -> Direct Mode (does not work on Oculus obviously)
    "It's like Homeworld in first person." Disable Aero and vSync for a completely simulator sickness free experience with 2xHz FPS. Keep the config utility open for tracking to work.
    Inspiring
    March 22, 2016
    "rupy" wrote:
    I can't add my own window to direct mode no, on neither


    You don't add a window to direct mode. You request texture IDs from the SDK and then render to them using framebuffers. This is the way it's been for a long time. LWJGL can do it, JOGL can do it, there's no reason you can't do it too. The old 'attach to window' mechanism of using direct mode is long dead, and good riddance.
    Brad Davis - Developer for High Fidelity Co-author of Oculus Rift in Action