WebGLRenderingContext.getError() - Web APIs | MDN
文章推薦指數: 80 %
The WebGLRenderingContext.getError() method of the WebGL API returns error information. SkiptomaincontentSkiptoselectlanguageReferencesWebAPIsWebGLRenderingContextWebGLRenderingContext.getError()ArticleActionsEnglish(US)SyntaxExamplesSpecificationsBrowsercompatibilitySeealsoRelatedTopicsWebGLAPIWebGLRenderingContextPropertiescanvasdrawingBufferHeightdrawingBufferWidthMethodsactiveTexture()attachShader()bindAttribLocation()bindBuffer()bindFramebuffer()bindRenderbuffer()bindTexture()blendColor()blendEquation()blendEquationSeparate()blendFunc()blendFuncSeparate()bufferData()bufferSubData()checkFramebufferStatus()clear()clearColor()clearDepth()clearStencil()colorMask() commit()compileShader()compressedTexImage[23]D()compressedTexSubImage2D()copyTexImage2D()copyTexSubImage2D()createBuffer()createFramebuffer()createProgram()createRenderbuffer()createShader()createTexture()cullFace()deleteBuffer()deleteFramebuffer()deleteProgram()deleteRenderbuffer()deleteShader()deleteTexture()depthFunc()depthMask()depthRange()detachShader()disable()disableVertexAttribArray()drawArrays()drawElements()enable()enableVertexAttribArray()finish()flush()framebufferRenderbuffer()framebufferTexture2D()frontFace()generateMipmap()getActiveAttrib()getActiveUniform()getAttachedShaders()getAttribLocation()getBufferParameter()getContextAttributes()getError()getExtension()getFramebufferAttachmentParameter()getParameter()getProgramInfoLog()getProgramParameter()getRenderbufferParameter()getShaderInfoLog()getShaderParameter()getShaderPrecisionFormat()getShaderSource()getSupportedExtensions()getTexParameter()getUniform()getUniformLocation()getVertexAttrib()getVertexAttribOffset()hint()isBuffer()isContextLost()isEnabled()isFramebuffer()isProgram()isRenderbuffer()isShader()isTexture()lineWidth()linkProgram()makeXRCompatible()pixelStorei()polygonOffset()readPixels()renderbufferStorage()sampleCoverage()scissor()shaderSource()stencilFunc()stencilFuncSeparate()stencilMask()stencilMaskSeparate()stencilOp()stencilOpSeparate()texImage2D()texParameter[fi]()texSubImage2D()uniform[1234][fi][v]()uniformMatrix[234]fv()useProgram()validateProgram()vertexAttrib[1234]f[v]()vertexAttribPointer()viewport()RelatedpagesforWebGLANGLE_instanced_arraysEXT_blend_minmaxEXT_color_buffer_half_floatEXT_disjoint_timer_queryEXT_frag_depthEXT_sRGBEXT_shader_texture_lodEXT_texture_filter_anisotropicOES_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_atcWEBGL_compressed_texture_etc1WEBGL_compressed_texture_pvrtcWEBGL_compressed_texture_s3tcWEBGL_compressed_texture_s3tc_srgbWEBGL_debug_renderer_infoWEBGL_debug_shadersWEBGL_depth_textureWEBGL_draw_buffersWEBGL_lose_contextWebGL2RenderingContextWebGLActiveInfoWebGLBufferWebGLContextEventWebGLFramebufferWebGLObjectWebGLProgramWebGLQueryWebGLRenderbufferWebGLSamplerWebGLShaderWebGLShaderPrecisionFormatWebGLSyncWebGLTextureWebGLTransformFeedbackWebGLUniformLocationWebGLVertexArrayObjectSyntaxExamplesSpecificationsBrowsercompatibilitySeealsoWebGLRenderingContext.getError()TheWebGLRenderingContext.getError()methodoftheWebGLAPIreturnserrorinformation.SyntaxGLenumgl.getError(); ParametersNone.Returnvalue Constant Description gl.NO_ERROR Noerrorhasbeenrecorded.Thevalueofthisconstantis0. gl.INVALID_ENUM Anunacceptablevaluehasbeenspecifiedforanenumeratedargument.The commandisignoredandtheerrorflagisset. gl.INVALID_VALUE Anumericargumentisoutofrange.Thecommandisignoredandtheerror flagisset. gl.INVALID_OPERATION Thespecifiedcommandisnotallowedforthecurrentstate.Thecommand isignoredandtheerrorflagisset. gl.INVALID_FRAMEBUFFER_OPERATION Thecurrentlyboundframebufferisnotframebuffercompletewhentrying torendertoortoreadfromit. gl.OUT_OF_MEMORY Notenoughmemoryislefttoexecutethecommand. gl.CONTEXT_LOST_WEBGL IftheWebGLcontextislost,thiserrorisreturnedonthefirstcall togetError.Afterwardsanduntilthecontexthasbeen restored,itreturnsgl.NO_ERROR. Examplesgl.getError();//gl.NO_ERROR(0) gl.enable(gl.FOOBAR); gl.getError();//gl.INVALID_ENUM; SpecificationsSpecificationWebGLSpecification#5.14.3BrowsercompatibilityBCDtablesonlyloadinthebrowserSeealso WebGLRenderingContext WebGLContextEvent Foundaproblemwiththispage?EditonGitHubSourceonGitHubReportaproblemwiththiscontentonGitHubWanttofixtheproblemyourself?SeeourContributionguide.Lastmodified:Sep14,2021,byMDNcontributors
延伸文章資訊
- 1My 3D model isn't loading and I'm seeing a "WebGL" error in ...
Are you seeing the error message "The BioDigital Human encountered an error" where your 3D model ...
- 2How to Turn on WebGL in Your Browser
Please enable WebGL in your browser and reload the page.” Web GL is required to use Core5 error m...
- 3WebGL Troubleshooting - Markforged Support
Information · Go to get.webgl.org to check if you have WebGL enabled in your browser. · Go to chr...
- 4[教學] 解決Google Chrome 瀏覽器跳出「有老鼠!WebGL 碰上 ...
WebGL 碰上麻煩了」錯誤畫面,可能導致Facebook 卡住或是YouTube 影片沒辦法觀賞 ... 給瀏覽器使用3D 繪圖技術WebGL 有關,然而這個Bug 可能使得駭客竊取電腦繪圖晶...
- 5How to Fix WebGL not Supported in Google Chrome on ...
How to Fix WebGL not Supported in Google Chrome on Windows 10?Step 1: Click on 'three dots' at th...