Class BGFXResolution

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class BGFXResolution extends Struct<BGFXResolution> implements NativeResource

 struct bgfx_resolution_t {
     bgfx_texture_format_t formatColor;
     bgfx_texture_format_t formatDepthStencil;
     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.
    • FORMATCOLOR

      public static final int FORMATCOLOR
      The struct member offsets.
    • FORMATDEPTHSTENCIL

      public static final int FORMATDEPTHSTENCIL
      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>
    • formatColor

      public int formatColor()
      Returns:
      the value of the formatColor field.
    • formatDepthStencil

      public int formatDepthStencil()
      Returns:
      the value of the formatDepthStencil 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.
    • debugTextScale

      public byte debugTextScale()
      Returns:
      the value of the debugTextScale field.
    • formatColor

      public BGFXResolution formatColor(int value)
      Sets the specified value to the formatColor field.
    • formatDepthStencil

      public BGFXResolution formatDepthStencil(int value)
      Sets the specified value to the formatDepthStencil 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 formatColor, int formatDepthStencil, 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

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

      public static int nformatColor(long struct)
      Unsafe version of formatColor().
    • nformatDepthStencil

      public static int nformatDepthStencil(long struct)
      Unsafe version of formatDepthStencil().
    • 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().
    • nformatColor

      public static void nformatColor(long struct, int value)
      Unsafe version of formatColor.
    • nformatDepthStencil

      public static void nformatDepthStencil(long struct, int value)
      Unsafe version of formatDepthStencil.
    • 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.