Canvas is a label that appears in the HTML5, and can only draw a two-dimensional diagram at the beginning, and later, we think of 3d, so we put JavaScript together with OpenGL, make a WebGL, this thing
is a drawing of the time, need to use, white to be webglcontext, holding this can draw 3d of things. Before the context, can only draw 2d of things
<HTML><Head><Scriptsrc= "Jslib/webgl-utils.js"></Script><Scriptsrc= "Jslib/webgl-debug.js"></Script><Scriptsrc= "Jslib/cuon-utils.js"></Script><Script>functionMain () {varCanvas=document.getElementById ("MyCanvas");varGL=getwebglcontext (canvas);if(!GL) {Console.log ("Failed to get the rending contentxt for WebGL.");} Gl.clearcolor (1,0,0,1); Gl.clear (GL. color_buffer_bit);}</Script></Head><Bodyonload= "Main ()"><CanvasID= "MyCanvas"width=Height=>Hello</Canvas></Body></HTML>
Refer to this for an intuitive understanding of WebGL. The above JS reference file is available to download from here Http://files.cnblogs.com/files/terryc/jslib.zip
Http://www.cnblogs.com/mirror-pc/p/4181398.html
The difference between canvas render and WebGL render in the Web