Qualcomm© Snapdragon™ VR SDK  3.0.2
sxrApi.h
Go to the documentation of this file.
1 //=============================================================================
3 //
4 // Copyright (c) 2018 QUALCOMM Technologies Inc.
5 // All Rights Reserved.
6 //
7 //==============================================================================
8 
9 #ifndef _SXR_API_H_
10 #define _SXR_API_H_
11 
12 #include <stdlib.h>
13 #include <jni.h>
14 
15 #define SXR_MAJOR_VERSION 3
16 #define SXR_MINOR_VERSION 0
17 #define SXR_REVISION_VERSION 2
18 
19 #define SXR_MAX_RENDER_LAYERS 16
20 
21 enum SxrResult
22 {
23  // Return code for success
24  SXR_ERROR_NONE = 0,
25 
26  // Return code for cases that don't fall into defined error codes
27  SXR_ERROR_UNKNOWN = 1,
28 
29  // Return code to indicate that SXR isn't supported, or the necessary functionality in the system drivers
30  // or VR service isn't supported.
31  SXR_ERROR_UNSUPPORTED,
32 
33  // Return code for calls to functions made without first calling sxrInitialize
34  SXR_ERROR_VRMODE_NOT_INITIALIZED,
35 
36  // Return code for calls made into functions that require VR mode to be in a started state
37  SXR_ERROR_VRMODE_NOT_STARTED,
38 
39  // Return code for calls made into functions that require VR mode to be in a stopped state
40  SXR_ERROR_VRMODE_NOT_STOPPED,
41 
42  // Return code for calls made into functions where the service fails or isn't accessible
43  SXR_ERROR_QVR_SERVICE_UNAVAILABLE,
44 
45  // Error for any failures in JNI/Java calls made through the API
46  SXR_ERROR_JAVA_ERROR,
47 };
48 
51 {
52  kEventNone = 0,
53  kEventSdkServiceStarting = 1,
54  kEventSdkServiceStarted = 2,
55  kEventSdkServiceStopped = 3,
56  kEventControllerConnecting = 4,
57  kEventControllerConnected = 5,
58  kEventControllerDisconnected = 6,
59  kEventThermal = 7,
60  kEventVrModeStarted = 8,
61  kEventVrModeStopping = 9,
62  kEventVrModeStopped = 10,
63  kEventSensorError = 11,
64  kEventMagnometerUncalibrated = 12,
65  kEventBoundarySystemCollision = 13,
66  kEvent6dofRelocation = 14,
67  kEvent6dofWarningFeatureCount = 15,
68  kEvent6dofWarningLowLight = 16,
69  kEvent6dofWarningBrightLight = 17,
70  kEvent6dofWarningCameraCalibration = 18
71 };
72 
73 struct ANativeWindow;
74 
76 struct sxrVector2
77 {
78  float x,y;
79 };
80 
82 struct sxrVector3
83 {
84  float x,y,z;
85 };
86 
88 struct sxrVector4
89 {
90  float x,y,z,w;
91 };
92 
95 {
96  float x, y, z, w;
97 };
98 
101 {
102  float M[4][4];
103 };
104 
107 {
108  kLeftEye = 0,
109  kRightEye,
110  kNumEyes
111 };
112 
115 {
116  kEyeMaskLeft = 0x00000001,
117  kEyeMaskRight = 0x00000002,
118  kEyeMaskBoth = 0x00000003
119 };
120 
123 {
124  kLayerFlagNone = 0x00000000,
125  kLayerFlagHeadLocked = 0x00000001,
126  kLayerFlagOpaque = 0x00000002
127 };
128 
129 enum sxrColorSpace
130 {
131  kColorSpaceLinear = 0,
132  kColorSpaceSRGB = 1,
133  kNumColorSpaces
134 };
135 
138 {
139  sxrQuaternion rotation;
140  sxrVector3 position;
141 };
142 
145 {
146  kTrackingRotation = (1 << 0),
147  kTrackingPosition = (1 << 1),
148  kTrackingEye = (1 << 2)
149 };
150 
153 {
155  int32_t poseStatus;
156  uint64_t poseTimeStampNs;
157  uint64_t poseFetchTimeNs;
159 };
160 
163 {
164  kGazePointValid = (1 << 0),
165  kGazeVectorValid = (1 << 1),
166  kEyeOpennessValid = (1 << 2),
167  kEyePupilDilationValid = (1 << 3),
168  kEyePositionGuideValid = (1 << 4)
169 };
170 
173 {
174  int64_t timestamp;
175 
179 
180  float leftEyeGazePoint[3];
181  float rightEyeGazePoint[3];
182  float combinedEyeGazePoint[3];
183 
184  float leftEyeGazeVector[3];
185  float rightEyeGazeVector[3];
186  float combinedEyeGazeVector[3];
187 
190 
193 
194  float leftEyePositionGuide[3];
195  float rightEyePositionGuide[3];
196 };
197 
201 {
206  kNumPerfLevels
207 };
208 
211 {
212  kProtectedContent = (1 << 0),
213  kMotionAwareFrames = (1 << 1)
214 };
215 
219 {
220  int32_t mainThreadId;
223  ANativeWindow* nativeWindow;
224  int32_t optionFlags;
225  sxrColorSpace colorSpace;
226 };
227 
231 {
233  kDisableReprojection = ( 1 << 1 ),
234  kEnableMotionToPhoton = ( 1 << 2 ),
236 };
237 
241 {
249 };
250 
254 {
255  uint32_t memSize;
256  uint32_t width;
257  uint32_t height;
258  uint32_t numMips;
259  uint32_t bytesPerPixel;
260  uint32_t renderSemaphore;
261 };
262 
263 
266 {
268 };
269 
273 {
274  kMeshTypeColumsLtoR = 0, // Columns Left to Right
275  kMeshTypeColumsRtoL, // Columns Right to Left
276  kMeshTypeRowsTtoB, // Rows Top to Bottom
277  kMeshTypeRowsBtoT, // Rows Bottom to Top
278 };
279 
283 {
284  kMeshEnumLeft = 0, // Column mesh for left half of screen
285  kMeshEnumRight, // Column mesh for right half of screen
286  kMeshEnumUL, // Row mesh for Upper Left part of the screen
287  kMeshEnumUR, // Row mesh for Upper Right part of the screen
288  kMeshEnumLL, // Row mesh for Lower Left part of the screen
289  kMeshEnumLR, // Row mesh for Lower Right part of the screen
290  kWarpMeshCount
291 };
292 
296 {
297  float LowerLeftPos[4];
298  float LowerRightPos[4];
299  float UpperLeftPos[4];
300  float UpperRightPos[4];
301 
302  float LowerUVs[4];
303  float UpperUVs[4];
304 
305  float TransformMatrix[16];
306 };
307 
311 {
312  int32_t imageHandle;
316  uint32_t layerFlags;
318 };
319 
320 
324 {
325  int32_t frameIndex;
326  int32_t minVsyncs;
327 
328  sxrRenderLayer renderLayers[SXR_MAX_RENDER_LAYERS];
329 
330  uint32_t frameOptions;
333  float fieldOfView;
334 };
335 
339 {
340  JavaVM* javaVm;
341  JNIEnv* javaEnv;
343 };
344 
348 {
349  float left;
350  float right;
351  float top;
352  float bottom;
353 
354  float near;
355  float far;
356 };
357 
359 {
361  float area;
362  float minimum;
363 };
364 
367 {
380  int32_t deviceOSVersion;
385 
386  // Tracking Camera
387  float trackingCalibration[12];
388  float trackingPrincipalPoint[2];
389  float trackingFocalLength[2];
390  float trackingRadialDist[8];
391 };
392 
393 enum sxrThermalLevel
394 {
395  kSafe,
396  kLevel1,
397  kLevel2,
398  kLevel3,
399  kCritical,
400  kNumThermalLevels
401 };
402 
403 enum sxrThermalZone
404 {
405  kCpu,
406  kGpu,
407  kSkin,
408  kNumThermalZones
409 };
410 
412 {
413  sxrThermalZone zone;
414  sxrThermalLevel level;
415 };
416 
417 typedef union
418 {
419  sxrEventData_Thermal thermal;
420  uint32_t data[2];
421 } sxrEventData;
422 
423 struct sxrEvent
424 {
426  uint32_t deviceId;
429 };
430 
433 {
434  kControllerMessageRecenter = 0,
435  kControllerMessageVibration = 1
436 };
437 
440 {
441  kControllerQueryBatteryRemaining = 0,
442  kControllerQueryControllerCaps = 1
443 };
444 
447  kNotInitialized = 0,
448  kDisconnected = 1,
449  kConnected = 2,
450  kConnecting = 3,
451  kError = 4
452 };
453 
456  enum {
457  None = 0x00000000,
458  One = 0x00000001,
459  Two = 0x00000002,
460  Three = 0x00000004,
461  Four = 0x00000008,
462  PrimaryThumbstick = 0x00000010,
463  SecondaryThumstick = 0x00000020,
464  Any = ~None
465  };
466 }
467 
470 enum {
471  PrimaryIndexTrigger = 0x00000000,
472  SecondaryIndexTrigger = 0x00000001,
473  PrimaryHandTrigger = 0x00000002,
474  SecondaryHandTrigger = 0x00000003
475 };
476 }
477 
480 enum {
481  PrimaryThumbstick = 0x00000000,
482  SecondaryThumbstick = 0x00000001
483 };
484 }
485 
488 enum {
489  None = 0x00000000,
490  One = 0x00000001,
491  Two = 0x00000002,
492  Three = 0x00000004,
493  Four = 0x00000008,
494  DpadUp = 0x00000010,
495  DpadDown = 0x00000020,
496  DpadLeft = 0x00000040,
497  DpadRight = 0x00000080,
498  Start = 0x00000100,
499  Back = 0x00000200,
500  PrimaryShoulder = 0x00001000,
501  PrimaryIndexTrigger = 0x00002000,
502  PrimaryHandTrigger = 0x00004000,
503  PrimaryThumbstick = 0x00008000,
504  PrimaryThumbstickUp = 0x00010000,
505  PrimaryThumbstickDown = 0x00020000,
506  PrimaryThumbstickLeft = 0x00040000,
507  PrimaryThumbstickRight = 0x00080000,
508  SecondaryShoulder = 0x00100000,
509  SecondaryIndexTrigger = 0x00200000,
510  SecondaryHandTrigger = 0x00400000,
511  SecondaryThumbstick = 0x00800000,
512  SecondaryThumbstickUp = 0x01000000,
513  SecondaryThumbstickDown = 0x02000000,
514  SecondaryThumbstickLeft = 0x04000000,
515  SecondaryThumbstickRight = 0x08000000,
516  Up = 0x10000000,
517  Down = 0x20000000,
518  Left = 0x40000000,
519  Right = 0x80000000,
520  Any = ~None
521 };
522 }
523 
524 // Current state of the controller
528 
531 
534 
537 
539  uint64_t timestamp;
540 
542  uint32_t buttonState;
543 
545  sxrVector2 analog2D[4];
546 
548  float analog1D[8];
549 
551  uint32_t isTouching;
552 
555 };
556 
557 // Caps of the Controller.
560  char deviceManufacturer[64];
561 
563  char deviceIdentifier[64];
564 
566  uint32_t caps; //0 bit = Provides Rotation; 1 bit = Position;
567 
569  uint32_t activeButtons;
570 
572  uint32_t active2DAnalogs;
573 
575  uint32_t active1DAnalogs;
576 
579 };
580 
581 #ifndef SXRP_EXPORT
582  #define SXRP_EXPORT
583 #endif
584 
585 #ifdef __cplusplus
586 extern "C" {
587 #endif
588 
590 SXRP_EXPORT const char* sxrGetVersion();
591 
593 SXRP_EXPORT SxrResult sxrGetXrServiceVersion(char *pRetBuffer, int bufferSize);
594 
596 SXRP_EXPORT SxrResult sxrGetXrClientVersion(char *pRetBuffer, int bufferSize);
597 
600 SXRP_EXPORT SxrResult sxrInitialize(const sxrInitParams* pInitParams);
601 
603 SXRP_EXPORT SxrResult sxrShutdown();
604 
607 SXRP_EXPORT sxrDeviceInfo sxrGetDeviceInfo();
608 
612 SXRP_EXPORT SxrResult sxrSetPerformanceLevels(sxrPerfLevel cpuPerfLevel, sxrPerfLevel gpuPerfLevel);
613 
616 SXRP_EXPORT SxrResult sxrBeginXr(const sxrBeginParams* pBeginParams);
617 
619 SXRP_EXPORT SxrResult sxrEndXr();
620 
623 SXRP_EXPORT float sxrGetPredictedDisplayTime();
624 
627 SXRP_EXPORT float sxrGetPredictedDisplayTimePipelined(unsigned int depth);
628 
632 SXRP_EXPORT sxrHeadPoseState sxrGetPredictedHeadPose( float predictedTimeMs );
633 
637 SXRP_EXPORT sxrHeadPoseState sxrGetHistoricHeadPose(int64_t timestampNs);
638 
641 SXRP_EXPORT SxrResult sxrGetEyePose(sxrEyePoseState *pReturnPose);
642 
644 SXRP_EXPORT SxrResult sxrRecenterPose();
645 
647 SXRP_EXPORT SxrResult sxrRecenterPosition();
648 
650 SXRP_EXPORT SxrResult sxrRecenterOrientation(bool yawOnly=true);
651 
654 SXRP_EXPORT uint32_t sxrGetSupportedTrackingModes();
655 
658 SXRP_EXPORT SxrResult sxrSetTrackingMode(uint32_t trackingModes);
659 
662 SXRP_EXPORT uint32_t sxrGetTrackingMode();
663 
666 SXRP_EXPORT bool sxrPollEvent(sxrEvent *pEvent);
667 
671 SXRP_EXPORT SxrResult sxrBeginEye(sxrWhichEye whichEye, sxrTextureType imageType = kTypeTexture);
672 
676 SXRP_EXPORT SxrResult sxrEndEye(sxrWhichEye whichEye, sxrTextureType imageType = kTypeTexture);
677 
680 SXRP_EXPORT SxrResult sxrSubmitFrame(const sxrFrameParams* pFrameParams);
681 
685 SXRP_EXPORT int sxrControllerStartTracking(const char* controllerDesc);
686 
689 SXRP_EXPORT void sxrControllerStopTracking(int controllerHandle);
690 
693 SXRP_EXPORT sxrControllerState sxrControllerGetState(int controllerHandle, int controllerSpace = 0);
694 
700 SXRP_EXPORT void sxrControllerSendMessage(int controllerHandle, int what, int arg1, int arg2);
701 
708 SXRP_EXPORT int sxrControllerQuery(int controllerHandle, int what, void* memory, unsigned int memorySize);
709 
719 SXRP_EXPORT SxrResult sxrSetWarpMesh(sxrWarpMeshEnum whichMesh, void *pVertexData, int vertexSize, int nVertices, unsigned int* pIndices, int nIndices);
720 
726 SXRP_EXPORT SxrResult sxrGetOcclusionMesh(sxrWhichEye whichEye, int *pTriangleCount, int *pVertexStride, float *pTriangles);
727 
730 SXRP_EXPORT bool sxrIsBoundarySystemEnabled();
731 
734 SXRP_EXPORT void sxrEnableBoundarySystem(bool enableBoundary = true);
735 
738 SXRP_EXPORT void sxrForceDisplayBoundarySystem(bool forceDisplayBoundary = true);
739 
745 SXRP_EXPORT SxrResult sxrSetBoundaryParameters(float *pMinValues, float *pMaxValues, float visibilityRadius);
746 
752 SXRP_EXPORT SxrResult sxrGetBoundaryParameters(float *pMinValues, float *pMaxValues, float *pVisibilityRadius);
753 
754 #ifdef __cplusplus
755 }
756 #endif
757 
758 #endif //_SXR_API_H_
SXRP_EXPORT void sxrEnableBoundarySystem(bool enableBoundary=true)
Enable/Disable the Boundary system.
SXRP_EXPORT SxrResult sxrInitialize(const sxrInitParams *pInitParams)
Initializes VR components.
Definition: sxrApi.h:417
SXRP_EXPORT SxrResult sxrSetWarpMesh(sxrWarpMeshEnum whichMesh, void *pVertexData, int vertexSize, int nVertices, unsigned int *pIndices, int nIndices)
Replaces the current Time Warp mesh the supplied mesh.
float targetEyePitch
Recommended eye pitch.
Definition: sxrApi.h:379
SXRP_EXPORT SxrResult sxrSetBoundaryParameters(float *pMinValues, float *pMaxValues, float visibilityRadius)
Set parameters for the Boundary system.
int32_t displayOrientation
Display orientation (degrees at initialization - 0,90,180,270)
Definition: sxrApi.h:371
SXRP_EXPORT void sxrControllerStopTracking(int controllerHandle)
Stops tracking the controller.
Definition: sxrApi.h:423
Structure containing the eye tracking data.
Definition: sxrApi.h:172
sxrLayoutCoords imageCoords
Layout of this layer on the screen.
Definition: sxrApi.h:314
Disables the lens chromatic aberration correction (performance optimization)
Definition: sxrApi.h:235
Medium performance level.
Definition: sxrApi.h:204
SXRP_EXPORT const char * sxrGetVersion()
Returns the VR SDK version string.
sxrViewFrustum rightEyeFrustum
Recommended Frustum information for right eye.
Definition: sxrApi.h:377
sxrVector3 gyroscope
Gyro.
Definition: sxrApi.h:533
sxrEyeMask
Enum used to indicate which eye to apply a render layer.
Definition: sxrApi.h:114
SXRP_EXPORT int sxrControllerStartTracking(const char *controllerDesc)
Starts Tracking.
float left
Left Plane of Frustum.
Definition: sxrApi.h:349
int32_t targetEyeWidthPixels
Recommended eye buffer width (pixels)
Definition: sxrApi.h:372
sxrPerfLevel gpuPerfLevel
Desired GPU performance level.
Definition: sxrApi.h:222
Enables motion to photon testing.
Definition: sxrApi.h:234
sxrFoveation lowFoveation
Low foveation values.
Definition: sxrApi.h:382
int32_t frameIndex
Frame Index.
Definition: sxrApi.h:325
SXRP_EXPORT SxrResult sxrRecenterPosition()
Recenters the head position at the current position.
SXRP_EXPORT SxrResult sxrGetOcclusionMesh(sxrWhichEye whichEye, int *pTriangleCount, int *pVertexStride, float *pTriangles)
Gets triangle data for the occlusion area mesh.
sxrHeadPoseState headPoseState
Head pose state used to generate the frame.
Definition: sxrApi.h:331
float top
Top Plane of Frustum.
Definition: sxrApi.h:351
sxrWarpMeshType warpMeshType
Type of mesh used to render eye buffer.
Definition: sxrApi.h:381
float minimum
Foveation Minimum Resolution [1, 1/2, 1/4, ..., 1/16, 0].
Definition: sxrApi.h:362
sxrControllerMessageType
Events to use in sxrControllerSendMessage.
Definition: sxrApi.h:432
Standard texture array (Left eye is first layer, right eye is second layer)
Definition: sxrApi.h:243
uint32_t activeButtons
Enabled Buttons Bitfield.
Definition: sxrApi.h:569
sxrFoveation medFoveation
Medium foveation values.
Definition: sxrApi.h:383
float area
Foveation Area Size [0, ...].
Definition: sxrApi.h:361
SXRP_EXPORT sxrHeadPoseState sxrGetPredictedHeadPose(float predictedTimeMs)
Calculates a predicted head pose.
SXRP_EXPORT SxrResult sxrEndXr()
Disables XR services.
uint32_t caps
Controller Capabilities.
Definition: sxrApi.h:566
uint64_t poseTimeStampNs
Time stamp in which the head pose was generated (nanoseconds)
Definition: sxrApi.h:156
Simple structure to hold 4-component vector data.
Definition: sxrApi.h:88
System defined performance level (default)
Definition: sxrApi.h:202
Structure containing the position and orientation of the head.
Definition: sxrApi.h:137
sxrPerfLevel cpuPerfLevel
Desired CPU performance level.
Definition: sxrApi.h:221
SXRP_EXPORT SxrResult sxrGetXrServiceVersion(char *pRetBuffer, int bufferSize)
Returns the VR service version string.
uint64_t timestamp
timestamp
Definition: sxrApi.h:539
SXRP_EXPORT void sxrControllerSendMessage(int controllerHandle, int what, int arg1, int arg2)
Send a message to the controller.
Simple structure to hold 2-component vector data.
Definition: sxrApi.h:76
View Frustum. These values are based on physical device properties, except the far plane is arbitrary...
Definition: sxrApi.h:347
SXRP_EXPORT SxrResult sxrSetTrackingMode(uint32_t trackingModes)
Sets the current head tracking mode.
EGL Image texture.
Definition: sxrApi.h:244
sxrQuaternion rotation
Orientation.
Definition: sxrApi.h:527
sxrColorSpace colorSpace
Color space to utilize for the display surface.
Definition: sxrApi.h:225
sxrWhichEye
Enum used to indicate which eye is being used.
Definition: sxrApi.h:106
float rightEyePupilDilation
Right eye value in millimeters indicating the pupil dilation.
Definition: sxrApi.h:192
float targetEyeConvergence
Recommended eye convergence.
Definition: sxrApi.h:378
sxrFrameOption
Options which can be set when submitting a frame to modify the behavior of asynchronous time warp...
Definition: sxrApi.h:230
uint64_t expectedDisplayTimeNs
Expected time when this pose should be on screen (nanoseconds)
Definition: sxrApi.h:158
float near
Near Plane of Frustum.
Definition: sxrApi.h:354
int32_t imageHandle
Handle to the texture/image to be rendered.
Definition: sxrApi.h:312
SXRP_EXPORT SxrResult sxrBeginEye(sxrWhichEye whichEye, sxrTextureType imageType=kTypeTexture)
Called after eye buffer is bound but before game rendering starts.
sxrTextureType imageType
Type of texture: Standard Texture or EGL Image.
Definition: sxrApi.h:313
uint32_t active2DAnalogs
Active 2D Analogs Bitfield.
Definition: sxrApi.h:572
uint32_t frameOptions
Options for adjusting the frame warp behavior (bitfield of sxrFrameOption)
Definition: sxrApi.h:330
Controller Button enumerations.
Definition: sxrApi.h:487
Simple structure to hold 4x4 matrix data.
Definition: sxrApi.h:100
Equirectangular Image texture.
Definition: sxrApi.h:246
sxrControllerQueryType
Query Values.
Definition: sxrApi.h:439
float fieldOfView
Field of view used to generate this frame (larger than device fov to provide timewarp margin) ...
Definition: sxrApi.h:333
sxrVulkanTexInfo vulkanInfo
Information about the data if it is a Vulkan texture.
Definition: sxrApi.h:317
Maximum performance level.
Definition: sxrApi.h:205
SXRP_EXPORT sxrDeviceInfo sxrGetDeviceInfo()
Queries for device specific information.
sxrControllerConnectionState
Controller Connection state.
Definition: sxrApi.h:446
SXRP_EXPORT SxrResult sxrSetPerformanceLevels(sxrPerfLevel cpuPerfLevel, sxrPerfLevel gpuPerfLevel)
Requests specific brackets of CPU/GPU performance.
SXRP_EXPORT bool sxrPollEvent(sxrEvent *pEvent)
Polls for an available event. If event(s) are present pEvent will be filled with the event details...
Structure containing the full set of pose data.
Definition: sxrApi.h:152
Disables re-projection.
Definition: sxrApi.h:233
int32_t displayWidthPixels
Physical width of the display (pixels)
Definition: sxrApi.h:368
SXRP_EXPORT float sxrGetPredictedDisplayTime()
Calculates a predicted time when the current frame would be displayed. Assumes a pipeline depth of 1...
sxrEventType
Events.
Definition: sxrApi.h:50
int32_t mainThreadId
Thread Id of the primary render thread.
Definition: sxrApi.h:220
sxrThermalLevel level
Indication of the current zone thermal level.
Definition: sxrApi.h:414
Disables the lens distortion correction (useful for debugging)
Definition: sxrApi.h:232
float bottom
Bottom Plane of Frustum.
Definition: sxrApi.h:352
SXRP_EXPORT SxrResult sxrBeginXr(const sxrBeginParams *pBeginParams)
Enables XR services.
Simple structure to hold 3-component vector data.
Definition: sxrApi.h:82
SXRP_EXPORT sxrControllerState sxrControllerGetState(int controllerHandle, int controllerSpace=0)
Get the current state of the controller.
float eventTimeStamp
Time stamp for the event in seconds since the last sxrBeginVr call.
Definition: sxrApi.h:427
sxrVector3 position
Position.
Definition: sxrApi.h:530
int32_t optionFlags
Flags to specify SXR options (sxrOptionFlags)
Definition: sxrApi.h:224
uint32_t activeTouchButtons
Active Touch Buttons.
Definition: sxrApi.h:578
Controller Trigger enumerations.
Definition: sxrApi.h:469
int32_t deviceOSVersion
Android OS Version of the device.
Definition: sxrApi.h:380
sxrPerfLevel
Enum used for indicating the CPU/GPU performance levels.
Definition: sxrApi.h:200
SXRP_EXPORT SxrResult sxrGetXrClientVersion(char *pRetBuffer, int bufferSize)
Returns the VR client version string.
float leftEyePupilDilation
Left eye value in millimeters indicating the pupil dilation.
Definition: sxrApi.h:191
int32_t displayHeightPixels
Physical height of the display (pixels)
Definition: sxrApi.h:369
Standard texture.
Definition: sxrApi.h:242
float targetFovXRad
Recommended horizontal FOV.
Definition: sxrApi.h:374
int32_t rightEyePoseStatus
Bit field (sxrEyePoseStatus) indicating right eye pose status.
Definition: sxrApi.h:177
float displayRefreshRateHz
Refresh rate of the display.
Definition: sxrApi.h:370
SXRP_EXPORT uint32_t sxrGetSupportedTrackingModes()
Returns the supported tracking types.
sxrOptionFlags
Flags used to set SXR options.
Definition: sxrApi.h:210
sxrWarpMeshEnum
Enumeration of possible warp meshes.
Definition: sxrApi.h:282
JavaVM * javaVm
Java Virtual Machine pointer.
Definition: sxrApi.h:340
Definition: sxrApi.h:411
Controller Joystick enumerations.
Definition: sxrApi.h:479
sxrEyeMask eyeMask
Determines which eye[s] receive this render layer.
Definition: sxrApi.h:315
float far
Far Plane of Frustum (Arbitrary)
Definition: sxrApi.h:355
Per-frame data needed for time warp, distortion/aberration correction.
Definition: sxrApi.h:323
SXRP_EXPORT bool sxrIsBoundarySystemEnabled()
Check whether the Boundary system is enabled.
int32_t minVsyncs
Minimum number of vysnc events before displaying the frame (1=display refresh, 2=half refresh...
Definition: sxrApi.h:326
Vulkan texture.
Definition: sxrApi.h:248
sxrViewFrustum leftEyeFrustum
Recommended Frustum information for left eye.
Definition: sxrApi.h:376
ANativeWindow * nativeWindow
Pointer to the Android native window.
Definition: sxrApi.h:223
uint32_t layerFlags
Flags applied to this render layer.
Definition: sxrApi.h:316
Definition: sxrApi.h:558
jobject javaActivityObject
Reference to the Android activity.
Definition: sxrApi.h:342
uint32_t deviceId
An identifier for the device that generated the event (0 == HMD)
Definition: sxrApi.h:426
sxrEventData eventData
Event specific data payload.
Definition: sxrApi.h:428
float targetFovYRad
Recommended vertical FOV.
Definition: sxrApi.h:375
float right
Right Plane of Frustum.
Definition: sxrApi.h:350
sxrLayerFlags
Enum used to indicate flags passed as part of a render layer.
Definition: sxrApi.h:122
int32_t poseStatus
Bit field (sxrTrackingMode) indicating pose status.
Definition: sxrApi.h:155
sxrWarpMeshType
Enumeration of possible warp mesh types.
Definition: sxrApi.h:272
int32_t leftEyePoseStatus
Bit field (sxrEyePoseStatus) indicating left eye pose status.
Definition: sxrApi.h:176
sxrEyePoseStatus
Structure containing flags indicating data valididty of an eye pose.
Definition: sxrApi.h:162
Structure containing parameters needed to enable VR mode.
Definition: sxrApi.h:218
Cubemap texture (Not supporting cubemap image)
Definition: sxrApi.h:247
sxrWarpType
Enum used to indicate the type of warp/composition that should be used for a frame.
Definition: sxrApi.h:265
sxrWarpType warpType
Type of warp to be used on the frame.
Definition: sxrApi.h:332
sxrControllerConnectionState connectionState
Controller Connection state.
Definition: sxrApi.h:554
Definition: sxrApi.h:358
Definition: sxrApi.h:525
Basic device information to allow the client code to optimally setup their simulation and rendering p...
Definition: sxrApi.h:366
sxrTrackingMode
Enum used to indicate valid components of an pose state.
Definition: sxrApi.h:144
Equirectangular texture.
Definition: sxrApi.h:245
SXRP_EXPORT SxrResult sxrRecenterOrientation(bool yawOnly=true)
Recenters the head orientation (Yaw only) at the current value.
SXRP_EXPORT uint32_t sxrGetTrackingMode()
Returns the current head tracking mode.
Minimum performance level.
Definition: sxrApi.h:203
float leftEyeOpenness
Left eye value between 0.0 and 1.0 where 1.0 means fully open and 0.0 closed.
Definition: sxrApi.h:188
Render layer screen position and UV coordinates.
Definition: sxrApi.h:295
Information about texture if type is kTypeVulkan.
Definition: sxrApi.h:253
uint32_t isTouching
Whether the touchpad area is being touched.
Definition: sxrApi.h:551
Description of render layers.
Definition: sxrApi.h:310
float rightEyeOpenness
Right eye value between 0.0 and 1.0 where 1.0 means fully open and 0.0 closed.
Definition: sxrApi.h:189
uint64_t poseFetchTimeNs
Time stamp when this pose was retrieved.
Definition: sxrApi.h:157
SXRP_EXPORT sxrHeadPoseState sxrGetHistoricHeadPose(int64_t timestampNs)
Retrieves a historic head pose.
sxrVector2 gain
Foveation Gain Rate [1, ...].
Definition: sxrApi.h:360
sxrEventType eventType
Type of event.
Definition: sxrApi.h:425
SXRP_EXPORT SxrResult sxrGetEyePose(sxrEyePoseState *pReturnPose)
Retrieves a current eye pose.
int64_t timestamp
Timestamp for the eye pose.
Definition: sxrApi.h:174
SXRP_EXPORT void sxrForceDisplayBoundarySystem(bool forceDisplayBoundary=true)
Enable/Disable the forced display of Boundary system.
Controller Touch button enumerations.
Definition: sxrApi.h:455
JNIEnv * javaEnv
Java Environment.
Definition: sxrApi.h:341
int32_t combinedEyePoseStatus
Bit field (sxrEyePoseStatus) indicating combined eye pose status.
Definition: sxrApi.h:178
sxrVector3 accelerometer
Accelerometer.
Definition: sxrApi.h:536
SXRP_EXPORT SxrResult sxrGetBoundaryParameters(float *pMinValues, float *pMaxValues, float *pVisibilityRadius)
Get parameters for the Boundary system.
SXRP_EXPORT SxrResult sxrEndEye(sxrWhichEye whichEye, sxrTextureType imageType=kTypeTexture)
Called after eye buffer is rendered but before frame is submitted.
sxrFoveation highFoveation
High foveation values.
Definition: sxrApi.h:384
SXRP_EXPORT SxrResult sxrShutdown()
Releases VR components.
SXRP_EXPORT SxrResult sxrRecenterPose()
Recenters the head position and orientation at the current values.
sxrThermalZone zone
Thermal zone.
Definition: sxrApi.h:413
SXRP_EXPORT int sxrControllerQuery(int controllerHandle, int what, void *memory, unsigned int memorySize)
make a query to the controller
Initialization parameters that are constant over the life-cycle of the application.
Definition: sxrApi.h:338
sxrHeadPose pose
Head pose.
Definition: sxrApi.h:154
sxrTextureType
Enum used to indicate the type of texture passed in as a render layer.
Definition: sxrApi.h:240
uint32_t active1DAnalogs
Active 1D Analogs Bitfield.
Definition: sxrApi.h:575
uint32_t buttonState
All digital button states as bitflags.
Definition: sxrApi.h:542
SXRP_EXPORT float sxrGetPredictedDisplayTimePipelined(unsigned int depth)
Calculates a predicted time when the current frame would be displayed. Allows for specifying the curr...
int32_t targetEyeHeightPixels
Recommended eye buffer height (pixels)
Definition: sxrApi.h:373
SXRP_EXPORT SxrResult sxrSubmitFrame(const sxrFrameParams *pFrameParams)
Submits a frame to asynchronous time warp.
Simple structure to hold quaternion data.
Definition: sxrApi.h:94
Basic single layer (world) warp.
Definition: sxrApi.h:267