Counter Strike : Global Offensive Source Code
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

600 lines
31 KiB

  1. /************************************************************************************************************************************\
  2. |* *|
  3. |* Copyright 2012 NVIDIA Corporation. All rights reserved. *|
  4. |* *|
  5. |* NOTICE TO USER: *|
  6. |* *|
  7. |* This software is subject to NVIDIA ownership rights under U.S. and international Copyright laws. *|
  8. |* *|
  9. |* This software and the information contained herein are PROPRIETARY and CONFIDENTIAL to NVIDIA *|
  10. |* and are being provided solely under the terms and conditions of an NVIDIA software license agreement. *|
  11. |* Otherwise, you have no rights to use or access this software in any manner. *|
  12. |* *|
  13. |* If not covered by the applicable NVIDIA software license agreement: *|
  14. |* NVIDIA MAKES NO REPRESENTATION ABOUT THE SUITABILITY OF THIS SOFTWARE FOR ANY PURPOSE. *|
  15. |* IT IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY OF ANY KIND. *|
  16. |* NVIDIA DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, *|
  17. |* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE. *|
  18. |* IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, *|
  19. |* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, *|
  20. |* NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOURCE CODE. *|
  21. |* *|
  22. |* U.S. Government End Users. *|
  23. |* This software is a "commercial item" as that term is defined at 48 C.F.R. 2.101 (OCT 1995), *|
  24. |* consisting of "commercial computer software" and "commercial computer software documentation" *|
  25. |* as such terms are used in 48 C.F.R. 12.212 (SEPT 1995) and is provided to the U.S. Government only as a commercial end item. *|
  26. |* Consistent with 48 C.F.R.12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (JUNE 1995), *|
  27. |* all U.S. Government End Users acquire the software with only those rights set forth herein. *|
  28. |* *|
  29. |* Any use of this software in individual and commercial software must include, *|
  30. |* in the user documentation and internal comments to the code, *|
  31. |* the above Disclaimer (as applicable) and U.S. Government End Users Notice. *|
  32. |* *|
  33. \************************************************************************************************************************************/
  34. #pragma once
  35. #include"nvapi_lite_salstart.h"
  36. #include"nvapi_lite_common.h"
  37. #pragma pack(push,8)
  38. #ifdef __cplusplus
  39. extern "C" {
  40. #endif
  41. ///////////////////////////////////////////////////////////////////////////////
  42. //
  43. // FUNCTION NAME: NvAPI_Stereo_Enable
  44. //
  45. //! DESCRIPTION: This APU enables stereo mode in the registry.
  46. //! Calls to this function affect the entire system.
  47. //! If stereo is not enabled, then calls to functions that require that stereo is enabled have no effect,
  48. //! and will return the appropriate error code.
  49. //!
  50. //! SUPPORTED OS: Windows Vista and higher
  51. //!
  52. //!
  53. //! \since Release: 180
  54. //!
  55. //! \retval ::NVAPI_OK Stereo is now enabled.
  56. //! \retval ::NVAPI_API_NOT_INTIALIZED
  57. //! \retval ::NVAPI_STEREO_NOT_INITIALIZED Stereo part of NVAPI not initialized.
  58. //! \retval ::NVAPI_ERROR
  59. //!
  60. //! \ingroup stereoapi
  61. ///////////////////////////////////////////////////////////////////////////////
  62. NVAPI_INTERFACE NvAPI_Stereo_Enable(void);
  63. ///////////////////////////////////////////////////////////////////////////////
  64. //
  65. // FUNCTION NAME: NvAPI_Stereo_Disable
  66. //
  67. //! DESCRIPTION: This API disables stereo mode in the registry.
  68. //! Calls to this function affect the entire system.
  69. //! If stereo is not enabled, then calls to functions that require that stereo is enabled have no effect,
  70. //! and will return the appropriate error code.
  71. //!
  72. //! SUPPORTED OS: Windows Vista and higher
  73. //!
  74. //!
  75. //! \since Release: 180
  76. //!
  77. //! \retval ::NVAPI_OK Stereo is now disabled.
  78. //! \retval ::NVAPI_API_NOT_INTIALIZED
  79. //! \retval ::NVAPI_STEREO_NOT_INITIALIZED Stereo part of NVAPI not initialized.
  80. //! \retval ::NVAPI_ERROR
  81. //!
  82. //! \ingroup stereoapi
  83. ///////////////////////////////////////////////////////////////////////////////
  84. NVAPI_INTERFACE NvAPI_Stereo_Disable(void);
  85. ///////////////////////////////////////////////////////////////////////////////
  86. //
  87. // FUNCTION NAME: NvAPI_Stereo_IsEnabled
  88. //
  89. //! DESCRIPTION: This API checks if stereo mode is enabled in the registry.
  90. //!
  91. //! SUPPORTED OS: Windows Vista and higher
  92. //!
  93. //!
  94. //! \since Release: 180
  95. //!
  96. //! \param [out] pIsStereoEnabled Address where the result of the inquiry will be placed.
  97. //!
  98. //! \retval ::NVAPI_OK Check was sucessfully completed and result reflects current state of stereo availability.
  99. //! \retval ::NVAPI_API_NOT_INTIALIZED
  100. //! \retval ::NVAPI_STEREO_NOT_INITIALIZED Stereo part of NVAPI not initialized.
  101. //! \retval ::NVAPI_ERROR
  102. //!
  103. //! \ingroup stereoapi
  104. ///////////////////////////////////////////////////////////////////////////////
  105. NVAPI_INTERFACE NvAPI_Stereo_IsEnabled(NvU8 *pIsStereoEnabled);
  106. #if defined(_D3D9_H_) || defined(__d3d10_h__) || defined(__d3d11_h__)
  107. ///////////////////////////////////////////////////////////////////////////////
  108. //
  109. // FUNCTION NAME: NvAPI_Stereo_CreateHandleFromIUnknown
  110. //
  111. //! DESCRIPTION: This API creates a stereo handle that is used in subsequent calls related to a given device interface.
  112. //! This must be called before any other NvAPI_Stereo_ function for that handle.
  113. //! Multiple devices can be used at one time using multiple calls to this function (one per each device).
  114. //!
  115. //! HOW TO USE: After the Direct3D device is created, create the stereo handle.
  116. //! On call success:
  117. //! -# Use all other NvAPI_Stereo_ functions that have stereo handle as first parameter.
  118. //! -# After the device interface that corresponds to the the stereo handle is destroyed,
  119. //! the application should call NvAPI_DestroyStereoHandle() for that stereo handle.
  120. //!
  121. //! WHEN TO USE: After the stereo handle for the device interface is created via successfull call to the appropriate NvAPI_Stereo_CreateHandleFrom() function.
  122. //!
  123. //! SUPPORTED OS: Windows Vista and higher
  124. //!
  125. //!
  126. //! \since Release: 180
  127. //!
  128. //! \param [in] pDevice Pointer to IUnknown interface that is IDirect3DDevice9* in DX9, ID3D10Device*.
  129. //! \param [out] pStereoHandle Pointer to the newly created stereo handle.
  130. //!
  131. //! \retval ::NVAPI_OK Stereo handle is created for given device interface.
  132. //! \retval ::NVAPI_INVALID_ARGUMENT Provided device interface is invalid.
  133. //! \retval ::NVAPI_API_NOT_INTIALIZED
  134. //! \retval ::NVAPI_STEREO_NOT_INITIALIZED Stereo part of NVAPI not initialized.
  135. //! \retval ::NVAPI_ERROR
  136. //!
  137. //! \ingroup stereoapi
  138. ///////////////////////////////////////////////////////////////////////////////
  139. NVAPI_INTERFACE NvAPI_Stereo_CreateHandleFromIUnknown(IUnknown *pDevice, StereoHandle *pStereoHandle);
  140. #endif // defined(_D3D9_H_) || defined(__d3d10_h__)
  141. ///////////////////////////////////////////////////////////////////////////////
  142. //
  143. // FUNCTION NAME: NvAPI_Stereo_DestroyHandle
  144. //
  145. //! DESCRIPTION: This API destroys the stereo handle created with one of the NvAPI_Stereo_CreateHandleFrom() functions.
  146. //! This should be called after the device corresponding to the handle has been destroyed.
  147. //!
  148. //! SUPPORTED OS: Windows Vista and higher
  149. //!
  150. //!
  151. //! \since Release: 180
  152. //!
  153. //! \param [in] stereoHandle Stereo handle that is to be destroyed.
  154. //!
  155. //! \retval ::NVAPI_OK Stereo handle is destroyed.
  156. //! \retval ::NVAPI_API_NOT_INTIALIZED
  157. //! \retval ::NVAPI_STEREO_NOT_INITIALIZED Stereo part of NVAPI not initialized.
  158. //! \retval ::NVAPI_ERROR
  159. //!
  160. //! \ingroup stereoapi
  161. ///////////////////////////////////////////////////////////////////////////////
  162. NVAPI_INTERFACE NvAPI_Stereo_DestroyHandle(StereoHandle stereoHandle);
  163. ///////////////////////////////////////////////////////////////////////////////
  164. //
  165. // FUNCTION NAME: NvAPI_Stereo_Activate
  166. //
  167. //! DESCRIPTION: This API activates stereo for the device interface corresponding to the given stereo handle.
  168. //! Activating stereo is possible only if stereo was enabled previously in the registry.
  169. //! If stereo is not activated, then calls to functions that require that stereo is activated have no effect,
  170. //! and will return the appropriate error code.
  171. //!
  172. //! WHEN TO USE: After the stereo handle for the device interface is created via successfull call to the appropriate NvAPI_Stereo_CreateHandleFrom() function.
  173. //!
  174. //! SUPPORTED OS: Windows Vista and higher
  175. //!
  176. //!
  177. //! \since Release: 180
  178. //!
  179. //! \param [in] stereoHandle Stereo handle corresponding to the device interface.
  180. //!
  181. //! \retval ::NVAPI_OK Stereo is turned on.
  182. //! \retval ::NVAPI_STEREO_INVALID_DEVICE_INTERFACE Device interface is not valid. Create again, then attach again.
  183. //! \retval ::NVAPI_API_NOT_INTIALIZED
  184. //! \retval ::NVAPI_STEREO_NOT_INITIALIZED Stereo part of NVAPI not initialized.
  185. //! \retval ::NVAPI_ERROR
  186. //!
  187. //! \ingroup stereoapi
  188. ///////////////////////////////////////////////////////////////////////////////
  189. NVAPI_INTERFACE NvAPI_Stereo_Activate(StereoHandle stereoHandle);
  190. ///////////////////////////////////////////////////////////////////////////////
  191. //
  192. // FUNCTION NAME: NvAPI_Stereo_Deactivate
  193. //
  194. //! DESCRIPTION: This API deactivates stereo for the given device interface.
  195. //! If stereo is not activated, then calls to functions that require that stereo is activated have no effect,
  196. //! and will return the appropriate error code.
  197. //!
  198. //! WHEN TO USE: After the stereo handle for the device interface is created via successfull call to the appropriate NvAPI_Stereo_CreateHandleFrom() function.
  199. //!
  200. //! SUPPORTED OS: Windows Vista and higher
  201. //!
  202. //!
  203. //! \since Release: 180
  204. //!
  205. //! \param [in] stereoHandle Stereo handle that corresponds to the device interface.
  206. //!
  207. //! \retval ::NVAPI_OK Stereo is turned off.
  208. //! \retval ::NVAPI_STEREO_INVALID_DEVICE_INTERFACE Device interface is not valid. Create again, then attach again.
  209. //! \retval ::NVAPI_API_NOT_INTIALIZED
  210. //! \retval ::NVAPI_STEREO_NOT_INITIALIZED Stereo part of NVAPI not initialized.
  211. //! \retval ::NVAPI_ERROR
  212. //!
  213. //! \ingroup stereoapi
  214. ///////////////////////////////////////////////////////////////////////////////
  215. NVAPI_INTERFACE NvAPI_Stereo_Deactivate(StereoHandle stereoHandle);
  216. ///////////////////////////////////////////////////////////////////////////////
  217. //
  218. // FUNCTION NAME: NvAPI_Stereo_IsActivated
  219. //
  220. //! DESCRIPTION: This API checks if stereo is activated for the given device interface.
  221. //!
  222. //! WHEN TO USE: After the stereo handle for the device interface is created via successfull call to the appropriate NvAPI_Stereo_CreateHandleFrom() function.
  223. //!
  224. //! SUPPORTED OS: Windows Vista and higher
  225. //!
  226. //!
  227. //! \since Release: 180
  228. //!
  229. //! \param [in] stereoHandle Stereo handle that corresponds to the device interface.
  230. //! \param [in] pIsStereoOn Address where result of the inquiry will be placed.
  231. //!
  232. //! \retval ::NVAPI_OK - Check was sucessfully completed and result reflects current state of stereo (on/off).
  233. //! \retval ::NVAPI_STEREO_INVALID_DEVICE_INTERFACE - Device interface is not valid. Create again, then attach again.
  234. //! \retval ::NVAPI_API_NOT_INTIALIZED - NVAPI not initialized.
  235. //! \retval ::NVAPI_STEREO_NOT_INITIALIZED - Stereo part of NVAPI not initialized.
  236. //! \retval ::NVAPI_ERROR - Something is wrong (generic error).
  237. //!
  238. //! \ingroup stereoapi
  239. ///////////////////////////////////////////////////////////////////////////////
  240. NVAPI_INTERFACE NvAPI_Stereo_IsActivated(StereoHandle stereoHandle, NvU8 *pIsStereoOn);
  241. ///////////////////////////////////////////////////////////////////////////////
  242. //
  243. // FUNCTION NAME: NvAPI_Stereo_GetSeparation
  244. //
  245. //! DESCRIPTION: This API gets current separation value (in percents).
  246. //!
  247. //! WHEN TO USE: After the stereo handle for the device interface is created via successfull call to the appropriate NvAPI_Stereo_CreateHandleFrom() function.
  248. //!
  249. //! SUPPORTED OS: Windows Vista and higher
  250. //!
  251. //!
  252. //! \since Release: 180
  253. //!
  254. //! \param [in] stereoHandle Stereo handle that corresponds to the device interface.
  255. //! \param [out] pSeparationPercentage Address of @c float type variable to store current separation percentage in.
  256. //!
  257. //! \retval ::NVAPI_OK Retrieval of separation percentage was successfull.
  258. //! \retval ::NVAPI_STEREO_INVALID_DEVICE_INTERFACE Device interface is not valid. Create again, then attach again.
  259. //! \retval ::NVAPI_API_NOT_INTIALIZED
  260. //! \retval ::NVAPI_STEREO_NOT_INITIALIZED Stereo part of NVAPI not initialized.
  261. //! \retval ::NVAPI_ERROR
  262. //!
  263. //! \ingroup stereoapi
  264. ///////////////////////////////////////////////////////////////////////////////
  265. NVAPI_INTERFACE NvAPI_Stereo_GetSeparation(StereoHandle stereoHandle, float *pSeparationPercentage);
  266. ///////////////////////////////////////////////////////////////////////////////
  267. //
  268. // FUNCTION NAME: NvAPI_Stereo_SetSeparation
  269. //
  270. //! DESCRIPTION: This API sets separation to given percentage.
  271. //!
  272. //! WHEN TO USE: After the stereo handle for the device interface is created via successfull call to appropriate NvAPI_Stereo_CreateHandleFrom() function.
  273. //!
  274. //! SUPPORTED OS: Windows Vista and higher
  275. //!
  276. //!
  277. //! \since Release: 180
  278. //!
  279. //! \param [in] stereoHandle Stereo handle that corresponds to the device interface.
  280. //! \param [in] newSeparationPercentage New value for separation percentage.
  281. //!
  282. //! \retval ::NVAPI_OK Setting of separation percentage was successfull.
  283. //! \retval ::NVAPI_STEREO_INVALID_DEVICE_INTERFACE Device interface is not valid. Create again, then attach again.
  284. //! \retval ::NVAPI_API_NOT_INTIALIZED NVAPI not initialized.
  285. //! \retval ::NVAPI_STEREO_NOT_INITIALIZED Stereo part of NVAPI not initialized.
  286. //! \retval ::NVAPI_STEREO_PARAMETER_OUT_OF_RANGE Given separation percentage is out of [0..100] range.
  287. //! \retval ::NVAPI_ERROR
  288. //!
  289. //! \ingroup stereoapi
  290. ///////////////////////////////////////////////////////////////////////////////
  291. NVAPI_INTERFACE NvAPI_Stereo_SetSeparation(StereoHandle stereoHandle, float newSeparationPercentage);
  292. ///////////////////////////////////////////////////////////////////////////////
  293. //
  294. // FUNCTION NAME: NvAPI_Stereo_GetConvergence
  295. //
  296. //! DESCRIPTION: This API gets the current convergence value.
  297. //!
  298. //! WHEN TO USE: After the stereo handle for the device interface is created via successfull call to the appropriate NvAPI_Stereo_CreateHandleFrom() function.
  299. //!
  300. //! SUPPORTED OS: Windows Vista and higher
  301. //!
  302. //!
  303. //! \since Release: 180
  304. //!
  305. //! \param [in] stereoHandle Stereo handle that corresponds to the device interface.
  306. //! \param [out] pConvergence Address of @c float type variable to store current convergence value in.
  307. //!
  308. //! \retval ::NVAPI_OK Retrieval of convergence value was successfull.
  309. //! \retval ::NVAPI_STEREO_INVALID_DEVICE_INTERFACE Device interface is not valid. Create again, then attach again.
  310. //! \retval ::NVAPI_API_NOT_INTIALIZED
  311. //! \retval ::NVAPI_STEREO_NOT_INITIALIZED Stereo part of NVAPI not initialized.
  312. //! \retval ::NVAPI_ERROR
  313. //!
  314. //! \ingroup stereoapi
  315. ///////////////////////////////////////////////////////////////////////////////
  316. NVAPI_INTERFACE NvAPI_Stereo_GetConvergence(StereoHandle stereoHandle, float *pConvergence);
  317. ///////////////////////////////////////////////////////////////////////////////
  318. //
  319. // FUNCTION NAME: NvAPI_Stereo_SetConvergence
  320. //
  321. //! DESCRIPTION: This API sets convergence to the given value.
  322. //!
  323. //! WHEN TO USE: After the stereo handle for the device interface is created via successfull call to the appropriate NvAPI_Stereo_CreateHandleFrom() function.
  324. //!
  325. //! SUPPORTED OS: Windows Vista and higher
  326. //!
  327. //!
  328. //! \since Release: 180
  329. //!
  330. //! \param [in] stereoHandle Stereo handle that corresponds to the device interface.
  331. //! \param [in] newConvergence New value for convergence.
  332. //!
  333. //! \retval ::NVAPI_OK Setting of convergence value was successfull.
  334. //! \retval ::NVAPI_STEREO_INVALID_DEVICE_INTERFACE Device interface is not valid. Create again, then attach again.
  335. //! \retval ::NVAPI_API_NOT_INTIALIZED
  336. //! \retval ::NVAPI_STEREO_NOT_INITIALIZED Stereo part of NVAPI not initialized.
  337. //! \retval ::NVAPI_ERROR
  338. //!
  339. //! \ingroup stereoapi
  340. ///////////////////////////////////////////////////////////////////////////////
  341. NVAPI_INTERFACE NvAPI_Stereo_SetConvergence(StereoHandle stereoHandle, float newConvergence);
  342. ///////////////////////////////////////////////////////////////////////////////
  343. //
  344. // FUNCTION NAME: NvAPI_Stereo_SetActiveEye
  345. //
  346. //! \fn NvAPI_Stereo_SetActiveEye(StereoHandle hStereoHandle, NV_STEREO_ACTIVE_EYE StereoEye);
  347. //! DESCRIPTION: This API sets the back buffer to left or right in Direct stereo mode.
  348. //!
  349. //! HOW TO USE: After the stereo handle for device interface is created via successfull call to appropriate
  350. //! NvAPI_Stereo_CreateHandleFrom function.
  351. //!
  352. //! \since Release: 285
  353. //!
  354. //! SUPPORTED OS: Windows Vista and higher
  355. //!
  356. //!
  357. //! \param [in] stereoHandle Stereo handle that corresponds to the device interface.
  358. //! \param [in] StereoEye Defines active eye in Direct stereo mode
  359. //!
  360. //! \retval ::NVAPI_OK - Active eye is set.
  361. //! \retval ::NVAPI_STEREO_INVALID_DEVICE_INTERFACE - Device interface is not valid. Create again, then attach again.
  362. //! \retval ::NVAPI_API_NOT_INTIALIZED - NVAPI not initialized.
  363. //! \retval ::NVAPI_STEREO_NOT_INITIALIZED - Stereo part of NVAPI not initialized.
  364. //! \retval ::NVAPI_INVALID_ARGUMENT - StereoEye parameter has not allowed value.
  365. //! \retval ::NVAPI_SET_NOT_ALLOWED - Current stereo mode is not Direct
  366. //! \retval ::NVAPI_ERROR - Something is wrong (generic error).
  367. //
  368. ///////////////////////////////////////////////////////////////////////////////
  369. //! \ingroup stereoapi
  370. typedef enum _NV_StereoActiveEye
  371. {
  372. NVAPI_STEREO_EYE_RIGHT = 1,
  373. NVAPI_STEREO_EYE_LEFT = 2,
  374. NVAPI_STEREO_EYE_MONO = 3,
  375. } NV_STEREO_ACTIVE_EYE;
  376. //! \ingroup stereoapi
  377. NVAPI_INTERFACE NvAPI_Stereo_SetActiveEye(StereoHandle hStereoHandle, NV_STEREO_ACTIVE_EYE StereoEye);
  378. ///////////////////////////////////////////////////////////////////////////////
  379. //
  380. // FUNCTION NAME: NvAPI_Stereo_SetDriverMode
  381. //
  382. //! \fn NvAPI_Stereo_SetDriverMode( NV_STEREO_DRIVER_MODE mode );
  383. //! DESCRIPTION: This API sets the 3D stereo driver mode: Direct or Automatic
  384. //!
  385. //! HOW TO USE: This API must be called before the device is created.
  386. //! Applies to DirectX 9 and higher.
  387. //!
  388. //! \since Release: 285
  389. //!
  390. //! SUPPORTED OS: Windows Vista and higher
  391. //!
  392. //!
  393. //! \param [in] mode Defines the 3D stereo driver mode: Direct or Automatic
  394. //!
  395. //! \retval ::NVAPI_OK Active eye is set.
  396. //! \retval ::NVAPI_API_NOT_INTIALIZED NVAPI not initialized.
  397. //! \retval ::NVAPI_STEREO_NOT_INITIALIZED Stereo part of NVAPI not initialized.
  398. //! \retval ::NVAPI_INVALID_ARGUMENT mode parameter has not allowed value.
  399. //! \retval ::NVAPI_ERROR Something is wrong (generic error).
  400. //
  401. ///////////////////////////////////////////////////////////////////////////////
  402. //! \ingroup stereoapi
  403. typedef enum _NV_StereoDriverMode
  404. {
  405. NVAPI_STEREO_DRIVER_MODE_AUTOMATIC = 0,
  406. NVAPI_STEREO_DRIVER_MODE_DIRECT = 2,
  407. } NV_STEREO_DRIVER_MODE;
  408. //! \ingroup stereoapi
  409. NVAPI_INTERFACE NvAPI_Stereo_SetDriverMode( NV_STEREO_DRIVER_MODE mode );
  410. ///////////////////////////////////////////////////////////////////////////////
  411. //
  412. // FUNCTION NAME: NvAPI_Stereo_GetEyeSeparation
  413. //
  414. //! DESCRIPTION: This API returns eye separation as a ratio of <between eye distance>/<physical screen width>.
  415. //!
  416. //! 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.
  417. //!
  418. //! SUPPORTED OS: Windows Vista and higher
  419. //!
  420. //!
  421. //! \param [in] stereoHandle Stereo handle that corresponds to the device interface.
  422. //! \param [out] pSeparation Eye separation.
  423. //!
  424. //! \retval ::NVAPI_OK Active eye is set.
  425. //! \retval ::NVAPI_STEREO_INVALID_DEVICE_INTERFACE Device interface is not valid. Create again, then attach again.
  426. //! \retval ::NVAPI_API_NOT_INTIALIZED NVAPI not initialized.
  427. //! \retval ::NVAPI_STEREO_NOT_INITIALIZED Stereo part of NVAPI not initialized.
  428. //! \retval ::NVAPI_ERROR (generic error).
  429. //!
  430. //! \ingroup stereoapi
  431. ///////////////////////////////////////////////////////////////////////////////
  432. NVAPI_INTERFACE NvAPI_Stereo_GetEyeSeparation(StereoHandle hStereoHandle, float *pSeparation );
  433. ///////////////////////////////////////////////////////////////////////////////
  434. //
  435. // FUNCTION NAME: NvAPI_Stereo_IsWindowedModeSupported
  436. //
  437. //! DESCRIPTION: This API returns availability of windowed mode stereo
  438. //!
  439. //! SUPPORTED OS: Windows Vista and higher
  440. //!
  441. //!
  442. //! \param [out] bSupported(OUT) != 0 - supported, \n
  443. //! == 0 - is not supported
  444. //!
  445. //!
  446. //! \retval ::NVAPI_OK Retrieval of frustum adjust mode was successfull.
  447. //! \retval ::NVAPI_API_NOT_INTIALIZED NVAPI not initialized.
  448. //! \retval ::NVAPI_STEREO_NOT_INITIALIZED Stereo part of NVAPI not initialized.
  449. //! \retval ::NVAPI_ERROR Something is wrong (generic error).
  450. //!
  451. //! \ingroup stereoapi
  452. ///////////////////////////////////////////////////////////////////////////////
  453. NVAPI_INTERFACE NvAPI_Stereo_IsWindowedModeSupported(NvU8* bSupported);
  454. ///////////////////////////////////////////////////////////////////////////////
  455. //
  456. // FUNCTION NAME: NvAPI_Stereo_SetSurfaceCreationMode
  457. //
  458. //! \function NvAPI_Stereo_SetSurfaceCreationMode(StereoHandle hStereoHandle, NVAPI_STEREO_SURFACECREATEMODE creationMode)
  459. //! \param [in] hStereoHandle Stereo handle that corresponds to the device interface.
  460. //! \param [in] creationMode New surface creation mode for this device interface.
  461. //!
  462. //! \since Release: 285
  463. //!
  464. //! SUPPORTED OS: Windows Vista and higher
  465. //!
  466. //!
  467. //! DESCRIPTION: This API sets surface creation mode for this device interface.
  468. //!
  469. //! WHEN TO USE: After the stereo handle for device interface is created via successful call to appropriate NvAPI_Stereo_CreateHandleFrom function.
  470. //!
  471. //! \return This API can return any of the error codes enumerated in #NvAPI_Status.
  472. //! There are no return error codes with specific meaning for this API.
  473. //!
  474. ///////////////////////////////////////////////////////////////////////////////
  475. //! \ingroup stereoapi
  476. typedef enum _NVAPI_STEREO_SURFACECREATEMODE
  477. {
  478. NVAPI_STEREO_SURFACECREATEMODE_AUTO, //!< Use driver registry profile settings for surface creation mode.
  479. NVAPI_STEREO_SURFACECREATEMODE_FORCESTEREO, //!< Always create stereo surfaces.
  480. NVAPI_STEREO_SURFACECREATEMODE_FORCEMONO //!< Always create mono surfaces.
  481. } NVAPI_STEREO_SURFACECREATEMODE;
  482. //! \ingroup stereoapi
  483. NVAPI_INTERFACE NvAPI_Stereo_SetSurfaceCreationMode(__in StereoHandle hStereoHandle, __in NVAPI_STEREO_SURFACECREATEMODE creationMode);
  484. ///////////////////////////////////////////////////////////////////////////////
  485. //
  486. // FUNCTION NAME: NvAPI_Stereo_GetSurfaceCreationMode
  487. //
  488. //! \function NvAPI_Stereo_GetSurfaceCreationMode(StereoHandle hStereoHandle, NVAPI_STEREO_SURFACECREATEMODE* pCreationMode)
  489. //! \param [in] hStereoHandle Stereo handle that corresponds to the device interface.
  490. //! \param [out] pCreationMode The current creation mode for this device interface.
  491. //!
  492. //! \since Release: 295
  493. //!
  494. //! SUPPORTED OS: Windows Vista and higher
  495. //!
  496. //!
  497. //! DESCRIPTION: This API gets surface creation mode for this device interface.
  498. //!
  499. //! WHEN TO USE: After the stereo handle for device interface is created via successful call to appropriate NvAPI_Stereo_CreateHandleFrom function.
  500. //!
  501. //! \return This API can return any of the error codes enumerated in #NvAPI_Status.
  502. //! There are no return error codes with specific meaning for this API.
  503. //!
  504. ///////////////////////////////////////////////////////////////////////////////
  505. //! \ingroup stereoapi
  506. NVAPI_INTERFACE NvAPI_Stereo_GetSurfaceCreationMode(__in StereoHandle hStereoHandle, __in NVAPI_STEREO_SURFACECREATEMODE* pCreationMode);
  507. ///////////////////////////////////////////////////////////////////////////////
  508. //
  509. // FUNCTION NAME: NvAPI_Stereo_Debug_WasLastDrawStereoized
  510. //
  511. //! \param [in] hStereoHandle Stereo handle that corresponds to the device interface.
  512. //! \param [out] pWasStereoized Address where result of the inquiry will be placed.
  513. //!
  514. //! SUPPORTED OS: Windows Vista and higher
  515. //!
  516. //!
  517. //! 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*.
  518. //!
  519. //! WHEN TO USE: After the stereo handle for device interface is created via successful call to appropriate NvAPI_Stereo_CreateHandleFrom function.
  520. //!
  521. //! \return This API can return any of the error codes enumerated in #NvAPI_Status.
  522. //! There are no return error codes with specific meaning for this API.
  523. //!
  524. //! \ingroup stereoapi
  525. ///////////////////////////////////////////////////////////////////////////////
  526. NVAPI_INTERFACE NvAPI_Stereo_Debug_WasLastDrawStereoized(__in StereoHandle hStereoHandle, __out NvU8 *pWasStereoized);
  527. ///////////////////////////////////////////////////////////////////////////////
  528. //
  529. // FUNCTION NAME: NvAPI_Stereo_SetDefaultProfile
  530. //
  531. //!
  532. //! SUPPORTED OS: Windows Vista and higher
  533. //!
  534. //!
  535. //! DESCRIPTION: This API defines the stereo profile used by the driver in case the application has no associated profile.
  536. //!
  537. //! 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.
  538. //!
  539. //! \param [in] szProfileName Default profile name.
  540. //!
  541. //! \return This API can return any of the error codes enumerated in #NvAPI_Status.
  542. //! Error codes specific to this API are described below.
  543. //!
  544. //! \retval NVAPI_SUCCESS - Default stereo profile name has been copied into szProfileName.
  545. //! \retval NVAPI_INVALID_ARGUMENT - szProfileName == NULL.
  546. //! \retval NVAPI_DEFAULT_STEREO_PROFILE_DOES_NOT_EXIST - Default stereo profile does not exist
  547. //!
  548. //! \ingroup stereoapi
  549. ///////////////////////////////////////////////////////////////////////////////
  550. NVAPI_INTERFACE NvAPI_Stereo_SetDefaultProfile(__in const char* szProfileName);
  551. ///////////////////////////////////////////////////////////////////////////////
  552. //
  553. // FUNCTION NAME: NvAPI_Stereo_GetDefaultProfile
  554. //
  555. //! SUPPORTED OS: Windows Vista and higher
  556. //!
  557. //!
  558. //! DESCRIPTION: This API retrieves the current default stereo profile.
  559. //!
  560. //! After call cbSizeOut contain 0 if default profile is not set required buffer size cbSizeOut.
  561. //! To get needed buffer size this function can be called with szProfileName==0 and cbSizeIn == 0.
  562. //!
  563. //! WHEN TO USE: This API can be called at any time.
  564. //!
  565. //!
  566. //! \param [in] cbSizeIn Size of buffer allocated for default stereo profile name.
  567. //! \param [out] szProfileName Default stereo profile name.
  568. //! \param [out] pcbSizeOut Required buffer size.
  569. //! # ==0 - there is no default stereo profile name currently set
  570. //! # !=0 - size of buffer required for currently set default stereo profile name including trailing '0'.
  571. //!
  572. //!
  573. //! \return This API can return any of the error codes enumerated in #NvAPI_Status.
  574. //! Error codes specific to this API are described below.
  575. //!
  576. //! \retval NVAPI_SUCCESS - Default stereo profile name has been copied into szProfileName.
  577. //! \retval NVAPI_DEFAULT_STEREO_PROFILE_IS_NOT_DEFINED - There is no default stereo profile set at this time.
  578. //! \retval NVAPI_INVALID_ARGUMENT - pcbSizeOut == 0 or cbSizeIn >= *pcbSizeOut && szProfileName == 0
  579. //! \retval NVAPI_INSUFFICIENT_BUFFER - cbSizeIn < *pcbSizeOut
  580. //!
  581. //! \ingroup stereoapi
  582. ///////////////////////////////////////////////////////////////////////////////
  583. NVAPI_INTERFACE NvAPI_Stereo_GetDefaultProfile( __in NvU32 cbSizeIn, __out_bcount_part_opt(cbSizeIn, *pcbSizeOut) char* szProfileName, __out NvU32 *pcbSizeOut);
  584. #include"nvapi_lite_salend.h"
  585. #ifdef __cplusplus
  586. }
  587. #endif
  588. #pragma pack(pop)