Class BGFXPlatformData

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

    public class BGFXPlatformData
    extends Struct
    implements 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
    • sessionovrSession, for Oculus SDK

    Layout

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

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

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

        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()
        Description copied from class: Struct
        Returns sizeof(struct).
        Specified by:
        sizeof in class 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.
      • session

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

        public BGFXPlatformData session​(long value)
        Sets the specified value to the session field.
      • set

        public BGFXPlatformData set​(long ndt,
                                    long nwh,
                                    long context,
                                    long backBuffer,
                                    long backBufferDS,
                                    long session)
        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
      • createSafe

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

        public static long nsession​(long struct)
        Unsafe version of session().
      • 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.
      • nsession

        public static void nsession​(long struct,
                                    long value)
        Unsafe version of session.