Class VRScreenshots
-
Method Summary
Modifier and TypeMethodDescriptionstatic int
nVRScreenshots_GetScreenshotPropertyFilename
(int screenshotHandle, int filenameType, long pchFilename, int cchFilename, long pError) Unsafe version of:GetScreenshotPropertyFilename
static int
nVRScreenshots_GetScreenshotPropertyType
(int screenshotHandle, long pError) Unsafe version of:GetScreenshotPropertyType
static int
nVRScreenshots_HookScreenshot
(long pSupportedTypes, int numTypes) Unsafe version of:HookScreenshot
static int
nVRScreenshots_RequestScreenshot
(long pOutScreenshotHandle, int type, long pchPreviewFilename, long pchVRFilename) Unsafe version of:RequestScreenshot
static int
nVRScreenshots_SubmitScreenshot
(int screenshotHandle, int type, long pchSourcePreviewFilename, long pchSourceVRFilename) Unsafe version of:SubmitScreenshot
static int
nVRScreenshots_TakeStereoScreenshot
(long pOutScreenshotHandle, long pchPreviewFilename, long pchVRFilename) Unsafe version of:TakeStereoScreenshot
static String
VRScreenshots_GetScreenshotPropertyFilename
(int screenshotHandle, int filenameType, int cchFilename, IntBuffer pError) Get the filename for the preview or vr image (seeEScreenshotPropertyFilenames
).static int
VRScreenshots_GetScreenshotPropertyFilename
(int screenshotHandle, int filenameType, ByteBuffer pchFilename, IntBuffer pError) Get the filename for the preview or vr image (seeEScreenshotPropertyFilenames
).static int
VRScreenshots_GetScreenshotPropertyType
(int screenshotHandle, IntBuffer pError) When your application receives aVR.EVREventType_VREvent_RequestScreenshot
event, call these functions to get the details of the screenshot request.static int
VRScreenshots_HookScreenshot
(IntBuffer pSupportedTypes) Called by the running VR application to indicate that it wishes to be in charge of screenshots.static int
VRScreenshots_RequestScreenshot
(IntBuffer pOutScreenshotHandle, int type, CharSequence pchPreviewFilename, CharSequence pchVRFilename) Request a screenshot of the requested type.static int
VRScreenshots_RequestScreenshot
(IntBuffer pOutScreenshotHandle, int type, ByteBuffer pchPreviewFilename, ByteBuffer pchVRFilename) Request a screenshot of the requested type.static int
VRScreenshots_SubmitScreenshot
(int screenshotHandle, int type, CharSequence pchSourcePreviewFilename, CharSequence pchSourceVRFilename) Submit the completed screenshot.static int
VRScreenshots_SubmitScreenshot
(int screenshotHandle, int type, ByteBuffer pchSourcePreviewFilename, ByteBuffer pchSourceVRFilename) Submit the completed screenshot.static int
VRScreenshots_TakeStereoScreenshot
(IntBuffer pOutScreenshotHandle, CharSequence pchPreviewFilename, CharSequence pchVRFilename) Tells the compositor to take an internal screenshot of typeVR.EVRScreenshotType_VRScreenshotType_Stereo
.static int
VRScreenshots_TakeStereoScreenshot
(IntBuffer pOutScreenshotHandle, ByteBuffer pchPreviewFilename, ByteBuffer pchVRFilename) Tells the compositor to take an internal screenshot of typeVR.EVRScreenshotType_VRScreenshotType_Stereo
.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.
-
Method Details
-
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(IntBuffer pOutScreenshotHandle, int type, ByteBuffer pchPreviewFilename, ByteBuffer 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.- Parameters:
type
- one of:
-
VRScreenshots_RequestScreenshot
public static int VRScreenshots_RequestScreenshot(IntBuffer pOutScreenshotHandle, int type, CharSequence pchPreviewFilename, 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.- Parameters:
type
- one of:
-
nVRScreenshots_HookScreenshot
public static int nVRScreenshots_HookScreenshot(long pSupportedTypes, int numTypes) Unsafe version of:HookScreenshot
-
VRScreenshots_HookScreenshot
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 supportVR.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
When your application receives aVR.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) Unsafe version of:GetScreenshotPropertyFilename
-
VRScreenshots_GetScreenshotPropertyFilename
public static int VRScreenshots_GetScreenshotPropertyFilename(int screenshotHandle, int filenameType, @Nullable ByteBuffer pchFilename, IntBuffer pError) Get the filename for the preview or vr image (seeEScreenshotPropertyFilenames
).- Parameters:
filenameType
- one of:VR.EVRScreenshotPropertyFilenames_VRScreenshotPropertyFilenames_Preview
VR.EVRScreenshotPropertyFilenames_VRScreenshotPropertyFilenames_VR
- Returns:
- the size of the string
-
VRScreenshots_GetScreenshotPropertyFilename
public static String VRScreenshots_GetScreenshotPropertyFilename(int screenshotHandle, int filenameType, int cchFilename, IntBuffer pError) Get the filename for the preview or vr image (seeEScreenshotPropertyFilenames
).- Parameters:
filenameType
- one of:VR.EVRScreenshotPropertyFilenames_VRScreenshotPropertyFilenames_Preview
VR.EVRScreenshotPropertyFilenames_VRScreenshotPropertyFilenames_VR
- Returns:
- the size of the string
-
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(IntBuffer pOutScreenshotHandle, ByteBuffer pchPreviewFilename, ByteBuffer pchVRFilename) Tells the compositor to take an internal screenshot of typeVR.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.
-
VRScreenshots_TakeStereoScreenshot
public static int VRScreenshots_TakeStereoScreenshot(IntBuffer pOutScreenshotHandle, CharSequence pchPreviewFilename, CharSequence pchVRFilename) Tells the compositor to take an internal screenshot of typeVR.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
-
VRScreenshots_SubmitScreenshot
public static int VRScreenshots_SubmitScreenshot(int screenshotHandle, int type, ByteBuffer pchSourcePreviewFilename, ByteBuffer pchSourceVRFilename) Submit the completed screenshot.If Steam is running this will call into the Steam client and upload the screenshot to the screenshots section of the library for the running application. If Steam is not running, this function will display a notification to the user that the screenshot was taken. The paths should be full paths with extensions.
File paths should be absolute including extensions.
screenshotHandle
can beVR.k_unScreenshotHandleInvalid
if this was a new shot taking by the app to be saved and not initiated by a user (achievement earned or something).- Parameters:
type
- one of:
-
VRScreenshots_SubmitScreenshot
public static int VRScreenshots_SubmitScreenshot(int screenshotHandle, int type, CharSequence pchSourcePreviewFilename, CharSequence pchSourceVRFilename) Submit the completed screenshot.If Steam is running this will call into the Steam client and upload the screenshot to the screenshots section of the library for the running application. If Steam is not running, this function will display a notification to the user that the screenshot was taken. The paths should be full paths with extensions.
File paths should be absolute including extensions.
screenshotHandle
can beVR.k_unScreenshotHandleInvalid
if this was a new shot taking by the app to be saved and not initiated by a user (achievement earned or something).- Parameters:
type
- one of:
-