Class BGFXResolution

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

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

    Member documentation

    • format – backbuffer format
    • width – backbuffer width
    • height – backbuffer height
    • reset – reset parameters
    • numBackBuffers – number of back buffers
    • 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 numBackBuffers;
         uint8_t maxFrameLatency;
     }
    • 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 FORMAT
      HEIGHT
      MAXFRAMELATENCY
      NUMBACKBUFFERS
      RESET
      The struct member offsets.
      static int SIZEOF
      The struct size in bytes.
      static int WIDTH
      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
      BGFXResolution​(java.nio.ByteBuffer container)
      Creates a BGFXResolution instance at the current position of the specified ByteBuffer container.
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • FORMAT, WIDTH, HEIGHT, RESET, NUMBACKBUFFERS, 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()
        Specified by:
        sizeof in class org.lwjgl.system.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.
      • numBackBuffers

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

        public BGFXResolution numBackBuffers​(byte value)
        Sets the specified value to the numBackBuffers 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 numBackBuffers,
                                  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
      • malloc

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

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

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

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

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

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

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

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

        public static BGFXResolution callocStack​(org.lwjgl.system.MemoryStack stack)
        Returns a new BGFXResolution instance allocated on the specified MemoryStack and initializes all its bits to zero.
        Parameters:
        stack - the stack from which to allocate
      • 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().
      • nnumBackBuffers

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

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

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