Package org.lwjgl.ovr

Class ovrHmdColorDesc

java.lang.Object
org.lwjgl.system.Pointer.Default
org.lwjgl.system.Struct<ovrHmdColorDesc>
org.lwjgl.ovr.ovrHmdColorDesc
All Implemented Interfaces:
AutoCloseable, org.lwjgl.system.NativeResource, org.lwjgl.system.Pointer

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

Layout


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

    • 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 Details

    • ovrHmdColorDesc

      public ovrHmdColorDesc(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 Details

    • sizeof

      public int sizeof()
      Specified by:
      sizeof in class org.lwjgl.system.Struct<ovrHmdColorDesc>
    • 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)

    • ColorSpace

      public ovrHmdColorDesc ColorSpace(int value)
      Sets the specified value to the ColorSpace() field.
    • 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

      public static @Nullable 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(int capacity)
      Returns a new ovrHmdColorDesc.Buffer instance allocated with BufferUtils.
      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

      public static @Nullable 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:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • 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:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • nColorSpace

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

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