Class 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 the deviceIndex parameter of the EnumGpuDevicesNV function.

    Member documentation

    • cb – the size of the GPU_DEVICE structure. Before calling EnumGpuDevicesNV, set cb to the size, in bytes, of GPU_DEVICE.
    • 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.
    • 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).
    • Flags – indicates the state of the display device
    • 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.

    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 and Description
      static class  GPU_DEVICE.Buffer
      An array of GPU_DEVICE structs.
      • Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer

        org.lwjgl.system.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
      GPU_DEVICE(java.nio.ByteBuffer container)
      Creates a GPU_DEVICE instance at the current position of the specified ByteBuffer container.
    • Field Detail

      • SIZEOF

        public static final int SIZEOF
        The struct size in bytes.
    • Constructor Detail

      • GPU_DEVICE

        public GPU_DEVICE(java.nio.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

      • sizeof

        public int sizeof()
        Description copied from class: org.lwjgl.system.Struct
        Returns the sizeof(struct).
        Specified by:
        sizeof in class org.lwjgl.system.Struct
      • cb

        public int cb()
        Returns the value of the cb field.
      • DeviceName

        public java.nio.ByteBuffer DeviceName()
        Returns a ByteBuffer view of the DeviceName field.
      • DeviceNameString

        public java.lang.String DeviceNameString()
        Decodes the null-terminated string stored in the DeviceName field.
      • DeviceString

        public java.nio.ByteBuffer DeviceString()
        Returns a ByteBuffer view of the DeviceString field.
      • DeviceStringString

        public java.lang.String DeviceStringString()
        Decodes the null-terminated string stored in the DeviceString field.
      • Flags

        public int Flags()
        Returns the value of the Flags field.
      • rcVirtualScreen

        public org.lwjgl.system.windows.RECT rcVirtualScreen()
        Returns a RECT view of the rcVirtualScreen field.
      • malloc

        public static GPU_DEVICE malloc()
        Returns a new GPU_DEVICE instance allocated with memAlloc. The instance must be explicitly freed.
      • calloc

        public static GPU_DEVICE calloc()
        Returns a new GPU_DEVICE instance allocated with memCalloc. The instance must be explicitly freed.
      • create

        public static GPU_DEVICE create()
        Returns a new GPU_DEVICE instance allocated with BufferUtils.
      • create

        public static GPU_DEVICE create(long address)
        Returns a new GPU_DEVICE instance for the specified memory address or null if the address is NULL.
      • malloc

        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 - the buffer capacity
      • calloc

        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 - the buffer capacity
      • create

        public static GPU_DEVICE.Buffer create(int capacity)
        Returns a new GPU_DEVICE.Buffer instance allocated with BufferUtils.
        Parameters:
        capacity - the buffer capacity
      • create

        public static GPU_DEVICE.Buffer create(long address,
                                               int capacity)
        Create a GPU_DEVICE.Buffer instance at the specified memory.
        Parameters:
        address - the memory address
        capacity - the buffer capacity
      • mallocStack

        public static GPU_DEVICE mallocStack()
        Returns a new GPU_DEVICE instance allocated on the thread-local MemoryStack.
      • callocStack

        public static GPU_DEVICE callocStack()
        Returns a new GPU_DEVICE instance allocated on the thread-local MemoryStack and initializes all its bits to zero.
      • mallocStack

        public static GPU_DEVICE mallocStack(org.lwjgl.system.MemoryStack stack)
        Returns a new GPU_DEVICE instance allocated on the specified MemoryStack.
        Parameters:
        stack - the stack from which to allocate
      • callocStack

        public static GPU_DEVICE callocStack(org.lwjgl.system.MemoryStack stack)
        Returns a new GPU_DEVICE instance allocated on the specified MemoryStack 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 new GPU_DEVICE.Buffer instance allocated on the thread-local MemoryStack.
        Parameters:
        capacity - the buffer capacity
      • callocStack

        public static GPU_DEVICE.Buffer callocStack(int capacity)
        Returns a new GPU_DEVICE.Buffer instance allocated on the thread-local MemoryStack 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 new GPU_DEVICE.Buffer instance allocated on the specified MemoryStack.
        Parameters:
        stack - the stack from which to allocate
        capacity - the buffer capacity
      • callocStack

        public static GPU_DEVICE.Buffer callocStack(int capacity,
                                                    org.lwjgl.system.MemoryStack stack)
        Returns a new GPU_DEVICE.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.
        Parameters:
        stack - the stack from which to allocate
        capacity - the buffer capacity