프로퍼티 | 타입 | 설명 | |
---|---|---|---|
OVR_DEFAULT_CAMERA_POSITION | float[] |
메소드 | 설명 | |
---|---|---|
AttachToWindow ( |
Platform specific function to specify the application window whose output will be displayed on the HMD. Only used if the ovrHmdCap_ExtendDesktop flag is false. Windows: SwapChain associated with this window will be displayed on the HMD. Specify 'destMirrorRect' in window coordinates to indicate an area of the render target output that will be mirrored from 'sourceRenderTargetRect'. Null pointers mean "full size". @note Source and dest mirror rects are not yet implemented.
|
|
BeginFrame ( uint frameIndex ) : |
Begins a frame, returning timing information. This should be called at the beginning of the game rendering loop (on the render thread). Pass 0 for the frame index if not using ovrHmd_GetFrameTiming.
|
|
BeginFrameTiming ( uint frameIndex ) : |
Called at the beginning of the frame on the rendering thread. Pass frameIndex == 0 if ovrHmd_GetFrameTiming isn't being used. Otherwise, pass the same frame index as was used for GetFrameTiming on the main thread.
|
|
ConfigureRendering ( |
Configures rendering and fills in computed render parameters. This function can be called multiple times to change rendering settings. eyeRenderDescOut is a pointer to an array of two EyeRenderDesc structs that are used to return complete rendering information for each eye. - apiConfig provides D3D/OpenGL specific parameters. Pass null to shutdown rendering and release all resources. - distortionCaps describe desired distortion settings.
|
|
ConfigureTracking ( uint supportedTrackingCaps, uint requiredTrackingCaps ) : bool |
All tracking interface functions are thread-safe, allowing tracking state to be sampled from different threads. ConfigureTracking starts sensor sampling, enabling specified capabilities, described by ovrTrackingCaps. - supportedTrackingCaps specifies support that is requested. The function will succeed even if these caps are not available (i.e. sensor or camera is unplugged). Support will automatically be enabled if such device is plugged in later. Software should check ovrTrackingState.StatusFlags for real-time status. - requiredTrackingCaps specify sensor capabilities required at the time of the call. If they are not available, the function will fail. Pass 0 if only specifying supportedTrackingCaps. - Pass 0 for both supportedTrackingCaps and requiredTrackingCaps to disable tracking.
|
|
Create ( int index ) : |
Creates a handle to an HMD which doubles as a description structure. Index can [0 .. ovrHmd_Detect()-1]. Index mappings can cange after each ovrHmd_Detect call.
|
|
CreateDebug ( HmdType type ) : |
Creates a 'fake' HMD used for debugging only. This is not tied to specific hardware, but may be used to debug some of the related rendering.
|
|
CreateDistortionMesh ( Eye eye, |
Generate distortion mesh per eye. Distortion capabilities will depend on 'distortionCaps' flags. Users should render using the appropriate shaders based on their settings. Distortion mesh data will be allocated and written into the ovrDistortionMesh data structure, which should be explicitly freed with ovrHmd_DestroyDistortionMesh. Users should call ovrHmd_GetRenderScaleAndOffset to get uvScale and Offset values for rendering. The function shouldn't fail unless theres is a configuration or memory error, in which case ovrDistortionMesh values will be set to null. This is the only function in the SDK reliant on eye relief, currently imported from profiles, or overridden here.
|
|
Detect ( ) : int |
Detects or re-detects HMDs and reports the total number detected. Users can get information about each HMD by calling ovrHmd_Create with an index.
|
|
DismissHSWDisplay ( ) : bool | ||
EndFrame ( |
Ends a frame, submitting the rendered textures to the frame buffer. - RenderViewport within each eyeTexture can change per frame if necessary. - 'renderPose' will typically be the value returned from ovrHmd_GetEyePoses, ovrHmd_GetHmdPosePerEye but can be different if a different head pose was used for rendering. - This may perform distortion and scaling internally, assuming is it not delegated to another thread. - Must be called on the same thread as BeginFrame. - *** This Function will call Present/SwapBuffers and potentially wait for GPU Sync ***.
|
|
EndFrameTiming ( ) : void |
Marks the end of client distortion rendered frame, tracking the necessary timing information. This function must be called immediately after Present/SwapBuffers + GPU sync. GPU sync is important before this call to reduce latency and ensure proper timing.
|
|
GetBool ( string propertyName, bool defaultVal = false ) : bool |
Get boolean property. Returns first element if property is a boolean array. Returns defaultValue if property doesn't exist.
|
|
GetDesc ( ) : |
Returns an ovrHmdDesc, which provides a complete description for the HMD
|
|
GetEnabledCaps ( ) : uint |
Returns capability bits that are enabled at this time as described by ovrHmdCaps. Note that this value is different font ovrHmdDesc::HmdCaps, which describes what capabilities are available for that HMD.
|
|
GetEyePoses ( uint frameIndex ) : Ovr.Posef[] |
Returns predicted head pose in outHmdTrackingState and offset eye poses in outEyePoses as an atomic operation. Caller need not worry about applying HmdToEyeViewOffset to the returned outEyePoses variables. - Thread-safe function where caller should increment frameIndex with every frame and pass the index where applicable to functions called on the rendering thread. - hmdToEyeViewOffset[2] can be EyeRenderDesc.HmdToEyeViewOffset returned from ovrHmd_ConfigureRendering or ovrHmd_GetRenderDesc. For monoscopic rendering, use a vector that is the average of the two vectors for both eyes. - If frameIndex is not being used, pass in 0. - Assuming outEyePoses are used for rendering, it should be passed into ovrHmd_EndFrame. - If called doesn't need outHmdTrackingState, it can be NULL
|
|
GetEyeTimewarpMatrices ( Eye eye, |
Computes timewarp matrices used by distortion mesh shader, these are used to adjust for head orientation change since the last call to ovrHmd_GetEyePoses when rendering this eye. The ovrDistortionVertex::TimeWarpFactor is used to blend between the matrices, usually representing two different sides of the screen. Must be called on the same thread as ovrHmd_BeginFrameTiming.
|
|
GetFloat ( string propertyName, float defaultVal = 0.0f ) : float |
Get float property. Returns first element if property is a float array. Returns defaultValue if property doesn't exist.
|
|
GetFloatArray ( string propertyName, float values ) : float[] |
Get float[] property. Returns the number of elements filled in, 0 if property doesn't exist. Maximum of arraySize elements will be written.
|
|
GetFovTextureSize ( Eye eye, |
Calculates the recommended texture size for rendering a given eye within the HMD with a given FOV cone. Higher FOV will generally require larger textures to maintain quality. - pixelsPerDisplayPixel specifies the ratio of the number of render target pixels to display pixels at the center of distortion. 1.0 is the default value. Lower values can improve performance.
|
|
GetFrameTiming ( uint frameIndex ) : |
Thread-safe timing function for the main thread. Caller should increment frameIndex with every frame and pass the index where applicable to functions called on the rendering thread.
|
|
GetHSWDisplayState ( ) : |
Returns the current state of the HSW display. If the application is doing the rendering of the HSW display then this function serves to indicate that the warning should be currently displayed. If the application is using SDK-based eye rendering then the SDK by default automatically handles the drawing of the HSW display. An application that uses application-based eye rendering should use this function to know when to start drawing the HSW display itself and can optionally use it in conjunction with ovrhmd_DismissHSWDisplay as described below. Example usage for application-based rendering: bool HSWDisplayCurrentlyDisplayed = false; // global or class member variable ovrHSWDisplayState hswDisplayState = hmd.GetHSWDisplayState(); if (hswDisplayState.Displayed && !HSWDisplayCurrentlyDisplayed) {
|
|
GetHmdPosePerEye ( Eye eye ) : |
Function was previously called ovrHmd_GetEyePose Returns the predicted head pose to use when rendering the specified eye. - Important: Caller must apply HmdToEyeViewOffset before using ovrPosef for rendering - Must be called between ovrHmd_BeginFrameTiming and ovrHmd_EndFrameTiming. - If the pose is used for rendering the eye, it should be passed to ovrHmd_EndFrame. - Parameter 'eye' is used for prediction timing only
|
|
GetInt ( string propertyName, int defaultVal ) : int |
Get integer property. Returns first element if property is an integer array. Returns defaultValue if property doesn't exist.
|
|
GetLastError ( ) : string |
Returns last error for HMD state. Returns null for no error. String is valid until next call or GetLastError or HMD is destroyed.
|
|
GetLatencyTest2DrawColor ( ) : byte[] |
Returns the latency testing color in rgbColorOut to render when using a DK2 Returns false if this feature is disabled or not-applicable (e.g. using a DK1)
|
|
GetLatencyTestResult ( ) : string |
Returns non-null string once with latency test result, when it is available. Buffer is valid until next call.
|
|
GetOrthoSubProjection ( |
Used for 2D rendering, Y is down orthoScale = 1.0f / pixelsPerTanAngleAtCenter orthoDistance = distance from camera, such as 0.8m
|
|
GetProjection ( |
Used to generate projection from ovrEyeDesc::Fov.
|
|
GetRenderDesc ( Eye eyeType, |
Computes the distortion viewport, view adjust, and other rendering parameters for the specified eye. This can be used instead of ovrHmd_ConfigureRendering to do setup for client rendered distortion.
|
|
GetRenderScaleAndOffset ( |
Computes updated 'uvScaleOffsetOut' to be used with a distortion if render target size or viewport changes after the fact. This can be used to adjust render size every frame if desired.
|
|
GetString ( string propertyName, string defaultVal = null ) : string |
Get string property. Returns first element if property is a string array. Returns defaultValue if property doesn't exist. String memory is guaranteed to exist until next call to GetString or GetStringArray, or HMD is destroyed.
|
|
GetTimeInSeconds ( ) : double |
Returns global, absolute high-resolution time in seconds. This is the same value as used in sensor messages.
|
|
GetTrackingState ( double absTime = 0.0d ) : |
Returns tracking state reading based on the specified absolute system time. Pass an absTime value of 0.0 to request the most recent sensor reading. In this case both PredictedPose and SamplePose will have the same value. ovrHmd_GetEyePoses relies on this function internally. This may also be used for more refined timing of FrontBuffer rendering logic, etc.
|
|
GetVersionString ( ) : string |
Returns version string representing libOVR version.
|
|
Hmd ( |
||
Initialize ( ) : bool |
Initializes all Oculus functionality.
|
|
InitializeRenderingShim ( ) : void | ||
ProcessLatencyTest ( ) : byte[] |
Does latency test processing and returns 'TRUE' if specified rgb color should be used to clear the screen.
|
|
RecenterPose ( ) : void |
Re-centers the sensor orientation. Normally this will recenter the (x,y,z) translational components and the yaw component of orientation.
|
|
ResetFrameTiming ( uint frameIndex ) : void |
Initializes and resets frame time tracking. This is typically not necessary, but is helpful if game changes vsync state or video mode. vsync is assumed to be on if this isn't called. Resets internal frame index to the specified number.
|
|
SetBool ( string propertyName, bool val ) : bool |
Modify bool property; false if property doesn't exist or is readonly.
|
|
SetEnabledCaps ( uint capsBits ) : void |
Modifies capability bits described by ovrHmdCaps that can be modified, such as ovrHmdCap_LowPersistance.
|
|
SetFloat ( string propertyName, float val ) : bool |
Modify float property; false if property doesn't exist or is readonly.
|
|
SetFloatArray ( string propertyName, float values ) : bool |
Modify float[] property; false if property doesn't exist or is readonly.
|
|
SetInt ( string propertyName, int val ) : bool |
Modify integer property; false if property doesn't exist or is readonly.
|
|
SetString ( string propertyName, string val ) : bool |
Set string property
|
|
Shutdown ( ) : void |
Shuts down all Oculus functionality.
|
|
StartPerfLog ( string fileName, string userData1 ) : bool |
Start performance logging. guid is optional and if included is written with each file entry. If called while logging is already active with the same filename, only the guid will be updated If called while logging is already active with a different filename, ovrHmd_StopPerfLog() will be called, followed by ovrHmd_StartPerfLog()
|
|
StopPerfLog ( ) : bool |
Stop performance logging.
|
|
WaitTillTime ( double absTime ) : double |
Waits until the specified absolute time.
|
메소드 | 설명 | |
---|---|---|
ovrHmd_AttachToWindow ( |
||
ovrHmd_BeginFrame ( |
||
ovrHmd_BeginFrameTiming ( |
||
ovrHmd_ConfigureRendering ( |
||
ovrHmd_ConfigureTracking ( |
||
ovrHmd_Create ( int index ) : |
||
ovrHmd_CreateDebug ( HmdType type ) : |
||
ovrHmd_CreateDistortionMesh ( |
||
ovrHmd_Destroy ( |
||
ovrHmd_DestroyDistortionMesh ( |
||
ovrHmd_Detect ( ) : int | ||
ovrHmd_DismissHSWDisplay ( |
||
ovrHmd_EndFrame ( |
||
ovrHmd_EndFrameTiming ( |
||
ovrHmd_GetBool ( |
||
ovrHmd_GetEnabledCaps ( |
||
ovrHmd_GetEyePoses ( |
||
ovrHmd_GetEyeTimewarpMatrices ( |
||
ovrHmd_GetFloat ( |
||
ovrHmd_GetFloatArray ( |
||
ovrHmd_GetFovTextureSize ( |
||
ovrHmd_GetFrameTiming ( |
||
ovrHmd_GetHSWDisplayState ( |
||
ovrHmd_GetHmdPosePerEye ( |
||
ovrHmd_GetInt ( |
||
ovrHmd_GetLastError ( |
||
ovrHmd_GetLatencyTest2DrawColor ( |
||
ovrHmd_GetLatencyTestResult ( |
||
ovrHmd_GetRenderDesc ( |
||
ovrHmd_GetRenderScaleAndOffset ( |
||
ovrHmd_GetString ( |
||
ovrHmd_GetTrackingState ( |
||
ovrHmd_ProcessLatencyTest ( |
||
ovrHmd_RecenterPose ( |
||
ovrHmd_ResetFrameTiming ( |
||
ovrHmd_SetBool ( |
||
ovrHmd_SetEnabledCaps ( |
||
ovrHmd_SetFloat ( |
||
ovrHmd_SetFloatArray ( |
||
ovrHmd_SetInt ( |
||
ovrHmd_SetString ( |
||
ovrHmd_StartPerfLog ( |
||
ovrHmd_StopPerfLog ( |
||
ovrMatrix4f_OrthoSubProjection ( |
||
ovrMatrix4f_Projection ( |
||
ovr_GetTimeInSeconds ( ) : double | ||
ovr_GetVersionString ( ) : |
||
ovr_Initialize ( ) : sbyte | ||
ovr_InitializeRenderingShim ( ) : void | ||
ovr_Shutdown ( ) : void | ||
ovr_WaitTillTime ( double absTime ) : double |
public AttachToWindow ( |
||
destMirrorRect | ||
sourceRenderTargetRect | ||
WindowPtr | ||
리턴 | bool |
public BeginFrame ( uint frameIndex ) : |
||
frameIndex | uint | |
리턴 |
public BeginFrameTiming ( uint frameIndex ) : |
||
frameIndex | uint | |
리턴 |
public ConfigureRendering ( |
||
renderAPIConfig | ||
eyeFovIn | ||
distortionCaps | uint | |
리턴 | Ovr.EyeRenderDesc[] |
public ConfigureTracking ( uint supportedTrackingCaps, uint requiredTrackingCaps ) : bool | ||
supportedTrackingCaps | uint | |
requiredTrackingCaps | uint | |
리턴 | bool |
public CreateDistortionMesh ( Eye eye, |
||
eye | Eye | |
fov | ||
distortionCaps | uint | |
리턴 | DistortionMesh? |
public EndFrame ( |
||
renderPose | ||
eyeTexture | ||
리턴 | void |
public GetBool ( string propertyName, bool defaultVal = false ) : bool | ||
propertyName | string | |
defaultVal | bool | |
리턴 | bool |
public GetEyePoses ( uint frameIndex ) : Ovr.Posef[] | ||
frameIndex | uint | |
리턴 | Ovr.Posef[] |
public GetEyeTimewarpMatrices ( Eye eye, |
||
eye | Eye | |
renderPose | ||
리턴 | Ovr.Matrix4f[] |
public GetFloat ( string propertyName, float defaultVal = 0.0f ) : float | ||
propertyName | string | |
defaultVal | float | |
리턴 | float |
public GetFloatArray ( string propertyName, float values ) : float[] | ||
propertyName | string | |
values | float | |
리턴 | float[] |
public GetFovTextureSize ( Eye eye, |
||
eye | Eye | |
fov | ||
pixelsPerDisplayPixel | float | |
리턴 |
public GetFrameTiming ( uint frameIndex ) : |
||
frameIndex | uint | |
리턴 |
public GetInt ( string propertyName, int defaultVal ) : int | ||
propertyName | string | |
defaultVal | int | |
리턴 | int |
public static GetOrthoSubProjection ( |
||
projection | ||
orthoScale | ||
orthoDistance | float | |
hmdToEyeViewOffsetX | float | |
리턴 |
public static GetProjection ( |
||
fov | ||
znear | float | |
zfar | float | |
rightHanded | bool | |
리턴 |
public GetRenderDesc ( Eye eyeType, |
||
eyeType | Eye | |
fov | ||
리턴 |
public GetRenderScaleAndOffset ( |
||
fov | ||
textureSize | ||
renderViewport | ||
리턴 | Ovr.Vector2f[] |
public GetString ( string propertyName, string defaultVal = null ) : string | ||
propertyName | string | |
defaultVal | string | |
리턴 | string |
public GetTrackingState ( double absTime = 0.0d ) : |
||
absTime | double | |
리턴 |
public ResetFrameTiming ( uint frameIndex ) : void | ||
frameIndex | uint | |
리턴 | void |
public SetBool ( string propertyName, bool val ) : bool | ||
propertyName | string | |
val | bool | |
리턴 | bool |
public SetFloat ( string propertyName, float val ) : bool | ||
propertyName | string | |
val | float | |
리턴 | bool |
public SetFloatArray ( string propertyName, float values ) : bool | ||
propertyName | string | |
values | float | |
리턴 | bool |
public SetInt ( string propertyName, int val ) : bool | ||
propertyName | string | |
val | int | |
리턴 | bool |
public SetString ( string propertyName, string val ) : bool | ||
propertyName | string | |
val | string | |
리턴 | bool |
public StartPerfLog ( string fileName, string userData1 ) : bool | ||
fileName | string | |
userData1 | string | |
리턴 | bool |
public static WaitTillTime ( double absTime ) : double | ||
absTime | double | |
리턴 | double |