Package org.lwjgl.sdl

Class SDL_Surface.Buffer

All Implemented Interfaces:
AutoCloseable, Iterable<SDL_Surface>, NativeResource, Pointer
Enclosing class:
SDL_Surface

public static class SDL_Surface.Buffer extends StructBuffer<SDL_Surface,SDL_Surface.Buffer> implements NativeResource
An array of SDL_Surface structs.
  • Constructor Details

    • Buffer

      public Buffer(ByteBuffer container)
      Creates a new SDL_Surface.Buffer instance backed by the specified container.

      Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided by SDL_Surface.SIZEOF, and its mark will be undefined.

      The created buffer instance holds a strong reference to the container object.

    • Buffer

      public Buffer(long address, int cap)
  • Method Details

    • flags

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

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

      public int w()
      Returns:
      the value of the w field.
    • h

      public int h()
      Returns:
      the value of the h field.
    • pitch

      public int pitch()
      Returns:
      the value of the pitch field.
    • pixels

      public @Nullable ByteBuffer pixels()
      Returns:
      a ByteBuffer view of the data pointed to by the pixels field.
    • refcount

      public int refcount()
      Returns:
      the value of the refcount field.
    • flags

      public SDL_Surface.Buffer flags(int value)
      Sets the specified value to the flags field.
    • format

      public SDL_Surface.Buffer format(int value)
      Sets the specified value to the format field.
    • w

      public SDL_Surface.Buffer w(int value)
      Sets the specified value to the w field.
    • h

      public SDL_Surface.Buffer h(int value)
      Sets the specified value to the h field.
    • pitch

      public SDL_Surface.Buffer pitch(int value)
      Sets the specified value to the pitch field.
    • pixels

      public SDL_Surface.Buffer pixels(@Nullable ByteBuffer value)
      Sets the address of the specified ByteBuffer to the pixels field.
    • refcount

      public SDL_Surface.Buffer refcount(int value)
      Sets the specified value to the refcount field.