Package org.lwjgl.vulkan
Class VkDisplayModeParametersKHR
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.vulkan.VkDisplayModeParametersKHR
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,org.lwjgl.system.NativeResource
,org.lwjgl.system.Pointer
public class VkDisplayModeParametersKHR extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResource
Structure describing display parameters associated with a display mode.Description
Note
For example, a 60Hz display mode would report a
refreshRate
of 60,000.Valid Usage
- The
width
member ofvisibleRegion
must be greater than 0 - The
height
member ofvisibleRegion
must be greater than 0 refreshRate
must be greater than 0
See Also
VkDisplayModeCreateInfoKHR
,VkDisplayModePropertiesKHR
,VkExtent2D
Member documentation
visibleRegion
– the 2D extents of the visible region.refreshRate
– auint32_t
that is the number of times the display is refreshed each second multiplied by 1000.
Layout
struct VkDisplayModeParametersKHR {
VkExtent2D
visibleRegion; uint32_t refreshRate; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
VkDisplayModeParametersKHR.Buffer
An array ofVkDisplayModeParametersKHR
structs.
-
Field Summary
Fields Modifier and Type Field Description static int
ALIGNOF
The struct alignment in bytes.static int
REFRESHRATE
The struct member offsets.static int
SIZEOF
The struct size in bytes.static int
VISIBLEREGION
The struct member offsets.
-
Constructor Summary
Constructors Constructor Description VkDisplayModeParametersKHR(java.nio.ByteBuffer container)
Creates aVkDisplayModeParametersKHR
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 VkDisplayModeParametersKHR
calloc()
Returns a newVkDisplayModeParametersKHR
instance allocated withmemCalloc
.static VkDisplayModeParametersKHR.Buffer
calloc(int capacity)
Returns a newVkDisplayModeParametersKHR.Buffer
instance allocated withmemCalloc
.static VkDisplayModeParametersKHR
callocStack()
Returns a newVkDisplayModeParametersKHR
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static VkDisplayModeParametersKHR.Buffer
callocStack(int capacity)
Returns a newVkDisplayModeParametersKHR.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static VkDisplayModeParametersKHR.Buffer
callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkDisplayModeParametersKHR.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VkDisplayModeParametersKHR
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkDisplayModeParametersKHR
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VkDisplayModeParametersKHR
create()
Returns a newVkDisplayModeParametersKHR
instance allocated withBufferUtils
.static VkDisplayModeParametersKHR.Buffer
create(int capacity)
Returns a newVkDisplayModeParametersKHR.Buffer
instance allocated withBufferUtils
.static VkDisplayModeParametersKHR
create(long address)
Returns a newVkDisplayModeParametersKHR
instance for the specified memory address.static VkDisplayModeParametersKHR.Buffer
create(long address, int capacity)
Create aVkDisplayModeParametersKHR.Buffer
instance at the specified memory.static VkDisplayModeParametersKHR
createSafe(long address)
static VkDisplayModeParametersKHR.Buffer
createSafe(long address, int capacity)
static VkDisplayModeParametersKHR
malloc()
Returns a newVkDisplayModeParametersKHR
instance allocated withmemAlloc
.static VkDisplayModeParametersKHR.Buffer
malloc(int capacity)
Returns a newVkDisplayModeParametersKHR.Buffer
instance allocated withmemAlloc
.static VkDisplayModeParametersKHR
mallocStack()
Returns a newVkDisplayModeParametersKHR
instance allocated on the thread-localMemoryStack
.static VkDisplayModeParametersKHR.Buffer
mallocStack(int capacity)
Returns a newVkDisplayModeParametersKHR.Buffer
instance allocated on the thread-localMemoryStack
.static VkDisplayModeParametersKHR.Buffer
mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkDisplayModeParametersKHR.Buffer
instance allocated on the specifiedMemoryStack
.static VkDisplayModeParametersKHR
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkDisplayModeParametersKHR
instance allocated on the specifiedMemoryStack
.static int
nrefreshRate(long struct)
Unsafe version ofrefreshRate()
.static void
nrefreshRate(long struct, int value)
Unsafe version ofrefreshRate
.static VkExtent2D
nvisibleRegion(long struct)
Unsafe version ofvisibleRegion()
.static void
nvisibleRegion(long struct, VkExtent2D value)
Unsafe version ofvisibleRegion
.int
refreshRate()
Returns the value of therefreshRate
field.VkDisplayModeParametersKHR
refreshRate(int value)
Sets the specified value to therefreshRate
field.VkDisplayModeParametersKHR
set(VkDisplayModeParametersKHR src)
Copies the specified struct data to this struct.VkDisplayModeParametersKHR
set(VkExtent2D visibleRegion, int refreshRate)
Initializes this struct with the specified values.int
sizeof()
VkExtent2D
visibleRegion()
Returns aVkExtent2D
view of thevisibleRegion
field.VkDisplayModeParametersKHR
visibleRegion(java.util.function.Consumer<VkExtent2D> consumer)
Passes thevisibleRegion
field to the specifiedConsumer
.VkDisplayModeParametersKHR
visibleRegion(VkExtent2D value)
Copies the specifiedVkExtent2D
to thevisibleRegion
field.
-
-
-
Constructor Detail
-
VkDisplayModeParametersKHR
public VkDisplayModeParametersKHR(java.nio.ByteBuffer container)
Creates aVkDisplayModeParametersKHR
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
-
visibleRegion
public VkExtent2D visibleRegion()
Returns aVkExtent2D
view of thevisibleRegion
field.
-
refreshRate
public int refreshRate()
Returns the value of therefreshRate
field.
-
visibleRegion
public VkDisplayModeParametersKHR visibleRegion(VkExtent2D value)
Copies the specifiedVkExtent2D
to thevisibleRegion
field.
-
visibleRegion
public VkDisplayModeParametersKHR visibleRegion(java.util.function.Consumer<VkExtent2D> consumer)
Passes thevisibleRegion
field to the specifiedConsumer
.
-
refreshRate
public VkDisplayModeParametersKHR refreshRate(int value)
Sets the specified value to therefreshRate
field.
-
set
public VkDisplayModeParametersKHR set(VkExtent2D visibleRegion, int refreshRate)
Initializes this struct with the specified values.
-
set
public VkDisplayModeParametersKHR set(VkDisplayModeParametersKHR src)
Copies the specified struct data to this struct.- Parameters:
src
- the source struct- Returns:
- this struct
-
malloc
public static VkDisplayModeParametersKHR malloc()
Returns a newVkDisplayModeParametersKHR
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static VkDisplayModeParametersKHR calloc()
Returns a newVkDisplayModeParametersKHR
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static VkDisplayModeParametersKHR create()
Returns a newVkDisplayModeParametersKHR
instance allocated withBufferUtils
.
-
create
public static VkDisplayModeParametersKHR create(long address)
Returns a newVkDisplayModeParametersKHR
instance for the specified memory address.
-
createSafe
@Nullable public static VkDisplayModeParametersKHR createSafe(long address)
-
malloc
public static VkDisplayModeParametersKHR.Buffer malloc(int capacity)
Returns a newVkDisplayModeParametersKHR.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static VkDisplayModeParametersKHR.Buffer calloc(int capacity)
Returns a newVkDisplayModeParametersKHR.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static VkDisplayModeParametersKHR.Buffer create(int capacity)
Returns a newVkDisplayModeParametersKHR.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static VkDisplayModeParametersKHR.Buffer create(long address, int capacity)
Create aVkDisplayModeParametersKHR.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
@Nullable public static VkDisplayModeParametersKHR.Buffer createSafe(long address, int capacity)
-
mallocStack
public static VkDisplayModeParametersKHR mallocStack()
Returns a newVkDisplayModeParametersKHR
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static VkDisplayModeParametersKHR callocStack()
Returns a newVkDisplayModeParametersKHR
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static VkDisplayModeParametersKHR mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkDisplayModeParametersKHR
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static VkDisplayModeParametersKHR callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkDisplayModeParametersKHR
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
mallocStack
public static VkDisplayModeParametersKHR.Buffer mallocStack(int capacity)
Returns a newVkDisplayModeParametersKHR.Buffer
instance allocated on the thread-localMemoryStack
.- Parameters:
capacity
- the buffer capacity
-
callocStack
public static VkDisplayModeParametersKHR.Buffer callocStack(int capacity)
Returns a newVkDisplayModeParametersKHR.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacity
-
mallocStack
public static VkDisplayModeParametersKHR.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkDisplayModeParametersKHR.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
callocStack
public static VkDisplayModeParametersKHR.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkDisplayModeParametersKHR.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
nvisibleRegion
public static VkExtent2D nvisibleRegion(long struct)
Unsafe version ofvisibleRegion()
.
-
nrefreshRate
public static int nrefreshRate(long struct)
Unsafe version ofrefreshRate()
.
-
nvisibleRegion
public static void nvisibleRegion(long struct, VkExtent2D value)
Unsafe version ofvisibleRegion
.
-
nrefreshRate
public static void nrefreshRate(long struct, int value)
Unsafe version ofrefreshRate
.
-
-