![]() |
NVAPI Reference Documentation
|
Release 530: March
|
Data Structures | |
struct | _NVAPI_STEREO_CAPS |
Macros | |
#define | NVAPI_STEREO_CAPS_VER1 MAKE_NVAPI_VERSION(NVAPI_STEREO_CAPS,1) |
#define | NVAPI_STEREO_CAPS_VER NVAPI_STEREO_CAPS_VER1 |
#define | NVAPI_STEREO_QUADBUFFERED_API_VERSION 0x2 |
Typedefs | |
typedef enum _NV_StereoRegistryProfileType | NV_STEREO_REGISTRY_PROFILE_TYPE |
typedef enum _NV_StereoRegistryID | NV_STEREO_REGISTRY_ID |
typedef struct _NVAPI_STEREO_CAPS | NVAPI_STEREO_CAPS_V1 |
typedef NVAPI_STEREO_CAPS_V1 | NVAPI_STEREO_CAPS |
typedef enum _NV_FrustumAdjustMode | NV_FRUSTUM_ADJUST_MODE |
typedef enum _NVAPI_STEREO_INIT_ACTIVATION_FLAGS | NVAPI_STEREO_INIT_ACTIVATION_FLAGS |
typedef enum _NV_StereoSwapChainMode | NV_STEREO_SWAPCHAIN_MODE |
typedef enum _NV_StereoActiveEye | NV_STEREO_ACTIVE_EYE |
typedef enum _NV_StereoDriverMode | NV_STEREO_DRIVER_MODE |
typedef enum _NVAPI_STEREO_SURFACECREATEMODE | NVAPI_STEREO_SURFACECREATEMODE |
These APIs control NVIDIA Stereoscopic 3D.
DESCRIPTION: This API allows an application to enable stereo viewing, without the need of a GUID/Key pair This API cannot be used to enable stereo viewing on 3DTV.
HOW TO USE: Call this function immediately after device creation, then follow with a reset.
Very generically: Create Device->Create Stereo Handle->InitActivation->Reset Device
SUPPORTED OS: Windows 7 and higher
[in] | stereoHandle | Stereo handle corresponding to the device interface. |
[in] | bDelayed | Use delayed activation |
NVAPI_STEREO_NOT_INITIALIZED | - Stereo part of NVAPI not initialized. |
#define NVAPI_STEREO_CAPS_VER NVAPI_STEREO_CAPS_VER1 |
#define NVAPI_STEREO_CAPS_VER1 MAKE_NVAPI_VERSION(NVAPI_STEREO_CAPS,1) |
#define NVAPI_STEREO_QUADBUFFERED_API_VERSION 0x2 |
typedef enum _NV_FrustumAdjustMode NV_FRUSTUM_ADJUST_MODE |
Used in NvAPI_Stereo_GetFrustumAdjustMode().
typedef enum _NV_StereoActiveEye NV_STEREO_ACTIVE_EYE |
typedef enum _NV_StereoDriverMode NV_STEREO_DRIVER_MODE |
typedef enum _NV_StereoRegistryID NV_STEREO_REGISTRY_ID |
typedef enum _NV_StereoSwapChainMode NV_STEREO_SWAPCHAIN_MODE |
typedef struct _NVAPI_STEREO_CAPS NVAPI_STEREO_CAPS_V1 |
InitActivation Flags.
\function NvAPI_Stereo_SetSurfaceCreationMode(StereoHandle hStereoHandle, NVAPI_STEREO_SURFACECREATEMODE creationMode)
[in] | hStereoHandle | Stereo handle that corresponds to the device interface. |
[in] | creationMode | New surface creation mode for this device interface. |
SUPPORTED OS: Windows 7 and higher
DESCRIPTION: This API sets surface creation mode for this device interface.
WHEN TO USE: After the stereo handle for device interface is created via successful call to appropriate NvAPI_Stereo_CreateHandleFrom function.
Used in NvAPI_Stereo_GetFrustumAdjustMode().
Enumerator | |
---|---|
NVAPI_NO_FRUSTUM_ADJUST | Do not adjust frustum. |
NVAPI_FRUSTUM_STRETCH | Stretch images in X. |
NVAPI_FRUSTUM_CLEAR_EDGES | Clear corresponding edges for each eye. |
enum _NV_StereoActiveEye |
enum _NV_StereoDriverMode |
enum _NV_StereoRegistryID |
Used in NvAPI_Stereo_SetConfigurationProfileValue()
Enumerator | |
---|---|
NVAPI_CONVERGENCE_ID | Symbolic constant for convergence registry ID. |
NVAPI_FRUSTUM_ADJUST_MODE_ID | Symbolic constant for frustum adjust mode registry ID. |
Used in NvAPI_Stereo_CreateConfigurationProfileRegistryKey()
\function NvAPI_Stereo_SetSurfaceCreationMode(StereoHandle hStereoHandle, NVAPI_STEREO_SURFACECREATEMODE creationMode)
[in] | hStereoHandle | Stereo handle that corresponds to the device interface. |
[in] | creationMode | New surface creation mode for this device interface. |
SUPPORTED OS: Windows 7 and higher
DESCRIPTION: This API sets surface creation mode for this device interface.
WHEN TO USE: After the stereo handle for device interface is created via successful call to appropriate NvAPI_Stereo_CreateHandleFrom function.
NVAPI_INTERFACE NvAPI_D3D1x_CreateSwapChain | ( | StereoHandle | hStereoHandle, |
DXGI_SWAP_CHAIN_DESC * | pDesc, | ||
IDXGISwapChain ** | ppSwapChain, | ||
NV_STEREO_SWAPCHAIN_MODE | mode | ||
) |
DESCRIPTION: This API allows the user to create a mono or a stereo swap chain.
NOTE: NvAPI_D3D1x_CreateSwapChain is a wrapper of the method IDXGIFactory::CreateSwapChain which additionally notifies the D3D driver of the mode in which stereo mode the swap chain is to be created.
SUPPORTED OS: Windows 7 and higher
[in] | hStereoHandle | Stereo handle that corresponds to the device interface. A pointer to the device that will write 2D images to the swap chain. |
[in] | pDesc | A pointer to the swap-chain description (DXGI_SWAP_CHAIN_DESC). This parameter cannot be NULL. |
[out] | ppSwapChain | A pointer to the swap chain created. |
[in] | mode | The stereo mode fot the swap chain. NVAPI_STEREO_SWAPCHAIN_DEFAULT NVAPI_STEREO_SWAPCHAIN_STEREO NVAPI_STEREO_SWAPCHAIN_MONO |
NVAPI_OK | The swap chain was created successfully. |
NVAPI_ERROR | The operation failed. |
NVAPI_INTERFACE NvAPI_D3D9_CreateSwapChain | ( | StereoHandle | hStereoHandle, |
D3DPRESENT_PARAMETERS * | pPresentationParameters, | ||
IDirect3DSwapChain9 ** | ppSwapChain, | ||
NV_STEREO_SWAPCHAIN_MODE | mode | ||
) |
DESCRIPTION: This API allows the user to create a mono or a stereo swap chain.
NOTE: NvAPI_D3D9_CreateSwapChain is a wrapper of the method IDirect3DDevice9::CreateAdditionalSwapChain which additionally notifies the D3D driver if the swap chain creation mode must be stereo or mono.
SUPPORTED OS: Windows 7 and higher
[in] | hStereoHandle | Stereo handle that corresponds to the device interface. |
[in,out] | pPresentationParameters | A pointer to the swap-chain description (DXGI). This parameter cannot be NULL. |
[out] | ppSwapChain | A pointer to the swap chain created. |
[in] | mode | The stereo mode for the swap chain. NVAPI_STEREO_SWAPCHAIN_DEFAULT NVAPI_STEREO_SWAPCHAIN_STEREO NVAPI_STEREO_SWAPCHAIN_MONO |
NVAPI_OK | The swap chain creation was successful |
NVAPI_ERROR | The operation failed. |
NVAPI_INTERFACE NvAPI_Stereo_Activate | ( | StereoHandle | stereoHandle | ) |
DESCRIPTION: This API activates stereo for the device interface corresponding to the given stereo handle. Activating stereo is possible only if stereo was enabled previously in the registry. If stereo is not activated, then calls to functions that require that stereo is activated have no effect, and will return the appropriate error code.
WHEN TO USE: After the stereo handle for the device interface is created via successfull call to the appropriate NvAPI_Stereo_CreateHandleFrom() function.
SUPPORTED OS: Windows 7 and higher
[in] | stereoHandle | Stereo handle corresponding to the device interface. |
NVAPI_OK | Stereo is turned on. |
NVAPI_STEREO_INVALID_DEVICE_INTERFACE | Device interface is not valid. Create again, then attach again. |
NVAPI_API_NOT_INTIALIZED | |
NVAPI_STEREO_NOT_INITIALIZED | Stereo part of NVAPI not initialized. |
NVAPI_ERROR |
NVAPI_INTERFACE NvAPI_Stereo_CaptureJpegImage | ( | StereoHandle | stereoHandle, |
NvU32 | quality | ||
) |
DESCRIPTION: This API captures the current stereo image in JPEG stereo format with the given quality. Only the last capture call per flip will be effective.
WHEN TO USE: After the stereo handle for the device interface is created via successfull call to the appropriate NvAPI_Stereo_CreateHandleFrom() function.
SUPPORTED OS: Windows 7 and higher
[in] | stereoHandle | Stereo handle that corresponds to the device interface. |
[in] | quality | Quality of the JPEG image to be captured. Integer value betweeen 0 and 100. |
NVAPI_OK | Image captured. |
NVAPI_STEREO_INVALID_DEVICE_INTERFACE | Device interface is not valid. Create again, then attach again. |
NVAPI_API_NOT_INTIALIZED | |
NVAPI_STEREO_NOT_INITIALIZED | |
NVAPI_STEREO_PARAMETER_OUT_OF_RANGE | Given quality is out of [0..100] range. |
NVAPI_ERROR |
NVAPI_INTERFACE NvAPI_Stereo_CapturePngImage | ( | StereoHandle | stereoHandle | ) |
DESCRIPTION: This API captures the current stereo image in PNG stereo format. Only the last capture call per flip will be effective.
WHEN TO USE: After the stereo handle for the device interface is created via successfull call to the appropriate NvAPI_Stereo_CreateHandleFrom() function.
SUPPORTED OS: Windows 7 and higher
[in] | stereoHandle | Stereo handle corresponding to the device interface. |
NVAPI_OK | Image captured. |
NVAPI_STEREO_INVALID_DEVICE_INTERFACE | Device interface is not valid. Create again, then attach again. |
NVAPI_API_NOT_INTIALIZED | |
NVAPI_STEREO_NOT_INITIALIZED | Stereo part of NVAPI not initialized. |
NVAPI_ERROR |
NvAPI_Stereo_CreateConfigurationProfileRegistryKey | ( | NV_STEREO_REGISTRY_PROFILE_TYPE | registryProfileType | ) |
DESCRIPTION: Creates new configuration registry key for current application.
If there is no configuration profile prior to the function call, this API tries to create a new configuration profile registry key for a given application and fill it with the default values. If an application already has a configuration profile registry key, the API does nothing. The name of the key is automatically set to the name of the executable that calls this function. Because of this, the executable should have a distinct and unique name. If the application is using only one version of DirectX, then the default profile type will be appropriate. If the application is using more than one version of DirectX from the same executable, it should use the appropriate profile type for each configuration profile.
HOW TO USE: When there is a need for an application to have default stereo parameter values, use this function to create a key to store the values.
SUPPORTED OS: Windows 7 and higher
[in] | registryProfileType | Type of profile the application wants to create. It should be one of the symbolic constants defined in NV_STEREO_REGISTRY_PROFILE_TYPE. Any other value will cause function to do nothing and return ::NV_STEREO_REGISTRY_PROFILE_TYPE_NOT_SUPPORTED. |
NVAPI_OK | Key exists in the registry. |
NVAPI_STEREO_REGISTRY_PROFILE_TYPE_NOT_SUPPORTED | This profile type is not supported. |
NVAPI_STEREO_REGISTRY_ACCESS_FAILED | Access to registry failed. |
NVAPI_API_NOT_INTIALIZED | |
NVAPI_STEREO_NOT_INITIALIZED | Stereo part of NVAPI not initialized. |
NVAPI_ERROR |
NVAPI_INTERFACE NvAPI_Stereo_CreateHandleFromIUnknown | ( | IUnknown * | pDevice, |
StereoHandle * | pStereoHandle | ||
) |
DESCRIPTION: This API creates a stereo handle that is used in subsequent calls related to a given device interface. This must be called before any other NvAPI_Stereo_ function for that handle. Multiple devices can be used at one time using multiple calls to this function (one per each device).
HOW TO USE: After the Direct3D device is created, create the stereo handle. On call success:
WHEN TO USE: After the stereo handle for the device interface is created via successfull call to the appropriate NvAPI_Stereo_CreateHandleFrom() function.
SUPPORTED OS: Windows 7 and higher
[in] | pDevice | Pointer to IUnknown interface that is IDirect3DDevice9* in DX9, ID3D10Device*. |
[out] | pStereoHandle | Pointer to the newly created stereo handle. |
NVAPI_OK | Stereo handle is created for given device interface. |
NVAPI_INVALID_ARGUMENT | Provided device interface is invalid. |
NVAPI_API_NOT_INTIALIZED | |
NVAPI_STEREO_NOT_INITIALIZED | Stereo part of NVAPI not initialized. |
NVAPI_ERROR |
NVAPI_INTERFACE NvAPI_Stereo_Deactivate | ( | StereoHandle | stereoHandle | ) |
DESCRIPTION: This API deactivates stereo for the given device interface. If stereo is not activated, then calls to functions that require that stereo is activated have no effect, and will return the appropriate error code.
WHEN TO USE: After the stereo handle for the device interface is created via successfull call to the appropriate NvAPI_Stereo_CreateHandleFrom() function.
SUPPORTED OS: Windows 7 and higher
[in] | stereoHandle | Stereo handle that corresponds to the device interface. |
NVAPI_OK | Stereo is turned off. |
NVAPI_STEREO_INVALID_DEVICE_INTERFACE | Device interface is not valid. Create again, then attach again. |
NVAPI_API_NOT_INTIALIZED | |
NVAPI_STEREO_NOT_INITIALIZED | Stereo part of NVAPI not initialized. |
NVAPI_ERROR |
NVAPI_INTERFACE NvAPI_Stereo_Debug_WasLastDrawStereoized | ( | __in StereoHandle | hStereoHandle, |
__out NvU8 * | pWasStereoized | ||
) |
[in] | hStereoHandle | Stereo handle that corresponds to the device interface. |
[out] | pWasStereoized | Address where result of the inquiry will be placed. |
SUPPORTED OS: Windows 7 and higher
DESCRIPTION: This API checks if the last draw call was stereoized. It is a very expensive to call and should be used for debugging purpose only.
WHEN TO USE: After the stereo handle for device interface is created via successful call to appropriate NvAPI_Stereo_CreateHandleFrom function.
NVAPI_INTERFACE NvAPI_Stereo_DecreaseConvergence | ( | StereoHandle | stereoHandle | ) |
DESCRIPTION: This API decreases convergence for the given device interface (just like the Ctrl+F5 hotkey).
WHEN TO USE: After the stereo handle for the device interface is created via successfull call to the appropriate NvAPI_Stereo_CreateHandleFrom() function.
SUPPORTED OS: Windows 7 and higher
[in] | stereoHandle | Stereo handle that corresponds to the device interface. |
NVAPI_OK | - Decrease of convergence was successfull. |
NVAPI_STEREO_INVALID_DEVICE_INTERFACE | - Device interface is not valid. Create again, then attach again. |
NVAPI_API_NOT_INTIALIZED | - NVAPI not initialized. |
NVAPI_STEREO_NOT_INITIALIZED | - Stereo part of NVAPI not initialized. |
NVAPI_ERROR | - Something is wrong (generic error). |
NVAPI_INTERFACE NvAPI_Stereo_DecreaseSeparation | ( | StereoHandle | stereoHandle | ) |
DESCRIPTION: This API decreases separation for the given device interface (just like the Ctrl+F3 hotkey).
WHEN TO USE: After the stereo handle for device interface is created via successfull call to the appropriate NvAPI_Stereo_CreateHandleFrom() function.
SUPPORTED OS: Windows 7 and higher
[in] | stereoHandle | Stereo handle that corresponds to the device interface. |
NVAPI_OK | - Decrease of separation percentage was successfull. |
NVAPI_STEREO_INVALID_DEVICE_INTERFACE | - Device interface is not valid. Create again, then attach again. |
NVAPI_API_NOT_INTIALIZED | - NVAPI not initialized. |
NVAPI_STEREO_NOT_INITIALIZED | - Stereo part of NVAPI not initialized. |
NVAPI_ERROR | - Something is wrong (generic error). |
NVAPI_INTERFACE NvAPI_Stereo_DeleteConfigurationProfileRegistryKey | ( | NV_STEREO_REGISTRY_PROFILE_TYPE | registryProfileType | ) |
DESCRIPTION: Removes configuration registry key for current application.
If an application already has a configuration profile prior to this function call, the function attempts to remove the application's configuration profile registry key from the registry. If there is no configuration profile registry key prior to the function call, the function does nothing and does not report an error.
SUPPORTED OS: Windows 7 and higher
[in] | registryProfileType | Type of profile that the application wants to delete. This should be one of the symbolic constants defined in NV_STEREO_REGISTRY_PROFILE_TYPE. Any other value will cause the function to do nothing and return ::NV_STEREO_REGISTRY_PROFILE_TYPE_NOT_SUPPORTED. |
NVAPI_OK | Key does not exist in the registry any more. |
NVAPI_STEREO_REGISTRY_PROFILE_TYPE_NOT_SUPPORTED | This profile type is not supported. |
NVAPI_STEREO_REGISTRY_ACCESS_FAILED | Access to registry failed. |
NVAPI_API_NOT_INTIALIZED | NVAPI is not initialized. |
NVAPI_STEREO_NOT_INITIALIZED | Stereo part of NVAPI is not initialized. |
NVAPI_ERROR |
NVAPI_INTERFACE NvAPI_Stereo_DeleteConfigurationProfileValue | ( | NV_STEREO_REGISTRY_PROFILE_TYPE | registryProfileType, |
NV_STEREO_REGISTRY_ID | valueRegistryID | ||
) |
DESCRIPTION: This API removes the given value from the application's configuration profile registry key. If there is no such value, the function does nothing and does not report an error.
SUPPORTED OS: Windows 7 and higher
[in] | registryProfileType | The type of profile the application wants to access. It should be one of the symbolic constants defined in NV_STEREO_REGISTRY_PROFILE_TYPE. Any other value will cause function to do nothing and return ::NV_STEREO_REGISTRY_PROFILE_TYPE_NOT_SUPPORTED. |
[in] | valueRegistryID | ID of the value that is being deleted. It should be one of the symbolic constants defined in NV_STEREO_REGISTRY_PROFILE_TYPE. Any other value will cause function to do nothing and return NVAPI_STEREO_REGISTRY_VALUE_NOT_SUPPORTED. |
NVAPI_OK | Value does not exist in registry any more. |
NVAPI_STEREO_REGISTRY_PROFILE_TYPE_NOT_SUPPORTED | This profile type is not supported. |
NVAPI_STEREO_REGISTRY_VALUE_NOT_SUPPORTED | This value is not supported. |
NVAPI_STEREO_REGISTRY_ACCESS_FAILED | Access to registry failed. |
NVAPI_API_NOT_INTIALIZED | |
NVAPI_STEREO_NOT_INITIALIZED | Stereo part of NVAPI not initialized. |
NVAPI_ERROR |
NVAPI_INTERFACE NvAPI_Stereo_DestroyHandle | ( | StereoHandle | stereoHandle | ) |
DESCRIPTION: This API destroys the stereo handle created with one of the NvAPI_Stereo_CreateHandleFrom() functions. This should be called after the device corresponding to the handle has been destroyed.
SUPPORTED OS: Windows 7 and higher
[in] | stereoHandle | Stereo handle that is to be destroyed. |
NVAPI_OK | Stereo handle is destroyed. |
NVAPI_API_NOT_INTIALIZED | |
NVAPI_STEREO_NOT_INITIALIZED | Stereo part of NVAPI not initialized. |
NVAPI_ERROR |
NVAPI_INTERFACE NvAPI_Stereo_Disable | ( | void | ) |
DESCRIPTION: This API disables stereo mode in the registry. Calls to this function affect the entire system. If stereo is not enabled, then calls to functions that require that stereo is enabled have no effect, and will return the appropriate error code.
SUPPORTED OS: Windows 7 and higher
NVAPI_OK | Stereo is now disabled. |
NVAPI_API_NOT_INTIALIZED | |
NVAPI_STEREO_NOT_INITIALIZED | Stereo part of NVAPI not initialized. |
NVAPI_ERROR |
NVAPI_INTERFACE NvAPI_Stereo_Enable | ( | void | ) |
DESCRIPTION: This APU enables stereo mode in the registry. Calls to this function affect the entire system. If stereo is not enabled, then calls to functions that require that stereo is enabled have no effect, and will return the appropriate error code.
SUPPORTED OS: Windows 7 and higher
NVAPI_OK | Stereo is now enabled. |
NVAPI_API_NOT_INTIALIZED | |
NVAPI_STEREO_NOT_INITIALIZED | Stereo part of NVAPI not initialized. |
NVAPI_ERROR |
NVAPI_INTERFACE NvAPI_Stereo_GetConvergence | ( | StereoHandle | stereoHandle, |
float * | pConvergence | ||
) |
DESCRIPTION: This API gets the current convergence value.
WHEN TO USE: After the stereo handle for the device interface is created via successfull call to the appropriate NvAPI_Stereo_CreateHandleFrom() function.
SUPPORTED OS: Windows 7 and higher
[in] | stereoHandle | Stereo handle that corresponds to the device interface. |
[out] | pConvergence | Address of float type variable to store current convergence value in. |
NVAPI_OK | Retrieval of convergence value was successfull. |
NVAPI_STEREO_INVALID_DEVICE_INTERFACE | Device interface is not valid. Create again, then attach again. |
NVAPI_API_NOT_INTIALIZED | |
NVAPI_STEREO_NOT_INITIALIZED | Stereo part of NVAPI not initialized. |
NVAPI_ERROR |
NVAPI_INTERFACE NvAPI_Stereo_GetDefaultProfile | ( | __in NvU32 | cbSizeIn, |
__out_bcount_part_opt(cbSizeIn, *pcbSizeOut) char * | szProfileName, | ||
__out NvU32 * | pcbSizeOut | ||
) |
SUPPORTED OS: Windows 7 and higher
DESCRIPTION: This API retrieves the current default stereo profile.
After call cbSizeOut contain 0 if default profile is not set required buffer size cbSizeOut. To get needed buffer size this function can be called with szProfileName==0 and cbSizeIn == 0.
WHEN TO USE: This API can be called at any time.
[in] | cbSizeIn | Size of buffer allocated for default stereo profile name. |
[out] | szProfileName | Default stereo profile name. |
[out] | pcbSizeOut | Required buffer size. |
NVAPI_SUCCESS | - Default stereo profile name has been copied into szProfileName. |
NVAPI_DEFAULT_STEREO_PROFILE_IS_NOT_DEFINED | - There is no default stereo profile set at this time. |
NVAPI_INVALID_ARGUMENT | - pcbSizeOut == 0 or cbSizeIn >= *pcbSizeOut && szProfileName == 0 |
NVAPI_INSUFFICIENT_BUFFER | - cbSizeIn < *pcbSizeOut |
NVAPI_INTERFACE NvAPI_Stereo_GetEyeSeparation | ( | StereoHandle | hStereoHandle, |
float * | pSeparation | ||
) |
DESCRIPTION: This API returns eye separation as a ratio of <between eye distance>/<physical screen width>.
HOW TO USE: After the stereo handle for device interface is created via successfull call to appropriate API. Applies only to DirectX 9 and up.
SUPPORTED OS: Windows 7 and higher
[in] | stereoHandle | Stereo handle that corresponds to the device interface. |
[out] | pSeparation | Eye separation. |
NVAPI_OK | Active eye is set. |
NVAPI_STEREO_INVALID_DEVICE_INTERFACE | Device interface is not valid. Create again, then attach again. |
NVAPI_API_NOT_INTIALIZED | NVAPI not initialized. |
NVAPI_STEREO_NOT_INITIALIZED | Stereo part of NVAPI not initialized. |
NVAPI_ERROR | (generic error). |
NvAPI_Stereo_GetFrustumAdjustMode | ( | StereoHandle | stereoHandle, |
NV_FRUSTUM_ADJUST_MODE * | pFrustumAdjustMode | ||
) |
DESCRIPTION: This API gets the current frustum adjust mode value.
WHEN TO USE: After the stereo handle for the device interface is created via successfull call to the appropriate NvAPI_Stereo_CreateHandleFrom() function.
SUPPORTED OS: Windows 7 and higher
[in] | stereoHandle | Stereo handle that corresponds to the device interface. |
[out] | pFrustumAdjustMode | Address of the NV_FRUSTUM_ADJUST_MODE type variable to store current frustum value in. |
NVAPI_OK | - Retrieval of frustum adjust mode was successfull. |
NVAPI_STEREO_INVALID_DEVICE_INTERFACE | - Device interface is not valid. Create again, then attach again. |
NVAPI_API_NOT_INTIALIZED | - NVAPI not initialized. |
NVAPI_STEREO_NOT_INITIALIZED | - Stereo part of NVAPI not initialized. |
NVAPI_ERROR | - Something is wrong (generic error). |
NVAPI_INTERFACE NvAPI_Stereo_GetSeparation | ( | StereoHandle | stereoHandle, |
float * | pSeparationPercentage | ||
) |
DESCRIPTION: This API gets current separation value (in percents).
WHEN TO USE: After the stereo handle for the device interface is created via successfull call to the appropriate NvAPI_Stereo_CreateHandleFrom() function.
SUPPORTED OS: Windows 7 and higher
[in] | stereoHandle | Stereo handle that corresponds to the device interface. |
[out] | pSeparationPercentage | Address of float type variable to store current separation percentage in. |
NVAPI_OK | Retrieval of separation percentage was successfull. |
NVAPI_STEREO_INVALID_DEVICE_INTERFACE | Device interface is not valid. Create again, then attach again. |
NVAPI_API_NOT_INTIALIZED | |
NVAPI_STEREO_NOT_INITIALIZED | Stereo part of NVAPI not initialized. |
NVAPI_ERROR |
NVAPI_INTERFACE NvAPI_Stereo_GetStereoSupport | ( | __in NvMonitorHandle | hMonitor, |
__out NVAPI_STEREO_CAPS * | pCaps | ||
) |
DESCRIPTION: This API checks what kind of stereo support is currently supported on a particular display. If the the display is prohibited from showing stereo (e.g. secondary in a multi-mon setup), we will return 0 for all stereo modes (full screen exclusive, automatic windowed, persistent windowed). Otherwise, we will check which stereo mode is supported. On 120Hz display, this will be what the user chooses in control panel. On HDMI 1.4 display, persistent windowed mode is always assumed to be supported. Note that this function does not check if the CURRENT RESOLUTION/REFRESH RATE can support stereo. For HDMI 1.4, it is the app's responsibility to change the resolution/refresh rate to one that is 3D compatible. For 120Hz, the driver will ALWAYS force 120Hz anyway.
SUPPORTED OS: Windows 7 and higher
[in] | hMonitor | handle to monitor that app is going to run on |
[out] | pCaps | Address where the result of the inquiry will be placed. *pCaps is defined in NVAPI_STEREO_CAPS. |
NVAPI_OK |
NVAPI_INTERFACE NvAPI_Stereo_GetSurfaceCreationMode | ( | __in StereoHandle | hStereoHandle, |
__in NVAPI_STEREO_SURFACECREATEMODE * | pCreationMode | ||
) |
\function NvAPI_Stereo_GetSurfaceCreationMode(StereoHandle hStereoHandle, NVAPI_STEREO_SURFACECREATEMODE* pCreationMode)
[in] | hStereoHandle | Stereo handle that corresponds to the device interface. |
[out] | pCreationMode | The current creation mode for this device interface. |
SUPPORTED OS: Windows 7 and higher
DESCRIPTION: This API gets surface creation mode for this device interface.
WHEN TO USE: After the stereo handle for device interface is created via successful call to appropriate NvAPI_Stereo_CreateHandleFrom function.
NVAPI_INTERFACE NvAPI_Stereo_IncreaseConvergence | ( | StereoHandle | stereoHandle | ) |
DESCRIPTION: This API increases convergence for given the device interface (just like the Ctrl+F5 hotkey).
WHEN TO USE: After the stereo handle for the device interface is created via successfull call to the appropriate NvAPI_Stereo_CreateHandleFrom() function.
SUPPORTED OS: Windows 7 and higher
[in] | stereoHandle | Stereo handle that corresponds to the device interface. |
NVAPI_OK | Increase of convergence was successfull. |
NVAPI_STEREO_INVALID_DEVICE_INTERFACE | Device interface is not valid. Create again, then attach again. |
NVAPI_API_NOT_INTIALIZED | |
NVAPI_STEREO_NOT_INITIALIZED | Stereo part of NVAPI not initialized. |
NVAPI_ERROR |
NVAPI_INTERFACE NvAPI_Stereo_IncreaseSeparation | ( | StereoHandle | stereoHandle | ) |
DESCRIPTION: This API increases separation for the given device interface (just like the Ctrl+F4 hotkey).
WHEN TO USE: After the stereo handle for the device interface is created via successfull call to the appropriate NvAPI_Stereo_CreateHandleFrom() function.
SUPPORTED OS: Windows 7 and higher
[in] | stereoHandle | Stereo handle that corresponds to the device interface. |
NVAPI_OK | Increase of separation percentage was successfull. |
NVAPI_STEREO_INVALID_DEVICE_INTERFACE | Device interface is not valid. Create again, then attach again. |
NVAPI_API_NOT_INTIALIZED | NVAPI not initialized. |
NVAPI_STEREO_NOT_INITIALIZED | Stereo part of NVAPI not initialized. |
NVAPI_ERROR | Something is wrong (generic error). |
NVAPI_INTERFACE NvAPI_Stereo_InitActivation | ( | __in StereoHandle | hStereoHandle, |
__in NVAPI_STEREO_INIT_ACTIVATION_FLAGS | flags | ||
) |
NVAPI_INTERFACE NvAPI_Stereo_IsActivated | ( | StereoHandle | stereoHandle, |
NvU8 * | pIsStereoOn | ||
) |
DESCRIPTION: This API checks if stereo is activated for the given device interface.
WHEN TO USE: After the stereo handle for the device interface is created via successfull call to the appropriate NvAPI_Stereo_CreateHandleFrom() function.
SUPPORTED OS: Windows 7 and higher
[in] | stereoHandle | Stereo handle that corresponds to the device interface. |
[in] | pIsStereoOn | Address where result of the inquiry will be placed. |
NVAPI_OK | - Check was sucessfully completed and result reflects current state of stereo (on/off). |
NVAPI_STEREO_INVALID_DEVICE_INTERFACE | - Device interface is not valid. Create again, then attach again. |
NVAPI_API_NOT_INTIALIZED | - NVAPI not initialized. |
NVAPI_STEREO_NOT_INITIALIZED | - Stereo part of NVAPI not initialized. |
NVAPI_ERROR | - Something is wrong (generic error). |
NVAPI_INTERFACE NvAPI_Stereo_IsEnabled | ( | NvU8 * | pIsStereoEnabled | ) |
DESCRIPTION: This API checks if stereo mode is enabled in the registry.
SUPPORTED OS: Windows 7 and higher
[out] | pIsStereoEnabled | Address where the result of the inquiry will be placed. |
NVAPI_OK | Check was sucessfully completed and result reflects current state of stereo availability. |
NVAPI_API_NOT_INTIALIZED | |
NVAPI_STEREO_NOT_INITIALIZED | Stereo part of NVAPI not initialized. |
NVAPI_ERROR |
NVAPI_INTERFACE NvAPI_Stereo_IsWindowedModeSupported | ( | NvU8 * | bSupported | ) |
DESCRIPTION: This API returns availability of windowed mode stereo
SUPPORTED OS: Windows 7 and higher
[out] | bSupported(OUT) | != 0 - supported, == 0 - is not supported |
NVAPI_OK | Retrieval of frustum adjust mode was successfull. |
NVAPI_API_NOT_INTIALIZED | NVAPI not initialized. |
NVAPI_STEREO_NOT_INITIALIZED | Stereo part of NVAPI not initialized. |
NVAPI_ERROR | Something is wrong (generic error). |
NVAPI_INTERFACE NvAPI_Stereo_ReverseStereoBlitControl | ( | StereoHandle | hStereoHandle, |
NvU8 | TurnOn | ||
) |
DESCRIPTION: This API turns on/off reverse stereo blit.
HOW TO USE: Use after the stereo handle for the device interface is created via successfull call to the appropriate NvAPI_Stereo_CreateHandleFrom() function. After reversed stereo blit control is turned on, blits from the stereo surface will produce the right-eye image in the left side of the destination surface and the left-eye image in the right side of the destination surface.
In DirectX 9, the destination surface must be created as the render target, and StretchRect must be used. Conditions:
In DirectX 10, ResourceCopyRegion must be used. Conditions:
SUPPORTED OS: Windows 7 and higher
[in] | stereoHandle | Stereo handle corresponding to the device interface. |
[in] | TurnOn | != 0 : Turns on == 0 : Turns off |
NVAPI_OK | Retrieval of frustum adjust mode was successfull. |
NVAPI_STEREO_INVALID_DEVICE_INTERFACE | Device interface is not valid. Create again, then attach again. |
NVAPI_API_NOT_INTIALIZED | |
NVAPI_STEREO_NOT_INITIALIZED | Stereo part of NVAPI not initialized. |
NVAPI_ERROR |
NvAPI_Stereo_SetActiveEye | ( | StereoHandle | hStereoHandle, |
NV_STEREO_ACTIVE_EYE | StereoEye | ||
) |
DESCRIPTION: This API sets the back buffer to left or right in Direct stereo mode.
HOW TO USE: After the stereo handle for device interface is created via successfull call to appropriate NvAPI_Stereo_CreateHandleFrom function.
SUPPORTED OS: Windows 7 and higher
[in] | stereoHandle | Stereo handle that corresponds to the device interface. |
[in] | StereoEye | Defines active eye in Direct stereo mode |
NVAPI_OK | - Active eye is set. |
NVAPI_STEREO_INVALID_DEVICE_INTERFACE | - Device interface is not valid. Create again, then attach again. |
NVAPI_API_NOT_INTIALIZED | - NVAPI not initialized. |
NVAPI_STEREO_NOT_INITIALIZED | - Stereo part of NVAPI not initialized. |
NVAPI_INVALID_ARGUMENT | - StereoEye parameter has not allowed value. |
NVAPI_SET_NOT_ALLOWED | - Current stereo mode is not Direct |
NVAPI_ERROR | - Something is wrong (generic error). |
NvAPI_Stereo_SetConfigurationProfileValue | ( | NV_STEREO_REGISTRY_PROFILE_TYPE | registryProfileType, |
NV_STEREO_REGISTRY_ID | valueRegistryID, | ||
void * | pValue | ||
) |
DESCRIPTION: This API sets the given parameter value under the application's registry key.
If the value does not exist under the application's registry key, the value will be created under the key.
SUPPORTED OS: Windows 7 and higher
[in] | registryProfileType | The type of profile the application wants to access. It should be one of the symbolic constants defined in NV_STEREO_REGISTRY_PROFILE_TYPE. Any other value will cause function to do nothing and return ::NV_STEREO_REGISTRY_PROFILE_TYPE_NOT_SUPPORTED. |
[in] | valueRegistryID | ID of the value that is being set. It should be one of the symbolic constants defined in NV_STEREO_REGISTRY_PROFILE_TYPE. Any other value will cause function to do nothing and return NVAPI_STEREO_REGISTRY_VALUE_NOT_SUPPORTED. |
[in] | pValue | Address of the value that is being set. It should be either address of a DWORD or of a float, dependent on the type of the stereo parameter whose value is being set. The API will then cast that address to DWORD* and write whatever is in those 4 bytes as a DWORD to the registry. |
NVAPI_OK | Value is written to registry. |
NVAPI_STEREO_REGISTRY_PROFILE_TYPE_NOT_SUPPORTED | This profile type is not supported. |
NVAPI_STEREO_REGISTRY_VALUE_NOT_SUPPORTED | This value is not supported. |
NVAPI_STEREO_REGISTRY_ACCESS_FAILED | Access to registry failed. |
NVAPI_API_NOT_INTIALIZED | NVAPI is not initialized. |
NVAPI_STEREO_NOT_INITIALIZED | Stereo part of NVAPI is not initialized. |
NVAPI_ERROR | Something is wrong (generic error). |
NVAPI_INTERFACE NvAPI_Stereo_SetConvergence | ( | StereoHandle | stereoHandle, |
float | newConvergence | ||
) |
DESCRIPTION: This API sets convergence to the given value.
WHEN TO USE: After the stereo handle for the device interface is created via successfull call to the appropriate NvAPI_Stereo_CreateHandleFrom() function.
SUPPORTED OS: Windows 7 and higher
[in] | stereoHandle | Stereo handle that corresponds to the device interface. |
[in] | newConvergence | New value for convergence. |
NVAPI_OK | Setting of convergence value was successfull. |
NVAPI_STEREO_INVALID_DEVICE_INTERFACE | Device interface is not valid. Create again, then attach again. |
NVAPI_API_NOT_INTIALIZED | |
NVAPI_STEREO_NOT_INITIALIZED | Stereo part of NVAPI not initialized. |
NVAPI_ERROR |
NVAPI_INTERFACE NvAPI_Stereo_SetDefaultProfile | ( | __in const char * | szProfileName | ) |
SUPPORTED OS: Windows 7 and higher
DESCRIPTION: This API defines the stereo profile used by the driver in case the application has no associated profile.
WHEN TO USE: To take effect, this API must be called before D3D device is created. Calling once a device has been created will not affect the current device.
[in] | szProfileName | Default profile name. |
NVAPI_SUCCESS | - Default stereo profile name has been copied into szProfileName. |
NVAPI_INVALID_ARGUMENT | - szProfileName == NULL. |
NVAPI_DEFAULT_STEREO_PROFILE_DOES_NOT_EXIST | - Default stereo profile does not exist |
NvAPI_Stereo_SetDriverMode | ( | NV_STEREO_DRIVER_MODE | mode | ) |
DESCRIPTION: This API sets the 3D stereo driver mode: Direct or Automatic
HOW TO USE: This API must be called before the device is created. Applies to DirectX 9 and higher.
SUPPORTED OS: Windows 7 and higher
[in] | mode | Defines the 3D stereo driver mode: Direct or Automatic |
NVAPI_OK | Active eye is set. |
NVAPI_API_NOT_INTIALIZED | NVAPI not initialized. |
NVAPI_STEREO_NOT_INITIALIZED | Stereo part of NVAPI not initialized. |
NVAPI_INVALID_ARGUMENT | mode parameter has not allowed value. |
NVAPI_ERROR | Something is wrong (generic error). |
NVAPI_INTERFACE NvAPI_Stereo_SetFrustumAdjustMode | ( | StereoHandle | stereoHandle, |
NV_FRUSTUM_ADJUST_MODE | newFrustumAdjustModeValue | ||
) |
DESCRIPTION: This API sets the current frustum adjust mode value.
WHEN TO USE: After the stereo handle for the device interface is created via successfull call to the appropriate NvAPI_Stereo_CreateHandleFrom() function.
SUPPORTED OS: Windows 7 and higher
[in] | stereoHandle | Stereo handle that corresponds to the device interface. |
[in] | newFrustumAdjustModeValue | New value for frustum adjust mode. It should be one of the symbolic constants defined in NV_FRUSTUM_ADJUST_MODE. Any other value will cause function to do nothing and return NVAPI_STEREO_FRUSTUM_ADJUST_MODE_NOT_SUPPORTED. |
NVAPI_OK | Retrieval of frustum adjust mode was successfull. |
NVAPI_STEREO_INVALID_DEVICE_INTERFACE | Device interface is not valid. Create again, then attach again. |
NVAPI_API_NOT_INTIALIZED | |
NVAPI_STEREO_NOT_INITIALIZED | Stereo part of NVAPI not initialized. |
NVAPI_STEREO_FRUSTUM_ADJUST_MODE_NOT_SUPPORTED | Given frustum adjust mode is not supported. |
NVAPI_ERROR |
NVAPI_INTERFACE NvAPI_Stereo_SetNotificationMessage | ( | StereoHandle | hStereoHandle, |
NvU64 | hWnd, | ||
NvU64 | messageID | ||
) |
DESCRIPTION: This API is a Setup notification message that the stereo driver uses to notify the application when the user changes the stereo driver state.
When the user changes the stereo state (Activated or Deactivated, separation or conversion) the stereo driver posts a defined message with the following parameters:
lParam is the current conversion. (Actual conversion is *(float*)&lParam )
wParam == MAKEWPARAM(l, h) where
Call this API with NULL hWnd to prohibit notification.
WHEN TO USE: Use after the stereo handle for device interface is created via successful call to appropriate NvAPI_Stereo_CreateHandleFrom() function.
SUPPORTED OS: Windows 7 and higher
[in] | stereoHandle | Stereo handle corresponding to the device interface. |
[in] | hWnd | Window HWND that will be notified when the user changes the stereo driver state. Actual HWND must be cast to an NvU64. |
[in] | messageID | MessageID of the message that will be posted to hWnd |
NVAPI_OK | Notification set. |
NVAPI_STEREO_INVALID_DEVICE_INTERFACE | Device interface is not valid. Create again, then attach again. |
NVAPI_API_NOT_INTIALIZED | |
NVAPI_STEREO_NOT_INITIALIZED | Stereo part of NVAPI not initialized. |
NVAPI_ERROR |
NVAPI_INTERFACE NvAPI_Stereo_SetSeparation | ( | StereoHandle | stereoHandle, |
float | newSeparationPercentage | ||
) |
DESCRIPTION: This API sets separation to given percentage.
WHEN TO USE: After the stereo handle for the device interface is created via successfull call to appropriate NvAPI_Stereo_CreateHandleFrom() function.
SUPPORTED OS: Windows 7 and higher
[in] | stereoHandle | Stereo handle that corresponds to the device interface. |
[in] | newSeparationPercentage | New value for separation percentage. |
NVAPI_OK | Setting of separation percentage was successfull. |
NVAPI_STEREO_INVALID_DEVICE_INTERFACE | Device interface is not valid. Create again, then attach again. |
NVAPI_API_NOT_INTIALIZED | NVAPI not initialized. |
NVAPI_STEREO_NOT_INITIALIZED | Stereo part of NVAPI not initialized. |
NVAPI_STEREO_PARAMETER_OUT_OF_RANGE | Given separation percentage is out of [0..100] range. |
NVAPI_ERROR |
NVAPI_INTERFACE NvAPI_Stereo_SetSurfaceCreationMode | ( | __in StereoHandle | hStereoHandle, |
__in NVAPI_STEREO_SURFACECREATEMODE | creationMode | ||
) |
NVAPI_INTERFACE NvAPI_Stereo_Trigger_Activation | ( | __in StereoHandle | hStereoHandle | ) |
DESCRIPTION: This API allows an application to trigger creation of a stereo desktop, in case the creation was stopped on application launch.
SUPPORTED OS: Windows 7 and higher
[in] | stereoHandle | Stereo handle that corresponds to the device interface. |
NVAPI_STEREO_INIT_ACTIVATION_NOT_DONE | - Stereo InitActivation not called. |
NVAPI_STEREO_NOT_INITIALIZED | - Stereo part of NVAPI not initialized. |