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.

    Member documentation

    • ndt – native display type
    • nwh – native window handle
    • context – GL context, or D3D device
    • backBuffer – GL backbuffer, or D3D render target view
    • backBufferDS – Backbuffer depth/stencil

    Layout

    
     struct bgfx_platform_data_t {
         void * ndt;
         void * nwh;
         void * context;
         void * backBuffer;
         void * backBufferDS;
     }
    • 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 BACKBUFFER
      BACKBUFFERDS
      CONTEXT
      NDT
      NWH
      The struct member offsets.
      static int SIZEOF
      The struct size in bytes.
      • Fields inherited from interface org.lwjgl.system.Pointer

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

      Constructors 
      Constructor Description
      BGFXPlatformData​(java.nio.ByteBuffer container)
      Creates a BGFXPlatformData instance at the current position of the specified ByteBuffer container.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      long backBuffer()
      Returns the value of the backBuffer field.
      BGFXPlatformData backBuffer​(long value)
      Sets the specified value to the backBuffer field.
      long backBufferDS()
      Returns the value of the backBufferDS field.
      BGFXPlatformData backBufferDS​(long value)
      Sets the specified value to the backBufferDS field.
      static BGFXPlatformData calloc()
      Returns a new BGFXPlatformData instance allocated with memCalloc.
      static BGFXPlatformData callocStack()
      Returns a new BGFXPlatformData instance allocated on the thread-local MemoryStack and initializes all its bits to zero.
      static BGFXPlatformData callocStack​(org.lwjgl.system.MemoryStack stack)
      Returns a new BGFXPlatformData instance allocated on the specified MemoryStack and initializes all its bits to zero.
      long context()
      Returns the value of the context field.
      BGFXPlatformData context​(long value)
      Sets the specified value to the context field.
      static BGFXPlatformData create()
      Returns a new BGFXPlatformData instance allocated with BufferUtils.
      static BGFXPlatformData create​(long address)
      Returns a new BGFXPlatformData instance for the specified memory address.
      static BGFXPlatformData createSafe​(long address)
      Like create, but returns null if address is NULL.
      static BGFXPlatformData malloc()
      Returns a new BGFXPlatformData instance allocated with memAlloc.
      static BGFXPlatformData mallocStack()
      Returns a new BGFXPlatformData instance allocated on the thread-local MemoryStack.
      static BGFXPlatformData mallocStack​(org.lwjgl.system.MemoryStack stack)
      Returns a new BGFXPlatformData instance allocated on the specified MemoryStack.
      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()
      Returns the value of the ndt field.
      BGFXPlatformData 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.
      long nwh()
      Returns the value of the nwh field.
      BGFXPlatformData nwh​(long value)
      Sets the specified value to the nwh field.
      BGFXPlatformData set​(long ndt, long nwh, long context, long backBuffer, long backBufferDS)
      Initializes this struct with the specified values.
      BGFXPlatformData set​(BGFXPlatformData src)
      Copies the specified struct data to this struct.
      int sizeof()  
      • Methods inherited from interface org.lwjgl.system.NativeResource

        close, free
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from class org.lwjgl.system.Pointer.Default

        address, equals, hashCode, toString
      • Methods inherited from class org.lwjgl.system.Struct

        clear, free, isNull
    • 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()
        Returns the value of the ndt field.
      • nwh

        public long nwh()
        Returns the value of the nwh field.
      • context

        public long context()
        Returns the value of the context field.
      • backBuffer

        public long backBuffer()
        Returns the value of the backBuffer field.
      • backBufferDS

        public long backBufferDS()
        Returns the value of the backBufferDS field.
      • 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.
      • 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

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

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

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

        public static BGFXPlatformData callocStack​(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.