Top Description Inners Fields Constructors Methods
org.lwjgl.opengl

public Class GPU_DEVICE

extends Struct<GPU_DEVICE>
implements NativeResource
Class Inheritance
All Implemented Interfaces
org.lwjgl.system.NativeResource, java.lang.AutoCloseable
Imports
javax.annotation.*, java.nio.*, org.lwjgl.*, org.lwjgl.system.*, org.lwjgl.system.windows.*

Receives information about the display device specified by the deviceIndex parameter of the EnumGpuDevicesNV function.

Layout


struct GPU_DEVICE {
    DWORD cb;
    CHAR DeviceName[32];
    CHAR DeviceString[128];
    DWORD Flags;
    RECT rcVirtualScreen;
}

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
GPU_DEVICE.Buffer

An array of GPU_DEVICE structs.

Field Summary

Modifier and TypeField and Description
public static final int
ALIGNOF

The struct alignment in bytes.

public static final int
CB

The struct member offsets.

public static final int
DEVICENAME

The struct member offsets.

public static final int
DEVICESTRING

The struct member offsets.

public static final int
FLAGS

The struct member offsets.

public static final int
RCVIRTUALSCREEN

The struct member offsets.

public static final int
SIZEOF

The struct size in bytes.

Inherited from org.lwjgl.system.Struct:
containerDEFAULT_ALIGN_ASDEFAULT_PACK_ALIGNMENT

Constructor Summary

AccessConstructor and Description
protected
GPU_DEVICE(long address, ByteBuffer container)

public
GPU_DEVICE(ByteBuffer container)

Creates a GPU_DEVICE instance at the current position of the specified ByteBuffer container.

Method Summary

Modifier and TypeMethod and Description
public static GPU_DEVICE
calloc()

Returns a new GPU_DEVICE instance allocated with memCalloc.

public static GPU_DEVICE.Buffer
calloc(int
the buffer capacity
capacity
)

Returns a new GPU_DEVICE.Buffer instance allocated with memCalloc.

public static GPU_DEVICE
calloc(MemoryStack
the stack from which to allocate
stack
)

Returns a new GPU_DEVICE instance allocated on the specified MemoryStack and initializes all its bits to zero.

public static GPU_DEVICE.Buffer
calloc(int
the buffer capacity
capacity
,
MemoryStack
the stack from which to allocate
stack
)

Returns a new GPU_DEVICE.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.

public static GPU_DEVICE
callocStack()

Deprecated
Deprecated for removal in 3.4.0.
public static GPU_DEVICE
callocStack(MemoryStack stack)

Deprecated
Deprecated for removal in 3.4.0.
public static GPU_DEVICE.Buffer
callocStack(int capacity)

Deprecated
Deprecated for removal in 3.4.0.
public static GPU_DEVICE.Buffer
callocStack(int capacity, MemoryStack stack)

Deprecated
Deprecated for removal in 3.4.0.
public int
cb()

the size of the GPU_DEVICE structure.

protected GPU_DEVICE
create(long
the struct memory address
address
,
ByteBuffer
an optional container buffer, to be referenced strongly by the struct instance.
container
)

Implements abstract org.lwjgl.system.Struct.create.

Similar to the constructor, but returns the exact type of the Struct subclass.
public static GPU_DEVICE
create()

Returns a new GPU_DEVICE instance allocated with BufferUtils.

public static GPU_DEVICE
create(long address)

Returns a new GPU_DEVICE instance for the specified memory address.

public static GPU_DEVICE.Buffer
create(int
the buffer capacity
capacity
)

Returns a new GPU_DEVICE.Buffer instance allocated with BufferUtils.

public static GPU_DEVICE.Buffer
create(long
the memory address
address
,
int
the buffer capacity
capacity
)

Create a GPU_DEVICE.Buffer instance at the specified memory.

public static GPU_DEVICE
createSafe(long address)

Like create, but returns null if address is NULL.

public static GPU_DEVICE.Buffer
createSafe(long address, int capacity)

Like create, but returns null if address is NULL.

public ByteBuffer
DeviceName()

a string identifying the display device name.

public String
DeviceNameString()

a string identifying the display device name.

public ByteBuffer
DeviceString()

a string describing the GPU for this display device.

public String
DeviceStringString()

a string describing the GPU for this display device.

public int
Flags()

indicates the state of the display device

public static GPU_DEVICE
malloc()

Returns a new GPU_DEVICE instance allocated with memAlloc.

public static GPU_DEVICE.Buffer
malloc(int
the buffer capacity
capacity
)

Returns a new GPU_DEVICE.Buffer instance allocated with memAlloc.

public static GPU_DEVICE
malloc(MemoryStack
the stack from which to allocate
stack
)

Returns a new GPU_DEVICE instance allocated on the specified MemoryStack.

public static GPU_DEVICE.Buffer
malloc(int
the buffer capacity
capacity
,
MemoryStack
the stack from which to allocate
stack
)

Returns a new GPU_DEVICE.Buffer instance allocated on the specified MemoryStack.

public static GPU_DEVICE
mallocStack()

Deprecated
Deprecated for removal in 3.4.0.
public static GPU_DEVICE
mallocStack(MemoryStack stack)

Deprecated
Deprecated for removal in 3.4.0.
public static GPU_DEVICE.Buffer
mallocStack(int capacity)

Deprecated
Deprecated for removal in 3.4.0.
public static GPU_DEVICE.Buffer
mallocStack(int capacity, MemoryStack stack)

Deprecated
Deprecated for removal in 3.4.0.
public static int
ncb(long struct)

Unsafe version of cb.

public static ByteBuffer
nDeviceName(long struct)

Unsafe version of DeviceName.

public static String
nDeviceNameString(long struct)

Unsafe version of DeviceNameString.

public static ByteBuffer
nDeviceString(long struct)

Unsafe version of DeviceString.

public static String
nDeviceStringString(long struct)

Unsafe version of DeviceStringString.

public static int
nFlags(long struct)

Unsafe version of Flags.

public static RECT
nrcVirtualScreen(long struct)

Unsafe version of rcVirtualScreen.

public RECT
rcVirtualScreen()

specifies the display device rectangle, in virtual screen coordinates.

public int
sizeof()

Implements abstract org.lwjgl.system.Struct.sizeof.

Returns sizeof(struct).
Inherited from org.lwjgl.system.Struct:
__array__array__array__checkContainer__checkMalloc__create__getContainer__getContainer__member__member__member__padding__padding__struct__struct__union__unionclearfreeisNullvalidate

Field Detail

ALIGNOFback to summary
public static final int ALIGNOF

The struct alignment in bytes.

CBback to summary
public static final int CB

The struct member offsets.

DEVICENAMEback to summary
public static final int DEVICENAME

The struct member offsets.

DEVICESTRINGback to summary
public static final int DEVICESTRING

The struct member offsets.

FLAGSback to summary
public static final int FLAGS

The struct member offsets.

RCVIRTUALSCREENback to summary
public static final int RCVIRTUALSCREEN

The struct member offsets.

SIZEOFback to summary
public static final int SIZEOF

The struct size in bytes.

Constructor Detail

GPU_DEVICEback to summary
protected GPU_DEVICE(long address, ByteBuffer container)
GPU_DEVICEback to summary
public GPU_DEVICE(ByteBuffer container)

Creates a GPU_DEVICE 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

callocback to summary
public static GPU_DEVICE calloc()

Returns a new GPU_DEVICE instance allocated with memCalloc. The instance must be explicitly freed.

callocback to summary
public static GPU_DEVICE.Buffer calloc(int capacity)

Returns a new GPU_DEVICE.Buffer instance allocated with memCalloc. The instance must be explicitly freed.

Parameters
capacity:int

the buffer capacity

callocback to summary
public static GPU_DEVICE calloc(MemoryStack stack)

Returns a new GPU_DEVICE instance allocated on the specified MemoryStack and initializes all its bits to zero.

Parameters
stack:MemoryStack

the stack from which to allocate

callocback to summary
public static GPU_DEVICE.Buffer calloc(int capacity, MemoryStack stack)

Returns a new GPU_DEVICE.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.

Parameters
capacity:int

the buffer capacity

stack:MemoryStack

the stack from which to allocate

callocStackback to summary
public static GPU_DEVICE callocStack()

Deprecated

Deprecated for removal in 3.4.0. Use calloc(MemoryStack) instead.

Annotations
@Deprecated
callocStackback to summary
public static GPU_DEVICE callocStack(MemoryStack stack)

Deprecated

Deprecated for removal in 3.4.0. Use calloc(MemoryStack) instead.

Annotations
@Deprecated
callocStackback to summary
public static GPU_DEVICE.Buffer callocStack(int capacity)

Deprecated

Deprecated for removal in 3.4.0. Use calloc(int, MemoryStack) instead.

Annotations
@Deprecated
callocStackback to summary
public static GPU_DEVICE.Buffer callocStack(int capacity, MemoryStack stack)

Deprecated

Deprecated for removal in 3.4.0. Use calloc(int, MemoryStack) instead.

Annotations
@Deprecated
cbback to summary
public int cb()

the size of the GPU_DEVICE structure. Before calling EnumGpuDevicesNV, set cb to the size, in bytes, of GPU_DEVICE.

Annotations
@NativeType:DWORD
createback to summary
protected GPU_DEVICE create(long address, ByteBuffer container)

Implements abstract org.lwjgl.system.Struct.create.

Doc from org.lwjgl.system.Struct.create.

Similar to the constructor, but returns the exact type of the Struct subclass.

Effectively, every Struct instance is a factory for more instances of the same type. This is used by StructBuffer.

Parameters
address:long

the struct memory address

container:ByteBuffer

an optional container buffer, to be referenced strongly by the struct instance.

Annotations
@Override
createback to summary
public static GPU_DEVICE create()

Returns a new GPU_DEVICE instance allocated with BufferUtils.

createback to summary
public static GPU_DEVICE create(long address)

Returns a new GPU_DEVICE instance for the specified memory address.

createback to summary
public static GPU_DEVICE.Buffer create(int capacity)

Returns a new GPU_DEVICE.Buffer instance allocated with BufferUtils.

Parameters
capacity:int

the buffer capacity

createback to summary
public static GPU_DEVICE.Buffer create(long address, int capacity)

Create a GPU_DEVICE.Buffer instance at the specified memory.

Parameters
address:long

the memory address

capacity:int

the buffer capacity

createSafeback to summary
public static GPU_DEVICE createSafe(long address)

Like create, but returns null if address is NULL.

Annotations
@Nullable
createSafeback to summary
public static GPU_DEVICE.Buffer createSafe(long address, int capacity)

Like create, but returns null if address is NULL.

Annotations
@Nullable
DeviceNameback to summary
public ByteBuffer DeviceName()

a string identifying the display device name. This will be the same string as stored in the DeviceName field of the DISPLAY_DEVICE structure, which is filled in by EnumDisplayDevices.

Annotations
@NativeType:CHAR[32]
DeviceNameStringback to summary
public String DeviceNameString()

a string identifying the display device name. This will be the same string as stored in the DeviceName field of the DISPLAY_DEVICE structure, which is filled in by EnumDisplayDevices.

Annotations
@NativeType:CHAR[32]
DeviceStringback to summary
public ByteBuffer DeviceString()

a string describing the GPU for this display device. It is the same string as stored in the DeviceString field in the DISPLAY_DEVICE structure that is filled in by EnumDisplayDevices when it describes a display adapter (and not a monitor).

Annotations
@NativeType:CHAR[128]
DeviceStringStringback to summary
public String DeviceStringString()

a string describing the GPU for this display device. It is the same string as stored in the DeviceString field in the DISPLAY_DEVICE structure that is filled in by EnumDisplayDevices when it describes a display adapter (and not a monitor).

Annotations
@NativeType:CHAR[128]
Flagsback to summary
public int Flags()

indicates the state of the display device

Annotations
@NativeType:DWORD
mallocback to summary
public static GPU_DEVICE malloc()

Returns a new GPU_DEVICE instance allocated with memAlloc. The instance must be explicitly freed.

mallocback to summary
public static GPU_DEVICE.Buffer malloc(int capacity)

Returns a new GPU_DEVICE.Buffer instance allocated with memAlloc. The instance must be explicitly freed.

Parameters
capacity:int

the buffer capacity

mallocback to summary
public static GPU_DEVICE malloc(MemoryStack stack)

Returns a new GPU_DEVICE instance allocated on the specified MemoryStack.

Parameters
stack:MemoryStack

the stack from which to allocate

mallocback to summary
public static GPU_DEVICE.Buffer malloc(int capacity, MemoryStack stack)

Returns a new GPU_DEVICE.Buffer instance allocated on the specified MemoryStack.

Parameters
capacity:int

the buffer capacity

stack:MemoryStack

the stack from which to allocate

mallocStackback to summary
public static GPU_DEVICE mallocStack()

Deprecated

Deprecated for removal in 3.4.0. Use malloc(MemoryStack) instead.

Annotations
@Deprecated
mallocStackback to summary
public static GPU_DEVICE mallocStack(MemoryStack stack)

Deprecated

Deprecated for removal in 3.4.0. Use malloc(MemoryStack) instead.

Annotations
@Deprecated
mallocStackback to summary
public static GPU_DEVICE.Buffer mallocStack(int capacity)

Deprecated

Deprecated for removal in 3.4.0. Use malloc(int, MemoryStack) instead.

Annotations
@Deprecated
mallocStackback to summary
public static GPU_DEVICE.Buffer mallocStack(int capacity, MemoryStack stack)

Deprecated

Deprecated for removal in 3.4.0. Use malloc(int, MemoryStack) instead.

Annotations
@Deprecated
ncbback to summary
public static int ncb(long struct)

Unsafe version of cb.

nDeviceNameback to summary
public static ByteBuffer nDeviceName(long struct)

Unsafe version of DeviceName.

nDeviceNameStringback to summary
public static String nDeviceNameString(long struct)

Unsafe version of DeviceNameString.

nDeviceStringback to summary
public static ByteBuffer nDeviceString(long struct)

Unsafe version of DeviceString.

nDeviceStringStringback to summary
public static String nDeviceStringString(long struct)

Unsafe version of DeviceStringString.

nFlagsback to summary
public static int nFlags(long struct)

Unsafe version of Flags.

nrcVirtualScreenback to summary
public static RECT nrcVirtualScreen(long struct)

Unsafe version of rcVirtualScreen.

rcVirtualScreenback to summary
public RECT rcVirtualScreen()

specifies the display device rectangle, in virtual screen coordinates. The value of rcVirtualScreen is undefined if the device is not part of the desktop, i.e. DISPLAY_DEVICE_ATTACHED_TO_DESKTOP is not set in the Flags field.

sizeofback to summary
public int sizeof()

Implements abstract org.lwjgl.system.Struct.sizeof.

Doc from org.lwjgl.system.Struct.sizeof.

Returns sizeof(struct).

Annotations
@Override
org.lwjgl.opengl back to summary

public Class GPU_DEVICE.Buffer

extends StructBuffer<GPU_DEVICE, GPU_DEVICE.Buffer>
implements NativeResource
Class Inheritance
All Implemented Interfaces
org.lwjgl.system.NativeResource, java.lang.AutoCloseable

An array of GPU_DEVICE structs.

Field Summary

Modifier and TypeField and Description
private static final GPU_DEVICE

Constructor Summary

AccessConstructor and Description
public
Buffer(ByteBuffer container)

Creates a new GPU_DEVICE.Buffer instance backed by the specified container.

public
Buffer(long address, int cap)

pack-priv
Buffer(long address, ByteBuffer container, int mark, int pos, int lim, int cap)

Method Summary

Modifier and TypeMethod and Description
public int

Returns:

the value of the GPU_DEVICE#cb field.
cb
()

public ByteBuffer

Returns:

a ByteBuffer view of the GPU_DEVICE#DeviceName field.
DeviceName
()

public String

Returns:

the null-terminated string stored in the GPU_DEVICE#DeviceName field.
DeviceNameString
()

public ByteBuffer

Returns:

a ByteBuffer view of the GPU_DEVICE#DeviceString field.
DeviceString
()

public String

Returns:

the null-terminated string stored in the GPU_DEVICE#DeviceString field.
DeviceStringString
()

public int

Returns:

the value of the GPU_DEVICE#Flags field.
Flags
()

protected GPU_DEVICE
public RECT

Returns:

a RECT view of the GPU_DEVICE#rcVirtualScreen field.
rcVirtualScreen
()

protected GPU_DEVICE.Buffer
Inherited from org.lwjgl.system.StructBuffer:
applyapplyforEachgetgetgetgetiteratorparallelStreamputputsizeofspliteratorstream

Field Detail

ELEMENT_FACTORYback to summary
private static final GPU_DEVICE ELEMENT_FACTORY

Constructor Detail

Bufferback to summary
public Buffer(ByteBuffer container)

Creates a new GPU_DEVICE.Buffer instance backed by the specified container.

Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided by GPU_DEVICE#SIZEOF, and its mark will be undefined.

The created buffer instance holds a strong reference to the container object.

Bufferback to summary
public Buffer(long address, int cap)
Bufferback to summary
pack-priv Buffer(long address, ByteBuffer container, int mark, int pos, int lim, int cap)

Method Detail

cbback to summary
public int cb()
Returns:int

the value of the GPU_DEVICE#cb field.

Annotations
@NativeType:DWORD
DeviceNameback to summary
public ByteBuffer DeviceName()
Returns:ByteBuffer

a ByteBuffer view of the GPU_DEVICE#DeviceName field.

Annotations
@NativeType:CHAR[32]
DeviceNameStringback to summary
public String DeviceNameString()
Returns:String

the null-terminated string stored in the GPU_DEVICE#DeviceName field.

Annotations
@NativeType:CHAR[32]
DeviceStringback to summary
public ByteBuffer DeviceString()
Returns:ByteBuffer

a ByteBuffer view of the GPU_DEVICE#DeviceString field.

Annotations
@NativeType:CHAR[128]
DeviceStringStringback to summary
public String DeviceStringString()
Returns:String

the null-terminated string stored in the GPU_DEVICE#DeviceString field.

Annotations
@NativeType:CHAR[128]
Flagsback to summary
public int Flags()
Returns:int

the value of the GPU_DEVICE#Flags field.

Annotations
@NativeType:DWORD
getElementFactoryback to summary
protected GPU_DEVICE getElementFactory()

Implements abstract org.lwjgl.system.StructBuffer.getElementFactory.

Annotations
@Override
rcVirtualScreenback to summary
public RECT rcVirtualScreen()
Returns:RECT

a RECT view of the GPU_DEVICE#rcVirtualScreen field.

selfback to summary
protected GPU_DEVICE.Buffer self()

Implements abstract org.lwjgl.system.CustomBuffer.self.

Annotations
@Override