Class BGFXCallbackInterface

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

public class BGFXCallbackInterface extends org.lwjgl.system.Struct<BGFXCallbackInterface> 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.

Layout


 struct bgfx_callback_interface_t {
     bgfx_callback_vtbl_t const * vtbl();
 }
  • Field Details

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

    • BGFXCallbackInterface

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

    • sizeof

      public int sizeof()
      Specified by:
      sizeof in class org.lwjgl.system.Struct<BGFXCallbackInterface>
    • vtbl

      public BGFXCallbackVtbl vtbl()
      the callback virtual table
    • vtbl

      Sets the address of the specified BGFXCallbackVtbl to the vtbl() field.
    • set

      Copies the specified struct data to this struct.
      Parameters:
      src - the source struct
      Returns:
      this 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

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

      @Deprecated public static BGFXCallbackInterface mallocStack()
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(MemoryStack) instead.
    • callocStack

      @Deprecated public static BGFXCallbackInterface callocStack()
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(MemoryStack) instead.
    • mallocStack

      @Deprecated public static BGFXCallbackInterface mallocStack(org.lwjgl.system.MemoryStack stack)
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(MemoryStack) instead.
    • callocStack

      @Deprecated public static BGFXCallbackInterface callocStack(org.lwjgl.system.MemoryStack stack)
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(MemoryStack) instead.
    • malloc

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

      public static BGFXCallbackInterface calloc(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 BGFXCallbackVtbl nvtbl(long struct)
      Unsafe version of vtbl().
    • 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