Class BGFXInit

    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • TYPE, VENDORID, DEVICEID, DEBUG, PROFILE, RESOLUTION, LIMITS, CALLBACK, ALLOCATOR

        The struct member offsets.
    • Constructor Detail

      • BGFXInit

        public BGFXInit​(java.nio.ByteBuffer container)
        Creates a BGFXInit 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()
        Description copied from class: Struct
        Returns sizeof(struct).
        Specified by:
        sizeof in class Struct
      • type

        public int type()
        Returns the value of the type field.
      • vendorId

        public short vendorId()
        Returns the value of the vendorId field.
      • deviceId

        public short deviceId()
        Returns the value of the deviceId field.
      • debug

        public boolean debug()
        Returns the value of the debug field.
      • profile

        public boolean profile()
        Returns the value of the profile field.
      • resolution

        public BGFXInit resolution​(java.util.function.Consumer<BGFXResolution> consumer)
        Passes the resolution field to the specified Consumer.
      • limits

        public BGFXInit limits​(java.util.function.Consumer<BGFXInitLimits> consumer)
        Passes the limits field to the specified Consumer.
      • type

        public BGFXInit type​(int value)
        Sets the specified value to the type field.
      • vendorId

        public BGFXInit vendorId​(short value)
        Sets the specified value to the vendorId field.
      • deviceId

        public BGFXInit deviceId​(short value)
        Sets the specified value to the deviceId field.
      • debug

        public BGFXInit debug​(boolean value)
        Sets the specified value to the debug field.
      • profile

        public BGFXInit profile​(boolean value)
        Sets the specified value to the profile field.
      • set

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

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

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

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

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

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

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

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

        public static int ntype​(long struct)
        Unsafe version of type().
      • nvendorId

        public static short nvendorId​(long struct)
        Unsafe version of vendorId().
      • ndeviceId

        public static short ndeviceId​(long struct)
        Unsafe version of deviceId().
      • ndebug

        public static boolean ndebug​(long struct)
        Unsafe version of debug().
      • nprofile

        public static boolean nprofile​(long struct)
        Unsafe version of profile().
      • ntype

        public static void ntype​(long struct,
                                 int value)
        Unsafe version of type.
      • nvendorId

        public static void nvendorId​(long struct,
                                     short value)
        Unsafe version of vendorId.
      • ndeviceId

        public static void ndeviceId​(long struct,
                                     short value)
        Unsafe version of deviceId.
      • ndebug

        public static void ndebug​(long struct,
                                  boolean value)
        Unsafe version of debug.
      • nprofile

        public static void nprofile​(long struct,
                                    boolean value)
        Unsafe version of profile.
      • nlimits

        public static void nlimits​(long struct,
                                   BGFXInitLimits value)
        Unsafe version of limits.
      • validate

        public static void validate​(long struct)
        Validates pointer members that should not be NULL.
        Parameters:
        struct - the struct to validate
      • validate

        public static void validate​(long array,
                                    int count)
        Calls validate(long) for each struct contained in the specified struct array.
        Parameters:
        array - the struct array to validate
        count - the number of structs in array