{alpha: true,
depth: true,
stencil: false,
antialias: true,
premultipliedAlpha: true,
preserveDrawingBuffer: false}
) depth: true,
stencil: false,
antialias: true,
premultipliedAlpha: true,
preserveDrawingBuffer: false}
Returns a new Web GL context for this canvas.
Other resources
-
WebGL fundamentals from HTML5Rocks.
- WebGL homepage.
Source
/**
* Returns a new Web GL context for this canvas.
*
* ## Other resources
*
* * [WebGL fundamentals]
* (http://www.html5rocks.com/en/tutorials/webgl/webgl_fundamentals/) from
* HTML5Rocks.
* * [WebGL homepage] (http://get.webgl.org/).
*/
@SupportedBrowser(SupportedBrowser.CHROME)
@SupportedBrowser(SupportedBrowser.FIREFOX)
@Experimental()
gl.RenderingContext getContext3d({alpha: true, depth: true, stencil: false,
antialias: true, premultipliedAlpha: true, preserveDrawingBuffer: false}) {
var options = {
'alpha': alpha,
'depth': depth,
'stencil': stencil,
'antialias': antialias,
'premultipliedAlpha': premultipliedAlpha,
'preserveDrawingBuffer': preserveDrawingBuffer,
};
var context = getContext('webgl', options);
if (context == null) {
context = getContext('experimental-webgl', options);
}
return context;
}