Package org.lwjgl.ovr

Class ovrHmdColorDesc

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

    public class ovrHmdColorDesc
    extends org.lwjgl.system.Struct
    implements org.lwjgl.system.NativeResource

    Layout

    
     struct ovrHmdColorDesc {
         ovrColorSpace ColorSpace();
         char[4];
     }
    • Field Detail

      • SIZEOF

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

        public static final int ALIGNOF
        The struct alignment in bytes.
      • COLORSPACE

        public static final int COLORSPACE
        The struct member offsets.
    • Constructor Detail

      • ovrHmdColorDesc

        public ovrHmdColorDesc​(java.nio.ByteBuffer container)
        Creates a ovrHmdColorDesc 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
      • ColorSpace

        public int ColorSpace()
        Approximate color space the HMD display can output.

        Use ColorPrimaries for more precise color space definition including white point (e.g. DN75)

      • set

        public ovrHmdColorDesc set​(ovrHmdColorDesc src)
        Copies the specified struct data to this struct.
        Parameters:
        src - the source struct
        Returns:
        this struct
      • malloc

        public static ovrHmdColorDesc malloc()
        Returns a new ovrHmdColorDesc instance allocated with memAlloc. The instance must be explicitly freed.
      • calloc

        public static ovrHmdColorDesc calloc()
        Returns a new ovrHmdColorDesc instance allocated with memCalloc. The instance must be explicitly freed.
      • create

        public static ovrHmdColorDesc create()
        Returns a new ovrHmdColorDesc instance allocated with BufferUtils.
      • create

        public static ovrHmdColorDesc create​(long address)
        Returns a new ovrHmdColorDesc instance for the specified memory address.
      • createSafe

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

        public static ovrHmdColorDesc.Buffer malloc​(int capacity)
        Returns a new ovrHmdColorDesc.Buffer instance allocated with memAlloc. The instance must be explicitly freed.
        Parameters:
        capacity - the buffer capacity
      • calloc

        public static ovrHmdColorDesc.Buffer calloc​(int capacity)
        Returns a new ovrHmdColorDesc.Buffer instance allocated with memCalloc. The instance must be explicitly freed.
        Parameters:
        capacity - the buffer capacity
      • create

        public static ovrHmdColorDesc.Buffer create​(long address,
                                                    int capacity)
        Create a ovrHmdColorDesc.Buffer instance at the specified memory.
        Parameters:
        address - the memory address
        capacity - the buffer capacity
      • createSafe

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

        public static ovrHmdColorDesc malloc​(org.lwjgl.system.MemoryStack stack)
        Returns a new ovrHmdColorDesc instance allocated on the specified MemoryStack.
        Parameters:
        stack - the stack from which to allocate
      • calloc

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

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

        public static ovrHmdColorDesc.Buffer calloc​(int capacity,
                                                    org.lwjgl.system.MemoryStack stack)
        Returns a new ovrHmdColorDesc.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
      • nColorSpace

        public static int nColorSpace​(long struct)
        Unsafe version of ColorSpace().
      • nColorSpace

        public static void nColorSpace​(long struct,
                                       int value)
        Unsafe version of ColorSpace.