| <!DOCTYPE HTML> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title>GPU Feature Testing: WebGL Multisampling</title> | |
| <script> | |
| function init() { | |
| var canvas = document.createElement("canvas"); | |
| if (!canvas) | |
| return null; | |
| var context = null; | |
| var attrib = { antialias: true }; // It is the default setting. | |
| try { | |
| context = canvas.getContext("webgl", attrib); | |
| } catch(e) {} | |
| if (!context) { | |
| try { | |
| context = canvas.getContext("experimental-webgl", attrib); | |
| } catch(e) {} | |
| } | |
| return context; | |
| } | |
| function runTest() { | |
| var gl = init(); | |
| var attrib = null; | |
| if (gl) | |
| attrib = gl.getContextAttributes(); | |
| if (gl && attrib && attrib.antialias) | |
| domAutomationController.send("TRUE"); | |
| else | |
| domAutomationController.send("FALSE"); | |
| } | |
| </script> | |
| </head> | |
| <body onload="runTest()"> | |
| WebGL should use multisampling if it is allowed. | |
| </body> | |
| </html> |