Class BGFXResolution

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

    public class BGFXResolution
    extends Struct
    implements NativeResource
    Backbuffer resolution and reset parameters.

    Member documentation

    • format – backbuffer format
    • width – backbuffer width
    • height – backbuffer height
    • reset – reset parameters
    • maxFrameLatency – maximum frame latency

    Layout

    
     struct bgfx_resolution_t {
         bgfx_texture_format_t format;
         uint32_t width;
         uint32_t height;
         uint32_t reset;
         uint8_t maxFrameLatency;
     }
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • FORMAT, WIDTH, HEIGHT, RESET, MAXFRAMELATENCY

        The struct member offsets.
    • Constructor Detail

      • BGFXResolution

        public BGFXResolution​(java.nio.ByteBuffer container)
        Creates a BGFXResolution 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
      • format

        public int format()
        Returns the value of the format field.
      • width

        public int width()
        Returns the value of the width field.
      • height

        public int height()
        Returns the value of the height field.
      • reset

        public int reset()
        Returns the value of the reset field.
      • maxFrameLatency

        public byte maxFrameLatency()
        Returns the value of the maxFrameLatency field.
      • format

        public BGFXResolution format​(int value)
        Sets the specified value to the format field.
      • width

        public BGFXResolution width​(int value)
        Sets the specified value to the width field.
      • height

        public BGFXResolution height​(int value)
        Sets the specified value to the height field.
      • reset

        public BGFXResolution reset​(int value)
        Sets the specified value to the reset field.
      • maxFrameLatency

        public BGFXResolution maxFrameLatency​(byte value)
        Sets the specified value to the maxFrameLatency field.
      • set

        public BGFXResolution set​(int format,
                                  int width,
                                  int height,
                                  int reset,
                                  byte maxFrameLatency)
        Initializes this struct with the specified values.
      • set

        public BGFXResolution set​(BGFXResolution src)
        Copies the specified struct data to this struct.
        Parameters:
        src - the source struct
        Returns:
        this struct
      • createSafe

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

        public static int nformat​(long struct)
        Unsafe version of format().
      • nwidth

        public static int nwidth​(long struct)
        Unsafe version of width().
      • nheight

        public static int nheight​(long struct)
        Unsafe version of height().
      • nreset

        public static int nreset​(long struct)
        Unsafe version of reset().
      • nmaxFrameLatency

        public static byte nmaxFrameLatency​(long struct)
        Unsafe version of maxFrameLatency().
      • nformat

        public static void nformat​(long struct,
                                   int value)
        Unsafe version of format.
      • nwidth

        public static void nwidth​(long struct,
                                  int value)
        Unsafe version of width.
      • nheight

        public static void nheight​(long struct,
                                   int value)
        Unsafe version of height.
      • nreset

        public static void nreset​(long struct,
                                  int value)
        Unsafe version of reset.
      • nmaxFrameLatency

        public static void nmaxFrameLatency​(long struct,
                                            byte value)
        Unsafe version of maxFrameLatency.