Class BGFXResolution

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

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

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();
     uint8_t debugTextScale();
 }
  • Field Details

    • SIZEOF

      public static final int SIZEOF
      The struct size in bytes.
    • ALIGNOF

      public static final int ALIGNOF
      The struct alignment in bytes.
    • FORMAT

      public static final int FORMAT
      The struct member offsets.
    • WIDTH

      public static final int WIDTH
      The struct member offsets.
    • HEIGHT

      public static final int HEIGHT
      The struct member offsets.
    • RESET

      public static final int RESET
      The struct member offsets.
    • NUMBACKBUFFERS

      public static final int NUMBACKBUFFERS
      The struct member offsets.
    • MAXFRAMELATENCY

      public static final int MAXFRAMELATENCY
      The struct member offsets.
    • DEBUGTEXTSCALE

      public static final int DEBUGTEXTSCALE
      The struct member offsets.
  • Constructor Details

    • BGFXResolution

      public BGFXResolution(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 Details

    • sizeof

      public int sizeof()
      Description copied from class: Struct
      Returns sizeof(struct).
      Specified by:
      sizeof in class Struct<BGFXResolution>
    • format

      public int format()
      backbuffer format
    • width

      public int width()
      backbuffer width
    • height

      public int height()
      backbuffer height
    • reset

      public int reset()
      reset parameters
    • numBackBuffers

      public byte numBackBuffers()
      number of back buffers
    • maxFrameLatency

      public byte maxFrameLatency()
      maximum frame latency
    • debugTextScale

      public byte debugTextScale()
      scale factor for debug text
    • 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.
    • debugTextScale

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

      public BGFXResolution set(int format, int width, int height, int reset, byte numBackBuffers, byte maxFrameLatency, byte debugTextScale)
      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

      @Deprecated public static BGFXResolution mallocStack()
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(MemoryStack) instead.
    • callocStack

      @Deprecated public static BGFXResolution callocStack()
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(MemoryStack) instead.
    • mallocStack

      @Deprecated public static BGFXResolution mallocStack(MemoryStack stack)
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(MemoryStack) instead.
    • callocStack

      @Deprecated public static BGFXResolution callocStack(MemoryStack stack)
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(MemoryStack) instead.
    • malloc

      public static BGFXResolution malloc(MemoryStack stack)
      Returns a new BGFXResolution instance allocated on the specified MemoryStack.
      Parameters:
      stack - the stack from which to allocate
    • calloc

      public static BGFXResolution calloc(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().
    • ndebugTextScale

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

      public static void ndebugTextScale(long struct, byte value)
      Unsafe version of debugTextScale.