Advanced
Creates a shiny new GlProgram. Used by WebGL renderer.
The options for the program.
Optional
Readonly
fragmentthe fragment glsl shader source.
Optional
transformdetails on how to use this program with transform feedback
Optional
Readonly
vertexthe vertex glsl shader source
Static
defaultThe default options used by the program.
destroys the program
Static
fromHelper function that creates a program for a given source. It will check the program cache if the program has already been created. If it has that one will be returned, if not a new one will be created and cached.
The options for the program.
A program using the same source
A wrapper for a WebGL Program. You can create one and then pass it to a shader. This will manage the WebGL program that is compiled and uploaded to the GPU.
To get the most out of this class, you should be familiar with glsl shaders and how they work.
See
https://developer.mozilla.org/en-US/docs/Web/API/WebGLProgram
Example