Package org.lwjgl.ovr

Class OVRSessionStatus

  • All Implemented Interfaces:
    java.lang.AutoCloseable, org.lwjgl.system.NativeResource, org.lwjgl.system.Pointer


    public class OVRSessionStatus
    extends org.lwjgl.system.Struct
    implements org.lwjgl.system.NativeResource
    Specifies status information for the current session.

    Member documentation

    • IsVisible – True if the process has VR focus and thus is visible in the HMD.
    • HmdPresent – True if an HMD is present.
    • HmdMounted – True if the HMD is on the user's head.
    • DisplayLost – True if the session is in a display-lost state. See SubmitFrame.
    • ShouldQuit – True if the application should initiate shutdown.
    • ShouldRecenter – True if UX has requested re-centering. Must call ClearShouldRecenterFlag, RecenterTrackingOrigin or SpecifyTrackingOrigin.
    • HasInputFocus – True if the application is the foreground application and receives input (e.g. Touch controller state). If this is false then the application is in the background (but possibly still visible) should hide any input representations such as hands.
    • OverlayPresent – True if a system overlay is present, such as a dashboard. In this case the application (if visible) should pause while still drawing, avoid drawing near-field graphics so they don't visually fight with the system overlay, and consume fewer CPU and GPU resources.

    Layout

     struct ovrSessionStatus {
         ovrBool IsVisible;
         ovrBool HmdPresent;
         ovrBool HmdMounted;
         ovrBool DisplayLost;
         ovrBool ShouldQuit;
         ovrBool ShouldRecenter;
         ovrBool HasInputFocus;
         ovrBool OverlayPresent;
     }
    • Field Detail

      • SIZEOF

        public static final int SIZEOF
        The struct size in bytes.
    • Constructor Detail

      • OVRSessionStatus

        public OVRSessionStatus(java.nio.ByteBuffer container)
        Creates a OVRSessionStatus instance at the current position of the specified ByteBuffer container. Changes to the buffer's content will be visible to the struct instance and vice versa.

        The created instance holds a strong reference to the container object.

    • Method Detail

      • sizeof

        public int sizeof()
        Specified by:
        sizeof in class org.lwjgl.system.Struct
      • IsVisible

        public boolean IsVisible()
        Returns the value of the IsVisible field.
      • HmdPresent

        public boolean HmdPresent()
        Returns the value of the HmdPresent field.
      • HmdMounted

        public boolean HmdMounted()
        Returns the value of the HmdMounted field.
      • DisplayLost

        public boolean DisplayLost()
        Returns the value of the DisplayLost field.
      • ShouldQuit

        public boolean ShouldQuit()
        Returns the value of the ShouldQuit field.
      • ShouldRecenter

        public boolean ShouldRecenter()
        Returns the value of the ShouldRecenter field.
      • HasInputFocus

        public boolean HasInputFocus()
        Returns the value of the HasInputFocus field.
      • OverlayPresent

        public boolean OverlayPresent()
        Returns the value of the OverlayPresent field.
      • createSafe

        @Nullable
        public static OVRSessionStatus createSafe(long address)
        Like create, but returns null if address is NULL.
      • createSafe

        @Nullable
        public static OVRSessionStatus.Buffer createSafe(long address,
                                                         int capacity)
        Like create, but returns null if address is NULL.
      • callocStack

        public static OVRSessionStatus callocStack()
        Returns a new OVRSessionStatus instance allocated on the thread-local MemoryStack and initializes all its bits to zero.
      • mallocStack

        public static OVRSessionStatus mallocStack(org.lwjgl.system.MemoryStack stack)
        Returns a new OVRSessionStatus instance allocated on the specified MemoryStack.
        Parameters:
        stack - the stack from which to allocate
      • callocStack

        public static OVRSessionStatus callocStack(org.lwjgl.system.MemoryStack stack)
        Returns a new OVRSessionStatus instance allocated on the specified MemoryStack and initializes all its bits to zero.
        Parameters:
        stack - the stack from which to allocate
      • callocStack

        public static OVRSessionStatus.Buffer callocStack(int capacity)
        Returns a new OVRSessionStatus.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero.
        Parameters:
        capacity - the buffer capacity
      • mallocStack

        public static OVRSessionStatus.Buffer mallocStack(int capacity,
                                                          org.lwjgl.system.MemoryStack stack)
        Returns a new OVRSessionStatus.Buffer instance allocated on the specified MemoryStack.
        Parameters:
        stack - the stack from which to allocate
        capacity - the buffer capacity
      • callocStack

        public static OVRSessionStatus.Buffer callocStack(int capacity,
                                                          org.lwjgl.system.MemoryStack stack)
        Returns a new OVRSessionStatus.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.
        Parameters:
        stack - the stack from which to allocate
        capacity - the buffer capacity