Get Started With WebGL

WebGL enables web to perform 3D rendering in an HTML canvas in browsers without plug-ins. WebGL programs consist of JavaScript and The OpenGL® ES Shading Language that is executed on a computer’s GPU (Graphics Processing Unit). WebGL is based on OpenGL ES

WebGL - openGL es

Here we’re going to write a very simple WebGL program. The following figure show is the WebGL program’s  processing flowing.

WebGL program's processing flow

For the beginner with javascript background, can read the  book WebGL Programming Guide: Interactive 3D Graphics Programming with WebGL (OpenGL) to get start with WebGL.

Retrive the <canvas> element

hello-webgl.html

hello-webgl.js

Get the rending context for WebGL

Initialize  shaders

Adding the shaders’ code into hello-webgl.html

 

Draw

Leave a Reply

Your email address will not be published. Required fields are marked *