HTML and CSS Reference
In-Depth Information
of the methods for WebGL's context into categories such as shaders, buffers, and more,
which will help as you move through these next few sections.
What are shaders again?
We're throwing “shaders” around like it's a hip word. A long time ago it may have meant
shading in shapes with color, but now it means much more than that. Today's shaders pro-
gram the GPU for transformations, pixel shading, and special effects such as lighting.
Step 1: Create and configure color, vertex, and shape shaders via OpenGL ES
To start up your shaders, gd.core.shader.init() needs to call
gd.core.shader.get() and to retrieve shading
data. In addition, you'll need to write a little bit of code in a mystery language—OpenGL
ES (see the sidebar on OpenGL ES for more information)—and place that code in your
HTML document. Add the following listing inside index.html right before your JavaScript
files. Note that if you put it anywhere other than right before your JavaScript files, your
game will probably fail to load.
Search WWH ::

Custom Search