Class BGFXPlatformData

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

public class BGFXPlatformData extends org.lwjgl.system.Struct<BGFXPlatformData> implements org.lwjgl.system.NativeResource
Platform data.

Layout


 struct bgfx_platform_data_t {
     void * ndt();
     void * nwh();
     void * context();
     void * backBuffer();
     void * backBufferDS();
     bgfx_native_window_handle_type_t type();
 }
  • Nested Class Summary

    Nested classes/interfaces inherited from class org.lwjgl.system.Struct

    org.lwjgl.system.Struct.StructValidation

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

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

    Fields
    Modifier and Type
    Field
    Description
    static final int
    The struct alignment in bytes.
    static final int
    The struct member offsets.
    static final int
    The struct member offsets.
    static final int
    The struct member offsets.
    static final int
    The struct member offsets.
    static final int
    The struct member offsets.
    static final int
    The struct size in bytes.
    static final int
    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
    Creates a BGFXPlatformData instance at the current position of the specified ByteBuffer container.
  • Method Summary

    Modifier and Type
    Method
    Description
    long
    GL back-buffer, or D3D render target view.
    backBuffer(long value)
    Sets the specified value to the backBuffer() field.
    long
    backbuffer depth/stencil.
    backBufferDS(long value)
    Sets the specified value to the backBufferDS() field.
    Returns a new BGFXPlatformData instance allocated with memCalloc.
    calloc(org.lwjgl.system.MemoryStack stack)
    Returns a new BGFXPlatformData instance allocated on the specified MemoryStack and initializes all its bits to zero.
    Deprecated.
    callocStack(org.lwjgl.system.MemoryStack stack)
    Deprecated.
    long
    GL context, D3D device, or Vulkan device.
    context(long value)
    Sets the specified value to the context() field.
    Returns a new BGFXPlatformData instance allocated with BufferUtils.
    create(long address)
    Returns a new BGFXPlatformData instance for the specified memory address.
    static @Nullable BGFXPlatformData
    createSafe(long address)
    Like create, but returns null if address is NULL.
    Returns a new BGFXPlatformData instance allocated with memAlloc.
    malloc(org.lwjgl.system.MemoryStack stack)
    Returns a new BGFXPlatformData instance allocated on the specified MemoryStack.
    Deprecated.
    mallocStack(org.lwjgl.system.MemoryStack stack)
    Deprecated.
    static long
    nbackBuffer(long struct)
    Unsafe version of backBuffer().
    static void
    nbackBuffer(long struct, long value)
    Unsafe version of backBuffer.
    static long
    nbackBufferDS(long struct)
    Unsafe version of backBufferDS().
    static void
    nbackBufferDS(long struct, long value)
    Unsafe version of backBufferDS.
    static long
    ncontext(long struct)
    Unsafe version of context().
    static void
    ncontext(long struct, long value)
    Unsafe version of context.
    long
    ndt()
    native display type (*nix specific)
    ndt(long value)
    Sets the specified value to the ndt() field.
    static long
    nndt(long struct)
    Unsafe version of ndt().
    static void
    nndt(long struct, long value)
    Unsafe version of ndt.
    static long
    nnwh(long struct)
    Unsafe version of nwh().
    static void
    nnwh(long struct, long value)
    Unsafe version of nwh.
    static int
    ntype(long struct)
    Unsafe version of type().
    static void
    ntype(long struct, int value)
    Unsafe version of type.
    long
    nwh()
    native window handle.
    nwh(long value)
    Sets the specified value to the nwh() field.
    set(long ndt, long nwh, long context, long backBuffer, long backBufferDS, int type)
    Initializes this struct with the specified values.
    Copies the specified struct data to this struct.
    int
     
    int
    handle type.
    type(int value)
    Sets the specified value to the type() field.

    Methods inherited from class org.lwjgl.system.Struct

    clear, free, isNull, validate, validate

    Methods inherited from class org.lwjgl.system.Pointer.Default

    address, equals, hashCode, toString

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.lwjgl.system.NativeResource

    close, free
  • Field Details

    • SIZEOF

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

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

      public static final int NDT
      The struct member offsets.
    • NWH

      public static final int NWH
      The struct member offsets.
    • CONTEXT

      public static final int CONTEXT
      The struct member offsets.
    • BACKBUFFER

      public static final int BACKBUFFER
      The struct member offsets.
    • BACKBUFFERDS

      public static final int BACKBUFFERDS
      The struct member offsets.
    • TYPE

      public static final int TYPE
      The struct member offsets.
  • Constructor Details

    • BGFXPlatformData

      public BGFXPlatformData(ByteBuffer container)
      Creates a BGFXPlatformData 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<BGFXPlatformData>
    • ndt

      public long ndt()
      native display type (*nix specific)
    • nwh

      public long nwh()
      native window handle. If NULL, bgfx will create a headless context/device, provided the rendering API supports it.
    • context

      public long context()
      GL context, D3D device, or Vulkan device. If NULL, bgfx will create context/device.
    • backBuffer

      public long backBuffer()
      GL back-buffer, or D3D render target view. If NULL bgfx will create back-buffer color surface.
    • backBufferDS

      public long backBufferDS()
      backbuffer depth/stencil. If NULL, bgfx will create a back-buffer depth/stencil surface.
    • type

      public int type()
      handle type. Needed for platforms having more than one option.
    • ndt

      public BGFXPlatformData ndt(long value)
      Sets the specified value to the ndt() field.
    • nwh

      public BGFXPlatformData nwh(long value)
      Sets the specified value to the nwh() field.
    • context

      public BGFXPlatformData context(long value)
      Sets the specified value to the context() field.
    • backBuffer

      public BGFXPlatformData backBuffer(long value)
      Sets the specified value to the backBuffer() field.
    • backBufferDS

      public BGFXPlatformData backBufferDS(long value)
      Sets the specified value to the backBufferDS() field.
    • type

      public BGFXPlatformData type(int value)
      Sets the specified value to the type() field.
    • set

      public BGFXPlatformData set(long ndt, long nwh, long context, long backBuffer, long backBufferDS, int type)
      Initializes this struct with the specified values.
    • set

      Copies the specified struct data to this struct.
      Parameters:
      src - the source struct
      Returns:
      this struct
    • malloc

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

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

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

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

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

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

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

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

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

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

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

      public static long nndt(long struct)
      Unsafe version of ndt().
    • nnwh

      public static long nnwh(long struct)
      Unsafe version of nwh().
    • ncontext

      public static long ncontext(long struct)
      Unsafe version of context().
    • nbackBuffer

      public static long nbackBuffer(long struct)
      Unsafe version of backBuffer().
    • nbackBufferDS

      public static long nbackBufferDS(long struct)
      Unsafe version of backBufferDS().
    • ntype

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

      public static void nndt(long struct, long value)
      Unsafe version of ndt.
    • nnwh

      public static void nnwh(long struct, long value)
      Unsafe version of nwh.
    • ncontext

      public static void ncontext(long struct, long value)
      Unsafe version of context.
    • nbackBuffer

      public static void nbackBuffer(long struct, long value)
      Unsafe version of backBuffer.
    • nbackBufferDS

      public static void nbackBufferDS(long struct, long value)
      Unsafe version of backBufferDS.
    • ntype

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