| 1 | <?xml version="1.0"?> |
| 2 | |
| 3 | <ratified href="WEBGL_debug_renderer_info/"> |
| 4 | <name>WEBGL_debug_renderer_info</name> |
| 5 | <contact><a href="mailto:[email protected]">[email protected]</a></contact> |
| 6 | <contributors> |
| 7 | <contributor>Members of the <a href="https://www.khronos.org/webgl/public-mailing-list/">WebGL working group</a></contributor> |
| 8 | </contributors> |
| 9 | <number>6</number> |
| 10 | <depends> |
| 11 | <api version="1.0"/> |
| 12 | </depends> |
| 13 | <overview> |
| 14 | <p>WebGL implementations might mask the <code>RENDERER</code> and <code>VENDOR</code> strings of the underlying graphics driver for privacy reasons. This extension exposes new tokens to query this information in a guaranteed manner for debugging purposes.</p> |
| 15 | </overview> |
| 16 | <idl xml:space="preserve"> |
| 17 | [NoInterfaceObject] |
| 18 | interface WEBGL_debug_renderer_info { |
| 19 | |
| 20 | const GLenum UNMASKED_VENDOR_WEBGL = 0x9245; |
| 21 | const GLenum UNMASKED_RENDERER_WEBGL = 0x9246; |
| 22 | |
| 23 | }; |
| 24 | </idl> |
| 25 | <newtok> |
| 26 | <function name="getParameter" type="any"> |
| 27 | <param name="pname" type="GLenum"/> |
| 28 | Two new enums <code>UNMASKED_VENDOR_WEBGL</code> and <code>UNMASKED_RENDERER_WEBGL</code> are accepted by <code>pname</code> parameter in <code>getParameter()</code>. |
| 29 | <table class="foo"> |
| 30 | <tr><th>pname</th><th>returned type</th></tr> |
| 31 | <tr><td>UNMASKED_VENDOR_WEBGL</td><td>DOMString</td></tr> |
| 32 | <tr><td>UNMASKED_RENDERER_WEBGL</td><td>DOMString</td></tr> |
| 33 | </table> |
| 34 | <br /> |
| 35 | The following pname arguments return a string describing some aspect of the underlying graphics driver. |
| 36 | <table class="foo"> |
| 37 | <tr><td>UNMASKED_VENDOR_WEBGL</td><td>Return the VENDOR string of the underlying graphics driver.</td></tr> |
| 38 | <tr><td>UNMASKED_RENDERER_WEBGL</td><td>Return the RENDERER string of the underlying graphics driver.</td></tr> |
| 39 | </table> |
| 40 | </function> |
| 41 | </newtok> |
| 42 | <issues> |
| 43 | <p> |
| 44 | 1) What enum values should be used for UNMASKED_VENDOR_WEBGL and UNMASKED_RENDERER_WEBGL?</p> |
| 45 | <ul> |
| 46 | <li> RESOLVED: The first draft used temporary enum values. They have been replaced with enums allocated from the WEBGL range of GL enums.</li> |
| 47 | </ul> |
| 48 | <p> |
| 49 | 2) Should this extension be made available on ordinary web pages?</p> |
| 50 | <ul> |
| 51 | <li> Earlier versions of this extension noted the following concerns: |
| 52 | <ol> |
| 53 | <li> Identifying the precise graphics card in the user's computer may yield certain personally-identifiable information to the web page; for example, if the user has a unique graphics card. </li> |
| 54 | <li> Identifying the precise graphics card to JavaScript might encourage developers to target their WebGL applications to run only on a particular type of graphics card. This is similar to the User-Agent "sniffing" or "spoofing" problem which has historically been pervasive and problematic on the web. </li> |
| 55 | </ol> |
| 56 | |
| 57 | User agents (web browsers) should carefully consider whether or not to expose this extension in non-privileged settings due to these concerns. </li> |
| 58 | |
| 59 | <li> On the other hand, benefits of exposing this information to general web pages include: |
| 60 | |
| 61 | <ol> |
| 62 | <li> The WebGL application can tune its rendering techniques based on previously observed performance characteristics on the same graphics card. </li> |
| 63 | <li> The WebGL application can gather useful information for debugging; for example, if it is running slowly, it can gather data for reproducing and fixing the problem. </li> |
| 64 | </ol> |
| 65 | |
| 66 | </li> |
| 67 | </ul> |
| 68 | </issues> |
| 69 | <history> |
| 70 | <revision date="2011/10/03"> |
| 71 | <change>Initial revision.</change> |
| 72 | </revision> |
| 73 | <revision date="2011/10/12"> |
| 74 | <change>Assigned enums; assigned webgl extension number.</change> |
| 75 | </revision> |
| 76 | <revision date="2011/10/18"> |
| 77 | <change>Clarify the meaning of "privileged".</change> |
| 78 | </revision> |
| 79 | <revision date="2011/12/07"> |
| 80 | <change>Fixed mistake where extension still indicated draft status.</change> |
| 81 | </revision> |
| 82 | <revision date="2012/01/03"> |
| 83 | <change>Removed webgl module per changes to Web IDL spec.</change> |
| 84 | </revision> |
| 85 | <revision date="2013/05/15"> |
| 86 | <change>Ratified by Khronos Board of Promoters.</change> |
| 87 | </revision> |
| 88 | <revision date="2014/01/28"> |
| 89 | <change>Added issue on privacy and user agent sniffing considerations, replacing security section.</change> |
| 90 | </revision> |
| 91 | <revision date="2014/07/15"> |
| 92 | <change>Added NoInterfaceObject extended attribute.</change> |
| 93 | </revision> |
| 94 | </history> |
| 95 | </ratified> |