daPhyre/webgl-lessons — pull request #3 by greggman (2014-01-19 02:26:56+00:00)
Title: Update examples

1. Got rid of setInterval which is considered bad practice as
it DOSes the user's machine

2. Initialized textured to avoid warning.

Because images are loaded asynchronously and the code does not wait
for the image to load it can start rendering before the image has been
downloaded. In that case a rendering warning appears.

[.WebGLRenderingContext]RENDER WARNING: texture bound to texture unit 0 is not renderable. It maybe non-power-of-2 and have incompatible texture filtering or is not 'texture complete'

Initializing the texture to a single pixel means the code and render with
no warnings and the texture will be uploaded if and when the image is
finally downloaded.