Class BGFXPlatformData

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

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

    Layout

    
     struct bgfx_platform_data_t {
         void * ndt();
         void * nwh();
         void * context();
         void * backBuffer();
         void * backBufferDS();
     }
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • NDT, NWH, CONTEXT, BACKBUFFER, BACKBUFFERDS

        The struct member offsets.
    • Constructor Detail

      • BGFXPlatformData

        public BGFXPlatformData​(java.nio.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 Detail

      • sizeof

        public int sizeof()
        Specified by:
        sizeof in class org.lwjgl.system.Struct
      • ndt

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

        public long nwh()
        native window handle. If NULL bgfx will create headless context/device if renderer API supports it.
      • context

        public long context()
        GL context, or D3D 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 back-buffer depth/stencil surface.
      • set

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

        public BGFXPlatformData set​(BGFXPlatformData src)
        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

        @Nullable
        public static BGFXPlatformData createSafe​(long address)
        Like create, but returns null if address is NULL.
      • 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().
      • 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.