15bd8deadSopenharmony_ciName 25bd8deadSopenharmony_ci 35bd8deadSopenharmony_ci NV_3dvision_settings 45bd8deadSopenharmony_ci 55bd8deadSopenharmony_ciName Strings 65bd8deadSopenharmony_ci 75bd8deadSopenharmony_ci GL_NV_3dvision_settings 85bd8deadSopenharmony_ci 95bd8deadSopenharmony_ciContributors 105bd8deadSopenharmony_ci 115bd8deadSopenharmony_ci Mathias Heyer, NVIDIA 125bd8deadSopenharmony_ci Swaminathan Narayanan, NVIDIA 135bd8deadSopenharmony_ci Greg Roth, NVIDIA 145bd8deadSopenharmony_ci 155bd8deadSopenharmony_ciContact 165bd8deadSopenharmony_ci 175bd8deadSopenharmony_ci Greg Roth, NVIDIA (groth 'at' nvidia.com) 185bd8deadSopenharmony_ci 195bd8deadSopenharmony_ciStatus 205bd8deadSopenharmony_ci 215bd8deadSopenharmony_ci Complete 225bd8deadSopenharmony_ci 235bd8deadSopenharmony_ciVersion 245bd8deadSopenharmony_ci 255bd8deadSopenharmony_ci Last Modified Date: 05 Oct 2012 265bd8deadSopenharmony_ci Revision: 5 275bd8deadSopenharmony_ci 285bd8deadSopenharmony_ciNumber 295bd8deadSopenharmony_ci 305bd8deadSopenharmony_ci OpenGL ES Extension #129 315bd8deadSopenharmony_ci 325bd8deadSopenharmony_ciDependencies 335bd8deadSopenharmony_ci 345bd8deadSopenharmony_ci Written based on the wording of the OpenGL ES 2.0.25 specification 355bd8deadSopenharmony_ci 365bd8deadSopenharmony_ci OpenGL ES 2.0 is required. 375bd8deadSopenharmony_ci 385bd8deadSopenharmony_ci EGL_NV_3dvision_surface is used to specify a surface 395bd8deadSopenharmony_ci with support for these features explicitly enabled. 405bd8deadSopenharmony_ci 415bd8deadSopenharmony_ciOverview 425bd8deadSopenharmony_ci 435bd8deadSopenharmony_ci NVIDIA 3D Vision provides stereoscopic 3d rendering without 445bd8deadSopenharmony_ci requiring applications to change their rendering methods. However 455bd8deadSopenharmony_ci there are cases where applications can benefit from adjusting 3D 465bd8deadSopenharmony_ci vision parameters directly to experiment with this functionality in 475bd8deadSopenharmony_ci applications not yet known to 3D Vision, to assist 3D Vision in 485bd8deadSopenharmony_ci setting parameters correctly for unusual situations, or to present 495bd8deadSopenharmony_ci application-specific user-accessible controls for 3D Vision 505bd8deadSopenharmony_ci parameters. 515bd8deadSopenharmony_ci 525bd8deadSopenharmony_ci This extension provides the ability to query the current stereo 535bd8deadSopenharmony_ci settings and adjust them as necessary. 545bd8deadSopenharmony_ci 555bd8deadSopenharmony_ciIP Status 565bd8deadSopenharmony_ci 575bd8deadSopenharmony_ci NVIDIA Proprietary 585bd8deadSopenharmony_ci 595bd8deadSopenharmony_ciNew Procedures and Functions 605bd8deadSopenharmony_ci 615bd8deadSopenharmony_ci void StereoParameterfNV(enum pname, float param); 625bd8deadSopenharmony_ci void StereoParameteriNV(enum pname, int param); 635bd8deadSopenharmony_ci 645bd8deadSopenharmony_ciNew Tokens 655bd8deadSopenharmony_ci 665bd8deadSopenharmony_ci Accepted by the <value> parameter of GetBooleanv, GetIntegerv, 675bd8deadSopenharmony_ci and GetFloatv, and the <cap> parameter of isEnabled, Enable, and 685bd8deadSopenharmony_ci Disable: 695bd8deadSopenharmony_ci 705bd8deadSopenharmony_ci 3DVISION_STEREO_NV 0x90F4 715bd8deadSopenharmony_ci 725bd8deadSopenharmony_ci Accepted by the <value> parameter of GetBooleanv, GetIntegerv, 735bd8deadSopenharmony_ci and GetFloatv and the <param> parameter of StereoParameterfNV, 745bd8deadSopenharmony_ci and StereoParameteriNV: 755bd8deadSopenharmony_ci 765bd8deadSopenharmony_ci STEREO_SEPARATION_NV 0x90F5 775bd8deadSopenharmony_ci STEREO_CONVERGENCE_NV 0x90F6 785bd8deadSopenharmony_ci STEREO_CUTOFF_NV 0x90F7 795bd8deadSopenharmony_ci STEREO_PROJECTION_NV 0x90F8 805bd8deadSopenharmony_ci 815bd8deadSopenharmony_ci Accepted by the <param> parameter of StereoParameterfNV and 825bd8deadSopenharmony_ci StereoParameteriNV and returned by GetBooleanv, GetIntegerv, and 835bd8deadSopenharmony_ci GetFloatv when <value> is STEREO_PROJECTION_NV. 845bd8deadSopenharmony_ci 855bd8deadSopenharmony_ci STEREO_PROJECTION_PERSPECTIVE_NV 0x90F9 865bd8deadSopenharmony_ci STEREO_PROJECTION_ORTHO_NV 0x90FA 875bd8deadSopenharmony_ci 885bd8deadSopenharmony_ciChanges to Chapter 4 of the OpenGL ES 2.0.25 Specification (Per-Fragment 895bd8deadSopenharmony_ciOperations and the Frame Buffer) 905bd8deadSopenharmony_ci 915bd8deadSopenharmony_ci Add to section 4.2.1, "Selecting a Buffer for Writing": 925bd8deadSopenharmony_ci 935bd8deadSopenharmony_ci If the bound draw surface is auto stereo enabled and 3d Vision 945bd8deadSopenharmony_ci rendering is enabled in the GL, color values are written to left and 955bd8deadSopenharmony_ci right buffers with adjustments according to current separation and 965bd8deadSopenharmony_ci convergence values. 975bd8deadSopenharmony_ci 985bd8deadSopenharmony_ci Add subsection 4.2.x, "Stereo Parameters": 995bd8deadSopenharmony_ci 1005bd8deadSopenharmony_ci 3D Vision stereo capability may be enabled at surface creation. If 1015bd8deadSopenharmony_ci the bound draw surface is auto stereo capable, 3D Vision rendering 1025bd8deadSopenharmony_ci can be enabled and disabled by calling Enable or Disable with the 1035bd8deadSopenharmony_ci symbolic constant 3DVISION_STEREO_NV. If the current draw surface is 1045bd8deadSopenharmony_ci not auto stereo capable, enabling 3D Vision rendering has no 1055bd8deadSopenharmony_ci effect. The current state of 3D Vision rendering may be queried 1065bd8deadSopenharmony_ci using isEnabled with <cap> set to 3DVISION_STEREO_NV. 1075bd8deadSopenharmony_ci 1085bd8deadSopenharmony_ci Various parameters control how 3D Vision stereo rendering is 1095bd8deadSopenharmony_ci performed. Each parameter is set by calling 1105bd8deadSopenharmony_ci 1115bd8deadSopenharmony_ci void StereoParameter{if}NV(enum pname, T param); 1125bd8deadSopenharmony_ci 1135bd8deadSopenharmony_ci <pname> is a symbolic constant indicating the parameter to be set. 1145bd8deadSopenharmony_ci 1155bd8deadSopenharmony_ci If <pname> is STEREO_PROJECTION_NV, then <param> specifies the 1165bd8deadSopenharmony_ci method of rendering 3D Vision will use. <param> must be 1175bd8deadSopenharmony_ci STEREO_PROJECTION_PERSPECTIVE_NV or STEREO_PROJECTION_ORTHO_NV 1185bd8deadSopenharmony_ci identifying the projection type used. If <param> has any other 1195bd8deadSopenharmony_ci value, an INVALID_ENUM error is generated. The current 3D Vision 1205bd8deadSopenharmony_ci stereo method is queried by calling GetIntegerv with <pname> set to 1215bd8deadSopenharmony_ci STEREO_PROJECTION_NV. The initial value of STEREO_PROJECTION_NV is 1225bd8deadSopenharmony_ci STEREO_PROJECTION_PERSPECTIVE_NV, but may differ for contexts 1235bd8deadSopenharmony_ci created with a 3D Vision profile in effect. 1245bd8deadSopenharmony_ci 1255bd8deadSopenharmony_ci If <pname> is STEREO_SEPARATION_NV, then <param> specifies the 1265bd8deadSopenharmony_ci separation value used in 3D Vision stereo rendering. The current 1275bd8deadSopenharmony_ci separation value is queried by calling GetFloatv with <pname> set 1285bd8deadSopenharmony_ci to STEREO_SEPARATION_NV. The initial value of STEREO_PROJECTION_NV 1295bd8deadSopenharmony_ci depends on 3D Vision system settings at the time the context was 1305bd8deadSopenharmony_ci created. The separation value indicates a percentage. If <param> is 1315bd8deadSopenharmony_ci less than zero or greater than 100, an INVALID_VALUE error is 1325bd8deadSopenharmony_ci generated. 1335bd8deadSopenharmony_ci 1345bd8deadSopenharmony_ci If <pname> is STEREO_CONVERGENCE_NV, then <param> specifies the 1355bd8deadSopenharmony_ci convergence value used in 3D Vision stereo rendering. The current 1365bd8deadSopenharmony_ci convergence value is queried by calling GetFloatv with <pname> set 1375bd8deadSopenharmony_ci to STEREO_CONVERGENCE_NV. The initial value of STEREO_CONVERGENCE- 1385bd8deadSopenharmony_ci _NV is zero, but may differ for contexts created with a 3D Vision 1395bd8deadSopenharmony_ci profile in effect. 1405bd8deadSopenharmony_ci 1415bd8deadSopenharmony_ci If <pname> is STEREO_CUTOFF_NV, then <param> specifies the 1425bd8deadSopenharmony_ci separation cutoff value used in 3D Vision stereo rendering. The 1435bd8deadSopenharmony_ci current separation cutoff value is queried by calling GetFloatv 1445bd8deadSopenharmony_ci with <pname> set to STEREO_CUTOFF_NV. The initial value of 1455bd8deadSopenharmony_ci STEREO_CUTOFF_NV is zero, but may differ for contexts created with a 1465bd8deadSopenharmony_ci 3D Vision profile in effect. 1475bd8deadSopenharmony_ci 1485bd8deadSopenharmony_ci Otherwise, INVALID_ENUM is generated. 1495bd8deadSopenharmony_ci 1505bd8deadSopenharmony_ci Setting stereo parameters on a context that does not support 3D 1515bd8deadSopenharmony_ci Vision rendering has no effect on rendering. 1525bd8deadSopenharmony_ci 1535bd8deadSopenharmony_ci The state required to implement these stereo parameters is three 1545bd8deadSopenharmony_ci floats and one integer. 1555bd8deadSopenharmony_ci 1565bd8deadSopenharmony_ciErrors 1575bd8deadSopenharmony_ci 1585bd8deadSopenharmony_ci The error INVALID_ENUM is generated if StereoParameter{if} is 1595bd8deadSopenharmony_ci called where <pname> is an unsupported enum value. 1605bd8deadSopenharmony_ci 1615bd8deadSopenharmony_ci The error INVALID_ENUM is generated if StereoParameter{if} is 1625bd8deadSopenharmony_ci called where <pname> is STEREO_PROJECTION_NV and <param> is an 1635bd8deadSopenharmony_ci unsupported enum value. 1645bd8deadSopenharmony_ci 1655bd8deadSopenharmony_ciNew State 1665bd8deadSopenharmony_ci 1675bd8deadSopenharmony_ci Add new table "Stereo State" 1685bd8deadSopenharmony_ci Get Value Type Get Command Initial Value Description Sec 1695bd8deadSopenharmony_ci --------- ---- ----------- ------------- ----------- ------ 1705bd8deadSopenharmony_ci 3DVISION_STEREO_NV B isEnabled see 4.2.x 3D Vision stereo enable 4.2.x 1715bd8deadSopenharmony_ci STEREO_SEPARATION_NV R GetFloatv see 4.2.x 3D Vision separation 4.2.x 1725bd8deadSopenharmony_ci STEREO_CONVERGENCE_NV R GetFloatv see 4.2.x 3D Vision convergence 4.2.x 1735bd8deadSopenharmony_ci STEREO_CUTOFF_NV R GetFloatv see 4.2.x 3D Vision separation cutoff 4.2.x 1745bd8deadSopenharmony_ci STEREO_PROJECTION_NV Z GetIntegerv see 4.2.x 3D Vision projection method 4.2.x 1755bd8deadSopenharmony_ci 1765bd8deadSopenharmony_ciIssues 1775bd8deadSopenharmony_ci 1785bd8deadSopenharmony_ci 1. What are the default values of 3D Vision stereo parameters? 1795bd8deadSopenharmony_ci 1805bd8deadSopenharmony_ci RESOLVED: The default values depend on the application being run and 1815bd8deadSopenharmony_ci current system 3D Vision settings. For all but separation, defaults 1825bd8deadSopenharmony_ci for an application with no 3D Vision profile. GL contexts created 1835bd8deadSopenharmony_ci for Applications with established stereo profiles will have 1845bd8deadSopenharmony_ci different default values for stereo parameters. 1855bd8deadSopenharmony_ci 1865bd8deadSopenharmony_ci 2. Should method settings be included? 1875bd8deadSopenharmony_ci 1885bd8deadSopenharmony_ci RESOLVED: Yes, but in a form that makes sense to the user. Internal 1895bd8deadSopenharmony_ci method settings have many forms, but all the user needs be concerned 1905bd8deadSopenharmony_ci with are orthographic and perspective settings. For Applications 1915bd8deadSopenharmony_ci controlled by application detection, changing this is inadvisable. 1925bd8deadSopenharmony_ci Applications that use context creation attributes to enable 3D 1935bd8deadSopenharmony_ci Vision may have to set the method explicitly. 1945bd8deadSopenharmony_ci 1955bd8deadSopenharmony_ci 3. Should descriptions of how these settings are used by 3D Vision 1965bd8deadSopenharmony_ci be included here? 1975bd8deadSopenharmony_ci 1985bd8deadSopenharmony_ci RESOLVED: No. This functionality is extensively documented in 1995bd8deadSopenharmony_ci existing 3D Vision documents such as "NVIDIA 3D Vision Automatic Best 2005bd8deadSopenharmony_ci Practices". Merging these explanations into the OpenGL document and 2015bd8deadSopenharmony_ci maintaining them won't add any additional clarity to the functionality 2025bd8deadSopenharmony_ci and may limit the underlying implementation. 2035bd8deadSopenharmony_ci 2045bd8deadSopenharmony_ci 2055bd8deadSopenharmony_ci 4. What is the behavior of GL calls that may use a 3D Vision surface 2065bd8deadSopenharmony_ci such as ReadPixels, CopyTex[Sub]Image, and BlitFramebuffer? 2075bd8deadSopenharmony_ci 2085bd8deadSopenharmony_ci RESOLVED: The current implementation makes calls that expect a 2095bd8deadSopenharmony_ci single surface by definition such as ReadPixels read from the left 2105bd8deadSopenharmony_ci buffer only. Calls that permit the number of surfaces to be 2115bd8deadSopenharmony_ci abstracted behind objects that have no direct interaction with the 2125bd8deadSopenharmony_ci user application such as CopyTexImage and BlitFramebuffer sample 2135bd8deadSopenharmony_ci from both surfaces of the source when available to copy to the 2145bd8deadSopenharmony_ci corresponding destination surfaces. 2155bd8deadSopenharmony_ci 2165bd8deadSopenharmony_ci The intent of this extension is to provide a 3D Vision support 2175bd8deadSopenharmony_ci that is as transparent to the developer as possible. Introducing the 2185bd8deadSopenharmony_ci ability to select which buffer is read from breaks the notion of the 2195bd8deadSopenharmony_ci application that what was developed as a single buffer is 2205bd8deadSopenharmony_ci represented as two surfaces when 3D Vision is enabled. Furthermore, 2215bd8deadSopenharmony_ci this matches behavior of 3D Vision enabled applications that do not 2225bd8deadSopenharmony_ci make use of this extension. 2235bd8deadSopenharmony_ci 2245bd8deadSopenharmony_ci It's possible that this approach may cause problems with particular 2255bd8deadSopenharmony_ci applications that make meaningful use of ReadPixels. Such 2265bd8deadSopenharmony_ci incidents are not expected to be common. Where they arise, the 3D 2275bd8deadSopenharmony_ci Vision implementation may change to accomodate them. It is in 2285bd8deadSopenharmony_ci keeping with one purpose of this extension to test new development 2295bd8deadSopenharmony_ci with 3D Vision to identify interaction problems before it becomes 2305bd8deadSopenharmony_ci publicly available. By keeping with the current implementation, 2315bd8deadSopenharmony_ci these conflicts can be identified and resolved beforehand. This is 2325bd8deadSopenharmony_ci one such conflict that may be identified and addressed either by the 2335bd8deadSopenharmony_ci application developer or through communication with the extension 2345bd8deadSopenharmony_ci implementor. 2355bd8deadSopenharmony_ci 2365bd8deadSopenharmony_ci Because the implementation may change according to future 2375bd8deadSopenharmony_ci requirements, this extension makes no changes to the corresponding 2385bd8deadSopenharmony_ci documentation in the specification to enable future implementation 2395bd8deadSopenharmony_ci changes that may do something different. Conceptually, the behavior 2405bd8deadSopenharmony_ci of this functionality does not change any more than that of the draw 2415bd8deadSopenharmony_ci calls. 2425bd8deadSopenharmony_ci 2435bd8deadSopenharmony_ciRevision History 2445bd8deadSopenharmony_ci 2455bd8deadSopenharmony_ci Rev. Date Author Changes 2465bd8deadSopenharmony_ci ---- ------------- --------- ---------------------------------------- 2475bd8deadSopenharmony_ci 5 05 Oct 2012 groth Add issue addressing ReadPixels. 2485bd8deadSopenharmony_ci 4 15 Dec 2011 groth Refine default values. Add invalid value errors 2495bd8deadSopenharmony_ci 3 02 Dec 2011 groth Restore method settings in limited form 2505bd8deadSopenharmony_ci 2 11 Nov 2011 groth Remove method query and settings 2515bd8deadSopenharmony_ci 1 08 Nov 2011 groth Initial version 2525bd8deadSopenharmony_ci 253