getContext3d方法
- @SupportedBrowser(SupportedBrowser.CHROME)
- @SupportedBrowser(SupportedBrowser.FIREFOX)
- {dynamic alpha = true,
- dynamic depth = true,
- dynamic stencil = false,
- dynamic antialias = true,
- dynamic premultipliedAlpha = true,
- dynamic preserveDrawingBuffer = false}
返回一个新的Web GL上下文。
其他资源
实现
@SupportedBrowser(SupportedBrowser.CHROME)
@SupportedBrowser(SupportedBrowser.FIREFOX)
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 as gl.RenderingContext?;
}