Class PIXELFORMATDESCRIPTOR

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class PIXELFORMATDESCRIPTOR extends Struct<PIXELFORMATDESCRIPTOR> implements NativeResource
Describes the pixel format of a drawing surface.

Layout


 struct PIXELFORMATDESCRIPTOR {
     WORD nSize();
     WORD nVersion();
     DWORD dwFlags();
     BYTE iPixelType();
     BYTE cColorBits();
     BYTE cRedBits();
     BYTE cRedShift();
     BYTE cGreenBits();
     BYTE cGreenShift();
     BYTE cBlueBits();
     BYTE cBlueShift();
     BYTE cAlphaBits();
     BYTE cAlphaShift();
     BYTE cAccumBits();
     BYTE cAccumRedBits();
     BYTE cAccumGreenBits();
     BYTE cAccumBlueBits();
     BYTE cAccumAlphaBits();
     BYTE cDepthBits();
     BYTE cStencilBits();
     BYTE cAuxBuffers();
     BYTE iLayerType();
     BYTE bReserved();
     DWORD dwLayerMask();
     DWORD dwVisibleMask();
     DWORD dwDamageMask();
 }
  • Field Details

    • SIZEOF

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

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

      public static final int NSIZE
      The struct member offsets.
    • NVERSION

      public static final int NVERSION
      The struct member offsets.
    • DWFLAGS

      public static final int DWFLAGS
      The struct member offsets.
    • IPIXELTYPE

      public static final int IPIXELTYPE
      The struct member offsets.
    • CCOLORBITS

      public static final int CCOLORBITS
      The struct member offsets.
    • CREDBITS

      public static final int CREDBITS
      The struct member offsets.
    • CREDSHIFT

      public static final int CREDSHIFT
      The struct member offsets.
    • CGREENBITS

      public static final int CGREENBITS
      The struct member offsets.
    • CGREENSHIFT

      public static final int CGREENSHIFT
      The struct member offsets.
    • CBLUEBITS

      public static final int CBLUEBITS
      The struct member offsets.
    • CBLUESHIFT

      public static final int CBLUESHIFT
      The struct member offsets.
    • CALPHABITS

      public static final int CALPHABITS
      The struct member offsets.
    • CALPHASHIFT

      public static final int CALPHASHIFT
      The struct member offsets.
    • CACCUMBITS

      public static final int CACCUMBITS
      The struct member offsets.
    • CACCUMREDBITS

      public static final int CACCUMREDBITS
      The struct member offsets.
    • CACCUMGREENBITS

      public static final int CACCUMGREENBITS
      The struct member offsets.
    • CACCUMBLUEBITS

      public static final int CACCUMBLUEBITS
      The struct member offsets.
    • CACCUMALPHABITS

      public static final int CACCUMALPHABITS
      The struct member offsets.
    • CDEPTHBITS

      public static final int CDEPTHBITS
      The struct member offsets.
    • CSTENCILBITS

      public static final int CSTENCILBITS
      The struct member offsets.
    • CAUXBUFFERS

      public static final int CAUXBUFFERS
      The struct member offsets.
    • ILAYERTYPE

      public static final int ILAYERTYPE
      The struct member offsets.
    • BRESERVED

      public static final int BRESERVED
      The struct member offsets.
    • DWLAYERMASK

      public static final int DWLAYERMASK
      The struct member offsets.
    • DWVISIBLEMASK

      public static final int DWVISIBLEMASK
      The struct member offsets.
    • DWDAMAGEMASK

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

    • PIXELFORMATDESCRIPTOR

      public PIXELFORMATDESCRIPTOR(ByteBuffer container)
      Creates a PIXELFORMATDESCRIPTOR 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<PIXELFORMATDESCRIPTOR>
    • nSize

      public short nSize()
      specifies the size of this data structure. This value should be set to SIZEOF.
    • nVersion

      public short nVersion()
      specifies the version of this data structure. This value should be set to 1
    • dwFlags

      public int dwFlags()
      a set of bit flags that specify properties of the pixel buffer
    • iPixelType

      public byte iPixelType()
      specifies the type of pixel data
    • cColorBits

      public byte cColorBits()
      specifies the number of color bitplanes in each color buffer. For RGBA pixel types, it is the size of the color buffer, excluding the alpha bitplanes. For color-index pixels, it is the size of the color-index buffer.
    • cRedBits

      public byte cRedBits()
      specifies the number of red bitplanes in each RGBA color buffer
    • cRedShift

      public byte cRedShift()
      specifies the shift count for red bitplanes in each RGBA color buffer
    • cGreenBits

      public byte cGreenBits()
      specifies the number of green bitplanes in each RGBA color buffer
    • cGreenShift

      public byte cGreenShift()
      specifies the shift count for green bitplanes in each RGBA color buffer
    • cBlueBits

      public byte cBlueBits()
      specifies the number of blue bitplanes in each RGBA color buffer
    • cBlueShift

      public byte cBlueShift()
      specifies the shift count for blue bitplanes in each RGBA color buffer
    • cAlphaBits

      public byte cAlphaBits()
      specifies the number of alpha bitplanes in each RGBA color buffer. Alpha bitplanes are not supported
    • cAlphaShift

      public byte cAlphaShift()
      specifies the shift count for alpha bitplanes in each RGBA color buffer. Alpha bitplanes are not supported
    • cAccumBits

      public byte cAccumBits()
      specifies the total number of bitplanes in the accumulation buffer
    • cAccumRedBits

      public byte cAccumRedBits()
      specifies the number of red bitplanes in the accumulation buffer
    • cAccumGreenBits

      public byte cAccumGreenBits()
      specifies the number of green bitplanes in the accumulation buffer
    • cAccumBlueBits

      public byte cAccumBlueBits()
      specifies the number of blue bitplanes in the accumulation buffer
    • cAccumAlphaBits

      public byte cAccumAlphaBits()
      specifies the number of alpha bitplanes in the accumulation buffer
    • cDepthBits

      public byte cDepthBits()
      specifies the depth of the depth (z-axis) buffer
    • cStencilBits

      public byte cStencilBits()
      specifies the depth of the stencil buffer
    • cAuxBuffers

      public byte cAuxBuffers()
      specifies the number of auxiliary buffers. Auxiliary buffers are not supported
    • iLayerType

      public byte iLayerType()
      Ignored. Earlier implementations of OpenGL used this member, but it is no longer used.
    • bReserved

      public byte bReserved()
      specifies the number of overlay and underlay planes. Bits 0 through 3 specify up to 15 overlay planes and bits 4 through 7 specify up to 15 underlay planes
    • dwLayerMask

      public int dwLayerMask()
      Ignored. Earlier implementations of OpenGL used this member, but it is no longer used.
    • dwVisibleMask

      public int dwVisibleMask()
      specifies the transparent color or index of an underlay plane. When the pixel type is RGBA, dwVisibleMask is a transparent RGB color value. When the pixel type is color index, it is a transparent index value.
    • dwDamageMask

      public int dwDamageMask()
      Ignored. Earlier implementations of OpenGL used this member, but it is no longer used.
    • nSize

      public PIXELFORMATDESCRIPTOR nSize(short value)
      Sets the specified value to the nSize() field.
    • nVersion

      public PIXELFORMATDESCRIPTOR nVersion(short value)
      Sets the specified value to the nVersion() field.
    • dwFlags

      public PIXELFORMATDESCRIPTOR dwFlags(int value)
      Sets the specified value to the dwFlags() field.
    • iPixelType

      public PIXELFORMATDESCRIPTOR iPixelType(byte value)
      Sets the specified value to the iPixelType() field.
    • cColorBits

      public PIXELFORMATDESCRIPTOR cColorBits(byte value)
      Sets the specified value to the cColorBits() field.
    • cRedBits

      public PIXELFORMATDESCRIPTOR cRedBits(byte value)
      Sets the specified value to the cRedBits() field.
    • cRedShift

      public PIXELFORMATDESCRIPTOR cRedShift(byte value)
      Sets the specified value to the cRedShift() field.
    • cGreenBits

      public PIXELFORMATDESCRIPTOR cGreenBits(byte value)
      Sets the specified value to the cGreenBits() field.
    • cGreenShift

      public PIXELFORMATDESCRIPTOR cGreenShift(byte value)
      Sets the specified value to the cGreenShift() field.
    • cBlueBits

      public PIXELFORMATDESCRIPTOR cBlueBits(byte value)
      Sets the specified value to the cBlueBits() field.
    • cBlueShift

      public PIXELFORMATDESCRIPTOR cBlueShift(byte value)
      Sets the specified value to the cBlueShift() field.
    • cAlphaBits

      public PIXELFORMATDESCRIPTOR cAlphaBits(byte value)
      Sets the specified value to the cAlphaBits() field.
    • cAlphaShift

      public PIXELFORMATDESCRIPTOR cAlphaShift(byte value)
      Sets the specified value to the cAlphaShift() field.
    • cAccumBits

      public PIXELFORMATDESCRIPTOR cAccumBits(byte value)
      Sets the specified value to the cAccumBits() field.
    • cAccumRedBits

      public PIXELFORMATDESCRIPTOR cAccumRedBits(byte value)
      Sets the specified value to the cAccumRedBits() field.
    • cAccumGreenBits

      public PIXELFORMATDESCRIPTOR cAccumGreenBits(byte value)
      Sets the specified value to the cAccumGreenBits() field.
    • cAccumBlueBits

      public PIXELFORMATDESCRIPTOR cAccumBlueBits(byte value)
      Sets the specified value to the cAccumBlueBits() field.
    • cAccumAlphaBits

      public PIXELFORMATDESCRIPTOR cAccumAlphaBits(byte value)
      Sets the specified value to the cAccumAlphaBits() field.
    • cDepthBits

      public PIXELFORMATDESCRIPTOR cDepthBits(byte value)
      Sets the specified value to the cDepthBits() field.
    • cStencilBits

      public PIXELFORMATDESCRIPTOR cStencilBits(byte value)
      Sets the specified value to the cStencilBits() field.
    • cAuxBuffers

      public PIXELFORMATDESCRIPTOR cAuxBuffers(byte value)
      Sets the specified value to the cAuxBuffers() field.
    • iLayerType

      public PIXELFORMATDESCRIPTOR iLayerType(byte value)
      Sets the specified value to the iLayerType() field.
    • bReserved

      public PIXELFORMATDESCRIPTOR bReserved(byte value)
      Sets the specified value to the bReserved() field.
    • dwLayerMask

      public PIXELFORMATDESCRIPTOR dwLayerMask(int value)
      Sets the specified value to the dwLayerMask() field.
    • dwVisibleMask

      public PIXELFORMATDESCRIPTOR dwVisibleMask(int value)
      Sets the specified value to the dwVisibleMask() field.
    • dwDamageMask

      public PIXELFORMATDESCRIPTOR dwDamageMask(int value)
      Sets the specified value to the dwDamageMask() field.
    • set

      public PIXELFORMATDESCRIPTOR set(short nSize, short nVersion, int dwFlags, byte iPixelType, byte cColorBits, byte cRedBits, byte cRedShift, byte cGreenBits, byte cGreenShift, byte cBlueBits, byte cBlueShift, byte cAlphaBits, byte cAlphaShift, byte cAccumBits, byte cAccumRedBits, byte cAccumGreenBits, byte cAccumBlueBits, byte cAccumAlphaBits, byte cDepthBits, byte cStencilBits, byte cAuxBuffers, byte iLayerType, byte bReserved, int dwLayerMask, int dwVisibleMask, int dwDamageMask)
      Initializes this struct with the specified values.
    • set

      Copies the specified struct data to this struct.
      Parameters:
      src - the source struct
      Returns:
      this struct
    • malloc

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

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

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

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

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

      public static PIXELFORMATDESCRIPTOR.Buffer malloc(int capacity)
      Returns a new PIXELFORMATDESCRIPTOR.Buffer instance allocated with memAlloc. The instance must be explicitly freed.
      Parameters:
      capacity - the buffer capacity
    • calloc

      public static PIXELFORMATDESCRIPTOR.Buffer calloc(int capacity)
      Returns a new PIXELFORMATDESCRIPTOR.Buffer instance allocated with memCalloc. The instance must be explicitly freed.
      Parameters:
      capacity - the buffer capacity
    • create

      public static PIXELFORMATDESCRIPTOR.Buffer create(int capacity)
      Returns a new PIXELFORMATDESCRIPTOR.Buffer instance allocated with BufferUtils.
      Parameters:
      capacity - the buffer capacity
    • create

      public static PIXELFORMATDESCRIPTOR.Buffer create(long address, int capacity)
      Create a PIXELFORMATDESCRIPTOR.Buffer instance at the specified memory.
      Parameters:
      address - the memory address
      capacity - the buffer capacity
    • createSafe

      @Nullable public static PIXELFORMATDESCRIPTOR.Buffer createSafe(long address, int capacity)
      Like create, but returns null if address is NULL.
    • mallocStack

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

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

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

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

      @Deprecated public static PIXELFORMATDESCRIPTOR.Buffer mallocStack(int capacity)
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(int, MemoryStack) instead.
    • callocStack

      @Deprecated public static PIXELFORMATDESCRIPTOR.Buffer callocStack(int capacity)
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(int, MemoryStack) instead.
    • mallocStack

      @Deprecated public static PIXELFORMATDESCRIPTOR.Buffer mallocStack(int capacity, MemoryStack stack)
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(int, MemoryStack) instead.
    • callocStack

      @Deprecated public static PIXELFORMATDESCRIPTOR.Buffer callocStack(int capacity, MemoryStack stack)
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(int, MemoryStack) instead.
    • malloc

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

      public static PIXELFORMATDESCRIPTOR calloc(MemoryStack stack)
      Returns a new PIXELFORMATDESCRIPTOR instance allocated on the specified MemoryStack and initializes all its bits to zero.
      Parameters:
      stack - the stack from which to allocate
    • malloc

      public static PIXELFORMATDESCRIPTOR.Buffer malloc(int capacity, MemoryStack stack)
      Returns a new PIXELFORMATDESCRIPTOR.Buffer instance allocated on the specified MemoryStack.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • calloc

      public static PIXELFORMATDESCRIPTOR.Buffer calloc(int capacity, MemoryStack stack)
      Returns a new PIXELFORMATDESCRIPTOR.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • nnSize

      public static short nnSize(long struct)
      Unsafe version of nSize().
    • nnVersion

      public static short nnVersion(long struct)
      Unsafe version of nVersion().
    • ndwFlags

      public static int ndwFlags(long struct)
      Unsafe version of dwFlags().
    • niPixelType

      public static byte niPixelType(long struct)
      Unsafe version of iPixelType().
    • ncColorBits

      public static byte ncColorBits(long struct)
      Unsafe version of cColorBits().
    • ncRedBits

      public static byte ncRedBits(long struct)
      Unsafe version of cRedBits().
    • ncRedShift

      public static byte ncRedShift(long struct)
      Unsafe version of cRedShift().
    • ncGreenBits

      public static byte ncGreenBits(long struct)
      Unsafe version of cGreenBits().
    • ncGreenShift

      public static byte ncGreenShift(long struct)
      Unsafe version of cGreenShift().
    • ncBlueBits

      public static byte ncBlueBits(long struct)
      Unsafe version of cBlueBits().
    • ncBlueShift

      public static byte ncBlueShift(long struct)
      Unsafe version of cBlueShift().
    • ncAlphaBits

      public static byte ncAlphaBits(long struct)
      Unsafe version of cAlphaBits().
    • ncAlphaShift

      public static byte ncAlphaShift(long struct)
      Unsafe version of cAlphaShift().
    • ncAccumBits

      public static byte ncAccumBits(long struct)
      Unsafe version of cAccumBits().
    • ncAccumRedBits

      public static byte ncAccumRedBits(long struct)
      Unsafe version of cAccumRedBits().
    • ncAccumGreenBits

      public static byte ncAccumGreenBits(long struct)
      Unsafe version of cAccumGreenBits().
    • ncAccumBlueBits

      public static byte ncAccumBlueBits(long struct)
      Unsafe version of cAccumBlueBits().
    • ncAccumAlphaBits

      public static byte ncAccumAlphaBits(long struct)
      Unsafe version of cAccumAlphaBits().
    • ncDepthBits

      public static byte ncDepthBits(long struct)
      Unsafe version of cDepthBits().
    • ncStencilBits

      public static byte ncStencilBits(long struct)
      Unsafe version of cStencilBits().
    • ncAuxBuffers

      public static byte ncAuxBuffers(long struct)
      Unsafe version of cAuxBuffers().
    • niLayerType

      public static byte niLayerType(long struct)
      Unsafe version of iLayerType().
    • nbReserved

      public static byte nbReserved(long struct)
      Unsafe version of bReserved().
    • ndwLayerMask

      public static int ndwLayerMask(long struct)
      Unsafe version of dwLayerMask().
    • ndwVisibleMask

      public static int ndwVisibleMask(long struct)
      Unsafe version of dwVisibleMask().
    • ndwDamageMask

      public static int ndwDamageMask(long struct)
      Unsafe version of dwDamageMask().
    • nnSize

      public static void nnSize(long struct, short value)
      Unsafe version of nSize.
    • nnVersion

      public static void nnVersion(long struct, short value)
      Unsafe version of nVersion.
    • ndwFlags

      public static void ndwFlags(long struct, int value)
      Unsafe version of dwFlags.
    • niPixelType

      public static void niPixelType(long struct, byte value)
      Unsafe version of iPixelType.
    • ncColorBits

      public static void ncColorBits(long struct, byte value)
      Unsafe version of cColorBits.
    • ncRedBits

      public static void ncRedBits(long struct, byte value)
      Unsafe version of cRedBits.
    • ncRedShift

      public static void ncRedShift(long struct, byte value)
      Unsafe version of cRedShift.
    • ncGreenBits

      public static void ncGreenBits(long struct, byte value)
      Unsafe version of cGreenBits.
    • ncGreenShift

      public static void ncGreenShift(long struct, byte value)
      Unsafe version of cGreenShift.
    • ncBlueBits

      public static void ncBlueBits(long struct, byte value)
      Unsafe version of cBlueBits.
    • ncBlueShift

      public static void ncBlueShift(long struct, byte value)
      Unsafe version of cBlueShift.
    • ncAlphaBits

      public static void ncAlphaBits(long struct, byte value)
      Unsafe version of cAlphaBits.
    • ncAlphaShift

      public static void ncAlphaShift(long struct, byte value)
      Unsafe version of cAlphaShift.
    • ncAccumBits

      public static void ncAccumBits(long struct, byte value)
      Unsafe version of cAccumBits.
    • ncAccumRedBits

      public static void ncAccumRedBits(long struct, byte value)
      Unsafe version of cAccumRedBits.
    • ncAccumGreenBits

      public static void ncAccumGreenBits(long struct, byte value)
      Unsafe version of cAccumGreenBits.
    • ncAccumBlueBits

      public static void ncAccumBlueBits(long struct, byte value)
      Unsafe version of cAccumBlueBits.
    • ncAccumAlphaBits

      public static void ncAccumAlphaBits(long struct, byte value)
      Unsafe version of cAccumAlphaBits.
    • ncDepthBits

      public static void ncDepthBits(long struct, byte value)
      Unsafe version of cDepthBits.
    • ncStencilBits

      public static void ncStencilBits(long struct, byte value)
      Unsafe version of cStencilBits.
    • ncAuxBuffers

      public static void ncAuxBuffers(long struct, byte value)
      Unsafe version of cAuxBuffers.
    • niLayerType

      public static void niLayerType(long struct, byte value)
      Unsafe version of iLayerType.
    • nbReserved

      public static void nbReserved(long struct, byte value)
      Unsafe version of bReserved.
    • ndwLayerMask

      public static void ndwLayerMask(long struct, int value)
      Unsafe version of dwLayerMask.
    • ndwVisibleMask

      public static void ndwVisibleMask(long struct, int value)
      Unsafe version of dwVisibleMask.
    • ndwDamageMask

      public static void ndwDamageMask(long struct, int value)
      Unsafe version of dwDamageMask.