WebGL WEBGL_debug_renderer_info Khronos Ratified Extension Specification
Name
WEBGL_debug_renderer_info
Contact
zmo@chromium.org
Contributors
Members of the WebGL working group
Version
Last modified date: July 15, 2014
Revision: 8
Number
WebGL extension #6
Dependencies
Written against the WebGL API 1.0 specification.
Overview
WebGL implementations might mask the RENDERER
and VENDOR
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.
IDL
[Exposed=(Window,Worker), LegacyNoInterfaceObject]
interface WEBGL_debug_renderer_info {
const GLenum UNMASKED_VENDOR_WEBGL = 0x9245;
const GLenum UNMASKED_RENDERER_WEBGL = 0x9246;
};
New Tokens
- any getParameter(GLenum pname)
-
Two new enums
UNMASKED_VENDOR_WEBGL
and UNMASKED_RENDERER_WEBGL
are accepted by pname
parameter in getParameter()
.
pname | returned type |
UNMASKED_VENDOR_WEBGL | DOMString |
UNMASKED_RENDERER_WEBGL | DOMString |
The following pname arguments return a string describing some aspect of the underlying graphics driver.
UNMASKED_VENDOR_WEBGL | Return the VENDOR string of the underlying graphics driver. |
UNMASKED_RENDERER_WEBGL | Return the RENDERER string of the underlying graphics driver. |
Issues
1) What enum values should be used for UNMASKED_VENDOR_WEBGL and UNMASKED_RENDERER_WEBGL?
- RESOLVED: The first draft used temporary enum values. They have been replaced with enums allocated from the WEBGL range of GL enums.
2) Should this extension be made available on ordinary web pages?
- Earlier versions of this extension noted the following concerns:
- 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.
- 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.
User agents (web browsers) should carefully consider whether or not to expose this extension in non-privileged settings due to these concerns.
- On the other hand, benefits of exposing this information to general web pages include:
- The WebGL application can tune its rendering techniques based on previously observed performance characteristics on the same graphics card.
- 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.
Revision History
Revision 1, 2011/10/03
Revision 2, 2011/10/12
- Assigned enums; assigned webgl extension number.
Revision 3, 2011/10/18
- Clarify the meaning of "privileged".
Revision 4, 2011/12/07
- Fixed mistake where extension still indicated draft status.
Revision 5, 2012/01/03
- Removed webgl module per changes to Web IDL spec.
Revision 6, 2013/05/15
- Ratified by Khronos Board of Promoters.
Revision 7, 2014/01/28
- Added issue on privacy and user agent sniffing considerations, replacing security section.
Revision 8, 2014/07/15
- Added NoInterfaceObject extended attribute.