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.NativeResourceStructure describing display parameters associated with a display mode.Description
Note
For example, a 60Hz display mode would report a
refreshRateof 60,000.Valid Usage
- The
widthmember ofvisibleRegionmust be greater than 0 - The
heightmember ofvisibleRegionmust be greater than 0 refreshRatemust be greater than 0
See Also
VkDisplayModeCreateInfoKHR,VkDisplayModePropertiesKHR,VkExtent2DMember documentation
visibleRegion– the 2D extents of the visible region.refreshRate– auint32_tthat is the number of times the display is refreshed each second multiplied by 1000.
Layout
struct VkDisplayModeParametersKHR {VkExtent2DvisibleRegion; uint32_t refreshRate; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classVkDisplayModeParametersKHR.BufferAn array ofVkDisplayModeParametersKHRstructs.
-
Field Summary
Fields Modifier and Type Field Description static intALIGNOFThe struct alignment in bytes.static intREFRESHRATEThe struct member offsets.static intSIZEOFThe struct size in bytes.static intVISIBLEREGIONThe struct member offsets.
-
Constructor Summary
Constructors Constructor Description VkDisplayModeParametersKHR(java.nio.ByteBuffer container)Creates aVkDisplayModeParametersKHRinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static VkDisplayModeParametersKHRcalloc()Returns a newVkDisplayModeParametersKHRinstance allocated withmemCalloc.static VkDisplayModeParametersKHR.Buffercalloc(int capacity)Returns a newVkDisplayModeParametersKHR.Bufferinstance allocated withmemCalloc.static VkDisplayModeParametersKHRcallocStack()Returns a newVkDisplayModeParametersKHRinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static VkDisplayModeParametersKHR.BuffercallocStack(int capacity)Returns a newVkDisplayModeParametersKHR.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static VkDisplayModeParametersKHR.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newVkDisplayModeParametersKHR.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkDisplayModeParametersKHRcallocStack(org.lwjgl.system.MemoryStack stack)Returns a newVkDisplayModeParametersKHRinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkDisplayModeParametersKHRcreate()Returns a newVkDisplayModeParametersKHRinstance allocated withBufferUtils.static VkDisplayModeParametersKHR.Buffercreate(int capacity)Returns a newVkDisplayModeParametersKHR.Bufferinstance allocated withBufferUtils.static VkDisplayModeParametersKHRcreate(long address)Returns a newVkDisplayModeParametersKHRinstance for the specified memory address.static VkDisplayModeParametersKHR.Buffercreate(long address, int capacity)Create aVkDisplayModeParametersKHR.Bufferinstance at the specified memory.static VkDisplayModeParametersKHRcreateSafe(long address)static VkDisplayModeParametersKHR.BuffercreateSafe(long address, int capacity)static VkDisplayModeParametersKHRmalloc()Returns a newVkDisplayModeParametersKHRinstance allocated withmemAlloc.static VkDisplayModeParametersKHR.Buffermalloc(int capacity)Returns a newVkDisplayModeParametersKHR.Bufferinstance allocated withmemAlloc.static VkDisplayModeParametersKHRmallocStack()Returns a newVkDisplayModeParametersKHRinstance allocated on the thread-localMemoryStack.static VkDisplayModeParametersKHR.BuffermallocStack(int capacity)Returns a newVkDisplayModeParametersKHR.Bufferinstance allocated on the thread-localMemoryStack.static VkDisplayModeParametersKHR.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newVkDisplayModeParametersKHR.Bufferinstance allocated on the specifiedMemoryStack.static VkDisplayModeParametersKHRmallocStack(org.lwjgl.system.MemoryStack stack)Returns a newVkDisplayModeParametersKHRinstance allocated on the specifiedMemoryStack.static intnrefreshRate(long struct)Unsafe version ofrefreshRate().static voidnrefreshRate(long struct, int value)Unsafe version ofrefreshRate.static VkExtent2DnvisibleRegion(long struct)Unsafe version ofvisibleRegion().static voidnvisibleRegion(long struct, VkExtent2D value)Unsafe version ofvisibleRegion.intrefreshRate()Returns the value of therefreshRatefield.VkDisplayModeParametersKHRrefreshRate(int value)Sets the specified value to therefreshRatefield.VkDisplayModeParametersKHRset(VkDisplayModeParametersKHR src)Copies the specified struct data to this struct.VkDisplayModeParametersKHRset(VkExtent2D visibleRegion, int refreshRate)Initializes this struct with the specified values.intsizeof()VkExtent2DvisibleRegion()Returns aVkExtent2Dview of thevisibleRegionfield.VkDisplayModeParametersKHRvisibleRegion(java.util.function.Consumer<VkExtent2D> consumer)Passes thevisibleRegionfield to the specifiedConsumer.VkDisplayModeParametersKHRvisibleRegion(VkExtent2D value)Copies the specifiedVkExtent2Dto thevisibleRegionfield.
-
-
-
Constructor Detail
-
VkDisplayModeParametersKHR
public VkDisplayModeParametersKHR(java.nio.ByteBuffer container)
Creates aVkDisplayModeParametersKHRinstance at the current position of the specifiedByteBuffercontainer. 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:
sizeofin classorg.lwjgl.system.Struct
-
visibleRegion
public VkExtent2D visibleRegion()
Returns aVkExtent2Dview of thevisibleRegionfield.
-
refreshRate
public int refreshRate()
Returns the value of therefreshRatefield.
-
visibleRegion
public VkDisplayModeParametersKHR visibleRegion(VkExtent2D value)
Copies the specifiedVkExtent2Dto thevisibleRegionfield.
-
visibleRegion
public VkDisplayModeParametersKHR visibleRegion(java.util.function.Consumer<VkExtent2D> consumer)
Passes thevisibleRegionfield to the specifiedConsumer.
-
refreshRate
public VkDisplayModeParametersKHR refreshRate(int value)
Sets the specified value to therefreshRatefield.
-
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 newVkDisplayModeParametersKHRinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static VkDisplayModeParametersKHR calloc()
Returns a newVkDisplayModeParametersKHRinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static VkDisplayModeParametersKHR create()
Returns a newVkDisplayModeParametersKHRinstance allocated withBufferUtils.
-
create
public static VkDisplayModeParametersKHR create(long address)
Returns a newVkDisplayModeParametersKHRinstance for the specified memory address.
-
createSafe
@Nullable public static VkDisplayModeParametersKHR createSafe(long address)
-
malloc
public static VkDisplayModeParametersKHR.Buffer malloc(int capacity)
Returns a newVkDisplayModeParametersKHR.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static VkDisplayModeParametersKHR.Buffer calloc(int capacity)
Returns a newVkDisplayModeParametersKHR.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static VkDisplayModeParametersKHR.Buffer create(int capacity)
Returns a newVkDisplayModeParametersKHR.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static VkDisplayModeParametersKHR.Buffer create(long address, int capacity)
Create aVkDisplayModeParametersKHR.Bufferinstance 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 newVkDisplayModeParametersKHRinstance allocated on the thread-localMemoryStack.
-
callocStack
public static VkDisplayModeParametersKHR callocStack()
Returns a newVkDisplayModeParametersKHRinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.
-
mallocStack
public static VkDisplayModeParametersKHR mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkDisplayModeParametersKHRinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
callocStack
public static VkDisplayModeParametersKHR callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkDisplayModeParametersKHRinstance allocated on the specifiedMemoryStackand 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.Bufferinstance allocated on the thread-localMemoryStack.- Parameters:
capacity- the buffer capacity
-
callocStack
public static VkDisplayModeParametersKHR.Buffer callocStack(int capacity)
Returns a newVkDisplayModeParametersKHR.Bufferinstance allocated on the thread-localMemoryStackand 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.Bufferinstance 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.Bufferinstance allocated on the specifiedMemoryStackand 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.
-
-