openvr

package module
v0.4.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 17, 2017 License: BSD-2-Clause Imports: 6 Imported by: 5

README

Openvr-go v0.4.1

Openvr-go is an Go programming language wrapper for the OpenVR SDK published by Valve for VR hardware.

This package is currently synced up to v1.0.10 of OpenVR.

voxels_ss

UNDER CONSTRUCTION

At present, it is very much in an alpha stage with new development happening to complete the API exposed by the OpenVR SDK.

Requirements

The wrapper library itself doesn't have any dependencies besides Mathgl. The connectiontest sample in the examples folder also doesn't have any additional dependencies.

The other samples are graphical and use the following libraries, though they are not imported by the core openvr-go module itself:

  • GLFW (v3.1) - creating windows and providing the OpenGL context
  • Fizzle (v0.2.0) - provides the graphics engine
  • Go GL - provides the backend implementation of OpenGL for Fizzle.

Note: At present, some examples might required the development branch of Fizzle. You'll have to manually git checkout the development branch to compile these.

Installation

The dependency Go libraries for graphical examples can be installed with the following commands.

go get github.com/go-gl/glfw/v3.1/glfw
go get github.com/go-gl/mathgl/mgl32
go get github.com/go-gl/gl/v3.3-core/gl
go get github.com/tbogdala/fizzle

This does assume that you have the native GLFW 3.1 library installed already accessible to Go tools.

Additionally, the appropriate openvr_api.dll or libopenvr_api.so file from vendor/openvr/bin/<platform> will either need to be copied into each example directory being built or it will need to be accessible system wide.

Each sample can be built by going to that directory in a shell and executing a go build command. For example:

cd $GOPATH/src/github.com/tbogdala/openvr-go/examples/basiccube
go build
cp ../../vendor/openvr/bin/win64/openvr_api.dll .
./basiccube.exe

Current Features

Partial implementation of the following interfaces:

  • IVRSystem
  • IVRCompositor
  • IVRRenderModels

Implementation Notes

Some minor patches have been applied to the vendored openvr library version to better support linux.

LICENSE

Original source code in openvr-go is released under the BSD license. See the LICENSE file for more details.

Projects in the vendor folder may have their own LICENSE file.

The MTCORE32px texture pack files in examples/voxels/assets/textures are licensed CC BY-SA 3.0 by celeron55, Perttu Ahola. https://github.com/Napiophelios/MTCORE32px

Documentation

Index

Constants

View Source
const (
	DriverNone                                  = uint(4294967295)
	MaxDriverDebugResponseSize                  = uint(32768)
	TrackedDeviceIndexHmd                       = uint(0)
	MaxTrackedDeviceCount                       = uint(16)
	TrackedDeviceIndexOther                     = uint(4294967294)
	TrackedDeviceIndexInvalid                   = uint(4294967295)
	InvalidPropertyContainer                    = uint(0)
	InvalidPropertyTag                          = uint(0)
	FloatPropertyTag                            = uint(1)
	Int32PropertyTag                            = uint(2)
	Uint64PropertyTag                           = uint(3)
	BoolPropertyTag                             = uint(4)
	StringPropertyTag                           = uint(5)
	HmdMatrix34PropertyTag                      = uint(20)
	HmdMatrix44PropertyTag                      = uint(21)
	HmdVector3PropertyTag                       = uint(22)
	HmdVector4PropertyTag                       = uint(23)
	HiddenAreaPropertyTag                       = uint(30)
	OpenVRInternalReservedStart                 = 1000
	OpenVRInternalReservedEnd                   = 10000
	MaxPropertyStringSize                       = uint(32768)
	ControllerStateAxisCount                    = uint(5)
	OverlayHandleInvalid                        = uint(0)
	ScreenshotHandleInvalid                     = uint(0)
	IVRSystemVersion                            = "IVRSystem_017"
	IVRExtendedDisplayVersion                   = "IVRExtendedDisplay_001"
	IVRTrackedCameraVersion                     = "IVRTrackedCamera_003"
	MaxApplicationKeyLength                     = uint(128)
	MimeTypeHomeApp                             = "vr/home"
	MimeTypeGameTheater                         = "vr/game_theater"
	IVRApplicationsVersion                      = "IVRApplications_006"
	IVRChaperoneVersion                         = "IVRChaperone_003"
	IVRChaperoneSetupVersion                    = "IVRChaperoneSetup_005"
	IVRCompositorVersion                        = "IVRCompositor_021"
	VROverlayMaxKeyLength                       = uint(128)
	VROverlayMaxNameLength                      = uint(128)
	MaxOverlayCount                             = uint(64)
	MaxOverlayIntersectionMaskPrimitivesCount   = uint(32)
	IVROverlayVersion                           = "IVROverlay_016"
	ControllerComponentGDC2015                  = "gdc2015"
	ControllerComponentBase                     = "base"
	ControllerComponentTip                      = "tip"
	ControllerComponentHandGrip                 = "handgrip"
	ControllerComponentStatus                   = "status"
	IVRRenderModelsVersion                      = "IVRRenderModels_005"
	NotificationTextMaxSize                     = uint(256)
	IVRNotificationsVersion                     = "IVRNotifications_002"
	MaxSettingsKeyLength                        = uint(128)
	IVRSettingsVersion                          = "IVRSettings_002"
	SteamVRSection                              = "steamvr"
	SteamVRRequireHmdString                     = "requireHmd"
	SteamVRForcedDriverKeyString                = "forcedDriver"
	SteamVRForcedHmdKeyString                   = "forcedHmd"
	SteamVRDisplayDebugBool                     = "displayDebug"
	SteamVRDebugProcessPipeString               = "debugProcessPipe"
	SteamVREnableDistortionBool                 = "enableDistortion"
	SteamVRDisplayDebugXInt32                   = "displayDebugX"
	SteamVRDisplayDebugYInt32                   = "displayDebugY"
	SteamVRSendSystemButtonToAllAppsBool        = "sendSystemButtonToAllApps"
	SteamVRLogLevelInt32                        = "loglevel"
	SteamVRIPDFloat                             = "ipd"
	SteamVRBackgroundString                     = "background"
	SteamVRBackgroundUseDomeProjectionBool      = "backgroundUseDomeProjection"
	SteamVRBackgroundCameraHeightFloat          = "backgroundCameraHeight"
	SteamVRBackgroundDomeRadiusFloat            = "backgroundDomeRadius"
	SteamVRGridColorString                      = "gridColor"
	SteamVRPlayAreaColorString                  = "playAreaColor"
	SteamVRShowStageBool                        = "showStage"
	SteamVRActivateMultipleDriversBool          = "activateMultipleDrivers"
	SteamVRDirectModeBool                       = "directMode"
	SteamVRDirectModeEdidVidInt32               = "directModeEdidVid"
	SteamVRDirectModeEdidPidInt32               = "directModeEdidPid"
	SteamVRUsingSpeakersBool                    = "usingSpeakers"
	SteamVRSpeakersForwardYawOffsetDegreesFloat = "speakersForwardYawOffsetDegrees"
	SteamVRBaseStationPowerManagementBool       = "basestationPowerManagement"
	SteamVRNeverKillProcessesBool               = "neverKillProcesses"
	SteamVRSupersampleScaleFloat                = "supersampleScale"
	SteamVRRenderTargetMultiplierFloat          = "renderTargetMultiplier"
	SteamVRAllowAsyncReprojectionBool           = "allowAsyncReprojection"
	SteamVRAllowReprojectionBool                = "allowInterleavedReprojection"
	SteamVRForceReprojectionBool                = "forceReprojection"
	SteamVRForceFadeOnBadTrackingBool           = "forceFadeOnBadTracking"
	SteamVRDefaultMirrorViewInt32               = "defaultMirrorView"
	SteamVRShowMirrorViewBool                   = "showMirrorView"
	SteamVRMirrorViewGeometryString             = "mirrorViewGeometry"
	SteamVRStartMonitorFromAppLaunch            = "startMonitorFromAppLaunch"
	SteamVRStartCompositorFromAppLaunchBool     = "startCompositorFromAppLaunch"
	SteamVRStartDashboardFromAppLaunchBool      = "startDashboardFromAppLaunch"
	SteamVRStartOverlayAppsFromDashboardBool    = "startOverlayAppsFromDashboard"
	SteamVREnableHomeApp                        = "enableHomeApp"
	SteamVRSetInitialDefaultHomeApp             = "setInitialDefaultHomeApp"
	SteamVRCycleBackgroundImageTimeSecInt32     = "CycleBackgroundImageTimeSec"
	SteamVRRetailDemoBool                       = "retailDemo"
	SteamVRIpdOffsetFloat                       = "ipdOffset"
	SteamVRAllowSupersampleFilteringBool        = "allowSupersampleFiltering"
	SteamVREnableLinuxVulkanAsyncBool           = "enableLinuxVulkanAsync"
	LighthouseSection                           = "driver_lighthouse"
	LighthouseDisableIMUBool                    = "disableimu"
	LighthouseUseDisambiguationString           = "usedisambiguation"
	LighthouseDisambiguationDebugInt32          = "disambiguationdebug"
	LighthousePrimaryBasestationInt32           = "primarybasestation"
	LighthouseDBHistoryBool                     = "dbhistory"
	NullSection                                 = "driver_null"
	NullEnableNullDriverBool                    = "enable"
	NullSerialNumberString                      = "serialNumber"
	NullModelNumberString                       = "modelNumber"
	NullWindowXInt32                            = "windowX"
	NullWindowYInt32                            = "windowY"
	NullWindowWidthInt32                        = "windowWidth"
	NullWindowHeightInt32                       = "windowHeight"
	NullRenderWidthInt32                        = "renderWidth"
	NullRenderHeightInt32                       = "renderHeight"
	NullSecondsFromVsyncToPhotonsFloat          = "secondsFromVsyncToPhotons"
	NullDisplayFrequencyFloat                   = "displayFrequency"
	UserInterfaceSection                        = "userinterface"
	UserInterfaceStatusAlwaysOnTopBool          = "StatusAlwaysOnTop"
	UserInterfaceMinimizeToTrayBool             = "MinimizeToTray"
	UserInterfaceScreenshotsBool                = "screenshots"
	UserInterfaceScreenshotTypeInt              = "screenshotType"
	NotificationsSection                        = "notifications"
	NotificationsDoNotDisturbBool               = "DoNotDisturb"
	KeyboardSection                             = "keyboard"
	KeyboardTutorialCompletions                 = "TutorialCompletions"
	KeyboardScaleX                              = "ScaleX"
	KeyboardScaleY                              = "ScaleY"
	KeyboardOffsetLeftX                         = "OffsetLeftX"
	KeyboardOffsetRightX                        = "OffsetRightX"
	KeyboardOffsetY                             = "OffsetY"
	KeyboardSmoothing                           = "Smoothing"
	PerfSection                                 = "perfcheck"
	PerfHeuristicActiveBool                     = "heuristicActive"
	PerfNotifyInHMDBool                         = "warnInHMD"
	PerfNotifyOnlyOnceBool                      = "warnOnlyOnce"
	PerfAllowTimingStoreBool                    = "allowTimingStore"
	PerfSaveTimingsOnExitBool                   = "saveTimingsOnExit"
	PerfTestDataFloat                           = "perfTestData"
	PerfLinuxGPUProfilingBool                   = "linuxGPUProfiling"
	CollisionBoundsSection                      = "collisionBounds"
	CollisionBoundsStyleInt32                   = "CollisionBoundsStyle"
	CollisionBoundsGroundPerimeterOnBool        = "CollisionBoundsGroundPerimeterOn"
	CollisionBoundsCenterMarkerOnBool           = "CollisionBoundsCenterMarkerOn"
	CollisionBoundsPlaySpaceOnBool              = "CollisionBoundsPlaySpaceOn"
	CollisionBoundsFadeDistanceFloat            = "CollisionBoundsFadeDistance"
	CollisionBoundsColorGammaRInt32             = "CollisionBoundsColorGammaR"
	CollisionBoundsColorGammaGInt32             = "CollisionBoundsColorGammaG"
	CollisionBoundsColorGammaBInt32             = "CollisionBoundsColorGammaB"
	CollisionBoundsColorGammaAInt32             = "CollisionBoundsColorGammaA"
	CameraSection                               = "camera"
	CameraEnableCameraBool                      = "enableCamera"
	CameraEnableCameraInDashboardBool           = "enableCameraInDashboard"
	CameraEnableCameraForCollisionBoundsBool    = "enableCameraForCollisionBounds"
	CameraEnableCameraForRoomViewBool           = "enableCameraForRoomView"
	CameraBoundsColorGammaRInt32                = "cameraBoundsColorGammaR"
	CameraBoundsColorGammaGInt32                = "cameraBoundsColorGammaG"
	CameraBoundsColorGammaBInt32                = "cameraBoundsColorGammaB"
	CameraBoundsColorGammaAInt32                = "cameraBoundsColorGammaA"
	CameraBoundsStrengthInt32                   = "cameraBoundsStrength"
	AudioSection                                = "audio"
	AudioOnPlaybackDeviceString                 = "onPlaybackDevice"
	AudioOnRecordDeviceString                   = "onRecordDevice"
	AudioOnPlaybackMirrorDeviceString           = "onPlaybackMirrorDevice"
	AudioOffPlaybackDeviceString                = "offPlaybackDevice"
	AudioOffRecordDeviceString                  = "offRecordDevice"
	AudioVIVEHDMIGain                           = "viveHDMIGain"
	PowerSection                                = "power"
	PowerPowerOffOnExitBool                     = "powerOffOnExit"
	PowerTurnOffScreensTimeoutFloat             = "turnOffScreensTimeout"
	PowerTurnOffControllersTimeoutFloat         = "turnOffControllersTimeout"
	PowerReturnToWatchdogTimeoutFloat           = "returnToWatchdogTimeout"
	PowerAutoLaunchSteamVROnButtonPress         = "autoLaunchSteamVROnButtonPress"
	PauseCompositorOnStandbyBool                = "pauseCompositorOnStandby"
	PowerPauseCompositorOnStandbyBool           = "pauseCompositorOnStandby"
	DashboardSection                            = "dashboard"
	DashboardEnableDashboardBool                = "enableDashboard"
	DashboardArcadeModeBool                     = "arcadeMode"
	ModelskinSection                            = "modelskins"
	DriverEnableBool                            = "enable"
	IVRScreenshotsVersion                       = "IVRScreenshots_001"
	IVRResourcesVersion                         = "IVRResources_001"
	IVRDriverManagerVersion                     = "IVRDriverManager_001"
)

OpenVR Constants

View Source
const (
	EyeLeft  = 0
	EyeRight = 1
)

EVREye

View Source
const (
	TextureTypeDirectX   = 0
	TextureTypeOpenGL    = 1
	TextureTypeVulkan    = 2
	TextureTypeIOSurface = 3
	TextureTypeDirectX12 = 4
)

ETextureType

View Source
const (
	ColorSpaceAuto   = 0
	ColorSpaceGamma  = 1
	ColorSpaceLinear = 2
)

EColorSpace

View Source
const (
	TrackingResultUninitialized         = 1
	TrackingResultCalibratingInProgress = 100
	TrackingResultCalibratingOutOfRange = 101
	TrackingResultRunningOK             = 200
	TrackingResultRunningOutOfRange     = 201
)

ETrackingResult

View Source
const (
	TrackedDeviceClassInvalid           = 0
	TrackedDeviceClassHMD               = 1
	TrackedDeviceClassController        = 2
	TrackedDeviceClassGenericTracker    = 3
	TrackedDeviceClassTrackingReference = 4
	TrackedDeviceClassDisplayRedirect   = 5
)

ETrackedDeviceClass

View Source
const (
	TrackedControllerRoleInvalid   = 0
	TrackedControllerRoleLeftHand  = 1
	TrackedControllerRoleRightHand = 2
)

ETrackedControllerRole

View Source
const (
	TrackingUniverseSeated             = 0
	TrackingUniverseStanding           = 1
	TrackingUniverseRawAndUncalibrated = 2
)

ETrackingUniverseOrigin

View Source
const (
	PropInvalid                                     = 0
	PropTrackingSystemNameString                    = 1000
	PropModelNumberString                           = 1001
	PropSerialNumberString                          = 1002
	PropRenderModelNameString                       = 1003
	PropWillDriftInYawBool                          = 1004
	PropManufacturerNameString                      = 1005
	PropTrackingFirmwareVersionString               = 1006
	PropHardwareRevisionString                      = 1007
	PropAllWirelessDongleDescriptionsString         = 1008
	PropConnectedWirelessDongleString               = 1009
	PropDeviceIsWirelessBool                        = 1010
	PropDeviceIsChargingBool                        = 1011
	PropDeviceBatteryPercentageFloat                = 1012
	PropStatusDisplayTransformMatrix34              = 1013
	PropFirmwareUpdateAvailableBool                 = 1014
	PropFirmwareManualUpdateBool                    = 1015
	PropFirmwareManualUpdateURLString               = 1016
	PropHardwareRevisionUint64                      = 1017
	PropFirmwareVersionUint64                       = 1018
	PropFPGAVersionUint64                           = 1019
	PropVRCVersionUint64                            = 1020
	PropRadioVersionUint64                          = 1021
	PropDongleVersionUint64                         = 1022
	PropBlockServerShutdownBool                     = 1023
	PropCanUnifyCoordinateSystemWithHmdBool         = 1024
	PropContainsProximitySensorBool                 = 1025
	PropDeviceProvidesBatteryStatusBool             = 1026
	PropDeviceCanPowerOffBool                       = 1027
	PropFirmwareProgrammingTargetString             = 1028
	PropDeviceClassInt32                            = 1029
	PropHasCameraBool                               = 1030
	PropDriverVersionString                         = 1031
	PropFirmwareForceUpdateRequiredBool             = 1032
	PropViveSystemButtonFixRequiredBool             = 1033
	PropParentDriveUint64                           = 1034
	PropResourceRootString                          = 1035
	PropReportsTimeSinceVSyncBool                   = 2000
	PropSecondsFromVsyncToPhotonsFloat              = 2001
	PropDisplayFrequencyFloat                       = 2002
	PropUserIpdMetersFloat                          = 2003
	PropCurrentUniverseIdUint64                     = 2004
	PropPreviousUniverseIdUint64                    = 2005
	PropDisplayFirmwareVersionUint64                = 2006
	PropIsOnDesktopBool                             = 2007
	PropDisplayMCTypeInt32                          = 2008
	PropDisplayMCOffsetFloat                        = 2009
	PropDisplayMCScaleFloat                         = 2010
	PropEdidVendorIDInt32                           = 2011
	PropDisplayMCImageLeftString                    = 2012
	PropDisplayMCImageRightString                   = 2013
	PropDisplayGCBlackClampFloat                    = 2014
	PropEdidProductIDInt32                          = 2015
	PropCameraToHeadTransformMatrix34               = 2016
	PropDisplayGCTypeInt32                          = 2017
	PropDisplayGCOffsetFloat                        = 2018
	PropDisplayGCScaleFloat                         = 2019
	PropDisplayGCPrescaleFloat                      = 2020
	PropDisplayGCImageString                        = 2021
	PropLensCenterLeftUFloat                        = 2022
	PropLensCenterLeftVFloat                        = 2023
	PropLensCenterRightUFloat                       = 2024
	PropLensCenterRightVFloat                       = 2025
	PropUserHeadToEyeDepthMetersFloat               = 2026
	PropCameraFirmwareVersionUint64                 = 2027
	PropCameraFirmwareDescriptionString             = 2028
	PropDisplayFPGAVersionUint64                    = 2029
	PropDisplayBootloaderVersionUint64              = 2030
	PropDisplayHardwareVersionUint64                = 2031
	PropAudioFirmwareVersionUint64                  = 2032
	PropCameraCompatibilityModeInt32                = 2033
	PropScreenshotHorizontalFieldOfViewDegreesFloat = 2034
	PropScreenshotVerticalFieldOfViewDegreesFloat   = 2035
	PropDisplaySuppressedBool                       = 2036
	PropDisplayAllowNightModeBool                   = 2037
	PropAttachedDeviceIdString                      = 3000
	PropDisplayMCImageWidthInt32                    = 2038
	PropDisplayMCImageHeightInt32                   = 2039
	PropDisplayMCImageNumChannelsInt32              = 2040
	PropDisplayMCImageDataBinary                    = 2041
	PropSecondsFromPhotonsToVblankFloat             = 2042
	PropDriverDirectModeSendsVsyncEventsBool        = 2043
	PropDisplayDebugModeBool                        = 2044
	PropGraphicsAdapterLuidUint64                   = 2045
	PropDriverProvidedChaperonePathString           = 2048
	PropSupportedButtonsUint64                      = 3001
	PropAxis0TypeInt32                              = 3002
	PropAxis1TypeInt32                              = 3003
	PropAxis2TypeInt32                              = 3004
	PropAxis3TypeInt32                              = 3005
	PropAxis4TypeInt32                              = 3006
	PropControllerRoleHintInt32                     = 3007
	PropFieldOfViewLeftDegreesFloat                 = 4000
	PropFieldOfViewRightDegreesFloat                = 4001
	PropFieldOfViewTopDegreesFloat                  = 4002
	PropFieldOfViewBottomDegreesFloat               = 4003
	PropTrackingRangeMinimumMetersFloat             = 4004
	PropTrackingRangeMaximumMetersFloat             = 4005
	PropModeLabelString                             = 4006
	PropIconPathNameString                          = 5000
	PropNamedIconPathDeviceOffString                = 5001
	PropNamedIconPathDeviceSearchingString          = 5002
	PropNamedIconPathDeviceSearchingAlertString     = 5003
	PropNamedIconPathDeviceReadyString              = 5004
	PropNamedIconPathDeviceReadyAlertString         = 5005
	PropNamedIconPathDeviceNotReadyString           = 5006
	PropNamedIconPathDeviceStandbyString            = 5007
	PropNamedIconPathDeviceAlertLowString           = 5008
	PropDisplayHiddenAreaBinaryStart                = 5100
	PropDisplayHiddenAreaBinaryEnd                  = 5150
	PropUserConfigPathString                        = 6000
	PropInstallPathString                           = 6001
	PropHasDisplayComponentBool                     = 6002
	PropHasControllerComponentBool                  = 6003
	PropHasCameraComponentBool                      = 6004
	PropHasDriverDirectModeComponentBool            = 6005
	PropHasVirtualDisplayComponentBool              = 6006
	PropVendorSpecificReservedStart                 = 10000
	PropVendorSpecificReservedEnd                   = 10999
)

ETrackedDeviceProperty

View Source
const (
	TrackedPropSuccess                    = 0
	TrackedPropWrongDataType              = 1
	TrackedPropWrongDeviceClass           = 2
	TrackedPropBufferTooSmall             = 3
	TrackedPropUnknownProperty            = 4
	TrackedPropInvalidDevice              = 5
	TrackedPropCouldNotContactServer      = 6
	TrackedPropValueNotProvidedByDevice   = 7
	TrackedPropStringExceedsMaximumLength = 8
	TrackedPropNotYetAvailable            = 9
	TrackedPropPermissionDenied           = 10
	TrackedPropInvalidOperation           = 11
)

ETrackedPropertyError

View Source
const (
	SubmitDefault                      = 0
	SubmitLensDistortionAlreadyApplied = 1
	SubmitGlRenderBuffer               = 2
	SubmitReserved                     = 4
	SubmitTextureWithPose              = 8
)

EVRSubmitFlags

View Source
const (
	VRStateUndefined      = -1
	VRStateOff            = 0
	VRStateSearching      = 1
	VRStateSearchingAlert = 2
	VRStateReady          = 3
	VRStateReadyAlert     = 4
	VRStateNotReady       = 5
	VRStateStandby        = 6
	VRStateReadyAlertLow  = 7
)

EVRState

View Source
const (
	VREventNone                                      = 0
	VREventTrackedDeviceActivated                    = 100
	VREventTrackedDeviceDeactivated                  = 101
	VREventTrackedDeviceUpdated                      = 102
	VREventTrackedDeviceUserInteractionStarted       = 103
	VREventTrackedDeviceUserInteractionEnded         = 104
	VREventIpdChanged                                = 105
	VREventEnterStandbyMode                          = 106
	VREventLeaveStandbyMode                          = 107
	VREventTrackedDeviceRoleChanged                  = 108
	VREventWatchdogWakeUpRequested                   = 109
	VREventLensDistortionChanged                     = 110
	VREventPropertyChanged                           = 111
	VREventWirelessDisconnect                        = 112
	VREventWirelessReconnect                         = 113
	VREventButtonPress                               = 200
	VREventButtonUnpress                             = 201
	VREventButtonTouch                               = 202
	VREventButtonUntouch                             = 203
	VREventMouseMove                                 = 300
	VREventMouseButtonDown                           = 301
	VREventMouseButtonUp                             = 302
	VREventFocusEnter                                = 303
	VREventFocusLeave                                = 304
	VREventScroll                                    = 305
	VREventTouchPadMove                              = 306
	VREventOverlayFocusChanged                       = 307
	VREventInputFocusCaptured                        = 400
	VREventInputFocusReleased                        = 401
	VREventSceneFocusLost                            = 402
	VREventSceneFocusGained                          = 403
	VREventSceneApplicationChanged                   = 404
	VREventSceneFocusChanged                         = 405
	VREventInputFocusChanged                         = 406
	VREventSceneApplicationSecondaryRenderingStarted = 407
	VREventHideRenderModels                          = 410
	VREventShowRenderModels                          = 411
	VREventOverlayShown                              = 500
	VREventOverlayHidden                             = 501
	VREventDashboardActivated                        = 502
	VREventDashboardDeactivated                      = 503
	VREventDashboardThumbSelected                    = 504
	VREventDashboardRequested                        = 505
	VREventResetDashboard                            = 506
	VREventRenderToast                               = 507
	VREventImageLoaded                               = 508
	VREventShowKeyboard                              = 509
	VREventHideKeyboard                              = 510
	VREventOverlayGamepadFocusGained                 = 511
	VREventOverlayGamepadFocusLost                   = 512
	VREventOverlaySharedTextureChanged               = 513
	VREventDashboardGuideButtonDown                  = 514
	VREventDashboardGuideButtonUp                    = 515
	VREventScreenshotTriggered                       = 516
	VREventImageFailed                               = 517
	VREventDashboardOverlayCreated                   = 518
	VREventRequestScreenshot                         = 520
	VREventScreenshotTaken                           = 521
	VREventScreenshotFailed                          = 522
	VREventSubmitScreenshotToDashboard               = 523
	VREventScreenshotProgressToDashboard             = 524
	VREventPrimaryDashboardDeviceChanged             = 525
	VREventNotificationShown                         = 600
	VREventNotificationHidden                        = 601
	VREventNotificationBeginInteraction              = 602
	VREventNotificationDestroyed                     = 603
	VREventQuit                                      = 700
	VREventProcessQuit                               = 701
	VREventQuitAbortedUserPrompt                     = 702
	VREventQuitAcknowledged                          = 703
	VREventDriverRequestedQuit                       = 704
	VREventChaperoneDataHasChanged                   = 800
	VREventChaperoneUniverseHasChanged               = 801
	VREventChaperoneTempDataHasChanged               = 802
	VREventChaperoneSettingsHaveChanged              = 803
	VREventSeatedZeroPoseReset                       = 804
	VREventAudioSettingsHaveChanged                  = 820
	VREventBackgroundSettingHasChanged               = 850
	VREventCameraSettingsHaveChanged                 = 851
	VREventReprojectionSettingHasChanged             = 852
	VREventModelSkinSettingsHaveChanged              = 853
	VREventEnvironmentSettingsHaveChanged            = 854
	VREventPowerSettingsHaveChanged                  = 855
	VREventEnableHomeAppSettingsHaveChanged          = 856
	VREventStatusUpdate                              = 900
	VREventMCImageUpdated                            = 1000
	VREventFirmwareUpdateStarted                     = 1100
	VREventFirmwareUpdateFinished                    = 1101
	VREventKeyboardClosed                            = 1200
	VREventKeyboardCharInput                         = 1201
	VREventKeyboardDone                              = 1202
	VREventApplicationTransitionStarted              = 1300
	VREventApplicationTransitionAborted              = 1301
	VREventApplicationTransitionNewAppStarted        = 1302
	VREventApplicationListUpdated                    = 1303
	VREventApplicationMimeTypeLoad                   = 1304
	VREventApplicationTransitionNewAppLaunchComplete = 1305
	VREventProcessConnected                          = 1306
	VREventProcessDisconnected                       = 1307
	VREventCompositorMirrorWindowShown               = 1400
	VREventCompositorMirrorWindowHidden              = 1401
	VREventCompositorChaperoneBoundsShown            = 1410
	VREventCompositorChaperoneBoundsHidden           = 1411
	VREventTrackedCameraStartVideoStream             = 1500
	VREventTrackedCameraStopVideoStream              = 1501
	VREventTrackedCameraPauseVideoStream             = 1502
	VREventTrackedCameraResumeVideoStream            = 1503
	VREventTrackedCameraEditingSurface               = 1550
	VREventPerformanceTestEnableCapture              = 1600
	VREventPerformanceTestDisableCapture             = 1601
	VREventPerformanceTestFidelityLevel              = 1602
	VREventMessageOverlayClosed                      = 1650
	VREventMessageOverlayCloseRequested              = 1651
	VREventVendorSpecificReservedStart               = 10000
	VREventVendorSpecificReservedEnd                 = 19999
)

EVREventType

View Source
const (
	DeviceActivityLevelUnknown                = -1
	DeviceActivityLevelIdle                   = 0
	DeviceActivityLevelUserInteraction        = 1
	DeviceActivityLevelUserInteractionTimeout = 2
	DeviceActivityLevelStandby                = 3
)

EDeviceActivityLevel

View Source
const (
	ButtonSystem          = 0
	ButtonApplicationMenu = 1
	ButtonGrip            = 2
	ButtonDPadLeft        = 3
	ButtonDPadUp          = 4
	ButtonDPadRight       = 5
	ButtonDPadDown        = 6
	ButtonA               = 7
	ButtonProximitySensor = 31
	ButtonAxis0           = 32
	ButtonAxis1           = 33
	ButtonAxis2           = 34
	ButtonAxis3           = 35
	ButtonAxis4           = 36
	ButtonSteamVRTouchpad = 32
	ButtonSteamVRTrigger  = 33
	ButtonDashboardBack   = 2
	ButtonMax             = 64
)

EVRButtonId

View Source
const (
	VRMouseButtonLeft   = 1
	VRMouseButtonRight  = 2
	VRMouseButtonMiddle = 4
)

EVRMouseButton

View Source
const (
	HiddenAreaMeshStandard = 0
	HiddenAreaMeshInverse  = 1
	HiddenAreaMeshLineLoop = 2
	HiddenAreaMeshMax      = 3
)

EHiddenAreaMeshType

View Source
const (
	VRControllerAxisNone     = 0
	VRControllerAxisTrackPad = 1
	VRControllerAxisJoystick = 2
	VRControllerAxisTrigger  = 3
)

EVRControllerAxisType

View Source
const (
	VRControllerEventOutputOSEvents = 0
	VRControllerEventOutputVREvents = 1
)

EVRControllerEventOutputType

View Source
const (
	CollisionBoundsStyleBeginner     = 0
	CollisionBoundsStyleIntermediate = 1
	CollisionBoundsStyleSquares      = 2
	CollisionBoundsStyleAdvanced     = 3
	CollisionBoundsStyleNone         = 4
	CollisionBoundsStyleCount        = 5
)

ECollisionBoundsStyle

View Source
const (
	VROverlayErrorNone                     = 0
	VROverlayErrorUnknownOverlay           = 10
	VROverlayErrorInvalidHandle            = 11
	VROverlayErrorPermissionDenied         = 12
	VROverlayErrorOverlayLimitExceeded     = 13
	VROverlayErrorWrongVisibilityType      = 14
	VROverlayErrorKeyTooLong               = 15
	VROverlayErrorNameTooLong              = 16
	VROverlayErrorKeyInUse                 = 17
	VROverlayErrorWrongTransformType       = 18
	VROverlayErrorInvalidTrackedDevice     = 19
	VROverlayErrorInvalidParameter         = 20
	VROverlayErrorThumbnailCantBeDestroyed = 21
	VROverlayErrorArrayTooSmall            = 22
	VROverlayErrorRequestFailed            = 23
	VROverlayErrorInvalidTexture           = 24
	VROverlayErrorUnableToLoadFile         = 25
	VROVerlayErrorKeyboardAlreadyInUse     = 26
	VROverlayErrorNoNeighbor               = 27
	VROverlayErrorTooManyMaskPrimitives    = 29
	VROverlayErrorBadMaskPrimitive         = 30
)

EVROverlayError

View Source
const (
	VRApplicationOther         = 0
	VRApplicationScene         = 1
	VRApplicationOverlay       = 2
	VRApplicationBackground    = 3
	VRApplicationUtility       = 4
	VRApplicationVRMonitor     = 5
	VRApplicationSteamWatchdog = 6
	VRApplicationBootstrapper  = 7
	VRApplicationMax           = 8
)

EVRApplicationType

View Source
const (
	VRFirmwareErrorNone    = 0
	VRFirmwareErrorSuccess = 1
	VRFirmwareErrorFail    = 2
)

EVRFirmwareError

View Source
const (
	VRNotificationErrorOK                               = 0
	VRNotificationErrorInvalidNotificationId            = 100
	VRNotificationErrorNotificationQueueFull            = 101
	VRNotificationErrorInvalidOverlayHandle             = 102
	VRNotificationErrorSystemWithUserValueAlreadyExists = 103
)

EVRNotificationError

View Source
const (
	VRInitErrorNone                                             = 0
	VRInitErrorUnknown                                          = 1
	VRInitErrorInitInstallationNotFound                         = 100
	VRInitErrorInitInstallationCorrupt                          = 101
	VRInitErrorInitVRClientDLLNotFound                          = 102
	VRInitErrorInitFileNotFound                                 = 103
	VRInitErrorInitFactoryNotFound                              = 104
	VRInitErrorInitInterfaceNotFound                            = 105
	VRInitErrorInitInvalidInterface                             = 106
	VRInitErrorInitUserConfigDirectoryInvalid                   = 107
	VRInitErrorInitHmdNotFound                                  = 108
	VRInitErrorInitNotInitialized                               = 109
	VRInitErrorInitPathRegistryNotFound                         = 110
	VRInitErrorInitNoConfigPath                                 = 111
	VRInitErrorInitNoLogPath                                    = 112
	VRInitErrorInitPathRegistryNotWritable                      = 113
	VRInitErrorInitAppInfoInitFailed                            = 114
	VRInitErrorInitRetry                                        = 115
	VRInitErrorInitInitCanceledByUser                           = 116
	VRInitErrorInitAnotherAppLaunching                          = 117
	VRInitErrorInitSettingsInitFailed                           = 118
	VRInitErrorInitShuttingDown                                 = 119
	VRInitErrorInitTooManyObjects                               = 120
	VRInitErrorInitNoServerForBackgroundApp                     = 121
	VRInitErrorInitNotSupportedWithCompositor                   = 122
	VRInitErrorInitNotAvailableToUtilityApps                    = 123
	VRInitErrorInitInternal                                     = 124
	VRInitErrorInitHmdDriverIdIsNone                            = 125
	VRInitErrorInitHmdNotFoundPresenceFailed                    = 126
	VRInitErrorInitVRMonitorNotFound                            = 127
	VRInitErrorInitVRMonitorStartupFailed                       = 128
	VRInitErrorInitLowPowerWatchdogNotSupported                 = 129
	VRInitErrorInitInvalidApplicationType                       = 130
	VRInitErrorInitNotAvailableToWatchdogApps                   = 131
	VRInitErrorInitWatchdogDisabledInSettings                   = 132
	VRInitErrorInitVRDashboardNotFound                          = 133
	VRInitErrorInitVRDashboardStartupFailed                     = 134
	VRInitErrorInitVRHomeNotFound                               = 135
	VRInitErrorInitVRHomeStartupFailed                          = 136
	VRInitErrorInitRebootingBusy                                = 137
	VRInitErrorInitFirmwareUpdateBusy                           = 138
	VRInitErrorInitFirmwareRecoveryBusy                         = 139
	VRInitErrorDriverFailed                                     = 200
	VRInitErrorDriverUnknown                                    = 201
	VRInitErrorDriverHmdUnknown                                 = 202
	VRInitErrorDriverNotLoaded                                  = 203
	VRInitErrorDriverRuntimeOutOfDate                           = 204
	VRInitErrorDriverHmdInUse                                   = 205
	VRInitErrorDriverNotCalibrated                              = 206
	VRInitErrorDriverCalibrationInvalid                         = 207
	VRInitErrorDriverHmdDisplayNotFound                         = 208
	VRInitErrorDriverTrackedDeviceInterfaceUnknown              = 209
	VRInitErrorDriverHmdDriverIdOutOfBounds                     = 211
	VRInitErrorDriverHmdDisplayMirrored                         = 212
	VRInitErrorIPCServerInitFailed                              = 300
	VRInitErrorIPCConnectFailed                                 = 301
	VRInitErrorIPCSharedStateInitFailed                         = 302
	VRInitErrorIPCCompositorInitFailed                          = 303
	VRInitErrorIPCMutexInitFailed                               = 304
	VRInitErrorIPCFailed                                        = 305
	VRInitErrorIPCCompositorConnectFailed                       = 306
	VRInitErrorIPCCompositorInvalidConnectResponse              = 307
	VRInitErrorIPCConnectFailedAfterMultipleAttempts            = 308
	VRInitErrorCompositorFailed                                 = 400
	VRInitErrorCompositorD3D11HardwareRequired                  = 401
	VRInitErrorCompositorFirmwareRequiresUpdate                 = 402
	VRInitErrorCompositorOverlayInitFailed                      = 403
	VRInitErrorCompositorScreenshotsInitFailed                  = 404
	VRInitErrorCompositorUnableToCreateDevice                   = 405
	VRInitErrorVendorSpecificUnableToConnectToOculusRuntime     = 1000
	VRInitErrorVendorSpecificHmdFoundCantOpenDevice             = 1101
	VRInitErrorVendorSpecificHmdFoundUnableToRequestConfigStart = 1102
	VRInitErrorVendorSpecificHmdFoundNoStoredConfig             = 1103
	VRInitErrorVendorSpecificHmdFoundConfigTooBig               = 1104
	VRInitErrorVendorSpecificHmdFoundConfigTooSmall             = 1105
	VRInitErrorVendorSpecificHmdFoundUnableToInitZLib           = 1106
	VRInitErrorVendorSpecificHmdFoundCantReadFirmwareVersion    = 1107
	VRInitErrorVendorSpecificHmdFoundUnableToSendUserDataStart  = 1108
	VRInitErrorVendorSpecificHmdFoundUnableToGetUserDataStart   = 1109
	VRInitErrorVendorSpecificHmdFoundUnableToGetUserDataNext    = 1110
	VRInitErrorVendorSpecificHmdFoundUserDataAddressRange       = 1111
	VRInitErrorVendorSpecificHmdFoundUserDataError              = 1112
	VRInitErrorVendorSpecificHmdFoundConfigFailedSanityCheck    = 1113
	VRInitErrorSteamSteamInstallationNotFound                   = 2000
)

EVRInitError

View Source
const (
	VRScreenshotTypeNone           = 0
	VRScreenshotTypeMono           = 1
	VRScreenshotTypeStereo         = 2
	VRScreenshotTypeCubemap        = 3
	VRScreenshotTypeMonoPanorama   = 4
	VRScreenshotTypeStereoPanorama = 5
)

EVRScreenshotType

View Source
const (
	VRScreenshotPropertyFilenamesPreview = 0
	VRScreenshotPropertyFilenamesVR      = 1
)

EVRScreenshotPropertyFilenames

View Source
const (
	VRTrackedCameraErrorNone                       = 0
	VRTrackedCameraErrorOperationFailed            = 100
	VRTrackedCameraErrorInvalidHandle              = 101
	VRTrackedCameraErrorInvalidFrameHeaderVersion  = 102
	VRTrackedCameraErrorOutOfHandles               = 103
	VRTrackedCameraErrorIPCFailure                 = 104
	VRTrackedCameraErrorNotSupportedForThisDevice  = 105
	VRTrackedCameraErrorSharedMemoryFailure        = 106
	VRTrackedCameraErrorFrameBufferingFailure      = 107
	VRTrackedCameraErrorStreamSetupFailure         = 108
	VRTrackedCameraErrorInvalidGLTextureId         = 109
	VRTrackedCameraErrorInvalidSharedTextureHandle = 110
	VRTrackedCameraErrorFailedToGetGLTextureId     = 111
	VRTrackedCameraErrorSharedTextureFailure       = 112
	VRTrackedCameraErrorNoFrameAvailable           = 113
	VRTrackedCameraErrorInvalidArgument            = 114
	VRTrackedCameraErrorInvalidFrameBufferSize     = 115
)

EVRTrackedCameraError

View Source
const (
	VRTrackedCameraFrameTypeDistorted          = 0
	VRTrackedCameraFrameTypeUndistorted        = 1
	VRTrackedCameraFrameTypeMaximumUndistorted = 2
	VRTrackedCameraMaxCameraFrameTypes         = 3
)

EVRTrackedCameraFrameType

View Source
const (
	VRApplicationErrorNone                       = 0
	VRApplicationErrorAppKeyAlreadyExists        = 100
	VRApplicationErrorNoManifest                 = 101
	VRApplicationErrorNoApplication              = 102
	VRApplicationErrorInvalidIndex               = 103
	VRApplicationErrorUnknownApplication         = 104
	VRApplicationErrorIPCFailed                  = 105
	VRApplicationErrorApplicationAlreadyRunning  = 106
	VRApplicationErrorInvalidManifest            = 107
	VRApplicationErrorInvalidApplication         = 108
	VRApplicationErrorLaunchFailed               = 109
	VRApplicationErrorApplicationAlreadyStarting = 110
	VRApplicationErrorLaunchInProgress           = 111
	VRApplicationErrorOldApplicationQuitting     = 112
	VRApplicationErrorTransitionAborted          = 113
	VRApplicationErrorIsTemplate                 = 114
	VRApplicationErrorSteamVRIsExiting           = 115
	VRApplicationErrorBufferTooSmall             = 200
	VRApplicationErrorPropertyNotSet             = 201
	VRApplicationErrorUnknownProperty            = 202
	VRApplicationErrorInvalidParameter           = 203
)

EVRApplicationError

View Source
const (
	VRApplicationPropertyNameString                        = 0
	VRApplicationPropertyLaunchTypeString                  = 11
	VRApplicationPropertyWorkingDirectoryString            = 12
	VRApplicationPropertyBinaryPathString                  = 13
	VRApplicationPropertyArgumentsString                   = 14
	VRApplicationPropertyURLString                         = 15
	VRApplicationPropertyDescriptionString                 = 50
	VRApplicationPropertyNewsURLString                     = 51
	VRApplicationPropertyImagePathString                   = 52
	VRApplicationPropertySourceString                      = 53
	VRApplicationPropertyIsDashboardOverlayBool            = 60
	VRApplicationPropertyIsTemplateBool                    = 61
	VRApplicationPropertyIsInstancedBool                   = 62
	VRApplicationPropertyIsInternalBool                    = 63
	VRApplicationPropertyWantsCompositorPauseInStandbyBool = 64
	VRApplicationPropertyLastLaunchTimeUint64              = 70
)

EVRApplicationProperty

View Source
const (
	VRApplicationTransitionNone                     = 0
	VRApplicationTransitionOldAppQuitSent           = 10
	VRApplicationTransitionWaitingForExternalLaunch = 11
	VRApplicationTransitionNewAppLaunched           = 20
)

EVRApplicationTransitionState

View Source
const (
	ChaperoneCalibrationStateOK                             = 1
	ChaperoneCalibrationStateWarning                        = 100
	ChaperoneCalibrationStateWarningBaseStationMayHaveMoved = 101
	ChaperoneCalibrationStateWarningBaseStationRemoved      = 102
	ChaperoneCalibrationStateWarningSeatedBoundsInvalid     = 103
	ChaperoneCalibrationStateError                          = 200
	ChaperoneCalibrationStateErrorBaseStationUninitialized  = 201
	ChaperoneCalibrationStateErrorBaseStationConflict       = 202
	ChaperoneCalibrationStateErrorPlayAreaInvalid           = 203
	ChaperoneCalibrationStateErrorCollisionBoundsInvalid    = 204
)

ChaperoneCalibrationState

View Source
const (
	ChaperoneConfigFileLive = 1
	ChaperoneConfigFileTemp = 2
)

EChaperoneConfigFile

View Source
const (
	VRCompositorErrorNone                         = 0
	VRCompositorErrorRequestFailed                = 1
	VRCompositorErrorIncompatibleVersion          = 100
	VRCompositorErrorDoNotHaveFocus               = 101
	VRCompositorErrorInvalidTexture               = 102
	VRCompositorErrorIsNotSceneApplication        = 103
	VRCompositorErrorTextureIsOnWrongDevice       = 104
	VRCompositorErrorTextureUsesUnsupportedFormat = 105
	VRCompositorErrorSharedTexturesNotSupported   = 106
	VRCompositorErrorIndexOutOfRange              = 107
	VRCompositorErrorAlreadySubmitted             = 108
	VRCompositorErrorInvalidBounds                = 109
)

EVRCompositorError

View Source
const (
	VROverlayInputMethodNone  = 0
	VROverlayInputMethodMouse = 1
)

VROverlayInputMethod

View Source
const (
	VROverlayTransformAbsolute              = 0
	VROverlayTransformTrackedDeviceRelative = 1
	VROverlayTransformSystemOverlay         = 2
	VROverlayTransformTrackedComponent      = 3
)

VROverlayTransformType

View Source
const (
	VROverlayFlagsNone                               = 0
	VROverlayFlagsCurved                             = 1
	VROverlayFlagsRGSS4X                             = 2
	VROverlayFlagsNoDashboardTab                     = 3
	VROverlayFlagsAcceptsGamepadEvents               = 4
	VROverlayFlagsShowGamepadFocus                   = 5
	VROverlayFlagsSendVRScrollEvents                 = 6
	VROverlayFlagsSendVRTouchpadEvents               = 7
	VROverlayFlagsShowTouchPadScrollWheel            = 8
	VROverlayFlagsTransferOwnershipToInternalProcess = 9
	VROverlayFlagsSideBySideParallel                 = 10
	VROverlayFlagsSideBySideCrossed                  = 11
	VROverlayFlagsPanorama                           = 12
	VROverlayFlagsStereoPanorama                     = 13
	VROverlayFlagsSortWithNonSceneOverlays           = 14
	VROverlayFlagsVisibleInDashboard                 = 15
)

VROverlayFlags

View Source
const (
	VRMessageOverlayResponseButtonPress0                     = 0
	VRMessageOverlayResponseButtonPress1                     = 1
	VRMessageOverlayResponseButtonPress2                     = 2
	VRMessageOverlayResponseButtonPress3                     = 3
	VRMessageOverlayResponseCouldntFindSystemOverlay         = 4
	VRMessageOverlayResponseCouldntFindOrCreateClientOverlay = 5
	VRMessageOverlayResponseApplicationQuit                  = 6
)

VRMessageOverlayResponse

View Source
const (
	GamepadTextInputModeNormal   = 0
	GamepadTextInputModePassword = 1
	GamepadTextInputModeSubmit   = 2
)

EGamepadTextInputMode

View Source
const (
	GamepadTextInputLineModeSingleLine    = 0
	GamepadTextInputLineModeMultipleLines = 1
)

EGamepadTextInputLineMode

View Source
const (
	OverlayDirectionUp    = 0
	OverlayDirectionDown  = 1
	OverlayDirectionLeft  = 2
	OverlayDirectionRight = 3
	OverlayDirectionCount = 4
)

EOverlayDirection

View Source
const (
	VROverlayIntersectionMaskPrimitiveTypeRectangle = 0
	VROverlayIntersectionMaskPrimitiveTypeCircle    = 1
)

EVROverlayIntersectionMaskPrimitiveType

View Source
const (
	VRRenderModelErrorNone               = 0
	VRRenderModelErrorLoading            = 100
	VRRenderModelErrorNotSupported       = 200
	VRRenderModelErrorInvalidArg         = 300
	VRRenderModelErrorInvalidModel       = 301
	VRRenderModelErrorNoShapes           = 302
	VRRenderModelErrorMultipleShapes     = 303
	VRRenderModelErrorTooManyVertices    = 304
	VRRenderModelErrorMultipleTextures   = 305
	VRRenderModelErrorBufferTooSmall     = 306
	VRRenderModelErrorNotEnoughNormals   = 307
	VRRenderModelErrorNotEnoughTexCoords = 308
	VRRenderModelErrorInvalidTexture     = 400
)

EVRRenderModelError

View Source
const (
	VRComponentPropertyIsStatic   = 1
	VRComponentPropertyIsVisible  = 2
	VRComponentPropertyIsTouched  = 4
	VRComponentPropertyIsPressed  = 8
	VRComponentPropertyIsScrolled = 16
)

EVRComponentProperty

View Source
const (
	VRNotificationTypeTransient                    = 0
	VRNotificationTypePersistent                   = 1
	VRNotificationTypeTransientSystemWithUserValue = 2
)

EVRNotificationType

View Source
const (
	VRNotificationStyleNone            = 0
	VRNotificationStyleApplication     = 100
	VRNotificationStyleContactDisabled = 200
	VRNotificationStyleContactEnabled  = 201
	VRNotificationStyleContactActive   = 202
)

EVRNotificationStyle

View Source
const (
	VRSettingsErrorNone                     = 0
	VRSettingsErrorIPCFailed                = 1
	VRSettingsErrorWriteFailed              = 2
	VRSettingsErrorReadFailed               = 3
	VRSettingsErrorJsonParseFailed          = 4
	VRSettingsErrorUnsetSettingHasNoDefault = 5
)

EVRSettingsError

View Source
const (
	VRScreenshotErrorNone                        = 0
	VRScreenshotErrorRequestFailed               = 1
	VRScreenshotErrorIncompatibleVersion         = 100
	VRScreenshotErrorNotFound                    = 101
	VRScreenshotErrorBufferTooSmall              = 102
	VRScreenshotErrorScreenshotAlreadyInProgress = 108
)

EVRScreenshotError

View Source
const (
	ChaperoneImportBoundsOnly = 1
)

EChaperoneImportFlags

Variables

View Source
var (
	// ShaderRenderModelV is the render model vertex shader
	ShaderRenderModelV = `` /* 202-byte string literal not displayed */

	// ShaderRenderModelF is the render model fragment shader
	ShaderRenderModelF = `` /* 149-byte string literal not displayed */

	// ShaderLensDistortionV is the lens distortion vertex shader
	ShaderLensDistortionV = `` /* 417-byte string literal not displayed */

	// ShaderLensDistortionF is the lens distortion fragment shader
	ShaderLensDistortionF = `` /* 778-byte string literal not displayed */

)

Functions

func GetErrorAsEnglish

func GetErrorAsEnglish(e int) string

GetErrorAsEnglish takes an EVRInitError enumeration value and returns a string.

func Mat34ToMat4 added in v0.2.0

func Mat34ToMat4(vrM34 *mgl.Mat3x4) (m4 mgl.Mat4)

Mat34ToMat4 is a utility conversion function that takes a 3x4 matrix and outputs a 4x4 matrix with an identity fourth row of {0,0,0,1}.

func Shutdown

func Shutdown()

Shutdown calls the ShutdownInternal function on the VR library.

Types

type Chaperone added in v0.2.0

type Chaperone struct {
	// contains filtered or unexported fields
}

Chaperone is an interface wrapper to IVRChaperone.

func GetChaperone added in v0.2.0

func GetChaperone() (*Chaperone, error)

GetChaperone returns a new IVRChaperone interface.

func (*Chaperone) GetCalibrationState added in v0.2.0

func (chap *Chaperone) GetCalibrationState() int

GetCalibrationState returns a ChaperoneCalibrationState enumeration value indicating the current calibration state. Note: Tis can change at any time during a session.

func (*Chaperone) GetPlayAreaRect added in v0.2.0

func (chap *Chaperone) GetPlayAreaRect() [4]mgl.Vec3

GetPlayAreaRect returns vectors for the 4 corners of the play area in a counter-clockwise order. (0,0,0) is the center of the play area. The height of every corner should be 0Y.

func (*Chaperone) GetPlayAreaSize added in v0.2.0

func (chap *Chaperone) GetPlayAreaSize() (float32, float32)

GetPlayAreaSize returns the width and depth of the play area.

type Compositor

type Compositor struct {
	// contains filtered or unexported fields
}

Compositor is an interface wrapper to IVRCompositor.

func GetCompositor

func GetCompositor() (*Compositor, error)

GetCompositor returns a new IVRCompositor interface.

func (*Compositor) GetFrameTimeRemaining added in v0.4.1

func (comp *Compositor) GetFrameTimeRemaining() float32

GetFrameTimeRemaining returns the time in seconds left in the current (as identified by FrameTiming's frameIndex) frame. Due to "running start", this value may roll over to the next frame before ever reaching 0.0.

func (*Compositor) GetFrameTiming added in v0.4.1

func (comp *Compositor) GetFrameTiming(timing *FrameTiming, framesAgo uint32) bool

GetFrameTiming teturns true if timing data is filled it. Sets oldest timing info if framesAgo is larger than the stored history.

func (*Compositor) GetRenderPose

func (comp *Compositor) GetRenderPose(i uint) (tdp TrackedDevicePose)

GetRenderPose gets the render pose for a device at the given index.

func (*Compositor) IsPoseValid

func (comp *Compositor) IsPoseValid(i uint) bool

IsPoseValid returns true if a render pose array at the given index has a valid pose.

func (*Compositor) Submit

func (comp *Compositor) Submit(eye int, texture uint32)

Submit updates scene texture to display.

func (*Compositor) WaitGetPoses

func (comp *Compositor) WaitGetPoses(getPredictions bool)

WaitGetPoses updates the internal copy of pose(s) to use to render scene (and optionally poses predicted two frames out for gameplay).

type ControllerAxis added in v0.2.0

type ControllerAxis struct {
	X float32
	Y float32
}

ControllerAxis represents the state of joystick and track pads.

type ControllerState added in v0.2.0

type ControllerState struct {
	PacketNum     uint32
	ButtonPressed uint64
	ButtonTouched uint64
	Axis          [ControllerStateAxisCount]ControllerAxis
}

ControllerState is the current state of a controller

type DistortionCoordinates

type DistortionCoordinates struct {
	Red   mgl.Vec2
	Green mgl.Vec2
	Blue  mgl.Vec2
}

DistortionCoordinates is used to return the post-distortion UVs for each color channel. UVs range from 0 to 1 with 0,0 in the upper left corner of the source render target. The 0,0 to 1,1 range covers a single eye.

type EyeTransforms added in v0.2.0

type EyeTransforms struct {
	ProjectionLeft  mgl.Mat4 // left eye projection
	ProjectionRight mgl.Mat4 // right eye projection
	PositionLeft    mgl.Mat4 // left eye offset
	PositionRight   mgl.Mat4 // right eye offset
}

EyeTransforms is a struct that contains the projection and translation matrix transforms for each eye in the HMD.

type FrameTiming added in v0.4.1

type FrameTiming struct {
	FrameIndex              uint32
	NumFramePresents        uint32
	NumMisPresented         uint32
	NumDroppedFrames        uint32
	ReprojectionFlags       uint32
	SystemTimeInSeconds     float64
	PreSubmitGpuMs          float32
	PostSubmitGpuMs         float32
	TotalRenderGpuMs        float32
	CompositorRenderGpuMs   float32
	CompositorRenderCpuMs   float32
	CompositorIdleCpuMs     float32
	ClientFrameIntervalMs   float32
	PresentCallCpuMs        float32
	WaitForPresentCpuMs     float32
	SubmitFrameMs           float32
	WaitGetPosesCalledMs    float32
	NewPosesReadyMs         float32
	NewFrameReadyMs         float32
	CompositorUpdateStartMs float32
	CompositorUpdateEndMs   float32
	CompositorRenderStartMs float32
	HmdPose                 TrackedDevicePose
}

FrameTiming provides a single frame's timing information to the app.

func (*FrameTiming) Show added in v0.4.1

func (ft *FrameTiming) Show(newlines bool) string

Show returns a formatted string with the timing information. If newlines is true, then each field will be written on its own line in the string.

type RenderModel

type RenderModel struct {
	VertexData    []float32
	Indexes       []uint32
	TriangleCount uint32

	TextureWidth  uint32
	TextureHeight uint32
	TextureBytes  []byte
}

RenderModel contains all the vertex, face index and texture data required to render an object.

type RenderModels

type RenderModels struct {
	// contains filtered or unexported fields
}

RenderModels is an interface wrapper to IVRRenderModels.

func GetRenderModels

func GetRenderModels() (*RenderModels, error)

GetRenderModels returns a new IVRRenderModels interface.

func (*RenderModels) GetComponentCount added in v0.2.0

func (rm *RenderModels) GetComponentCount(renderModelName string) uint32

GetComponentCount returns the number of components of the specified render model.

func (*RenderModels) GetComponentName added in v0.2.0

func (rm *RenderModels) GetComponentName(renderModelName string, componentIndex uint32) string

GetComponentName is used to get the names of available components of a given render model

func (*RenderModels) GetComponentRenderModelName added in v0.2.0

func (rm *RenderModels) GetComponentRenderModelName(renderModelName, componentName string) string

GetComponentRenderModelName is used to get the render model name for the specified rendermode/component combination, to be passed to LoadRenderModel.

func (*RenderModels) GetRenderModelCount added in v0.2.0

func (rm *RenderModels) GetRenderModelCount() uint32

GetRenderModelCount returns the number of available render models.

func (*RenderModels) GetRenderModelName added in v0.2.0

func (rm *RenderModels) GetRenderModelName(renderModelIndex uint32) string

GetRenderModelName is used to get the names of available render models. This will return an empty string if the index isn't valid.

func (*RenderModels) RenderModelLoad

func (rm *RenderModels) RenderModelLoad(name string) (*RenderModel, error)

RenderModelLoad syncrhonously loads the model.

type System

type System struct {
	// contains filtered or unexported fields
}

System is an interface wrapper to IVRSystem.

func Init

func Init() (*System, error)

Init initializes the internal VR api structers and on success will return a System object with a valid IVRSystem interface ptr.

func (*System) ComputeDistortion

func (sys *System) ComputeDistortion(eye int, u, v float32, dest *DistortionCoordinates) bool

ComputeDistortion gets the result of the distortion function for the specified eye and input UVs. UVs go from 0,0 in the upper left of that eye's viewport and 1,1 in the lower right of that eye's viewport. Returns true for success. Otherwise, returns false, and distortion coordinates are not suitable.

func (*System) GetControllerAxisTypeNameFromEnum added in v0.2.0

func (sys *System) GetControllerAxisTypeNameFromEnum(axisType int) string

GetControllerAxisTypeNameFromEnum returns the name of an EVRControllerAxisType enum value

func (*System) GetControllerState

func (sys *System) GetControllerState(deviceIndex int, state *ControllerState) bool

GetControllerState fills the supplied struct with the current state of the controller. Returns false if the controller index is invalid.

func (*System) GetEyeToHeadTransform

func (sys *System) GetEyeToHeadTransform(eye int, dest *mgl.Mat3x4)

GetEyeToHeadTransform returns the transform from eye space to the head space. Eye space is the per-eye flavor of head space that provides stereo disparity. Instead of Model * View * Projection the sequence is Model * View * Eye^-1 * Projection. Normally View and Eye^-1 will be multiplied together and treated as View in your application.

func (*System) GetEyeTransforms added in v0.2.0

func (sys *System) GetEyeTransforms(near, far float32) *EyeTransforms

GetEyeTransforms returns a structure containing the projection and translation matrixes for both eyes given the near/far settings passed in.

func (*System) GetInt32TrackedDeviceProperty added in v0.2.0

func (sys *System) GetInt32TrackedDeviceProperty(deviceIndex int, property int) (int32, int)

GetInt32TrackedDeviceProperty returns a int32 property. If the device index is not valid or the property is not valid it will return 0. The second int returned correspnds to the ETrackedPropertyError enumeration.

func (*System) GetProjectionMatrix

func (sys *System) GetProjectionMatrix(eye int, near, far float32, dest *mgl.Mat4)

GetProjectionMatrix returns the projection matrix for the specified eye

func (*System) GetRecommendedRenderTargetSize

func (sys *System) GetRecommendedRenderTargetSize() (uint32, uint32)

GetRecommendedRenderTargetSize returns the suggested size for the intermediate render target that the distortion pulls from.

func (*System) GetStringTrackedDeviceProperty

func (sys *System) GetStringTrackedDeviceProperty(deviceIndex int, property int) (string, int)

GetStringTrackedDeviceProperty returns a string property. If the device index is not valid or the property is not a string type this function will an empty string. The int returned correspnds to the ETrackedPropertyError enumeration.

func (*System) GetTrackedDeviceClass

func (sys *System) GetTrackedDeviceClass(deviceIndex int) int

GetTrackedDeviceClass returns the device class of a tracked device. If there has not been a device connected in this slot since the application started this function will return TrackedDevice_Invalid. For previous detected devices the function will return the previously observed device class.

To determine which devices exist on the system, just loop from 0 to k_unMaxTrackedDeviceCount and check the device class. Every device with something other than TrackedDevice_Invalid is associated with an actual tracked device.

func (*System) IsInputFocusCapturedByAnotherProcess

func (sys *System) IsInputFocusCapturedByAnotherProcess() bool

IsInputFocusCapturedByAnotherProcess returns true if input focus is captured by another process.

func (*System) IsTrackedDeviceConnected

func (sys *System) IsTrackedDeviceConnected(deviceIndex uint32) bool

IsTrackedDeviceConnected returns true if there is a device connected in this slot.

func (*System) PollNextEvent

func (sys *System) PollNextEvent(event *VREvent) bool

PollNextEvent returns true and fills the event with the next event on the queue if there is one. If there are no events this method returns false.

type TrackedDevicePose

type TrackedDevicePose struct {
	DeviceToAbsoluteTracking mgl.Mat3x4
	Velocity                 mgl.Vec3 // velocity in tracker space in m/s
	AngularVelocity          mgl.Vec3 // in radians/s
	TrackingResult           int      // ETrackingResult enum value
	PoseIsValid              bool

	// This indicates that there is a device connected for this spot in the pose array.
	// It could go from true to false if the user unplugs the device.
	DeviceIsConnected bool
}

TrackedDevicePose mirrors the OpenVR TrackedDevicePose_t structure.

type VREvent

type VREvent struct {
	EventType          uint32 // EVREventType enum
	TrackedDeviceIndex uint32
	EventAgeSeconds    float32
	// contains filtered or unexported fields
}

VREvent is an event posted by the server to all running applications

Directories

Path Synopsis
examples
util

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL