Class VkPastPresentationTimingGOOGLE

java.lang.Object
org.lwjgl.system.Pointer.Default
org.lwjgl.system.Struct<VkPastPresentationTimingGOOGLE>
org.lwjgl.vulkan.VkPastPresentationTimingGOOGLE
All Implemented Interfaces:
AutoCloseable, org.lwjgl.system.NativeResource, org.lwjgl.system.Pointer

public class VkPastPresentationTimingGOOGLE extends org.lwjgl.system.Struct<VkPastPresentationTimingGOOGLE> implements org.lwjgl.system.NativeResource
Structure containing timing information about a previously-presented image.
Description

The results for a given swapchain and presentID are only returned once from vkGetPastPresentationTimingGOOGLE.

The application can use the VkPastPresentationTimingGOOGLE values to occasionally adjust its timing. For example, if actualPresentTime is later than expected (e.g. one refreshDuration late), the application may increase its target IPD to a higher multiple of refreshDuration (e.g. decrease its frame rate from 60Hz to 30Hz). If actualPresentTime and earliestPresentTime are consistently different, and if presentMargin is consistently large enough, the application may decrease its target IPD to a smaller multiple of refreshDuration (e.g. increase its frame rate from 30Hz to 60Hz). If actualPresentTime and earliestPresentTime are same, and if presentMargin is 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 as refreshDuration, can also adjust features until actualPresentTime is never late and presentMargin is satisfactory.

See Also

GetPastPresentationTimingGOOGLE

Layout


 struct VkPastPresentationTimingGOOGLE {
     uint32_t presentID();
     uint64_t desiredPresentTime();
     uint64_t actualPresentTime();
     uint64_t earliestPresentTime();
     uint64_t presentMargin();
 }
  • Field Details

    • SIZEOF

      public static final int SIZEOF
      The struct size in bytes.
    • ALIGNOF

      public static final int ALIGNOF
      The struct alignment in bytes.
    • PRESENTID

      public static final int PRESENTID
      The struct member offsets.
    • DESIREDPRESENTTIME

      public static final int DESIREDPRESENTTIME
      The struct member offsets.
    • ACTUALPRESENTTIME

      public static final int ACTUALPRESENTTIME
      The struct member offsets.
    • EARLIESTPRESENTTIME

      public static final int EARLIESTPRESENTTIME
      The struct member offsets.
    • PRESENTMARGIN

      public static final int PRESENTMARGIN
      The struct member offsets.
  • Constructor Details

    • VkPastPresentationTimingGOOGLE

      public VkPastPresentationTimingGOOGLE(ByteBuffer container)
      Creates a VkPastPresentationTimingGOOGLE instance at the current position of the specified ByteBuffer 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 Details