Utility functions for rendering with WebGL.