Class VkPastPresentationTimingGOOGLE
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.vulkan.VkPastPresentationTimingGOOGLE
-
- All Implemented Interfaces:
java.lang.AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class VkPastPresentationTimingGOOGLE extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResourceStructure containing timing information about a previously-presented image.Description
The results for a given
swapchainandpresentIDare only returned once fromvkGetPastPresentationTimingGOOGLE.The application can use the
VkPastPresentationTimingGOOGLEvalues to occasionally adjust its timing. For example, ifactualPresentTimeis later than expected (e.g. onerefreshDurationlate), the application may increase its target IPD to a higher multiple ofrefreshDuration(e.g. decrease its frame rate from 60Hz to 30Hz). IfactualPresentTimeandearliestPresentTimeare consistently different, and ifpresentMarginis consistently large enough, the application may decrease its target IPD to a smaller multiple ofrefreshDuration(e.g. increase its frame rate from 30Hz to 60Hz). IfactualPresentTimeandearliestPresentTimeare same, and ifpresentMarginis consistently high, the application may delay the start of its input-render-present loop in order to decrease the latency between user input and the corresponding present (always leaving some margin in case a new image takes longer to render than the previous image). An application that desires its target IPD to always be the same asrefreshDuration, can also adjust features untilactualPresentTimeis never late andpresentMarginis satisfactory.See Also
GetPastPresentationTimingGOOGLELayout
struct VkPastPresentationTimingGOOGLE { uint32_tpresentID(); uint64_tdesiredPresentTime(); uint64_tactualPresentTime(); uint64_tearliestPresentTime(); uint64_tpresentMargin(); }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classVkPastPresentationTimingGOOGLE.BufferAn array ofVkPastPresentationTimingGOOGLEstructs.
-
Field Summary
Fields Modifier and Type Field Description static intACTUALPRESENTTIMEThe struct member offsets.static intALIGNOFThe struct alignment in bytes.static intDESIREDPRESENTTIME
EARLIESTPRESENTTIME
PRESENTID
PRESENTMARGINThe struct member offsets.static intSIZEOFThe struct size in bytes.
-
Constructor Summary
Constructors Constructor Description VkPastPresentationTimingGOOGLE(java.nio.ByteBuffer container)Creates aVkPastPresentationTimingGOOGLEinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description longactualPresentTime()the time when the image of theswapchainwas actually displayed.static VkPastPresentationTimingGOOGLEcalloc()Returns a newVkPastPresentationTimingGOOGLEinstance allocated withmemCalloc.static VkPastPresentationTimingGOOGLE.Buffercalloc(int capacity)Returns a newVkPastPresentationTimingGOOGLE.Bufferinstance allocated withmemCalloc.static VkPastPresentationTimingGOOGLE.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newVkPastPresentationTimingGOOGLE.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkPastPresentationTimingGOOGLEcalloc(org.lwjgl.system.MemoryStack stack)Returns a newVkPastPresentationTimingGOOGLEinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkPastPresentationTimingGOOGLEcallocStack()Deprecated.static VkPastPresentationTimingGOOGLE.BuffercallocStack(int capacity)Deprecated.static VkPastPresentationTimingGOOGLE.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Deprecated.static VkPastPresentationTimingGOOGLEcallocStack(org.lwjgl.system.MemoryStack stack)Deprecated.static VkPastPresentationTimingGOOGLEcreate()Returns a newVkPastPresentationTimingGOOGLEinstance allocated withBufferUtils.static VkPastPresentationTimingGOOGLE.Buffercreate(int capacity)Returns a newVkPastPresentationTimingGOOGLE.Bufferinstance allocated withBufferUtils.static VkPastPresentationTimingGOOGLEcreate(long address)Returns a newVkPastPresentationTimingGOOGLEinstance for the specified memory address.static VkPastPresentationTimingGOOGLE.Buffercreate(long address, int capacity)Create aVkPastPresentationTimingGOOGLE.Bufferinstance at the specified memory.static VkPastPresentationTimingGOOGLEcreateSafe(long address)static VkPastPresentationTimingGOOGLE.BuffercreateSafe(long address, int capacity)longdesiredPresentTime()an application-provided value that was given to a previousQueuePresentKHRcommand viaVkPresentTimeGOOGLE::desiredPresentTime.longearliestPresentTime()the time when the image of theswapchaincould have been displayed.static VkPastPresentationTimingGOOGLEmalloc()Returns a newVkPastPresentationTimingGOOGLEinstance allocated withmemAlloc.static VkPastPresentationTimingGOOGLE.Buffermalloc(int capacity)Returns a newVkPastPresentationTimingGOOGLE.Bufferinstance allocated withmemAlloc.static VkPastPresentationTimingGOOGLE.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newVkPastPresentationTimingGOOGLE.Bufferinstance allocated on the specifiedMemoryStack.static VkPastPresentationTimingGOOGLEmalloc(org.lwjgl.system.MemoryStack stack)Returns a newVkPastPresentationTimingGOOGLEinstance allocated on the specifiedMemoryStack.static VkPastPresentationTimingGOOGLEmallocStack()Deprecated.static VkPastPresentationTimingGOOGLE.BuffermallocStack(int capacity)Deprecated.static VkPastPresentationTimingGOOGLE.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Deprecated.static VkPastPresentationTimingGOOGLEmallocStack(org.lwjgl.system.MemoryStack stack)Deprecated.static longnactualPresentTime(long struct)Unsafe version ofactualPresentTime().static longndesiredPresentTime(long struct)Unsafe version ofdesiredPresentTime().static longnearliestPresentTime(long struct)Unsafe version ofearliestPresentTime().static intnpresentID(long struct)Unsafe version ofpresentID().static longnpresentMargin(long struct)Unsafe version ofpresentMargin().intpresentID()an application-provided value that was given to a previousvkQueuePresentKHRcommand viaVkPresentTimeGOOGLE::presentID(see below).longpresentMargin()an indication of how early thevkQueuePresentKHRcommand was processed compared to how soon it needed to be processed, and still be presented atearliestPresentTime.intsizeof()
-
-
-
Constructor Detail
-
VkPastPresentationTimingGOOGLE
public VkPastPresentationTimingGOOGLE(java.nio.ByteBuffer container)
Creates aVkPastPresentationTimingGOOGLEinstance 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
-
presentID
public int presentID()
an application-provided value that was given to a previousvkQueuePresentKHRcommand viaVkPresentTimeGOOGLE::presentID(see below). It can be used to uniquely identify a previous present with theQueuePresentKHRcommand.
-
desiredPresentTime
public long desiredPresentTime()
an application-provided value that was given to a previousQueuePresentKHRcommand viaVkPresentTimeGOOGLE::desiredPresentTime. If non-zero, it was used by the application to indicate that an image not be presented any sooner thandesiredPresentTime.
-
actualPresentTime
public long actualPresentTime()
the time when the image of theswapchainwas actually displayed.
-
earliestPresentTime
public long earliestPresentTime()
the time when the image of theswapchaincould have been displayed. This may differ fromactualPresentTimeif the application requested that the image be presented no sooner thanVkPresentTimeGOOGLE::desiredPresentTime.
-
presentMargin
public long presentMargin()
an indication of how early thevkQueuePresentKHRcommand was processed compared to how soon it needed to be processed, and still be presented atearliestPresentTime.
-
malloc
public static VkPastPresentationTimingGOOGLE malloc()
Returns a newVkPastPresentationTimingGOOGLEinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static VkPastPresentationTimingGOOGLE calloc()
Returns a newVkPastPresentationTimingGOOGLEinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static VkPastPresentationTimingGOOGLE create()
Returns a newVkPastPresentationTimingGOOGLEinstance allocated withBufferUtils.
-
create
public static VkPastPresentationTimingGOOGLE create(long address)
Returns a newVkPastPresentationTimingGOOGLEinstance for the specified memory address.
-
createSafe
@Nullable public static VkPastPresentationTimingGOOGLE createSafe(long address)
-
malloc
public static VkPastPresentationTimingGOOGLE.Buffer malloc(int capacity)
Returns a newVkPastPresentationTimingGOOGLE.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static VkPastPresentationTimingGOOGLE.Buffer calloc(int capacity)
Returns a newVkPastPresentationTimingGOOGLE.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static VkPastPresentationTimingGOOGLE.Buffer create(int capacity)
Returns a newVkPastPresentationTimingGOOGLE.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static VkPastPresentationTimingGOOGLE.Buffer create(long address, int capacity)
Create aVkPastPresentationTimingGOOGLE.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
@Nullable public static VkPastPresentationTimingGOOGLE.Buffer createSafe(long address, int capacity)
-
mallocStack
@Deprecated public static VkPastPresentationTimingGOOGLE mallocStack()
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static VkPastPresentationTimingGOOGLE callocStack()
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static VkPastPresentationTimingGOOGLE mallocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static VkPastPresentationTimingGOOGLE callocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static VkPastPresentationTimingGOOGLE.Buffer mallocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead.
-
callocStack
@Deprecated public static VkPastPresentationTimingGOOGLE.Buffer callocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead.
-
mallocStack
@Deprecated public static VkPastPresentationTimingGOOGLE.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 VkPastPresentationTimingGOOGLE.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead.
-
malloc
public static VkPastPresentationTimingGOOGLE malloc(org.lwjgl.system.MemoryStack stack)
Returns a newVkPastPresentationTimingGOOGLEinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
public static VkPastPresentationTimingGOOGLE calloc(org.lwjgl.system.MemoryStack stack)
Returns a newVkPastPresentationTimingGOOGLEinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
public static VkPastPresentationTimingGOOGLE.Buffer malloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkPastPresentationTimingGOOGLE.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
calloc
public static VkPastPresentationTimingGOOGLE.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkPastPresentationTimingGOOGLE.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
npresentID
public static int npresentID(long struct)
Unsafe version ofpresentID().
-
ndesiredPresentTime
public static long ndesiredPresentTime(long struct)
Unsafe version ofdesiredPresentTime().
-
nactualPresentTime
public static long nactualPresentTime(long struct)
Unsafe version ofactualPresentTime().
-
nearliestPresentTime
public static long nearliestPresentTime(long struct)
Unsafe version ofearliestPresentTime().
-
npresentMargin
public static long npresentMargin(long struct)
Unsafe version ofpresentMargin().
-
-