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 PIXELFORMATDESCRIPTOR.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

        public static final int SIZEOF
        The struct size in bytes.
    • 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.
      • 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.