Package org.lwjgl.opengl
Class GPU_DEVICE
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.opengl.GPU_DEVICE
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,org.lwjgl.system.NativeResource
,org.lwjgl.system.Pointer
public class GPU_DEVICE extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResource
Receives information about the display device specified by thedeviceIndex
parameter of theEnumGpuDevicesNV
function.Member documentation
cb
– the size of theGPU_DEVICE
structure. Before callingEnumGpuDevicesNV
, setcb
to the size, in bytes, ofGPU_DEVICE
.DeviceName[32]
– a string identifying the display device name. This will be the same string as stored in theDeviceName
field of theDISPLAY_DEVICE
structure, which is filled in byEnumDisplayDevices
.DeviceString[128]
– a string describing the GPU for this display device. It is the same string as stored in theDeviceString
field in theDISPLAY_DEVICE
structure that is filled in byEnumDisplayDevices
when it describes a display adapter (and not a monitor).Flags
– indicates the state of the display devicercVirtualScreen
– specifies the display device rectangle, in virtual screen coordinates. The value ofrcVirtualScreen
is undefined if the device is not part of the desktop, i.e.DISPLAY_DEVICE_ATTACHED_TO_DESKTOP
is not set in theFlags
field.
Layout
struct GPU_DEVICE { DWORD cb; CHAR DeviceName[32]; CHAR DeviceString[128]; DWORD Flags;
RECT
rcVirtualScreen; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
GPU_DEVICE.Buffer
An array ofGPU_DEVICE
structs.
-
Field Summary
Fields Modifier and Type Field Description static int
ALIGNOF
The struct alignment in bytes.static int
CB
DEVICENAME
DEVICESTRING
FLAGS
RCVIRTUALSCREENThe struct member offsets.static int
SIZEOF
The struct size in bytes.
-
Constructor Summary
Constructors Constructor Description GPU_DEVICE(java.nio.ByteBuffer container)
Creates aGPU_DEVICE
instance at the current position of the specifiedByteBuffer
container.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static GPU_DEVICE
calloc()
Returns a newGPU_DEVICE
instance allocated withmemCalloc
.static GPU_DEVICE.Buffer
calloc(int capacity)
Returns a newGPU_DEVICE.Buffer
instance allocated withmemCalloc
.static GPU_DEVICE
callocStack()
Returns a newGPU_DEVICE
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static GPU_DEVICE.Buffer
callocStack(int capacity)
Returns a newGPU_DEVICE.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static GPU_DEVICE.Buffer
callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newGPU_DEVICE.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static GPU_DEVICE
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newGPU_DEVICE
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.int
cb()
Returns the value of thecb
field.static GPU_DEVICE
create()
Returns a newGPU_DEVICE
instance allocated withBufferUtils
.static GPU_DEVICE.Buffer
create(int capacity)
Returns a newGPU_DEVICE.Buffer
instance allocated withBufferUtils
.static GPU_DEVICE
create(long address)
Returns a newGPU_DEVICE
instance for the specified memory address.static GPU_DEVICE.Buffer
create(long address, int capacity)
Create aGPU_DEVICE.Buffer
instance at the specified memory.static GPU_DEVICE
createSafe(long address)
static GPU_DEVICE.Buffer
createSafe(long address, int capacity)
java.nio.ByteBuffer
DeviceName()
Returns aByteBuffer
view of theDeviceName
field.java.lang.String
DeviceNameString()
Decodes the null-terminated string stored in theDeviceName
field.java.nio.ByteBuffer
DeviceString()
Returns aByteBuffer
view of theDeviceString
field.java.lang.String
DeviceStringString()
Decodes the null-terminated string stored in theDeviceString
field.int
Flags()
Returns the value of theFlags
field.static GPU_DEVICE
malloc()
Returns a newGPU_DEVICE
instance allocated withmemAlloc
.static GPU_DEVICE.Buffer
malloc(int capacity)
Returns a newGPU_DEVICE.Buffer
instance allocated withmemAlloc
.static GPU_DEVICE
mallocStack()
Returns a newGPU_DEVICE
instance allocated on the thread-localMemoryStack
.static GPU_DEVICE.Buffer
mallocStack(int capacity)
Returns a newGPU_DEVICE.Buffer
instance allocated on the thread-localMemoryStack
.static GPU_DEVICE.Buffer
mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newGPU_DEVICE.Buffer
instance allocated on the specifiedMemoryStack
.static GPU_DEVICE
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newGPU_DEVICE
instance allocated on the specifiedMemoryStack
.static int
ncb(long struct)
Unsafe version ofcb()
.static java.nio.ByteBuffer
nDeviceName(long struct)
Unsafe version ofDeviceName()
.static java.lang.String
nDeviceNameString(long struct)
Unsafe version ofDeviceNameString()
.static java.nio.ByteBuffer
nDeviceString(long struct)
Unsafe version ofDeviceString()
.static java.lang.String
nDeviceStringString(long struct)
Unsafe version ofDeviceStringString()
.static int
nFlags(long struct)
Unsafe version ofFlags()
.static org.lwjgl.system.windows.RECT
nrcVirtualScreen(long struct)
Unsafe version ofrcVirtualScreen()
.org.lwjgl.system.windows.RECT
rcVirtualScreen()
Returns aRECT
view of thercVirtualScreen
field.int
sizeof()
-
-
-
Constructor Detail
-
GPU_DEVICE
public GPU_DEVICE(java.nio.ByteBuffer container)
Creates aGPU_DEVICE
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()
- Specified by:
sizeof
in classorg.lwjgl.system.Struct
-
cb
public int cb()
Returns the value of thecb
field.
-
DeviceName
public java.nio.ByteBuffer DeviceName()
Returns aByteBuffer
view of theDeviceName
field.
-
DeviceNameString
public java.lang.String DeviceNameString()
Decodes the null-terminated string stored in theDeviceName
field.
-
DeviceString
public java.nio.ByteBuffer DeviceString()
Returns aByteBuffer
view of theDeviceString
field.
-
DeviceStringString
public java.lang.String DeviceStringString()
Decodes the null-terminated string stored in theDeviceString
field.
-
Flags
public int Flags()
Returns the value of theFlags
field.
-
rcVirtualScreen
public org.lwjgl.system.windows.RECT rcVirtualScreen()
Returns aRECT
view of thercVirtualScreen
field.
-
malloc
public static GPU_DEVICE malloc()
Returns a newGPU_DEVICE
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static GPU_DEVICE calloc()
Returns a newGPU_DEVICE
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static GPU_DEVICE create()
Returns a newGPU_DEVICE
instance allocated withBufferUtils
.
-
create
public static GPU_DEVICE create(long address)
Returns a newGPU_DEVICE
instance for the specified memory address.
-
createSafe
@Nullable public static GPU_DEVICE createSafe(long address)
-
malloc
public static GPU_DEVICE.Buffer malloc(int capacity)
Returns a newGPU_DEVICE.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static GPU_DEVICE.Buffer calloc(int capacity)
Returns a newGPU_DEVICE.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static GPU_DEVICE.Buffer create(int capacity)
Returns a newGPU_DEVICE.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static GPU_DEVICE.Buffer create(long address, int capacity)
Create aGPU_DEVICE.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
@Nullable public static GPU_DEVICE.Buffer createSafe(long address, int capacity)
-
mallocStack
public static GPU_DEVICE mallocStack()
Returns a newGPU_DEVICE
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static GPU_DEVICE callocStack()
Returns a newGPU_DEVICE
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static GPU_DEVICE mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newGPU_DEVICE
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static GPU_DEVICE callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newGPU_DEVICE
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
mallocStack
public static GPU_DEVICE.Buffer mallocStack(int capacity)
Returns a newGPU_DEVICE.Buffer
instance allocated on the thread-localMemoryStack
.- Parameters:
capacity
- the buffer capacity
-
callocStack
public static GPU_DEVICE.Buffer callocStack(int capacity)
Returns a newGPU_DEVICE.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacity
-
mallocStack
public static GPU_DEVICE.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newGPU_DEVICE.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
callocStack
public static GPU_DEVICE.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newGPU_DEVICE.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
ncb
public static int ncb(long struct)
Unsafe version ofcb()
.
-
nDeviceName
public static java.nio.ByteBuffer nDeviceName(long struct)
Unsafe version ofDeviceName()
.
-
nDeviceNameString
public static java.lang.String nDeviceNameString(long struct)
Unsafe version ofDeviceNameString()
.
-
nDeviceString
public static java.nio.ByteBuffer nDeviceString(long struct)
Unsafe version ofDeviceString()
.
-
nDeviceStringString
public static java.lang.String nDeviceStringString(long struct)
Unsafe version ofDeviceStringString()
.
-
nFlags
public static int nFlags(long struct)
Unsafe version ofFlags()
.
-
nrcVirtualScreen
public static org.lwjgl.system.windows.RECT nrcVirtualScreen(long struct)
Unsafe version ofrcVirtualScreen()
.
-
-