Top Description Constructors Methods
org.lwjgl.openvr

public Class VRScreenshots

extends Object
Class Inheritance
Imports
javax.annotation.*, java.nio.*, org.lwjgl.system.*

Allows the application to generate screenshots.

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
public static int
nVRScreenshots_GetScreenshotPropertyFilename(int screenshotHandle, int filenameType, long pchFilename, int cchFilename, long pError)

Unsafe version of: GetScreenshotPropertyFilename

public static int
nVRScreenshots_GetScreenshotPropertyType(int screenshotHandle, long pError)

Unsafe version of: GetScreenshotPropertyType

public static int
nVRScreenshots_HookScreenshot(long pSupportedTypes, int numTypes)

Unsafe version of: HookScreenshot

public static int
nVRScreenshots_RequestScreenshot(long pOutScreenshotHandle, int type, long pchPreviewFilename, long pchVRFilename)

Unsafe version of: RequestScreenshot

public static int
nVRScreenshots_SubmitScreenshot(int screenshotHandle, int type, long pchSourcePreviewFilename, long pchSourceVRFilename)

Unsafe version of: SubmitScreenshot

public static int
nVRScreenshots_TakeStereoScreenshot(long pOutScreenshotHandle, long pchPreviewFilename, long pchVRFilename)

Unsafe version of: TakeStereoScreenshot

public static int

Returns:

the size of the string
VRScreenshots_GetScreenshotPropertyFilename
(int screenshotHandle, int filenameType, ByteBuffer pchFilename, IntBuffer pError)

Get the filename for the preview or vr image (see EScreenshotPropertyFilenames).

public static String

Returns:

the size of the string
VRScreenshots_GetScreenshotPropertyFilename
(int screenshotHandle, int filenameType, int cchFilename, IntBuffer pError)

Get the filename for the preview or vr image (see EScreenshotPropertyFilenames).

public static int
VRScreenshots_GetScreenshotPropertyType(int screenshotHandle, IntBuffer pError)

When your application receives a VR#EVREventType_VREvent_RequestScreenshot event, call these functions to get the details of the screenshot request.

public static int
VRScreenshots_HookScreenshot(IntBuffer pSupportedTypes)

Called by the running VR application to indicate that it wishes to be in charge of screenshots.

public static int
public static int
public static int
public static int
public static int
VRScreenshots_TakeStereoScreenshot(IntBuffer pOutScreenshotHandle, ByteBuffer pchPreviewFilename, ByteBuffer pchVRFilename)

Tells the compositor to take an internal screenshot of type VR#EVRScreenshotType_VRScreenshotType_Stereo.

public static int
VRScreenshots_TakeStereoScreenshot(IntBuffer pOutScreenshotHandle, CharSequence pchPreviewFilename, CharSequence pchVRFilename)

Tells the compositor to take an internal screenshot of type VR#EVRScreenshotType_VRScreenshotType_Stereo.

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.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

VRScreenshotsback to summary
protected VRScreenshots()

Method Detail

nVRScreenshots_GetScreenshotPropertyFilenameback to summary
public static int nVRScreenshots_GetScreenshotPropertyFilename(int screenshotHandle, int filenameType, long pchFilename, int cchFilename, long pError)

Unsafe version of: GetScreenshotPropertyFilename

nVRScreenshots_GetScreenshotPropertyTypeback to summary
public static int nVRScreenshots_GetScreenshotPropertyType(int screenshotHandle, long pError)

Unsafe version of: GetScreenshotPropertyType

nVRScreenshots_HookScreenshotback to summary
public static int nVRScreenshots_HookScreenshot(long pSupportedTypes, int numTypes)

Unsafe version of: HookScreenshot

nVRScreenshots_RequestScreenshotback to summary
public static int nVRScreenshots_RequestScreenshot(long pOutScreenshotHandle, int type, long pchPreviewFilename, long pchVRFilename)

Unsafe version of: RequestScreenshot

nVRScreenshots_SubmitScreenshotback to summary
public static int nVRScreenshots_SubmitScreenshot(int screenshotHandle, int type, long pchSourcePreviewFilename, long pchSourceVRFilename)

Unsafe version of: SubmitScreenshot

nVRScreenshots_TakeStereoScreenshotback to summary
public static int nVRScreenshots_TakeStereoScreenshot(long pOutScreenshotHandle, long pchPreviewFilename, long pchVRFilename)

Unsafe version of: TakeStereoScreenshot

VRScreenshots_GetScreenshotPropertyFilenameback to summary
public static int VRScreenshots_GetScreenshotPropertyFilename(int screenshotHandle, int filenameType, ByteBuffer pchFilename, IntBuffer pError)

Get the filename for the preview or vr image (see EScreenshotPropertyFilenames).

Parameters
filenameType:int

one of:

VR#EVRScreenshotPropertyFilenames_VRScreenshotPropertyFilenames_Preview
VR#EVRScreenshotPropertyFilenames_VRScreenshotPropertyFilenames_VR
Returns:int

the size of the string

Annotations
@NativeType:uint32_t
VRScreenshots_GetScreenshotPropertyFilenameback to summary
public static String VRScreenshots_GetScreenshotPropertyFilename(int screenshotHandle, int filenameType, int cchFilename, IntBuffer pError)

Get the filename for the preview or vr image (see EScreenshotPropertyFilenames).

Parameters
filenameType:int

one of:

VR#EVRScreenshotPropertyFilenames_VRScreenshotPropertyFilenames_Preview
VR#EVRScreenshotPropertyFilenames_VRScreenshotPropertyFilenames_VR
Returns:String

the size of the string

Annotations
@NativeType:uint32_t
VRScreenshots_GetScreenshotPropertyTypeback to summary
public static int VRScreenshots_GetScreenshotPropertyType(int screenshotHandle, IntBuffer pError)

When your application receives a VR#EVREventType_VREvent_RequestScreenshot event, call these functions to get the details of the screenshot request.

Annotations
@NativeType:EVRScreenshotType
VRScreenshots_HookScreenshotback to summary
public static int VRScreenshots_HookScreenshot(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.

Annotations
@NativeType:EVRScreenshotError
VRScreenshots_RequestScreenshotback to summary
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:int

one of:

VR#EVRScreenshotType_VRScreenshotType_None
VR#EVRScreenshotType_VRScreenshotType_Mono
VR#EVRScreenshotType_VRScreenshotType_Stereo
VR#EVRScreenshotType_VRScreenshotType_Cubemap
VR#EVRScreenshotType_VRScreenshotType_MonoPanorama
VR#EVRScreenshotType_VRScreenshotType_StereoPanorama
Annotations
@NativeType:EVRScreenshotError
VRScreenshots_RequestScreenshotback to summary
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:int

one of:

VR#EVRScreenshotType_VRScreenshotType_None
VR#EVRScreenshotType_VRScreenshotType_Mono
VR#EVRScreenshotType_VRScreenshotType_Stereo
VR#EVRScreenshotType_VRScreenshotType_Cubemap
VR#EVRScreenshotType_VRScreenshotType_MonoPanorama
VR#EVRScreenshotType_VRScreenshotType_StereoPanorama
Annotations
@NativeType:EVRScreenshotError
VRScreenshots_SubmitScreenshotback to summary
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 be VR#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:int

one of:

VR#EVRScreenshotType_VRScreenshotType_None
VR#EVRScreenshotType_VRScreenshotType_Mono
VR#EVRScreenshotType_VRScreenshotType_Stereo
VR#EVRScreenshotType_VRScreenshotType_Cubemap
VR#EVRScreenshotType_VRScreenshotType_MonoPanorama
VR#EVRScreenshotType_VRScreenshotType_StereoPanorama
Annotations
@NativeType:EVRScreenshotError
VRScreenshots_SubmitScreenshotback to summary
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 be VR#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:int

one of:

VR#EVRScreenshotType_VRScreenshotType_None
VR#EVRScreenshotType_VRScreenshotType_Mono
VR#EVRScreenshotType_VRScreenshotType_Stereo
VR#EVRScreenshotType_VRScreenshotType_Cubemap
VR#EVRScreenshotType_VRScreenshotType_MonoPanorama
VR#EVRScreenshotType_VRScreenshotType_StereoPanorama
Annotations
@NativeType:EVRScreenshotError
VRScreenshots_TakeStereoScreenshotback to summary
public static int VRScreenshots_TakeStereoScreenshot(IntBuffer pOutScreenshotHandle, ByteBuffer pchPreviewFilename, ByteBuffer 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.

Annotations
@NativeType:EVRScreenshotError
VRScreenshots_TakeStereoScreenshotback to summary
public static int VRScreenshots_TakeStereoScreenshot(IntBuffer pOutScreenshotHandle, CharSequence pchPreviewFilename, 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.

Annotations
@NativeType:EVRScreenshotError
VRScreenshots_UpdateScreenshotProgressback to summary
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.

Annotations
@NativeType:EVRScreenshotError