HTML5 Canvas 3D WebGL (TM) js Library
 

compile Library Method

Signature: sc.compile ()
Class: taccglShaderConfig Class
 

Generates and compiles the shaders, i.e. it prepares the shaders for use. If there are errors during compile, the method implicitly disables some features and silently tries again. If everything fails the library switches to ddmode.

When writing and testing shaders then the uncompressed version of taccgl™ should be used and taccgl_debug=true should be applied. Then shader compilation errors are shown interactively on the javaScript console.

Normally compile is implicitly called during the first call of sc for a particular shader configuration. So there is no need for the user to call this method.

All configuration methods like setLighting ... must be called before compile and sc are used.

WebGL™ is a trademark of the Khronos Group Inc.

Please Add a Comment or Question, click here!