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 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 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,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; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static class
PIXELFORMATDESCRIPTOR.Buffer
An array ofPIXELFORMATDESCRIPTOR
structs.-
Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default
-
-
Field Summary
Fields Modifier and Type Field and Description static int
SIZEOF
The 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 aPIXELFORMATDESCRIPTOR
instance at the current position of the specifiedByteBuffer
container.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description byte
bReserved()
Returns the value of thebReserved
field.PIXELFORMATDESCRIPTOR
bReserved(byte value)
Sets the specified value to thebReserved
field.byte
cAccumAlphaBits()
Returns the value of thecAccumAlphaBits
field.PIXELFORMATDESCRIPTOR
cAccumAlphaBits(byte value)
Sets the specified value to thecAccumAlphaBits
field.byte
cAccumBits()
Returns the value of thecAccumBits
field.PIXELFORMATDESCRIPTOR
cAccumBits(byte value)
Sets the specified value to thecAccumBits
field.byte
cAccumBlueBits()
Returns the value of thecAccumBlueBits
field.PIXELFORMATDESCRIPTOR
cAccumBlueBits(byte value)
Sets the specified value to thecAccumBlueBits
field.byte
cAccumGreenBits()
Returns the value of thecAccumGreenBits
field.PIXELFORMATDESCRIPTOR
cAccumGreenBits(byte value)
Sets the specified value to thecAccumGreenBits
field.byte
cAccumRedBits()
Returns the value of thecAccumRedBits
field.PIXELFORMATDESCRIPTOR
cAccumRedBits(byte value)
Sets the specified value to thecAccumRedBits
field.static PIXELFORMATDESCRIPTOR
calloc()
Returns a newPIXELFORMATDESCRIPTOR
instance allocated withmemCalloc
.static PIXELFORMATDESCRIPTOR.Buffer
calloc(int capacity)
Returns a newPIXELFORMATDESCRIPTOR.Buffer
instance allocated withmemCalloc
.static PIXELFORMATDESCRIPTOR
callocStack()
Returns a newPIXELFORMATDESCRIPTOR
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static PIXELFORMATDESCRIPTOR.Buffer
callocStack(int capacity)
Returns a newPIXELFORMATDESCRIPTOR.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static PIXELFORMATDESCRIPTOR.Buffer
callocStack(int capacity, MemoryStack stack)
Returns a newPIXELFORMATDESCRIPTOR.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static PIXELFORMATDESCRIPTOR
callocStack(MemoryStack stack)
Returns a newPIXELFORMATDESCRIPTOR
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.byte
cAlphaBits()
Returns the value of thecAlphaBits
field.PIXELFORMATDESCRIPTOR
cAlphaBits(byte value)
Sets the specified value to thecAlphaBits
field.byte
cAlphaShift()
Returns the value of thecAlphaShift
field.PIXELFORMATDESCRIPTOR
cAlphaShift(byte value)
Sets the specified value to thecAlphaShift
field.byte
cAuxBuffers()
Returns the value of thecAuxBuffers
field.PIXELFORMATDESCRIPTOR
cAuxBuffers(byte value)
Sets the specified value to thecAuxBuffers
field.byte
cBlueBits()
Returns the value of thecBlueBits
field.PIXELFORMATDESCRIPTOR
cBlueBits(byte value)
Sets the specified value to thecBlueBits
field.byte
cBlueShift()
Returns the value of thecBlueShift
field.PIXELFORMATDESCRIPTOR
cBlueShift(byte value)
Sets the specified value to thecBlueShift
field.byte
cColorBits()
Returns the value of thecColorBits
field.PIXELFORMATDESCRIPTOR
cColorBits(byte value)
Sets the specified value to thecColorBits
field.byte
cDepthBits()
Returns the value of thecDepthBits
field.PIXELFORMATDESCRIPTOR
cDepthBits(byte value)
Sets the specified value to thecDepthBits
field.byte
cGreenBits()
Returns the value of thecGreenBits
field.PIXELFORMATDESCRIPTOR
cGreenBits(byte value)
Sets the specified value to thecGreenBits
field.byte
cGreenShift()
Returns the value of thecGreenShift
field.PIXELFORMATDESCRIPTOR
cGreenShift(byte value)
Sets the specified value to thecGreenShift
field.static PIXELFORMATDESCRIPTOR
create()
Returns a newPIXELFORMATDESCRIPTOR
instance allocated withBufferUtils
.static PIXELFORMATDESCRIPTOR.Buffer
create(int capacity)
Returns a newPIXELFORMATDESCRIPTOR.Buffer
instance allocated withBufferUtils
.static PIXELFORMATDESCRIPTOR
create(long address)
Returns a newPIXELFORMATDESCRIPTOR
instance for the specified memory address ornull
if the address isNULL
.static PIXELFORMATDESCRIPTOR.Buffer
create(long address, int capacity)
Create aPIXELFORMATDESCRIPTOR.Buffer
instance at the specified memory.byte
cRedBits()
Returns the value of thecRedBits
field.PIXELFORMATDESCRIPTOR
cRedBits(byte value)
Sets the specified value to thecRedBits
field.byte
cRedShift()
Returns the value of thecRedShift
field.PIXELFORMATDESCRIPTOR
cRedShift(byte value)
Sets the specified value to thecRedShift
field.byte
cStencilBits()
Returns the value of thecStencilBits
field.PIXELFORMATDESCRIPTOR
cStencilBits(byte value)
Sets the specified value to thecStencilBits
field.int
dwDamageMask()
Returns the value of thedwDamageMask
field.PIXELFORMATDESCRIPTOR
dwDamageMask(int value)
Sets the specified value to thedwDamageMask
field.int
dwFlags()
Returns the value of thedwFlags
field.PIXELFORMATDESCRIPTOR
dwFlags(int value)
Sets the specified value to thedwFlags
field.int
dwLayerMask()
Returns the value of thedwLayerMask
field.PIXELFORMATDESCRIPTOR
dwLayerMask(int value)
Sets the specified value to thedwLayerMask
field.int
dwVisibleMask()
Returns the value of thedwVisibleMask
field.PIXELFORMATDESCRIPTOR
dwVisibleMask(int value)
Sets the specified value to thedwVisibleMask
field.byte
iLayerType()
Returns the value of theiLayerType
field.PIXELFORMATDESCRIPTOR
iLayerType(byte value)
Sets the specified value to theiLayerType
field.byte
iPixelType()
Returns the value of theiPixelType
field.PIXELFORMATDESCRIPTOR
iPixelType(byte value)
Sets the specified value to theiPixelType
field.static PIXELFORMATDESCRIPTOR
malloc()
Returns a newPIXELFORMATDESCRIPTOR
instance allocated withmemAlloc
.static PIXELFORMATDESCRIPTOR.Buffer
malloc(int capacity)
Returns a newPIXELFORMATDESCRIPTOR.Buffer
instance allocated withmemAlloc
.static PIXELFORMATDESCRIPTOR
mallocStack()
Returns a newPIXELFORMATDESCRIPTOR
instance allocated on the thread-localMemoryStack
.static PIXELFORMATDESCRIPTOR.Buffer
mallocStack(int capacity)
Returns a newPIXELFORMATDESCRIPTOR.Buffer
instance allocated on the thread-localMemoryStack
.static PIXELFORMATDESCRIPTOR.Buffer
mallocStack(int capacity, MemoryStack stack)
Returns a newPIXELFORMATDESCRIPTOR.Buffer
instance allocated on the specifiedMemoryStack
.static PIXELFORMATDESCRIPTOR
mallocStack(MemoryStack stack)
Returns a newPIXELFORMATDESCRIPTOR
instance allocated on the specifiedMemoryStack
.short
nSize()
Returns the value of thenSize
field.PIXELFORMATDESCRIPTOR
nSize(short value)
Sets the specified value to thenSize
field.short
nVersion()
Returns the value of thenVersion
field.PIXELFORMATDESCRIPTOR
nVersion(short value)
Sets the specified value to thenVersion
field.PIXELFORMATDESCRIPTOR
set(PIXELFORMATDESCRIPTOR src)
Copies the specified struct data to this struct.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.int
sizeof()
Returnssizeof(struct)
.-
Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toString
-
Methods inherited from interface org.lwjgl.system.NativeResource
close, free
-
-
-
-
Constructor Detail
-
PIXELFORMATDESCRIPTOR
public PIXELFORMATDESCRIPTOR(java.nio.ByteBuffer container)
Creates aPIXELFORMATDESCRIPTOR
instance at the current position of the specifiedByteBuffer
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
Returnssizeof(struct)
.
-
nSize
public short nSize()
Returns the value of thenSize
field.
-
nVersion
public short nVersion()
Returns the value of thenVersion
field.
-
dwFlags
public int dwFlags()
Returns the value of thedwFlags
field.
-
iPixelType
public byte iPixelType()
Returns the value of theiPixelType
field.
-
cColorBits
public byte cColorBits()
Returns the value of thecColorBits
field.
-
cRedBits
public byte cRedBits()
Returns the value of thecRedBits
field.
-
cRedShift
public byte cRedShift()
Returns the value of thecRedShift
field.
-
cGreenBits
public byte cGreenBits()
Returns the value of thecGreenBits
field.
-
cGreenShift
public byte cGreenShift()
Returns the value of thecGreenShift
field.
-
cBlueBits
public byte cBlueBits()
Returns the value of thecBlueBits
field.
-
cBlueShift
public byte cBlueShift()
Returns the value of thecBlueShift
field.
-
cAlphaBits
public byte cAlphaBits()
Returns the value of thecAlphaBits
field.
-
cAlphaShift
public byte cAlphaShift()
Returns the value of thecAlphaShift
field.
-
cAccumBits
public byte cAccumBits()
Returns the value of thecAccumBits
field.
-
cAccumRedBits
public byte cAccumRedBits()
Returns the value of thecAccumRedBits
field.
-
cAccumGreenBits
public byte cAccumGreenBits()
Returns the value of thecAccumGreenBits
field.
-
cAccumBlueBits
public byte cAccumBlueBits()
Returns the value of thecAccumBlueBits
field.
-
cAccumAlphaBits
public byte cAccumAlphaBits()
Returns the value of thecAccumAlphaBits
field.
-
cDepthBits
public byte cDepthBits()
Returns the value of thecDepthBits
field.
-
cStencilBits
public byte cStencilBits()
Returns the value of thecStencilBits
field.
-
cAuxBuffers
public byte cAuxBuffers()
Returns the value of thecAuxBuffers
field.
-
iLayerType
public byte iLayerType()
Returns the value of theiLayerType
field.
-
bReserved
public byte bReserved()
Returns the value of thebReserved
field.
-
dwLayerMask
public int dwLayerMask()
Returns the value of thedwLayerMask
field.
-
dwVisibleMask
public int dwVisibleMask()
Returns the value of thedwVisibleMask
field.
-
dwDamageMask
public int dwDamageMask()
Returns the value of thedwDamageMask
field.
-
nSize
public PIXELFORMATDESCRIPTOR nSize(short value)
Sets the specified value to thenSize
field.
-
nVersion
public PIXELFORMATDESCRIPTOR nVersion(short value)
Sets the specified value to thenVersion
field.
-
dwFlags
public PIXELFORMATDESCRIPTOR dwFlags(int value)
Sets the specified value to thedwFlags
field.
-
iPixelType
public PIXELFORMATDESCRIPTOR iPixelType(byte value)
Sets the specified value to theiPixelType
field.
-
cColorBits
public PIXELFORMATDESCRIPTOR cColorBits(byte value)
Sets the specified value to thecColorBits
field.
-
cRedBits
public PIXELFORMATDESCRIPTOR cRedBits(byte value)
Sets the specified value to thecRedBits
field.
-
cRedShift
public PIXELFORMATDESCRIPTOR cRedShift(byte value)
Sets the specified value to thecRedShift
field.
-
cGreenBits
public PIXELFORMATDESCRIPTOR cGreenBits(byte value)
Sets the specified value to thecGreenBits
field.
-
cGreenShift
public PIXELFORMATDESCRIPTOR cGreenShift(byte value)
Sets the specified value to thecGreenShift
field.
-
cBlueBits
public PIXELFORMATDESCRIPTOR cBlueBits(byte value)
Sets the specified value to thecBlueBits
field.
-
cBlueShift
public PIXELFORMATDESCRIPTOR cBlueShift(byte value)
Sets the specified value to thecBlueShift
field.
-
cAlphaBits
public PIXELFORMATDESCRIPTOR cAlphaBits(byte value)
Sets the specified value to thecAlphaBits
field.
-
cAlphaShift
public PIXELFORMATDESCRIPTOR cAlphaShift(byte value)
Sets the specified value to thecAlphaShift
field.
-
cAccumBits
public PIXELFORMATDESCRIPTOR cAccumBits(byte value)
Sets the specified value to thecAccumBits
field.
-
cAccumRedBits
public PIXELFORMATDESCRIPTOR cAccumRedBits(byte value)
Sets the specified value to thecAccumRedBits
field.
-
cAccumGreenBits
public PIXELFORMATDESCRIPTOR cAccumGreenBits(byte value)
Sets the specified value to thecAccumGreenBits
field.
-
cAccumBlueBits
public PIXELFORMATDESCRIPTOR cAccumBlueBits(byte value)
Sets the specified value to thecAccumBlueBits
field.
-
cAccumAlphaBits
public PIXELFORMATDESCRIPTOR cAccumAlphaBits(byte value)
Sets the specified value to thecAccumAlphaBits
field.
-
cDepthBits
public PIXELFORMATDESCRIPTOR cDepthBits(byte value)
Sets the specified value to thecDepthBits
field.
-
cStencilBits
public PIXELFORMATDESCRIPTOR cStencilBits(byte value)
Sets the specified value to thecStencilBits
field.
-
cAuxBuffers
public PIXELFORMATDESCRIPTOR cAuxBuffers(byte value)
Sets the specified value to thecAuxBuffers
field.
-
iLayerType
public PIXELFORMATDESCRIPTOR iLayerType(byte value)
Sets the specified value to theiLayerType
field.
-
bReserved
public PIXELFORMATDESCRIPTOR bReserved(byte value)
Sets the specified value to thebReserved
field.
-
dwLayerMask
public PIXELFORMATDESCRIPTOR dwLayerMask(int value)
Sets the specified value to thedwLayerMask
field.
-
dwVisibleMask
public PIXELFORMATDESCRIPTOR dwVisibleMask(int value)
Sets the specified value to thedwVisibleMask
field.
-
dwDamageMask
public PIXELFORMATDESCRIPTOR dwDamageMask(int value)
Sets the specified value to thedwDamageMask
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
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 newPIXELFORMATDESCRIPTOR
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static PIXELFORMATDESCRIPTOR calloc()
Returns a newPIXELFORMATDESCRIPTOR
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static PIXELFORMATDESCRIPTOR create()
Returns a newPIXELFORMATDESCRIPTOR
instance allocated withBufferUtils
.
-
create
public static PIXELFORMATDESCRIPTOR create(long address)
Returns a newPIXELFORMATDESCRIPTOR
instance for the specified memory address ornull
if the address isNULL
.
-
malloc
public static PIXELFORMATDESCRIPTOR.Buffer malloc(int capacity)
Returns a newPIXELFORMATDESCRIPTOR.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static PIXELFORMATDESCRIPTOR.Buffer calloc(int capacity)
Returns a newPIXELFORMATDESCRIPTOR.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static PIXELFORMATDESCRIPTOR.Buffer create(int capacity)
Returns a newPIXELFORMATDESCRIPTOR.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static PIXELFORMATDESCRIPTOR.Buffer create(long address, int capacity)
Create aPIXELFORMATDESCRIPTOR.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
mallocStack
public static PIXELFORMATDESCRIPTOR mallocStack()
Returns a newPIXELFORMATDESCRIPTOR
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static PIXELFORMATDESCRIPTOR callocStack()
Returns a newPIXELFORMATDESCRIPTOR
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static PIXELFORMATDESCRIPTOR mallocStack(MemoryStack stack)
Returns a newPIXELFORMATDESCRIPTOR
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static PIXELFORMATDESCRIPTOR callocStack(MemoryStack stack)
Returns a newPIXELFORMATDESCRIPTOR
instance allocated on the specifiedMemoryStack
and 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.Buffer
instance allocated on the thread-localMemoryStack
.- Parameters:
capacity
- the buffer capacity
-
callocStack
public static PIXELFORMATDESCRIPTOR.Buffer callocStack(int capacity)
Returns a newPIXELFORMATDESCRIPTOR.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacity
-
mallocStack
public static PIXELFORMATDESCRIPTOR.Buffer mallocStack(int capacity, MemoryStack stack)
Returns a newPIXELFORMATDESCRIPTOR.Buffer
instance 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.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
-