Package org.lwjgl.vulkan
Class VkDisplayPropertiesKHR
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.vulkan.VkDisplayPropertiesKHR
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,org.lwjgl.system.NativeResource
,org.lwjgl.system.Pointer
public class VkDisplayPropertiesKHR extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResource
Structure describing an available display device.Member documentation
display
– a handle that is used to refer to the display described here. This handle will be valid for the lifetime of the Vulkan instance.displayName
– a pointer to a NULL-terminated string containing the name of the display. Generally, this will be the name provided by the display’s EDID. It can beNULL
if no suitable name is available. If notNULL
, the memory it points to must remain accessible as long asdisplay
is valid.physicalDimensions
– describes the physical width and height of the visible portion of the display, in millimeters.physicalResolution
– describes the physical, native, or preferred resolution of the display.Note
For devices which have no natural value to return here, implementations should return the maximum resolution supported.
supportedTransforms
– a bitmask ofVkSurfaceTransformFlagBitsKHR
describing which transforms are supported by this display.planeReorderPossible
– tells whether the planes on this display can have their z order changed. If this isTRUE
, the application can re-arrange the planes on this display in any order relative to each other.persistentContent
– tells whether the display supports self-refresh/internal buffering. If this is true, the application can submit persistent present operations on swapchains created against this display.Note
Persistent presents may have higher latency, and may use less power when the screen content is updated infrequently, or when only a portion of the screen needs to be updated in most frames.
Layout
struct VkDisplayPropertiesKHR { VkDisplayKHR display; char const * displayName;
VkExtent2D
physicalDimensions;VkExtent2D
physicalResolution; VkSurfaceTransformFlagsKHR supportedTransforms; VkBool32 planeReorderPossible; VkBool32 persistentContent; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
VkDisplayPropertiesKHR.Buffer
An array ofVkDisplayPropertiesKHR
structs.
-
Field Summary
Fields Modifier and Type Field Description static int
ALIGNOF
The struct alignment in bytes.static int
DISPLAY
DISPLAYNAME
PERSISTENTCONTENT
PHYSICALDIMENSIONS
PHYSICALRESOLUTION
PLANEREORDERPOSSIBLEThe struct member offsets.static int
SIZEOF
The struct size in bytes.static int
SUPPORTEDTRANSFORMS
The struct member offsets.
-
Constructor Summary
Constructors Constructor Description VkDisplayPropertiesKHR(java.nio.ByteBuffer container)
Creates aVkDisplayPropertiesKHR
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 VkDisplayPropertiesKHR
calloc()
Returns a newVkDisplayPropertiesKHR
instance allocated withmemCalloc
.static VkDisplayPropertiesKHR.Buffer
calloc(int capacity)
Returns a newVkDisplayPropertiesKHR.Buffer
instance allocated withmemCalloc
.static VkDisplayPropertiesKHR
callocStack()
Returns a newVkDisplayPropertiesKHR
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static VkDisplayPropertiesKHR.Buffer
callocStack(int capacity)
Returns a newVkDisplayPropertiesKHR.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static VkDisplayPropertiesKHR.Buffer
callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkDisplayPropertiesKHR.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VkDisplayPropertiesKHR
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkDisplayPropertiesKHR
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VkDisplayPropertiesKHR
create()
Returns a newVkDisplayPropertiesKHR
instance allocated withBufferUtils
.static VkDisplayPropertiesKHR.Buffer
create(int capacity)
Returns a newVkDisplayPropertiesKHR.Buffer
instance allocated withBufferUtils
.static VkDisplayPropertiesKHR
create(long address)
Returns a newVkDisplayPropertiesKHR
instance for the specified memory address.static VkDisplayPropertiesKHR.Buffer
create(long address, int capacity)
Create aVkDisplayPropertiesKHR.Buffer
instance at the specified memory.static VkDisplayPropertiesKHR
createSafe(long address)
static VkDisplayPropertiesKHR.Buffer
createSafe(long address, int capacity)
long
display()
Returns the value of thedisplay
field.java.nio.ByteBuffer
displayName()
Returns aByteBuffer
view of the null-terminated string pointed to by thedisplayName
field.java.lang.String
displayNameString()
Decodes the null-terminated string pointed to by thedisplayName
field.static VkDisplayPropertiesKHR
malloc()
Returns a newVkDisplayPropertiesKHR
instance allocated withmemAlloc
.static VkDisplayPropertiesKHR.Buffer
malloc(int capacity)
Returns a newVkDisplayPropertiesKHR.Buffer
instance allocated withmemAlloc
.static VkDisplayPropertiesKHR
mallocStack()
Returns a newVkDisplayPropertiesKHR
instance allocated on the thread-localMemoryStack
.static VkDisplayPropertiesKHR.Buffer
mallocStack(int capacity)
Returns a newVkDisplayPropertiesKHR.Buffer
instance allocated on the thread-localMemoryStack
.static VkDisplayPropertiesKHR.Buffer
mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkDisplayPropertiesKHR.Buffer
instance allocated on the specifiedMemoryStack
.static VkDisplayPropertiesKHR
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkDisplayPropertiesKHR
instance allocated on the specifiedMemoryStack
.static long
ndisplay(long struct)
Unsafe version ofdisplay()
.static java.nio.ByteBuffer
ndisplayName(long struct)
Unsafe version ofdisplayName()
.static java.lang.String
ndisplayNameString(long struct)
Unsafe version ofdisplayNameString()
.static int
npersistentContent(long struct)
Unsafe version ofpersistentContent()
.static VkExtent2D
nphysicalDimensions(long struct)
Unsafe version ofphysicalDimensions()
.static VkExtent2D
nphysicalResolution(long struct)
Unsafe version ofphysicalResolution()
.static int
nplaneReorderPossible(long struct)
Unsafe version ofplaneReorderPossible()
.static int
nsupportedTransforms(long struct)
Unsafe version ofsupportedTransforms()
.boolean
persistentContent()
Returns the value of thepersistentContent
field.VkExtent2D
physicalDimensions()
Returns aVkExtent2D
view of thephysicalDimensions
field.VkExtent2D
physicalResolution()
Returns aVkExtent2D
view of thephysicalResolution
field.boolean
planeReorderPossible()
Returns the value of theplaneReorderPossible
field.int
sizeof()
int
supportedTransforms()
Returns the value of thesupportedTransforms
field.
-
-
-
Constructor Detail
-
VkDisplayPropertiesKHR
public VkDisplayPropertiesKHR(java.nio.ByteBuffer container)
Creates aVkDisplayPropertiesKHR
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
-
display
public long display()
Returns the value of thedisplay
field.
-
displayName
public java.nio.ByteBuffer displayName()
Returns aByteBuffer
view of the null-terminated string pointed to by thedisplayName
field.
-
displayNameString
public java.lang.String displayNameString()
Decodes the null-terminated string pointed to by thedisplayName
field.
-
physicalDimensions
public VkExtent2D physicalDimensions()
Returns aVkExtent2D
view of thephysicalDimensions
field.
-
physicalResolution
public VkExtent2D physicalResolution()
Returns aVkExtent2D
view of thephysicalResolution
field.
-
supportedTransforms
public int supportedTransforms()
Returns the value of thesupportedTransforms
field.
-
planeReorderPossible
public boolean planeReorderPossible()
Returns the value of theplaneReorderPossible
field.
-
persistentContent
public boolean persistentContent()
Returns the value of thepersistentContent
field.
-
malloc
public static VkDisplayPropertiesKHR malloc()
Returns a newVkDisplayPropertiesKHR
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static VkDisplayPropertiesKHR calloc()
Returns a newVkDisplayPropertiesKHR
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static VkDisplayPropertiesKHR create()
Returns a newVkDisplayPropertiesKHR
instance allocated withBufferUtils
.
-
create
public static VkDisplayPropertiesKHR create(long address)
Returns a newVkDisplayPropertiesKHR
instance for the specified memory address.
-
createSafe
@Nullable public static VkDisplayPropertiesKHR createSafe(long address)
-
malloc
public static VkDisplayPropertiesKHR.Buffer malloc(int capacity)
Returns a newVkDisplayPropertiesKHR.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static VkDisplayPropertiesKHR.Buffer calloc(int capacity)
Returns a newVkDisplayPropertiesKHR.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static VkDisplayPropertiesKHR.Buffer create(int capacity)
Returns a newVkDisplayPropertiesKHR.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static VkDisplayPropertiesKHR.Buffer create(long address, int capacity)
Create aVkDisplayPropertiesKHR.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
@Nullable public static VkDisplayPropertiesKHR.Buffer createSafe(long address, int capacity)
-
mallocStack
public static VkDisplayPropertiesKHR mallocStack()
Returns a newVkDisplayPropertiesKHR
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static VkDisplayPropertiesKHR callocStack()
Returns a newVkDisplayPropertiesKHR
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static VkDisplayPropertiesKHR mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkDisplayPropertiesKHR
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static VkDisplayPropertiesKHR callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkDisplayPropertiesKHR
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
mallocStack
public static VkDisplayPropertiesKHR.Buffer mallocStack(int capacity)
Returns a newVkDisplayPropertiesKHR.Buffer
instance allocated on the thread-localMemoryStack
.- Parameters:
capacity
- the buffer capacity
-
callocStack
public static VkDisplayPropertiesKHR.Buffer callocStack(int capacity)
Returns a newVkDisplayPropertiesKHR.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacity
-
mallocStack
public static VkDisplayPropertiesKHR.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkDisplayPropertiesKHR.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
callocStack
public static VkDisplayPropertiesKHR.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkDisplayPropertiesKHR.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
ndisplay
public static long ndisplay(long struct)
Unsafe version ofdisplay()
.
-
ndisplayName
public static java.nio.ByteBuffer ndisplayName(long struct)
Unsafe version ofdisplayName()
.
-
ndisplayNameString
public static java.lang.String ndisplayNameString(long struct)
Unsafe version ofdisplayNameString()
.
-
nphysicalDimensions
public static VkExtent2D nphysicalDimensions(long struct)
Unsafe version ofphysicalDimensions()
.
-
nphysicalResolution
public static VkExtent2D nphysicalResolution(long struct)
Unsafe version ofphysicalResolution()
.
-
nsupportedTransforms
public static int nsupportedTransforms(long struct)
Unsafe version ofsupportedTransforms()
.
-
nplaneReorderPossible
public static int nplaneReorderPossible(long struct)
Unsafe version ofplaneReorderPossible()
.
-
npersistentContent
public static int npersistentContent(long struct)
Unsafe version ofpersistentContent()
.
-
-