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,VkExtent2DLayout
struct VkDisplayModeParametersKHR {VkExtent2DvisibleRegion(); uint32_trefreshRate(); }
-
-
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 Deprecated 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 VkDisplayModeParametersKHR.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newVkDisplayModeParametersKHR.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkDisplayModeParametersKHRcalloc(org.lwjgl.system.MemoryStack stack)Returns a newVkDisplayModeParametersKHRinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkDisplayModeParametersKHRcallocStack()Deprecated.static VkDisplayModeParametersKHR.BuffercallocStack(int capacity)Deprecated.static VkDisplayModeParametersKHR.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Deprecated.static VkDisplayModeParametersKHRcallocStack(org.lwjgl.system.MemoryStack stack)Deprecated.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 VkDisplayModeParametersKHR.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newVkDisplayModeParametersKHR.Bufferinstance allocated on the specifiedMemoryStack.static VkDisplayModeParametersKHRmalloc(org.lwjgl.system.MemoryStack stack)Returns a newVkDisplayModeParametersKHRinstance allocated on the specifiedMemoryStack.static VkDisplayModeParametersKHRmallocStack()Deprecated.static VkDisplayModeParametersKHR.BuffermallocStack(int capacity)Deprecated.static VkDisplayModeParametersKHR.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Deprecated.static VkDisplayModeParametersKHRmallocStack(org.lwjgl.system.MemoryStack stack)Deprecated.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()auint32_tthat is the number of times the display is refreshed each second multiplied by 1000.VkDisplayModeParametersKHRrefreshRate(int value)Sets the specified value to therefreshRate()field.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()the 2D extents of the visible region.VkDisplayModeParametersKHRvisibleRegion(java.util.function.Consumer<VkExtent2D> consumer)Passes thevisibleRegion()field to the specifiedConsumer.VkDisplayModeParametersKHRvisibleRegion(VkExtent2D value)Copies the specifiedVkExtent2Dto thevisibleRegion()field.
-
-
-
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()
the 2D extents of the visible region.
-
refreshRate
public int refreshRate()
auint32_tthat is the number of times the display is refreshed each second multiplied by 1000.
-
visibleRegion
public VkDisplayModeParametersKHR visibleRegion(VkExtent2D value)
Copies the specifiedVkExtent2Dto 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 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
@Deprecated public static VkDisplayModeParametersKHR mallocStack()
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static VkDisplayModeParametersKHR callocStack()
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static VkDisplayModeParametersKHR mallocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static VkDisplayModeParametersKHR callocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static VkDisplayModeParametersKHR.Buffer mallocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead.
-
callocStack
@Deprecated public static VkDisplayModeParametersKHR.Buffer callocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead.
-
mallocStack
@Deprecated public static VkDisplayModeParametersKHR.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead.
-
callocStack
@Deprecated public static VkDisplayModeParametersKHR.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead.
-
malloc
public static VkDisplayModeParametersKHR malloc(org.lwjgl.system.MemoryStack stack)
Returns a newVkDisplayModeParametersKHRinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
public static VkDisplayModeParametersKHR calloc(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
-
malloc
public static VkDisplayModeParametersKHR.Buffer malloc(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
-
calloc
public static VkDisplayModeParametersKHR.Buffer calloc(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.
-
-