Class PIXELFORMATDESCRIPTOR

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

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

    Member documentation

    • nSize – specifies the size of this data structure. This value should be set to SIZEOF.
    • nVersion – specifies the version of this data structure. This value should be set to 1
    • dwFlags – a set of bit flags that specify properties of the pixel buffer
    • iPixelType – specifies the type of pixel data
    • 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 – specifies the number of red bitplanes in each RGBA color buffer
    • cRedShift – specifies the shift count for red bitplanes in each RGBA color buffer
    • cGreenBits – specifies the number of green bitplanes in each RGBA color buffer
    • cGreenShift – specifies the shift count for green bitplanes in each RGBA color buffer
    • cBlueBits – specifies the number of blue bitplanes in each RGBA color buffer
    • cBlueShift – specifies the shift count for blue bitplanes in each RGBA color buffer
    • cAlphaBits – specifies the number of alpha bitplanes in each RGBA color buffer. Alpha bitplanes are not supported
    • cAlphaShift – specifies the shift count for alpha bitplanes in each RGBA color buffer. Alpha bitplanes are not supported
    • cAccumBits – specifies the total number of bitplanes in the accumulation buffer
    • cAccumRedBits – specifies the number of red bitplanes in the accumulation buffer
    • cAccumGreenBits – specifies the number of green bitplanes in the accumulation buffer
    • cAccumBlueBits – specifies the number of blue bitplanes in the accumulation buffer
    • cAccumAlphaBits – specifies the number of alpha bitplanes in the accumulation buffer
    • cDepthBits – specifies the depth of the depth (z-axis) buffer
    • cStencilBits – specifies the depth of the stencil buffer
    • cAuxBuffers – specifies the number of auxiliary buffers. Auxiliary buffers are not supported
    • iLayerType – Ignored. Earlier implementations of OpenGL used this member, but it is no longer used.
    • 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 – Ignored. Earlier implementations of OpenGL used this member, but it is no longer used.
    • 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 – Ignored. Earlier implementations of OpenGL used this member, but it is no longer used.

    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 Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • NSIZE, NVERSION, DWFLAGS, IPIXELTYPE, CCOLORBITS, CREDBITS, CREDSHIFT, CGREENBITS, CGREENSHIFT, CBLUEBITS, CBLUESHIFT, CALPHABITS, CALPHASHIFT, CACCUMBITS, CACCUMREDBITS, CACCUMGREENBITS, CACCUMBLUEBITS, CACCUMALPHABITS, CDEPTHBITS, CSTENCILBITS, CAUXBUFFERS, ILAYERTYPE, BRESERVED, DWLAYERMASK, DWVISIBLEMASK, DWDAMAGEMASK

        The struct member offsets.
    • Constructor Detail

      • PIXELFORMATDESCRIPTOR

        public PIXELFORMATDESCRIPTOR​(java.nio.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 Detail

      • sizeof

        public int sizeof()
        Description copied from class: Struct
        Returns sizeof(struct).
        Specified by:
        sizeof in class Struct
      • nSize

        public short nSize()
        Returns the value of the nSize field.
      • nVersion

        public short nVersion()
        Returns the value of the nVersion field.
      • dwFlags

        public int dwFlags()
        Returns the value of the dwFlags field.
      • iPixelType

        public byte iPixelType()
        Returns the value of the iPixelType field.
      • cColorBits

        public byte cColorBits()
        Returns the value of the cColorBits field.
      • cRedBits

        public byte cRedBits()
        Returns the value of the cRedBits field.
      • cRedShift

        public byte cRedShift()
        Returns the value of the cRedShift field.
      • cGreenBits

        public byte cGreenBits()
        Returns the value of the cGreenBits field.
      • cGreenShift

        public byte cGreenShift()
        Returns the value of the cGreenShift field.
      • cBlueBits

        public byte cBlueBits()
        Returns the value of the cBlueBits field.
      • cBlueShift

        public byte cBlueShift()
        Returns the value of the cBlueShift field.
      • cAlphaBits

        public byte cAlphaBits()
        Returns the value of the cAlphaBits field.
      • cAlphaShift

        public byte cAlphaShift()
        Returns the value of the cAlphaShift field.
      • cAccumBits

        public byte cAccumBits()
        Returns the value of the cAccumBits field.
      • cAccumRedBits

        public byte cAccumRedBits()
        Returns the value of the cAccumRedBits field.
      • cAccumGreenBits

        public byte cAccumGreenBits()
        Returns the value of the cAccumGreenBits field.
      • cAccumBlueBits

        public byte cAccumBlueBits()
        Returns the value of the cAccumBlueBits field.
      • cAccumAlphaBits

        public byte cAccumAlphaBits()
        Returns the value of the cAccumAlphaBits field.
      • cDepthBits

        public byte cDepthBits()
        Returns the value of the cDepthBits field.
      • cStencilBits

        public byte cStencilBits()
        Returns the value of the cStencilBits field.
      • cAuxBuffers

        public byte cAuxBuffers()
        Returns the value of the cAuxBuffers field.
      • iLayerType

        public byte iLayerType()
        Returns the value of the iLayerType field.
      • bReserved

        public byte bReserved()
        Returns the value of the bReserved field.
      • dwLayerMask

        public int dwLayerMask()
        Returns the value of the dwLayerMask field.
      • dwVisibleMask

        public int dwVisibleMask()
        Returns the value of the dwVisibleMask field.
      • dwDamageMask

        public int dwDamageMask()
        Returns the value of the dwDamageMask field.
      • 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.
      • createSafe

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