Class VRScreenshots

  • public class VRScreenshots
    extends java.lang.Object
    Allows the application to generate screenshots.
    • Method Detail

      • nVRScreenshots_RequestScreenshot

        public static int nVRScreenshots_RequestScreenshot​(long pOutScreenshotHandle,
                                                           int type,
                                                           long pchPreviewFilename,
                                                           long pchVRFilename)
        Unsafe version of: RequestScreenshot
      • VRScreenshots_RequestScreenshot

        public static int VRScreenshots_RequestScreenshot​(java.nio.IntBuffer pOutScreenshotHandle,
                                                          int type,
                                                          java.nio.ByteBuffer pchPreviewFilename,
                                                          java.nio.ByteBuffer pchVRFilename)
        public static int VRScreenshots_RequestScreenshot​(java.nio.IntBuffer pOutScreenshotHandle,
                                                          int type,
                                                          java.lang.CharSequence pchPreviewFilename,
                                                          java.lang.CharSequence pchVRFilename)
        Request a screenshot of the requested type.

        A request of the VR.EVRScreenshotType_VRScreenshotType_Stereo type will always work. Other types will depend on the underlying application support.

        The first file name is for the preview image and should be a regular screenshot (ideally from the left eye). The second is the VR screenshot in the correct format. They should be in the same aspect ratio.

        Note that the VR dashboard will call this function when the user presses the screenshot binding (currently System Button + Trigger). If Steam is running, the destination file names will be in %TEMP% and will be copied into Steam's screenshot library for the running application once SubmitScreenshot is called. If Steam is not running, the paths will be in the user's documents folder under Documents\SteamVR\Screenshots. Other VR applications can call this to initate a screenshot outside of user control. The destination file names do not need an extension, will be replaced with the correct one for the format which is currently .png.

        type - one of:
      • nVRScreenshots_HookScreenshot

        public static int nVRScreenshots_HookScreenshot​(long pSupportedTypes,
                                                        int numTypes)
        Unsafe version of: HookScreenshot
      • VRScreenshots_HookScreenshot

        public static int VRScreenshots_HookScreenshot​(java.nio.IntBuffer pSupportedTypes)
        Called by the running VR application to indicate that it wishes to be in charge of screenshots. If the application does not call this, the Compositor will only support VR.EVRScreenshotType_VRScreenshotType_Stereo screenshots that will be captured without notification to the running app.

        Once hooked your application will receive a VR.EVREventType_VREvent_RequestScreenshot event when the user presses the buttons to take a screenshot.

      • nVRScreenshots_GetScreenshotPropertyType

        public static int nVRScreenshots_GetScreenshotPropertyType​(int screenshotHandle,
                                                                   long pError)
        Unsafe version of: GetScreenshotPropertyType
      • VRScreenshots_GetScreenshotPropertyType

        public static int VRScreenshots_GetScreenshotPropertyType​(int screenshotHandle,
                                                                  java.nio.IntBuffer pError)
        When your application receives a VR.EVREventType_VREvent_RequestScreenshot event, call these functions to get the details of the screenshot request.
      • nVRScreenshots_GetScreenshotPropertyFilename

        public static int nVRScreenshots_GetScreenshotPropertyFilename​(int screenshotHandle,
                                                                       int filenameType,
                                                                       long pchFilename,
                                                                       int cchFilename,
                                                                       long pError)
      • VRScreenshots_UpdateScreenshotProgress

        public static int VRScreenshots_UpdateScreenshotProgress​(int screenshotHandle,
                                                                 float flProgress)
        Call this if the application is taking the screen shot will take more than a few ms processing. This will result in an overlay being presented that shows a completion bar.
      • nVRScreenshots_TakeStereoScreenshot

        public static int nVRScreenshots_TakeStereoScreenshot​(long pOutScreenshotHandle,
                                                              long pchPreviewFilename,
                                                              long pchVRFilename)
        Unsafe version of: TakeStereoScreenshot
      • VRScreenshots_TakeStereoScreenshot

        public static int VRScreenshots_TakeStereoScreenshot​(java.nio.IntBuffer pOutScreenshotHandle,
                                                             java.nio.ByteBuffer pchPreviewFilename,
                                                             java.nio.ByteBuffer pchVRFilename)
        public static int VRScreenshots_TakeStereoScreenshot​(java.nio.IntBuffer pOutScreenshotHandle,
                                                             java.lang.CharSequence pchPreviewFilename,
                                                             java.lang.CharSequence pchVRFilename)
        Tells the compositor to take an internal screenshot of type VR.EVRScreenshotType_VRScreenshotType_Stereo. It will take the current submitted scene textures of the running application and write them into the preview image and a side-by-side file for the VR image.

        This is similiar to request screenshot, but doesn't ever talk to the application, just takes the shot and submits.

      • nVRScreenshots_SubmitScreenshot

        public static int nVRScreenshots_SubmitScreenshot​(int screenshotHandle,
                                                          int type,
                                                          long pchSourcePreviewFilename,
                                                          long pchSourceVRFilename)
        Unsafe version of: SubmitScreenshot