Class BGFXCallbackInterface

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

    public class BGFXCallbackInterface
    extends org.lwjgl.system.Struct
    implements org.lwjgl.system.NativeResource
    Callback interface to implement application specific behavior.

    Cached items are currently used for OpenGL and Direct3D 12 binary shaders.

    fatal and trace_vargs callbacks can be called from any thread. Other callbacks are called from the render thread.

    Member documentation

    • vtbl – the callback virtual table

    Layout

    
     struct bgfx_callback_interface_t {
         bgfx_callback_vtbl_t const * vtbl;
     }
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer

        org.lwjgl.system.Pointer.Default
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int ALIGNOF
      The struct alignment in bytes.
      static int SIZEOF
      The struct size in bytes.
      static int VTBL
      The struct member offsets.
      • Fields inherited from interface org.lwjgl.system.Pointer

        BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE
    • Constructor Summary

      Constructors 
      Constructor Description
      BGFXCallbackInterface​(java.nio.ByteBuffer container)
      Creates a BGFXCallbackInterface instance at the current position of the specified ByteBuffer container.
    • Field Detail

      • SIZEOF

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

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

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

      • BGFXCallbackInterface

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

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

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

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

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

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

        public static BGFXCallbackInterface mallocStack()
        Returns a new BGFXCallbackInterface instance allocated on the thread-local MemoryStack.
      • callocStack

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

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

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

        public static void nvtbl​(long struct,
                                 BGFXCallbackVtbl value)
        Unsafe version of vtbl.
      • 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