| [ Web Proxy ] |
| Viewing: https://developer.mozilla.org/zh-CN/docs/Web/API/WebGLContextEvent | [Back] [Original] |
Get to know MDN better
WEBGL_lose_context webglcontextlost webglcontextrestored
var canvas = document.getElementById("canvas");
var gl = canvas.getContext("webgl");
canvas.addEventListener(
"webglcontextlost",
function (e) {
console.log(e);
},
false,
);
gl.getExtension("WEBGL_lose_context").loseContext();
// "webglcontextlost" WebGLContextEvent
| WebGL Specification # 5.15 |
WebGLContextEventANGLE_instanced_arraysEXT_blend_minmaxEXT_color_buffer_half_floatEXT_disjoint_timer_queryEXT_frag_depthEXT_sRGBEXT_shader_texture_lodEXT_texture_filter_anisotropicOES_draw_buffers_indexedOES_element_index_uintOES_standard_derivativesOES_texture_floatOES_texture_float_linearOES_texture_half_floatOES_texture_half_float_linearOES_vertex_array_objectWEBGL_color_buffer_floatWEBGL_compressed_texture_etc1WEBGL_compressed_texture_pvrtcWEBGL_compressed_texture_s3tcWEBGL_compressed_texture_s3tc_srgbWEBGL_debug_renderer_infoWEBGL_debug_shadersWEBGL_depth_textureWEBGL_draw_buffersWEBGL_lose_contextWebGL2RenderingContextWebGLActiveInfoWebGLBufferWebGLFramebufferWebGLObjectWebGLProgramWebGLQueryWebGLRenderbufferWebGLRenderingContextWebGLSamplerWebGLShaderWebGLShaderPrecisionFormatWebGLSyncWebGLTextureWebGLTransformFeedbackWebGLUniformLocationWebGLVertexArrayObject| Web Proxy Viewer | New URL | Original Page |