Package org.lwjgl.system.windows
Class PIXELFORMATDESCRIPTOR
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.system.windows.PIXELFORMATDESCRIPTOR
-
- All Implemented Interfaces:
- java.lang.AutoCloseable, NativeResource, Pointer
public class PIXELFORMATDESCRIPTOR extends Struct
Describes the pixel format of a drawing surface.Member documentation
nSize– specifies the size of this data structure. This value should be set toPIXELFORMATDESCRIPTOR.SIZEOF.nVersion– specifies the version of this data structure. This value should be set to 1dwFlags– a set of bit flags that specify properties of the pixel bufferiPixelType– specifies the type of pixel datacColorBits– 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 buffercRedShift– specifies the shift count for red bitplanes in each RGBA color buffercGreenBits– specifies the number of green bitplanes in each RGBA color buffercGreenShift– specifies the shift count for green bitplanes in each RGBA color buffercBlueBits– specifies the number of blue bitplanes in each RGBA color buffercBlueShift– specifies the shift count for blue bitplanes in each RGBA color buffercAlphaBits– specifies the number of alpha bitplanes in each RGBA color buffer. Alpha bitplanes are not supportedcAlphaShift– specifies the shift count for alpha bitplanes in each RGBA color buffer. Alpha bitplanes are not supportedcAccumBits– specifies the total number of bitplanes in the accumulation buffercAccumRedBits– specifies the number of red bitplanes in the accumulation buffercAccumGreenBits– specifies the number of green bitplanes in the accumulation buffercAccumBlueBits– specifies the number of blue bitplanes in the accumulation buffercAccumAlphaBits– specifies the number of alpha bitplanes in the accumulation buffercDepthBits– specifies the depth of the depth (z-axis) buffercStencilBits– specifies the depth of the stencil buffercAuxBuffers– specifies the number of auxiliary buffers. Auxiliary buffers are not supportediLayerType– 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 planesdwLayerMask– 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,dwVisibleMaskis 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; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static classPIXELFORMATDESCRIPTOR.BufferAn array ofPIXELFORMATDESCRIPTORstructs.-
Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default
-
-
Field Summary
Fields Modifier and Type Field and Description static intSIZEOFThe struct size in bytes.-
Fields inherited from interface org.lwjgl.system.Pointer
POINTER_SHIFT, POINTER_SIZE
-
-
Constructor Summary
Constructors Constructor and Description PIXELFORMATDESCRIPTOR(java.nio.ByteBuffer container)Creates aPIXELFORMATDESCRIPTORinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description bytebReserved()Returns the value of thebReservedfield.PIXELFORMATDESCRIPTORbReserved(byte value)Sets the specified value to thebReservedfield.bytecAccumAlphaBits()Returns the value of thecAccumAlphaBitsfield.PIXELFORMATDESCRIPTORcAccumAlphaBits(byte value)Sets the specified value to thecAccumAlphaBitsfield.bytecAccumBits()Returns the value of thecAccumBitsfield.PIXELFORMATDESCRIPTORcAccumBits(byte value)Sets the specified value to thecAccumBitsfield.bytecAccumBlueBits()Returns the value of thecAccumBlueBitsfield.PIXELFORMATDESCRIPTORcAccumBlueBits(byte value)Sets the specified value to thecAccumBlueBitsfield.bytecAccumGreenBits()Returns the value of thecAccumGreenBitsfield.PIXELFORMATDESCRIPTORcAccumGreenBits(byte value)Sets the specified value to thecAccumGreenBitsfield.bytecAccumRedBits()Returns the value of thecAccumRedBitsfield.PIXELFORMATDESCRIPTORcAccumRedBits(byte value)Sets the specified value to thecAccumRedBitsfield.static PIXELFORMATDESCRIPTORcalloc()Returns a newPIXELFORMATDESCRIPTORinstance allocated withmemCalloc.static PIXELFORMATDESCRIPTOR.Buffercalloc(int capacity)Returns a newPIXELFORMATDESCRIPTOR.Bufferinstance allocated withmemCalloc.static PIXELFORMATDESCRIPTORcallocStack()Returns a newPIXELFORMATDESCRIPTORinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static PIXELFORMATDESCRIPTOR.BuffercallocStack(int capacity)Returns a newPIXELFORMATDESCRIPTOR.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static PIXELFORMATDESCRIPTOR.BuffercallocStack(int capacity, MemoryStack stack)Returns a newPIXELFORMATDESCRIPTOR.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static PIXELFORMATDESCRIPTORcallocStack(MemoryStack stack)Returns a newPIXELFORMATDESCRIPTORinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.bytecAlphaBits()Returns the value of thecAlphaBitsfield.PIXELFORMATDESCRIPTORcAlphaBits(byte value)Sets the specified value to thecAlphaBitsfield.bytecAlphaShift()Returns the value of thecAlphaShiftfield.PIXELFORMATDESCRIPTORcAlphaShift(byte value)Sets the specified value to thecAlphaShiftfield.bytecAuxBuffers()Returns the value of thecAuxBuffersfield.PIXELFORMATDESCRIPTORcAuxBuffers(byte value)Sets the specified value to thecAuxBuffersfield.bytecBlueBits()Returns the value of thecBlueBitsfield.PIXELFORMATDESCRIPTORcBlueBits(byte value)Sets the specified value to thecBlueBitsfield.bytecBlueShift()Returns the value of thecBlueShiftfield.PIXELFORMATDESCRIPTORcBlueShift(byte value)Sets the specified value to thecBlueShiftfield.bytecColorBits()Returns the value of thecColorBitsfield.PIXELFORMATDESCRIPTORcColorBits(byte value)Sets the specified value to thecColorBitsfield.bytecDepthBits()Returns the value of thecDepthBitsfield.PIXELFORMATDESCRIPTORcDepthBits(byte value)Sets the specified value to thecDepthBitsfield.bytecGreenBits()Returns the value of thecGreenBitsfield.PIXELFORMATDESCRIPTORcGreenBits(byte value)Sets the specified value to thecGreenBitsfield.bytecGreenShift()Returns the value of thecGreenShiftfield.PIXELFORMATDESCRIPTORcGreenShift(byte value)Sets the specified value to thecGreenShiftfield.static PIXELFORMATDESCRIPTORcreate()Returns a newPIXELFORMATDESCRIPTORinstance allocated withBufferUtils.static PIXELFORMATDESCRIPTOR.Buffercreate(int capacity)Returns a newPIXELFORMATDESCRIPTOR.Bufferinstance allocated withBufferUtils.static PIXELFORMATDESCRIPTORcreate(long address)Returns a newPIXELFORMATDESCRIPTORinstance for the specified memory address ornullif the address isNULL.static PIXELFORMATDESCRIPTOR.Buffercreate(long address, int capacity)Create aPIXELFORMATDESCRIPTOR.Bufferinstance at the specified memory.bytecRedBits()Returns the value of thecRedBitsfield.PIXELFORMATDESCRIPTORcRedBits(byte value)Sets the specified value to thecRedBitsfield.bytecRedShift()Returns the value of thecRedShiftfield.PIXELFORMATDESCRIPTORcRedShift(byte value)Sets the specified value to thecRedShiftfield.bytecStencilBits()Returns the value of thecStencilBitsfield.PIXELFORMATDESCRIPTORcStencilBits(byte value)Sets the specified value to thecStencilBitsfield.intdwDamageMask()Returns the value of thedwDamageMaskfield.PIXELFORMATDESCRIPTORdwDamageMask(int value)Sets the specified value to thedwDamageMaskfield.intdwFlags()Returns the value of thedwFlagsfield.PIXELFORMATDESCRIPTORdwFlags(int value)Sets the specified value to thedwFlagsfield.intdwLayerMask()Returns the value of thedwLayerMaskfield.PIXELFORMATDESCRIPTORdwLayerMask(int value)Sets the specified value to thedwLayerMaskfield.intdwVisibleMask()Returns the value of thedwVisibleMaskfield.PIXELFORMATDESCRIPTORdwVisibleMask(int value)Sets the specified value to thedwVisibleMaskfield.byteiLayerType()Returns the value of theiLayerTypefield.PIXELFORMATDESCRIPTORiLayerType(byte value)Sets the specified value to theiLayerTypefield.byteiPixelType()Returns the value of theiPixelTypefield.PIXELFORMATDESCRIPTORiPixelType(byte value)Sets the specified value to theiPixelTypefield.static PIXELFORMATDESCRIPTORmalloc()Returns a newPIXELFORMATDESCRIPTORinstance allocated withmemAlloc.static PIXELFORMATDESCRIPTOR.Buffermalloc(int capacity)Returns a newPIXELFORMATDESCRIPTOR.Bufferinstance allocated withmemAlloc.static PIXELFORMATDESCRIPTORmallocStack()Returns a newPIXELFORMATDESCRIPTORinstance allocated on the thread-localMemoryStack.static PIXELFORMATDESCRIPTOR.BuffermallocStack(int capacity)Returns a newPIXELFORMATDESCRIPTOR.Bufferinstance allocated on the thread-localMemoryStack.static PIXELFORMATDESCRIPTOR.BuffermallocStack(int capacity, MemoryStack stack)Returns a newPIXELFORMATDESCRIPTOR.Bufferinstance allocated on the specifiedMemoryStack.static PIXELFORMATDESCRIPTORmallocStack(MemoryStack stack)Returns a newPIXELFORMATDESCRIPTORinstance allocated on the specifiedMemoryStack.PIXELFORMATDESCRIPTORnset(long struct)Unsafe version ofset.shortnSize()Returns the value of thenSizefield.PIXELFORMATDESCRIPTORnSize(short value)Sets the specified value to thenSizefield.shortnVersion()Returns the value of thenVersionfield.PIXELFORMATDESCRIPTORnVersion(short value)Sets the specified value to thenVersionfield.PIXELFORMATDESCRIPTORset(PIXELFORMATDESCRIPTOR src)Copies the specified struct data to this struct.PIXELFORMATDESCRIPTORset(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.intsizeof()Returns thesizeof(struct).-
Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toString
-
Methods inherited from interface org.lwjgl.system.NativeResource
close
-
-
-
-
Constructor Detail
-
PIXELFORMATDESCRIPTOR
public PIXELFORMATDESCRIPTOR(java.nio.ByteBuffer container)
Creates aPIXELFORMATDESCRIPTORinstance at the current position of the specifiedByteBuffercontainer. 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:StructReturns thesizeof(struct).
-
nSize
public short nSize()
Returns the value of thenSizefield.
-
nVersion
public short nVersion()
Returns the value of thenVersionfield.
-
dwFlags
public int dwFlags()
Returns the value of thedwFlagsfield.
-
iPixelType
public byte iPixelType()
Returns the value of theiPixelTypefield.
-
cColorBits
public byte cColorBits()
Returns the value of thecColorBitsfield.
-
cRedBits
public byte cRedBits()
Returns the value of thecRedBitsfield.
-
cRedShift
public byte cRedShift()
Returns the value of thecRedShiftfield.
-
cGreenBits
public byte cGreenBits()
Returns the value of thecGreenBitsfield.
-
cGreenShift
public byte cGreenShift()
Returns the value of thecGreenShiftfield.
-
cBlueBits
public byte cBlueBits()
Returns the value of thecBlueBitsfield.
-
cBlueShift
public byte cBlueShift()
Returns the value of thecBlueShiftfield.
-
cAlphaBits
public byte cAlphaBits()
Returns the value of thecAlphaBitsfield.
-
cAlphaShift
public byte cAlphaShift()
Returns the value of thecAlphaShiftfield.
-
cAccumBits
public byte cAccumBits()
Returns the value of thecAccumBitsfield.
-
cAccumRedBits
public byte cAccumRedBits()
Returns the value of thecAccumRedBitsfield.
-
cAccumGreenBits
public byte cAccumGreenBits()
Returns the value of thecAccumGreenBitsfield.
-
cAccumBlueBits
public byte cAccumBlueBits()
Returns the value of thecAccumBlueBitsfield.
-
cAccumAlphaBits
public byte cAccumAlphaBits()
Returns the value of thecAccumAlphaBitsfield.
-
cDepthBits
public byte cDepthBits()
Returns the value of thecDepthBitsfield.
-
cStencilBits
public byte cStencilBits()
Returns the value of thecStencilBitsfield.
-
cAuxBuffers
public byte cAuxBuffers()
Returns the value of thecAuxBuffersfield.
-
iLayerType
public byte iLayerType()
Returns the value of theiLayerTypefield.
-
bReserved
public byte bReserved()
Returns the value of thebReservedfield.
-
dwLayerMask
public int dwLayerMask()
Returns the value of thedwLayerMaskfield.
-
dwVisibleMask
public int dwVisibleMask()
Returns the value of thedwVisibleMaskfield.
-
dwDamageMask
public int dwDamageMask()
Returns the value of thedwDamageMaskfield.
-
nSize
public PIXELFORMATDESCRIPTOR nSize(short value)
Sets the specified value to thenSizefield.
-
nVersion
public PIXELFORMATDESCRIPTOR nVersion(short value)
Sets the specified value to thenVersionfield.
-
dwFlags
public PIXELFORMATDESCRIPTOR dwFlags(int value)
Sets the specified value to thedwFlagsfield.
-
iPixelType
public PIXELFORMATDESCRIPTOR iPixelType(byte value)
Sets the specified value to theiPixelTypefield.
-
cColorBits
public PIXELFORMATDESCRIPTOR cColorBits(byte value)
Sets the specified value to thecColorBitsfield.
-
cRedBits
public PIXELFORMATDESCRIPTOR cRedBits(byte value)
Sets the specified value to thecRedBitsfield.
-
cRedShift
public PIXELFORMATDESCRIPTOR cRedShift(byte value)
Sets the specified value to thecRedShiftfield.
-
cGreenBits
public PIXELFORMATDESCRIPTOR cGreenBits(byte value)
Sets the specified value to thecGreenBitsfield.
-
cGreenShift
public PIXELFORMATDESCRIPTOR cGreenShift(byte value)
Sets the specified value to thecGreenShiftfield.
-
cBlueBits
public PIXELFORMATDESCRIPTOR cBlueBits(byte value)
Sets the specified value to thecBlueBitsfield.
-
cBlueShift
public PIXELFORMATDESCRIPTOR cBlueShift(byte value)
Sets the specified value to thecBlueShiftfield.
-
cAlphaBits
public PIXELFORMATDESCRIPTOR cAlphaBits(byte value)
Sets the specified value to thecAlphaBitsfield.
-
cAlphaShift
public PIXELFORMATDESCRIPTOR cAlphaShift(byte value)
Sets the specified value to thecAlphaShiftfield.
-
cAccumBits
public PIXELFORMATDESCRIPTOR cAccumBits(byte value)
Sets the specified value to thecAccumBitsfield.
-
cAccumRedBits
public PIXELFORMATDESCRIPTOR cAccumRedBits(byte value)
Sets the specified value to thecAccumRedBitsfield.
-
cAccumGreenBits
public PIXELFORMATDESCRIPTOR cAccumGreenBits(byte value)
Sets the specified value to thecAccumGreenBitsfield.
-
cAccumBlueBits
public PIXELFORMATDESCRIPTOR cAccumBlueBits(byte value)
Sets the specified value to thecAccumBlueBitsfield.
-
cAccumAlphaBits
public PIXELFORMATDESCRIPTOR cAccumAlphaBits(byte value)
Sets the specified value to thecAccumAlphaBitsfield.
-
cDepthBits
public PIXELFORMATDESCRIPTOR cDepthBits(byte value)
Sets the specified value to thecDepthBitsfield.
-
cStencilBits
public PIXELFORMATDESCRIPTOR cStencilBits(byte value)
Sets the specified value to thecStencilBitsfield.
-
cAuxBuffers
public PIXELFORMATDESCRIPTOR cAuxBuffers(byte value)
Sets the specified value to thecAuxBuffersfield.
-
iLayerType
public PIXELFORMATDESCRIPTOR iLayerType(byte value)
Sets the specified value to theiLayerTypefield.
-
bReserved
public PIXELFORMATDESCRIPTOR bReserved(byte value)
Sets the specified value to thebReservedfield.
-
dwLayerMask
public PIXELFORMATDESCRIPTOR dwLayerMask(int value)
Sets the specified value to thedwLayerMaskfield.
-
dwVisibleMask
public PIXELFORMATDESCRIPTOR dwVisibleMask(int value)
Sets the specified value to thedwVisibleMaskfield.
-
dwDamageMask
public PIXELFORMATDESCRIPTOR dwDamageMask(int value)
Sets the specified value to thedwDamageMaskfield.
-
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.
-
nset
public PIXELFORMATDESCRIPTOR nset(long struct)
Unsafe version ofset.
-
set
public PIXELFORMATDESCRIPTOR set(PIXELFORMATDESCRIPTOR src)
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
public static PIXELFORMATDESCRIPTOR malloc()
Returns a newPIXELFORMATDESCRIPTORinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static PIXELFORMATDESCRIPTOR calloc()
Returns a newPIXELFORMATDESCRIPTORinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static PIXELFORMATDESCRIPTOR create()
Returns a newPIXELFORMATDESCRIPTORinstance allocated withBufferUtils.
-
create
public static PIXELFORMATDESCRIPTOR create(long address)
Returns a newPIXELFORMATDESCRIPTORinstance for the specified memory address ornullif the address isNULL.
-
malloc
public static PIXELFORMATDESCRIPTOR.Buffer malloc(int capacity)
Returns a newPIXELFORMATDESCRIPTOR.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static PIXELFORMATDESCRIPTOR.Buffer calloc(int capacity)
Returns a newPIXELFORMATDESCRIPTOR.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static PIXELFORMATDESCRIPTOR.Buffer create(int capacity)
Returns a newPIXELFORMATDESCRIPTOR.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static PIXELFORMATDESCRIPTOR.Buffer create(long address, int capacity)
Create aPIXELFORMATDESCRIPTOR.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
mallocStack
public static PIXELFORMATDESCRIPTOR mallocStack()
Returns a newPIXELFORMATDESCRIPTORinstance allocated on the thread-localMemoryStack.
-
callocStack
public static PIXELFORMATDESCRIPTOR callocStack()
Returns a newPIXELFORMATDESCRIPTORinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.
-
mallocStack
public static PIXELFORMATDESCRIPTOR mallocStack(MemoryStack stack)
Returns a newPIXELFORMATDESCRIPTORinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
callocStack
public static PIXELFORMATDESCRIPTOR callocStack(MemoryStack stack)
Returns a newPIXELFORMATDESCRIPTORinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
mallocStack
public static PIXELFORMATDESCRIPTOR.Buffer mallocStack(int capacity)
Returns a newPIXELFORMATDESCRIPTOR.Bufferinstance allocated on the thread-localMemoryStack.- Parameters:
capacity- the buffer capacity
-
callocStack
public static PIXELFORMATDESCRIPTOR.Buffer callocStack(int capacity)
Returns a newPIXELFORMATDESCRIPTOR.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacity
-
mallocStack
public static PIXELFORMATDESCRIPTOR.Buffer mallocStack(int capacity, MemoryStack stack)
Returns a newPIXELFORMATDESCRIPTOR.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
callocStack
public static PIXELFORMATDESCRIPTOR.Buffer callocStack(int capacity, MemoryStack stack)
Returns a newPIXELFORMATDESCRIPTOR.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
-